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) {
......
......@@ -3,7 +3,7 @@
<img class="login-logo" src="./images/logo-login.svg" />
<div class="login-con">
<div class="login-title">用户登录</div>
<div class="login-user" :class="{'select-border':change.user}">
<div class="login-user" :class="{ 'select-border': change.user }">
<img class="user-icon" src="./images/user.svg" />
<div class="line-mid"></div>
<input
......@@ -16,7 +16,7 @@
/>
<span class="warning" v-show="warning.user">账号不能为空</span>
</div>
<div class="login-user user-mt" :class="{'select-border':change.pass}">
<div class="login-user user-mt" :class="{ 'select-border': change.pass }">
<img class="user-icon" src="./images/password.svg" />
<div class="line-mid"></div>
<input
......@@ -37,12 +37,26 @@
@focus="reduceBorder('pass')"
@blur="addBorder('pass')"
/>
<img class="password-eye" src="./images/open.svg" @click="selectEyes" v-show="selectEye" />
<img class="password-eye" src="./images/close.svg" @click="selectEyes" v-show="!selectEye" />
<img
class="password-eye"
src="./images/open.svg"
@click="selectEyes"
v-show="selectEye"
/>
<img
class="password-eye"
src="./images/close.svg"
@click="selectEyes"
v-show="!selectEye"
/>
<span class="warning" v-show="warning.pass">密码不能为空</span>
</div>
<div class="login-remake">
<i class="icon iconfont iconfuxuan1 icon-style" v-show="!selectIcon" @click="selectRemeber"></i>
<i
class="icon iconfont iconfuxuan1 icon-style"
v-show="!selectIcon"
@click="selectRemeber"
></i>
<i
class="icon iconfont iconfuxuan-xuanzhong icon-select"
v-show="selectIcon"
......@@ -54,7 +68,9 @@
</div>
<div class="reserved-con">
<div class="reserved-words">版权所有:2020©某某市自然资源和规划</div>
<div class="reserved-words line-two">技术支持:西安市自然资源规划局信息中心</div>
<div class="reserved-words line-two">
技术支持:西安市自然资源规划局信息中心
</div>
</div>
</div>
</template>
......@@ -112,7 +128,8 @@ export default {
// this.$router.push('/home')
// }).catch(() => {
// })
this.$store.dispatch("permission_routes/getMenus");
// this.$store.dispatch("permission_routes/getMenus");
this.$router.push("/panel");
} else if (!this.userInfo.username || !this.userInfo.password) {
this.$message({
duration: 2000,
......@@ -309,4 +326,3 @@ export default {
}
}
</style>
......
<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