列车添加基本信息
This commit is contained in:
parent
f61ee0610c
commit
0db11ff3da
@ -1 +1 @@
|
||||
Subproject commit 4e345938106b1967c6b8b70db04d2d8933074611
|
||||
Subproject commit 67d7d79c5a50880b61be05d98184209422f15f1b
|
@ -390,7 +390,6 @@ export interface TrainConfig {
|
||||
idlingA: number;
|
||||
idlingR: number;
|
||||
idlingD: number;
|
||||
trainLoad?: number;
|
||||
};
|
||||
trainEndsA: {
|
||||
radarCheckSpeedDiff: number;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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<TrainConfigItem | null>({
|
||||
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) {
|
||||
|
@ -328,14 +328,6 @@
|
||||
hint=""
|
||||
/>
|
||||
</div>
|
||||
<div class="col-3 q-px-sm">
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="model.configData.trainLoad"
|
||||
label="载荷参数"
|
||||
hint=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -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;
|
||||
|
@ -166,6 +166,38 @@
|
||||
label="关联驾驶台地图"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4 q-px-sm">
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="editInfo.train_load"
|
||||
label="载荷参数(吨)"
|
||||
hint=""
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4 q-px-sm">
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="editInfo.train_max_speed"
|
||||
label="列车最大速度(km/h)"
|
||||
hint=""
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4 q-px-sm">
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="editInfo.train_max_acc"
|
||||
label="最大加速度(m/s²)"
|
||||
hint=""
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4 q-px-sm">
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="editInfo.train_max_brake"
|
||||
label="最大减速度(m/s²)"
|
||||
hint=""
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 q-px-sm" style="padding-bottom: 10px">
|
||||
<q-input
|
||||
outlined
|
||||
@ -256,11 +288,13 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4 q-px-sm">
|
||||
<q-input
|
||||
<q-select
|
||||
outlined
|
||||
v-model.number="editInfo.trainConfigData.trainLoad"
|
||||
label="载荷参数"
|
||||
hint=""
|
||||
v-model="editInfo.trainConfigData.maxSpeed"
|
||||
emitValue
|
||||
mapOptions
|
||||
:options="tccNameList"
|
||||
label="最大速度(km/h)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -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<EditCreateItem>({
|
||||
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<EditCreateItem>({
|
||||
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;
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user