修改头部菜单显示逻辑
parent
edf113de5a
commit
c1b8eded3e
|
@ -143,6 +143,7 @@ export default {
|
|||
isFullScreen: false,
|
||||
showMenus: [],
|
||||
showMenusNavIds: [],
|
||||
notDetail:false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -175,7 +176,9 @@ export default {
|
|||
const prjId = urlParams.get("prjId");
|
||||
localStorage.setItem("selProj", prjId);
|
||||
setTimeout(() => {
|
||||
if(this.notDetail == false){
|
||||
location.hash = "#/detail";
|
||||
}
|
||||
}, 800);
|
||||
}
|
||||
window.xapp = this;
|
||||
|
@ -216,7 +219,6 @@ export default {
|
|||
},
|
||||
loadMenu() {
|
||||
this.$api.project.bigScreenGetMenuByProjectId(this.selProjectId).then((d) => {
|
||||
|
||||
let objs = d.data || [];
|
||||
if (objs.length == 0) {
|
||||
objs = [
|
||||
|
@ -232,6 +234,18 @@ export default {
|
|||
}
|
||||
this.showMenus = objs;
|
||||
this.showMenusNavIds = this.showMenus.map((d) => d.navId);
|
||||
let tmps = this.showMenusNavIds.filter((item) => [1, 2, 3, 4, 5, 6, 7].includes(+item));
|
||||
if (!tmps.includes(2)) {
|
||||
let nav = tmps[0];
|
||||
nav = tmps[0];
|
||||
tmps = this.showMenusNavIds.filter((item) => String(item).startsWith(nav+""));
|
||||
if (tmps.length > 1) {
|
||||
nav= tmps[1];
|
||||
}
|
||||
this.$store.dispatch("ChangeNav", nav);
|
||||
this.doNav(+nav);
|
||||
this.notDetail=true;
|
||||
}
|
||||
console.log(this.showMenusNavIds);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -746,7 +746,7 @@ export default {
|
|||
margin: 10px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
color: #909399;
|
||||
color: #edffff85;
|
||||
}
|
||||
|
||||
@media (max-width: 1920px) {
|
||||
|
|
Loading…
Reference in New Issue