更新
This commit is contained in:
@ -1,6 +1,12 @@
|
||||
<template>
|
||||
<el-dialog :model-value="modelValue" :title="title" width="70%" @close="closeDialog" destroy-on-close append-to-body>
|
||||
<div style="height: 60vh; overflow: auto;">
|
||||
<el-dialog :model-value="modelValue" width="70%" @close="closeDialog" destroy-on-close append-to-body :close-on-click-modal="false" >
|
||||
<template #title>
|
||||
<div class="flex just-between align-center">
|
||||
<span class="f18">{{ props.title }}</span>
|
||||
<span @click="exportFile" class="f14 pointer" style="color: #0072ff;">下载</span>
|
||||
</div>
|
||||
</template>
|
||||
<div>
|
||||
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
|
||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
||||
@ -36,13 +42,15 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMultiDictVal } from "@/utils/dict.js"
|
||||
import { exportExlByObj } from "@/utils/exportExcel.js"
|
||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import Search from "@/components/aboutTable/Search.vue";
|
||||
import Pages from "@/components/aboutTable/Pages.vue";
|
||||
import { xxcjXfxsSelectPage } from "@/api/xxcj.js"
|
||||
import { ref, reactive, getCurrentInstance, watch } from "vue";
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { D_GS_XS_SJLY, D_GS_XS_ZLLX, D_GS_ZDQT_FXDJ, D_GS_XS_CZZT } = proxy.$dict('D_GS_XS_SJLY', 'D_GS_XS_ZLLX', 'D_GS_ZDQT_FXDJ', 'D_GS_XS_CZZT')
|
||||
const { D_BZ_SF,D_GS_XS_SJLY, D_GS_XS_ZLLX, D_GS_ZDQT_FXDJ, D_GS_XS_CZZT } = proxy.$dict('D_BZ_SF','D_GS_XS_SJLY', 'D_GS_XS_ZLLX', 'D_GS_ZDQT_FXDJ', 'D_GS_XS_CZZT')
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
@ -51,7 +59,8 @@ const props = defineProps({
|
||||
dict: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}, title: {
|
||||
},
|
||||
title: {
|
||||
default: "下发总数",
|
||||
type: String
|
||||
},
|
||||
@ -140,6 +149,29 @@ const changeSize = (val) => {
|
||||
pageData.pageConfiger.pageSize = val;
|
||||
changePage()
|
||||
}
|
||||
|
||||
// 导出
|
||||
const exportFile = () =>{
|
||||
const titleObj = {
|
||||
zlbt: "指令标题",
|
||||
zllx_name: "指令类型",
|
||||
zldj_name: "指令等级",
|
||||
jssj: "反馈截止时间",
|
||||
czzt_name: "处置状态",
|
||||
jsffk_name: "是否反馈",
|
||||
sfqs_name: "是否签收",
|
||||
}
|
||||
let list = pageData.tableData.map(item => ({
|
||||
...item,
|
||||
zllx_name: getMultiDictVal(item.zllx, D_GS_XS_ZLLX),
|
||||
zldj_name: getMultiDictVal(item.zldj, D_GS_ZDQT_FXDJ),
|
||||
czzt_name: getMultiDictVal(item.czzt, D_GS_XS_CZZT),
|
||||
sffk_name: getMultiDictVal(item.sffk, D_BZ_SF),
|
||||
sfqs_name: getMultiDictVal(item.sfqs, D_BZ_SF),
|
||||
}))
|
||||
exportExlByObj(titleObj, list, props.title)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user