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

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,5 +1,5 @@
<template>
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
<template #operation>
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
</template>
@@ -16,7 +16,7 @@ import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
import { useRouter } from 'vue-router'
import {cancelFeedback, getById} from '@/api/supervision-boot/leaflet'
import { cancelFeedback, getById } from '@/api/supervision-boot/leaflet'
import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData'
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
@@ -31,6 +31,7 @@ const tableStore = new TableStore({
url: '/supervision-boot/warningLeaflet/warningPageData',
publicHeight: 65,
method: 'POST',
filename:'预警单列表',
column: [
{
width: '60',
@@ -38,7 +39,6 @@ const tableStore = new TableStore({
},
{
title: '序号',
align: 'center',
width: 80,
formatter: (row: any) => {
@@ -258,6 +258,33 @@ const tableStore = new TableStore({
],
beforeSearchFun: () => {
tableStore.table.params.currentPage = tableStore.table.params.pageNum
},
exportProcessingData: () => {
tableStore.table.allData = tableStore.table.allData.filter(item => {
item.problemType =
item.problemType == 1
? '技术监督计划'
: item.problemType == 2
? '在线监测超标问题'
: item.problemType == 3
? '用户投诉问题'
: '试运行监测点问题'
item.status =
item.status == 0
? '待提交审批'
: item.status == 1
? '审批中'
: item.status == 2
? '审批通过'
: item.status == 3
? '审批不通过'
: item.status == 4
? '已取消'
: item.status == 5
? '新增'
: '/'
return item
})
}
})
@@ -281,13 +308,11 @@ const deleteEven = () => {
message: '请选择要删除的数据'
})
} else {
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteWarningLeaflet(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
@@ -295,9 +320,7 @@ const deleteEven = () => {
})
tableStore.index()
})
})
}
}
/**取消流程操作*/
@@ -332,41 +355,45 @@ const handleAudit = (instanceId: any, historyInstanceId: any) => {
})
}
const props = defineProps(['id','businessKey'])
watch(() => props.id, async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
let fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT || fullId == 'null') return // 路由时间超过500ms则不执行
await getById(fullId).then(res => {
if (res && res.code == 'A0000') {
if(props.businessKey == '3'){
feedbackPopup.value.open(
'填报预警反馈单',
res.data.id,
res.data.status,
res.data.issueDetail,
res.data.problemPath,
res.data.reportPath,
res.data.reformAdvice
)
}else{
feedbackPopup.value.open(
'重新填报预警反馈单',
res.data.id,
res.data.status,
res.data.issueDetail,
res.data.problemPath,
res.data.reportPath,
res.data.reformAdvice,
res.data.takeStep,
res.data.reportPath
)
}
}
})
}, {immediate: true})
const props = defineProps(['id', 'businessKey'])
watch(
() => props.id,
async (newValue, oldValue) => {
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
let fullId = newValue.split('@')[0]
let nowTime = Date.now()
const routeTime = Number(newValue.split('@')[1])
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT || fullId == 'null') return // 路由时间超过500ms则不执行
await getById(fullId).then(res => {
if (res && res.code == 'A0000') {
if (props.businessKey == '3') {
feedbackPopup.value.open(
'填报预警反馈单',
res.data.id,
res.data.status,
res.data.issueDetail,
res.data.problemPath,
res.data.reportPath,
res.data.reformAdvice
)
} else {
feedbackPopup.value.open(
'重新填报预警反馈单',
res.data.id,
res.data.status,
res.data.issueDetail,
res.data.problemPath,
res.data.reportPath,
res.data.reformAdvice,
res.data.takeStep,
res.data.reportPath
)
}
}
})
},
{ immediate: true }
)
</script>
<style scoped lang="scss"></style>