Commit 3d4a8bd2 by caoyanzhi

编辑角色

parent 4bfcb8bc
......@@ -25,8 +25,8 @@
</el-radio-group>
<menu-tree
style="margin-top: 12px"
:menu-list="tabList[activeType - 1].menuList"
:checked-id="tabList[activeType - 1].checkedId"
:menu-list="getActiveMenuList()"
:checked-id="getActiveMenuChecked()"
@change="onCheckedChange"></menu-tree>
</el-form-item>
<el-form-item style="margin-top: 50px">
......@@ -121,6 +121,10 @@ export default {
return menu.concat(result);
}
this.tabList.forEach(el => {
// el.menuList = this.flatDataToTree(setMenu(el.label, 0, 0));
// el.menuList.forEach(item => {
// this.$set(el.checkedId, item.menuId, []);
// });
// appType 1好办后台2应用后台3好办小程序4小程序应用
prom.push(menuList(Object.assign({}, params, { appType: el.appType })).then(res => {
el.menuList = res.result || [];
......@@ -169,6 +173,14 @@ export default {
return el.parentId == 0;
})
},
getActiveMenuList() {
const result = this.tabList.filter(el => el.appType == this.activeType);
return result[0].menuList;
},
getActiveMenuChecked() {
const result = this.tabList.filter(el => el.appType == this.activeType);
return result[0].checkedId;
},
// 保存选中的子节点id
// 将选中的子节点的id存在tabList对应元素的checkedId中
// 同时更新roleData中menuIds的数据
......
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