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

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

View File

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

View File

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