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 @@
+ + +
- + + +
- + + { if (resp.data) { const query = { @@ -497,7 +497,7 @@ export default { }, // 添加计划 handleAddPlanningTrain() { - const planId = this.$route.query.planId || this.loadRunPlanId; + const planId = this.$route.query.planId; if (planId) { this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} }); } else { @@ -606,9 +606,9 @@ export default { const params = this.$store.state.runPlan.selected; this.$emit('dispatchDialog', { name: 'modifyingBeginTime', params }); }, - loadingRunPlan(param) { - this.$emit('loadingRunPlan', param); - }, + // loadingRunPlan(param) { + // this.$emit('loadingRunPlan', param); + // }, // deleteRunPlanOperate(param) { // // 删除运行图 // this.$confirm(this.$t('planMonitor.openRunPlan.confirmDeleteRunPlan'), this.$t('tip.hint'), { diff --git a/src/views/planMonitor/editTool/statusBar.vue b/src/views/planMonitor/editTool/statusBar.vue index 0be1a7380..925498c65 100644 --- a/src/views/planMonitor/editTool/statusBar.vue +++ b/src/views/planMonitor/editTool/statusBar.vue @@ -27,12 +27,12 @@ import { UrlConfig } from '@/scripts/ConstDic'; export default { name: 'PlanStatusBar', props: { - loadRunPlanId: { - type: String, - default() { - return ''; - } - } + // loadRunPlanId: { + // type: String, + // default() { + // return ''; + // } + // } }, data() { return { @@ -49,7 +49,7 @@ export default { }, // 添加计划 handleAddPlanningTrain() { - const planId = this.$route.query.planId || this.loadRunPlanId; + const planId = this.$route.query.planId; if (planId) { this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} }); } else { @@ -57,7 +57,7 @@ export default { } }, handleGernarateRouting() { - const planId = this.$route.query.planId || this.loadRunPlanId; + const planId = this.$route.query.planId; if (planId) { this.$emit('dispatchDialog', { name: 'generateRouting', params: {} }); } else { 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 {