添加紧急制动减速度参数

This commit is contained in:
joylink_fanyuhong 2024-08-30 16:58:17 +08:00
parent e426a09ea7
commit a4c35bb464
3 changed files with 17 additions and 1 deletions

View File

@ -60,6 +60,7 @@ export interface TrainCreateParams {
train_max_speed: number;
train_max_acc: number;
train_max_brake: number;
train_emergency_brake: number;
trainConfigData?: TrainConfigData;
trainControlMapId: number;
}

View File

@ -175,6 +175,7 @@ function onCreate() {
trainMaxSpeed: trainConfig.value.train_max_speed,
trainMaxAcc: trainConfig.value.train_max_acc,
trainMaxBrake: trainConfig.value.train_max_brake,
trainEmergencyBrake: trainConfig.value.train_emergency_brake,
configTrain: trainConfig.value.trainConfigData as TrainConfigData,
trainControlMapId: trainConfig.value.trainControlMapId,
trainEndsA: {
@ -226,6 +227,7 @@ const trainConfig = ref<TrainConfigItem | null>({
train_max_speed: 0,
train_max_acc: 0,
train_max_brake: 0,
train_emergency_brake: 0,
trainControlMapId: 0,
});
function setConfigVal(val: TrainConfigItem | null) {

View File

@ -194,7 +194,15 @@
<q-input
outlined
v-model.number="editInfo.train_max_brake"
label="最大减速度(m/s²)"
label="常用最大减速度(m/s²)"
hint=""
/>
</div>
<div class="col-4 q-px-sm">
<q-input
outlined
v-model.number="editInfo.train_emergency_brake"
label="紧急制动减速度(m/s²)"
hint=""
/>
</div>
@ -563,6 +571,7 @@ function onCreate() {
train_max_speed: editInfo.train_max_speed,
train_max_acc: editInfo.train_max_acc,
train_max_brake: editInfo.train_max_brake,
train_emergency_brake: editInfo.train_emergency_brake,
trainConfigData: editInfo.trainConfigData,
trainControlMapId: editInfo.trainControlMapId,
};
@ -598,6 +607,7 @@ function onReset() {
editInfo.train_max_speed = 0;
editInfo.train_max_acc = 0;
editInfo.train_max_brake = 0;
editInfo.train_emergency_brake = 0;
// editInfo.min_diameter = 0;
// editInfo.max_diameter = 0;
editInfo.train_sets = '';
@ -660,6 +670,7 @@ interface EditCreateItem extends TrainCreateParams {
train_max_speed: number;
train_max_acc: number;
train_max_brake: number;
train_emergency_brake: number;
trainControlMapId: number;
trainConfigData: {
davisParamA: number;
@ -696,6 +707,7 @@ const editInfo = reactive<EditCreateItem>({
train_max_speed: 0,
train_max_acc: 0,
train_max_brake: 0,
train_emergency_brake: 0,
trainControlMapId: 0,
trainConfigData: {
davisParamA: 2.25,
@ -730,6 +742,7 @@ function editData(row: TrainItem) {
editInfo.train_max_speed = res.train_max_speed;
editInfo.train_max_acc = res.train_max_acc;
editInfo.train_max_brake = res.train_max_brake;
editInfo.train_emergency_brake = res.train_emergency_brake;
// editInfo.min_diameter = res.min_diameter;
// editInfo.max_diameter = res.max_diameter;
editInfo.train_sets = res.train_sets;