From 33de1cf5576373b99dc2a6ed4be097f4d6ad0892 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期三, 30 七月 2025 10:58:03 +0800 Subject: [PATCH] 1111 --- src/views/hosp/project/index.vue | 44 ++++++++++++++++++++++++++++++++------------ 1 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue index cb569f3..3cc1e32 100644 --- a/src/views/hosp/project/index.vue +++ b/src/views/hosp/project/index.vue @@ -1666,24 +1666,40 @@ }, handleUpdate1() { this.form = {}; - this.form = this.xiugaiList; - this.form.proStatus = this.form.proStatus.toString(); - this.form.sfcyyc = this.form.sfcyyc.toString(); - this.form.proDelivery = this.form.proDelivery.toString(); + // this.form = this.xiugaiList; + // this.form.proStatus = this.form.proStatus.toString(); + // this.form.sfcyyc = this.form.sfcyyc.toString(); + // this.form.proDelivery = this.form.proDelivery.toString(); this.proParent = true; this.isPriceDisabled = true; - getlist().then((response) => { - if (response.code == 200) { + // 鍏堝姞杞界瀹ゅ垪琛ㄦ暟鎹紝鍐嶈缃〃鍗曟暟鎹� + Promise.all([ + listDept(this.queryParams), + getlist() + ]).then(([deptResponse, listResponse]) => { + // 鍏堣缃瀹ゅ垪琛� + this.parentNameList = deptResponse.data; + + // 鍐嶈缃〃鍗曟暟鎹� + this.form = this.xiugaiList; + this.form.proStatus = this.form.proStatus.toString(); + this.form.sfcyyc = this.form.sfcyyc.toString(); + + // 澶勭悊椤圭洰閫夐」 + if (listResponse.code == 200) { this.loading = false; this.projectOptions = []; const project = { proId: 0, proName: "涓荤被鐩�", children: [] }; - project.children = this.handleTree(response.data.list, "proId"); - this.key = response.data.key; + project.children = this.handleTree(listResponse.data.list, "proId"); + this.key = listResponse.data.key; this.projectOptions.push(project); - console.log(this.projectOptions, 11111); } - }); - this.open = true; + + this.open = true; + }).catch((error) => { + console.error("鍔犺浇鏁版嵁澶辫触:", error); + this.$message.error("鍔犺浇鏁版嵁澶辫触"); + }) }, handleUpdate(row) { this.reset(); @@ -1691,7 +1707,9 @@ const proId = row.proId || this.ids; this.proParent = false; this.isPriceDisabled = false; - getProject(proId).then((response) => { + listDept(this.queryParams).then((response) => { + this.parentNameList = response.data; + getProject(proId).then((response) => { this.form = response.data; this.showPrise = this.form.proParentId === "0"; this.showRentPrise = !this.showPrise; @@ -1733,6 +1751,8 @@ this.open = true; this.title = "浣撴椤圭洰淇℃伅缁存姢"; }); + }) + }, getSelectValue(val) { this.form.consumablesList.forEach((formitem) => { -- Gitblit v1.8.0