From a7a0b7a266fd3df381ab8f2b6dcf098ef9076533 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期三, 30 七月 2025 10:51:26 +0800
Subject: [PATCH] 1111

---
 src/views/hosp/project/index.vue |  132 ++++++++++++++++++++++++-------------------
 1 files changed, 74 insertions(+), 58 deletions(-)

diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue
index ec93cd3..863591b 100644
--- a/src/views/hosp/project/index.vue
+++ b/src/views/hosp/project/index.vue
@@ -1722,28 +1722,39 @@
       }
     },
     handleUpdate1() {
-      this.updateLoading = true;
+      // this.updateLoading = true;
       this.form = {};
-      this.form = this.xiugaiList;
-      this.form.proStatus = this.form.proStatus.toString();
-      this.form.sfcyyc = this.form.sfcyyc.toString();
       this.proParent = true;
       this.isPriceDisabled = true;
-      getlist()
-        .then((response) => {
-          if (response.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;
-            this.projectOptions.push(project);
-          }
-        })
-        .finally(() => {
-          this.updateLoading = false;
-        });
-      this.open = true;
+      
+      // 鍏堝姞杞界瀹ゅ垪琛ㄦ暟鎹紝鍐嶈缃〃鍗曟暟鎹�
+      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(listResponse.data.list, "proId");
+          this.key = listResponse.data.key;
+          this.projectOptions.push(project);
+        }
+        
+        this.open = true;
+      }).catch((error) => {
+        console.error("鍔犺浇鏁版嵁澶辫触:", error);
+        this.$message.error("鍔犺浇鏁版嵁澶辫触");
+      })
     },
     handleUpdate(row) {
       this.reset();
@@ -1751,47 +1762,52 @@
       const proId = row.proId || this.ids;
       this.proParent = false;
       this.isPriceDisabled = false;
-      getProject(proId).then((response) => {
-        this.form = response.data;
-        this.showPrise = this.form.proParentId === "0";
-        this.showRentPrise = !this.showPrise;
-        this.form.proStatus = this.form.proStatus.toString();
-        this.form.sfcyyc = this.form.sfcyyc.toString();
-        this.form.consumablesList = response.data.consumablesList;
-        this.form.tjStandardList = response.data.tjStandardList;
-        if (this.form.tjStandardList) {
-          this.form.tjStandardList.forEach((item) => {
-            item.tjSex =
-              item.tjSex === "0" || item.tjSex === "鐢�"
-                ? "鐢�"
-                : item.tjSex === "1" || item.tjSex === "濂�"
-                ? "濂�"
-                : null;
-            item.tjType =
-              {
-                0: "濠村効",
-                1: "骞煎効",
-                2: "鍎跨",
-                3: "灏戝勾",
-                4: "闈掑勾",
-                5: "涓勾",
-                6: "鑰佸勾",
-              }[item.tjType] || item.tjType;
-          });
-        }
-        getlist().then((response) => {
-          if (response.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;
-            this.projectOptions.push(project);
+      listDept(this.queryParams).then((response) => {
+        this.parentNameList = response.data;
+        // this.deptList = this.handleTree(response.data, "proId");
+        getProject(proId).then((response) => {
+          this.form = response.data;
+          this.form.deptId = response.data.deptId;
+          this.showPrise = this.form.proParentId === "0";
+          this.showRentPrise = !this.showPrise;
+          this.form.proStatus = this.form.proStatus.toString();
+          this.form.sfcyyc = this.form.sfcyyc.toString();
+          this.form.consumablesList = response.data.consumablesList;
+          this.form.tjStandardList = response.data.tjStandardList;
+          if (this.form.tjStandardList) {
+            this.form.tjStandardList.forEach((item) => {
+              item.tjSex =
+                item.tjSex === "0" || item.tjSex === "鐢�"
+                  ? "鐢�"
+                  : item.tjSex === "1" || item.tjSex === "濂�"
+                  ? "濂�"
+                  : null;
+              item.tjType =
+                {
+                  0: "濠村効",
+                  1: "骞煎効",
+                  2: "鍎跨",
+                  3: "灏戝勾",
+                  4: "闈掑勾",
+                  5: "涓勾",
+                  6: "鑰佸勾",
+                }[item.tjType] || item.tjType;
+            });
           }
+          getlist().then((response) => {
+            if (response.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;
+              this.projectOptions.push(project);
+            }
+          });
+          // this.loadPage();
+          this.open = true;
+          this.title = "浣撴椤圭洰淇℃伅缁存姢";
         });
-        // this.loadPage();
-        this.open = true;
-        this.title = "浣撴椤圭洰淇℃伅缁存姢";
       });
     },
     getSelectValue(val) {

--
Gitblit v1.8.0