From b96b77e927d4165c126be4118d9c18e5df1d619a Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 17 Jun 2021 17:00:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=93=88=E5=B0=94=E6=BB=A8=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=99=BB=E9=99=86=20=E8=BD=A6=E8=BE=86=E6=AE=B5=20?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=9B=BE=E7=BC=96=E8=BE=91=20=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/planMonitor/components/schedule.vue | 21 +++++++++++++++---- src/views/planMonitor/newEditTool/index.vue | 1 + src/views/planMonitor/newEditTool/menuBar.vue | 2 +- .../planMonitor/newEditTool/statusBar.vue | 12 +++++------ 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/views/planMonitor/components/schedule.vue b/src/views/planMonitor/components/schedule.vue index c148dbc53..dc26c2fea 100644 --- a/src/views/planMonitor/components/schedule.vue +++ b/src/views/planMonitor/components/schedule.vue @@ -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, diff --git a/src/views/planMonitor/newEditTool/index.vue b/src/views/planMonitor/newEditTool/index.vue index cdb8188d7..5bf6543fb 100644 --- a/src/views/planMonitor/newEditTool/index.vue +++ b/src/views/planMonitor/newEditTool/index.vue @@ -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 }}); } } diff --git a/src/views/planMonitor/newEditTool/menuBar.vue b/src/views/planMonitor/newEditTool/menuBar.vue index f04965261..04370a79a 100644 --- a/src/views/planMonitor/newEditTool/menuBar.vue +++ b/src/views/planMonitor/newEditTool/menuBar.vue @@ -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, diff --git a/src/views/planMonitor/newEditTool/statusBar.vue b/src/views/planMonitor/newEditTool/statusBar.vue index e15a1a42c..5314f9626 100644 --- a/src/views/planMonitor/newEditTool/statusBar.vue +++ b/src/views/planMonitor/newEditTool/statusBar.vue @@ -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 { From e68991538d145c65a0a79e7bd74c1a4975389d2c Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 17 Jun 2021 17:35:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=93=88=E5=B0=94=E6=BB=A8=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=99=BB=E9=99=86=20=E8=BD=A6=E8=BE=86=E6=AE=B5=20?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=9B=BE=E7=BC=96=E8=BE=91=20=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/menus/modifyService.vue | 2 +- src/views/planMonitor/components/schedule.vue | 10 ++++++--- src/views/planMonitor/editTool/index.vue | 21 ++++++++++-------- src/views/planMonitor/editTool/menuBar.vue | 22 +++++++++---------- src/views/planMonitor/editTool/statusBar.vue | 16 +++++++------- 5 files changed, 39 insertions(+), 32 deletions(-) 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 dc26c2fea..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() { 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 @@