diff --git a/src/jmapNew/theme/datie_02/menus/menuButton.vue b/src/jmapNew/theme/datie_02/menus/menuButton.vue
index 15fd42241..31ebff0ae 100644
--- a/src/jmapNew/theme/datie_02/menus/menuButton.vue
+++ b/src/jmapNew/theme/datie_02/menus/menuButton.vue
@@ -301,9 +301,6 @@ export default {
passWordCommit(data) {
let operate = {};
if (data.nextCmdType) {
- if (data.nextCmdType == CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE) {
- this.$store.dispatch('training/updateMapState', [{code: data.code, _type:'SignalButton', pressDown: 0}]);
- }
operate = {
over: true,
operation: data.operateNext,
@@ -312,37 +309,63 @@ export default {
userOperationType: 'leftClick',
param: data.param
};
+ this.$store.dispatch('trainingNew/next', operate).then( result => {
+ if (result.valid) {
+ if (data.nextCmdType == CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE) {
+ this.$store.dispatch('training/updateMapState', [{code: data.code, _type:'SignalButton', pressDown: 0}]);
+ }
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$store.dispatch('trainingNew/execute', { cmdType: result.cmdType, wholeParam: result.params }).then(resp => {
+ if (operate.operationPre === this.Switch.guideLock.leftButton.operation || operate.operation === this.Switch.guideLock.leftButton.operation) {
+ this.guideLockLeftFlag = !this.guideLockLeftFlag;
+ } else if (operate.operationPre === this.Switch.guideLock.rightButton.operation || operate.operation === this.Switch.guideLock.rightButton.operation) {
+ this.guideLockRightFlag = !this.guideLockRightFlag;
+ }
+ this.clearOperate();
+ }).catch(e => {
+ console.error(e);
+ this.$refs.noticeInfo.doShow();
+ this.clearOperate();
+ });
+ }
+ });
} else {
operate = {
operationPre: data.operation,
operation: data.operateNext,
userOperationType: 'leftClick'
};
- }
- this.trainingOperation(operate);
- },
- // 执行操作
- trainingOperation(operate) {
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
- /* 引导总锁输入面后 处理按钮选中状态 */
- if (operate.operationPre === this.Switch.guideLock.leftButton.operation || operate.operation === this.Switch.guideLock.leftButton.operation) {
- this.guideLockLeftFlag = !this.guideLockLeftFlag;
- } else if (operate.operationPre === this.Switch.guideLock.rightButton.operation || operate.operation === this.Switch.guideLock.rightButton.operation) {
- this.guideLockRightFlag = !this.guideLockRightFlag;
- }
+ this.$store.dispatch('trainingNew/next', operate).then( result => {
if (operate.operationPre == this.Station.powerUnLock.button.operation) {
this.clearOperate();
}
- // debugger;
- // this.$store.dispatch('menuOperation/setButtonOperation', operate.operation); // 按钮菜单是否被按下
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- }
- }).catch((error) => {
- console.error(error);
- this.$refs.noticeInfo.doShow();
- });
+ });
+ }
+ // this.trainingOperation(operate);
},
+ // 执行操作
+ // trainingOperation(operate) {
+ // this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ // if (valid) {
+ // /* 引导总锁输入面后 处理按钮选中状态 */
+ // if (operate.operationPre === this.Switch.guideLock.leftButton.operation || operate.operation === this.Switch.guideLock.leftButton.operation) {
+ // this.guideLockLeftFlag = !this.guideLockLeftFlag;
+ // } else if (operate.operationPre === this.Switch.guideLock.rightButton.operation || operate.operation === this.Switch.guideLock.rightButton.operation) {
+ // this.guideLockRightFlag = !this.guideLockRightFlag;
+ // }
+ // if (operate.operationPre == this.Station.powerUnLock.button.operation) {
+ // this.clearOperate();
+ // }
+ // // debugger;
+ // // this.$store.dispatch('menuOperation/setButtonOperation', operate.operation); // 按钮菜单是否被按下
+ // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ // }
+ // }).catch((error) => {
+ // console.error(error);
+ // this.$refs.noticeInfo.doShow();
+ // });
+ // },
updateButtonShow(val, old) {
if (old) {
// 恢复旧按钮显示
@@ -406,8 +429,8 @@ export default {
code: model.code,
userOperationType: 'leftClick'
};
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
+ this.$store.dispatch('trainingNew/next', operate).then(result => {
+ if (result.valid) {
const {switchSection, code, shuntingTypeList} = model;
this.$refs.defectiveShunting.doShow({switchSection, code, shuntingTypeList});
}
@@ -420,8 +443,8 @@ export default {
operation: this.Station.stationMasterLock.leftButton.operation,
userOperationType: 'leftClick'
};
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
+ this.$store.dispatch('trainingNew/next', operate).then(result => {
+ if (result.valid) {
// 引导总锁弹出 调用取消引导总锁指令
operate.nextCmdType = this.sGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
operate.param = {throat: 'S', stationCode: this.$store.state.map.showCentralizedStationCode};
@@ -437,8 +460,8 @@ export default {
operation: this.Station.stationMasterLock.rightButton.operation,
userOperationType: 'leftClick'
};
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
+ this.$store.dispatch('trainingNew/next', operate).then(result => {
+ if (result.valid) {
// 引导总锁弹出 调用取消引导总锁指令
operate.nextCmdType = this.xGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
operate.param = {throat: 'X', stationCode: this.$store.state.map.showCentralizedStationCode};
@@ -450,58 +473,78 @@ export default {
},
buttonDown(operation, commandTypeList) {
this.clearOperate();
- if (operation != this.Command.cancel.clearMbm.operation) {
- const operate = {
- operation: operation,
- userOperationType: 'leftClick'
- };
- // 以下 会弹出密码框 (总人解,区故解) 铅封按钮
- const operationList = [this.Signal.humanTrainRoute.button.operation,
- this.Section.fault.button.operation,
- this.Section.defectiveShunting.button.operation,
- this.Station.powerUnLock.button.operation,
- this.Signal.signalTurnOff.menuButton.operation];
- const operationMap = {
- [this.Signal.humanTrainRoute.button.operation]:'总人解',
- [this.Section.fault.button.operation]:'区故解',
- [this.Section.defectiveShunting.button.operation]:'分路不良',
- [this.Signal.signalTurnOff.menuButton.operation]:'灭灯',
- [this.Station.powerUnLock.button.operation]:'上电解锁'
- };
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
- this.operation = operation;
- this.commandTypeList = commandTypeList;
- this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- // 判断是否需要 弹窗密码框
- if (operationList.includes(operation)) {
- operate['operateNext'] = this.Command.close.password.operation;
- if (operation == this.Station.powerUnLock.button.operation) {
- operate.nextCmdType = CMD.Station.CMD_STATION_POWER_ON_UNLOCK;
- operate.param = {stationCode: this.$store.state.map.showCentralizedStationCode};
- }
- this.$refs.password.doShow(operate, operationMap[operation]);
- }
- this.timeNode = this.$store.state.socket.simulationTimeSync;
- this.$store.dispatch('training/emitTipFresh');
- }
- });
- } else {
- // 清除按钮
- const operate = {
- start: true,
- userOperationType: 'leftClick',
- operation: operation
- };
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
- this.commandTypeList = [];
- this.$store.dispatch('menuOperation/setButtonOperation', null);
- this.guideLockRightFlag = false;
- }
- });
- }
+ const operate = {
+ start: true,
+ operation: operation,
+ userOperationType: 'leftClick'
+ };
+ // 以下 会弹出密码框 (总人解,区故解) 铅封按钮
+ const operationList = [this.Signal.humanTrainRoute.button.operation,
+ this.Section.fault.button.operation,
+ this.Section.defectiveShunting.button.operation,
+ this.Station.powerUnLock.button.operation,
+ this.Signal.signalTurnOff.menuButton.operation];
+ const operationMap = {
+ [this.Signal.humanTrainRoute.button.operation]:'总人解',
+ [this.Section.fault.button.operation]:'区故解',
+ [this.Section.defectiveShunting.button.operation]:'分路不良',
+ [this.Signal.signalTurnOff.menuButton.operation]:'灭灯',
+ [this.Station.powerUnLock.button.operation]:'上电解锁'
+ };
+ this.$store.dispatch('trainingNew/next', operate).then(result => {
+ if (operation === this.Command.cancel.clearMbm.operation) {
+ this.commandTypeList = [];
+ this.$store.dispatch('menuOperation/setButtonOperation', null);
+ this.guideLockRightFlag = false;
+ this.guideLockLeftFlag = false;
+ }
+ });
+ // this.commandTypeList = [];
+ // this.$store.dispatch('menuOperation/setButtonOperation', null);
+ // this.guideLockRightFlag = false;
+ // this.guideLockLeftFlag = false;
+
+ // if (operation != this.Command.cancel.clearMbm.operation) {
+ // const operate = {
+ // operation: operation,
+ // userOperationType: 'leftClick'
+ // };
+
+ // this.$store.dispatch('trainingNew/next', operate).then(result => {
+ // if (result.valid) {
+ // this.operation = operation;
+ // this.commandTypeList = commandTypeList;
+ // this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
+ // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ // // 判断是否需要 弹窗密码框
+ // if (operationList.includes(operation)) {
+ // operate['operateNext'] = this.Command.close.password.operation;
+ // if (operation == this.Station.powerUnLock.button.operation) {
+ // operate.nextCmdType = CMD.Station.CMD_STATION_POWER_ON_UNLOCK;
+ // operate.param = {stationCode: this.$store.state.map.showCentralizedStationCode};
+ // }
+ // this.$refs.password.doShow(operate, operationMap[operation]);
+ // }
+ // this.timeNode = this.$store.state.socket.simulationTimeSync;
+ // this.$store.dispatch('training/emitTipFresh');
+ // }
+ // });
+ // } else {
+ // // 清除按钮
+ // const operate = {
+ // start: true,
+ // userOperationType: 'leftClick',
+ // operation: operation
+ // };
+ // this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ // if (valid) {
+ // this.commandTypeList = [];
+ // this.$store.dispatch('menuOperation/setButtonOperation', null);
+ // this.guideLockRightFlag = false;
+ // this.guideLockLeftFlag = false;
+ // }
+ // });
+ // }
},
// 解析进路数据
handleRouteDataMap() {
diff --git a/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue b/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
index bb50f08a1..fc8f662b9 100644
--- a/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
+++ b/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
@@ -6,7 +6,7 @@
建立
-