泰雷兹屏蔽门
This commit is contained in:
parent
63f1298252
commit
730b673da2
@ -374,13 +374,13 @@ class SkinCode extends defaultStyle {
|
||||
// 屏蔽门
|
||||
this[deviceType.Psd] = {
|
||||
// 宁波一号线 屏蔽门
|
||||
elemnetType:['safetyDoorNormal'],
|
||||
safetyDoorNormal: { // 屏蔽门
|
||||
elemnetType:['rectDoor'],
|
||||
rectDoor: { // 屏蔽门
|
||||
z:0,
|
||||
height: 3, // 站台屏蔽门高度
|
||||
distance: 4, // 站台和屏蔽门之间的距离
|
||||
defaultColor: 'green', // 屏蔽门默认颜色
|
||||
splitDoorColor: 'green' // 屏蔽门切除颜色
|
||||
defaultColor: '#000000', // 屏蔽门默认颜色
|
||||
splitDoorColor: '#00FF00' // 屏蔽门切除颜色
|
||||
}
|
||||
};
|
||||
|
||||
|
59
src/jmapNew/shape/Psd/ERectDoor.js
Normal file
59
src/jmapNew/shape/Psd/ERectDoor.js
Normal file
@ -0,0 +1,59 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store/index';
|
||||
|
||||
class ERect2Door extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model.modelData;
|
||||
const style = this.model.style;
|
||||
const stand = store.getters['map/getDeviceByCode'](model.standCode);
|
||||
this.psd = new Rect({
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z,
|
||||
shape: {
|
||||
x: stand.position.x - (stand.width / 2) - 5,
|
||||
y: stand.position.y - (stand.height / 2) - 5,
|
||||
width: stand.width + 10,
|
||||
height: stand.height + 10
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
stroke: style.sidelineColor,
|
||||
fill: style.Psd.rectDoor.defaultColor
|
||||
}
|
||||
});
|
||||
this.add(this.psd);
|
||||
}
|
||||
|
||||
recover() {
|
||||
const style = this.model.style;
|
||||
this.psd.setStyle('fill', style.Psd.rectDoor.defaultColor);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
const style = this.model.style;
|
||||
if (model.fault == 'PSD_CANNOT_BE_CLOSED') {
|
||||
// 开门
|
||||
this.psd.setStyle('fill', style.Psd.rectDoor.splitDoorColor);
|
||||
} else {
|
||||
if (model.screenDoorOpenStatus == 0) {
|
||||
// 开门
|
||||
this.psd.setStyle('fill', style.Psd.rectDoor.splitDoorColor);
|
||||
} else {
|
||||
// 关门
|
||||
this.psd.setStyle('fill', style.Psd.rectDoor.defaultColor);
|
||||
}
|
||||
}
|
||||
if (model.noStatus) {
|
||||
this.psd.setStyle('fill', '#7F7F7F');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default ERect2Door;
|
@ -4,6 +4,7 @@ import EVertical2Door from './EVertical2Door';
|
||||
import EHorizontal2Door from './EHorizontal2Door';
|
||||
import EHighlight from '../element/EHighlight';
|
||||
import {traverseLineElements} from '../utils/ShapeStatusCovert';
|
||||
import ERectDoor from './ERectDoor';
|
||||
|
||||
export default class Line2 extends Group {
|
||||
constructor(model, style) {
|
||||
@ -28,7 +29,8 @@ export default class Line2 extends Group {
|
||||
const elementTypeList = {
|
||||
'safetyDoorNormal':ESafeDoor, // 正常屏蔽门
|
||||
'vertical2Door':EVertical2Door, // 西安二号线屏蔽门 上下两条虚线型
|
||||
'horizontal2Door':EHorizontal2Door // 哈尔滨线路屏蔽门 左右两个
|
||||
'horizontal2Door':EHorizontal2Door, // 哈尔滨线路屏蔽门 左右两个
|
||||
'rectDoor': ERectDoor // 泰雷兹 宁波三号线 站台边框
|
||||
};
|
||||
// 遍历当前线路下的绘图元素 组合模式
|
||||
traverseLineElements(style.Psd, elementTypeList, model, style, this);
|
||||
|
@ -107,8 +107,8 @@ class StationStand extends Group {
|
||||
if (path.includes('/map/draw')) {
|
||||
this.highlight = new EHighlight(this);
|
||||
this.add(this.highlight);
|
||||
this.on('mouseout', () => { this.highlight.mouseout(); });
|
||||
this.on('mouseover', () => { this.highlight.mouseover(); });
|
||||
this.on('mouseout', () => { console.log('====='); this.highlight.mouseout(); });
|
||||
this.on('mouseover', () => { console.log('111111'); this.highlight.mouseover(); });
|
||||
} else {
|
||||
if (this.style.StationStand.mouseOverStyle) {
|
||||
this.mouseEvent = new EMouse(this);
|
||||
|
@ -17,7 +17,7 @@ class ESolidStand extends Group {
|
||||
|
||||
this.stand = new Rect({
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z,
|
||||
z: this.model.z + 2,
|
||||
shape: {
|
||||
x: standX,
|
||||
y: standY,
|
||||
@ -26,8 +26,7 @@ class ESolidStand extends Group {
|
||||
},
|
||||
style: {
|
||||
fill:style.StationStand.solidStand.spareColor,
|
||||
lineWidth: style.StationStand.solidStand.lineWidth || 0,
|
||||
stroke: style.StationStand.solidStand.spareStrokeColor
|
||||
lineWidth: 0
|
||||
}
|
||||
});
|
||||
this.add(this.stand);
|
||||
@ -69,7 +68,6 @@ class ESolidStand extends Group {
|
||||
recover() {
|
||||
const style = this.model.style;
|
||||
this.setColor(style.StationStand.solidStand.spareColor);
|
||||
this.setStroke(style.StationStand.solidStand.spareStrokeColor);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
@ -82,7 +80,6 @@ class ESolidStand extends Group {
|
||||
model.allSkip && this.setColor(style.StationStand.solidStand.jumpStopColor);
|
||||
// 停车
|
||||
model.trainParking && this.setColor(style.StationStand.solidStand.stopColor);
|
||||
model.trainParking && this.setStroke(style.StationStand.solidStand.doorOpenColor);
|
||||
// 紧急停车
|
||||
model.emergencyClosed && this.setColor(style.StationStand.solidStand.spareColor);
|
||||
} else {
|
||||
|
@ -17,7 +17,7 @@ class EHighlight extends Group {
|
||||
const rect = this.device.getBoundingRect();
|
||||
this.lineBorder = new Rect({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device.z + 1,
|
||||
z: this.device._type === 'StationStand' ? this.device.z + 3 : this.device.z + 1,
|
||||
shape: rect,
|
||||
style: {
|
||||
fill: fill
|
||||
|
Loading…
Reference in New Issue
Block a user