From d3ea99796e35f4be7d2a77957b0be57bee011663 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期五, 01 八月 2025 15:46:42 +0800
Subject: [PATCH] tj

---
 src/views/doctor/checkAll/index.vue |   45 +++++++++++++---------
 vue.config.js                       |    4 ++
 src/views/system/comp/index.vue     |   36 +++++++++++++++--
 3 files changed, 62 insertions(+), 23 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 1d5cb4d..05aa679 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -2593,8 +2593,9 @@
     },
 
     yichangjieguo() {
-      this.loading = true;
-      this.isLoading = true;
+      // 绉婚櫎琛ㄦ牸loading鐘舵�侊紝閬垮厤鍦ㄧ偣鍑昏鎯呮椂鏄剧ず琛ㄦ牸loading妗�
+      // this.loading = true;
+      // 涓嶈鍦ㄨ繖閲岃缃� isLoading = true锛屽洜涓哄畠鍦� handleClick 涓凡缁忚璁剧疆浜�
       this.status1 = 0;
       getConfigKey("kzycxmsfzk").then((res) => {
         this.shouldExpand = res.msg;
@@ -2612,9 +2613,11 @@
           const data = res.data;
 
           if (!data || data.length === 0) {
-            this.$message.warning("鏆傛棤寮傚父鎶ュ憡");
-            this.loading = false;
-            this.isLoading = false; // 鍏抽棴鏁翠綋鍔犺浇妗�
+            // 绉婚櫎璀﹀憡娑堟伅锛岀敤鎴蜂笉甯屾湜鐪嬪埌"鏆傛棤寮傚父鎶ュ憡"鐨勫脊妗�
+            // this.$message.warning("鏆傛棤寮傚父鎶ュ憡");
+            // 绉婚櫎琛ㄦ牸loading鐘舵�佽缃�
+            // this.loading = false;
+            // 涓嶅湪杩欓噷鍏抽棴 isLoading锛屽洜涓哄畠鐢� handleClick 绠$悊
             resolve(); // 杩斿洖 Promise锛屼絾涓嶇户缁悗缁�昏緫
             return;
           }
@@ -2629,9 +2632,9 @@
               }
             });
           });
-          if (!this.yichangList) {
+          /* if (!this.yichangList) {
             this.$message.warning("鏆傛棤寮傚父鎶ュ憡");
-          }
+          } */
           resolve(); // 鎴愬姛瀹屾垚
           // 杩欓噷涔熷彲浠ユ牴鎹畇houldExpand鍐嶈皟鐢ㄤ竴娆etExpends锛岀‘淇濇暟鎹凡鍔犺浇
           if (this.shouldExpand === "Y" || this.shouldExpand === "y") {
@@ -2642,20 +2645,18 @@
         });
       })
         .catch((error) => {
-          this.isLoading = false;
-          this.loading = false;
+          // 涓嶅湪杩欓噷鍏抽棴 isLoading锛屽洜涓哄畠鐢� handleClick 绠$悊
+          // 绉婚櫎琛ㄦ牸loading鐘舵�佽缃�
+          // this.loading = false;
           console.error("鑾峰彇寮傚父缁撴灉澶辫触:", error);
           this.$message.error("鑾峰彇寮傚父缁撴灉澶辫触");
           reject(error); // 杩斿洖閿欒
         })
         .finally(() => {
-          // 鍙湪娌℃湁鎻愬墠杩斿洖鐨勬儏鍐典笅鍏抽棴鍔犺浇妗�
-          if (this.isLoading) {
-            this.isLoading = false;
-          }
-          if (this.loading) {
-            this.loading = false;
-          }
+          // 绉婚櫎琛ㄦ牸loading鐘舵�佽缃紝鍥犱负 isLoading 鐢� handleClick 绠$悊
+          // if (this.loading) {
+          //   this.loading = false;
+          // }
         });
     },
 
@@ -3215,7 +3216,7 @@
                   this.isLoading = true;
                   this.drawer = true;
                   getupdateCheckType(this.tjNumber).then((response) => {
-                    // this.isLoading = false;
+                    this.isLoading = false;
                     this.changedate = response.data;
                     if (this.changedate) {
                       this.changedate.forEach((item) => {
@@ -3241,6 +3242,10 @@
                       this.zhiyeJl = "";
                       this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
                     }
+                  }).catch((error) => {
+                    this.isLoading = false;
+                    console.error("鑾峰彇妫�鏌ョ被鍨嬪け璐�:", error);
+                    this.$message.error("鑾峰彇妫�鏌ョ被鍨嬪け璐�");
                   });
                 });
               }
@@ -3270,7 +3275,7 @@
                       this.isLoading = true;
                       this.drawer = true;
                       getupdateCheckType(this.tjNumber).then((response) => {
-                        // this.isLoading = false;
+                        this.isLoading = false;
                         this.changedate = response.data;
                         if (this.changedate) {
                           for (let i = 0; i < this.changedate.length; i++) {
@@ -3295,6 +3300,10 @@
                           this.zhiyeJl = "";
                           this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
                         }
+                      }).catch((error) => {
+                        this.isLoading = false;
+                        console.error("鑾峰彇妫�鏌ョ被鍨嬪け璐�:", error);
+                        this.$message.error("鑾峰彇妫�鏌ョ被鍨嬪け璐�");
                       });
                     });
                   }
diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue
index 6dfc31d..f29b2d6 100644
--- a/src/views/system/comp/index.vue
+++ b/src/views/system/comp/index.vue
@@ -252,7 +252,7 @@
               @submit.native.prevent>
               <el-form-item label="濂楅鍚嶇О" prop="pacName">
                 <el-input ref="inputName" v-model="queryParams.pacName" placeholder="璇疯緭鍏ュ椁愬悕绉�" clearable
-                  @keyup.enter.native="handleSearch" style="width: 140px" />
+                  @keyup.enter.native="handleSearch" @clear="handleClearSearch" style="width: 140px" />
               </el-form-item>
               <el-form-item>
                 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearch">鎼滅储</el-button>
@@ -423,7 +423,7 @@
               label-width="68px" @submit.native.prevent>
               <el-form-item label="椤圭洰鍚嶇О" prop="proName">
                 <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
-                  @keyup.enter.native="handleSearchFor" style="width: 140px" />
+                  @keyup.enter.native="handleSearchFor" @clear="handleClearSearch" style="width: 140px" />
               </el-form-item>
               <el-form-item>
                 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchFor">鎼滅储</el-button>
@@ -517,7 +517,7 @@
               label-width="68px" @submit.native.prevent>
               <el-form-item label="椤圭洰鍚嶇О" prop="proName">
                 <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
-                  @keyup.enter.native="handleSearchFor" style="width: 140px" />
+                  @keyup.enter.native="handleSearchFor"  @clear="handleClearSearch" style="width: 140px" />
               </el-form-item>
               <el-form-item>
                 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchFor">鎼滅储</el-button>
@@ -1305,7 +1305,7 @@
         });
       }
     },
-    handleSearchFor() {
+    /* handleSearchFor() {
       // 鍒ゆ柇鏄惁涓烘眽瀛�
       const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char);
       if (isChineseChar(this.queryParams1.proName)) {
@@ -1320,6 +1320,27 @@
           this.Treedata = response.data;
         });
       }
+    }, */
+     handleSearchFor() {
+      // 鍒ゆ柇鏄惁涓烘眽瀛�
+      const keyword = this.queryParams1.proName?.trim() || '';
+      const isChineseChar = /[\u4E00-\u9FA5]/.test(keyword);
+      const query = {
+      ...this.queryParams1,
+      proName: isChineseChar ? keyword : null,
+      pym: isChineseChar ? null : keyword
+     };
+      getProjectList(query).then((response) => {
+          this.Treedata = response.data;
+      });
+    },
+    handleClearSearch() {
+      this.queryParams1.proName = '';
+      this.queryParams1.pym = null;
+      // 閲嶆柊鍔犺浇琛ㄦ牸鏁版嵁
+      getProjectList({}).then((response) => {
+          this.Treedata = response.data;
+        });
     },
     // 鍗曢」鏁版嵁鑾峰彇
     handleChangesingle(selection) {
@@ -1557,7 +1578,9 @@
         });
     },
     xiangmuWh() {
-      if (!this.forms.groupingName || !this.forms.sex || !this.forms.payType) {
+      if (!this.forms.groupingName ||
+        !this.forms.sex ||
+        !this.forms.payType) {
         this.$modal.msgError("璇峰厛濉啓鎵�鏈夊繀濉」!");
         return; // Stop execution if any required field is empty
       }
@@ -1565,6 +1588,9 @@
       this.title = "鍒嗙粍椤圭洰缁存姢";
       this.OnenewpacName = [];
       this.queryParams.price = 0;
+      // 娓呯┖椤圭洰鍚嶇О鎼滅储妗�
+      this.queryParams1.proName = '';
+      this.queryParams1.pym = null;
       this.loading = true;
       if (this.groupList[0]) {
         let id = this.groupList[0].id || "";
diff --git a/vue.config.js b/vue.config.js
index 01c9aaf..c4cd35a 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -53,6 +53,10 @@
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `https://ltpeis.xaltjdkj.cn:5801/`,
+<<<<<<< HEAD
+=======
+        // target: `http://192.168.1.99:5012`,
+>>>>>>> 6a341a52246c20a662808f055ea446aa06b92a0d
         // target: `http://192.168.1.244:5011`,
         target: `http://192.168.1.113:5011`,
         // // target: `http://192.168.0.99:8080/ltkj-admin`,

--
Gitblit v1.8.0