From 797f03be4fe1bd1f83072f5ca25909f4d2bd4b56 Mon Sep 17 00:00:00 2001
From: zhizhijie <zhizhijie@users.noreply.gitee.com>
Date: 星期一, 12 十月 2026 13:18:53 +0800
Subject: [PATCH] fix(城市客运): 公交/出租导入改按表头名定位列,兼容同事版少列模板 待验收
---
traffic-audit-web/src/router/index.js | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/traffic-audit-web/src/router/index.js b/traffic-audit-web/src/router/index.js
index 6316dc6..93d08e7 100644
--- a/traffic-audit-web/src/router/index.js
+++ b/traffic-audit-web/src/router/index.js
@@ -14,7 +14,9 @@
{ path: '/audit', name: 'AuditResult', component: () => import('@/views/AuditResult.vue') },
{ path: '/report', name: 'ReportExport', component: () => import('@/views/ReportExport.vue') },
{ path: '/rules', name: 'RuleManage', component: () => import('@/views/RuleManage.vue') },
- { path: '/users', name: 'UserManage', component: () => import('@/views/UserManage.vue') }
+ { path: '/users', name: 'UserManage', component: () => import('@/views/UserManage.vue') },
+ { path: '/holiday-stat', name: 'HolidayStat', component: () => import('@/views/HolidayStat.vue') },
+ { path: '/system-config', name: 'SystemConfig', component: () => import('@/views/SystemConfig.vue'), meta: { requireAdmin: true } }
]
})
@@ -22,8 +24,12 @@
const token = sessionStorage.getItem('token')
if (to.path === '/login') {
next(token ? '/dashboard' : undefined)
+ } else if (!token) {
+ next('/login')
+ } else if (to.meta && to.meta.requireAdmin && sessionStorage.getItem('username') !== 'admin') {
+ next('/dashboard')
} else {
- next(token ? undefined : '/login')
+ next()
}
})
--
Gitblit v1.9.1