From ceb611ede1ca3988d731adffee433a1a7bcd442b Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期四, 19 十月 2023 17:38:18 +0800 Subject: [PATCH] tjxgstf --- src/views/system/user/index.vue | 80 ++++++++++++++++++++------------------- 1 files changed, 41 insertions(+), 39 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 1c496fd..01ec48b 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -78,7 +78,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" /> @@ -234,7 +234,8 @@ </el-form-item> <el-form-item label="鎵�鍦ㄥ尰闄�" prop="hospId"> - <el-select v-model="form.hospId" placeholder="璇烽�夋嫨鎵�鍦ㄥ尰闄�" clearable style="width: 200px" filterable @change="sendhospName"> + <el-select 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> @@ -243,7 +244,7 @@ <el-form-item label="褰掑睘绉戝" prop="deptId"> <!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘绉戝" style="width: 200px" /> --> - <el-select v-model="form.deptId" placeholder="璇烽�夋嫨褰掑睘绉戝" clearable style="width: 200px" filterable > + <el-select v-model="form.deptId" placeholder="璇烽�夋嫨褰掑睘绉戝" clearable style="width: 200px" filterable> <el-option v-for="dict in DepartmentList" :key="dict.deptName" :label="dict.deptName" :value="dict.deptId" /> </el-select> @@ -265,8 +266,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" /> @@ -656,22 +657,18 @@ </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> @@ -719,10 +716,10 @@ components: { Treeselect }, data() { return { - row:[], + row: [], flag: false, - password:"", - dialogVisible1:false, + password: "", + dialogVisible1: false, nums: "", userInfoList: [], hospList: [], @@ -750,7 +747,7 @@ dialogVisible: false, // 鐢ㄦ埛琛ㄦ牸鏁版嵁 sysUserList: [], - DepartmentList:[], + DepartmentList: [], // 宀椾綅琛ㄦ牸鏁版嵁 postList: [], // 瑙掕壊琛ㄦ牸鏁版嵁 @@ -775,7 +772,7 @@ brithday: "", nationDesc: "", entryDate: "", - hospName: "", + hospName: "", }, }, forms: {}, @@ -864,15 +861,15 @@ ], }, 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", + // }, + // ], }, }; }, @@ -1058,9 +1055,9 @@ // }); }, - sendhospName(){ + sendhospName() { let data = { - id:this.form.hospId + id: this.form.hospId } getDeptListByDictHospId(data).then(res => { this.DepartmentList = res.data @@ -1142,17 +1139,22 @@ // }) // .catch(() => { }); }, - tijiao(){ - let data = { - password:this.password, - userId:this.row.userId, - } - resetUserPwd(data).then(res=>{ - if(res.code == 200){ - this.$modal.msgSuccess("淇敼鎴愬姛"); - this.dialogVisible1 = false; + 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("鐢ㄦ埛鍚嶅瘑鐮佷笉鑳戒负绌�"); + } + }, /** 鍒嗛厤瑙掕壊鎿嶄綔 */ handleAuthRole: function (row) { -- Gitblit v1.8.0