123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- app.controller('MainCtrl', [ '$rootScope', '$scope', '$timeout', function($rootScope, $scope, $timeout) {
- if (!$rootScope.loginSuccess)
- return;
- $scope.showAppointment = false;
- $scope.showTicket = false;
- $scope.showInfo = false;
- $scope.hasFirstScore = false;
- $scope.hasFinalScore = false;
-
- /*$rootScope.can_sc = true;
- $rootScope.can_yxtb = true;
- $rootScope.can_jbyl = true;*/
- $scope.showEnrolFlag = false;
- $scope.firstScoreTimeFlag = false;
- $scope.finalScoreTimeFlag = false
-
- $scope.getEnrolArray2 = function() {
- $rootScope.ajaxRequest({
- url : '../enrol/std/enrol/list.htm'
- }, function(response) {
- $scope.EnrolArray2 = response.array;
- for(const ea of $scope.EnrolArray2) {
- if(ea.aspect_id === 20701 || ea.aspect_id === 22001) {
- $scope.showEnrolFlag = true;
- break;
- }
- }
- });
- }
- $scope.getScoreArray = function () {
- $rootScope.ajaxRequest({
- url: '../enrol/std/score/ym/final/list.htm'
- }, function (response) {
- $rootScope.ScoreArray = response.array;
- for (var i = 0; i < response.array.length; i++) {
- if (response.array[i].batch === 'first') {
- $scope.hasFirstScore = true;
- } else if (response.array[i].batch === 'final') {
- $scope.hasFinalScore = true;
- }
- }
- });
- }
- //初试成绩
- $scope.goFirstScore = function(e) {
- // 考生有违纪 提示
- if($rootScope.ArtStdReg.discipline_flag == 'Active') {
- $.confirm("有违纪,请下载违纪告知书", function() {
- $rootScope.goLocation('ym/score/' + e.aspect_name + '/first');//初试成绩
- $scope.$apply();
- }, function() {
- // 点击取消后的回调函数
- });
- } else {
- $rootScope.goLocation('ym/score/' + e.aspect_name + '/first');//初试成绩
- }
- }
- //复试成绩
- $scope.goFinalScore = function(e) {
- $rootScope.goLocation('ym/score/' + e.aspect_name + '/final');//复试成绩
- }
- $scope.goAddr = function(e) {
- $rootScope.goLocation('ym/addr');//邮寄地址修改界面
- }
-
- //报考是否过期
- $scope.enrolTime = function() {
- $rootScope.ajaxRequest({
- url : '../enrol/agent/expire.htm',
- data: {}
- }, function(data) {
- $scope.enrolTimeFlag = data.entity;
- });
- }
-
- $scope.getAgent = function() {
- $rootScope.ajaxRequest({
- url : '../enrol/agent/find.htm?agent_id=100'
- }, function(response) {
- $scope.Agent = response.map;
- var now = $rootScope.parseLongString(response.map.now);
- // 准考证下载
- if ($rootScope.parseLongString(response.map.ticket_start_time) < now
- && $rootScope.parseLongString(response.map.ticket_end_time) > now) {
- $scope.showTicket = true;
- }
- // 报考按钮显示
- if ($rootScope.parseLongString(response.map.enrol_start_time) < now
- && $rootScope.parseLongString(response.map.enrol_end_time) > now) {
- $scope.enrolTimeFlag = true;
- }
- //初试成绩显示
- if ($rootScope.parseLongString(response.map.first_score_start_time) < now
- && $rootScope.parseLongString(response.map.first_score_end_time) > now) {
- $scope.firstScoreTimeFlag = true;
- $scope.getScoreArray();
- }
- //复试成绩显示
- if ($rootScope.parseLongString(response.map.final_score_start_time) < now
- && $rootScope.parseLongString(response.map.final_score_end_time) > now) {
- $scope.finalScoreTimeFlag = true;
- $scope.getScoreArray();
- }
- });
- }
- $scope.getEnrolArray2();
- //$scope.getScoreArray();
- $scope.getAgent();
- //$scope.enrolTime();
-
-
- //进入申请页面
- $scope.goExamApply = function(subject_name) {
- $rootScope.goLocation('std/apply/' + subject_name);
- }
-
- //查询考生之前提交申请
- // $rootScope.ajaxRequest({
- // url : '../enrol/ny/exam/query.htm'
- // }, function(response) {
- // debugger;
- // if (response.array) {
- // for (var i=0; i<response.array.length; i++) {
- // $scope.apply_msg = response.array[i].apply_msg;
- // if (response.array[i].subject_name == '视唱') {
- // $rootScope.can_sc = false;
- // } else if (response.array[i].subject_name == '音响听辩、声学常识') {
- // $rootScope.can_yxtb = false;
- // } else if (response.array[i].subject_name == '基本乐理、听音') {
- // $rootScope.can_jbyl = false;
- // }
- // }
- // if (response.array.length > 0) {
- // $scope.can_apply = false;//不能申请,申请过了
- // }
- // }
- // });
-
- $scope.goEnrol = function(e) {
- $rootScope.goLocation('enrol/info/' + e.enrol_id + '/InActive');
- }
-
- } ])
|