From 3600c4a1e4d7987bd2c99bbc9e9b85d399251abc Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期三, 13 八月 2025 13:50:14 +0800
Subject: [PATCH] qx

---
 src/views/system/user/index.vue |   35 ++++++++++++++++++++++++-----------
 1 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 9af6e29..bccf0f7 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -1321,7 +1321,7 @@
           </el-collapse>
         </el-form>
         <div slot="footer" class="dialog-footer1">
-          <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+          <el-button :disabled="submit" type="primary" @click="submitForm">纭� 瀹�</el-button>
           <el-button @click="cancel">鍙� 娑�</el-button>
         </div>
       </el-dialog>
@@ -1465,6 +1465,7 @@
       single: true,
       // 闈炲涓鐢�
       multiple: true,
+      submit: false,
       // 鏄剧ず鎼滅储鏉′欢
       showSearch: true,
       // 鎬绘潯鏁�
@@ -1798,6 +1799,9 @@
       this.ids = selection.map((item) => item.userId);
       this.single = selection.length != 1;
       this.multiple = !selection.length;
+        if (selection.length >= 1) {
+        this.queryParams.userName = selection[0].userName
+      }
     },
 
     // 鏇村鎿嶄綔瑙﹀彂
@@ -1850,18 +1854,20 @@
       });
     },
 
-    handleUp(row) {
+       handleUp(row) {
       this.title = "鐢ㄦ埛淇℃伅缁存姢";
+
+      // this.form = row;
+
       this.open = true;
-      this.form = row;
-      this.form.hospId = Number(row.hospId);
-      // listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
-      //   (response) => {
-      //     response.rows.forEach((item, index) => {
-      //       this.form = item;
-      //     });
-      //   }
-      // );
+      this.submit = false
+      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
+        (response) => {
+          response.rows.forEach((item, index) => {
+            this.form = item;
+          });
+        }
+      );
     },
     select(val) {
       this.postList.forEach((item) => {
@@ -1877,6 +1883,10 @@
       this.getlistHosp();
       this.reset();
       this.form = row;
+      this.form = {
+        ...row,
+        deptId: row.deptId != null ? String(row.deptId) : null, // 馃憟 纭繚涓哄瓧绗︿覆
+      };
       if (this.form.hospId) {
         this.sendhospName();
       }
@@ -1885,6 +1895,7 @@
       //   this.forms = this.form.userInfo;
       // }
       this.open = true;
+            this.submit = false
       this.title = "鐢ㄦ埛淇℃伅缁存姢";
     },
 
@@ -1894,9 +1905,11 @@
       this.$refs["form"].validate((valid) => {
         if (valid) {
           if (_this.form.userId !== undefined) {
+           _this.submit = true
             updateUser(_this.form).then((response) => {
               _this.$modal.msgSuccess("淇敼鎴愬姛");
               _this.open = false;
+               _this.submit = false
               _this.getList();
             });
           } else {

--
Gitblit v1.8.0