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] =?UTF-8?q?=E5=93=88=E5=B0=94=E6=BB=A8=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=99=BB=E9=99=86=20=E8=BD=A6=E8=BE=86=E6=AE=B5=20=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E5=9B=BE=E7=BC=96=E8=BE=91=20=E6=8A=A5=E9=94=99?= =?UTF-8?q?=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 {