diff --git a/src/jmapNew/theme/chengdu_01/menus/menuRequest.vue b/src/jmapNew/theme/chengdu_01/menus/menuRequest.vue index 3ebbf0ab6..70d0c5df8 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuRequest.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuRequest.vue @@ -93,6 +93,35 @@ export default { if (this.row && this.row.deviceCode) { this.$store.dispatch('menuOperation/spliceRequestList', this.row); } + }, + commit(){ + let requestList=this.$store.state.menuOperation.requestList; + if(requestList && requestList.length>0){ + this.commitEachCommand(requestList,0); + } + }, + commitEachCommand(requestList,index){ + let eachCmd=requestList[index]; + const operate = { + over: true, + operation: eachCmd.operation.code, + cmdType: eachCmd.operation.cmdType + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + this.loading = false; + if (valid) { + this.$store.dispatch('menuOperation/spliceRequestList',{deviceCode:eachCmd.device.code,operateCode:eachCmd.operation.code}); + let nextIndex=index++; + if(nextIndex { + this.loading = false; + // this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); } } }; diff --git a/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue b/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue index 4d623d068..01911ee5d 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue @@ -44,12 +44,12 @@ export default { { label: '道岔定位', handler: this.locate, - cmdType: CMD.Switch.CMD_SWITCH_TURN + cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION }, { label: '道岔反位', handler: this.reverse, - cmdType: CMD.Switch.CMD_SWITCH_TURN + cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION }, { label: '道岔单锁', @@ -241,7 +241,7 @@ export default { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.locate.menu.operation, name: '道岔定位'}}); + this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.locate.menu.operation, name: '道岔定位',cmdType:CMD.Switch.CMD_SWITCH_TURN}}); // this.$refs.switchControl.doShow(operate, this.selected); } }); @@ -258,7 +258,7 @@ export default { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.reverse.menu.operation, name: '道岔反位'}}); + this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.reverse.menu.operation, name: '道岔反位',cmdType:CMD.Switch.CMD_SWITCH_TURN}}); // this.$refs.switchControl.doShow(operate, this.selected); } });