|
@@ -294,7 +294,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
294
|
294
|
displayName: '受理人|处理人/组',
|
295
|
295
|
width: 150,
|
296
|
296
|
cellTemplate: '<div style="width: 100%;">' +
|
297
|
|
- '<div class="ui-grid-cell-contents">{{row.entity.acceptUser ? row.entity.acceptUser.name : "无"}}<br>{{(row.entity.state.value == "resolved" || row.entity.state.value == "close") ? (row.entity.handlingPersonnelUser ? row.entity.handlingPersonnelUser.name : "无") : (row.entity.groupORHandlerUser || "无")}}</div>' +
|
|
297
|
+ '<div class="ui-grid-cell-contents">{{row.entity.acceptUser ? row.entity.acceptUser.name : "无"}}<br>{{row.entity.groupORHandlerUser || "无"}}</div>' +
|
298
|
298
|
'</div>'
|
299
|
299
|
},
|
300
|
300
|
{
|
|
@@ -626,46 +626,16 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
626
|
626
|
if (response) {
|
627
|
627
|
if (response.status = 200) {
|
628
|
628
|
$scope.state = response;
|
629
|
|
- if (sessionStorage.searchincident && JSON.parse(sessionStorage.getItem("searchincident")).incident) {
|
630
|
|
- angular.forEach($scope.state, function (item) {
|
631
|
|
- if (item.id == JSON.parse(sessionStorage.getItem("searchincident")).incident.statusId) {
|
632
|
|
- $scope.othcode = {
|
633
|
|
- "state": item
|
634
|
|
- };
|
635
|
|
- }
|
636
|
|
- })
|
637
|
|
- }
|
638
|
629
|
}
|
639
|
630
|
}
|
640
|
631
|
})
|
641
|
|
- if (sessionStorage.searchincident && JSON.parse(sessionStorage.getItem("searchincident")).incident) {
|
642
|
|
- if (JSON.parse(sessionStorage.getItem("searchincident")).incident) {
|
643
|
|
- $scope.searchkeys = JSON.parse(sessionStorage.getItem("searchincident")).incident;
|
644
|
|
- }
|
645
|
|
- if ($scope.searchkeys.acceptDate) {
|
646
|
|
- $scope.searchkeys.acceptDate = new Date($scope.searchkeys.acceptDate);
|
647
|
|
- }
|
648
|
|
- if ($scope.searchkeys.acceptDateEnd) {
|
649
|
|
- $scope.searchkeys.acceptDateEnd = new Date($scope.searchkeys.acceptDateEnd);
|
650
|
|
- }
|
651
|
|
- }
|
|
632
|
+
|
652
|
633
|
$scope.clear = function () {
|
653
|
634
|
$scope.searchkeys = {};
|
654
|
|
- $scope.searchstate = JSON.parse(sessionStorage.getItem("searchincident")).searchType;
|
655
|
635
|
$scope.othcode = {};
|
656
|
636
|
|
657
|
637
|
$scope.try_async_load();
|
658
|
|
- var fildata = {
|
659
|
|
- "assignee": loginUser.id,
|
660
|
|
- "candidateGroups": loginuserGroup,
|
661
|
|
- "searchType": JSON.parse(sessionStorage.getItem("searchincident")).searchType,
|
662
|
|
- "idx": JSON.parse(sessionStorage.getItem("searchincident")).idx,
|
663
|
|
- "sum": JSON.parse(sessionStorage.getItem("searchincident")).sum
|
664
|
|
- }
|
665
|
|
- sessionStorage.removeItem("searchincident");
|
666
|
|
- fildata.assignee = loginUser.id;
|
667
|
|
- $scope.memoryfilterData = fildata;
|
668
|
|
- $scope.refreshData('expand-right', fildata);
|
|
638
|
+ $scope.refreshData('expand-right');
|
669
|
639
|
$interval.cancel($scope.timer);
|
670
|
640
|
$scope.timer = $interval(function () {
|
671
|
641
|
$scope.jry_refresh()
|
|
@@ -673,15 +643,9 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
673
|
643
|
}
|
674
|
644
|
// 刷新
|
675
|
645
|
$scope.jry_refresh = function () {
|
676
|
|
- var fildata = {};
|
677
|
|
- if (sessionStorage.searchincident) {
|
678
|
|
- fildata = JSON.parse(sessionStorage.getItem("searchincident"));
|
679
|
|
- } else {
|
680
|
|
- fildata = defaultFilterData;
|
681
|
|
- }
|
|
646
|
+ var fildata = defaultFilterData;
|
682
|
647
|
if (fildata.incident && fildata.incident.category) {
|
683
|
648
|
delete fildata.incident.category
|
684
|
|
-
|
685
|
649
|
}
|
686
|
650
|
fildata.idx = $scope.jry_idx;
|
687
|
651
|
fildata.sum = $scope.jry_sum;
|
|
@@ -698,14 +662,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
698
|
662
|
}
|
699
|
663
|
console.log(item)
|
700
|
664
|
|
701
|
|
- var fildata = {};
|
702
|
|
- if (sessionStorage.searchincident) {
|
703
|
|
- fildata = JSON.parse(sessionStorage.getItem("searchincident"));
|
704
|
|
- $scope.gridOptions.paginationCurrentPage = 1;
|
705
|
|
- fildata.idx = 0;
|
706
|
|
- } else {
|
707
|
|
- fildata = defaultFilterData;
|
708
|
|
- }
|
|
665
|
+ var fildata = defaultFilterData;
|
709
|
666
|
if (!fildata.incident) {
|
710
|
667
|
fildata['incident'] = {};
|
711
|
668
|
}
|
|
@@ -718,9 +675,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
718
|
675
|
|
719
|
676
|
var transitiondata = angular.copy(item);
|
720
|
677
|
angular.extend(fildata.incident, transitiondata)
|
721
|
|
- sessionStorage['searchincident'] = JSON.stringify(fildata);
|
722
|
678
|
$scope.memoryfilterData = fildata;
|
723
|
|
- fildata.assignee = loginUser.id;
|
724
|
679
|
// seimin
|
725
|
680
|
if($scope.searchstate === 'all_del'){
|
726
|
681
|
fildata.searchType = 'all';
|
|
@@ -967,7 +922,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
967
|
922
|
}
|
968
|
923
|
}
|
969
|
924
|
}
|
970
|
|
- fildata.assignee = loginUser.id;
|
971
|
925
|
$scope.refreshData('expand-right', fildata);
|
972
|
926
|
}
|
973
|
927
|
$scope.jry_idx = 0;
|
|
@@ -978,10 +932,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
978
|
932
|
$scope.jry_idx = newPage - 1;
|
979
|
933
|
filtersData.sum = pageSize;
|
980
|
934
|
$scope.jry_sum = pageSize;
|
981
|
|
- if (JSON.parse(sessionStorage.getItem("searchincident")).idx != filtersData.idx || JSON.parse(sessionStorage.getItem("searchincident")).sum != filtersData.sum) {
|
982
|
|
- filtersData.assignee = loginUser.id;
|
983
|
|
- $scope.refreshData('expand-right', filtersData);
|
984
|
|
- }
|
985
|
935
|
});
|
986
|
936
|
|
987
|
937
|
$scope.Change = function (upTypes) {
|
|
@@ -1043,14 +993,11 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1043
|
993
|
var grid = this.grid;
|
1044
|
994
|
if ($rootScope.user.group) {
|
1045
|
995
|
var filtersData = {
|
1046
|
|
- "assignee": loginUser.id,
|
1047
|
|
- "candidateGroups": loginuserGroup,
|
1048
|
996
|
idx: 0,
|
1049
|
997
|
sum: mun
|
1050
|
998
|
};
|
1051
|
999
|
} else {
|
1052
|
1000
|
var filtersData = {
|
1053
|
|
- "assignee": loginUser.id,
|
1054
|
1001
|
idx: 0,
|
1055
|
1002
|
sum: mun
|
1056
|
1003
|
};
|
|
@@ -1081,7 +1028,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1081
|
1028
|
}
|
1082
|
1029
|
});
|
1083
|
1030
|
filtersData.idx = 0;
|
1084
|
|
- filtersData.assignee = loginUser.id;
|
1085
|
1031
|
$scope.memoryfilterData = filtersData;
|
1086
|
1032
|
$scope.refreshData('expand-right', filtersData);
|
1087
|
1033
|
});
|
|
@@ -1149,50 +1095,26 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1149
|
1095
|
console.log(data);
|
1150
|
1096
|
});
|
1151
|
1097
|
}
|
1152
|
|
- //事件提取
|
|
1098
|
+ //接单
|
1153
|
1099
|
$scope.acceptTaskAction = function (model) {
|
1154
|
1100
|
var modalInstance = $modal.open({
|
1155
|
1101
|
templateUrl: 'assets/views/incident/tpl/acceptTask.tpl.html',
|
1156
|
|
- controller: function ($scope, $modalInstance, APIService, modelData, currentUserId, Alert) {
|
1157
|
|
- var receiveTask = function (receive_code, modelData) {
|
1158
|
|
- var data = {
|
1159
|
|
- 'receive_code': receive_code
|
1160
|
|
- };
|
1161
|
|
-
|
1162
|
|
- if (modelData) {
|
1163
|
|
- return {
|
1164
|
|
- taskId: modelData.taskId,
|
1165
|
|
- data: data
|
1166
|
|
- };
|
1167
|
|
- } else {
|
1168
|
|
- return 'error';
|
1169
|
|
- }
|
1170
|
|
- };
|
|
1102
|
+ controller: function ($scope, $modalInstance, modelData, currentUserId, Alert) {
|
|
1103
|
+
|
1171
|
1104
|
$scope.title = "提示";
|
1172
|
1105
|
$scope.connect = "确认接单?";
|
1173
|
1106
|
$scope.ok = function () {
|
|
1107
|
+ console.log(model);
|
1174
|
1108
|
$rootScope.isMask = true;
|
1175
|
|
- //接收任务//请求重新指派
|
1176
|
|
- var data = receiveTask($scope.receive_code, modelData);
|
1177
|
|
- APIService.claimAndCompletedTask(data.taskId, {
|
1178
|
|
- userId: currentUserId,
|
1179
|
|
- receive_code: "handler"
|
1180
|
|
- }).then(function (response) {
|
|
1109
|
+ api_flow.accept("receive", {incident: model}).then(function (response) {
|
1181
|
1110
|
$rootScope.isMask = false;
|
1182
|
|
- if (response.status == 200) {
|
|
1111
|
+ if (response.state == 200) {
|
1183
|
1112
|
Alert.swal({
|
1184
|
1113
|
title: "操作成功!",
|
1185
|
1114
|
confirmButtonColor: "#007AFF",
|
1186
|
1115
|
type: "success"
|
1187
|
1116
|
});
|
1188
|
1117
|
$modalInstance.close('success');
|
1189
|
|
- } else if (response.status == 500) {
|
1190
|
|
- Alert.swal({
|
1191
|
|
- title: "操作失败",
|
1192
|
|
- text: "该事件已被提取,请刷新页面!",
|
1193
|
|
- type: "error"
|
1194
|
|
- });
|
1195
|
|
- $modalInstance.close('success');
|
1196
|
1118
|
} else {
|
1197
|
1119
|
Alert.swal({
|
1198
|
1120
|
title: "操作失败",
|
|
@@ -1209,9 +1131,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1209
|
1131
|
},
|
1210
|
1132
|
size: 'sm',
|
1211
|
1133
|
resolve: {
|
1212
|
|
- APIService: function () {
|
1213
|
|
- return api_bpm_domain;
|
1214
|
|
- },
|
1215
|
1134
|
modelData: function () {
|
1216
|
1135
|
return model;
|
1217
|
1136
|
},
|
|
@@ -1225,7 +1144,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1225
|
1144
|
});
|
1226
|
1145
|
modalInstance.result.then(function (selectedItem) {
|
1227
|
1146
|
if (selectedItem == 'success') {
|
1228
|
|
- defaultFilterData.assignee = loginUser.id;
|
1229
|
1147
|
$scope.refreshData('expand-right', defaultFilterData);
|
1230
|
1148
|
}
|
1231
|
1149
|
});
|
|
@@ -1285,13 +1203,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1285
|
1203
|
$scope.user = [];
|
1286
|
1204
|
$scope.group = [];
|
1287
|
1205
|
$scope.isShowRadioUser = false;
|
1288
|
|
- // if(model.state.id == 1544){
|
1289
|
|
- // $scope.assign.isRadioUser = 1;
|
1290
|
|
- // $scope.isShowRadioUser = false;
|
1291
|
|
- // }else{
|
1292
|
|
- // $scope.assign.isRadioUser = 0;
|
1293
|
|
- // $scope.isShowRadioUser = true;
|
1294
|
|
- // }
|
1295
|
1206
|
|
1296
|
1207
|
// 修改是否指派到人
|
1297
|
1208
|
$scope.changeRadioUser = function(){
|
|
@@ -1415,76 +1326,21 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1415
|
1326
|
});
|
1416
|
1327
|
return;
|
1417
|
1328
|
}
|
1418
|
|
- var postData = {};
|
|
1329
|
+ let postData = {};
|
1419
|
1330
|
|
1420
|
1331
|
if($scope.assign.user && $scope.assign.user.id){
|
1421
|
1332
|
// 派人
|
1422
|
|
- // 接单
|
1423
|
|
- if(model.state.value == 'pending'){
|
1424
|
|
- postData = {
|
1425
|
|
- type: 'receiveAssginee',
|
1426
|
|
- userId: $scope.assign.user.id,
|
1427
|
|
- taskId: model.taskId,
|
1428
|
|
- incidentId: model.id,
|
1429
|
|
- logType: 'assign',
|
1430
|
|
- }
|
1431
|
|
- }
|
1432
|
|
- // 处理中
|
1433
|
|
- if(model.state.value == 'handler'){
|
1434
|
|
- postData = {
|
1435
|
|
- type: 'handlerAssginee',
|
1436
|
|
- userId: $scope.assign.user.id,
|
1437
|
|
- taskId: model.taskId,
|
1438
|
|
- incidentId: model.id,
|
1439
|
|
- logType: 'assign',
|
1440
|
|
- }
|
1441
|
|
- }
|
|
1333
|
+ postData ={ incident: {...model, ...{assignee: $scope.assign.user.id}} };
|
1442
|
1334
|
} else if($scope.assign.group && $scope.assign.group.id){
|
1443
|
1335
|
// 派组
|
1444
|
|
- // 接单,派组
|
1445
|
|
- if(model.state.value == 'pending'){
|
1446
|
|
- postData = {
|
1447
|
|
- type: 'receiveGroup',
|
1448
|
|
- groupId: $scope.assign.group.id,
|
1449
|
|
- taskId: model.taskId,
|
1450
|
|
- activityId: 'usertask5',
|
1451
|
|
- executionId: model.processInstanceId,
|
1452
|
|
- incidentId: model.id,
|
1453
|
|
- logType: 'assign',
|
1454
|
|
- }
|
1455
|
|
- }
|
1456
|
|
- // 处理中
|
1457
|
|
- if(model.state.value == 'handler'){
|
1458
|
|
- postData = {
|
1459
|
|
- type: 'handlerGroup',
|
1460
|
|
- groupId: $scope.assign.group.id,
|
1461
|
|
- taskId: model.taskId,
|
1462
|
|
- activityId: 'usertask5',
|
1463
|
|
- executionId: model.processInstanceId,
|
1464
|
|
- incidentId: model.id,
|
1465
|
|
- logType: 'assign',
|
1466
|
|
- }
|
1467
|
|
- }
|
|
1336
|
+ postData ={ incident: {...model, ...{candidateGroups: $scope.assign.group.id}} };
|
1468
|
1337
|
}
|
1469
|
|
- // if($scope.assign.isRadioUser == 1){
|
1470
|
|
- // postData = {
|
1471
|
|
- // assginee:$scope.assign.user.id,
|
1472
|
|
- // handlerIncidentId: model.state.value === 'handler' ? model.id : undefined,
|
1473
|
|
- // incId: model.assignee ? model.id : undefined,
|
1474
|
|
- // incidentId: model.assignee ? undefined : model.id,
|
1475
|
|
- // taskType: model.state.value == 'handler' ? 'handlerform' : (model.state.value == 'pending' ? 'receiveform' : undefined)
|
1476
|
|
- // };
|
1477
|
|
- // }else{
|
1478
|
|
- // postData = {
|
1479
|
|
- // group:$scope.assign.group.id,
|
1480
|
|
- // taskType: model.state.value == 'handler' ? 'handlerform' : (model.state.value == 'pending' ? 'receiveform' : undefined)
|
1481
|
|
- // };
|
1482
|
|
- // }
|
|
1338
|
+
|
1483
|
1339
|
$rootScope.isMask = true;
|
1484
|
|
- api_bpm_domain.delegateTask2(postData).then(function (response) {
|
|
1340
|
+ api_flow.accept("assign", postData).then(function (response) {
|
1485
|
1341
|
console.log(response)
|
1486
|
1342
|
$rootScope.isMask = false;
|
1487
|
|
- if (response.status == 200) {
|
|
1343
|
+ if (response.state == 200) {
|
1488
|
1344
|
Alert.swal({
|
1489
|
1345
|
title: "操作成功!",
|
1490
|
1346
|
confirmButtonColor: "#007AFF",
|
|
@@ -1526,7 +1382,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1526
|
1382
|
});
|
1527
|
1383
|
modalInstance.result.then(function (selectedItem) {
|
1528
|
1384
|
if (selectedItem == 'success') {
|
1529
|
|
- defaultFilterData.assignee = loginUser.id;
|
1530
|
1385
|
$scope.refreshData('expand-right', defaultFilterData);
|
1531
|
1386
|
}
|
1532
|
1387
|
});
|
|
@@ -1609,63 +1464,21 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1609
|
1464
|
});
|
1610
|
1465
|
return;
|
1611
|
1466
|
}
|
1612
|
|
- var postData = {};
|
|
1467
|
+ let postData = {};
|
1613
|
1468
|
|
1614
|
1469
|
if($scope.assign.user && $scope.assign.user.id){
|
1615
|
1470
|
// 派人
|
1616
|
|
- // 接单
|
1617
|
|
- if(model.state.value == 'pending'){
|
1618
|
|
- postData = {
|
1619
|
|
- type: 'receiveAssginee',
|
1620
|
|
- userId: $scope.assign.user.id,
|
1621
|
|
- taskId: model.taskId,
|
1622
|
|
- incidentId: model.id,
|
1623
|
|
- logType: 'redeploy',
|
1624
|
|
- }
|
1625
|
|
- }
|
1626
|
|
- // 处理中
|
1627
|
|
- if(model.state.value == 'handler'){
|
1628
|
|
- postData = {
|
1629
|
|
- type: 'handlerAssginee',
|
1630
|
|
- userId: $scope.assign.user.id,
|
1631
|
|
- taskId: model.taskId,
|
1632
|
|
- incidentId: model.id,
|
1633
|
|
- logType: 'redeploy',
|
1634
|
|
- }
|
1635
|
|
- }
|
|
1471
|
+ postData ={ incident: {...model, ...{assignee: $scope.assign.user.id}} };
|
1636
|
1472
|
} else if($scope.assign.group && $scope.assign.group.id){
|
1637
|
1473
|
// 派组
|
1638
|
|
- // 接单,派组
|
1639
|
|
- if(model.state.value == 'pending'){
|
1640
|
|
- postData = {
|
1641
|
|
- type: 'receiveGroup',
|
1642
|
|
- groupId: $scope.assign.group.id,
|
1643
|
|
- taskId: model.taskId,
|
1644
|
|
- activityId: 'usertask5',
|
1645
|
|
- executionId: model.processInstanceId,
|
1646
|
|
- incidentId: model.id,
|
1647
|
|
- logType: 'redeploy',
|
1648
|
|
- }
|
1649
|
|
- }
|
1650
|
|
- // 处理中
|
1651
|
|
- if(model.state.value == 'handler'){
|
1652
|
|
- postData = {
|
1653
|
|
- type: 'handlerGroup',
|
1654
|
|
- groupId: $scope.assign.group.id,
|
1655
|
|
- taskId: model.taskId,
|
1656
|
|
- activityId: 'usertask5',
|
1657
|
|
- executionId: model.processInstanceId,
|
1658
|
|
- incidentId: model.id,
|
1659
|
|
- logType: 'redeploy',
|
1660
|
|
- }
|
1661
|
|
- }
|
|
1474
|
+ postData ={ incident: {...model, ...{candidateGroups: $scope.assign.group.id}} };
|
1662
|
1475
|
}
|
1663
|
1476
|
|
1664
|
1477
|
$rootScope.isMask = true;
|
1665
|
|
- api_bpm_domain.delegateTask2(postData).then(function (response) {
|
|
1478
|
+ api_flow.accept("redeploy", postData).then(function (response) {
|
1666
|
1479
|
console.log(response)
|
1667
|
1480
|
$rootScope.isMask = false;
|
1668
|
|
- if (response.status == 200) {
|
|
1481
|
+ if (response.state == 200) {
|
1669
|
1482
|
Alert.swal({
|
1670
|
1483
|
title: "操作成功!",
|
1671
|
1484
|
confirmButtonColor: "#007AFF",
|
|
@@ -1707,7 +1520,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1707
|
1520
|
});
|
1708
|
1521
|
modalInstance.result.then(function (selectedItem) {
|
1709
|
1522
|
if (selectedItem == 'success') {
|
1710
|
|
- defaultFilterData.assignee = loginUser.id;
|
1711
|
1523
|
$scope.refreshData('expand-right', defaultFilterData);
|
1712
|
1524
|
}
|
1713
|
1525
|
});
|
|
@@ -1730,7 +1542,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1730
|
1542
|
api_bpm_schedule.del(model.id).then(function (response) {
|
1731
|
1543
|
if (response.status == 200) {
|
1732
|
1544
|
SweetAlert.swal("操作成功!", "数据已经被删除.", "success");
|
1733
|
|
- $scope.refreshData('expand-right', JSON.parse(sessionStorage.getItem("searchincident")));
|
|
1545
|
+ $scope.refreshData('expand-right');
|
1734
|
1546
|
} else {
|
1735
|
1547
|
SweetAlert.swal("操作失败!", "数据暂时无法被删除,请稍候重试", "error");
|
1736
|
1548
|
}
|
|
@@ -1740,6 +1552,11 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1740
|
1552
|
}
|
1741
|
1553
|
});
|
1742
|
1554
|
}
|
|
1555
|
+ // 继续创建
|
|
1556
|
+ $scope.storageSj = function(model){
|
|
1557
|
+ console.log(model);
|
|
1558
|
+ $rootScope.newOrder({incident: model});
|
|
1559
|
+ }
|
1743
|
1560
|
// 新增维修记录弹窗
|
1744
|
1561
|
$scope.toHandlerLog = function (model) {
|
1745
|
1562
|
console.log(model)
|
|
@@ -1862,7 +1679,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1862
|
1679
|
});
|
1863
|
1680
|
modalInstance.result.then(function (selectedItem) {
|
1864
|
1681
|
if (selectedItem == 'success') {
|
1865
|
|
- defaultFilterData.assignee = loginUser.id;
|
1866
|
1682
|
$scope.refreshData('expand-right', defaultFilterData);
|
1867
|
1683
|
}
|
1868
|
1684
|
});
|
|
@@ -1998,7 +1814,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1998
|
1814
|
});
|
1999
|
1815
|
modalInstance.result.then(function (selectedItem) {
|
2000
|
1816
|
if (selectedItem == 'success') {
|
2001
|
|
- defaultFilterData.assignee = loginUser.id;
|
2002
|
1817
|
$scope.refreshData('expand-right', defaultFilterData);
|
2003
|
1818
|
}
|
2004
|
1819
|
});
|
|
@@ -2016,15 +1831,12 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2016
|
1831
|
|
2017
|
1832
|
if ($rootScope.user.group) {
|
2018
|
1833
|
var defaultFilterData = {
|
2019
|
|
- "assignee": loginUser.id,
|
2020
|
|
- "candidateGroups": loginuserGroup,
|
2021
|
1834
|
"searchType": "todo",
|
2022
|
1835
|
"idx": 0,
|
2023
|
1836
|
"sum": mun
|
2024
|
1837
|
};
|
2025
|
1838
|
} else {
|
2026
|
1839
|
var defaultFilterData = {
|
2027
|
|
- "assignee": $rootScope.user.id,
|
2028
|
1840
|
"searchType": "todo",
|
2029
|
1841
|
"idx": 0,
|
2030
|
1842
|
"sum": mun
|
|
@@ -2087,42 +1899,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2087
|
1899
|
}
|
2088
|
1900
|
$scope.ldloading[style.replace('-', '_')] = true;
|
2089
|
1901
|
if (angular.isUndefined(filterData)) {
|
2090
|
|
- if (sessionStorage.searchincident) {
|
2091
|
|
- filterData = JSON.parse(sessionStorage.getItem("searchincident"));
|
2092
|
|
- if ($scope.searchType) {
|
2093
|
|
- filterData.searchType = $scope.searchType;
|
2094
|
|
- }
|
2095
|
|
- $scope.gridOptions.paginationCurrentPage = 1 + filterData.idx;
|
2096
|
|
- if($state.params.tab){
|
2097
|
|
- $scope.searchstate = $state.params.tab;
|
2098
|
|
- filterData.searchType = $state.params.tab;
|
2099
|
|
- filterData.idx = 0;
|
2100
|
|
- $scope.gridOptions.paginationCurrentPage = 1 + filterData.idx;
|
2101
|
|
- sessionStorage.setItem('searchincident',JSON.stringify(filterData));
|
2102
|
|
- }else{
|
2103
|
|
- $scope.searchstate = filterData.searchType;
|
2104
|
|
- }
|
2105
|
|
- if($state.params.date == 'today'){
|
2106
|
|
- $scope.othcode = {};
|
2107
|
|
- $scope.searchkeys.acceptDate = new Date();
|
2108
|
|
- $scope.searchkeys.acceptDateEnd = new Date();
|
2109
|
|
- filterData.incident = {acceptDate:moment().format('YYYY-MM-DD 00:00:00'),acceptDateEnd:moment().format('YYYY-MM-DD 23:59:59')};
|
2110
|
|
- sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
2111
|
|
- }else{
|
2112
|
|
- $scope.searchkeys.acceptDate = null;
|
2113
|
|
- $scope.searchkeys.acceptDateEnd = null;
|
2114
|
|
- }
|
2115
|
|
- if($state.params.state){
|
2116
|
|
- var obj = $scope.state.find(function(v){return $state.params.state == v.id});
|
2117
|
|
- $scope.othcode = {state:obj};
|
2118
|
|
- filterData.incident = {statusId: $state.params.state};
|
2119
|
|
- sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
2120
|
|
- }
|
2121
|
|
- if (filterData.incident && filterData.incident.category) {
|
2122
|
|
- delete filterData.incident.category
|
2123
|
|
- }
|
2124
|
|
- } else {
|
2125
|
|
- filterData = defaultFilterData;
|
|
1902
|
+ filterData = defaultFilterData;
|
2126
|
1903
|
if ($scope.searchType) {
|
2127
|
1904
|
filterData.searchType = $scope.searchType;
|
2128
|
1905
|
if (filterData.searchType == 'overDate') {
|
|
@@ -2134,7 +1911,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2134
|
1911
|
filterData.searchType = $state.params.tab;
|
2135
|
1912
|
filterData.idx = 0;
|
2136
|
1913
|
$scope.gridOptions.paginationCurrentPage = 1 + filterData.idx;
|
2137
|
|
- sessionStorage.setItem('searchincident',JSON.stringify(filterData));
|
2138
|
1914
|
}else{
|
2139
|
1915
|
$scope.searchstate = filterData.searchType;
|
2140
|
1916
|
}
|
|
@@ -2143,7 +1919,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2143
|
1919
|
$scope.searchkeys.acceptDate = new Date();
|
2144
|
1920
|
$scope.searchkeys.acceptDateEnd = new Date();
|
2145
|
1921
|
filterData.incident = {acceptDate:moment().format('YYYY-MM-DD 00:00:00'),acceptDateEnd:moment().format('YYYY-MM-DD 23:59:59')};
|
2146
|
|
- sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
2147
|
1922
|
}else{
|
2148
|
1923
|
$scope.searchkeys.acceptDate = null;
|
2149
|
1924
|
$scope.searchkeys.acceptDateEnd = null;
|
|
@@ -2152,9 +1927,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2152
|
1927
|
var obj = $scope.state.find(function(v){return $state.params.state == v.id});
|
2153
|
1928
|
$scope.othcode = {state:obj};
|
2154
|
1929
|
filterData.incident = {statusId: $state.params.state};
|
2155
|
|
- sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
2156
|
1930
|
}
|
2157
|
|
- }
|
2158
|
1931
|
} else {
|
2159
|
1932
|
filterData.searchType = $scope.searchstate;
|
2160
|
1933
|
}
|
|
@@ -2171,7 +1944,6 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2171
|
1944
|
window.sessionStorage.removeItem('isGoyuqi');
|
2172
|
1945
|
}
|
2173
|
1946
|
$scope.myData = [];
|
2174
|
|
- sessionStorage['searchincident'] = angular.copy(JSON.stringify(filterData));
|
2175
|
1947
|
$scope.memoryfilterData = filterData;
|
2176
|
1948
|
$scope.gridOptions['sum'] = filterData.sum;
|
2177
|
1949
|
// 如果是全部,则根据权限查询
|
|
@@ -2258,54 +2030,17 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2258
|
2030
|
|
2259
|
2031
|
$scope.ldloading[style.replace('-', '_')] = true;
|
2260
|
2032
|
if (angular.isUndefined(filterData)) {
|
2261
|
|
- if (sessionStorage.searchincident) {
|
2262
|
|
- filterData = JSON.parse(sessionStorage.getItem("searchincident"));
|
2263
|
|
- if ($scope.searchType) {
|
2264
|
|
- filterData.searchType = $scope.searchType;
|
2265
|
|
- }
|
2266
|
|
- $scope.gridOptions.paginationCurrentPage = 1 + filterData.idx;
|
2267
|
|
- if($state.params.tab){
|
2268
|
|
- $scope.searchstate = $state.params.tab;
|
2269
|
|
- filterData.searchType = $state.params.tab;
|
2270
|
|
- filterData.idx = 0;
|
2271
|
|
- $scope.gridOptions.paginationCurrentPage = 1 + filterData.idx;
|
2272
|
|
- sessionStorage.setItem('searchincident',JSON.stringify(filterData));
|
2273
|
|
- }else{
|
2274
|
|
- $scope.searchstate = filterData.searchType;
|
2275
|
|
- }
|
2276
|
|
- if($state.params.date == 'today'){
|
2277
|
|
- $scope.othcode = {};
|
2278
|
|
- $scope.searchkeys.acceptDate = new Date();
|
2279
|
|
- $scope.searchkeys.acceptDateEnd = new Date();
|
2280
|
|
- filterData.incident = {acceptDate:moment().format('YYYY-MM-DD 00:00:00'),acceptDateEnd:moment().format('YYYY-MM-DD 23:59:59')};
|
2281
|
|
- sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
2282
|
|
- }else{
|
2283
|
|
- $scope.searchkeys.acceptDate = null;
|
2284
|
|
- $scope.searchkeys.acceptDateEnd = null;
|
2285
|
|
- }
|
2286
|
|
- if($state.params.state){
|
2287
|
|
- var obj = $scope.state.find(function(v){return $state.params.state == v.id});
|
2288
|
|
- $scope.othcode = {state:obj};
|
2289
|
|
- filterData.incident = {statusId: $state.params.state};
|
2290
|
|
- sessionStorage.setItem("searchincident",JSON.stringify(filterData));
|
2291
|
|
- }
|
2292
|
|
- if (filterData.incident && filterData.incident.category) {
|
2293
|
|
- delete filterData.incident.category
|
2294
|
|
- }
|
2295
|
|
- } else {
|
2296
|
|
- filterData = defaultFilterData;
|
2297
|
|
- if ($scope.searchType) {
|
2298
|
|
- filterData.searchType = $scope.searchType;
|
2299
|
|
- if (filterData.searchType == 'overDate') {
|
2300
|
|
- $scope.searchstate = 'overDate';
|
2301
|
|
- }
|
|
2033
|
+ filterData = defaultFilterData;
|
|
2034
|
+ if ($scope.searchType) {
|
|
2035
|
+ filterData.searchType = $scope.searchType;
|
|
2036
|
+ if (filterData.searchType == 'overDate') {
|
|
2037
|
+ $scope.searchstate = 'overDate';
|
2302
|
2038
|
}
|
2303
|
2039
|
}
|
2304
|
2040
|
}else{
|
2305
|
2041
|
filterData.searchType = $scope.searchstate;
|
2306
|
2042
|
}
|
2307
|
2043
|
$scope.myData = [];
|
2308
|
|
- sessionStorage['searchincident'] = angular.copy(JSON.stringify(filterData));
|
2309
|
2044
|
$scope.memoryfilterData = filterData;
|
2310
|
2045
|
$scope.gridOptions['sum'] = filterData.sum;
|
2311
|
2046
|
// 如果是全部,则根据权限查询
|
|
@@ -2387,26 +2122,9 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2387
|
2122
|
|
2388
|
2123
|
};
|
2389
|
2124
|
// 进入页面时111
|
2390
|
|
- if(window.sessionStorage.getItem('searchincident')){
|
2391
|
|
- var varLin = JSON.parse(window.sessionStorage.getItem('searchincident'));
|
2392
|
|
- if(varLin.incident&&varLin.incident.selectType){
|
2393
|
|
- if(varLin.incident.selectType == '2'){
|
2394
|
|
- console.log(defaultFilterData)
|
2395
|
|
- $scope.searchkeys.selectType = {id:'2',name:'是'};
|
2396
|
|
- }else if(varLin.incident.selectType == '0'){
|
2397
|
|
- console.log(defaultFilterData)
|
2398
|
|
- $scope.searchkeys.selectType = {id:'0',name:'否'};
|
2399
|
|
- }
|
2400
|
|
- }
|
2401
|
|
- }
|
2402
|
2125
|
if(window.sessionStorage.getItem('isGoyuqi') === 'yes'){
|
2403
|
2126
|
$scope.selectTypeChange();
|
2404
|
2127
|
}else{
|
2405
|
|
- if(sessionStorage.getItem("searchincident")){
|
2406
|
|
- var ss = JSON.parse(sessionStorage.getItem("searchincident"));
|
2407
|
|
- delete ss.incident;
|
2408
|
|
- sessionStorage.setItem("searchincident",JSON.stringify(ss));
|
2409
|
|
- }
|
2410
|
2128
|
$scope.refreshData('expand-right');
|
2411
|
2129
|
}
|
2412
|
2130
|
|
|
@@ -2425,6 +2143,7 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$scope', '$state', function (
|
2425
|
2143
|
$scope.qiangdan = false;
|
2426
|
2144
|
$scope.huifang = false;
|
2427
|
2145
|
$scope.delFlag = false;
|
|
2146
|
+ $scope.storageFlag = false;
|
2428
|
2147
|
$scope.editFlag = false;//编辑
|
2429
|
2148
|
$scope.assignFlag = false;//指派
|
2430
|
2149
|
$scope.transferFlag = false;//转派
|
|
@@ -2443,6 +2162,9 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$scope', '$state', function (
|
2443
|
2162
|
if (loginUser.menu[i].link == "shijianliebiao_del") {
|
2444
|
2163
|
$scope.delFlag = true
|
2445
|
2164
|
}
|
|
2165
|
+ if (loginUser.menu[i].link == "shijianliebiao_build") {
|
|
2166
|
+ $scope.storageFlag = true
|
|
2167
|
+ }
|
2446
|
2168
|
if (loginUser.menu[i].link == "shijianliebiao_edit") {
|
2447
|
2169
|
$scope.editFlag = true
|
2448
|
2170
|
}
|
|
@@ -2480,8 +2202,10 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$scope', '$state', function (
|
2480
|
2202
|
}
|
2481
|
2203
|
|
2482
|
2204
|
$rootScope.user.group.forEach(function (item, v) {
|
2483
|
|
- if (item.id == $scope.item.candidateGroups) {
|
2484
|
|
- $scope.item.tiquPower = true;
|
|
2205
|
+ if($scope.item.currentLog){
|
|
2206
|
+ if (item.id == $scope.item.currentLog.groupId) {
|
|
2207
|
+ $scope.item.tiquPower = true;
|
|
2208
|
+ }
|
2485
|
2209
|
}
|
2486
|
2210
|
})
|
2487
|
2211
|
|
|
@@ -2523,6 +2247,10 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$scope', '$state', function (
|
2523
|
2247
|
$scope.delSj = function () {
|
2524
|
2248
|
$scope.colobject.grid.appScope.delSj($scope.item);
|
2525
|
2249
|
}
|
|
2250
|
+ // 继续创建
|
|
2251
|
+ $scope.storageSj = function () {
|
|
2252
|
+ $scope.colobject.grid.appScope.storageSj($scope.item);
|
|
2253
|
+ }
|
2526
|
2254
|
// 新增维修记录
|
2527
|
2255
|
$scope.toHandlerLog = function () {
|
2528
|
2256
|
$scope.colobject.grid.appScope.toHandlerLog($scope.item);
|
|
@@ -2537,22 +2265,17 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$scope', '$state', function (
|
2537
|
2265
|
}
|
2538
|
2266
|
$scope.handler = function () {
|
2539
|
2267
|
$scope.colobject.grid.appScope.acceptTaskAction($scope.item);
|
2540
|
|
- $scope.doComment($scope.item.id);
|
2541
|
2268
|
}
|
2542
|
2269
|
//查看
|
2543
|
2270
|
$scope.toDetail = function (data) {
|
2544
|
2271
|
console.log(data,$rootScope.isFuwutai);
|
2545
|
2272
|
if($rootScope.isFuwutai){
|
2546
|
2273
|
//角色是服务台人员
|
2547
|
|
- $state.go('app.incident.detail', {
|
2548
|
|
- formKey: 'incident_back',
|
2549
|
|
- pdKey: 'incident',
|
2550
|
|
- dataId: data.id,
|
2551
|
|
- taskId: data.taskId,
|
2552
|
|
- processInstanceId: data.processInstanceId
|
|
2274
|
+ $state.go('app.incident.incidentDetail', {
|
|
2275
|
+ id: data.id,
|
2553
|
2276
|
});
|
2554
|
2277
|
}else{
|
2555
|
|
- window.open(location.origin+'/#/app/incident/detail/incident_back/incident/'+data.id+'/'+data.taskId+'/'+data.processInstanceId+'//');
|
|
2278
|
+ window.open(location.origin+'/#/app/incident/incidentDetail/'+data.id);
|
2556
|
2279
|
}
|
2557
|
2280
|
};
|
2558
|
2281
|
}]);
|
|
@@ -2568,14 +2291,15 @@ app.directive('incidentoperator', function () {
|
2568
|
2291
|
template: '<div><div class="cl-effect-1 ui-grid-cell-contents pull-left" style="text-align:left;">' +
|
2569
|
2292
|
'<a ng-click="toDetail(item)" class="bianjifont" >查看</a>' +
|
2570
|
2293
|
'<a ng-click="changeCenter()" ng-show="jry_modify(item)" class="luyinfont">编辑</a>' +
|
2571
|
|
- '<a ng-click="delSj()" ng-show="{{delFlag&&item.state.value!== \'deleted\'}}" class="assign" >删除</a><br>' +
|
2572
|
|
- '<a ng-click="edit()" ng-show="{{item.chaozuoPower&&chuli}}" class="bianjifont">处理</a>' +
|
2573
|
|
- '<a ng-click="handler()" ng-show="{{item.state.id != 1546 &&!item.handlerUser&&item.tiquPower&&qiangdan}}" class="bianjifont" >接单</a>' +
|
2574
|
|
- '<a ng-click="visit()" ng-show="{{item.huifang&&huifang}}" class="bianjifont">回访</a>' +
|
2575
|
|
- '<a ng-click="toAssign()" ng-show="{{(item.state.id==1543||item.state.id==1544)&&assignFlag}}" class="assign" >指派</a>' +
|
2576
|
|
- '<a ng-click="toTransfer()" ng-show="{{(item.state.id==1544)&&item.handlerUser&&item.handlerUser.id == user.id&&!assignFlag&&transferFlag}}" class="assign" >转派</a>' +
|
2577
|
|
- '<a ng-click="toHandlerLog()" ng-show="{{item.state.id==1544}}" class="assign" >维修进度</a>' +
|
2578
|
|
- '<a ng-click="setDuty()" ng-show="{{shijianliebiao_duty && (item.state.id==1545 || item.state.id==1546)}}" class="assign" >设置责任科室</a>' +
|
|
2294
|
+ '<a ng-click="delSj()" ng-show="{{delFlag && item.state.value !== \'deleted\'}}" class="assign" >删除</a>' +
|
|
2295
|
+ '<a ng-click="storageSj()" ng-show="{{storageFlag && item.state.value === \'storage\'}}" class="assign" >继续创建</a><br>' +
|
|
2296
|
+ '<a ng-click="edit()" ng-show="{{item.chaozuoPower && chuli}}" class="bianjifont">处理</a>' +
|
|
2297
|
+ '<a ng-click="handler()" ng-show="{{item.state.value == \'pending\' && ((item.currentLog && item.currentLog.workerId == user.id) || item.tiquPower) && qiangdan}}" class="bianjifont" >接单</a>' +
|
|
2298
|
+ '<a ng-click="visit()" ng-show="{{item.huifang && huifang}}" class="bianjifont">回访</a>' +
|
|
2299
|
+ '<a ng-click="toAssign()" ng-show="{{(item.state.value == \'pending\' || item.state.value == \'handler\') && assignFlag}}" class="assign" >指派</a>' +
|
|
2300
|
+ '<a ng-click="toTransfer()" ng-show="{{item.state.value == \'handler\' && item.handlingPersonnelUser && item.handlingPersonnelUser.id == user.id && !assignFlag && transferFlag}}" class="assign" >转派</a>' +
|
|
2301
|
+ '<a ng-click="toHandlerLog()" ng-show="{{item.state.value == \'handler\'}}" class="assign" >维修进度</a>' +
|
|
2302
|
+ '<a ng-click="setDuty()" ng-show="{{shijianliebiao_duty && (item.state.value == \'resolved\' || item.state.value == \'close\')}}" class="assign" >设置责任科室</a>' +
|
2579
|
2303
|
'</div></div>'
|
2580
|
2304
|
};
|
2581
|
2305
|
});
|