From 84a9297d616a8db97330e3daa6b92974bb738fa5 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期一, 28 七月 2025 16:38:30 +0800
Subject: [PATCH] 1

---
 src/views/system/tijian/index.vue |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index cababad..01c0f03 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -248,7 +248,7 @@
                 <el-button v-show="lishi" type="primary" @click="cope" size="mini">涓�閿鍒�</el-button>
                 <el-button type="primary" @click="inputChanges" v-show="lishi" size="mini"
                   :disabled="confirm">鍘嗗彶浣撴璁板綍</el-button>
-                <el-button :disabled="isDisabled" type="primary" size="mini" @click="submitForm">鐧昏</el-button>
+                <el-button :disabled="butopen" type="primary" size="mini" @click="submitForm">鐧昏</el-button>
                 <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" @queryTable="getList">閲嶇疆</el-button>
               </div>
             </el-col>
@@ -943,6 +943,7 @@
       // 闈炲崟涓鐢�
       single: true,
       cardreader: false,
+      butopen:false,
       // 闈炲涓鐢�
       multiple: true,
       nodeobj: {},
@@ -987,10 +988,10 @@
         pacName: null,
         pacRemark: null,
       },
-      // valueUrl: "ws://127.0.0.1:6789/websocket",
-      // valueUrls: "ws://127.0.0.1:6789/websocket",
-      valueUrl: "ws://192.168.1.244:6789/websocket",
-      valueUrls: "ws://192.168.1.244:6789/websocket",
+      valueUrl: "ws://127.0.0.1:6789/websocket",
+      valueUrls: "ws://127.0.0.1:6789/websocket",
+      // valueUrl: "ws://192.168.1.244:6789/websocket",
+      // valueUrls: "ws://192.168.1.244:6789/websocket",
       webSocket: null,
       // 韬唤璇侀渶瑕�
       // socket: null,
@@ -1745,6 +1746,7 @@
     /** 鐧昏鎻愪氦鎸夐挳 */
     submitForm() {
       let _this = this;
+      _this.butopen = true;
       if (!this.form.cusPhone || !this.form.cusName) {
         this.$message.warning("璇峰~閫夊繀濉」");
         return;
@@ -1781,6 +1783,7 @@
           // }
 
           addCustomer(formData).then((response) => {
+             _this.butopen = false;
             this.responseList = response.data;
             this.form.tjType = this.dict.type.dict_team[0].value;
             this.$modal.msgSuccess("鏂板鎴愬姛");
@@ -1788,6 +1791,7 @@
             _this.isDisabled = true;
             _this.top = false;
           }).catch((error) => {
+             _this.butopen = false;
             this.$modal.msgError("鐧昏澶辫触锛岃妫�鏌ユ暟鎹�");
             console.error("Error in addCustomer:", error);
           });
@@ -1978,7 +1982,7 @@
         if (isChineseChar(resultObj.data.sex)) {
           _this.form.cusSex = resultObj.data.sex == "濂�" ? 1 : 0
         } else {
-          _this.form.cusSex = resultObj.data.sex;
+          _this.form.cusSex = resultObj.data.sex ==  "1" ? 0 : 1;
         }
         _this.form.cusNational = resultObj.data.mz;
         _this.form.cusBrithday = resultObj.data.csrq;
@@ -2126,7 +2130,13 @@
         websocket.onmessage = function (event) {
           var resultObj = JSON.parse(event.data);
           _this.form.cusName = resultObj.data.name;
-          _this.form.cusSex = resultObj.data.sex;
+            const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char)
+          // _this.form.cusSex = resultObj.data.sex;
+           if (isChineseChar(resultObj.data.sex)) {
+          _this.form.cusSex = resultObj.data.sex == "濂�" ? 1 : 0
+        } else {
+          _this.form.cusSex = resultObj.data.sex ==  "1" ? 0 : 1;
+        }
           _this.form.cusNational = resultObj.data.mz;
           _this.form.cusBrithday = resultObj.data.csrq;
           if (_this.form.cusBrithday) {

--
Gitblit v1.8.0