Commit 22cc603d447f595adb2f20e80bf44bb735f9aa1a

Authored by 徐烜
1 parent 71a8db15

1、修改lineChart2.vue.js里的一些小bug

src/main/resources/static/pageTemplates/components/lineChart2.vue.js
... ... @@ -703,7 +703,7 @@ var line_chart_vue_v2 = (function() {
703 703 // 查找对应的circle
704 704 let svg_circle;
705 705 try {
706   - svg_circle = $jQuery('.station_circle[data-id=' + stopNo + "_" + upDown + ']');
  706 + svg_circle = $jQuery(self.$el).find('.station_circle[data-id=' + stopNo + "_" + upDown + ']');
707 707 if (svg_circle.length === 0) {
708 708 svg_circle = null;
709 709 }
... ... @@ -779,7 +779,7 @@ var line_chart_vue_v2 = (function() {
779 779 });
780 780  
781 781 //--------------- 1、添加/更新车辆rect元素 --------------//
782   - $jQuery('.merge_hide', svg).removeAttr('class'); // 删除.mverge_hide元素的class属性(样式)
  782 + $jQuery(self.$el).find('.merge_hide', svg).removeAttr('class'); // 删除.mverge_hide元素的class属性(样式)
783 783 // 绘制rect
784 784 let gps_rect_update = gps_wrap_svg.selectAll('rect')
785 785 .data(test_gps_data, function(d) {
... ... @@ -1006,7 +1006,7 @@ var line_chart_vue_v2 = (function() {
1006 1006 deviceIds.push(deviceId);
1007 1007 });
1008 1008 // 删除旧的合并点
1009   - $jQuery('g[_id=' + 'merger_' + key + ']').remove();
  1009 + $jQuery(self.$el).find('g[_id=' + 'merger_' + key + ']').remove();
1010 1010 if (deviceIds.length <= 2) { // 小于等于2个gps,不合并
1011 1011 return true;
1012 1012 }
... ... @@ -1021,7 +1021,7 @@ var line_chart_vue_v2 = (function() {
1021 1021 let y = parseInt(svg_circle.attr('cy'));
1022 1022 // 隐藏车辆rect
1023 1023 $jQuery.each(deviceIds, function(i, d) {
1024   - $jQuery('rect[_id=rct_' + d + '],text[_id=tx_' + d + ']').attr('class', 'merge_hide');
  1024 + $jQuery(self.$el).find('rect[_id=rct_' + d + '],text[_id=tx_' + d + ']').attr('class', 'merge_hide');
1025 1025 });
1026 1026  
1027 1027 _merger_data.push({
... ...