框架修改

dev
bibi 3 years ago
parent afe1f331fd
commit e015cae8e5

@ -20,17 +20,30 @@ import basic from "./basic" // 基础功能
// import payment from "./payment" // 缴费管理 // import payment from "./payment" // 缴费管理
// import smartMall from "./smartMall" // 智慧商城 // import smartMall from "./smartMall" // 智慧商城
// import operation from "./operation" // 运营管理 // import operation from "./operation" // 运营管理
// import set from "./set" // 设置 import setting from "./setting" // 设置
const router = [ const router = [
{ {
path: "/", path: "/",
name: "Layout", name: "basic",
title: "外框", title: "基础",
component: Layout, component: Layout,
redirect: '/Console', redirect: '/Console',
meta: {title: '首页'}, meta: {title: '首页'},
children: [...basic] children: [
...basic,
]
},
{
path: "/setting",
name: "setting",
title: "设置",
component: Layout,
redirect: '/basicSet',
meta: {title: '设置'},
children: [
...setting,
]
}, },
{ {
path: "/login", path: "/login",

@ -1,9 +0,0 @@
/*
* @Author: your name
* @Date: 2021-11-24 14:55:05
* @LastEditTime: 2021-11-24 14:55:06
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /LittleBeeSaas/src/router/set.js
*/
export default []

@ -0,0 +1,11 @@
export default [
{
path: '/basicSet',
name: "basicSet",
title: "基础设置",
hide: false,
icon: 'container',
component: resolve => require(['@/views/Set/basicSet'], resolve),
meta: {title: '基础设置'}
},
]

@ -262,6 +262,7 @@ export default {
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
}, },
onChange(){}
}, },
}; };
</script> </script>

@ -10,7 +10,7 @@
<a-layout id="components-layout-demo-custom-trigger"> <a-layout id="components-layout-demo-custom-trigger">
<a-layout-sider v-model="collapsed" :trigger="null" collapsible> <a-layout-sider v-model="collapsed" :trigger="null" collapsible>
<div class="logo"><img class="m1" src="../../assets/images/logo.png" /><span class="s1" v-if="!collapsed">SaaS</span></div> <div class="logo"><img class="m1" src="../../assets/images/logo.png" /><span class="s1" v-if="!collapsed">SaaS</span></div>
<yMenu :csd="collapsed"></yMenu> <yMenu :csd="collapsed" :num='tagActive'></yMenu>
</a-layout-sider> </a-layout-sider>
<a-layout> <a-layout>
<a-layout-header style="background: #fff; padding: 0; height: 42px"> <a-layout-header style="background: #fff; padding: 0; height: 42px">
@ -50,6 +50,12 @@ export default {
}, },
immediate: true, immediate: true,
}, },
tagActive:{
handler(val) {
sessionStorage.setItem('modal',this.menuTags[val].value)
},
immediate: true,
}
}, },
data() { data() {
return { return {
@ -58,23 +64,23 @@ export default {
menuTags: [ menuTags: [
{ {
label: "基础功能", label: "基础功能",
value: "a" value: "basic"
}, },
{ {
label: "缴费管理", label: "缴费管理",
value: "b" value: "payment"
}, },
{ {
label: "智慧商城", label: "智慧商城",
value: "c" value: "smartMall"
}, },
{ {
label: "运营管理", label: "运营管理",
value: "d" value: "operation"
}, },
{ {
label: "设置", label: "设置",
value: "e" value: "setting"
} }
], ],
}; };

@ -56,7 +56,8 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
indexPath: 0 indexPath: 0
} },
num:Number,
}, },
watch: { watch: {
csd: { csd: {
@ -73,6 +74,13 @@ export default {
}, },
immediate: true, immediate: true,
}, },
// num
num:{
handler() {
this.initMenu()
},
immediate: true,
}
}, },
components: { components: {
@ -105,14 +113,19 @@ export default {
this.$router.push(key) this.$router.push(key)
}, },
initMenu() { initMenu() {
// console.log(this.$router);
// console.log(sessionStorage.getItem('modal'));
let modal= sessionStorage.getItem('modal')
let routes = this.$router.options.routes || []; let routes = this.$router.options.routes || [];
let farr = routes.filter(ele => { let farr = routes.filter(ele => {
return ele.name === 'Layout' return ele.name === modal
}); });
let arr = farr[0].children || []; let arr = farr[0].children || [];
let menus = []; let menus = [];
this.routerToMenu(arr, menus); this.routerToMenu(arr, menus);
this.list = menus; this.list = menus;
let path = farr[0].redirect
this.$router.push({path:path})
}, },
// //
routerToMenu(arr = [], menus) { routerToMenu(arr = [], menus) {
@ -141,7 +154,7 @@ export default {
this.routerToMenu(arr[i].children, obj.children) this.routerToMenu(arr[i].children, obj.children)
} }
} }
// console.log(menus);
} }
} }

@ -2,6 +2,7 @@
<div class="bg"> <div class="bg">
<div class="logo-box"> <div class="logo-box">
<img src="@/assets/images/logo.png" alt="" /> <img src="@/assets/images/logo.png" alt="" />
<span class="title">智慧小区后台管理系统</span>
</div> </div>
<div class="login-box"> <div class="login-box">
<a-row> <a-row>
@ -228,10 +229,14 @@ export default {
line-height: 93px; line-height: 93px;
margin-bottom: 93px; margin-bottom: 93px;
img { img {
width: 61px; width: 51px;
height: 61px; height: 51px;
background: #ffffff; background: #ffffff;
margin-left: 42px; margin-left: 42px;
margin-bottom: 13px;
}
.title{
font-size:28px;color:#333333;font-weight:500;margin-left: 20px;line-height: 93px;
} }
} }
.login-box { .login-box {

@ -0,0 +1,13 @@
<template>
<div>1</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
Loading…
Cancel
Save