用户角色回显有问题的bug
parent
38d63aae1d
commit
c4a52b3bd2
|
@ -100,7 +100,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="600px">
|
<el-dialog v-loading="editloading" :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="600px">
|
||||||
<el-form ref="form" :rules="rules" :model="pd" label-width="110px" style="width: 500px;">
|
<el-form ref="form" :rules="rules" :model="pd" label-width="110px" style="width: 500px;">
|
||||||
<el-form-item label="角色" prop="ROLE_ID">
|
<el-form-item label="角色" prop="ROLE_ID">
|
||||||
<el-select v-model="pd.ROLE_ID" multiple placeholder="请选择角色">
|
<el-select v-model="pd.ROLE_ID" multiple placeholder="请选择角色">
|
||||||
|
@ -246,6 +246,7 @@ export default {
|
||||||
keyDepeName: '',
|
keyDepeName: '',
|
||||||
keyJobLeven: '',
|
keyJobLeven: '',
|
||||||
dialogFormEdit: false,
|
dialogFormEdit: false,
|
||||||
|
editloading: false,
|
||||||
dialogType: 'add',
|
dialogType: 'add',
|
||||||
rules: {
|
rules: {
|
||||||
EMAIL: [
|
EMAIL: [
|
||||||
|
@ -357,6 +358,7 @@ export default {
|
||||||
}))
|
}))
|
||||||
resolve(nodes) // 通过调用resolve将子节点数据返回,通知组件数据加载完成
|
resolve(nodes) // 通过调用resolve将子节点数据返回,通知组件数据加载完成
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
|
this.editloading = false
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
}, 500)
|
}, 500)
|
||||||
|
@ -588,8 +590,6 @@ export default {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
this.dialogType = 'editUser'
|
this.dialogType = 'editUser'
|
||||||
this.pd = JSON.parse(JSON.stringify(row))
|
this.pd = JSON.parse(JSON.stringify(row))
|
||||||
this.dialogFormEdit = true
|
|
||||||
await this.$nextTick()
|
|
||||||
const areaRefID = []
|
const areaRefID = []
|
||||||
if (this.pd.PROVINCE) {
|
if (this.pd.PROVINCE) {
|
||||||
areaRefID.push(this.pd.PROVINCE)
|
areaRefID.push(this.pd.PROVINCE)
|
||||||
|
@ -609,14 +609,6 @@ export default {
|
||||||
refDeptLevelVal.id = this.pd.deptLevenlID
|
refDeptLevelVal.id = this.pd.deptLevenlID
|
||||||
const deptRefsValue = {}
|
const deptRefsValue = {}
|
||||||
deptRefsValue.id = this.pd.DEPARTMENT_ID
|
deptRefsValue.id = this.pd.DEPARTMENT_ID
|
||||||
// this.$nextTick(() => { // 此处使用这个可以等节点渲染后再获取节点
|
|
||||||
// if (this.$refs.refFromDeptTypeID) {
|
|
||||||
// this.$refs.refFromDeptTypeID.handleNodeClick(refDeptLevelVal)
|
|
||||||
// }
|
|
||||||
// if (this.$refs.deptTree) {
|
|
||||||
// this.$refs.deptTree.handleNodeClick(deptRefsValue)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
var arrString = []
|
var arrString = []
|
||||||
if (this.pd.ROLE_ID != null && this.pd.ROLE_ID != '') {
|
if (this.pd.ROLE_ID != null && this.pd.ROLE_ID != '') {
|
||||||
arrString.push(this.pd.ROLE_ID)
|
arrString.push(this.pd.ROLE_ID)
|
||||||
|
@ -631,17 +623,9 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.pd.ROLE_ID = arrString
|
this.pd.ROLE_ID = arrString
|
||||||
// var roleIds = []
|
this.dialogFormEdit = true
|
||||||
// if (this.pd.ROLE_ID) {
|
await this.$nextTick()
|
||||||
// roleIds.push(this.pd.ROLE_ID)
|
|
||||||
// if (this.pd.ROLE_IDS) {
|
|
||||||
// var roleIDS = this.pd.ROLE_IDS.split(',')
|
|
||||||
// roleIDS.forEach((item) => {
|
|
||||||
// roleIds.push(item)
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// this.pd.ROLE_ID = roleIds
|
|
||||||
},
|
},
|
||||||
handleEditStatus(row, type) {
|
handleEditStatus(row, type) {
|
||||||
const typeName = type == '1' ? '禁用' : '启用'
|
const typeName = type == '1' ? '禁用' : '启用'
|
||||||
|
|
Loading…
Reference in New Issue