@@ -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": "*" | |||
@@ -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", | |||
@@ -570,9 +570,9 @@ watch(() => formData.value, val => { | |||
> | |||
<el-radio label="01">首次建设</el-radio> | |||
<el-radio label="02">迭代升级</el-radio> | |||
<!-- <el-radio label="03">结转建设</el-radio>--> | |||
<!-- <el-radio label="04">新运维</el-radio>--> | |||
<!-- <el-radio label="05">续运维</el-radio>--> | |||
<el-radio label="03">结转建设</el-radio> | |||
<el-radio label="04">新运维</el-radio> | |||
<el-radio label="05">续运维</el-radio> | |||
</el-radio-group> | |||
</el-form-item> | |||
</el-col> | |||
@@ -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="请选择" | |||
/> | |||
</el-form-item> | |||
<el-form-item label="项目初验时间" prop="initialInspectionDate"> | |||
<el-date-picker | |||
v-model="formData.initialInspectionDate" | |||
type="date" | |||
format="YYYY-MM-DD" | |||
value-format="YYYY-MM-DD HH:mm:ss" | |||
placeholder="请选择" | |||
/> | |||
</el-form-item> | |||
<el-form-item label="试运行开始时间" prop="startTrialOperationDate"> | |||
<el-date-picker | |||
v-model="formData.startTrialOperationDate" | |||
@@ -140,7 +115,6 @@ defineExpose({ formRef }) | |||
format="YYYY-MM-DD" | |||
value-format="YYYY-MM-DD HH:mm:ss" | |||
placeholder="请选择" | |||
disabled | |||
/> | |||
</el-form-item> | |||
</el-form> | |||
@@ -0,0 +1,214 @@ | |||
<template> | |||
<el-dialog | |||
:model-value="visible" | |||
:title="title" | |||
width="700" | |||
destroy-on-close | |||
@close="closeDialog" | |||
> | |||
<el-form v-loading="loading"> | |||
<el-table :data="tableData" style="width: 100%"> | |||
<el-table-column prop="index" width="50"> | |||
<template #default="scope"> | |||
<el-radio | |||
:key="scope.$index" | |||
v-model="radio" | |||
:value="scope.$index" | |||
:disabled="scope.row.edit" | |||
@change="radioChange(scope.row)" | |||
/> | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="index" label="序号" width="60"> | |||
<template #default="scope"> | |||
{{ scope.$index + 1 }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="date" label="运维包名称" width="180"> | |||
<template #default="scope"> | |||
<div v-if="!scope.row.edit">{{ scope.row.name }}</div> | |||
<el-form-item v-else> | |||
<el-input v-model="scope.row.name" /> | |||
</el-form-item> | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="name" label="预算年度" width="250"> | |||
<template #default="scope"> | |||
<div v-if="!scope.row.edit">{{ scope.row.year }}</div> | |||
<el-form-item v-if="scope.row.edit" prop="year"> | |||
<el-date-picker | |||
v-model="scope.row.year" | |||
type="year" | |||
placeholder="请选择" | |||
format="YYYY" | |||
value-format="YYYY" | |||
/> | |||
</el-form-item> | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="address" label="操作" width="120"> | |||
<template #default="scope"> | |||
<a v-if="!scope.row.edit" @click="scope.row.edit=true">编辑{{ scope.row.data }}</a> | |||
<a v-else @click="savePackage(scope.row)">保存</a> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<p class="text-right w-full mt-8"> | |||
<el-button | |||
type="primary" | |||
class="w-full" | |||
plain | |||
icon="Plus" | |||
@click="()=>addPackage()" | |||
>添加 | |||
</el-button> | |||
</p> | |||
</el-form> | |||
<template #footer> | |||
<el-button | |||
@click="closeDialog" | |||
> | |||
关闭 | |||
</el-button> | |||
<el-button | |||
type="danger" | |||
:disabled="loading" | |||
:loading="cancelLoading" | |||
@click="cancelRelevance" | |||
> | |||
取消所有关联 | |||
</el-button> | |||
<el-button | |||
:disabled="loading" | |||
type="primary" | |||
:loading="sureLoading" | |||
@click="relevance" | |||
> | |||
确认关联 | |||
</el-button> | |||
</template> | |||
</el-dialog> | |||
</template> | |||
<script setup> | |||
import { ElMessage } from 'element-plus' | |||
const title = '关联运维包' | |||
import { defineModel, ref, watch, defineEmits } from 'vue' | |||
const visible = defineModel() | |||
const selectProjectList = defineModel('selectProjectList', { | |||
type: Array, | |||
defult: [] | |||
}) | |||
const radio = ref() | |||
const loading = ref(false) | |||
const sureLoading = ref(false) | |||
const cancelLoading = ref(false) | |||
let selectData | |||
function radioChange (e) { | |||
selectData = e | |||
} | |||
const tableData = ref([]) | |||
const emits = defineEmits(['relevanceSuccess']) | |||
function savePackage (row) { | |||
if (!row.name) { | |||
ElMessage({ | |||
message: '运维包名称', | |||
type: 'warning' | |||
}) | |||
return | |||
} | |||
if (!row.year) { | |||
ElMessage({ | |||
message: '请选择预算年度', | |||
type: 'warning' | |||
}) | |||
return | |||
} | |||
loading.value = true | |||
setTimeout(function () { | |||
loading.value = false | |||
}, 1000) | |||
row.edit = false | |||
} | |||
function addPackage () { | |||
tableData.value.push({ | |||
year: '', | |||
name: '', | |||
edit: true | |||
}) | |||
} | |||
function relevance () { | |||
console.log(selectData) | |||
console.log(selectProjectList.value) | |||
sureLoading.value = true | |||
setTimeout(function () { | |||
sureLoading.value = false | |||
}, 1000) | |||
visible.value = false | |||
emits('relevanceSuccess') | |||
} | |||
function cancelRelevance () { | |||
cancelLoading.value = true | |||
setTimeout(function () { | |||
cancelLoading.value = false | |||
}, 1000) | |||
visible.value = false | |||
emits('relevanceSuccess') | |||
} | |||
function closeDialog () { | |||
visible.value = false | |||
selectData = undefined | |||
console.log(selectData) | |||
} | |||
watch(() => visible.value, | |||
async val => { | |||
if (val) { | |||
await getList() | |||
} | |||
} | |||
) | |||
async function getList () { | |||
loading.value = true | |||
const res = await testData() | |||
tableData.value = res.data | |||
loading.value = false | |||
} | |||
function testData () { | |||
return new Promise(resolve => { | |||
setTimeout(() => { | |||
resolve({ | |||
data: [ | |||
{ | |||
year: '2016', | |||
name: 'Tom' | |||
}, | |||
{ | |||
year: '2016', | |||
name: 'Tom' | |||
} | |||
] | |||
}) | |||
}, 1000) | |||
}) | |||
} | |||
</script> | |||
<style scoped lang="less"> | |||
</style> |
@@ -1,7 +1,7 @@ | |||
<script setup name='planList'> | |||
import ElTree from '@/components/elTree/index.vue' | |||
import { useRouter } from 'vue-router' | |||
import { onMounted, reactive, ref, h, getCurrentInstance, watch } from 'vue' | |||
import { onMounted, reactive, ref, getCurrentInstance, watch } from 'vue' | |||
import { fileFormatVerification, handleFileSuccess, handleFileError } from '@/utils/uploadAction.js' | |||
import { | |||
list, | |||
@@ -14,7 +14,8 @@ import ImportProjectDialog from './importProjectDialog.vue' | |||
import ExportFieldDialog from './exportFieldDialog.vue' | |||
import useExportExc from '@/utils/useExportExc' | |||
import { getIsShowRegionTree, getTreeParams } from '@/utils/getIsShowRegionTree' | |||
import { columnType } from '@/pages/projectStoreManage/components/planlist' | |||
import OperationDialog from '@/pages/projectStoreManage/components/operationDialog.vue' | |||
const { proxy } = getCurrentInstance(), | |||
props = defineProps({ | |||
isTemporaryAugment: { | |||
@@ -23,7 +24,7 @@ const { proxy } = getCurrentInstance(), | |||
} | |||
}), | |||
router = useRouter(), | |||
{ statusOptions, statusOptionsCascader, projectTypeOptions } = store.dictStore.globalDicts || {}, | |||
{ statusOptionsCascader, projectTypeOptions } = store.dictStore.globalDicts || {}, | |||
searchForm = reactive({ | |||
projectName: undefined, | |||
buildOrg: undefined, | |||
@@ -36,95 +37,11 @@ const { proxy } = getCurrentInstance(), | |||
projectYear: undefined, | |||
times: undefined | |||
}), | |||
queryProjectType = ref('00'), | |||
tableListRef = ref(), | |||
total = ref(0), | |||
// 列表数据 | |||
column = reactive([ | |||
{ | |||
type: 'selection', | |||
width: '50' | |||
}, | |||
{ | |||
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: '200', | |||
fixed: 'right' | |||
} | |||
]), | |||
column = ref(columnType[queryProjectType.value]), | |||
data = ref([]), | |||
form = ref({}), | |||
areaCode = ref(), | |||
@@ -133,10 +50,12 @@ const { proxy } = getCurrentInstance(), | |||
tableListRef.value.pageParams.pageNumber = 1 | |||
getTableData() | |||
}, | |||
getTableData = async (pageParams = tableListRef.value.pageParams) => { | |||
const res = await list({ | |||
...pageParams, | |||
...searchForm, | |||
queryProjectType: queryProjectType.value, | |||
status: searchForm.status?.[searchForm.status.length - 1], | |||
projectYear: searchForm.projectYear * 1 || undefined, | |||
declareAmountMin: searchForm.declareAmountMin * 1 || undefined, | |||
@@ -153,10 +72,14 @@ const { proxy } = getCurrentInstance(), | |||
total.value = res.data.total | |||
}, | |||
selectable = (row, index) => { | |||
if (row.isStartDeclaredProject) { | |||
return false // 不可勾选 | |||
if (queryProjectType.value === '01') { | |||
if (row.isStartDeclaredProject) { | |||
return false // 不可勾选 | |||
} else { | |||
return true // 可勾选 | |||
} | |||
} else { | |||
return true // 可勾选 | |||
return true | |||
} | |||
}, | |||
search = () => { | |||
@@ -290,6 +213,27 @@ watch( | |||
onMounted(async () => { | |||
if (!getIsShowRegionTree(['SUPER_ADMIN', 'REGION_MANAGER'])) getTableData() | |||
}) | |||
function tabChange () { | |||
getTableData() | |||
column.value = columnType[queryProjectType.value] | |||
// 清空选择的项目 | |||
selectProject.value = [] | |||
} | |||
const operationVisible = ref(false) | |||
function relevancePackage () { | |||
if (!selectProject.value.length) { | |||
proxy.$message.warning('请至少选择一个项目') | |||
return | |||
} | |||
operationVisible.value = true | |||
} | |||
function relevanceSuccess () { | |||
getTableData() | |||
} | |||
</script> | |||
<template> | |||
<el-row> | |||
@@ -450,73 +394,91 @@ onMounted(async () => { | |||
</el-row> | |||
</el-form> | |||
</el-card> | |||
<el-card class="w-full mt-8"> | |||
<el-card class="w-full mt-8 tab-card"> | |||
<template #header> | |||
<div class="flex justify-between items-center"> | |||
<div class="flex items-center"> | |||
<span class="mr-24">列表</span> | |||
<el-button | |||
type="primary" | |||
size="small" | |||
@click="startPlanDeclare" | |||
>{{ areaCode === '331181' ? '列入年度计划' : '开启方案申报' }} | |||
</el-button> | |||
</div> | |||
<div class="flex items-center relative"> | |||
<!-- <el-button | |||
type="primary" | |||
plain | |||
size="small" | |||
@click="showImportProjectDialog" | |||
>导入</el-button> --> | |||
<el-upload | |||
v-model:file-list="form.file" | |||
class="absolute -left-70 -top-2" | |||
:show-file-list="false" | |||
:data="{importFlag:$route.name==='annualPlanStore'?'ANNUAL_PLAN':'ANNUAL_PLAN_SUPPLEMENT'}" | |||
action="/pm/api/v1/annualPlan/importAnnualPlan" | |||
:on-success="res => handleFileSuccess(res, form.file, true,search)" | |||
:on-error="handleFileError" | |||
:limit="1" | |||
:before-upload=" | |||
file => | |||
fileFormatVerification(file, { | |||
types: [ | |||
'application/vnd.ms-excel', | |||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | |||
] | |||
}) | |||
" | |||
accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | |||
> | |||
<el-button | |||
type="primary" | |||
plain | |||
size="small" | |||
>导入 | |||
</el-button> | |||
<!-- <template #tip> | |||
<div class="el-upload__tip">支持.xlsx、.xls</div> | |||
</template> --> | |||
</el-upload> | |||
<el-button | |||
type="primary" | |||
class="ml-10" | |||
plain | |||
size="small" | |||
@click="exportEdit" | |||
>导出编辑表 | |||
</el-button> | |||
<el-tabs v-model="queryProjectType" @tab-change="tabChange"> | |||
<el-tab-pane label="所有项目" name="00" /> | |||
<el-tab-pane label="建设类项目" name="01" /> | |||
<el-tab-pane label="运维类项目" name="02" /> | |||
<el-tab-pane label="跨年度项目" name="03" /> | |||
</el-tabs> | |||
</div> | |||
</template> | |||
<div class="flex justify-between items-center mb-20"> | |||
<div class="flex items-center"> | |||
<span class="mr-24">列表</span> | |||
<el-button | |||
v-if="queryProjectType==='01'" | |||
type="primary" | |||
size="small" | |||
@click="startPlanDeclare" | |||
>{{ areaCode === '331181' ? '列入年度计划' : '开启方案申报' }} | |||
</el-button> | |||
<el-button | |||
v-if="queryProjectType==='02'" | |||
type="primary" | |||
size="small" | |||
@click="relevancePackage" | |||
>关联运维包 | |||
</el-button> | |||
</div> | |||
<div class="flex items-center relative"> | |||
<!-- <el-button | |||
type="primary" | |||
plain | |||
size="small" | |||
@click="showImportProjectDialog" | |||
>导入</el-button> --> | |||
<el-upload | |||
v-model:file-list="form.file" | |||
class="absolute -left-70 -top-2" | |||
:show-file-list="false" | |||
:data="{importFlag:$route.name==='annualPlanStore'?'ANNUAL_PLAN':'ANNUAL_PLAN_SUPPLEMENT'}" | |||
action="/pm/api/v1/annualPlan/importAnnualPlan" | |||
:on-success="res => handleFileSuccess(res, form.file, true,search)" | |||
:on-error="handleFileError" | |||
:limit="1" | |||
:before-upload=" | |||
file => | |||
fileFormatVerification(file, { | |||
types: [ | |||
'application/vnd.ms-excel', | |||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | |||
] | |||
}) | |||
" | |||
accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | |||
> | |||
<el-button | |||
type="primary" | |||
plain | |||
size="small" | |||
@click="showExportFieldDialog" | |||
>导出 | |||
>导入 | |||
</el-button> | |||
</div> | |||
<!-- <template #tip> | |||
<div class="el-upload__tip">支持.xlsx、.xls</div> | |||
</template> --> | |||
</el-upload> | |||
<el-button | |||
type="primary" | |||
class="ml-10" | |||
plain | |||
size="small" | |||
@click="exportEdit" | |||
>导出编辑表 | |||
</el-button> | |||
<el-button | |||
type="primary" | |||
plain | |||
size="small" | |||
@click="showExportFieldDialog" | |||
>导出 | |||
</el-button> | |||
</div> | |||
</template> | |||
</div> | |||
<table-list | |||
ref="tableListRef" | |||
:column="column" | |||
@@ -527,10 +489,25 @@ onMounted(async () => { | |||
@get-table-data="getTableData" | |||
> | |||
<template #action="{ scope }"> | |||
<a v-if="scope.row.status===10010" v-hasRole="['超级管理员']" @click="toEdit(scope.row)">编辑</a> | |||
<!-- <a v-if="scope.row.status===10010" @click="projectDefer(scope.row)">暂缓</a>--> | |||
<a v-if="scope.row.status===10014" @click="showApprovalDialog(scope.row)">立项批复</a> | |||
<a @click="router.push({name:'projectDetail',query:{id:scope.row.projectId}})">详情</a> | |||
<template v-if="queryProjectType==='00'"> | |||
<a @click="router.push({name:'projectDetail',query:{id:scope.row.projectId}})">详情</a> | |||
</template> | |||
<template v-if="queryProjectType==='01'"> | |||
<a v-if="scope.row.status===10010" v-hasRole="['超级管理员']" @click="toEdit(scope.row)">编辑</a> | |||
<!-- <a v-if="scope.row.status===10010" @click="projectDefer(scope.row)">暂缓</a>--> | |||
<a v-if="scope.row.status===10014" @click="showApprovalDialog(scope.row)">立项批复</a> | |||
<a @click="router.push({name:'projectDetail',query:{id:scope.row.projectId}})">详情</a> | |||
</template> | |||
<template v-if="queryProjectType==='02'"> | |||
<a v-if="scope.row.status===10010" v-hasRole="['超级管理员']" @click="toEdit(scope.row)">编辑</a> | |||
<a @click="router.push({name:'projectDetail',query:{id:scope.row.projectId}})">详情</a> | |||
</template> | |||
<template v-if="queryProjectType==='03'"> | |||
<a v-if="scope.row.status===10010" v-hasRole="['超级管理员']" @click="toEdit(scope.row)">编辑</a> | |||
<a @click="router.push({name:'projectDetail',query:{id:scope.row.projectId}})">详情</a> | |||
</template> | |||
</template> | |||
</table-list> | |||
</el-card> | |||
@@ -554,4 +531,6 @@ onMounted(async () => { | |||
@export-project="exportProject" | |||
/> | |||
<operation-dialog v-model="operationVisible" v-model:select-project-list="selectProject" @relevance-success="relevanceSuccess" /> | |||
</template> |
@@ -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 | |||
} |