diff --git a/src/api/TrainModelApi.ts b/src/api/TrainModelApi.ts index 78f3607..06e5c08 100644 --- a/src/api/TrainModelApi.ts +++ b/src/api/TrainModelApi.ts @@ -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; } diff --git a/src/components/draw-app/dialogs/AddTrainDialog.vue b/src/components/draw-app/dialogs/AddTrainDialog.vue index 86941cf..d778e38 100644 --- a/src/components/draw-app/dialogs/AddTrainDialog.vue +++ b/src/components/draw-app/dialogs/AddTrainDialog.vue @@ -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({ train_max_speed: 0, train_max_acc: 0, train_max_brake: 0, + train_emergency_brake: 0, trainControlMapId: 0, }); function setConfigVal(val: TrainConfigItem | null) { diff --git a/src/pages/TrainModelManage.vue b/src/pages/TrainModelManage.vue index da0cc1b..4f65577 100644 --- a/src/pages/TrainModelManage.vue +++ b/src/pages/TrainModelManage.vue @@ -194,7 +194,15 @@ + +
+
@@ -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({ 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;