mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-21 18:33:41 +08:00
fix bugs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { RouteRecordRaw } from "vue-router";
|
||||
import Dashboard from "../../components/Dashboard.vue";
|
||||
import OverView from "../../views/OverView.vue";
|
||||
import { ROLE, RouteName, RoutePath } from "../constants";
|
||||
import { EPermission, ERole, RouteName, RoutePath } from "../constants";
|
||||
import userManagementRoutes from "./user";
|
||||
|
||||
const dashboardRoutes: RouteRecordRaw = {
|
||||
@@ -40,7 +40,7 @@ const dashboardRoutes: RouteRecordRaw = {
|
||||
component: () => import("@/views/SchedulerView.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
hasRole: ROLE.ADMIN,
|
||||
hasPermission: EPermission.READ_SCHEDULER_PERMISSION,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -49,7 +49,7 @@ const dashboardRoutes: RouteRecordRaw = {
|
||||
component: () => import("@/views/DepartmentView.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
hasRole: ROLE.ADMIN,
|
||||
hasPermission: EPermission.READ_DEPARTMENT_PERMISSION,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -58,7 +58,7 @@ const dashboardRoutes: RouteRecordRaw = {
|
||||
component: () => import("@/views/PositionView.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
hasRole: ROLE.ADMIN,
|
||||
hasPermission: EPermission.READ_POSITION_PERMISSION,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RouteRecordRaw } from "vue-router";
|
||||
import { ROLE, RouteName, RoutePath } from "../constants";
|
||||
import { EPermission, ERole, RouteName, RoutePath } from "../constants";
|
||||
|
||||
const userManagementRoutes: RouteRecordRaw[] = [
|
||||
{
|
||||
@@ -8,7 +8,7 @@ const userManagementRoutes: RouteRecordRaw[] = [
|
||||
component: () => import("@/views/UserView.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
hasRole: ROLE.ADMIN,
|
||||
hasPermission: EPermission.READ_USER_ROLE_PERMISSION,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -17,7 +17,7 @@ const userManagementRoutes: RouteRecordRaw[] = [
|
||||
component: () => import("@/views/RoleView.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
hasRole: ROLE.ADMIN,
|
||||
hasPermission: EPermission.READ_USER_ROLE_PERMISSION,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -26,7 +26,7 @@ const userManagementRoutes: RouteRecordRaw[] = [
|
||||
component: () => import("@/views/BindRoleView.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
hasRole: ROLE.ADMIN,
|
||||
hasPermission: EPermission.WRITE_USER_ROLE_PERMISSION,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -35,7 +35,7 @@ const userManagementRoutes: RouteRecordRaw[] = [
|
||||
component: () => import("@/views/BindDepartmentView.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
hasRole: ROLE.ADMIN,
|
||||
hasPermission: EPermission.WRITE_USER_ROLE_PERMISSION,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -44,7 +44,7 @@ const userManagementRoutes: RouteRecordRaw[] = [
|
||||
component: () => import("@/views/BindPermissionView.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
hasRole: ROLE.ADMIN,
|
||||
hasPermission: EPermission.WRITE_USER_ROLE_PERMISSION,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -53,7 +53,7 @@ const userManagementRoutes: RouteRecordRaw[] = [
|
||||
component: () => import("@/views/PermissionView.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
hasRole: ROLE.ADMIN,
|
||||
hasPermission: EPermission.READ_USER_ROLE_PERMISSION,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -62,7 +62,7 @@ const userManagementRoutes: RouteRecordRaw[] = [
|
||||
component: () => import("@/views/BindPositionView.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
hasRole: ROLE.ADMIN,
|
||||
hasPermission: EPermission.WRITE_USER_ROLE_PERMISSION,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user