diff --git a/src/views/planMonitor/components/menus/modifyService.vue b/src/views/planMonitor/components/menus/modifyService.vue index 3c3546039..6fc8cbd58 100644 --- a/src/views/planMonitor/components/menus/modifyService.vue +++ b/src/views/planMonitor/components/menus/modifyService.vue @@ -74,7 +74,7 @@ export default { handleServiceNumber() { let newValue = parseInt(this.serviceNumber); if (newValue) { - if (newValue > 0 & newValue < 9) { + if (newValue > 0 & newValue <= 9) { newValue = '00' + newValue; } else if (newValue > 10 & newValue < 99) { newValue = '0' + newValue; diff --git a/src/views/planMonitor/components/schedule.vue b/src/views/planMonitor/components/schedule.vue index c148dbc53..f9749df0d 100644 --- a/src/views/planMonitor/components/schedule.vue +++ b/src/views/planMonitor/components/schedule.vue @@ -243,7 +243,8 @@ export default { this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height }); }, '$store.state.runPlan.refreshCount': function() { - if (this.planId || this.loadRunPlanId) { + // || this.loadRunPlanId + if (this.planId) { this.loadChartPage(); } }, @@ -252,8 +253,8 @@ export default { // this.loadChartPage(); // }); // }, - loadRunPlanId() { - if (this.planId || this.loadRunPlanId) { + planId() { + if (this.planId) { this.loadChartPage(); } else { this.clearCanvas(); @@ -268,6 +269,9 @@ export default { }, mounted() { this.setPosition(); + if (this.planId) { + this.loadChartPage(); + } // this.loadChartPage(); }, beforeDestroy() { @@ -325,7 +329,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 +376,6 @@ export default { }, 50); } - if (this.loadRunPlanId) { this.$store.dispatch('runPlan/setDraftSelected', { serviceNumber: serviceNumber, tripNumber: tripNumber }); } else { @@ -433,7 +441,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 +666,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, diff --git a/src/views/planMonitor/editTool/index.vue b/src/views/planMonitor/editTool/index.vue index eacb3f77c..ffa48df53 100644 --- a/src/views/planMonitor/editTool/index.vue +++ b/src/views/planMonitor/editTool/index.vue @@ -2,28 +2,31 @@