Commit 4d20b24d7ebc588c805624f98918b60a035df05d
1 parent
f022c7c0
客流显示
Showing
3 changed files
with
29 additions
and
2 deletions
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
| @@ -32,6 +32,18 @@ | @@ -32,6 +32,18 @@ | ||
| 32 | <p>角度:{{direction}}</p> | 32 | <p>角度:{{direction}}</p> |
| 33 | <p>经度:{{lon}}</p> | 33 | <p>经度:{{lon}}</p> |
| 34 | <p>纬度:{{lat}}</p> | 34 | <p>纬度:{{lat}}</p> |
| 35 | + {{if num !=null}} | ||
| 36 | + <p>人数:{{num}}</p> | ||
| 37 | + {{/if}} | ||
| 38 | + {{if num !=null && num <= 5}} | ||
| 39 | + <p>状态:<a href="javascript:;" style="color:green" onclick="javascript:gb_map_play_back.showPhoto('{{photo}}');">舒适</a></p> | ||
| 40 | + {{/if}} | ||
| 41 | + {{if num > 5 && num <= 10}} | ||
| 42 | + <p>状态:<a href="javascript:;" style="color:chocolate" onclick="javascript:gb_map_play_back.showPhoto('{{photo}}');">一般</a></p> | ||
| 43 | + {{/if}} | ||
| 44 | + {{if num > 10}} | ||
| 45 | + <p>状态:<a href="javascript:;" style="color:red" onclick="javascript:gb_map_play_back.showPhoto('{{photo}}');">拥挤</a></p> | ||
| 46 | + {{/if}} | ||
| 35 | {{if energy == 0}} | 47 | {{if energy == 0}} |
| 36 | <div><span class="field">电量:</span><span style="color: red;">{{energy}}% (异常)</span></div> | 48 | <div><span class="field">电量:</span><span style="color: red;">{{energy}}% (异常)</span></div> |
| 37 | {{/if}} | 49 | {{/if}} |
src/main/resources/static/real_control_v2/mapmonitor/js/map_overlay_manager.js
| @@ -257,6 +257,14 @@ var gb_map_overlay_mge = (function () { | @@ -257,6 +257,14 @@ var gb_map_overlay_mge = (function () { | ||
| 257 | _focus_station: _focus_station, | 257 | _focus_station: _focus_station, |
| 258 | _focus_carpark: _focus_carpark, | 258 | _focus_carpark: _focus_carpark, |
| 259 | map_gps_win_temp: function (data) { | 259 | map_gps_win_temp: function (data) { |
| 260 | + var url='http://58.247.254.118:9999/pf/getPassengerFlow?deviceId='+data.deviceId; | ||
| 261 | + console.log(url); | ||
| 262 | + $.ajax({async:false,url:url, success:function(res) { | ||
| 263 | + console.log(res); | ||
| 264 | + data.num=res.num; | ||
| 265 | + data.photo=res.photo; | ||
| 266 | + }}) | ||
| 267 | + console.log("数据回显"); | ||
| 260 | return temps['map-win-gps-detail-temp'](data); | 268 | return temps['map-win-gps-detail-temp'](data); |
| 261 | }, | 269 | }, |
| 262 | map_station_win_temp: function (data) { | 270 | map_station_win_temp: function (data) { |
src/main/resources/static/real_control_v2/mapmonitor/js/playback.js
| @@ -105,10 +105,17 @@ var gb_map_play_back = (function () { | @@ -105,10 +105,17 @@ var gb_map_play_back = (function () { | ||
| 105 | function base64(string) { | 105 | function base64(string) { |
| 106 | return window.btoa(unescape(encodeURIComponent(string))); | 106 | return window.btoa(unescape(encodeURIComponent(string))); |
| 107 | } | 107 | } |
| 108 | - | 108 | + var showPhoto = function (photo) { |
| 109 | + console.log("showPhoto"); | ||
| 110 | + var lightbox = UIkit.lightbox.create([ | ||
| 111 | + {source: photo,type:'image'} | ||
| 112 | + ], {keyboard: false}); | ||
| 113 | + lightbox.show(); | ||
| 114 | + }; | ||
| 109 | return { | 115 | return { |
| 110 | initParams: initParams, | 116 | initParams: initParams, |
| 111 | listToExcel: listToExcel, | 117 | listToExcel: listToExcel, |
| 112 | - setParam: setParam | 118 | + setParam: setParam, |
| 119 | + showPhoto:showPhoto | ||
| 113 | } | 120 | } |
| 114 | })(); | 121 | })(); |
| 115 | \ No newline at end of file | 122 | \ No newline at end of file |