diff --git a/src/js/dai/request.js b/src/js/dai/request.js index 92fb7831..709895d6 100644 --- a/src/js/dai/request.js +++ b/src/js/dai/request.js @@ -4,6 +4,7 @@ import axios from "axios"; import curry from "dai-js/tools/curry"; import { Message } from "element-ui"; +import { clearLoginInfo } from "@/utils"; const request = curry( (method, url, data = {}, headers = {}, progress = () => {}) => { @@ -42,6 +43,7 @@ const request = curry( // 10005 token为空 10006登陆超时 10007别处登录 console.log("登录失效"); Message.error(res.data.msg); + clearLoginInfo(); return next({ name: "login", }); diff --git a/src/js/dai/request2.js b/src/js/dai/request2.js index 92fb7831..709895d6 100644 --- a/src/js/dai/request2.js +++ b/src/js/dai/request2.js @@ -4,6 +4,7 @@ import axios from "axios"; import curry from "dai-js/tools/curry"; import { Message } from "element-ui"; +import { clearLoginInfo } from "@/utils"; const request = curry( (method, url, data = {}, headers = {}, progress = () => {}) => { @@ -42,6 +43,7 @@ const request = curry( // 10005 token为空 10006登陆超时 10007别处登录 console.log("登录失效"); Message.error(res.data.msg); + clearLoginInfo(); return next({ name: "login", }); diff --git a/src/router/index.js b/src/router/index.js index ad616091..9f87613e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -94,6 +94,16 @@ export const moduleRoutes = { isTab: true, }, }, + { + path: "404", + props: true, + component: () => import("@/views/modules/404"), + name: "main-404", + meta: { + title: "页面未找到或无权访问", + isTab: false, + }, + }, ], }; @@ -129,6 +139,16 @@ export const moduleShujuRoutes = { isTab: false, }, }, + { + path: "404", + props: true, + component: () => import("@/views/modules/visual/404"), + name: "main-shuju-404", + meta: { + title: "页面未找到或无权访问", + isTab: false, + }, + }, ], }; @@ -193,194 +213,8 @@ router.beforeEach((to, from, next) => { const customerId = localStorage.getItem("customerId"); console.log("customerId:", customerId); - window.SITE_CONFIG["menuShujuList"] = [ - // { - // url: "/visual/plugin/power/organization", - // name: "动力主轴", - // id: "5feawfwaefwa577", - // }, - { - id: "22213213", - name: "基础信息", - // url: "visual/basicinfo/basicInfoMain", - children: [ - { - url: "/visual/basicinfo/basicInfoMain", - name: "人房信息统计", - id: "5feawfwaefwa5", - }, - { - url: "/visual/basicinfo/personCategory/index", - name: "人员类别分析", - id: "5fwaefwaefawef5", - }, - { - url: "/visual/basicinfo/houseStatic/houseStatic", - name: "人房概览统计", - id: "5fwaefwaefawef6", - }, - ], - }, - { - icon: "icon-setting", - id: "2", - name: "人员图谱", - url: "visual/basicinfo/peopleSearch", - }, - { - icon: "icon-setting", - id: "3", - name: "人员预警", - url: "visual/warning/index", - }, - { - icon: "icon-setting", - id: "2221321001", - name: "社区党建", - // url: "visual/basicinfo/basicInfoMain", - children: [ - { - url: "/visual/communityParty/gridParty", - name: "网格党建平面图", - id: "5feawfwaefwa579", - }, - { - url: "/visual/communityParty/party", - name: "党员信息统计", - id: "5feawfwaefwa578", - }, - { - url: "/visual/communityParty/community", - name: "联建单位分析", - id: "5fwaefwaefawef588", - }, - { - url: "/visual/communityParty/elegant", - name: "党员风采榜", - id: "5fwaefwaefawef589", - }, - ], - }, - { - icon: "icon-setting", - id: "2221321123", - name: "社区服务", - // url: "visual/basicinfo/basicInfoMain", - children: [ - { - url: "/visual/measure/service", - name: "需求服务分析", - id: "5feawfwaefwa57", - }, - { - url: "/visual/measure/volunteer", - name: "志愿服务分析", - id: "5fwaefwaefawef58", - }, - ], - }, - { - icon: "icon-setting", - id: "6", - name: "社区治理", - children: [ - { - url: "visual/communityGovern/shijianchuli/shijianchulifenxi", - name: "事件处理分析", - id: "shijianchulifenxi", - }, - // { - // url: "visual/communityGovern/processAnalyze", - // name: "事件处置分析", - // id: "processAnalyze", - // }, - { - url: "/visual/communityGovern/shijianfenlei/shijianfenleifenxi", - name: "事件分类分析", - id: "shijianfenleifenxi", - }, - { - url: "/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi", - name: "多元服务分析", - id: "duoyuanfuwufenxi", - }, - // { - // url: "/visual/communityGovern/typeAnalyze", - // name: "事件分类分析", - // id: "typeAnalyze", - // }, - // { - // url: "/visual/communityGovern/resibuzz", - // name: "居民热议分析", - // id: "resibuzz", - // }, - // { - // url: "/visual/communityGovern/distributionAnalyze", - // name: "事件分布分析", - // id: "distributionAnalyze", - // }, - ], - }, - - { - icon: "icon-setting", - id: "2221321fefefaewfa123", - name: "初心互助", - url: "visual/heart/index", - children: [], - }, - { - icon: "icon-setting", - id: "2221321fefefaewfa122223", - name: "疫情防控", - url: "", - children: [], - }, - { - icon: "icon-setting", - id: "44rq22222q2222", - name: "智慧安防", - // url: "visual/basicinfo/basicInfoMain", - children: [ - { - url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/monitor-panel", - // url: "/visual/ai/index", - name: "视频监控", - id: "5feawfwa111111efwa57", - }, - /*{ - url: "/visual/ai/renliu", - name: "人流数据", - id: "5fwaefwae222112fawef58", - }, - { - url: "/visual/ai/cheliu", - name: "车流数据", - id: "erawerwecsxefwaw", - }, - { - url: "/visual/ai/shebei", - name: "设备数据", - id: "zfzffewaf", - }, - { - url: "/visual/ai/gongdan", - name: "工单数据", - id: "fewafwafewaefddd", - },*/ - { - // url: "/visual/ai/yujing", - url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/data-analysis", - name: "预警分析", - id: "545345fdsfs", - }, - ], - }, - ]; - // fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]); - http - .get("/gov/access/menu/nav?tableName=data_menu") + .get("gov/access/menu/navDigitalCommunity?tableName=data_menu") .then(({ data: res }) => { if (res.code == 10005 || res.code == 10006 || res.code == 10007) { // 10005 token为空 10006登陆超时 10007别处登录 @@ -406,7 +240,7 @@ router.beforeEach((to, from, next) => { }); http - .get("/gov/access/menu/nav") + .get("gov/access/menu/navDigitalCommunity") .then(({ data: res }) => { if (res.code == 10005 || res.code == 10006 || res.code == 10007) { // 10005 token为空 10006登陆超时 10007别处登录 @@ -519,10 +353,10 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) { children: routes, }, { - path: "*", - // redirect: { - // name: "404", - // }, + path: "/main/*", + redirect: { + path: "/main/404", + }, }, ]); window.SITE_CONFIG["dynamicMenuRoutes"] = routes; @@ -593,10 +427,10 @@ function fnAddDynamicMenuRoutes2(menuList = [], routes = []) { children: routes, }, { - path: "*", - // redirect: { - // name: "404", - // }, + path: "/main-shuju/*", + redirect: { + path: "/main-shuju/404", + }, }, ]); window.SITE_CONFIG["dynamicMenuRoutesShuju"] = routes; diff --git a/src/utils/index.js b/src/utils/index.js index c2232ac7..1e6b6e6f 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -45,6 +45,7 @@ export function getDictLabel(dictType, dictValue) { export function clearLoginInfo() { store.commit('resetStore') Cookies.remove('token') + localStorage.setItem("token", ''); window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = false } diff --git a/src/views/modules/404.vue b/src/views/modules/404.vue new file mode 100644 index 00000000..33682a33 --- /dev/null +++ b/src/views/modules/404.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index 8860180f..c61ba5f5 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -1,2236 +1,2477 @@ \ No newline at end of file diff --git a/src/views/modules/visual/404.vue b/src/views/modules/visual/404.vue new file mode 100644 index 00000000..047aec70 --- /dev/null +++ b/src/views/modules/visual/404.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/views/modules/visual/communityGovern/fivelayers/mapIndex copy.vue b/src/views/modules/visual/communityGovern/fivelayers/mapIndex copy.vue index f2834df4..2c84054e 100644 --- a/src/views/modules/visual/communityGovern/fivelayers/mapIndex copy.vue +++ b/src/views/modules/visual/communityGovern/fivelayers/mapIndex copy.vue @@ -923,7 +923,7 @@ const vueGis = { // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icDangerousChemicals/detail" let params = { - icSuperiorResourceId: info.id + icDangerousChemicalsId: info.id } const { data, code, msg } = await requestPost(url, params) diff --git a/src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue b/src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue index 0128dd05..117deb9a 100644 --- a/src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue +++ b/src/views/modules/visual/communityGovern/fivelayers/mapIndex.vue @@ -922,7 +922,7 @@ const vueGis = { // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icDangerousChemicals/detail" let params = { - icSuperiorResourceId: info.id + icDangerousChemicalsId: info.id } const { data, code, msg } = await requestPost(url, params) diff --git a/src/views/modules/workSys/role/role.vue b/src/views/modules/workSys/role/role.vue new file mode 100644 index 00000000..da7d11f5 --- /dev/null +++ b/src/views/modules/workSys/role/role.vue @@ -0,0 +1,379 @@ + + + + + + diff --git a/src/views/modules/workSys/role/roleForm.vue b/src/views/modules/workSys/role/roleForm.vue new file mode 100644 index 00000000..0e0304a2 --- /dev/null +++ b/src/views/modules/workSys/role/roleForm.vue @@ -0,0 +1,356 @@ + + + + + + + + + + + diff --git a/src/views/pages/404.vue b/src/views/pages/404.vue index 5d49d643..e7796ec6 100644 --- a/src/views/pages/404.vue +++ b/src/views/pages/404.vue @@ -2,11 +2,11 @@
-

404

+

页面未找到或无权访问

{{ $t('notFound.back') }} - {{ $t('notFound.home') }} + {{ $t('notFound.home') }}
diff --git a/src/views/pages/index.vue b/src/views/pages/index.vue index 056814c6..19ec9d88 100644 --- a/src/views/pages/index.vue +++ b/src/views/pages/index.vue @@ -5,14 +5,14 @@
- +
数字社区管理平台
- +
数字社区可视化平台
@@ -21,7 +21,9 @@ @@ -29,60 +31,69 @@
diff --git a/src/views/pages/login.vue b/src/views/pages/login.vue index 6db09b13..10cf96a9 100644 --- a/src/views/pages/login.vue +++ b/src/views/pages/login.vue @@ -247,7 +247,7 @@ export default { localStorage.setItem("userType", "work"); localStorage.setItem("showHeader", "0"); localStorage.setItem("token", res.data.token); - this.$router.replace({ name: "home" }); + this.$router.replace({ name: "index" }); }) .catch(() => {}); // epmet-ext9.elinkservice.cn/platform-admin