Commit a138df5c by Jings

Merge remote-tracking branch 'origin/feature/九月迭代' into dev

parents 85b9981a e9cfa108
......@@ -4,7 +4,7 @@
* @Author: Drama
* @Date: 2022-09-14 11:09:43
* @LastEditors: Drama
* @LastEditTime: 2022-10-10 09:45:04
* @LastEditTime: 2022-10-13 12:29:28
* @FilePath: /haoban-3/src/views/enterprise/guide-setting-new.vue
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
......@@ -24,7 +24,7 @@
</div>
</el-form-item>
<el-form-item label="" prop="" class="">
<vue-gic-auth-tree class="auth-tree" default-expand-all :data="treeData" show-checkbox ref="tree" node-key="menuCode" :default-checked-keys="withoutParents" :props="defaultProps" showButtonFlag></vue-gic-auth-tree>
<vue-gic-auth-tree class="auth-tree" openAuthRelated default-expand-all :data="treeData" show-checkbox ref="tree" node-key="menuCode" :default-checked-keys="withoutParents" :props="defaultProps"></vue-gic-auth-tree>
</el-form-item>
</el-form>
</div>
......@@ -156,17 +156,46 @@ export default {
if (item.menuType == 0) {
item.parentCode = 0;
}
if (item.menuBOList.length) {
item.menuBOList = item.menuBOList.filter(data => data.menuType != 2);
item.menuBOList.forEach(v => {
if (v.menuBOList.length) {
v.menuBOList = v.menuBOList.filter(f => f.menuType != 2);
}
});
}
});
let result = deepClone(arrToTree(arr, 0, { idName: 'menuCode', parentIdName: 'parentCode', childName: 'menuBOList' }));
// result.forEach(item => {
// item.fold = false;
// item.menuBOList.forEach(el => {
// el.menuBOList = el.menuBOList ? el.menuBOList : [];
// if (el.menuBOList.length > 0) {
// el.foldBool = 1;
// }
// });
// item.rightId = item.menuCode;
// });
result.forEach(item => {
item.fold = false;
item.childList = item.menuBOList; // 构造childList
item.rightType = '0';
item.rightId = item.menuCode;
if (item.menuBOList.length) {
// 二级
item.menuBOList.forEach(el => {
el.menuBOList = el.menuBOList ? el.menuBOList : [];
el.childList = el.menuBOList;
el.rightType = el.menuType == 3 ? '0' : '5';
if (el.menuBOList.length > 0) {
el.foldBool = 1;
el.menuBOList.forEach(item_3 => {
item_3.childList = item_3.menuBOList;
item_3.rightType = item_3.menuType == 1 ? '5' : '0';
});
}
});
item.rightId = item.menuCode;
}
});
this['treeData_' + clerkType] = deepClone(result);
if (clerkType == 0) {
......
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