Commit 39dc38d5ee981f9477ff0d81f3acdce2c6ee8bb0
1 parent
b84f5d16
1.闵行将线调->地图用做线路规划
Showing
1 changed file
with
15 additions
and
2 deletions
src/main/resources/static/real_control_v2/mapmonitor/js/gps_tree.js
| ... | ... | @@ -55,12 +55,13 @@ var gb_map_gps_tree = (function () { |
| 55 | 55 | }; |
| 56 | 56 | |
| 57 | 57 | var refresh = function () { |
| 58 | + debugger | |
| 58 | 59 | var jstreeInts = treeObj.jstree(true); |
| 59 | 60 | var oldChecks = jstreeInts.get_checked(true); |
| 60 | 61 | var treeData = gb_common.get_device_tree_data(gb_data_gps.allGps, idBefore); |
| 61 | 62 | jstreeInts.settings.core.data = treeData; |
| 62 | 63 | jstreeInts.refresh(); |
| 63 | - jstreeInts.bind("refresh.jstree", function (event, data) { | |
| 64 | + setTimeout(function () { | |
| 64 | 65 | $.each(oldChecks, function () { |
| 65 | 66 | jstreeInts.check_node(jstreeInts.get_node(this.a_attr.id)); |
| 66 | 67 | }); |
| ... | ... | @@ -70,7 +71,19 @@ var gb_map_gps_tree = (function () { |
| 70 | 71 | create_route_node(this.lineCode); |
| 71 | 72 | } |
| 72 | 73 | }); |
| 73 | - }) | |
| 74 | + }, 1000); | |
| 75 | + // 正统方式在浦交分支ok | |
| 76 | + /*jstreeInts.bind("refresh.jstree", function (event, data) { | |
| 77 | + $.each(oldChecks, function () { | |
| 78 | + jstreeInts.check_node(jstreeInts.get_node(this.a_attr.id)); | |
| 79 | + }); | |
| 80 | + $.each(gb_data_basic.activeLines, function (i) { | |
| 81 | + var lineNode = jstreeInts.get_node(idBefore + 'line_' + this.lineCode); | |
| 82 | + if (!lineNode) { | |
| 83 | + create_route_node(this.lineCode); | |
| 84 | + } | |
| 85 | + }); | |
| 86 | + })*/ | |
| 74 | 87 | }; |
| 75 | 88 | |
| 76 | 89 | //創建新節點 | ... | ... |