西安一号线 操作代码整理
This commit is contained in:
parent
81f418afe5
commit
aa632c457d
@ -79,7 +79,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteHandControl',
|
name: 'RouteHandControl',
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteLock',
|
name: 'RouteLock',
|
||||||
|
@ -50,7 +50,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrain',
|
name: 'StandDetainTrain',
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -86,7 +86,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import {getTrainDetailBytripNumber} from '@/api/simulation';
|
import {getTrainDetailBytripNumber} from '@/api/simulation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -39,7 +39,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import {TrainType} from '@/scripts/ConstDic';
|
import {TrainType} from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -18,7 +18,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -24,7 +24,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
|
@ -25,7 +25,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
|
@ -13,7 +13,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuStationTurnBack',
|
name: 'MenuStationTurnBack',
|
||||||
|
@ -18,7 +18,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
|
@ -1,570 +0,0 @@
|
|||||||
import store from '@/store/index_APP_TARGET';
|
|
||||||
import deviceState from '@/jmap/constant/deviceState';
|
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
|
||||||
|
|
||||||
export function getCurrentStateObject() {
|
|
||||||
return store.getters['menuOperation/selected'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 系统类型 */
|
|
||||||
export const State2SimulationMap = {
|
|
||||||
'01': 'local', // 现地工作站
|
|
||||||
'02': 'central' // 中心调度工作站
|
|
||||||
};
|
|
||||||
|
|
||||||
export const State2ControlMap = {
|
|
||||||
'01': 'center', // 中控
|
|
||||||
'02': 'station', // 站控
|
|
||||||
'03': 'station'
|
|
||||||
};
|
|
||||||
|
|
||||||
// 控制禁用
|
|
||||||
export const MenuDisabledState = {
|
|
||||||
Section: {
|
|
||||||
// 故障解锁
|
|
||||||
fault() {
|
|
||||||
},
|
|
||||||
// 切除
|
|
||||||
split() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.cutOff != deviceState.Section.cutOff.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 激活
|
|
||||||
active() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.cutOff == deviceState.Section.cutOff.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段封锁
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Section.status.State06) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段解禁
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Section.status.State06) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段设置限速
|
|
||||||
setSpeed() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.speedUpperLimit != deviceState.Section.speedUpperLimit.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 区段取消限速
|
|
||||||
cancelSpeed() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 新建列车
|
|
||||||
newTrain() {
|
|
||||||
},
|
|
||||||
// 计轴预复位
|
|
||||||
axlePreReset() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Signal: {
|
|
||||||
// 进路选排
|
|
||||||
arrangementRoute() {
|
|
||||||
|
|
||||||
},
|
|
||||||
// 进路取消
|
|
||||||
cancelTrainRoute() {
|
|
||||||
},
|
|
||||||
// 信号封闭
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Signal.status.State05) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 信号解封
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Signal.status.State05) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
},
|
|
||||||
// 进路引导
|
|
||||||
guide() {
|
|
||||||
},
|
|
||||||
// 设置联锁自动进路
|
|
||||||
setAutoInterlock() {
|
|
||||||
},
|
|
||||||
// 取消联锁自动进路
|
|
||||||
cancelAutoInterlock() {
|
|
||||||
},
|
|
||||||
// 设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 关灯
|
|
||||||
signalClose() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Signal.status.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 人工控
|
|
||||||
humanControl() {
|
|
||||||
},
|
|
||||||
// ats自动控
|
|
||||||
atsAutoControl() {
|
|
||||||
},
|
|
||||||
// 查询进路状态
|
|
||||||
detail() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Station: {
|
|
||||||
// 全站设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 全站取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
},
|
|
||||||
// 上电解锁
|
|
||||||
powerUnLock() {
|
|
||||||
},
|
|
||||||
// 执行关键操作测试
|
|
||||||
execKeyOperationTest() {
|
|
||||||
},
|
|
||||||
// 所有进路自排开
|
|
||||||
atsAutoControlALL() {
|
|
||||||
},
|
|
||||||
// 所有进路自排关
|
|
||||||
humanControlALL() {
|
|
||||||
},
|
|
||||||
// 设置ZC故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消ZC故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
StationControl: {
|
|
||||||
// 紧急站控
|
|
||||||
emergencyStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State03) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 请求站控
|
|
||||||
requestStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强行站控
|
|
||||||
forcedStationControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 请求中控
|
|
||||||
requestCentralControl() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.StationControl.status.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
StationStand: {
|
|
||||||
// 设置扣车
|
|
||||||
setDetainTrain() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (store.state.training.prdType == '02') { // 中心行调模式
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
|
||||||
return true;
|
|
||||||
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State03) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else { // 现地模式
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
|
||||||
return true;
|
|
||||||
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消扣车
|
|
||||||
cancelDetainTrain() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (store.state.training.prdType == '02') {
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
|
||||||
return false;
|
|
||||||
} else if (device && device.holdStatus != deviceState.StationStand.holdStatus.State03) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
|
|
||||||
return false;
|
|
||||||
} else if (device && device.holdStatus != deviceState.StationStand.holdStatus.State02) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强制取消扣车
|
|
||||||
cancelDetainTrainForce() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 设置全站扣车
|
|
||||||
cancelDetainTrainAll() {
|
|
||||||
},
|
|
||||||
// 设置运行等级
|
|
||||||
setRunLevel() {
|
|
||||||
},
|
|
||||||
// 设置停站时间
|
|
||||||
setStopTime() {
|
|
||||||
},
|
|
||||||
// 设置跳停
|
|
||||||
setJumpStop() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.jumpStopStatus != deviceState.StationStand.jumpStopStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消跳停
|
|
||||||
cancelJumpStop() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.jumpStopStatus == deviceState.StationStand.jumpStopStatus.State01) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 提前发车
|
|
||||||
earlyDeparture() {
|
|
||||||
},
|
|
||||||
// 站台详细信息
|
|
||||||
detail() {
|
|
||||||
},
|
|
||||||
// 设置折返策略
|
|
||||||
setBackStrategy() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Switch: {
|
|
||||||
// 单锁
|
|
||||||
lock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Switch.status.State10) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 解锁
|
|
||||||
unlock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Switch.status.State10) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 封锁
|
|
||||||
block() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status == deviceState.Switch.status.State14) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 解封
|
|
||||||
unblock() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.status != deviceState.Switch.status.State14) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强扳
|
|
||||||
switchTurnoutForce() {
|
|
||||||
},
|
|
||||||
// 转动
|
|
||||||
switchTurnout() {
|
|
||||||
},
|
|
||||||
// 道岔故障解锁
|
|
||||||
fault() {
|
|
||||||
},
|
|
||||||
// 计轴预复位
|
|
||||||
axlePreReset() {
|
|
||||||
},
|
|
||||||
// 道岔切除
|
|
||||||
split() {
|
|
||||||
},
|
|
||||||
// 道岔激活
|
|
||||||
active() {
|
|
||||||
},
|
|
||||||
// 道岔设置速度
|
|
||||||
setSpeed() {
|
|
||||||
// const device = getCurrentStateObject();
|
|
||||||
},
|
|
||||||
// 道岔取消速度
|
|
||||||
cancelSpeed() {
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Train: {
|
|
||||||
// 添加列车识别号
|
|
||||||
addTrainId() {
|
|
||||||
},
|
|
||||||
// 删除列车识别号
|
|
||||||
delTrainId() {
|
|
||||||
},
|
|
||||||
// 修改列车识别号
|
|
||||||
editTrainId() {
|
|
||||||
},
|
|
||||||
// 修改车组号
|
|
||||||
editTrainNo() {
|
|
||||||
},
|
|
||||||
// 移动列车识别号
|
|
||||||
moveTrainId() {
|
|
||||||
},
|
|
||||||
// 交换列车识别号
|
|
||||||
switchTrainId() {
|
|
||||||
},
|
|
||||||
// 设置限速
|
|
||||||
limitSpeed() {
|
|
||||||
},
|
|
||||||
// 设置通信故障
|
|
||||||
setStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消通信故障
|
|
||||||
cancelStoppage() {
|
|
||||||
const device = getCurrentStateObject();
|
|
||||||
if (device && !device.fault) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export function checkOperationValidity() {
|
|
||||||
if (store.state.training.prdType == '02') {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将menu的disabled属性使用disabledCallback计算并返回
|
|
||||||
* @param {Array} menu
|
|
||||||
*/
|
|
||||||
export function menuConvert(menu) {
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.type === 'separator') {
|
|
||||||
elem.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (elem.disabledCallback.constructor === Function) {
|
|
||||||
elem.disabled = elem.defaultDisabled;
|
|
||||||
if (!elem.defaultDisabled) {
|
|
||||||
elem.disabled = elem.disabledCallback();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据产品类型,返回对应的menuBar
|
|
||||||
* @param {*} menuObj
|
|
||||||
*/
|
|
||||||
export function menuBarConvert(menu, mode) {
|
|
||||||
if (menu) {
|
|
||||||
if (mode === OperateMode.NORMAL) {
|
|
||||||
menu.forEach(item => {
|
|
||||||
if (item.type === 'separator') {
|
|
||||||
item.show = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
item.show = false;
|
|
||||||
if (!item.click) {
|
|
||||||
item.click = () => { };
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!item.froce) {
|
|
||||||
item.show = true;
|
|
||||||
if (item.children && item.children.length > 0) {
|
|
||||||
menuBarConvert(item.children, mode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (mode === OperateMode.ADMIN) {
|
|
||||||
menu.forEach(item => {
|
|
||||||
item.show = true;
|
|
||||||
if (!item.click) {
|
|
||||||
item.click = () => { };
|
|
||||||
}
|
|
||||||
if (item.children && item.children.length > 0) {
|
|
||||||
menuBarConvert(item.children, mode);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu || [];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将menu的show属性过滤返回
|
|
||||||
* @param {Array} menu
|
|
||||||
*/
|
|
||||||
export function menuFiltration(menuObj) {
|
|
||||||
var selected = getCurrentStateObject();
|
|
||||||
var control;
|
|
||||||
var menu = [];
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (control) {
|
|
||||||
if (store.state.training.prdType != '') {
|
|
||||||
const type = State2SimulationMap[store.state.training.prdType];
|
|
||||||
const status = State2ControlMap[control.status];
|
|
||||||
menu = [...menuObj[type]];
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将train menu的show属性过滤返回
|
|
||||||
*/
|
|
||||||
export function trainMenuFiltration(menuObj) {
|
|
||||||
var menu = [];
|
|
||||||
if (store.state.training.prdType != '') {
|
|
||||||
const type = State2SimulationMap[store.state.training.prdType];
|
|
||||||
menu = [...menuObj[type]];
|
|
||||||
if (menu.constructor === Array) {
|
|
||||||
menu.forEach(elem => {
|
|
||||||
if (elem.auth.constructor === Object) {
|
|
||||||
elem.show = true;
|
|
||||||
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
|
||||||
elem.show = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
@ -1,337 +0,0 @@
|
|||||||
import store from '@/store/index_APP_TARGET';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
|
|
||||||
// 操作
|
|
||||||
export const menuOperate = {
|
|
||||||
Section:{
|
|
||||||
split:{
|
|
||||||
// 区段切除
|
|
||||||
operation: OperationEvent.Section.split.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
|
||||||
},
|
|
||||||
active:{
|
|
||||||
// 区段激活
|
|
||||||
operation: OperationEvent.Section.active.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
|
||||||
},
|
|
||||||
lock: {
|
|
||||||
// 区段封锁
|
|
||||||
operation: OperationEvent.Section.lock.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
|
||||||
},
|
|
||||||
unlock: {
|
|
||||||
// 区段解封
|
|
||||||
operation: OperationEvent.Section.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
|
||||||
},
|
|
||||||
alxeEffective:{
|
|
||||||
// 确认计轴有效
|
|
||||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
|
||||||
},
|
|
||||||
setSpeed:{
|
|
||||||
// 设置速度
|
|
||||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
|
||||||
},
|
|
||||||
cancelSpeed: {
|
|
||||||
// 取消限速
|
|
||||||
operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
|
||||||
},
|
|
||||||
axlePreReset:{
|
|
||||||
// 区段计轴预复位
|
|
||||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
|
||||||
},
|
|
||||||
fault:{
|
|
||||||
// 区段故障解锁
|
|
||||||
operation: OperationEvent.Section.fault.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Signal:{
|
|
||||||
arrangementRoute:{
|
|
||||||
// 排列进路
|
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
|
||||||
},
|
|
||||||
cancelTrainRoute:{
|
|
||||||
// 取消进路
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
|
||||||
},
|
|
||||||
lock:{
|
|
||||||
// 信号封锁
|
|
||||||
operation:OperationEvent.Signal.lock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
|
||||||
},
|
|
||||||
unlock:{
|
|
||||||
// 信号解封
|
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
|
||||||
},
|
|
||||||
guide:{
|
|
||||||
// 进路引导
|
|
||||||
operation: OperationEvent.Signal.guide.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
|
||||||
},
|
|
||||||
reopenSignal:{
|
|
||||||
// 信号重开
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
|
||||||
},
|
|
||||||
signalClose:{
|
|
||||||
// 信号关灯
|
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
|
||||||
},
|
|
||||||
humanControl:{
|
|
||||||
// 进路交人工控
|
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
|
||||||
},
|
|
||||||
atsAutoControl:{
|
|
||||||
// 进路交自动控
|
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
|
||||||
},
|
|
||||||
setAutoInterlock:{
|
|
||||||
// 设置通过模式 设置联锁自动进路
|
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
|
||||||
},
|
|
||||||
cancelAutoInterlock:{
|
|
||||||
// 取消通过模式 取消联锁自动进路
|
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
|
||||||
},
|
|
||||||
detail:{
|
|
||||||
// 查询进路状态
|
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
|
||||||
},
|
|
||||||
cancelGuide:{
|
|
||||||
// 人工解锁进路(信号机取消引导)
|
|
||||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
|
||||||
},
|
|
||||||
setAutoTurnBack:{
|
|
||||||
// 设置自动折返
|
|
||||||
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
|
||||||
},
|
|
||||||
cancelAutoTurnBack:{
|
|
||||||
// 取消自动折返
|
|
||||||
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
|
||||||
},
|
|
||||||
setAutoTrigger: {
|
|
||||||
// 设置联锁自动触发
|
|
||||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
|
||||||
},
|
|
||||||
cancelAutoTrigger: {
|
|
||||||
// 取消联锁自动触发
|
|
||||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Switch:{
|
|
||||||
lock:{
|
|
||||||
// 道岔单锁
|
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
|
||||||
},
|
|
||||||
unlock:{
|
|
||||||
// 道岔解锁
|
|
||||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
|
||||||
},
|
|
||||||
block: {
|
|
||||||
// 道岔封锁
|
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
|
||||||
},
|
|
||||||
unblock: {
|
|
||||||
// 道岔解封
|
|
||||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
|
||||||
},
|
|
||||||
turnout: {
|
|
||||||
// 道岔转动
|
|
||||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
|
||||||
},
|
|
||||||
fault: {
|
|
||||||
// 故障解锁
|
|
||||||
operation: OperationEvent.Switch.fault.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
|
||||||
},
|
|
||||||
split:{
|
|
||||||
// 区段切除
|
|
||||||
operation: OperationEvent.Switch.split.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
|
||||||
},
|
|
||||||
active:{
|
|
||||||
// 区段激活
|
|
||||||
operation: OperationEvent.Switch.active.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
|
||||||
},
|
|
||||||
setSpeed:{
|
|
||||||
// 设置临时限速
|
|
||||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
|
||||||
},
|
|
||||||
cancelSpeed: {
|
|
||||||
// 取消临时限速
|
|
||||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
|
||||||
},
|
|
||||||
alxeEffective:{
|
|
||||||
// 确认计轴有效
|
|
||||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
|
||||||
},
|
|
||||||
axlePreReset:{
|
|
||||||
// 计轴预复位
|
|
||||||
operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
StationStand:{
|
|
||||||
setDetainTrain:{
|
|
||||||
// 设置扣车
|
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
|
||||||
},
|
|
||||||
cancelDetainTrain:{
|
|
||||||
// 取消扣车
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
|
||||||
},
|
|
||||||
cancelDetainTrainForce: {
|
|
||||||
// 强制取消扣车
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
|
||||||
},
|
|
||||||
cancelDetainTrainAll: {
|
|
||||||
// 全线取消扣车
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
|
||||||
},
|
|
||||||
setJumpStop:{
|
|
||||||
// 设置跳停
|
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
|
||||||
},
|
|
||||||
cancelJumpStop:{
|
|
||||||
// 取消跳停
|
|
||||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
|
||||||
},
|
|
||||||
setStopTime:{
|
|
||||||
// 停站时间控制
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
|
||||||
},
|
|
||||||
setRunLevel:{
|
|
||||||
// 运行时间控制
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
|
||||||
},
|
|
||||||
earlyDeparture:{
|
|
||||||
// 设置提前发车
|
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
|
||||||
},
|
|
||||||
setBackStrategy:{
|
|
||||||
// 设置折返策略
|
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
|
||||||
},
|
|
||||||
detail:{
|
|
||||||
// 查询站台状态
|
|
||||||
operation: OperationEvent.StationStand.detail.menu.operation
|
|
||||||
// cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
|
||||||
}
|
|
||||||
//
|
|
||||||
},
|
|
||||||
StationControl:{
|
|
||||||
requestCentralControl:{
|
|
||||||
// 请求中控(遥控)
|
|
||||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
|
||||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
|
||||||
},
|
|
||||||
requestStationControl:{
|
|
||||||
// 请求站控
|
|
||||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
|
||||||
cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
|
||||||
},
|
|
||||||
emergencyStationControl:{
|
|
||||||
// 紧急站控
|
|
||||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
|
||||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
|
||||||
},
|
|
||||||
setBackStrategy:{
|
|
||||||
// 设置折返策略
|
|
||||||
operation: OperationEvent.Station.setBackStrategy.menu.operation,
|
|
||||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
|
||||||
}
|
|
||||||
},
|
|
||||||
TrainWindow: {
|
|
||||||
editTrainId: {
|
|
||||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
|
||||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
|
||||||
},
|
|
||||||
addTrainId: {
|
|
||||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
|
||||||
cmdType: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Common: {
|
|
||||||
setFault: {
|
|
||||||
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
|
||||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
|
||||||
},
|
|
||||||
cancelFault: {
|
|
||||||
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
|
||||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export function commitOperate(operate, paramList, over, val) {
|
|
||||||
const step = {
|
|
||||||
start: true,
|
|
||||||
operation: operate.operation,
|
|
||||||
param:{}
|
|
||||||
};
|
|
||||||
step.param = paramList;
|
|
||||||
if (val) {
|
|
||||||
step['val'] = val;
|
|
||||||
}
|
|
||||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
|
||||||
if (over == 0 || over == 3) {
|
|
||||||
const codeList = Object.values(paramList);
|
|
||||||
step.code = codeList[0];
|
|
||||||
}
|
|
||||||
if (over != 0 && over != 3) {
|
|
||||||
delete step.start;
|
|
||||||
}
|
|
||||||
if (over == 2 || over == 3) {
|
|
||||||
step.over = true;
|
|
||||||
step.cmdType = operate.cmdType;
|
|
||||||
}
|
|
||||||
return new Promise(function(resolve, reject) {
|
|
||||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
resolve({ valid: valid, operate: step });
|
|
||||||
}).catch(error=>{
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user