Commit 47428bbf0bf7d47e506c21e2cf9418e6377feeb8

Authored by ljq
1 parent a60425b1

站台客流接入调度

src/main/resources/static/metronic_v4.5.4/layout4/img/sidebar-toggle-light.png

2.64 KB | W: | H:

965 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
src/main/resources/static/metronic_v4.5.4/layout4/img/sidebar-toggle-light1.png deleted 100644 → 0

965 Bytes

src/main/resources/static/metronic_v4.5.4/layout4/img/sidebar-toggle-light2.png 0 → 100644

2.64 KB

src/main/resources/static/real_control_v2/js/kl/kl.js
... ... @@ -8,7 +8,10 @@ var kl_ts = (function () {
8 8 var station = data.stationCode + '_' + data.dir;
9 9 // 使用D3选择所有kl_text_group,并检查其绑定的数据是否匹配
10 10 d3.selectAll('.kl_text_group').each(function(d) {
11   -
  11 + // 添加空值检查
  12 + if (!d) {
  13 + return; // 跳过当前项,继续下一个
  14 + }
12 15 // d是绑定到该元素的数据,即matchedDevice
13 16 if (d && d.lineCode === data.lineCode && d.stationCode === data.stationCode && d.dir === data.dir) {
14 17 var klGroup = d3.select(this);
... ...
src/main/resources/static/real_control_v2/js/utils/svg_chart.js
... ... @@ -18,7 +18,7 @@ var gb_svg_chart = (function () {
18 18 'uk-width-medium-3-5 svg-chart-wrap': 'home',
19 19 'svg-wrap': 'line'
20 20 }
21   - var kldatas;
  21 + var kldatas = [];
22 22 $.get('/station_kl/all', null, function(datas) {
23 23 kldatas = datas;
24 24 });
... ... @@ -187,7 +187,10 @@ var gb_svg_chart = (function () {
187 187 // 检查这个item有哪些方向(根据id数组长度和类型判断)
188 188 // 创建方向数组
189 189 var directions = [];
190   -
  190 + // 添加空值检查
  191 + if (!d || !d.id) {
  192 + return; // 跳过当前项,继续下一个
  193 + }
191 194 // 遍历所有id,确保获取所有方向
192 195 for (var j = 0; j < d.id.length; j++) {
193 196 var stationId = d.id[j];
... ... @@ -211,6 +214,12 @@ var gb_svg_chart = (function () {
211 214 // 检查是否有匹配的设备
212 215 var matchedDevice = null;
213 216  
  217 + if (kldatas.length == 0 || kldatas == null) {
  218 + $.get('/station_kl/all', null, function(datas) {
  219 + kldatas = datas;
  220 + });
  221 + }
  222 +
214 223 // 在客流设备数据中查找匹配项
215 224 kldatas.forEach(function (device) {
216 225 if (device.lineCode == lineCode &&
... ...