From ed1bb201eabb0061f038359e04457b998edb1ae5 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期五, 01 八月 2025 14:59:48 +0800
Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb_region

---
 src/views/hosp/project/index.vue |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue
index bceaf93..7dbb889 100644
--- a/src/views/hosp/project/index.vue
+++ b/src/views/hosp/project/index.vue
@@ -1188,7 +1188,7 @@
   },
   created() {
     // this.getConsumables();
-    // this.getDeptList();
+    this.getDeptList();
     // this.getDeptTree().then(() => {
     //   this.precomputePinyin();
     // });
@@ -1351,15 +1351,16 @@
       this.form.hisXmbm = "";
       this.form.hisXmmc = "";
       this.form.hisdj = "";
-      this.loading = true;
+      // this.loading = true;
       this.proParent = false;
       this.form.proPrice = 0.0;
       this.form.proName = "";
       this.form.proId = null;
       this.form.resultType = "1";
+      this.getDeptList();
       getlist().then((response) => {
         if (response.code == 200) {
-          this.loading = false;
+          // this.loading = false;
           this.projectOptions = [];
           const project = { proId: 0, proName: "涓荤被鐩�", children: [] };
           project.children = this.handleTree(response.data.list, "proId");
@@ -1840,6 +1841,9 @@
 
       // 绛夊緟鍙充晶琛ㄦ牸鍒锋柊
       await this.getList();
+      
+      // 绔嬪嵆鍒锋柊褰撳墠椤圭洰鏁版嵁锛岀‘淇濇暟鎹槸鏈�鏂扮殑
+      await this.refreshCurrentProjectData();
 
       this.pageLoading = false; // 鉁� 缁熶竴鍔犺浇鐘舵�佹帶鍒�
     },
@@ -1852,6 +1856,23 @@
         });
       }
     }, */
+    // 鍒锋柊褰撳墠閫変腑椤圭洰鐨勬暟鎹�
+    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;
+    },
     submit() {
       this.ChangeList.forEach((item) => {
         this.form.proPrice = item.ckdj;
@@ -1861,6 +1882,10 @@
         this.sfxmId = parseInt(item.id);
       });
       this.dialogTableVisible = false;
+      this.getDeptList();
+      this.getDeptTree().then(() => {
+        this.precomputePinyin();
+      });
     },
     handleDelete(row) {
       const proIds = row.proId || this.ids;

--
Gitblit v1.8.0