Merge branches 'dev' and 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
1148ea5ad8
@ -370,7 +370,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
sectionAction: {
|
||||
flag: true, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
spareColor: '#5b5b5b', // 区段显示颜色 (灰色)
|
||||
},
|
||||
core: {
|
||||
splice: true, // 哈尔滨特殊显示
|
||||
|
@ -65,6 +65,9 @@ export default class Line2 extends Group {
|
||||
|
||||
setState(model) {
|
||||
/** 设置屏蔽门开关*/
|
||||
// if (model.name == 'Psd44') {
|
||||
// console.log(model, model.screenDoorOpenStatus, '1 为关门 0 为开门');
|
||||
// }
|
||||
model.screenDoorOpenStatus == 0 && this.openDoor(); /** 开门*/
|
||||
model.screenDoorOpenStatus != 0 && this.closeDoor(); /** 关门*/
|
||||
|
||||
|
@ -781,18 +781,24 @@ export default class Section extends Group {
|
||||
}
|
||||
|
||||
/** 设置状态*/
|
||||
setState(model) {
|
||||
setState(model, flag = false) {
|
||||
this.recover();
|
||||
// 实际上就是 状态重置 必须在设置其他状态之前 设置颜色之类的
|
||||
if (this.style.Switch.sectionAction.flag && model.relSwitchCode) {
|
||||
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode];
|
||||
// const switchModel = store.getters['map/getDeviceByCode'](model.relSwitchCode);
|
||||
// if (switchModel.name == 'D1801' || switchModel.name == 'D1802' || switchModel.name == 'D1803' || switchModel.name == 'D1804') {
|
||||
// console.log('switchModel', switchModel, switchModel.name, switchModel.normalPosition, '1 定位 0 反位');
|
||||
// }
|
||||
if (switchModel.normalPosition != 0) { // 定位情况
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
sectionC && sectionC.instance && sectionC.instance.section.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
||||
sectionB && sectionB.instance && sectionB.instance.setState(sectionB, true);
|
||||
} else if (switchModel.normalPosition == 0) { // 反位情况
|
||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
||||
sectionB && sectionB.instance && sectionB.instance.section.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true);
|
||||
}
|
||||
}
|
||||
/** 道岔保护区段锁闭 */
|
||||
|
@ -441,6 +441,16 @@ export default class Switch extends Group {
|
||||
model.blockade && this.block();
|
||||
/** 区段切除*/
|
||||
model.cutOff && this.setSwitchCutOff();
|
||||
if (this.style.Switch.sectionAction.flag) {
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.code];
|
||||
if (switchModel.normalPosition != 0) { // 定位情况
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC);
|
||||
} else if (switchModel.normalPosition == 0) { // 反位情况
|
||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
||||
sectionB && sectionB.instance && sectionB.instance.setState(sectionB);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
|
Loading…
Reference in New Issue
Block a user