From 0f2591c87d2ba7b8d7fa2475fcf4deb8599eeec5 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期三, 30 七月 2025 14:49:32 +0800 Subject: [PATCH] 1 --- src/views/hosp/project/index.vue | 35 ++++++++++++++++++++++++++++++++--- 1 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue index 863591b..ed09752 100644 --- a/src/views/hosp/project/index.vue +++ b/src/views/hosp/project/index.vue @@ -1018,7 +1018,7 @@ }; return { xiugais: true, - xiugaiList: [], + xiugaiList: null, // 鏀逛负 null锛屼究浜庡垽鏂槸鍚﹀凡鍔犺浇 deptOptions: [], dialogTableVisible: false, isPriceDisabled: false, @@ -1546,7 +1546,7 @@ this.deptList = this.handleTree(response.data, "proId"); }); }, - getDeptTree() { + /* getDeptTree() { this.loadings = true; return deptTree111() .then((response) => { @@ -1564,7 +1564,7 @@ .finally(() => { this.loadings = false; // 鏃犺鎴愬姛鎴栧け璐ワ紝缁撴潫鍔犺浇 }); - }, + }, */ handleNodeClick(date) { this.treeDate = date; this.xiugaiList = {}; @@ -1810,6 +1810,32 @@ }); }); }, + // 鍒锋柊褰撳墠閫変腑椤圭洰鐨勬暟鎹� + async refreshCurrentProjectData() { + if (this.id) { + try { + const response = await getInfoByProId(this.id); + this.xiugaiList = response.data; + console.log("鍒锋柊椤圭洰鏁版嵁鎴愬姛:", this.xiugaiList); + return response.data; + } catch (error) { + console.error("鍒锋柊椤圭洰鏁版嵁澶辫触:", error); + this.$message.error("鍒锋柊椤圭洰鏁版嵁澶辫触"); + this.xiugaiList = null; // 鍒锋柊澶辫触鏃堕噸缃负 null + return null; + } + } + return null; + }, + // 璋冭瘯鏂规硶锛氭鏌ュ綋鍓嶆暟鎹姸鎬� + debugDataState() { + console.log("=== 鏁版嵁鐘舵�佽皟璇� ==="); + console.log("褰撳墠ID:", this.id); + console.log("xiugaiList:", this.xiugaiList); + console.log("form:", this.form); + console.log("treeDate:", this.treeDate); + console.log("=================="); + }, getSelectValue(val) { this.form.consumablesList.forEach((formitem) => { if (formitem.makings === val) { @@ -1912,6 +1938,9 @@ // 绛夊緟鍙充晶琛ㄦ牸鍒锋柊 await this.getList(); + + // 绔嬪嵆鍒锋柊褰撳墠椤圭洰鏁版嵁锛岀‘淇濇暟鎹槸鏈�鏂扮殑 + await this.refreshCurrentProjectData(); this.pageLoading = false; // 鉁� 缁熶竴鍔犺浇鐘舵�佹帶鍒� }, -- Gitblit v1.8.0