|
@@ -2415,10 +2415,13 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2415
|
2415
|
console.log(model)
|
2416
|
2416
|
var modalInstance = $modal.open({
|
2417
|
2417
|
templateUrl: 'assets/views/incident/tpl/toSms.tpl.html',
|
2418
|
|
- controller: function ($scope, $modalInstance, api_bpm_domain, modelData, currentUserId, Alert, api_user_data) {
|
|
2418
|
+ controller: function ($scope, $modalInstance, api_bpm_domain, api_webservice1, modelData, currentUserId, Alert, api_user_data) {
|
2419
|
2419
|
console.log(model,loginUser);
|
2420
|
|
- $scope.assignUser = null;
|
2421
|
|
- $scope.assignGroup = null;
|
|
2420
|
+ $scope.sms = {
|
|
2421
|
+ assignUser: null,
|
|
2422
|
+ assignGroup: null,
|
|
2423
|
+ content: '',
|
|
2424
|
+ }
|
2422
|
2425
|
//获取用户
|
2423
|
2426
|
$scope.getUsers = function(key = ''){
|
2424
|
2427
|
$scope.user = [];
|
|
@@ -2456,7 +2459,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2456
|
2459
|
$scope.getGroups();
|
2457
|
2460
|
|
2458
|
2461
|
$scope.ok = function () {
|
2459
|
|
- if ($scope.userOrGroup == 1 && !$scope.assignUser){
|
|
2462
|
+ if ($scope.userOrGroup == 1 && !$scope.sms.assignUser){
|
2460
|
2463
|
Alert.swal({
|
2461
|
2464
|
title: "操作失败",
|
2462
|
2465
|
text: "请选择处理人!",
|
|
@@ -2464,7 +2467,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2464
|
2467
|
});
|
2465
|
2468
|
return;
|
2466
|
2469
|
}
|
2467
|
|
- if ($scope.userOrGroup == 2 && !$scope.assignGroup){
|
|
2470
|
+ if ($scope.userOrGroup == 2 && !$scope.sms.assignGroup){
|
2468
|
2471
|
Alert.swal({
|
2469
|
2472
|
title: "操作失败",
|
2470
|
2473
|
text: "请选择处理组!",
|
|
@@ -2472,10 +2475,9 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2472
|
2475
|
});
|
2473
|
2476
|
return;
|
2474
|
2477
|
}
|
2475
|
|
- return;
|
2476
|
|
- api_bpm_domain.delegateTask(model.taskId, {assginee:$scope.assignUser}).then(function (response) {
|
|
2478
|
+ api_webservice1.notifyUser({content: $scope.sms.content, groupId: $scope.sms.assignGroup ? $scope.sms.assignGroup.id : undefined, userId: $scope.sms.assignUser ? $scope.sms.assignUser.id : undefined}).then(function (response) {
|
2477
|
2479
|
console.log(response)
|
2478
|
|
- if (response.status == 200) {
|
|
2480
|
+ if (response.state == 200) {
|
2479
|
2481
|
Alert.swal({
|
2480
|
2482
|
title: "操作成功!",
|
2481
|
2483
|
confirmButtonColor: "#007AFF",
|