Browse Source

feat:[试验管理]表单导出

lkf
15881625488@163.com 3 months ago
parent
commit
6eb7802b93
4 changed files with 80 additions and 50 deletions
  1. +8
    -0
      src/api/business/mjy/mjy.js
  2. +9
    -0
      src/api/business/study/studyFormFill.js
  3. +9
    -2
      src/views/business/resource/mjy/comps/mjy/Xq.vue
  4. +54
    -48
      src/views/business/study/comp/tbbd/Xq.vue

+ 8
- 0
src/api/business/mjy/mjy.js View File

@ -17,6 +17,14 @@ export function studyList(query) {
params: query
})
}
//导出
export function exportDetail(query) {
return request({
url: '/system/business/mjy/exportDetail',
method: 'get',
params: query
})
}
// 稽查轨迹列表
export function jcgjList(query) {

+ 9
- 0
src/api/business/study/studyFormFill.js View File

@ -16,6 +16,15 @@ export function studyFormFill_jcgj(query) {
params: query
})
}
//导出
export function studyFormFill_exportDetail(query) {
return request({
url: '/system/business/studyFormFill/exportDetail',
method: 'get',
params: query
})
}
//签名信息
export function studyFormFill_qmxx(query) {
return request({

+ 9
- 2
src/views/business/resource/mjy/comps/mjy/Xq.vue View File

@ -163,7 +163,7 @@
</template>
<script>
import { info, tzList, jcgjList } from "@/api/business/mjy/mjy"
import { info, tzList, jcgjList, exportDetail } from "@/api/business/mjy/mjy"
import JcgjList from "@/views/business/comps/common/JcgjList";
export default {
@ -171,6 +171,7 @@ export default {
components: { JcgjList },
data() {
return {
baseUrl:process.env.VUE_APP_FILE_DOMAIN,
form: {},
tzList: [],
totalTz: 0,
@ -194,7 +195,13 @@ export default {
},
methods: {
exportExcel() {
alert('todo')
this.$modal.loading()
exportDetail({ id: this.form.id }).then(response => {
window.open(this.baseUrl +response.msg)
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
},
getJjcgjList(val) {
this.$modal.loading()

+ 54
- 48
src/views/business/study/comp/tbbd/Xq.vue View File

@ -14,61 +14,58 @@
$t('page.business.study.studyFormFill.tb') }}</el-button>
</div>
</div>
<el-button type="primary" @click="exportExcel">后台导出
</el-button>
<el-button type="primary" @click="dcqbjcgj">{{ $t('page.business.study.studyFormFill.dcqbjcgj') }}
</el-button>
<el-button type="primary" @click="dcqbjcgj">{{ $t('page.business.study.studyFormFill.dcqbjcgj') }}
</el-button>
<el-button type="primary" @click="dclcjcgj">{{ $t('page.business.study.studyFormFill.dclcjcgj') }}
</el-button>
<el-button type="primary" @click="dcbjjcgj">{{ $t('page.business.study.studyFormFill.dcbjjcgj') }}
</el-button>
<el-button type="primary" @click="dcxgjcgj">{{ $t('page.business.study.studyFormFill.dcxgjcgj') }}
</el-button>
<el-button type="primary" @click="dcbhsjgj">{{ $t('page.business.study.studyFormFill.dcbhsjgj') }}
</el-button>
<div class="edit-content ">
<div class="content">
<div style=" display: flex; justify-content: center; width: 100%;">
<div style="width: 1123px;">
<el-button type="primary" @click="dcqbjcgj">{{ $t('page.business.study.studyFormFill.dcqbjcgj') }}
</el-button>
<el-button type="primary" @click="dclcjcgj">{{ $t('page.business.study.studyFormFill.dclcjcgj') }}
</el-button>
<el-button type="primary" @click="dcbjjcgj">{{ $t('page.business.study.studyFormFill.dcbjjcgj') }}
</el-button>
<el-button type="primary" @click="dcxgjcgj">{{ $t('page.business.study.studyFormFill.dcxgjcgj') }}
</el-button>
<el-button type="primary" @click="dcbhsjgj">{{ $t('page.business.study.studyFormFill.dcbhsjgj') }}
</el-button>
</div>
</div>
<div style=" display: flex; justify-content: center; width: 100%;">
<vue-html2pdf :show-layout="false" pdf-content-width="1123px" :float-layout="false"
pdf-orientation="landscape" :enable-download="true" :preview-modal="true" ref="html2Pdf">
<section slot="pdf-content">
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="detail" />
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.qmxx') }}</div>
</div>
<div class="pal">
<el-table :data="qmxxList" v-loading="loadingQmxx">
<el-table-column :label="$t('page.business.study.studyFormFill.qmr')" align="center" prop="qmrMc"
width="150px" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmyy')" align="center"
:prop="$i18n.locale === 'zh_CN' ? 'qmyy' : 'qmyyEn'" width="150px" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmsj')" align="center"
prop="createTime" width="150px" />
<el-table-column :label="$t('page.business.study.studyFormFill.bzyy')" align="center" prop="remark"
:show-overflow-tooltip="true" />
</el-table>
</div>
<!-- <div class="pal">
<div class="content" style="width: 100%;">
<vue-html2pdf :show-layout="false" pdf-content-width="100%" :float-layout="false"
pdf-orientation="landscape" :enable-download="true" :preview-modal="true" ref="html2Pdf">
<section slot="pdf-content">
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="detail" />
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.qmxx') }}</div>
</div>
<div class="pal">
<el-table :data="qmxxList" v-loading="loadingQmxx">
<el-table-column :label="$t('page.business.study.studyFormFill.qmr')" align="center" prop="qmrMc"
width="150px" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmyy')" align="center"
:prop="$i18n.locale === 'zh_CN' ? 'qmyy' : 'qmyyEn'" width="150px" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmsj')" align="center"
prop="createTime" width="150px" />
<el-table-column :label="$t('page.business.study.studyFormFill.bzyy')" align="center" prop="remark"
:show-overflow-tooltip="true" />
</el-table>
</div>
<!-- <div class="pal">
<pagination v-show="totalQmxx > 0" :total="totalQmxx" :page.sync="queryParamsQmxx.pageNum"
:limit.sync="queryParamsQmxx.pageSize" @pagination="getQmxxList" />
</div> -->
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.jcgj') }}</div>
</div>
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" />
<!--
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.jcgj') }}</div>
</div>
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" />
<!--
<pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal"
@pagination="getJjcgjList" /> -->
</section>
</section>
</vue-html2pdf>
</div>
</vue-html2pdf>
</div>
</div>
</div>
@ -121,7 +118,7 @@
</template>
<script>
import { studyFormFill_tb, studyFormFill_info, studyFormFill_jcgj, studyFormFill_qmxx } from "@/api/business/study/studyFormFill"
import { studyFormFill_tb, studyFormFill_info, studyFormFill_jcgj, studyFormFill_qmxx, studyFormFill_exportDetail } from "@/api/business/study/studyFormFill"
import { mapGetters } from 'vuex'
import JcgjList from "@/views/business/comps/common/JcgjList";
import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -186,6 +183,15 @@ export default {
created() {
},
methods: {
exportExcel() {
this.$modal.loading()
studyFormFill_exportDetail(this.queryParamsJcgj).then(response => {
window.open(this.baseUrl + response.msg)
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
},
dcqbjcgj() {
this.$refs.html2Pdf.generatePdf()
},

Loading…
Cancel
Save