Browse Source

fix:[模板管理]导出优化

lkf
15881625488@163.com 2 months ago
parent
commit
8d67c6f992
3 changed files with 126 additions and 42 deletions
  1. +2
    -2
      src/views/business/study/comp/jhbd/Xq.vue
  2. +2
    -2
      src/views/business/study/comp/sqbd/Xq.vue
  3. +122
    -38
      src/views/business/study/comp/tbbd/Xq.vue

+ 2
- 2
src/views/business/study/comp/jhbd/Xq.vue View File

@ -76,7 +76,7 @@ export default {
queryParamsQmxx: {
formId: null,
pageNum: 1,
pageSize: 9999
pageSize: 5
},
open: false,
showIndex: 1,
@ -99,7 +99,7 @@ export default {
queryParamsJcgj: {
pageNum: 1,
formId: null,
pageSize: 9999,
pageSize: 5,
}
}
},

+ 2
- 2
src/views/business/study/comp/sqbd/Xq.vue View File

@ -144,7 +144,7 @@ export default {
queryParamsQmxx: {
formId: null,
pageNum: 1,
pageSize: 9999
pageSize: 5
},
open: false,
showIndex: 1,
@ -167,7 +167,7 @@ export default {
queryParamsJcgj: {
pageNum: 1,
formId: null,
pageSize: 9999,
pageSize: 5,
}
}
},

+ 122
- 38
src/views/business/study/comp/tbbd/Xq.vue View File

@ -26,25 +26,37 @@
<el-button type="primary" @click="exportExcel(999)">{{ $t('page.business.study.studyFormFill.dcbhsjgj') }}
</el-button>
<div class="edit-content">
<div class="content" style="width: 100%; height: 100%;">
<div class="detail-content" style="width: 100%; height: 100%;">
<vue-html2pdf :show-layout="false" pdf-content-width="100%" :pdf-format="form.templatePdfSize"
:pdf-quality="2" :float-layout="false" pdf-orientation="landscape" :paginate-elements-by-height="794"
:enable-download="true" :preview-modal="true" ref="html2Pdf" @progress="onProgress">
<section slot="pdf-content">
<div class="pdf-content">
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="detail" />
<div v-if="showExport">
<div class="content-title">
<div v-if="showExport" style="width: 100%; padding: 0px 30px ;">
<div class="content-title" style="margin-bottom: 10px;">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.qmxx') }}</div>
</div>
<el-table :data="qmxxExportList" >
<el-table-column :label="$t('page.business.study.studyFormFill.qmr')" align="center" prop="qmrMc" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmyy')" align="center" :prop="$i18n.locale === 'zh_CN' ? 'qmyy' : 'qmyyEn'" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmsj')" align="center" prop="createTime" />
<el-table-column :label="$t('page.business.study.studyFormFill.bzyy')" align="center" prop="remark" />
</el-table>
<div class="content-title">
<table class="datatable">
<thead>
<tr>
<th style="width: 20%;">{{ $t('page.business.study.studyFormFill.qmr') }}</th>
<th style="width: 20%;">{{ $t('page.business.study.studyFormFill.qmyy') }}</th>
<th style="width: 20%;">{{ $t('page.business.study.studyFormFill.qmsj') }}</th>
<th style="width: 40%;">{{ $t('page.business.study.studyFormFill.bzyy') }}</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in qmxxExportList" :key="index">
<td>{{ item.qmrMc }}</td>
<td>{{ $i18n.locale === 'zh_CN' ? item.qmyy : item.qmyyEn }}</td>
<td>{{ item.createTime }}</td>
<td>{{ item.remark }}</td>
</tr>
</tbody>
</table>
<div class="content-title" style="margin-top: 10px;">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.jcgj') }}</div>
</div>
@ -53,36 +65,29 @@
</div>
</section>
</vue-html2pdf>
<div style="padding: 0px 20px 0px 30px;margin-left: 10px;" v-if="!showExport">
<template>
<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" style="width: 100%;">
<el-table-column :label="$t('page.business.study.studyFormFill.qmr')" align="center" prop="qmrMc" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmyy')" align="center"
:prop="$i18n.locale === 'zh_CN' ? 'qmyy' : 'qmyyEn'" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmsj')" align="center"
prop="createTime" />
<el-table-column :label="$t('page.business.study.studyFormFill.bzyy')" align="center" prop="remark" />
</el-table>
</div>
<div class="pal" v-if="showExport">
<pagination v-show="totalQmxx > 0" :total="totalQmxx" :page.sync="queryParamsQmxx.pageNum"
:limit.sync="queryParamsQmxx.pageSize" @pagination="getQmxxList" />
</div>
</template>
<div style="padding: 0px 20px 0px 30px;margin-left: 10px;">
<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" style="width: 100%;">
<el-table-column :label="$t('page.business.study.studyFormFill.qmr')" align="center" prop="qmrMc" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmyy')" align="center"
:prop="$i18n.locale === 'zh_CN' ? 'qmyy' : 'qmyyEn'" />
<el-table-column :label="$t('page.business.study.studyFormFill.qmsj')" align="center"
prop="createTime" />
<el-table-column :label="$t('page.business.study.studyFormFill.bzyy')" align="center" prop="remark" />
</el-table>
</div>
<pagination v small layout="prev, pager, next" :total="totalQmxx" :page.sync="queryParamsQmxx.pageNum"
:limit.sync="queryParamsQmxx.pageSize" @pagination="getQmxxList" />
<div class="content-title" style="margin-top: 10px;">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.jcgj') }}</div>
</div>
<template>
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" />
<pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal"
@pagination="getJjcgjList" />
</template>
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" />
<pagination v small layout="prev, pager, next" :total="jcgjTotal" @pagination="getJjcgjList" />
</div>
</div>
</div>
@ -167,7 +172,7 @@ export default {
queryParamsQmxx: {
formId: null,
pageNum: 1,
pageSize: 9999
pageSize: 5
},
open: false,
showIndex: 1,
@ -190,7 +195,7 @@ export default {
queryParamsJcgj: {
pageNum: 1,
formId: null,
pageSize: 9999,
pageSize: 5,
},
showExport: false,
qmxxExportList: [],
@ -302,6 +307,35 @@ export default {
}
</script>
<style scoped>
.content-title {
width: 100%;
background: #f9f9ff;
font-size: 0.96rem;
font-weight: bold;
padding-left: 10px;
height: 40px;
line-height: 40px;
display: flex;
justify-content: flex-start;
text-align: left;
}
.line {
width: 2px;
float: left;
height: 16px;
margin-top: 12px;
margin-right: 8px;
border-left: #3178ff 3px solid;
}
.subtitle {
height: 40px;
line-height: 40px;
color: #464647 !important;
}
.pdf-content {
padding: 20px;
font-family: Arial, sans-serif;
@ -329,4 +363,54 @@ export default {
.pdf-content th {
background-color: #f2f2f2;
}
.datatable {
border-collapse: collapse;
width: 100%;
}
.upload-file-list .el-upload-list__item {
margin-bottom: 0px !important;
}
.datatable thead {
border-left: 1px solid #d0d0d0;
}
.datatable th {
padding: 5px 5px 4px 5px;
max-width: 200px;
line-height: 35px;
text-align: center;
color: #414753;
background: #F5F7FA;
border: 1px solid #d0d0d0;
}
.el-dialog__body {
padding: 10px 20px !important;
}
.datatable th.operate {
padding: 5px 5px 4px 5px;
width: 100px;
line-height: 35px;
background: #F5F7FA;
border: 1px solid #d0d0d0;
text-align: center;
}
.datatable .rowAlt td,
.datatable tbody tr:nth-child(2n) td {
background: #F5F7FA;
}
.datatable td {
border: solid 1px #d0d0d0;
padding: 3px 5px 4px 5px;
max-width: 100px;
color: #414753;
line-height: 35px;
text-align: center;
}
</style>

Loading…
Cancel
Save