lineInfo.js 1.45 KB
/**
 * Created by 王冠伦 on 2018/2/26.
 */
(function () {
    "user strict";

    var railwayController = function($scope,$modal,$http,$interval,dialogService,railwayService){
        $scope.$emit('navShow', 5);
        $scope.settingShow = 5;
        var date= new Date(new Date()-24*60*60*1000).format("yyyyMMdd")
        $scope.vm = {
            dateId:date,
            pageSize : 0,
            totalCount : 0,
            totalNumber : 0
        }
        $scope.getList = function(){
            railwayService.findLineInfo($scope.vm).success(function(data){
                if (data.errors == null || data.errors.length > 0) {
                    dialogService.tip(data.errors);
                }else{
                    $scope.lineCountList = data.lineCountList;
                    $scope.lineNumberList = data.lineNumberList;
                    $scope.companyCountList = data.companyCountList;
                    $scope.companyNumberList = data.companyNumberList;
                    $scope.totalCount = data.totalCount;
                    $scope.totalNumber = data.totalNumber;
                }
            })
        }
        $scope.getList();

        $scope.doSearch = function(){
            $scope.vm.pageNumber = 1;
            $scope.getList();
        }
    }

    angular.module("xn.page", ["xn.directive.form"])
        .controller("RailwayController",["$scope","$modal","$http","$interval","dialogService","RailwayService",railwayController])
})();