Commit f3aa52d0 by yuhao

修改菜单bug

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