Commit 23b2125c3ac8461b91bf77c1aed13b2326494bca
1 parent
c9e2ea96
update
Showing
4 changed files
with
61 additions
and
13 deletions
src/main/resources/application-dev.properties
| ... | ... | @@ -8,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy |
| 8 | 8 | spring.jpa.database= MYSQL |
| 9 | 9 | spring.jpa.show-sql= false |
| 10 | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://192.168.168.201/mh_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 11 | +spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 12 | 12 | spring.datasource.username= root |
| 13 | -spring.datasource.password= 123456 | |
| 13 | +spring.datasource.password= panzhao | |
| 14 | 14 | #DATASOURCE |
| 15 | 15 | spring.datasource.max-active=100 |
| 16 | 16 | spring.datasource.max-idle=8 |
| ... | ... | @@ -26,7 +26,7 @@ spring.datasource.validation-query=select 1 |
| 26 | 26 | ## |
| 27 | 27 | #222.66.0.204:5555 |
| 28 | 28 | ##\u5B9E\u65F6gps |
| 29 | -http.gps.real.url= http://192.168.168.201:9090/transport_server/rtgps/ | |
| 30 | -#http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/ | |
| 29 | +#http.gps.real.url= http://192.168.168.201:9090/transport_server/rtgps/ | |
| 30 | +http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/ | |
| 31 | 31 | ##\u6D88\u606F\u4E0B\u53D1 |
| 32 | 32 | http.send.directive = http://192.168.168.201:9090/transport_server/message/ |
| 33 | 33 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/css/real.css
| ... | ... | @@ -320,4 +320,10 @@ |
| 320 | 320 | background: rgba(255, 255, 255, 0.98); |
| 321 | 321 | box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); |
| 322 | 322 | display: none; |
| 323 | +} | |
| 324 | + | |
| 325 | +.station-route-tree{ | |
| 326 | + width: 100%; | |
| 327 | + height: 100%; | |
| 328 | + overflow: auto; | |
| 323 | 329 | } |
| 324 | 330 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/js/spatial_data.js
| ... | ... | @@ -25,7 +25,7 @@ var gb_map_spatial_data = (function () { |
| 25 | 25 | return a.stationRouteCode - b.stationRouteCode; |
| 26 | 26 | }); |
| 27 | 27 | //按线路分组 |
| 28 | - var lineStationArr = gb_common.groupBy(list, 'lineCode'); | |
| 28 | + lineStationArr = gb_common.groupBy(list, 'lineCode'); | |
| 29 | 29 | //再按上下行分组 |
| 30 | 30 | for (var lineCode in lineStationArr) { |
| 31 | 31 | lineStationArr[lineCode] = gb_common.groupBy(lineStationArr[lineCode], 'directions'); |
| ... | ... | @@ -36,17 +36,21 @@ var gb_map_spatial_data = (function () { |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | var refresh = function () { |
| 39 | - if(!triggerElem()) | |
| 39 | + if (!triggerElem()) | |
| 40 | 40 | return; |
| 41 | 41 | |
| 42 | - var chs = gb_map_overlay_mge.getCheckedDevice(); | |
| 43 | - //要绘制的站点路由 | |
| 44 | - var routes = {}; | |
| 45 | - $.each(chs, function () { | |
| 46 | - routes[this.data.lineId+'_'+this.data.upDown]=1; | |
| 42 | + //绘制站点路由树 | |
| 43 | + $('.station-route-tree').jstree({ | |
| 44 | + 'core': { | |
| 45 | + 'data': get_st_route_tree_data() | |
| 46 | + }, | |
| 47 | + 'checkbox': { | |
| 48 | + 'keep_selected_style': false, | |
| 49 | + 'whole_node': false, | |
| 50 | + 'tie_selection': false | |
| 51 | + }, | |
| 52 | + 'plugins': ['checkbox', 'state'] | |
| 47 | 53 | }); |
| 48 | - | |
| 49 | - console.log('chs', chs); | |
| 50 | 54 | } |
| 51 | 55 | |
| 52 | 56 | var triggerElem = function () { |
| ... | ... | @@ -63,6 +67,42 @@ var gb_map_spatial_data = (function () { |
| 63 | 67 | return false; |
| 64 | 68 | } |
| 65 | 69 | |
| 70 | + var get_st_route_tree_data = function () { | |
| 71 | + var treeData = []; | |
| 72 | + | |
| 73 | + for (var lineCode in lineStationArr) { | |
| 74 | + name = gb_data_basic.codeToLine[lineCode].name; | |
| 75 | + treeData.push({ | |
| 76 | + 'text': name, | |
| 77 | + 'children': [ | |
| 78 | + { | |
| 79 | + 'text': '上行', | |
| 80 | + 'children': grabs(lineStationArr[lineCode][0]), | |
| 81 | + }, | |
| 82 | + { | |
| 83 | + 'text': '下行', | |
| 84 | + 'children': grabs(lineStationArr[lineCode][1]), | |
| 85 | + } | |
| 86 | + ] | |
| 87 | + }) | |
| 88 | + } | |
| 89 | + return treeData; | |
| 90 | + }; | |
| 91 | + | |
| 92 | + var grabs = function (array) { | |
| 93 | + if (!array) | |
| 94 | + return; | |
| 95 | + var rs = []; | |
| 96 | + $.each(array, function () { | |
| 97 | + rs.push({ | |
| 98 | + 'text': this.stationName, | |
| 99 | + 'data': {}, | |
| 100 | + 'icon': false | |
| 101 | + }); | |
| 102 | + }); | |
| 103 | + return rs; | |
| 104 | + } | |
| 105 | + | |
| 66 | 106 | return { |
| 67 | 107 | refresh: refresh, |
| 68 | 108 | init: init | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/real.html