pull/1/head
LiuJiaNan 2024-02-20 16:39:30 +08:00
parent 6b17aa7db0
commit 42002585a4
2 changed files with 1 additions and 3 deletions

View File

@ -8,7 +8,6 @@ import children from "@/components/children/index";
import { MODEL } from "@/assets/js/constant"; import { MODEL } from "@/assets/js/constant";
// import asyncRouter from "@/assets/js/asyncRouter"; // import asyncRouter from "@/assets/js/asyncRouter";
import { getAsyncRouter } from "@/request/api"; import { getAsyncRouter } from "@/request/api";
// import { getRouteTreeAll } from "@/request/system_management.js";
const modules = import.meta.glob([ const modules = import.meta.glob([
"./views/**/*.vue", "./views/**/*.vue",
@ -31,7 +30,6 @@ router.beforeEach(async (to, from, next) => {
// pinia里没有储存路由去后台获取路由 // pinia里没有储存路由去后台获取路由
if (routerStore.getRouters.length === 0) { if (routerStore.getRouters.length === 0) {
const resData = await getAsyncRouter(); const resData = await getAsyncRouter();
// const resData = await getRouteTreeAll();
storageRouter = resData.routeList; // 后台请求得到的路由数据 storageRouter = resData.routeList; // 后台请求得到的路由数据
// storageRouter = asyncRouter; // 死路由 // storageRouter = asyncRouter; // 死路由
routerStore.setRouters(storageRouter); // 存储路由 routerStore.setRouters(storageRouter); // 存储路由

View File

@ -34,7 +34,7 @@ import UserUsage from "./components/user_usage.vue";
import TaskProcessing from "./components/task_processing.vue"; import TaskProcessing from "./components/task_processing.vue";
import Situation from "./components/situation.vue"; import Situation from "./components/situation.vue";
import AssignmentType from "./components/assignment_type.vue"; import AssignmentType from "./components/assignment_type.vue";
import videoCenter from "./components/video_center.vue"; import VideoCenter from "./components/video_center.vue";
import HiddenDangerSituation from "./components/hidden_danger_situation.vue"; import HiddenDangerSituation from "./components/hidden_danger_situation.vue";
import FullStaffTraining from "./components/full_staff_training.vue"; import FullStaffTraining from "./components/full_staff_training.vue";
import ExamStatistics from "./components/exam_statistics.vue"; import ExamStatistics from "./components/exam_statistics.vue";