Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
06edd5f531
@ -159,7 +159,8 @@ class SkinCode extends defaultStyle {
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
}
|
||||
}
|
||||
},
|
||||
switchFault: true // 南京二号线 道岔失败(长闪)
|
||||
};
|
||||
|
||||
this[deviceType.Signal] = {
|
||||
@ -512,6 +513,7 @@ class SkinCode extends defaultStyle {
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
shapeFlash: true, // 道岔转动失去表示 道岔遮罩删除
|
||||
faultNoHandle: true, // 南京二 道岔长闪 道岔无状态 道岔区段 bc 闪烁
|
||||
text: {
|
||||
show: true, // 道岔名称显示
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
|
@ -256,25 +256,47 @@ export default class Section extends Group {
|
||||
this.line && this.line.setStyle({stroke: '#7F7F7F'});
|
||||
this.name && this.name.setStyle({textFill: '#7F7F7f'});
|
||||
}
|
||||
handleSwitchSection(model, flag) {
|
||||
// 哈尔滨线路 南京二 道岔相关区段设置 默认颜色
|
||||
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode];
|
||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
if (switchModel && (switchModel.normalPosition === 1 || (switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'reverse'))) { // 定位情况
|
||||
sectionC && sectionC.instance && sectionC.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
||||
sectionB && sectionB.instance && sectionB.instance.setState(sectionB, true);
|
||||
} else if (switchModel && switchModel.reversePosition === 1 || (switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'normal')) { // 反位情况
|
||||
sectionB && sectionB.instance && sectionB.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true);
|
||||
}
|
||||
if (this.style.Section.switchFault && switchModel.split) {
|
||||
if (sectionB && sectionB.instance) {
|
||||
sectionB.instance.setState(sectionB, true);
|
||||
sectionB.instance.line.animateStyle(true, [
|
||||
{ time: 0, styles: { stroke: this.style.Section.line.spareColor } },
|
||||
{ time: 500, styles: { stroke: this.style.backgroundColor } },
|
||||
{ time: 1000, styles: { stroke: this.style.Section.line.spareColor } }
|
||||
]);
|
||||
}
|
||||
if (sectionC && sectionC.instance) {
|
||||
sectionC.instance.setState(sectionC, true);
|
||||
sectionC.instance.line.animateStyle(true, [
|
||||
{ time: 0, styles: { stroke: this.style.Section.line.spareColor } },
|
||||
{ time: 500, styles: { stroke: this.style.backgroundColor } },
|
||||
{ time: 1000, styles: { stroke: this.style.Section.line.spareColor } }
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
if (sectionB && sectionB.instance) { sectionB.instance.line.stopAnimation(true); }
|
||||
if (sectionC && sectionC.instance) { sectionC.instance.line.stopAnimation(true); }
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 设置状态*/
|
||||
setState(model, flag = false) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
// 哈尔滨线路 道岔相关区段设置 默认颜色
|
||||
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
|
||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode];
|
||||
if (switchModel && switchModel.normalPosition != 0) { // 定位情况
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
sectionC && sectionC.instance && sectionC.instance.line.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 && switchModel.normalPosition == 0) { // 反位情况
|
||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
||||
sectionB && sectionB.instance && sectionB.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true);
|
||||
}
|
||||
}
|
||||
this.handleSwitchSection(model, flag);
|
||||
// 顺序代表优先级
|
||||
/** 道岔保护区段锁闭 */
|
||||
model.overlapLock && this.protectiveLock(model.lockRight);
|
||||
|
@ -311,7 +311,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
}
|
||||
// 南京二号线 A,B闪烁
|
||||
shapeFlashing() {
|
||||
shapeFlashing(split) {
|
||||
let bColor = '#7F7F7F';
|
||||
let aColor = '#7F7F7F';
|
||||
if (this.switchPosition === 'normal') {
|
||||
@ -319,17 +319,25 @@ export default class Switch extends Group {
|
||||
} else {
|
||||
bColor = '#FF0';
|
||||
}
|
||||
this.shapeModelB && this.shapeModelB.animateStyle(bColor, this.style.backgroundColor);
|
||||
// 南京二号线道岔短闪两部分相位不同
|
||||
this.shapeModelA && this.shapeModelA.animateStyle(aColor, this.style.backgroundColor);
|
||||
setTimeout(() => {
|
||||
this.shapeModelB && this.shapeModelB.animateStyle(bColor, this.style.backgroundColor);
|
||||
}, 100);
|
||||
if (split) {
|
||||
this.shapeModelA.hide();
|
||||
this.shapeModelB.hide();
|
||||
this.shapeModelC.hide();
|
||||
}
|
||||
}
|
||||
/** 失去*/
|
||||
setLossAction() {
|
||||
setLossAction(split) {
|
||||
this.shapeModelA.show();
|
||||
this.shapeModelB.show();
|
||||
this.shapeModelC.show();
|
||||
this.shapeModelC.setColor(this.style.backgroundColor);
|
||||
this.shapeModelB.animateStyle();
|
||||
this.style.Switch.shapeFlash && this.shapeFlashing();
|
||||
this.style.Switch.shapeFlash && this.shapeFlashing(split);
|
||||
this.setTextColor(this.style.Switch.text.lossColor);
|
||||
this.style.Switch.text.faultFlashing && this.nameTextAnimation();
|
||||
|
||||
@ -343,6 +351,10 @@ export default class Switch extends Group {
|
||||
setSwitchFault(split, normalPosition, reversePosition) {
|
||||
if (this.style.Switch.jointImg.faultStatus && split && !reversePosition && !normalPosition ) { // 宁波线失表状态
|
||||
this.setForkAction(); // 道岔挤岔
|
||||
} else if (this.style.Switch.faultNoHandle ) {
|
||||
this.shapeModelA.hide();
|
||||
this.shapeModelB.hide();
|
||||
this.shapeModelC.hide();
|
||||
} else {
|
||||
if (this.model.switchFaultCode && split) {
|
||||
const switchFault = store.getters['map/getDeviceByCode'](this.model.switchFaultCode);
|
||||
@ -544,7 +556,7 @@ export default class Switch extends Group {
|
||||
this.switchPosition = 'reverse';
|
||||
this.setInversionAction(model); /** 反位*/
|
||||
} else {
|
||||
this.setLossAction(); // 失去
|
||||
this.setLossAction(model.split); // 失去
|
||||
}
|
||||
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
<div v-if="item.name && item.disabled" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand " :id="item.operate.domId" class="fake-button" :class="item.show? 'active': ''" @click="clickCommand(item)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" class="fake-button-active" :class="item.show? 'active': ''" @click="clickCommand(item)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button" style="cursor: not-allowed;"/>
|
||||
<div v-else class="fake-button" style="cursor: not-allowed;" />
|
||||
</div>
|
||||
</template>
|
||||
</el-row>
|
||||
@ -280,7 +280,7 @@ export default {
|
||||
return (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) && this.speedShowCon;
|
||||
},
|
||||
isLocal() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
return this.$store.state.training.prdType == '01';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -1004,10 +1004,10 @@ export default {
|
||||
// }
|
||||
},
|
||||
handleOpen() {
|
||||
this.dialogVisible = true;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user