From 44e7c74462e3dd3bf4bf24ab34b126d6e59c41f9 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期四, 31 七月 2025 17:59:08 +0800
Subject: [PATCH] qx

---
 src/views/doctor/checkAll/index.vue |  256 ++++++++++++++++++-------------
 public/yuanqu.ini                   |    5 
 src/views/system/package/index.vue  |   41 ++++
 src/views/picture/picture/index.vue |   55 +++++-
 src/views/hosp/project/index.vue    |   70 +++++++-
 5 files changed, 287 insertions(+), 140 deletions(-)

diff --git a/public/yuanqu.ini b/public/yuanqu.ini
index a4bb16d..d1f03b7 100644
--- a/public/yuanqu.ini
+++ b/public/yuanqu.ini
@@ -1,7 +1,12 @@
 [development]
 8094=pbkwyy
+<<<<<<< HEAD
 81=xatlgcyy
 82=sqyy
+=======
+81=jdczgzyy
+82=bjxjyy
+>>>>>>> 97ddbdb0827051db8fb25e42b964185fa6a9a3b5
 8095=jdczgzyy
 8096=sqyy
 8097=wbzxyy
diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index f0a9a02..4af72f0 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -2583,36 +2583,49 @@
       this.loading = true;
       this.status1 = 0;
       this.yichangList = [];
-      yichang({
-        tjNum: this.tjNumber,
-      })
-        .then((res) => {
-          // this.isLoading = false
-          this.yichangList = res.data;
+      
+      return new Promise((resolve, reject) => {
+        yichang({
+          tjNum: this.tjNumber,
+        })
+          .then((res) => {
+            const data = res.data;
 
-          this.yichangList.forEach((item) => {
-            item.sone.forEach((soneItem) => {
-              if (
-                !Array.isArray(soneItem.advices) ||
-                soneItem.advices.length === 0
-              ) {
-                soneItem.advices = [{ bt: "", nr: "" }];
-              }
+            if (!data || data.length === 0) {
+              this.$message.warning("鏆傛棤寮傚父鎶ュ憡");
+              this.loading = false;
+              resolve(); // 杩斿洖 Promise锛屼絾涓嶇户缁悗缁�昏緫
+              return;
+            }
+            this.yichangList = data;
+
+            this.yichangList.forEach((item) => {
+              item.sone.forEach((soneItem) => {
+                if (
+                  !Array.isArray(soneItem.advices) ||
+                  soneItem.advices.length === 0
+                ) {
+                  soneItem.advices = [{ bt: "", nr: "" }];
+                }
+              });
             });
+            if (!this.yichangList) {
+              this.$message.warning("鏆傛棤寮傚父鎶ュ憡");
+            }
+            resolve(); // 鎴愬姛瀹屾垚
+          })
+          .catch((error) => {
+            this.loading = false;
+            console.error("鑾峰彇寮傚父缁撴灉澶辫触:", error);
+            this.$message.error("鑾峰彇寮傚父缁撴灉澶辫触");
+            reject(error); // 杩斿洖閿欒
+          })
+          .finally(() => {
+            if (this.loading) {
+              this.loading = false;
+            }
           });
-          if (!this.yichangList) {
-            this.$message.warning("鏆傛棤寮傚父鎶ュ憡");
-          }
-        })
-        .catch((error) => {
-          this.isLoading = false;
-          console.error("鑾峰彇寮傚父缁撴灉澶辫触:", error);
-          this.$message.error("鑾峰彇寮傚父缁撴灉澶辫触");
-        })
-        .finally(() => {
-          this.isLoading = false;
-          this.loading = false;
-        });
+      });
     },
 
     fuchaxiangmu() {
@@ -2939,6 +2952,7 @@
     radiotjprojectChange() {
       if (this.tjproject == "0") {
         getupdateCheckType(this.tjNumber).then((response) => {
+          this.isLoading = false;
           this.changedate = response.data;
           this.changedate.forEach((item) => {
             this.textarea1 = item.checkAdvice;
@@ -3162,6 +3176,7 @@
 
     handleClick(row) {
       this.qingkong();
+      this.isLoading = true; // 寮�濮嬫暣浣撳姞杞�
       this.$refs.Pre.open = false;
       this.tableAll = row;
       let dict = "dict_tjtype";
@@ -3183,49 +3198,58 @@
         this.status = res.data;
         if (this.status) {
           if (this.status.status === "1") {
-            this.yichangjieguo();
-            getInfo().then((response) => {
-              this.userId = response.user.userId;
-              if (this.userId) {
-                let data = {
-                  userId: this.userId,
-                  tjNumber: this.tjNumber,
-                  state: 0,
-                };
-                getModifiedState(data).then((res) => {
-                  this.MsgId = res.msg;
-                  this.isLoading = true;
-                  this.drawer = true;
-                  getupdateCheckType(this.tjNumber).then((response) => {
-                    // this.isLoading = false
-                    this.changedate = response.data;
-                    if (this.changedate) {
-                      this.changedate.forEach((item) => {
-                        this.textarea1 = item.checkAdvice || "";
-                      });
-                      this.initialTotalCheckAdvice = this.textarea1;
-                      this.initialState = JSON.parse(
-                        JSON.stringify(this.changedate)
-                      );
-                      for (let i = 0; i < this.changedate.length; i++) {
-                        this.remark = this.changedate[i].remark;
-                      }
-                      // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
-                      this.zhiyeJl = this.changedate[0].zhiyejl || "";
-                      this.zhiyeJg =
-                        this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�";
-                    } else {
-                      this.$message({
-                        type: "warning",
-                        message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
-                      });
-                      // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
-                      this.zhiyeJl = "";
-                      this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
-                    }
-                  });
-                });
+            // 鍏堣皟鐢ㄥ紓甯哥粨鏋滐紝绛夊緟鍏跺畬鎴愬悗鍐嶇户缁悗缁�昏緫
+            this.yichangjieguo().then(() => {
+              // 濡傛灉寮傚父缁撴灉涓虹┖锛岀珛鍗冲叧闂姞杞芥骞舵墦寮�鎶藉眽
+              if (!this.yichangList || this.yichangList.length === 0) {
+                this.isLoading = false;
+                this.drawer = true;
+                return;
               }
+              
+              // 寮傚父缁撴灉鏈夋暟鎹紝缁х画鍚庣画閫昏緫
+              getInfo().then((response) => {
+                this.userId = response.user.userId;
+                if (this.userId) {
+                  let data = {
+                    userId: this.userId,
+                    tjNumber: this.tjNumber,
+                    state: 0,
+                  };
+                  getModifiedState(data).then((res) => {
+                    this.MsgId = res.msg;
+                    this.drawer = true;
+                    getupdateCheckType(this.tjNumber).then((response) => {
+                      this.isLoading = false; // 鍏抽棴鍔犺浇妗�
+                      this.changedate = response.data;
+                      if (this.changedate) {
+                        this.changedate.forEach((item) => {
+                          this.textarea1 = item.checkAdvice || "";
+                        });
+                        this.initialTotalCheckAdvice = this.textarea1;
+                        this.initialState = JSON.parse(
+                          JSON.stringify(this.changedate)
+                        );
+                        for (let i = 0; i < this.changedate.length; i++) {
+                          this.remark = this.changedate[i].remark;
+                        }
+                        // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
+                        this.zhiyeJl = this.changedate[0].zhiyejl || "";
+                        this.zhiyeJg =
+                          this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�";
+                      } else {
+                        this.$message({
+                          type: "warning",
+                          message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
+                        });
+                        // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
+                        this.zhiyeJl = "";
+                        this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
+                      }
+                    });
+                  });
+                }
+              });
             });
           } else {
             this.$confirm(
@@ -3238,51 +3262,61 @@
               }
             )
               .then(() => {
-                this.yichangjieguo();
-                getInfo().then((response) => {
-                  this.userId = response.user.userId;
-                  if (this.userId) {
-                    let data = {
-                      userId: this.userId,
-                      tjNumber: this.tjNumber,
-                      state: 0,
-                    };
-                    getforceIn(data).then((res) => {
-                      this.MsgId = res.msg;
-                      this.isLoading = true;
-                      this.drawer = true;
-                      getupdateCheckType(this.tjNumber).then((response) => {
-                        // this.isLoading = false
-                        this.changedate = response.data;
-                        if (this.changedate) {
-                          for (let i = 0; i < this.changedate.length; i++) {
-                            this.remark = this.changedate[i].remark;
-                          }
-                          this.initialState = JSON.parse(
-                            JSON.stringify(this.changedate)
-                          );
-                          this.changedate.forEach((item) => {
-                            this.textarea1 = item.checkAdvice || "";
-                          });
-                          // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
-                          this.zhiyeJl = this.changedate[0].zhiyejl || "";
-                          this.zhiyeJg =
-                            this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�";
-                        } else {
-                          this.$message({
-                            type: "warning",
-                            message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
-                          });
-                          // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
-                          this.zhiyeJl = "";
-                          this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
-                        }
-                      });
-                    });
+                // 鍏堣皟鐢ㄥ紓甯哥粨鏋滐紝绛夊緟鍏跺畬鎴愬悗鍐嶇户缁悗缁�昏緫
+                this.yichangjieguo().then(() => {
+                  // 濡傛灉寮傚父缁撴灉涓虹┖锛岀珛鍗冲叧闂姞杞芥骞舵墦寮�鎶藉眽
+                  if (!this.yichangList || this.yichangList.length === 0) {
+                    this.isLoading = false;
+                    this.drawer = true;
+                    return;
                   }
+                  
+                  // 寮傚父缁撴灉鏈夋暟鎹紝缁х画鍚庣画閫昏緫
+                  getInfo().then((response) => {
+                    this.userId = response.user.userId;
+                    if (this.userId) {
+                      let data = {
+                        userId: this.userId,
+                        tjNumber: this.tjNumber,
+                        state: 0,
+                      };
+                      getforceIn(data).then((res) => {
+                        this.MsgId = res.msg;
+                        this.drawer = true;
+                        getupdateCheckType(this.tjNumber).then((response) => {
+                          this.isLoading = false; // 鍏抽棴鍔犺浇妗�
+                          this.changedate = response.data;
+                          if (this.changedate) {
+                            for (let i = 0; i < this.changedate.length; i++) {
+                              this.remark = this.changedate[i].remark;
+                            }
+                            this.initialState = JSON.parse(
+                              JSON.stringify(this.changedate)
+                            );
+                            this.changedate.forEach((item) => {
+                              this.textarea1 = item.checkAdvice || "";
+                            });
+                            // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
+                            this.zhiyeJl = this.changedate[0].zhiyejl || "";
+                            this.zhiyeJg =
+                              this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�";
+                          } else {
+                            this.$message({
+                              type: "warning",
+                              message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
+                            });
+                            // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
+                            this.zhiyeJl = "";
+                            this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
+                          }
+                        });
+                      });
+                    }
+                  });
                 });
               })
               .catch(() => {
+                this.isLoading = false; // 鍙栨秷鏃朵篃瑕佸叧闂姞杞芥
                 this.$message({
                   type: "info",
                   message: "宸插彇娑堣繘鍏�",
@@ -3366,7 +3400,7 @@
         .then((response) => {
           if (response.code === 200) {
             this.isLoading = false;
-           this.$modal.msgSuccess(response.msg);
+            this.$modal.msgSuccess(response.msg);
             // 娓呯┖瀛楁
             this.zhiyeJl = "";
             this.zhiyeJg = "";
diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue
index cb569f3..e51de15 100644
--- a/src/views/hosp/project/index.vue
+++ b/src/views/hosp/project/index.vue
@@ -1327,7 +1327,7 @@
       this.form.lisXmbm = param1[0].pacCode;
       this.form.lisXmmc = param1[0].pacName;
     },
-    /* getList() {
+    getList() {
       this.loading = true;
       let data = {
         proName: this.queryParams.proName,
@@ -1339,7 +1339,7 @@
         this.projectList = response.data.list;
         this.loading = false;
       });
-    }, */
+    },
     getConsumables() {
       this.loading = true;
       listConsumables(this.queryParams).then((response) => {
@@ -1665,25 +1665,39 @@
       }
     },
     handleUpdate1() {
+      // this.updateLoading = true;
       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.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 +1705,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 +1749,8 @@
         this.open = true;
         this.title = "浣撴椤圭洰淇℃伅缁存姢";
       });
+      })
+      
     },
     getSelectValue(val) {
       this.form.consumablesList.forEach((formitem) => {
@@ -1822,6 +1840,9 @@
 
       // 绛夊緟鍙充晶琛ㄦ牸鍒锋柊
       await this.getList();
+      
+      // 绔嬪嵆鍒锋柊褰撳墠椤圭洰鏁版嵁锛岀‘淇濇暟鎹槸鏈�鏂扮殑
+      await this.refreshCurrentProjectData();
 
       this.pageLoading = false; // 鉁� 缁熶竴鍔犺浇鐘舵�佹帶鍒�
     },
@@ -1834,6 +1855,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;
@@ -1843,6 +1881,10 @@
         this.sfxmId = parseInt(item.id);
       });
       this.dialogTableVisible = false;
+      this.getDeptList();
+      this.getDeptTree().then(() => {
+        this.precomputePinyin();
+      });
     },
     handleDelete(row) {
       const proIds = row.proId || this.ids;
diff --git a/src/views/picture/picture/index.vue b/src/views/picture/picture/index.vue
index ab88565..47d7ab1 100644
--- a/src/views/picture/picture/index.vue
+++ b/src/views/picture/picture/index.vue
@@ -779,18 +779,24 @@
       this.changtjNumber(val.tjNumber);
     },
     changtjNumber(val) {
-      console.log(8989);
       let tjNumber = val;
       this.loading = true;
       getYxJcXx(tjNumber).then((res) => {
-        this.tableList = res.data.map((item) => {
-          // 濡傛灉 imageUrl 瀛樺湪涓旀槸绾� Base64 瀛楃涓诧紝娣诲姞 data:image 鍓嶇紑
-          if (item.imageUrl && !item.imageUrl.startsWith("data:image")) {
-            // 鍋囪鍥剧墖绫诲瀷涓� png锛屽鏋滄帴鍙f彁渚涚被鍨嬶紝鍙互鏇挎崲涓哄姩鎬佸��
-            item.imageUrl = `data:image/png;base64,${item.imageUrl}`;
-          }
-          return item;
-        });
+        // 妫�鏌� res.data 鏄惁瀛樺湪涓斾负鏁扮粍
+        if (res && res.data && Array.isArray(res.data)) {
+          this.tableList = res.data.map((item) => {
+            // 濡傛灉 imageUrl 瀛樺湪涓旀槸绾� Base64 瀛楃涓诧紝娣诲姞 data:image 鍓嶇紑
+            if (item.imageUrl && !item.imageUrl.startsWith("data:image")) {
+              // 鍋囪鍥剧墖绫诲瀷涓� png锛屽鏋滄帴鍙f彁渚涚被鍨嬶紝鍙互鏇挎崲涓哄姩鎬佸��
+              item.imageUrl = `data:image/png;base64,${item.imageUrl}`;
+            }
+            return item;
+          });
+        } else {
+          // 濡傛灉 res.data 涓嶅瓨鍦ㄦ垨涓嶆槸鏁扮粍锛岃缃负绌烘暟缁�
+          this.tableList = [];
+          // console.warn('API response data is not an array:', res);
+        }
         this.loading = false;
         this.$nextTick(() => {
           const headerCheckbox = this.$refs.mu.$el.querySelector(
@@ -813,6 +819,10 @@
             this.handleChange([firstRow]);
           }
         });
+      }).catch((error) => {
+        console.error('鑾峰彇褰卞儚妫�鏌ヤ俊鎭け璐�:', error);
+        this.tableList = [];
+        this.loading = false;
       });
     },
     qijian(row) {
@@ -919,15 +929,38 @@
       this.form.proResult = yxbx;
     },
     submiepilog() {
+      if (!this.tableList || this.tableList.length === 0) {
+        this.$message.warning("琛ㄦ牸涓病鏈夋暟鎹�");
+        return;
+      }
+
+      // 妫�鏌� tableList 琛ㄦ牸涓槸鍚︽湁閫変腑鐨勯」鐩�
+      const selectedRows = this.$refs.mu.selection;
+      if (!selectedRows || selectedRows.length === 0) {
+        this.$message.warning("璇峰厛閫夋嫨琛ㄦ牸涓殑椤圭洰");
+        return;
+      }
       this.$refs.aaa.open = true;
       let proId = "1633660948860522585";
       this.$refs.aaa.getList(proId);
     },
     submito() {
-      if (!this.selectedRow || !this.selectedRow.proId) {
-       this.$message.error("璇烽�夋嫨鎻愪氦椤圭洰");
+      if (!this.tableList || this.tableList.length === 0) {
+        this.$message.warning("琛ㄦ牸涓病鏈夋暟鎹�");
         return;
       }
+      
+      // 妫�鏌� tableList 琛ㄦ牸涓槸鍚︽湁閫変腑鐨勯」鐩�
+      const selectedRows = this.$refs.mu.selection;
+      if (!selectedRows || selectedRows.length === 0) {
+        this.$message.warning("璇峰厛閫夋嫨琛ㄦ牸涓殑椤圭洰");
+        return;
+      }
+
+      /* if (!this.selectedRow || !this.selectedRow.proId) {
+        this.$message.error("璇烽�夋嫨鎻愪氦椤圭洰");
+        return;
+      } */
       if (!this.form.proResult && !this.form.conclusion) {
         this.$message.warning("璇烽�夋嫨妫�鏌ユ墍瑙佹垨妫�鏌ョ粨璁�!");
       } else {
diff --git a/src/views/system/package/index.vue b/src/views/system/package/index.vue
index 197f8ae..6bad63d 100644
--- a/src/views/system/package/index.vue
+++ b/src/views/system/package/index.vue
@@ -162,6 +162,7 @@
               node-key="proId"
               @check-change="handleCurrentChecked"
               :default-checked-keys="checkedkey"
+              :filter-node-method="filterNode"
               ref="tree"
               :render-content="renderContent"
             >
@@ -295,6 +296,7 @@
         page: 1,
         pageSize: 30,
         nr: "",
+        xb: "",
       },
       form: {
         xianprice: null,
@@ -333,6 +335,15 @@
       }
       const filterTextLower = this.filterText.toLowerCase();
       this.filteredTreeData = this.filterNodes(this.originalTreeData, filterTextLower);
+    },
+    filterNode(value, data) {
+      if (!value) return true;
+      console.log(value, 6666);
+
+      return (
+        data.proName.indexOf(value) !== -1 ||
+        (data.proEngName && data.proEngName.indexOf(value) !== -1)
+      );
     },
     filterNodes(nodes, filterText) {
       return nodes.filter(node => {
@@ -418,9 +429,30 @@
         this.keywordList = response.rows;
       });
     },
-    sel(val) {
+    /* sel(val) {
       let id = val;
       this.keys = id.join(",");
+    }, */
+    sel(val) {
+      const maleId = "4"; // 鈥滅敺鈥濈殑 ID
+      const femaleId = "5"; // 鈥滃コ鈥濈殑 ID
+      let selectedIds = [...val]; // 澶嶅埗褰撳墠閫変腑鐨� ID 鏁扮粍
+
+      // 瀹炵幇鈥滅敺鈥濆拰鈥滃コ鈥濅簰鏂ラ�昏緫
+      if (selectedIds.includes(maleId) && selectedIds.includes(femaleId)) {
+        selectedIds = selectedIds.slice(-1); // 淇濈暀鏈�鍚庨�変腑鐨勪竴涓�
+        this.$message.warning("鈥滅敺鈥濆拰鈥滃コ鈥濆叧閿瓧浜掓枼锛屽彧鑳介�夋嫨涓�涓紒");
+      }
+
+      // 鏇存柊 form.keywords 鍜� keys
+      this.form.keywords = selectedIds;
+      this.keys = selectedIds.join(",");
+
+      // 璋冪敤 getDataList锛屼紶閫掓墍鏈夐�変腑鐨勫叧閿瓧 ID锛堥�楀彿鍒嗛殧锛�
+      // this.getDataList({ xb: this.keys });
+      this.queryParams1.xb = this.keys; // 馃憟 鏇存柊鏌ヨ鍙傛暟
+      this.queryParams1.page = 1; // 馃憟 鍒囨崲鏉′欢鏃堕噸缃〉鐮�
+      this.getDataList(); // 涓嶉渶瑕佸啀浼犲弬浜�
     },
     getCategory() {
       this.loading = true;
@@ -666,9 +698,10 @@
         </span>
       );
     },
-    getDataList() {
+    getDataList(params = {}) {
       this.loading = true;
-      search(this.queryParams1).then((response) => {
+      const query = { ...this.queryParams1, ...params };
+      search(query).then((response) => {
         this.Treedata = response.data.list;
         this.total1 = response.data.total;
         this.pics = this.DataList.reduce((total, item) => total + item.priceOrd, 0);
@@ -677,8 +710,8 @@
         this.$nextTick(() => {
           this.$refs.tree.setCheckedKeys(this.checkedNodes);
           this.initializing = false;
-          this.loading = false;
         });
+        this.loading = false;
       }).catch(() => {
         this.loading = false;
       });

--
Gitblit v1.8.0