代码调整
This commit is contained in:
parent
48cd28bd88
commit
cb6d891d2b
@ -254,7 +254,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
debugger;
|
|
||||||
this.destroy();
|
this.destroy();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -235,7 +235,7 @@ export default {
|
|||||||
serviceNumberChange(row) {
|
serviceNumberChange(row) {
|
||||||
if (row) {
|
if (row) {
|
||||||
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
|
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
|
||||||
this.renderTripNumber({ serviceNumber: row.serviceNumber, tripNumber: null });
|
// this.renderTripNumber({ serviceNumber: row.serviceNumber, tripNumber: null });
|
||||||
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
|
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
|
||||||
if (serviceObj) {
|
if (serviceObj) {
|
||||||
this.analyticalTripNumber(serviceObj.trainMap);
|
this.analyticalTripNumber(serviceObj.trainMap);
|
||||||
@ -245,7 +245,7 @@ export default {
|
|||||||
tripNumberChange(row) {
|
tripNumberChange(row) {
|
||||||
if (row) {
|
if (row) {
|
||||||
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
|
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
|
||||||
this.renderTripNumber({ serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
|
// this.renderTripNumber({ serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async analyticalServiceNumber(data) {
|
async analyticalServiceNumber(data) {
|
||||||
@ -417,14 +417,12 @@ export default {
|
|||||||
].join('');
|
].join('');
|
||||||
},
|
},
|
||||||
renderTripNumber(params) {
|
renderTripNumber(params) {
|
||||||
const tripNumber = params.tripNumber; // 车次号
|
|
||||||
const serviceNumber = params.serviceNumber; // 服务号
|
|
||||||
let data, markPoint;
|
let data, markPoint;
|
||||||
const op = this.myChart.getOption();
|
const op = this.myChart.getOption();
|
||||||
op.series.forEach((item, index) => {
|
op.series.forEach((item, index) => {
|
||||||
if (item.name == serviceNumber && item.data) {
|
if (item.name == params.serviceNumber && item.data) {
|
||||||
if (tripNumber) {
|
if (params.tripNumber) {
|
||||||
const temp = item.data.filter(elem => elem[3] == tripNumber);
|
const temp = item.data.filter(elem => elem[3] == params.tripNumber);
|
||||||
if (temp.length) {
|
if (temp.length) {
|
||||||
data = temp;
|
data = temp;
|
||||||
item.markPoint.data.forEach(each=>{
|
item.markPoint.data.forEach(each=>{
|
||||||
@ -465,6 +463,7 @@ export default {
|
|||||||
this.myChart && this.myChart.setOption(op, true);
|
this.myChart && this.myChart.setOption(op, true);
|
||||||
}, 50);
|
}, 50);
|
||||||
},
|
},
|
||||||
|
|
||||||
mouseClick(params) {
|
mouseClick(params) {
|
||||||
const model = {
|
const model = {
|
||||||
serviceNumber: params.seriesName
|
serviceNumber: params.seriesName
|
||||||
|
Loading…
Reference in New Issue
Block a user