|
@@ -7,7 +7,7 @@ import { isNil } from "lodash-es";
|
|
|
import { useMainStore } from "@/store";
|
|
|
|
|
|
// components
|
|
|
-import RoutOrg from '@/features/rootOrg/RootOrg.vue';
|
|
|
+import RoutOrg from "@/features/rootOrg/RootOrg.vue";
|
|
|
import AuthManagement from "@/features/authManagement/AuthManagement.vue";
|
|
|
import RootOrgEdit from "@/features/rootOrg/RootOrgEdit.vue";
|
|
|
import SubOrg from "@/features/subOrg/SubOrg.vue";
|
|
@@ -24,8 +24,9 @@ import PaperAnalysis from "@/features/paperAnalysis/PaperAnalysis.vue";
|
|
|
import AllAnalysis2 from "@/features/allAnalysis/AllAnalysis2.vue";
|
|
|
import ProjectCompareManagement from "@/features/projectCompareManagement/ProjectCompareManagement.vue";
|
|
|
import ProjectCompareDetail2 from "@/features/projectCompareDetail/ProjectCompareDetail2.vue";
|
|
|
+import TaskManagement from "@/features/taskManagement/TaskManagement.vue";
|
|
|
// report
|
|
|
-import ReportMain from '@/features/report/ReportMain.vue';
|
|
|
+import ReportMain from "@/features/report/ReportMain.vue";
|
|
|
|
|
|
const routes = [
|
|
|
{ path: "/", redirect: "/login" },
|
|
@@ -103,13 +104,17 @@ const routes = [
|
|
|
path: "projectCompareDetail",
|
|
|
component: ProjectCompareDetail2,
|
|
|
},
|
|
|
+ {
|
|
|
+ path: "taskManagement",
|
|
|
+ component: TaskManagement,
|
|
|
+ },
|
|
|
],
|
|
|
component: Layout,
|
|
|
},
|
|
|
{
|
|
|
- path:'/report/:viewType/:projectId/:paperId/:compareProjectId?',
|
|
|
- name:'PaperReport',
|
|
|
- component:ReportMain
|
|
|
+ path: "/report/:viewType/:projectId/:paperId/:compareProjectId?",
|
|
|
+ name: "PaperReport",
|
|
|
+ component: ReportMain,
|
|
|
},
|
|
|
{
|
|
|
path: "/:pathMatch(.*)*",
|
|
@@ -141,7 +146,11 @@ export async function routeLogout(params: {
|
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
const token = getToken();
|
|
|
- if (isNil(token) && !to.path.includes("/login") && !to.path.includes('/report')) {
|
|
|
+ if (
|
|
|
+ isNil(token) &&
|
|
|
+ !to.path.includes("/login") &&
|
|
|
+ !to.path.includes("/report")
|
|
|
+ ) {
|
|
|
routeLogout({ cause: "missingToken", redirectTo: to.fullPath })
|
|
|
.then(() => next(false))
|
|
|
.catch((e) => console.log(e));
|