This commit is contained in:
joylink_cuiweidong 2020-06-29 15:55:50 +08:00
commit 22883f5aa4
2 changed files with 107 additions and 151 deletions

View File

@ -95,17 +95,7 @@
指定列车跳停</el-radio> 指定列车跳停</el-radio>
<div style="float: left;"> <div style="float: left;">
<span>车组号</span> <span>车组号</span>
<el-input
v-if="radio1 != 2"
:id="domIdJumpStop"
v-model="tripNumber"
style="width: 120px; margin-left: 20px;"
size="small"
:disabled="radio == '01'"
@blur="handleTrainNoBlur"
/>
<el-select <el-select
v-if="radio1 == 2"
:id="domIdCancelJumpStop" :id="domIdCancelJumpStop"
v-model="tripNumber" v-model="tripNumber"
style="width: 120px; margin-left: 20px;" style="width: 120px; margin-left: 20px;"
@ -170,10 +160,9 @@
style="display: block; text-align: left; margin-left: 0; float: left;" style="display: block; text-align: left; margin-left: 0; float: left;"
> >
人工</el-radio> 人工</el-radio>
<div style="float: left; margin-left: 20px;"> <div v-if="radio2 == 2" style="float: left; margin-left: 20px;">
<span v-if="radio2 == 2">运行等级</span> <span>运行等级</span>
<el-select <el-select
v-if="radio2 == 2"
:id="domIdRunLevel" :id="domIdRunLevel"
v-model="trainRunlevel" v-model="trainRunlevel"
style="width: 120px; margin-left: 20px;" style="width: 120px; margin-left: 20px;"
@ -189,6 +178,17 @@
/> />
</el-select> </el-select>
</div> </div>
<div v-if="radio2 == 1" style="float: left; margin-left: 20px;">
<span>停站时间</span>
<el-input
:id="domIdStopTime"
v-model="trainStopTime"
style="width: 120px; margin-left: 20px;"
size="small"
:disabled="radio == '01'"
@blur="handleTrainStopTime"
/>
</div>
</el-col> </el-col>
</el-radio-group> </el-radio-group>
</el-row> </el-row>
@ -264,6 +264,7 @@ export default {
tripNumber: '', tripNumber: '',
effective: '01', effective: '01',
trainRunlevel: 2, trainRunlevel: 2,
trainStopTime: 0,
disabledTime: true disabledTime: true
}; };
}, },
@ -290,9 +291,9 @@ export default {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : ''; return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
} }
}, },
domIdJumpStop() { // domIdJumpStop() {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : ''; // return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : '';
}, // },
domIdCancelJumpStop() { domIdCancelJumpStop() {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.choose.domId : ''; return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.choose.domId : '';
}, },
@ -319,7 +320,7 @@ export default {
title() { title() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
return '扣车'; 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 '取消扣车'; return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { } else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
return '设置跳停'; return '设置跳停';
@ -335,13 +336,13 @@ export default {
}, },
watch: { watch: {
operation(data) { operation(data) {
if (data != OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
this.JumpStop = false; this.JumpStop = false;
this.RunLevel = false; this.RunLevel = false;
this.DetainTrain = false; this.DetainTrain = false;
this.radio = '01'; this.radio = '01';
this.radio1 = '1'; this.radio1 = '1';
this.radio2 = '1'; this.radio2 = '1';
this.effective = '01';
if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) { if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.radio1 = '1'; this.radio1 = '1';
this.radio = '01'; this.radio = '01';
@ -364,6 +365,7 @@ export default {
this.radio2 = '2'; this.radio2 = '2';
} }
} }
}
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
@ -390,9 +392,8 @@ export default {
} }
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.radio = selected.direction; this.radio = selected.direction;
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
this.effective = '01';
} }
this.effective = '02';
this.radio = '01'; this.radio = '01';
this.disabledTime = true; this.disabledTime = true;
this.trainList = this.map.trainList; // this.trainList = this.map.trainList; //
@ -407,80 +408,53 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.operation = ''; this.operation = '';
this.trainStopTime = 0;
}, },
choose(upDown) { choose(upDown) { // code
// code
const operate = { const operate = {
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operati, operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation,
val: this.radio1 val: this.radio
}; };
if (this.radio == '02' || this.radio == '03') {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
if (valid) { } else {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.operation = OperationEvent.StationStand.cancelDetainTrain.menu.operation;
} }
}); this.handleBreak(operate);
}, },
handleTrainNoBlur() { // trainNoSelectChange(upDown) { //
const operate = { const operate = {
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation
}; };
this.handleBreak(operate);
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 });
}
});
}, },
chooseJumpStop(upDown) { chooseJumpStop(upDown) {
const operate = { const operate = {
operation: '' operation: ''
}; };
if (this.radio == '02') {
this.tripNumber = '';
}
if (this.radio1 == '1') { // if (this.radio1 == '1') { //
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation; operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
} else { // } else { //
operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation; operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation;
} }
this.handleBreak(operate);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}, },
chooseEffective(effective) { chooseEffective(effective) {
const operate = { const operate = {
operation: '' operation: '',
val: effective
}; };
if (this.radio2 == '1') { // if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation; operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation;
} else { // } else { //
operate.operation = OperationEvent.StationStand.setRunLevel.choose2.operation; operate.operation = OperationEvent.StationStand.setRunLevel.choose2.operation;
} }
this.handleBreak(operate);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}, },
chooseStopTime(upDown) { chooseStopTime(upDown) {
const operate = { const operate = {
operation: '' operation: '',
val: this.radio
}; };
if (this.radio2 == '1') { // if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation; operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation;
@ -490,25 +464,12 @@ export default {
if (this.radio === '01') { if (this.radio === '01') {
this.disabledTime = true; this.disabledTime = true;
this.trainRunlevel = 2; this.trainRunlevel = 2;
this.effective = '02';
} else { } else {
this.disabledTime = false; this.disabledTime = false;
this.effective = '01';
} }
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.handleBreak(operate);
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 });
}
});
}, },
trainNoSelectLevel(upDown) { trainNoSelectLevel(upDown) {
const operate = { const operate = {
@ -518,17 +479,24 @@ export default {
standRunLevel: `${upDown}` 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 }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { valid && this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}); });
}, },
commit() { commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.setDetainTrain(); /** 设置扣车*/ 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(); /** 取消扣车*/ this.cancelDetainTrain(); /** 取消扣车*/
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { } else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.setJumpStop(); /** 设置跳停*/ this.setJumpStop(); /** 设置跳停*/
@ -555,27 +523,22 @@ export default {
if (!valid) { if (!valid) {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
cancelDetainTrain() { cancelDetainTrain() {
const operate = { const operate = {
over: true, over: true,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, operation: this.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
param: { param: {
standAllLine: `${this.radio}` 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.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -584,10 +547,10 @@ export default {
if (!valid) { if (!valid) {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
@ -607,10 +570,10 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
@ -630,22 +593,21 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
setStopTime() { setStopTime() {
const forver = this.effective == '01';
const operate = { const operate = {
over: true, over: true,
operation: OperationEvent.StationStand.setStopTime.menu.operation, operation: OperationEvent.StationStand.setStopTime.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
param: { param: {
parkingTime: this.radio == '01' ? -1 : 1, parkingTime: this.radio == '01' ? -1 : this.trainStopTime,
parkingAlwaysValid: forver parkingAlwaysValid: `${this.effective != '01'}`
} }
}; };
@ -655,30 +617,21 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
setRunLevel() { 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 = { const operate = {
over: true, over: true,
operation: OperationEvent.StationStand.setRunLevel.menu.operation, operation: OperationEvent.StationStand.setRunLevel.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME, cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
param: { param: {
// standStopControl: `${this.radio}`,
runLevelTime: this.radio === '02' ? this.trainRunlevel : 2, runLevelTime: this.radio === '02' ? this.trainRunlevel : 2,
runLevelTimeForever: forver runLevelTimeForever: `${this.effective != '01'}`
} }
}; };
@ -688,10 +641,10 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]); this.$refs.noticeInfo.doShow();
}); });
}, },
cancel() { cancel() {
@ -711,8 +664,13 @@ export default {
} }
}; };
</script> </script>
<style> <style lang="scss" scoped>
.stand-detain-train .context { .stand-detain-train .context {
height: 80px !important; height: 80px !important;
} }
/deep/ {
.el-input--mini .el-input__icon{
line-height: 100%;
}
}
</style> </style>

View File

@ -572,7 +572,7 @@ export default {
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' }, { 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'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, { 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'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' }, { deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 2, operateCode: '5093', tip: '鼠标左键点击,选择【自动】', val: '02' }, { deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::0::true' }
] ]
}, },
{ {
@ -618,7 +617,7 @@ export default {
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' }, { deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: '标左键点击,选择【一直有效】', val: '02' }, { 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: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' }, { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' }, { 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'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
{ deviceType: '06', orderNum: 2, operateCode: '5107', tip: '标左键点击,选择【一直有效】', val: '02' }, { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '01::01::true' }
] ]
}, },
{ {
@ -665,7 +663,7 @@ export default {
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
{ deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' }, { deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5107', 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: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' }, { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
{ deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' }, { 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: '鼠标左键点击【确认】按钮' }
] ]
}, },
{ {