/**
 * @name umi 的路由配置
 * @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置
 * @param path  path 只支持两种占位符配置，第一种是动态参数 :id 的形式，第二种是 * 通配符，通配符只能出现路由字符串的最后。
 * @param component 配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径，也可以是相对路径，如果是相对路径，会从 src/pages 开始找起。
 * @param routes 配置子路由，通常在需要为多个路径增加 layout 组件时使用。
 * @param redirect 配置路由跳转
 * @param wrappers 配置路由组件的包装组件，通过包装组件可以为当前的路由组件组合进更多的功能。 比如，可以用于路由级别的权限校验
 * @param name 配置路由的标题，默认读取国际化文件 menu.ts 中 menu.xxxx 的值，如配置 name 为 login，则读取 menu.ts 中 menu.login 的取值作为标题
 * @param icon 配置路由的图标，取值参考 https://ant.design/components/icon-cn， 注意去除风格后缀和大小写，如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward，如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User
 * @doc https://umijs.org/docs/guides/routes
 */
export default [
    /** 登录认证 */
    {
        path: '/login',
        layout: false,
        component: './auth/Login',
    },


    /** 工作台 */
    {
        path: '/wb',
        component: './Workbench',
    },
    /** 根目录跳工作台 */
    {
        path: '/',
        redirect: '/wb',
    },


    // -------------------------------------------------------------------
    // 监管端
    // -------------------------------------------------------------------
    /** 基础资料 */
    {
        path: '/base-s',
        routes: [
            // {
            //     path: '/base-s',
            //     redirect: '/base-s/class',
            // },

            /** 学校班级 */
            {
                path: '/base-s/class',
                component: './base-org/SchoolClass',
            },
        ],
    },
    /** 监测管理 */
    {
        path: '/exam-c',
        routes: [
            // {
            //     path: '/exam-c',
            //     redirect: '/exam-c/plan',
            // },

            // ------------------------------------------------
            /** 监测计划管理 */
            {
                path: '/exam-c/plan',
                component: './exam-center/ExamPlan',
            },
            /** 监测计划详细 */
            {
                path: '/exam-c/plan/detail/:id',
                component: './exam-center/ExamPlanDetail',
            },
            /** 监测结果管理 */
            {
                path: '/exam-c/plan/result/:examPlanId/:publishId',
                component: './exam-center/ExamResultDetail',
            },
            /** 监测抽样详细 */
            {
                path: '/exam-c/plan/sample/detail/:id',
                component: './exam-center/sample/ExamSampleDetail',
            },
            /** 监测科目管理*/
            {
                path: '/exam-c/plan/course/:examPlanId',
                component: './exam-center/ExamCourse',
            },

            // ------------------------------------------------
            /** 监测特殊学生审核计划列表 */
            {
                path: '/exam-c/sp-stu-audit',
                component: './exam-center/special-student/special-student-audit',
            },
            /** 监测特殊学生审核学校列表 */
            {
                path: '/exam-c/sp-stu-audit/list/:examPlanId',
                component: './exam-center/special-student/special-student-audit/ExamSpecialStudentAuditList',
            },
            /** 监测特殊学生审核学校主页 */
            {
                path: '/exam-c/sp-stu-audit/org/:sysOrgId/:examPlanId',
                component: './exam-center/special-student/special-student-audit/ExamSpecialStudentAuditOrg',
            },

            // ------------------------------------------------
            /** 监测缺测替补学生审核计划列表 */
            {
                path: '/exam-c/absent-audit',
                component: './exam-center/absent-replace/absent-replace-audit',
            },
            /** 监测缺测替补学生审核学校列表 */
            {
                path: '/exam-c/absent-audit/list/:examPlanId',
                component: './exam-center/absent-replace/absent-replace-audit/ExamAbsentReplaceAuditList',
            },
            /** 监测缺测替补学生审核学校主页 */
            {
                path: '/exam-c/absent-audit/org/:sysOrgId/:examPlanId',
                component: './exam-center/absent-replace/absent-replace-audit/ExamAbsentReplaceAuditOrg',
            },

            // ------------------------------------------------
            /** 试卷管理 */
            {
                path: '/exam-c/ep',
                component: './exam-center/exam-paper',
            },
            {
                path: '/exam-c/ep/course/:examPlanId',
                component: './exam-center/exam-paper/ExamPaperCourseList',
            },
            {
                path: '/exam-c/ep/course/detail/:examPaperId',
                component: './exam-center/exam-paper/ExamPaperDetail',
            },



            // ------------------------------------------------
            // 教研员
            // ------------------------------------------------

            // ------------------------------------------------
            /** 双向细目表编制 */
            {
                path: '/exam-c/tr-twcl',
                component: './teaching-research/twcl',
            },
            {
                path: '/exam-c/tr-twcl/course/:examPlanId',
                component: './teaching-research/twcl/TwclCourseList',
            },
            {
                path: '/exam-c/tr-twcl/course/detail/:examPaperId',
                component: './teaching-research/twcl/TwclDetail',
            },

            // ------------------------------------------------
            /** 问题建议编写 */
            {
                path: '/exam-c/tr-qs',
                component: './teaching-research/suggestion',
            },
            {
                path: '/exam-c/tr-qs/course/:examPlanId',
                component: './teaching-research/suggestion/SuggestionCourseList',
            },
        ],
    },


    // -------------------------------------------------------------------
    // 学校端
    // -------------------------------------------------------------------
    /** 评估监测 */
    {
        path: '/exam-s',
        routes: [
            // {
            //     path: '/exam-s',
            //     redirect: '/exam-s/plan',
            // },

            // ------------------------------------------------
            /** 监测计划管理 */
            {
                path: '/exam-s/plan',
                component: './exam-org/OrgExamPlan',
            },
            /** 监测计划详细 */
            {
                path: '/exam-s/plan/detail/:id',
                component: './exam-org/OrgExamPlanDetail',
            },


            /** 监测抽样统计 */
            {
                path: '/exam-s/plan/sample-count/:examDataPublishId',
                component: './exam-org/sample/OrgExamSampleCountList',
            },
            /** 监测抽样名单 */
            {
                path: '/exam-s/plan/sample-list/:examDataPublishId',
                component: './exam-org/sample/OrgExamSampleList',
            },


            // ------------------------------------------------
            /** 监测学生信息上报列表 */
            {
                path: '/exam-s/stu',
                component: './exam-org/student',
            },
            /** 监测学生信息上报处理 */
            {
                path: '/exam-s/stu/report/:examPlanId',
                component: './exam-org/student/OrgExamStudentReport',
            },
            /** 监测学生信息批量导入 */
            {
                path: '/exam-s/stu/import/:examPlanId',
                component: './exam-org/student/OrgExamStudentImport',
            },


            // ------------------------------------------------
            /** 监测特殊学生上报列表 */
            {
                path: '/exam-s/sp-stu',
                component: './exam-org/special-student',
            },
            /** 监测特殊学生上报处理 */
            {
                path: '/exam-s/sp-stu/report/:examPlanId',
                component: './exam-org/special-student/OrgExamSpecialStudentReport',
            },
            /** 监测特殊学生批量导入 */
            {
                path: '/exam-s/sp-stu/import/:examPlanId',
                component: './exam-org/special-student/OrgExamSpecialStudentImport',
            },


            // ------------------------------------------------
            /** 监测教师信息上报列表 */
            {
                path: '/exam-s/teacher',
                component: './exam-org/teacher',
            },
            /** 监测教师信息上报处理 */
            {
                path: '/exam-s/teacher/report/:examPlanId',
                component: './exam-org/teacher/OrgExamTeacherReport',
            },
            /** 监测教师信息批量导入 */
            {
                path: '/exam-s/teacher/import/:examPlanId',
                component: './exam-org/teacher/OrgExamTeacherImport',
            },


            // ------------------------------------------------
            /** 监测教师任教科目上报列表 */
            {
                path: '/exam-s/t-course',
                component: './exam-org/teacher-course',
            },
            /** 监测教师任教科目上报处理 */
            {
                path: '/exam-s/t-course/report/:examPlanId',
                component: './exam-org/teacher-course/OrgExamTeacherCourseReport',
            },
            /** 监测教师任教科目批量导入 */
            {
                path: '/exam-s/t-course/import/:examPlanId',
                component: './exam-org/teacher-course/OrgExamTeacherCourseImport',
            },


            // ------------------------------------------------
            /** 缺测替补学生上报列表 */
            {
                path: '/exam-s/absent',
                component: './exam-org/absent-replace',
            },
            /**缺测替补学生上报处理 */
            {
                path: '/exam-s/absent/report/:examPlanId',
                component: './exam-org/absent-replace/OrgExamAbsentReplaceReport',
            },
            /** 缺测替补学生批量导入 */
            {
                path: '/exam-s/absent/import/:examPlanId',
                component: './exam-org/absent-replace/OrgExamAbsentReplaceImport',
            },


            // ------------------------------------------------
            /** 校考成绩上报列表 */
            {
                path: '/exam-s/school-exam-score',
                component: './exam-org/school-exam-score',
            },
            {
                path: '/exam-s/school-exam-score/report/:examPlanId',
                component: './exam-org/school-exam-score/OrgSchoolExamScoreReport',
            },


            // ------------------------------------------------
            /** 家长问卷进度列表 */
            {
                path: '/exam-s/questionnaire/patriarch',
                component: './exam-org/questionnaire/patriarch',
            },
            /** 家长问卷进度详情 */
            {
                path: '/exam-s/questionnaire/patriarch/progress/:examPlanId',
                component: './exam-org/questionnaire/patriarch/OrgExamPatriarchProgress',
            },
        ],
    },


    // -------------------------------------------------------------------
    // 管理端
    // -------------------------------------------------------------------
    /** 基础数据 */
    {
        path: '/bd',
        routes: [
            // {
            //     path: '/bd',
            //     redirect: '/bd/grade',
            // },

            /** 年级 */
            {
                path: '/bd/grade',
                component: './bd/Grade',
            },
            /** 学科 */
            {
                path: '/bd/course',
                component: './bd/Course',
            },
            /** 高中选科组合 */
            {
                path: '/bd/ncee-course-comb',
                component: './bd/NceeCourseComb',
            },
            /** 学期 */
            {
                path: '/bd/semester',
                component: './bd/Semester',
            },
            /** 基础字典 */
            {
                path: '/bd/dict',
                component: './bd/Dict',
            },
        ],
    },
    /** 系统管理 */
    {
        path: '/sys',
        routes: [
            // {
            //     path: '/sys',
            //     redirect: '/sys/org',
            // },

            /** 组织机构 */
            {
                path: '/sys/org',
                component: './system/Org',
            },
            /** 用户管理 */
            {
                path: '/sys/user',
                component: './system/User',
            },
            /** 角色权限 */
            {
                path: '/sys/role',
                component: './system/Role',
            },
            /** 功能管理 */
            {
                path: '/sys/menu',
                component: './system/Menu',
            },
            /** 日志管理 */
            {
                path: '/sys/log',
                routes: [
                    /** 访问日志 */
                    {
                        path: '/sys/log/vis',
                        component: './system/log/LogVis',
                    },
                    /** 操作日志 */
                    {
                        path: '/sys/log/op',
                        component: './system/log/LogOp',
                    },
                    /** 异常日志 */
                    {
                        path: '/sys/log/ex',
                        component: './system/log/LogEx',
                    },
                ]
            },
        ],
    },

    {
        path: '*',
        layout: false,
        component: './404',
    },
];
