From 3044da2ea4155186f4e9ec0143b1bc3723dbe110 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Tue, 31 Dec 2019 16:11:09 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=A6=8F=E5=B7=9E=E4=BD=BF?=
=?UTF-8?q?=E7=94=A8=E6=96=B0=E7=89=88=E6=8C=87=E4=BB=A4=E6=96=B9=E5=BC=8F?=
=?UTF-8?q?=E5=8F=91=E9=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../childDialog/childDialog/noticeInfo.vue | 2 +-
.../dialog/childDialog/confirmControl.vue | 65 ++-
.../childDialog/confirmControlSpeed.vue | 35 +-
.../childDialog/confirmSignalUnlock.vue | 4 +-
.../menus/dialog/childDialog/confirmTrain.vue | 10 +-
.../menus/dialog/routeCmdControl.vue | 13 +-
.../fuzhou_01/menus/dialog/routeControl.vue | 40 +-
.../fuzhou_01/menus/dialog/routeDetail.vue | 11 +-
.../menus/dialog/routeHandControl.vue | 43 +-
.../fuzhou_01/menus/dialog/routeLock.vue | 10 +-
.../fuzhou_01/menus/dialog/routeSelection.vue | 39 +-
.../menus/dialog/sectionCmdControl.vue | 88 ++--
.../fuzhou_01/menus/dialog/sectionControl.vue | 79 +---
.../menus/dialog/speedCmdControl.vue | 102 ++---
.../menus/dialog/standBackStrategy.vue | 16 +-
.../fuzhou_01/menus/dialog/standControl.vue | 93 ++--
.../fuzhou_01/menus/dialog/standDetail.vue | 11 +-
.../menus/dialog/standDetainTrainAll.vue | 17 +-
.../fuzhou_01/menus/dialog/standRunLevel.vue | 47 ++-
.../fuzhou_01/menus/dialog/standStopTime.vue | 28 +-
.../menus/dialog/stationCmdControl.vue | 11 +-
.../menus/dialog/stationHumanControlAll.vue | 11 +-
.../dialog/stationSetRouteControlAll.vue | 14 +-
.../menus/dialog/switchCmdControl.vue | 17 +-
.../fuzhou_01/menus/dialog/switchControl.vue | 43 +-
.../fuzhou_01/menus/dialog/trainControl.vue | 23 +-
.../fuzhou_01/menus/dialog/trainCreate.vue | 8 +-
.../fuzhou_01/menus/dialog/trainDelete.vue | 10 +-
.../menus/dialog/trainEditNumber.vue | 10 +-
.../fuzhou_01/menus/dialog/trainMove.vue | 10 +-
.../fuzhou_01/menus/dialog/trainSwitch.vue | 10 +-
src/jmapNew/theme/fuzhou_01/menus/menuBar.vue | 30 +-
.../theme/fuzhou_01/menus/menuCancel.vue | 18 +-
.../childDialog/twoConfirmation.vue | 34 +-
.../menus/menuDialog/childDialog/userAdd.vue | 2 +-
.../menuDialog/childDialog/userDelete.vue | 2 +-
.../menus/menuDialog/childDialog/userEdit.vue | 2 +-
.../fuzhou_01/menus/menuDialog/helpAbout.vue | 2 +-
.../fuzhou_01/menus/menuDialog/manageUser.vue | 2 +-
.../menus/menuDialog/passwordBox.vue | 9 +-
.../menuDialog/stationControlConvert.vue | 57 ++-
.../fuzhou_01/menus/menuDialog/trainAdd.vue | 6 +-
.../menus/menuDialog/trainDelete.vue | 6 +-
.../menus/menuDialog/trainTranstalet.vue | 6 +-
.../fuzhou_01/menus/menuDialog/viewDevice.vue | 2 +-
.../fuzhou_01/menus/menuDialog/viewName.vue | 2 +-
.../menus/menuDialog/viewTrainId.vue | 2 +-
.../theme/fuzhou_01/menus/menuSection.vue | 263 +++++-------
.../theme/fuzhou_01/menus/menuSignal.vue | 398 +++++++++---------
.../theme/fuzhou_01/menus/menuStation.vue | 201 ++++-----
.../fuzhou_01/menus/menuStationStand.vue | 325 +++++++-------
.../theme/fuzhou_01/menus/menuSwitch.vue | 329 ++++++++-------
.../theme/fuzhou_01/menus/menuTrain.vue | 241 ++++++-----
.../fuzhou_01/menus/passiveDialog/alarm.vue | 4 +-
.../fuzhou_01/menus/passiveDialog/control.vue | 46 +-
.../fuzhou_01/menus/passiveDialog/timeout.vue | 6 +-
.../fuzhou_01/menus/utils/menuItemStatus.js | 10 +-
.../ningbo_01/menus/menuStationStand.vue | 127 ++----
src/scripts/cmdPlugin/MenuContextHandler.js | 2 +-
src/store/modules/map.js | 16 +
60 files changed, 1414 insertions(+), 1656 deletions(-)
diff --git a/src/jmapNew/theme/fuzhou_01/menus/dialog/childDialog/childDialog/noticeInfo.vue b/src/jmapNew/theme/fuzhou_01/menus/dialog/childDialog/childDialog/noticeInfo.vue
index c85893d53..bc5dd37fc 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/dialog/childDialog/childDialog/noticeInfo.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/dialog/childDialog/childDialog/noticeInfo.vue
@@ -25,7 +25,7 @@
diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue
index a5cbb4993..0efa0bfed 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue
@@ -15,9 +15,10 @@ import StationHumanControlAll from './dialog/stationHumanControlAll';
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
-import { OperateMode } from '@/scripts/ConstDic';
-import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
-import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
+import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
+import CMD from '@/scripts/cmdPlugin/CommandEnum';
+import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'StationMenu',
@@ -40,63 +41,60 @@ export default {
return {
menu: [],
menuNormal: {
- local: [
+ Local: [
{
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
handler: this.setAutoTrigger,
- disabledCallback: MenuDisabledState.Station.setAutoTrigger,
- auth: { station: true, center: false }
+ cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
},
{
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
- disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
- auth: { station: true, center: false }
- },
- {
- label: this.$t('menu.menuStation.powerUnLock'),
- handler: this.powerUnLock,
- disabledCallback: MenuDisabledState.Station.powerUnLock,
- auth: { station: true, center: false }
- },
- {
- label: this.$t('menu.menuStation.execKeyOperationTest'),
- handler: this.execKeyOperationTest,
- disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
- auth: { station: true, center: false }
+ cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
}
+ // {
+ // label: this.$t('menu.menuStation.powerUnLock'),
+ // handler: this.powerUnLock,
+ // auth: { station: true, center: false }
+ // // cmdType: CMD.Station.
+ // },
+ // {
+ // label: this.$t('menu.menuStation.execKeyOperationTest'),
+ // handler: this.execKeyOperationTest,
+ // auth: { station: true, center: false }
+ // // cmdType: CMD.Station.
+ // }
],
- central: [
+ Center: [
{
label: this.$t('menu.menuStation.allHumanControl'),
handler: this.humanControlALL,
- disabledCallback: MenuDisabledState.Station.humanControlALL,
- auth: { station: false, center: true }
+ cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
},
{
label: this.$t('menu.menuStation.allATSAutoControl'),
handler: this.atsAutoControlALL,
- disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
- auth: { station: false, center: true }
- },
- {
- label: this.$t('menu.menuStation.execKeyOperationTest'),
- handler: this.execKeyOperationTest,
- disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
- auth: { station: false, center: true }
+ cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
}
+ // {
+ // label: this.$t('menu.menuStation.execKeyOperationTest'),
+ // handler: this.execKeyOperationTest,
+ // auth: { station: false, center: true },
+ // cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
+ // // cmdType: CMD.Section.
+ // }
]
},
menuForce: [
{
label: this.$t('menu.menuStation.setStoppage'),
handler: this.setStoppage,
- disabledCallback: MenuDisabledState.Station.setStoppage
+ cmdType: CMD.Station.CMD_STATION_ADD_FAULT
},
{
label: this.$t('menu.menuStation.cancelStoppage'),
handler: this.cancelStoppage,
- disabledCallback: MenuDisabledState.Station.cancelStoppage
+ cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
}
]
};
@@ -130,7 +128,8 @@ export default {
this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) {
// 编辑模式菜单列表
- this.menu = menuFiltration(this.menuNormal);
+ // this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
+ this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
@@ -143,7 +142,7 @@ export default {
}
}
- this.menu = menuConvert(this.menu);
+ // this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
@@ -159,141 +158,149 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Station.type,
- label: MapDeviceType.Station.label,
- operation: OperationEvent.Station.stoppage.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.Station.stoppage.menu.operation,
+ cmdType: CMD.Station.CMD_STOPPAGE,
+ param: {
+ Station_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Station.type,
- label: MapDeviceType.Station.label,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.Station.cancelStoppage.menu.operation,
+ cmdType: CMD.Station.CMD_CANCEL_STOPPAGE,
+ param: {
+ Station_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 全站设置联锁自动触发
setAutoTrigger() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Station.type,
- label: MapDeviceType.Station.label,
- operation: OperationEvent.Station.setAutoTrigger.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.Station.setAutoTrigger.menu.operation,
+ cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
+ param: {
+ Station_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 全站取消联锁自动触发
cancelAutoTrigger() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Station.type,
- label: MapDeviceType.Station.label,
- operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.Station.cancelAutoTrigger.menu.operation,
+ cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
+ param: {
+ Station_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 上电解锁
powerUnLock() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Station.type,
- label: MapDeviceType.Station.label,
- operation: OperationEvent.Station.powerUnLock.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.Station.powerUnLock.menu.operation,
+ param: {
+ Station_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.stationCmdControl.doShow(operate, this.selected);
+ this.$refs.stationCmdControl.doShow(step, this.selected);
}
});
},
// 执行关键操作测试
execKeyOperationTest() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Station.type,
- label: MapDeviceType.Station.label,
- operation: OperationEvent.Station.execKeyOperationTest.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.Station.execKeyOperationTest.menu.operation,
+ param: {
+ Station_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.stationCmdControl.doShow(operate, this.selected);
+ this.$refs.stationCmdControl.doShow(step, this.selected);
}
});
},
// 所有进路自排关
humanControlALL() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Station.type,
- label: MapDeviceType.Station.label,
- operation: OperationEvent.Station.humanControlALL.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.Station.humanControlALL.menu.operation,
+ param: {
+ Station_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.stationHumanControlAll.doShow(operate);
+ this.$refs.stationHumanControlAll.doShow(step);
}
});
},
// 所有进路自排开
atsAutoControlALL() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Station.type,
- label: MapDeviceType.Station.label,
- operation: OperationEvent.Station.atsAutoControlALL.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
+ param: {
+ Station_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
+ this.$refs.stationSetRouteControlAll.doShow(step, this.selected);
}
});
}
diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue
index a0c7f8d5b..f96f1ebd0 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue
@@ -20,10 +20,12 @@ import StandRunLevel from './dialog/standRunLevel';
import StandStopTime from './dialog/standStopTime';
import StandDetainTrainAll from './dialog/standDetainTrainAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
+import Handler from '@/scripts/cmdPlugin/Handler';
import { mapGetters } from 'vuex';
-import { OperateMode } from '@/scripts/ConstDic';
-import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
-import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
+import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
+import CMD from '@/scripts/cmdPlugin/CommandEnum';
+import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'StationStandMenu',
@@ -49,128 +51,103 @@ export default {
return {
menu: [],
menuNormal: {
- local: [
+ Local: [
{
label: this.$t('menu.menuStationStand.detainTrain'),
handler: this.setDetainTrain,
- disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
- auth: { station: true, center: false }
+ cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
handler: this.cancelDetainTrain,
- disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
- auth: { station: true, center: false }
+ cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
handler: this.cancelDetainTrainForce,
- disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce,
- auth: { station: true, center: false }
+ cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.jumpStop'),
handler: this.setJumpStop,
- disabledCallback: MenuDisabledState.StationStand.setJumpStop,
- auth: { station: true, center: false }
+ cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
},
{
label: this.$t('menu.menuStationStand.cancelJumpStop'),
handler: this.cancelJumpStop,
- disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
- auth: { station: true, center: false }
+ cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
},
{
label: this.$t('menu.menuStationStand.setRunLevel'),
handler: this.setRunLevel,
- disabledCallback: MenuDisabledState.StationStand.setRunLevel,
- auth: { station: false, center: false }
+ cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
},
{
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
handler: this.earlyDeparture,
- disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
- auth: { station: false, center: false }
+ cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
label: this.$t('menu.menuStationStand.setBackStrategy'),
handler: this.setBackStrategy,
- disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
- auth: { station: false, center: false }
+ cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
},
{
label: this.$t('menu.menuStationStand.getStationStandStatus'),
handler: this.detail,
- disabledCallback: MenuDisabledState.StationStand.detail,
- auth: { station: true, center: false }
+ cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
],
- central: [
+ Center: [
{
label: this.$t('menu.menuStationStand.detainTrain'),
handler: this.setDetainTrain,
- disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
- auth: { station: false, center: true }
+ cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
handler: this.cancelDetainTrain,
- disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
- auth: { station: false, center: true }
- },
- {
- label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
- handler: this.cancelDetainTrainForce,
- disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce,
- auth: { station: false, center: false }
+ cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrainAll'),
handler: this.cancelDetainTrainAll,
- disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainAll,
- auth: { station: false, center: true }
+ cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.jumpStop'),
handler: this.setJumpStop,
- disabledCallback: MenuDisabledState.StationStand.setJumpStop,
- auth: { station: false, center: true }
+ cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
},
{
label: this.$t('menu.menuStationStand.cancelJumpStop'),
handler: this.cancelJumpStop,
- disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
- auth: { station: true, center: true }
+ cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
},
{
label: this.$t('menu.menuStationStand.setStopTime'),
handler: this.setStopTime,
- disabledCallback: MenuDisabledState.StationStand.setStopTime,
- auth: { station: false, center: true }
+ cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
},
{
label: this.$t('menu.menuStationStand.setRunLevel'),
handler: this.setRunLevel,
- disabledCallback: MenuDisabledState.StationStand.setRunLevel,
- auth: { station: false, center: true }
+ cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
},
{
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
handler: this.earlyDeparture,
- disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
- auth: { station: false, center: true }
+ cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
label: this.$t('menu.menuStationStand.setBackStrategy'),
handler: this.setBackStrategy,
- disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
- auth: { station: false, center: true }
+ cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
},
{
label: this.$t('menu.menuStationStand.getStationStandStatus'),
handler: this.detail,
- disabledCallback: MenuDisabledState.StationStand.detail,
- auth: { station: true, center: true }
+ cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
]
},
@@ -178,12 +155,12 @@ export default {
{
label: this.$t('menu.menuStationStand.setFault'),
handler: this.setStoppage,
- disabledCallback: MenuDisabledState.StationStand.setStoppage
+ cmdType:CMD.Stand.CMD_STAND_ADD_FAULT
},
{
label: this.$t('menu.menuStationStand.cancelFault'),
handler: this.cancelStoppage,
- disabledCallback: MenuDisabledState.StationStand.cancelStoppage
+ cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
}
]
};
@@ -215,7 +192,8 @@ export default {
},
initMenu() {
// 编辑模式菜单列表
- this.menu = menuFiltration(this.menuNormal);
+ this.menu = MenuContextHandler.covert(this.menuNormal);
+ // this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
@@ -225,7 +203,7 @@ export default {
this.menu = this.menuForce;
}
- this.menu = menuConvert(this.menu);
+ // this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
@@ -241,246 +219,253 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.stoppage.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.stoppage.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.cancelStoppage.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 设置扣车
setDetainTrain() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.setDetainTrain.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(operate, this.selected);
+ this.$refs.standControl.doShow(step, this.selected);
}
});
},
// 取消扣车
cancelDetainTrain() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(operate, this.selected);
+ this.$refs.standControl.doShow(step, this.selected);
}
});
},
// 强制取消扣车
cancelDetainTrainForce() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(operate, this.selected);
+ this.$refs.standControl.doShow(step, this.selected);
}
});
},
// 全线取消扣车
cancelDetainTrainAll() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standDetainTrainAll.doShow(operate, this.selected);
+ this.$refs.standDetainTrainAll.doShow(step, this.selected);
}
});
},
// 设置跳停
setJumpStop() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.setJumpStop.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.setJumpStop.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(operate, this.selected);
+ this.$refs.standControl.doShow(step, this.selected);
}
});
},
// 取消跳停
cancelJumpStop() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(operate, this.selected);
+ this.$refs.standControl.doShow(step, this.selected);
}
});
},
// 设置停站时间
setStopTime() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.setStopTime.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.setStopTime.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
- let tempDate = null;
- if (response) {
- tempDate = response.data;
- }
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standStopTime.doShow(operate, this.selected, tempDate);
+ Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
+ const tempData = resp.data;
+ this.$refs.standStopTime.doShow(step, this.selected, tempData);
+ });
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 设置运行等级
setRunLevel() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.setRunLevel.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.setRunLevel.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
- let tempDate = null;
- if (response) {
- tempDate = response.data;
- }
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standRunLevel.doShow(operate, this.selected, tempDate);
+ Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
+ const tempData = resp.data;
+ this.$refs.standRunLevel.doShow(step, this.selected, tempData);
+ });
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 设置提前发车
earlyDeparture() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- operation: OperationEvent.StationStand.earlyDeparture.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(operate, this.selected);
+ this.$refs.standControl.doShow(step, this.selected);
}
});
},
// 设置折返策略
setBackStrategy() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- operation: OperationEvent.StationStand.setBackStrategy.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
- let tempDate = null;
- if (response) {
- tempDate = response.data;
- }
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate);
+ Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
+ const tempData = resp.data;
+ this.$refs.standBackStrategy.doShow(step, this.selected, tempData);
+ });
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 查询站台状态
detail() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.detail.menu.operation
+ code: `${this.selected.code}`,
+ operation: OperationEvent.StationStand.detail.menu.operation,
+ param: {
+ StationStand_Code: `${this.selected.code}`
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
- let tempDate = null;
- if (response) {
- tempDate = response.data;
- }
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standDetail.doShow(operate, this.selected, tempDate);
+ Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
+ const tempData = resp.data;
+ this.$refs.standDetail.doShow(step, this.selected, tempData);
+ });
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
}
}
diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue
index 8c18ebee9..a62a42a12 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue
@@ -14,10 +14,11 @@ import SwitchControl from './dialog/switchControl';
import SwitchCmdControl from './dialog/switchCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
+import CMD from '@/scripts/cmdPlugin/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 { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
+import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'SwitchMenu',
@@ -40,134 +41,132 @@ export default {
return {
menu: [],
menuNormal: {
- local: [
+ Local: [
{
label: this.$t('menu.menuSwitch.switchLock'),
handler: this.lock,
- disabledCallback: MenuDisabledState.Switch.lock,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: this.$t('menu.menuSwitch.switchUnlock'),
handler: this.unlock,
- disabledCallback: MenuDisabledState.Switch.unlock,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
handler: this.block,
- disabledCallback: MenuDisabledState.Switch.block,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
handler: this.unblock,
- disabledCallback: MenuDisabledState.Switch.unblock,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: this.$t('menu.menuSwitch.switchTurnout'),
handler: this.switchTurnout,
- disabledCallback: MenuDisabledState.Switch.switchTurnout,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_TURN
},
{
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
handler: this.fault,
- disabledCallback: MenuDisabledState.Switch.fault,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionAxisPreReset'),
handler: this.axlePreReset,
- disabledCallback: MenuDisabledState.Switch.axlePreReset,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
},
{
label: this.$t('menu.menuSwitch.sectionResection'),
handler: this.split,
- disabledCallback: MenuDisabledState.Switch.split,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
},
{
label: this.$t('menu.menuSwitch.sectionActive'),
handler: this.active,
- disabledCallback: MenuDisabledState.Switch.active,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
},
{
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
handler: this.setSpeed,
- disabledCallback: MenuDisabledState.Switch.setSpeed,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
{
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
handler: this.cancelSpeed,
- disabledCallback: MenuDisabledState.Switch.cancelSpeed,
- auth: { station: true, center: false }
+ auth: { station: true, center: false },
+ cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
}
],
- central: [
+ Center: [
{
label: this.$t('menu.menuSwitch.switchLock'),
handler: this.lock,
- disabledCallback: MenuDisabledState.Switch.lock,
- auth: { station: false, center: true }
+ auth: { station: false, center: true },
+ cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: this.$t('menu.menuSwitch.switchUnlock'),
handler: this.unlock,
- disabledCallback: MenuDisabledState.Switch.unlock,
- auth: { station: false, center: true }
+ auth: { station: false, center: true },
+ cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
handler: this.block,
- disabledCallback: MenuDisabledState.Switch.block,
- auth: { station: false, center: true }
+ auth: { station: false, center: true },
+ cmdType:CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
handler: this.unblock,
- disabledCallback: MenuDisabledState.Switch.unblock,
- auth: { station: false, center: true }
+ auth: { station: false, center: true },
+ cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: this.$t('menu.menuSwitch.switchTurnout'),
handler: this.switchTurnout,
- disabledCallback: MenuDisabledState.Switch.switchTurnout,
- auth: { station: false, center: true }
+ auth: { station: false, center: true },
+ cmdType:CMD.Switch.CMD_SWITCH_TURN
},
{
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
handler: this.fault,
- disabledCallback: MenuDisabledState.Switch.fault,
- auth: { station: false, center: true }
+ auth: { station: false, center: true },
+ cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: this.$t('menu.menuSwitch.sectionResection'),
handler: this.split,
- disabledCallback: MenuDisabledState.Switch.split,
- auth: { station: true, center: true }
+ auth: { station: true, center: true },
+ cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
},
{
label: this.$t('menu.menuSwitch.sectionActive'),
handler: this.active,
- disabledCallback: MenuDisabledState.Switch.active,
- auth: { station: true, center: true }
+ auth: { station: true, center: true },
+ cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
},
{
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
handler: this.setSpeed,
- disabledCallback: MenuDisabledState.Switch.setSpeed,
- auth: { station: false, center: true }
+ cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
{
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
handler: this.cancelSpeed,
- disabledCallback: MenuDisabledState.Switch.cancelSpeed,
- auth: { station: false, center: true }
+ cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
}
]
},
@@ -175,18 +174,18 @@ export default {
{
label: this.$t('menu.menuSwitch.setFault'),
handler: this.setStoppage,
- disabledCallback: MenuDisabledState.Switch.setStoppage,
auth: {
- }
+ },
+ cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
},
{
label: this.$t('menu.menuSwitch.cancelFault'),
handler: this.cancelStoppage,
- disabledCallback: MenuDisabledState.Switch.cancelStoppage,
auth: {
- }
+ },
+ cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
}
]
};
@@ -218,7 +217,8 @@ export default {
},
initMenu() {
// 编辑模式菜单列表
- this.menu = menuFiltration(this.menuNormal);
+ this.menu = MenuContextHandler.covert(this.menuNormal);
+ // this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
@@ -228,7 +228,7 @@ export default {
this.menu = this.menuForce;
}
- this.menu = menuConvert(this.menu);
+ // this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
@@ -244,242 +244,255 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.stoppage.menu.operation
+
+ operation: OperationEvent.Switch.stoppage.menu.operation,
+ cmdType: CMD.Switch.CMD_STOPPAGE,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.cancelStoppage.menu.operation
+
+ operation: OperationEvent.Switch.cancelStoppage.menu.operation,
+ cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 道岔单锁
lock() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.lock.menu.operation
+
+ operation: OperationEvent.Switch.lock.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.switchControl.doShow(operate, this.selected);
+ this.$refs.switchControl.doShow(step, this.selected);
}
});
},
// 道岔解封
unlock() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.unlock.menu.operation
+
+ operation: OperationEvent.Switch.unlock.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.switchCmdControl.doShow(operate, this.selected);
+ this.$refs.switchCmdControl.doShow(step, this.selected);
}
});
},
// 道岔封锁
block() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.block.menu.operation
+
+ operation: OperationEvent.Switch.block.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.switchControl.doShow(operate, this.selected);
+ this.$refs.switchControl.doShow(step, this.selected);
}
});
},
// 道岔解封
unblock() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.unblock.menu.operation
+
+ operation: OperationEvent.Switch.unblock.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.switchCmdControl.doShow(operate, this.selected);
+ this.$refs.switchCmdControl.doShow(step, this.selected);
}
});
},
// 道岔强扳
switchTurnoutForce() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.turnoutForce.menu.operation
+
+ operation: OperationEvent.Switch.turnoutForce.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.switchControl.doShow(operate, this.selected);
+ this.$refs.switchControl.doShow(step, this.selected);
}
});
},
// 道岔转动
switchTurnout() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.turnout.menu.operation
+
+ operation: OperationEvent.Switch.turnout.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- if (operate.operation) {
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (step.operation) {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.switchControl.doShow(operate, this.selected);
+ this.$refs.switchControl.doShow(step, this.selected);
}
});
}
},
// 道岔故障解锁
fault() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.fault.menu.operation
+
+ operation: OperationEvent.Switch.fault.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.switchCmdControl.doShow(operate, this.selected);
+ this.$refs.switchCmdControl.doShow(step, this.selected);
}
});
},
// 道岔计轴预复位
axlePreReset() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.axlePreReset.menu.operation
+
+ operation: OperationEvent.Switch.axlePreReset.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.switchCmdControl.doShow(operate, this.selected);
+ this.$refs.switchCmdControl.doShow(step, this.selected);
}
});
},
// 区段切除
split() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.split.menu.operation
+
+ operation: OperationEvent.Switch.split.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.switchControl.doShow(operate, this.selected);
+ this.$refs.switchControl.doShow(step, this.selected);
}
});
},
// 区段激活
active() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.active.menu.operation
+
+ operation: OperationEvent.Switch.active.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.switchControl.doShow(operate, this.selected);
+ this.$refs.switchControl.doShow(step, this.selected);
}
});
},
// 道岔设置速度
setSpeed() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.setSpeed.menu.operation
+
+ operation: OperationEvent.Switch.setSpeed.menu.operation,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.speedCmdControl.doShow(operate, this.selected);
+ this.$refs.speedCmdControl.doShow(step, this.selected);
}
});
},
// 道岔取消速度
cancelSpeed() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Switch.type,
- label: MapDeviceType.Switch.label,
- operation: OperationEvent.Switch.cancelSpeed.menu.operation
+
+ operation: OperationEvent.Switch.cancelSpeed.menu.operation,
+ cmdType: CMD.Switch.CMD_CANCEL_SPEED,
+ param: {
+ Switch_Code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ this.$store.dispatch('training/next', step).then(({ valid, response }) => {
if (valid) {
const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
+ this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
}
});
}
-
}
};
diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue
index 40679a35d..7f215a543 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue
@@ -14,14 +14,15 @@
import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
-import { OperateMode } from '@/scripts/ConstDic';
-import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
-import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
+import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
+import CMD from '@/scripts/cmdPlugin/CommandEnum';
import TrainControl from './dialog/trainControl';
import TrainDelete from './dialog/trainDelete';
import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber';
+import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'MenuTrain',
@@ -46,63 +47,63 @@ export default {
return {
menu: [],
menuNormal: {
- local: [],
- central: [
- {
- label: this.$t('menu.menuTrain.addTrainId'),
- handler: this.addTrainId,
- disabledCallback: MenuDisabledState.Train.addTrainId,
- auth: { station: true, center: true }
- },
- {
- label: this.$t('menu.menuTrain.deleteTrainId'),
- handler: this.delTrainId,
- disabledCallback: MenuDisabledState.Train.delTrainId,
- auth: { station: true, center: true }
- },
- {
- label: this.$t('menu.menuTrain.editTrainId'),
- handler: this.editTrainId,
- disabledCallback: MenuDisabledState.Train.editTrainId,
- auth: { station: true, center: true }
- },
- {
- label: this.$t('menu.menuTrain.editTrainNo'),
- handler: this.editTrainNo,
- disabledCallback: MenuDisabledState.Train.editTrainNo,
- auth: { station: true, center: true }
- },
- {
- label: this.$t('menu.menuTrain.moveTrainId'),
- handler: this.moveTrainId,
- disabledCallback: MenuDisabledState.Train.moveTrainId,
- auth: { station: true, center: true }
- },
- {
- label: this.$t('menu.menuTrain.switchTrainId'),
- handler: this.switchTrainId,
- disabledCallback: MenuDisabledState.Train.switchTrainId,
- auth: { station: true, center: true }
- }
+ Local: [],
+ Center: [
+ // {
+ // label: this.$t('menu.menuTrain.addTrainId'),
+ // handler: this.addTrainId,
+ // auth: { station: true, center: true },
+ // cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
+ // },
+ // {
+ // label: this.$t('menu.menuTrain.deleteTrainId'),
+ // handler: this.delTrainId,
+ // auth: { station: true, center: true },
+ // cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
+ // },
+ // {
+ // label: this.$t('menu.menuTrain.editTrainId'),
+ // handler: this.editTrainId,
+ // auth: { station: true, center: true },
+ // cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
+ // },
+ // {
+ // label: this.$t('menu.menuTrain.editTrainNo'),
+ // handler: this.editTrainNo,
+ // auth: { station: true, center: true },
+ // cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
+ // },
+ // {
+ // label: this.$t('menu.menuTrain.moveTrainId'),
+ // handler: this.moveTrainId,
+ // auth: { station: true, center: true },
+ // cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
+ // },
+ // {
+ // label: this.$t('menu.menuTrain.switchTrainId'),
+ // handler: this.switchTrainId,
+ // auth: { station: true, center: true },
+ // cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
+ // }
]
},
menuForce: [
{
label: this.$t('menu.menuTrain.setCommunicationFault'),
handler: this.setStoppage,
- disabledCallback: MenuDisabledState.Train.setStoppage
+ cmdType:CMD.Train.CMD_TRAIN_ADD_FAULT
},
{
label: this.$t('menu.menuTrain.cancelCommunicationFault'),
handler: this.cancelStoppage,
- disabledCallback: MenuDisabledState.Train.cancelStoppage
+ cmdType:CMD.Train.CMD_TRAIN_REMOVE_FAULT
}
],
menuSpeed: [
{
label: this.$t('menu.menuTrain.confirmRunToFrontStation'),
handler: this.limitSpeed,
- disabledCallback: MenuDisabledState.Train.limitSpeed
+ cmdType:CMD.Train.CMD_TRAIN_MANUAL_LIMIT_DRIVE
}
]
};
@@ -134,7 +135,8 @@ export default {
},
initMenu() {
// 编辑模式菜单列表
- this.menu = trainMenuFiltration(this.menuNormal);
+ // this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
+ this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
}
@@ -144,7 +146,7 @@ export default {
this.menu = [...this.menuForce, ...this.menuSpeed];
}
- this.menu = menuConvert(this.menu);
+ // this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
@@ -162,157 +164,166 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Train.type,
- label: MapDeviceType.Train.label,
- operation: OperationEvent.Train.stoppage.menu.operation
+
+ operation: OperationEvent.Train.stoppage.menu.operation,
+ cmdType: CMD.Train.CMD_STOPPAGE,
+ param: {
+ code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Train.type,
- label: MapDeviceType.Train.label,
- operation: OperationEvent.Train.cancelStoppage.menu.operation
+
+ operation: OperationEvent.Train.cancelStoppage.menu.operation,
+ cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
+ param: {
+ code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 限速行驶
limitSpeed() {
- const operate = {
+ const step = {
start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Train.type,
- label: MapDeviceType.Train.label,
- operation: OperationEvent.Train.limitSpeed.menu.operation
+
+ operation: OperationEvent.Train.limitSpeed.menu.operation,
+ cmdType: CMD.Train.CMD_LIMIT_SPEED,
+ param: {
+ code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.noticeInfo.doShow(step);
});
},
// 添加列车识别号
addTrainId() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Train.type,
- label: MapDeviceType.Train.label,
- operation: OperationEvent.Train.addTrainId.menu.operation
+
+ operation: OperationEvent.Train.addTrainId.menu.operation,
+ param: {
+ code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainControl.doShow(operate, this.selected);
+ this.$refs.trainControl.doShow(step, this.selected);
}
});
},
// 删除列车识别号
delTrainId() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Train.type,
- label: MapDeviceType.Train.label,
- operation: OperationEvent.Train.delTrainId.menu.operation
+
+ operation: OperationEvent.Train.delTrainId.menu.operation,
+ param: {
+ code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainDelete.doShow(operate, this.selected);
+ this.$refs.trainDelete.doShow(step, this.selected);
}
});
},
// 修改列车识别号
editTrainId() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Train.type,
- label: MapDeviceType.Train.label,
- operation: OperationEvent.Train.editTrainId.menu.operation
+
+ operation: OperationEvent.Train.editTrainId.menu.operation,
+ param: {
+ code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainControl.doShow(operate, this.selected);
+ this.$refs.trainControl.doShow(step, this.selected);
}
});
},
// 修改车组号
editTrainNo() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Train.type,
- label: MapDeviceType.Train.label,
- operation: OperationEvent.Train.editTrainNo.menu.operation
+
+ operation: OperationEvent.Train.editTrainNo.menu.operation,
+ param: {
+ code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainEditNumber.doShow(operate, this.selected);
+ this.$refs.trainEditNumber.doShow(step, this.selected);
}
});
},
// 移动列车识别号
moveTrainId() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Train.type,
- label: MapDeviceType.Train.label,
- operation: OperationEvent.Train.moveTrainId.menu.operation
+
+ operation: OperationEvent.Train.moveTrainId.menu.operation,
+ param: {
+ code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainMove.doShow(operate, this.selected);
+ this.$refs.trainMove.doShow(step, this.selected);
}
});
},
// 交换列车识别号
switchTrainId() {
- const operate = {
+ const step = {
start: true,
- code: this.selected.code,
- type: MapDeviceType.Train.type,
- label: MapDeviceType.Train.label,
- operation: OperationEvent.Train.switchTrainId.menu.operation
+
+ operation: OperationEvent.Train.switchTrainId.menu.operation,
+ param: {
+ code: this.selected.code
+ }
};
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainSwitch.doShow(operate, this.selected);
+ this.$refs.trainSwitch.doShow(step, this.selected);
}
});
}
diff --git a/src/jmapNew/theme/fuzhou_01/menus/passiveDialog/alarm.vue b/src/jmapNew/theme/fuzhou_01/menus/passiveDialog/alarm.vue
index d1f1124a9..471f03888 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/passiveDialog/alarm.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/passiveDialog/alarm.vue
@@ -83,7 +83,7 @@