更新
This commit is contained in:
@ -1,6 +1,13 @@
|
||||
<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>
|
||||
<template #title>
|
||||
<div class="flex just-between align-center">
|
||||
<span class="f18">{{ 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">
|
||||
@ -33,6 +40,8 @@
|
||||
</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";
|
||||
@ -141,6 +150,24 @@ const changeSize = (val) => {
|
||||
pageData.pageConfiger.pageSize = val;
|
||||
changePage()
|
||||
}
|
||||
|
||||
// 导出
|
||||
const exportFile = () =>{
|
||||
const titleObj = {
|
||||
sxsbsj: "情报上报时间",
|
||||
xsBh: "情报编号",
|
||||
qbmc: "情报标题",
|
||||
qbly_name: "情报来源",
|
||||
lczt_name: "流程状态",
|
||||
}
|
||||
let list = pageData.tableData.map(item => ({
|
||||
...item,
|
||||
qbly_name: getMultiDictVal(item.jqdjdm, D_BZ_CJLX),
|
||||
lczt_name: getMultiDictVal(item.jqlbdm, D_BZ_QBCZZT),
|
||||
}))
|
||||
exportExlByObj(titleObj, list, props.title)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user