1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- app.controller('MainCtrl', [ '$rootScope', '$scope', '$timeout', function($rootScope, $scope, $timeout) {
- if (!$rootScope.loginSuccess)
- return;
- $scope.showAppointment = false;
- $scope.showTicket = false;
- $scope.showInfo = false;
- $scope.getEnrolArray2 = function() {
- console.log('12312');
- $rootScope.ajaxRequest({
- url : '../enrol/std/enrol/list.htm'
- }, function(response) {
- $scope.EnrolArray2 = response.array;
- console.log(response.array);
- });
- }
- $scope.getEnrolArray = function() {
- var today = $rootScope.shortDateString(new Date());
- var now = new Date();
- $rootScope.ajaxRequest({
- url : '../enrol/std/score/ym/final/list.htm'
- }, function(response) {
- $rootScope.EnrolArray = response.array;
- var qualified_total = 0;
- for(var i=0;i<response.array.length;i++){
- if(response.array[i].aspect_qualified !='不合格')
- qualified_total ++;
- }
- $rootScope.qualified_total = qualified_total ;
- if(response.array.length == 0) {
- $scope.getEnrolArray2();
- }
- });
- }
- $scope.goEnrol = function(e) {
- $rootScope.goLocation('ym/score/' + e.aspect_name);
- }
- $scope.getEnrolArray();
- } ])
|