diff --git a/public/config.js b/public/config.js index b8befa3..746bf24 100644 --- a/public/config.js +++ b/public/config.js @@ -1,7 +1,7 @@ window._CONFIG = { - ImageryProviderUrl: 'http://127.0.0.1:8090/mapWX/{z}/{x}/{y}.jpg', + ImageryProviderUrl: '/map/mapWX/{z}/{x}/{y}.jpg', RoadProviderUrl: '', - TerrainProviderUrl: 'http://127.0.0.1:8090/mapDem/', + TerrainProviderUrl: '/map/mapDem/', thirdLoginUrl: 'http://127.0.0.1:8080/thirdLogin', clientId: '0123456789', evaluationSrc: 'http://127.0.0.1:8000', diff --git a/src/App.vue b/src/App.vue index cea493d..e65f9ea 100644 --- a/src/App.vue +++ b/src/App.vue @@ -129,4 +129,78 @@ export default { .scroller-y { overflow-y: auto; } + +.oh { + overflow: hidden; +} + +.pr { + position: relative; +} +.pa { + position: absolute; +} +.pf { + position: fixed; +} +.zi0 { + z-index: 0; +} +.zi1 { + z-index: 1; +} +.zi2 { + z-index: 2; +} +.zi3 { + z-index: 3; +} +.zi4 { + z-index: 4; +} +.zi5 { + z-index: 5; +} +.zi6 { + z-index: 6; +} +.zi7 { + z-index: 7; +} +.zi8 { + z-index: 8; +} +.zi9 { + z-index: 9; +} +.zi10 { + z-index: 10; +} +.zi20 { + z-index: 20; +} +.zi50 { + z-index: 50; +} +.zi100 { + z-index: 100; +} +.zi200 { + z-index: 200; +} +.zi500 { + z-index: 500; +} +.zi1000 { + z-index: 1000; +} +.zi2000 { + z-index: 2000; +} +.zi5000 { + z-index: 5000; +} +.zi9999 { + z-index: 9999; +} diff --git a/src/config/router.config.js b/src/config/router.config.js index 9f8d60d..20da6d4 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -7,156 +7,7 @@ const RouteView = { render: (h) => h('router-view'), } -export const asyncRouterMap = [ - { - path: '/', - name: 'index', - component: BasicLayout, - meta: { title: 'menu.home' }, - redirect: '/user/thirdLogin', - children: [ - // dashboard - { - path: '/dashboard', - name: 'dashboard', - redirect: '/dashboard/workplace', - component: RouteView, - // meta: { title: 'menu.dashboard', keepAlive: true, icon: bxAnaalyse, permission: ['dashboard'] }, - meta: { title: '基础数据管理工具', keepAlive: true, icon: bxAnaalyse }, - children: [ - { - path: '/dashboard/workplace', - name: 'Workplace', - component: () => import('@/views/dashboard/WorkplaceEquipment'), - meta: { title: '主页', keepAlive: true }, - }, - ], - }, - { - path: '/map', - name: 'map', - redirect: '/map/index', - component: RouteView, - // meta: { title: 'menu.dashboard', keepAlive: true, icon: bxAnaalyse, permission: ['dashboard'] }, - meta: { title: '地图资源库', keepAlive: true, icon: bxAnaalyse }, - children: [ - { - path: '/map/index', - name: 'mapIndex', - component: () => import('@/views/map/mapIndex'), - meta: { title: '主页', keepAlive: true }, - }, - ], - }, - // isystem - { - path: '/isystem', - name: 'isystem', - // redirect: '/isystem/workplace', - component: RouteView, - meta: { title: '后台管理', keepAlive: true, icon: bxAnaalyse, permission: ['isystem'] }, - children: [ - { - path: '/isystem/userlist', - name: 'userlist', - component: () => import('@/views/isystem/userList'), - meta: { title: '用户管理', keepAlive: true, permission: ['isystem'] }, - }, - { - path: '/isystem/rolelist', - name: 'rolelist', - component: () => import('@/views/isystem/roleList'), - meta: { title: '角色管理', keepAlive: true, permission: ['isystem'] }, - }, - { - path: '/isystem/cookieList', - name: 'cookieList', - component: () => import('@/views/isystem/cookieList'), - meta: { title: '缓存管理', keepAlive: true, permission: ['isystem'] }, - }, - ], - }, - - // account - { - path: '/account', - component: RouteView, - redirect: '/account/center', - name: 'account', - hidden: true, - meta: { title: 'menu.account', icon: 'user', keepAlive: true, hidden: true, permission: ['user'] }, - children: [ - { - path: '/account/center', - name: 'center', - component: () => import('@/views/account/center'), - meta: { title: 'menu.account.center', keepAlive: true, permission: ['user'] }, - }, - { - path: '/account/settings', - name: 'settings', - component: () => import('@/views/account/settings/Index'), - meta: { title: 'menu.account.settings', hideHeader: true, permission: ['user'] }, - redirect: '/account/settings/basic', - hideChildrenInMenu: true, - children: [ - { - path: '/account/settings/basic', - name: 'BasicSettings', - component: () => import('@/views/account/settings/BasicSetting'), - meta: { title: 'account.settings.menuMap.basic', hidden: true, permission: ['user'] }, - }, - { - path: '/account/settings/security', - name: 'SecuritySettings', - component: () => import('@/views/account/settings/Security'), - meta: { - title: 'account.settings.menuMap.security', - hidden: true, - keepAlive: true, - permission: ['user'], - }, - }, - { - path: '/account/settings/custom', - name: 'CustomSettings', - component: () => import('@/views/account/settings/Custom'), - meta: { title: 'account.settings.menuMap.custom', hidden: true, keepAlive: true, permission: ['user'] }, - }, - { - path: '/account/settings/binding', - name: 'BindingSettings', - component: () => import('@/views/account/settings/Binding'), - meta: { - title: 'account.settings.menuMap.binding', - hidden: true, - keepAlive: true, - permission: ['user'], - }, - }, - { - path: '/account/settings/notification', - name: 'NotificationSettings', - component: () => import('@/views/account/settings/Notification'), - meta: { - title: 'account.settings.menuMap.notification', - hidden: true, - keepAlive: true, - permission: ['user'], - }, - }, - ], - }, - ], - }, - ], - }, - { - path: '*', - redirect: '/404', - hidden: true, - }, -] +export const asyncRouterMap = [] /** * 基础路由 @@ -164,143 +15,17 @@ export const asyncRouterMap = [ */ export const constantRouterMap = [ { - path: '/user', - component: UserLayout, - redirect: '/user/login', - hidden: true, - children: [ - { - path: 'login', - name: 'login', - component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login'), - }, - { - path: 'thirdLogin', - name: 'thirdLogin', - component: () => import(/* webpackChunkName: "user" */ '@/views/user/ThirdLogin'), - }, - { - path: 'register', - name: 'register', - component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register'), - }, - { - path: 'register-result', - name: 'registerResult', - component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult'), - }, - { - path: 'recover', - name: 'recover', - component: undefined, - }, - ], + path: '/', + name: 'index', + component: RouteView, + meta: { title: '某仿真分析方法工具' }, + redirect: '/user/welcome', }, - - { - path: '/other', - component: BasicLayout, - hidden: true, - children: [ - { - path: 'resetPwd', - name: '重置密码', - meta: { - title: '重置密码', - }, - component: () => import('@/views/user/ResetPwd.vue'), - }, - ], - }, - { path: '/simulationScene', name: 'SimulationScene', component: () => import(/* webpackChunkName: "fail" */ '@/views/simulationScene/index.vue'), - redirect: '/simulationScene/centralControl', children: [ - { - path: '/simulationScene/trainer', - name: 'SimulationSceneTrainer', - //component: () => import(/* webpackChunkName: "fail" */ '@/views/simulationScene/trainer/index.vue'), - component: () => import(/* webpackChunkName: "fail" */ '@/views/simulationScene/instructor/index.vue'), - meta: { title: '训练员系统' }, - }, - { - path: '/simulationScene/trainerSystem', - name: 'SimulationSceneTrainerSystem', - component: () => import(/* webpackChunkName: "fail" */ '@/views/simulationScene/trainer/system/index.vue'), - children: [ - { - path: '/simulationScene/trainerSystem/simulationModel', - name: 'SimulationSceneTrainerSystemSimulationModel', - component: () => - import(/* webpackChunkName: "fail" */ '@/views/simulationScene/trainer/system/simulationModel/index1.vue'), - }, - { - path: '/simulationScene/trainerSystem/sceneEditing', - name: 'SimulationSceneTrainerSystemSceneEditing', - component: () => - import(/* webpackChunkName: "fail" */ '@/views/simulationScene/trainer/system/sceneEditing/index.vue'), - }, - { - path: '/simulationScene/trainerSystem/display', - name: 'SimulationSceneTrainerSystemDisplay', - component: () => - import(/* webpackChunkName: "fail" */ '@/views/simulationScene/trainer/system/display/index.vue'), - }, - { - path: '/simulationScene/trainerSystem/evaluation', - name: 'SimulationSceneTrainerSystemEvaluation', - component: () => - import(/* webpackChunkName: "fail" */ '@/views/simulationScene/trainer/system/evaluation/index.vue'), - }, - ], - }, - - { - path: '/simulationScene/instructor', - name: 'SimulationSceneInstructor', - component: () => import(/* webpackChunkName: "fail" */ '@/views/simulationScene/instructor/index.vue'), - meta: { title: '教员系统' }, - }, - { - path: '/simulationScene/instructorSystem', - name: 'SimulationSceneInstructorSystem', - component: () => import(/* webpackChunkName: "fail" */ '@/views/simulationScene/instructor/system/index.vue'), - children: [ - { - path: '/simulationScene/instructorSystem/simulationModel', - name: 'SimulationSceneInstructorSystemSimulationModel', - component: () => - import(/* webpackChunkName: "fail" */ '@/views/simulationScene/instructor/system/simulationModel/index.vue'), - }, - { - path: '/simulationScene/instructorSystem/sceneEditing', - name: 'SimulationSceneInstructorSystemSceneEditing', - component: () => - import(/* webpackChunkName: "fail" */ '@/views/simulationScene/instructor/system/sceneEditing/index.vue'), - }, - { - path: '/simulationScene/instructorSystem/display', - name: 'SimulationSceneInstructorSystemDisplay', - component: () => - import(/* webpackChunkName: "fail" */ '@/views/simulationScene/instructor/system/display/index.vue'), - }, - { - path: '/simulationScene/instructorSystem/evaluation', - name: 'SimulationSceneInstructorSystemEvaluation', - component: () => - import(/* webpackChunkName: "fail" */ '@/views/simulationScene/instructor/system/evaluation/index.vue'), - }, - ], - }, - - { - path: '/simulationScene/systemSelect', - name: 'SimulationSceneSystemSelect', - component: () => import(/* webpackChunkName: "fail" */ '@/views/simulationScene/systemSelect/index.vue'), - }, { path: '/simulationScene/centralControl', name: 'SimulationSceneCentralControl', @@ -323,6 +48,7 @@ export const constantRouterMap = [ path: '/simulationScene/sceneEditing', name: 'SimulationSceneSceneEditing', component: () => import(/* webpackChunkName: "fail" */ '@/views/simulationScene/sceneEditing/index.vue'), + meta: { title: '场景编辑子系统' }, }, { path: '/simulationScene/display', @@ -338,9 +64,30 @@ export const constantRouterMap = [ }, ], }, - + { + path: '/user', + component: UserLayout, + redirect: '/user/login', + hidden: true, + children: [ + { + path: '/user/login', + name: 'login', + component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login'), + }, + { + path: '/user/welcome', + name: 'Welcome', + component: () => import(/* webpackChunkName: "user" */ '@/views/user/Welcome'), + }, + ], + }, { path: '/404', component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404'), }, + { + path: '*', + redirect: '/404', + }, ] diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 74b1da8..a35da81 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -9,71 +9,38 @@ :i18nRender="i18nRender" v-bind="settings" > - - - - + - diff --git a/src/layouts/UserLayout.vue b/src/layouts/UserLayout.vue index 828e536..3d2671e 100644 --- a/src/layouts/UserLayout.vue +++ b/src/layouts/UserLayout.vue @@ -1,165 +1,27 @@ diff --git a/src/permission.js b/src/permission.js index 340d02c..202b978 100644 --- a/src/permission.js +++ b/src/permission.js @@ -35,7 +35,6 @@ router.beforeEach((to, from, next) => { // 根据roles权限生成可访问的路由表 // 动态添加可访问路由表 // VueRouter@3.5.0+ New API - console.log(2345) store.getters.addRouters.forEach((r) => { router.addRoute(r) diff --git a/src/router/generator-routers.js b/src/router/generator-routers.js index 564015d..78cac3e 100644 --- a/src/router/generator-routers.js +++ b/src/router/generator-routers.js @@ -82,17 +82,12 @@ export const generatorDynamicRouter = token => { .then(res => { console.log('generatorDynamicRouter response:', res) const data = res.data - const menuNav = [] const childrenNav = [] // console.log('data', res.data) // 后端数据, 根级树数组, 根级 PID listToTree(data, childrenNav, '') console.log('childrenNav', childrenNav) - rootRouter.children = childrenNav - menuNav.push(rootRouter) - console.log('menuNav', menuNav) - const routers = generator(menuNav) - routers.push(notFoundRouter) + const routers = generator(childrenNav) console.log('routers', routers) resolve(routers) }) diff --git a/src/store/modules/async-router.js b/src/store/modules/async-router.js index 9a6d6ec..bdd8491 100644 --- a/src/store/modules/async-router.js +++ b/src/store/modules/async-router.js @@ -7,26 +7,25 @@ import { generatorDynamicRouter } from '@/router/generator-routers' const permission = { state: { routers: constantRouterMap, - addRouters: [] + addRouters: [], }, mutations: { SET_ROUTERS: (state, routers) => { state.addRouters = routers - state.routers = constantRouterMap.concat(routers) - } + state.routers = [].concat(routers, constantRouterMap) + }, }, actions: { - GenerateRoutes ({ commit }, data) { - return new Promise(resolve => { + GenerateRoutes({ commit }, data) { + return new Promise((resolve) => { // const { token } = data - generatorDynamicRouter().then(routers => { - console.log(routers,'routers') + generatorDynamicRouter().then((routers) => { commit('SET_ROUTERS', routers) resolve() }) }) - } - } + }, + }, } export default permission diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 4e35d87..578bce8 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -64,7 +64,6 @@ const permission = { }, actions: { GenerateRoutes ({ commit }, data) { - console.log('adfafadfasddf') return new Promise(resolve => { const { roles } = data const routerMap = cloneDeep(asyncRouterMap) diff --git a/src/views/simulationScene/index.vue b/src/views/simulationScene/index.vue index 59608da..dfa65cf 100644 --- a/src/views/simulationScene/index.vue +++ b/src/views/simulationScene/index.vue @@ -2,7 +2,6 @@
{{ title }}
-
@@ -22,11 +21,6 @@ export default { } }, }, - methods: { - handleQuit() { - this.$router.push({ name: 'thirdLogin' }) - }, - }, } diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index a80c554..298e5f8 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -1,177 +1,107 @@ - diff --git a/src/views/user/RegisterResult.vue b/src/views/user/RegisterResult.vue deleted file mode 100644 index e76511f..0000000 --- a/src/views/user/RegisterResult.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/src/views/user/ResetPwd.vue b/src/views/user/ResetPwd.vue deleted file mode 100644 index ed8b7da..0000000 --- a/src/views/user/ResetPwd.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - - - diff --git a/src/views/user/Welcome.vue b/src/views/user/Welcome.vue new file mode 100644 index 0000000..c1571c2 --- /dev/null +++ b/src/views/user/Welcome.vue @@ -0,0 +1,125 @@ + + + + +