Commit 23f1289d by hanjixin

路由表搭建

parent 0fb94926
<template>
<div :class="classObj" class="app-wrapper">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" />
<div :class="{hasTagsView:needTagsView}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<navbar />
<tags-view v-if="needTagsView" />
<!-- <tags-view v-if="needTagsView" /> -->
</div>
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" />
<div :class="{hasTagsView:needTagsView}" class="main-container" :style="fixedHeader ? 'padding-top: 50px;' : ''">
<app-main />
<!-- <right-panel v-if="showSettings">
<settings />
......@@ -16,7 +16,7 @@
</template>
<script>
import { AppMain, Navbar, Sidebar, TagsView } from './components'
import { AppMain, Navbar, Sidebar } from './components'
import ResizeMixin from './mixin/ResizeHandler'
import { mapState } from 'vuex'
......@@ -26,8 +26,7 @@ export default {
AppMain,
Navbar,
// Settings,
Sidebar,
TagsView
Sidebar
},
mixins: [ResizeMixin],
computed: {
......@@ -84,9 +83,10 @@ export default {
.fixed-header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$sideBarWidth});
// width: calc(100% - #{$sideBarWidth});
transition: width 0.28s;
}
......
......@@ -8,10 +8,11 @@ import Layout from '@/layout'
/* Router Modules */
import tableRouter from './modules/table'
import DeviceRouter from './modules/device'
import TempaltesRouter from './modules/templates'
import CommonRouter from './modules/common'
// import tableRouter from './modules/table'
// import DeviceRouter from './modules/device'
// import TempaltesRouter from './modules/templates'
// import CommonRouter from './modules/common'
import ContentRouter from './modules/contents'
/**
* Note: sub-menu only appear when route children.length >= 1
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
......@@ -73,28 +74,30 @@ export const constantRoutes = [
]
},
{
path: '/documentation',
path: '/profile',
component: Layout,
redirect: '/profile/index',
hidden: false,
children: [
{
path: 'index',
component: () => import('@/views/documentation/index'),
name: 'Documentation',
meta: { title: 'Documentation', icon: 'documentation', affix: false }
component: () => import('@/views/profile/index'),
name: 'Profile',
meta: { title: '个人中心', icon: 'user', noCache: true }
}
]
},
{
path: '/profile',
path: '/setting',
component: Layout,
redirect: '/profile/index',
hidden: true,
redirect: '/setting/index',
hidden: false,
children: [
{
path: 'index',
component: () => import('@/views/profile/index'),
name: 'Profile',
meta: { title: 'Profile', icon: 'user', noCache: true }
meta: { title: '设置', icon: 'user', noCache: true }
}
]
}
......@@ -119,10 +122,11 @@ export const asyncRoutes = [
},
/** when your routing map is too long, you can split it into small modules **/
DeviceRouter,
TempaltesRouter,
tableRouter,
CommonRouter,
// DeviceRouter,
// TempaltesRouter,
// tableRouter,
// CommonRouter,
ContentRouter,
// {
// path: 'external-link',
// component: Layout,
......
/** When your routing table is too long, you can split it into small modules **/
import Layout from '@/layout'
const contentsRouter = {
path: '/contents',
component: Layout,
redirect: '/contents/list',
name: 'contents',
meta: {
title: '内容管理',
icon: 'table'
},
children: [
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '系统标题' }
},
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '事件监控' }
},
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '预警介绍' },
children: [
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '国家预警发布系统' }
},
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '大事记' }
},
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '预警发布服务效益' }
}
]
},
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '预警中心' },
children: [
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '联络人' }
},
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '预警中心建设' }
}
]
},
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '信息中心' },
children: [
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '中心介绍' }
},
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '信息服务应用效益' }
},
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '宣传视频' }
},
{
path: 'type',
component: () => import('@/views/template/template-type'),
name: 'TemplateType',
meta: { title: '大事记' }
}
]
},
{
path: 'type/detail',
component: () => import('@/views/template/template-type-detail'),
name: 'TemplateTypeDeatil',
hidden: true,
meta: { title: '模板类型详情', hidden: true }
}
]
}
export default contentsRouter
module.exports = {
title: 'Vmatrix Admin',
title: 'Admin',
/**
* @type {boolean} true | false
......@@ -11,13 +11,13 @@ module.exports = {
* @type {boolean} true | false
* @description Whether need tagsView
*/
tagsView: true,
tagsView: false,
/**
* @type {boolean} true | false
* @description Whether fix the header
*/
fixedHeader: false,
fixedHeader: true,
/**
* @type {boolean} true | false
......
......@@ -14,7 +14,7 @@
height: 100%;
position: fixed;
font-size: 0px;
top: 0;
top: 51px;
bottom: 0;
left: 0;
z-index: 1001;
......
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 sign in to comment