diff --git a/src/components/crud/index.vue b/src/components/crud/index.vue deleted file mode 100644 index f541256c..00000000 --- a/src/components/crud/index.vue +++ /dev/null @@ -1,296 +0,0 @@ - - - - diff --git a/src/components/datashow/boxData.vue b/src/components/datashow/boxData.vue deleted file mode 100644 index a8fc6279..00000000 --- a/src/components/datashow/boxData.vue +++ /dev/null @@ -1,103 +0,0 @@ - - - - - diff --git a/src/components/datashow/cardData.vue b/src/components/datashow/cardData.vue deleted file mode 100644 index 62b941dc..00000000 --- a/src/components/datashow/cardData.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - - - diff --git a/src/components/datashow/easyData.vue b/src/components/datashow/easyData.vue deleted file mode 100644 index f297fb90..00000000 --- a/src/components/datashow/easyData.vue +++ /dev/null @@ -1,77 +0,0 @@ - - - - - diff --git a/src/components/errorPage/403.vue b/src/components/error-page/403.vue similarity index 100% rename from src/components/errorPage/403.vue rename to src/components/error-page/403.vue diff --git a/src/components/errorPage/404.vue b/src/components/error-page/404.vue similarity index 100% rename from src/components/errorPage/404.vue rename to src/components/error-page/404.vue diff --git a/src/components/errorPage/500.vue b/src/components/error-page/500.vue similarity index 100% rename from src/components/errorPage/500.vue rename to src/components/error-page/500.vue diff --git a/src/components/form/index.vue b/src/components/form/index.vue deleted file mode 100644 index 09706478..00000000 --- a/src/components/form/index.vue +++ /dev/null @@ -1,125 +0,0 @@ - - - - - diff --git a/src/components/iframe/iframe.vue b/src/components/iframe/main.vue similarity index 98% rename from src/components/iframe/iframe.vue rename to src/components/iframe/main.vue index 75d2eaf8..f63a6a15 100644 --- a/src/components/iframe/iframe.vue +++ b/src/components/iframe/main.vue @@ -8,7 +8,7 @@ import { mapState, mapGetters } from "vuex"; import NProgress from "nprogress"; // progress bar import "nprogress/nprogress.css"; // progress bar style export default { - name: "myiframe", + name: "AvueIframe", data() { return { urlPath: this.getUrlPath() //iframe src 路径 diff --git a/src/page/index/index.vue b/src/page/index/index.vue index 4f60acd8..89a6de57 100644 --- a/src/page/index/index.vue +++ b/src/page/index/index.vue @@ -5,7 +5,10 @@
- + + + +
diff --git a/src/router/_router.js b/src/router/_router.js new file mode 100644 index 00000000..185689df --- /dev/null +++ b/src/router/_router.js @@ -0,0 +1,48 @@ +const _import = require('./_import'); +import Layout from '@/page/index/' +export default [ { + path: '/wel', + component: Layout, + redirect: '/wel/index', + children: [ + { + path: 'index', + name: '首页', + component: _import('wel') + } + ] + }, + { + path: '/', + name: '主页', + redirect: '/wel' + }, { + path: '/info', + component: Layout, + redirect: '/info/index', + children: [ + { + path: 'index', + name: '修改信息', + component: _import('admin/user/info', 'views') + } + ] + },{ + menuId: 1, + path: '/admin', + component: Layout, + name: '系统管理', + hidden: false, + redirect: '/admin/user', + meta: { + title: '系统管理', + }, + children: [ + { menuId: 2, path: 'user', component: _import('admin/user/index', 'views'), name: '用户管理', meta: { title: '用户管理' } }, + { menuId: 3, path: 'menu', component: _import('admin/menu/index', 'views'), name: '菜单管理', meta: { title: '菜单管理' } }, + { menuId: 4, path: 'role', component: _import('admin/role/index', 'views'), name: '角色管理', meta: { title: '角色管理' } }, + { menuId: 5, path: 'dept', component: _import('admin/dept/index', 'views'), name: '部门管理', meta: { title: '部门管理',keepAlive:true } }, + { menuId: 6, path: 'dict', component: _import('admin/dict/index', 'views'), name: '字典管理', meta: { title: '字典管理' } }, + { menuId: 7, path: 'log', component: _import('admin/log/index', 'views'), name: '日志管理', meta: { title: '日志管理' } } + ] +}] \ No newline at end of file diff --git a/src/router/router.js b/src/router/router.js index 85024f87..020b4ff0 100644 --- a/src/router/router.js +++ b/src/router/router.js @@ -4,13 +4,8 @@ import { routerMode } from '@/config/env'; import store from '@/store' import { getStore, getSessionStore, vaildUtil } from '@/util/yun' - - -import Myiframe from '@/components/iframe/iframe.vue' import Layout from '@/page/index/' -import errorPage404 from '@/components/errorPage/404.vue'; -import errorPage403 from '@/components/errorPage/403.vue'; -import errorPage500 from '@/components/errorPage/500.vue'; +import viewRouter from './_router' const _import = require('./_import'); Vue.use(VueRouter); export default new VueRouter({ @@ -34,25 +29,9 @@ export const asyncRouterMap = [ { path: '/login', name: '登录页', component: _import('login/index') }, { path: '/lock', name: '锁屏页', component: _import('lock/index') }, { path: '*', redirect: '/404', hidden: true }, - { path: '/404', component: errorPage404, name: '404' }, - { path: '/403', component: errorPage403, name: '403' }, - { path: '/500', component: errorPage500, name: '500' }, - { - path: '/', - name: '主页', - redirect: '/wel' - }, { - path: '/info', - component: Layout, - redirect: '/info/index', - children: [ - { - path: 'index', - name: '修改信息', - component: _import('admin/user/info', 'views') - } - ] - }, + { path: '/404', component: _import('error-page/404','components'), name: '404' }, + { path: '/403', component: _import('error-page/403','components'), name: '403' }, + { path: '/500', component: _import('error-page/500','components'), name: '500' }, { path: '/myiframe', component: Layout, @@ -61,39 +40,10 @@ export const asyncRouterMap = [ { path: ":routerPath", name: 'iframe', - component: Myiframe, + component: _import('iframe/main','components'), props: true } ] - }, { - path: '/wel', - component: Layout, - redirect: '/wel/index', - children: [ - { - path: 'index', - name: '首页', - component: _import('wel') - } - ] - }, { - menuId: 1, - path: '/admin', - component: Layout, - name: '系统管理', - hidden: false, - redirect: '/admin/user', - meta: { - title: '系统管理', - }, - children: [ - { menuId: 2, path: 'user', component: _import('admin/user/index', 'views'), name: '用户管理', meta: { title: '用户管理' } }, - { menuId: 3, path: 'menu', component: _import('admin/menu/index', 'views'), name: '菜单管理', meta: { title: '菜单管理' } }, - { menuId: 4, path: 'role', component: _import('admin/role/index', 'views'), name: '角色管理', meta: { title: '角色管理' } }, - { menuId: 5, path: 'dept', component: _import('admin/dept/index', 'views'), name: '部门管理', meta: { title: '部门管理' } }, - { menuId: 6, path: 'dict', component: _import('admin/dict/index', 'views'), name: '字典管理', meta: { title: '字典管理' } }, - { menuId: 7, path: 'log', component: _import('admin/log/index', 'views'), name: '日志管理', meta: { title: '日志管理' } } - ] - }, -] + } +].concat(viewRouter) diff --git a/src/store/modules/tags.js b/src/store/modules/tags.js index fd143f7b..d1b31b16 100644 --- a/src/store/modules/tags.js +++ b/src/store/modules/tags.js @@ -34,7 +34,7 @@ const navs = { mutations: { ADD_TAG: (state, action) => { state.tag = action; - setStore({ name: 'tag', content: state.tag }) + setStore({ name: 'tag', content: state.tag,type:'session' }) if (state.tagList.some(a => a.value === action.value)) return state.tagList.push({ label: action.label, @@ -42,17 +42,17 @@ const navs = { query: action.query, }) state.tagList = setFistTag(state.tagList); - setStore({ name: 'tagList', content: state.tagList }) + setStore({ name: 'tagList', content: state.tagList,type:'session' }) }, SET_TAG_CURRENT: (state, tagCurrent) => { state.tagCurrent = tagCurrent; - setStore({ name: 'tagCurrent', content: state.tagCurrent }) + setStore({ name: 'tagCurrent', content: state.tagCurrent,type:'session' }) }, SET_TAG: (state, value) => { state.tagList.forEach((ele, num) => { if (ele.value === value) { state.tag = state.tagList[num]; - setStore({ name: 'tag', content: state.tag }) + setStore({ name: 'tag', content: state.tag,type:'session' }) } }); }, @@ -69,8 +69,8 @@ const navs = { state.tagList = state.tagList.slice(num, num + 1) state.tag = state.tagList[0]; state.tagList[0].close = false; - setStore({ name: 'tag', content: state.tag }) - setStore({ name: 'tagList', content: state.tagList }) + setStore({ name: 'tag', content: state.tag,type:'session' }) + setStore({ name: 'tagList', content: state.tagList,type:'session' }) } }) @@ -80,8 +80,8 @@ const navs = { if (ele.value === action.value) { state.tagList.splice(num, 1) state.tagList = setFistTag(state.tagList); - setStore({ name: 'tag', content: state.tag }) - setStore({ name: 'tagList', content: state.tagList }) + setStore({ name: 'tag', content: state.tag,type:'session' }) + setStore({ name: 'tagList', content: state.tagList,type:'session' }) } }) },