From f3d41333c49073de9946fd52f5b5e2d061d9ece1 Mon Sep 17 00:00:00 2001 From: huangchenhao <123673748@qq.com> Date: Mon, 13 Apr 2026 15:41:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=A1=AB=E6=8A=A5?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/screen/src/router/index.js | 2 +- .../business/index.vue | 1 + .../district/index.js | 12 ++ .../district/index.vue | 1 + .../district/projectAddPage.vue | 104 ++++++++++++++---- 5 files changed, 97 insertions(+), 23 deletions(-) diff --git a/packages/screen/src/router/index.js b/packages/screen/src/router/index.js index 815e68b..dcb4155 100644 --- a/packages/screen/src/router/index.js +++ b/packages/screen/src/router/index.js @@ -193,7 +193,7 @@ const routes = [ } }, { - path: '/projectAdd/:data?', + path: '/projectAdd/:data?/:mode?', name: 'projectAdd', component: () => import('../views/ProjectManagement_Rebuild/district/projectAddPage.vue'), meta: { diff --git a/packages/screen/src/views/ProjectManagement_Rebuild/business/index.vue b/packages/screen/src/views/ProjectManagement_Rebuild/business/index.vue index 8dbc588..53f4349 100644 --- a/packages/screen/src/views/ProjectManagement_Rebuild/business/index.vue +++ b/packages/screen/src/views/ProjectManagement_Rebuild/business/index.vue @@ -7,6 +7,7 @@ placeholder="路线编码" :suffix-icon="Search" />
+ 导出
{ getTableData(); }) +// 新增填报 +const newAdd = () => { + router.push({ + name: 'projectAdd', + params: { + mode: 'add' + } + }) +} + watch(filterData, (val) => { getTableData(filterData); @@ -395,5 +405,7 @@ export default () => { model2, modelVisible2, dialogRef2, + + newAdd, } } \ No newline at end of file diff --git a/packages/screen/src/views/ProjectManagement_Rebuild/district/index.vue b/packages/screen/src/views/ProjectManagement_Rebuild/district/index.vue index 8dbc588..9103f92 100644 --- a/packages/screen/src/views/ProjectManagement_Rebuild/district/index.vue +++ b/packages/screen/src/views/ProjectManagement_Rebuild/district/index.vue @@ -7,6 +7,7 @@ placeholder="路线编码" :suffix-icon="Search" />
+ 新增填报 导出
- + - + - + @@ -30,7 +30,7 @@ - + @@ -41,36 +41,36 @@ - + - + - + - + - + - + @@ -81,7 +81,7 @@ - + @@ -90,26 +90,28 @@ - + - + - + - + @@ -118,7 +120,7 @@ - + 自费重修 申报重修 @@ -350,6 +352,7 @@ const router = useRouter() const route = useRoute() const form = ref({}) const formRef = ref(null) +const isAddMode = ref(false) // 是否为新增模式 // 附件分类: 1-现场图片/视频 2-施工图设计批复文件 3-施工合同 4-交竣工证书 5-完工项目上传图片 6-其他佐证文件 const designApprovalFiles = ref([]) // 施工图设计批复文件 @@ -369,7 +372,53 @@ const otherFiles = ref([]) // 其他佐证文件 // }, { deep: true }) onMounted(() => { - if (route.params.data) { + // 判断是否为新增模式 + if (route.params.mode === 'add') { + isAddMode.value = true + // 初始化空的表单数据 + form.value = { + districtName: '', + routeNo: '', + implementMileage: null, + earthworkLoss: null, + startStakeNo: '', + endStakeNo: '', + roadLocation: '', + blockedPointName: '', + disasterType: '', + estimatedCost: null, + technicalGrade: '', + fundingSource: '', + disposalCount: null, + completedCount: null, + totalInvestment: null, + projectExpenseType: '自费重修', + mainConstructionContent: '', + startTime: '', + endTime: '', + isReportedToMinistry: '0', + reportedInvestment: null, + projectProgress: '', + constructionUnit: '', + constructionUnitContact: '', + constructionUnitPhone: '', + executionUnit: '', + executionUnitContact: '', + executionUnitPhone: '', + designUnit: '', + designUnitContact: '', + designUnitPhone: '', + supervisionUnit: '', + supervisionUnitContact: '', + supervisionUnitPhone: '', + designApprovalTime: '', + contractTime: '', + contractAmount: null, + completedInvestment: null, + acceptanceTime: '' + } + } else if (route.params.data) { + // 编辑模式 const data = JSON.parse(decodeURIComponent(route.params.data)); if (data.projectExpenseType === '申报重修') { @@ -404,11 +453,22 @@ const submit = async () => { text: '操作中', background: 'rgba(0, 0, 0, 0.7)', }) - const res = await request({ - url: '/snow-ops-platform/recovery/report', - method: 'POST', - data: data, - }) + let res = null; + if (route.params.mode === 'add') { + // 如果是新增填报 则调用新增接口 + res = await request({ + url: '/snow-ops-platform/recovery/add', + method: 'POST', + data: data, + }) + } else { + // 如果是区县项目申报 调用申报接口 + res = await request({ + url: '/snow-ops-platform/recovery/report', + method: 'POST', + data: data, + }) + } loading.close(); if (res.code === '00000') { router.push({