Commit fffdfaba authored by 夏敏伟's avatar 夏敏伟

隐藏模块名称

parent 5f4181e7
...@@ -57,7 +57,8 @@ function generateHomeRoute(list) { ...@@ -57,7 +57,8 @@ function generateHomeRoute(list) {
name: menu1[i].name, name: menu1[i].name,
component: loadView(menu1[i].url, menu1[i].url), component: loadView(menu1[i].url, menu1[i].url),
children: [], children: [],
meta: menu1[i] meta: menu1[i],
description:menu1[i].description
}); });
//过滤二级目录 //过滤二级目录
...@@ -68,7 +69,8 @@ function generateHomeRoute(list) { ...@@ -68,7 +69,8 @@ function generateHomeRoute(list) {
path: '/' + element.url, path: '/' + element.url,
name: element.name, name: element.name,
component: loadView(menu1[i].url, element.url), component: loadView(menu1[i].url, element.url),
meta: element meta: element,
description:element.description
}); });
}); });
if (route2.length) {//一级目录有子菜单,此目录才会加入路由 if (route2.length) {//一级目录有子菜单,此目录才会加入路由
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<div :class="['module-info', isSelected == item.id ? ('selectedModule-left' + index) : '', 'left-div-' + index]" <div :class="['module-info', isSelected == item.id ? ('selectedModule-left' + index) : '', 'left-div-' + index]"
@click="choiceModule(item.id)"> @click="choiceModule(item.id)">
<div class="info-description"> <div class="info-description">
<div v-text="item.title"></div> <div v-text="item.name"></div>
<div v-text="item.eg"></div> <div v-text="item.description"></div>
</div> </div>
</div> </div>
<div style="position: absolute;top:50%;right: 3.1%;" :id="'left' + index"></div> <div style="position: absolute;top:50%;right: 3.1%;" :id="'left' + index"></div>
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<div :class="['module-info', isSelected == item.id ? ('selectedModule-right' + index) : '', 'right-div-' + index]" <div :class="['module-info', isSelected == item.id ? ('selectedModule-right' + index) : '', 'right-div-' + index]"
@click="choiceModule(item.id)"> @click="choiceModule(item.id)">
<div class="info-description"> <div class="info-description">
<div v-text="item.title"></div> <div v-text="item.name"></div>
<div v-text="item.eg"></div> <div v-text="item.description"></div>
</div> </div>
</div> </div>
<div style="position: absolute;top:50%;left: 3.1%;" :id="'right' + index"></div> <div style="position: absolute;top:50%;left: 3.1%;" :id="'right' + index"></div>
...@@ -59,14 +59,14 @@ export default { ...@@ -59,14 +59,14 @@ export default {
isSelected: 0, isSelected: 0,
modules: { modules: {
leftModule: [ leftModule: [
{ id: 1, title: '目标对象库', eg: 'Target Object Library' }, { id: 1, name: '目标对象库', description: 'Target Object Library' },
{ id: 2, title: '战法策略库', eg: 'Method Strategy Library' }, { id: 2, name: '战法策略库', description: 'Method Strategy Library' },
{ id: 3, title: '信息制品库', eg: 'Infomation product Library' }, { id: 3, name: '信息制品库', description: 'Infomation product Library' },
], ],
rightModule: [ rightModule: [
{ id: 4, title: '导调控制模块', eg: 'Pilot Control Module' }, { id: 4, name: '导调控制模块', description: 'Pilot Control Module' },
{ id: 5, title: '学习训练模块', eg: 'Learning And Training Module' }, { id: 5, name: '学习训练模块', description: 'Learning And Training Module' },
{ id: 6, title: '新技术实验模块', eg: 'New Technology Experiment Module' }, { id: 6, name: '新技术实验模块', description: 'New Technology Experiment Module' },
] ]
}, },
line1: null, line1: null,
...@@ -161,6 +161,34 @@ export default { ...@@ -161,6 +161,34 @@ export default {
this.system_name += item.name; this.system_name += item.name;
}); });
}) })
let arr = this.$store.state.navList[0].children.filter((e) => e.path == '/sjgl');
this.$store.state.navList[0].children.forEach((item) => {
if (item.children.length > 0) {
item.children.forEach((items) => {
if (arr.length > 0) {
items.meta.gly = true
} else {
items.meta.gly = false
}
items.meta.type_name = "_" + item.name;
})
}
});
this.manager_module = this.$store.state.navList[0].children.filter(
(e) => e.meta.type == "1"
);
this.modules.leftModule = this.manager_module.slice(0, 3);
this.modules.rightModule = this.manager_module.slice(3, 6);
console.log(this.modules);
this.$store.commit("homeModule", this.manager_module);
this.visualizingIndex = this.manager_module.length;
this.manager_module_backstage = this.$store.state.navList[0].children.filter(
(e) => e.meta.type == "0"
);
this.manager_module_search_qz = this.$store.state.navList[0].children.filter(
(e) => e.meta.type == "3"
);
} }
} }
</script> </script>
......
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