Browse Source

fix:[模板管理]导出

lkf
15881625488@163.com 2 months ago
parent
commit
816aace375
2 changed files with 124 additions and 3 deletions
  1. +120
    -0
      src/views/business/comps/common/JcgjExportList.vue
  2. +4
    -3
      src/views/business/study/comp/tbbd/Xq.vue

+ 120
- 0
src/views/business/comps/common/JcgjExportList.vue View File

@ -0,0 +1,120 @@
<template>
<div style="padding: 10px 10px;">
<div v-for="(item, index) in list" :key="index" :color="item.color">
<div class="jcgjList-title no-break">
<div><span>{{ item.createTime }}</span>
<span :style="'color:' + item.color+';margin-left:5px'">{{ $i18n.locale ==='zh_CN' ? item.jcmc :item.jcmcEn }}</span></div>
</div>
<div class="no-break" style="margin: 5px 0px;">
<template v-if="$i18n.locale === 'zh_CN'">
<span v-for="(pitem, pindex) in item.jcnrList" :key="pindex" style="margin-right: 5px;">
{{ pitem.name }}{{ pitem.value }}
</span>
</template>
<template v-else>
<span v-for="(pitem, pindex) in item.jcnrListEn" :key="pindex" style="margin-right: 5px;">
{{ pitem.name }}{{ pitem.value }}
</span>
</template>
<div v-if="item.remark && item.remark !== ''" style="margin-top: 5px;">
{{ $t('form.remark') }}{{ item.remark }}
</div>
<div v-if="item.qmrId && item.qmrId > 0" style="margin-top: 5px;">
{{ $t('form.qmyy') }}{{ $i18n.locale === 'zh_CN' ? item.jcmc : item.jcmcEn }}
</div>
<div v-if="item.qmrId && item.qmrId > 0" style="margin-top: 5px;">
{{ $t('form.signer') }}{{ item.qmrMc }}
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "JcgjExportList",
components: {},
props: {
showRy: {
type: Boolean,
default: false
},
showXg: {
type: Boolean,
default: false
},
showLc: {
type: Boolean,
default: true
},
showBj: {
type: Boolean,
default: true
},
showBcsm: {
type: Boolean,
default: false
},
//
showLj: {
type: Boolean,
default: false
},
readonly: {
type: Boolean,
default: false
},
},
data() {
return {
list: [],
queryParams: {
jcmc: '',
jcgjlx: -1
}
};
},
mounted() {
this.list = []
},
methods: {
handleQuery() {
this.$emit('handleQuery', this.queryParams)
},
init(val) {
let that = this
this.list = that.paseData(val)
},
add(val) {
let that = this
this.list.push(...that.paseData(val));
},
paseData(val) {
let tmp = []
_.forEach(val, function (a) {
let item = a
try {
item.jcnrList = JSON.parse(a.jcnr)
item.jcnrListEn = JSON.parse(a.jcnrEn)
} catch (e) {
item.jcnrList = []
item.jcnrListEn = []
}
// 135绿7
if (item.jcmcys == 1) {
item.color = '#409EFF'
}
else if (item.jcmcys == 3) {
item.color = '#F56C6C'
} else if (item.jcmcys == 5) {
item.color = '#67C23A'
} else if (item.jcmcys == 7) {
item.color = '#E6A23C'
}
tmp.push(item)
})
return tmp
}
}
};
</script>

+ 4
- 3
src/views/business/study/comp/tbbd/Xq.vue View File

@ -61,7 +61,7 @@
<div class="line"></div> <div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.jcgj') }}</div> <div class="subtitle"> {{ $t('page.business.study.studyFormFill.jcgj') }}</div>
</div> </div>
<JcgjList ref="jcgjExportList" :readonly="true" v-show="jcgjlxExport != 999" />
<JcgjExportList ref="jcgjExportList" :readonly="true" v-show="jcgjlxExport != 999" />
</div> </div>
</div> </div>
<div v-if="showExport" id="watermark-overlay" ref="watermarkContainer" :style="{ <div v-if="showExport" id="watermark-overlay" ref="watermarkContainer" :style="{
@ -152,12 +152,13 @@
import { studyFormFill_jcgjqmxxList, studyFormFill_tb, studyFormFill_info, studyFormFill_jcgj, studyFormFill_qmxx, studyFormFill_exportDetail } from "@/api/business/study/studyFormFill" import { studyFormFill_jcgjqmxxList, studyFormFill_tb, studyFormFill_info, studyFormFill_jcgj, studyFormFill_qmxx, studyFormFill_exportDetail } from "@/api/business/study/studyFormFill"
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import JcgjList from "@/views/business/comps/common/JcgjList"; import JcgjList from "@/views/business/comps/common/JcgjList";
import JcgjExportList from "@/views/business/comps/common/JcgjExportList";
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
import moment from "moment"; import moment from "moment";
import VueHtml2pdf from 'vue-html2pdf' import VueHtml2pdf from 'vue-html2pdf'
export default { export default {
name: "Xq", name: "Xq",
components: { JcgjList, TemplateTable, VueHtml2pdf },
components: { JcgjExportList,JcgjList, TemplateTable, VueHtml2pdf },
data() { data() {
return { return {
watermarkText:'', watermarkText:'',
@ -448,7 +449,7 @@ export default {
} }
#watermark-overlay { #watermark-overlay {
position: absolute; position: absolute;
top: 0;
top: -80px;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;

Loading…
Cancel
Save