This commit is contained in:
zyy 2020-06-12 15:35:08 +08:00
commit 5650ecc410
3 changed files with 27 additions and 34 deletions

View File

@ -550,7 +550,17 @@ class SkinCode extends defaultStyle {
fontFamily: 'consolas',
trainBodyLineWidth: 1, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [], // 特殊列车类型需设置显示格式
specialTrainType: [
{
type: 'MANUAL',
serviceNumber: '',
nameFormat: 'groupNumber:targetCode'
},
{
type: 'HEAD',
nameFormat: 'groupNumber:targetCode'
}
], // 特殊列车类型需设置显示格式
lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离
trainSidelineColor: '#ABFE9B',

View File

@ -130,6 +130,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../../menus/childDialog/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '../../utils/menuOperate';
import { mapGetters } from 'vuex';
export default {
name: 'StandDetainTrain',
@ -161,6 +162,9 @@ export default {
};
},
computed: {
...mapGetters('map', [
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -213,7 +217,7 @@ export default {
}
}
this.radio = '2';
if (this.selected.right) { //
if ((this.selected.right && this.mapConfig.upDirection === 'right') || (!this.selected.right && this.mapConfig.upDirection === 'left')) { //
this.radio = '1';
}
@ -237,7 +241,7 @@ export default {
this.radio1 = '2';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
this.earlyDepar = true;
if (!this.selected.right) {
if ((!this.selected.right && this.mapConfig.upDirection === 'right') || (this.selected.right && this.mapConfig.upDirection === 'left')) {
this.radio2 = '2';
} else {
this.radio2 = '1';
@ -246,14 +250,14 @@ export default {
this.AutomaticBuckle = true;
this.autoRadio1 = '1';
this.autoRadio = '1';
if (!this.selected.right) {
if ((!this.selected.right && this.mapConfig.upDirection === 'right') || (this.selected.right && this.mapConfig.upDirection === 'left')) {
this.autoRadio = '2';
}
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) {
this.AutomaticBuckle = true;
this.autoRadio1 = '2';
this.autoRadio = '1';
if (!this.selected.right) {
if ((!this.selected.right && this.mapConfig.upDirection === 'right') || (this.selected.right && this.mapConfig.upDirection === 'left')) {
this.autoRadio = '2';
}
}
@ -303,30 +307,18 @@ export default {
}
},
setDetainTrainAuto() { //
this.sendCommand(menuOperate.StationStand.setDetainTrainAuto, {
leftDirection: this.autoRadio == '2', // 1 2
rightDirection: this.autoRadio == '1'
});
this.sendCommand(menuOperate.StationStand.setDetainTrainAuto);
},
cancelDetainTrainAuto() { //
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAuto, {
leftDirection: this.autoRadio == '2', // 1 2
rightDirection: this.autoRadio == '1'
});
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAuto);
},
//
setDetainTrain() {
this.sendCommand(menuOperate.StationStand.setDetainTrain, {
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
});
this.sendCommand(menuOperate.StationStand.setDetainTrain);
},
//
cancelDetainTrain() {
this.sendCommand(menuOperate.StationStand.cancelDetainTrain, {
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
});
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
},
//
earlyDeparture() {

View File

@ -230,18 +230,9 @@ export default {
},
//
fault() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.fault.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Section.fault, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(step, this.selected);
this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
@ -252,7 +243,7 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Section.split.menu.operation,
param: {
Section_Code: `${this.selected.code}`
sectionCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
@ -269,7 +260,7 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Section.active.menu.operation,
param: {
Section_Code: `${this.selected.code}`
sectionCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {