修改
This commit is contained in:
parent
899f4a4216
commit
9eea637a70
@ -30,7 +30,6 @@
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
import NoticeInfo from './childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
@ -169,8 +168,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
|
||||
commandType: CommandEnum.Signal.arrangementRoute
|
||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -190,8 +188,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
commandType: CommandEnum.Signal.signalClose
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -211,8 +208,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation,
|
||||
commandType: CommandEnum.Signal.reopenSignal
|
||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -232,8 +228,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
||||
commandType: CommandEnum.Signal.cancelTrainRoute
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -253,8 +248,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
commandType: CommandEnum.Signal.humanControl
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -274,8 +268,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
commandType: CommandEnum.Signal.atsAutoControl
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -296,7 +289,6 @@ export default {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
||||
commandType: CommandEnum.StationStand.setRunLevel,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
@ -318,7 +310,6 @@ export default {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
||||
commandType: CommandEnum.StationStand.setStopTime,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
@ -340,7 +331,6 @@ export default {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
||||
commandType: CommandEnum.StationStand.setBackStrategy,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,6 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
@ -140,8 +139,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation,
|
||||
commandType: CommandEnum.Train.addTrainId
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -86,7 +86,6 @@
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { now } from '@/utils/date';
|
||||
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteCmdControl',
|
||||
@ -351,11 +350,9 @@ export default {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
|
||||
operate.commandType = Commands.Signal.unlock;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
|
||||
operate.commandType = Commands.Signal.guide;
|
||||
}
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
|
@ -39,7 +39,6 @@
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteControl',
|
||||
@ -156,8 +155,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
commandType: CommandEnum.Signal.cancelTrainRoute
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -237,8 +235,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||
commandType: CommandEnum.Signal.setAutoInterlock
|
||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -258,8 +255,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||
commandType: CommandEnum.Signal.cancelAutoInterlock
|
||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -279,8 +275,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
||||
commandType: CommandEnum.Signal.setAutoTrigger
|
||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -300,8 +295,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
||||
commandType: CommandEnum.Signal.cancelAutoTrigger
|
||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
|
||||
};
|
||||
|
||||
this.doClose();
|
||||
|
@ -64,7 +64,6 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
@ -132,8 +131,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.detail.menu.operation,
|
||||
commandType: CommandEnum.Signal.detail
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -82,7 +82,6 @@ import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
@ -264,8 +263,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
commandType: CommandEnum.Signal.humanControl
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -285,8 +283,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
commandType: CommandEnum.Signal.atsAutoControl
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -55,7 +55,6 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteLock',
|
||||
@ -134,8 +133,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.lock.menu.operation,
|
||||
commandType: CommandEnum.Signal.lock
|
||||
operation: OperationEvent.Signal.lock.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -84,7 +84,6 @@
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { now } from '@/utils/date';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionCmdControl',
|
||||
@ -360,15 +359,12 @@ export default {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
||||
operate.commandType = Commands.Section.unlock;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
||||
operate.commandType = Commands.Section.fault;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
|
||||
operate.commandType = Commands.Section.axlePreReset;
|
||||
}
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
|
@ -37,7 +37,6 @@
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
@ -127,8 +126,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
commandType: CommandEnum.Section.lock
|
||||
operation: OperationEvent.Section.lock.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -148,8 +146,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
commandType: CommandEnum.Section.split
|
||||
operation: OperationEvent.Section.split.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -169,8 +166,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
commandType: CommandEnum.Section.active
|
||||
operation: OperationEvent.Section.active.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -99,7 +99,6 @@
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
|
||||
import { now } from '@/utils/date';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionCmdSpeed',
|
||||
@ -477,19 +476,15 @@ export default {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
|
||||
operate.commandType = Commands.Section.setSpeed;
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
|
||||
operate.commandType = Commands.Section.cancelSpeed;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
|
||||
operate.commandType = Commands.Switch.setSpeed;
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
|
||||
operate.commandType = Commands.Switch.cancelSpeed;
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
|
@ -82,7 +82,6 @@
|
||||
<script>
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
@ -215,7 +214,6 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
commandType: CommandEnum.StationStand.setBackStrategy,
|
||||
val: `${this.strategy}`
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
@ -126,8 +125,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
commandType: CommandEnum.StationStand.setDetainTrain
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -148,8 +146,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
commandType: CommandEnum.StationStand.cancelDetainTrain
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -170,8 +167,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
||||
commandType: CommandEnum.StationStand.cancelDetainTrainForce
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -192,8 +188,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
commandType: CommandEnum.StationStand.earlyDeparture
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -214,7 +209,6 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
commandType: CommandEnum.StationStand.setJumpStop,
|
||||
val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行
|
||||
};
|
||||
|
||||
@ -236,7 +230,6 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
commandType: CommandEnum.StationStand.cancelJumpStop,
|
||||
val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行
|
||||
};
|
||||
|
||||
|
@ -57,7 +57,6 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrainAll',
|
||||
@ -158,7 +157,6 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
commandType: CommandEnum.StationStand.cancelDetainTrainAll,
|
||||
val: this.upDown
|
||||
};
|
||||
|
||||
|
@ -79,7 +79,6 @@
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { now } from '@/utils/date';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StationCmdControl',
|
||||
@ -317,11 +316,9 @@ export default {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
|
||||
operate.commandType = Commands.Station.powerUnLock;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
|
||||
operate.commandType = Commands.Station.execKeyOperationTest;
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
|
@ -29,7 +29,6 @@
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StationHumanControlAll',
|
||||
@ -84,8 +83,7 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
||||
commandType: CommandEnum.Station.humanControlALL
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -41,7 +41,6 @@
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StationSetRouteControlAll',
|
||||
@ -103,7 +102,6 @@ export default {
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||
commandType: CommandEnum.Station.atsAutoControlALL,
|
||||
val: this.mode
|
||||
};
|
||||
|
||||
|
@ -84,7 +84,6 @@
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { now } from '@/utils/date';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SwitchCmdControl',
|
||||
@ -377,19 +376,15 @@ export default {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
|
||||
operate.commandType = Commands.Switch.unlock;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
||||
operate.commandType = Commands.Switch.unblock;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
operate.operation = OperationEvent.Switch.fault.confirm2.operation;
|
||||
operate.commandType = Commands.Switch.fault;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
|
||||
operate.commandType = Commands.Switch.axlePreReset;
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
|
@ -47,7 +47,6 @@
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SwitchControl',
|
||||
@ -155,8 +154,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
commandType: CommandEnum.Switch.lock
|
||||
operation: OperationEvent.Switch.lock.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -176,8 +174,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
commandType: CommandEnum.Switch.block
|
||||
operation: OperationEvent.Switch.block.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -197,8 +194,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||
commandType: CommandEnum.Switch.turnout
|
||||
operation: OperationEvent.Switch.turnout.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -218,8 +214,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
commandType: CommandEnum.Switch.turnoutForce
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -238,8 +233,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
commandType: CommandEnum.Switch.split
|
||||
operation: OperationEvent.Switch.split.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -258,8 +252,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
commandType: CommandEnum.Switch.active
|
||||
operation: OperationEvent.Switch.active.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
|
@ -84,10 +84,9 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import OperateHandler from '@/scripts/plugin/OperateHandler';
|
||||
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
@ -350,10 +349,8 @@ export default {
|
||||
|
||||
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.addTrainId.trainNoChange.operation;
|
||||
operate.commandType = Commands.Train.addTrainId;
|
||||
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
|
||||
operate.commandType = Commands.Train.editTrainId;
|
||||
}
|
||||
OperateHandler.backStep(1);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
@ -399,7 +396,6 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
commandType: CommandEnum.Train.addTrainId,
|
||||
messages: [this.$t('tip.addTrainIdTip')],
|
||||
val: `${model.groupNumber}::${model.trainType}::${model.serviceNumber}::${model.tripNumber}::${model.targetCode}`
|
||||
};
|
||||
@ -430,7 +426,6 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
commandType: CommandEnum.Train.editTrainId,
|
||||
messages: [this.$t('tip.editTrainIdTip')],
|
||||
val: `${this.formModel.trainType}::${this.formModel.tripNumber}`
|
||||
};
|
||||
|
@ -40,7 +40,6 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteCreate',
|
||||
@ -121,7 +120,6 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||
commandType: CommandEnum.Section.newtrain,
|
||||
val: '' + this.direction + '::' + this.trainCode
|
||||
};
|
||||
this.loading = true;
|
||||
|
@ -34,7 +34,6 @@ import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { getPublishMapTrainNos } from '@/api/runplan';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TrainDelete',
|
||||
@ -130,7 +129,6 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||
commandType: CommandEnum.Train.delTrainId,
|
||||
val: this.formModel.groupNumber
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
@ -92,8 +91,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation,
|
||||
commandType: CommandEnum.Train.editTrainNo
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -75,7 +75,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
@ -154,8 +153,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
commandType: CommandEnum.Train.moveTrainId
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -76,7 +76,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TrainSwitch',
|
||||
@ -159,8 +158,7 @@ export default {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
commandType: CommandEnum.Train.moveTrainId
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -32,7 +32,6 @@
|
||||
<script>
|
||||
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
@ -119,13 +118,10 @@ export default {
|
||||
|
||||
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||
operate.commandType = Commands.StationControl.forcedStationControl;
|
||||
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
operate.commandType = Commands.StationControl.requestStationControl;
|
||||
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
operate.commandType = Commands.StationControl.requestCentralControl;
|
||||
}
|
||||
|
||||
this.doClose();
|
||||
|
@ -16,7 +16,6 @@ import SectionCmdControl from './dialog/sectionCmdControl';
|
||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||
import TrainCreate from './dialog/trainCreate';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
@ -225,11 +224,8 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
commandType: CommandEnum.Section.stoppage,
|
||||
commandParams: null
|
||||
operation: OperationEvent.Section.stoppage.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
@ -248,8 +244,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
commandType: CommandEnum.Section.cancelStoppage
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -381,8 +376,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
||||
commandType: CommandEnum.Section.query
|
||||
operation: OperationEvent.Section.cancelSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
|
@ -20,13 +20,10 @@ import RouteCmdControl from './dialog/routeCmdControl';
|
||||
import RouteHandControl from './dialog/routeHandControl';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
// 开关
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import MenuContextHandler from '@/scripts/plugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -57,77 +54,66 @@ export default {
|
||||
label: this.$t('menu.menuSignal.routeSelect'),
|
||||
handler: this.arrangementRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||
commandType:Commands.Signal.arrangementRoute,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.routeCancel'),
|
||||
handler: this.cancelTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||
commandType:Commands.Signal.cancelTrainRoute,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalBlock'),
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Signal.lock,
|
||||
commandType:Commands.Signal.lock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalDeblock'),
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
||||
commandType:Commands.Signal.unlock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalReopen'),
|
||||
handler: this.reopenSignal,
|
||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
commandType:Commands.Signal.reopenSignal,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.guideRouteHandle'),
|
||||
handler: this.guide,
|
||||
disabledCallback: MenuDisabledState.Signal.guide,
|
||||
commandType:Commands.Signal.guide,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
|
||||
handler: this.setAutoInterlock,
|
||||
disabledCallback: MenuDisabledState.Signal.setAutoInterlock,
|
||||
commandType:Commands.Signal.setAutoInterlock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
|
||||
handler: this.cancelAutoInterlock,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelAutoInterlock,
|
||||
commandType:Commands.Signal.cancelAutoInterlock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
|
||||
handler: this.setAutoTrigger,
|
||||
disabledCallback: MenuDisabledState.Signal.setAutoTrigger,
|
||||
commandType:Commands.Signal.setAutoTrigger,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
|
||||
handler: this.cancelAutoTrigger,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelAutoTrigger,
|
||||
commandType:Commands.Signal.cancelAutoTrigger,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalOff'),
|
||||
handler: this.signalClose,
|
||||
disabledCallback: MenuDisabledState.Signal.signalClose,
|
||||
commandType:Commands.Signal.signalClose,
|
||||
auth: { station: true, center: false }
|
||||
}
|
||||
],
|
||||
@ -136,70 +122,60 @@ export default {
|
||||
label: this.$t('menu.menuSignal.routeSelect'),
|
||||
handler: this.arrangementRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||
commandType:Commands.Signal.arrangementRoute,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.routeCancel'),
|
||||
handler: this.cancelTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||
commandType:Commands.Signal.cancelTrainRoute,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalBlock'),
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Signal.lock,
|
||||
commandType:Commands.Signal.lock,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalDeblock'),
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
||||
commandType:Commands.Signal.unlock,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalOff'),
|
||||
handler: this.signalClose,
|
||||
disabledCallback: MenuDisabledState.Signal.signalClose,
|
||||
commandType:Commands.Signal.signalClose,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.signalReopen'),
|
||||
handler: this.reopenSignal,
|
||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
commandType:Commands.Signal.reopenSignal,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.routeGuide'),
|
||||
handler: this.guide,
|
||||
disabledCallback: MenuDisabledState.Signal.guide,
|
||||
commandType:Commands.Signal.guide,
|
||||
auth: { station: false, center: false }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.humanControl'),
|
||||
handler: this.humanControl,
|
||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
||||
commandType:Commands.Signal.humanControl,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.atsAutoControl'),
|
||||
handler: this.atsAutoControl,
|
||||
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
||||
commandType:Commands.Signal.atsAutoControl,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.queryRouteControlMode'),
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.Signal.detail,
|
||||
commandType:Commands.Signal.detail,
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
]
|
||||
@ -208,14 +184,12 @@ export default {
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setFault'),
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledState.Signal.setStoppage,
|
||||
commandType:Commands.Signal.setStoppage
|
||||
disabledCallback: MenuDisabledState.Signal.setStoppage
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelStoppage,
|
||||
commandType:Commands.Signal.cancelStoppage
|
||||
disabledCallback: MenuDisabledState.Signal.cancelStoppage
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -247,8 +221,7 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||
// this.menu = menuFiltration(this.menuNormal);
|
||||
this.menu = menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
@ -258,9 +231,7 @@ export default {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
// debugger;
|
||||
this.menu = MenuContextHandler.covert(this.menu);
|
||||
// this.menu = menuConvert(this.menu);
|
||||
this.menu = menuConvert(this.menu);
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
@ -283,8 +254,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
commandType: CommandEnum.Signal.stoppage
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -304,8 +274,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
commandType: CommandEnum.Signal.cancelStoppage
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -325,8 +294,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
commandType: CommandEnum.Signal.query
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
@ -366,8 +334,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.lock.menu.operation,
|
||||
commandType: CommandEnum.Signal.lock
|
||||
operation: OperationEvent.Signal.lock.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -515,8 +482,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
commandType: CommandEnum.Signal.query
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
@ -537,8 +503,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
commandType: CommandEnum.Signal.query
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
@ -559,8 +524,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.detail.menu.operation,
|
||||
commandType: CommandEnum.Signal.query
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
|
@ -18,7 +18,6 @@ import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
@ -166,8 +165,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.stoppage.menu.operation,
|
||||
commandType: CommandEnum.Station.stoppage
|
||||
operation: OperationEvent.Station.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -187,8 +185,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.cancelStoppage.menu.operation,
|
||||
commandType: CommandEnum.Station.cancelStoppage
|
||||
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -208,8 +205,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation,
|
||||
commandType: CommandEnum.Station.setAutoTrigger
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -227,8 +223,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation,
|
||||
commandType: CommandEnum.Station.cancelAutoTrigger
|
||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
@ -24,7 +24,6 @@ import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -248,8 +247,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
label: MapDeviceType.StationStand.label,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
commandType: CommandEnum.StationStand.query
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -269,8 +267,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
label: MapDeviceType.StationStand.label,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
commandType: CommandEnum.StationStand.cancelStoppage
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -387,8 +384,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
label: MapDeviceType.StationStand.label,
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
commandType: CommandEnum.StationStand.query
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
@ -411,8 +407,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
label: MapDeviceType.StationStand.label,
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
commandType: CommandEnum.StationStand.query
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
@ -449,8 +444,7 @@ export default {
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
commandType: CommandEnum.StationStand.query
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
@ -474,8 +468,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
label: MapDeviceType.StationStand.label,
|
||||
operation: OperationEvent.StationStand.detail.menu.operation,
|
||||
commandType: CommandEnum.StationStand.detail
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
|
@ -14,7 +14,6 @@ import SwitchControl from './dialog/switchControl';
|
||||
import SwitchCmdControl from './dialog/switchCmdControl';
|
||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
@ -251,8 +250,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
label: MapDeviceType.Switch.label,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
commandType: CommandEnum.Switch.stoppage
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -272,8 +270,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
label: MapDeviceType.Switch.label,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
commandType: CommandEnum.Switch.cancelStoppage
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -472,8 +469,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
label: MapDeviceType.Switch.label,
|
||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
||||
commandType: CommandEnum.Switch.cancelSpeed
|
||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
|
@ -17,7 +17,6 @@ import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
import TrainControl from './dialog/trainControl';
|
||||
import TrainDelete from './dialog/trainDelete';
|
||||
import TrainMove from './dialog/trainMove';
|
||||
@ -169,8 +168,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Train.type,
|
||||
label: MapDeviceType.Train.label,
|
||||
operation: OperationEvent.Train.stoppage.menu.operation,
|
||||
commandType: CommandEnum.Train.stoppage
|
||||
operation: OperationEvent.Train.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -190,8 +188,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Train.type,
|
||||
label: MapDeviceType.Train.label,
|
||||
operation: OperationEvent.Train.cancelStoppage.menu.operation,
|
||||
commandType: CommandEnum.Train.cancelStoppage
|
||||
operation: OperationEvent.Train.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -211,8 +208,7 @@ export default {
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Train.type,
|
||||
label: MapDeviceType.Train.label,
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation,
|
||||
commandType: CommandEnum.Train.limitSpeed
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
@ -61,7 +61,6 @@
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import CommandEnum from '@/scripts/plugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RequestControl',
|
||||
@ -262,7 +261,6 @@ export default {
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
commandType: this.$store.state.training.prdType == '01' ? Commands.StationControl.stationAgree : Commands.StationControl.centralAgree,
|
||||
code: this.selection[0].code,
|
||||
val: this.commandId,
|
||||
prdType: this.$store.state.training.prdType
|
||||
@ -285,7 +283,6 @@ export default {
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
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 : '',
|
||||
val: this.commandId,
|
||||
prdType: this.$store.state.training.prdType
|
||||
|
@ -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: '取消全线临时限速'}
|
||||
}
|
||||
};
|
@ -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();
|
@ -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();
|
@ -1,8 +0,0 @@
|
||||
export default class Operate {
|
||||
constructor(operation) {
|
||||
this.operate = {
|
||||
operation: operation
|
||||
};
|
||||
}
|
||||
|
||||
}
|
@ -1,8 +1,147 @@
|
||||
import OperateHandler1 from './OperateHandler1.js';
|
||||
import OperateHandler2 from './OperateHandler2.js';
|
||||
import Cookies from 'js-cookie';
|
||||
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';
|
||||
|
||||
const OPERATEHANDLER_KEY = 'OperateHandler';
|
||||
Cookies.set(OPERATEHANDLER_KEY, 1);
|
||||
var OperateHandler = function () {
|
||||
};
|
||||
|
||||
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();
|
||||
|
@ -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();
|
@ -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();
|
@ -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();
|
Loading…
Reference in New Issue
Block a user