代码调整

This commit is contained in:
dong 2022-12-06 15:59:46 +08:00
parent 08daa72298
commit f7679a4cb1
10 changed files with 252 additions and 78 deletions

View File

@ -316,8 +316,9 @@ export default {
});
},
confirm2() {
const operate = {};
const operate = {
send: true
};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.confirm2.operation;

View File

@ -1,13 +1,13 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'dispatchWork'" />
<menu-switch ref="menuSwitch" :selected="selected" :work="'dispatchWork'" />
<menu-signal ref="menuSignal" :selected="selected" :work="'dispatchWork'" />
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" />
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="'dispatchWork'" />
<menu-bar ref="menuBar" :selected="selected" :work="work" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="work" />
<menu-switch ref="menuSwitch" :selected="selected" :work="work" />
<menu-signal ref="menuSignal" :selected="selected" :work="work" />
<menu-section ref="menuSection" :selected="selected" :work="work" />
<menu-train ref="menuTrain" :selected="selected" :work="work" />
<menu-station ref="menuStation" :selected="selected" :work="work" />
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="work" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="xian-01__systerm" />
<passive-Timeout ref="passiveTimeout" />
@ -58,7 +58,8 @@ export default {
data() {
return {
menu: [],
menuNormal: []
menuNormal: [],
work: 'dispatchWork'
};
},
computed: {
@ -113,7 +114,7 @@ export default {
},
initMenu() {
this.menuNormal = [];
if (this.$store.state.training.prdType == '02') {
if (this.work === 'dispatchWork') {
this.$store.state.map.map.stationList.forEach(station => {
if (station.relStationCodeList && station.relStationCodeList.length) {
const node = {
@ -138,7 +139,7 @@ export default {
this.menuNormal.push(node);
}
});
} else if (this.$store.state.training.prdType == '01') {
} else if (this.work === 'localWork') {
const roleDeviceCode = this.$store.state.training.roleDeviceCode;
const displayList = this.$store.state.map.map.displayList;
const display = displayList.find(each=>{

View File

@ -5,7 +5,7 @@
<!--<div class="holdTrainStatus">H</div>-->
<!--<div class="jumpStopStatus">S</div>-->
<!--</div>-->
<station-control-convert ref="stationControlConvert" @warningInfoDoShow="warningInfoDoShow" />
<station-control-convert ref="stationControlConvert" :work="work" @warningInfoDoShow="warningInfoDoShow" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
<view-name ref="viewName" />
@ -62,6 +62,12 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {

View File

@ -1,13 +1,13 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'localWork'" />
<menu-switch ref="menuSwitch" :selected="selected" :work="'localWork'" />
<menu-signal ref="menuSignal" :selected="selected" :work="'localWork'" />
<menu-section ref="menuSection" :selected="selected" :work="'localWork'" />
<menu-train ref="menuTrain" :selected="selected" :work="'localWork'" />
<menu-station ref="menuStation" :selected="selected" :work="'localWork'" />
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="'localWork'" />
<menu-bar ref="menuBar" :selected="selected" :work="work" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="work" />
<menu-switch ref="menuSwitch" :selected="selected" :work="work" />
<menu-signal ref="menuSignal" :selected="selected" :work="work" />
<menu-section ref="menuSection" :selected="selected" :work="work" />
<menu-train ref="menuTrain" :selected="selected" :work="work" />
<menu-station ref="menuStation" :selected="selected" :work="work" />
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="work" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="xian-01__systerm" />
<passive-Timeout ref="passiveTimeout" />
@ -58,7 +58,8 @@ export default {
data() {
return {
menu: [],
menuNormal: []
menuNormal: [],
work: 'localWork'
};
},
computed: {
@ -113,7 +114,7 @@ export default {
},
initMenu() {
this.menuNormal = [];
if (this.$store.state.training.prdType == '02') {
if (this.work === 'dispatchWork') {
this.$store.state.map.map.stationList.forEach(station => {
if (station.relStationCodeList && station.relStationCodeList.length) {
const node = {
@ -138,7 +139,7 @@ export default {
this.menuNormal.push(node);
}
});
} else if (this.$store.state.training.prdType == '01') {
} else if (this.work === 'localWork') {
const roleDeviceCode = this.$store.state.training.roleDeviceCode;
const displayList = this.$store.state.map.map.displayList;
const display = displayList.find(each=>{

View File

@ -5,7 +5,7 @@
<!--<div class="holdTrainStatus">H</div>-->
<!--<div class="jumpStopStatus">S</div>-->
<!--</div>-->
<station-control-convert ref="stationControlConvert" @warningInfoDoShow="warningInfoDoShow" />
<station-control-convert ref="stationControlConvert" :work="work" @warningInfoDoShow="warningInfoDoShow" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
<view-name ref="viewName" />
@ -62,6 +62,12 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {

View File

@ -74,6 +74,14 @@ export default {
components: {
TwoConfirmation
},
props: {
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
operate: null,
@ -155,7 +163,7 @@ export default {
this.updateTableValue(controlTransfer);
if (controlTransfer.applicantId && this.$store.state.training.memberData[controlTransfer.applicantId] &&
this.$store.state.training.memberData[controlTransfer.applicantId].userId == this.$store.state.user.id &&
this.$store.state.training.prdType === '01'
this.work === 'localWork'
) {
this.$emit('warningInfoDoShow', controlTransfer);
}
@ -248,7 +256,7 @@ export default {
},
initTableDataStatus() {
this.tableData = [];
if (this.$store.state.training.prdType === '02') {
if (this.work === 'dispatchWork') {
this.stationList && this.stationList.forEach(station => {
if (station.createControlMode) {
const control = this.$store.getters['map/getDeviceByCode'](station.code);
@ -263,7 +271,7 @@ export default {
});
}
});
} else if (this.$store.state.training.prdType === '01') {
} else if (this.work === 'localWork') {
const stationCodeList = this.$store.state.map.stationControlMap[this.$store.state.training.roleDeviceCode];
stationCodeList && stationCodeList.forEach(stationCode => {
const station = this.$store.getters['map/getDeviceByCode'](stationCode);

View File

@ -61,10 +61,11 @@ export default {
handler: this.lock,
cmdType: CMD.Section.CMD_SECTION_BLOCK,
isDisabled: (section, work) => {
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade === 1;
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade === 1 || device.controlMode !== 'Local';
} else {
return section.blockade === 1;
return section.blockade === 1 || device.controlMode !== 'Center';
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
@ -74,10 +75,11 @@ export default {
handler: this.unlock,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK,
isDisabled: (section, work) => {
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade !== 1;
return this.$store.state.training.roleDeviceCode !== section.stationCode || section.blockade !== 1 || device.controlMode !== 'Local';
} else {
return section.blockade !== 1;
return section.blockade !== 1 || device.controlMode !== 'Center';
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
@ -86,18 +88,42 @@ export default {
label: '故障解锁',
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
isDisabled: (section, work) => {
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (work === 'localWork') {
return device.controlMode !== 'Local';
} else {
return device.controlMode !== 'Center';
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
},
{
label: '设置限速',
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => {
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (work === 'localWork') {
return device.controlMode !== 'Local';
} else {
return device.controlMode !== 'Center';
}
},
isShow: (section, work) => section.type === '02'
},
{
label: '取消限速',
handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
isDisabled: (section, work) => {
const device = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (work === 'localWork') {
return device.controlMode !== 'Local';
} else {
return device.controlMode !== 'Center';
}
},
isShow: (section, work) => section.type === '02'
},
{
@ -111,7 +137,7 @@ export default {
return section.cutOff === 1;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
},
{
label: '区段激活',
@ -124,7 +150,7 @@ export default {
return section.cutOff !== 1;
}
},
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'dispatchWork'
}
],
menuForce: [

View File

@ -65,22 +65,39 @@ export default {
{
label: '进路选排',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return false;
} else {
return device.controlMode !== 'Center';
}
}
},
{
label: '进路取消',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return false;
} else {
return device.controlMode !== 'Center';
}
}
},
{
label: '信号封锁',
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.blockade === 1;
} else {
return signal.blockade === 1;
return signal.blockade === 1 || device.controlMode !== 'Center';
}
}
},
@ -89,85 +106,135 @@ export default {
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.blockade !== 1;
} else {
return signal.blockade !== 1;
return signal.blockade !== 1 || device.controlMode !== 'Center';
}
}
},
{
label: '信号关灯',
handler: this.signalClose,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return false;
} else {
return device.controlMode !== 'Center';
}
}
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return false;
} else {
return device.controlMode !== 'Center';
}
}
},
{
label: this.work === 'localWork' ? '引导进路办理' : '进路引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return false;
} else {
return device.controlMode !== 'Center';
}
}
},
{
label: '设置联锁自动进路',
handler: this.setAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 0;
} else {
return signal.fleetMode !== 0;
return signal.fleetMode !== 0 || device.controlMode !== 'Center';
}
}
},
isShow: (signal, work) => work === 'localWork'
},
{
label: '取消联锁自动进路',
handler: this.cancelAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
isDisabled: (signal, work) => {
console.log('🚀 ~ file: menuSignal.vue:182 ~ data ~ signal', signal);
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.fleetMode !== 1;
} else {
return signal.fleetMode !== 1;
return signal.fleetMode !== 1 || device.controlMode !== 'Center';
}
}
},
isShow: (signal, work) => work === 'localWork'
},
{
label: '设置联锁自动触发',
handler: this.setAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl === 1 || !signal.canSetCi;
} else {
return signal.ciControl === 1 || !signal.canSetCi;
return signal.ciControl === 1 || !signal.canSetCi || device.controlMode !== 'Center';
}
}
},
isShow: (signal, work) => work === 'localWork'
},
{
label: '取消联锁自动触发',
handler: this.cancelAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== signal.stationCode || signal.ciControl !== 1;
} else {
return signal.ciControl !== 1;
return signal.ciControl !== 1 || device.controlMode !== 'Center';
}
}
},
isShow: (signal, work) => work === 'localWork'
},
{
label: '进路交人工控',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return false;
} else {
return device.controlMode !== 'Center';
}
}
},
{
label: '进路交ATS自动控',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
isDisabled: (signal, work) => {
const device = this.$store.getters['map/getDeviceByCode'](signal.stationCode);
if (work === 'localWork') {
return false;
} else {
return device.controlMode !== 'Center';
}
}
},
{
label: '查询进路状态',

View File

@ -67,8 +67,9 @@ export default {
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: (stand, work) => {
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 0;
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 0 || device.controlMode !== 'Local';
} else {
return stand.centerHoldTrain !== 0;
}
@ -79,8 +80,9 @@ export default {
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => {
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1;
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1 || device.controlMode !== 'Local';
} else {
return stand.centerHoldTrain !== 1;
}
@ -91,20 +93,23 @@ export default {
handler: this.cancelDetainTrainForce,
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => {
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || device.controlMode !== 'Local';
} else {
return false;
}
}
},
isShow: (section, work) => work === 'dispatchWork'
},
{
label: '查询站台状态',
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS,
isDisabled: (stand, work) => {
const device = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || device.controlMode !== 'Local';
} else {
return false;
}
@ -134,10 +139,11 @@ export default {
handler: this.cancelJumpStop,
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
isDisabled: (stand, work) => {
console.log('🚀 ~ file: menuStationStand.vue:150 ~ data ~ stand', stand);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
} else {
return stand.allSkip !== 1 || stand.assignSkip !== 1;
return stand.allSkip !== 1 && stand.assignSkip !== 1;
}
},
isShow: (stand, work) => work === 'dispatchWork'
@ -220,7 +226,7 @@ export default {
this.menu = this.menuForce;
}
// PSL
if (this.operatemode !== OperateMode.FAULT && this.$store.state.training.prdType === '01') {
if (this.operatemode !== OperateMode.FAULT && this.work === 'localWork') {
this.menu = [
...this.menu,
{

View File

@ -57,10 +57,11 @@ export default {
handler: this.lock,
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
isDisabled: (switchDevice, work) => {
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock === 1;
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock === 1 || device.controlMode !== 'Local';
} else {
return switchDevice.singleLock === 1;
return switchDevice.singleLock === 1 || device.controlMode !== 'Center';
}
}
},
@ -69,10 +70,11 @@ export default {
handler: this.unlock,
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
isDisabled: (switchDevice, work) => {
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock !== 1;
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.singleLock !== 1 || device.controlMode !== 'Local';
} else {
return switchDevice.singleLock !== 1;
return switchDevice.singleLock !== 1 || device.controlMode !== 'Center';
}
}
},
@ -81,10 +83,11 @@ export default {
handler: this.block,
cmdType:CMD.Switch.CMD_SWITCH_BLOCK,
isDisabled: (switchDevice, work) => {
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade === 1;
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade === 1 || device.controlMode !== 'Local';
} else {
return switchDevice.blockade === 1;
return switchDevice.blockade === 1 || device.controlMode !== 'Center';
}
}
},
@ -93,47 +96,96 @@ export default {
handler: this.unblock,
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK,
isDisabled: (switchDevice, work) => {
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade !== 1;
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || switchDevice.blockade !== 1 || device.controlMode !== 'Local';
} else {
return switchDevice.blockade !== 1;
return switchDevice.blockade !== 1 || device.controlMode !== 'Center';
}
}
},
{
label: '道岔转动',
handler: this.switchTurnout,
cmdType:CMD.Switch.CMD_SWITCH_TURN
cmdType:CMD.Switch.CMD_SWITCH_TURN,
isDisabled: (switchDevice, work) => {
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
} else {
return device.controlMode !== 'Center';
}
}
},
{
label: '道岔故障解锁',
handler: this.fault,
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: '计轴预复位',
handler: this.axlePreReset,
cmdType:CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK,
isDisabled: (switchDevice, work) => {
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
} else {
return device.controlMode !== 'Center';
}
}
},
// {
// label: '',
// handler: this.axlePreReset,
// cmdType:CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET
// },
{
label: '区段切除',
handler: this.split,
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF,
isDisabled: (switchDevice, work) => {
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
} else {
return false;
}
}
},
{
label: '区段激活',
handler: this.active,
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE,
isDisabled: (switchDevice, work) => {
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
} else {
return false;
}
}
},
{
label: '道岔设置限速',
handler: this.setSpeed,
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED,
isDisabled: (switchDevice, work) => {
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
} else {
return device.controlMode !== 'Center';
}
}
},
{
label: '道岔取消限速',
handler: this.cancelSpeed,
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED,
isDisabled: (switchDevice, work) => {
const device = this.$store.getters['map/getDeviceByCode'](switchDevice.stationCode);
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== switchDevice.stationCode || device.controlMode !== 'Local';
} else {
return device.controlMode !== 'Center';
}
}
}
],
menuForce: [