diff --git a/src/permission.js b/src/permission.js index 5965c45..dc6b2f8 100644 --- a/src/permission.js +++ b/src/permission.js @@ -26,20 +26,12 @@ // 设置当前子系统为基础资源子系统 const currentSys = { code: 'baseResourse', - id: '1189107859077373285', - ismenu: '0', - levels: 1, - name: '基础资源子系统', - num: 0, - parentId: '0', - resourceType: '02', - url: '/baseResourse' + name: '基础资源子系统' } // 将当前系统信息保存在localStorage中 store.commit('SET_SYSTEM', currentSys) // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { - store.commit('SET_CHANGEFLAG', '0') router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) diff --git a/src/permission.js b/src/permission.js index 5965c45..dc6b2f8 100644 --- a/src/permission.js +++ b/src/permission.js @@ -26,20 +26,12 @@ // 设置当前子系统为基础资源子系统 const currentSys = { code: 'baseResourse', - id: '1189107859077373285', - ismenu: '0', - levels: 1, - name: '基础资源子系统', - num: 0, - parentId: '0', - resourceType: '02', - url: '/baseResourse' + name: '基础资源子系统' } // 将当前系统信息保存在localStorage中 store.commit('SET_SYSTEM', currentSys) // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { - store.commit('SET_CHANGEFLAG', '0') router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..39c295c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -44,21 +44,7 @@ // 404错误页面 { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true }, // 401 错误页面 - { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true }, - // 主页 - { - path: '/', - component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } - }] - } + { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true } ] // 实例化vue的时候直挂载constantRouter export default new Router({ diff --git a/src/permission.js b/src/permission.js index 5965c45..dc6b2f8 100644 --- a/src/permission.js +++ b/src/permission.js @@ -26,20 +26,12 @@ // 设置当前子系统为基础资源子系统 const currentSys = { code: 'baseResourse', - id: '1189107859077373285', - ismenu: '0', - levels: 1, - name: '基础资源子系统', - num: 0, - parentId: '0', - resourceType: '02', - url: '/baseResourse' + name: '基础资源子系统' } // 将当前系统信息保存在localStorage中 store.commit('SET_SYSTEM', currentSys) // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { - store.commit('SET_CHANGEFLAG', '0') router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..39c295c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -44,21 +44,7 @@ // 404错误页面 { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true }, // 401 错误页面 - { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true }, - // 主页 - { - path: '/', - component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } - }] - } + { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true } ] // 实例化vue的时候直挂载constantRouter export default new Router({ diff --git a/src/router/modules/example.js b/src/router/modules/example.js index 9076d50..b5d57bf 100644 --- a/src/router/modules/example.js +++ b/src/router/modules/example.js @@ -1,21 +1,36 @@ /* Layout */ import Layout from '@/layout/Layout' -export const exampleRouters = [{ - path: 'example', - component: Layout, - redirect: '/exampleTable', - name: 'Example', - alwaysShow: true, - meta: { - title: '示例', - icon: 'icon-config' // 图标 +export const exampleRouters = [ + // 主页 + { + path: '/', + component: Layout, + redirect: 'dashboard', + name: 'Dashboard', + // hidden: true, + children: [{ + path: 'dashboard', + name: 'Dashboard', + component: () => import('@/views/dashboard/index'), + meta: { title: '首页', icon: 'dashboard', noCache: true } + }] }, - children: [ - { - path: '/exampleTable', - name: 'ExampleTable', - component: () => import('@/views/example/tableExample'), - meta: { title: '表格示例', icon: '' } - } - ] -}] + { + path: 'example', + component: Layout, + redirect: '/exampleTable', + name: 'Example', + alwaysShow: true, + meta: { + title: '示例', + icon: 'icon-config' // 图标 + }, + children: [ + { + path: '/exampleTable', + name: 'ExampleTable', + component: () => import('@/views/example/tableExample'), + meta: { title: '表格示例', icon: '' } + } + ] + }] diff --git a/src/permission.js b/src/permission.js index 5965c45..dc6b2f8 100644 --- a/src/permission.js +++ b/src/permission.js @@ -26,20 +26,12 @@ // 设置当前子系统为基础资源子系统 const currentSys = { code: 'baseResourse', - id: '1189107859077373285', - ismenu: '0', - levels: 1, - name: '基础资源子系统', - num: 0, - parentId: '0', - resourceType: '02', - url: '/baseResourse' + name: '基础资源子系统' } // 将当前系统信息保存在localStorage中 store.commit('SET_SYSTEM', currentSys) // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { - store.commit('SET_CHANGEFLAG', '0') router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) diff --git a/src/router/index.js b/src/router/index.js index 44cba3b..39c295c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -44,21 +44,7 @@ // 404错误页面 { path: '/404', component: () => import('@/views/errorPage/404'), hidden: true }, // 401 错误页面 - { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true }, - // 主页 - { - path: '/', - component: Layout, - redirect: 'dashboard', - name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - name: 'Dashboard', - component: () => import('@/views/dashboard/index'), - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } - }] - } + { path: '/401', component: () => import('@/views/errorPage/401'), hidden: true } ] // 实例化vue的时候直挂载constantRouter export default new Router({ diff --git a/src/router/modules/example.js b/src/router/modules/example.js index 9076d50..b5d57bf 100644 --- a/src/router/modules/example.js +++ b/src/router/modules/example.js @@ -1,21 +1,36 @@ /* Layout */ import Layout from '@/layout/Layout' -export const exampleRouters = [{ - path: 'example', - component: Layout, - redirect: '/exampleTable', - name: 'Example', - alwaysShow: true, - meta: { - title: '示例', - icon: 'icon-config' // 图标 +export const exampleRouters = [ + // 主页 + { + path: '/', + component: Layout, + redirect: 'dashboard', + name: 'Dashboard', + // hidden: true, + children: [{ + path: 'dashboard', + name: 'Dashboard', + component: () => import('@/views/dashboard/index'), + meta: { title: '首页', icon: 'dashboard', noCache: true } + }] }, - children: [ - { - path: '/exampleTable', - name: 'ExampleTable', - component: () => import('@/views/example/tableExample'), - meta: { title: '表格示例', icon: '' } - } - ] -}] + { + path: 'example', + component: Layout, + redirect: '/exampleTable', + name: 'Example', + alwaysShow: true, + meta: { + title: '示例', + icon: 'icon-config' // 图标 + }, + children: [ + { + path: '/exampleTable', + name: 'ExampleTable', + component: () => import('@/views/example/tableExample'), + meta: { title: '表格示例', icon: '' } + } + ] + }] diff --git a/static/project.config.json b/static/project.config.json index cb1eb78..73a7460 100644 --- a/static/project.config.json +++ b/static/project.config.json @@ -1,8 +1,8 @@ { "title": "基础资源系统", "baseUrl": "http://111.198.10.15:11409/", - "mainPage": "http://111.198.10.15:11404/dcms/", - "singleSys": true, + "mainPage": "http://111.198.10.15:11404/dcms/#", + "singleSys": false, "city":"崇仁县", "mapUrl":"https://t0.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=216ee92889e17ab1b083fae665d522b8", "labelUrl":"https://t0.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=216ee92889e17ab1b083fae665d522b8",