运行图设计点击车次号高亮调整

This commit is contained in:
joylink_cuiweidong 2019-11-15 14:33:03 +08:00
parent 1818ddaeb1
commit 62599dd838

View File

@ -257,15 +257,18 @@ export default {
const op = this.myChart.getOption();
op.series.forEach((item, index) => {
item.lineStyle.color = '#000';
if (item.name == serviceNumber) {
switch (item.name) {
case serviceNumber: {
item.lineStyle.color = 'red';
break;
}
if (item.name == 'trainLabel') {
item.data = [];
case 'trainLabel': {
op.series.splice(index, 1);
break;
}
}
});
this.myChart.setOption(op);
this.myChart.setOption(op, true);
}
this.$store.dispatch('runPlan/setSelected', { serviceNumber: serviceNumber, tripNumber: null });
this.analyticalTripNumber(serviceObj.trainMap || {});
@ -278,16 +281,19 @@ export default {
tripNumber = row.tripNumber;
const op = this.myChart.getOption();
op.series.forEach((item, index) => {
if (item.name == serviceNumber) {
switch (item.name) {
case serviceNumber: {
item.data.forEach(nor => {
if (nor[3] == tripNumber) {
data.push(nor);
}
});
break;
}
if (item.name == 'trainLabel') {
item.data = [];
case 'trainLabel': {
op.series.splice(index, 1);
break;
}
}
});
op.series.push({