代码调整

This commit is contained in:
joylink_cuiweidong 2020-07-31 16:20:07 +08:00
parent 48cd28bd88
commit cb6d891d2b
2 changed files with 6 additions and 8 deletions

View File

@ -254,7 +254,6 @@ export default {
}); });
}, },
beforeDestroy() { beforeDestroy() {
debugger;
this.destroy(); this.destroy();
}, },
methods: { methods: {

View File

@ -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