diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue index c305ea141..8ac2a2c68 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue @@ -95,17 +95,7 @@ 指定列车跳停
车组号 - 人工 -
- 运行等级 +
+ 运行等级
+
+ 停站时间 + +
@@ -264,6 +264,7 @@ export default { tripNumber: '', effective: '01', trainRunlevel: 2, + trainStopTime: 0, disabledTime: true }; }, @@ -290,9 +291,9 @@ export default { return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : ''; } }, - domIdJumpStop() { - return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : ''; - }, + // domIdJumpStop() { + // return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : ''; + // }, domIdCancelJumpStop() { return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.choose.domId : ''; }, @@ -319,7 +320,7 @@ export default { title() { if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { return '扣车'; - } else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) { + } else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) { return '取消扣车'; } else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { return '设置跳停'; @@ -335,33 +336,34 @@ export default { }, watch: { operation(data) { - this.JumpStop = false; - this.RunLevel = false; - this.DetainTrain = false; - this.radio = '01'; - this.radio1 = '1'; - this.radio2 = '1'; - this.effective = '01'; - if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) { - this.radio1 = '1'; + if (data != OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) { + this.JumpStop = false; + this.RunLevel = false; + this.DetainTrain = false; this.radio = '01'; - this.DetainTrain = true; - } else if (data == OperationEvent.StationStand.cancelDetainTrain.menu.operation) { - this.radio1 = '2'; - this.radio = '01'; - this.DetainTrain = true; - } else if (data == OperationEvent.StationStand.setJumpStop.menu.operation) { - this.JumpStop = true; this.radio1 = '1'; - } else if (data == OperationEvent.StationStand.cancelJumpStop.menu.operation) { - this.JumpStop = true; - this.radio1 = '2'; - } else if (data == OperationEvent.StationStand.setStopTime.menu.operation) { - this.RunLevel = true; this.radio2 = '1'; - } else if (data == OperationEvent.StationStand.setRunLevel.menu.operation) { - this.RunLevel = true; - this.radio2 = '2'; + if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) { + this.radio1 = '1'; + this.radio = '01'; + this.DetainTrain = true; + } else if (data == OperationEvent.StationStand.cancelDetainTrain.menu.operation) { + this.radio1 = '2'; + this.radio = '01'; + this.DetainTrain = true; + } else if (data == OperationEvent.StationStand.setJumpStop.menu.operation) { + this.JumpStop = true; + this.radio1 = '1'; + } else if (data == OperationEvent.StationStand.cancelJumpStop.menu.operation) { + this.JumpStop = true; + this.radio1 = '2'; + } else if (data == OperationEvent.StationStand.setStopTime.menu.operation) { + this.RunLevel = true; + this.radio2 = '1'; + } else if (data == OperationEvent.StationStand.setRunLevel.menu.operation) { + this.RunLevel = true; + this.radio2 = '2'; + } } } }, @@ -390,9 +392,8 @@ export default { } if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { this.radio = selected.direction; - } else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) { - this.effective = '01'; } + this.effective = '02'; this.radio = '01'; this.disabledTime = true; this.trainList = this.map.trainList; // 加载列车数据 @@ -407,80 +408,53 @@ export default { this.dialogShow = false; this.$store.dispatch('training/emitTipFresh'); this.operation = ''; + this.trainStopTime = 0; }, - choose(upDown) { - // 取消扣车 请求code码 + choose(upDown) { // 取消扣车 请求code码 const operate = { - operation: OperationEvent.StationStand.cancelDetainTrain.choose.operati, - val: this.radio1 + operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation, + val: this.radio }; - - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }); + if (this.radio == '02' || this.radio == '03') { + this.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation; + } else { + this.operation = OperationEvent.StationStand.cancelDetainTrain.menu.operation; + } + this.handleBreak(operate); }, - handleTrainNoBlur() { // 设置跳停 填写车组号 + trainNoSelectChange(upDown) { // 跳停 选择车组号 const operate = { operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation }; - - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }); - }, - trainNoSelectChange(upDown) { // 取消跳停 选择车组号 - const operate = { - operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation - }; - - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }); + this.handleBreak(operate); }, chooseJumpStop(upDown) { const operate = { operation: '' }; - if (this.radio == '02') { - this.tripNumber = ''; - } if (this.radio1 == '1') { // 跳停选择 operate.operation = OperationEvent.StationStand.setJumpStop.select.operation; } else { // 取消跳停选择 operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation; } - - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }); + this.handleBreak(operate); }, chooseEffective(effective) { const operate = { - operation: '' + operation: '', + val: effective }; if (this.radio2 == '1') { // 设置停站时间 operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation; } else { // 设置站间运行等级 operate.operation = OperationEvent.StationStand.setRunLevel.choose2.operation; } - - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }); + this.handleBreak(operate); }, chooseStopTime(upDown) { const operate = { - operation: '' + operation: '', + val: this.radio }; if (this.radio2 == '1') { // 设置停站时间 operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation; @@ -490,25 +464,12 @@ export default { if (this.radio === '01') { this.disabledTime = true; this.trainRunlevel = 2; + this.effective = '02'; } else { this.disabledTime = false; + this.effective = '01'; } - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }); - }, - stopTimeBlur() { - const operate = { - operation: OperationEvent.StationStand.setStopTime.input.operation - }; - - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }); + this.handleBreak(operate); }, trainNoSelectLevel(upDown) { const operate = { @@ -518,17 +479,24 @@ export default { standRunLevel: `${upDown}` } }; - + this.handleBreak(operate); + }, + handleTrainStopTime() { + const operate = { + operation: OperationEvent.StationStand.setStopTime.input.operation, + val: `${this.trainStopTime}` + }; + this.handleBreak(operate); + }, + handleBreak(operate) { // 断点记录 this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } + valid && this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); }); }, commit() { if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { this.setDetainTrain(); /** 设置扣车*/ - } else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) { + } else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) { this.cancelDetainTrain(); /** 取消扣车*/ } else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { this.setJumpStop(); /** 设置跳停*/ @@ -555,27 +523,22 @@ export default { if (!valid) { this.$refs.noticeInfo.doShow(operate); } - }).catch((error) => { + }).catch(() => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate, [error.message]); + this.$refs.noticeInfo.doShow(); }); }, // 取消扣车 cancelDetainTrain() { const operate = { over: true, - operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, + operation: this.operation, cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, param: { standAllLine: `${this.radio}` } }; - if (this.radio == '02') { - operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation; - } else if (this.radio == '03') { - operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation; - } this.loading = true; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -584,10 +547,10 @@ export default { if (!valid) { this.$refs.noticeInfo.doShow(operate); } - }).catch((error) => { + }).catch(() => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate, [error.message]); + this.$refs.noticeInfo.doShow(); }); }, // 设置跳停 @@ -607,10 +570,10 @@ export default { if (valid) { this.doClose(); } - }).catch((error) => { + }).catch(() => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate, [error.message]); + this.$refs.noticeInfo.doShow(); }); }, // 取消跳停 @@ -630,22 +593,21 @@ export default { if (valid) { this.doClose(); } - }).catch((error) => { + }).catch(() => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate, [error.message]); + this.$refs.noticeInfo.doShow(); }); }, // 设置停站时间 setStopTime() { - const forver = this.effective == '01'; const operate = { over: true, operation: OperationEvent.StationStand.setStopTime.menu.operation, cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, param: { - parkingTime: this.radio == '01' ? -1 : 1, - parkingAlwaysValid: forver + parkingTime: this.radio == '01' ? -1 : this.trainStopTime, + parkingAlwaysValid: `${this.effective != '01'}` } }; @@ -655,30 +617,21 @@ export default { if (valid) { this.doClose(); } - }).catch((error) => { + }).catch(() => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate, [error.message]); + this.$refs.noticeInfo.doShow(); }); }, // 设置运行速度 setRunLevel() { - - const forver = this.effective == '01'; - // let val = this.radio; - // if (this.radio == '02') { - // val = `${this.radio}::${this.trainRunlevel}::${forver}`; - // } else { - // val = `${this.radio}::01::${forver}`; - // } const operate = { over: true, operation: OperationEvent.StationStand.setRunLevel.menu.operation, cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME, param: { - // standStopControl: `${this.radio}`, runLevelTime: this.radio === '02' ? this.trainRunlevel : 2, - runLevelTimeForever: forver + runLevelTimeForever: `${this.effective != '01'}` } }; @@ -688,10 +641,10 @@ export default { if (valid) { this.doClose(); } - }).catch((error) => { + }).catch(() => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate, [error.message]); + this.$refs.noticeInfo.doShow(); }); }, cancel() { @@ -711,8 +664,13 @@ export default { } }; - diff --git a/src/jmapNew/theme/chengdu_03/operationConfig.js b/src/jmapNew/theme/chengdu_03/operationConfig.js index 6dad66432..d87e0bed2 100644 --- a/src/jmapNew/theme/chengdu_03/operationConfig.js +++ b/src/jmapNew/theme/chengdu_03/operationConfig.js @@ -572,7 +572,7 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + { deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' } ] }, { @@ -586,7 +586,7 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, - { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' } + { deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' } ] }, { @@ -600,8 +600,7 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, - { deviceType: '06', orderNum: 2, operateCode: '5093', tip: '鼠标左键点击,选择【自动】', val: '02' }, - { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::0::true' } + { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮' } ] }, { @@ -618,7 +617,7 @@ export default { { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, { deviceType: '06', orderNum: 4, operateCode: '5093', tip: '标左键点击,选择【一直有效】', val: '02' }, - { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' } + { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮' } ] }, { @@ -634,7 +633,7 @@ export default { { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' }, - { deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' } + { deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮' } ] }, { @@ -648,8 +647,7 @@ export default { productTypes: ['02'], stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, - { deviceType: '06', orderNum: 2, operateCode: '5107', tip: '标左键点击,选择【一直有效】', val: '02' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '01::01::true' } + { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' } ] }, { @@ -665,7 +663,7 @@ export default { { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, { deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' }, { deviceType: '06', orderNum: 3, operateCode: '5107', tip: '鼠标左键点击,取消选择【一直有效】', val: '02' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '02::01::true' } + { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' } ] }, { @@ -680,7 +678,7 @@ export default { stepVOList: [ { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, { deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' }, - { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '02::01::false' } + { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' } ] }, {