'use strict';
angular.module('qrzk')

.config(function($stateProvider, $urlRouterProvider,$httpProvider) {
	
  $stateProvider
  	//题库报表
    .state('questionReport', {
      abstract: true,
      url: "/questionReport",
      templateUrl: "resources/app/question/questionReport.html"
    })
    .state('questionReport.dailyReport',{
      url:"/questionDailyReport",
      templateUrl:"resources/app/question/dailyReport.html"
    })
    .state('questionReport.questionTypeSumReport',{
    	url:"/questionTypeSumReport",
    	templateUrl:"resources/app/question/questionTypeSumReport.html"
    })
    //题卡录入任务
    .state('toInput', {
      abstract: true,
      url: "/toInput",
      controller: 'ToInputQuesTopCtrl',
      templateUrl: "resources/app/common/top.html"
    })
  .state('toInput.list', {
  	url: "/list",
  	templateUrl: "resources/app/question/list.html",
  	controller: 'ToInputQuesListCtrl',
  	ncyBreadcrumb: {
  		label: '已录入试题'    		
  	}
  })
  .state('toInput.add', {
	url: "/add",
	templateUrl: "resources/app/question/add.html",
	controller: 'QuestionAddCtrl',
	ncyBreadcrumb: {
		label: '录入试题',
		parent: 'toInput.list'
	}
  })
  .state('toInput.edit', {
	  url: "/edit/:id/:auditTask",
	  params:{id: null, auditTask: null},
	  templateUrl: "resources/app/question/add.html",
	  controller: 'QuestionEditCtrl',
	  ncyBreadcrumb: {
		  label: '编辑试题'
	  }
  })
  
  /** 待审核试题 **/
  .state('auditQuesList', {
	controller:function($scope,$stateParams){
    	window.open('question/audit');
    	location.reload();
  	}
  })
  
  /** 业务管理员进行试题管理 **/
  .state('questionListForMng', {
	controller:function($scope,$stateParams){
    	window.open('question/mng');
    	location.reload();
  	}
  })
  
});

