From 4a76f38f4ce917203d9e39190b3f1674f626a86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=93=B2=E5=A5=87?= <13840175730@139.com> Date: Wed, 22 Jan 2025 13:43:20 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E7=9C=8B=E6=9D=BF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 12 ++++- src/views/dashboard/components/Zyjh/index.vue | 50 +++++++++++++++++++ src/views/dashboard/index.vue | 4 +- 3 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 src/views/dashboard/components/Zyjh/index.vue diff --git a/src/permission.js b/src/permission.js index 0b6b2ca..ed53ecb 100644 --- a/src/permission.js +++ b/src/permission.js @@ -8,7 +8,10 @@ import getPageTitle from '@/utils/get-page-title' NProgress.configure({ showSpinner: false }) // NProgress Configuration -const whiteList = ['/menu','/login', '/auth-redirect','/kban','/sliao','/pwpg','/pwfk','/llpg','/llfk','/hxpg','/hxfk','/qgpg','/qgfk','/ljian','baogong'] // no redirect whitelist +const whiteList = ['/menu','/login', '/auth-redirect','/kban','/sliao','/pwpg','/pwfk','/llpg','/llfk','/hxpg','/hxfk','/qgpg','/qgfk','/ljian','/baogong'] // no redirect whitelist +// const whiteList = ['/menu','/login', '/auth-redirect','/kban','/ljian','/baogong'] +const checkBmList=['/sliao','/pwpg','/pwfk','/llpg','/llfk','/hxpg','/hxfk','/qgpg','/qgfk'] + export function flatRoutes(routes) { let ret = []; routes.forEach(it => { @@ -44,6 +47,13 @@ router.beforeEach(async(to, from, next) => { } else { // determine whether the user has obtained his permission roles through getInfo + // if (checkBmList.includes(to.path)) { + // if (to.query.zyq!==store.getters.bmbm){ + // next({ path: '/' }) + // return + // } + // } + const hasRoles = store.getters.roles && store.getters.roles.length > 0 if (hasRoles) { next() diff --git a/src/views/dashboard/components/Zyjh/index.vue b/src/views/dashboard/components/Zyjh/index.vue new file mode 100644 index 0000000..febf190 --- /dev/null +++ b/src/views/dashboard/components/Zyjh/index.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 5371005..9a132a4 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -1,5 +1,6 @@