answerChooesViewCtrl.js 1.01 KB
(function (angular) {
    function answerChooesViewCtrl($scope,pagetType,questionnaireExamineService,SweetAlertX,$uibModalInstance,DTColumnBuilder,DTOptionsBuilder,$http,$state,$uibModal,Utils) {

  	$scope.questions = [{}];
  	
  	$scope.selectAllinfoforQuestionnaire = function(){
    	questionnaireExamineService.selectAllinfoforQuestionnaire({'qnId':pagetType.qnId,'qnType':pagetType.qnType}, function (result) {
    		if (result.returnCode == 0) {
    			$scope.questions=result.data;
    		}
    	});
    }
  	
  	  
  	$scope.init = function(){
  		$scope.qnName = pagetType.qnName;
  		$scope.selectAllinfoforQuestionnaire();
  	}
  	
  	$scope.getParam = function () {
    	var params = {};
    	params.code = pagetType.qnCode;
    	params.id = pagetType.qnId;
    	params.name = pagetType.qnName;
    	params.questionDtoList = $scope.questions;       
    	return params;
    }
  	
  	
      $scope.init();
  }

    angular.module('questionnaire')
        .controller('answerChooesViewCtrl', answerChooesViewCtrl);
})(angular);