|
@@ -97,7 +97,10 @@ router.beforeEach((to, from, next) => {
|
|
|
.dispatch("getUserInfo")
|
|
.dispatch("getUserInfo")
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
if (to.name === "inspectorList") {
|
|
if (to.name === "inspectorList") {
|
|
|
- if (store.state.role === "ROLE_EXPERT") {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ store.state.role === "ROLE_EXPERT" ||
|
|
|
|
|
+ store.state.role === "ROLE_DISTRICT_STAFF"
|
|
|
|
|
+ ) {
|
|
|
next("/expertList");
|
|
next("/expertList");
|
|
|
} else {
|
|
} else {
|
|
|
next();
|
|
next();
|
|
@@ -113,7 +116,10 @@ router.beforeEach((to, from, next) => {
|
|
|
} else if (store.state.userInfo && to.name === "inspectorList") {
|
|
} else if (store.state.userInfo && to.name === "inspectorList") {
|
|
|
if (store.state.role === "ROLE_SUPERVISOR") {
|
|
if (store.state.role === "ROLE_SUPERVISOR") {
|
|
|
next();
|
|
next();
|
|
|
- } else if (store.state.role === "ROLE_EXPERT") {
|
|
|
|
|
|
|
+ } else if (
|
|
|
|
|
+ store.state.role === "ROLE_EXPERT" ||
|
|
|
|
|
+ store.state.role === "ROLE_DISTRICT_STAFF"
|
|
|
|
|
+ ) {
|
|
|
next("/expertList");
|
|
next("/expertList");
|
|
|
}
|
|
}
|
|
|
} else if (!to.matched.length) {
|
|
} else if (!to.matched.length) {
|