From 13d0b836591f5b2e84ac250531788f033e9aec6c Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Thu, 16 May 2024 18:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=87=E6=8C=A5=E8=B0=83?= =?UTF-8?q?=E5=BA=A6=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/common/menuData.js | 16 +++++++------- ruoyi-ui/src/router/index.js | 16 +++++++++++++- ruoyi-ui/src/store/modules/menu.js | 10 +++++---- .../components/HeaderMenu/CustomMenu.vue | 14 ++++++------- .../components/RecentPages/index.vue | 21 ++++++++++++++----- 5 files changed, 52 insertions(+), 25 deletions(-) diff --git a/ruoyi-ui/src/common/menuData.js b/ruoyi-ui/src/common/menuData.js index c5517702..c7db405c 100644 --- a/ruoyi-ui/src/common/menuData.js +++ b/ruoyi-ui/src/common/menuData.js @@ -88,12 +88,12 @@ export default [ name: "emergencyProcessManagement", component: "control/event/emergencyProcessManagement/index.vue", }, - { - title: "指挥调度", - path: "/control/event/commandDispatch", - name: "commandDispatch", - component: "control/event/commandDispatch/index.vue", - }, + // { + // title: "指挥调度", + // path: "/control/event/commandDispatch", + // name: "commandDispatch", + // component: "control/event/commandDispatch/index.vue", + // }, { title: "管控事件分析", path: "/control/event/governanceAnalysis", @@ -226,8 +226,8 @@ export default [ name: "InformationReleaseManagement", path: "/service/InformationReleaseManagement", component: "service/InformationReleaseManagement/index.vue" - }, - { + }, + { title: "公众服务统计", name: "publicService", path: "/service/publicService", diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 160652a3..7eed341a 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -90,6 +90,20 @@ const constantRoutes = [ } ] }, + { + path: '/control//event', + component: Layout, + hidden: true, + redirect: 'noredirect', + children: [ + { + path: 'commandDispatch', + component: () => import('@/views/JiHeExpressway/pages/control/event/commandDispatch/index'), + name: 'commandDispatch', + meta: { title: '指挥调度', icon: 'user' } + } + ] + }, // { // path: '/system/user-auth', // component: Layout, @@ -223,4 +237,4 @@ const constantRoutes = [ ] -export { constantRoutes }; \ No newline at end of file +export { constantRoutes }; diff --git a/ruoyi-ui/src/store/modules/menu.js b/ruoyi-ui/src/store/modules/menu.js index bd024a7c..cfad661f 100644 --- a/ruoyi-ui/src/store/modules/menu.js +++ b/ruoyi-ui/src/store/modules/menu.js @@ -3,7 +3,7 @@ const state = { recentPages: [], isRecentOpen:"", } - + const mutations = { saveRecent(state){ localStorage.setItem("recentPages", JSON.stringify(state.recentPages)); @@ -25,8 +25,10 @@ const state = { if (!temp){ item.active = true; state.recentPages.push(item); + } else { + let i = state.recentPages.findIndex(unit => unit.path == item.path); + state.recentPages[i] = item; } - mutations.saveRecent(state); }, @@ -65,7 +67,7 @@ const state = { } } - + const getters = { isRecentOpen(state){ if (state.isRecentOpen === ""){ @@ -80,4 +82,4 @@ const getters = { state, getters, mutations, - } \ No newline at end of file + } diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue b/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue index 0f6271d5..cda97021 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue @@ -1,32 +1,32 @@