From acf78f6ef785df7f5fa15d1ee0fc62c0bbbe74f6 Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期五, 29 十一月 2024 02:37:42 +0800 Subject: [PATCH] 项目计划审批 --- src/views/projectEngineering/projectLibrary/index.vue | 83 +++++++++++++++++------------------------ 1 files changed, 35 insertions(+), 48 deletions(-) diff --git a/src/views/projectEngineering/projectLibrary/index.vue b/src/views/projectEngineering/projectLibrary/index.vue index fbbe70d..f2db159 100644 --- a/src/views/projectEngineering/projectLibrary/index.vue +++ b/src/views/projectEngineering/projectLibrary/index.vue @@ -203,23 +203,19 @@ <template v-if="item.slotName"> <!-- projectStatus鎻掓Ы --> <template v-if="item.slotName === 'projectStatus'"> - <div class="mx-1">{{ '鑷畾涔夋牱寮�' }}</div> + <dict-tag :options="dict.type.sys_project_status" :value="scope.row.projectStatus"/> </template> <!-- projectColorCode鎻掓Ы --> <template v-if="item.slotName === 'projectColorCode'"> - <div class="mx-1 has-dot">{{ '鑷畾涔夋牱寮�' }}<span class="dot" style="margin-left: 5px"></span></div> + <dict-tag :options="dict.type.sys_project_code" :value="scope.row.projectColorCode"/> </template> <!-- projectType鎻掓Ы --> <template v-if="item.slotName === 'projectType'"> - <div class="mx-1">{{ '鑷畾涔夋牱寮�' }}</div> + <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/> </template> <!-- investType鎻掓Ы --> <template v-if="item.slotName === 'investType'"> - <div class="mx-1">{{ '鑷畾涔夋牱寮�' }}</div> - </template> - <!-- planStartTime鎻掓Ы --> - <template v-if="item.slotName === 'planStartTime'"> - {{ '鑷畾涔夋牱寮�' }} + <dict-tag :options="dict.type.sys_investment_type" :value="scope.row.investType"/> </template> </template> <!-- 榛樿鏄剧ず --> @@ -275,10 +271,10 @@ </template> <script> -import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/projectInfo"; +import {listProject, getProject, delProject, addProject, updateProject} from "@/api/projectEngineering/projectInfo"; import {current, currentRest} from '@/views/projectEngineering/projectLibrary/list'; -import FileDialog from '@/views/projectEngineering/component/FileDialog'; - +import FileDialog from '@/views/projectEngineering/projectLibrary/component/FileDialog'; +import Cookies from "js-cookie"; export default { dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases', 'sys_funding_type', 'sys_association_status', 'sys_project_status', 'sys_project_code', @@ -371,6 +367,29 @@ this.getList(); }, methods: { + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { + this.removeCookie(); + this.$router.push({ path: '/projectEngineering/project/ProjectDetails', query: { projectId: row.id }}); + }, + handleDetail(row) { + this.removeCookie(); + this.$router.push({ path: '/projectEngineering/project/ProjectDetails', query: { projectId: row.id }}); + }, + // 鏂板椤甸潰 + add() { + this.removeCookie(); + this.$router.push({ path: '/projectEngineering/project/ProjectDetails' }); + }, + //娓呯悊缂撳瓨 + removeCookie() { + Cookies.remove("projectForm") + Cookies.remove("investmentForm") + Cookies.remove("investmentFundsForm") + Cookies.remove("legalPersonForm") + Cookies.remove("policyInfoForm") + Cookies.remove("documentsInfoForm") + }, // 閲嶇疆鎺掑簭鐨勬柟娉� handleResetSort() { this.defaultColumns = currentRest.map((item, index) => { @@ -385,6 +404,8 @@ item.serialNumber = index + 1 return item; }); + //寮哄埗table娓叉煋 + this.tableKey = this.tableKey +1; }, // 鏇存柊鍒楃殑鏂规硶 handleUpdateColumns(row) { @@ -426,7 +447,7 @@ /** 鏌ヨ椤圭洰绠$悊鍩虹淇℃伅鍒楄〃 */ getList() { this.loading = true; - listInfo(this.queryParams).then(response => { + listProject(this.queryParams).then(response => { this.projectInfoList = response.data; this.total = response.total; }); @@ -494,42 +515,8 @@ this.single = selection.length !== 1 this.multiple = !selection.length }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "娣诲姞椤圭洰绠$悊鍩虹淇℃伅"; - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getInfo(id).then(response => { - this.form = response.data; - this.open = true; - this.title = "淇敼椤圭洰绠$悊鍩虹淇℃伅"; - }); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.id != null) { - updateInfo(this.form).then(response => { - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - } else { - addInfo(this.form).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - } - } - }); - }, + + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const ids = row.id || this.ids; -- Gitblit v1.8.0