From 0ead7315c0e6076aded0dac7a6ff0b89c632287b Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期四, 28 十一月 2024 01:32:41 +0800 Subject: [PATCH] 项目基本信息、投资基本信息 --- src/views/projectEngineering/projectLibrary/index.vue | 61 ++++++++++-------------------- 1 files changed, 21 insertions(+), 40 deletions(-) diff --git a/src/views/projectEngineering/projectLibrary/index.vue b/src/views/projectEngineering/projectLibrary/index.vue index 730e22c..8a6c287 100644 --- a/src/views/projectEngineering/projectLibrary/index.vue +++ b/src/views/projectEngineering/projectLibrary/index.vue @@ -271,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/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', @@ -367,9 +367,24 @@ 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.$router.push({ path: '/projectEngineering/project/projectDetails' }); + this.removeCookie(); + this.$router.push({ path: '/projectEngineering/project/ProjectDetails' }); + }, + //娓呯悊缂撳瓨 + removeCookie() { + Cookies.remove("projectForm") + Cookies.remove("investmentForm") }, // 閲嶇疆鎺掑簭鐨勬柟娉� handleResetSort() { @@ -428,7 +443,7 @@ /** 鏌ヨ椤圭洰绠$悊鍩虹淇℃伅鍒楄〃 */ getList() { this.loading = true; - listInfo(this.queryParams).then(response => { + listProject(this.queryParams).then(response => { this.projectInfoList = response.data; this.total = response.total; }); @@ -496,42 +511,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