地图绘制 列车数据模型更改

This commit is contained in:
joylink_cuiweidong 2021-02-19 13:28:19 +08:00
parent 1aa597fa39
commit 414aa1a3ca
5 changed files with 111 additions and 65 deletions

View File

@ -450,12 +450,16 @@ export default {
trainmodelUpdate: 'Update train model', trainmodelUpdate: 'Update train model',
trainTypeName: 'Train type name:', trainTypeName: 'Train type name:',
trainLength: 'The length of the train:', trainLength: 'The length of the train:',
trainSafeDistance: 'A safe distance from:', // trainSafeDistance: 'A safe distance from:',
trainMaxSafeDistance: 'Maximum safe distance:', // trainMaxSafeDistance: 'Maximum safe distance:',
averageVelocity: 'The average velocity:', // averageVelocity: 'The average velocity:',
averageDeceleration: 'Mean deceleration:', // averageDeceleration: 'Mean deceleration:',
defaultVelocity: 'The default rate:', // defaultVelocity: 'The default rate:',
maxVelocity: 'Maximum speed:', // maxVelocity: 'Maximum speed:',
trainWeight:'The weight of the train:',
tong:'t',
numberOfCars:'Number of cars',
vehicle:'vehicle',
trainWindowCode: 'Number window code:', trainWindowCode: 'Number window code:',
trainWindowWidth: 'Train window width:', trainWindowWidth: 'Train window width:',

View File

@ -116,12 +116,15 @@ export default {
trainCode: 'The train model Code cannot be empty', trainCode: 'The train model Code cannot be empty',
pleaseEnterTrainTypeName: 'Please enter train type name', pleaseEnterTrainTypeName: 'Please enter train type name',
trainLength: 'Please enter train length', trainLength: 'Please enter train length',
safeDistance: 'Please enter a safe distance', trainWeight:'Please enter train weight',
maxSafeDistance: 'Please enter the maximum safe distance', numberOfCars:'Please enter number Of Cars',
averageVelocity: 'Please enter average speed',
averageDeceleration: 'Please enter average deceleration', // safeDistance: 'Please enter a safe distance',
defaultVelocity: 'Please enter the default speed', // maxSafeDistance: 'Please enter the maximum safe distance',
maxVelocity: 'Please enter the maximum speed', // averageVelocity: 'Please enter average speed',
// averageDeceleration: 'Please enter average deceleration',
// defaultVelocity: 'Please enter the default speed',
// maxVelocity: 'Please enter the maximum speed',
trainWindowWidth: 'Please enter the number window width', trainWindowWidth: 'Please enter the number window width',
trainWindowHeight: 'Please enter the number window height', trainWindowHeight: 'Please enter the number window height',

View File

@ -394,12 +394,16 @@ export default {
trainmodelUpdate: '更新列车模型', trainmodelUpdate: '更新列车模型',
trainTypeName: '列车类型名称:', trainTypeName: '列车类型名称:',
trainLength: '列车长度:', trainLength: '列车长度:',
trainSafeDistance: '安全距离:', // trainSafeDistance: '安全距离:',
trainMaxSafeDistance: '最大安全距离:', // trainMaxSafeDistance: '最大安全距离:',
averageVelocity: '平均速度:', // averageVelocity: '平均速度:',
averageDeceleration: '平均减速度:', // averageDeceleration: '平均减速度:',
defaultVelocity: '默认速度:', // defaultVelocity: '默认速度:',
maxVelocity: '最大速度:', // maxVelocity: '最大速度:',
trainWeight:'列车重量',
tong:'吨',
numberOfCars:'车厢数量',
vehicle:'辆',
trainWindowCode: '车次窗编码:', trainWindowCode: '车次窗编码:',
trainWindowWidth: '车次窗宽度:', trainWindowWidth: '车次窗宽度:',

View File

@ -114,12 +114,15 @@ export default {
trainCode: '列车模型Code不能为空', trainCode: '列车模型Code不能为空',
pleaseEnterTrainTypeName: '请输入列车类型名称', pleaseEnterTrainTypeName: '请输入列车类型名称',
trainLength: '请输入列车长度', trainLength: '请输入列车长度',
safeDistance: '请输入安全距离', trainWeight:'请输入列车重量',
maxSafeDistance: '请输入最大安全距离', numberOfCars:'请输入车厢数量',
averageVelocity: '请输入平均速度',
averageDeceleration: '请输入平均减速度', // safeDistance: '请输入安全距离',
defaultVelocity: '请输入默认速度', // maxSafeDistance: '请输入最大安全距离',
maxVelocity: '请输入最大速度', // averageVelocity: '请输入平均速度',
// averageDeceleration: '请输入平均减速度',
// defaultVelocity: '请输入默认速度',
// maxVelocity: '请输入最大速度',
trainWindowWidth: '请输入车次窗宽度', trainWindowWidth: '请输入车次窗宽度',
trainWindowHeight: '请输入车次窗高度', trainWindowHeight: '请输入车次窗高度',

View File

@ -14,26 +14,32 @@
<el-input v-model="formModel.name" :disabled="!isNew" /> <el-input v-model="formModel.name" :disabled="!isNew" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('map.trainLength')" prop="length"> <el-form-item :label="$t('map.trainLength')" prop="length">
<el-input-number v-model="formModel.length" :min="0" />{{ $t('map.meter') }} <el-input-number v-model="formModel.length" :min="0" /> {{ $t('map.meter') }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('map.trainSafeDistance')" prop="safeDistance"> <el-form-item :label="$t('map.trainWeight')" prop="weight">
<el-input-number v-model="formModel.weight" :min="0" /> {{ $t('map.tong') }}
</el-form-item>
<el-form-item :label="$t('map.numberOfCars')" prop="numberOfCars">
<el-input-number v-model="formModel.numberOfCars" :min="0" :step="1" :precision="0" /> {{ $t('map.vehicle') }}
</el-form-item>
<!-- <el-form-item :label="$t('map.trainSafeDistance')" prop="safeDistance">
<el-input-number v-model="formModel.safeDistance" :min="0" />{{ $t('map.meter') }} <el-input-number v-model="formModel.safeDistance" :min="0" />{{ $t('map.meter') }}
</el-form-item> </el-form-item> -->
<el-form-item :label="$t('map.trainMaxSafeDistance')" prop="maxSafeDistance"> <!-- <el-form-item :label="$t('map.trainMaxSafeDistance')" prop="maxSafeDistance">
<el-input-number v-model="formModel.maxSafeDistance" :min="0" />{{ $t('map.meter') }} <el-input-number v-model="formModel.maxSafeDistance" :min="0" />{{ $t('map.meter') }}
</el-form-item> </el-form-item> -->
<el-form-item :label="$t('map.averageVelocity')" prop="averageVelocity"> <!-- <el-form-item :label="$t('map.averageVelocity')" prop="averageVelocity">
<el-input-number v-model="formModel.averageVelocity" :min="0" />km/h <el-input-number v-model="formModel.averageVelocity" :min="0" />km/h
</el-form-item> </el-form-item> -->
<el-form-item :label="$t('map.averageDeceleration')" prop="averageDeceleration"> <!-- <el-form-item :label="$t('map.averageDeceleration')" prop="averageDeceleration">
<el-input-number v-model="formModel.averageDeceleration" :min="0" />km/h <el-input-number v-model="formModel.averageDeceleration" :min="0" />km/h
</el-form-item> </el-form-item> -->
<el-form-item :label="$t('map.defaultVelocity')" prop="defaultVelocity"> <!-- <el-form-item :label="$t('map.defaultVelocity')" prop="defaultVelocity">
<el-input-number v-model="formModel.defaultVelocity" :min="0" />km/h <el-input-number v-model="formModel.defaultVelocity" :min="0" />km/h
</el-form-item> </el-form-item>
<el-form-item :label="$t('map.maxVelocity')" prop="maxVelocity"> <el-form-item :label="$t('map.maxVelocity')" prop="maxVelocity">
<el-input-number v-model="formModel.maxVelocity" :min="0" />km/h <el-input-number v-model="formModel.maxVelocity" :min="0" />km/h
</el-form-item> </el-form-item> -->
</el-form> </el-form>
</el-card> </el-card>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -58,13 +64,15 @@ export default {
formModel: { formModel: {
code: '', code: '',
name: '', name: '',
length: 0, length: 0, // --
safeDistance: '', weight:1, // --
maxSafeDistance: '', numberOfCars:1 //
averageVelocity: 0, // safeDistance: '',
averageDeceleration: 0, // maxSafeDistance: '',
defaultVelocity: 0, // averageVelocity: 0,
maxVelocity: 0 // averageDeceleration: 0,
// defaultVelocity: 0,
// maxVelocity: 0
}, },
type: '' type: ''
}; };
@ -92,30 +100,52 @@ export default {
} }
], ],
length: [ length: [
{ required: true, message: this.$t('rules.trainLength'), trigger: 'blur' },
{ required: true, message: this.$t('rules.trainLength'), trigger: 'change' } { required: true, message: this.$t('rules.trainLength'), trigger: 'change' }
], ],
safeDistance: [ weight:[
{ required: true, message: this.$t('rules.safeDistance'), trigger: 'change' } { required: true, message: this.$t('rules.trainWeight'), trigger: 'blur' },
{ required: true, message: this.$t('rules.trainWeight'), trigger: 'change' }
], ],
maxSafeDistance: [ numberOfCars:[
{ required: true, message: this.$t('rules.maxSafeDistance'), trigger: 'change' } { required: true, message: this.$t('rules.numberOfCars'), trigger: 'blur' },
], { required: true, message: this.$t('rules.numberOfCars'), trigger: 'change' }
averageVelocity: [
{ required: true, message: this.$t('rules.averageVelocity'), trigger: 'change' }
],
averageDeceleration: [
{ required: true, message: this.$t('rules.averageDeceleration'), trigger: 'change' }
],
defaultVelocity: [
{ required: true, message: this.$t('rules.defaultVelocity'), trigger: 'change' }
],
maxVelocity: [
{ required: true, message: this.$t('rules.maxVelocity'), trigger: 'change' }
] ]
// safeDistance: [
// { required: true, message: this.$t('rules.safeDistance'), trigger: 'change' }
// ],
// maxSafeDistance: [
// { required: true, message: this.$t('rules.maxSafeDistance'), trigger: 'change' }
// ],
// averageVelocity: [
// { required: true, message: this.$t('rules.averageVelocity'), trigger: 'change' }
// ],
// averageDeceleration: [
// { required: true, message: this.$t('rules.averageDeceleration'), trigger: 'change' }
// ],
// defaultVelocity: [
// { required: true, message: this.$t('rules.defaultVelocity'), trigger: 'change' }
// ],
// maxVelocity: [
// { required: true, message: this.$t('rules.maxVelocity'), trigger: 'change' }
// ]
}; };
}, },
viewRules() { viewRules() {
return {}; return {
length: [
{ required: true, message: this.$t('rules.trainLength'), trigger: 'blur' },
{ required: true, message: this.$t('rules.trainLength'), trigger: 'change' }
],
weight:[
{ required: true, message: this.$t('rules.trainWeight'), trigger: 'blur' },
{ required: true, message: this.$t('rules.trainWeight'), trigger: 'change' }
],
numberOfCars:[
{ required: true, message: this.$t('rules.numberOfCars'), trigger: 'blur' },
{ required: true, message: this.$t('rules.numberOfCars'), trigger: 'change' }
]
};
}, },
isNew() { isNew() {
return this.type == 'ADD'; return this.type == 'ADD';
@ -140,12 +170,14 @@ export default {
this.formModel.code = model.code; this.formModel.code = model.code;
this.formModel.name = model.name; this.formModel.name = model.name;
this.formModel.length = model.length; this.formModel.length = model.length;
this.formModel.safeDistance = model.safeDistance; this.formModel.weight = model.weight;
this.formModel.maxSafeDistance = model.maxSafeDistance; this.formModel.numberOfCars = model.numberOfCars;
this.formModel.averageVelocity = model.averageVelocity; // this.formModel.safeDistance = model.safeDistance;
this.formModel.averageDeceleration = model.averageDeceleration; // this.formModel.maxSafeDistance = model.maxSafeDistance;
this.formModel.defaultVelocity = model.defaultVelocity; // this.formModel.averageVelocity = model.averageVelocity;
this.formModel.maxVelocity = model.maxVelocity; // this.formModel.averageDeceleration = model.averageDeceleration;
// this.formModel.defaultVelocity = model.defaultVelocity;
// this.formModel.maxVelocity = model.maxVelocity;
} }
this.rules = this.viewRules; this.rules = this.viewRules;
} else { } else {