Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2021-01-29 18:07:00 +08:00
commit 93446bb444
34 changed files with 434 additions and 2549 deletions

View File

@ -7,6 +7,7 @@ class SkinCode extends defaultStyle {
this.fontFamily = '宋体';
this[deviceType.Section] = {
elemnetType:['name', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'destinationText', 'line', 'separator', 'speedLimit'],
preAxleIgnoreFault: true,
active: {
routeColor: false // 进路触发颜色
},

View File

@ -180,6 +180,7 @@ class SkinCode extends defaultStyle {
},
lamp: {
bgShow: false, // 是否被选中
logicDisplayNone: true,
guidName: 'half', // 默认引导类型
borderVariable: false, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度

View File

@ -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;
});

View File

@ -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

View File

@ -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);
}
});
},

View File

@ -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(); //
@ -385,12 +393,12 @@ export default {
}
}
},
//
handelFunctionButton(model, subType) {
// debugger;
const operate = {
over: true,
operation: this.$store.state.menuOperation.buttonOperation,
cmdType: '',
param: {}
};
if (model._type === 'StationStand' && subType === 'StopJumpLamp') {
@ -404,10 +412,12 @@ export default {
} 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':
@ -416,21 +426,38 @@ export default {
operate.code = model.code;
break;
case 'center':
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
// 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.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 = [];

View File

@ -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' }
// ]
// }
]
};

View File

@ -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}` });
@ -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) {
//
@ -187,7 +187,9 @@ export default {
this.dialogShow = true;
this.$nextTick(function() {
setTimeout(() => {
this.$store.dispatch('training/emitTipFresh');
}, 300);
});
},
checkTableDataSelction(data) {

View File

@ -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']
}
},
{

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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);

View File

@ -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: '帮助',

View File

@ -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;

View File

@ -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) {

View File

@ -42,7 +42,7 @@ export const OperationEvent = {
close1: {
operation: 'com10',
domId: '_Tips-Cmd-Common-Close1'
},
}
},
// 取消操作

View File

@ -49,7 +49,7 @@ export default {
},
queryForm: {
labelWidth: '120px',
// initLoadCallback: this.initForm,
initLoadCallback: this.initForm,
queryObject: {
prdType: {
type: 'select',
@ -180,12 +180,10 @@ export default {
this.reloadTable();
},
initForm(form) {
async initForm(form) {
if (form) {
this.prdChoose(form);
this.typeChoose(form);
// form.type = '';
// form.operateType = '';
await this.prdChoose(form, false);
await this.typeChoose(form, false);
}
},
interCheckGenerateStatus() {
@ -217,7 +215,7 @@ export default {
}, 3000);
});
},
async prdChoose(form) {
async prdChoose(form, isClean = true) {
this.trainingTypeMap = {};
const lineCode = this.$route.query.lineCode;
@ -236,8 +234,10 @@ export default {
Driver: []
};
if (isClean) {
form.type = '';
form.operateType = '';
}
this.queryForm.queryObject.type.config.data = [];
this.queryForm.queryObject.operateType.config.data = [];
@ -264,9 +264,11 @@ export default {
this.$message.error(this.$t('error.failedToObtainTrainingType'));
}
},
typeChoose(form) {
typeChoose(form, isClean = true) {
this.queryForm.queryObject.operateType.config.data = [];
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 });

View File

@ -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--;

View File

@ -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>

View File

@ -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();
}
}
};

View File

@ -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 {

View File

@ -33,13 +33,15 @@ export default {
watch: {
'$store.state.training.tipEvent': function (val) {
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;
@ -91,7 +93,6 @@ export default {
} else {
this.tipShow = false;
}
});
}).catch(() => {
this.tipShow = false;
});

View File

@ -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:'信号机接近区段不跨过前方同向信号机'
}
};
},

View File

@ -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,
// // }
// ]
// }
]

View File

@ -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) {

View File

@ -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) {

View File

@ -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]});
}