大铁02 列车故障操作驾驶调整

This commit is contained in:
fan 2022-07-26 16:46:10 +08:00
parent 0fde576279
commit 67071c8830
15 changed files with 77 additions and 69 deletions

View File

@ -513,3 +513,10 @@ export function queryIscsResourcesByGroup(group, params) {
params
});
}
/** 获取机器人驾驶参数 */
export function getRobotDrivingParam(simulationId, groupNumber) {
return request({
url: `/simulation/${simulationId}/driveParam/${groupNumber}`,
method: 'get'
});
}

View File

@ -246,10 +246,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection

View File

@ -159,10 +159,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection

View File

@ -142,10 +142,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection

View File

@ -19,15 +19,19 @@
<el-form-item prop="speedLimit" label="限速:">
<el-input v-model="formModel.speedLimit" style="width: 115px;margin-right: 10px;" size="small" />
<span>km/h</span>
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间-1为取消限速" placement="top-start">
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间不填为取消限速" placement="top-start">
<i class="el-icon-warning" />
</el-tooltip>
</el-form-item>
<el-form-item prop="driveForward" label="向前行驶:">
<el-switch v-model="formModel.driveForward" active-text="" inactive-text="" @change="driveForwardChange" />
<el-form-item prop="through" label="">
<el-radio-group v-model="formModel.through">
<el-radio :label="1">越红灯行驶</el-radio>
<el-radio :label="2">越引导行驶</el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="targetDeviceCode" label="目的地:">
<el-select ref="faultSelect1" v-model="formModel.targetDeviceCode" :disabled="formModel.driveForward" filterable size="small" style="height: 32px;line-height: 32px;" placeholder="请选择">
<el-select ref="faultSelect1" v-model="formModel.targetDeviceCode" filterable size="small" style="height: 32px;line-height: 32px;" placeholder="请选择">
<el-option
v-for="item in selectedList"
:key="item.code"
@ -95,6 +99,7 @@ import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import { getRobotDrivingParam } from '@/api/simulation';
export default {
name: 'SwitchControl',
@ -120,7 +125,7 @@ export default {
form: { faultType: ''},
formModel: {
speedLimit: '',
driveForward: false,
through: 0,
targetDeviceCode: ''
},
groupNumber: '',
@ -290,6 +295,11 @@ export default {
if (judge) {
this.judge = judge;
this.groupNumber = selected.groupNumber;
getRobotDrivingParam(this.$route.query.group, this.groupNumber).then(resp => {
this.formModel.speedLimit = resp.data.speedLimit ? resp.data.speedLimit : '';
this.formModel.through = resp.data.through;
this.formModel.targetDeviceCode = resp.data.targetDeviceCode ? resp.data.targetDeviceCode : '';
});
}
}
if (selected._type) {
@ -351,10 +361,6 @@ export default {
this.sendCommand(setp);
},
handleCollocation() { //
if (!this.formModel.driveForward && !this.formModel.targetDeviceCode) {
this.$message.error('请选择向前行驶或目的地');
return;
}
const setp = {
over: true,
operation: menuOperate.Common.collocation.operation,
@ -363,7 +369,7 @@ export default {
groupNumber: this.groupNumber,
param: {
speedLimit: this.formModel.speedLimit,
driveForward: this.formModel.driveForward,
through: this.formModel.through,
targetDeviceCode: this.formModel.targetDeviceCode
}
}
@ -402,18 +408,13 @@ export default {
});
},
deviceSelect(em) {
if (this.field == 'selectedCode' && em._type == 'Section' && !this.formModel.driveForward) {
if (this.field == 'selectedCode' && em._type == 'Section') {
this.formModel.targetDeviceCode = em.code;
// this.field = '';
} else if (this.field == 'selectedCode' && em._type == 'Train' && !this.formModel.driveForward) {
} else if (this.field == 'selectedCode' && em._type == 'Train') {
this.formModel.targetDeviceCode = em.code;
// this.field = '';
}
},
driveForwardChange(val) {
if (val) {
this.formModel.targetDeviceCode = '';
}
}
}
};

View File

@ -193,10 +193,10 @@ export default {
label: '越红灯行驶',
handler: this.handleOverEedLight
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '驾驶',
handler: this.handleDriveTo

View File

@ -150,10 +150,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection

View File

@ -124,10 +124,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection

View File

@ -91,10 +91,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection

View File

@ -91,10 +91,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection

View File

@ -230,10 +230,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection

View File

@ -231,10 +231,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection

View File

@ -233,10 +233,10 @@ export default {
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal

View File

@ -175,10 +175,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection

View File

@ -253,10 +253,10 @@ export default {
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
{
label: '限速指令',
handler: this.handleSpeedLimit
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection