Browse Source

增加处理日志

seimin 3 years ago
parent
commit
adecb274ed

+ 27 - 1
assets/js/controllers/customform/customformCtrl.js

@@ -12981,6 +12981,19 @@ appFormly.config(function config(formlyConfigProvider) {
12981
       },
12981
       },
12982
     ],
12982
     ],
12983
   });
12983
   });
12984
+  //处理日志
12985
+  formlyConfigProvider.setType({
12986
+    name: "ui-handlerLog",
12987
+    templateUrl: "assets/views/customform/tpl/ui-handlerLog.html",
12988
+    controller: [
12989
+      "$scope",
12990
+      "api_bpm_data",
12991
+      "Restangular",
12992
+      function ($scope, api_bpm_data, Restangular) {
12993
+        console.log($scope,11111111111111111111111111)
12994
+      },
12995
+    ],
12996
+  });
12984
   //历史记录
12997
   //历史记录
12985
   formlyConfigProvider.setType({
12998
   formlyConfigProvider.setType({
12986
     name: "ui-history",
12999
     name: "ui-history",
@@ -21221,7 +21234,19 @@ appFormly.controller("CustomformCtrl", [
21221
                     });
21234
                     });
21222
                     return;
21235
                     return;
21223
                   }
21236
                   }
21224
-                  api_bpm_domain
21237
+                  console.log(vm);
21238
+                  //处理日志
21239
+                  // 处理日志不为空并且事件是处理中状态
21240
+                  if(vm.model.handlerLog&&vm.model.handlerLog.trim()&&vm.model.incident.state.value == 'handler'){
21241
+                    api_bpm_data.addData('operationLog',{operationLog:{opType:'handlerLog',opValue:vm.model.handlerLog,extra1:vm.model.incident.id}}).then(function(result1){
21242
+                      baseHandler();
21243
+                    })
21244
+                  }else{
21245
+                    baseHandler();
21246
+                  }
21247
+                  // return;
21248
+                  function baseHandler(){
21249
+                    api_bpm_domain
21225
                     .complete($stateParams.taskId, userId, vm.model)
21250
                     .complete($stateParams.taskId, userId, vm.model)
21226
                     .then(function (response) {
21251
                     .then(function (response) {
21227
                       if (response) {
21252
                       if (response) {
@@ -21303,6 +21328,7 @@ appFormly.controller("CustomformCtrl", [
21303
                       }
21328
                       }
21304
                       $scope.ldloading[style.replace("-", "_")] = false;
21329
                       $scope.ldloading[style.replace("-", "_")] = false;
21305
                     });
21330
                     });
21331
+                  }
21306
                   break;
21332
                   break;
21307
                 case "back":
21333
                 case "back":
21308
                   $state.go($scope.formData.cancelUrl);
21334
                   $state.go($scope.formData.cancelUrl);

+ 25 - 0
assets/views/customform/tpl/ui-handlerLog.html

@@ -0,0 +1,25 @@
1
+<div class="row padding-sm no-padding-vr bordered no-border-hr ">
2
+    <div class="col-md-12">
3
+        <div style="color: #333;">处理日志:</div>
4
+        <div class="panel panel-white">
5
+            <div class="panel-body">
6
+                <table class="table table-striped table-hover" style="table-layout:fixed">
7
+                    <thead>
8
+                        <tr>
9
+                            <th class="center" style="width:50px">序号</th>
10
+                            <th class="center" style="width:200px">时间</th>
11
+                            <th class="center">内容</th>
12
+                        </tr>
13
+                    </thead>
14
+                    <tbody>
15
+                        <tr ng-repeat="item in model.incident.handlerLogs">
16
+                            <td class="center">{{$index + 1}}</td>
17
+                            <td class="center">{{item.opTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
18
+                            <td class="center" style="white-space: normal;word-break:break-all">{{item.opValue}}</td>
19
+                        </tr>
20
+                    </tbody>
21
+                </table>
22
+            </div>
23
+        </div>
24
+    </div>
25
+</div>