Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
93446bb444
@ -6,7 +6,8 @@ class SkinCode extends defaultStyle {
|
||||
super();
|
||||
this.fontFamily = '宋体';
|
||||
this[deviceType.Section] = {
|
||||
elemnetType:['name', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'destinationText', 'line', 'separator', 'speedLimit'],
|
||||
elemnetType:['name', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'destinationText', 'line', 'separator', 'speedLimit'],
|
||||
preAxleIgnoreFault: true,
|
||||
active: {
|
||||
routeColor: false // 进路触发颜色
|
||||
},
|
||||
@ -124,7 +125,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
trainPosition:{
|
||||
display: false // 列车实时位置显示
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Signal] = {
|
||||
|
@ -84,14 +84,14 @@ class SkinCode extends defaultStyle {
|
||||
invadeColor: '#FFFFFF', // 区段侵入颜色
|
||||
spareColor: '#5578B6', // 区段空闲颜色
|
||||
communicationOccupiedColor: 'red', // 区段通信车占用颜色 // 调整 未确定
|
||||
unCommunicationOccupiedColor: '#EF72A7', // 区段非通讯车占用颜色
|
||||
unCommunicationOccupiedColor: '#EF72A7', // 区段非通讯车占用颜色
|
||||
routeLockColor: '#00ff00', // 区段进路锁定颜色
|
||||
faultLockColor: 'white', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
blockColor: '#d659d6', // 区段封锁颜色(淡紫色)
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
invalidColor: '#AC8F40', // 计轴故障颜色
|
||||
invalidColor: '#AC8F40', // 计轴故障颜色
|
||||
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
|
||||
protectiveLockColor: '#03C85C', // 区段保护锁闭 延续保护
|
||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||
|
@ -180,6 +180,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
lamp: {
|
||||
bgShow: false, // 是否被选中
|
||||
logicDisplayNone: true,
|
||||
guidName: 'half', // 默认引导类型
|
||||
borderVariable: false, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
|
@ -543,10 +543,12 @@ class Jlmap {
|
||||
status.atsControl = status.atsControl && elem.atsControl;
|
||||
status.fleetMode = status.fleetMode || elem.fleetMode;
|
||||
status.ciControl = status.ciControl || elem.ciControl;
|
||||
status.lock = status.lock || elem.lock;
|
||||
} else {
|
||||
status.atsControl = elem.atsControl;
|
||||
status.fleetMode = elem.fleetMode;
|
||||
status.ciControl = elem.ciControl;
|
||||
status.lock = elem.lock;
|
||||
}
|
||||
status.canSetCi = status.arc || elem.arc;
|
||||
});
|
||||
|
@ -154,6 +154,10 @@ export default class Section extends Group {
|
||||
|
||||
/** 非通信车占用状态 03*/
|
||||
unCommunicationOccupied() {
|
||||
if (this.style.Section.preAxleIgnoreFault && this.model.preReset) {
|
||||
return ;
|
||||
}
|
||||
|
||||
if (this.line) {
|
||||
this.line.setStyle({
|
||||
stroke: this.style.Section.line.unCommunicationOccupiedColor,
|
||||
@ -170,6 +174,10 @@ export default class Section extends Group {
|
||||
}
|
||||
/** ARB故障 */
|
||||
invalid() {
|
||||
if (this.style.Section.preAxleIgnoreFault && this.model.preReset) {
|
||||
return ;
|
||||
}
|
||||
|
||||
this.line && this.line.setStyle({
|
||||
stroke: this.style.Section.line.invalidColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
@ -292,7 +300,7 @@ export default class Section extends Group {
|
||||
if (this.style.Section.sectionMiddle && this.style.Section.sectionMiddle.preResetColor && !blockade) { // 南京二号线
|
||||
this.sectionMiddle.setStyle({stroke: this.style.Section.sectionMiddle.preResetColor});
|
||||
this.sectionMiddle.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
// 延时解锁
|
||||
delayUnlock() {
|
||||
@ -356,13 +364,13 @@ export default class Section extends Group {
|
||||
setState(model, flag = false) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
this.handleSwitchSection(model, flag);
|
||||
this.handleSwitchSection(model, flag);
|
||||
// 顺序代表优先级
|
||||
/** 道岔保护区段锁闭 */
|
||||
model.overlapLock && this.protectiveLock(model.lockRight);
|
||||
/** 空闲锁闭或者叫进路锁闭 */
|
||||
model.routeLock && this.routeLock(model.lockRight);
|
||||
/** 计轴故障 */
|
||||
/** 计轴故障 */
|
||||
model.invalid && this.invalid();
|
||||
/** 轨道封锁 */
|
||||
model.blockade && this.block(model.routeLock);
|
||||
|
@ -299,7 +299,7 @@ export default {
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.SetFault, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -144,7 +144,7 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
...mapGetters('training', [
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
@ -152,7 +152,7 @@ export default {
|
||||
'routeData',
|
||||
'signalList',
|
||||
'autoReentryList',
|
||||
'autoReentryData',
|
||||
'autoReentryData'
|
||||
]),
|
||||
Switch() {
|
||||
return OperationEvent.Switch;
|
||||
@ -236,12 +236,20 @@ export default {
|
||||
cmdType:this.cmdType,
|
||||
param: data.param
|
||||
};
|
||||
|
||||
} else if (data.nextCmdType) {
|
||||
operate = {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
cmdType:data.nextCmdType
|
||||
};
|
||||
} else {
|
||||
operate = {
|
||||
operation: data.operateNext
|
||||
};
|
||||
}
|
||||
this.trainingOperation(operate);
|
||||
|
||||
},
|
||||
checkCancel() {
|
||||
Handler.clear(); // 清空操作组
|
||||
@ -333,7 +341,7 @@ export default {
|
||||
const operate = {
|
||||
operation: this.$store.state.menuOperation.buttonOperation
|
||||
};
|
||||
let isArrangementRoute = false;
|
||||
let isArrangementRoute = false;
|
||||
if (deviceList.length === 1) {
|
||||
const signal = deviceList[0];
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](signal.sectionCode);
|
||||
@ -385,52 +393,71 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
//
|
||||
handelFunctionButton(model, subType) {
|
||||
// debugger;
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: '',
|
||||
param: {}
|
||||
};
|
||||
if (model._type === 'StationStand' && subType === 'StopJumpLamp') {
|
||||
operate.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP;
|
||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||
operate.code = model.code;
|
||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||
operate.code = model.code;
|
||||
} else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp') {
|
||||
operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP;
|
||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||
operate.code = model.code;
|
||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||
operate.code = model.code;
|
||||
} else if (model._type === 'AutoTurnBack' ) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
|
||||
operate.param = {cycleCode: model.cycleCode};
|
||||
operate.code = model.code;
|
||||
} else if (model._type === 'AutomaticRoute') {
|
||||
const route = this.routeData[model.automaticRouteCode];
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO;
|
||||
operate.param = {signalCode: route.startSignalCode};
|
||||
operate.code = model.code;
|
||||
} else if (model._type === 'Station') {
|
||||
switch (subType) {
|
||||
case 'substation':
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
break;
|
||||
case 'center':
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
// operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||
delete operate.over;
|
||||
operate.subType = 'center';
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
break;
|
||||
case 'emergency':
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
// operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
delete operate.over;
|
||||
operate.subType = 'emergency';
|
||||
operate.param = {stationCodes: [model.code]};
|
||||
operate.code = model.code;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
// 判断是否需要 弹窗密码框
|
||||
// const operate = Object.assign({}, operate);
|
||||
if (subType == 'center' || subType == 'emergency') {
|
||||
operate['operateNext'] = operate.operation = this.Command.close.password.operation;
|
||||
if (subType == 'center') {
|
||||
operate['nextCmdType'] = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||
} else {
|
||||
operate['nextCmdType'] = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
}
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.deviceList = [];
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
|
||||
});
|
||||
},
|
||||
handelTotalCancel(model, subType) {
|
||||
@ -460,10 +487,12 @@ export default {
|
||||
} else if (model._type === 'AutoTurnBack') {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK;
|
||||
operate.param = {cycleCode: model.cycleCode, cancelRoute: false};
|
||||
operate.code = model.code;
|
||||
} else if (model._type === 'AutomaticRoute') {
|
||||
const route = this.routeData[model.automaticRouteCode];
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO;
|
||||
operate.param = {signalCode: route.startSignalCode};
|
||||
operate.code = model.code;
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
|
||||
this.deviceList = [];
|
||||
@ -697,8 +726,8 @@ export default {
|
||||
this.clearOperate();
|
||||
}
|
||||
} else {
|
||||
this.clearOperate();
|
||||
this.operatemode != OperateMode.FAULT && this.$message.info('请先切换到站控或紧急站控');
|
||||
this.clearOperate();
|
||||
this.operatemode != OperateMode.FAULT && this.$message.info('请先切换到站控或紧急站控');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,8 @@ 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' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -86,7 +87,8 @@ 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' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 信号机列表
|
||||
@ -155,21 +157,6 @@ export default {
|
||||
{ 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,
|
||||
// skinCode: '04',
|
||||
// trainingName: '引导总锁({3})',
|
||||
// trainingRemark: '进路办理引导总锁',
|
||||
// trainingType: 'Signal',
|
||||
// productTypes: ['01'],
|
||||
// stepVOList: [
|
||||
// { deviceType: '04', orderNum: 1, operateCode: '1190', tip: '鼠标左键点击【引导总锁】' },
|
||||
// { deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
// { deviceType: '04', orderNum: 3, operateCode: '1190', tip: '鼠标左键点击【{5}】', codeType:'GUIDELOCK' }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -892,6 +879,22 @@ export default {
|
||||
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
|
||||
config:{autoCycleBT:true}
|
||||
}
|
||||
/** 暂时不生成实训 */
|
||||
// {
|
||||
// maxDuration: 15,
|
||||
// minDuration: 8,
|
||||
// operateType: CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK.value,
|
||||
// skinCode: '04',
|
||||
// trainingName: '引导总锁({3})',
|
||||
// trainingRemark: '进路办理引导总锁',
|
||||
// trainingType: 'Station',
|
||||
// productTypes: ['01'],
|
||||
// stepVOList: [
|
||||
// { deviceType: '04', orderNum: 1, operateCode: '1190', tip: '鼠标左键点击【引导总锁】' },
|
||||
// { deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
// { deviceType: '04', orderNum: 3, operateCode: '1190', tip: '鼠标左键点击【{5}】', codeType:'GUIDELOCK' }
|
||||
// ]
|
||||
// }
|
||||
|
||||
]
|
||||
};
|
||||
|
@ -28,14 +28,14 @@
|
||||
<el-table-column prop="name" :width="210" :label="this.$t('menu.nextPlatform')" />
|
||||
<el-table-column prop="time" :label="this.$t('menu.intervalRunningTime')">
|
||||
<template slot-scope="scope">
|
||||
<el-select :id="domIdChoose" v-model="scope.row.time" size="mini" @change="timeSelectChange">
|
||||
<el-option
|
||||
v-for="item in timeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select :id="domIdChoose" v-model="scope.row.time" size="mini" @change="timeSelectChange">
|
||||
<el-option
|
||||
v-for="item in timeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="check" :label="this.$t('menu.alwaysEffective')">
|
||||
@ -114,7 +114,6 @@ export default {
|
||||
timeList() {
|
||||
const list = [
|
||||
{ value: 0, label: this.$t('menu.automatic2') }
|
||||
// { value: 1, label: '1' }
|
||||
];
|
||||
for (var i = 60; i <= this.maxRunLevel; i++) {
|
||||
list.push({ value: i, label: `${i}` });
|
||||
@ -130,7 +129,7 @@ export default {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.sortStationList = [];
|
||||
@ -140,7 +139,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
if (!this.sortStationList.length) {
|
||||
getStationList(this.$route.query.mapId).then(resp => {
|
||||
this.sortStationList = resp.data;
|
||||
@ -151,11 +149,12 @@ export default {
|
||||
}
|
||||
},
|
||||
handleTempData(selected) {
|
||||
const tempData = [];
|
||||
const stationIndex = this.sortStationList.findIndex((item) => item.code == selected.stationCode);
|
||||
if (selected.right) {
|
||||
const nextStation = this.sortStationList[stationIndex + 1];
|
||||
const nextStationStand = this.stationStandList.find(stand => stand.stationCode === nextStation.code && stand.right);
|
||||
nextStation && nextStationStand && this.tempData.push({
|
||||
nextStation && nextStationStand && tempData.push({
|
||||
name: `${nextStationStand.name}(${nextStation.name})`,
|
||||
time: selected.runLevelTime ? selected.runLevelTime : 0,
|
||||
check: !!selected.runLevelTimeForever
|
||||
@ -163,12 +162,13 @@ export default {
|
||||
} else {
|
||||
const nextStation = this.sortStationList[stationIndex - 1];
|
||||
const nextStationStand = this.stationStandList.find(stand => stand.stationCode === nextStation.code && !stand.right);
|
||||
nextStation && nextStationStand && this.tempData.push({
|
||||
nextStation && nextStationStand && tempData.push({
|
||||
name: `${nextStationStand.name}(${nextStation.name})`,
|
||||
time: selected.runLevelTime ? selected.runLevelTime : 0,
|
||||
check: !!selected.runLevelTimeForever
|
||||
});
|
||||
}
|
||||
}
|
||||
this.tempData = tempData;
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活窗口,而是第一次显示窗口时,需要初始化窗口数据
|
||||
@ -181,13 +181,15 @@ export default {
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected);
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected);
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function() {
|
||||
setTimeout(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}, 300);
|
||||
});
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
|
@ -443,10 +443,7 @@ export default {
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4043', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 4, operateCode: '4044', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
],
|
||||
config: {
|
||||
sectionTypes: ['02']
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
@ -465,7 +462,10 @@ export default {
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '5' },
|
||||
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
],
|
||||
config: {
|
||||
sectionTypes: ['02']
|
||||
}
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
@ -483,7 +483,10 @@ export default {
|
||||
{ deviceType: '03', orderNum: 4, operateCode: '4083', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '4084', tip: '鼠标左键点击【确认2】按钮', val: '0' },
|
||||
{ deviceType: '03', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
],
|
||||
config: {
|
||||
sectionTypes: ['02']
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -1,370 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
|
||||
<div class="context">
|
||||
<template v-for="(message,index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
return this.$t('menu.accessSetting');
|
||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return this.$t('menu.menuSignal.signalOff');
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
return this.$t('menu.menuSignal.signalReopen');
|
||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
return this.$t('menu.cancelTheWay');
|
||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return this.$t('menu.approachManualControl');
|
||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return this.$t('menu.accessToATSAutomaticControl');
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.setRunLevel');
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
return this.$t('menu.stopTime');
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
return this.$t('menu.setSwitchbackStrategy');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
/** 进路设置*/
|
||||
return OperationEvent.Signal.arrangementRoute.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
/** 信号重开*/
|
||||
return OperationEvent.Signal.reopenSignal.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
/** 取消进路*/
|
||||
return OperationEvent.Signal.cancelTrainRoute.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
return OperationEvent.Signal.humanControl.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交ATS自动控*/
|
||||
return OperationEvent.Signal.atsAutoControl.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
/** 设置运行等级*/
|
||||
return OperationEvent.StationStand.setRunLevel.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
/** 设置停站时间*/
|
||||
return OperationEvent.StationStand.setStopTime.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
/** 进路设置*/
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
this.signalClose();
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
/** 信号重开*/
|
||||
this.reopenSignal();
|
||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
/** 取消进路*/
|
||||
this.cancelTrainRoute();
|
||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
this.humanControl();
|
||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交ATS自动控*/
|
||||
this.atsAutoControl();
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
/** 设置运行等级*/
|
||||
this.setRunLevel();
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
/** 停站时间*/
|
||||
this.setStopTime();
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
this.setBackStrategy();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 进路交ATS自动控
|
||||
atsAutoControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 停站时间
|
||||
setStopTime() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,144 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
message: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return this.$t('menu.menuSection.sectionSetSpeedLimit');
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return this.$t('menu.switchSettingSpeedLimit');
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return OperationEvent.Section.setSpeed.confirm.domId; // 区段设置限速
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId; // 区段取消限速
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId; // 道岔设置限速
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId; // 道岔取消限速
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control-speed .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,126 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm route-unlock-confirm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span>{{ $t('menu.in') }}{{ stationName }}【{{ signalName }}】{{ $t('menu.signalConfirmed') }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'RouteUnlockConfirm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
signalName: '',
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.signalDeblocking');
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.stationName = '';
|
||||
this.signalName = '';
|
||||
if (selected) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.route-unlock-confirm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,419 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="840px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('global.status')" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name" :value="option.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.sectionName')" label-width="100px">
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table :data="tempData" border style="width: 100%" size="mini" highlight-current-row height="200">
|
||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="3">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">
|
||||
{{ $t('menu.release') }}
|
||||
<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">
|
||||
{{ $t('menu.secondConfirm') }}
|
||||
<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { now } from '@/utils/date';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionCmdControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: '',
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: '',
|
||||
sectionName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Section.unlock.menu.operation, name: this.$t('menu.menuSection.sectionUnblock') },
|
||||
{ code: OperationEvent.Section.fault.menu.operation, name: this.$t('menu.menuSection.sectionFaultUnlock') },
|
||||
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: this.$t('menu.menuSection.sectionAxisPreReset') }
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return OperationEvent.Section.unlock.order.domId; // 区段解封
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.order.domId; // 区段故障解锁
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return OperationEvent.Section.axlePreReset.order.domId; // 区段计轴预复位
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return OperationEvent.Section.unlock.confirm1.domId; // 区段解封
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.confirm1.domId; // 区段故障解锁
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return OperationEvent.Section.axlePreReset.confirm1.domId; // 区段计轴预复位
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
return OperationEvent.Section.unlock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
return OperationEvent.Section.fault.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
return OperationEvent.Section.axlePreReset.confirm2.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
return OperationEvent.Section.unlock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
return OperationEvent.Section.fault.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
return OperationEvent.Section.axlePreReset.stop.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionUnblock');
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionFaultUnlock');
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionAxisPreReset');
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.sectionName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.sectionName += section.name;
|
||||
}
|
||||
}
|
||||
this.sectionName += selected.name;
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
this.selected = selected;
|
||||
}
|
||||
|
||||
this.order = 0;
|
||||
this.operation = operate.operation || '';
|
||||
this.dialogShow = true;
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.stpDisabled = true;
|
||||
this.setMessage(this.$t('tip.releaseTip'));
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
command() {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation ||
|
||||
this.operation == OperationEvent.Section.unlock.menu.operation ||
|
||||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
} else {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.order.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.order.operation;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_AXIS_PRE_RESET;
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
setButtonEnable(param) {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
if (param && param.step >= 0) {
|
||||
this.cmdDisabled[param.step] = false;
|
||||
}
|
||||
},
|
||||
setMessage(message) {
|
||||
this.message = message;
|
||||
},
|
||||
writeRecord(param) {
|
||||
this.tempData.push(param);
|
||||
},
|
||||
editRecord(param) {
|
||||
this.tempData.forEach(elem => {
|
||||
if (elem.order == param.order) {
|
||||
for (var prop in param) {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,482 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm switch-cmd-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="840px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.switchName')" label-width="80px">
|
||||
<el-input v-model="switchName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="tempData"
|
||||
class="table"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="3">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
||||
v-show="timeCountCommand>0"
|
||||
>({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
||||
v-show="timeCountConfirm>0"
|
||||
>({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { now } from '@/utils/date';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SwitchCmdControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: '',
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: '',
|
||||
switchName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Switch.unlock.menu.operation, name: this.$t('menu.menuSwitch.switchUnlock') },
|
||||
{ code: OperationEvent.Switch.unblock.menu.operation, name: this.$t('menu.menuSwitch.switchSectionUnblock') },
|
||||
{ code: OperationEvent.Switch.fault.menu.operation, name: this.$t('menu.menuSwitch.switchMalfunctionUnlock') },
|
||||
{ code: OperationEvent.Switch.axlePreReset.menu.operation, name: this.$t('menu.menuSwitch.switchSectionAxisPreReset') }
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
return OperationEvent.Switch.unlock.order.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
return OperationEvent.Switch.unblock.order.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
return OperationEvent.Switch.fault.order.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
return OperationEvent.Switch.axlePreReset.order.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
return OperationEvent.Switch.unlock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
return OperationEvent.Switch.unblock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
return OperationEvent.Switch.fault.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
return OperationEvent.Switch.axlePreReset.confirm1.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
return OperationEvent.Switch.unlock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
return OperationEvent.Switch.unblock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
return OperationEvent.Switch.fault.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
return OperationEvent.Switch.axlePreReset.confirm2.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
return OperationEvent.Switch.unlock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
return OperationEvent.Switch.unblock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
return OperationEvent.Switch.fault.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
return OperationEvent.Switch.axlePreReset.stop.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
return '道岔单解';
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
return '道岔解封';
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
return '道岔故障解锁';
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
return '道岔计轴复位';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.switchName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
this.switchName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
this.selected = selected;
|
||||
}
|
||||
|
||||
this.order = 0;
|
||||
this.operation = operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.stpDisabled = true;
|
||||
this.setMessage(this.$t('tip.releaseTip'));
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
command() {
|
||||
/** 道岔单解/道岔解封/道岔故障解锁/道岔计轴复位*/
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.unblock.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.fault.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.axlePreReset.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
} else {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {
|
||||
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
operate.operation = OperationEvent.Switch.unlock.order.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
operate.operation = OperationEvent.Switch.unblock.order.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
operate.operation = OperationEvent.Switch.fault.order.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
operate.operation = OperationEvent.Switch.axlePreReset.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
operate.operation = OperationEvent.Switch.unlock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
operate.operation = OperationEvent.Switch.fault.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
operate.operation = OperationEvent.Switch.axlePreReset.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {
|
||||
over: true
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
operate.operation = OperationEvent.Switch.fault.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_FAULT_UNLOCK;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET;
|
||||
}
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
operate.operation = OperationEvent.Switch.unlock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
operate.operation = OperationEvent.Switch.unblock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
operate.operation = OperationEvent.Switch.fault.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
operate.operation = OperationEvent.Switch.axlePreReset.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
/** 弹框返回值处理*/
|
||||
},
|
||||
setButtonEnable(param) {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
if (param && param.step >= 0) {
|
||||
this.cmdDisabled[param.step] = false;
|
||||
}
|
||||
},
|
||||
setMessage(message) {
|
||||
this.message = message;
|
||||
},
|
||||
writeRecord(param) {
|
||||
this.tempData.push(param);
|
||||
},
|
||||
editRecord(param) {
|
||||
this.tempData.forEach(elem => {
|
||||
if (elem.order == param.order) {
|
||||
for (var prop in param) {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,365 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
|
||||
<div class="context">
|
||||
<template v-for="(message,index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
return this.$t('menu.accessSetting');
|
||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return this.$t('menu.menuSignal.signalOff');
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
return this.$t('menu.menuSignal.signalReopen');
|
||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
return this.$t('menu.cancelTheWay');
|
||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return this.$t('menu.approachManualControl');
|
||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return this.$t('menu.accessToATSAutomaticControl');
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.setRunLevel');
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
return this.$t('menu.stopTime');
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
return this.$t('menu.setSwitchbackStrategy');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
/** 进路设置*/
|
||||
return OperationEvent.Signal.arrangementRoute.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
/** 信号重开*/
|
||||
return OperationEvent.Signal.reopenSignal.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
/** 取消进路*/
|
||||
return OperationEvent.Signal.cancelTrainRoute.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
return OperationEvent.Signal.humanControl.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交ATS自动控*/
|
||||
return OperationEvent.Signal.atsAutoControl.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
/** 设置运行等级*/
|
||||
return OperationEvent.StationStand.setRunLevel.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
/** 设置停站时间*/
|
||||
return OperationEvent.StationStand.setStopTime.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
/** 进路设置*/
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
this.signalClose();
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
/** 信号重开*/
|
||||
this.reopenSignal();
|
||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
/** 取消进路*/
|
||||
this.cancelTrainRoute();
|
||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
this.humanControl();
|
||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交ATS自动控*/
|
||||
this.atsAutoControl();
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
/** 设置运行等级*/
|
||||
this.setRunLevel();
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
/** 停站时间*/
|
||||
this.setStopTime();
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
this.setBackStrategy();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
|
||||
});
|
||||
},
|
||||
// 进路交ATS自动控
|
||||
atsAutoControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
|
||||
});
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
|
||||
});
|
||||
},
|
||||
// 停站时间
|
||||
setStopTime() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
|
||||
});
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,144 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
message: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return this.$t('menu.menuSection.sectionSetSpeedLimit');
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return this.$t('menu.switchSettingSpeedLimit');
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return OperationEvent.Section.setSpeed.confirm.domId; // 区段设置限速
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId; // 区段取消限速
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId; // 道岔设置限速
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId; // 道岔取消限速
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control-speed .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,126 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm route-unlock-confirm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span>{{ $t('menu.in') }}{{ stationName }}【{{ signalName }}】{{ $t('menu.signalConfirmed') }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'RouteUnlockConfirm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
signalName: '',
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.signalDeblocking');
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.stationName = '';
|
||||
this.signalName = '';
|
||||
if (selected) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.route-unlock-confirm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -119,7 +119,7 @@
|
||||
class="haerbin-01__systerm __menuButton"
|
||||
style="pointer-events: none"
|
||||
title="Dialog"
|
||||
z-index="2008"
|
||||
z-index="2008"
|
||||
:visible.sync="dialogVisible"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
@ -177,10 +177,10 @@
|
||||
class="haerbin-01__systerm __menuButton"
|
||||
style="pointer-events: none"
|
||||
title="IBP"
|
||||
z-index="2008"
|
||||
z-index="2008"
|
||||
:visible.sync="stationDialogVisible"
|
||||
:modal="false"
|
||||
append-to-body
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
width="30%"
|
||||
:before-close="handleStationClose"
|
||||
@ -570,6 +570,7 @@ export default {
|
||||
handleSectionMenu() {
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selectedObj, true);
|
||||
this.oldDevice = this.selectedObj;
|
||||
this.oldClickObj = deepAssign({}, this.selectedObj);
|
||||
|
||||
this.initCentralizedStationList(this.sectionParamList);
|
||||
@ -712,14 +713,14 @@ export default {
|
||||
}
|
||||
},
|
||||
clickCommand(row, index) {
|
||||
const step = {};
|
||||
const step = {};
|
||||
|
||||
this.rightClickDialogVisible = false;
|
||||
this.paramIndex = row.next ? index : -1;
|
||||
|
||||
if (row.commandTip) {
|
||||
EventBus.$emit('sendMsg', {message: row.name});
|
||||
}
|
||||
}
|
||||
|
||||
if (this.tempData.length) {
|
||||
this.operate = row.operate.operation;
|
||||
@ -729,7 +730,7 @@ export default {
|
||||
if (row.param) {
|
||||
this.param = row.param;
|
||||
}
|
||||
step.param = this.param;
|
||||
step.param = this.param;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.checkConfirmParam();
|
||||
@ -1014,10 +1015,10 @@ export default {
|
||||
{ name: '解封区段', commandTip: '允许通过该轨道区段排列进路', 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: (stationControl) => !this.modeMatch},
|
||||
{ name: '岔区消限', commandTip: '取消对道岔区段的限速',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_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch},
|
||||
{ name: '岔区消限', commandTip: '取消对道岔区段的限速', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '转换道岔', commandTip: '转换道岔', cmdType: CMD.Switch.CMD_SWITCH_TURN, operate: OperationEvent.Switch.turnout.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强行转岔', commandTip: '强制操作道岔',cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN, operate: OperationEvent.Switch.turnoutForce.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强行转岔', commandTip: '强制操作道岔', cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN, operate: OperationEvent.Switch.turnoutForce.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强解道岔', commandTip: '强解道岔', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Switch.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '挤岔恢复', commandTip: '取消挤岔逻辑标志', cmdType: CMD.Switch.CMD_SWITCH_SQUEEZE_RECOVERY, operate: OperationEvent.Switch.squeezeRecovery.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '单独锁定', commandTip: '锁定道岔,阻止转换', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
@ -1026,7 +1027,7 @@ export default {
|
||||
{ name: '封锁道岔', commandTip: '禁止通过道岔区段排列进路', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '解封道岔', commandTip: '允许通过道岔区段排列进路', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||
{ name: '强行消限', commandTip: '强行取消对轨道区段的限速', 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: '关闭信号', commandTip: '设置信号机为关闭状态', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||
|
@ -83,11 +83,13 @@ export default {
|
||||
Center: [
|
||||
{
|
||||
label: '区段封锁',
|
||||
handler: this.lock
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
handler: this.unlock
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '设备标签',
|
||||
@ -112,7 +114,8 @@ export default {
|
||||
},
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '帮助',
|
||||
|
@ -17,6 +17,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -240,8 +241,8 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Center;
|
||||
this.menu = MenuContextHandler.covert2(this.menuNormal);
|
||||
// this.menu = this.menuNormal.Center;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
|
@ -24,6 +24,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -192,8 +193,7 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Center;
|
||||
this.menu = MenuContextHandler.covert2(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
|
@ -1,49 +1,49 @@
|
||||
export const OperationEvent = {
|
||||
// 直接指令
|
||||
Command: {
|
||||
// 对话框
|
||||
common: {
|
||||
choose: {
|
||||
operation: 'com01',
|
||||
domId: '_Tips-Cmd-Common-Choose'
|
||||
},
|
||||
select: {
|
||||
operation: 'com02',
|
||||
domId: '_Tips-Cmd-Common-Select'
|
||||
},
|
||||
confirm: {
|
||||
operation: 'com03',
|
||||
domId: '_Tips-Cmd-Common-Confirm'
|
||||
},
|
||||
apply: {
|
||||
operation: 'com04',
|
||||
domId: '_Tips-Cmd-Common-Apply'
|
||||
},
|
||||
close: {
|
||||
operation: 'com05',
|
||||
domId: '_Tips-Cmd-Common-Close'
|
||||
},
|
||||
choose1: {
|
||||
operation: 'com06',
|
||||
domId: '_Tips-Cmd-Common-Choose1'
|
||||
},
|
||||
select: {
|
||||
operation: 'com07',
|
||||
domId: '_Tips-Cmd-Common-Select'
|
||||
},
|
||||
confirm1: {
|
||||
operation: 'com08',
|
||||
domId: '_Tips-Cmd-Common-Confirm1'
|
||||
},
|
||||
apply1: {
|
||||
operation: 'com09',
|
||||
domId: '_Tips-Cmd-Common-Apply1'
|
||||
},
|
||||
close1: {
|
||||
operation: 'com10',
|
||||
domId: '_Tips-Cmd-Common-Close1'
|
||||
},
|
||||
},
|
||||
// 对话框
|
||||
common: {
|
||||
choose: {
|
||||
operation: 'com01',
|
||||
domId: '_Tips-Cmd-Common-Choose'
|
||||
},
|
||||
select: {
|
||||
operation: 'com02',
|
||||
domId: '_Tips-Cmd-Common-Select'
|
||||
},
|
||||
confirm: {
|
||||
operation: 'com03',
|
||||
domId: '_Tips-Cmd-Common-Confirm'
|
||||
},
|
||||
apply: {
|
||||
operation: 'com04',
|
||||
domId: '_Tips-Cmd-Common-Apply'
|
||||
},
|
||||
close: {
|
||||
operation: 'com05',
|
||||
domId: '_Tips-Cmd-Common-Close'
|
||||
},
|
||||
choose1: {
|
||||
operation: 'com06',
|
||||
domId: '_Tips-Cmd-Common-Choose1'
|
||||
},
|
||||
select: {
|
||||
operation: 'com07',
|
||||
domId: '_Tips-Cmd-Common-Select'
|
||||
},
|
||||
confirm1: {
|
||||
operation: 'com08',
|
||||
domId: '_Tips-Cmd-Common-Confirm1'
|
||||
},
|
||||
apply1: {
|
||||
operation: 'com09',
|
||||
domId: '_Tips-Cmd-Common-Apply1'
|
||||
},
|
||||
close1: {
|
||||
operation: 'com10',
|
||||
domId: '_Tips-Cmd-Common-Close1'
|
||||
}
|
||||
},
|
||||
|
||||
// 取消操作
|
||||
cancel: {
|
||||
@ -625,26 +625,26 @@ export const OperationEvent = {
|
||||
menu: {
|
||||
operation: '107',
|
||||
domId: '_Tips-Switch-Turnout-Menu'
|
||||
},
|
||||
menuButton: {
|
||||
},
|
||||
menuButton: {
|
||||
operation: '1071',
|
||||
domId: '_Tips-Switch-Turnout-MenuButton{BOTTOM}'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 强制扳动
|
||||
turnoutForce: {
|
||||
menu: {
|
||||
menu: {
|
||||
operation: '108',
|
||||
domId: '_Tips-Switch-TurnoutForce-Menu'
|
||||
},
|
||||
button: {
|
||||
},
|
||||
button: {
|
||||
operation: '1080',
|
||||
domId: '_Tips-Switch-TurnoutForce-Mbm{TOP}'
|
||||
},
|
||||
menuButton: {
|
||||
menuButton: {
|
||||
operation: '1081',
|
||||
domId: '_Tips-Switch-TurnoutForce-MenuButton{BOTTOM}'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 道岔故障解锁
|
||||
fault: {
|
||||
@ -671,11 +671,11 @@ export const OperationEvent = {
|
||||
stop: {
|
||||
operation: '1095',
|
||||
domId: '_Tips-Switch-Fault-Stop'
|
||||
},
|
||||
menuButton: {
|
||||
},
|
||||
menuButton: {
|
||||
operation: '1096',
|
||||
domId: '_Tips-Switch-Fault-MenuButton{BOTTOM}'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 计轴预复位
|
||||
axlePreReset: {
|
||||
@ -854,18 +854,18 @@ export const OperationEvent = {
|
||||
operation: '1190',
|
||||
domId: '_Tips-Switch-GuideLock-Button{TOP}'
|
||||
}
|
||||
},
|
||||
// 挤岔恢复
|
||||
squeezeRecovery: {
|
||||
},
|
||||
// 挤岔恢复
|
||||
squeezeRecovery: {
|
||||
button: {
|
||||
operation: '11a0',
|
||||
domId: '_Tips-Switch-Squeeze-Recovery-Button{TOP}'
|
||||
},
|
||||
menuButton: {
|
||||
},
|
||||
menuButton: {
|
||||
operation: '11a1',
|
||||
domId: '_Tips-Switch-Squeeze-Recovery-MenuButton{TOP}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 控制模式操作
|
||||
@ -949,11 +949,11 @@ export const OperationEvent = {
|
||||
passwordConfirm: {
|
||||
operation: '2035',
|
||||
domId: '_Tips-Control-Forced-PasswordConfirm'
|
||||
},
|
||||
menuButton: {
|
||||
operation: '2036',
|
||||
},
|
||||
menuButton: {
|
||||
operation: '2036',
|
||||
domId: '_Tips-Control-Forced-Menu{BOTTOM}'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 请求中控
|
||||
requestCentralControl: {
|
||||
@ -1637,11 +1637,11 @@ export const OperationEvent = {
|
||||
stop: {
|
||||
operation: '4095',
|
||||
domId: '_Tips-Section-AxlePreReset-Stop'
|
||||
},
|
||||
menuButton: {
|
||||
},
|
||||
menuButton: {
|
||||
operation: '4096',
|
||||
domId: '_Tips-Section-AxlePreReset-Menu{BOTTOM}'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 设备状态
|
||||
detail: {
|
||||
@ -2105,14 +2105,14 @@ export const OperationEvent = {
|
||||
operation: '519',
|
||||
domId: '_Tips-Stand-openPsdByHand-Menu'
|
||||
}
|
||||
},
|
||||
// 取消设置
|
||||
},
|
||||
// 取消设置
|
||||
cancelTrain:{
|
||||
menuButton: {
|
||||
operation: '520',
|
||||
domId: '_Tips-Stand-CancelTrain-MenuButton{BOTTOM}'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Station: {
|
||||
|
@ -48,8 +48,8 @@ export default {
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
// initLoadCallback: this.initForm,
|
||||
labelWidth: '120px',
|
||||
initLoadCallback: this.initForm,
|
||||
queryObject: {
|
||||
prdType: {
|
||||
type: 'select',
|
||||
@ -160,7 +160,7 @@ export default {
|
||||
this.typeChoose(json);
|
||||
},
|
||||
mounted() {
|
||||
this.interCheckGenerateStatus();
|
||||
this.interCheckGenerateStatus();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.isLeaving = true;
|
||||
@ -179,15 +179,13 @@ export default {
|
||||
await this.prdChoose(queryData);
|
||||
|
||||
this.reloadTable();
|
||||
},
|
||||
initForm(form) {
|
||||
if (form) {
|
||||
this.prdChoose(form);
|
||||
this.typeChoose(form);
|
||||
// form.type = '';
|
||||
// form.operateType = '';
|
||||
}
|
||||
},
|
||||
},
|
||||
async initForm(form) {
|
||||
if (form) {
|
||||
await this.prdChoose(form, false);
|
||||
await this.typeChoose(form, false);
|
||||
}
|
||||
},
|
||||
interCheckGenerateStatus() {
|
||||
createAllTrainingList(this.$route.query.mapId, false).then((data)=>{
|
||||
if (data.data) {
|
||||
@ -217,10 +215,10 @@ export default {
|
||||
}, 3000);
|
||||
});
|
||||
},
|
||||
async prdChoose(form) {
|
||||
this.trainingTypeMap = {};
|
||||
async prdChoose(form, isClean = true) {
|
||||
this.trainingTypeMap = {};
|
||||
|
||||
const lineCode = this.$route.query.lineCode;
|
||||
const lineCode = this.$route.query.lineCode;
|
||||
const res = await getCmdList(lineCode, {prdType:form.prdType});
|
||||
const trainingOperateList = [];
|
||||
const trainingOperateConfigList = [];
|
||||
@ -234,12 +232,14 @@ export default {
|
||||
LimitControl: [],
|
||||
TrainWindow: [],
|
||||
Driver: []
|
||||
};
|
||||
};
|
||||
|
||||
form.type = '';
|
||||
form.operateType = '';
|
||||
this.queryForm.queryObject.type.config.data = [];
|
||||
this.queryForm.queryObject.operateType.config.data = [];
|
||||
if (isClean) {
|
||||
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 => {
|
||||
@ -256,17 +256,19 @@ 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.queryForm.queryObject.type.config.data = trainingOperateConfigList;
|
||||
|
||||
this.trainingTypeList = trainingOperateConfigList;
|
||||
this.trainingTypeList = trainingOperateConfigList;
|
||||
this.trainingTypeMap = operateTypeMap;
|
||||
} else {
|
||||
this.$message.error(this.$t('error.failedToObtainTrainingType'));
|
||||
}
|
||||
},
|
||||
typeChoose(form) {
|
||||
typeChoose(form, isClean = true) {
|
||||
this.queryForm.queryObject.operateType.config.data = [];
|
||||
form.operateType = '';
|
||||
if (isClean) {
|
||||
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 });
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="购买详情"
|
||||
title="订单"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
center
|
||||
@ -42,7 +42,7 @@
|
||||
element-loading-background="rgba(255, 255, 255, 0.9)"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="paySuccess" style="position: relative; top: -50px;color: #0B840B;z-index: 8888;font-size: 18px;text-align: center;width: 150px;">
|
||||
<div v-if="paySuccess" style="position: relative; top: -50px;color: #0B840B;z-index: 8888;font-size: 18px;text-align: center;width: 150px;font-weight: bold;">
|
||||
<div>订单支付成功!</div>
|
||||
<div>{{ `将在${countdown}后自动关闭` }}</div>
|
||||
</div>
|
||||
@ -73,8 +73,9 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.payOrder':function (val) {
|
||||
if (this.payOrder === val) {
|
||||
if (this.orderCode == val) {
|
||||
this.paySuccess = true;
|
||||
this.loading = true;
|
||||
this.url = '';
|
||||
this.timer = setInterval(() => {
|
||||
this.countdown--;
|
||||
|
@ -26,7 +26,6 @@
|
||||
<el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
|
||||
<!-- v-if="isContest" -->
|
||||
<el-button v-if="!isLocal" size="small" @click="contectUs">联系方式</el-button>
|
||||
<!--<el-button size="small" @click="goToPay">购买</el-button>-->
|
||||
</el-button-group>
|
||||
</div>
|
||||
<Jl3d-Device
|
||||
@ -40,7 +39,6 @@
|
||||
<scheduling v-if="scheduleLoadShow" ref="scheduling" :group="group" />
|
||||
<scheduling-view v-if="schedulePreviewShow" ref="schedulingView" :group="group" />
|
||||
<contect-us ref="contectUs" />
|
||||
<pay-page ref="payPage" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -50,7 +48,6 @@ import { getToken } from '@/utils/auth';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import Scheduling from '@/views/newMap/displayNew/demon/scheduling';
|
||||
import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
|
||||
import PayPage from '@/views/newMap/displayNew/demon/payPage';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
|
||||
import { getPostByProjectCode } from '@/api/learn';
|
||||
@ -62,8 +59,7 @@ export default {
|
||||
Jl3dDrive,
|
||||
Scheduling,
|
||||
SchedulingView,
|
||||
ContectUs,
|
||||
PayPage
|
||||
ContectUs
|
||||
},
|
||||
props:{
|
||||
isAllShow:{
|
||||
@ -293,10 +289,8 @@ export default {
|
||||
},
|
||||
contectUs() {
|
||||
this.$refs.contectUs.doShow();
|
||||
},
|
||||
goToPay() {
|
||||
this.$refs.payPage.doShow();
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -61,7 +61,7 @@
|
||||
@switchMode="switchMode" -->
|
||||
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
<scene-list ref="sceneList" @selectScript="selectScript" />
|
||||
<scene-list ref="sceneList" @selectScript="selectScript" @goToPay="goToPay" />
|
||||
<theory-exam-select ref="theoryExamSelect" @startTheoryExam="startTheoryExam" />
|
||||
<theory-exam ref="theoryExam" />
|
||||
<select-role ref="selectRole" :member-list="currentPlayList" @selectRole="selectRole" />
|
||||
@ -69,6 +69,7 @@
|
||||
<operational-statistic ref="operationalStatistic" @finishTraining="finishTraining" />
|
||||
|
||||
<test-result ref="testResult" />
|
||||
<pay-page ref="payPage" />
|
||||
|
||||
</div>
|
||||
|
||||
@ -83,6 +84,7 @@ import SceneList from './sceneList';
|
||||
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
||||
import TheoryExamSelect from './theoryExamSelect';
|
||||
import TheoryExam from './theoryExam';
|
||||
import PayPage from '@/views/newMap/displayNew/demon/payPage';
|
||||
// import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import {clearSimulation, getSimulationInfoNew } from '@/api/simulation';
|
||||
// import { PermissionType } from '@/scripts/ConstDic';
|
||||
@ -111,7 +113,8 @@ export default {
|
||||
TheoryExam,
|
||||
OperationalStatistic,
|
||||
TestResult,
|
||||
SelectRole
|
||||
SelectRole,
|
||||
PayPage
|
||||
},
|
||||
props: {
|
||||
offset: {
|
||||
@ -492,6 +495,9 @@ export default {
|
||||
getEmptyOperationalStatistics(this.group).then(res=>{
|
||||
this.$refs.operationalStatistic.doShow(res.data);
|
||||
});
|
||||
},
|
||||
goToPay() {
|
||||
this.$refs.payPage.doShow();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -3,7 +3,14 @@
|
||||
<el-dialog v-dialogDrag title="场景列表" :visible.sync="dialogVisible" width="920px" center>
|
||||
<el-tabs v-model="activeName" type="card" style="height:550px">
|
||||
<el-tab-pane label="主场景列表" name="first">
|
||||
<div v-if="!hasPermission" style="margin-bottom: 10px;color: #f00;width: 100%;text-align: center;">尊敬的用户,您好:由于您暂无场景权限,现仅提供场景1试用,如需使用其他场景请通过左上角‘菜单=》联系方式’联系我们开放权限!</div>
|
||||
<div v-if="!hasPermission" style="margin-bottom: 10px;color: #f00;width: 100%;text-align: center;">
|
||||
尊敬的用户,您好:由于您暂无场景权限,现仅提供场景1试用,如需使用其他场景请
|
||||
<el-button type="text" style="text-decoration: underline" @click="goToPay">购买权限</el-button>
|
||||
</div>
|
||||
<div v-if="permisson.endTime" style="margin-bottom: 10px;color: #f00;width: 100%;text-align: center;">
|
||||
{{ `您的场景权限截止时间:${permisson.endTime || '永久'}。` }}
|
||||
<el-button type="text" style="text-decoration: underline" @click="goToPay">立即续费</el-button>
|
||||
</div>
|
||||
<el-table :data="mainSceneData" border :span-method="objectSpanMethod" height="465" stripe :cell-style="{padding: '8px 0'}">
|
||||
<el-table-column type="index" width="50" label="序号" />
|
||||
<el-table-column prop="type" width="200" label="类别" />
|
||||
@ -37,6 +44,7 @@ export default {
|
||||
dialogVisible: false,
|
||||
selectMapId:'',
|
||||
hasPermission: false,
|
||||
permisson: {},
|
||||
form: {
|
||||
type: ''
|
||||
},
|
||||
@ -102,8 +110,10 @@ export default {
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
queryPermission() {
|
||||
this.permisson = {};
|
||||
queryCompetitionPracticalPermissions({mapId:this.$route.query.mapId}).then(res => {
|
||||
this.hasPermission = !!res.data;
|
||||
if (res.data) { this.permisson = res.data; }
|
||||
}).catch(() => {
|
||||
this.$message.error('获取场景权限异常!');
|
||||
});
|
||||
@ -203,6 +213,10 @@ export default {
|
||||
this.$emit('selectScript', {playerList:playerList, mapLocation:this.mapLocation});
|
||||
this.doClose();
|
||||
},
|
||||
goToPay() {
|
||||
this.$emit('goToPay');
|
||||
this.doClose();
|
||||
},
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (rowIndex === 1 && columnIndex === 1) {
|
||||
return {
|
||||
|
@ -32,66 +32,67 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.tipEvent': function (val) {
|
||||
this.tipInit();
|
||||
this.tipInit();
|
||||
this.$nextTick(function() {
|
||||
this.tipInit();
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
tipInit() {
|
||||
this.$store.dispatch('training/isTeachMode').then(() => {
|
||||
this.tipShow = true;
|
||||
this.$nextTick(() => {
|
||||
const offset = this.$store.state.config.canvasOffset;
|
||||
if (this.$store.state.training.trainingStart) {
|
||||
const order = this.$store.state.training.order;
|
||||
const steps = this.$store.state.training.steps;
|
||||
const offset = this.$store.state.config.canvasOffset;
|
||||
if (this.$store.state.training.trainingStart) {
|
||||
const order = this.$store.state.training.order;
|
||||
const steps = this.$store.state.training.steps;
|
||||
|
||||
if (order > -1 && order < steps.length) {
|
||||
const step = steps[order];
|
||||
const distance = 5;
|
||||
this.tip = step.tip;
|
||||
/** 如果mbm或者bar的处理*/
|
||||
if (step.type === 'mbm' || step.type === 'bar') {
|
||||
const position = this.getOtherTipPoint(step);
|
||||
if (position) {
|
||||
this.position = position;
|
||||
this.position.y -= distance;
|
||||
this.popTipShow();
|
||||
}
|
||||
} else if (step.code) {
|
||||
/** 默认是shape类型,如果找不到坐标,则可以认为是存在code的dailog*/
|
||||
const position = this.getShapeTipPoint(step);
|
||||
if (position) {
|
||||
this.position = {
|
||||
x: position.x + offset.x,
|
||||
y: position.y + offset.y - distance
|
||||
};
|
||||
this.popTipShow();
|
||||
} else {
|
||||
const position = this.getOtherTipPoint(step);
|
||||
if (position) {
|
||||
this.position = position;
|
||||
this.position.y -= distance;
|
||||
this.popTipShow();
|
||||
}
|
||||
}
|
||||
if (order > -1 && order < steps.length) {
|
||||
const step = steps[order];
|
||||
const distance = 5;
|
||||
this.tip = step.tip;
|
||||
/** 如果mbm或者bar的处理*/
|
||||
if (step.type === 'mbm' || step.type === 'bar') {
|
||||
const position = this.getOtherTipPoint(step);
|
||||
if (position) {
|
||||
this.position = position;
|
||||
this.position.y -= distance;
|
||||
this.popTipShow();
|
||||
}
|
||||
} else if (step.code) {
|
||||
/** 默认是shape类型,如果找不到坐标,则可以认为是存在code的dailog*/
|
||||
const position = this.getShapeTipPoint(step);
|
||||
if (position) {
|
||||
this.position = {
|
||||
x: position.x + offset.x,
|
||||
y: position.y + offset.y - distance
|
||||
};
|
||||
this.popTipShow();
|
||||
} else {
|
||||
/** 不存在code字段的dialog处理*/
|
||||
const position = this.getOtherTipPoint(step);
|
||||
if (position) {
|
||||
this.position = position;
|
||||
this.position.y -= distance;
|
||||
this.popTipShow();
|
||||
} else {
|
||||
this.popTipHide();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.tipShow = false;
|
||||
/** 不存在code字段的dialog处理*/
|
||||
const position = this.getOtherTipPoint(step);
|
||||
if (position) {
|
||||
this.position = position;
|
||||
this.position.y -= distance;
|
||||
this.popTipShow();
|
||||
} else {
|
||||
this.popTipHide();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.tipShow = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.tipShow = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tipShow = false;
|
||||
});
|
||||
|
@ -70,32 +70,34 @@ export default {
|
||||
falseValue: false,
|
||||
id: '',
|
||||
height: 800,
|
||||
initData: {
|
||||
upRight: false,
|
||||
signalApproachOnlyOne: false,
|
||||
signalApproachOnlyNpSwitch: false,
|
||||
routeNameUseEndOppositeSignalName: false,
|
||||
generateTbRoute: false,
|
||||
tbRouteNameUseEndOppositeSignalName: false,
|
||||
routeSignalAlwaysGreen: false,
|
||||
routeApartByOverlap: false,
|
||||
overlapOnlySwitch: false,
|
||||
overlapSwitchNpOnly: false,
|
||||
overlapSignalOppositeSwitchNpOnly: false,
|
||||
overlapOnlyOneSwitch: false,
|
||||
generateCycle: false,
|
||||
routeButton: false,
|
||||
likeHa1: false,
|
||||
getNearlySignal: false,
|
||||
overlapSettingByTrigger: false,
|
||||
overlapReleaseTime: 45,
|
||||
routeReleaseTime: 60
|
||||
},
|
||||
// initData: {
|
||||
// upRight: false,
|
||||
// signalApproachOnlyOne: false,
|
||||
// signalApproachOnlyNpSwitch: false,
|
||||
// routeNameUseEndOppositeSignalName: false,
|
||||
// generateTbRoute: false,
|
||||
// tbRouteNameUseEndOppositeSignalName: false,
|
||||
// routeSignalAlwaysGreen: false,
|
||||
// routeApartByOverlap: false,
|
||||
// overlapOnlySwitch: false,
|
||||
// overlapSwitchNpOnly: false,
|
||||
// overlapSignalOppositeSwitchNpOnly: false,
|
||||
// overlapOnlyOneSwitch: false,
|
||||
// generateCycle: false,
|
||||
// routeButton: false,
|
||||
// likeHa1: false,
|
||||
// getNearlySignal: false,
|
||||
// overlapSettingByTrigger: false,
|
||||
// generateFls:false,
|
||||
// signalApproachNotPassPreSignal:false,
|
||||
// overlapReleaseTime: 45,
|
||||
// routeReleaseTime: 60
|
||||
// },
|
||||
roadData: [],
|
||||
focus: false,
|
||||
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch',
|
||||
'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen',
|
||||
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'likeHa1', 'getNearlySignal', 'overlapSettingByTrigger', 'generateFls'],
|
||||
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'likeHa1', 'getNearlySignal', 'overlapSettingByTrigger', 'generateFls', 'signalApproachNotPassPreSignal'],
|
||||
selectList: [],
|
||||
numberList: ['overlapReleaseTime', 'routeReleaseTime'],
|
||||
optionsMap: {
|
||||
@ -123,7 +125,8 @@ export default {
|
||||
likeHa1: '是否类似哈尔滨一号线,联锁分为ATP信号、地面信号、引导信号',
|
||||
getNearlySignal: '生成进路信号按钮,进路信号按钮是否取最近的一个信号机',
|
||||
overlapSettingByTrigger: '延续保护的建立方式:是-通过触发建立,否-随进路建立',
|
||||
generateFls: '是否生成侧防:是-生成侧防,不要联动道岔,否-不生成侧防,用联动道岔'
|
||||
generateFls: '是否生成侧防:是-生成侧防,不要联动道岔,否-不生成侧防,用联动道岔',
|
||||
signalApproachNotPassPreSignal:'信号机接近区段不跨过前方同向信号机'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
@ -154,9 +154,8 @@ export default {
|
||||
title: this.$t('planMonitor.file'),
|
||||
children: [
|
||||
{
|
||||
title: '填充通用数据',
|
||||
click: this.populatingGenericData
|
||||
// disabledCallback: () => { return !this.$route.query.planId },
|
||||
title: '重命名',
|
||||
click: this.modifyRunPlanName
|
||||
}
|
||||
// {
|
||||
// title: '创建运行图',
|
||||
@ -164,58 +163,23 @@ export default {
|
||||
// }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.view'),
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.tool'),
|
||||
children: [
|
||||
{
|
||||
title: '交路设置',
|
||||
click: this.handleRoutingSettings
|
||||
title: '生成带出入库计划',
|
||||
click: this.handleGernaratePlanningTrain
|
||||
},
|
||||
{
|
||||
title: '参数配置',
|
||||
click: this.handleRunplanParams
|
||||
},
|
||||
{
|
||||
title: '停站时间',
|
||||
click: this.handleDwellTime
|
||||
},
|
||||
{
|
||||
title: '运行等级',
|
||||
click: this.handleRoutingLevel
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.validityCheck'),
|
||||
click: this.handlePlanEffectiveCheck
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.testRunningDiagram'),
|
||||
click: this.handleTestRunPlan
|
||||
title: '生成仅环路计划',
|
||||
click: this.populatingGenericData
|
||||
// disabledCallback: () => { return !this.$route.query.planId },
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.modify'),
|
||||
title: '编辑',
|
||||
children: [
|
||||
// {
|
||||
// title: '计划参数',
|
||||
// click: this.handleParameter,
|
||||
// },
|
||||
// {
|
||||
// title: '打印参数',
|
||||
// click: this.undeveloped,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
{
|
||||
title: '生成计划',
|
||||
click: this.handleGernaratePlanningTrain
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.addPlan'),
|
||||
click: this.handleAddPlanningTrain
|
||||
@ -225,7 +189,7 @@ export default {
|
||||
click: this.handleDeletePlanningTrain
|
||||
},
|
||||
{
|
||||
title: '移动计划',
|
||||
title: '平移计划',
|
||||
click: this.handleMovePlanningTrain
|
||||
},
|
||||
{
|
||||
@ -247,39 +211,75 @@ export default {
|
||||
title: this.$t('planMonitor.modifyTask'),
|
||||
click: this.handleModifyingTask
|
||||
},
|
||||
{
|
||||
title: '修改名称',
|
||||
click: this.modifyRunPlanName
|
||||
},
|
||||
{
|
||||
title: '清除数据',
|
||||
click: this.handleClearData
|
||||
}
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// title: '修改交路',
|
||||
// click: this.handleModifyingRouting,
|
||||
// },
|
||||
// {
|
||||
// title: '修改开始时间',
|
||||
// click: this.handleModifyingStartTime,
|
||||
// },
|
||||
// {
|
||||
// title: '快速增加任务',
|
||||
// click: this.undeveloped,
|
||||
// }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '配置',
|
||||
children: [
|
||||
{
|
||||
title: '交路设置',
|
||||
click: this.handleRoutingSettings
|
||||
},
|
||||
{
|
||||
title: '运行等级设置',
|
||||
click: this.handleRoutingLevel
|
||||
},
|
||||
{
|
||||
title: '停站时间设置',
|
||||
click: this.handleDwellTime
|
||||
},
|
||||
{
|
||||
title: '其他参数配置',
|
||||
click: this.handleRunplanParams
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '测试',
|
||||
children: [
|
||||
{
|
||||
title: this.$t('planMonitor.validityCheck'),
|
||||
click: this.handlePlanEffectiveCheck
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.testRunningDiagram'),
|
||||
click: this.handleTestRunPlan
|
||||
}
|
||||
]
|
||||
}
|
||||
// {
|
||||
// title: this.$t('planMonitor.option'),
|
||||
// children: [
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// title: this.$t('planMonitor.help'),
|
||||
// title: this.$t('planMonitor.modify'),
|
||||
// children: [
|
||||
// // {
|
||||
// // title: '计划参数',
|
||||
// // click: this.handleParameter,
|
||||
// // },
|
||||
// // {
|
||||
// // title: '打印参数',
|
||||
// // click: this.undeveloped,
|
||||
// // },
|
||||
// // {
|
||||
// // type: 'separator'
|
||||
// // },
|
||||
// // {
|
||||
// // type: 'separator'
|
||||
// // },
|
||||
// // {
|
||||
// // title: '修改交路',
|
||||
// // click: this.handleModifyingRouting,
|
||||
// // },
|
||||
// // {
|
||||
// // title: '修改开始时间',
|
||||
// // click: this.handleModifyingStartTime,
|
||||
// // },
|
||||
// // {
|
||||
// // title: '快速增加任务',
|
||||
// // click: this.undeveloped,
|
||||
// // }
|
||||
// ]
|
||||
// }
|
||||
]
|
||||
|
@ -181,16 +181,8 @@ export default {
|
||||
{
|
||||
title: this.$t('planMonitor.file'),
|
||||
children: [
|
||||
// {
|
||||
// title: '查看站间运行等级',
|
||||
// click: this.handleModifyingStationIntervalTime
|
||||
// },
|
||||
{
|
||||
title: '填充通用数据',
|
||||
click: this.populatingGenericData
|
||||
},
|
||||
{
|
||||
title: '创建运行图',
|
||||
title: '创建',
|
||||
click: this.newRunPlan
|
||||
},
|
||||
{
|
||||
@ -201,33 +193,33 @@ export default {
|
||||
title: '删除',
|
||||
click: this.deleteRunPlanOperate
|
||||
},
|
||||
{
|
||||
title: '重命名',
|
||||
click: this.modifyRunPlanName
|
||||
},
|
||||
{
|
||||
title: '发布',
|
||||
click: this.publishRunPlan
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// title: this.$t('planMonitor.view'),
|
||||
// children: [
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
title: this.$t('planMonitor.tool'),
|
||||
children: [
|
||||
{
|
||||
title: this.$t('planMonitor.validityCheck'),
|
||||
click: this.handlePlanEffectiveCheck
|
||||
title: '生成带出入库计划',
|
||||
click: this.handleGernaratePlanningTrain
|
||||
},
|
||||
{
|
||||
title: '生成仅环路计划',
|
||||
click: this.populatingGenericData
|
||||
// disabledCallback: () => { return !this.$route.query.planId },
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.modify'),
|
||||
title: '编辑',
|
||||
children: [
|
||||
{
|
||||
title: '生成计划',
|
||||
click: this.handleGernaratePlanningTrain
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.addPlan'),
|
||||
click: this.handleAddPlanningTrain
|
||||
@ -237,7 +229,7 @@ export default {
|
||||
click: this.handleDeletePlanningTrain
|
||||
},
|
||||
{
|
||||
title: '移动计划',
|
||||
title: '平移计划',
|
||||
click: this.handleMovePlanningTrain
|
||||
},
|
||||
{
|
||||
@ -259,10 +251,6 @@ export default {
|
||||
title: this.$t('planMonitor.modifyTask'),
|
||||
click: this.handleModifyingTask
|
||||
},
|
||||
{
|
||||
title: '修改名称',
|
||||
click: this.modifyRunPlanName
|
||||
},
|
||||
{
|
||||
title: '清除数据',
|
||||
click: this.handleClearData
|
||||
@ -277,16 +265,25 @@ export default {
|
||||
click: this.handleRoutingSettings
|
||||
},
|
||||
{
|
||||
title: '参数配置',
|
||||
click: this.handleRunplanParams
|
||||
title: '运行等级设置',
|
||||
click: this.handleRoutingLevel
|
||||
},
|
||||
{
|
||||
title: '停站时间',
|
||||
title: '停站时间设置',
|
||||
click: this.handleDwellTime
|
||||
},
|
||||
{
|
||||
title: '运行等级',
|
||||
click: this.handleRoutingLevel
|
||||
title: '其他参数配置',
|
||||
click: this.handleRunplanParams
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '测试',
|
||||
children: [
|
||||
{
|
||||
title: this.$t('planMonitor.validityCheck'),
|
||||
click: this.handlePlanEffectiveCheck
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -454,10 +451,6 @@ export default {
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
},
|
||||
// // 修改站间运行时间
|
||||
// handleModifyingStationIntervalTime() {
|
||||
// this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
|
||||
// },
|
||||
// 填充计划运行图
|
||||
populatingGenericData() {
|
||||
if (this.loadRunPlanId) {
|
||||
|
@ -178,13 +178,6 @@ export default {
|
||||
return data.name.includes(value);
|
||||
},
|
||||
buy() {
|
||||
// this.disabled = true;
|
||||
// setTimeout(() => {
|
||||
// this.$router.push({
|
||||
// path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, query:
|
||||
// { permissionType: PermissionType.LESSON, lessonId: this.courseModel.id, prdType: this.$route.query.prdType, mapId: this.$route.query.mapId, subSystem: this.$route.params.subSystem }
|
||||
// });
|
||||
// }, 100);
|
||||
this.$messageBox(this.$t('global.buyingTips'));
|
||||
},
|
||||
nodeExpand(obj, node, ele) {
|
||||
|
@ -168,7 +168,7 @@ export default {
|
||||
let checkId = localStore.get('trainingPlatformCheckId' + filterSelect + this.userId + this.project) || null;
|
||||
checkId = checkId && checkId.includes('-') ? checkId : null;
|
||||
this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
|
||||
if (!this.$route.path.includes('result')) {
|
||||
if (!this.$route.path.includes('result') && !this.$route.path.includes('/trainingPlatform/teach/')) {
|
||||
checkId && this.findTree(this.treeList, checkId);
|
||||
!checkId && this.treeList && this.treeList.length && this.clickEvent(this.treeList[0], {data: this.treeList[0]});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user