|
@@ -373,9 +373,9 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
|
373
|
373
|
}
|
374
|
374
|
}
|
375
|
375
|
if (datum.parent) {
|
376
|
|
- $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, branchType:datum.branchType,branchUserGroups:datum.branchUserGroups||[] }
|
|
376
|
+ $scope.subdata = { 'id': datum.id, 'hierarchy': datum.hierarchy, 'category': datum.label, 'group': datum.group||{}, 'hasPlace': datum.hasPlace, 'hasSimple': datum.hasSimple, 'priority': datum.priority, 'complexity': datum.complexity, 'parent': datum.parent, branchType:datum.branchType,branchUserGroups:datum.branchUserGroups||[] }
|
377
|
377
|
} else {
|
378
|
|
- $scope.subdata = { 'id': datum.id, 'category': datum.label, 'group': datum.group||{}, 'hasSimple': datum.hasSimple, 'hasPlace': datum.hasPlace, 'priority': datum.priority, 'complexity': datum.complexity, branchType:datum.branchType,branchUserGroups:datum.branchUserGroups||[] }
|
|
378
|
+ $scope.subdata = { 'id': datum.id, 'hierarchy': datum.hierarchy, 'category': datum.label, 'group': datum.group||{}, 'hasSimple': datum.hasSimple, 'hasPlace': datum.hasPlace, 'priority': datum.priority, 'complexity': datum.complexity, branchType:datum.branchType,branchUserGroups:datum.branchUserGroups||[] }
|
379
|
379
|
}
|
380
|
380
|
}else if(type === '巡检范围'){
|
381
|
381
|
$scope.sub1data = {};
|
|
@@ -466,6 +466,9 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
|
466
|
466
|
if (angular.isDefined(data[i].hasPlace)) {
|
467
|
467
|
object.hasPlace = data[i].hasPlace;
|
468
|
468
|
}
|
|
469
|
+ if (angular.isDefined(data[i].hierarchy)) {
|
|
470
|
+ object.hierarchy = data[i].hierarchy;
|
|
471
|
+ }
|
469
|
472
|
if (angular.isDefined(data[i].hasSimple)) {
|
470
|
473
|
object.hasSimple = data[i].hasSimple;
|
471
|
474
|
}
|
|
@@ -564,6 +567,14 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
|
564
|
567
|
$scope.userGroupChecked={};//选中人/组数据
|
565
|
568
|
$scope.submitchange = function(formdata1) {
|
566
|
569
|
var formdata = angular.copy(formdata1);
|
|
570
|
+ if(formdata.parent && formdata.parent.hierarchy >= 3){
|
|
571
|
+ SweetAlert.swal({
|
|
572
|
+ title: "编辑失败!",
|
|
573
|
+ text: '不能选择三级事件分类作为父级!',
|
|
574
|
+ type: "error"
|
|
575
|
+ })
|
|
576
|
+ return;
|
|
577
|
+ }
|
567
|
578
|
// if (formdata.hasArea) {
|
568
|
579
|
// formdata.hasArea = 1;
|
569
|
580
|
// formdata.hasPlace = 1;
|
|
@@ -739,6 +750,14 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
|
739
|
750
|
$scope.submitadd = function(formdata1) {
|
740
|
751
|
var formdata = angular.copy(formdata1);
|
741
|
752
|
console.log(formdata)
|
|
753
|
+ if(formdata.parent && formdata.parent.hierarchy >= 3){
|
|
754
|
+ SweetAlert.swal({
|
|
755
|
+ title: "增加失败!",
|
|
756
|
+ text: '不能选择三级事件分类作为父级!',
|
|
757
|
+ type: "error"
|
|
758
|
+ })
|
|
759
|
+ return;
|
|
760
|
+ }
|
742
|
761
|
// var paret = {};
|
743
|
762
|
// var filedata = {};
|
744
|
763
|
// filedata = angular.copy(formdata);
|
|
@@ -772,7 +791,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
|
772
|
791
|
formdata.hasSimple = 0;
|
773
|
792
|
}
|
774
|
793
|
if (formdata.parent) {
|
775
|
|
- formdata['parentCategory'] = { "id": formdata.parent.id };
|
|
794
|
+ formdata['parentCategory'] = formdata.parent;
|
776
|
795
|
delete formdata.parent
|
777
|
796
|
}
|
778
|
797
|
if($scope.adddata.branchType == 1){
|