Merge remote-tracking branch 'remotes/origin/dev' into test
# Conflicts: # src/jmapNew/shape/Station/index.js
This commit is contained in:
commit
4eff0fc013
@ -135,6 +135,9 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
block: {
|
||||
special: false, // 区段特殊显示
|
||||
},
|
||||
trainPosition:{
|
||||
display: false // 列车实时位置显示
|
||||
}
|
||||
};
|
||||
|
||||
@ -207,6 +210,32 @@ class SkinCode extends defaultStyle {
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.MapCycleButtonVO] = {
|
||||
// 是否显示
|
||||
visible: true,
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
subtitleText: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 17 // 等于副标题距离
|
||||
},
|
||||
lamp: {
|
||||
lineDash: null, // 灯的包围框
|
||||
borderShow: false, // 是否显示边框
|
||||
stroke: '#FFFFFF', // 框的颜色
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
},
|
||||
OutFrame: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationStand] = {
|
||||
common: { // 通用属性
|
||||
textFontSize: 8, // 站台默认字体大小
|
||||
@ -603,24 +632,11 @@ class SkinCode extends defaultStyle {
|
||||
trainRColor: '#A0522D'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
runControlStatus: [
|
||||
{ status: '01', hShow: false, sShow: false },
|
||||
{ status: '02', hShow: true, sShow: false },
|
||||
{ status: '03', hShow: false, sShow: true }
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{status: true, dShow: false},
|
||||
{status: false, dShow: true}
|
||||
], // 设置车门状态类型 true车门关闭且锁闭
|
||||
communicationStatus: [
|
||||
{status: 'CBTC', trainColor: '#725A64'},
|
||||
{status: 'ITC', trainColor: '#C0C0C0'},
|
||||
{status: 'IL', trainColor: '#C0C0C0'}
|
||||
], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
alarmStatus: [
|
||||
{ status: '01', aShow: false },
|
||||
{ status: '02', aShow: true }
|
||||
], // 设置报警状态 01不报警 02报警
|
||||
serverNoType: [
|
||||
{ type: '01', showColor: '#FFFFFF' },
|
||||
{ type: '02', showColor: '#FFF000' }
|
||||
|
@ -135,6 +135,9 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
block: {
|
||||
special: false, // 区段特殊显示
|
||||
},
|
||||
trainPosition:{
|
||||
display: true // 列车实时位置显示
|
||||
}
|
||||
};
|
||||
|
||||
@ -205,7 +208,7 @@ class SkinCode extends defaultStyle {
|
||||
this[deviceType.StationStand] = {
|
||||
common: { // 通用属性
|
||||
textFontSize: 10, // 站台默认字体大小
|
||||
haveJumpShow: true, // 站台是否有列车停跳显示
|
||||
haveJumpShow: false, // 站台是否有列车停跳显示
|
||||
functionButtonShow: [] // 功能灯按钮显示条件(prdType)
|
||||
},
|
||||
safetyDoor: { // 屏蔽门
|
||||
@ -233,9 +236,9 @@ class SkinCode extends defaultStyle {
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: '扣', // 扣车显示内容
|
||||
text: 'H', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: -20}, // 扣车偏移量
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: 'yellow', // 车站扣车颜色
|
||||
centerTrainColor: 'white', // 中心扣车颜色
|
||||
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
||||
@ -570,36 +573,11 @@ class SkinCode extends defaultStyle {
|
||||
trainRColor: '#A0522D'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
runControlStatus: [
|
||||
{
|
||||
status: '01',
|
||||
hShow: false,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
hShow: true,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
hShow: false,
|
||||
sShow: true
|
||||
}
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{status: true, dShow: false},
|
||||
{status: false, dShow: true}
|
||||
], // 设置车门状态类型 true车门关闭且锁闭
|
||||
communicationStatus: [
|
||||
{status: 'CBTC', trainColor: '#000099'},
|
||||
{status: 'ITC', trainColor: '#747474'},
|
||||
{status: 'IL', trainColor: '#747474'}
|
||||
], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
alarmStatus: [
|
||||
{status: '01', aShow: false},
|
||||
{status: '02', aShow: true}
|
||||
] // 设置报警状态 01不报警 02报警
|
||||
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -138,6 +138,9 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
block: {
|
||||
special: false, // 区段特殊显示
|
||||
},
|
||||
trainPosition:{
|
||||
display: false // 列车实时位置显示
|
||||
}
|
||||
};
|
||||
|
||||
@ -239,7 +242,7 @@ class SkinCode extends defaultStyle {
|
||||
detainCar: { // 扣车
|
||||
text: '扣', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: -20}, // 扣车偏移量
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: '#FFFF00', // 车站扣车颜色
|
||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
|
||||
@ -255,8 +258,8 @@ class SkinCode extends defaultStyle {
|
||||
text: '跳', // 停跳显示内容
|
||||
position: -1, // 停跳方向
|
||||
offset: {x: -8, y: 10},
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
textColor: '#00ffcc', // 停跳文字颜色
|
||||
arcColor: '#00ffcc', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
},
|
||||
@ -607,36 +610,11 @@ class SkinCode extends defaultStyle {
|
||||
trainRColor: '#FF0000'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
runControlStatus: [
|
||||
{
|
||||
status: '01',
|
||||
hShow: false,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
hShow: true,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
hShow: false,
|
||||
sShow: true
|
||||
}
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{status: true, dShow: false},
|
||||
{status: false, dShow: true}
|
||||
], // 设置车门状态类型 true车门关闭且锁闭
|
||||
communicationStatus: [
|
||||
{status: 'CBTC', trainColor: '#000099'},
|
||||
{status: 'ITC', trainColor: '#747474'},
|
||||
{status: 'IL', trainColor: '#747474'}
|
||||
], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
alarmStatus: [
|
||||
{status: '01', aShow: false},
|
||||
{status: '02', aShow: true}
|
||||
] // 设置报警状态 01不报警 02报警
|
||||
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -128,6 +128,9 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
block: {
|
||||
special: false, // 区段特殊显示
|
||||
},
|
||||
trainPosition:{
|
||||
display: false // 列车实时位置显示
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -128,6 +128,9 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
block: {
|
||||
special: true, // 区段特殊显示
|
||||
},
|
||||
trainPosition:{
|
||||
display: false // 列车实时位置显示
|
||||
}
|
||||
};
|
||||
|
||||
@ -234,7 +237,7 @@ class SkinCode extends defaultStyle {
|
||||
position: -1, // 扣车方向
|
||||
offset: { x: -8, y: -6 }, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
centerTrainColor: 'red', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
},
|
||||
|
@ -136,6 +136,9 @@ class SkinCode extends defaultStyle {
|
||||
block: {
|
||||
special: false, // 区段特殊显示
|
||||
blockGlint: true, // 区段封锁闪烁显示
|
||||
},
|
||||
trainPosition:{
|
||||
display: false // 列车实时位置显示
|
||||
}
|
||||
};
|
||||
|
||||
@ -217,6 +220,7 @@ class SkinCode extends defaultStyle {
|
||||
distance: 17 // 等于副标题距离
|
||||
},
|
||||
lamp: {
|
||||
borderShow: true, // 是否显示边框
|
||||
lineDash: null, // 灯的包围框
|
||||
stroke: '#FFFFFF', // 框的颜色
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
@ -353,7 +357,7 @@ class SkinCode extends defaultStyle {
|
||||
lamp: {
|
||||
count: 4, // 控制模式的个数
|
||||
offset: { x: 20, y: 0 }, // 偏移量
|
||||
radiusR: 5, // 控制模式灯的半径
|
||||
radiusR: 6, // 控制模式灯的半径
|
||||
distance: 46, // 控制模式之间灯之间的距离
|
||||
grayColor: '#C0C0C0', // 控制模式灰色
|
||||
greenColor: 'green', // 控制模式绿色
|
||||
@ -488,10 +492,10 @@ class SkinCode extends defaultStyle {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
trainHSDATextFontSize: 8, // 列车HDSA字号
|
||||
textHContent: '扣', // textH文本
|
||||
textSContent: '跳', // textS文本
|
||||
textDContent: '门', // textD文本
|
||||
textAContent: '警' // textA文本
|
||||
textHContent: 'H', // textH文本
|
||||
textSContent: 'S', // textS文本
|
||||
textDContent: 'D', // textD文本
|
||||
textAContent: 'A' // textA文本
|
||||
},
|
||||
trainNumber: {
|
||||
targetCodePrefix: '000', // 目的地码前缀
|
||||
@ -613,33 +617,8 @@ class SkinCode extends defaultStyle {
|
||||
// trainRColor: '#A0522D'
|
||||
// }
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
runControlStatus: [
|
||||
{
|
||||
status: '01',
|
||||
hShow: false,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
hShow: true,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
hShow: false,
|
||||
sShow: true
|
||||
}
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{ status: true, dShow: false },
|
||||
{ status: false, dShow: true }
|
||||
], // 设置车门状态类型 true车门关闭且锁闭
|
||||
communicationStatus: [
|
||||
], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
alarmStatus: [
|
||||
{ status: '01', aShow: false },
|
||||
{ status: '02', aShow: true }
|
||||
] // 设置报警状态 01不报警 02报警
|
||||
] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import deviceType from './deviceType';
|
||||
|
||||
// 所有默认状态在这里都要有 用来转换后台发送的数据状态
|
||||
class Status {
|
||||
@ -118,6 +119,9 @@ class Status {
|
||||
handleOutFrame(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleText(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
getStatus() {
|
||||
return this.statusObj;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ class Painter {
|
||||
try {
|
||||
if (device._dispose) {
|
||||
this.delete(device);
|
||||
} else if (deviceType.Train == device._type) {
|
||||
} else if (deviceType.Train.toUpperCase() == device.deviceType) {
|
||||
this.updateTrain(device);
|
||||
} else {
|
||||
const instance = device.instance;
|
||||
|
@ -76,6 +76,8 @@ export default class Automactic extends Group {
|
||||
});
|
||||
this.add(this.subtitleText);
|
||||
}
|
||||
|
||||
if (this.style.MapCycleButtonVO.lamp.borderShow) {
|
||||
const arcRect = this.getArcBoundingRect();
|
||||
this.arcBorder = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
@ -88,9 +90,10 @@ export default class Automactic extends Group {
|
||||
fill: this.style.MapCycleButtonVO.lamp.fill
|
||||
}
|
||||
});
|
||||
this.add(this.arcBorder);
|
||||
}
|
||||
this.add(this.control);
|
||||
this.add(this.text);
|
||||
this.add(this.arcBorder);
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
|
@ -22,7 +22,7 @@ export default class Line2 extends Group {
|
||||
const style = this.style;
|
||||
this.safeDoor = new ESafeDoor({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: model.position.x,
|
||||
y: model.position.y - (model.height / 2),
|
||||
|
@ -20,17 +20,21 @@ export default class Station extends Group {
|
||||
this.z = 40;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
const arr = window.location.href.split('?')[1].split('&');
|
||||
|
||||
this.create();
|
||||
this.createTurnBack(); // 创建按图折返
|
||||
const path = window.location.href;
|
||||
if (!path.includes('/map/draw')) {
|
||||
this.createGuideTotalLock(); // 创建引导总锁
|
||||
}
|
||||
this.prdType = '';
|
||||
if (path.includes('?')) {
|
||||
const arr = window.location.href.split('?')[1].split('&');
|
||||
arr.forEach(elem => {
|
||||
if (elem.split('=')[0] === 'prdType') {
|
||||
this.prdType = elem.split('=')[1];
|
||||
}
|
||||
});
|
||||
this.create();
|
||||
this.createTurnBack(); // 创建按图折返
|
||||
if (!this.prdType || style.Station.functionButtonShow.indexOf(this.prdType) !== -1) {
|
||||
this.createGuideTotalLock(); // 创建引导总锁
|
||||
}
|
||||
this.createControlMode();
|
||||
this.setState(model);
|
||||
@ -117,7 +121,7 @@ export default class Station extends Group {
|
||||
createGuideTotalLock() { // 创建引导总锁
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
if (model.guideTotalLock) {
|
||||
if (model.guideTotalLock || (!this.prdType && style.Station.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) {
|
||||
this.guideLamp = new EControl({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
|
@ -42,6 +42,7 @@ class EDetain extends Group {
|
||||
position = -model.width / 4 - gagX;
|
||||
}
|
||||
}
|
||||
console.log(textName);
|
||||
this.detain = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
@ -90,10 +91,14 @@ class EDetain extends Group {
|
||||
this.detain.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
this.create('H');
|
||||
show(nameText) {
|
||||
if (this.model.style.StationStand.common.special && nameText) {
|
||||
this.detain.setStyle('text', nameText);
|
||||
} else {
|
||||
this.create();
|
||||
this.detain.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default EDetain;
|
||||
|
@ -23,16 +23,19 @@ class StationStand extends Group {
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 1;
|
||||
this.doors = new Group();
|
||||
const arr = window.location.href.split('?')[1].split('&');
|
||||
this.prdType = '';
|
||||
const path = window.location.href;
|
||||
if (path.includes('?')) {
|
||||
const arr = window.location.href.split('?')[1].split('&');
|
||||
arr.forEach(elem => {
|
||||
if (elem.split('=')[0] === 'prdType') {
|
||||
this.prdType = elem.split('=')[1];
|
||||
}
|
||||
});
|
||||
}
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
if (!this.prdType || this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1 ) {
|
||||
if (!this.prdType || (this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) {
|
||||
this.createFunctionButton();
|
||||
}
|
||||
this.setVisible(model.visible);
|
||||
@ -413,19 +416,31 @@ class StationStand extends Group {
|
||||
|
||||
/** 车站扣车*/
|
||||
standDetainTrain() {
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.detain && this.detain.show('H');
|
||||
} else {
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.detainTrainTextColor);
|
||||
}
|
||||
|
||||
/** 中心扣车*/
|
||||
centerDetainTrain() {
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.detain && this.detain.show('H');
|
||||
} else {
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.centerTrainColor);
|
||||
}
|
||||
|
||||
/** 中心+车站扣车*/
|
||||
standAndCenterDetainTrain() {
|
||||
if (this.style.StationStand.common.special) {
|
||||
this.detain && this.detain.show('H');
|
||||
} else {
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor);
|
||||
}
|
||||
|
||||
@ -473,11 +488,12 @@ class StationStand extends Group {
|
||||
}
|
||||
|
||||
/** 设置跳停*/
|
||||
// this.unJumpStop(); // 未设置跳停
|
||||
// model.assignSkip = 1;
|
||||
model.assignSkip && this.designatedJumpStop(); // 指定站台跳停
|
||||
model.allSkip && this.jumpStop(); // 站台全部跳停
|
||||
|
||||
/** 设置扣车*/
|
||||
// model.centerHoldTrain = 1;
|
||||
if (model.stationHoldTrain && model.centerHoldTrain) {
|
||||
this.standAndCenterDetainTrain(); // 中心+车站扣车
|
||||
} else if (model.stationHoldTrain) {
|
||||
|
@ -27,9 +27,9 @@ class EMouse extends Group {
|
||||
}
|
||||
let text = '';
|
||||
if (LangStorage.getLang() == 'en') {
|
||||
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.runControlStatus == '01' ? 'Normal' : this.device.model.runControlStatus == '03' ? 'Skip to continue moving' : 'Detained'}\n Stationary: ${this.device.model.runStatus == '02' ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
|
||||
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${!this.device.model.hold ? 'Normal' : 'Detained'}\n \n 跳停状态: ${!this.device.model.jump ? 'Normal' : 'Skip to continue moving'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
|
||||
} else {
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ !this.device.model.hold ? '正常' : '扣车'}\n 跳停状态: ${!this.device.model.jump ? '正常' : '跳停'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
|
||||
}
|
||||
// 文字描述
|
||||
this.arrowText = new Text({
|
||||
|
@ -3,6 +3,8 @@ import TrainHead from './TrainHead';
|
||||
import TrainBody from './TrainBody';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import store from '@/store';
|
||||
|
||||
/** 列车 */
|
||||
export default class Train extends Group {
|
||||
@ -69,7 +71,6 @@ export default class Train extends Group {
|
||||
directionType: model.directionType,
|
||||
directionCode: model.directionCode,
|
||||
sectionModel: model.sectionModel,
|
||||
runControlStatus: model.runControlStatus,
|
||||
runStatus: model.runStatus,
|
||||
fontSize: this.fontSize,
|
||||
nameFormat: this.nameFormat,
|
||||
@ -115,6 +116,20 @@ export default class Train extends Group {
|
||||
getShapeTipPoint() {
|
||||
}
|
||||
|
||||
updateSection() {
|
||||
const train = this.model;
|
||||
if (train.physicalCode && train.offsetp) {
|
||||
const data = train.physicalCode;
|
||||
const oldmodel = store.getters['map/getDeviceByCode'](data);
|
||||
oldmodel.offsetp = train.offsetp;
|
||||
oldmodel.right = train.right;
|
||||
let models = [];
|
||||
const model = deepAssign(oldmodel, {_type: 'Section'}); // 修改元素model
|
||||
models = [model];
|
||||
store.dispatch('map/updateMapDevices', models);
|
||||
}
|
||||
}
|
||||
|
||||
// 恢复颜色状态
|
||||
recover() {
|
||||
this.trainB && this.trainB.setHShow(false);
|
||||
@ -238,27 +253,35 @@ export default class Train extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
// 设置运行控制状态类型
|
||||
setRunControlStatus(status) {
|
||||
if (this.style.Train.trainStatusStyle.runControlStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.runControlStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainB && this.trainB.setHShow(item.hShow);
|
||||
this.trainB && this.trainB.setSShow(item.sShow);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// 设置扣车状态
|
||||
setHoldStatus(status) {
|
||||
if (status) {
|
||||
this.trainB && this.trainB.setHShow(true);
|
||||
} else {
|
||||
this.trainB && this.trainB.setHShow(false);
|
||||
}
|
||||
}
|
||||
|
||||
// 设置跳停状态
|
||||
setJumpStatus(status) {
|
||||
if (status) {
|
||||
this.trainB && this.trainB.setSShow(true);
|
||||
} else {
|
||||
this.trainB && this.trainB.setSShow(false);
|
||||
}
|
||||
}
|
||||
|
||||
// 设置车门状态类型
|
||||
setDoorStatus(status) {
|
||||
if (this.style.Train.trainStatusStyle.doorStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.doorStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainB && this.trainB.setDShow(item.dShow);
|
||||
return true;
|
||||
if (status != undefined) {
|
||||
if (status) {
|
||||
this.trainB && this.trainB.setDShow(false);
|
||||
} else {
|
||||
this.trainB && this.trainB.setDShow(true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.trainB && this.trainB.setDShow(false);
|
||||
}
|
||||
}
|
||||
// 设置通信状态类型
|
||||
@ -274,13 +297,10 @@ export default class Train extends Group {
|
||||
}
|
||||
// 设置报警状态
|
||||
setAlarmStatus(status) {
|
||||
if (this.style.Train.trainStatusStyle.alarmStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.alarmStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainB && this.trainB.setAShow(item.aShow);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (status) {
|
||||
this.trainB && this.trainB.setAShow(true);
|
||||
} else {
|
||||
this.trainB && this.trainB.setAShow(false);
|
||||
}
|
||||
}
|
||||
setTrainTypeStatus(type) {
|
||||
@ -309,6 +329,15 @@ export default class Train extends Group {
|
||||
this.setCommunicationStatus(model.runLevel);
|
||||
// this.setTrainTypeStatus(model.type); 配合早晚点设置
|
||||
this.setDoorStatus(model.doorCloseLock);
|
||||
this.setAlarmStatus(model.alarmStatus);
|
||||
this.setHoldStatus(model.hold);
|
||||
this.setJumpStatus(model.jump);
|
||||
|
||||
const style = this.style;
|
||||
if (style.Section.trainPosition.display) {
|
||||
this.updateSection();
|
||||
}
|
||||
|
||||
}
|
||||
// let points = [];
|
||||
// if (model) {
|
||||
|
@ -153,7 +153,6 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
debugger;
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
|
@ -191,7 +191,6 @@ export default {
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.lock.button.operation: {
|
||||
debugger;
|
||||
// 道岔单锁
|
||||
if (!selectType.singleLock) {
|
||||
this.lock(selectType);
|
||||
|
@ -388,7 +388,6 @@ export default {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
debugger;
|
||||
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.radio = selected.direction;
|
||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
|
@ -52,6 +52,25 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="three">
|
||||
<div style="height: 100%;">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="oprt" :model="allModel" label-width="130px" size="mini">
|
||||
<el-form-item label="屏蔽门宽度:" prop="width">
|
||||
<el-input-number v-model="allModel.width" style="width: 140px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="屏蔽门高度:" prop="height">
|
||||
<el-input-number v-model="allModel.height" style="width: 140px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="batchSettings">{{ $t('global.set') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
@ -92,6 +111,10 @@ export default {
|
||||
width: 60,
|
||||
height: 3,
|
||||
doorLocationType: '01' // 显示方向朝上或朝下
|
||||
},
|
||||
allModel: {
|
||||
width: '',
|
||||
height: '',
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -260,6 +283,17 @@ export default {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
// 批量设置
|
||||
batchSettings() {
|
||||
let models = [];
|
||||
this.psdList.forEach(psd => {
|
||||
const model = deepAssign({}, psd);
|
||||
model.width = this.allModel.width;
|
||||
model.height = this.allModel.height;
|
||||
models.push(model);
|
||||
})
|
||||
this.$emit('updateMapModel', models);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -66,10 +66,30 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="three">
|
||||
<div style="height: 100%;">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="oprt" :model="allModel" label-width="130px" size="mini">
|
||||
<el-form-item label="车站字体:" prop="nameFont">
|
||||
<el-font v-model="allModel.nameFont" :placeholder="this.$t('tip.stationFont')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公里标字体:" prop="kmPostFont">
|
||||
<el-font v-model="allModel.kmPostFont" :placeholder="this.$t('tip.stationFont')" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="batchSettings">{{ $t('global.set') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ElFont from '@/views/components/font/index';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import ConfigList from './config/list';
|
||||
@ -78,7 +98,8 @@ import { deepAssign } from '@/utils/index';
|
||||
export default {
|
||||
name: 'StationDraft',
|
||||
components: {
|
||||
ConfigList
|
||||
ConfigList,
|
||||
ElFont
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -126,7 +147,7 @@ export default {
|
||||
createControlMode:false,
|
||||
createTurnBack:false,
|
||||
guideTotalLock: false,
|
||||
guideTotalLockPoint: {x: 0, y: 0},
|
||||
guideTotalLockPoint: {x: 0, y: 0}, // 引导总锁坐标
|
||||
turnBackPoint: {x: 0, y: 0}, // 按图折返坐标
|
||||
controlModePoint: { x: 0, y: 0 } // 控制模式坐标
|
||||
},
|
||||
@ -139,6 +160,10 @@ export default {
|
||||
positionY: [
|
||||
{ required: true, message: '请输入高度值', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
allModel: {
|
||||
nameFont: '',
|
||||
kmPostFont: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -464,6 +489,17 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
// 批量设置
|
||||
batchSettings() {
|
||||
let models = [];
|
||||
this.stationList.forEach(station => {
|
||||
const model = deepAssign({}, station);
|
||||
model.nameFont = this.allModel.nameFont;
|
||||
model.kmPostFont = this.allModel.kmPostFont;
|
||||
models.push(model);
|
||||
})
|
||||
this.$emit('updateMapModel', models);
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.addModel.modelList.splice(index, 1);
|
||||
},
|
||||
|
@ -25,6 +25,25 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="three">
|
||||
<div style="height: 100%;">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="oprt" :model="allModel" label-width="130px" size="mini">
|
||||
<el-form-item label="站台宽度:" prop="width">
|
||||
<el-input-number v-model="allModel.width" style="width: 140px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="站台高度:" prop="height">
|
||||
<el-input-number v-model="allModel.height" style="width: 140px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="batchSettings">{{ $t('global.set') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
@ -107,6 +126,10 @@ export default {
|
||||
upDetainLampPoint: {x: 0, y: 0}, // 上行扣车功能按钮坐标
|
||||
downDetainLamp: false, // 下行扣车功能按钮
|
||||
downDetainLampPoint: {x: 0, y: 0} // 下行扣车功能按钮坐标
|
||||
},
|
||||
allModel: {
|
||||
width: '',
|
||||
height: '',
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -486,6 +509,19 @@ export default {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
// 批量设置
|
||||
batchSettings() {
|
||||
let models = [];
|
||||
this.stationStandList.forEach(stationStand => {
|
||||
if (!stationStand.small) {
|
||||
const model = deepAssign({}, stationStand);
|
||||
model.width = this.allModel.width;
|
||||
model.height = this.allModel.height;
|
||||
models.push(model);
|
||||
}
|
||||
})
|
||||
this.$emit('updateMapModel', models);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user