From 0db11ff3da71f0ef95cc6c7476eb943c7b57991c Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Thu, 29 Aug 2024 17:40:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BD=A6=E6=B7=BB=E5=8A=A0=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rts-sim-testing-message | 2 +- src/api/Simulation.ts | 1 - src/api/TrainModelApi.ts | 5 +- .../draw-app/dialogs/AddTrainDialog.vue | 8 +++ .../draw-app/dialogs/SetTrainParam.vue | 10 --- src/pages/TrainModelManage.vue | 66 ++++++++++++++++--- 6 files changed, 71 insertions(+), 21 deletions(-) diff --git a/rts-sim-testing-message b/rts-sim-testing-message index 4e34593..67d7d79 160000 --- a/rts-sim-testing-message +++ b/rts-sim-testing-message @@ -1 +1 @@ -Subproject commit 4e345938106b1967c6b8b70db04d2d8933074611 +Subproject commit 67d7d79c5a50880b61be05d98184209422f15f1b diff --git a/src/api/Simulation.ts b/src/api/Simulation.ts index 26b250b..819ecc3 100644 --- a/src/api/Simulation.ts +++ b/src/api/Simulation.ts @@ -390,7 +390,6 @@ export interface TrainConfig { idlingA: number; idlingR: number; idlingD: number; - trainLoad?: number; }; trainEndsA: { radarCheckSpeedDiff: number; diff --git a/src/api/TrainModelApi.ts b/src/api/TrainModelApi.ts index ff181dd..78f3607 100644 --- a/src/api/TrainModelApi.ts +++ b/src/api/TrainModelApi.ts @@ -45,7 +45,6 @@ export interface TrainConfigData { idlingA: number; idlingR: number; idlingD: number; - trainLoad?: number; } export interface TrainCreateParams { @@ -57,6 +56,10 @@ export interface TrainCreateParams { total_length: number; train_model: number; train_sets: string; + train_load: number; + train_max_speed: number; + train_max_acc: number; + train_max_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 a10546f..9b085dd 100644 --- a/src/components/draw-app/dialogs/AddTrainDialog.vue +++ b/src/components/draw-app/dialogs/AddTrainDialog.vue @@ -171,6 +171,10 @@ function onCreate() { trainSpeed: trainSpeed.value, wheelDiameter: wheelDiameter.value, trainLength: trainConfig.value.total_length, + trainLoad: trainConfig.value.train_load, + trianMaxSpeed: trainConfig.value.train_max_speed, + trainMaxAcc: trainConfig.value.train_max_acc, + trianMaxBrake: trainConfig.value.train_max_brake, configTrain: trainConfig.value.trainConfigData as TrainConfigData, trainControlMapId: trainConfig.value.trainControlMapId, trainEndsA: { @@ -218,6 +222,10 @@ const trainConfig = ref({ total_length: 0, train_model: 0, train_sets: '', + train_load: 0, + train_max_speed: 0, + train_max_acc: 0, + train_max_brake: 0, trainControlMapId: 0, }); function setConfigVal(val: TrainConfigItem | null) { diff --git a/src/components/draw-app/dialogs/SetTrainParam.vue b/src/components/draw-app/dialogs/SetTrainParam.vue index e875ebd..ba8e4fd 100644 --- a/src/components/draw-app/dialogs/SetTrainParam.vue +++ b/src/components/draw-app/dialogs/SetTrainParam.vue @@ -328,14 +328,6 @@ hint="" /> -
- -
@@ -521,7 +513,6 @@ const model = reactive({ idlingA: 0, idlingR: 0, idlingD: 0, - trainLoad: 0, }, length: 0, wheelDiameter: 0, @@ -582,7 +573,6 @@ function initModel() { idlingA: trainState.idlingA, idlingR: trainState.idlingR, idlingD: trainState.idlingD, - trainLoad: trainState.trainLoad, }; model.length = trainState.trainLength; model.wheelDiameter = trainState.wheelDiameter; diff --git a/src/pages/TrainModelManage.vue b/src/pages/TrainModelManage.vue index c4c48d7..8382104 100644 --- a/src/pages/TrainModelManage.vue +++ b/src/pages/TrainModelManage.vue @@ -166,6 +166,38 @@ label="关联驾驶台地图" /> +
+ +
+
+ +
+
+ +
+
+ +
-
@@ -535,6 +569,10 @@ function onCreate() { // min_diameter: editInfo.min_diameter, // max_diameter: editInfo.max_diameter, train_sets: editInfo.train_sets, + train_load: editInfo.train_load, + train_max_speed: editInfo.train_max_speed, + train_max_acc: editInfo.train_max_acc, + train_max_brake: editInfo.train_max_brake, trainConfigData: editInfo.trainConfigData, trainControlMapId: editInfo.trainControlMapId, }; @@ -566,6 +604,10 @@ function onReset() { editInfo.train_model = 0; editInfo.carriage_length = 0; editInfo.total_length = 0; + editInfo.train_load = 0; + editInfo.train_max_speed = 0; + editInfo.train_max_acc = 0; + editInfo.train_max_brake = 0; // editInfo.min_diameter = 0; // editInfo.max_diameter = 0; editInfo.train_sets = ''; @@ -587,7 +629,6 @@ function onReset() { editInfo.trainConfigData.idlingA = 0; editInfo.trainConfigData.idlingR = 0; editInfo.trainConfigData.idlingD = 0; - editInfo.trainConfigData.trainLoad = 0; createForm.value?.resetValidation(); } @@ -625,6 +666,10 @@ interface EditCreateItem extends TrainCreateParams { total_length: number; train_model: number; train_sets: string; + train_load: number; + train_max_speed: number; + train_max_acc: number; + train_max_brake: number; trainControlMapId: number; trainConfigData: { davisParamA: number; @@ -644,7 +689,6 @@ interface EditCreateItem extends TrainCreateParams { idlingA: number; idlingR: number; idlingD: number; - trainLoad: number; }; } @@ -658,6 +702,10 @@ const editInfo = reactive({ min_diameter: 0, max_diameter: 0, train_sets: '', + train_load: 0, + train_max_speed: 0, + train_max_acc: 0, + train_max_brake: 0, trainControlMapId: 0, trainConfigData: { davisParamA: 2.25, @@ -677,7 +725,6 @@ const editInfo = reactive({ idlingA: 0, idlingR: 0, idlingD: 0, - trainLoad: 0, }, }); function editData(row: TrainItem) { @@ -689,6 +736,10 @@ function editData(row: TrainItem) { editInfo.train_model = res.train_model; editInfo.carriage_length = res.carriage_length; editInfo.total_length = res.total_length; + editInfo.train_load = res.train_load; + 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.min_diameter = res.min_diameter; // editInfo.max_diameter = res.max_diameter; editInfo.train_sets = res.train_sets; @@ -716,7 +767,6 @@ function editData(row: TrainItem) { editInfo.trainConfigData.idlingA = res.trainConfigData.idlingA; editInfo.trainConfigData.idlingR = res.trainConfigData.idlingR; editInfo.trainConfigData.idlingD = res.trainConfigData.idlingD; - editInfo.trainConfigData.trainLoad = res.trainConfigData.trainLoad || 0; } createFormShow.value = true; })