Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
19cede5338
@ -19,3 +19,4 @@ VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
|
||||
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
|
||||
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
VUE_APP_SOURCE_MAP = true
|
||||
|
@ -5,3 +5,4 @@ NODE_ENV = 'production'
|
||||
VUE_APP_BASE_API = 'https://api.joylink.club/jlcloud'
|
||||
VUE_APP_VOICE_API = 'https://oss.joylink.club/oss/joylink'
|
||||
VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
|
||||
VUE_APP_SOURCE_MAP = false
|
||||
|
@ -5,3 +5,4 @@ NODE_ENV = 'test'
|
||||
VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
|
||||
VUE_APP_VOICE_API = 'https://oss.joylink.club/oss/joylink'
|
||||
VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
|
||||
VUE_APP_SOURCE_MAP = false
|
||||
|
@ -96,7 +96,6 @@ class SkinCode extends defaultStyle {
|
||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
||||
faultLockColor: '#006400', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
|
||||
blockColor: '#800080', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
|
@ -88,7 +88,6 @@ class SkinCode extends defaultStyle {
|
||||
routeLockColor: '#3FFD46', // 区段进路锁定颜色
|
||||
faultLockColor: '#006400', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#3FFD46', // 保护区段锁闭
|
||||
blockColor: '#00FF00', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
|
@ -88,7 +88,6 @@ class SkinCode extends defaultStyle {
|
||||
routeLockColor: '#3FFD46', // 区段进路锁定颜色
|
||||
faultLockColor: '#006400', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#3FFD46', // 保护区段锁闭
|
||||
blockColor: '#00FF00', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
|
@ -88,7 +88,6 @@ class SkinCode extends defaultStyle {
|
||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
||||
faultLockColor: '#00FF00', // 区段故障锁闭颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
|
||||
blockColor: '#800080', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
|
@ -88,7 +88,6 @@ class SkinCode extends defaultStyle {
|
||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
||||
faultLockColor: '#9B4A0A', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
|
||||
blockColor: '#800080', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
|
@ -80,6 +80,7 @@ class SkinCode extends defaultStyle {
|
||||
line: {
|
||||
z: 0,
|
||||
width: 5, // 区段宽度
|
||||
routeBlockFlashing: true, // 进路锁闭区段封锁闪烁
|
||||
beyondWidth: 0, // 区段宽超出宽度
|
||||
invadeColor: '#EF0C08', // 区段侵入颜色
|
||||
spareColor: '#ffff00', // 区段空闲颜色 (黄色)
|
||||
@ -89,7 +90,6 @@ class SkinCode extends defaultStyle {
|
||||
faultLockColor: '#9B4A0A', // 区段故障锁定颜色
|
||||
invalidColor: '#ff0000', // 计轴故障
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
|
||||
blockColor: '#000080', // 区段封锁颜色 深蓝色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
@ -389,9 +389,10 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight:'normal', // 字体粗细
|
||||
textPadding:[2, 6], // 字体边距
|
||||
borderColor:'', // 字体边框颜色
|
||||
textBorderWidth:1 // 字体边框宽度
|
||||
textBorderWidth:1, // 字体边框宽度
|
||||
noneModeColor: '#FF0' // 无模式时字体颜色
|
||||
},
|
||||
|
||||
syncCentralizeStation: true, // 集中站和下辖车站控制权状态同步
|
||||
kmPostShow: true, // 公里标显示
|
||||
kilometerPosition: 'up', // 公里标朝向
|
||||
text: {
|
||||
|
@ -20,7 +20,8 @@ class SkinCode extends defaultStyle {
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle', // 文字垂直对齐方式
|
||||
approachColor: '#FFFFFF'
|
||||
approachColor: '#FFFFFF',
|
||||
occupyColor: '#FF0000' // 计轴区段占用字体颜色
|
||||
},
|
||||
logicText: {
|
||||
z: 10,
|
||||
@ -82,22 +83,25 @@ class SkinCode extends defaultStyle {
|
||||
width: 5, // 区段宽度
|
||||
beyondWidth: 0, // 区段宽超出宽度
|
||||
invadeColor: '#EF0C08', // 区段侵入颜色
|
||||
routeBlockFlashing: true, // 进路锁闭且封锁时闪烁
|
||||
spareColor: '#ffff00', // 区段空闲颜色 (黄色)
|
||||
communicationOccupiedColor: '#ff0000', // 区段通信车占用颜色 红色
|
||||
unCommunicationOccupiedColor: '#ff0000', // 区段非通讯车占用颜色 红色
|
||||
routeLockColor: '#00FF00', // 区段路由锁定颜色
|
||||
communicationOccupiedColor: '#ff1f10', // 区段通信车占用颜色 红色
|
||||
unCommunicationOccupiedColor: '#A600A6', // 区段非通讯车占用颜色 紫色
|
||||
routeLockColor: '#00FF00', // 区段路由锁定颜色 空闲且被进路征用
|
||||
protectiveLockColor: '#9DFF6E', // 区段保护锁闭
|
||||
blockColor: '#0010FF', // 区段封锁颜色 深蓝色
|
||||
|
||||
faultLockColor: '#9B4A0A', // 区段故障锁定颜色
|
||||
|
||||
invalidColor: '#ff0000', // 计轴故障
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
|
||||
blockColor: '#0010FF', // 区段封锁颜色 深蓝色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
timeReleaseColor: '#ffff00', // 区段延时释放颜色
|
||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||
logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用)
|
||||
|
||||
},
|
||||
lineBorder: { // 哈尔滨点击背景 元素
|
||||
z: -1,
|
||||
@ -258,6 +262,7 @@ class SkinCode extends defaultStyle {
|
||||
horizontal2Door: { // 屏蔽门
|
||||
z:0,
|
||||
height: 3, // 站台屏蔽门高度
|
||||
special:true, // 特殊屏蔽门
|
||||
width: 60,
|
||||
distance: 8, // 站台和屏蔽门之间的距离
|
||||
defaultColor: '#fff', // 屏蔽门默认颜色
|
||||
@ -273,6 +278,7 @@ class SkinCode extends defaultStyle {
|
||||
// 层级
|
||||
z:0,
|
||||
spareColor: '#00FFFF', // 站台空闲颜色
|
||||
openColor: '#00FF00', // 站台打开颜色
|
||||
jumpStopColor: '#9A99FF', // 站台跳停颜色
|
||||
designatedJumpStopColor: 'lightSkyBlue', // 站台指定列车跳停颜色
|
||||
headFontSize: 11, // 站台首端字体大小
|
||||
@ -425,16 +431,19 @@ class SkinCode extends defaultStyle {
|
||||
}
|
||||
};
|
||||
this[deviceType.Station] = {
|
||||
// 哈尔滨一号线 车站元素 车站名称
|
||||
// 车站元素 车站名称
|
||||
elemnetType:['stationText'],
|
||||
stationText:{
|
||||
z:0,
|
||||
fontWeight:'normal', // 字体粗细
|
||||
textPadding:[2, 6], // 字体边距
|
||||
borderColor:'', // 字体边框颜色
|
||||
textBorderWidth:1 // 字体边框宽度
|
||||
textBorderWidth:1, // 字体边框宽度
|
||||
noneModeFlash: true, // 无控制权模式字体闪烁
|
||||
centerModeColor: '#1fdc1f', // 中控字体颜色
|
||||
localModeColor: '#fff'// 站控字体颜色
|
||||
},
|
||||
|
||||
syncCentralizeStation: true, // 集中站和下辖车站控制权状态同步
|
||||
kmPostShow: true, // 公里标显示
|
||||
kilometerPosition: 'up', // 公里标朝向
|
||||
text: {
|
||||
|
@ -88,7 +88,6 @@ class SkinCode extends defaultStyle {
|
||||
routeLockColor: '#00ff00', // 区段进路锁定颜色
|
||||
faultLockColor: 'white', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
|
||||
blockColor: '#d659d6', // 区段封锁颜色(淡紫色)
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
|
@ -89,7 +89,6 @@ class SkinCode extends defaultStyle {
|
||||
routeLockColor: '#C0C0C0', // 区段进路锁定颜色
|
||||
faultLockColor: '#81007F', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
|
||||
blockColor: '#FE0000', // 区段封锁颜色(淡紫色)
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
|
@ -112,7 +112,6 @@ class SkinCode extends defaultStyle {
|
||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
||||
faultLockColor: '#00FF00', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
|
||||
blockColor: '#800080', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
|
@ -96,7 +96,6 @@ class SkinCode extends defaultStyle {
|
||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
||||
faultLockColor: '#9B4A0A', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
|
||||
blockColor: '#800080', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
|
@ -96,7 +96,6 @@ class SkinCode extends defaultStyle {
|
||||
routeLockColor: '#52BD5F', // 区段进路锁定颜色
|
||||
faultLockColor: '#006400', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#3FFD46', // 保护区段锁闭
|
||||
blockColor: '#7DC6C8', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
|
@ -482,9 +482,9 @@ class Jlmap {
|
||||
this.$painter.delete(oDevice);
|
||||
} else {
|
||||
this.$painter.update(oDevice);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
store.commit('map/mapStationStateUpdate');
|
||||
} else {
|
||||
if (elem.deviceType === 'TRAIN') {
|
||||
this.isUpdateShowTrainList = true;
|
||||
@ -647,7 +647,7 @@ class Jlmap {
|
||||
break;
|
||||
case this.events.__Zoom:
|
||||
this.$mouseController.on(this.events.__Zoom, this.optionsHandler);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store/index';
|
||||
|
||||
class EHorizontal2Door extends Group {
|
||||
constructor(model) {
|
||||
@ -62,10 +63,18 @@ class EHorizontal2Door extends Group {
|
||||
} else {
|
||||
if (model.screenDoorOpenStatus == 0) {
|
||||
// 开门
|
||||
if (style.Psd.horizontal2Door.special) {
|
||||
const stationStand = store.getters['map/getDeviceByCode'](this.model.modelData.standCode);
|
||||
stationStand && stationStand.instance.setState({screenDoorOpenStatus:0});
|
||||
}
|
||||
this.stand1.setStyle('fill', style.transparentColor);
|
||||
this.stand2.setStyle('fill', style.transparentColor);
|
||||
} else {
|
||||
// 关门
|
||||
if (style.Psd.horizontal2Door.special) {
|
||||
const stationStand = store.getters['map/getDeviceByCode'](this.model.modelData.standCode);
|
||||
stationStand && stationStand.instance.setState({screenDoorOpenStatus:1});
|
||||
}
|
||||
this.stand1.setStyle('fill', style.Psd.horizontal2Door.defaultColor);
|
||||
this.stand2.setStyle('fill', style.Psd.horizontal2Door.defaultColor);
|
||||
}
|
||||
|
@ -40,16 +40,20 @@ export default class Responder extends Group {
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const responderStyle = this.style.Responder || defaultStyle;
|
||||
const distanceX = responderStyle.distance * Math.cos(model.rotate-90);
|
||||
const distanceY = responderStyle.distance * Math.sin(model.rotate-90);
|
||||
const responderStyle = this.style.Responder || defaultStyle;
|
||||
const radian = -Math.PI / 180 * Number(model.rotate-90);
|
||||
const distanceX = -responderStyle.distance * Math.cos(radian);
|
||||
const distanceY = -responderStyle.distance * Math.sin(radian);
|
||||
const blockWidth = responderStyle.block.width || 5;
|
||||
const blockHeight = responderStyle.block.height || 12;
|
||||
const blockStyle = responderStyle.block.mapStyle[model.type] || { fill: '#fff'};
|
||||
const blockX = model.position.x - blockWidth / 2 - distanceX;
|
||||
const blockY = model.position.y - blockHeight / 2 - distanceY;
|
||||
const textX = blockX + model.textOffset.x;
|
||||
const textY = blockY + model.textOffset.y;
|
||||
const blockY = model.position.y - blockHeight / 2 - distanceY;
|
||||
const textRadian = -Math.PI / 180 * Number(180-model.textRotate);
|
||||
const textDistanceX = model.textOffset.y * Math.sin(textRadian) + model.textOffset.x * Math.cos(textRadian);
|
||||
const textDistanceY = model.textOffset.y * Math.cos(textRadian) - model.textOffset.x * Math.sin(textRadian);
|
||||
const textX = blockX + textDistanceX + blockWidth;
|
||||
const textY = blockY + textDistanceY;
|
||||
const textName = `${model.type}-${model.name}`;
|
||||
const textFill = responderStyle.text.textFill;
|
||||
const origin = [model.position.x, model.position.y];
|
||||
@ -100,29 +104,29 @@ export default class Responder extends Group {
|
||||
}
|
||||
});
|
||||
|
||||
this.text = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: {
|
||||
x: textX,
|
||||
y: textY,
|
||||
text: textName,
|
||||
fontFamily: this.style.fontFamily,
|
||||
fontSize: this.style.fontSize,
|
||||
textFill: textFill,
|
||||
textAlign: 'right'
|
||||
}
|
||||
});
|
||||
this.text = this.name = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: {
|
||||
x: textX,
|
||||
y: textY,
|
||||
text: textName,
|
||||
fontFamily: this.style.fontFamily,
|
||||
fontSize: this.style.fontSize,
|
||||
textFill: textFill,
|
||||
textAlign: 'left'
|
||||
}
|
||||
});
|
||||
|
||||
if (model.rotate) {
|
||||
const rotation = -Math.PI / 180 * Number(model.rotate);
|
||||
const rotation = -Math.PI / 180 * Number(model.rotate+180);
|
||||
[this.block, this.delta1, this.delta2].forEach(el => {
|
||||
this.transformRotation(el, origin, rotation);
|
||||
});
|
||||
}
|
||||
|
||||
if (model.textRotate) {
|
||||
const rotation = -Math.PI / 180 * Number(model.textRotate);
|
||||
const rotation = -Math.PI / 180 * Number(model.textRotate+180);
|
||||
this.transformRotation(this.text, origin, rotation);
|
||||
}
|
||||
|
||||
|
@ -89,6 +89,7 @@ export default class Section extends Group {
|
||||
this.line.setCrossUnBlock();
|
||||
this.line.stopAnimation(true);
|
||||
this.sectionBlock && this.sectionBlock.hide(); // 因此特殊区段
|
||||
this.sectionBlock && this.sectionBlock.stopAnimation();
|
||||
this.line.setStyle({
|
||||
stroke: this.style.Section.line.spareColor,
|
||||
lineWidth: this.style.Section.line.width
|
||||
@ -153,6 +154,9 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.unCommunicationOccupiedColor,
|
||||
fill:this.style.Section.line.unCommunicationOccupiedColor
|
||||
});
|
||||
if (this.name && this.style.Section.name.occupyColor) {
|
||||
this.name.setStyle({ textFill: this.style.Section.name.occupyColor });
|
||||
}
|
||||
}
|
||||
/** ARB故障 */
|
||||
invalid() {
|
||||
@ -173,9 +177,13 @@ export default class Section extends Group {
|
||||
}
|
||||
|
||||
/** 封锁 06*/
|
||||
block() {
|
||||
if (this.sectionBlock) {
|
||||
this.model.type !== '03' && this.sectionBlock.show();
|
||||
block(routeLock) {
|
||||
if (this.sectionBlock && this.model.type !== '03') {
|
||||
this.sectionBlock.show();
|
||||
routeLock && this.style.Section.line.routeBlockFlashing && this.sectionBlock.animateStyle(true, [
|
||||
{ time: 500, styles: { stroke: this.style.backgroundColor } },
|
||||
{ time: 1000, styles: { stroke: this.style.Section.line.blockColor } }
|
||||
]);
|
||||
} else {
|
||||
this.line && this.line.setStyle({
|
||||
stroke: this.style.Section.line.blockColor,
|
||||
@ -318,7 +326,7 @@ export default class Section extends Group {
|
||||
/** 计轴故障 */
|
||||
model.invalid && this.invalid();
|
||||
/** 轨道封锁 */
|
||||
model.blockade && this.block();
|
||||
model.blockade && this.block(model.routeLock);
|
||||
/** 非通信车占用状态 */
|
||||
model.nctOccupied && this.unCommunicationOccupied();
|
||||
/** 通信车占用状态 */
|
||||
|
@ -5,6 +5,7 @@ class EStationText extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.style = model.style;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -64,7 +65,14 @@ class EStationText extends Group {
|
||||
|
||||
setState() {
|
||||
}
|
||||
|
||||
setAnimateStyle(noneBeforeMode) {
|
||||
this.stopAnimate();
|
||||
const color = noneBeforeMode === 'Center' ? this.style.Station.stationText.centerModeColor : this.style.Station.stationText.localModeColor;
|
||||
this.stationName.animateStyle(true).when(500, {textFill: '#000'}).when(1000, {textFill: color}).when(1500, {textFill: '#000'}).start();
|
||||
}
|
||||
stopAnimate() {
|
||||
this.stationName.stopAnimation(true);
|
||||
}
|
||||
setColor(color) {
|
||||
const style = this.model.style;
|
||||
if (style.Station.StationControl.disPlayNone) {
|
||||
|
@ -26,6 +26,7 @@ export default class Station extends Group {
|
||||
this.z = 40;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.noneBeforeMode = '';
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.createTurnBack(); // 创建按图折返
|
||||
@ -351,6 +352,7 @@ export default class Station extends Group {
|
||||
}
|
||||
|
||||
handleCenter() { // 中控
|
||||
this.noneBeforeMode = 'Center';
|
||||
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor);
|
||||
@ -368,6 +370,7 @@ export default class Station extends Group {
|
||||
}
|
||||
|
||||
handleLocal() { // 站控
|
||||
this.noneBeforeMode = 'Local';
|
||||
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor);
|
||||
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色
|
||||
@ -400,22 +403,14 @@ export default class Station extends Group {
|
||||
}
|
||||
|
||||
handleNone() { // 空
|
||||
// if (this.style.Station.StationControl.disPlayNone) { // 没有控制时显示 黄色
|
||||
// this.stationText && this.stationText.setStyle('textFill', '#FFFF00');
|
||||
// if (this.model.subheadDisplay) { // 副标题
|
||||
// this.subheadText && this.subheadText.setStyle('textFill', '#FFFF00');
|
||||
// }
|
||||
// }
|
||||
this.stationText.setColor('#FFFF00');
|
||||
if (this.style.Station.stationText.noneModeColor) {
|
||||
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
|
||||
}
|
||||
if (this.style.Station.stationText.noneModeFlash) {
|
||||
this.stationText.setAnimateStyle(this.noneBeforeMode);
|
||||
}
|
||||
}
|
||||
|
||||
// /** 恢复初始状态*/
|
||||
// recover() {
|
||||
// const currentTypeList = this.style.Station.elemnetType;
|
||||
// currentTypeList.forEach(element => {
|
||||
// this[element].recover();
|
||||
// });
|
||||
// }
|
||||
recover() {
|
||||
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.emergencyControl && this.emergencyControl.setTextColor(this.style.Station.StationControl.text.fontColor);
|
||||
@ -426,6 +421,7 @@ export default class Station extends Group {
|
||||
|
||||
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
this.stationText && this.stationText.stopAnimate();
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
@ -433,6 +429,14 @@ export default class Station extends Group {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
model.controlMode && this['handle' + model.controlMode]();
|
||||
if (this.style.Station.syncCentralizeStation && model.controlMode && model.centralized) {
|
||||
model.chargeStationCodeList.forEach(item => {
|
||||
const device = store.getters['map/getDeviceByCode'](item);
|
||||
device.controlMode = model.controlMode;
|
||||
device && device.instance && device.instance.recover();
|
||||
device && device.instance && device.instance['handle' + model.controlMode]();
|
||||
});
|
||||
}
|
||||
if (model.tbStrategyId) {
|
||||
store.state.map.map.tbStrategyList.forEach(item => {
|
||||
if (item.stationCode == model.code) {
|
||||
|
@ -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', () => { console.log('====='); this.highlight.mouseout(); });
|
||||
this.on('mouseover', () => { console.log('111111'); this.highlight.mouseover(); });
|
||||
this.on('mouseout', () => { this.highlight.mouseout(); });
|
||||
this.on('mouseover', () => { this.highlight.mouseover(); });
|
||||
} else {
|
||||
if (this.style.StationStand.mouseOverStyle) {
|
||||
this.mouseEvent = new EMouse(this);
|
||||
|
@ -75,8 +75,10 @@ class EGapStand extends Group {
|
||||
|
||||
recover() {
|
||||
const style = this.model.style;
|
||||
this.stand1 && this.stand1.setStyle({ fill:style.StationStand.gapStand.spareColor });
|
||||
this.stand2 && this.stand2.setStyle({ fill:style.StationStand.gapStand.spareColor });
|
||||
if (!style.Psd.horizontal2Door.special) {
|
||||
this.stand1 && this.stand1.setStyle({ fill:style.StationStand.gapStand.spareColor });
|
||||
this.stand2 && this.stand2.setStyle({ fill:style.StationStand.gapStand.spareColor });
|
||||
}
|
||||
this.standText && this.standText.setStyle({ textFill:style.StationStand.gapStand.textFill });
|
||||
}
|
||||
setColor(color) {
|
||||
@ -84,8 +86,25 @@ class EGapStand extends Group {
|
||||
this.stand2 && this.stand2.setStyle({ fill:color });
|
||||
this.standText && this.standText.setStyle({ textFill:color });
|
||||
}
|
||||
setOpen() {
|
||||
const style = this.model.style;
|
||||
this.stand1 && this.stand1.setStyle({ fill:style.StationStand.gapStand.openColor });
|
||||
this.stand2 && this.stand2.setStyle({ fill:style.StationStand.gapStand.openColor });
|
||||
}
|
||||
setClose() {
|
||||
const style = this.model.style;
|
||||
this.stand1 && this.stand1.setStyle({ fill:style.StationStand.gapStand.spareColor });
|
||||
this.stand2 && this.stand2.setStyle({ fill:style.StationStand.gapStand.spareColor });
|
||||
}
|
||||
setState(model) {
|
||||
// 设置灰显
|
||||
if (model.screenDoorOpenStatus != undefined) {
|
||||
if (model.screenDoorOpenStatus == 0) {
|
||||
this.setOpen();
|
||||
} else {
|
||||
this.setClose();
|
||||
}
|
||||
}
|
||||
model.noStatus && this.setColor('#7F7F7F');
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,6 @@
|
||||
</div>
|
||||
<div class="card-box">
|
||||
<span class="tip-label">操作提示</span>
|
||||
11111113
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="9" :offset="1">
|
||||
|
@ -33,10 +33,10 @@
|
||||
<el-row class="nav-border-row">
|
||||
<template v-for="(item, index) in centralizedStationList">
|
||||
<div :key="index" class="nav-border-row row-width-box flex-row">
|
||||
<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="[(item.cmdType && modeMatch) || item.mode === 'None'? 'fake-button': 'fake-button-disabled', item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[(item.cmdType && modeMatch) || item.mode === 'None'? 'fake-button-active': 'fake-button-disabled']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-black" />
|
||||
<div v-if="item.name && (item.disabled || !item.cmdType)" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-grayk" />
|
||||
</div>
|
||||
</template>
|
||||
</el-row>
|
||||
@ -156,10 +156,10 @@
|
||||
<el-row style="text-align: center">
|
||||
<template v-for="(item, index) in centralizedStationList">
|
||||
<div :key="index" class="nav-border-row row-width-box flex-row">
|
||||
<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="[item.cmdType? 'fake-button': 'fake-button-disabled', item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" class="fake-button-active" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-black" />
|
||||
<div v-if="item.name && (item.disabled || !item.cmdType)" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button': 'fake-button-disabled', (stationContorl.controlMode != item.mode || item.mode == 'None') && item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-grayk" />
|
||||
</div>
|
||||
</template>
|
||||
</el-row>
|
||||
@ -180,8 +180,9 @@ import { deepAssign } from '@/utils/index';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { TrainingMode, MouseEvent } from '@/scripts/ConstDic';
|
||||
import BanIcon from '@/assets/ban-heb.png';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
NoticeInfo
|
||||
@ -197,7 +198,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
speedList: [{label: '15km/h', value: 15}, {label: '25km/h', value:25}, {label: '45km/h', value:45}, {label: '60km/h', value: 60}],
|
||||
// speedList: [{label: '15km/h', value: 15}, {label: '25km/h', value:25}, {label: '45km/h', value:45}, {label: '60km/h', value: 60}],
|
||||
speedLimitValue: 15,
|
||||
oldDevice: null, // 上一次点击元素
|
||||
canCommand: true,
|
||||
@ -223,7 +224,6 @@ export default {
|
||||
stationParamList: [],
|
||||
standParamList: [],
|
||||
routeParamList: [],
|
||||
directionRodParamList: [],
|
||||
paramConfirm: false,
|
||||
secondConfirm: false,
|
||||
paramIndex: -1,
|
||||
@ -256,27 +256,22 @@ export default {
|
||||
},
|
||||
isLocal() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
},
|
||||
stationContorl() {
|
||||
return this.getStationControl(this.selected || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'selected': function (val) {
|
||||
if (val.code) {
|
||||
this.dialogVisible = !this.isLocal;
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.setMenuChangeCount': function (val) {
|
||||
const State2SimulationMap = {
|
||||
'01': 'Local', // 中心调度工作站
|
||||
'02': 'Center' // 现地工作站
|
||||
};
|
||||
this.modeMatch = true;
|
||||
if (this.selected._type) {
|
||||
const control = this.getStationControl(this.selected);
|
||||
const State2SimulationMap = {
|
||||
'01': 'Local', // 现地工作站
|
||||
'02': 'Center' // 中心调度工作站
|
||||
};
|
||||
const type = State2SimulationMap[this.$store.state.training.prdType];
|
||||
if (control.controlMode != type) {
|
||||
this.modeMatch = false;
|
||||
if (this.stationContorl.controlMode != type) {
|
||||
this.clearAllMenuShow();
|
||||
if (type == 'Center' && this.selected._type == 'Station') {
|
||||
if (this.$store.state.training.prdType == '02' && this.selected._type == 'Station') {
|
||||
this.selectedObj = this.selected;
|
||||
if (this.selectedObj._type) {
|
||||
this.canCommand = true;
|
||||
@ -294,10 +289,9 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
}
|
||||
// return false;
|
||||
} else {
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
}
|
||||
}
|
||||
|
||||
@ -345,19 +339,12 @@ export default {
|
||||
this.handleStandMenu();
|
||||
}
|
||||
break;
|
||||
case 'DirectionRod':
|
||||
this.handleDirectionRodMenu();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
if (this.$store.state.training.mode != TrainingMode.TEACH) {
|
||||
this.handleBasicMenu();
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType': function (val) {
|
||||
@ -369,6 +356,26 @@ export default {
|
||||
if (!val) {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'selected': function (val) {
|
||||
this.initMenus();
|
||||
if (val.code && val._event == MouseEvent.Left) {
|
||||
this.dialogVisible = !this.isLocal;
|
||||
} else if (!val.code) {
|
||||
if (this.$store.state.training.mode != TrainingMode.TEACH) {
|
||||
this.handleBasicMenu();
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.map.showCentralizedStationCode': function(val) {
|
||||
if (!this.oldSelected) {
|
||||
this.handleBasicMenu();
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapStationStateUpdateCount': function() {
|
||||
if (!this.selected || !this.selected.code) {
|
||||
this.handleBasicMenu();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -522,8 +529,8 @@ export default {
|
||||
this.oldDevice = this.selectedObj;
|
||||
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.sectionParamList.forEach((swicth, index) => {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
this.sectionParamList.forEach((section, index) => {
|
||||
this.centralizedStationList[index] = section;
|
||||
});
|
||||
|
||||
this.pushTempData([this.selectedObj]);
|
||||
@ -531,33 +538,8 @@ export default {
|
||||
sectionCode: this.selectedObj.code
|
||||
};
|
||||
},
|
||||
handleDirectionRodMenu() {
|
||||
this.clearAllMenuShow();
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selectedObj, true);
|
||||
this.oldDevice = this.selectedObj;
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.directionRodParamList.forEach((directionRod, index) => {
|
||||
if (this.selectedObj.right && this.selectedObj.reversed && directionRod.name === '切换左向') {
|
||||
directionRod['disabled'] = true;
|
||||
} else if (!this.selectedObj.right && this.selectedObj.reversed && directionRod.name === '切换右向') {
|
||||
directionRod['disabled'] = true;
|
||||
} else if (this.selectedObj.right && !this.selectedObj.reversed && directionRod.name === '切换右向') {
|
||||
directionRod['disabled'] = true;
|
||||
} else if (!this.selectedObj.right && !this.selectedObj.reversed && directionRod.name === '切换左向') {
|
||||
directionRod['disabled'] = true;
|
||||
} else {
|
||||
directionRod['disabled'] = false;
|
||||
}
|
||||
this.centralizedStationList[index] = directionRod;
|
||||
});
|
||||
|
||||
this.pushTempData([this.selectedObj]);
|
||||
this.param = {
|
||||
code: `${this.selectedObj.startStationCode}-${this.selectedObj.endStationCode}-${this.selectedObj.right}`
|
||||
};
|
||||
},
|
||||
handleBasicMenu() {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
if (this.oldClickObj) {
|
||||
this.deviceHighLight(this.oldClickObj, false);
|
||||
@ -567,9 +549,11 @@ export default {
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.basicParamList.forEach((basic, index) => {
|
||||
this.centralizedStationList[index] = basic;
|
||||
if (basic.disabledName && station) {
|
||||
basic.disabled = station[basic.disabledName] == basic.mode;
|
||||
}
|
||||
});
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
||||
this.pushTempData(station ? [station] : []);
|
||||
|
||||
this.param = {
|
||||
@ -645,7 +629,11 @@ export default {
|
||||
}
|
||||
|
||||
if (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) {
|
||||
this.param.speedLimitValue = this.speedLimitValue;
|
||||
if (this.operate == OperationEvent.Section.setSpeed.menuButton.operation ||
|
||||
this.operate == OperationEvent.Switch.setSpeed.menuButton.operation) {
|
||||
this.canCommand = true;
|
||||
}
|
||||
// this.param.speedLimitValue = this.speedLimitValue;
|
||||
this.centralizedStationList = new Array(15).fill({ name: '' });
|
||||
[65, 55, 45, 35, 25, 0].forEach((el, i) => {
|
||||
this.centralizedStationList[i] = {
|
||||
@ -653,6 +641,7 @@ export default {
|
||||
cmdType: this.cmdType,
|
||||
operate: OperationEvent.StationControl.requestStationControl.menu,
|
||||
next: true,
|
||||
param:{speedLimitValue:el},
|
||||
value: el
|
||||
};
|
||||
});
|
||||
@ -664,7 +653,6 @@ export default {
|
||||
if (row.next) {
|
||||
this.pushTempData([row]);
|
||||
}
|
||||
|
||||
const step = {};
|
||||
if (this.tempData.length) {
|
||||
row.show = true;
|
||||
@ -672,6 +660,9 @@ export default {
|
||||
this.cmdType = row.cmdType;
|
||||
this.canCommand = false;
|
||||
step.operation = this.operate;
|
||||
if (row.param) {
|
||||
this.param = row.param;
|
||||
}
|
||||
step.param = this.param;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -695,9 +686,9 @@ export default {
|
||||
if (!this.securityCommand) {
|
||||
step.over = true;
|
||||
step.cmdType = this.cmdType;
|
||||
}
|
||||
}
|
||||
|
||||
this.pushTempData([])
|
||||
this.pushTempData([]);
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid && this.securityCommand) {
|
||||
this.secondConfirm = true;
|
||||
@ -771,7 +762,8 @@ export default {
|
||||
this.operate = ''; // 清空指令
|
||||
this.cmdType = '';
|
||||
this.securityCommand = '';
|
||||
this.speedLimitValue = 15;
|
||||
// this.speedLimitValue = 15;
|
||||
this.speedLimitValue = '';
|
||||
this.secondConfirm = false;
|
||||
this.cr1Confrim = false;
|
||||
if (this.oldClickObj) {
|
||||
@ -805,9 +797,9 @@ export default {
|
||||
// this.formModelSectionName = this.trainModel.sectionModel.name;
|
||||
// this.formModelNewTrip = '';
|
||||
},
|
||||
setSpeedLimitValue(val) {
|
||||
this.speedLimitValue = val;
|
||||
},
|
||||
// setSpeedLimitValue(val) {
|
||||
// this.speedLimitValue = val;
|
||||
// },
|
||||
pushTempData(list) {
|
||||
this.tempData = [];
|
||||
list.forEach(el => {
|
||||
@ -858,9 +850,9 @@ export default {
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true, mode: 'None' },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true, disabledName: 'controlMode', mode: 'Local' },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Local' },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
@ -875,19 +867,32 @@ export default {
|
||||
// { name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false },
|
||||
// { name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
|
||||
] : [
|
||||
{ name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false },
|
||||
{ name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false },
|
||||
{ name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false },
|
||||
{ name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false },
|
||||
{ name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true, disabledName: 'controlMode', mode: 'Local' },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Local' },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '关闭索引', cmdType: '', operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' }
|
||||
|
||||
// { name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false },
|
||||
// { name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false },
|
||||
// { name: '释放指令', cmdType: '', operate: OperationEvent.Station.humanControlALL.menu, show: false },
|
||||
// { name: '重启令解', cmdType: CMD.Station.CMD_STATION_RESTART, operate:OperationEvent.Station.stationRestart.menuButton, show: false, securityCommand: true},
|
||||
// { name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false },
|
||||
// { name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false },
|
||||
// { name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
|
||||
// { name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true },
|
||||
// { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
// { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
|
||||
];
|
||||
this.sectionParamList = [
|
||||
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, show: false, securityCommand: true },
|
||||
@ -931,53 +936,53 @@ export default {
|
||||
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, show: false },
|
||||
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, show: false, securityCommand: true }
|
||||
] : [
|
||||
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, show: false, disabledName: 'ciControl' },
|
||||
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, show: false, disabledName: 'ciControl', antonymy: true },
|
||||
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, show: false },
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, show: false },
|
||||
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, show: false },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, show: false, securityCommand: true },
|
||||
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, show: false, disabledName: 'atsControl' },
|
||||
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, show: false, disabledName: 'atsControl', antonymy: true },
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, show: false },
|
||||
{ name: '重复开放', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, show: false },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, show: false, securityCommand: true },
|
||||
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, show: false }
|
||||
];
|
||||
this.stationParamList = this.$store.state.training.prdType === '01' ? [
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '强行站控', cmdType: '', operate: OperationEvent.StationControl.requestStationControl.menu },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '关闭索引', cmdType: '', operate: OperationEvent.StationControl.requestStationControl.menu }
|
||||
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, show: false, disabledName: 'ciControl' },
|
||||
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, show: false, disabledName: 'ciControl', antonymy: true },
|
||||
|
||||
// { name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false }
|
||||
] : [
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menuButton, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menuButton, show: false, disabledName: 'controlMode', mode: 'None' },
|
||||
{ name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menuButton, show: false },
|
||||
{ name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menuButton, show: false },
|
||||
{ name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menuButton, show: false },
|
||||
{ name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menuButton, show: false },
|
||||
{ name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menuButton, show: false }
|
||||
// { name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false }
|
||||
{ name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, show: false, securityCommand: true },
|
||||
{ name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, show: false },
|
||||
{ name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, show: false },
|
||||
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, show: false },
|
||||
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, show: false, securityCommand: true }
|
||||
|
||||
// { name: '重复开放', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, show: false },
|
||||
];
|
||||
this.stationParamList = [
|
||||
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false, mode: 'None' }
|
||||
];
|
||||
// [
|
||||
// { name: '' },
|
||||
// { name: '' },
|
||||
// { name: '' },
|
||||
// { name: '' },
|
||||
// { name: '' },
|
||||
// { name: '' },
|
||||
// { name: '' },
|
||||
// { name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true, disabledName: 'controlMode', mode: 'Local' },
|
||||
// { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Local' },
|
||||
// { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
// { name: '' },
|
||||
// { name: '' },
|
||||
// { name: '' },
|
||||
// { name: '' },
|
||||
// { name: '关闭索引', cmdType: '', operate: OperationEvent.StationControl.requestStationControl.menu, mode: 'None' },
|
||||
// { name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menuButton, show: false },
|
||||
// { name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menuButton, show: false },
|
||||
// { name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menuButton, show: false },
|
||||
// { name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menuButton, show: false }
|
||||
// ];
|
||||
this.standParamList = this.$store.state.training.prdType === '01' ? [] : [
|
||||
{ name: '扣车', cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN, operate: OperationEvent.StationStand.setDetainTrain.menuButton, show: false },
|
||||
{ name: '取消扣车', cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, operate: OperationEvent.StationStand.cancelDetainTrain.menuButton, show: false },
|
||||
{ name: '越站', cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, operate: OperationEvent.StationStand.setJumpStop.menuButton, show: false },
|
||||
{ name: '取消越站', cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, operate: OperationEvent.StationStand.cancelJumpStop.menuButton, show: false }
|
||||
];
|
||||
this.directionRodParamList = [
|
||||
{ name: '切换左向', cmdType: CMD.DirectionRod.CMD_DIRECTION_CHANGE, operate: OperationEvent.StationStand.setDetainTrain.menuButton, show: false },
|
||||
{ name: '切换右向', cmdType: CMD.DirectionRod.CMD_DIRECTION_CHANGE, operate: OperationEvent.StationStand.setDetainTrain.menuButton, show: false }
|
||||
];
|
||||
this.routeParamList = [
|
||||
{ name: '排列进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, show: false },
|
||||
{ name: '取消进路', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, show: false }
|
||||
@ -1094,7 +1099,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.fake-button-black {
|
||||
.fake-button-grayk {
|
||||
font-size: 12px;
|
||||
width: 80px;
|
||||
height: 20px;
|
||||
@ -1131,9 +1136,6 @@ export default {
|
||||
background: #DDDDDD;
|
||||
color: #a0a0a0;
|
||||
cursor: not-allowed;
|
||||
&:hover, &.active{
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
.__menuButton .el-button {
|
||||
|
@ -1,12 +1,11 @@
|
||||
// /**
|
||||
// * 真实设备类型
|
||||
// */
|
||||
// export const RealDeviceType = {
|
||||
// Section: '区段',
|
||||
// Switch: '道岔',
|
||||
// Signal: '信号机',
|
||||
// ScreenDoor: '屏蔽门'
|
||||
// };
|
||||
/**
|
||||
* 鼠标事件
|
||||
*/
|
||||
export const MouseEvent = {
|
||||
Left: 1,
|
||||
Right: 2,
|
||||
Wheel: 3
|
||||
}
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
@ -60,14 +59,6 @@ export const OperateMode = {
|
||||
DIRECTIVE: '03'
|
||||
};
|
||||
|
||||
// /**
|
||||
// * 分发、转赠
|
||||
// */
|
||||
// export const OperatorModel = {
|
||||
// DISTRIBUTE: '01',
|
||||
// TRANSFER: '02'
|
||||
// };
|
||||
|
||||
/**
|
||||
* 菜单编号
|
||||
*/
|
||||
@ -128,6 +119,7 @@ export const IbpOperation = {
|
||||
XXYS: {operate: '09', event: 'XXYS', name: '下行钥匙'},
|
||||
SXYS: {operate: '11', event: 'SXYS', name: '上行钥匙'}
|
||||
};
|
||||
|
||||
/**
|
||||
* ibp状态显示条件
|
||||
*/
|
||||
@ -136,12 +128,14 @@ export const IbpShowCondition = {
|
||||
Show_Open_Screen_Door: {statusKey: 'screenDoorOpenStatus', statusValue:['02'], defaultStatus: 'close'},
|
||||
Show_Close_Screen_Door: {statusKey: 'screenDoorOpenStatus', statusValue: ['01'], defaultStatus: 'open'}
|
||||
};
|
||||
|
||||
/** 列车类型 */
|
||||
export const TrainType = {
|
||||
PLAN: '计划车',
|
||||
HEAD: '头码车',
|
||||
MANUAL: '人工车'
|
||||
};
|
||||
|
||||
/** 仿真成员类型 */
|
||||
export const SimulationType = {
|
||||
DISPATCHER: '行调',
|
||||
|
@ -21,7 +21,7 @@ export default {
|
||||
/** 故障解锁 */
|
||||
CMD_SWITCH_FAULT_UNLOCK: {value:'Switch_Fault_Unlock', label: '故障解锁'},
|
||||
/** 强解道岔*/
|
||||
CMD_SWITCH_FORCE_UNLOCK: {value:'', label: '强解道岔'},
|
||||
CMD_SWITCH_FORCE_UNLOCK: {value:'Switch_Force_Unlock', label: '强解道岔'},
|
||||
/** 转动 */
|
||||
CMD_SWITCH_TURN: {value:'Switch_Turn', label: '转动'},
|
||||
/** 强扳 */
|
||||
|
@ -221,7 +221,8 @@ const map = {
|
||||
mapViewLoadedCount: 0, // 地图视图加载完成标识
|
||||
mapDataLoadedCount: 0, // 地图数据加载完成标识
|
||||
mapStateLoadedCount: 0, // 地图状态变化完成标识
|
||||
mapDataLoadedScreenCount: 0, // 大屏加载完成
|
||||
mapDataLoadedScreenCount: 0, // 大屏加载完成
|
||||
mapStationStateUpdateCount: 0, // 车站状态刷新
|
||||
trainDetails: null, // 地图'列车详情'显示
|
||||
deleteCount: 0, // 绘图快捷删除标识
|
||||
updateCount: 0, // 绘图快捷修改标识
|
||||
@ -716,7 +717,10 @@ const map = {
|
||||
},
|
||||
mapViewLoadedScreenCountIncrement: (state) => {
|
||||
state.mapDataLoadedScreenCount += 1;
|
||||
},
|
||||
},
|
||||
mapStationStateUpdate: (state) => {
|
||||
state.mapStationStateUpdateCount += 1;
|
||||
},
|
||||
operateTrainModel: (state, { model, type }) => {
|
||||
if (state.map && model) {
|
||||
const list = state.map.trainModelList || [];
|
||||
|
@ -369,6 +369,9 @@ const socket = {
|
||||
},
|
||||
setIsFirst:(state, isFirst)=>{
|
||||
state.isFirst = isFirst;
|
||||
},
|
||||
clearSimulationRoleList: (state)=>{
|
||||
state.simulationRoleList = [];
|
||||
}
|
||||
},
|
||||
|
||||
@ -440,6 +443,9 @@ const socket = {
|
||||
},
|
||||
setIsFirst:({ commit }, isFirst) => {
|
||||
commit('setIsFirst', isFirst);
|
||||
},
|
||||
clearSimulationRoleList:({ commit }) => {
|
||||
commit('clearSimulationRoleList');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -219,6 +219,7 @@ export default {
|
||||
EventBus.$off('refresh');
|
||||
EventBus.$off('viewLoading');
|
||||
EventBus.$off('viewProgressAt');
|
||||
this.$store.dispatch('socket/clearSimulationRoleList');
|
||||
this.$store.dispatch('map/mapClear');
|
||||
if (this.$jlmap) {
|
||||
this.$jlmap.dispose();
|
||||
@ -324,7 +325,7 @@ export default {
|
||||
this.mapViewLoaded(false);
|
||||
},
|
||||
// 地图状态更新
|
||||
handleStateUpdate() {
|
||||
handleStateUpdate(list) {
|
||||
this.$store.dispatch('map/mapStateLoaded');
|
||||
},
|
||||
// 视图参数改变
|
||||
@ -393,7 +394,6 @@ export default {
|
||||
if (path.includes('/practiceDisplay')) {
|
||||
if (em.deviceType == 'StationStand') {
|
||||
runPassenger(this.$route.query.group, em.deviceCode).then(netdata => {
|
||||
console.log(netdata);
|
||||
if (netdata.data) {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/trafficplan',
|
||||
@ -413,7 +413,6 @@ export default {
|
||||
if (em.deviceType == 'Train') {
|
||||
|
||||
runPassenger(this.$route.query.group, em.deviceCode).then(netdata => {
|
||||
console.log(netdata);
|
||||
if (netdata.data) {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/traffictrain',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
||||
import { getDeviceMenuByDeviceType, MouseEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import deviceType from '@/jmapNew/constant/deviceType.js';
|
||||
import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||
@ -80,22 +80,17 @@ export default {
|
||||
if (section) {
|
||||
device = this.$store.getters['map/getDeviceByCode'](section.relSwitchCode);
|
||||
}
|
||||
}
|
||||
if (device._type == 'Section' && device.type == '03') { // 过滤道岔相关区段变成道岔model
|
||||
}
|
||||
|
||||
// 过滤道岔相关区段变成道岔model
|
||||
if (device._type == 'Section' && device.type == '03') {
|
||||
device = this.$store.getters['map/getDeviceByCode'](device.switch.code);
|
||||
}
|
||||
// if (device._type == 'Section' && device.type == '04') {
|
||||
// device = null;
|
||||
// }
|
||||
|
||||
return device;
|
||||
},
|
||||
clickEvent(em) {
|
||||
var device = { _type: em.deviceType, _code: em.deviceCode };
|
||||
// var CanClickDeviceList = [
|
||||
// deviceType.Switch,
|
||||
// deviceType.Signal,
|
||||
// deviceType.StationStand
|
||||
// ];
|
||||
var device = { _type: em.deviceType, _code: em.deviceCode, _event: MouseEvent.Left };
|
||||
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
if (em.deviceType === 'StationStand' && lineCode === '01') {
|
||||
@ -105,16 +100,9 @@ export default {
|
||||
|
||||
if (em.deviceCode) {
|
||||
device = this.getDeviceByEm(em);
|
||||
// if (CanClickDeviceList.includes(em.deviceType)) {
|
||||
// try {
|
||||
// // letfMouseSelectDevice(em.deviceCode, this.group);
|
||||
// } catch (error) {
|
||||
// console.log('send left mouse click error.');
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
this.selected = { ...device };
|
||||
this.selected = { ...device, _event: MouseEvent.Left };
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: device, subType: em.subType});
|
||||
this.$store.dispatch('menuOperation/setLeftClickCount');
|
||||
if (this.$route.query.lineCode == '07' || this.$route.query.lineCode == '14') {
|
||||
@ -139,7 +127,7 @@ export default {
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
if (em.subType === 'TrainWindow') {
|
||||
if (lineCode != '06') {
|
||||
device = { _type: deviceType.TrainWindow, code: em.deviceCode };
|
||||
device = { _type: deviceType.TrainWindow, code: em.deviceCode, _event: MouseEvent.Right };
|
||||
this.$store.dispatch('map/setTrainWindowShow', true);
|
||||
}
|
||||
} else if (em.subType == 'button' && em.deviceType == 'Station') { // 宁波一号线右键显示控制模式
|
||||
@ -162,7 +150,7 @@ export default {
|
||||
}
|
||||
if (device) {
|
||||
device = this.getSelectedByLineCode(device);
|
||||
this.selected = device;
|
||||
this.selected = { ...device, _event: MouseEvent.Right};
|
||||
if (!this.buttonOperation) {
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: device, subType: em.subType});
|
||||
if (!this.checkShouldPop(device)) {
|
||||
|
@ -1,7 +1,41 @@
|
||||
<template>
|
||||
<div class="view-control">
|
||||
<div class="content-box">
|
||||
<div v-for="item in modelList" :key="item.type" class="content-box-list">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="批量设置集中站" name="first">
|
||||
<div class="select-box">
|
||||
<el-select v-model="stationCode" filterable size="mini">
|
||||
<el-option
|
||||
v-for="item in centralizedStationList"
|
||||
:key="item.code"
|
||||
:label="item.name + item.code"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="button-box">
|
||||
<el-button type="primary" size="mini" @click="handleSectionStationCode">{{ $t('map.setStationCode') }}</el-button>
|
||||
<el-button type="" size="mini" @click="clearList">清空</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="批量设置所属车站" name="second">
|
||||
<div class="select-box">
|
||||
<el-select v-model="belongStationCode" filterable size="mini">
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
:label="item.name + item.code"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="button-box">
|
||||
<el-button type="primary" size="mini" @click="handleBelongStationCode">批量设置所属车站</el-button>
|
||||
<el-button type="" size="mini" @click="clearList">清空</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div v-for="item in showList" :key="item.type" class="content-box-list" style="margin-top: 10px;">
|
||||
<div class="title-box">{{ item.name }}</div>
|
||||
<div class="list-box">
|
||||
<div v-for="nor in item.list" :key="nor.code" class="list-content" @mouseenter="mouseenter(nor)" @mouseleave="mouseleave(nor)">
|
||||
@ -10,20 +44,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<el-select v-model="stationCode" filterable size="mini">
|
||||
<el-option
|
||||
v-for="item in centralizedStationList"
|
||||
:key="item.code"
|
||||
:label="item.name + item.code"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="button-box">
|
||||
<el-button type="primary" size="mini" @click="handleSectionStationCode">{{ $t('map.setStationCode') }}</el-button>
|
||||
<el-button type="" size="mini" @click="clearList">清空</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -47,6 +67,9 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
stationCode: '',
|
||||
belongStationCode: '',
|
||||
activeName: 'first',
|
||||
showList: [],
|
||||
modelList: [
|
||||
{
|
||||
type: 'Section',
|
||||
@ -63,6 +86,13 @@ export default {
|
||||
name: '信号机列表',
|
||||
list: []
|
||||
}
|
||||
],
|
||||
modelSignalList: [
|
||||
{
|
||||
type: 'Signal',
|
||||
name: '信号机列表',
|
||||
list: []
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -86,8 +116,16 @@ export default {
|
||||
// this.$emit('setCenter', code);
|
||||
// this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
// },
|
||||
handleClick() {
|
||||
if (this.activeName === 'first') {
|
||||
this.showList = this.modelList;
|
||||
} else {
|
||||
this.showList = this.modelSignalList;
|
||||
}
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() == 'CheckBox'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.clearModelList();
|
||||
let count = 0;
|
||||
this.seclectDeviceList.forEach(item => {
|
||||
@ -99,6 +137,7 @@ export default {
|
||||
this.modelList[1].list.push(item);
|
||||
} else if (item._type == 'Signal') {
|
||||
this.modelList[2].list.push(item);
|
||||
this.modelSignalList[0].list.push(item);
|
||||
}
|
||||
if (item.stationCode == this.seclectDeviceList[0].stationCode) {
|
||||
count++;
|
||||
@ -109,12 +148,16 @@ export default {
|
||||
} else {
|
||||
this.stationCode = '';
|
||||
}
|
||||
this.belongStationCode = this.stationList[0].code;
|
||||
this.showList = this.modelList;
|
||||
}
|
||||
},
|
||||
clearModelList() {
|
||||
this.showList = [];
|
||||
this.modelList.forEach(item => {
|
||||
item.list = [];
|
||||
});
|
||||
this.modelSignalList[0].list = [];
|
||||
},
|
||||
// 删除当前选中
|
||||
delList(model, list) {
|
||||
@ -152,9 +195,24 @@ export default {
|
||||
this.stationCode = '';
|
||||
}
|
||||
},
|
||||
handleBelongStationCode() {
|
||||
if (this.belongStationCode && this.modelSignalList[0].list.length) {
|
||||
const models = [];
|
||||
this.modelSignalList[0].list.forEach(item => {
|
||||
const Model = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item.code));
|
||||
Model.belongStationCode = this.belongStationCode;
|
||||
models.push(Model);
|
||||
});
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('设置所属车站成功!');
|
||||
this.belongStationCode = '';
|
||||
}
|
||||
},
|
||||
clearList() { // 清空数据
|
||||
this.stationCode = '';
|
||||
this.belongStationCode = '';
|
||||
this.$store.commit('map/setSeclectDeviceList', []);
|
||||
this.showList = [];
|
||||
this.modelList = [
|
||||
{
|
||||
type: 'Section',
|
||||
@ -172,6 +230,13 @@ export default {
|
||||
list: []
|
||||
}
|
||||
];
|
||||
this.modelSignalList = [
|
||||
{
|
||||
type: 'Signal',
|
||||
name: '信号机列表',
|
||||
list: []
|
||||
}
|
||||
];
|
||||
},
|
||||
mouseenter(model) {
|
||||
if (model._type == 'Section') {
|
||||
|
@ -125,14 +125,36 @@ export default {
|
||||
sectionCode: '',
|
||||
signalCode: '',
|
||||
type: '',
|
||||
name: ''
|
||||
name: ''
|
||||
});
|
||||
},
|
||||
doBatchCreate() {
|
||||
const models = this.addModel.modelList.map(el => {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](el.sectionCode);
|
||||
return utils.buildModelBySection(section, el, this.responderList);
|
||||
});
|
||||
const groupMap = {}
|
||||
const models = [];
|
||||
|
||||
// 分组
|
||||
this.addModel.modelList.forEach(el => {
|
||||
if (!groupMap[el.sectionCode]) {
|
||||
groupMap[el.sectionCode] = []
|
||||
}
|
||||
groupMap[el.sectionCode].push(el);
|
||||
})
|
||||
|
||||
// 偏移量计算
|
||||
Object.keys(groupMap).forEach(code => {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](code);
|
||||
const list = groupMap[code];
|
||||
const length = list.length;
|
||||
const ox = (section.points[length - 1].x - section.points[0].x) / (length+1);
|
||||
const oy = (section.points[length - 1].y - section.points[0].y) / (length+1);
|
||||
list.forEach((el,i) => {
|
||||
const x = section.points[0].x + ox*(i+1);
|
||||
const y = section.points[0].y + oy*(i+1);
|
||||
models.push(utils.buildModelBySection(section, {x, y}, el, this.responderList));
|
||||
});
|
||||
})
|
||||
|
||||
// 批量创建
|
||||
this.$emit('updateMapModel', models);
|
||||
},
|
||||
doBatchReset() {
|
||||
|
@ -83,9 +83,9 @@ export default {
|
||||
name:'',
|
||||
item: [
|
||||
{ prop: 'name', label: '应答器名称', type: 'input' },
|
||||
{ prop: 'type', label: `应答器类型`, type: 'select', optionLabel: 'name', optionValue: 'value', options: this.responderTypeList },
|
||||
{ prop: 'sectionCode', label: '关联区段', type: 'selectHover', optionLabel: 'code', optionValue: 'code', options: this.sectionList, buttonType: 'RelSectionCode', hover: this.hover, buttonShowType: this.isSectionButtonType },
|
||||
{ prop: 'signalCode', label: '关联信号机', type: 'selectHover', optionLabel: 'code', optionValue: 'code', options: this.signalList, buttonType: 'RelSignalCode', hover: this.hover, buttonShowType: this.isSignalButtonType },
|
||||
{ prop: 'type', label: `应答器类型`, type: 'select', optionLabel: 'name&&value', optionValue: 'value', options: this.responderTypeList },
|
||||
{ prop: 'sectionCode', label: '关联区段', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList, buttonType: 'RelSectionCode', hover: this.hover, buttonShowType: this.isSectionButtonType },
|
||||
{ prop: 'signalCode', label: '关联信号机', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, buttonType: 'RelSignalCode', hover: this.hover, buttonShowType: this.isSignalButtonType },
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -101,8 +101,11 @@ export default {
|
||||
this.addModel[prop] = selected.code;
|
||||
},
|
||||
create() {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](this.addModel.sectionCode);
|
||||
const model = utils.buildModelBySection(section, this.addModel, this.responderList);
|
||||
const section = this.$store.getters['map/getDeviceByCode'](this.addModel.sectionCode);
|
||||
const length = section.points.length;
|
||||
const x = (section.points[length - 1].x + section.points[0].x) / 2;
|
||||
const y = (section.points[length - 1].y + section.points[0].y) / 2;
|
||||
const model = utils.buildModelBySection(section, {x, y}, this.addModel, this.responderList);
|
||||
this.$refs.createForm.resetForm();
|
||||
this.$emit('updateMapModel', model);
|
||||
}
|
||||
|
@ -130,9 +130,9 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: '应答器编码', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.responderList, deviceChange: this.deviceChange },
|
||||
{ prop: 'code', label: '应答器编码', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.responderList, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: '应答器名称', type: 'input' },
|
||||
{ prop: 'type', label: `应答器类型`, type: 'select', optionLabel: 'name', optionValue: 'value', options: this.responderTypeList },
|
||||
{ prop: 'type', label: `应答器类型`, type: 'select', optionLabel: 'name&&value', optionValue: 'value', options: this.responderTypeList },
|
||||
{ prop: 'offset', label: '区段偏移值', type: 'number' },
|
||||
{ prop: 'position', label: '坐标', type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
|
||||
@ -144,8 +144,8 @@ export default {
|
||||
{ prop: 'textOffset.y', firstLevel: 'textOffset', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
|
||||
] },
|
||||
{ prop:'textRotate', label: '文字旋转', type: 'number' },
|
||||
{ prop: 'sectionCode', label: '关联区段', type: 'selectHover', optionLabel: 'code', optionValue: 'code', options: this.sectionList, buttonType: 'RelModelSectionCode', hover: this.hover, buttonShowType: this.isSectionButtonType },
|
||||
{ prop: 'signalCode', label: '关联信号机', type: 'selectHover', optionLabel: 'code', optionValue: 'code', options: this.signalList, buttonType: 'RelModelSignalCode', hover: this.hover, buttonShowType: this.isSignalButtonType },
|
||||
{ prop: 'sectionCode', label: '关联区段', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList, buttonType: 'RelModelSectionCode', hover: this.hover, buttonShowType: this.isSectionButtonType },
|
||||
{ prop: 'signalCode', label: '关联信号机', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, buttonType: 'RelModelSignalCode', hover: this.hover, buttonShowType: this.isSignalButtonType },
|
||||
{ prop: 'stationCode', label: '关联集中站' + ':', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList }
|
||||
]
|
||||
},
|
||||
|
@ -1,13 +1,11 @@
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
|
||||
export function buildModelBySection(section, model, list) {
|
||||
export function buildModelBySection(section, position, model, list) {
|
||||
if (section) {
|
||||
const length = section.points.length;
|
||||
const dx = (section.points[length - 1].x - section.points[0].x);
|
||||
const dy = (section.points[length - 1].y - section.points[0].y);
|
||||
const rotate = Math.atan2(dy, dx) * 180 / Math.PI;
|
||||
const vx = (section.points[length - 1].x + section.points[0].x) / 2;
|
||||
const vy = (section.points[length - 1].y + section.points[0].y) / 2;
|
||||
|
||||
return {
|
||||
_type: 'Responder',
|
||||
@ -15,8 +13,8 @@ export function buildModelBySection(section, model, list) {
|
||||
rotate: rotate + 90,
|
||||
textRotate: rotate + 90,
|
||||
position: {
|
||||
x: vx,
|
||||
y: vy
|
||||
x: position.x,
|
||||
y: position.y
|
||||
},
|
||||
textOffset: {
|
||||
x: 0,
|
||||
|
@ -147,6 +147,7 @@ export default {
|
||||
item: [
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList },
|
||||
{ prop: 'interlockStationCode', label: '所属联锁站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.ciStationList},
|
||||
{ prop: 'belongStationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.stationList },
|
||||
{ prop: 'uniqueName', label: this.$t('map.signalUniqueName'), type: 'input' },
|
||||
{ prop: 'sectionCode', label: this.$t('map.belongsSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.signalSectionList, hover: this.hover, buttonType: 'signalSection', buttonShowType: this.signalSectionShow },
|
||||
{ prop: 'sectionOffset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') }
|
||||
|
@ -32,7 +32,7 @@ module.exports = {
|
||||
outputDir: outputDir,
|
||||
assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
|
||||
lintOnSave: false,
|
||||
productionSourceMap: false, // 项目打包后是否压缩
|
||||
productionSourceMap: process.env.VUE_APP_SOURCE_MAP,
|
||||
devServer: {
|
||||
port: port,
|
||||
host: '0.0.0.0',
|
||||
|
Loading…
Reference in New Issue
Block a user