+
{{ item.labelName }}
{
if (res.success) {
let all = res.result.moduleList;
- console.log("all", all);
+ console.log("all11", all);
all.forEach((element, index) => {
all[index].operation = false;
res.result.menuList.forEach((element2) => {
@@ -344,7 +344,7 @@ export default {
console.log("all111", all);
// this.list = all;
this.list = all.filter(item => item.plugin != 'contractors' && item.plugin != "programConfig");//承包商模块不需要在后台显示,以此过滤掉该后台模块
-
+ console.log(111111, this.list)
let pathItem = localStorage.getItem('lageToBackend')
if(pathItem.length > 0){
localStorage.removeItem('lageToBackend')
@@ -361,7 +361,6 @@ export default {
this.$router.push(path);
}
-
}
});
} else {
@@ -383,6 +382,20 @@ export default {
});
// this.list = all;
this.list = all.filter(item => item.plugin != 'contractors' && item.plugin != "programConfig");//承包商模块不需要在后台显示,以此过滤掉该后台模块
+ this.list = this.list.filter(item => item.operation).reduce((prev, item) => {
+ const findIndex = prev.findIndex(ele => ele.labelName == item.labelName);
+ if(findIndex > -1){
+ prev.push(item);
+ } else {
+ prev.push({
+ ...item,
+ operationFlag: true
+ })
+ }
+ return prev
+ },[])
+
+ console.log(this.list, 222)
}
});
}