From fe9d4a21f79d7fa1314c0d2a79061c286d19c828 Mon Sep 17 00:00:00 2001 From: yxhc <825210484@qq.com> Date: Thu, 5 Sep 2024 18:02:44 +0800 Subject: [PATCH] fix: bug --- package-lock.json | 126 ++++----- package.json | 2 +- .../declarePage/components/basicInfo.vue | 6 +- .../components/implementPlanDialog.vue | 26 -- .../components/operationDialog.vue | 214 +++++++++++++++ .../projectStoreManage/components/planList.vue | 289 ++++++++++----------- .../projectStoreManage/components/planlist.js | 270 +++++++++++++++++++ 7 files changed, 685 insertions(+), 248 deletions(-) create mode 100644 src/pages/projectStoreManage/components/operationDialog.vue create mode 100644 src/pages/projectStoreManage/components/planlist.js diff --git a/package-lock.json b/package-lock.json index 995e0f8..d28c206 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "pinia": "^2.0.22", "pinia-plugin-persist": "^1.0.0", "qrcode.vue": "^3.3.3", - "vue": "^3.2.37", + "vue": "^3.5.1", "vue-router": "4", "vue3-seamless-scroll": "^2.0.1", "xlsx": "^0.16.0", @@ -1719,49 +1719,49 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.4.38", - "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.4.38.tgz", - "integrity": "sha512-8IQOTCWnLFqfHzOGm9+P8OPSEDukgg3Huc92qSG49if/xI2SAwLHQO2qaPQbjCWPBcQoO1WYfXfTACUrWV3c5A==", + "version": "3.5.1", + "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.1.tgz", + "integrity": "sha512-WdjF+NSgFYdWttHevHw5uaJFtKPalhmxhlu2uREj8cLP0uyKKIR60/JvSZNTp0x+NSd63iTiORQTx3+tt55NWQ==", "dependencies": { - "@babel/parser": "^7.24.7", - "@vue/shared": "3.4.38", + "@babel/parser": "^7.25.3", + "@vue/shared": "3.5.1", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-dom": { - "version": "3.4.38", - "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.4.38.tgz", - "integrity": "sha512-Osc/c7ABsHXTsETLgykcOwIxFktHfGSUDkb05V61rocEfsFDcjDLH/IHJSNJP+/Sv9KeN2Lx1V6McZzlSb9EhQ==", + "version": "3.5.1", + "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.1.tgz", + "integrity": "sha512-Ao23fB1lINo18HLCbJVApvzd9OQe8MgmQSgyY5+umbWj2w92w9KykVmJ4Iv2US5nak3ixc2B+7Km7JTNhQ8kSQ==", "dependencies": { - "@vue/compiler-core": "3.4.38", - "@vue/shared": "3.4.38" + "@vue/compiler-core": "3.5.1", + "@vue/shared": "3.5.1" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.4.38", - "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.4.38.tgz", - "integrity": "sha512-s5QfZ+9PzPh3T5H4hsQDJtI8x7zdJaew/dCGgqZ2630XdzaZ3AD8xGZfBqpT8oaD/p2eedd+pL8tD5vvt5ZYJQ==", - "dependencies": { - "@babel/parser": "^7.24.7", - "@vue/compiler-core": "3.4.38", - "@vue/compiler-dom": "3.4.38", - "@vue/compiler-ssr": "3.4.38", - "@vue/shared": "3.4.38", + "version": "3.5.1", + "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.1.tgz", + "integrity": "sha512-DFizMNH8eDglLhlfwJ0+ciBsztaYe3fY/zcZjrqL1ljXvUw/UpC84M1d7HpBTCW68SNqZyIxrs1XWmf+73Y65w==", + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/compiler-core": "3.5.1", + "@vue/compiler-dom": "3.5.1", + "@vue/compiler-ssr": "3.5.1", + "@vue/shared": "3.5.1", "estree-walker": "^2.0.2", - "magic-string": "^0.30.10", - "postcss": "^8.4.40", + "magic-string": "^0.30.11", + "postcss": "^8.4.44", "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.4.38", - "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.4.38.tgz", - "integrity": "sha512-YXznKFQ8dxYpAz9zLuVvfcXhc31FSPFDcqr0kyujbOwNhlmaNvL2QfIy+RZeJgSn5Fk54CWoEUeW+NVBAogGaw==", + "version": "3.5.1", + "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.1.tgz", + "integrity": "sha512-C1hpSHQgRM8bg+5XWWD7CkFaVpSn9wZHCLRd10AmxqrH17d4EMP6+XcZpwBOM7H1jeStU5naEapZZWX0kso1tQ==", "dependencies": { - "@vue/compiler-dom": "3.4.38", - "@vue/shared": "3.4.38" + "@vue/compiler-dom": "3.5.1", + "@vue/shared": "3.5.1" } }, "node_modules/@vue/devtools-api": { @@ -1770,49 +1770,49 @@ "integrity": "sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==" }, "node_modules/@vue/reactivity": { - "version": "3.4.38", - "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.4.38.tgz", - "integrity": "sha512-4vl4wMMVniLsSYYeldAKzbk72+D3hUnkw9z8lDeJacTxAkXeDAP1uE9xr2+aKIN0ipOL8EG2GPouVTH6yF7Gnw==", + "version": "3.5.1", + "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.5.1.tgz", + "integrity": "sha512-aFE1nMDfbG7V+U5vdOk/NXxH/WX78XuAfX59vWmCM7Ao4lieoc83RkzOAWun61sQXlzNZ4IgROovFBHg+Iz1+Q==", "dependencies": { - "@vue/shared": "3.4.38" + "@vue/shared": "3.5.1" } }, "node_modules/@vue/runtime-core": { - "version": "3.4.38", - "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.4.38.tgz", - "integrity": "sha512-21z3wA99EABtuf+O3IhdxP0iHgkBs1vuoCAsCKLVJPEjpVqvblwBnTj42vzHRlWDCyxu9ptDm7sI2ZMcWrQqlA==", + "version": "3.5.1", + "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.5.1.tgz", + "integrity": "sha512-Ce92CCholNRHR3ZtzpRp/7CDGIPFxQ7ElXt9iH91ilK5eOrUv3Z582NWJesuM3aYX71BujVG5/4ypUxigGNxjA==", "dependencies": { - "@vue/reactivity": "3.4.38", - "@vue/shared": "3.4.38" + "@vue/reactivity": "3.5.1", + "@vue/shared": "3.5.1" } }, "node_modules/@vue/runtime-dom": { - "version": "3.4.38", - "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.4.38.tgz", - "integrity": "sha512-afZzmUreU7vKwKsV17H1NDThEEmdYI+GCAK/KY1U957Ig2NATPVjCROv61R19fjZNzMmiU03n79OMnXyJVN0UA==", + "version": "3.5.1", + "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.5.1.tgz", + "integrity": "sha512-B/fUJfBLp5PwE0EWNfBYnA4JUea8Yufb3wN8fN0/HzaqBdkiRHh4sFHOjWqIY8GS75gj//8VqeEqhcU6yUjIkA==", "dependencies": { - "@vue/reactivity": "3.4.38", - "@vue/runtime-core": "3.4.38", - "@vue/shared": "3.4.38", + "@vue/reactivity": "3.5.1", + "@vue/runtime-core": "3.5.1", + "@vue/shared": "3.5.1", "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.4.38", - "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.4.38.tgz", - "integrity": "sha512-NggOTr82FbPEkkUvBm4fTGcwUY8UuTsnWC/L2YZBmvaQ4C4Jl/Ao4HHTB+l7WnFCt5M/dN3l0XLuyjzswGYVCA==", + "version": "3.5.1", + "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.5.1.tgz", + "integrity": "sha512-C5V/fjQTitgVaRNH5wCoHynaWysjZ+VH68drNsAvQYg4ArHsZUQNz0nHoEWRj41nzqkVn2RUlnWaEOTl2o1Ppg==", "dependencies": { - "@vue/compiler-ssr": "3.4.38", - "@vue/shared": "3.4.38" + "@vue/compiler-ssr": "3.5.1", + "@vue/shared": "3.5.1" }, "peerDependencies": { - "vue": "3.4.38" + "vue": "3.5.1" } }, "node_modules/@vue/shared": { - "version": "3.4.38", - "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.4.38.tgz", - "integrity": "sha512-q0xCiLkuWWQLzVrecPb0RMsNWyxICOjPrcrwxTUEHb1fsnvni4dcuyG7RT/Ie7VPTvnjzIaWzRMUBsrqNj/hhw==" + "version": "3.5.1", + "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.1.tgz", + "integrity": "sha512-NdcTRoO4KuW2RSFgpE2c+E/R/ZHaRzWPxAGxhmxZaaqLh6nYCXx7lc9a88ioqOCxCaV2SFJmujkxbUScW7dNsQ==" }, "node_modules/@vueuse/core": { "version": "9.13.0", @@ -8164,9 +8164,9 @@ } }, "node_modules/postcss": { - "version": "8.4.41", - "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.41.tgz", - "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "version": "8.4.45", + "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.45.tgz", + "integrity": "sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==", "funding": [ { "type": "opencollective", @@ -10950,15 +10950,15 @@ } }, "node_modules/vue": { - "version": "3.4.38", - "resolved": "https://registry.npmmirror.com/vue/-/vue-3.4.38.tgz", - "integrity": "sha512-f0ZgN+mZ5KFgVv9wz0f4OgVKukoXtS3nwET4c2vLBGQR50aI8G0cqbFtLlX9Yiyg3LFGBitruPHt2PxwTduJEw==", - "dependencies": { - "@vue/compiler-dom": "3.4.38", - "@vue/compiler-sfc": "3.4.38", - "@vue/runtime-dom": "3.4.38", - "@vue/server-renderer": "3.4.38", - "@vue/shared": "3.4.38" + "version": "3.5.1", + "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.1.tgz", + "integrity": "sha512-k4UNnbPOEskodSxMtv+B9GljdB0C9ubZDOmW6vnXVGIfMqmEsY2+ohasjGguhGkMkrcP/oOrbH0dSD41x5JQFw==", + "dependencies": { + "@vue/compiler-dom": "3.5.1", + "@vue/compiler-sfc": "3.5.1", + "@vue/runtime-dom": "3.5.1", + "@vue/server-renderer": "3.5.1", + "@vue/shared": "3.5.1" }, "peerDependencies": { "typescript": "*" diff --git a/package.json b/package.json index f3c2507..1f71aad 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "pinia": "^2.0.22", "pinia-plugin-persist": "^1.0.0", "qrcode.vue": "^3.3.3", - "vue": "^3.2.37", + "vue": "^3.5.1", "vue-router": "4", "vue3-seamless-scroll": "^2.0.1", "xlsx": "^0.16.0", diff --git a/src/pages/declareManage/projectDeclare/declarePage/components/basicInfo.vue b/src/pages/declareManage/projectDeclare/declarePage/components/basicInfo.vue index 503a52c..7085421 100644 --- a/src/pages/declareManage/projectDeclare/declarePage/components/basicInfo.vue +++ b/src/pages/declareManage/projectDeclare/declarePage/components/basicInfo.vue @@ -570,9 +570,9 @@ watch(() => formData.value, val => { > 首次建设 迭代升级 - - - + 结转建设 + 新运维 + 续运维 diff --git a/src/pages/declareManage/purchaseResults/components/implementPlanDialog.vue b/src/pages/declareManage/purchaseResults/components/implementPlanDialog.vue index 74cfd3e..363b0ad 100644 --- a/src/pages/declareManage/purchaseResults/components/implementPlanDialog.vue +++ b/src/pages/declareManage/purchaseResults/components/implementPlanDialog.vue @@ -20,30 +20,15 @@ const { proxy } = getCurrentInstance(), validatorTime1 = (rule, value, callback) => { if (new Date(value).getTime() >= new Date(formData.value.finalInspectionDate).getTime()) { return callback(new Error('项目开工时间必须在项目终验时间之前')) - } else if (new Date(value).getTime() >= new Date(formData.value.initialInspectionDate).getTime()) { - return callback(new Error('项目开工时间必须在项目初验时间之前')) } else if (new Date(value).getTime() >= new Date(formData.value.startTrialOperationDate).getTime()) { return callback(new Error('项目开工时间必须在项目试运行开始时间之前')) } else { return callback() } }, - validatorTime2 = (rule, value, callback) => { - if (new Date(value).getTime() <= new Date(formData.value.projectStartDate).getTime()) { - return callback(new Error('项目初验时间必须在项目开工时间之后')) - } else if (new Date(value).getTime() >= new Date(formData.value.startTrialOperationDate).getTime()) { - return callback(new Error('项目初验时间必须在项目试运行开始时间之前')) - } else if (new Date(value).getTime() >= new Date(formData.value.finalInspectionDate).getTime()) { - return callback(new Error('项目初验时间必须在项目终验时间之前')) - } else { - return callback() - } - }, validatorTime3 = (rule, value, callback) => { if (new Date(value).getTime() <= new Date(formData.value.projectStartDate).getTime()) { return callback(new Error('项目试运行开始时间必须在项目开工时间之后')) - } else if (new Date(value).getTime() <= new Date(formData.value.initialInspectionDate).getTime()) { - return callback(new Error('项目试运行开始时间必须在项目初验时间之后')) } else if (new Date(value).getTime() >= new Date(formData.value.finalInspectionDate).getTime()) { return callback(new Error('项目初验时间必须在项目终验时间之前')) } else { @@ -52,7 +37,6 @@ const { proxy } = getCurrentInstance(), }, rules = { projectStartDate: [{ required: true, message: '请输入' }, { validator: validatorTime1 }], - initialInspectionDate: [{ required: true, message: '请选择' }, { validator: validatorTime2 }], startTrialOperationDate: [{ required: true, message: '请选择' }, { validator: validatorTime3 }], finalInspectionDate: [{ required: true, message: '请选择' }] }, @@ -115,15 +99,6 @@ defineExpose({ formRef }) placeholder="请选择" /> - - - diff --git a/src/pages/projectStoreManage/components/operationDialog.vue b/src/pages/projectStoreManage/components/operationDialog.vue new file mode 100644 index 0000000..bb53443 --- /dev/null +++ b/src/pages/projectStoreManage/components/operationDialog.vue @@ -0,0 +1,214 @@ + + + + diff --git a/src/pages/projectStoreManage/components/planList.vue b/src/pages/projectStoreManage/components/planList.vue index d13408c..3733558 100644 --- a/src/pages/projectStoreManage/components/planList.vue +++ b/src/pages/projectStoreManage/components/planList.vue @@ -1,7 +1,7 @@ + { @get-table-data="getTableData" > @@ -554,4 +531,6 @@ onMounted(async () => { @export-project="exportProject" /> + + diff --git a/src/pages/projectStoreManage/components/planlist.js b/src/pages/projectStoreManage/components/planlist.js new file mode 100644 index 0000000..5aa331c --- /dev/null +++ b/src/pages/projectStoreManage/components/planlist.js @@ -0,0 +1,270 @@ +import { h } from 'vue' +import store from '@/store' + +const { statusOptions } = store.dictStore.globalDicts || {} +const select = { + type: 'selection', + width: '50' +} +export const allColumn = [ + { + label: '序号', + type: 'index', + width: '60' + }, + { + label: '项目名称', + key: 'projectName', + prop: 'projectName', + minWidth: '200', + showOverflowTooltip: true + }, + { + label: '申报单位', + key: 'buildOrg', + prop: 'buildOrg', + minWidth: '200', + showOverflowTooltip: true + }, + { + label: '项目类型', + key: 'projectTypeName', + prop: 'projectTypeName', + width: 80 + }, + { + label: '项目申报资金(万元)', + key: 'declaredAmount', + prop: 'declaredAmount', + width: '150' + }, + { + label: '项目批复资金(万元)', + key: 'approvalAmount', + prop: 'approvalAmount', + width: '150' + }, + { + label: '预算年度', + key: 'projectYear', + prop: 'projectYear', + width: '80' + }, + { + label: '是否开启方案申报', + key: 'isStartDeclaredProject', + prop: 'isStartDeclaredProject', + width: '140', + render: row => h('span', row.isStartDeclaredProject ? '是' : '否') + }, + { + label: '项目状态', + key: 'status', + prop: 'status', + width: '180', + render: row => [ + h('span', { + class: ['dot mr-4', `bg-${statusOptions[row.status]?.color}`] + }), + h( + 'span', + { + class: `text-${statusOptions[row.status]?.color}` + }, + row.status && statusOptions[row.stage]?.name + '-' + statusOptions[row.status]?.name + ) + ] + }, + { + label: '创建时间', + key: 'createOn', + prop: 'createOn', + width: '180' + }, + { + label: '操作', + slot: 'action', + width: '120', + fixed: 'right' + } +] +export const buildColumn = [ + select, + { + label: '序号', + type: 'index', + width: '60' + }, + { + label: '项目名称', + key: 'projectName', + prop: 'projectName', + minWidth: '200', + showOverflowTooltip: true + }, + { + label: '申报单位', + key: 'buildOrg', + prop: 'buildOrg', + minWidth: '200', + showOverflowTooltip: true + }, + { + label: '项目类型', + key: 'projectTypeName', + prop: 'projectTypeName', + width: 80 + }, + { + label: '项目申报资金(万元)', + key: 'declaredAmount', + prop: 'declaredAmount', + width: '150' + }, + { + label: '项目批复资金(万元)', + key: 'approvalAmount', + prop: 'approvalAmount', + width: '150' + }, + { + label: '预算年度', + key: 'projectYear', + prop: 'projectYear', + width: '80' + }, + { + label: '是否开启方案申报', + key: 'isStartDeclaredProject', + prop: 'isStartDeclaredProject', + width: '140', + render: row => h('span', row.isStartDeclaredProject ? '是' : '否') + }, + { + label: '项目状态', + key: 'status', + prop: 'status', + width: '180', + render: row => [ + h('span', { + class: ['dot mr-4', `bg-${statusOptions[row.status]?.color}`] + }), + h( + 'span', + { + class: `text-${statusOptions[row.status]?.color}` + }, + row.status && statusOptions[row.stage]?.name + '-' + statusOptions[row.status]?.name + ) + ] + }, + { + label: '创建时间', + key: 'createOn', + prop: 'createOn', + width: '180' + }, + { + label: '操作', + slot: 'action', + width: '180', + fixed: 'right' + } +] + +export const maintenanceColumn = [ + select, + { + label: '序号', + type: 'index', + width: '60' + }, + { + label: '项目名称', + key: 'projectName', + prop: 'projectName', + minWidth: '200', + showOverflowTooltip: true + }, + { + label: '申报单位', + key: 'buildOrg', + prop: 'buildOrg', + minWidth: '200', + showOverflowTooltip: true + }, + { + label: '项目类型', + key: 'projectTypeName', + prop: 'projectTypeName', + width: 80 + }, + { + label: '运维包', + key: 'declaredAmount', + prop: 'declaredAmount', + width: '150' + }, + { + label: '项目申报资金(万元)', + key: 'declaredAmount', + prop: 'declaredAmount', + width: '150' + }, + { + label: '项目批复资金(万元)', + key: 'approvalAmount', + prop: 'approvalAmount', + width: '150' + }, + { + label: '预算年度', + key: 'projectYear', + prop: 'projectYear', + width: '80' + }, + { + label: '是否开启方案申报', + key: 'isStartDeclaredProject', + prop: 'isStartDeclaredProject', + width: '140', + render: row => h('span', row.isStartDeclaredProject ? '是' : '否') + }, + { + label: '项目状态', + key: 'status', + prop: 'status', + width: '180', + render: row => [ + h('span', { + class: ['dot mr-4', `bg-${statusOptions[row.status]?.color}`] + }), + h( + 'span', + { + class: `text-${statusOptions[row.status]?.color}` + }, + row.status && statusOptions[row.stage]?.name + '-' + statusOptions[row.status]?.name + ) + ] + }, + { + label: '创建时间', + key: 'createOn', + prop: 'createOn', + width: '180' + }, + { + label: '操作', + slot: 'action', + width: '150', + fixed: 'right' + } +] + +export const columnType = { + '00': allColumn, + '01': buildColumn, + '02': maintenanceColumn, + '03': allColumn +}