冀北项目添加表格导出功能 技术监督添加下载模版上传功能

This commit is contained in:
GGJ
2025-03-28 16:05:03 +08:00
parent 76f41e9a24
commit ef04022f14
153 changed files with 4208 additions and 3480 deletions

View File

@@ -1,16 +1,21 @@
<!--待办事项列表-->
<template>
<div>
<TableHeader>
<TableHeader showExport :showReset="false">
<template v-slot:select>
<el-form-item label='任务名称'>
<el-input v-model='tableStore.table.params.searchValue' placeholder='请输入任务名称' clearable
maxlength="32" show-word-limit></el-input>
<el-form-item label="任务名称">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="请输入任务名称"
clearable
maxlength="32"
show-word-limit
></el-input>
</el-form-item>
</template>
</TableHeader>
<!--表格-->
<Table ref='tableRef'></Table>
<Table ref="tableRef"></Table>
</div>
</template>
@@ -23,8 +28,7 @@ import { useRouter } from 'vue-router'
import { getById } from '@/api/supervision-boot/leaflet'
import { getRunningDeviceById } from '@/api/supervision-boot/device/quitRunningDev'
const props = defineProps({
height: [String, Number],
height: [String, Number]
})
const router = useRouter() // 路由对象
@@ -40,6 +44,7 @@ const tableStore = new TableStore({
method: 'POST',
publicHeight: 65,
isWebPaging: true,
filename:'待办任务',
column: [
{
field: 'index',
@@ -220,7 +225,6 @@ const tableStore = new TableStore({
}
],
beforeSearchFun: () => {
for (let key in tableStore.table.params) {
if (tableStore.table.params[key] === '' && key != 'searchValue') {
delete tableStore.table.params[key]
@@ -228,7 +232,6 @@ const tableStore = new TableStore({
}
},
loadCallback: () => {
if (tableStore.table.params.searchValue) {
const searchProps = ['taskName', 'taskContent', 'startUser', 'taskCreateTime']
const rest = tableStore.table.data.filter(item =>
@@ -244,6 +247,13 @@ const tableStore = new TableStore({
} else {
tableStore.table.data = tableStore.table.data
}
},
exportProcessingData: () => {
tableStore.table.allData = tableStore.table.allData.filter(item => {
item.source = item.source == 1 ? '待审批' : item.source == 2 ? '审批不通过' : '待处理'
return item
})
}
})
tableStore.table.params.searchValue = ''