diff --git a/src/jmapNew/shape/Section/ELines.js b/src/jmapNew/shape/Section/ELines.js index fee68f66e..be75f9743 100644 --- a/src/jmapNew/shape/Section/ELines.js +++ b/src/jmapNew/shape/Section/ELines.js @@ -276,7 +276,7 @@ export default class ELines extends Group { } this.runLine = new Polyline({ zlevel: this.zlevel, - progressive: model.progressive, + // progressive: model.progressive, z: Z + 2, shape: { points: points @@ -426,10 +426,12 @@ export default class ELines extends Group { setRunLineDefault() { this.runLine && this.runLine.hide(); + this.runLine.dirty(); } runLineShow() { this.runLine && this.runLine.show(); + this.runLine.dirty(); } hide() { @@ -565,13 +567,13 @@ export default class ELines extends Group { } } - addHover(style) { - this.__zr && this.__zr.addHover(this.section, style); - } + addHover(style) { + this.__zr && this.__zr.addHover(this.section, style); + } - removeHover() { - this.__zr && this.__zr.removeHover(this.section); - } + removeHover() { + this.__zr && this.__zr.removeHover(this.section); + } recover() { diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index 1c5664d1a..ee7449daa 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -256,19 +256,9 @@ export default class Section extends Group { showRunLine() { this.line && this.line.runLineShow(); - if (this.model.code == 'T5') { - console.log(this.line, 'T5'); - } else if (this.model.code == 'T10') { - console.log(this.line, 'T10'); - } } setRunLineDefault() { this.line && this.line.setRunLineDefault(); - if (this.model.code == 'T5') { - console.log(this.line, 'T5', 'default'); - } else if (this.model.code == 'T10') { - console.log(this.line, 'T10', 'default'); - } } /** 保护区段锁闭 09*/ diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/trainDistribution.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/trainDistribution.vue index 45f4d4886..a369a07ec 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/trainDistribution.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/trainDistribution.vue @@ -231,7 +231,6 @@ export default { }, handleChange(row) { if (row) { - debugger; const runPath = row.runPath; if (runPath && runPath.length > 0) { const step = { @@ -241,13 +240,39 @@ export default { }; this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { - const oldRunPath = this.$store.state.training.runPathList; - this.setRunPath(oldRunPath, false); - this.setRunPath(runPath, true); + const oldRunPath = [...this.$store.state.training.runPathList]; + // this.setRunPath(oldRunPath, false); + // // this.$nextTick(()=>{ + // // this.setRunPath(runPath, true); + // // }); + // setTimeout(()=>{ + // this.setRunPath(runPath, true); + // }, 500); + // this.setRunPath(runPath, true); + + runPath.forEach(path=>{ + if (oldRunPath.includes(path)) { + const index = oldRunPath.indexOf(path); + oldRunPath.splice(index, 1); + } else { + const section = this.$store.getters['map/getDeviceByCode'](path); + if (section && section.instance) { + section.instance.showRunLine(); + } + } + }); + oldRunPath.forEach(each=>{ + const section = this.$store.getters['map/getDeviceByCode'](each); + if (section && section.instance) { + section.instance.setRunLineDefault(); + } + }); + this.selectedRunPath = row.code; this.judgeCanCommit(); this.$store.dispatch('training/setRunPathSelected', runPath); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } }).catch(() => { this.$refs.noticeInfo.doShow();