代码调整

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() {
debugger;
this.destroy();
},
methods: {

View File

@ -235,7 +235,7 @@ export default {
serviceNumberChange(row) {
if (row) {
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];
if (serviceObj) {
this.analyticalTripNumber(serviceObj.trainMap);
@ -245,7 +245,7 @@ export default {
tripNumberChange(row) {
if (row) {
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) {
@ -417,14 +417,12 @@ export default {
].join('');
},
renderTripNumber(params) {
const tripNumber = params.tripNumber; //
const serviceNumber = params.serviceNumber; //
let data, markPoint;
const op = this.myChart.getOption();
op.series.forEach((item, index) => {
if (item.name == serviceNumber && item.data) {
if (tripNumber) {
const temp = item.data.filter(elem => elem[3] == tripNumber);
if (item.name == params.serviceNumber && item.data) {
if (params.tripNumber) {
const temp = item.data.filter(elem => elem[3] == params.tripNumber);
if (temp.length) {
data = temp;
item.markPoint.data.forEach(each=>{
@ -465,6 +463,7 @@ export default {
this.myChart && this.myChart.setOption(op, true);
}, 50);
},
mouseClick(params) {
const model = {
serviceNumber: params.seriesName