|
|
@@ -39,6 +39,7 @@
|
|
|
center
|
|
|
title="用户信息设置"
|
|
|
width="50%"
|
|
|
+ @close="closeCode"
|
|
|
>
|
|
|
<div>
|
|
|
<el-form
|
|
|
@@ -487,6 +488,14 @@ export default {
|
|
|
this.checkAll = count === this.deptList.length
|
|
|
},
|
|
|
roleSave() {
|
|
|
+ if (this.deptList.filter(e => e.checked).length === 0) {
|
|
|
+ this.$message.error('请选择管理股室')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.userInfoForm.roleIds.length === 0) {
|
|
|
+ this.$message.error('请选择职务')
|
|
|
+ return
|
|
|
+ }
|
|
|
const data = this.userInfoForm
|
|
|
if (data.deptIds.length > 0) {
|
|
|
data.deptIds = data.deptIds.join(',')
|
|
|
@@ -509,7 +518,7 @@ export default {
|
|
|
this.$api.role.roleSave(data).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.showEdit = false
|
|
|
- this.$message.success(res.msg)
|
|
|
+ this.this.$message.success(res.msg)
|
|
|
this.onLoad()
|
|
|
} else {
|
|
|
this.$message.error(res.msg)
|
|
|
@@ -548,8 +557,17 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
closeCode() {
|
|
|
+ this.userInfoForm = {
|
|
|
+ name: '',
|
|
|
+ realName: '',
|
|
|
+ phone: '',
|
|
|
+ password: '',
|
|
|
+ roleIds: '',
|
|
|
+ deptIds: [],
|
|
|
+ deptId: ''
|
|
|
+ }
|
|
|
+ this.deptList.map(e => (e.checked = false))
|
|
|
this.qrCodeText = ''
|
|
|
- this.userInfoForm.deptId = ''
|
|
|
}
|
|
|
}
|
|
|
}
|