import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
	{
		path: '/',
		name: 'qusetionBankManage',
		component: () => import("@/views/QusetionBankManage/QusetionBankManage"),
		meta: {
			title: '题库管理',
			requireAuth: true,
		}
	},
	{
		path: '/login',
		name: 'login',
		component: () => import("@/views/Login/Login"),
		meta: {
			title: '登录',
			full: true
		}
	},
	{
		path: '/baseData',
		name: 'baseData',
		component: () => import("@/views/BaseData/BaseData"),
		meta: {
			title: '基础数据管理',
			requireAuth: true,
		}
	},
	{
		path: '/examPaperManage',
		name: 'examPaperManage',
		component: () => import("@/views/ExamPaperManage/ExamPaperManage"),
		meta: {
			title: '试卷管理',
			requireAuth: true,
		}
	},
	{
		path: '/examPaperRecord',
		name: 'examPaperRecord',
		component: () => import("@/views/ExamPaperManage/ExamPaperRecord"),
		meta: {
			title: '试卷历史',
			requireAuth: true,
		}
	},
	{
		path: '/examPaperPreview',
		name: 'examPaperPreview',
		component: () => import("@/views/ExamPaperManage/ExamPaperPreview"),
		meta: {
			title: '试卷预览',
			requireAuth: true,
		}
	},
	{
		path: '/intelligencePaper',
		name: 'intelligencePaper',
		component: () => import("@/views/IntelligencePaper/IntelligencePaper"),
		meta: {
			title: '题库管理 / 智能组卷',
			requireAuth: true,
		}
	},
	{
		path: '/questionImportList',
		name: 'questionImportList',
		component: () => import("@/views/QusetionBankManage/QuestionImportList/QuestionImportList"),
		meta: {
			title: '任务管理 / 试题导入',
			requireAuth: true,
		}
	},
	{
		path: '/paperGenerate',
		name: 'paperGenerate',
		component: () => import("@/views/QusetionBankManage/QuestionImportList/PaperGenerate"),
		meta: {
			title: '任务管理 / 试卷生成',
			requireAuth: true,
		}
	},
	{
		path: '/examQuestionView',
		name: 'examQuestionView',
		component: () => import("@/views/QusetionBankManage/QuestionImportList/ExamQuestionView"),
		meta: {
			title: '试题导入 / 试题查看',
			requireAuth: true,
		}
	},
	{
		path: '/systemManage',
		name: 'systemManage',
		component: () => import("@/views/SystemManage/SystemManage"),
		meta: {
			title: '系统管理',
			requireAuth: true,
		}
	},
	{
		path: '/messageManage',
		name: 'messageManage',
		component: () => import("@/views/MessageManage/MessageManage"),
		meta: {
			title: '任务消息列表',
			requireAuth: true,
		}
	},
	{
		path: '/testingManage',
		name: 'testingManage',
		component: () => import("@/views/TestingManage/List"),
		meta: {
			title: '测验管理',
			requireAuth: true,
		}
	},
	{
		path: '/404',
		name: '404',
		component: () => import("@/views/Error/404")
	},
	{
		path: '/500',
		name: '500',
		component: () => import("@/views/Error/500")
	},
	{
		path: '*',
		redirect: '/404',
		hidden: true,
	}
]

const router = new VueRouter({
	mode: 'hash',
	base: process.env.BASE_URL,
	routes
})

export default router
