From a4965736d3f6e0293f16fafd044de08882958413 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期一, 11 八月 2025 18:08:48 +0800
Subject: [PATCH] :qx

---
 src/views/system/user/index.vue |  325 +++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 224 insertions(+), 101 deletions(-)

diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index bcc6e62..936ad1a 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -2,27 +2,45 @@
   <div class="app-container">
     <el-row :gutter="20">
       <!--閮ㄩ棬鏁版嵁-->
-      <el-col :span="3" :xs="24">
+      <el-col :span="4" :xs="24">
         <div class="head-container">
           <el-input v-model="deptName" placeholder="璇疯緭鍏ョ瀹ゅ悕绉�" clearable size="small" prefix-icon="el-icon-search"
             style="margin-bottom: 15px" />
         </div>
-        <div class="head-container">
-          <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
-            :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current
-            @node-click="handleNodeClick" />
+        <!-- <div class="head-container">
+          <el-tree
+            :data="deptOptions"
+            :props="defaultProps"
+            :expand-on-click-node="false"
+            :filter-node-method="filterNode"
+            ref="tree"
+            node-key="id"
+            default-expand-all
+            :default-expanded-keys="treeId"
+            highlight-current
+            @node-click="handleNodeClick"
+          />
+        </div> -->
+        <div class="scrollable-container">
+          <div class="content">
+            <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
+              :filter-node-method="filterNode" ref="tree" node-key="id" :default-expanded-keys="treeId"
+              highlight-current @node-click="handleNodeClick" />
+          </div>
         </div>
       </el-col>
 
       <!--鐢ㄦ埛鏁版嵁-->
       <el-col :span="20" :xs="24">
-        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="72px">
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+          label-width="72px">
           <el-form-item label="鐢ㄦ埛鍚嶇О" prop="nickName">
             <el-input v-model="queryParams.nickName" placeholder="璇疯緭鍏ョ敤鎴峰悕绉�" clearable style="width: 180px"
               @keyup.enter.native="handleQuery" />
           </el-form-item>
-          <el-form-item label="鎵嬫満鍙风爜" prop="phonenumber">
-            <el-input v-model="queryParams.phonenumber" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable style="width: 180px"
+
+          <el-form-item label="鐢ㄦ埛宸ュ彿" prop="userName">
+            <el-input v-model="queryParams.userName" placeholder="璇疯緭鍏ョ敤鎴峰伐鍙�" clearable style="width: 180px"
               @keyup.enter.native="handleQuery" />
           </el-form-item>
           <el-form-item label="鐘舵��" prop="status">
@@ -78,7 +96,7 @@
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
         </el-row>
 
-        <el-table  :data="userList" border @selection-change="handleSelectionChange" v-loading="loading"
+        <el-table :data="userList" border @selection-change="handleSelectionChange" v-loading="loading"
           highlight-current-row>
           <el-table-column type="selection" width="50" align="center" fixed="left" />
           <el-table-column label="搴忓彿" align="center" key="newID" prop="newID" width="50px" fixed="left" />
@@ -105,7 +123,6 @@
             :show-overflow-tooltip="true" />
           <el-table-column label="鍖讳繚缂栫爜" align="center" key="medicalId" prop="medicalId" width="90px"
             :show-overflow-tooltip="true" />
-
 
           <el-table-column label="鍒涘缓浜�" align="center" key="createBy" prop="createBy" width="80px" />
           <el-table-column label="淇敼浜�" align="center" key="updateBy" prop="updateBy" width="80px" />
@@ -134,10 +151,10 @@
           <el-table-column label="鎿嶄綔" fixed="right" align="center" width="100px" class-name="small-padding fixed-width">
             <template slot-scope="scope" v-if="scope.row.userId !== 1">
               <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
-                v-hasPermi="['system:user:edit']" title="淇敼"></el-button>
+                v-hasPermi="['system:user:edit']" title="淇敼" close-on-click-modal="false"></el-button>
 
               <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-                v-hasPermi="['system:user:remove']" title="鍒犻櫎"></el-button>
+                v-hasPermi="['system:user:remove']" title="鍒犻櫎" close-on-click-modal="false"></el-button>
 
               <!-- 娣诲姞鐢ㄦ埛璇︽儏鎸夐挳 鐐瑰嚮璺冲嚭璇ョ敤鎴风殑璇︾粏淇℃伅椤甸潰
               <el-button
@@ -152,20 +169,11 @@
               <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"
                 v-hasPermi="['system:user:resetPwd', 'system:user:edit']">
                 <el-button size="mini" type="text" icon="el-icon-d-arrow-right" title="鏇村"></el-button>
-                <el-dropdown-menu slot="dropdown">
+                <el-dropdown-menu slot="dropdown" :append-to-body="true">
                   <el-dropdown-item command="handleResetPwd" icon="el-icon-key"
                     v-hasPermi="['system:user:resetPwd']">閲嶇疆瀵嗙爜</el-dropdown-item>
                   <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check"
                     v-hasPermi="['system:user:edit']">鍒嗛厤瑙掕壊</el-dropdown-item>
-                  <!-- 娣诲姞鐢ㄦ埛璇︽儏鎸夐挳 鐐瑰嚮璺冲嚭璇ョ敤鎴风殑璇︾粏淇℃伅椤甸潰 -->
-                  <!-- <el-button
-                    size="mini"
-                    type="text"
-                    icon="el-icon-share"
-                    @click="handleSearch(scope.row)"
-                    v-hasPermi="['hosp:Userinfo:list']"
-                    >璇︾粏淇℃伅</el-button
-                  > -->
                 </el-dropdown-menu>
               </el-dropdown>
             </template>
@@ -192,6 +200,9 @@
           <el-input v-model="form.userId" placeholder="璇疯緭鍏ョ敤鎴穒d" />
         </el-form-item> -->
           <el-form-item label="鐢ㄦ埛鍚嶇О" prop="nickName">
+            <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="handlePackage">
+              鐢ㄦ埛鍚嶇О
+            </span>
             <el-input v-model="form.nickName" placeholder="璇疯緭鍏ョ敤鎴锋樀绉�" maxlength="30" style="width: 130px" />
           </el-form-item>
           <el-form-item label="鐢ㄦ埛宸ュ彿" prop="userName">
@@ -233,16 +244,22 @@
             <!-- <el-input v-model="form.nationDesc" placeholder="璇疯緭鍏ユ皯鏃忔弿杩�"/> -->
           </el-form-item>
 
-          <el-form-item label="鎵�鍦ㄩ櫌鍖�" prop="hospName">
-            <el-select v-model="form.hospName" placeholder="璇烽�夋嫨鎵�鍦ㄩ櫌鍖�" clearable style="width: 200px" filterable>
+          <el-form-item label="鎵�鍦ㄥ尰闄�" prop="hospId">
+            <el-select v-if="hospList.length > 0" v-model="form.hospId" placeholder="璇烽�夋嫨鎵�鍦ㄥ尰闄�" clearable
+              style="width: 200px" filterable @change="sendhospName">
               <el-option v-for="dict in hospList" :key="dict.hospAreaName" :label="dict.hospAreaName"
                 :value="dict.hospAreaId" />
             </el-select>
             <!-- <el-input v-model="form.hospName" placeholder="璇疯緭鍏ョ粍缁囦腑鏂囧悕绉�" /> -->
           </el-form-item>
           <el-form-item label="褰掑睘绉戝" prop="deptId">
-            <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘绉戝"
-              style="width: 200px" />
+            <!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘绉戝"
+              style="width: 200px" /> -->
+            <el-select v-if="DepartmentList.length > 0" v-model="form.deptId" placeholder="璇烽�夋嫨褰掑睘绉戝" clearable
+              style="width: 200px" filterable>
+              <el-option v-for="dict in DepartmentList" :key="dict.deptId" :label="dict.deptName"
+                :value="dict.deptId" />
+            </el-select>
           </el-form-item>
 
           <el-form-item label="鍏ヨ亴鏃ユ湡" prop="entryDate">
@@ -261,8 +278,8 @@
             <el-input v-model="form.medicalId" placeholder="璇疯緭鍏ュ尰淇濈紪鐮�" style="width: 200px" />
           </el-form-item>
           <el-form-item label="浼樻儬鎶樻墸">
-            <el-input-number ref="inputNumber" style="width: 200px" v-model="form.discount" :precision="2"
-              :step="0.1" :max="10" :min="1" @change="numberChange"></el-input-number>
+            <el-input-number ref="inputNumber" style="width: 200px" v-model="form.discount" :precision="2" :step="0.1"
+              :max="10" :min="1" @change="numberChange"></el-input-number>
           </el-form-item>
           <el-form-item label="鐜颁綇鍧�" prop="liveAddr">
             <el-input v-model="form.userInfo.liveAddr" placeholder="璇疯緭鍏ョ幇灞呬綇鍦板潃" style="width: 440px" />
@@ -537,7 +554,8 @@
                 <el-input v-model="form.phaCertifiedNo" placeholder="璇疯緭鍏ヤ笓瀹�-璧勬牸璇佸彿" style="width: 200px" />
               </el-form-item>
               <el-form-item label="鑱岀О绾у埆" prop="expJobLevelCode">
-                <el-select v-model="form.expJobLevelCode" placeholder="璇烽�夋嫨鑱岀О绾у埆" style="width: 200px" filterable clearable>
+                <el-select v-model="form.expJobLevelCode" placeholder="璇烽�夋嫨鑱岀О绾у埆" style="width: 200px" filterable
+                  clearable>
                   <el-option v-for="dict in dict.type.dict_user_zcjb" :key="dict.value" :label="dict.label"
                     :value="dict.value"></el-option>
                 </el-select>
@@ -572,7 +590,8 @@
               />
             </el-form-item> -->
               <el-form-item label="鏀挎不闈㈣矊" prop="politicalStatus">
-                <el-select v-model="form.politicalStatus" placeholder="璇烽�夋嫨鏀挎不闈㈣矊" style="width: 200px" filterable clearable>
+                <el-select v-model="form.politicalStatus" placeholder="璇烽�夋嫨鏀挎不闈㈣矊" style="width: 200px" filterable
+                  clearable>
                   <el-option v-for="dict in dict.type.dict_political" :key="dict.value" :label="dict.label"
                     :value="dict.value"></el-option>
                 </el-select>
@@ -622,14 +641,14 @@
           </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>
     </div>
 
     <!-- 鐢ㄦ埛瀵煎叆瀵硅瘽妗� -->
-    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+    <!-- <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
       <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
         :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
         :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
@@ -649,32 +668,30 @@
         <el-button type="primary" @click="submitFileForm">纭� 瀹�</el-button>
         <el-button @click="upload.open = false">鍙� 娑�</el-button>
       </div>
-    </el-dialog>
+    </el-dialog> -->
 
     <!-- 閲嶇疆瀵嗙爜瀵硅瘽妗� -->
-    <el-dialog
-      title="鎻愮ず"
-      :visible.sync="dialogVisible1"
-      width="30%"
-      :before-close="handleClose">
+    <el-dialog title="鎻愮ず" :visible.sync="dialogVisible1" width="30%" :before-close="handleClose">
       <el-form :rules="rules1">
-        <span>璇疯緭鍏モ�渰{row.userName}}鈥濈殑鏂板瘑鐮�</span>
+        <span>璇疯緭鍏モ�渰{ row.userName }}鈥濈殑鏂板瘑鐮�</span>
         <el-form-item prop="password">
           <el-input v-model="password" :type="type" auto-complete="off" placeholder="瀵嗙爜" ref="barcodeMsg">
             <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
             <i slot="suffix" class="icon-style" :class="elIcon" autocomplete="auto" @click="flag = !flag" /></el-input>
         </el-form-item>
       </el-form>
-      
+
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
+        <el-button @click="dialogVisible1 = false">鍙� 娑�</el-button>
         <el-button type="primary" @click="tijiao">纭� 瀹�</el-button>
       </span>
     </el-dialog>
+    <yonghu ref="aaa" @add="handleChanges" />
   </div>
 </template>
 
 <script>
+import yonghu from "@/components/yonghu";
 import {
   listUser,
   getUser,
@@ -684,9 +701,10 @@
   resetUserPwd,
   changeUserStatus,
   deptTreeSelect,
-  getUserInfo,
+  getDeptListByDictHospId,
 } from "@/api/system/user";
 import { getToken } from "@/utils/auth";
+import { getInfo } from "@/api/login";
 import { listHosp } from "@/api/hosp/hosp";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -712,17 +730,30 @@
     "dict_user_work",
     "dict_qhdm",
   ],
-  components: { Treeselect },
+  components: { Treeselect, yonghu },
   data() {
+    let checkPhoneNum = (rule, value, callback) => {
+      let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
+      if (value == "" && value == undefined && !value) {
+        return callback("");
+      } else if (value != undefined && value != "") {
+        return callback();
+      } else if (!patter.test(value)) {
+        return callback("");
+      }
+    };
     return {
-      row:[],
+      row: [],
       flag: false,
-      password:"",
-      dialogVisible1:false,
+      submit: false,
+      password: "",
+      dialogVisible1: false,
       nums: "",
       userInfoList: [],
       hospList: [],
       activeNames: ["1"],
+      treeId: [],
+      selectedDeptId: null,
       // 閬僵灞�
       loading: true,
       // 閫変腑鏁扮粍
@@ -746,6 +777,7 @@
       dialogVisible: false,
       // 鐢ㄦ埛琛ㄦ牸鏁版嵁
       sysUserList: [],
+      DepartmentList: [],
       // 宀椾綅琛ㄦ牸鏁版嵁
       postList: [],
       // 瑙掕壊琛ㄦ牸鏁版嵁
@@ -770,7 +802,7 @@
           brithday: "",
           nationDesc: "",
           entryDate: "",
-          hospName: "",          
+          hospName: "",
         },
       },
       forms: {},
@@ -823,51 +855,51 @@
       // 琛ㄥ崟鏍¢獙
       rules: {
         userName: [
-          { required: true, message: "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
+          { required: true, validator: checkPhoneNum, trigger: "blur" },
           {
             min: 2,
             max: 20,
-            message: "鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿",
+            validator: checkPhoneNum,
             trigger: "blur",
           },
         ],
         nickName: [
-          { required: true, message: "鐢ㄦ埛鏄电О涓嶈兘涓虹┖", trigger: "blur" },
+          { required: true, validator: checkPhoneNum, trigger: "blur" },
         ],
         password: [
-          { required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
+          { required: true, validator: checkPhoneNum, trigger: "blur" },
           {
             min: 5,
             max: 20,
-            message: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
+            validator: checkPhoneNum,
             trigger: "blur",
           },
         ],
         email: [
           {
             type: "email",
-            message: "璇疯緭鍏ユ纭殑閭鍦板潃",
+            validator: checkPhoneNum,
             trigger: ["blur", "change"],
           },
         ],
         phonenumber: [
           {
             pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-            message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜",
+            validator: checkPhoneNum,
             trigger: "blur",
           },
         ],
       },
       rules1: {
-        password: [
-          { required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
-          {
-            min: 5,
-            max: 20,
-            message: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
-            trigger: "blur",
-          },
-        ],
+        // password: [
+        //   { required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
+        //   {
+        //     min: 5,
+        //     max: 20,
+        //     message: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
+        //     trigger: "blur",
+        //   },
+        // ],
       },
     };
   },
@@ -876,6 +908,15 @@
     deptName(val) {
       this.$refs.tree.filter(val);
     },
+    treeId(newVal, oldVal) {
+      if (newVal) {
+        this.$nextTick(() => {
+          document
+            .querySelector(".el-tree-node__children .el-tree-node__content")
+            .click();
+        });
+      }
+    },
   },
   computed: {
     type() {
@@ -883,34 +924,41 @@
     },
     elIcon() {
       return this.flag ? "el-icon-minus" : "el-icon-view";
-    }
+    },
   },
   created() {
-    this.getList();
     this.getDeptTree();
+    this.getList();
+    if (this.form.hospId) {
+      this.sendhospName(); // 椤甸潰鍔犺浇鏃惰嚜鍔ㄥ姞杞界瀹ゆ暟鎹�
+    }
+
     // this.getRoleList();
     // this.getConfigKey("sys.user.initPassword").then((response) => {
     //   this.initPassword = response.msg;
     // });
   },
+
   methods: {
     handleChange(val) { },
     /** 鏌ヨ鐢ㄦ埛鍒楄〃 */
     getList() {
       this.loading = true;
-      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
-        (response) => {
-          response.rows.forEach((item, index) => {
-            item.newID =
-              (this.queryParams.pageNum - 1) * this.queryParams.pageSize +
-              index +
-              1;
-          });
-          this.userList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
+      if (this.queryParams.deptId) {
+        listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
+          (response) => {
+            response.rows.forEach((item, index) => {
+              item.newID =
+                (this.queryParams.pageNum - 1) * this.queryParams.pageSize +
+                index +
+                1;
+            });
+            this.userList = response.rows;
+            this.total = response.total;
+            this.loading = false;
+          }
+        );
+      }
     },
     /** 鏌ヨ宀椾綅鍒楄〃 */
     getPostList() {
@@ -930,6 +978,7 @@
     getlistHosp() {
       listHosp(this.queryParams).then((response) => {
         this.hospList = response.rows;
+
         this.total = response.total;
       });
     },
@@ -942,7 +991,8 @@
     getDeptTree() {
       deptTreeSelect().then((response) => {
         this.deptOptions = response.data;
-        console.log(this.deptOptions);
+        this.treeId.push(this.deptOptions[0].id);
+        this.queryParams.deptId = this.deptOptions[0].id;
       });
     },
     // 绛涢�夎妭鐐�
@@ -953,7 +1003,21 @@
     // 鑺傜偣鍗曞嚮浜嬩欢
     handleNodeClick(data) {
       this.queryParams.deptId = data.id;
+      this.selectedDeptId = data.id;
       this.handleQuery();
+    },
+    handlePackage() {
+      this.$refs.aaa.open = true;
+      this.$refs.aaa.getList();
+      this.$refs.aaa.title = "鏁版嵁瀛楀吀";
+    },
+    handleChanges(param1) {
+      this.form.nickName = param1[0].staffName;
+      // this.form.hisPacId = param1[0].pacId;
+      // if (param1[0].price) {
+      //   this.form.counterPrice = param1[0].price;
+      //   this.form.retailPrice = param1[0].price;
+      // }
     },
     // 鐢ㄦ埛鐘舵�佷慨鏀�
     handleStatusChange(row) {
@@ -974,10 +1038,11 @@
     cancel() {
       this.open = false;
       this.reset();
-      this.$tab.refreshPage();
+      // this.$tab.refreshPage();
     },
     handleClose() {
-      this.$tab.refreshPage();
+      this.cancel();
+      // this.$tab.refreshPage();
     },
     // 琛ㄥ崟閲嶇疆
     reset() {
@@ -1025,7 +1090,11 @@
       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
+      }
     },
+
     // 鏇村鎿嶄綔瑙﹀彂
     handleCommand(command, row) {
       switch (command) {
@@ -1046,6 +1115,15 @@
       this.title = "鐢ㄦ埛淇℃伅缁存姢";
       this.getPostList();
       this.getlistHosp();
+      getInfo(this.queryParams).then((response) => {
+        this.form.hospId = response.user.hospId;
+        if (this.form.hospId) {
+          this.sendhospName();
+        }
+      });
+      if (this.selectedDeptId) {
+        this.form.deptId = this.selectedDeptId;
+      }
       // getUser().then((response) => {
       //   this.postOptions = response.posts;
       //   this.roleOptions = response.roles;
@@ -1054,17 +1132,30 @@
       // });
     },
 
+    sendhospName() {
+      let data = {
+        id: this.form.hospId,
+      };
+      getDeptListByDictHospId(data).then((res) => {
+        this.DepartmentList = res.data;
+        // this.form.deptId = String(this.form.deptId);
+      });
+    },
+
     handleUp(row) {
       this.title = "鐢ㄦ埛淇℃伅缁存姢";
+
+      // this.form = row;
+
       this.open = true;
-      this.form = row;
-      // 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) => {
@@ -1080,11 +1171,19 @@
       this.getlistHosp();
       this.reset();
       this.form = row;
+      this.form = {
+        ...row,
+        deptId: row.deptId != null ? String(row.deptId) : null, // 馃憟 纭繚涓哄瓧绗︿覆
+      };
+      if (this.form.hospId) {
+        this.sendhospName();
+      }
       // this.form.userInfo.id = null;
       // if(this.form.userInfo != null){
       //   this.forms = this.form.userInfo;
       // }
       this.open = true;
+      this.submit = false
       this.title = "鐢ㄦ埛淇℃伅缁存姢";
     },
 
@@ -1094,9 +1193,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 {
@@ -1111,7 +1212,6 @@
     },
     /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */
     handleResetPwd(row) {
-      console.log(row);
       this.dialogVisible1 = true;
       this.row = row;
       // this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", {
@@ -1130,18 +1230,21 @@
       //   })
       //   .catch(() => { });
     },
-    tijiao(){
-      let data = {
-        password:this.password,
-        userId:this.row.userId,
+    tijiao() {
+      if (this.password) {
+        let data = {
+          password: this.password,
+          userId: this.row.userId,
+        };
+        resetUserPwd(data).then((res) => {
+          if (res.code == 200) {
+            this.$modal.msgSuccess("淇敼鎴愬姛");
+            this.dialogVisible1 = false;
+          }
+        });
+      } else {
+        this.$modal.msgError("鐢ㄦ埛鍚嶅瘑鐮佷笉鑳戒负绌�");
       }
-      resetUserPwd(data).then(res=>{
-        console.log(res);
-        if(res.code == 200){
-          this.$modal.msgSuccess("淇敼鎴愬姛");
-          this.dialogVisible1 = false;
-        }
-      })
     },
     /** 鍒嗛厤瑙掕壊鎿嶄綔 */
     handleAuthRole: function (row) {
@@ -1230,6 +1333,26 @@
   width: 200px;
 }
 
+.scrollable-container {
+  width: 200px;
+  /* 璁剧疆瀹瑰櫒鐨勫搴� */
+  height: 629px;
+  /* 璁剧疆瀹瑰櫒鐨勯珮搴� */
+  overflow: auto;
+  /* 鍏佽鍐呭婧㈠嚭鏃舵樉绀烘粴鍔ㄦ潯 */
+  border: 1px solid #ccc;
+  /* 鍙�夛細娣诲姞杈规浠ユ洿濂藉湴鏄剧ず瀹瑰櫒 */
+  position: relative;
+  /* 鍙�夛細浣垮鍣ㄥ唴鐨勭粷瀵瑰畾浣嶅厓绱犺兘澶熸纭樉绀� */
+}
+
+.content {
+  width: 600px;
+  /* 璁剧疆鍐呭鐨勫搴︼紝浠ヨЕ鍙戞按骞虫粴鍔ㄦ潯 */
+  height: 1000px;
+  /* 璁剧疆鍐呭鐨勯珮搴︼紝浠ヨЕ鍙戝瀭鐩存粴鍔ㄦ潯 */
+}
+
 .pag {
   width: 100%;
   display: flex;

--
Gitblit v1.8.0