宁波三号线 运行线 代码调整
This commit is contained in:
parent
b434824d97
commit
2146b28b9a
@ -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() {
|
||||
|
||||
|
@ -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*/
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user