'use strict';
angular.module('qrzk')
.constant(
'paperTaskStatus',{
	array:  [{'key': 'TO_CREATE_SKEL', 'value': '提交细目表'}
	, {'key': 'TO_AUDIT_SKEL', 'value': '审核细目表'}
	, {'key': 'GENERATE_PAPER', 'value': '组卷'}
	, {'key': 'TYPESET', 'value': '预排版'}
	, {'key': 'TO_AUDIT_PAPER', 'value': '试卷审核'}
	, {'key': 'TO_CHECK_PAPER', 'value': '试卷校对'}
	, {'key': 'FINAL_TYPESET', 'value': '终排版'}
	, {'key': 'TO_ARCHIVE', 'value': '待归档'}
	, {'key': 'ARCHIVED', 'value': '已归档'}
	]}
)
.constant(
'reviewTaskStatus',{
	array:  [{'key': 'TO_AUDIT_PAPER_REVIEW', 'value': '试卷审核'}
	, {'key': 'ARCHIVED_REVIEW', 'value': '已归档'}
	]}
)
.constant(
'assessmentItems',{
	array:  [{
		group: '安全保密',
		groupRow: 4,
		scoreRow: 4,
		totalScore: '10',
		title: '1.入闱期间，手机等通讯工具及时上交集中管理。',
		score: 2
	},
	{
		title: '2.入闱期间，不擅自离开闱点，遇有特殊情况及时报告。',
		score: 2
	},{
		title: '3.认真阅读并在保密责任书、出闱须知上签字，并严格遵守保密纪律。',
		score: 3
	},{
		title: '4.出闱前，彻底删除所使用的电脑及U盘上有关试题及答案的电子文档，各校稿、草稿纸等命题材料按规定上交回收。',
		score: 3
	},{
		group: '工作态度',
		groupRow: 4,
		scoreRow: 4,
		totalScore: '10',
		title: '1.按时到入闱地点报到，参加命题业务培训会。（不参加培训会该项不得分）',
		score: 3
	},{
		title: '2.重视学科联系人提出的问题或意见，及时进行相应修改或处理。',
		score: 3
	},{
		title: '3.工作期间精神饱满，与闱点内其他人员和谐相处。',
		score: 2
	},{
		title: '4.在规定时间内完成命题任务，无拖延。',
		score: 2
	},{
		group: '命题质量',
		groupRow: 18,
		scoreRow: 2,
		totalScore: '试卷结构 10',
		title: '1.先填写《命题细目表》，经学科联系人审核签字后再实施命题。',
		score: 3
	},{
		title: '2.命题细目表填写规范，认知层次、难度层次、覆盖面等符合考试大纲或命题考点规定。（首次填写成功给满分，每修改一次扣2分）',
		score: 7
	},{
		scoreRow: 2,
		totalScore: '难度控制 10',
		title: '1.难度预估表估计难度值与题卡估计难度层次对应。（一处问题扣1分）',
		score: 5
	},{
		title: '2.预估及格分数线控制在55～65分之间。',
		score: 5
	},{
		scoreRow: 5,
		totalScore: '试卷规范 15',
		title: '1.试题及答案卷头、页脚内容正确。（课程代码、名称、题分栏、试卷总分、页码、页码合计等）（一处问题扣1分）',
		score: 5
	},{
		title: '2.试题及答案大小题号、题型名称、题数、题分和题型指导语正确。（一处问题扣1分）',
		score: 4
	},{
		title: '3.选择题备选项代码、个数正确。（一处问题扣1分）',
		score: 2
	},{
		title: '4.填空题、主观题预留答题空间合理，版面美观。',
		score: 2
	},{
		title: '5.试题、答案编码符合《命题工作手册》规定的四级编码方式。（一处问题扣1分）',
		score: 2
	},{
		scoreRow: 9,
		totalScore: '试题编制 45',
		title: '1.试题、答案编制无文字、标点符号差错。（一处问题扣1分）',
		score: 5
	},{
		title: '2.试题、答案编制语言通顺、简明扼要、无歧义。（一处问题扣1分）',
		score: 5
	},{
		title: '3.选择题编制规范。（题干与备选项构成的句子逻辑上成立，题干对正确选项无明显暗示，备选项长度基本一致、具有同质性、数字选项正确有序、无明显不合理拼凑备选项）（一处问题扣1分）',
		score: 5
	},{
		title: '4.试题内容无前后提示。（一处问题扣1分）',
		score: 5
	},{
		title: '5.主观性试题编制符合《命题工作手册》要求。（一处问题扣1分）',
		score: 5
	},{
		title: '6.试题与答案内容相符。（一处问题扣1分）',
		score: 5
	},{
		title: '7.评分点划分合理，无小数评分点，评分点最高分值不超过题型要求，如有必要附有恰当的评分说明。（一处问题扣1分）',
		score: 5
	},{
		title: '8.选择题正确答案分布均衡。（一处问题扣1分）',
		score: 5
	},{
		title: '9.所命两套试卷符合平行试卷要求，无重题；与两年内所考试卷亦无重题。（一处问题扣2分）',
		score: 5
	}]}
)
.config(function($stateProvider, $urlRouterProvider,$httpProvider) {
  $stateProvider
   .state('batch', {
	   url: "/batch",
	   abstract: true,
      templateUrl: "resources/app/common/top.html"
    })
    .state('batch.list', {
    	url: "/list",
    	templateUrl: "resources/app/batch/list.html",
    	ncyBreadcrumb: {
    		label: '批次管理'    		
    	}
    })
    .state('batch.add', {
    	url: "/add",
    	templateUrl: "resources/app/batch/add.html",
    	ncyBreadcrumb: {
    		label: '添加批次',
    		parent: 'batch.list'
    	}
    })
    .state('batch.edit', {
	  url: "/edit/:id",
	  params: {id:null},
	  templateUrl: "resources/app/batch/add.html",
	  ncyBreadcrumb: {
		  label: '编辑批次',
		  parent: 'batch.list'
	  }
  })
    .state('batch.revertBatchTask', {
	  url: "/revertBatchTask",
	  templateUrl: "resources/app/batch/revertBatchTask.html",
	  ncyBreadcrumb: {
		  label: '还原批次',
		  parent: 'batch.list'
	  }
  })
    .state('batch.toStartPapers', {
	  url: "/toStartPapers",
	  templateUrl: "resources/app/batch/startedPapers.list.html",
	  ncyBreadcrumb: {
		  label: '试卷启用',
		  parent: 'batch.list'
	  }
  })
    .state('batch.info', {
      abstract: true,
      url: "/info/:id",
      params:{id:null},
      templateUrl: "resources/app/batch/info.html"
    })
    
    /** 题卡审核批次 **/
    .state('batch.info.auditTasks', {
    	url: "/auditTasks",
    	templateUrl: "resources/app/batch/auditTasks.html",
    	ncyBreadcrumb: {
    		label: '{{batch.name}}（{{batch.batchTypeLabel}}）',
    		parent: 'batch.list'
    	}
    })
    .state('batch.info.auditTasksImport', {
    	url: "/auditTasksImport",
    	templateUrl: "resources/app/batch/auditTasksImport.html",
    	ncyBreadcrumb: {
    		label: '导入审题任务',
    		parent: 'batch.info.auditTasks'
    	}
    })
    .state('batch.info.auditTasksAdd', {
    	url: "/auditTasksAdd",
    	templateUrl: "resources/app/batch/auditTasksAdd.html",
    	ncyBreadcrumb: {
    		label: '添加审题任务',
    		parent: 'batch.info.auditTasks'
    	}
    })
    .state('batch.info.auditTaskRelatedTeachers', {
    	url: "/auditTaskRelatedTeachers",
    	templateUrl: "resources/app/batch/relatedTeachers.html",
    	controller: 'AuditTaskRelatedTeachersCtrl',
    	ncyBreadcrumb: {
    		label: '关联审题教师',
    		parent: 'batch.info.auditTasks'
    	}
    })
    
    /** 题卡录入批次 **/
    .state('batch.info.inputTasks', {
    	url: "/inputTasks",
    	templateUrl: "resources/app/batch/inputTasks.html",
    	ncyBreadcrumb: {
    		label: '{{batch.name}}（{{batch.batchTypeLabel}}）',
    		parent: 'batch.list'
    	}
    })
    
    .state('batch.info.inputTasksAdd', {
    	url: "/inputTasksAdd",
    	templateUrl: "resources/app/batch/inputTasksAdd.html",
    	ncyBreadcrumb: {
    		label: '添加录题任务',
    		parent: 'batch.info.inputTasks'
    	}
    })
    .state('batch.info.inputTasksRelatedInputers', {
    	url: "/inputTasksRelatedInputers",
    	templateUrl: "resources/app/batch/inputTasksRelatedInputers.html",
    	ncyBreadcrumb: {
    		label: '关联录入员',
    		parent: 'batch.info.inputTasks'
    	}
    })
    
    /** 题库建设批次 **/
    .state('batch.info.tkjsTasks', {
    	url: "/tkjsTasks",
    	templateUrl: "resources/app/batch/tkjsTasks.html",
    	ncyBreadcrumb: {
    		label: '{{batch.name}}（{{batch.batchTypeLabel}}）',
    		parent: 'batch.list'
    	}
    })
    
    .state('batch.info.tkjsTasksAdd', {
    	url: "/tkjsTasksAdd",
    	templateUrl: "resources/app/batch/tkjsTasksAdd.html",
    	ncyBreadcrumb: {
    		label: '添加题库建设任务',
    		parent: 'batch.info.tkjsTasks'
    	}
    })
    .state('batch.info.tkjsTasksRelatedTeachers', {
    	url: "/tkjsTasksRelatedTeachers",
    	templateUrl: "resources/app/batch/tkjsTasksRelatedTeachers.html",
    	ncyBreadcrumb: {
    		label: '关联命题教师',
    		parent: 'batch.info.tkjsTasks'
    	}
    })
    
    /**
     * 试卷复审
     */
    .state('batch.info.reviewTasks', {
    	url: "/reviewTasks",
    	templateUrl: "resources/app/batch/reviewTasks.html",
    	ncyBreadcrumb: {
    		label: '{{batch.name}}（{{batch.batchTypeLabel}}）',
    		parent: 'batch.list'
    	}
    })
    
    /** 入闱命题批次 **/
     .state('batch.info.paperTasks', {
    	url: "/paperTasks",
    	templateUrl: "resources/app/batch/paperTasks.html",
    	controller: 'PaperTaskListCtrl',
    	ncyBreadcrumb: {
    		label: '{{batch.name}}（{{batch.batchTypeLabel}}）',
    		parent: 'batch.list'
    	}
    })
    .state('batch.info.paperTaskUpload', {
    	url: "/paperTaskUpload",
    	templateUrl: "resources/app/batch/paperTaskUpload.html",
    	ncyBreadcrumb: {
    		label: '导入命卷任务',
    		parent: 'batch.info.paperTasks'
    	}
    })
    .state('batch.info.reviewTaskUpload', {
    	url: "/reviewTaskUpload",
    	templateUrl: "resources/app/batch/reviewTaskUpload.html",
    	ncyBreadcrumb: {
    		label: '导入复审任务',
    		parent: 'batch.info.reviewTasks'
    	}
    })
    .state('batch.info.paperTasksTeacherAssessments', {
    	url: "/assessments",
    	templateUrl: "resources/app/batch/paperTaskAssessments.html",
    	ncyBreadcrumb: {
    		label: '命题教师评价',
    		parent: 'batch.info.paperTasks'
    	}
    })
    
    .state('batch.info.paperTask', {
    	url: "/paperTask/:taskId",
    	params: {taskId:null},
    	abstract: true,
    	templateUrl: "resources/app/batch/paperTask.top.html"
    })
    .state('batch.info.reviewTask', {
    	url: "/reviewTask/:taskId",
    	params: {taskId:null},
    	abstract: true,
    	templateUrl: "resources/app/batch/reviewTask.top.html"
    })
    .state('batch.info.paperTask.detail', {
    	url: "/detail",
    	templateUrl: "resources/app/batch/paperTask.detail.html",
    	ncyBreadcrumb: {
    		label: '{{task.taskNo}} ({{task.statusName}})',
    		parent: 'batch.info.paperTasks'
    	}
    })
    
    /** 复审批次详情 **/
    .state('batch.info.reviewTask.reviewDetail', {
    	url: "/detail",
    	templateUrl: "resources/app/batch/reviewTask.detail.html",
    	ncyBreadcrumb: {
    		label: '{{task.taskNo}} ({{task.reviewStatusName}})',
    		parent: 'batch.info.reviewTasks'
    	}
    })
    
    /** 任务管理 **/
    .state('task', {
	   url: "/task",
	   abstract: true,
      templateUrl: "resources/app/common/top.html"
    })
    .state('task.myTasks', {
    	url: "/myTasks",
    	templateUrl: "resources/app/batch/paperTasks.html",
    	controller: 'TodoPaperTaskListCtrl',
    	ncyBreadcrumb: {
    		label: '我的任务 '  		
    	}
    })
    .state('task.paperTask', {
    	url: "/paperTask/:taskId",
    	params: {taskId:null},
    	abstract: true,
    	templateUrl: "resources/app/batch/paperTask.top.html"
    })
    .state('task.paperTask.detail', {
    	url: "/detail",
    	templateUrl: "resources/app/batch/paperTask.detail.html",
    	ncyBreadcrumb: {
    		label: '{{task.taskNo}} ({{task.statusName}})',
    		parent: 'task.myTasks'
    	}
    })
    /**
     * 复审详情
     */
    .state('task.paperTask.reviewDetail', {
    	url: '/reviewDetail',
    	templateUrl: 'resources/app/batch/reviewTask.detail.html',
    	ncyBreadcrumb: {
    		label: '{{task.taskNo}} ({{task.reviewStatusName}})',
    		parent: 'task.myTasks'
    	}
    })
    .state('task.paperTask.difficultyEstimate', {
    	url: "/difficultyEstimate",
    	templateUrl: "resources/app/batch/paperTask.difficultyEstimate.html",
    	params: {paperId:null},
    	ncyBreadcrumb: {
    		label: '及格分数预估表'
    	}
    })
    .state('task.paperTask.teacherAssessment', {
    	url: "/teacherAssessment/:userId",
    	templateUrl: "resources/app/batch/paperTask.teacherAssessment.html",
    	params: {userId:null},
    	ncyBreadcrumb: {
    		label: '教师评价'
    	}
    })
    
    /** 题库建设批次 **/
    ;
  
});

