Browse Source

巡检修改

seimin 3 years ago
parent
commit
f08d0f3b3b

+ 13 - 2
assets/js/controllers/customform/customformCtrl.js

@@ -11139,7 +11139,12 @@ appFormly.config(function config(formlyConfigProvider) {
11139
 
11139
 
11140
             if($scope.to.onlyKey === 'inspection.dictionary'){
11140
             if($scope.to.onlyKey === 'inspection.dictionary'){
11141
               //巡检列表-新增-巡检类型baba
11141
               //巡检列表-新增-巡检类型baba
11142
-              $scope.model.id = 1714;//默认按组
11142
+              console.log(location)
11143
+              var loc = location.href.split('api_bpm_data')[1] || '';
11144
+              if(loc.length <= 2){
11145
+                // 新增轮询计划的时候
11146
+                $scope.model.id = 1715;//默认系统默认
11147
+              }
11143
             }
11148
             }
11144
             //工作组添加全部选项
11149
             //工作组添加全部选项
11145
             // if($scope.options.templateOptions.label == '工作组'){
11150
             // if($scope.options.templateOptions.label == '工作组'){
@@ -13059,7 +13064,7 @@ appFormly.config(function config(formlyConfigProvider) {
13059
           width: 120,
13064
           width: 120,
13060
           enableFiltering: false,
13065
           enableFiltering: false,
13061
           cellTemplate: '<div>' +
13066
           cellTemplate: '<div>' +
13062
-                '<div class="ui-grid-cell-contents" ng-if="row.entity.processUser">{{row.entity.processUser.name}}</div>' +
13067
+                '<div class="ui-grid-cell-contents" ng-if="!row.entity.group">{{row.entity.processUser.name}}</div>' +
13063
                 '<div class="ui-grid-cell-contents" ng-if="row.entity.group">{{row.entity.group.groupName}}</div>' +
13068
                 '<div class="ui-grid-cell-contents" ng-if="row.entity.group">{{row.entity.group.groupName}}</div>' +
13064
                 '</div>'
13069
                 '</div>'
13065
         },
13070
         },
@@ -13074,6 +13079,9 @@ appFormly.config(function config(formlyConfigProvider) {
13074
           displayName: "结束时间",
13079
           displayName: "结束时间",
13075
           width: 160,
13080
           width: 160,
13076
           enableFiltering: false,
13081
           enableFiltering: false,
13082
+          cellTemplate: '<div>' +
13083
+                '<div class="ui-grid-cell-contents">{{row.entity.endTime?grid.appScope.transferTime(row.entity.endTime):""}}</div>' +
13084
+                '</div>'
13077
         },
13085
         },
13078
         
13086
         
13079
         // {
13087
         // {
@@ -13088,6 +13096,9 @@ appFormly.config(function config(formlyConfigProvider) {
13088
         idx: 0,
13096
         idx: 0,
13089
         sum: 10,
13097
         sum: 10,
13090
       };
13098
       };
13099
+      $scope.transferTime = function (time) {
13100
+        return moment(time).format("YYYY-MM-DD HH:mm");
13101
+      };
13091
 
13102
 
13092
       //分页控制
13103
       //分页控制
13093
       $scope.gridOptions.onRegisterApi = function (gridApi) {
13104
       $scope.gridOptions.onRegisterApi = function (gridApi) {

+ 4 - 4
assets/js/controllers/inspect/inspectForm.js

@@ -421,9 +421,9 @@ sysFormly.controller('SystemformCtrl', ['$rootScope', '$scope', '$parse', '$filt
421
                         switch ($scope.formData.url) {
421
                         switch ($scope.formData.url) {
422
                             case "start":
422
                             case "start":
423
                                 if(vm.model.inspection){
423
                                 if(vm.model.inspection){
424
-                                    if(vm.model.inspection.executeUser.id){
424
+                                    if(vm.model.inspection.executeUser&&vm.model.inspection.executeUser.id){
425
                                         delete vm.model.inspection.group;
425
                                         delete vm.model.inspection.group;
426
-                                    }else if(vm.model.inspection.group){
426
+                                    }else if(vm.model.inspection.group&&vm.model.inspection.group.id){
427
                                         delete vm.model.inspection.executeUser;
427
                                         delete vm.model.inspection.executeUser;
428
                                     }else{
428
                                     }else{
429
                                         delete vm.model.inspection.group
429
                                         delete vm.model.inspection.group
@@ -610,9 +610,9 @@ sysFormly.controller('SystemformCtrl', ['$rootScope', '$scope', '$parse', '$filt
610
                         case "start":
610
                         case "start":
611
                             console.log(vm);
611
                             console.log(vm);
612
                             if(vm.model.inspection){
612
                             if(vm.model.inspection){
613
-                                if(vm.model.inspection.executeUser.id){
613
+                                if(vm.model.inspection.executeUser&&vm.model.inspection.executeUser.id){
614
                                     delete vm.model.inspection.group;
614
                                     delete vm.model.inspection.group;
615
-                                }else if(vm.model.inspection.group){
615
+                                }else if(vm.model.inspection.group&&vm.model.inspection.group.id){
616
                                     delete vm.model.inspection.executeUser;
616
                                     delete vm.model.inspection.executeUser;
617
                                 }else{
617
                                 }else{
618
                                     delete vm.model.inspection.group;
618
                                     delete vm.model.inspection.group;

+ 33 - 1
assets/js/controllers/inspect/inspectListCtrl.js

@@ -192,7 +192,7 @@ app.controller("inspectListCtrl", [
192
         minWidth: 80,
192
         minWidth: 80,
193
         enableFiltering: false,
193
         enableFiltering: false,
194
         cellTemplate: '<div>' +
194
         cellTemplate: '<div>' +
195
-                '<div class="ui-grid-cell-contents" ng-if="row.entity.processUser">{{row.entity.processUser.name}}</div>' +
195
+                '<div class="ui-grid-cell-contents" ng-if="!row.entity.group">{{row.entity.processUser.name}}</div>' +
196
                 '<div class="ui-grid-cell-contents" ng-if="row.entity.group">{{row.entity.group.groupName}}</div>' +
196
                 '<div class="ui-grid-cell-contents" ng-if="row.entity.group">{{row.entity.group.groupName}}</div>' +
197
                 '</div>'
197
                 '</div>'
198
       },
198
       },
@@ -256,6 +256,24 @@ app.controller("inspectListCtrl", [
256
         } else {
256
         } else {
257
           return false;
257
           return false;
258
         }
258
         }
259
+      }else if(data.inspection.dictionary.value == 4){
260
+        // 系统默认
261
+        if(data.online){
262
+          // 线上人
263
+          if (data.processUser.id == loginUser.id && data.stateName == "执行中") {
264
+            return true;
265
+          } else {
266
+            return false;
267
+          }
268
+        }else{
269
+          // 线下组
270
+          var hasGroup = loginUser.group.some(v=>v.id == data.group.id);
271
+          if (hasGroup && data.stateName == "执行中") {
272
+            return true;
273
+          } else {
274
+            return false;
275
+          }
276
+        }
259
       }
277
       }
260
     };
278
     };
261
     $scope.selectRowFunction = function (data) {
279
     $scope.selectRowFunction = function (data) {
@@ -615,6 +633,13 @@ app.controller("inspectListCtrl", [
615
       if (angular.isUndefined(filterData)) {
633
       if (angular.isUndefined(filterData)) {
616
         filterData = defaultFilterData;
634
         filterData = defaultFilterData;
617
       }
635
       }
636
+      if(filterData.searchType === 'todo'){
637
+        // 待处理添加筛选条件
638
+        console.log(filterData,'2022年5月30日')
639
+        filterData.candidateGroups = $rootScope.user.group.map(function(v){return v.id}).toString()
640
+      }else{
641
+        delete filterData.candidateGroups;
642
+      }
618
       $scope.myData = [];
643
       $scope.myData = [];
619
       $scope.memoryfilterData = filterData;
644
       $scope.memoryfilterData = filterData;
620
       api_bpm_data.fetchInspectServiceTasks(filterData.status, filterData).then(
645
       api_bpm_data.fetchInspectServiceTasks(filterData.status, filterData).then(
@@ -648,6 +673,13 @@ app.controller("inspectListCtrl", [
648
       if (angular.isUndefined(filterData)) {
673
       if (angular.isUndefined(filterData)) {
649
         filterData = defaultFilterData;
674
         filterData = defaultFilterData;
650
       }
675
       }
676
+      if(filterData.searchType === 'todo'){
677
+        // 待处理添加筛选条件
678
+        console.log(filterData,'2022年5月30日')
679
+        filterData.candidateGroups = $rootScope.user.group.map(function(v){return v.id}).toString()
680
+      }else{
681
+        delete filterData.candidateGroups;
682
+      }
651
       // $scope.myData = [];
683
       // $scope.myData = [];
652
       $scope.memoryfilterData = filterData;
684
       $scope.memoryfilterData = filterData;
653
       api_bpm_data.fetchInspectServiceTasks(filterData.status, filterData).then(
685
       api_bpm_data.fetchInspectServiceTasks(filterData.status, filterData).then(

+ 1 - 1
assets/js/controllers/inspect/inspectReportCtrl.js

@@ -206,7 +206,7 @@ app.controller("inspectReportCtrl", [
206
       },
206
       },
207
       {
207
       {
208
         name: "type",
208
         name: "type",
209
-        displayName: "巡检类型",
209
+        displayName: "巡检范围",
210
         width: "17%",
210
         width: "17%",
211
         enableFiltering: false,
211
         enableFiltering: false,
212
       },
212
       },

+ 184 - 20
assets/js/controllers/system/processdesign/incidentplan/incidentSetUpCtrl.js

@@ -63,7 +63,9 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
63
     $scope.outdata = [];
63
     $scope.outdata = [];
64
     var systemtype = [];
64
     var systemtype = [];
65
     $scope.subdata={};
65
     $scope.subdata={};
66
+    $scope.sub1data={};
66
     $scope.addcate = false;
67
     $scope.addcate = false;
68
+    $scope.add1cate = false;
67
     $scope.changecate = false;
69
     $scope.changecate = false;
68
     // $scope.refreshListData = function(){
70
     // $scope.refreshListData = function(){
69
     //   var data ={"idx":0,"sum":1000};
71
     //   var data ={"idx":0,"sum":1000};
@@ -100,7 +102,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
100
         $scope.changecate = true;
102
         $scope.changecate = true;
101
         $scope.addcate = false;
103
         $scope.addcate = false;
102
         filterData.treeIds = branch.id;
104
         filterData.treeIds = branch.id;
103
-        $scope.selectedTreeNode = branch;
105
+        // $scope.selectedTreeNode = branch;
104
         $scope.output = branch;
106
         $scope.output = branch;
105
         $scope.thisParent=branch.parent||null;
107
         $scope.thisParent=branch.parent||null;
106
         if($scope.thisParent){
108
         if($scope.thisParent){
@@ -157,8 +159,12 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
157
         }        
159
         }        
158
 
160
 
159
     };
161
     };
160
-    // $scope.thisParent1={};//当前点击节点的父节点
162
+    $scope.thisParent={};//当前点击节点的父节点
161
     // $scope.userOrGroupType1={};//当前节点运维组/运维人员
163
     // $scope.userOrGroupType1={};//当前节点运维组/运维人员
164
+    $scope.group_user = {
165
+        // offlineGroup:{},//线下组
166
+        // onlineUser:{}//线上人
167
+    }
162
     $scope.dataSave1 = [];//储存$scope.tree_data
168
     $scope.dataSave1 = [];//储存$scope.tree_data
163
     $scope.my_tree_1handler = function(branch) {
169
     $scope.my_tree_1handler = function(branch) {
164
         console.log($scope.dataSave1)
170
         console.log($scope.dataSave1)
@@ -172,31 +178,30 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
172
         }
178
         }
173
 
179
 
174
         $scope.changecate = true;
180
         $scope.changecate = true;
175
-        $scope.addcate = false;
181
+        $scope.add1cate = false;
176
         filterData.treeIds = branch.id;
182
         filterData.treeIds = branch.id;
177
-        $scope.selectedTreeNode = branch;
183
+        // $scope.selectedTreeNode = branch;
178
         $scope.output = branch;
184
         $scope.output = branch;
179
         $scope.thisParent=branch.parent||null;
185
         $scope.thisParent=branch.parent||null;
180
         if($scope.thisParent){
186
         if($scope.thisParent){
181
              $scope.thisParent.label=$scope.thisParent.type;
187
              $scope.thisParent.label=$scope.thisParent.type;
182
              $scope.thisParent.isExpanded=true;
188
              $scope.thisParent.isExpanded=true;
183
              $scope.thisParent.selected=true;
189
              $scope.thisParent.selected=true;
184
-             $scope.subdata['parent']=$scope.thisParent
190
+             $scope.sub1data['parent']=$scope.thisParent
185
         };
191
         };
186
         convertchildToTree(branch,'巡检范围');//2022年5月27日,暂存,明明
192
         convertchildToTree(branch,'巡检范围');//2022年5月27日,暂存,明明
187
-        console.log(branch)
188
-        if(branch.managerUser){
189
-            $scope.subdata.managerUser = branch.managerUser
193
+        console.log(branch);
194
+        if(branch.user){
195
+            $scope.group_user['onlineUser']=branch.user||{};
196
+        }else{
197
+            $scope.group_user['onlineUser']={}
190
         }
198
         }
191
-        if(branch.userOrGroupType){
192
-            $scope.userOrGroupType['type']=branch.userOrGroupType;
193
-            $scope.userGroupChecked['groupCheck']=branch.group||{};
194
-            $scope.userGroupChecked['userCheck']=branch.handleUser||{};
199
+        if(branch.group){
200
+            $scope.group_user['offlineGroup']=branch.group||{};
195
         }else{
201
         }else{
196
-            $scope.userOrGroupType['type']=0;
197
-            $scope.userGroupChecked={}
202
+            $scope.group_user['offlineGroup']={}
198
         }
203
         }
199
-        $scope.subdata.category=branch.label;
204
+        $scope.sub1data.type=branch.label;
200
         var eqflag = false;
205
         var eqflag = false;
201
         angular.forEach($scope.outdata, function(item) {
206
         angular.forEach($scope.outdata, function(item) {
202
             if (item.id == $scope.output.id) eqflag = true;
207
             if (item.id == $scope.output.id) eqflag = true;
@@ -232,6 +237,11 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
232
                 //     }
237
                 //     }
233
                 // });
238
                 // });
234
         }
239
         }
240
+        $scope.addType1 = function(element) {
241
+            $scope.tree_1data = $scope.dataSave1.length?angular.copy($scope.dataSave1):$scope.tree_1data;
242
+            $scope.add1cate = true
243
+            $scope.changecate = false
244
+        }
235
         /* -----start remove incidet category----- */
245
         /* -----start remove incidet category----- */
236
     $scope.remove = function(element) {
246
     $scope.remove = function(element) {
237
             var modalInstance = $modal.open({
247
             var modalInstance = $modal.open({
@@ -289,21 +299,76 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
289
                 }
299
                 }
290
             })
300
             })
291
         }
301
         }
302
+        $scope.remove1 = function(element) {
303
+            var modalInstance = $modal.open({
304
+                templateUrl: 'assets/views/delete.html',
305
+                controller: function($scope, scope, $modalInstance, api_bpm_data) {
306
+                    $scope.title = "巡检范围删除?";
307
+                    $scope.connect = "确定要删除此巡检范围?";
308
+                    $scope.ok = function() {
309
+                        $modalInstance.close(element);
310
+                    };
311
+                    $scope.cancel = function() {
312
+                        $modalInstance.dismiss('cancel');
313
+                    };
314
+                },
315
+                size: 'sm',
316
+                resolve: {
317
+                    scope: function() {
318
+                        return $scope;
319
+                    }
320
+                }
321
+            });
322
+            modalInstance.result.then(function(selectedItem) {
323
+                if (selectedItem) {
324
+                    var rmvList = [];
325
+                    rmvList.push(selectedItem.id);
326
+                    if (selectedItem.children.length > 0) {
327
+                        SweetAlert.swal({
328
+                            title: "删除失败!",
329
+                            text: "请先删除选中的范围的子级",
330
+                            type: "error"
331
+                        })
332
+                    } else {
333
+                        api_bpm_data.rmvData('inspectionType', rmvList).then(function(response) {
334
+                            if (response.data) {
335
+                                SweetAlert.swal({
336
+                                    title: "删除成功!",
337
+                                    type: "success",
338
+                                    confirmButtonColor: "#007AFF"
339
+                                }, function() {
340
+                                    $scope.try_async_1load();
341
+                                    $scope.$apply($scope.my_1data);
342
+                                });
343
+
344
+                            } else {
345
+                                SweetAlert.swal({
346
+                                    title: "操作异常!",
347
+                                    text: "系统异常,请稍后重试,或者联系管理员!",
348
+                                    type: "error"
349
+                                });
350
+                            }
351
+                        })
352
+                    }
353
+                }
354
+            })
355
+        }
292
         /* -----end remove incidet category----- */
356
         /* -----end remove incidet category----- */
293
 
357
 
294
     function convertchildToTree(datum,type) {
358
     function convertchildToTree(datum,type) {
295
-        $scope.subdata = {};
296
         if(type === '事件分类'){
359
         if(type === '事件分类'){
360
+            $scope.subdata = {};
297
             if (datum.parent) {
361
             if (datum.parent) {
298
                 $scope.subdata = { 'id': datum.id, 'category': datum.label, 'group': datum.group||{}, 'hasPlace': datum.hasPlace, 'hasSimple': datum.hasSimple, 'priority': datum.priority, 'complexity': datum.complexity,  'parent': datum.parent }
362
                 $scope.subdata = { 'id': datum.id, 'category': datum.label, 'group': datum.group||{}, 'hasPlace': datum.hasPlace, 'hasSimple': datum.hasSimple, 'priority': datum.priority, 'complexity': datum.complexity,  'parent': datum.parent }
299
             } else {
363
             } else {
300
                 $scope.subdata = { 'id': datum.id, 'category': datum.label, 'group': datum.group||{}, 'hasSimple': datum.hasSimple, 'hasPlace': datum.hasPlace, 'priority': datum.priority, 'complexity': datum.complexity }
364
                 $scope.subdata = { 'id': datum.id, 'category': datum.label, 'group': datum.group||{}, 'hasSimple': datum.hasSimple, 'hasPlace': datum.hasPlace, 'priority': datum.priority, 'complexity': datum.complexity }
301
             }
365
             }
302
         }else if(type === '巡检范围'){
366
         }else if(type === '巡检范围'){
367
+            $scope.sub1data = {};
303
             if (datum.parent) {
368
             if (datum.parent) {
304
-                $scope.subdata = { 'id': datum.id, 'type': datum.label, 'parent': datum.parent }
369
+                $scope.sub1data = { 'id': datum.id, 'type': datum.label, 'parent': datum.parent }
305
             } else {
370
             } else {
306
-                $scope.subdata = { 'id': datum.id, 'type': datum.label }
371
+                $scope.sub1data = { 'id': datum.id, 'type': datum.label }
307
             }
372
             }
308
         }
373
         }
309
     }
374
     }
@@ -426,13 +491,19 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
426
         $scope.my_1data = [];
491
         $scope.my_1data = [];
427
         
492
         
428
         $scope.doing_async = true;
493
         $scope.doing_async = true;
429
-        var data = { "idx": 0, "sum": 1000 };
494
+        var data = { "idx": 0, "sum": 1000,inspectionType:{deleteFlag:0} };
430
         api_bpm_data.fetchDataList('inspectionType', data).then(function(response) {
495
         api_bpm_data.fetchDataList('inspectionType', data).then(function(response) {
431
             var data = response.list;
496
             var data = response.list;
432
             var objects = [];
497
             var objects = [];
433
             for (var i = 0; i < data.length; i++) {
498
             for (var i = 0; i < data.length; i++) {
434
                 var object = {};
499
                 var object = {};
435
                 object.id = data[i].id;
500
                 object.id = data[i].id;
501
+                if (angular.isDefined(data[i].user)) {
502
+                    object.user = data[i].user||{};
503
+                }
504
+                if (angular.isDefined(data[i].group)) {
505
+                    object.group = data[i].group||{};
506
+                }
436
                 if (angular.isDefined(data[i].parent)) {
507
                 if (angular.isDefined(data[i].parent)) {
437
                     object.parent = data[i].parent;
508
                     object.parent = data[i].parent;
438
                 }
509
                 }
@@ -508,7 +579,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
508
         }
579
         }
509
 
580
 
510
         var filedata = { "incidentcategory": formdata }
581
         var filedata = { "incidentcategory": formdata }
511
-        console.log(filedata);
582
+        console.log(filedata,$scope.userGroupChecked);
512
         // return;
583
         // return;
513
         api_bpm_data.updData('incidentcategory', filedata).then(function(response) {
584
         api_bpm_data.updData('incidentcategory', filedata).then(function(response) {
514
             if (response) {
585
             if (response) {
@@ -529,10 +600,63 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
529
             }
600
             }
530
         });
601
         });
531
     };
602
     };
603
+    $scope.submit1change = function(formdata) {
604
+        console.log($scope.output)
605
+        if($scope.selectedChangeCategory){
606
+            formdata['parent'] ={'id':$scope.selectedChangeCategory.id};
607
+        }else if($scope.thisParent){
608
+            formdata['parent'] ={'id':$scope.thisParent.id};
609
+        }
610
+        if($scope.group_user.offlineGroup&&$scope.group_user.offlineGroup.id){
611
+            formdata.group={id:$scope.group_user.offlineGroup.id};
612
+        }
613
+        if($scope.group_user.onlineUser&&$scope.group_user.onlineUser.id){
614
+            formdata.user={id:$scope.group_user.onlineUser.id};
615
+        }
616
+        // if($scope.userGroupChecked&&$scope.userGroupChecked.groupCheck){
617
+        //     formdata.group={id:$scope.userGroupChecked.groupCheck.id};
618
+        // }
619
+        // if($scope.userGroupChecked&&$scope.userGroupChecked.userCheck){
620
+        //     formdata.handleUser={id:$scope.userGroupChecked.userCheck.id};
621
+        // }
622
+        // if($scope.subdata.complexity){
623
+        //     formdata.complexity=$scope.subdata.complexity
624
+        // }
625
+        // if($scope.subdata.priority){
626
+        //     formdata.priority=$scope.subdata.priority
627
+        // }
628
+        // if($scope.subdata.managerUser){
629
+        //     formdata.managerUser=$scope.subdata.managerUser
630
+        // }
631
+
632
+        var filedata = { "inspectionType": formdata }
633
+        console.log(filedata,$scope.group_user);
634
+        // return;
635
+        api_bpm_data.updData('inspectionType', filedata).then(function(response) {
636
+            if (response) {
637
+                if (response.status == 200) {
638
+                    $scope.try_async_1load()
639
+                    SweetAlert.swal({
640
+                        title: "修改成功!",
641
+                        type: "success"
642
+                    }, function() {
643
+                        $scope.$apply($scope.my_1data);
644
+                    })
645
+                } else {
646
+                    SweetAlert.swal({
647
+                        title: "修改失败!",
648
+                        type: "error"
649
+                    })
650
+                }
651
+            }
652
+        });
653
+    };
532
     $scope.adddata = {};
654
     $scope.adddata = {};
655
+    $scope.add1data = {};
533
     $scope.addparent = false;
656
     $scope.addparent = false;
534
     // 新增保存提交
657
     // 新增保存提交
535
     $scope.userGroupCheckedAdd={};//选中人/组数据
658
     $scope.userGroupCheckedAdd={};//选中人/组数据
659
+    $scope.group_user_Add={};//选中人/组数据
536
     $scope.userOrGroupTypeAdd={};//运维组/运维人员
660
     $scope.userOrGroupTypeAdd={};//运维组/运维人员
537
     $scope.submitadd = function(formdata) {
661
     $scope.submitadd = function(formdata) {
538
         console.log(formdata)
662
         console.log(formdata)
@@ -612,6 +736,46 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
612
             }
736
             }
613
         });
737
         });
614
     };
738
     };
739
+    $scope.submit1add = function(formdata) {//lmm
740
+        console.log(formdata)
741
+        if($scope.group_user_Add&&$scope.group_user_Add.group&&$scope.group_user_Add.group.id){
742
+            formdata.group={id:$scope.group_user_Add.group.id};
743
+        }
744
+        if($scope.group_user_Add&&$scope.group_user_Add.user&&$scope.group_user_Add.user.id){
745
+            formdata.user={id:$scope.group_user_Add.user.id};
746
+        }
747
+        formdata.deleteFlag = 0;
748
+        formdata.formUiName = 'inspection_LinHu_detail';
749
+        formdata.formUiEdit = 'inspection_LinHu_confirm';
750
+        formdata.processKey = 'bpm_inspection';
751
+        var filedata = { "inspectionType": formdata }
752
+        console.log(filedata);
753
+        // return;
754
+        api_bpm_data.addData('inspectionType', filedata).then(function(response) {
755
+            if (response) {
756
+                if (response.status == 200) {
757
+                    $scope.userdata = [];
758
+                    $scope.outdata = [];
759
+                    $scope.try_async_1load();
760
+                    SweetAlert.swal({
761
+                        title: "增加成功!",
762
+                        type: "success"
763
+                    })
764
+                } else if (response.status == 408) {
765
+                    SweetAlert.swal({
766
+                        title: "增加失败!",
767
+                        text: response.error,
768
+                        type: "error"
769
+                    })
770
+                } else {
771
+                    SweetAlert.swal({
772
+                        title: "增加失败!",
773
+                        type: "error"
774
+                    })
775
+                }
776
+            }
777
+        });
778
+    };
615
     /* -----end submit incidet category----- */
779
     /* -----end submit incidet category----- */
616
     $scope.try_async_load();
780
     $scope.try_async_load();
617
     $scope.try_async_1load();
781
     $scope.try_async_1load();

+ 1 - 1
assets/views/inspect/inspectList.html

@@ -153,7 +153,7 @@
153
             </div>
153
             </div>
154
           </div>
154
           </div>
155
         <div class="form-group inspectlistsearch">
155
         <div class="form-group inspectlistsearch">
156
-          <div class="pull-left" style="padding-top: 4px">巡检类型:</div>
156
+          <div class="pull-left" style="padding-top: 4px">巡检范围:</div>
157
           <div class="pull-right iptSize" style="display: inline">
157
           <div class="pull-right iptSize" style="display: inline">
158
             <div>
158
             <div>
159
               <multi-select-tree
159
               <multi-select-tree

+ 14 - 14
assets/views/system/processdesign/incidentplan/incidentSetUp.html

@@ -842,8 +842,8 @@
842
                             <div class="mainDiv-head">
842
                             <div class="mainDiv-head">
843
                                 <span>服务目录</span>
843
                                 <span>服务目录</span>
844
                                 <div class="mainDiv-head-right">
844
                                 <div class="mainDiv-head-right">
845
-                                    <div class="btn btn_search" ng-click="addType(output)" ng-show="xinzeng">新增</div>
846
-                                    <div class="btn btn_remove" ng-class="isMousedown?'btn_removeMousedown':''" ng-mousedown="changeRemoveClass()" ng-click="remove(output)" ng-show="shanchu">删除</div>
845
+                                    <div class="btn btn_search" ng-click="addType1(output)" ng-show="xinzeng">新增</div>
846
+                                    <div class="btn btn_remove" ng-class="isMousedown?'btn_removeMousedown':''" ng-mousedown="changeRemoveClass()" ng-click="remove1(output)" ng-show="shanchu">删除</div>
847
                                 </div>
847
                                 </div>
848
                             </div>
848
                             </div>
849
                             <div class="mainDiv-body fixHeight">
849
                             <div class="mainDiv-body fixHeight">
@@ -864,7 +864,7 @@
864
                                         服务目录名称:
864
                                         服务目录名称:
865
                                     </div>
865
                                     </div>
866
                                     <div class="tab-mainDiv-body-content">
866
                                     <div class="tab-mainDiv-body-content">
867
-                                        <input class="form-control" ng-model="subdata.category" placeholder="服务目录名称..." />
867
+                                        <input class="form-control" ng-model="sub1data.type" placeholder="服务目录名称..." />
868
                                     </div>
868
                                     </div>
869
                                 </div>
869
                                 </div>
870
                                 <div class="tab-mainDiv-body-lineDiv-50" ng-if="thisParent">
870
                                 <div class="tab-mainDiv-body-lineDiv-50" ng-if="thisParent">
@@ -872,13 +872,13 @@
872
                                         父类:
872
                                         父类:
873
                                     </div>
873
                                     </div>
874
                                     <div class="tab-mainDiv-body-content">
874
                                     <div class="tab-mainDiv-body-content">
875
-                                        <multi-select-tree ng-model="subdata.parent" data-input-model="tree_data" data-output-model="subdata.parent" theme="bootstrap" multi-select="false" data-default-label="{{thisParent.category}}" data-callback="onFilterCallback(item)" data-select-only-leafs="false" data-trans-label="label"
875
+                                        <multi-select-tree ng-model="sub1data.parent" data-input-model="tree_1data" data-output-model="sub1data.parent" theme="bootstrap" multi-select="false" data-default-label="{{thisParent.type}}" data-callback="onFilterCallback(item)" data-select-only-leafs="false" data-trans-label="label"
876
                                             data-switch-view="false"></multi-select-tree>
876
                                             data-switch-view="false"></multi-select-tree>
877
                                     </div>
877
                                     </div>
878
                                 </div>
878
                                 </div>
879
                                 <div class="tab-mainDiv-body-lineDiv-50">
879
                                 <div class="tab-mainDiv-body-lineDiv-50">
880
                                     <div class="tab-mainDiv-body-lable">线下巡检默认组:</div>
880
                                     <div class="tab-mainDiv-body-lable">线下巡检默认组:</div>
881
-                                    <ui-select class="tab-mainDiv-body-content" ng-model="userGroupChecked.groupCheck"
881
+                                    <ui-select class="tab-mainDiv-body-content" ng-model="group_user.offlineGroup"
882
                                         theme="bootstrap">
882
                                         theme="bootstrap">
883
                                         <ui-select-match placeholder="">
883
                                         <ui-select-match placeholder="">
884
                                             {{$select.selected.groupName}}
884
                                             {{$select.selected.groupName}}
@@ -890,7 +890,7 @@
890
                                 </div>
890
                                 </div>
891
                                 <div class="tab-mainDiv-body-lineDiv-50">
891
                                 <div class="tab-mainDiv-body-lineDiv-50">
892
                                     <div class="tab-mainDiv-body-lable">线上巡检默认人:</div>
892
                                     <div class="tab-mainDiv-body-lable">线上巡检默认人:</div>
893
-                                    <ui-select class="tab-mainDiv-body-content" ng-model="userGroupChecked.userCheck"
893
+                                    <ui-select class="tab-mainDiv-body-content" ng-model="group_user.onlineUser"
894
                                         theme="bootstrap">
894
                                         theme="bootstrap">
895
                                         <ui-select-match placeholder="">
895
                                         <ui-select-match placeholder="">
896
                                             {{$select.selected.name}}
896
                                             {{$select.selected.name}}
@@ -902,13 +902,13 @@
902
                                 </div>
902
                                 </div>
903
                             </div>
903
                             </div>
904
                             <div class="tab-mainDiv-foot">
904
                             <div class="tab-mainDiv-foot">
905
-                                <div class="btn btn_search" ng-click="submitchange(subdata)" ng-show="bianji">
905
+                                <div class="btn btn_search" ng-click="submit1change(sub1data)" ng-show="bianji">
906
                                     确认
906
                                     确认
907
                                 </div>
907
                                 </div>
908
                             </div>
908
                             </div>
909
                         </div>
909
                         </div>
910
                 
910
                 
911
-                        <div class="mainDivRight" ng-if="addcate">
911
+                        <div class="mainDivRight" ng-if="add1cate">
912
                             <div class="mainDiv-head">
912
                             <div class="mainDiv-head">
913
                                 <span>服务目录新增</span>
913
                                 <span>服务目录新增</span>
914
                             </div>
914
                             </div>
@@ -918,7 +918,7 @@
918
                                         服务目录名称:
918
                                         服务目录名称:
919
                                     </div>
919
                                     </div>
920
                                     <div class="tab-mainDiv-body-content">
920
                                     <div class="tab-mainDiv-body-content">
921
-                                        <input class="form-control" ng-model="adddata.category" placeholder="服务目录名称..." />
921
+                                        <input class="form-control" ng-model="add1data.type" placeholder="服务目录名称..." />
922
                                     </div>
922
                                     </div>
923
                                 </div>
923
                                 </div>
924
                                 <div class="tab-mainDiv-body-lineDiv-50">
924
                                 <div class="tab-mainDiv-body-lineDiv-50">
@@ -934,13 +934,13 @@
934
                                         父类:
934
                                         父类:
935
                                     </div>
935
                                     </div>
936
                                     <div class="tab-mainDiv-body-content">
936
                                     <div class="tab-mainDiv-body-content">
937
-                                        <multi-select-tree ng-model="adddata.parent" data-input-model="tree_data" data-output-model="adddata.parent" theme="bootstrap" multi-select="false" data-default-label="服务目录" data-callback="onFilterCallback(item)" data-select-only-leafs="false" data-trans-label="label"
937
+                                        <multi-select-tree ng-model="add1data.parent" data-input-model="tree_1data" data-output-model="add1data.parent" theme="bootstrap" multi-select="false" data-default-label="服务目录" data-callback="onFilterCallback(item)" data-select-only-leafs="false" data-trans-label="label"
938
                                             data-switch-view="false"></multi-select-tree>
938
                                             data-switch-view="false"></multi-select-tree>
939
                                     </div>
939
                                     </div>
940
                                 </div>
940
                                 </div>
941
                                 <div class="tab-mainDiv-body-lineDiv-50">
941
                                 <div class="tab-mainDiv-body-lineDiv-50">
942
                                     <div class="tab-mainDiv-body-lable">线下巡检默认组:</div>
942
                                     <div class="tab-mainDiv-body-lable">线下巡检默认组:</div>
943
-                                    <ui-select class="tab-mainDiv-body-content" ng-model="userGroupCheckedAdd.groupCheck"
943
+                                    <ui-select class="tab-mainDiv-body-content" ng-model="group_user_Add.group"
944
                                         theme="bootstrap">
944
                                         theme="bootstrap">
945
                                         <ui-select-match placeholder="">
945
                                         <ui-select-match placeholder="">
946
                                             {{$select.selected.groupName}}
946
                                             {{$select.selected.groupName}}
@@ -952,7 +952,7 @@
952
                                 </div>
952
                                 </div>
953
                                 <div class="tab-mainDiv-body-lineDiv-50">
953
                                 <div class="tab-mainDiv-body-lineDiv-50">
954
                                     <div class="tab-mainDiv-body-lable">线上巡检默认人:</div>
954
                                     <div class="tab-mainDiv-body-lable">线上巡检默认人:</div>
955
-                                    <ui-select class="tab-mainDiv-body-content" ng-model="userGroupCheckedAdd.userCheck"
955
+                                    <ui-select class="tab-mainDiv-body-content" ng-model="group_user_Add.user"
956
                                         theme="bootstrap">
956
                                         theme="bootstrap">
957
                                         <ui-select-match placeholder="">
957
                                         <ui-select-match placeholder="">
958
                                             {{$select.selected.name}}
958
                                             {{$select.selected.name}}
@@ -964,7 +964,7 @@
964
                                 </div>
964
                                 </div>
965
                             </div>
965
                             </div>
966
                             <div class="tab-mainDiv-foot">
966
                             <div class="tab-mainDiv-foot">
967
-                                <div class="btn btn_search" ng-click="submitadd(adddata,addparent)">
967
+                                <div class="btn btn_search" ng-click="submit1add(add1data)">
968
                                     确认
968
                                     确认
969
                                 </div>
969
                                 </div>
970
                                 <div class="btn btn_clean" ng-click="closethis(addcategory)">
970
                                 <div class="btn btn_clean" ng-click="closethis(addcategory)">
@@ -973,7 +973,7 @@
973
                             </div>
973
                             </div>
974
                         </div>
974
                         </div>
975
                 
975
                 
976
-                        <div class="mainDivRight" ng-if="addcate==''&&changecate==''">
976
+                        <div class="mainDivRight" ng-if="add1cate==''&&changecate==''">
977
                             <!-- <div class="mainDivRight"> -->
977
                             <!-- <div class="mainDivRight"> -->
978
                             <div class="mainDiv-head">
978
                             <div class="mainDiv-head">
979
                                 <span>操作提示</span>
979
                                 <span>操作提示</span>