user.js
1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* Created by cjl on 2018/4/23.
*/
(function () {
"user strict";
var userController = function($scope,$modal,$http,$interval,dialogService,railwayService){
$scope.$emit('settingShow', 1);
$scope.vm = {
totalCount : 0,
pageNumber : 1,
pageSize : 10,
userId : ''
}
$scope.getList = function(){
railwayService.findUserList($scope.vm).success(function(data){
if (data.errors == null || data.errors.length > 0) {
dialogService.tip(data.errors);
}else{
$scope.userList = data.result;
/*for(var i =0 ;i< $scope.userList.length;i++){
if ($scope.userList[i].laidTime != null) {
var time = new Date(Number($scope.userList[i].laidTime));
$scope.userList[i].laidTime = time.format("yyyy-MM-dd hh:mm:ss ");
}
}*/
// debugger
$scope.vm.totalCount = data.totalCount;
}
})
}
$scope.getList();
$scope.doSearch = function(){
$scope.vm.pageNumber = 1;
$scope.getList();
}
}
angular.module("xn.page", ["xn.directive.form"])
.controller("UserController",["$scope","$modal","$http","$interval","dialogService","RailwayService",userController])
})();