From a3485c94f7ebebeb1cd05a60de1e76377e82f312 Mon Sep 17 00:00:00 2001
From: joylink_fanyuhong <18706759286@163.com>
Date: Thu, 11 Apr 2024 17:18:44 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BD=A6=E6=B7=BB=E5=8A=A0=E8=BD=BD?=
=?UTF-8?q?=E8=8D=B7=E5=8F=82=E6=95=B0?=
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 | 1 +
src/components/draw-app/dialogs/SetTrainParam.vue | 10 ++++++++++
src/configs/UrlManage.ts | 2 +-
src/pages/TrainModelManage.vue | 12 ++++++++++++
6 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/rts-sim-testing-message b/rts-sim-testing-message
index 7d576a6..8919d6e 160000
--- a/rts-sim-testing-message
+++ b/rts-sim-testing-message
@@ -1 +1 @@
-Subproject commit 7d576a6c69ccbcdcdf14219f992602ccf0b1b30f
+Subproject commit 8919d6e5d6de5d46332eb5eb6b6c052215fa0ad2
diff --git a/src/api/Simulation.ts b/src/api/Simulation.ts
index a988806..488ec78 100644
--- a/src/api/Simulation.ts
+++ b/src/api/Simulation.ts
@@ -390,6 +390,7 @@ 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 c0929ba..ff181dd 100644
--- a/src/api/TrainModelApi.ts
+++ b/src/api/TrainModelApi.ts
@@ -45,6 +45,7 @@ export interface TrainConfigData {
idlingA: number;
idlingR: number;
idlingD: number;
+ trainLoad?: number;
}
export interface TrainCreateParams {
diff --git a/src/components/draw-app/dialogs/SetTrainParam.vue b/src/components/draw-app/dialogs/SetTrainParam.vue
index 72c6b08..f0d0856 100644
--- a/src/components/draw-app/dialogs/SetTrainParam.vue
+++ b/src/components/draw-app/dialogs/SetTrainParam.vue
@@ -328,6 +328,14 @@
hint=""
/>
+
+
+
@@ -513,6 +521,7 @@ const model = reactive({
idlingA: 0,
idlingR: 0,
idlingD: 0,
+ trainLoad: 0,
},
length: 0,
wheelDiameter: 0,
@@ -573,6 +582,7 @@ 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/configs/UrlManage.ts b/src/configs/UrlManage.ts
index d22c5bd..14206ce 100644
--- a/src/configs/UrlManage.ts
+++ b/src/configs/UrlManage.ts
@@ -10,7 +10,7 @@ function getHost(): string {
// return '192.168.3.47:9091';
// return '192.168.3.37:9091';
//return '192.168.33.207:9091'; // 张骞
- // return '192.168.33.93:9091';
+ return '192.168.33.93:9091';
// return '192.168.3.37:9091'; //卫志宏
// return 'test.joylink.club/bjrtsts-service'; // 测试
return '192.168.33.233:9091';
diff --git a/src/pages/TrainModelManage.vue b/src/pages/TrainModelManage.vue
index f329093..c4c48d7 100644
--- a/src/pages/TrainModelManage.vue
+++ b/src/pages/TrainModelManage.vue
@@ -255,6 +255,14 @@
hint=""
/>
+
+
+
@@ -579,6 +587,7 @@ function onReset() {
editInfo.trainConfigData.idlingA = 0;
editInfo.trainConfigData.idlingR = 0;
editInfo.trainConfigData.idlingD = 0;
+ editInfo.trainConfigData.trainLoad = 0;
createForm.value?.resetValidation();
}
@@ -635,6 +644,7 @@ interface EditCreateItem extends TrainCreateParams {
idlingA: number;
idlingR: number;
idlingD: number;
+ trainLoad: number;
};
}
@@ -667,6 +677,7 @@ const editInfo = reactive({
idlingA: 0,
idlingR: 0,
idlingD: 0,
+ trainLoad: 0,
},
});
function editData(row: TrainItem) {
@@ -705,6 +716,7 @@ 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;
})