|
@@ -62,7 +62,8 @@ app.controller("inspectionScope", [
|
62
|
62
|
$scope.leftListName = "巡检范围";
|
63
|
63
|
$scope.leftListCli = function (idx, data) {
|
64
|
64
|
$scope.leftListIdx = idx;
|
65
|
|
- $scope.stateModel = data;
|
|
65
|
+ // $scope.stateModel = data;
|
|
66
|
+ $scope.stateModel.currentId = data.id;
|
66
|
67
|
$scope.modelName = data.modelName;
|
67
|
68
|
$scope.copyInspection.tree = [];
|
68
|
69
|
$scope.selectedInspection.isShowZtree = false;
|
|
@@ -758,10 +759,11 @@ app.directive("zTree", function () {
|
758
|
759
|
changecate: "=",
|
759
|
760
|
cachehttp: "=",
|
760
|
761
|
},
|
761
|
|
- controller: function ($scope, $element, api_bpm_data, api_simple) {
|
|
762
|
+ controller: function ($rootScope,$scope, $element, api_bpm_data, api_simple) {
|
762
|
763
|
console.log($scope);
|
763
|
764
|
getTreeInfo();
|
764
|
765
|
function getTreeInfo() {
|
|
766
|
+ $rootScope.isMask = true;
|
765
|
767
|
$scope.treeInfo = [];
|
766
|
768
|
var data = { idx: 0, sum: 1000, inspectionType: { deleteFlag: 0 } };
|
767
|
769
|
$scope.isShowZtree = false;
|
|
@@ -797,9 +799,10 @@ app.directive("zTree", function () {
|
797
|
799
|
.fetchDataList("inspectionBind", {
|
798
|
800
|
idx: 0,
|
799
|
801
|
sum: 1000,
|
800
|
|
- inspectionBind: { inspection: $scope.stateModel.id },
|
|
802
|
+ inspectionBind: { inspection: $scope.stateModel.currentId || $scope.stateModel.id },
|
801
|
803
|
})
|
802
|
804
|
.then(function (response) {
|
|
805
|
+ $rootScope.isMask = false;
|
803
|
806
|
$.fn.zTree.destroy("z-tree");
|
804
|
807
|
$.fn.zTree.init($($element), setting, $scope.treeInfo);
|
805
|
808
|
$scope.isShowZtree = true;
|
|
@@ -1016,8 +1019,9 @@ app.directive("zTreeCopy", function () {
|
1016
|
1019
|
},
|
1017
|
1020
|
};
|
1018
|
1021
|
$.fn.zTree.destroy("z-tree-copy");
|
1019
|
|
- var treeObj = $.fn.zTree.init($(element), setting, newVal);
|
1020
|
|
- treeObj.expandAll(true);
|
|
1022
|
+ $.fn.zTree.init($(element), setting, newVal);
|
|
1023
|
+ // var treeObj = $.fn.zTree.init($(element), setting, newVal);
|
|
1024
|
+ // treeObj.expandAll(true);
|
1021
|
1025
|
});
|
1022
|
1026
|
//点击菜单项
|
1023
|
1027
|
function onMouseDown(event, treeId, treeNode) {
|