src/permission.js
@@ -72,7 +72,9 @@ } else { // 跳转到目的路由 if (to.path !== '/terminal/login' && from.path !== '/' && from.path.split('/') [1] !== 'terminal' && to.path.split('/')[1] === 'terminal') { const postCode = store.getters.userInfo.post // 如果非操作工用户且要访问操作工页面则必须先跳转至终端登录页登录岗位为操作工用户方可访问 if (to.path !== '/terminal/login' && to.path.split('/')[1] === 'terminal' && postCode !== 'PCR0001') { next({ path: '/terminal/login' }) } else { next()