Commit 6f1db5ff authored by 张伯涛's avatar 张伯涛

用户模块bug修改

parent e1fed686
......@@ -41,12 +41,16 @@ const { createMessage } = useMessage();
UserDetailApi(rowId.value).then(res => {
const form = res.data
// 数据处理反显用户角色
const roleData = res.data.roleIds.split(',')
form.roleList = []
roleData.forEach(item => {
const id = Number(item)
form.roleList.push(id)
})
if(res.data.roleIds) {
const roleData = res.data.roleIds.split(',')
form.roleList = []
roleData.forEach(item => {
const id = Number(item)
form.roleList.push(id)
})
}else {
form.roleList = []
}
// 塞值
setFieldsValue({
...form,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment