|
@@ -4,6 +4,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
4
|
4
|
//保存报修主体
|
5
|
5
|
$scope.repairMain = JSON.parse(sessionStorage.getItem("repair_main"));
|
6
|
6
|
// ----------------分割线 start-----------------
|
|
7
|
+ console.log($state)
|
7
|
8
|
// 故障地点下拉
|
8
|
9
|
// $scope.addressModel = '';//文本输入内容
|
9
|
10
|
$scope.address_arr = [];//故障地点所有数据
|
|
@@ -900,15 +901,15 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
900
|
901
|
}
|
901
|
902
|
// $scope.gridOptions.paginationCurrentPage = 1;
|
902
|
903
|
if (item.acceptDate) {
|
903
|
|
- item.acceptDate = moment(item.acceptDate).format('YYYY-MM-DD HH:mm:ss');
|
|
904
|
+ item.acceptDate = moment(item.acceptDate).format('YYYY-MM-DD 00:00:00');
|
904
|
905
|
}
|
905
|
906
|
if (item.acceptDateEnd) {
|
906
|
|
- // item.acceptDateEnd = moment(item.acceptDateEnd).format('YYYY-MM-DD HH:mm:ss');
|
|
907
|
+ // item.acceptDateEnd = moment(item.acceptDateEnd).format('YYYY-MM-DD 00:00:00');
|
907
|
908
|
item.acceptDateEnd = moment(item.acceptDateEnd).format('YYYY-MM-DD 23:59:59')
|
908
|
909
|
}
|
909
|
910
|
// if (parameters) {
|
910
|
911
|
// angular.extend(fildata, { 'idx': 0, 'sum': $scope.gridOptions.paginationPageSize })
|
911
|
|
- // angular.extend(fildata.incident, { 'acceptDate': moment(parameters.paramDateFrom).format('YYYY-MM-DD HH:mm:ss'), 'acceptDateEnd': moment(parameters.paramDateTo).format('YYYY-MM-DD 23:59:59') })
|
|
912
|
+ // angular.extend(fildata.incident, { 'acceptDate': moment(parameters.paramDateFrom).format('YYYY-MM-DD 00:00:00'), 'acceptDateEnd': moment(parameters.paramDateTo).format('YYYY-MM-DD 23:59:59') })
|
912
|
913
|
// }
|
913
|
914
|
|
914
|
915
|
var transitiondata = angular.copy(item);
|
|
@@ -2459,7 +2460,12 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2459
|
2460
|
|
2460
|
2461
|
// }
|
2461
|
2462
|
//事件类型筛选
|
2462
|
|
- $scope.searchstate = 'todo';
|
|
2463
|
+ console.log($state);
|
|
2464
|
+ if($state.params.tab){
|
|
2465
|
+ $scope.searchstate = $state.params.tab;
|
|
2466
|
+ }else{
|
|
2467
|
+ $scope.searchstate = 'todo';//baba
|
|
2468
|
+ }
|
2463
|
2469
|
$scope.onChange = function (searchType) {
|
2464
|
2470
|
// console.log(defaultFilterData,'fanbu')
|
2465
|
2471
|
if(defaultFilterData.incident){
|
|
@@ -2530,7 +2536,28 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2530
|
2536
|
filterData.searchType = $scope.searchType;
|
2531
|
2537
|
}
|
2532
|
2538
|
$scope.gridOptions.paginationCurrentPage = 1 + filterData.idx;
|
2533
|
|
- $scope.searchstate = filterData.searchType;
|
|
2539
|
+ if($state.params.tab){
|
|
2540
|
+ $scope.searchstate = $state.params.tab;
|
|
2541
|
+ filterData.searchType = $state.params.tab;
|
|
2542
|
+ sessionStorage.setItem('searchincident',JSON.stringify(filterData));
|
|
2543
|
+ }else{
|
|
2544
|
+ $scope.searchstate = filterData.searchType;
|
|
2545
|
+ }
|
|
2546
|
+ if($state.params.date == 'today'){
|
|
2547
|
+ $scope.othcode = {};
|
|
2548
|
+ $scope.searchkeys.acceptDate = new Date();
|
|
2549
|
+ $scope.searchkeys.acceptDateEnd = new Date();
|
|
2550
|
+ filterData.incident = {acceptDate:moment().format('YYYY-MM-DD 00:00:00'),acceptDateEnd:moment().format('YYYY-MM-DD 23:59:59')};
|
|
2551
|
+ sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
|
2552
|
+ }
|
|
2553
|
+ if($state.params.state){
|
|
2554
|
+ $scope.searchkeys.acceptDate = null;
|
|
2555
|
+ $scope.searchkeys.acceptDateEnd = null;
|
|
2556
|
+ var obj = $scope.state.find(function(v){return $state.params.state == v.id});
|
|
2557
|
+ $scope.othcode = {state:obj};
|
|
2558
|
+ filterData.incident = {statusId: $state.params.state};
|
|
2559
|
+ sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
|
2560
|
+ }
|
2534
|
2561
|
if (filterData.incident && filterData.incident.category) {
|
2535
|
2562
|
delete filterData.incident.category
|
2536
|
2563
|
}
|
|
@@ -2542,6 +2569,28 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2542
|
2569
|
$scope.searchstate = 'overDate';
|
2543
|
2570
|
}
|
2544
|
2571
|
}
|
|
2572
|
+ if($state.params.tab){
|
|
2573
|
+ $scope.searchstate = $state.params.tab;
|
|
2574
|
+ filterData.searchType = $state.params.tab;
|
|
2575
|
+ sessionStorage.setItem('searchincident',JSON.stringify(filterData));
|
|
2576
|
+ }else{
|
|
2577
|
+ $scope.searchstate = filterData.searchType;
|
|
2578
|
+ }
|
|
2579
|
+ if($state.params.date == 'today'){
|
|
2580
|
+ $scope.othcode = {};
|
|
2581
|
+ $scope.searchkeys.acceptDate = new Date();
|
|
2582
|
+ $scope.searchkeys.acceptDateEnd = new Date();
|
|
2583
|
+ filterData.incident = {acceptDate:moment().format('YYYY-MM-DD 00:00:00'),acceptDateEnd:moment().format('YYYY-MM-DD 23:59:59')};
|
|
2584
|
+ sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
|
2585
|
+ }
|
|
2586
|
+ if($state.params.state){
|
|
2587
|
+ $scope.searchkeys.acceptDate = null;
|
|
2588
|
+ $scope.searchkeys.acceptDateEnd = null;
|
|
2589
|
+ var obj = $scope.state.find(function(v){return $state.params.state == v.id});
|
|
2590
|
+ $scope.othcode = {state:obj};
|
|
2591
|
+ filterData.incident = {statusId: $state.params.state};
|
|
2592
|
+ sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
|
2593
|
+ }
|
2545
|
2594
|
}
|
2546
|
2595
|
}
|
2547
|
2596
|
// if (angular.isDefined($scope.searchTypes)) {
|
|
@@ -2609,7 +2658,29 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2609
|
2658
|
filterData.searchType = $scope.searchType;
|
2610
|
2659
|
}
|
2611
|
2660
|
$scope.gridOptions.paginationCurrentPage = 1 + filterData.idx;
|
2612
|
|
- $scope.searchstate = filterData.searchType;
|
|
2661
|
+ // $scope.searchstate = filterData.searchType;
|
|
2662
|
+ if($state.params.tab){
|
|
2663
|
+ $scope.searchstate = $state.params.tab;
|
|
2664
|
+ filterData.searchType = $state.params.tab;
|
|
2665
|
+ sessionStorage.setItem('searchincident',JSON.stringify(filterData));
|
|
2666
|
+ }else{
|
|
2667
|
+ $scope.searchstate = filterData.searchType;
|
|
2668
|
+ }
|
|
2669
|
+ if($state.params.date == 'today'){
|
|
2670
|
+ $scope.othcode = {};
|
|
2671
|
+ $scope.searchkeys.acceptDate = new Date();
|
|
2672
|
+ $scope.searchkeys.acceptDateEnd = new Date();
|
|
2673
|
+ filterData.incident = {acceptDate:moment().format('YYYY-MM-DD 00:00:00'),acceptDateEnd:moment().format('YYYY-MM-DD 23:59:59')};
|
|
2674
|
+ sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
|
2675
|
+ }
|
|
2676
|
+ if($state.params.state){
|
|
2677
|
+ $scope.searchkeys.acceptDate = null;
|
|
2678
|
+ $scope.searchkeys.acceptDateEnd = null;
|
|
2679
|
+ var obj = $scope.state.find(function(v){return $state.params.state == v.id});
|
|
2680
|
+ $scope.othcode = {state:obj};
|
|
2681
|
+ filterData.incident = {statusId: $state.params.state};
|
|
2682
|
+ sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
|
2683
|
+ }
|
2613
|
2684
|
if (filterData.incident && filterData.incident.category) {
|
2614
|
2685
|
delete filterData.incident.category
|
2615
|
2686
|
}
|