Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
87261fdc67
@ -374,13 +374,13 @@ class SkinCode extends defaultStyle {
|
|||||||
// 屏蔽门
|
// 屏蔽门
|
||||||
this[deviceType.Psd] = {
|
this[deviceType.Psd] = {
|
||||||
// 宁波一号线 屏蔽门
|
// 宁波一号线 屏蔽门
|
||||||
elemnetType:['safetyDoorNormal'],
|
elemnetType:['rectDoor'],
|
||||||
safetyDoorNormal: { // 屏蔽门
|
rectDoor: { // 屏蔽门
|
||||||
z:0,
|
z:0,
|
||||||
height: 3, // 站台屏蔽门高度
|
height: 3, // 站台屏蔽门高度
|
||||||
distance: 4, // 站台和屏蔽门之间的距离
|
distance: 4, // 站台和屏蔽门之间的距离
|
||||||
defaultColor: 'green', // 屏蔽门默认颜色
|
defaultColor: '#000000', // 屏蔽门默认颜色
|
||||||
splitDoorColor: 'green' // 屏蔽门切除颜色
|
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 EHorizontal2Door from './EHorizontal2Door';
|
||||||
import EHighlight from '../element/EHighlight';
|
import EHighlight from '../element/EHighlight';
|
||||||
import {traverseLineElements} from '../utils/ShapeStatusCovert';
|
import {traverseLineElements} from '../utils/ShapeStatusCovert';
|
||||||
|
import ERectDoor from './ERectDoor';
|
||||||
|
|
||||||
export default class Line2 extends Group {
|
export default class Line2 extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, style) {
|
||||||
@ -28,7 +29,8 @@ export default class Line2 extends Group {
|
|||||||
const elementTypeList = {
|
const elementTypeList = {
|
||||||
'safetyDoorNormal':ESafeDoor, // 正常屏蔽门
|
'safetyDoorNormal':ESafeDoor, // 正常屏蔽门
|
||||||
'vertical2Door':EVertical2Door, // 西安二号线屏蔽门 上下两条虚线型
|
'vertical2Door':EVertical2Door, // 西安二号线屏蔽门 上下两条虚线型
|
||||||
'horizontal2Door':EHorizontal2Door // 哈尔滨线路屏蔽门 左右两个
|
'horizontal2Door':EHorizontal2Door, // 哈尔滨线路屏蔽门 左右两个
|
||||||
|
'rectDoor': ERectDoor // 泰雷兹 宁波三号线 站台边框
|
||||||
};
|
};
|
||||||
// 遍历当前线路下的绘图元素 组合模式
|
// 遍历当前线路下的绘图元素 组合模式
|
||||||
traverseLineElements(style.Psd, elementTypeList, model, style, this);
|
traverseLineElements(style.Psd, elementTypeList, model, style, this);
|
||||||
|
@ -107,8 +107,8 @@ class StationStand extends Group {
|
|||||||
if (path.includes('/map/draw')) {
|
if (path.includes('/map/draw')) {
|
||||||
this.highlight = new EHighlight(this);
|
this.highlight = new EHighlight(this);
|
||||||
this.add(this.highlight);
|
this.add(this.highlight);
|
||||||
this.on('mouseout', () => { this.highlight.mouseout(); });
|
this.on('mouseout', () => { console.log('====='); this.highlight.mouseout(); });
|
||||||
this.on('mouseover', () => { this.highlight.mouseover(); });
|
this.on('mouseover', () => { console.log('111111'); this.highlight.mouseover(); });
|
||||||
} else {
|
} else {
|
||||||
if (this.style.StationStand.mouseOverStyle) {
|
if (this.style.StationStand.mouseOverStyle) {
|
||||||
this.mouseEvent = new EMouse(this);
|
this.mouseEvent = new EMouse(this);
|
||||||
|
@ -17,7 +17,7 @@ class ESolidStand extends Group {
|
|||||||
|
|
||||||
this.stand = new Rect({
|
this.stand = new Rect({
|
||||||
zlevel: this.model.zlevel,
|
zlevel: this.model.zlevel,
|
||||||
z: this.model.z,
|
z: this.model.z + 2,
|
||||||
shape: {
|
shape: {
|
||||||
x: standX,
|
x: standX,
|
||||||
y: standY,
|
y: standY,
|
||||||
@ -26,8 +26,7 @@ class ESolidStand extends Group {
|
|||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
fill:style.StationStand.solidStand.spareColor,
|
fill:style.StationStand.solidStand.spareColor,
|
||||||
lineWidth: style.StationStand.solidStand.lineWidth || 0,
|
lineWidth: 0
|
||||||
stroke: style.StationStand.solidStand.spareStrokeColor
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.stand);
|
this.add(this.stand);
|
||||||
@ -69,7 +68,6 @@ class ESolidStand extends Group {
|
|||||||
recover() {
|
recover() {
|
||||||
const style = this.model.style;
|
const style = this.model.style;
|
||||||
this.setColor(style.StationStand.solidStand.spareColor);
|
this.setColor(style.StationStand.solidStand.spareColor);
|
||||||
this.setStroke(style.StationStand.solidStand.spareStrokeColor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
@ -82,7 +80,6 @@ class ESolidStand extends Group {
|
|||||||
model.allSkip && this.setColor(style.StationStand.solidStand.jumpStopColor);
|
model.allSkip && this.setColor(style.StationStand.solidStand.jumpStopColor);
|
||||||
// 停车
|
// 停车
|
||||||
model.trainParking && this.setColor(style.StationStand.solidStand.stopColor);
|
model.trainParking && this.setColor(style.StationStand.solidStand.stopColor);
|
||||||
model.trainParking && this.setStroke(style.StationStand.solidStand.doorOpenColor);
|
|
||||||
// 紧急停车
|
// 紧急停车
|
||||||
model.emergencyClosed && this.setColor(style.StationStand.solidStand.spareColor);
|
model.emergencyClosed && this.setColor(style.StationStand.solidStand.spareColor);
|
||||||
} else {
|
} else {
|
||||||
|
@ -17,7 +17,7 @@ class EHighlight extends Group {
|
|||||||
const rect = this.device.getBoundingRect();
|
const rect = this.device.getBoundingRect();
|
||||||
this.lineBorder = new Rect({
|
this.lineBorder = new Rect({
|
||||||
zlevel: this.device.zlevel,
|
zlevel: this.device.zlevel,
|
||||||
z: this.device.z + 1,
|
z: this.device._type === 'StationStand' ? this.device.z + 3 : this.device.z + 1,
|
||||||
shape: rect,
|
shape: rect,
|
||||||
style: {
|
style: {
|
||||||
fill: fill
|
fill: fill
|
||||||
|
Loading…
Reference in New Issue
Block a user