Commit 79508eb4 by yuhao

修改菜单bug

parent 2f3536b5
......@@ -386,7 +386,7 @@ export default [
}
},
{
path: "/ydsbsj",
path: "ydsbsj",
name: "ydsbsj",
meta: {
title: '移动运营管理',
......
......@@ -4,16 +4,16 @@
<div class="left">
<i class="iconfont iconzidianmaxuanze"></i><span>运控管理</span>
</div>
<div class="left" @click="toDp" style=" cursor: pointer;">
<div class="left"
@click="toDp"
style=" cursor: pointer;">
<i class="iconfont icondapingzhongduan"></i><span>运控管理门户</span>
</div>
</div>
<div class="content">
<left-menu
:propLeftMenu="propLeftMenu"
@changeSidebarIndex="changeSidebarIndex"
:sidebarItemName="sidebarItemName"
></left-menu>
<left-menu :propLeftMenu="propLeftMenu"
@changeSidebarIndex="changeSidebarIndex"
:sidebarItemName="sidebarItemName"></left-menu>
<div class="rightContent">
<router-view></router-view>
</div>
......@@ -34,7 +34,7 @@ export default {
components: {
leftMenu,
},
data() {
data () {
return {
sidebarItemName: this.$route.name,
headerTitle: rzcxHeaderTitle,
......@@ -43,13 +43,13 @@ export default {
};
},
methods: {
toDp() {
toDp () {
let routeData = this.$router.resolve({
path: "/ykgldpIndex",
});
window.open(routeData.href, "_blank");
},
changeSidebarIndex(index, item) {
changeSidebarIndex (index, item) {
debugger
if (index.indexOf("-") == -1) {
this.sidebarItemName = item[index - 1].id;
......@@ -58,22 +58,24 @@ export default {
});
} else {
//子级的情况有-,如3-1
let arr = index.split("-");
if(arr.length == 2 ){
let arr = index.split("-");
if (arr.length == 2) {
this.sidebarItemName = item[arr[0] - 1].children[arr[1] - 1].id;
this.$router.push({
name: item[arr[0] - 1].children[arr[1] - 1].id,
path: item[arr[0] - 1].children[arr[1] - 1].id,
query: { 'path': item[arr[0] - 1].children[arr[1] - 1].label },
});
}else{
} else {
this.sidebarItemName = item[arr[0] - 1].children[arr[1] - 1].children[arr[2] - 1].id;
this.$router.push({
name: item[arr[0] - 1].children[arr[1] - 1].children[arr[2] - 1].id,
path: item[arr[0] - 1].children[arr[1] - 1].children[arr[2] - 1].id,
query: { 'path': item[arr[0] - 1].children[arr[1] - 1].children[arr[2] - 1].label },
});
}
}
},
},
mounted() {},
mounted () { },
};
</script>
<style scoped lang="scss">
......@@ -90,10 +92,10 @@ export default {
font-family: Source Han Sans CN;
font-weight: bold;
color: #ffffff;
span{
span {
padding-left: 12px;
}
i{
i {
font-size: 20px;
}
}
......
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