1234567891011121314151617181920212223242526272829 |
- angular.module('push')
- .controller('noticeServiceCtrl', function ($scope, AccountService) {
- //获取疫情信息
- var getEpidemicList = function(){
- AccountService.getEpidemicList().then(function(res){
- if(res.code == 3350){
- $scope.epidemicList = res.data;
- $scope.nohanle = 0;
- $scope.handling = 0;
- $scope.handled = 0;
- angular.forEach($scope.epidemicList, function(val){
- if(!val.status || val.status == 0){
- $scope.handling ++;
- }else if(val.status == 2){
- $scope.nohanle ++;
- }else if(val.status == 1){
- $scope.handled ++;
- }
- });
- }
- })
- }
- getEpidemicList();
- $scope.goEpidemicDetail = function(epidemic){
- $scope.go('noticeServiceDetail', {epidemic: epidemic});
- }
- });
|