ソースを参照

增加处理日志

seimin 3 年 前
コミット
dfd142de49
共有2 個のファイルを変更した96 個の追加2 個の削除を含む
  1. 75 2
      assets/js/controllers/incident/incidentCtrl.js
  2. 21 0
      assets/views/incident/tpl/toHandlerLog.tpl.html

+ 75 - 2
assets/js/controllers/incident/incidentCtrl.js

@@ -288,7 +288,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
288 288
             {
289 289
                 name: '操作',
290 290
                 enableSorting: false,
291
-                width: 250,
291
+                width: 400,
292 292
                 cellTemplate: '<incidentoperator style="background-color:{{row.entity.colourInfo.rgb}}" item="row.entity" colobject="col">',
293 293
                 enableFiltering: false
294 294
             },
@@ -394,7 +394,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
394 394
             {
395 395
                 name: '操作',
396 396
                 enableSorting: false,
397
-                width: 250,
397
+                width: 400,
398 398
                 cellTemplate: '<incidentoperator style="background-color:{{row.entity.colourInfo.rgb}}" item="row.entity" colobject="col">',
399 399
                 enableFiltering: false
400 400
             },
@@ -2240,6 +2240,73 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2240 2240
             }
2241 2241
         });
2242 2242
     }
2243
+    // 新增处理日志弹窗baba
2244
+    $scope.toHandlerLog = function (model) {
2245
+        console.log(model)
2246
+        var modalInstance = $modal.open({
2247
+            templateUrl: 'assets/views/incident/tpl/toHandlerLog.tpl.html',
2248
+            controller: function ($scope, $modalInstance, api_bpm_domain,api_bpm_data, modelData, currentUserId, Alert, api_user_data) {
2249
+                console.log(model,loginUser);
2250
+                $scope.handlerLog = '';
2251
+                $scope.user = [];
2252
+                $scope.ok = function () {
2253
+                    if (!$scope.handlerLog.trim()){
2254
+                        Alert.swal({
2255
+                            title: "操作失败",
2256
+                            text: "请填写处理日志!",
2257
+                            type: "error"
2258
+                        });
2259
+                        return;
2260
+                    }
2261
+                    api_bpm_data.addData('operationLog',{operationLog:{opType:'handlerLog',opValue:$scope.handlerLog,extra1:model.id}}).then(function(response){
2262
+                        console.log(response)
2263
+                        if (response.status == 200) {
2264
+                            Alert.swal({
2265
+                                title: "操作成功!",
2266
+                                confirmButtonColor: "#007AFF",
2267
+                                type: "success"
2268
+                            });
2269
+                            $modalInstance.close('success');
2270
+                        } else {
2271
+                            Alert.swal({
2272
+                                title: "操作失败",
2273
+                                text: "操作失败, 请稍后再试!",
2274
+                                type: "error"
2275
+                            });
2276
+                        }
2277
+                    });
2278
+                }
2279
+
2280
+                $scope.cancel = function () {
2281
+                    $modalInstance.dismiss('cancel');
2282
+                }
2283
+            },
2284
+            size: 'sm',
2285
+            resolve: {
2286
+                api_bpm: function () {
2287
+                    return api_bpm;
2288
+                },
2289
+                modelData: function () {
2290
+                    return model;
2291
+                },
2292
+                currentUserId: function () {
2293
+                    return loginUser.id;
2294
+                },
2295
+                Alert: function () {
2296
+                    return SweetAlert;
2297
+                },
2298
+                api_user_data: function () {
2299
+                    return api_user_data;
2300
+                }
2301
+            }
2302
+        });
2303
+        modalInstance.result.then(function (selectedItem) {
2304
+            if (selectedItem == 'success') {
2305
+                defaultFilterData.assignee = loginUser.id;
2306
+                $scope.refreshData('expand-right', defaultFilterData);
2307
+            }
2308
+        });
2309
+    }
2243 2310
     // 协同弹窗
2244 2311
     $scope.cooperate = function (model) {
2245 2312
         console.log(model)
@@ -2778,6 +2845,11 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$http', '$scope', '$modal', '
2778 2845
         $scope.colobject.grid.appScope.toAssign($scope.item);
2779 2846
         // $scope.doEdit($scope.item.id);
2780 2847
     }
2848
+    // 新增处理日志
2849
+    $scope.toHandlerLog = function () { //print
2850
+        $scope.colobject.grid.appScope.toHandlerLog($scope.item);
2851
+        // $scope.doEdit($scope.item.id);
2852
+    }
2781 2853
     // 协同
2782 2854
     $scope.cooperate = function () { //print
2783 2855
         $scope.colobject.grid.appScope.cooperate($scope.item);
@@ -2857,6 +2929,7 @@ app.directive('incidentoperator', function () {
2857 2929
             // '<a ng-click="record()"  ng-show="{{item.listen}}" class="luyinfont" >录音</a>' +
2858 2930
             // '<a ng-click="rotate()" ng-show="{{item.state.id==4}}" class="rotate" >转派</a>' +
2859 2931
             '<a ng-click="toAssign()" ng-show="{{(item.state.id==1543||item.state.id==1544)&&assign&&item.assignee}}" class="assign" >指派</a>' +
2932
+            '<a ng-click="toHandlerLog()" ng-show="{{item.state.id==1544}}" class="assign" >新增处理日志</a>' +
2860 2933
             // '<a ng-click="upgrade()" ng-show="{{up&&item.state.id==4&&item.currentRole!=' + "'incident manager'" + '}}" class="upgrade" >升级</a>' +
2861 2934
             // '<a ng-click="problem()" ng-show="{{item.state.id==5&&item.currentRole!=' + "'incident manager'" + '}}" class="upgrade" >问题升级</a>' +
2862 2935
             // '<a ng-click="configuration()"  ng-show="{{item.state.id==5}}"  class="bianjifont">变更升级</a>' +

+ 21 - 0
assets/views/incident/tpl/toHandlerLog.tpl.html

@@ -0,0 +1,21 @@
1
+<!-- 新增处理日志 -->
2
+<div class="modal-header">
3
+    <div class="modal-title fontcolor-two fontsizes-14">新增处理日志
4
+        <button type="button" class="close pull-right" ng-click="cancel()">×</button>
5
+    </div>
6
+</div>
7
+<div class="modal-body center">
8
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 250px;">
9
+        <div class=" input-group" style="margin:30px 0 ;">
10
+            <!-- <div class="control-label pull-left margin-top-5 margin-right-5">
11
+                <label class="demoincident">新增处理日志</label>:</div> -->
12
+            <div>
13
+                <textarea data-ng-model="handlerLog" rows="5"  maxlength="255" style="width: 100%;resize:none;" placeholder="请填写处理日志"></textarea>
14
+            </div>
15
+        </div>
16
+    </div>
17
+</div>
18
+<div class="modal-footer modelfooter-hint pointfont">
19
+    <div class="hintfooterleft pull-left" ng-click="ok()" translate="modal.button.OK ">OK</div>
20
+    <div class="hintfooterright pull-right" ng-click="cancel() " translate="modal.button.CANCEL ">Cancel</div>
21
+</div>