哈尔滨设备登陆 车辆段 运行图编辑 报错调整

This commit is contained in:
joylink_cuiweidong 2021-06-17 17:00:33 +08:00
parent fefbf97c99
commit b96b77e927
4 changed files with 25 additions and 11 deletions

View File

@ -325,7 +325,12 @@ export default {
this.analyticalTripNumber(serviceObj.trainMap || {});
},
tripNumberChange(row) {
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
let serviceNumber;
if (this.loadRunPlanId) {
serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
} else {
serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
}
let tripNumber = null;
if (row) {
const data = [];
@ -367,7 +372,6 @@ export default {
}, 50);
}
if (this.loadRunPlanId) {
this.$store.dispatch('runPlan/setDraftSelected', { serviceNumber: serviceNumber, tripNumber: tripNumber });
} else {
@ -433,7 +437,11 @@ export default {
// });
// } else {
getPublishMapInfo(this.$route.query.mapId).then(resp => {
this.mapName = `${resp.data.name} (${this.$route.query.planName || this.loadRunPlanName || ''})`;
if (this.loadRunPlanId) {
this.mapName = this.$route.query.planName || this.loadRunPlanName || '';
} else {
this.mapName = `${resp.data.name} (${this.$route.query.planName || this.loadRunPlanName || ''})`;
}
});
// }
@ -654,7 +662,12 @@ export default {
},
refreshRunPlanName(name) {
getPublishMapInfo(this.$route.query.mapId).then(resp => {
this.mapName = `${resp.data.name} (${name})`;
if (this.loadRunPlanId) {
this.mapName = name;
} else {
this.mapName = `${resp.data.name} (${name})`;
}
this.myChart.setOption({
title: {
text: this.mapName,

View File

@ -212,6 +212,7 @@ export default {
},
refreshRunPlanName(name) {
this.$refs.schedule.refreshRunPlanName(name);
this.refreshRunPlanList(this.loadRunPlanId);
this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, planName: name }});
}
}

View File

@ -595,7 +595,7 @@ export default {
handleDeletePlanningTrain() {
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
if (serviceNumber) {
this.$emit('dispatchDialog', {
this.$emit('dispatchDialog', {
name: 'offLine', params: {
type: 'warning',
width: 260,

View File

@ -73,7 +73,7 @@ export default {
},
//
handleDeletePlanningTrain() {
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
if (serviceNumber) {
this.$emit('dispatchDialog', {
name: 'offLine', params: {
@ -90,7 +90,7 @@ export default {
}
},
handleMovePlanningTrain() {
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
if (serviceNumber) {
this.$emit('dispatchDialog', { name: 'movePlaningTrain', params: { serviceNumber } });
} else {
@ -99,7 +99,7 @@ export default {
},
//
handleDuplicateTrain() {
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
if (serviceNumber) {
this.$emit('dispatchDialog', { name: 'duplicateTrain', params: { serviceNumber } });
} else {
@ -108,7 +108,7 @@ export default {
},
//
handleAddTask() {
const params = this.$store.state.runPlan.selected;
const params = this.$store.state.runPlan.draftSelected;
if (params.serviceNumber && params.tripNumber) {
this.$emit('dispatchDialog', { name: 'addTask', params });
} else {
@ -117,7 +117,7 @@ export default {
},
//
handleDeleteTask() {
const params = this.$store.state.runPlan.selected;
const params = this.$store.state.runPlan.draftSelected;
if (params.serviceNumber && params.tripNumber) {
this.$emit('dispatchDialog', { name: 'deleteTask', params });
} else {
@ -126,7 +126,7 @@ export default {
},
//
handleModifyingTask() {
const params = this.$store.state.runPlan.selected;
const params = this.$store.state.runPlan.draftSelected;
if (params.serviceNumber && params.tripNumber) {
this.$emit('dispatchDialog', { name: 'modifyingTask', params });
} else {