@@ -636,7 +636,7 @@
@@ -655,7 +655,7 @@
@@ -683,10 +683,10 @@
@@ -795,7 +795,7 @@
@@ -811,7 +811,7 @@
@@ -827,7 +827,7 @@
@@ -852,7 +852,7 @@
@@ -868,7 +868,7 @@
@@ -884,7 +884,7 @@
@@ -909,7 +909,7 @@
@@ -924,7 +924,7 @@
@@ -939,7 +939,7 @@
@@ -963,7 +963,7 @@
@@ -982,7 +982,7 @@
@@ -1001,7 +1001,7 @@
@@ -1877,7 +1877,6 @@ export default {
this.addSelectOptionField(obj[key]);
} else if (key == 'name') {
obj['selectOption'] = 1;
- obj['triggerNewData'] = [];
}
}
}
@@ -2784,13 +2783,19 @@ export default {
type_data: newValue,
originalSpeed: table.originalSpeed
};
- this.addTimeDataCharts(data[i].children[j].children[n].children[m].triggerNewData, typeData);
- } else {
- if (data[i].children[j].children[n].children[m].triggerNewData.length > 10) {
- data[i].children[j].children[n].children[m].triggerNewData =
- data[i].children[j].children[n].children[m].triggerNewData.slice(-10);
+ if (!data[i].children[j].children[n].children[m].triggerDataList) {
+ data[i].children[j].children[n].children[m].triggerDataList = [];
}
- this.addTimeDataCharts(data[i].children[j].children[n].children[m].triggerNewData, newValue);
+ this.addTimeDataCharts(data[i].children[j].children[n].children[m].triggerDataList, typeData);
+ } else {
+ if (!data[i].children[j].children[n].children[m].triggerDataList) {
+ data[i].children[j].children[n].children[m].triggerDataList = [];
+ }
+ if (data[i].children[j].children[n].children[m].triggerDataList.length > 10) {
+ data[i].children[j].children[n].children[m].triggerDataList =
+ data[i].children[j].children[n].children[m].triggerDataList.slice(-10);
+ }
+ this.addTimeDataCharts(data[i].children[j].children[n].children[m].triggerDataList, newValue);
}
}
}
@@ -2827,12 +2832,14 @@ export default {
min: table.min,
originalSpeed: table.originalSpeed
};
- // if (data[i].children[j].children[n].children[m].cycleTimeData.length > 10) {
- // data[i].children[j].children[n].children[m].cycleTimeData =
- // data[i].children[j].children[n].children[m].cycleTimeData.slice(-10);
- // }
+ if (!data[i].children[j].children[n].children[m].cycleTimeData) {
+ data[i].children[j].children[n].children[m].cycleTimeData = [];
+ }
this.addTimeDataCharts(data[i].children[j].children[n].children[m].cycleTimeData, typeData);
} else {
+ if (!data[i].children[j].children[n].children[m].cycleTimeData) {
+ data[i].children[j].children[n].children[m].cycleTimeData = [];
+ }
if (data[i].children[j].children[n].children[m].cycleTimeData.length > 10) {
data[i].children[j].children[n].children[m].cycleTimeData =
data[i].children[j].children[n].children[m].cycleTimeData.slice(-10);
@@ -2898,12 +2905,14 @@ export default {
in_spd: table.in_spd,
out_spd: table.out_spd
};
- // if (data[i].children[j].children[n].children[m].cycleStatisticsData.length > 10) {
- // data[i].children[j].children[n].children[m].cycleStatisticsData =
- // data[i].children[j].children[n].children[m].cycleStatisticsData.slice(-10);
- // }
+ if (!data[i].children[j].children[n].children[m].cycleStatisticsData) {
+ data[i].children[j].children[n].children[m].cycleStatisticsData = [];
+ }
this.addTimeDataCharts(data[i].children[j].children[n].children[m].cycleStatisticsData, typeData);
} else {
+ if (!data[i].children[j].children[n].children[m].cycleStatisticsData) {
+ data[i].children[j].children[n].children[m].cycleStatisticsData = [];
+ }
if (data[i].children[j].children[n].children[m].cycleStatisticsData.length > 10) {
data[i].children[j].children[n].children[m].cycleStatisticsData =
data[i].children[j].children[n].children[m].cycleStatisticsData.slice(-10);
@@ -2919,7 +2928,7 @@ export default {
},
//mqtt接收数据添加最新的最多添加10条(固定时刻)
addTimeDataCharts(array, newItem) {
- if (array.length === 10) {
+ if (array && array.length === 10) {
array.pop(); // 删除最旧的元素
}
array.unshift(newItem); // 添加最新的元素
@@ -2967,26 +2976,34 @@ export default {
// if (locations == '卡片区' || locations == '两个区都存在') {
// if(locations == '图表区' || locations == '两个区都存在'){
- // console.log('实时触发trigger-车头时距', msgN[j].time);
+ // console.log('实时触发trigger-车头时距', msgN[j]);
//图表区数组
- this.addOrUpdateArrayItem(this.triggerDataList, {
- time: msgN[j].time,
+ // this.addOrUpdateArrayItem(this.triggerDataList, {
+ // time: msgN[j].time,
+ // headway: msgN[j].headway,
+ // avg: msgN[j].avg,
+ // max: msgN[j].max,
+ // med: msgN[j].med,
+ // min: msgN[j].min
+ // });
+ // component_id: "d4633befe6d4415d8b2c16c61992fb27"
+ // graphical_id: "706baf89caa44920b6e84b0c46d10a29"
+ // video_id: "9bb7a16ddf924a08b3f5d37d71f86dbd"
+ // this.$nextTick(() => {
+ // this.upDataListByVideoIdAndCommentId(
+ // this.intersectionList,
+ // this.topicVideoIdList[i].videoId,
+ // msgN[j].component_id,
+ // this.triggerDataList
+ // );
+ // });
+ //图表区表格数据
+ let carTou = {
headway: msgN[j].headway,
avg: msgN[j].avg,
max: msgN[j].max,
med: msgN[j].med,
- min: msgN[j].min
- });
- this.$nextTick(() => {
- this.upDataListByVideoIdAndCommentId(
- this.intersectionList,
- this.topicVideoIdList[i].videoId,
- msgN[j].component_id,
- this.triggerDataList
- );
- });
- //表格数据
- let carTou = {
+ min: msgN[j].min,
name: msgN[j].name,
time: msgN[j].time,
type: msgN[j].type,
@@ -3033,19 +3050,19 @@ export default {
} else if (msgN[j].component_type == '流量') {
// console.log('实时触发trigger-流量', msgN[j]);
//图表区
- this.addOrUpdateArrayItem(this.triggerFlowData, {
- time: msgN[j].time,
- in_flow: msgN[j].in_flow,
- out_flow: msgN[j].out_flow
- });
- this.$nextTick(() => {
- this.upDataListByVideoIdAndCommentId(
- this.intersectionList,
- this.topicVideoIdList[i].videoId,
- msgN[j].component_id,
- this.triggerFlowData
- );
- });
+ // this.addOrUpdateArrayItem(this.triggerFlowData, {
+ // time: msgN[j].time,
+ // in_flow: msgN[j].in_flow,
+ // out_flow: msgN[j].out_flow
+ // });
+ // this.$nextTick(() => {
+ // this.upDataListByVideoIdAndCommentId(
+ // this.intersectionList,
+ // this.topicVideoIdList[i].videoId,
+ // msgN[j].component_id,
+ // this.triggerFlowData
+ // );
+ // });
//卡片区
let flowMap = {
inFlow: msgN[j].in_flow,
@@ -3062,6 +3079,8 @@ export default {
});
//表格数据
let carTou = {
+ in_flow: msgN[j].in_flow,
+ out_flow: msgN[j].out_flow,
name: msgN[j].name,
time: msgN[j].time,
type: msgN[j].type,
@@ -3105,25 +3124,29 @@ export default {
);
});
//图表区
- this.addOrUpdateArrayItem(this.triggerSpeedData, {
- time: msgN[j].time,
- speed: newSpeed,
- originalSpeed: msgN[j].speed,
+ // this.addOrUpdateArrayItem(this.triggerSpeedData, {
+ // time: msgN[j].time,
+ // speed: newSpeed,
+ // originalSpeed: msgN[j].speed,
+ // avg: msgN[j].avg,
+ // max: msgN[j].max,
+ // med: msgN[j].med,
+ // min: msgN[j].min
+ // });
+ // this.$nextTick(() => {
+ // this.upDataListByVideoIdAndCommentId(
+ // this.intersectionList,
+ // this.topicVideoIdList[i].videoId,
+ // msgN[j].component_id,
+ // this.triggerSpeedData
+ // );
+ // });
+ //表格数据
+ let carTou = {
avg: msgN[j].avg,
max: msgN[j].max,
med: msgN[j].med,
- min: msgN[j].min
- });
- this.$nextTick(() => {
- this.upDataListByVideoIdAndCommentId(
- this.intersectionList,
- this.topicVideoIdList[i].videoId,
- msgN[j].component_id,
- this.triggerSpeedData
- );
- });
- //表格数据
- let carTou = {
+ min: msgN[j].min,
name: msgN[j].name,
time: msgN[j].time,
type: msgN[j].type,
@@ -3169,24 +3192,24 @@ export default {
});
//图表区
// this.triggerTypeData = msgN[j].type_data;
- this.triggerTypeData = [
- {
- type_data: msgN[j].type_data,
- time: msgN[j].time
- }
- ];
+ // this.triggerTypeData = [
+ // {
+ // type_data: msgN[j].type_data,
+ // time: msgN[j].time
+ // }
+ // ];
// this.addOrUpdateArrayItem(this.triggerTypeData, {
// type_data: msgN[j].type_data,
// time: msgN[j].time,
// });
- this.$nextTick(() => {
- this.upDataListByVideoIdAndCommentId(
- this.intersectionList,
- this.topicVideoIdList[i].videoId,
- msgN[j].component_id,
- this.triggerTypeData
- );
- });
+ // this.$nextTick(() => {
+ // this.upDataListByVideoIdAndCommentId(
+ // this.intersectionList,
+ // this.topicVideoIdList[i].videoId,
+ // msgN[j].component_id,
+ // this.triggerTypeData
+ // );
+ // });
//表格数据 类型有点特殊需要重新比对
let carTou = {
name: msgN[j].name,
@@ -3235,24 +3258,28 @@ export default {
);
});
//图表区
- this.addOrUpdateArrayItem(this.triggerNStayData, {
- time: msgN[j].time,
- n_stay: msgN[j].n_stay,
+ // this.addOrUpdateArrayItem(this.triggerNStayData, {
+ // time: msgN[j].time,
+ // n_stay: msgN[j].n_stay,
+ // avg: msgN[j].avg,
+ // max: msgN[j].max,
+ // med: msgN[j].med,
+ // min: msgN[j].min
+ // });
+ // this.$nextTick(() => {
+ // this.upDataListByVideoIdAndCommentId(
+ // this.intersectionList,
+ // this.topicVideoIdList[i].videoId,
+ // msgN[j].component_id,
+ // this.triggerNStayData
+ // );
+ // });
+ //表格数据
+ let carTou = {
avg: msgN[j].avg,
max: msgN[j].max,
med: msgN[j].med,
- min: msgN[j].min
- });
- this.$nextTick(() => {
- this.upDataListByVideoIdAndCommentId(
- this.intersectionList,
- this.topicVideoIdList[i].videoId,
- msgN[j].component_id,
- this.triggerNStayData
- );
- });
- //表格数据
- let carTou = {
+ min: msgN[j].min,
name: msgN[j].name,
time: msgN[j].time,
type: msgN[j].type,
@@ -3295,18 +3322,18 @@ export default {
);
});
//图表区
- this.addOrUpdateArrayItem(this.triggerNQueueData, {
- time: msgN[j].time,
- n_queue: msgN[j].n_queue
- });
- this.$nextTick(() => {
- this.upDataListByVideoIdAndCommentId(
- this.intersectionList,
- this.topicVideoIdList[i].videoId,
- msgN[j].component_id,
- this.triggerNQueueData
- );
- });
+ // this.addOrUpdateArrayItem(this.triggerNQueueData, {
+ // time: msgN[j].time,
+ // n_queue: msgN[j].n_queue
+ // });
+ // this.$nextTick(() => {
+ // this.upDataListByVideoIdAndCommentId(
+ // this.intersectionList,
+ // this.topicVideoIdList[i].videoId,
+ // msgN[j].component_id,
+ // this.triggerNQueueData
+ // );
+ // });
//表格数据
let carTou = {
name: msgN[j].name,
@@ -3339,15 +3366,26 @@ export default {
// });
} else if (msgN[j].component_type == 'OD') {
//图表区 - TODO 估计有未知问题
- this.addOrUpdateArrayItem(this.triggerODData, {
+ // this.addOrUpdateArrayItem(this.triggerODData, {
+ // ob_data: msgN[j].ob_data
+ // });
+ // this.$nextTick(() => {
+ // this.upDataListByVideoIdAndCommentId(
+ // this.intersectionList,
+ // this.topicVideoIdList[i].videoId,
+ // msgN[j].component_id,
+ // this.triggerODData
+ // );
+ // });
+ let carTou = {
ob_data: msgN[j].ob_data
- });
+ };
this.$nextTick(() => {
- this.upDataListByVideoIdAndCommentId(
+ this.triggerDataCharts(
this.intersectionList,
this.topicVideoIdList[i].videoId,
msgN[j].component_id,
- this.triggerODData
+ carTou
);
});
}
@@ -4197,50 +4235,65 @@ export default {
box-sizing: border-box;
padding: 0 3%;
}
- .echartsList {
+ .echartList {
width: 100%;
height: calc(100% - 17%);
- .echarts0 {
- position: absolute;
- width: 440px;
- height: 282px;
- z-index: 999;
- }
- .echarts1 {
- position: absolute;
- width: 440px;
- height: 282px;
- }
- .echarts2 {
- position: absolute;
- width: 440px;
- height: 282px;
- }
- .echarts3 {
- position: absolute;
- width: 440px;
- height: 282px;
- }
- .echarts4 {
- position: absolute;
- width: 440px;
- height: 282px;
- }
- .echarts5 {
- position: absolute;
- width: 440px;
- height: 282px;
- }
- .echarts6 {
- position: absolute;
- width: 440px;
- height: 282px;
- }
- .echarts7 {
+ & > div {
position: absolute;
width: 440px;
height: 282px;
}
+ // .echarts0 {
+ // position: absolute;
+ // width: 440px;
+ // height: 282px;
+ // z-index: 999;
+ // }
+ // .echarts1 {
+ // position: absolute;
+ // width: 440px;
+ // height: 282px;
+ // }
+ // .echarts2 {
+ // position: absolute;
+ // width: 440px;
+ // height: 282px;
+ // }
+ // .echarts3 {
+ // position: absolute;
+ // width: 440px;
+ // height: 282px;
+ // }
+ // .echarts4 {
+ // position: absolute;
+ // width: 440px;
+ // height: 282px;
+ // }
+ // .echarts5 {
+ // position: absolute;
+ // width: 440px;
+ // height: 282px;
+ // }
+ // .echarts6 {
+ // position: absolute;
+ // width: 440px;
+ // height: 282px;
+ // }
+ // .echarts7 {
+ // position: absolute;
+ // width: 440px;
+ // height: 282px;
+ // }
+ // .echarts8 {
+ // position: absolute;
+ // width: 440px;
+ // height: 282px;
+ // }
+ // .echarts9 {
+ // position: absolute;
+ // width: 440px;
+ // height: 282px;
+ // }
}
// .echarts {
// width: 100%;