import { getNavs } from "@/plugins/utils";

// 管理员（科组长）打分模块
import MarkHome from "../modules/mark/MarkHome";
import MarkProgress from "../modules/mark/MarkProgress";
import MarkDetail from "../modules/mark/MarkDetail";
import MarkTaskManage from "../modules/mark/MarkTaskManage";
import MarkGroupManage from "../modules/mark/MarkGroupManage";
// 阅卷员打分
import MarkOperation from "../modules/mark/MarkOperation";

const markRoutes = [
  {
    path: "mark-progress",
    name: "MarkProgress",
    component: MarkProgress,
    meta: {
      title: "打分进度"
    }
  },
  {
    path: "mark-task-manage",
    name: "MarkTaskManage",
    component: MarkTaskManage,
    meta: {
      title: "任务发布"
    }
  },
  {
    path: "mark-detail",
    name: "MarkDetail",
    component: MarkDetail,
    meta: {
      title: "打分详情"
    }
  },
  {
    path: "mark-group-manage",
    name: "MarkGroupManage",
    component: MarkGroupManage,
    meta: {
      title: "打分分组"
    }
  }
];

export const navs = getNavs(markRoutes);

export default [
  {
    path: "/mark/:workId(\\d+)/:subjectId",
    name: "Mark",
    component: MarkHome,
    redirect: { name: "MarkProgress" },
    children: markRoutes
  },
  {
    path: "/mark-operation/:workId(\\d+)/:subjectId",
    name: "MarkOperation",
    component: MarkOperation,
    meta: {
      title: "阅卷员打分"
    }
  }
];
