diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-sanitation.svg b/src/icons/svg/icon-sanitation.svg new file mode 100644 index 0000000..7ab2ee9 --- /dev/null +++ b/src/icons/svg/icon-sanitation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-sanitation.svg b/src/icons/svg/icon-sanitation.svg new file mode 100644 index 0000000..7ab2ee9 --- /dev/null +++ b/src/icons/svg/icon-sanitation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index c673350..e41df7c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,9 +12,10 @@ // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 + console.log('to Path:' + to.path) // 如果有token if (getToken()) { - console.log('to Path:' + to.path) + console.log('hasToken') // 登录后进入登录页 if (to.path === '/login') { next({ path: '/login' }) @@ -29,6 +30,7 @@ // 如果已有当前可进入的子系统,刷新子系统菜单 const currentSys = getCurrentSys() if (currentSys) { + console.log('hasCurrentSystem') // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { store.commit('SET_CHANGEFLAG', '0') @@ -37,9 +39,11 @@ next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) } else { // 没有当前子系统信息,跳转到选择子系统页面 + console.log('dontHasCurrentSystem') next({ path: '/dashboard' }) } }).catch((err) => { + console.log('toFedLogOut') store.dispatch('FedLogOut').then(() => { Message.error(err || '权限验证失败,请重新登录系统') next({ path: '/' }) @@ -52,8 +56,10 @@ } } else { if (whiteList.indexOf(to.path) !== -1) { // 免登录白名单,直接进入 + console.log('is In WhiteList') next() } else { + console.log('noTokentoToLogin') // next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 next('/login') // 否则全部重定向到登录页 NProgress.done() diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-sanitation.svg b/src/icons/svg/icon-sanitation.svg new file mode 100644 index 0000000..7ab2ee9 --- /dev/null +++ b/src/icons/svg/icon-sanitation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index c673350..e41df7c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,9 +12,10 @@ // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 + console.log('to Path:' + to.path) // 如果有token if (getToken()) { - console.log('to Path:' + to.path) + console.log('hasToken') // 登录后进入登录页 if (to.path === '/login') { next({ path: '/login' }) @@ -29,6 +30,7 @@ // 如果已有当前可进入的子系统,刷新子系统菜单 const currentSys = getCurrentSys() if (currentSys) { + console.log('hasCurrentSystem') // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { store.commit('SET_CHANGEFLAG', '0') @@ -37,9 +39,11 @@ next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) } else { // 没有当前子系统信息,跳转到选择子系统页面 + console.log('dontHasCurrentSystem') next({ path: '/dashboard' }) } }).catch((err) => { + console.log('toFedLogOut') store.dispatch('FedLogOut').then(() => { Message.error(err || '权限验证失败,请重新登录系统') next({ path: '/' }) @@ -52,8 +56,10 @@ } } else { if (whiteList.indexOf(to.path) !== -1) { // 免登录白名单,直接进入 + console.log('is In WhiteList') next() } else { + console.log('noTokentoToLogin') // next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 next('/login') // 否则全部重定向到登录页 NProgress.done() diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 7e9a92d..12e0d1d 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -5,26 +5,26 @@
-
+
- - - - -
-
{{ system.name }}
-
- -
-
+ + +
+ +
+
{{ system.name }}
+ +
+ +
-
+
- - - - + + + +
@@ -40,12 +40,22 @@ data() { return { bgUrl: require('../../assets/login_images/bg-blue.png'), // 背景图片 - loading: true + loading: true, // 加载状态 + pageSize: 9, // 一页子系统数量 + page: 1 // 第几页 } }, computed: { + currentSystems() { + const first = (this.page - 1) * this.pageSize + 0 + const last = (this.page - 1) * this.pageSize + this.pageSize + return this.$store.getters.systems.slice(first, last) + }, systems() { return this.$store.getters.systems + }, + fullPage() { + return Math.ceil(this.$store.getters.systems.length / this.pageSize) } }, created() { @@ -62,14 +72,32 @@ changeSystem(system) { console.log(system.url) this.$store.commit('SET_SYSTEM', system) - // this.$message('进入' + system.name) - // debugger - // this.$router.push(system.url) + // 判断是外部链接还是本项目的路由 + if (system.url.indexOf('http') > -1) { + // 取token + const params = '?token=' + this.$store.getters.token + debugger + window.open(system.url + params, '_blank') + } else { + this.$router.push(system.url) + } }, logout() { this.$store.dispatch('LogOut').then(() => { location.reload() // 为了重新实例化vue-router对象 避免bug }) + }, + // 下一页 + nextPage() { + if (this.page < this.fullPage) { + this.page++ + } + }, + // 上一页 + prevPage() { + if (this.page > 1) { + this.page-- + } } } } @@ -78,9 +106,9 @@ \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-sanitation.svg b/src/icons/svg/icon-sanitation.svg new file mode 100644 index 0000000..7ab2ee9 --- /dev/null +++ b/src/icons/svg/icon-sanitation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index c673350..e41df7c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,9 +12,10 @@ // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 + console.log('to Path:' + to.path) // 如果有token if (getToken()) { - console.log('to Path:' + to.path) + console.log('hasToken') // 登录后进入登录页 if (to.path === '/login') { next({ path: '/login' }) @@ -29,6 +30,7 @@ // 如果已有当前可进入的子系统,刷新子系统菜单 const currentSys = getCurrentSys() if (currentSys) { + console.log('hasCurrentSystem') // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { store.commit('SET_CHANGEFLAG', '0') @@ -37,9 +39,11 @@ next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) } else { // 没有当前子系统信息,跳转到选择子系统页面 + console.log('dontHasCurrentSystem') next({ path: '/dashboard' }) } }).catch((err) => { + console.log('toFedLogOut') store.dispatch('FedLogOut').then(() => { Message.error(err || '权限验证失败,请重新登录系统') next({ path: '/' }) @@ -52,8 +56,10 @@ } } else { if (whiteList.indexOf(to.path) !== -1) { // 免登录白名单,直接进入 + console.log('is In WhiteList') next() } else { + console.log('noTokentoToLogin') // next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 next('/login') // 否则全部重定向到登录页 NProgress.done() diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 7e9a92d..12e0d1d 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -5,26 +5,26 @@
-
+
- - - - -
-
{{ system.name }}
-
- -
-
+ + +
+ +
+
{{ system.name }}
+ +
+ +
-
+
- - - - + + + +
@@ -40,12 +40,22 @@ data() { return { bgUrl: require('../../assets/login_images/bg-blue.png'), // 背景图片 - loading: true + loading: true, // 加载状态 + pageSize: 9, // 一页子系统数量 + page: 1 // 第几页 } }, computed: { + currentSystems() { + const first = (this.page - 1) * this.pageSize + 0 + const last = (this.page - 1) * this.pageSize + this.pageSize + return this.$store.getters.systems.slice(first, last) + }, systems() { return this.$store.getters.systems + }, + fullPage() { + return Math.ceil(this.$store.getters.systems.length / this.pageSize) } }, created() { @@ -62,14 +72,32 @@ changeSystem(system) { console.log(system.url) this.$store.commit('SET_SYSTEM', system) - // this.$message('进入' + system.name) - // debugger - // this.$router.push(system.url) + // 判断是外部链接还是本项目的路由 + if (system.url.indexOf('http') > -1) { + // 取token + const params = '?token=' + this.$store.getters.token + debugger + window.open(system.url + params, '_blank') + } else { + this.$router.push(system.url) + } }, logout() { this.$store.dispatch('LogOut').then(() => { location.reload() // 为了重新实例化vue-router对象 避免bug }) + }, + // 下一页 + nextPage() { + if (this.page < this.fullPage) { + this.page++ + } + }, + // 上一页 + prevPage() { + if (this.page > 1) { + this.page-- + } } } } @@ -78,9 +106,9 @@ diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-sanitation.svg b/src/icons/svg/icon-sanitation.svg new file mode 100644 index 0000000..7ab2ee9 --- /dev/null +++ b/src/icons/svg/icon-sanitation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index c673350..e41df7c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,9 +12,10 @@ // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 + console.log('to Path:' + to.path) // 如果有token if (getToken()) { - console.log('to Path:' + to.path) + console.log('hasToken') // 登录后进入登录页 if (to.path === '/login') { next({ path: '/login' }) @@ -29,6 +30,7 @@ // 如果已有当前可进入的子系统,刷新子系统菜单 const currentSys = getCurrentSys() if (currentSys) { + console.log('hasCurrentSystem') // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { store.commit('SET_CHANGEFLAG', '0') @@ -37,9 +39,11 @@ next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) } else { // 没有当前子系统信息,跳转到选择子系统页面 + console.log('dontHasCurrentSystem') next({ path: '/dashboard' }) } }).catch((err) => { + console.log('toFedLogOut') store.dispatch('FedLogOut').then(() => { Message.error(err || '权限验证失败,请重新登录系统') next({ path: '/' }) @@ -52,8 +56,10 @@ } } else { if (whiteList.indexOf(to.path) !== -1) { // 免登录白名单,直接进入 + console.log('is In WhiteList') next() } else { + console.log('noTokentoToLogin') // next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 next('/login') // 否则全部重定向到登录页 NProgress.done() diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 7e9a92d..12e0d1d 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -5,26 +5,26 @@
-
+
- - - - -
-
{{ system.name }}
-
- -
-
+ + +
+ +
+
{{ system.name }}
+ +
+ +
-
+
- - - - + + + +
@@ -40,12 +40,22 @@ data() { return { bgUrl: require('../../assets/login_images/bg-blue.png'), // 背景图片 - loading: true + loading: true, // 加载状态 + pageSize: 9, // 一页子系统数量 + page: 1 // 第几页 } }, computed: { + currentSystems() { + const first = (this.page - 1) * this.pageSize + 0 + const last = (this.page - 1) * this.pageSize + this.pageSize + return this.$store.getters.systems.slice(first, last) + }, systems() { return this.$store.getters.systems + }, + fullPage() { + return Math.ceil(this.$store.getters.systems.length / this.pageSize) } }, created() { @@ -62,14 +72,32 @@ changeSystem(system) { console.log(system.url) this.$store.commit('SET_SYSTEM', system) - // this.$message('进入' + system.name) - // debugger - // this.$router.push(system.url) + // 判断是外部链接还是本项目的路由 + if (system.url.indexOf('http') > -1) { + // 取token + const params = '?token=' + this.$store.getters.token + debugger + window.open(system.url + params, '_blank') + } else { + this.$router.push(system.url) + } }, logout() { this.$store.dispatch('LogOut').then(() => { location.reload() // 为了重新实例化vue-router对象 避免bug }) + }, + // 下一页 + nextPage() { + if (this.page < this.fullPage) { + this.page++ + } + }, + // 上一页 + prevPage() { + if (this.page > 1) { + this.page-- + } } } } @@ -78,9 +106,9 @@ diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 92cb5c5..9bd7427 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -24,7 +24,7 @@ 回首页 - + 修改密码 @@ -84,11 +84,18 @@ // 切换子系统 handleCommand(command) { console.log('切换子系统:' + command.name) - this.$store.commit('SET_CHANGEFLAG', '1') - this.$store.commit('SET_SYSTEM', command) - this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { - this.$router.replace(command.url) - }) + if(command.url.indexOf("http")>-1){ + // 取token + const params = '?token='+this.$store.getters.token + window.open(command.url+params, '_blank'); + }else{ + this.$store.commit('SET_CHANGEFLAG', '1') + this.$store.commit('SET_SYSTEM', command) + this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { + this.$router.replace(command.url) + }) + } + }, // 获取子系统 getSystems() { diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-sanitation.svg b/src/icons/svg/icon-sanitation.svg new file mode 100644 index 0000000..7ab2ee9 --- /dev/null +++ b/src/icons/svg/icon-sanitation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index c673350..e41df7c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,9 +12,10 @@ // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 + console.log('to Path:' + to.path) // 如果有token if (getToken()) { - console.log('to Path:' + to.path) + console.log('hasToken') // 登录后进入登录页 if (to.path === '/login') { next({ path: '/login' }) @@ -29,6 +30,7 @@ // 如果已有当前可进入的子系统,刷新子系统菜单 const currentSys = getCurrentSys() if (currentSys) { + console.log('hasCurrentSystem') // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { store.commit('SET_CHANGEFLAG', '0') @@ -37,9 +39,11 @@ next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) } else { // 没有当前子系统信息,跳转到选择子系统页面 + console.log('dontHasCurrentSystem') next({ path: '/dashboard' }) } }).catch((err) => { + console.log('toFedLogOut') store.dispatch('FedLogOut').then(() => { Message.error(err || '权限验证失败,请重新登录系统') next({ path: '/' }) @@ -52,8 +56,10 @@ } } else { if (whiteList.indexOf(to.path) !== -1) { // 免登录白名单,直接进入 + console.log('is In WhiteList') next() } else { + console.log('noTokentoToLogin') // next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 next('/login') // 否则全部重定向到登录页 NProgress.done() diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 7e9a92d..12e0d1d 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -5,26 +5,26 @@
-
+
- - - - -
-
{{ system.name }}
-
- -
-
+ + +
+ +
+
{{ system.name }}
+ +
+ +
-
+
- - - - + + + +
@@ -40,12 +40,22 @@ data() { return { bgUrl: require('../../assets/login_images/bg-blue.png'), // 背景图片 - loading: true + loading: true, // 加载状态 + pageSize: 9, // 一页子系统数量 + page: 1 // 第几页 } }, computed: { + currentSystems() { + const first = (this.page - 1) * this.pageSize + 0 + const last = (this.page - 1) * this.pageSize + this.pageSize + return this.$store.getters.systems.slice(first, last) + }, systems() { return this.$store.getters.systems + }, + fullPage() { + return Math.ceil(this.$store.getters.systems.length / this.pageSize) } }, created() { @@ -62,14 +72,32 @@ changeSystem(system) { console.log(system.url) this.$store.commit('SET_SYSTEM', system) - // this.$message('进入' + system.name) - // debugger - // this.$router.push(system.url) + // 判断是外部链接还是本项目的路由 + if (system.url.indexOf('http') > -1) { + // 取token + const params = '?token=' + this.$store.getters.token + debugger + window.open(system.url + params, '_blank') + } else { + this.$router.push(system.url) + } }, logout() { this.$store.dispatch('LogOut').then(() => { location.reload() // 为了重新实例化vue-router对象 避免bug }) + }, + // 下一页 + nextPage() { + if (this.page < this.fullPage) { + this.page++ + } + }, + // 上一页 + prevPage() { + if (this.page > 1) { + this.page-- + } } } } @@ -78,9 +106,9 @@ diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 92cb5c5..9bd7427 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -24,7 +24,7 @@ 回首页 - + 修改密码 @@ -84,11 +84,18 @@ // 切换子系统 handleCommand(command) { console.log('切换子系统:' + command.name) - this.$store.commit('SET_CHANGEFLAG', '1') - this.$store.commit('SET_SYSTEM', command) - this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { - this.$router.replace(command.url) - }) + if(command.url.indexOf("http")>-1){ + // 取token + const params = '?token='+this.$store.getters.token + window.open(command.url+params, '_blank'); + }else{ + this.$store.commit('SET_CHANGEFLAG', '1') + this.$store.commit('SET_SYSTEM', command) + this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { + this.$router.replace(command.url) + }) + } + }, // 获取子系统 getSystems() { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 76ad9a3..733b4f5 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -117,21 +117,11 @@ this.showKaptcha = this.$store.getters.kaptcha this.loading = false this.$message.success('连接服务器成功') - if (this.showKaptcha) { - var rightHeight = window.getComputedStyle(this.$refs.element).height - rightHeight = parseFloat(rightHeight.substring(0, rightHeight.length - 2)) - document.getElementById('left-div').style.height = (rightHeight + 64.897) + 'px' - } }).catch((e) => { this.$message.error('连接服务器失败') this.loading = false }) }, - mounted: function() { - // 自适应图片高度 - var rightHeight = window.getComputedStyle(this.$refs.element).height - document.getElementById('left-div').style.height = rightHeight - }, methods: { showPwd() { // 明文显示密码 if (this.pwdType === 'password') { diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-sanitation.svg b/src/icons/svg/icon-sanitation.svg new file mode 100644 index 0000000..7ab2ee9 --- /dev/null +++ b/src/icons/svg/icon-sanitation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index c673350..e41df7c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,9 +12,10 @@ // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 + console.log('to Path:' + to.path) // 如果有token if (getToken()) { - console.log('to Path:' + to.path) + console.log('hasToken') // 登录后进入登录页 if (to.path === '/login') { next({ path: '/login' }) @@ -29,6 +30,7 @@ // 如果已有当前可进入的子系统,刷新子系统菜单 const currentSys = getCurrentSys() if (currentSys) { + console.log('hasCurrentSystem') // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { store.commit('SET_CHANGEFLAG', '0') @@ -37,9 +39,11 @@ next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) } else { // 没有当前子系统信息,跳转到选择子系统页面 + console.log('dontHasCurrentSystem') next({ path: '/dashboard' }) } }).catch((err) => { + console.log('toFedLogOut') store.dispatch('FedLogOut').then(() => { Message.error(err || '权限验证失败,请重新登录系统') next({ path: '/' }) @@ -52,8 +56,10 @@ } } else { if (whiteList.indexOf(to.path) !== -1) { // 免登录白名单,直接进入 + console.log('is In WhiteList') next() } else { + console.log('noTokentoToLogin') // next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 next('/login') // 否则全部重定向到登录页 NProgress.done() diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 7e9a92d..12e0d1d 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -5,26 +5,26 @@
-
+
- - - - -
-
{{ system.name }}
-
- -
-
+ + +
+ +
+
{{ system.name }}
+ +
+ +
-
+
- - - - + + + +
@@ -40,12 +40,22 @@ data() { return { bgUrl: require('../../assets/login_images/bg-blue.png'), // 背景图片 - loading: true + loading: true, // 加载状态 + pageSize: 9, // 一页子系统数量 + page: 1 // 第几页 } }, computed: { + currentSystems() { + const first = (this.page - 1) * this.pageSize + 0 + const last = (this.page - 1) * this.pageSize + this.pageSize + return this.$store.getters.systems.slice(first, last) + }, systems() { return this.$store.getters.systems + }, + fullPage() { + return Math.ceil(this.$store.getters.systems.length / this.pageSize) } }, created() { @@ -62,14 +72,32 @@ changeSystem(system) { console.log(system.url) this.$store.commit('SET_SYSTEM', system) - // this.$message('进入' + system.name) - // debugger - // this.$router.push(system.url) + // 判断是外部链接还是本项目的路由 + if (system.url.indexOf('http') > -1) { + // 取token + const params = '?token=' + this.$store.getters.token + debugger + window.open(system.url + params, '_blank') + } else { + this.$router.push(system.url) + } }, logout() { this.$store.dispatch('LogOut').then(() => { location.reload() // 为了重新实例化vue-router对象 避免bug }) + }, + // 下一页 + nextPage() { + if (this.page < this.fullPage) { + this.page++ + } + }, + // 上一页 + prevPage() { + if (this.page > 1) { + this.page-- + } } } } @@ -78,9 +106,9 @@ diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 92cb5c5..9bd7427 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -24,7 +24,7 @@ 回首页 - + 修改密码 @@ -84,11 +84,18 @@ // 切换子系统 handleCommand(command) { console.log('切换子系统:' + command.name) - this.$store.commit('SET_CHANGEFLAG', '1') - this.$store.commit('SET_SYSTEM', command) - this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { - this.$router.replace(command.url) - }) + if(command.url.indexOf("http")>-1){ + // 取token + const params = '?token='+this.$store.getters.token + window.open(command.url+params, '_blank'); + }else{ + this.$store.commit('SET_CHANGEFLAG', '1') + this.$store.commit('SET_SYSTEM', command) + this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { + this.$router.replace(command.url) + }) + } + }, // 获取子系统 getSystems() { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 76ad9a3..733b4f5 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -117,21 +117,11 @@ this.showKaptcha = this.$store.getters.kaptcha this.loading = false this.$message.success('连接服务器成功') - if (this.showKaptcha) { - var rightHeight = window.getComputedStyle(this.$refs.element).height - rightHeight = parseFloat(rightHeight.substring(0, rightHeight.length - 2)) - document.getElementById('left-div').style.height = (rightHeight + 64.897) + 'px' - } }).catch((e) => { this.$message.error('连接服务器失败') this.loading = false }) }, - mounted: function() { - // 自适应图片高度 - var rightHeight = window.getComputedStyle(this.$refs.element).height - document.getElementById('left-div').style.height = rightHeight - }, methods: { showPwd() { // 明文显示密码 if (this.pwdType === 'password') { diff --git a/static/images/tabpage/bg.jpg b/static/images/tabpage/bg.jpg new file mode 100644 index 0000000..cc73f1d --- /dev/null +++ b/static/images/tabpage/bg.jpg Binary files differ diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-sanitation.svg b/src/icons/svg/icon-sanitation.svg new file mode 100644 index 0000000..7ab2ee9 --- /dev/null +++ b/src/icons/svg/icon-sanitation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index c673350..e41df7c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,9 +12,10 @@ // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 + console.log('to Path:' + to.path) // 如果有token if (getToken()) { - console.log('to Path:' + to.path) + console.log('hasToken') // 登录后进入登录页 if (to.path === '/login') { next({ path: '/login' }) @@ -29,6 +30,7 @@ // 如果已有当前可进入的子系统,刷新子系统菜单 const currentSys = getCurrentSys() if (currentSys) { + console.log('hasCurrentSystem') // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { store.commit('SET_CHANGEFLAG', '0') @@ -37,9 +39,11 @@ next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) } else { // 没有当前子系统信息,跳转到选择子系统页面 + console.log('dontHasCurrentSystem') next({ path: '/dashboard' }) } }).catch((err) => { + console.log('toFedLogOut') store.dispatch('FedLogOut').then(() => { Message.error(err || '权限验证失败,请重新登录系统') next({ path: '/' }) @@ -52,8 +56,10 @@ } } else { if (whiteList.indexOf(to.path) !== -1) { // 免登录白名单,直接进入 + console.log('is In WhiteList') next() } else { + console.log('noTokentoToLogin') // next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 next('/login') // 否则全部重定向到登录页 NProgress.done() diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 7e9a92d..12e0d1d 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -5,26 +5,26 @@
-
+
- - - - -
-
{{ system.name }}
-
- -
-
+ + +
+ +
+
{{ system.name }}
+ +
+ +
-
+
- - - - + + + +
@@ -40,12 +40,22 @@ data() { return { bgUrl: require('../../assets/login_images/bg-blue.png'), // 背景图片 - loading: true + loading: true, // 加载状态 + pageSize: 9, // 一页子系统数量 + page: 1 // 第几页 } }, computed: { + currentSystems() { + const first = (this.page - 1) * this.pageSize + 0 + const last = (this.page - 1) * this.pageSize + this.pageSize + return this.$store.getters.systems.slice(first, last) + }, systems() { return this.$store.getters.systems + }, + fullPage() { + return Math.ceil(this.$store.getters.systems.length / this.pageSize) } }, created() { @@ -62,14 +72,32 @@ changeSystem(system) { console.log(system.url) this.$store.commit('SET_SYSTEM', system) - // this.$message('进入' + system.name) - // debugger - // this.$router.push(system.url) + // 判断是外部链接还是本项目的路由 + if (system.url.indexOf('http') > -1) { + // 取token + const params = '?token=' + this.$store.getters.token + debugger + window.open(system.url + params, '_blank') + } else { + this.$router.push(system.url) + } }, logout() { this.$store.dispatch('LogOut').then(() => { location.reload() // 为了重新实例化vue-router对象 避免bug }) + }, + // 下一页 + nextPage() { + if (this.page < this.fullPage) { + this.page++ + } + }, + // 上一页 + prevPage() { + if (this.page > 1) { + this.page-- + } } } } @@ -78,9 +106,9 @@ diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 92cb5c5..9bd7427 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -24,7 +24,7 @@ 回首页 - + 修改密码 @@ -84,11 +84,18 @@ // 切换子系统 handleCommand(command) { console.log('切换子系统:' + command.name) - this.$store.commit('SET_CHANGEFLAG', '1') - this.$store.commit('SET_SYSTEM', command) - this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { - this.$router.replace(command.url) - }) + if(command.url.indexOf("http")>-1){ + // 取token + const params = '?token='+this.$store.getters.token + window.open(command.url+params, '_blank'); + }else{ + this.$store.commit('SET_CHANGEFLAG', '1') + this.$store.commit('SET_SYSTEM', command) + this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { + this.$router.replace(command.url) + }) + } + }, // 获取子系统 getSystems() { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 76ad9a3..733b4f5 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -117,21 +117,11 @@ this.showKaptcha = this.$store.getters.kaptcha this.loading = false this.$message.success('连接服务器成功') - if (this.showKaptcha) { - var rightHeight = window.getComputedStyle(this.$refs.element).height - rightHeight = parseFloat(rightHeight.substring(0, rightHeight.length - 2)) - document.getElementById('left-div').style.height = (rightHeight + 64.897) + 'px' - } }).catch((e) => { this.$message.error('连接服务器失败') this.loading = false }) }, - mounted: function() { - // 自适应图片高度 - var rightHeight = window.getComputedStyle(this.$refs.element).height - document.getElementById('left-div').style.height = rightHeight - }, methods: { showPwd() { // 明文显示密码 if (this.pwdType === 'password') { diff --git a/static/images/tabpage/bg.jpg b/static/images/tabpage/bg.jpg new file mode 100644 index 0000000..cc73f1d --- /dev/null +++ b/static/images/tabpage/bg.jpg Binary files differ diff --git a/static/images/tabpage/ny.png b/static/images/tabpage/ny.png new file mode 100644 index 0000000..07f7174 --- /dev/null +++ b/static/images/tabpage/ny.png Binary files differ diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-sanitation.svg b/src/icons/svg/icon-sanitation.svg new file mode 100644 index 0000000..7ab2ee9 --- /dev/null +++ b/src/icons/svg/icon-sanitation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index c673350..e41df7c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,9 +12,10 @@ // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 + console.log('to Path:' + to.path) // 如果有token if (getToken()) { - console.log('to Path:' + to.path) + console.log('hasToken') // 登录后进入登录页 if (to.path === '/login') { next({ path: '/login' }) @@ -29,6 +30,7 @@ // 如果已有当前可进入的子系统,刷新子系统菜单 const currentSys = getCurrentSys() if (currentSys) { + console.log('hasCurrentSystem') // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { store.commit('SET_CHANGEFLAG', '0') @@ -37,9 +39,11 @@ next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) } else { // 没有当前子系统信息,跳转到选择子系统页面 + console.log('dontHasCurrentSystem') next({ path: '/dashboard' }) } }).catch((err) => { + console.log('toFedLogOut') store.dispatch('FedLogOut').then(() => { Message.error(err || '权限验证失败,请重新登录系统') next({ path: '/' }) @@ -52,8 +56,10 @@ } } else { if (whiteList.indexOf(to.path) !== -1) { // 免登录白名单,直接进入 + console.log('is In WhiteList') next() } else { + console.log('noTokentoToLogin') // next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 next('/login') // 否则全部重定向到登录页 NProgress.done() diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 7e9a92d..12e0d1d 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -5,26 +5,26 @@
-
+
- - - - -
-
{{ system.name }}
-
- -
-
+ + +
+ +
+
{{ system.name }}
+ +
+ +
-
+
- - - - + + + +
@@ -40,12 +40,22 @@ data() { return { bgUrl: require('../../assets/login_images/bg-blue.png'), // 背景图片 - loading: true + loading: true, // 加载状态 + pageSize: 9, // 一页子系统数量 + page: 1 // 第几页 } }, computed: { + currentSystems() { + const first = (this.page - 1) * this.pageSize + 0 + const last = (this.page - 1) * this.pageSize + this.pageSize + return this.$store.getters.systems.slice(first, last) + }, systems() { return this.$store.getters.systems + }, + fullPage() { + return Math.ceil(this.$store.getters.systems.length / this.pageSize) } }, created() { @@ -62,14 +72,32 @@ changeSystem(system) { console.log(system.url) this.$store.commit('SET_SYSTEM', system) - // this.$message('进入' + system.name) - // debugger - // this.$router.push(system.url) + // 判断是外部链接还是本项目的路由 + if (system.url.indexOf('http') > -1) { + // 取token + const params = '?token=' + this.$store.getters.token + debugger + window.open(system.url + params, '_blank') + } else { + this.$router.push(system.url) + } }, logout() { this.$store.dispatch('LogOut').then(() => { location.reload() // 为了重新实例化vue-router对象 避免bug }) + }, + // 下一页 + nextPage() { + if (this.page < this.fullPage) { + this.page++ + } + }, + // 上一页 + prevPage() { + if (this.page > 1) { + this.page-- + } } } } @@ -78,9 +106,9 @@ diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 92cb5c5..9bd7427 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -24,7 +24,7 @@ 回首页 - + 修改密码 @@ -84,11 +84,18 @@ // 切换子系统 handleCommand(command) { console.log('切换子系统:' + command.name) - this.$store.commit('SET_CHANGEFLAG', '1') - this.$store.commit('SET_SYSTEM', command) - this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { - this.$router.replace(command.url) - }) + if(command.url.indexOf("http")>-1){ + // 取token + const params = '?token='+this.$store.getters.token + window.open(command.url+params, '_blank'); + }else{ + this.$store.commit('SET_CHANGEFLAG', '1') + this.$store.commit('SET_SYSTEM', command) + this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { + this.$router.replace(command.url) + }) + } + }, // 获取子系统 getSystems() { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 76ad9a3..733b4f5 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -117,21 +117,11 @@ this.showKaptcha = this.$store.getters.kaptcha this.loading = false this.$message.success('连接服务器成功') - if (this.showKaptcha) { - var rightHeight = window.getComputedStyle(this.$refs.element).height - rightHeight = parseFloat(rightHeight.substring(0, rightHeight.length - 2)) - document.getElementById('left-div').style.height = (rightHeight + 64.897) + 'px' - } }).catch((e) => { this.$message.error('连接服务器失败') this.loading = false }) }, - mounted: function() { - // 自适应图片高度 - var rightHeight = window.getComputedStyle(this.$refs.element).height - document.getElementById('left-div').style.height = rightHeight - }, methods: { showPwd() { // 明文显示密码 if (this.pwdType === 'password') { diff --git a/static/images/tabpage/bg.jpg b/static/images/tabpage/bg.jpg new file mode 100644 index 0000000..cc73f1d --- /dev/null +++ b/static/images/tabpage/bg.jpg Binary files differ diff --git a/static/images/tabpage/ny.png b/static/images/tabpage/ny.png new file mode 100644 index 0000000..07f7174 --- /dev/null +++ b/static/images/tabpage/ny.png Binary files differ diff --git a/static/images/tabpage/wy.png b/static/images/tabpage/wy.png new file mode 100644 index 0000000..06df949 --- /dev/null +++ b/static/images/tabpage/wy.png Binary files differ diff --git a/.idea/dcms_coo_front.iml b/.idea/dcms_coo_front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/dcms_coo_front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/config/dev.env.js b/config/dev.env.js index c0fcc27..64f2fc3 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,5 +10,5 @@ // BASE_API: '"http://119.254.103.80:14537"' // BASE_API: '"http://192.168.0.225:14537"' // BASE_API: '"http://localhost:8080/api/"' - BASE_API: '"http://111.198.10.15:11403"' + BASE_API: '"http://111.198.10.15:11409"' }) diff --git a/config/index.js b/config/index.js index 02c56f5..15838f5 100644 --- a/config/index.js +++ b/config/index.js @@ -52,9 +52,9 @@ //下面是生产编译环境下的一些配置 build: { // 下面是相对路径的拼接,配置index属性的属性值 - index: path.resolve(__dirname, '../dcms/index.html'), + index: path.resolve(__dirname, '../dist/index.html'), // 定义静态资源的根目录 - assetsRoot: path.resolve(__dirname, '../dcms'), + assetsRoot: path.resolve(__dirname, '../dist'), // 定义静态资源根目录的子目录 assetsSubDirectory: 'static', /** diff --git a/config/prod.env.js b/config/prod.env.js index cc59c91..94dc6b6 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - BASE_API: '"http://139.198.16.38:8093"', + BASE_API: '"http://111.198.10.15:11409"', } diff --git a/package-lock.json b/package-lock.json index 97ea0c8..24656f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,6 +6664,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npm.taobao.org/leaflet/download/leaflet-1.7.1.tgz", + "integrity": "sha1-ENaEkW7f4b9B1oijuXEnwDIqKhk=" + }, "levn": { "version": "0.3.0", "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", diff --git a/src/icons/svg/icon-camera.svg b/src/icons/svg/icon-camera.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-car.svg b/src/icons/svg/icon-car.svg new file mode 100644 index 0000000..50f7700 --- /dev/null +++ b/src/icons/svg/icon-car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-sanitation.svg b/src/icons/svg/icon-sanitation.svg new file mode 100644 index 0000000..7ab2ee9 --- /dev/null +++ b/src/icons/svg/icon-sanitation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index c673350..e41df7c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,9 +12,10 @@ // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 + console.log('to Path:' + to.path) // 如果有token if (getToken()) { - console.log('to Path:' + to.path) + console.log('hasToken') // 登录后进入登录页 if (to.path === '/login') { next({ path: '/login' }) @@ -29,6 +30,7 @@ // 如果已有当前可进入的子系统,刷新子系统菜单 const currentSys = getCurrentSys() if (currentSys) { + console.log('hasCurrentSystem') // 远程访问获取权限列表(菜单&按钮) store.dispatch('GetMenus', currentSys).then(() => { store.commit('SET_CHANGEFLAG', '0') @@ -37,9 +39,11 @@ next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record }) } else { // 没有当前子系统信息,跳转到选择子系统页面 + console.log('dontHasCurrentSystem') next({ path: '/dashboard' }) } }).catch((err) => { + console.log('toFedLogOut') store.dispatch('FedLogOut').then(() => { Message.error(err || '权限验证失败,请重新登录系统') next({ path: '/' }) @@ -52,8 +56,10 @@ } } else { if (whiteList.indexOf(to.path) !== -1) { // 免登录白名单,直接进入 + console.log('is In WhiteList') next() } else { + console.log('noTokentoToLogin') // next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页 next('/login') // 否则全部重定向到登录页 NProgress.done() diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 7e9a92d..12e0d1d 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -5,26 +5,26 @@
-
+
- - - - -
-
{{ system.name }}
-
- -
-
+ + +
+ +
+
{{ system.name }}
+ +
+ +
-
+
- - - - + + + +
@@ -40,12 +40,22 @@ data() { return { bgUrl: require('../../assets/login_images/bg-blue.png'), // 背景图片 - loading: true + loading: true, // 加载状态 + pageSize: 9, // 一页子系统数量 + page: 1 // 第几页 } }, computed: { + currentSystems() { + const first = (this.page - 1) * this.pageSize + 0 + const last = (this.page - 1) * this.pageSize + this.pageSize + return this.$store.getters.systems.slice(first, last) + }, systems() { return this.$store.getters.systems + }, + fullPage() { + return Math.ceil(this.$store.getters.systems.length / this.pageSize) } }, created() { @@ -62,14 +72,32 @@ changeSystem(system) { console.log(system.url) this.$store.commit('SET_SYSTEM', system) - // this.$message('进入' + system.name) - // debugger - // this.$router.push(system.url) + // 判断是外部链接还是本项目的路由 + if (system.url.indexOf('http') > -1) { + // 取token + const params = '?token=' + this.$store.getters.token + debugger + window.open(system.url + params, '_blank') + } else { + this.$router.push(system.url) + } }, logout() { this.$store.dispatch('LogOut').then(() => { location.reload() // 为了重新实例化vue-router对象 避免bug }) + }, + // 下一页 + nextPage() { + if (this.page < this.fullPage) { + this.page++ + } + }, + // 上一页 + prevPage() { + if (this.page > 1) { + this.page-- + } } } } @@ -78,9 +106,9 @@ diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 92cb5c5..9bd7427 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -24,7 +24,7 @@ 回首页 - + 修改密码 @@ -84,11 +84,18 @@ // 切换子系统 handleCommand(command) { console.log('切换子系统:' + command.name) - this.$store.commit('SET_CHANGEFLAG', '1') - this.$store.commit('SET_SYSTEM', command) - this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { - this.$router.replace(command.url) - }) + if(command.url.indexOf("http")>-1){ + // 取token + const params = '?token='+this.$store.getters.token + window.open(command.url+params, '_blank'); + }else{ + this.$store.commit('SET_CHANGEFLAG', '1') + this.$store.commit('SET_SYSTEM', command) + this.$store.dispatch('tagsView/delAllViews', true).then(({ visitedViews }) => { + this.$router.replace(command.url) + }) + } + }, // 获取子系统 getSystems() { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 76ad9a3..733b4f5 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -117,21 +117,11 @@ this.showKaptcha = this.$store.getters.kaptcha this.loading = false this.$message.success('连接服务器成功') - if (this.showKaptcha) { - var rightHeight = window.getComputedStyle(this.$refs.element).height - rightHeight = parseFloat(rightHeight.substring(0, rightHeight.length - 2)) - document.getElementById('left-div').style.height = (rightHeight + 64.897) + 'px' - } }).catch((e) => { this.$message.error('连接服务器失败') this.loading = false }) }, - mounted: function() { - // 自适应图片高度 - var rightHeight = window.getComputedStyle(this.$refs.element).height - document.getElementById('left-div').style.height = rightHeight - }, methods: { showPwd() { // 明文显示密码 if (this.pwdType === 'password') { diff --git a/static/images/tabpage/bg.jpg b/static/images/tabpage/bg.jpg new file mode 100644 index 0000000..cc73f1d --- /dev/null +++ b/static/images/tabpage/bg.jpg Binary files differ diff --git a/static/images/tabpage/ny.png b/static/images/tabpage/ny.png new file mode 100644 index 0000000..07f7174 --- /dev/null +++ b/static/images/tabpage/ny.png Binary files differ diff --git a/static/images/tabpage/wy.png b/static/images/tabpage/wy.png new file mode 100644 index 0000000..06df949 --- /dev/null +++ b/static/images/tabpage/wy.png Binary files differ diff --git a/static/images/tabpage/zy.png b/static/images/tabpage/zy.png new file mode 100644 index 0000000..587d660 --- /dev/null +++ b/static/images/tabpage/zy.png Binary files differ