From 3d7d354cfd684f450e61ef6283e41ea959e2aa96 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Sun, 25 Jun 2023 10:31:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?revert:=20=E5=8E=BB=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/panel/panel.js | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/api/panel/panel.js b/frontend/src/api/panel/panel.js index 036576da5c..c0eddc88dd 100644 --- a/frontend/src/api/panel/panel.js +++ b/frontend/src/api/panel/panel.js @@ -193,7 +193,6 @@ export function initPanelData(panelId, useCache = false, callback) { watermarkInfo: watermarkInfo }) const targetPanelId = response.data.panelType==='system'?response.data.source:panelId - if(response.data.type==='default') // 刷新联动信息 getPanelAllLinkageInfo(targetPanelId).then(rsp => { store.commit('setNowPanelTrackInfo', rsp.data) From f9550fe7346411a1f5e86d7f593255d8b1f2d714 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Sun, 25 Jun 2023 10:32:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E6=9D=BF=E5=90=8E?= =?UTF-8?q?=E9=80=80=E5=88=B0=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E6=98=BE=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/permission.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/src/permission.js b/frontend/src/permission.js index efcede886b..3358904ec1 100644 --- a/frontend/src/permission.js +++ b/frontend/src/permission.js @@ -93,6 +93,17 @@ router.beforeEach(async (to, from, next) => routeBefore(() => { if (hasGetUserInfo || to.path.indexOf('/previewScreenShot/') > -1 || to.path.indexOf('/preview/') > -1 || to.path.indexOf('/delink') > -1 || to.path.indexOf('/nolic') > -1) { next() store.dispatch('permission/setCurrentPath', to.path) + let route = store.getters.permission_routes.find( + item => item.path === '/' + to.path.split('/')[1] + ) + // 如果找不到这个路由,说明是首页 + if (!route) { + route = store.getters.permission_routes.find(item => item.path === '/') + } + store.commit('permission/SET_CURRENT_ROUTES', route) + if (['system'].includes(route.name)) { + store.dispatch('app/toggleSideBarHide', false) + } } else { if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息 // get user info