This commit is contained in:
lVAL 2019-11-25 18:57:17 +08:00
parent 899f4a4216
commit 9eea637a70
40 changed files with 209 additions and 882 deletions

View File

@ -30,7 +30,6 @@
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import CommandEnum from '@/scripts/plugin/CommandEnum';
import NoticeInfo from './childDialog/noticeInfo'; import NoticeInfo from './childDialog/noticeInfo';
export default { export default {
@ -169,8 +168,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Signal.arrangementRoute.confirm.operation, operation: OperationEvent.Signal.arrangementRoute.confirm.operation
commandType: CommandEnum.Signal.arrangementRoute
}; };
this.loading = true; this.loading = true;
@ -190,8 +188,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Signal.signalClose.confirm.operation, operation: OperationEvent.Signal.signalClose.confirm.operation
commandType: CommandEnum.Signal.signalClose
}; };
this.loading = true; this.loading = true;
@ -211,8 +208,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Signal.reopenSignal.confirm.operation, operation: OperationEvent.Signal.reopenSignal.confirm.operation
commandType: CommandEnum.Signal.reopenSignal
}; };
this.loading = true; this.loading = true;
@ -232,8 +228,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation, operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
commandType: CommandEnum.Signal.cancelTrainRoute
}; };
this.loading = true; this.loading = true;
@ -253,8 +248,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation, operation: OperationEvent.Signal.humanControl.menu.operation
commandType: CommandEnum.Signal.humanControl
}; };
this.loading = true; this.loading = true;
@ -274,8 +268,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation, operation: OperationEvent.Signal.atsAutoControl.menu.operation
commandType: CommandEnum.Signal.atsAutoControl
}; };
this.loading = true; this.loading = true;
@ -296,7 +289,6 @@ export default {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.StationStand.setRunLevel.confirm.operation, operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
commandType: CommandEnum.StationStand.setRunLevel,
val: this.operate.val val: this.operate.val
}; };
@ -318,7 +310,6 @@ export default {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.StationStand.setStopTime.confirm.operation, operation: OperationEvent.StationStand.setStopTime.confirm.operation,
commandType: CommandEnum.StationStand.setStopTime,
val: this.operate.val val: this.operate.val
}; };
@ -340,7 +331,6 @@ export default {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation, operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
commandType: CommandEnum.StationStand.setBackStrategy,
val: this.operate.val val: this.operate.val
}; };

View File

@ -31,7 +31,6 @@
<script> <script>
import { OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo'; import NoticeInfo from './childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'ConfirmTrain', name: 'ConfirmTrain',
@ -140,8 +139,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.operation, operation: OperationEvent.Train.addTrainId.confirm.operation
commandType: CommandEnum.Train.addTrainId
}; };
this.loading = true; this.loading = true;

View File

@ -86,7 +86,6 @@
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date'; import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock'; import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'RouteCmdControl', name: 'RouteCmdControl',
@ -351,11 +350,9 @@ export default {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm2.operation; operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
operate.commandType = Commands.Signal.unlock;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm2.operation; operate.operation = OperationEvent.Signal.guide.confirm2.operation;
operate.commandType = Commands.Signal.guide;
} }
this.setMessage(''); this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });

View File

@ -39,7 +39,6 @@
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'RouteControl', name: 'RouteControl',
@ -156,8 +155,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
commandType: CommandEnum.Signal.cancelTrainRoute
}; };
this.loading = true; this.loading = true;
@ -237,8 +235,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation, operation: OperationEvent.Signal.setAutoInterlock.menu.operation
commandType: CommandEnum.Signal.setAutoInterlock
}; };
this.loading = true; this.loading = true;
@ -258,8 +255,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation, operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
commandType: CommandEnum.Signal.cancelAutoInterlock
}; };
this.loading = true; this.loading = true;
@ -279,8 +275,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.setAutoTrigger.menu.operation, operation: OperationEvent.Signal.setAutoTrigger.menu.operation
commandType: CommandEnum.Signal.setAutoTrigger
}; };
this.loading = true; this.loading = true;
@ -300,8 +295,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation, operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
commandType: CommandEnum.Signal.cancelAutoTrigger
}; };
this.doClose(); this.doClose();

View File

@ -64,7 +64,6 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'RouteDetail', name: 'RouteDetail',
@ -132,8 +131,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.detail.menu.operation, operation: OperationEvent.Signal.detail.menu.operation
commandType: CommandEnum.Signal.detail
}; };
this.loading = true; this.loading = true;

View File

@ -82,7 +82,6 @@ import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'RouteHandControl', name: 'RouteHandControl',
@ -264,8 +263,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation, operation: OperationEvent.Signal.humanControl.menu.operation
commandType: CommandEnum.Signal.humanControl
}; };
this.loading = true; this.loading = true;
@ -285,8 +283,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation, operation: OperationEvent.Signal.atsAutoControl.menu.operation
commandType: CommandEnum.Signal.atsAutoControl
}; };
this.loading = true; this.loading = true;

View File

@ -55,7 +55,6 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'RouteLock', name: 'RouteLock',
@ -134,8 +133,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.lock.menu.operation, operation: OperationEvent.Signal.lock.menu.operation
commandType: CommandEnum.Signal.lock
}; };
this.loading = true; this.loading = true;

View File

@ -84,7 +84,6 @@
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date'; import { now } from '@/utils/date';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'SectionCmdControl', name: 'SectionCmdControl',
@ -360,15 +359,12 @@ export default {
if (this.operation == OperationEvent.Section.unlock.menu.operation) { if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/ /** 区段解封*/
operate.operation = OperationEvent.Section.unlock.confirm2.operation; operate.operation = OperationEvent.Section.unlock.confirm2.operation;
operate.commandType = Commands.Section.unlock;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) { } else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/ /** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.confirm2.operation; operate.operation = OperationEvent.Section.fault.confirm2.operation;
operate.commandType = Commands.Section.fault;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) { } else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/ /** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation; operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
operate.commandType = Commands.Section.axlePreReset;
} }
this.setMessage(''); this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });

View File

@ -37,7 +37,6 @@
<script> <script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'SectionControl', name: 'SectionControl',
@ -127,8 +126,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
operation: OperationEvent.Section.lock.menu.operation, operation: OperationEvent.Section.lock.menu.operation
commandType: CommandEnum.Section.lock
}; };
this.loading = true; this.loading = true;
@ -148,8 +146,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
operation: OperationEvent.Section.split.menu.operation, operation: OperationEvent.Section.split.menu.operation
commandType: CommandEnum.Section.split
}; };
this.loading = true; this.loading = true;
@ -169,8 +166,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
operation: OperationEvent.Section.active.menu.operation, operation: OperationEvent.Section.active.menu.operation
commandType: CommandEnum.Section.active
}; };
this.loading = true; this.loading = true;

View File

@ -99,7 +99,6 @@
import { OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
import ConfirmControlSpeed from './childDialog/confirmControlSpeed'; import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
import { now } from '@/utils/date'; import { now } from '@/utils/date';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'SectionCmdSpeed', name: 'SectionCmdSpeed',
@ -477,19 +476,15 @@ export default {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation; operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
operate.commandType = Commands.Section.setSpeed;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) { } else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/ /** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation; operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
operate.commandType = Commands.Section.cancelSpeed;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) { } else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/ /** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation; operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
operate.commandType = Commands.Switch.setSpeed;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) { } else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/ /** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation; operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
operate.commandType = Commands.Switch.cancelSpeed;
} }
this.setMessage(''); this.setMessage('');

View File

@ -82,7 +82,6 @@
<script> <script>
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
@ -215,7 +214,6 @@ export default {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation, operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
commandType: CommandEnum.StationStand.setBackStrategy,
val: `${this.strategy}` val: `${this.strategy}`
}; };

View File

@ -28,7 +28,6 @@
<script> <script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'StandDetainTrain', name: 'StandDetainTrain',
@ -126,8 +125,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation, operation: OperationEvent.StationStand.setDetainTrain.menu.operation
commandType: CommandEnum.StationStand.setDetainTrain
}; };
this.loading = true; this.loading = true;
@ -148,8 +146,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
commandType: CommandEnum.StationStand.cancelDetainTrain
}; };
this.loading = true; this.loading = true;
@ -170,8 +167,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation, operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
commandType: CommandEnum.StationStand.cancelDetainTrainForce
}; };
this.loading = true; this.loading = true;
@ -192,8 +188,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation, operation: OperationEvent.StationStand.earlyDeparture.menu.operation
commandType: CommandEnum.StationStand.earlyDeparture
}; };
this.loading = true; this.loading = true;
@ -214,7 +209,6 @@ export default {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setJumpStop.menu.operation, operation: OperationEvent.StationStand.setJumpStop.menu.operation,
commandType: CommandEnum.StationStand.setJumpStop,
val: this.selected.direction // , 01: /02: val: this.selected.direction // , 01: /02:
}; };
@ -236,7 +230,6 @@ export default {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
commandType: CommandEnum.StationStand.cancelJumpStop,
val: this.selected.direction // , 01: /02: val: this.selected.direction // , 01: /02:
}; };

View File

@ -57,7 +57,6 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'StandDetainTrainAll', name: 'StandDetainTrainAll',
@ -158,7 +157,6 @@ export default {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation, operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
commandType: CommandEnum.StationStand.cancelDetainTrainAll,
val: this.upDown val: this.upDown
}; };

View File

@ -79,7 +79,6 @@
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date'; import { now } from '@/utils/date';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'StationCmdControl', name: 'StationCmdControl',
@ -317,11 +316,9 @@ export default {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) { if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/ /** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation; operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
operate.commandType = Commands.Station.powerUnLock;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) { } else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/ /** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation; operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
operate.commandType = Commands.Station.execKeyOperationTest;
} }
this.setMessage(''); this.setMessage('');

View File

@ -29,7 +29,6 @@
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'StationHumanControlAll', name: 'StationHumanControlAll',
@ -84,8 +83,7 @@ export default {
send: true, send: true,
type: MapDeviceType.Station.type, type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label, label: MapDeviceType.Station.label,
operation: OperationEvent.Station.humanControlALL.menu.operation, operation: OperationEvent.Station.humanControlALL.menu.operation
commandType: CommandEnum.Station.humanControlALL
}; };
this.loading = true; this.loading = true;

View File

@ -41,7 +41,6 @@
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'StationSetRouteControlAll', name: 'StationSetRouteControlAll',
@ -103,7 +102,6 @@ export default {
type: MapDeviceType.Station.type, type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label, label: MapDeviceType.Station.label,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation, operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
commandType: CommandEnum.Station.atsAutoControlALL,
val: this.mode val: this.mode
}; };

View File

@ -84,7 +84,6 @@
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date'; import { now } from '@/utils/date';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'SwitchCmdControl', name: 'SwitchCmdControl',
@ -377,19 +376,15 @@ export default {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) { if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/ /** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.confirm2.operation; operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
operate.commandType = Commands.Switch.unlock;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) { } else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/ /** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.confirm2.operation; operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
operate.commandType = Commands.Switch.unblock;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) { } else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/ /** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.confirm2.operation; operate.operation = OperationEvent.Switch.fault.confirm2.operation;
operate.commandType = Commands.Switch.fault;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) { } else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/ /** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation; operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
operate.commandType = Commands.Switch.axlePreReset;
} }
this.setMessage(''); this.setMessage('');

View File

@ -47,7 +47,6 @@
<script> <script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'SwitchControl', name: 'SwitchControl',
@ -155,8 +154,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.lock.menu.operation, operation: OperationEvent.Switch.lock.menu.operation
commandType: CommandEnum.Switch.lock
}; };
this.loading = true; this.loading = true;
@ -176,8 +174,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.block.menu.operation, operation: OperationEvent.Switch.block.menu.operation
commandType: CommandEnum.Switch.block
}; };
this.loading = true; this.loading = true;
@ -197,8 +194,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.turnout.menu.operation, operation: OperationEvent.Switch.turnout.menu.operation
commandType: CommandEnum.Switch.turnout
}; };
this.loading = true; this.loading = true;
@ -218,8 +214,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.turnoutForce.menu.operation, operation: OperationEvent.Switch.turnoutForce.menu.operation
commandType: CommandEnum.Switch.turnoutForce
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -238,8 +233,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.split.menu.operation, operation: OperationEvent.Switch.split.menu.operation
commandType: CommandEnum.Switch.split
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -258,8 +252,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.active.menu.operation, operation: OperationEvent.Switch.active.menu.operation
commandType: CommandEnum.Switch.active
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {

View File

@ -84,10 +84,9 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import CommandEnum from '@/scripts/plugin/CommandEnum';
import ConfirmTrain from './childDialog/confirmTrain'; import ConfirmTrain from './childDialog/confirmTrain';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import OperateHandler from '@/scripts/plugin/OperateHandler'; import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
export default { export default {
name: 'TrainControl', name: 'TrainControl',
@ -350,10 +349,8 @@ export default {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) { if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainNoChange.operation; operate.operation = OperationEvent.Train.addTrainId.trainNoChange.operation;
operate.commandType = Commands.Train.addTrainId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) { } else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation; operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
operate.commandType = Commands.Train.editTrainId;
} }
OperateHandler.backStep(1); OperateHandler.backStep(1);
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
@ -399,7 +396,6 @@ export default {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation, operation: OperationEvent.Train.addTrainId.menu.operation,
commandType: CommandEnum.Train.addTrainId,
messages: [this.$t('tip.addTrainIdTip')], messages: [this.$t('tip.addTrainIdTip')],
val: `${model.groupNumber}::${model.trainType}::${model.serviceNumber}::${model.tripNumber}::${model.targetCode}` val: `${model.groupNumber}::${model.trainType}::${model.serviceNumber}::${model.tripNumber}::${model.targetCode}`
}; };
@ -430,7 +426,6 @@ export default {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation, operation: OperationEvent.Train.editTrainId.menu.operation,
commandType: CommandEnum.Train.editTrainId,
messages: [this.$t('tip.editTrainIdTip')], messages: [this.$t('tip.editTrainIdTip')],
val: `${this.formModel.trainType}::${this.formModel.tripNumber}` val: `${this.formModel.trainType}::${this.formModel.tripNumber}`
}; };

View File

@ -40,7 +40,6 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'RouteCreate', name: 'RouteCreate',
@ -121,7 +120,6 @@ export default {
send: true, send: true,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
operation: OperationEvent.Section.newtrain.menu.operation, operation: OperationEvent.Section.newtrain.menu.operation,
commandType: CommandEnum.Section.newtrain,
val: '' + this.direction + '::' + this.trainCode val: '' + this.direction + '::' + this.trainCode
}; };
this.loading = true; this.loading = true;

View File

@ -34,7 +34,6 @@ import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
// import { getPublishMapTrainNos } from '@/api/runplan'; // import { getPublishMapTrainNos } from '@/api/runplan';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'TrainDelete', name: 'TrainDelete',
@ -130,7 +129,6 @@ export default {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.menu.operation, operation: OperationEvent.Train.delTrainId.menu.operation,
commandType: CommandEnum.Train.delTrainId,
val: this.formModel.groupNumber val: this.formModel.groupNumber
}; };

View File

@ -29,7 +29,6 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'TrainMove', name: 'TrainMove',
@ -92,8 +91,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainNo.menu.operation, operation: OperationEvent.Train.editTrainNo.menu.operation
commandType: CommandEnum.Train.editTrainNo
}; };
this.loading = true; this.loading = true;

View File

@ -75,7 +75,6 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'TrainMove', name: 'TrainMove',
@ -154,8 +153,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.moveTrainId.menu.operation, operation: OperationEvent.Train.moveTrainId.menu.operation
commandType: CommandEnum.Train.moveTrainId
}; };
this.loading = true; this.loading = true;

View File

@ -76,7 +76,6 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'TrainSwitch', name: 'TrainSwitch',
@ -159,8 +158,7 @@ export default {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.moveTrainId.menu.operation, operation: OperationEvent.Train.moveTrainId.menu.operation
commandType: CommandEnum.Train.moveTrainId
}; };
this.loading = true; this.loading = true;

View File

@ -32,7 +32,6 @@
<script> <script>
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic'; import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'TwoConfirmation', name: 'TwoConfirmation',
@ -119,13 +118,10 @@ export default {
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) { if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation; operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
operate.commandType = Commands.StationControl.forcedStationControl;
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) { } else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation; operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
operate.commandType = Commands.StationControl.requestStationControl;
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) { } else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation; operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
operate.commandType = Commands.StationControl.requestCentralControl;
} }
this.doClose(); this.doClose();

View File

@ -16,7 +16,6 @@ import SectionCmdControl from './dialog/sectionCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl'; import SpeedCmdControl from './dialog/speedCmdControl';
import TrainCreate from './dialog/trainCreate'; import TrainCreate from './dialog/trainCreate';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
@ -225,11 +224,8 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label, label: MapDeviceType.Section.label,
operation: OperationEvent.Section.stoppage.menu.operation, operation: OperationEvent.Section.stoppage.menu.operation
commandType: CommandEnum.Section.stoppage,
commandParams: null
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -248,8 +244,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label, label: MapDeviceType.Section.label,
operation: OperationEvent.Section.cancelStoppage.menu.operation, operation: OperationEvent.Section.cancelStoppage.menu.operation
commandType: CommandEnum.Section.cancelStoppage
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -381,8 +376,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label, label: MapDeviceType.Section.label,
operation: OperationEvent.Section.cancelSpeed.menu.operation, operation: OperationEvent.Section.cancelSpeed.menu.operation
commandType: CommandEnum.Section.query
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {

View File

@ -20,13 +20,10 @@ import RouteCmdControl from './dialog/routeCmdControl';
import RouteHandControl from './dialog/routeHandControl'; import RouteHandControl from './dialog/routeHandControl';
import RouteDetail from './dialog/routeDetail'; import RouteDetail from './dialog/routeDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
//
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import MenuContextHandler from '@/scripts/plugin/MenuContextHandler';
export default { export default {
name: 'SignalMenu', name: 'SignalMenu',
@ -57,77 +54,66 @@ export default {
label: this.$t('menu.menuSignal.routeSelect'), label: this.$t('menu.menuSignal.routeSelect'),
handler: this.arrangementRoute, handler: this.arrangementRoute,
disabledCallback: MenuDisabledState.Signal.arrangementRoute, disabledCallback: MenuDisabledState.Signal.arrangementRoute,
commandType:Commands.Signal.arrangementRoute,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.routeCancel'), label: this.$t('menu.menuSignal.routeCancel'),
handler: this.cancelTrainRoute, handler: this.cancelTrainRoute,
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute, disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
commandType:Commands.Signal.cancelTrainRoute,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.signalBlock'), label: this.$t('menu.menuSignal.signalBlock'),
handler: this.lock, handler: this.lock,
disabledCallback: MenuDisabledState.Signal.lock, disabledCallback: MenuDisabledState.Signal.lock,
commandType:Commands.Signal.lock,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.signalDeblock'), label: this.$t('menu.menuSignal.signalDeblock'),
handler: this.unlock, handler: this.unlock,
disabledCallback: MenuDisabledState.Signal.unlock, disabledCallback: MenuDisabledState.Signal.unlock,
commandType:Commands.Signal.unlock,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.signalReopen'), label: this.$t('menu.menuSignal.signalReopen'),
handler: this.reopenSignal, handler: this.reopenSignal,
disabledCallback: MenuDisabledState.Signal.reopenSignal, disabledCallback: MenuDisabledState.Signal.reopenSignal,
commandType:Commands.Signal.reopenSignal,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.guideRouteHandle'), label: this.$t('menu.menuSignal.guideRouteHandle'),
handler: this.guide, handler: this.guide,
disabledCallback: MenuDisabledState.Signal.guide, disabledCallback: MenuDisabledState.Signal.guide,
commandType:Commands.Signal.guide,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.setInterlockAutoRoute'), label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
handler: this.setAutoInterlock, handler: this.setAutoInterlock,
disabledCallback: MenuDisabledState.Signal.setAutoInterlock, disabledCallback: MenuDisabledState.Signal.setAutoInterlock,
commandType:Commands.Signal.setAutoInterlock,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'), label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
handler: this.cancelAutoInterlock, handler: this.cancelAutoInterlock,
disabledCallback: MenuDisabledState.Signal.cancelAutoInterlock, disabledCallback: MenuDisabledState.Signal.cancelAutoInterlock,
commandType:Commands.Signal.cancelAutoInterlock,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'), label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
handler: this.setAutoTrigger, handler: this.setAutoTrigger,
disabledCallback: MenuDisabledState.Signal.setAutoTrigger, disabledCallback: MenuDisabledState.Signal.setAutoTrigger,
commandType:Commands.Signal.setAutoTrigger,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'), label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger, handler: this.cancelAutoTrigger,
disabledCallback: MenuDisabledState.Signal.cancelAutoTrigger, disabledCallback: MenuDisabledState.Signal.cancelAutoTrigger,
commandType:Commands.Signal.cancelAutoTrigger,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.signalOff'), label: this.$t('menu.menuSignal.signalOff'),
handler: this.signalClose, handler: this.signalClose,
disabledCallback: MenuDisabledState.Signal.signalClose, disabledCallback: MenuDisabledState.Signal.signalClose,
commandType:Commands.Signal.signalClose,
auth: { station: true, center: false } auth: { station: true, center: false }
} }
], ],
@ -136,70 +122,60 @@ export default {
label: this.$t('menu.menuSignal.routeSelect'), label: this.$t('menu.menuSignal.routeSelect'),
handler: this.arrangementRoute, handler: this.arrangementRoute,
disabledCallback: MenuDisabledState.Signal.arrangementRoute, disabledCallback: MenuDisabledState.Signal.arrangementRoute,
commandType:Commands.Signal.arrangementRoute,
auth: { station: false, center: true } auth: { station: false, center: true }
}, },
{ {
label: this.$t('menu.menuSignal.routeCancel'), label: this.$t('menu.menuSignal.routeCancel'),
handler: this.cancelTrainRoute, handler: this.cancelTrainRoute,
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute, disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
commandType:Commands.Signal.cancelTrainRoute,
auth: { station: false, center: true } auth: { station: false, center: true }
}, },
{ {
label: this.$t('menu.menuSignal.signalBlock'), label: this.$t('menu.menuSignal.signalBlock'),
handler: this.lock, handler: this.lock,
disabledCallback: MenuDisabledState.Signal.lock, disabledCallback: MenuDisabledState.Signal.lock,
commandType:Commands.Signal.lock,
auth: { station: false, center: true } auth: { station: false, center: true }
}, },
{ {
label: this.$t('menu.menuSignal.signalDeblock'), label: this.$t('menu.menuSignal.signalDeblock'),
handler: this.unlock, handler: this.unlock,
disabledCallback: MenuDisabledState.Signal.unlock, disabledCallback: MenuDisabledState.Signal.unlock,
commandType:Commands.Signal.unlock,
auth: { station: false, center: true } auth: { station: false, center: true }
}, },
{ {
label: this.$t('menu.menuSignal.signalOff'), label: this.$t('menu.menuSignal.signalOff'),
handler: this.signalClose, handler: this.signalClose,
disabledCallback: MenuDisabledState.Signal.signalClose, disabledCallback: MenuDisabledState.Signal.signalClose,
commandType:Commands.Signal.signalClose,
auth: { station: false, center: true } auth: { station: false, center: true }
}, },
{ {
label: this.$t('menu.menuSignal.signalReopen'), label: this.$t('menu.menuSignal.signalReopen'),
handler: this.reopenSignal, handler: this.reopenSignal,
disabledCallback: MenuDisabledState.Signal.reopenSignal, disabledCallback: MenuDisabledState.Signal.reopenSignal,
commandType:Commands.Signal.reopenSignal,
auth: { station: false, center: true } auth: { station: false, center: true }
}, },
{ {
label: this.$t('menu.menuSignal.routeGuide'), label: this.$t('menu.menuSignal.routeGuide'),
handler: this.guide, handler: this.guide,
disabledCallback: MenuDisabledState.Signal.guide, disabledCallback: MenuDisabledState.Signal.guide,
commandType:Commands.Signal.guide,
auth: { station: false, center: false } auth: { station: false, center: false }
}, },
{ {
label: this.$t('menu.menuSignal.humanControl'), label: this.$t('menu.menuSignal.humanControl'),
handler: this.humanControl, handler: this.humanControl,
disabledCallback: MenuDisabledState.Signal.humanControl, disabledCallback: MenuDisabledState.Signal.humanControl,
commandType:Commands.Signal.humanControl,
auth: { station: false, center: true } auth: { station: false, center: true }
}, },
{ {
label: this.$t('menu.menuSignal.atsAutoControl'), label: this.$t('menu.menuSignal.atsAutoControl'),
handler: this.atsAutoControl, handler: this.atsAutoControl,
disabledCallback: MenuDisabledState.Signal.atsAutoControl, disabledCallback: MenuDisabledState.Signal.atsAutoControl,
commandType:Commands.Signal.atsAutoControl,
auth: { station: false, center: true } auth: { station: false, center: true }
}, },
{ {
label: this.$t('menu.menuSignal.queryRouteControlMode'), label: this.$t('menu.menuSignal.queryRouteControlMode'),
handler: this.detail, handler: this.detail,
disabledCallback: MenuDisabledState.Signal.detail, disabledCallback: MenuDisabledState.Signal.detail,
commandType:Commands.Signal.detail,
auth: { station: true, center: true } auth: { station: true, center: true }
} }
] ]
@ -208,14 +184,12 @@ export default {
{ {
label: this.$t('menu.menuSignal.setFault'), label: this.$t('menu.menuSignal.setFault'),
handler: this.setStoppage, handler: this.setStoppage,
disabledCallback: MenuDisabledState.Signal.setStoppage, disabledCallback: MenuDisabledState.Signal.setStoppage
commandType:Commands.Signal.setStoppage
}, },
{ {
label: this.$t('menu.menuSignal.cancelFault'), label: this.$t('menu.menuSignal.cancelFault'),
handler: this.cancelStoppage, handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Signal.cancelStoppage, disabledCallback: MenuDisabledState.Signal.cancelStoppage
commandType:Commands.Signal.cancelStoppage
} }
] ]
}; };
@ -247,8 +221,7 @@ export default {
}, },
initMenu() { initMenu() {
// //
this.menu = MenuContextHandler.menuFiltration(this.menuNormal); this.menu = menuFiltration(this.menuNormal);
// this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) { if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce]; this.menu = [...this.menu, ...this.menuForce];
} }
@ -258,9 +231,7 @@ export default {
this.menu = this.menuForce; this.menu = this.menuForce;
} }
// debugger; this.menu = menuConvert(this.menu);
this.menu = MenuContextHandler.covert(this.menu);
// this.menu = menuConvert(this.menu);
}, },
doShow(point) { doShow(point) {
@ -283,8 +254,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label, label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.stoppage.menu.operation, operation: OperationEvent.Signal.stoppage.menu.operation
commandType: CommandEnum.Signal.stoppage
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -304,8 +274,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label, label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.cancelStoppage.menu.operation, operation: OperationEvent.Signal.cancelStoppage.menu.operation
commandType: CommandEnum.Signal.cancelStoppage
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -325,8 +294,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label, label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.arrangementRoute.menu.operation, operation: OperationEvent.Signal.arrangementRoute.menu.operation
commandType: CommandEnum.Signal.query
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
@ -366,8 +334,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label, label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.lock.menu.operation, operation: OperationEvent.Signal.lock.menu.operation
commandType: CommandEnum.Signal.lock
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -515,8 +482,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label, label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.humanControl.menu.operation, operation: OperationEvent.Signal.humanControl.menu.operation
commandType: CommandEnum.Signal.query
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
@ -537,8 +503,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label, label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.atsAutoControl.menu.operation, operation: OperationEvent.Signal.atsAutoControl.menu.operation
commandType: CommandEnum.Signal.query
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
@ -559,8 +524,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label, label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.detail.menu.operation, operation: OperationEvent.Signal.detail.menu.operation
commandType: CommandEnum.Signal.query
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {

View File

@ -18,7 +18,6 @@ import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
@ -166,8 +165,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Station.type, type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label, label: MapDeviceType.Station.label,
operation: OperationEvent.Station.stoppage.menu.operation, operation: OperationEvent.Station.stoppage.menu.operation
commandType: CommandEnum.Station.stoppage
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -187,8 +185,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Station.type, type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label, label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelStoppage.menu.operation, operation: OperationEvent.Station.cancelStoppage.menu.operation
commandType: CommandEnum.Station.cancelStoppage
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -208,8 +205,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Station.type, type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label, label: MapDeviceType.Station.label,
operation: OperationEvent.Station.setAutoTrigger.menu.operation, operation: OperationEvent.Station.setAutoTrigger.menu.operation
commandType: CommandEnum.Station.setAutoTrigger
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -227,8 +223,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Station.type, type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label, label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation, operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
commandType: CommandEnum.Station.cancelAutoTrigger
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {

View File

@ -24,7 +24,6 @@ import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'StationStandMenu', name: 'StationStandMenu',
@ -248,8 +247,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label, label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.stoppage.menu.operation, operation: OperationEvent.StationStand.stoppage.menu.operation
commandType: CommandEnum.StationStand.query
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -269,8 +267,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label, label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation, operation: OperationEvent.StationStand.cancelStoppage.menu.operation
commandType: CommandEnum.StationStand.cancelStoppage
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -387,8 +384,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label, label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setStopTime.menu.operation, operation: OperationEvent.StationStand.setStopTime.menu.operation
commandType: CommandEnum.StationStand.query
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
@ -411,8 +407,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label, label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setRunLevel.menu.operation, operation: OperationEvent.StationStand.setRunLevel.menu.operation
commandType: CommandEnum.StationStand.query
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
@ -449,8 +444,7 @@ export default {
send: true, send: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation, operation: OperationEvent.StationStand.setBackStrategy.menu.operation
commandType: CommandEnum.StationStand.query
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
@ -474,8 +468,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label, label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.detail.menu.operation, operation: OperationEvent.StationStand.detail.menu.operation
commandType: CommandEnum.StationStand.detail
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {

View File

@ -14,7 +14,6 @@ import SwitchControl from './dialog/switchControl';
import SwitchCmdControl from './dialog/switchCmdControl'; import SwitchCmdControl from './dialog/switchCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl'; import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
@ -251,8 +250,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.stoppage.menu.operation, operation: OperationEvent.Switch.stoppage.menu.operation
commandType: CommandEnum.Switch.stoppage
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -272,8 +270,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.cancelStoppage.menu.operation, operation: OperationEvent.Switch.cancelStoppage.menu.operation
commandType: CommandEnum.Switch.cancelStoppage
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -472,8 +469,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.cancelSpeed.menu.operation, operation: OperationEvent.Switch.cancelSpeed.menu.operation
commandType: CommandEnum.Switch.cancelSpeed
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {

View File

@ -17,7 +17,6 @@ import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
import CommandEnum from '@/scripts/plugin/CommandEnum';
import TrainControl from './dialog/trainControl'; import TrainControl from './dialog/trainControl';
import TrainDelete from './dialog/trainDelete'; import TrainDelete from './dialog/trainDelete';
import TrainMove from './dialog/trainMove'; import TrainMove from './dialog/trainMove';
@ -169,8 +168,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label, label: MapDeviceType.Train.label,
operation: OperationEvent.Train.stoppage.menu.operation, operation: OperationEvent.Train.stoppage.menu.operation
commandType: CommandEnum.Train.stoppage
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -190,8 +188,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label, label: MapDeviceType.Train.label,
operation: OperationEvent.Train.cancelStoppage.menu.operation, operation: OperationEvent.Train.cancelStoppage.menu.operation
commandType: CommandEnum.Train.cancelStoppage
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -211,8 +208,7 @@ export default {
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label, label: MapDeviceType.Train.label,
operation: OperationEvent.Train.limitSpeed.menu.operation, operation: OperationEvent.Train.limitSpeed.menu.operation
commandType: CommandEnum.Train.limitSpeed
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {

View File

@ -61,7 +61,6 @@
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import CommandEnum from '@/scripts/plugin/CommandEnum';
export default { export default {
name: 'RequestControl', name: 'RequestControl',
@ -262,7 +261,6 @@ export default {
over: true, over: true,
type: MapDeviceType.StationControl.type, type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.agree.operation, operation: OperationEvent.StationControl.controlResponse.agree.operation,
commandType: this.$store.state.training.prdType == '01' ? Commands.StationControl.stationAgree : Commands.StationControl.centralAgree,
code: this.selection[0].code, code: this.selection[0].code,
val: this.commandId, val: this.commandId,
prdType: this.$store.state.training.prdType prdType: this.$store.state.training.prdType
@ -285,7 +283,6 @@ export default {
over: true, over: true,
type: MapDeviceType.StationControl.type, type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.refuse.operation, operation: OperationEvent.StationControl.controlResponse.refuse.operation,
commandType: this.$store.state.training.prdType == '01' ? Commands.StationControl.stationRefuse : Commands.StationControl.centralRefuse,
code: this.selection.length ? this.selection[0].code : '', code: this.selection.length ? this.selection[0].code : '',
val: this.commandId, val: this.commandId,
prdType: this.$store.state.training.prdType prdType: this.$store.state.training.prdType

View File

@ -1,136 +0,0 @@
export default {
Switch: {
cancelStoppage: {value: 999, label: '取消故障'},
stoppage: {value: 0, label: '道岔故障'},
locate: {value: 1, label: '道岔总定/定位操作'},
reverse: {value: 2, label: '道岔总反/反位操作'},
lock: {value: 3, label: '道岔单锁'},
unlock: {value: 4, label: '道岔解锁'},
block: {value: 5, label: '道岔封闭'},
unblock: {value: 6, label: '道岔解封'},
turnout: {value: 7, label: '转动'},
turnoutForce: {value: 8, label: '强制扳动'},
fault: {value: 9, label: '道岔故障解锁'},
axlePreReset: {value: 10, label: '计轴预复位'},
split: {value: 11, label: '切除'},
active: {value: 12, label: '激活'},
setSpeed: {value: 13, label: '设置速度'},
cancelSpeed: {value: 14, label: '取消速度'},
query: {value: 15, label: '查询区段详情'},
setLimitSpeed: {value: 16, label: '设置限速'},
alxeEffective: {value: 17, label: '确认计轴有效'},
guideLock: {value: 18, label: '引导总锁'}
},
// 控制模式操作
StationControl: {
cancelStoppage: {value: 999, label: '取消故障'},
stoppage: {value: 0, label: '故障'},
emergencyStationControl: {value: 1, label: '紧急站控'},
requestStationControl: {value: 2, label: '请求站控'},
forcedStationControl: {value: 3, label: '强行站控'},
requestCentralControl: {value: 4, label: '请求中控'},
centralAgree: {value: 5, label: '中心控同意'},
centralRefuse: {value: 6, label: '中心控拒绝'},
stationAgree: {value: 7, label: '车站控同意'},
stationRefuse: {value: 8, label: '车站控拒绝'}
},
// 信号机操作
Signal: {
cancelStoppage: {value: 999, label: '取消故障'},
stoppage: {value: 0, label: '故障'},
query: {value: 1, label: '查询进路'},
arrangementRoute: {value: 2, label: '排列进路'},
cancelTrainRoute: {value: 3, label: '取消进路'},
reopenSignal: {value: 4, label: '信号重开'},
humanTrainRoute: {value: 5, label: '人解列车进路 (总人解)'},
lock: {value: 6, label: '封锁'},
unlock: {value: 7, label: '解锁'},
guide: {value: 8, label: '引导'},
setAutoInterlock: {value: 9, label: '设置联锁自动进路'},
cancelAutoInterlock: {value: 10, label: '取消联锁自动进路'},
setAutoTrigger: {value: 11, label: '设置联锁自动触发'},
cancelAutoTrigger: {value: 12, label: '取消联锁自动触发'},
signalClose: {value: 13, label: '信号关灯'},
humanControl: {value: 14, label: '进路交人工控'},
atsAutoControl: {value: 15, label: '进路交自动控'},
detail: {value: 16, label: '查询进路状态'}
},
// 物理区段操作
Section: {
cancelStoppage: {value: 999, label: '取消故障'},
stoppage: {value: 0, label: '故障'},
alxeFailure: {value: 1, label: '设置计轴失效'},
query: {value: 1, label: '查询区段详情'},
fault: {value: 2, label: '区故解'},
lock: {value: 3, label: '封锁'},
unlock: {value: 4, label: '解锁'},
split: {value: 5, label: '切除'},
active: {value: 6, label: '激活'},
setSpeed: {value: 7, label: '设置速度'},
cancelSpeed: {value: 8, label: '取消速度'},
axlePreReset: {value: 9, label: '计轴预复位'},
detail: {value: 10, label: '设备状态'},
newtrain: {value: 11, label: '新建列车'},
alxeEffective: {value: 12, label: '确认计轴有效'},
setLimitSpeed: {value: 13, label: '设置临时限速'},
confirmLimit: {value: 14, label: '确认临时限速'}
},
// 站台
StationStand: {
cancelStoppage: {value: 999, label: '取消故障'},
stoppage: {value: 0, label: '故障'},
earlyDeparture: {value: 1, label: '提前发车'},
setJumpStop: {value: 2, label: '设置跳停'},
cancelJumpStop: {value: 3, label: '取消跳停'},
setDetainTrain: {value: 4, label: '设置扣车'},
cancelDetainTrain: {value: 5, label: '取消扣车'},
cancelDetainTrainForce: {value: 6, label: '强制取消扣车'},
detail: {value: 7, label: '站台详细信息'},
cancelDetainTrainAll: {value: 8, label: '全线取消扣车'},
setStopTime: {value: 9, label: '设置停站时间'},
setRunLevel: {value: 10, label: '设置运行等级'},
setBackStrategy: {value: 11, label: '设置折返策略'},
setDetainTrainAll: {value: 12, label: '设置全线扣车'}
},
Station: {
cancelStoppage: {value: 999, label: '取消故障'},
stoppage: {value: 0, label: '故障'},
setAutoTrigger: {value: 1, label: '全站设置联锁自动触发'},
cancelAutoTrigger: {value: 2, label: '全站取消联锁自动触发'},
powerUnLock: {value: 3, label: '上电解锁'},
execKeyOperationTest: {value: 4, label: '执行关键操作测试'},
humanControlALL: {value: 5, label: '所有进路自排关'},
atsAutoControlALL: {value: 6, label: '所有进路自排开'},
split: {value: 7, label: '区段切除'},
active: {value: 8, label: '区段激活'}
},
// 列车
Train: {
cancelStoppage: {value: 999, label: '取消故障'},
stoppage: {value: 0, label: '故障'},
addTrainId: {value: 1, label: '添加列车识别号'},
editTrainId: {value: 2, label: '修改列车识别号'},
delTrainId: {value: 3, label: '删除列车识别号'},
moveTrainId: {value: 4, label: '移动列车识别号'},
switchTrainId: {value: 5, label: '交换列车识别号'},
editTrainNo: {value: 6, label: '修改车组号'},
limitSpeed: {value: 7, label: '限速行驶'},
setPlanTrainId: {value: 8, label: '设置计划车'},
addPlanTrainId: {value: 9, label: '添加计划车'},
movetypelyTrainId: {value: 10, label: '平移计划车'},
deletePlanTrainId: {value: 11, label: '删除计划车'},
destinationTrainId: {value: 12, label: '设目的地车'},
artificialTrainId: {value: 13, label: '设人工车'}
},
LimitControl: {
CancelAllLimit: {value: 1, label: '取消全线临时限速'}
}
};

View File

@ -1,81 +0,0 @@
import { MapDeviceType } from '@/scripts/ConstDic';
import { sendCommand } from '@/api/jmap/training';
import router from '@/router';
class CommandHandle {
constructor() {
this.data = [];
this.instructionMap = {
1: {
type: MapDeviceType.Signal.type,
operation: 1
},
2: {
type: MapDeviceType.Signal.type,
operation: 2
},
8: {
type: MapDeviceType.StationStand.type,
operation: 8
}
};
}
getInstruction(operate) {
return this.instructionMap[operate.commandType.value] || {};
}
getCommand(operates) {
const operate = operates[operates.length - 1] || {};
if (operate && operate.commandType) {
const instruction = this.getInstruction(operate);
if (instruction) {
const command = {
...instruction,
code: operate.code,
val: operate.val,
over: operate.over
};
if (!command.code) {
operates.forEach(elem => {
if (elem.code) {
command.code = elem.code;
}
});
}
if (!command.val) {
operates.forEach(elem => {
if (elem.val) {
command.val = elem.val;
}
});
}
return command;
} else {
return { error: true };
}
}
return null;
}
checkDisabled(menu, selected) {
}
execute(command) {
return new Promise((resolve, reject) => {
const group = router.currentRoute.query.group;
sendCommand(group, command).then((response) => {
resolve(response);
}).catch(error => {
reject(error);
});
});
}
}
export default new CommandHandle();

View File

@ -1,88 +0,0 @@
import store from '@/store';
import CommandHandler from './CommandHandler';
class MenuContextHandler {
constructor() {
this.operates = []; // 操作数据
this.command = {}; // 命令对象
this.SystemType = {
'01': 'local', // 现地工作站
'02': 'central' // 中心调度工作站
};
this.StationControlType = {
'01': 'center', // 中控
'02': 'station', // 站控
'03': 'station'
};
}
getCurrentStateObject() {
return store.getters['menuOperation/selected'];
}
getStationControl(selected) {
let control;
if (selected._type == 'StationStand') {
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
} else if (selected._type == 'Station') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
} else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
}
return control;
}
getPrdType() {
return store.state.training.prdType;
}
menuFiltration(menuList) {
const selected = this.getCurrentStateObject();
let menu = [];
const control = this.getStationControl(selected);
if (control) {
if ( this.getPrdType() != '') {
const type = this.SystemType[this.getPrdType()];
const status = this.StationControlType[control.status];
menu = [...menuList[type]];
debugger;
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.type === 'separator') {
elem.show = true;
return;
}
if (elem.auth.constructor === Object) {
elem.show = true;
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
elem.show = false;
}
elem.defaultDisabled = !elem.auth[status];
}
});
}
}
}
return menu;
}
covert(menuList) {
if (menuList.constructor === Array) {
menuList.forEach(elem => {
if (elem.type === 'separator') {
elem.show = true;
return;
}
CommandHandler.checkDisabled(elem, this.getCurrentStateObject());
// if (elem.disabledCallback.constructor === Function) {
// elem.disabled = elem.defaultDisabled;
// if (!elem.defaultDisabled) {
// elem.disabled = elem.disabledCallback();
// }
// }
});
}
return menuList;
}
}
export default new MenuContextHandler();

View File

@ -1,8 +0,0 @@
export default class Operate {
constructor(operation) {
this.operate = {
operation: operation
};
}
}

View File

@ -1,8 +1,147 @@
import OperateHandler1 from './OperateHandler1.js'; import store from '@/store';
import OperateHandler2 from './OperateHandler2.js'; import router from '@/router';
import Cookies from 'js-cookie'; import OperateConverter from '@/scripts/plugin/OperateConvert2Command';
import { TrainingMode } from '@/scripts/ConstDic';
import { getConverter } from '@/scripts/plugin/Converter/manager';
import { sendTrainingNextStep } from '@/api/jmap/training';
import { Message } from 'element-ui';
import LangStorage from '@/utils/lang';
const OPERATEHANDLER_KEY = 'OperateHandler'; var OperateHandler = function () {
Cookies.set(OPERATEHANDLER_KEY, 1); };
export default Cookies.get(OPERATEHANDLER_KEY) ? OperateHandler1 : OperateHandler2; OperateHandler.prototype = {
/** 操作组 */
operates: [],
backStep: function(num) {
this.operates = this.operates.slice(0, num);
},
/** 清空操作组 */
cleanOperates: function () {
this.operates.splice(0, this.operates.length);
},
/**
* 判断操作步骤是否正确
*/
judge: function (operate) {
let valid = false;
const steps = this.getSteps();
const order = this.getOrder();
if (order >= steps) {
return valid;
}
const standard = steps[order];
if (operate && standard && operate.code == standard.code && operate.type == standard.type &&
operate.operation == standard.operation &&
operate.val == standard.val) {
valid = true;
}
return valid;
},
/**
* 根据模式验证操作步骤
*/
validate: function (operate) {
// 按钮操作之后,第二步错误操作菜单的情况,需要直接返回
if ((this.operates.length && operate.start === true) && (this.operates[0].type === 'mbm')) {
return false;
}
// 如果是正常的第一步操作需要清空operates数组
if (operate.type === 'mbm' || operate.type === 'bar' || operate.start === true) {
this.cleanOperates();
}
this.operates.push(operate);
// 预处理
const converter = getConverter(this.operates);
if (converter && converter.preHandle instanceof Function) {
operate = converter.preHandle(this.operates);
}
let valid = true;
const mode = this.getTrainingMode();
if (TrainingMode.EDIT === mode) {
// 编辑制作模式
if (this.getOperateBreakStatus()) {
valid = false;
const tip = LangStorage.getLang() == 'en' ? 'Please enter a hint and click next' : '请输入提示并点击下一步';
Message.error(tip);
this.operates.pop();
return valid;
}
if (this.getTrainingStart()) {
store.dispatch('training/setTempStep', operate);
}
} else if (TrainingMode.TEACH === mode || TrainingMode.PRACTICE === mode) {
// 教学模式/练习模式
if (this.getTrainingStart()) {
valid = this.judge(operate);
} else {
this.cleanOperates();
valid = false;
}
}
// 发送每一步的步骤数据;
const basicInfo = store.getters['training/basicInfo'];
if (basicInfo.id && valid) {
const group = router.currentRoute.query.group;
sendTrainingNextStep({ trainingId: basicInfo.id, operate: operate }, group);
}
if (!valid) {
// 如果操作校验不正确,回退
this.operates.pop();
} else {
if (operate.cancel === true) {
this.cleanOperates();
}
}
return valid;
},
handle: function (operate) {
return new Promise((resolve, reject) => {
const rtn = { valid: false, response: null };
const valid = this.validate(operate);
rtn.valid = valid;
if (valid) {
// 改变状态开始请求
OperateConverter.convertAndSend(operate).then(response => {
rtn.response = response;
resolve(rtn);
}).catch(error => {
reject(error);
});
} else {
resolve(rtn);
}
});
},
getTrainingMode: function () {
return store.state.training.mode;
},
getSteps: function () {
return store.state.training.steps;
},
getOrder: function () {
return store.state.training.order;
},
getTrainingStart: function () {
return store.state.training.started;
},
getOperateBreakStatus: function () {
return store.state.menuOperation.break;
}
};
export default new OperateHandler();

View File

@ -1,147 +0,0 @@
import store from '@/store';
import router from '@/router';
import OperateConverter from '@/scripts/plugin/OperateConvert2Command';
import { TrainingMode } from '@/scripts/ConstDic';
import { getConverter } from '@/scripts/plugin/Converter/manager';
import { sendTrainingNextStep } from '@/api/jmap/training';
import { Message } from 'element-ui';
import LangStorage from '@/utils/lang';
var OperateHandler = function () {
};
OperateHandler.prototype = {
/** 操作组 */
operates: [],
backStep: function(num) {
this.operates = this.operates.slice(0, num);
},
/** 清空操作组 */
cleanOperates: function () {
this.operates.splice(0, this.operates.length);
},
/**
* 判断操作步骤是否正确
*/
judge: function (operate) {
let valid = false;
const steps = this.getSteps();
const order = this.getOrder();
if (order >= steps) {
return valid;
}
const standard = steps[order];
if (operate && standard && operate.code == standard.code && operate.type == standard.type &&
operate.operation == standard.operation &&
operate.val == standard.val) {
valid = true;
}
return valid;
},
/**
* 根据模式验证操作步骤
*/
validate: function (operate) {
// 按钮操作之后,第二步错误操作菜单的情况,需要直接返回
if ((this.operates.length && operate.start === true) && (this.operates[0].type === 'mbm')) {
return false;
}
// 如果是正常的第一步操作需要清空operates数组
if (operate.type === 'mbm' || operate.type === 'bar' || operate.start === true) {
this.cleanOperates();
}
this.operates.push(operate);
// 预处理
const converter = getConverter(this.operates);
if (converter && converter.preHandle instanceof Function) {
operate = converter.preHandle(this.operates);
}
let valid = true;
const mode = this.getTrainingMode();
if (TrainingMode.EDIT === mode) {
// 编辑制作模式
if (this.getOperateBreakStatus()) {
valid = false;
const tip = LangStorage.getLang() == 'en' ? 'Please enter a hint and click next' : '请输入提示并点击下一步';
Message.error(tip);
this.operates.pop();
return valid;
}
if (this.getTrainingStart()) {
store.dispatch('training/setTempStep', operate);
}
} else if (TrainingMode.TEACH === mode || TrainingMode.PRACTICE === mode) {
// 教学模式/练习模式
if (this.getTrainingStart()) {
valid = this.judge(operate);
} else {
this.cleanOperates();
valid = false;
}
}
// 发送每一步的步骤数据;
const basicInfo = store.getters['training/basicInfo'];
if (basicInfo.id && valid) {
const group = router.currentRoute.query.group;
sendTrainingNextStep({ trainingId: basicInfo.id, operate: operate }, group);
}
if (!valid) {
// 如果操作校验不正确,回退
this.operates.pop();
} else {
if (operate.cancel === true) {
this.cleanOperates();
}
}
return valid;
},
handle: function (operate) {
return new Promise((resolve, reject) => {
const rtn = { valid: false, response: null };
const valid = this.validate(operate);
rtn.valid = valid;
if (valid) {
// 改变状态开始请求
OperateConverter.convertAndSend(operate).then(response => {
rtn.response = response;
resolve(rtn);
}).catch(error => {
reject(error);
});
} else {
resolve(rtn);
}
});
},
getTrainingMode: function () {
return store.state.training.mode;
},
getSteps: function () {
return store.state.training.steps;
},
getOrder: function () {
return store.state.training.order;
},
getTrainingStart: function () {
return store.state.training.started;
},
getOperateBreakStatus: function () {
return store.state.menuOperation.break;
}
};
export default new OperateHandler();

View File

@ -1,126 +0,0 @@
import store from '@/store';
import router from '@/router';
import CommandHandler from './CommandHandler.js';
import ValidateHandler from './ValidateHandler.js';
import { sendTrainingNextStep } from '@/api/jmap/training';
import { OperationEvent } from '@/scripts/ConstDic';
class OperateHandler {
constructor() {
this.operates = []; // 操作数据
}
/** 操作组 */
backStep(num) {
this.operates = this.operates.slice(0, num);
}
/** 清空操作组 */
cleanOperates() {
this.operates.splice(0, this.operates.length);
}
getCommand(operate) {
let command = null;
if (operate.send) {
command = CommandHandler.getCommand(this.operates);
if (command && command.error) {
this.operates.pop();
store.dispatch('training/setTempStep', null);
command = null;
} else if (command && command.over) {
this.cleanOperates();
store.dispatch('menuOperation/setButtonOperation', null);
}
this.command = command;
} else {
if (operate.operation === OperationEvent.Command.cancel.menu.operation || operate.over) {
this.cleanOperates();
}
}
return command;
}
execute(command) {
return CommandHandler.execute(command);
}
storeOperate(operate) {
// 按钮操作之后,第二步错误操作菜单的情况,需要直接返回
if ((this.operates.length && operate.start === true) && (this.operates[0].type === 'mbm')) {
return false;
}
// 如果是正常的第一步操作需要清空operates数组
if (['mbm', 'bar'].includes(operate.type) || operate.start === true) {
this.cleanOperates();
}
// 记录步骤数据
this.operates.push(operate);
}
afterAalid(operate, valid) {
const basicInfo = store.getters['training/basicInfo'];
if (basicInfo.id && valid) {
// 发送记录步骤数据
const group = router.currentRoute.query.group;
sendTrainingNextStep({ trainingId: basicInfo.id, operate: operate }, group);
}
if (!valid) {
this.operates.pop();
} else {
if (operate.cancel === true) {
this.cleanOperates();
}
}
}
handle(operate) {
this.storeOperate(operate);
return new Promise((resolve, reject) => {
const rtn = { valid: false, response: null };
const valid = ValidateHandler.vaildate(this.getTrainingMode(), operate);
const command = this.getCommand(operate);
rtn.valid = valid;
this.afterAalid(operate, valid);
if (valid && command) {
CommandHandler.execute(command).then(response => {
rtn.response = response;
resolve(rtn);
}).catch(error => {
reject(error);
});
} else {
resolve(rtn);
}
});
}
getSteps() {
return store.state.training.steps;
}
getOrder() {
return store.state.training.order;
}
getTrainingMode () {
return store.state.training.mode;
}
getTrainingStart() {
return store.state.training.started;
}
getOperateBreakStatus () {
return store.state.menuOperation.break;
}
}
export default new OperateHandler();

View File

@ -1,71 +0,0 @@
import store from '@/store';
import LangStorage from '@/utils/lang';
import OperateHandler from './OperateHandler.js';
import { TrainingMode } from '@/scripts/ConstDic';
import { Message } from 'element-ui';
class ValidateHandler {
vaildate(mode, operate) {
switch (mode) {
case TrainingMode.EDIT: // 编辑制作模式
return this.vaildate_edit(operate);
case TrainingMode.PRACTICE: // 练习模式
return this.vaildate_tips(operate);
case TrainingMode.TEACH: // 教学模式
return this.vaildate_tips(operate);
}
return true;
}
vaildate_edit(operate) {
let vaild = true;
if (OperateHandler.getOperateBreakStatus()) {
const tip = LangStorage.getLang() == 'en' ? 'Please enter a hint and click next' : '请输入提示并点击下一步';
Message.error(tip);
OperateHandler.operates.pop();
vaild = false;
}
if (OperateHandler.getTrainingStart()) {
store.dispatch('training/setTempStep', operate);
}
return vaild;
}
vaildate_tips(operate) {
let valid = true;
if (OperateHandler.getTrainingStart()) {
valid = this.judge(operate);
} else {
OperateHandler.cleanOperates();
valid = false;
}
return valid;
}
/** 判断操作步骤是否正确 */
judge (operate) {
const steps = OperateHandler.getSteps();
const order = OperateHandler.getOrder();
let valid = false;
if (order < steps.length) {
const standard = steps[order];
if (operate && standard &&
operate.code == standard.code &&
operate.type == standard.type &&
operate.operation == standard.operation &&
operate.val == standard.val) {
valid = true;
}
}
return valid;
}
}
export default new ValidateHandler();