mirror of https://gitee.com/xiaonuobase/snowy
【更新】修复一个角色授权资源界面无法展示数据错误(补充)
parent
32f3f23916
commit
f458156d80
|
@ -256,21 +256,23 @@
|
|||
const convertData = () => {
|
||||
resultDataModel.grantInfoList = []
|
||||
echoDatalist.value.forEach((table) => {
|
||||
table.menu.forEach((item) => {
|
||||
const grantInfo = {
|
||||
menuId: '',
|
||||
buttonInfo: []
|
||||
}
|
||||
if (item.nameCheck) {
|
||||
grantInfo.menuId = item.id
|
||||
item.button.forEach((button) => {
|
||||
if (button.check) {
|
||||
grantInfo.buttonInfo.push(button.id)
|
||||
}
|
||||
})
|
||||
resultDataModel.grantInfoList.push(grantInfo)
|
||||
}
|
||||
})
|
||||
if (table.menu) {
|
||||
table.menu.forEach((item) => {
|
||||
const grantInfo = {
|
||||
menuId: '',
|
||||
buttonInfo: []
|
||||
}
|
||||
if (item.nameCheck) {
|
||||
grantInfo.menuId = item.id
|
||||
item.button.forEach((button) => {
|
||||
if (button.check) {
|
||||
grantInfo.buttonInfo.push(button.id)
|
||||
}
|
||||
})
|
||||
resultDataModel.grantInfoList.push(grantInfo)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
return resultDataModel
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue