| | |
| | | <el-button @click="upload.open = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 重置密码对话框 --> |
| | | <el-dialog |
| | | title="提示" |
| | | :visible.sync="dialogVisible1" |
| | | width="30%" |
| | | :before-close="handleClose"> |
| | | <el-form> |
| | | <span>请输入“{{row.userName}}”的新密码</span> |
| | | <el-form-item> |
| | | <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 type="primary" @click="tijiao">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | components: { Treeselect }, |
| | | data() { |
| | | return { |
| | | row:[], |
| | | flag: false, |
| | | password:"", |
| | | dialogVisible1:false, |
| | | nums: "", |
| | | userInfoList: [], |
| | | hospList: [], |
| | |
| | | deptName(val) { |
| | | this.$refs.tree.filter(val); |
| | | }, |
| | | }, |
| | | computed: { |
| | | type() { |
| | | return this.flag ? "text" : "password"; |
| | | }, |
| | | elIcon() { |
| | | return this.flag ? "el-icon-minus" : "el-icon-view"; |
| | | } |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | |
| | | }, |
| | | /** 重置密码按钮操作 */ |
| | | handleResetPwd(row) { |
| | | this.$prompt('请输入"' + row.userName + '"的新密码', "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | closeOnClickModal: false, |
| | | inputPattern: /^.{5,20}$/, |
| | | inputErrorMessage: "用户密码长度必须介于 5 和 20 之间", |
| | | console.log(row); |
| | | this.dialogVisible1 = true; |
| | | this.row = row; |
| | | // this.$prompt('请输入"' + row.userName + '"的新密码', "提示", { |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // closeOnClickModal: false, |
| | | // inputPattern: /^.{5,20}$/, |
| | | // inputErrorMessage: "用户密码长度必须介于 5 和 20 之间", |
| | | // inputType:'password' |
| | | // }) |
| | | // .then(({ value }) => { |
| | | // resetUserPwd(row.userId, value).then((response) => { |
| | | // this.$modal.msgSuccess("修改成功"); |
| | | // // ,新密码是:" + value |
| | | // }); |
| | | // }) |
| | | // .catch(() => { }); |
| | | }, |
| | | tijiao(){ |
| | | let data = { |
| | | password:this.password, |
| | | userId:this.row.userId, |
| | | } |
| | | resetUserPwd(data).then(res=>{ |
| | | console.log(res); |
| | | if(res.code == 200){ |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.dialogVisible1 = false; |
| | | } |
| | | }) |
| | | .then(({ value }) => { |
| | | resetUserPwd(row.userId, value).then((response) => { |
| | | this.$modal.msgSuccess("修改成功,新密码是:" + value); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | /** 分配角色操作 */ |
| | | handleAuthRole: function (row) { |