Commit a138df5c by Jings

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

parents 85b9981a e9cfa108
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: Drama * @Author: Drama
* @Date: 2022-09-14 11:09:43 * @Date: 2022-09-14 11:09:43
* @LastEditors: Drama * @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 * @FilePath: /haoban-3/src/views/enterprise/guide-setting-new.vue
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="" prop="" class=""> <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-item>
</el-form> </el-form>
</div> </div>
...@@ -156,17 +156,46 @@ export default { ...@@ -156,17 +156,46 @@ export default {
if (item.menuType == 0) { if (item.menuType == 0) {
item.parentCode = 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' })); 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 => { result.forEach(item => {
item.fold = false; item.fold = false;
item.menuBOList.forEach(el => { item.childList = item.menuBOList; // 构造childList
el.menuBOList = el.menuBOList ? el.menuBOList : []; item.rightType = '0';
if (el.menuBOList.length > 0) {
el.foldBool = 1;
}
});
item.rightId = item.menuCode; 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';
});
}
});
}
}); });
this['treeData_' + clerkType] = deepClone(result); this['treeData_' + clerkType] = deepClone(result);
if (clerkType == 0) { 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