This commit is contained in:
sunzhenyu 2021-01-26 16:51:42 +08:00
commit 1b0fddd2e8
74 changed files with 2467 additions and 1541 deletions

View File

@ -511,3 +511,12 @@ export function getRunLevelDetail(id) {
method: 'get'
});
}
// 更新站间运行等级数据
export function updateRunlevelDistance(mapId) {
return request({
url: `/api/runPlan/userData/${mapId}/runlevelDistance`,
method: 'put'
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

View File

@ -98,6 +98,10 @@ class SkinCode extends defaultStyle {
logicalTextColor: '#FFFFFF', // 逻辑区段名称颜色 (未用)
invalidColor: '#A25100' // 区段ARB故障颜色
},
sectionMiddle: {
preResetColor: '#4169E1', // 区段计轴预复位
z: 2
},
speedLimit: { // 限速元素
z: 2,
width: 1, // 限速线的宽短

View File

@ -6,7 +6,7 @@ class SkinCode extends defaultStyle {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
elemnetType:['name', 'logicText', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'destinationText', 'line', 'separator', 'speedLimit'],
elemnetType:['name', 'logicText', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'destinationText', 'line', 'separator', 'speedLimit', 'sectionMiddle'],
active: {
routeColor: false // 进路触发颜色
},
@ -98,6 +98,10 @@ class SkinCode extends defaultStyle {
logicalTextColor: '#FFFFFF', // 逻辑区段名称颜色 (未用)
invalidColor: '#A25100' // 区段ARB故障颜色
},
sectionMiddle: {
preResetColor: '#00FFFF', // 区段计轴预复位
z: 2
},
speedLimit: { // 限速元素
z: 2,
width: 1, // 限速线的宽短

View File

@ -6,7 +6,7 @@ class SkinCode extends defaultStyle {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
elemnetType:['name', 'logicText', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'line', 'lineBorder', 'sectionBlock', 'speedLimitName'],
elemnetType:['name', 'logicText', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'line', 'lineBorder', 'sectionMiddle', 'speedLimitName'],
active: {
routeColor: false // 进路触发颜色
},
@ -103,7 +103,7 @@ class SkinCode extends defaultStyle {
z: -1,
activeStroke: '#2EBFBF'
},
sectionBlock: {
sectionMiddle: {
z: 2
}, // 计轴
speedLimit: { // 限速元素

View File

@ -6,7 +6,7 @@ class SkinCode extends defaultStyle {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
elemnetType:['name', 'logicText', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'line', 'lineBorder', 'sectionBlock', 'separator', 'speedLimitName'],
elemnetType:['name', 'logicText', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'line', 'lineBorder', 'sectionMiddle', 'separator', 'speedLimitName'],
active: {
routeColor: false // 进路触发颜色
},
@ -89,7 +89,7 @@ class SkinCode extends defaultStyle {
unCommunicationOccupiedColor: '#A600A6', // 区段非通讯车占用颜色 紫色
routeLockColor: '#00FF00', // 区段路由锁定颜色 空闲且被进路征用
protectiveLockColor: '#9DFF6E', // 区段保护锁闭
blockColor: '#0010FF', // 区段封锁颜色 深蓝色
delayUnlockColor: '#00FF00', // 延时解锁
faultLockColor: '#9B4A0A', // 区段故障锁定颜色
@ -101,15 +101,17 @@ class SkinCode extends defaultStyle {
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用)
},
sectionMiddle: {
blockColor: '#0010FF', // 区段封锁颜色 深蓝色
preResetColor: '#FFBEC9', // 区段计轴预复位
z: 2
},
lineBorder: { // 哈尔滨点击背景 元素
z: -1,
activeStroke: '#2EBFBF'
},
sectionBlock: {
z: 2
}, // 计轴
// 计轴
speedLimit: { // 限速元素
z: 2,
width: 1, // 限速线的宽短
@ -175,6 +177,8 @@ class SkinCode extends defaultStyle {
this[deviceType.Signal] = {
distance: 10, // 设备距离区段的距离
highlightColor: '#00FFFF',
highlightZ: 2,
post: {
standardShow: true, // 灯柱显示
reblockHorColor: '#000080', // 信号机重复封锁灯柱颜色
@ -597,7 +601,8 @@ class SkinCode extends defaultStyle {
},
coverBlock: { // 道岔封锁 遮盖物
show: true, // 显示
coverBlockColor: '#0010FF'// 遮挡物颜色
coverBlockColor: '#0010FF', // 遮挡物颜色
preResetColor: '#FFBEC9' // 区段计轴预复位
}
};

View File

@ -241,7 +241,6 @@ class Jlmap {
const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height};
rectList.push(rect);
}
console.log(screenList, rectList);
this.$painter.updateTransform1(screenList, rectList);
}
@ -386,6 +385,7 @@ class Jlmap {
}
});
this.$painter.$transformHandle.revisibleAll();
this.$painter.$transformHandle.setStationFlag(stationCode);
}
showStationHandlePsd(oDevice, stationCode) {
const standDevice = this.mapDevice[oDevice.standCode];

View File

@ -376,9 +376,14 @@ export default class ELines extends Group {
this.crossSection && this.crossSection.setStyle(styles);
}
setOrignalCross() {
this.crossSection && this.crossSection.setStyle({lineWidth:0 });
// fill:this.model.style.Section.cross.crossSection.fillColor
setOrignalCross(isModifyFill = false) {
if (this.crossSection) {
if (isModifyFill) {
this.crossSection.setStyle({lineWidth:0, fill:this.model.style.Section.cross.crossSection.fillColor });
} else {
this.crossSection.setStyle({lineWidth:0 });
}
}
}
setCrossBlock() {

View File

@ -16,6 +16,9 @@ export default class ELines extends Group {
this.model = model;
this.zlevel = model.zlevel;
this.z = model.z;
if (model.modelData.type === '01' && model.modelData.logicSectionCodeList && model.modelData.logicSectionCodeList.length) {
return;
}
this.create();
}

View File

@ -55,7 +55,7 @@ export default class Section extends Group {
'destinationText': ETextName, // 目的码名称
'line': ELines, // 创建区段
'lineBorder': ELines, // 哈尔滨线路点击背景色
'sectionBlock': EblockLines, // 哈尔滨线路区段(封锁显示)
'sectionMiddle': EblockLines, // 哈尔滨线路区段(封锁显示)
'stopRouteImg': EStopRouteImg, // 宁波三线路特有
'axle': EAxle, // 计轴 (西安二号线 )
'separator': ESeparator, // 分隔符
@ -88,8 +88,8 @@ export default class Section extends Group {
if (this.line) {
this.line.setCrossUnBlock();
this.line.stopAnimation(true);
this.sectionBlock && this.sectionBlock.hide(); // 因此特殊区段
this.sectionBlock && this.sectionBlock.stopAnimation();
this.sectionMiddle && this.sectionMiddle.hide(); // 因此特殊区段
this.sectionMiddle && this.sectionMiddle.stopAnimation();
if (this.model.type == '01' && this.model.parentCode) {
this.line.setStyle({stroke:'#5b5b5b'});
} else {
@ -189,12 +189,13 @@ export default class Section extends Group {
/** 封锁 06*/
block(routeLock) {
if (this.sectionBlock && this.model.type !== '03') {
this.sectionBlock.setStyle({stroke: this.style.Section.line.blockColor});
this.sectionBlock.show();
routeLock && this.style.Section.line.routeBlockFlashing && this.sectionBlock.animateStyle(true, [
if (this.sectionMiddle && this.model.type !== '03' && this.style.Section.sectionMiddle && this.style.Section.sectionMiddle.blockColor) {
this.sectionMiddle.setStyle({stroke: this.style.Section.sectionMiddle.blockColor});
this.sectionMiddle.show();
routeLock && this.style.Section.line.routeBlockFlashing && this.sectionMiddle.animateStyle(true, [
{ time: 0, styles: { stroke: this.style.Section.sectionMiddle.blockColor } },
{ time: 500, styles: { stroke: this.style.backgroundColor } },
{ time: 1000, styles: { stroke: this.style.Section.line.blockColor } }
{ time: 1000, styles: { stroke: this.style.Section.sectionMiddle.blockColor } }
]);
} else if (this.model.type !== '03') {
this.line && this.line.setStyle({
@ -289,6 +290,24 @@ export default class Section extends Group {
this.line && this.line.setStyle({stroke: '#7F7F7F'});
this.name && this.name.setStyle({textFill: '#7F7F7f'});
}
/** 计轴预复位 */
preReset(blockade) {
if (this.style.Section.sectionMiddle && this.style.Section.sectionMiddle.preResetColor && !blockade) { // 南京二号线
this.sectionMiddle.setStyle({stroke: this.style.Section.sectionMiddle.preResetColor});
this.sectionMiddle.show();
}
}
// 延时解锁
delayUnlock() {
if (this.style.Section.line.delayUnlockColor) {
this.line && this.line.setStyle({stroke: this.style.Section.line.delayUnlockColor});
this.line && this.line.animateStyle(true, [
{ time: 0, styles: { stroke: this.style.Section.line.delayUnlockColor } },
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
{ time: 2000, styles: { stroke: this.style.Section.line.delayUnlockColor } }
]);
}
}
// 南京二号线
setSwitchSectionColor(section1, section2) {
section1 && section1.instance && section1.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
@ -331,8 +350,8 @@ export default class Section extends Group {
]);
}
} else {
if (sectionB && sectionB.instance) { sectionB.instance.line.stopAnimation(true); }
if (sectionC && sectionC.instance) { sectionC.instance.line.stopAnimation(true); }
if (sectionB && sectionB.instance) { sectionB.instance.line.stopAnimation(true); sectionB.delayUnlock && sectionB.instance.delayUnlock(); }
if (sectionC && sectionC.instance) { sectionC.instance.line.stopAnimation(true); sectionC.delayUnlock && sectionB.instance.delayUnlock(); }
}
}
}
@ -354,11 +373,15 @@ export default class Section extends Group {
model.nctOccupied && this.unCommunicationOccupied();
/** 通信车占用状态 */
model.ctOccupied && this.communicationOccupied();
// 计轴预复位
model.preReset && this.preReset(model.blockade);
/** 区段切除*/
model.cutOff && this.sectionCutOff();
/** 是否限速*/
model.speedUpLimit > 0 && this.setSpeedUpperLimit(model.speedUpLimit);
// 区段计轴预复位状态 (未处理)
// 区段延时解锁
model.delayUnlock && this.delayUnlock();
// 区段故障锁闭 之前是fault 暂时设置为faultLock
model.faultLock && this.faultLock();
// 设置灰显
@ -402,7 +425,7 @@ export default class Section extends Group {
this.on('mouseout', () => { // 移出
if (!this.selectedType && !this.selected && this.line ) {
this.line.setStyle({ stroke: this.style.Section.line.spareColor, lineWidth: this.style.Section.line.width });
this.line.setOrignalCross();
this.line.setOrignalCross(true);
}
if (this.style.Switch.sectionAction.flag && this.model.relSwitchCode) {
const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode];
@ -434,7 +457,7 @@ export default class Section extends Group {
} else {
this.lineBorder && this.lineBorder.setStyle({ lineWidth: 0 });
!this.selectedType && this.setState(this.model);
this.line.setOrignalCross();
this.line.setOrignalCross(false);
}
}
drawBatchSelected(selected, type) {

View File

@ -151,8 +151,8 @@ export default class Switch extends Group {
const arrowTextY = model.intersection.y + 15;
const nameTextX = model.namePosition.x + model.intersection.x + directx * (style.Section.line.width * 3 + style.Switch.text.offset.x) * this.triangle.getCotRate();
const nameTextY = model.namePosition.y + model.intersection.y + style.Switch.text.offset.y * (style.Switch.text.position || directy);
const eTextX = nameTextX
const eTextY = nameTextY + (directy == 1? 6 * directy: 3 * directy);
const eTextX = nameTextX;
const eTextY = nameTextY + (directy == 1 ? 6 * directy : 3 * directy);
this.name = new ESwName({ // 道岔名称
zlevel: this.zlevel,
@ -178,7 +178,7 @@ export default class Switch extends Group {
fontSize: 12,
text: 'E',
textAlign: 'center',
textVerticalAlign: directy == 1 ? 'top': 'bottom',
textVerticalAlign: directy == 1 ? 'top' : 'bottom',
textFill: 'yellow'
}
});
@ -452,7 +452,7 @@ export default class Switch extends Group {
}
/** 封锁 */
block() {
block(normalPosition, reversePosition) {
if (this.style.Switch.jointImg.block) { // 宁波专用封锁显示
this.shapeModelB.show();
this.shapeModelB.animateStyle(item => {
@ -485,9 +485,14 @@ export default class Switch extends Group {
if (this.style.Switch.text.blockText) {
this.setTextColor(this.style.Switch.text.blockText);
}
if (this.style.Switch.jointImg.trapezoidBlock && this.model.reversePosition) { // 范围且封锁时显示
this.shapeModelC.show();
this.shapeModelC.getSection().setStyle('fill', '#000080');
if (this.style.Switch.jointImg.trapezoidBlock) { // 范围且封锁时显示
if (normalPosition) {
this.shapeModelB.show();
this.shapeModelB.setColor('#000080');
} else if (reversePosition) {
this.shapeModelA.show();
this.shapeModelA.setColor('#000080');
}
}
if (this.style.Switch.rectLock.block) {
this.lockRect.show();
@ -496,10 +501,10 @@ export default class Switch extends Group {
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor, fill: this.style.Switch.rectLock.blockFillColor });
}
}
if (this.style.Switch.coverBlock && this.style.Switch.coverBlock.show) {
this.shapeBlockCover.show();
this.shapeBlockCover.setColor(this.style.Switch.coverBlock.coverBlockColor);
}
// if (this.style.Switch.coverBlock && this.style.Switch.coverBlock.show) {
// this.shapeBlockCover.show();
// this.shapeBlockCover.setColor(this.style.Switch.coverBlock.coverBlockColor);
// }
}
blockMonolock() {
if (this.style.Switch.rectLock.block && this.style.Switch.rectLock.monolock) {
@ -533,11 +538,11 @@ export default class Switch extends Group {
// 处理岔芯颜色
setSectionState(state) {
const sectionC = store.getters['map/getDeviceByCode'](state.sectionCCode);
if (sectionC && state.reversePosition) {
if (sectionC && state.reversePosition && !state.blockade) {
this.setSwitchModelStatus(this.shapeModelA, sectionC);
}
const sectionA = store.getters['map/getDeviceByCode'](state.sectionACode);
if (sectionA && state.normalPosition && !this.style.Switch.core.graphShow) {
if (sectionA && state.normalPosition && !this.style.Switch.core.graphShow && !state.blockade) {
this.setSwitchModelStatus(this.shapeModelB, sectionA);
}
}
@ -567,7 +572,14 @@ export default class Switch extends Group {
section.show();
}
if (sectionModel.cutOff) {
section.hide();
const lineWidth = sectionModel.instance.line.section.style.lineWidth;
section && section.animateStyle(item => {
let an = item.animateStyle(true);
an = an.when(0, {lineWidth: lineWidth});
an = an.when(1000, {stroke: this.style.backgroundColor});
an = an.when(2000, {lineWidth: lineWidth});
an.start();
});
}
}
setAshShow() {
@ -576,6 +588,17 @@ export default class Switch extends Group {
this.shapeModelC.setColor('#7F7F7F');
this.name.getNameText().setStyle({textFill: '#7F7F7F'});
}
preReset(normalPosition, reversePosition ) {
if (this.style.Switch.coverBlock.preResetColor) { // 范围且封锁时显示
if (normalPosition) {
this.shapeModelB.show();
this.shapeModelB.setColor(this.style.Switch.coverBlock.preResetColor);
} else if (reversePosition) {
this.shapeModelA.show();
this.shapeModelA.setColor(this.style.Switch.coverBlock.preResetColor);
}
}
}
setState(model) {
if (!this.isShowShape) return;
this.recover();
@ -592,7 +615,7 @@ export default class Switch extends Group {
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示
model.singleLock && this.setMonolock(model.normalPosition, model.reversePosition); // 道岔单锁
model.blockade && this.block(); // 道岔封锁
model.blockade && this.block(model.normalPosition, model.reversePosition); // 道岔封锁
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
const path = window.location.href;
if (!path.includes('/map/draw')) {
@ -602,6 +625,7 @@ export default class Switch extends Group {
model.routeLock && this.handleRouteLock(); // 道岔进路锁闭
model.overlapLock && this.handleOverlapLock(); // 道岔进路延续保护
// this.interlockingReserved(); // 联锁预留道岔
model.preReset && this.preReset(model.normalPosition, model.reversePosition); // 道岔预复位
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
const switchModel = Vue.prototype.$jlmap.mapDevice[model.code];

View File

@ -5,6 +5,7 @@ class EHighlight extends Group {
constructor(device) {
super();
this.device = device;
this.style = device.style;
this.selected = false;
this.create();
}
@ -13,11 +14,19 @@ class EHighlight extends Group {
let fill = 'rgba(0,255,255,0.6)';
if (this.device._type === 'Psd') {
fill = 'rgba(255,0,0,0.6)';
} else if (this.device._type === 'Signal' && this.style.Signal.highlightColor) {
fill = this.style.Signal.highlightColor;
}
let z = this.device.z + 1;
if (this.device._type === 'StationStand') {
z = this.device.z + 3;
} else if (this.device._type === 'Signal' && this.style.Signal.highlightZ) {
z = this.style.Signal.highlightZ;
}
const rect = this.device.getBoundingRect();
this.lineBorder = new Rect({
zlevel: this.device.zlevel,
z: this.device._type === 'StationStand' ? this.device.z + 3 : this.device.z + 1,
z: z,
shape: rect,
style: {
fill: fill

View File

@ -44,8 +44,8 @@
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
list: [
// 控制模式
{
// 控制模式
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL.value,
@ -55,11 +55,11 @@ export default {
trainingType: 'ControlConvertMenu',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【站控】', codeType:'STATION', subType:'substation' }
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【站控】', codeType:'STATION', subType:'substation' }
]
},
{
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL.value,
@ -70,10 +70,10 @@ export default {
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【紧急站控】', codeType:'STATION', subType:'emergency' }
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【紧急站控】', codeType:'STATION', subType:'emergency' }
]
},
{
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL.value,
@ -84,9 +84,9 @@ export default {
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【中控】', codeType:'STATION', subType:'center' }
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【中控】', codeType:'STATION', subType:'center' }
]
},
},
// 信号机列表
{
maxDuration: 15,
@ -114,12 +114,12 @@ export default {
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL' },
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
]
},
},
/** 暂不生成实训 */
{
maxDuration: 15,
minDuration: 8,
@ -136,6 +136,7 @@ export default {
{ deviceType: '04', orderNum: 4, operateCode: '3082', tip: '鼠标左键点击【确认】按钮' }
]
},
/** 暂不生成实训 */
{
maxDuration: 15,
minDuration: 8,
@ -151,8 +152,8 @@ export default {
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '04', orderNum: 4, operateCode: '3080', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
]
},
// {
},
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: CMD.Signal.CMD_STATION_SET_MASTER_GUIDE_LOCK.value,
@ -186,14 +187,13 @@ export default {
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value,
skinCode: '04',
trainingName: '取消({3} 进路)',
trainingRemark: '取消功能',
trainingName: '取消进路({3} 进路)',
trainingRemark: '取消进路功能(总取消)',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
]
},
{ // 不生成实训
@ -245,7 +245,7 @@ export default {
minDuration: 5,
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
skinCode: '04',
trainingName: '信号重开({3} 进路)',
trainingName: '信号重开({5})',
trainingRemark: '信号重开功能',
trainingType: 'Signal',
productTypes: ['01'],
@ -317,7 +317,7 @@ export default {
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
skinCode: '04',
trainingName: '进路收人工控({5})',
trainingName: '进路收人工控({3})',
trainingRemark: '进路收人工控',
trainingType: 'Signal',
productTypes: ['02'],
@ -338,15 +338,17 @@ export default {
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{3}】', codeType:'SIGNAL' }
]
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
],
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
config:{onlySignalOP:true}
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
skinCode: '04',
trainingName: '进路交自动控({5})',
trainingName: '进路交自动控({3})',
trainingRemark: '进路交自动控',
trainingType: 'Signal',
productTypes: ['02'],
@ -367,8 +369,9 @@ export default {
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{3}】', codeType:'SIGNAL' }
]
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
],
config:{onlySignalOP:true}
},
{
maxDuration: 15,
@ -660,8 +663,8 @@ export default {
{ deviceType: '06', orderNum: 2, operateCode: '5051', tip: '鼠标左键点击【上行全线】按钮', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮' }
]
},
{
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
@ -688,8 +691,8 @@ export default {
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' }
]
},
{
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
@ -716,7 +719,7 @@ export default {
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' }
]
},
},
{
maxDuration: 15,
minDuration: 8,

View File

@ -91,7 +91,6 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
// pointdata.directionCode = train.directionCode;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
@ -110,7 +109,6 @@ export default {
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
index > 0 && index < train.stationTimeList.length - 1) {
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
}
@ -121,7 +119,6 @@ export default {
lastPoint = train.stationTimeList[idx - 1];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber);
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);

View File

@ -224,7 +224,7 @@ export const menuOperate = {
axlePreReset:{
// 计轴预复位
operation: OperationEvent.Switch.axlePreReset.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
cmdType: CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET
},
hookLock:{
// 道岔钩锁

View File

@ -144,7 +144,7 @@
<button
id="mbm_14"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown('mbm_14')"
@click="buttonDown(Section.axlePreReset.button.operation)"
>
<span style="color: red">
<center>
@ -323,6 +323,7 @@ export default {
const operate = {
operation: operation
};
console.log(operate, '=====');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/setButtonOperation', operation); //

View File

@ -27,6 +27,7 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import AllLineCancelLimit from './dialog/allLineCancelLimit';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'SectionMenu',
@ -143,6 +144,11 @@ export default {
} else {
this.doClose();
}
},
'$store.state.menuOperation.selectedCount': function(val) {
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Switch') {
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
}
}
},
mounted() {
@ -186,6 +192,24 @@ export default {
this.$refs.popMenu.close();
}
},
operationHandler(buttonOperation, selectType) {
switch (buttonOperation) {
case OperationEvent.Section.fault.button.operation: {
//
if (!selectType.normalPosition && selectType.reversePosition) {
this.locate(selectType);
}
break;
}
case OperationEvent.Section.axlePreReset.button.operation: {
//
if (selectType.normalPosition && !selectType.reversePosition) {
this.reverse(selectType);
}
break;
}
}
},
loadSpare() {
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
if (valid) {

View File

@ -388,7 +388,7 @@ export default {
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET;
operate.cmdType = CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });

View File

@ -82,7 +82,7 @@ export default {
{
label: '计轴预复位',
handler: this.axlePreReset,
cmdType:CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
cmdType:CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET
},
{
label: this.$t('menu.menuSwitch.sectionResection'),

View File

@ -577,7 +577,7 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Axis_Pre_Reset',
operateType: 'Switch_Axle_Pre_Reset',
skinCode: '02',
trainingName: '道岔计轴预复位({7})',
trainingRemark: '道岔计轴预复位功能',

View File

@ -512,7 +512,7 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Axis_Pre_Reset',
operateType: 'Switch_Axle_Pre_Reset',
skinCode: '05',
trainingName: 'Turnout section axile pre reset({7})',
trainingRemark: 'Turnout section axile pre reset function',

View File

@ -388,7 +388,7 @@ export default {
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET;
operate.cmdType = CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });

View File

@ -388,7 +388,7 @@ export default {
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET;
operate.cmdType = CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });

View File

@ -154,12 +154,12 @@ export default {
watch:{
'$store.state.menuOperation.selectedCount':function(em) {
const device = this.$store.state.menuOperation.selected;
if (device && device.code && device.deviceType === 'TRAIN') {
this.tempTableData = [device];
this.sectionCode = device.sectionModel.name;
this.tripNum = device.destinationCode + device.serviceNumber + (device.tripNumber.substring(1));
this.groupNum = device.groupNumber;
}
// if (device && device.code && device.deviceType === 'TRAIN') {
// this.tempTableData = [device];
// this.sectionCode = device.sectionModel.name;
// this.tripNum = device.destinationCode + device.serviceNumber + (device.tripNumber.substring(1));
// this.groupNum = device.groupNumber;
// }
}
},
mounted() {

View File

@ -1,13 +1,13 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" />
<menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" :loginActive="loginActive" @login="login" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<menu-button v-if="isShowButton" ref="menuButton" :selected="selected" />
<menu-button v-if="isShowButton" ref="menuButton" :selected="selected" :loginActive="loginActive" :inputStr="inputStr" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="haerbin-01__systerm" />
<passive-Timeout ref="passiveTimeout" />
@ -50,7 +50,13 @@ export default {
return null;
}
}
},
},
data() {
return {
loginActive: false,
inputStr: ''
}
},
computed: {
...mapGetters('config', [
'width'
@ -68,7 +74,13 @@ export default {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
}
},
methods: {
login(inputStr) {
this.loginActive = !!inputStr
this.inputStr = inputStr;
}
}
};
</script>

View File

@ -3,13 +3,12 @@
<div class="haerbin-01__systerm nav">
<el-row v-if="$store.state.training.prdType === '01'">
<el-col :span="2">
<div class="nav-border">
<div class="nav-border login">
<el-row>
<el-button v-if="loginActive" style="width: 100px;line-height: 19px;" plain @click="login">{{ loginText }}</el-button>
<div v-else class="loginClass" style="width: 100px;height:20px;text-align:center;border:1px #ccc solid">{{ loginText }}</div>
<el-button style="width: 100px;line-height: 19px;" plain @click="login">{{ loginText }}</el-button>
</el-row>
<el-row>
<input v-model="loginParam" :type="modelType" style="width: 100px;height:20px;" :disabled="loginActive" @keyup.enter="validateData">
<input v-model="inputStr" :type="modelType" style="width: 100px;height:20px;" :disabled="isLogin||this.loginText == '登录'" @keyup.enter="validateData">
</el-row>
</div>
</el-col>
@ -17,16 +16,16 @@
<el-row>
<template v-for="(item, index) in centralizedStationList1">
<el-col :key="index" :span="colsNum">
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
<el-button v-else class="fake-button" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
<el-button v-else :class="isLogin? 'fake-button':'fake-button-disabled'" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
</el-col>
</template>
</el-row>
<el-row>
<template v-for="(item, index) in centralizedStationList2">
<el-col :key="index" :span="colsNum">
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
<el-button v-else class="fake-button" @click="switchShowStation(item.code)">{{ item.name }}</el-button>
<el-button v-if="stationCode === item.code" class="fake-button-active" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
<el-button v-else :class="isLogin? 'fake-button':'fake-button-disabled'" @click="interceptLogin(switchShowStation)(item.code)">{{ item.name }}</el-button>
</el-col>
</template>
</el-row>
@ -34,16 +33,16 @@
<el-col :span="10">
<div class="nav-border">
<el-row>
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelA}" @click="showLowAlarm('A')">A级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelB}" @click="showLowAlarm('B')">B级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelC?'#FFF':'#DDD' }" plain>C级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">记录</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelA, 'fake-button-disabled': !isLogin}" @click="interceptLogin(showLowAlarm)('A')">A级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#FFF':'#DDD' }" plain :class="{'headerBox' :isNoConfirmLevelB, 'fake-button-disabled': !isLogin}" @click="interceptLogin(showLowAlarm)('B')">B级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelC?'#FFF':'#DDD' }" :class="{'fake-button-disabled': !isLogin}" plain>C级警报</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">记录</el-button></el-col>
</el-row>
<el-row>
<el-col :span="6"><el-button style="width: 80px;" plain @click="controlAudio(false)">声音</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">双屏</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">TGI</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">管理</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(controlAudio)(false)" :class="{'fake-button-disabled': !isLogin}">声音</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">双屏</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">TGI</el-button></el-col>
<el-col :span="6"><el-button style="width: 80px;" plain @click="interceptLogin(undeveloped)()" :class="{'fake-button-disabled': !isLogin}">管理</el-button></el-col>
</el-row>
</div>
</el-col>
@ -170,15 +169,21 @@ export default {
default() {
return null;
}
}
},
loginActive: {
type: Boolean,
default() {
return false
}
}
},
data() {
return {
loginActive:true,
loginText:'登录',
modelType:'text',
modelType:'text',
inputStr: '',
station: {},
keydownTimes:0,
loginParam:'',
classA: -1,
classB: -1,
tempClassA: -1,
@ -236,7 +241,10 @@ export default {
},
isNoRecoverLevelC() {
return this.confirmNoRecoverMapCString !== '{}';
}
},
isLogin() {
return this.loginActive
},
},
watch: {
tempClassA() {
@ -321,6 +329,13 @@ export default {
}
},
methods: {
interceptLogin(cb) {
return (args) => {
if (this.isLogin) {
cb(args)
}
}
},
handleAlarm(val) {
if (val.level === 'A' || val.level === 'B') {
this.controlAudio(true);
@ -357,9 +372,9 @@ export default {
}
},
switchShowStation(stationCode) {
this.stationCode = stationCode;
this.$store.dispatch('map/setShowCentralizedStationNum');
this.$store.dispatch('map/setShowCentralizedStationCode', stationCode);
this.stationCode = stationCode;
this.$store.dispatch('map/setShowCentralizedStationNum');
this.$store.dispatch('map/setShowCentralizedStationCode', stationCode);
},
undeveloped() {
this.doClose();
@ -373,27 +388,32 @@ export default {
this.$refs.logDetail.doShow();
},
login() {
if (this.loginActive) {
if (this.loginText === '退出') {
this.loginText = '登录';
} else {
this.loginText = '用户';
this.loginActive = false;
}
}
const mapText = {
'注销': '登录',
'登录': '名称',
}
this.loginText = mapText[this.loginText]||this.loginText;
this.inputStr = '';
this.$emit('login', '');
},
validateData() {
if (this.keydownTimes === 0 && this.loginParam == 'admin') {
this.loginText = '密码';
this.modelType = 'password';
this.keydownTimes++;
this.loginParam = '';
} else if (this.keydownTimes === 1 && this.loginParam == '123456') {
this.loginText = '退出';
if (this.keydownTimes === 0) {
const station = this.stationList.find(el => el.depot ? false: el.jp == this.inputStr );
if (station) {
this.loginText = '密码';
this.modelType = 'password';
this.inputStr = '';
this.$emit('login', '');
this.keydownTimes++;
this.station = station;
}
} else if (this.keydownTimes === 1 && this.inputStr == '123456') {
this.loginText = '注销';
this.keydownTimes = 0;
this.loginParam = '';
this.modelType = 'text';
this.loginActive = true;
this.modelType = 'text';
this.inputStr = this.station.jp;
this.$emit('login', this.inputStr);
EventBus.$emit('switchStationMode', this.station.code);
}
},
doClose() {
@ -412,21 +432,21 @@ export default {
this.$refs.alarmTableHmi.doShow(level);
},
showLowAlarm(level) {
this.$refs.alarmTableLow.doShow(level);
this.$refs.alarmTableLow.doShow(level);
},
trainControlShow() {
this.$refs.trainControl.doShow();
},
controlAudio(val) {
const audio = document.getElementById('buzzer');
this.sound = val;
if (audio !== null) {
if (val) {
audio.play();
} else if (val === false) {
audio.pause();
}
}
const audio = document.getElementById('buzzer');
this.sound = val;
if (audio !== null) {
if (val) {
audio.play();
} else if (val === false) {
audio.pause();
}
}
}
}
};
@ -442,10 +462,17 @@ export default {
$menuItemPadding: 5px;
#menuBar {
z-index: 16;
z-index: 37;
position: absolute;
width: inherit;
}
.login {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.nav-border {
font-size: 12px;
color: #000;
@ -570,6 +597,29 @@ export default {
background: #DDD;
margin: 5px auto;
}
.fake-button-disabled {
height: 20px;
line-height: 20px;
padding: 0px;
width: 80px;
border: 1px solid #1F313F !important;
font-size: 12px;
border-radius: 1px !important;
color: #8f8f8f !important;
background: #DDD im !important;
margin: 5px auto;
cursor: not-allowed;
&:hover {
color: #8f8f8f !important;
background: #DDD im !important;
}
&:disabled {
color: #8f8f8f !important;
background: #DDD im !important;
}
}
.fake-button-active{
height: 20px;
line-height: 20px;

View File

@ -34,8 +34,8 @@
<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 || !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-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[isLogin && (stationContorl.controlMode != item.mode || item.mode == 'None')? 'fake-button-active': 'fake-button-disabled']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[isLogin && (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="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
<div v-else class="fake-button-grayk" />
</div>
</template>
@ -45,11 +45,11 @@
<el-col v-if="!trainOperationShow" :span="10">
<div class="nav-border">
<div class="nav-border-top">
<el-button :id="commandId" class="fl" :class="{'disabled': canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="canCommand || secondConfirm" @click="command">执行</el-button>
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="cancle">取消</el-button>
<el-button :id="commandId" class="fl" :class="{'disabled': !isLogin||canCommand||secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="!isLogin||canCommand||secondConfirm" @click="interceptLogin(command)()">执行</el-button>
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain :class="{'disabled': !isLogin}" :disabled="!isLogin" @click="interceptLogin(cancle)()">取消</el-button>
</div>
<div class="el-print">
<div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code}" @click="selectRouteParam(el.code)">
<div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code}" @click="interceptLogin(selectRouteParam)(el.code)">
{{ el.name }}
</div>
</div>
@ -105,9 +105,9 @@
</el-col>
<el-col :span="3">
<div class="nav-border flex-box">
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="changeShowMode(false)">联锁操作</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain>时刻表操作</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="changeShowMode(true)">ATS操作</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)(false)">联锁操作</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin">时刻表操作</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)(true)">ATS操作</el-button>
</div>
</el-col>
</el-row>
@ -157,8 +157,8 @@
<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 || !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-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[(isLogin && stationContorl.controlMode != item.mode || item.mode == 'None')? 'fake-button-active': 'fake-button-disabled']" @click="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
<div v-else-if="item.name && !item.securityCommand" :id="item.operate.domId" :class="[isLogin && (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="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
<div v-else class="fake-button-grayk" />
</div>
</template>
@ -166,8 +166,8 @@
</template>
</div>
<div class="separator">
<el-button :id="commandId" class="fl" :class="{'disabled': canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="canCommand || secondConfirm" @click="command">执行</el-button>
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="cancle">取消</el-button>
<el-button :id="commandId" class="fl" :class="{'disabled': !isLogin || canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="!isLogin || canCommand || secondConfirm" @click="interceptLogin(command)()">执行</el-button>
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain :class="{'disabled': !isLogin}" :disabled="!isLogin" @click="interceptLogin(cancle)()">取消</el-button>
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="handleClose">关闭</el-button>
</div>
</el-dialog>
@ -208,8 +208,8 @@
<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 || !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-if="item.name && item.securityCommand" :id="item.operate.domId" :class="[stationContorl.controlMode != item.mode || item.mode == 'None'? 'fake-button-active': 'fake-button-disabled']" @click="interceptLogin(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="interceptLogin(clickCommand)(item, index)">{{ item.name }}</div>
<div v-else class="fake-button-grayk" />
</div>
</template>
@ -237,6 +237,16 @@ export default {
default() {
return null;
}
},
loginActive: {
type: Boolean,
default() {
return false;
}
},
inputStr: {
type: String,
default: ''
}
},
data() {
@ -317,20 +327,20 @@ export default {
cr2ConfirmId() {
return OperationEvent.Command.commandHaerbin.confrimCr2.domId;
},
stationContorl() {
return this.getStationControl(this.selectedObj || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
},
isLocal() {
return this.$store.state.training.prdType == '01';
},
stationContorl() {
return this.getStationControl(this.selected || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
isLogin() {
return this.isLocal ? this.loginActive && this.checkBelongCentralizedStationByInputStr(this.inputStr, this.stationContorl) : true;
},
menuPosition() {
return this.$store.state.menuOperation.menuPosition;
}
},
watch: {
'$store.state.menuOperation.setMenuChangeCount': function (val) {
},
'$store.state.training.prdType': function (val) {
this.trainOperationShow = false;
this.initMenus();
@ -340,8 +350,8 @@ export default {
if (!val) {
this.doClose();
}
},
'selected': function (val) {
},
'selected': function (val) {
this.initMenus();//
this.pushTempData([]); //
this.selectedObj = this.selected;
@ -375,14 +385,13 @@ export default {
}
},
'$store.state.map.showCentralizedStationCode': function(val) {
this.cancle();
if (!this.oldSelected) {
this.handleBasicMenu();
}
},
'$store.state.map.mapStationStateUpdateCount': function() {
if (!this.selected || !this.selected.code) {
this.handleBasicMenu();
}
this.initCentralizedStationList([...this.centralizedStationList])
}
},
mounted() {
@ -390,6 +399,29 @@ export default {
this.handleBasicMenu();
},
methods: {
initCentralizedStationList(list, selectedObj=this.selectedObj) {
const stationContorl = this.getStationControl(selectedObj || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
this.centralizedStationList = new Array(15).fill({});
list.forEach((el, index) => {
if (el.disabledCb && stationContorl) {
el.disabled = el.disabledCb(stationContorl);
}
this.centralizedStationList[index] = el;
});
},
checkBelongCentralizedStationByInputStr(inputStr, station) {
const child= this.stationList.find(el => el.depot ? false : el.jp == inputStr );
if (child && station) {
return station.code == child.code || station.chargeStationCodeList && station.chargeStationCodeList.includes(child.code);
}
},
interceptLogin(cb) {
return (args) => {
if (this.isLogin) {
cb(args);
}
};
},
//
deviceHighLight(device, flag) {
if (device && device.instance && typeof device.instance.drawSelected === 'function' ) {
@ -438,7 +470,10 @@ export default {
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
break;
break;
default:
this.handleBasicMenu();
break;
}
},
handleIbpShow() {
@ -501,13 +536,7 @@ export default {
});
this.oldDevice = section;
this.centralizedStationList = new Array(15).fill({});
this.switchParamList.forEach((swicth, index) => {
this.centralizedStationList[index] = swicth;
if (swicth.disabledCb && this.selectedObj) {
swicth.disabled = swicth.disabledCb(this.selectedObj);
}
});
this.initCentralizedStationList(this.switchParamList);
this.pushTempData([this.selectedObj]);
this.param = {
switchCode: this.selectedObj.code,
@ -522,16 +551,8 @@ export default {
this.deviceHighLight(this.oldClickObj, false);
}
this.oldClickObj = deepAssign({}, this.selectedObj);
this.centralizedStationList = new Array(15).fill({});
this.signalParamList.forEach((singal, index) => {
if (singal.disabledCb && this.selectedObj) {
singal.disabled = singal.disabledCb(this.selectedObj);
}
this.centralizedStationList[index] = singal;
});
this.oldClickObj = deepAssign({}, this.selectedObj);
this.initCentralizedStationList(this.signalParamList);
this.pushTempData([this.selectedObj]);
this.param = {
signalCode: this.selectedObj.code
@ -540,16 +561,9 @@ export default {
handleSectionMenu() {
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
this.centralizedStationList = new Array(15).fill({});
this.sectionParamList.forEach((section, index) => {
this.centralizedStationList[index] = section;
if (section.disabledCb && this.selectedObj) {
section.disabled = section.disabledCb(this.selectedObj);
}
});
this.oldClickObj = deepAssign({}, this.selectedObj);
this.initCentralizedStationList(this.sectionParamList);
this.pushTempData([this.selectedObj]);
this.param = {
sectionCode: this.selectedObj.code
@ -560,17 +574,10 @@ export default {
this.deviceHighLight(this.oldDevice, false);
if (this.oldClickObj) {
this.deviceHighLight(this.oldClickObj, false);
}
this.oldClickObj = null; //
this.centralizedStationList = new Array(15).fill({});
this.basicParamList.forEach((basic, index) => {
this.centralizedStationList[index] = basic;
if (basic.disabledCb && station) {
basic.disabled = basic.disabledCb(station);
}
});
}
this.oldClickObj = null; //
this.initCentralizedStationList(this.basicParamList, station);
this.pushTempData(station ? [station] : []);
this.param = {
@ -579,14 +586,7 @@ export default {
};
},
handleStationMenu() {
this.centralizedStationList = new Array(15).fill({});
this.stationParamList.forEach((station, index) => {
this.centralizedStationList[index] = station;
if (station.disabledCb && this.selectedObj) {
station.disabled = station.disabledCb(this.selectedObj);
}
});
this.initCentralizedStationList(this.stationParamList);
this.pushTempData([this.selectedObj]);
this.param = { stationCode: this.selectedObj.code };
},
@ -595,15 +595,9 @@ export default {
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
}
this.centralizedStationList = new Array(15).fill({});
this.standParamList.forEach((stand, index) => {
this.centralizedStationList[index] = stand;
if (stand.disabledCb && this.selectedObj) {
stand.disabled = stand.disabledCb(this.selectedObj);
}
});
}
this.initCentralizedStationList(this.standParamList);
const data = Object.assign(this.selectedObj);
const station = this.$store.getters['map/getDeviceByCode'](this.selectedObj.stationCode);
data.name = `${station.name} ${data.right ? '上行' : '下行'}`;
@ -612,14 +606,8 @@ export default {
standCode: this.selectedObj.code
};
},
handleRouteMenu() { //
this.centralizedStationList = new Array(15).fill({});
this.routeParamList.forEach((swicth, index) => {
this.centralizedStationList[index] = swicth;
if (swicth.disabledCb && this.selectedObj) {
swicth.disabled = swicth.disabledCb(this.selectedObj);
}
});
handleRouteMenu() { //
this.initCentralizedStationList(this.routeParamList);
if (this.selectedObj._event === MouseEvent.Right) {
this.rightClickDialogVisible = true;
}
@ -659,7 +647,6 @@ export default {
signalCode: this.route.startSignalCode
};
}
if (this.operate == OperationEvent.Signal.humanControl.menuButton.operation || this.operate == OperationEvent.Signal.atsAutoControl.menuButton.operation) {
const routeCodeList = [];
this.routeList.forEach(item => {
@ -738,7 +725,6 @@ export default {
operation: OperationEvent.Command.commandHaerbin.confirm.operation,
param: this.param
};
if (!this.securityCommand) {
step.over = true;
step.cmdType = this.cmdType;
@ -791,17 +777,18 @@ export default {
cmdType: this.cmdType,
operation: OperationEvent.Command.commandHaerbin.confrimCr2.operation
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.pushTempData([{ name: `${this.cmdType.label}成功` }]);
this.doClose();
this.doClose();
this.handleDeviceMenu();
this.handleClose();
}
}).catch((error) => {
console.error(error);
this.pushTempData([{ name: `${this.cmdType.label}失败` }]);
this.doClose();
this.doClose();
this.handleDeviceMenu();
this.handleClose();
this.$refs.noticeInfo.doShow();
});
@ -821,9 +808,8 @@ export default {
this.operate = ''; //
this.cmdType = '';
this.securityCommand = '';
// this.speedLimitValue = 15;
this.speedLimitValue = '';
this.secondConfirm = false;
this.secondConfirm = false;
this.cr1Confrim = false;
if (this.oldClickObj) {
this.deviceHighLight(this.oldClickObj, false);
@ -836,6 +822,7 @@ export default {
this.dialogVisible = true;
},
handleClose() {
this.secondConfirm = false;
this.dialogVisible = false;
},
handleStationClose() {
@ -850,14 +837,14 @@ export default {
handleTrainParam() {
if (this.selectedObj.type === '01') {
this.formModelSectionName = this.selectedObj.name;
this.$store.state.map.activeTrainList.forEach(trainCode => {
const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode);
if (trainModel && trainModel.physicalCode === this.selectedObj.code) {
this.formModelTripNum = trainModel.serviceNumber + trainModel.destinationCode + (trainModel.tripNumber.substring(1));
this.trainModel = trainModel;
this.formModelNewTrip = '';
}
});
// this.$store.state.map.activeTrainList.forEach(trainCode => {
// const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode);
// if (trainModel && trainModel.physicalCode === this.selectedObj.code) {
// this.formModelTripNum = trainModel.serviceNumber + trainModel.destinationCode + (trainModel.tripNumber.substring(1));
// this.trainModel = trainModel;
// this.formModelNewTrip = '';
// }
// });
}
},
pushTempData(list) {
@ -963,14 +950,14 @@ export default {
{ name: '' },
{ name: '' },
{ name: '' },
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, securityCommand: true, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) },
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['Center'].includes(selectedObj.controlMode) },
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, securityCommand: true, disabledCb: (stationControl) => ['Local'].includes(stationControl.controlMode) },
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (stationControl) => ['Local'].includes(stationControl.controlMode) },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (stationControl) => ['Center'].includes(stationControl.controlMode) },
{ name: '' },
{ name: '' },
{ name: '' },
{ name: '' },
{ name: '关闭索引', cmdType: '', operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['None'].includes(selectedObj.controlMode) }
{ name: '关闭索引', cmdType: '', operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (stationControl) => ['None'].includes(stationControl.controlMode) }
] : [
{ name: '' },
{ name: '' },
@ -989,79 +976,79 @@ export default {
{ name: '' }
];
this.sectionParamList = this.selected && this.selected.type == '05' ? [
{ name: '岔芯设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '岔芯消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '封锁岔心', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '解封岔心', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '强解岔心', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }
{ name: '岔芯设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '岔芯消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '封锁岔心', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '解封岔心', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '强解岔心', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
] : [
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
];
this.switchParamList = [
{ name: '岔区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch},
{ name: '岔区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '转换道岔', cmdType: CMD.Switch.CMD_SWITCH_TURN, operate: OperationEvent.Switch.locate.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '强行转岔', cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN, operate: OperationEvent.Switch.locate.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '强解道岔', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '挤岔恢复', cmdType: '', operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '单独锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '预复位', cmdType: CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET, operate: OperationEvent.Switch.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '强行消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }
{ name: '岔区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch},
{ name: '岔区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '转换道岔', cmdType: CMD.Switch.CMD_SWITCH_TURN, operate: OperationEvent.Switch.locate.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '强行转岔', cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN, operate: OperationEvent.Switch.locate.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '强解道岔', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '挤岔恢复', cmdType: CMD.Switch.CMD_SWITCH_SQUEEZE_RECOVERY, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '单独锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '预复位', cmdType: CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET, operate: OperationEvent.Switch.axlePreReset.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '强行消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
];
this.signalParamList = this.$store.state.training.prdType === '01' ? [
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch },
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch },
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch },
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch },
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }
{ name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
] : [
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch },
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch },
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (selectedObj) => selectedObj.ciControl || !this.modeMatch },
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (selectedObj) => !selectedObj.ciControl || !this.modeMatch },
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (stationControl) => !this.modeMatch || stationControl.atsControl },
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (stationControl) => !this.modeMatch || !stationControl.atsControl },
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch || stationControl.ciControl },
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch || !stationControl.ciControl },
{ name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }
{ name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
];
this.stationParamList = this.$store.state.training.prdType === '01' ? [
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (selectedObj) => !['Local'].includes(selectedObj.controlMode) || !this.modeMatch }
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (stationControl) => !this.modeMatch || !['Local'].includes(stationControl.controlMode) }
] : [
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (selectedObj) => !['Local'].includes(selectedObj.controlMode) || !this.modeMatch },
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (selectedObj) => ['Center'].includes(selectedObj.controlMode) },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['Local', 'None'].includes(selectedObj.controlMode) }
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (stationControl) => !this.modeMatch || !['Local'].includes(stationControl.controlMode) },
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (stationControl) => ['Center'].includes(stationControl.controlMode) },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (stationControl) => ['Local', 'None'].includes(stationControl.controlMode) }
];
this.routeParamList = [
{ name: '排列进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, disabledCb: (selectedObj) => !this.modeMatch },
{ name: '取消进路', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, disabledCb: (selectedObj) => !this.modeMatch }
{ name: '排列进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '取消进路', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, disabledCb: (stationControl) => !this.modeMatch }
];
}
}

View File

@ -1,5 +1,5 @@
<template>
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="text-align: center;">
<div style="text-align: left;width: 90%;margin-left: 5%;border: 1px solid #808080;border-radius: 5px;padding: 10px;">
<el-row>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="text-align: center;">
<div style="text-align: left;">
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="操作列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog class="haerbin-01__systerm manage-user" title="操作列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="text-align: center;">
<div style="text-align: left;">
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>

View File

@ -2,10 +2,10 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, pre
import store from '@/store/index';
export default {
/** 边缘高度*/
EdgeHeight: 3,
EdgeHeight: 600,
/** 间隔高度*/
CoordMultiple: 3,
CoordMultiple: 1,
/** 偏移时间*/
TranslationTime: 60 * 60 * 2,
@ -165,67 +165,72 @@ export default {
/** 按服务遍历数据*/
data.serviceNumberDataList.forEach((service) => {
/** 按车次遍历数据*/
var isBackup = true;
// var isBackup = true;
var opt = { name: '', markPointData: [], data: [] };
if (service.tripNumberDataList && service.tripNumberDataList.length) {
service.tripNumberDataList.forEach((train, j) => {
var pointdata = {};
var idx = 0;
var num = 0;
var lastPoint = null;
var nextPoint = null;
/** 创建标记点名称和坐标*/
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
/** 如果车次号为空,不显示名称*/
if (train.tripNumber) {
/** 创建标记点名称和坐标*/
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
// pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
/** 创建服务号名称*/
opt.name = `${service.serviceNumber}`;
}
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.name = '' + service.serviceNumber;
opt.markPointData.push(createMartPoint(pointdata));
/** 计算非折返点车次点坐标集合*/
train.stationTimeList.forEach((elem, index) => {
idx = index;
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
index > 0 && index < train.stationTimeList.length - 1) {
const aa = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
}
});
/** 计算折返点车次坐标点集合*/
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {
lastPoint = train.stationTimeList[idx];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0];
lastPoint = train.stationTimeList[idx - 1];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber);
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
}
/** 如果是备用车,按车次添加线*/
if (train.backup) {
/** 创建一条完成的服务数据*/
opt.name += j;
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
// var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
if (model) {
models.push(model);
opt = { name: '', markPointData: [], data: [] };
}
}
isBackup = train.backup;
});
// 不是备用车,按服务添加线
if (!isBackup) {
if (!service.backup) {
/** 创建一条完成的服务数据*/
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) {
models.push(model);
}
@ -280,7 +285,8 @@ export default {
}
serie.markPoint.data.push(createMartPoint({
directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
// coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000'
}));
@ -288,12 +294,16 @@ export default {
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem), elem.directionCode];
// var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem), elem.directionCode];
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2]), lastPoint[2]]);
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2]), lastPoint[2]]);
var num = this.computedReentryNumber(elem.tripNumber);
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2], num), lastPoint[2]]);
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2], num), lastPoint[2]]);
// serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2]), lastPoint[2]]);
// serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2]), lastPoint[2]]);
}
}
@ -311,8 +321,15 @@ export default {
return series;
},
/** 初始化Y轴*/
initializeYaxis(stations) {
return createMarkLineModels(stations, (elem) => {
return this.EdgeHeight + elem.kmRange * this.CoordMultiple;
});
},
getYaxisValueByStation(station, index) {
return this.EdgeHeight + index * this.CoordMultiple;
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
},
/** 将后台数据转换为试图序列模型*/
@ -326,52 +343,55 @@ export default {
return map;
},
/** 初始化Y轴*/
initializeYaxis(stations) {
return createMarkLineModels(stations, (elem, index) => {
return this.EdgeHeight + index * this.CoordMultiple;
});
},
/** 计算y轴最小值*/
computedYaxisMinValue() {
return 0;
computedYaxisMinValue(stations) {
return stations[0].kmRange * this.CoordMultiple;
},
/** 计算y轴最大值*/
computedYaxisMaxValue(stations) {
return this.EdgeHeight * 2 + (stations.length - 1) * this.CoordMultiple;
return stations[stations.length - 1].kmRange * this.CoordMultiple + this.EdgeHeight * 2;
},
/** 格式化y轴数据*/
computedFormatYAxis(stations, params) {
var yText = '0m';
var index = Math.floor((parseInt(params.value) - this.EdgeHeight) / this.CoordMultiple);
if (index >= 0 && index < stations.length) {
yText = Math.floor(stations[index].kmRange) + 'm';
}
stations.forEach(elem => {
if (elem.kmRange < parseInt(params.value) / this.CoordMultiple - this.EdgeHeight) {
yText = Math.floor(elem.kmRange) + 'm';
}
});
return yText;
},
/** 根据是否和上一个车次是否相交,计算下一个车次的折返的高度*/
computedReentryNumber(code) {
// return parseInt(code || 1) % 2 ? 1 : 2;
return 1;
},
/** 根据方向计算y折返偏移量*/
getYvalueByDirectionCode(defaultVlue, directionCode) {
getYvalueByDirectionCode(defaultVlue, directionCode, num) {
if (directionCode === '1') {
defaultVlue -= this.EdgeHeight / 2;
defaultVlue -= this.EdgeHeight / 2 * num;
} else if (directionCode === '2') {
defaultVlue += this.EdgeHeight / 2;
defaultVlue += this.EdgeHeight / 2 * num;
}
return defaultVlue;
},
/** 根据elem计算y值*/
getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, isSpecial) {
getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, isSpecial, num) {
var defaultVlue = 0;
var station = stations.find(it => { return it.code == elem.stationCode; });
if (station) {
defaultVlue = kmRangeCoordMap[`${station.kmRange}`];
if (isSpecial) {
defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode);
defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode, num);
}
}

View File

@ -935,8 +935,8 @@ export default {
// trainingName: '上电解锁({1})',
// trainingRemark: '上电解锁',
// trainingType: 'Station',
// productTypes: ['01'],
// stepVOList:[
// productTypes: ['01'],
// stepVOList:[
// {deviceType: '05', orderNum: 1, operateCode: '603', tip: '鼠标右键菜单'}
// ]
// }

View File

@ -256,7 +256,7 @@ export default {
Local: [
// {
// title: '(W)',
// operate: OperationEvent.Command.mBar.system,
// operate: '',
// children: [
// {
// title: '',
@ -412,118 +412,139 @@ export default {
},
{
title: '线路(G)',
operate: '',
operate: OperationEvent.Command.commandNingBo.line,
children: [
{
title: '站台',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_stand,
children: [
{
title: '开放/关闭',
click: this.standOpenOrClose
click: this.standOpenOrClose,
operate: OperationEvent.Command.commandNingBo.line_stand_openOrClose
},
{
title: '设置/取消扣车',
click: this.setStandDetain
click: this.setStandDetain,
operate: OperationEvent.Command.commandNingBo.line_stand_holdOrNot
},
{
title: '设置站间列车数量',
// click: this.setIntervalStopNumber
click: this.undeveloped
click: this.undeveloped,
operate: OperationEvent.Command.commandNingBo.line_stand_trainNum
},
{
title: '分配停站时间',
click: this.setAllocateTime
click: this.setAllocateTime,
operate: OperationEvent.Command.commandNingBo.line_stand_stopTime
},
{
title: '授权转移',
click: this.authorizeTransfer
click: this.authorizeTransfer,
operate: OperationEvent.Command.commandNingBo.line_stand_transfer
},
{
title: '显示',
click: this.showStandDetail
click: this.showStandDetail,
operate: OperationEvent.Command.commandNingBo.line_stand_detail
}
]
},
{
title: '道岔',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_switch,
children: [
{
title: '命令',
title: '命令',
operate: OperationEvent.Command.commandNingBo.line_switch_cmd,
click: this.setSwitchCommand
},
{
title: '封锁',
title: '封锁',
operate: OperationEvent.Command.commandNingBo.line_switch_block,
click: this.setBlockSwitch
},
{
title: '解除封锁',
title: '解除封锁',
operate: OperationEvent.Command.commandNingBo.line_switch_unblock,
click: this.setUnblockSwitch
},
{
title: '请求动岔/请求或授权/取消',
title: '请求动岔/请求或授权/取消',
operate: OperationEvent.Command.commandNingBo.line_switch_empower,
click: this.setSwitchActive
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_switch_detail,
click: this.showSwitchDetail
}
]
},
{
title: '信号机',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_signal,
children: [
{
title: '引导',
title: '引导',
operate: OperationEvent.Command.commandNingBo.line_signal_guide,
click: this.setSignalGuide
},
{
title: '取消允许锁闭',
title: '取消允许锁闭',
operate: OperationEvent.Command.commandNingBo.line_signal_lockOrNot,
click: this.setSignalCanBlock
},
{
title: '进路/命令',
title: '进路/命令',
operate: OperationEvent.Command.commandNingBo.line_signal_cmd,
click: this.setRouteCommand
},
{
title: '信号指示模式',
title: '信号指示模式',
operate: OperationEvent.Command.commandNingBo.line_signal_indicator,
click: this.setSignalModel
},
{
title: '封锁',
title: '封锁',
operate: OperationEvent.Command.commandNingBo.line_signal_block,
click: this.setSignalBlock
},
{
title: '解除封锁',
title: '解除封锁',
operate: OperationEvent.Command.commandNingBo.line_signal_unblock,
click: this.setSignalCancelBlock
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_signal_detail,
click: this.showSignalDetail
}
]
},
{
title: '轨道',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_section,
children: [
{
title: '开放',
title: '开放',
operate: OperationEvent.Command.commandNingBo.line_section_open,
click: this.handleOpenSection
},
{
title: '关闭',
title: '关闭',
operate: OperationEvent.Command.commandNingBo.line_section_close,
click: this.handleCloseSection
},
{
title: '临时限速',
title: '临时限速',
operate: OperationEvent.Command.commandNingBo.line_section_limitSpeed,
click: this.handleLimitSpeed
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_section_detail,
click: this.handleSectionShow
}
]
@ -887,121 +908,142 @@ export default {
},
{
title: '线路(G)',
operate: '',
operate: OperationEvent.Command.commandNingBo.line,
children: [
{
{
title: '站台',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_stand,
children: [
{
title: '开放/关闭',
click: this.standOpenOrClose
click: this.standOpenOrClose,
operate: OperationEvent.Command.commandNingBo.line_stand_openOrClose
},
{
title: '设置/取消扣车',
click: this.setStandDetain
click: this.setStandDetain,
operate: OperationEvent.Command.commandNingBo.line_stand_holdOrNot
},
{
title: '设置站间列车数量',
click: this.setIntervalStopNumber
click: this.undeveloped,
operate: OperationEvent.Command.commandNingBo.line_stand_trainNum
},
{
title: '分配停站时间',
click: this.setAllocateTime
click: this.setAllocateTime,
operate: OperationEvent.Command.commandNingBo.line_stand_stopTime
},
{
title: '授权转移',
click: this.authorizeTransfer
click: this.authorizeTransfer,
operate: OperationEvent.Command.commandNingBo.line_stand_transfer
},
{
title: '显示',
click: this.showStandDetail
click: this.showStandDetail,
operate: OperationEvent.Command.commandNingBo.line_stand_detail
}
]
},
{
title: '道岔',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_switch,
children: [
{
title: '命令',
title: '命令',
operate: OperationEvent.Command.commandNingBo.line_switch_cmd,
click: this.setSwitchCommand
},
{
title: '封锁',
title: '封锁',
operate: OperationEvent.Command.commandNingBo.line_switch_block,
click: this.setBlockSwitch
},
{
title: '解除封锁',
title: '解除封锁',
operate: OperationEvent.Command.commandNingBo.line_switch_unblock,
click: this.setUnblockSwitch
},
{
title: '请求动岔/请求或授权/取消',
title: '请求动岔/请求或授权/取消',
operate: OperationEvent.Command.commandNingBo.line_switch_empower,
click: this.setSwitchActive
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_switch_detail,
click: this.showSwitchDetail
}
]
},
{
{
title: '信号机',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_signal,
children: [
{
title: '引导',
title: '引导',
operate: OperationEvent.Command.commandNingBo.line_signal_guide,
click: this.setSignalGuide
},
{
title: '取消允许锁闭',
title: '取消允许锁闭',
operate: OperationEvent.Command.commandNingBo.line_signal_lockOrNot,
click: this.setSignalCanBlock
},
{
title: '进路/命令',
title: '进路/命令',
operate: OperationEvent.Command.commandNingBo.line_signal_cmd,
click: this.setRouteCommand
},
{
title: '信号指示模式',
title: '信号指示模式',
operate: OperationEvent.Command.commandNingBo.line_signal_indicator,
click: this.setSignalModel
},
{
title: '封锁',
title: '封锁',
operate: OperationEvent.Command.commandNingBo.line_signal_block,
click: this.setSignalBlock
},
{
title: '解除封锁',
title: '解除封锁',
operate: OperationEvent.Command.commandNingBo.line_signal_unblock,
click: this.setSignalCancelBlock
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_signal_detail,
click: this.showSignalDetail
}
]
},
{
{
title: '轨道',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_section,
children: [
{
title: '开放',
title: '开放',
operate: OperationEvent.Command.commandNingBo.line_section_open,
click: this.handleOpenSection
},
{
title: '关闭',
title: '关闭',
operate: OperationEvent.Command.commandNingBo.line_section_close,
click: this.handleCloseSection
},
{
title: '临时限速',
title: '临时限速',
operate: OperationEvent.Command.commandNingBo.line_section_limitSpeed,
click: this.handleLimitSpeed
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_section_detail,
click: this.handleSectionShow
}
]
},
},
{
title: '闭塞区段',
operate: '',
@ -1234,7 +1276,7 @@ export default {
return true;
},
initMenu(menu) {
const type = State2SimulationMap[this.$store.state.training.prdType];
const type = State2SimulationMap[this.$store.state.training.prdType];
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[type], this.$store.state.training.operatemode);
this.clickEvent();
this.closeMenu(true);
@ -1335,10 +1377,10 @@ export default {
EventBus.$emit('closeMenu');
});
},
handleArrangeRoute() {
handleArrangeRoute(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1348,10 +1390,10 @@ export default {
}
});
},
handleTrainDistributionRunLine() {
handleTrainDistributionRunLine(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1361,10 +1403,10 @@ export default {
}
});
},
handleTrainDistributionClass() {
handleTrainDistributionClass(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1374,10 +1416,10 @@ export default {
}
});
},
handleTrainDistributionBack() {
handleTrainDistributionBack(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1388,10 +1430,10 @@ export default {
});
},
// /
standOpenOrClose() {
standOpenOrClose(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1402,10 +1444,10 @@ export default {
});
},
//
setStandDetain() {
setStandDetain(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1415,10 +1457,10 @@ export default {
}
});
},
setIntervalStopNumber() {
setIntervalStopNumber(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1429,10 +1471,10 @@ export default {
});
},
//
setAllocateTime() {
setAllocateTime(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1443,10 +1485,10 @@ export default {
});
},
//
authorizeTransfer() {
authorizeTransfer(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1456,10 +1498,10 @@ export default {
}
});
},
showStandDetail() {
showStandDetail(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1469,10 +1511,10 @@ export default {
}
});
},
setSwitchCommand() {
setSwitchCommand(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1483,10 +1525,10 @@ export default {
});
},
//
setBlockSwitch() {
setBlockSwitch(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Switch.block.button.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1498,10 +1540,10 @@ export default {
});
},
//
setUnblockSwitch() {
setUnblockSwitch(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Switch.unblock.button.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1512,10 +1554,10 @@ export default {
});
},
//
setSwitchActive() {
setSwitchActive(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) =>{
if (valid) {
@ -1526,10 +1568,10 @@ export default {
});
},
//
showSwitchDetail() {
showSwitchDetail(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1540,10 +1582,10 @@ export default {
});
},
//
setSignalGuide() {
setSignalGuide(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1554,10 +1596,10 @@ export default {
}
});
},
setSignalCanBlock() {
setSignalCanBlock(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1569,10 +1611,10 @@ export default {
});
},
//
setRouteCommand() {
setRouteCommand(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1582,10 +1624,10 @@ export default {
}
});
},
handleOpenSection() {
handleOpenSection(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Section.unlock.menu.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1595,10 +1637,10 @@ export default {
}
});
},
handleCloseSection() {
handleCloseSection(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Section.lock.menu.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1608,10 +1650,10 @@ export default {
}
});
},
handleLimitSpeed() {
handleLimitSpeed(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1621,10 +1663,10 @@ export default {
}
});
},
handleSectionShow() {
handleSectionShow(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1634,10 +1676,10 @@ export default {
}
});
},
handleLock() {
handleLock(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1647,10 +1689,10 @@ export default {
}
});
},
handleUnLock() {
handleUnLock(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1660,10 +1702,10 @@ export default {
}
});
},
handleRestoration() {
handleRestoration(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1673,10 +1715,10 @@ export default {
}
});
},
handleSectionRestoration() {
handleSectionRestoration(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1686,10 +1728,10 @@ export default {
}
});
},
setSignalModel() {
setSignalModel(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1699,10 +1741,10 @@ export default {
}
});
},
handleSectionStopShow() {
handleSectionStopShow(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1712,10 +1754,10 @@ export default {
}
});
},
setSignalBlock() {
setSignalBlock(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Signal.lock.menu.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1725,10 +1767,10 @@ export default {
}
});
},
setSignalCancelBlock() {
setSignalCancelBlock(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Signal.unlock.menu.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1738,10 +1780,10 @@ export default {
}
});
},
showSignalDetail() {
showSignalDetail(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1751,10 +1793,10 @@ export default {
}
});
},
setCbtcMode() {
setCbtcMode(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Command.mBar.cbtcMode.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1764,10 +1806,10 @@ export default {
}
});
},
setReserveMode() {
setReserveMode(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Command.mBar.reserveMode.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1777,10 +1819,10 @@ export default {
}
});
},
setSystemDetain() {
setSystemDetain(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1791,10 +1833,10 @@ export default {
}
});
},
setRunningInterval() {
setRunningInterval(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1804,10 +1846,10 @@ export default {
}
});
},
adjustStrategy() {
adjustStrategy(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1817,10 +1859,10 @@ export default {
}
});
},
setTrainDepart() {
setTrainDepart(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Train.setTrainDeparture.menu.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1830,10 +1872,10 @@ export default {
}
});
},
breakAway() {
breakAway(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Train.breakAwayPlan.menu.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1843,10 +1885,10 @@ export default {
}
});
},
setTrainReset() {
setTrainReset(item) {
const operate = {
type: 'bar',
operation: OperationEvent.Train.setTrainReset.menu.operation
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1856,10 +1898,10 @@ export default {
}
});
},
setJumpStop() {
setJumpStop(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1869,10 +1911,10 @@ export default {
}
});
},
cancelDeviation() {
cancelDeviation(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1882,10 +1924,10 @@ export default {
}
});
},
updateDeviation() {
updateDeviation(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1895,10 +1937,10 @@ export default {
}
});
},
cancelCbtcRoute() {
cancelCbtcRoute(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1908,10 +1950,10 @@ export default {
}
});
},
setIdAssociated() {
setIdAssociated(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1921,10 +1963,10 @@ export default {
}
});
},
setOccupancyCorrelation() {
setOccupancyCorrelation(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1934,10 +1976,10 @@ export default {
}
});
},
modifyTrainNumber() {
modifyTrainNumber(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1947,10 +1989,10 @@ export default {
}
});
},
setRunType() {
setRunType(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1960,10 +2002,10 @@ export default {
}
});
},
showTrainDetail() {
showTrainDetail(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -1973,10 +2015,10 @@ export default {
}
});
},
showAllTrainDetail() {
showAllTrainDetail(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1986,10 +2028,10 @@ export default {
}
});
},
showRouteDetail() {
showRouteDetail(item) {
const operate = {
type: 'bar',
operation: ''
operation: item.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {

View File

@ -1,48 +1,50 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table
ref="singleTable"
:data="filterSignalList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="status" label="信号机封锁状态">
<template slot-scope="scope">
<span>{{ getSignalStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'lock') }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="解除封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'unlock') }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(true)">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(false)">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<signal-block ref="signalBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
<div>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table
ref="singleTable"
:data="filterSignalList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="status" label="信号机封锁状态">
<template slot-scope="scope">
<span>{{ getSignalStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'lock') }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="解除封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'unlock') }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(true)">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(false)">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
<signal-block ref="signalBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</div>
</template>
<script>

View File

@ -1,44 +1,46 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table
ref="singleTable"
:data="signalList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="blockStatus" label="允许锁闭">
<template slot-scope="scope">
<span>{{ getSignalBlock(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="同意取消"></el-table-column>
<el-table-column prop="unblockProcess" label="取消进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<signal-can-block ref="signalCanBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
<div>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table
ref="singleTable"
:data="signalList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="blockStatus" label="允许锁闭">
<template slot-scope="scope">
<span>{{ getSignalBlock(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="同意取消"></el-table-column>
<el-table-column prop="unblockProcess" label="取消进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
<signal-can-block ref="signalCanBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</div>
</template>
<script>

View File

@ -122,21 +122,21 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit(isClose = false) {
// const operate = {
// cmdType: this.command ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK,
// operation: this.command ? OperationEvent.Signal.lock.confirm1.operation : OperationEvent.Signal.unlock.confirm1.operation,
// over: true,
// param: {signalCode: this.selected.code}
// };
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// if (valid) {
// isClose && this.doClose();
// this.$emit('commandSuccess', this.selected.code);
// }
// }).catch(() => {
// isClose && this.doClose();
// this.$refs.noticeInfo.doShow();
// });
const operate = {
cmdType: this.command ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK,
operation: this.command ? OperationEvent.Signal.lock.confirm1.operation : OperationEvent.Signal.unlock.confirm1.operation,
over: true,
param: {signalCode: this.selected.code}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
isClose && this.doClose();
this.$emit('commandSuccess', this.selected.code);
}
}).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow();
});
},
handleCurrentChange(val) {
this.$refs.singleTable.setCurrentRow(this.selected);

View File

@ -8,6 +8,7 @@
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="foshan-01__systerm" />
</div>
</template>
@ -25,6 +26,8 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default {
name: 'SectionMenu',
@ -36,7 +39,8 @@ export default {
AlxeEffective,
NoticeInfo,
TrainAddPlan,
SetFault
SetFault,
LoadSpareTrain
},
props: {
selected: {
@ -110,6 +114,11 @@ export default {
label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '设置备用车',
handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
}
]
};
@ -268,7 +277,15 @@ export default {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
}
},
//
loadSpare() {
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
if (valid) {
this.$refs.loadSpareTrain.doShow(operate, this.selected);
}
});
}
}
};
</script>

File diff suppressed because it is too large Load Diff

View File

@ -390,7 +390,7 @@ export default {
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET;
operate.cmdType = CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });

View File

@ -81,7 +81,7 @@ export default {
{
label: '计轴预复位',
handler: this.axlePreReset,
cmdType:CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
cmdType:CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET
},
{
label: '区段切除',

View File

@ -545,7 +545,7 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Axis_Pre_Reset',
operateType: 'Switch_Axle_Pre_Reset',
skinCode: '02',
trainingName: '道岔区段计轴预复位({7})',
trainingRemark: '道岔区段计轴预复位功能',

View File

@ -47,7 +47,7 @@
<el-row style="margin-top: 30px; height: 40px;">
<el-col :span="20" :offset="4">
<el-form-item label-width="140px" label="默认停站时间" prop="defaultDwellTime">
<el-input v-model="addModel.defaultDwellTime" style="width: 50px; position: absolute;left: 40px;" />
<el-input v-model="addModel.defaultDwellTime" :disabled="addModel.mode === '2'" style="width: 50px; position: absolute;left: 40px;" />
</el-form-item>
</el-col>
</el-row>
@ -55,14 +55,14 @@
<el-row>
<el-col :span="20" :offset="4">
<el-form-item label-width="140px" label="最小停站时间" prop="minimumDwell">
<el-input v-model="addModel.minimumDwell" style="width: 50px;position: absolute;left: 40px;" />
<el-input v-model="addModel.minimumDwell" :disabled="addModel.mode === '1'" style="width: 50px;position: absolute;left: 40px;" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20" :offset="4">
<el-form-item label-width="140px" label="最大停站时间" prop="maximumDwell">
<el-input v-model="addModel.maximumDwell" style="width: 50px;position: absolute;left: 40px;" />
<el-input v-model="addModel.maximumDwell" :disabled="addModel.mode === '1'" style="width: 50px;position: absolute;left: 40px;" />
</el-form-item>
</el-col>
</el-row>

View File

@ -182,8 +182,8 @@ export default {
initMenu() {
//
if (this.selected.type != '04') {
// this.menu = this.menuNormal.Center;
this.menu = MenuContextHandler.covert2(this.menuNormal);
// this.menu = this.menuNormal.Center;
this.menu = MenuContextHandler.covert2(this.menuNormal);
} else {
this.menu = [];
}

View File

@ -354,6 +354,13 @@ export default {
});
if (strategy) {
commitOperate(menuOperate.StationControl.setBackStrategy, {stationCode: this.selected.code, id:strategy.id}, 3).then(({valid, operate})=>{
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: type},
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY,
param: {stationCodes:[this.selected.code]}
});
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
@ -363,7 +370,7 @@ export default {
},
setStationControl() {
//
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.selected.code]}, 0).then(({valid, operate})=>{
commitOperate(menuOperate.StationControl.requestStationControl, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
@ -377,7 +384,7 @@ export default {
},
setCenterControl() {
//
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.selected.code]}, 0).then(({valid, operate})=>{
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
@ -391,7 +398,7 @@ export default {
},
setEmergencyControl() {
//
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.selected.code]}, 0).then(({valid, operate})=>{
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {

View File

@ -1,10 +1,12 @@
import store from '@/store/index';
import {createTransform, createBoundingRect} from './utils/parser';
class TransformHandle {
constructor(painter) {
this.$painter = painter;
this.stationFlag = false;
this.parentLevel = painter.getParentLevel();
this.rect = { x: 0, y: 0, width: 0, height: 0 };
@ -25,16 +27,50 @@ class TransformHandle {
}
view.dirty();
}
setStationFlag(stationCode) {
this.stationFlag = !!stationCode;
}
// 视图进行缩放/平移
transformView(view) {
if (view) {
view.transform = this.transform;
if (this.stationFlag) {
this.handleStationShow(view);
}
view.decomposeTransform();
this.revisibleView(view);
}
}
handleStationShow(view) {
if (view.model && view.model._type === 'Station') {
const station = view.model;
this.handleStationViewTransform(view, station);
} else if (view.model && view.model._type === 'StationStand') {
const station = store.getters['map/getDeviceByCode'](view.model.stationCode);
this.handleStationViewTransform(view, station);
} else if (view.model && view.model._type === 'Psd') {
const stand = store.getters['map/getDeviceByCode'](view.model.standCode);
const station = store.getters['map/getDeviceByCode'](stand.stationCode);
this.handleStationViewTransform(view, station);
} else if (view.model && view.model._type === 'Train' && view.model.sectionModel) {
const belongStation = view.model.sectionModel.belongStation;
const station = store.getters['map/getDeviceByCode'](belongStation);
this.handleStationViewTransform(view, station);
} else if (view.model && (view.model.belongStation || view.model.belongStationCode)) {
const belongStation = view.model.belongStation || view.model.belongStationCode;
const station = store.getters['map/getDeviceByCode'](belongStation);
this.handleStationViewTransform(view, station);
}
}
handleStationViewTransform(view, station) {
if (station.foldLine) {
view.transform = createTransform({
scaleRate: this.$painter.$jmap.$options.scaleRate,
offsetX: this.$painter.$jmap.$options.offsetX + station.foldLineOffset.x * this.$painter.$jmap.$options.scaleRate,
offsetY: this.$painter.$jmap.$options.offsetY - station.foldLineOffset.y * this.$painter.$jmap.$options.scaleRate
});
}
}
// 处理所有视图缩放/平移
transformAll() {
this.traverse(this.transformView, this);

View File

@ -14,6 +14,7 @@ import FaviconCrsc from '@/assets/icon/favicon_crsc.png';
import FaviconNty from '@/assets/icon/favicon_nty.png';
import FaviconBjd from '@/assets/icon/favicon_bjd.png';
import FaviconSdy from '@/assets/icon/favicon_jdy.png';
import FaviconCgy from '@/assets/icon/favicon_cgy.png';
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
import Link_Crsc from '@/assets/icon/link_crsc.png';
import Link_Hls from '@/assets/icon/link_hls.png';
@ -190,6 +191,24 @@ export const loginInfo = {
navigationMarginLeft: '60px',
systemType: '014'
},
cgy: {
title: '成都工业职业技术学院轨道交通虚拟仿真实训平台',
loginPath: '/login?project=cgy',
loginParam: 'CGY',
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemType: '011'
},
designcgy: {
title: '成都工业职业技术学院轨道交通虚拟仿真设计平台',
loginPath: '/design/login?project=cgy',
loginParam: 'CGY',
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemTYpe: '011'
},
heb: {
title: '城市轨道交通综合行车模拟仿真系统V1.0',
loginTitle: '城市轨道交通综合行车模拟仿真系统V1.0',
@ -422,7 +441,9 @@ export const ProjectIcon = {
bjd: FaviconBjd,
designbjd: FaviconBjd,
sdy: FaviconSdy,
designsdy: FaviconSdy
designsdy: FaviconSdy,
cgy: FaviconCgy,
designcgy: FaviconCgy
};
export const ProjectCode = {
@ -447,15 +468,17 @@ export const ProjectCode = {
bjd: 'BJD',
designbjd: 'BJD',
sdy: 'SDY',
designsdy: 'SDY'
designsdy: 'SDY',
cgy: 'CGY',
designcgy: 'CGY'
};
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd']; // 实训设计平台通过项目code获取地图列表的项目
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl']; // 登录页样式
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy']; // 登录页样式
export const NoQrcodeList = ['heb', 'designheb'];
export const NoSimulationQrCodeList = ['heb', 'bjd'];
export const goOtherPlatformMenu = { // 导航栏快速切换平台
@ -490,7 +513,9 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
ntyl: '/design/login?project=ntyl',
designntyl: '/login?project=ntyl',
ntyc: '/design/login?project=ntyc',
designntyc: '/login?project=ntyc'
designntyc: '/login?project=ntyc',
cgy: '/design/login?project=cgy',
designcgy: '/login?project=cgy'
};
export const ProjectList = [
{value:'xty', label:'西铁院'},
@ -503,7 +528,8 @@ export const ProjectList = [
{value: 'ntyl', label: '南铁院(本地版)'},
{value: 'bjd', label: '北交大'},
{value: 'urtss', label: '陪标项目'},
{value: 'sdy', label: '苏电院'}
{value: 'sdy', label: '苏电院'},
{value: 'cgy', label: '成都工业'}
];
export const localPackageProject = {
localdesign: 'designheb',

View File

@ -17,7 +17,7 @@ export default {
/** 取消临时限速 */
CMD_SWITCH_CANCEL_LIMIT_SPEED: {value:'Switch_Cancel_Limit_Speed', label: '取消临时限速'},
/** 计轴预复位 */
CMD_SWITCH_AXIS_PRE_RESET: {value:'Switch_Axis_Pre_Reset', label: '计轴预复位'},
CMD_SWITCH_AXLE_PRE_RESET: {value:'Switch_Axle_Pre_Reset', label: '计轴预复位'},
/** 故障解锁 */
CMD_SWITCH_FAULT_UNLOCK: {value:'Switch_Fault_Unlock', label: '故障解锁'},
/** 强解道岔*/
@ -37,7 +37,9 @@ export default {
/** 道岔区段解封 */
CMD_SWITCH_SECTION_UNBLOCK: {value: 'Switch_Section_Unblock', label: '道岔区段解封'},
/** 道岔钩锁 **/
CMD_SWITCH_HOOK_LOCK:{value:'Switch_Hook_Lock', label:'道岔钩锁'}
CMD_SWITCH_HOOK_LOCK:{value:'Switch_Hook_Lock', label:'道岔钩锁'},
/** 挤岔恢复 */
CMD_SWITCH_SQUEEZE_RECOVERY: {value: 'Switch_Squeeze_Recovery', label: '挤岔恢复'}
},
// 控制模式操作

View File

@ -39,7 +39,8 @@ export const deviceFaultType = {
{label: '失表', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'},
{label: '挤岔', value: 'SQUEEZE'}
{label: '挤岔', value: 'SQUEEZE'},
{label: '计轴故障', value: 'AXLE_FAULT'}
// {label: '道岔区段计轴故障', value: 'AXLE_FAULT'}
],
StationStand: [

View File

@ -65,11 +65,11 @@ class Handler {
}
getCommand(operation) {
let command = null;
let command = null;
if (operation.cmdType) {
const cmdType = operation.cmdType;
const wholeParam = this.getWholeParam();
command = CommandHandler.getCommand(cmdType, wholeParam);
command = CommandHandler.getCommand(cmdType, wholeParam);
if (command && command.isError) {
this.operations.pop();
command = null;

View File

@ -60,8 +60,8 @@ class MenuContextHandler {
return result;
}
covert2(menuList) {
const selected = this.getCurrentStateObject();
covert2(menuList) {
const selected = this.getCurrentStateObject();
let menu = [];
const control = this.getStationControl(selected);
if (control && !store.state.scriptRecord.audioPlay) {
@ -77,10 +77,21 @@ class MenuContextHandler {
menu = [];
}
}
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.children && elem.children.length > 0) {
elem.children.forEach(each=>{
this.covertEachCommand(each, type, selected, status, false);
});
} else {
this.covertEachCommand(elem, type, selected, status, false);
}
});
}
}
}
return menu;
}
}
covert(menuList) {
const selected = this.getCurrentStateObject();
@ -115,7 +126,7 @@ class MenuContextHandler {
return menu;
}
covertEachCommand(elem, type, selected, status) {
covertEachCommand(elem, type, selected, status, isSettingCommand = true) {
if (elem.type === 'separator') {
elem.show = true;
return;
@ -132,7 +143,9 @@ class MenuContextHandler {
elem.disabled = true;
}
} else {
elem.show = false;
if (isSettingCommand) {
elem.show = false;
}
}
}

View File

@ -235,6 +235,7 @@ export const OperationEvent = {
domId: '_Tips-commandHaerbin-confirmCr2{BOTTOM}'
}
},
// 西安
commandXian: {
confirm: {
operation: '009',
@ -248,6 +249,144 @@ export const OperationEvent = {
operation: '0092',
domId: '_Tips-commandXian-requestBar{TOP}'
}
},
// 宁波三
commandNingBo: {
// 线路
line: {
operation: '00a',
domId: '_Tips-ningBo-line{TOP}'
},
// 站台
line_stand: {
operation: '00a0',
domId: '_Tips-ningBo-line-stand{TOP}'
},
// 开放或关闭
line_stand_openOrClose: {
operation: '00a01',
domId: '_Tips-ningBo-line-stand-openOrClose{TOP}'
},
// 设置或取消扣车
line_stand_holdOrNot: {
operation: '00a02',
domId: '_Tips-ningBo-line_stand_holdOrNote{TOP}'
},
// 设置站间列车数量
line_stand_trainNum: {
operation: '00a03',
domId: '_Tips-ningBo-line_stand_trainNum{TOP}'
},
// 设置站间停站时间
line_stand_stopTime: {
operation: '00a04',
domId: '_Tips-ningBo-line_stand_stopTime{TOP}'
},
// 授权转移
line_stand_transfer: {
operation: '00a05',
domId: '_Tips-ningBo-line_stand_transfer{TOP}'
},
// 显示
line_stand_detail: {
operation: '00a06',
domId: '_Tips-ningBo-line_stand_detail{TOP}'
},
// 道岔
line_switch: {
operation: '00a1',
domId: '_Tips-ningBo-line-switch{TOP}'
},
// 命令
line_switch_cmd: {
operation: '00a11',
domId: '_Tips-ningBo-line-switch-cmd{TOP}'
},
// 封锁
line_switch_block: {
operation: '00a12',
domId: '_Tips-ningBo-line-switch-block{TOP}'
},
// 解除封锁
line_switch_unblock: {
operation: '00a13',
domId: '_Tips-ningBo-line-switch-unblock{TOP}'
},
// 请求动岔/请求/授权
line_switch_empower: {
operation: '00a14',
domId: '_Tips-ningBo-line-switch-empower{TOP}'
},
// 显示
line_switch_detail: {
operation: '00a15',
domId: '_Tips-ningBo-line-switch-detail{TOP}'
},
// 信号机
line_signal: {
operation: '00a2',
domId: '_Tips-ningBo-line-signal{TOP}'
},
// 引导
line_signal_guide: {
operation: '00a21',
domId: '_Tips-ningBo-line-signal-guide{TOP}'
},
// 取消允许锁闭
line_signal_lockOrNot: {
operation: '00a22',
domId: '_Tips-ningBo-line-signal-lockOrNot{TOP}'
},
// 进路
line_signal_cmd: {
operation: '00a23',
domId: '_Tips-ningBo-line-signal-cmd{TOP}'
},
// 信号指示模式
line_signal_indicator: {
operation: '00a24',
domId: '_Tips-ningBo-line-signal-indicator{TOP}'
},
// 封锁
line_signal_block: {
operation: '00a25',
domId: '_Tips-ningBo-line-signal-block{TOP}'
},
// 解封
line_signal_unblock: {
operation: '00a26',
domId: '_Tips-ningBo-line-signal-unblock{TOP}'
},
// 显示
line_signal_detail: {
operation: '00a27',
domId: '_Tips-ningBo-line-signal-detail{TOP}'
},
// 轨道
line_section: {
operation: '00a3',
domId: '_Tips-ningBo-line-section{TOP}'
},
// 开放
line_section_open: {
operation: '00a31',
domId: '_Tips-ningBo-line-section-open{TOP}'
},
// 关闭
line_section_close: {
operation: '00a32',
domId: '_Tips-ningBo-line-section-close{TOP}'
},
// 临时限速
line_section_limitSpeed: {
operation: '00a33',
domId: '_Tips-ningBo-line-section-limitSpeed{TOP}'
},
// 显示
line_section_detail: {
operation: '00a34',
domId: '_Tips-ningBo-line-section-detail{TOP}'
}
}
},
// 站台概要表
@ -507,6 +646,10 @@ export const OperationEvent = {
stop: {
operation: '1105',
domId: '_Tips-Switch-AxlePreReset-Stop'
},
menuButton: {
operation: '1106',
domId: '_Tips-Switch-AxlePreReset-MenuButton'
}
},
// 切除
@ -2553,29 +2696,29 @@ export const OperationEvent = {
// 取消故障
cancelStoppage: {
menu: {
operation: '2995',
domId: '_Tips-CancelStoppage-Menu{TOP}'
operation: '2995',
domId: '_Tips-CancelStoppage-Menu{TOP}'
}
},
// 道岔故障
stoppage: {
menu: {
operation: '2996',
domId: '_Tips-Stoppage-Menu{TOP}'
operation: '2996',
domId: '_Tips-Stoppage-Menu{TOP}'
}
},
// 设置托管
collocation: {
menu: {
operation: '2997',
domId: '_Tips-Collocation-Menu{TOP}'
operation: '2997',
domId: '_Tips-Collocation-Menu{TOP}'
}
},
// 设置连挂
setLink: {
menu: {
operation: '2998',
domId: '_Tips-SetLink-Menu{TOP}'
operation: '2998',
domId: '_Tips-SetLink-Menu{TOP}'
}
},
/** 控制模式操作 */

View File

@ -208,10 +208,11 @@ export default {
}, 3000);
});
},
async prdChoose(queryData) {
this.trainingTypeMap = {};
const lineCode = this.$route.query.lineCode;
const res = await getCmdList(lineCode, {prdType:queryData.prdType});
async prdChoose(form) {
this.trainingTypeMap = {};
const lineCode = this.$route.query.lineCode;
const res = await getCmdList(lineCode, {prdType:form.prdType});
const trainingOperateList = [];
const trainingOperateConfigList = [];
const operateTypeMap = {
@ -224,7 +225,13 @@ export default {
LimitControl: [],
TrainWindow: [],
Driver: []
};
};
form.type = '';
form.operateType = '';
this.queryForm.queryObject.type.config.data = [];
this.queryForm.queryObject.operateType.config.data = [];
if (res && res.code === 200) {
res.data.forEach(item => {
if (this.trainingOperateTypeMap[item.operateObject]) {
@ -240,8 +247,9 @@ export default {
trainingOperateConfigList.push({value: item.operateObject, label: Cookies.get('user_lang') == 'en' ? objectLabel.enlabel : objectLabel.label});
}
});
this.queryForm.queryObject.type.config.data = trainingOperateConfigList;
this.trainingTypeList = trainingOperateConfigList;
this.queryForm.queryObject.type.config.data = trainingOperateConfigList;
this.trainingTypeList = trainingOperateConfigList;
this.trainingTypeMap = operateTypeMap;
} else {
this.$message.error(this.$t('error.failedToObtainTrainingType'));
@ -249,7 +257,7 @@ export default {
},
typeChoose(form) {
this.queryForm.queryObject.operateType.config.data = [];
form.operateType = '';
form.operateType = '';
if (form && form.type && this.trainingTypeMap[form.type]) {
this.trainingTypeMap[form.type].forEach(elem => {
this.queryForm.queryObject.operateType.config.data.push({ value: elem.value, label: elem.label });

View File

@ -37,7 +37,7 @@ export default {
-ms-user-select: none;
user-select: none;
position: absolute;
z-index: 36;
z-index: 38;
top: 0px;
right: 0px;
background: white;

View File

@ -73,7 +73,7 @@ export default {
-ms-user-select: none;
user-select: none;
position: absolute;
z-index: 36;
z-index: 38;
top: 0px;
right: 0px;
background: white;

View File

@ -134,7 +134,7 @@ export default {
if (!this.isScheduling) {
this.changeOperateMode();
}
});
});
},
methods: {
loadRunData() {

View File

@ -6,6 +6,8 @@
<script>
import { mapGetters } from 'vuex';
import { assignUsersPlayRoles } from '@/api/jointSimulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name:'SelectStation',
props:{
@ -55,7 +57,17 @@ export default {
});
this.switchStationMode( this.showMemberId);
}
},
},
mounted() {
EventBus.$on('switchStationMode', (stationCode) => {
this.$store.state.training.memberList.filter(el => el.type == 'STATION_SUPERVISOR').find(el => {
if (el.deviceCode == stationCode) {
this.oldShowMemberId = el.id;
this.switchStationMode(el.id)
}
})
})
},
methods:{
switchStationMode(val) {
assignUsersPlayRoles([{ userId: this.$store.state.user.id, memberId: val}], this.$route.query.group).then(resp => {

View File

@ -139,10 +139,14 @@ export default {
} else if (em.subType == 'enabled' && em.deviceType == 'Switch') {
menu = getDeviceMenuByDeviceType('Enabled');
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right};
return;
} else if (em.subType === 'enabled' && em.deviceType === 'Signal') {
menu = getDeviceMenuByDeviceType('Enabled');
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu});
device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right};
return;
} else if (em.deviceCode && !this.isScreen) {
device = this.getDeviceByEm(em);

View File

@ -461,7 +461,6 @@ export default {
this.$refs['dataform'].validate((valid) => {
if (valid) {
const data = Object.assign({_type: this.editModel.type}, this.editModel);
console.log(data, '=====');
this.$emit('updateMapModel', data);
this.field = '';
}

View File

@ -1,7 +1,7 @@
<template>
<div class="view-control">
<div class="content-box">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="批量设置集中站" name="first">
<div class="select-box">
<el-select v-model="stationCode" filterable size="mini">
@ -35,7 +35,7 @@
</div>
</el-tab-pane>
</el-tabs>
<div v-for="item in showList" :key="item.type" class="content-box-list" style="margin-top: 10px;">
<div v-for="item in modelList" :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)">
@ -69,7 +69,6 @@ export default {
stationCode: '',
belongStationCode: '',
activeName: 'first',
showList: [],
modelList: [
{
type: 'Section',
@ -86,13 +85,6 @@ export default {
name: '信号机列表',
list: []
}
],
modelSignalList: [
{
type: 'Signal',
name: '信号机列表',
list: []
}
]
};
},
@ -116,13 +108,6 @@ 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';
@ -137,7 +122,6 @@ 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++;
@ -149,15 +133,12 @@ export default {
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) {
@ -196,23 +177,35 @@ export default {
}
},
handleBelongStationCode() {
if (this.belongStationCode && this.modelSignalList[0].list.length) {
if (this.belongStationCode && this.seclectDeviceList && this.seclectDeviceList.length > 0) {
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.modelList.forEach(model => { //
model.list.forEach(item => {
const Model = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item.code));
if (Model._type == 'Section') {
Model.belongStation = this.belongStationCode;
} else {
Model.belongStationCode = this.belongStationCode;
}
if (Model._type == 'Section' && Model.logicSectionCodeList && Model.logicSectionCodeList.length) {
Model.logicSectionCodeList.forEach(children => {
const ModelChild = deepAssign({}, this.$store.getters['map/getDeviceByCode'](children));
ModelChild.belongStation = this.belongStationCode;
models.push(ModelChild);
});
}
models.push(Model);
});
});
this.$emit('updateMapModel', models);
this.$message.success('设置所属车站成功!');
this.belongStationCode = '';
this.$message.success('设置所属车站成功');
this.stationCode = '';
}
},
clearList() { //
this.stationCode = '';
this.belongStationCode = '';
this.$store.commit('map/setSeclectDeviceList', []);
this.showList = [];
this.modelList = [
{
type: 'Section',
@ -230,13 +223,6 @@ export default {
list: []
}
];
this.modelSignalList = [
{
type: 'Signal',
name: '信号机列表',
list: []
}
];
},
mouseenter(model) {
if (model._type == 'Section') {

View File

@ -102,6 +102,7 @@ class Model {
this.sectionBCode = '';
this.sectionCCode = '';
this.tp = { x: 0, y: 0 };
this.belongStationCode = '';
}
StationModel() {
this._type = 'Station';
@ -140,6 +141,8 @@ class Model {
this.createTurnBack = false;
// this.turnBackPoint = {x: 0, y: 0}; // 按图折返坐标
this.controlModePoint = { x: 0, y: 0 }; // 控制模式坐标
this.foldLine = false; // 现地显示是否折行
this.foldLineOffset = { x: 0, y: 0 }; // 折行显示偏移
}
StationStandModel() {
this._type = 'StationStand';

View File

@ -205,13 +205,14 @@ export default {
name: this.$t('map.mapData'),
item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isStationCodeDisabled },
{ prop: 'belongStation', label: '所属车站:', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, isHidden: !this.editModel.standTrack && !this.editModel.reentryTrack && !this.editModel.transferTrack },
{ prop: 'belongStation', label: '所属车站:', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', options: this.stationList},
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), disabled: this.isStationCodeDisabled, isHidden: !this.isSwitchSectionType || !this.isCrossSectionType, button:true, clickFunction: this.divideLength, buttonText: '均分长度' },
{ prop: 'logicLengthList', label: '逻辑区段实际长度:', type: 'lengthFact', isHidden: !this.isHasLogicPhysicalSection, mergeLength: this.mergeLength, width: '160px'},
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, //
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, //
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow || !this.isCrossSectionType }
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow }
// || !this.isCrossSectionType
]
}
}
@ -227,6 +228,13 @@ export default {
callback();
}
};
var validateBelongStation = (rule, value, callback) => {
if ((this.editModel.transferTrack || this.editModel.reentryTrack || this.editModel.standTrack) && !value) {
callback(new Error( '请选择所属车站' ));
} else {
callback();
}
};
const rules = {
code: [
{ required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
@ -262,7 +270,7 @@ export default {
{ required: true, message: this.$t('rules.sectionRelSwitchCode'), trigger: 'change' }
],
belongStation: [
{ required: true, message: '请选择所属车站', trigger: 'change' }
{ validator: validateBelongStation, trigger: 'change' }
],
leftSectionCode: [
{ validator: validateAssociatedSection, trigger: 'change' }
@ -543,7 +551,6 @@ export default {
this.$message('还有属性未填写,修改未生效!');
this.$emit('deviceSelect', '');
}
// debugger;
});
},
handleRelevanceStand(model) { //
@ -569,6 +576,7 @@ export default {
if (section.parentCode == model.code && section.type == '02') { //
const copySection = deepAssign({}, section);
copySection.stationCode = model.stationCode; //
copySection.belongStation = model.belongStation;
copySection.lengthFact = logicLengthMap[copySection.code];
if (this.checkPointsCoincide(this.oldPoint[0], copySection.points[0])) {
copySection.points[0] = model.points[0];

View File

@ -217,7 +217,12 @@ export default {
{ prop: 'relStationCodeList', label: '联锁站关联车站:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.relStationList, isHidden: !this.idCiStation},
{ prop: 'routingStationList', label: '生成交路的车站:', type: 'multiSelectHover', optionLabel: 'name', optionValue: 'code', options: this.stationList, hover: this.hover, buttonType: 'routingStation', buttonShowType: this.routingStationButtonShow },
{ prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' },
{ prop: 'jp', label: '车站简称', type: 'input' }
{ prop: 'jp', label: '车站简称:', type: 'input' },
{ prop: 'foldLine', label: '现地显示是否折行:', type: 'checkbox' },
{ prop: 'foldLineOffset', label: '折行偏移:', type: 'coordinate', width: '120px', isHidden: !this.editModel.foldLine, children: [
{ prop: 'foldLineOffset.x', firstLevel: 'foldLineOffset', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{ prop: 'foldLineOffset.y', firstLevel: 'foldLineOffset', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
] }
]
}
}

View File

@ -56,6 +56,7 @@ export default {
name: this.$t('map.mapData'),
item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList },
{ prop: 'belongStationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'turnTime', label: this.$t('map.turnTime'), type: 'number', min: 0, max: 1000, placeholder: 's' }
]
}

View File

@ -45,7 +45,7 @@ export default {
rules:{
serviceNumber:[
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
{required: true, validator: this.validateServiceNo, trigger: 'change'}
]
}
};
@ -65,18 +65,35 @@ export default {
this.loading = false;
this.dialogShow = false;
},
validateServiceNo(rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请填写服务号'));
} else {
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
if (serviceNumberList.includes(value)) {
// new Error('')
return callback();
} else {
return callback();
}
}
},
validateServiceNumber(rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请填写服务号'));
} else {
const newValue = parseInt(value);
let newValue = parseInt(value);
if (newValue) {
if (newValue.toString() != value) {
this.formModel.serviceNumber = newValue;
if (newValue > 0 & newValue < 9) {
newValue = '00' + newValue;
} else if (newValue > 10 & newValue < 99) {
newValue = '0' + newValue;
}
this.formModel.serviceNumber = newValue;
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
if (serviceNumberList.includes(value)) {
return callback(new Error('该服务号已存在,请重新填写'));
// new Error('')
return callback();
} else {
return callback();
}

View File

@ -54,7 +54,8 @@
</el-select> -->
<!-- </el-col> -->
<el-col :span="3" style="margin-left:10px;height: 28px;line-height: 28px;">
<span>{{ $t('planMonitor.defaultRunLevel') }}</span>
<!-- {{ $t('planMonitor.defaultRunLevel') }} -->
<span>运行等级</span>
</el-col>
<el-col :span="5">
<el-select v-model="defaultSpeedLevel" size="mini" :placeholder="this.$t('global.choose')">

View File

@ -59,7 +59,8 @@ export default {
rules: {
serviceNumber:[
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
// {required: true, validator: this.validateServiceNumber, trigger: 'change'}
{required: true, validator: this.validateServiceNo, trigger: 'change'}
],
beginTime: [
{ required: true, message: '请填写开始时间', trigger: 'blur' }
@ -138,14 +139,17 @@ export default {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请填写服务号'));
} else {
const newValue = parseInt(value);
let newValue = parseInt(value);
if (newValue) {
if (newValue.toString() != value) {
this.formModel.serviceNumber = newValue;
if (newValue > 0 & newValue < 9) {
newValue = '00' + newValue;
} else if (newValue > 10 & newValue < 99) {
newValue = '0' + newValue;
}
this.formModel.serviceNumber = newValue;
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
if (serviceNumberList.includes(value)) {
return callback(new Error('该服务号已存在,请重新填写'));
return callback(new Error('该服务号已存在'));
} else {
return callback();
}
@ -155,6 +159,18 @@ export default {
}
},
validateServiceNo(rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请填写服务号'));
} else {
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
if (serviceNumberList.includes(value)) {
return callback(new Error('该服务号已存在'));
} else {
return callback();
}
}
},
validateRunningRouting(rule, value, callback) {
if (value.trim().length == 0) {
return callback(new Error('请选择环路'));
@ -204,7 +220,7 @@ export default {
this.$store.dispatch('runPlan/refresh');
}).catch(error => {
console.log(error);
this.doClose();
// this.doClose();
this.$messageBox(error.message);
});
});

View File

@ -49,7 +49,7 @@
<span style="margin-left: 10px">{{ formatName(scope.row.startStationCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="startSectionCode" :label="$t('planMonitor.modifying.startSection')">
<el-table-column prop="startSectionCode" :label="$t('planMonitor.modifying.startSection')" width="120">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ formatName(scope.row.startSectionCode) }}</span>
</template>
@ -59,7 +59,7 @@
<span style="margin-left: 10px">{{ formatName(scope.row.endStationCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="endSectionCode" :label="$t('planMonitor.modifying.endSection')">
<el-table-column prop="endSectionCode" :label="$t('planMonitor.modifying.endSection')" width="120">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ formatName(scope.row.endSectionCode) }}</span>
</template>
@ -69,9 +69,10 @@
<span style="margin-left: 10px">{{ scope.row.right?'上行':'下行' }}</span>
</template>
</el-table-column>
<el-table-column prop="distance" :label="$t('planMonitor.modifying.distance')" width="65">
<el-table-column prop="distance" :label="$t('planMonitor.modifying.distance')" width="85">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.distance }}</span>
<!-- <el-input v-model="scope.row.distance" class="input_text_box" /> -->
</template>
</el-table-column>
<div>
@ -104,6 +105,7 @@
</el-table>
</el-row>
<div class="button-group" style="text-align: center; margin-top: 10px;">
<el-button @click="handleStationDistance">更新距离</el-button>
<el-button @click="doClose">关闭</el-button>
<el-button @click="handleStationTime">更新</el-button>
</div>
@ -111,7 +113,7 @@
</template>
<script>
import { formatName } from '@/utils/runPlan';
import { setStationRunning, getMapStationRunUser } from '@/api/runplan';
import { setStationRunning, getMapStationRunUser, updateRunlevelDistance } from '@/api/runplan';
export default {
name: 'ModifyingStationIntervalTime',
@ -150,17 +152,17 @@ export default {
this.$ConstSelect.DirectionCodeList.forEach(elem => {
this.DirectionCodeMap[elem.value] = elem.label;
});
this.stationIntervalData = [];
if (this.$route.query.lineCode) {
getMapStationRunUser(this.$route.query.mapId).then(resp =>{
const list = resp.data.list;
this.stationIntervalData = [];
this.stationIntervalData = list;
this.form.level1 = '';
this.form.level2 = '';
this.form.level3 = '';
this.form.level4 = '';
this.form.level5 = '';
});
}
},
@ -184,8 +186,29 @@ export default {
handleStationTime() {
setStationRunning(this.$route.query.mapId, this.stationIntervalData).then(resp => {
this.$message.success(this.$t('planMonitor.modifying.modifySuccess'));
}).catch(() => {
this.$messageBox(this.$t('planMonitor.modifying.modifyFailed'));
}).catch((error) => {
this.$messageBox(this.$t('planMonitor.modifying.modifyFailed') + ': ' + error.message);
});
},
handleStationDistance() {
updateRunlevelDistance(this.$route.query.mapId).then(resp => {
if (resp.data) {
this.$message.success('更新成功');
const list = resp.data;
const stationIntervalData = [];
this.stationIntervalData.forEach(station=>{
if (list[station.id]) {
const tempStation = Object.assign({}, station);
tempStation.distance = list[station.id];
stationIntervalData.push(tempStation);
}
});
this.stationIntervalData = stationIntervalData;
} else {
this.$messageBox('更新失败:数据为空');
}
}).catch((error) => {
this.$messageBox('更新失败: ' + error.message);
});
},
doShow(params) {

View File

@ -10,12 +10,17 @@
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<!-- <el-row>
<el-col :span="6" :offset="2" style="height: 30px; line-height: 30px;">{{ $t('planMonitor.serviceNumber2')+$t('global.colon') }}</el-col>
<el-col :span="10" :offset="1">
<el-input v-model="serviceNumber" size="mini" maxlength="3" minlength="2" />
</el-col>
</el-row>
</el-row> -->
<el-form ref="form" :rules="rules" :model="formModel" label-width="100px" size="medium" @submit.native.prevent>
<el-form-item prop="serviceNumber" :label="$t('planMonitor.serviceNumber2')+$t('global.colon')" :required="true">
<el-input v-model="formModel.serviceNumber" type="text" size="mini" maxlength="3" minlength="2" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
@ -40,7 +45,15 @@ export default {
return {
dialogShow: false,
loading: false,
serviceNumber: ''
formModel:{
serviceNumber: ''
},
rules:{
serviceNumber:[
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
{required: true, validator: this.validateServiceNo, trigger: 'change'}
]
}
};
},
computed: {
@ -58,37 +71,75 @@ export default {
this.loading = false;
this.dialogShow = false;
},
validateServiceNo(rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请填写服务号'));
} else {
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
if (serviceNumberList.includes(value)) {
// new Error('');
return callback();
} else {
return callback();
}
}
},
validateServiceNumber(rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请填写服务号'));
} else {
let newValue = parseInt(value);
if (newValue) {
if (newValue > 0 & newValue < 9) {
newValue = '00' + newValue;
} else if (newValue > 10 & newValue < 99) {
newValue = '0' + newValue;
}
this.formModel.serviceNumber = newValue;
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
if (serviceNumberList.includes(value)) {
// new Error('')
return callback();
} else {
return callback();
}
} else {
this.formModel.serviceNumber = '';
}
}
},
handleCommit() {
if (this.$route.query.planId || this.loadRunPlanId) {
if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.serviceNumber }).then(resp => {
if (resp.data) {
this.$emit('dispatchDialog', {
name: 'offLine',
params: {
type: 'warning',
operate: 'AddPlanningTrain',
width: 460,
message: this.$t('tip.serviceNumberExistHint')
}
});
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.formModel.serviceNumber }).then(resp => {
if (resp.data) {
this.$emit('dispatchDialog', {
name: 'offLine',
params: {
type: 'warning',
operate: 'AddPlanningTrain',
width: 460,
message: this.$t('tip.serviceNumberExistHint')
}
});
this.doClose();
} else {
this.handleConfirm(true);
}
});
} else {
this.$messageBox('长度在二到三位');
}
this.doClose();
} else {
this.handleConfirm(true);
}
});
// if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
// } else {
// this.$messageBox('');
// }
} else {
this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph'));
}
},
handleConfirm(isNew = false) {
this.doClose();
this.$store.dispatch('runPlan/addserviceNumber', this.serviceNumber);
this.$emit('dispatchDialog', { name: 'editPlanningTrain', params: { serviceNumber: this.serviceNumber, isNew:isNew } });
this.$store.dispatch('runPlan/addserviceNumber', this.formModel.serviceNumber);
this.$emit('dispatchDialog', { name: 'editPlanningTrain', params: { serviceNumber: this.formModel.serviceNumber, isNew:isNew } });
}
}
};

View File

@ -54,7 +54,7 @@
</el-select> -->
<!-- </el-col> -->
<el-col :span="3" style="margin-left:10px;height: 28px;line-height: 28px;">
<span>{{ $t('planMonitor.defaultRunLevel') }}</span>
<span>运行等级</span>
</el-col>
<el-col :span="5">
<el-select v-model="defaultSpeedLevel" size="mini" :placeholder="this.$t('global.choose')">

View File

@ -22,9 +22,7 @@ export default {
return {
dialogVisible: false,
formModel: {
address: '',
name: '',
phone: '',
id: '',
projectCode: ''
},
@ -37,8 +35,6 @@ export default {
labelWidth: '100px',
items: [
{ prop: 'name', label: '名称', type: 'text' },
{ prop: 'phone', label: '电话', type: 'text' },
{ prop: 'address', label: '地址', type: 'text' },
{ prop: 'projectCode', label: '关联项目', type: 'select', options: this.projectListNew}
]
};
@ -50,12 +46,6 @@ export default {
{ required: true, message: '请输入单位名称', trigger: 'blur' },
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
],
phone: [
{ required: true, message: '请输入公司电话', trigger: 'blur' }
],
address:[
{ required: true, message: '请输入公司地址', trigger: 'blur'}
],
projectCode: [
{ required: true, message: '请选择关联项目', trigger: 'change'}
]
@ -75,8 +65,6 @@ export default {
this.formModel = {
id: data.id,
name: data.name,
phone: data.phone,
address: data.address,
projectCode: data.projectCode
};
}
@ -85,9 +73,7 @@ export default {
this.dialogVisible = false;
this.update = false;
this.formModel = {
address: '',
name: '',
phone: '',
id: '',
projectCode: ''
};

View File

@ -40,14 +40,14 @@ export default {
title: '单位名称',
prop: 'name'
},
{
title: '单位电话',
prop: 'phone'
},
{
title: '单位地址',
prop: 'address'
},
// {
// title: '',
// prop: 'phone'
// },
// {
// title: '',
// prop: 'address'
// },
{
title: '关联项目',
prop: 'projectCode',
@ -55,13 +55,13 @@ export default {
columnValue: (row) => { return this.projectMap[row.projectCode]; },
tagType: (row) => { return 'success'; }
},
{
title: '单位管理人员',
prop: 'managerNames',
type: 'tagMore',
columnValue: (row) => { return row.managerNames; },
tagType: (row) => { return 'success'; }
},
// {
// title: '',
// prop: 'managerNames',
// type: 'tagMore',
// columnValue: (row) => { return row.managerNames; },
// tagType: (row) => { return 'success'; }
// },
{
type: 'button',
title: this.$t('global.operate'),

View File

@ -1,5 +1,5 @@
<template>
<el-dialog v-dialogDrag title="绑定单位" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
<el-dialog v-dialogDrag title="绑定单位管理员" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
@ -72,7 +72,7 @@ export default {
this.doClose();
this.$emit('create');
}).catch((error) => {
this.$message.error('绑定单位失败: ' + error.message);
this.$message.error('绑定单位管理员失败: ' + error.message);
});
}
}

View File

@ -27,7 +27,6 @@ export default {
formModel: {
id: '',
name: '',
companyId: '',
roles: []
}
};
@ -38,8 +37,7 @@ export default {
labelWidth: '100px',
items: [
{ prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true },
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true },
{ prop: 'companyId', label: '单位', type: 'select', options: this.companyList, clearable: true }
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true }
]
};
return form;
@ -66,7 +64,6 @@ export default {
this.formModel = {
id: data.id,
name: data.name,
companyId: data.companyId,
roles: data.roles
};
}
@ -91,7 +88,6 @@ export default {
this.formModel = {
id: '',
name: '',
companyId: '',
roles: []
};
this.$refs.dataform.resetForm();

View File

@ -92,7 +92,7 @@ export default {
handleClick: this.handleUserEdit
},
{
name: '绑定单位',
name: '绑定单位管理员',
handleClick: this.handleBind
}
]