74e34e3e by 杨威

新增多个路由

1 parent 749b1e03
......@@ -27,6 +27,30 @@ const constantRoutes = [
name: '首页',
code: '0-1',
component: () => import('@/views/panel/index')
},
{
path: '/create',
name: '新建',
code: '0-2',
component: () => import('@/views/panel/create/index')
},
{
path: '/modify',
name: '更正',
code: '0-3',
component: () => import('@/views/panel/modify/index')
},
{
path: '/change',
name: '变更',
code: '0-4',
component: () => import('@/views/panel/change/index')
},
{
path: '/search',
name: '综合查询',
code: '0-5',
component: () => import('@/views/panel/search/index')
}
]
}
......
......@@ -31,6 +31,7 @@ const mutations = {
},
// 初始化
INIT_TABS(state) {
debugger
state.openTab = [];
state.openTab[0] = { route: "/panel", name: "首页" }
},
......
......@@ -63,20 +63,21 @@ export default {
defaultActive: "",
headTop: [
{
select: true,
},
{
path:"/create",
select: false,
},
{
path:"/modify",
select: false,
},
{
path:"/change",
select: false,
},
{
path:"/search",
select: false,
},
}
],
// 上导航选中id
indId: undefined,
......@@ -178,18 +179,18 @@ export default {
{
name: "新建",
icon: "fa fa-address-card-o",
path: "/officialAccount_panel",
path: "/create",
},
{ name: "更正", icon: "fa fa-address-card-o", path: "/applets_panel" },
{ name: "更正", icon: "fa fa-address-card-o", path: "/modify" },
{
name: "变更",
icon: "fa fa-address-card-o",
path: "/appointment_panel",
path: "/change",
},
{
name: "综合查询",
icon: "fa fa-address-card-o",
path: "/system_panel",
path: "/search",
},
];
this.navigationList = list;
......@@ -208,11 +209,10 @@ export default {
headTop[index].name = item.name;
headTop[index].icon = item.icon;
});
this.menuSelect(data, selectId);
},
menuSelect(data, selectId) {
this.menuList = data[selectId].children;
},
// menuSelect(data, selectId) {
// this.menuList = data[selectId].children;
// },
handleOpen(key, keyPath) {
console.log(key, keyPath);
},
......@@ -231,12 +231,12 @@ export default {
},
selectTopItems(ind) {
this.indId = ind;
this.menuSelect(this.navigationList, ind);
this.$store.dispatch("setTabs/init_tabs");
this.$store.dispatch("setTabs/set_active_index", "/panel");
this.$router.push("/panel");
// this.menuSelect(this.navigationList, ind);
// this.$store.dispatch("setTabs/init_tabs");
// this.$store.dispatch("setTabs/set_active_index", "/panel");
this.$router.push(this.headTop[ind].path);
this.navSelect(ind);
util.cookies.set("indId", ind);
// util.cookies.set("indId", ind);
},
// 上导航选中id
navSelect(id) {
......
<template>
<div class=""></div>
</template>
<script>
export default {
name:"",
components:{},
props:{},
data(){
return {
}
},
created(){},
mounted(){},
methods:{},
computed: {},
watch: {},
}
</script>
<style scoped lang="less">
</style>
\ No newline at end of file
<template>
<div class=""></div>
</template>
<script>
export default {
name:"",
components:{},
props:{},
data(){
return {
}
},
created(){},
mounted(){},
methods:{},
computed: {},
watch: {},
}
</script>
<style scoped lang="less">
</style>
\ No newline at end of file
<template>
<div class=""></div>
</template>
<script>
export default {
name:"",
components:{},
props:{},
data(){
return {
}
},
created(){},
mounted(){},
methods:{},
computed: {},
watch: {},
}
</script>
<style scoped lang="less">
</style>
\ No newline at end of file
<template>
<div class=""></div>
</template>
<script>
export default {
name:"",
components:{},
props:{},
data(){
return {
}
},
created(){},
mounted(){},
methods:{},
computed: {},
watch: {},
}
</script>
<style scoped lang="less">
</style>
\ No newline at end of file