地图绘制 列车数据模型更改
This commit is contained in:
parent
1aa597fa39
commit
414aa1a3ca
@ -450,12 +450,16 @@ export default {
|
||||
trainmodelUpdate: 'Update train model',
|
||||
trainTypeName: 'Train type name:',
|
||||
trainLength: 'The length of the train:',
|
||||
trainSafeDistance: 'A safe distance from:',
|
||||
trainMaxSafeDistance: 'Maximum safe distance:',
|
||||
averageVelocity: 'The average velocity:',
|
||||
averageDeceleration: 'Mean deceleration:',
|
||||
defaultVelocity: 'The default rate:',
|
||||
maxVelocity: 'Maximum speed:',
|
||||
// trainSafeDistance: 'A safe distance from:',
|
||||
// trainMaxSafeDistance: 'Maximum safe distance:',
|
||||
// averageVelocity: 'The average velocity:',
|
||||
// averageDeceleration: 'Mean deceleration:',
|
||||
// defaultVelocity: 'The default rate:',
|
||||
// maxVelocity: 'Maximum speed:',
|
||||
trainWeight:'The weight of the train:',
|
||||
tong:'t',
|
||||
numberOfCars:'Number of cars',
|
||||
vehicle:'vehicle',
|
||||
|
||||
trainWindowCode: 'Number window code:',
|
||||
trainWindowWidth: 'Train window width:',
|
||||
|
@ -116,12 +116,15 @@ export default {
|
||||
trainCode: 'The train model Code cannot be empty',
|
||||
pleaseEnterTrainTypeName: 'Please enter train type name',
|
||||
trainLength: 'Please enter train length',
|
||||
safeDistance: 'Please enter a safe distance',
|
||||
maxSafeDistance: 'Please enter the maximum safe distance',
|
||||
averageVelocity: 'Please enter average speed',
|
||||
averageDeceleration: 'Please enter average deceleration',
|
||||
defaultVelocity: 'Please enter the default speed',
|
||||
maxVelocity: 'Please enter the maximum speed',
|
||||
trainWeight:'Please enter train weight',
|
||||
numberOfCars:'Please enter number Of Cars',
|
||||
|
||||
// safeDistance: 'Please enter a safe distance',
|
||||
// maxSafeDistance: 'Please enter the maximum safe distance',
|
||||
// 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',
|
||||
trainWindowHeight: 'Please enter the number window height',
|
||||
|
@ -394,12 +394,16 @@ export default {
|
||||
trainmodelUpdate: '更新列车模型',
|
||||
trainTypeName: '列车类型名称:',
|
||||
trainLength: '列车长度:',
|
||||
trainSafeDistance: '安全距离:',
|
||||
trainMaxSafeDistance: '最大安全距离:',
|
||||
averageVelocity: '平均速度:',
|
||||
averageDeceleration: '平均减速度:',
|
||||
defaultVelocity: '默认速度:',
|
||||
maxVelocity: '最大速度:',
|
||||
// trainSafeDistance: '安全距离:',
|
||||
// trainMaxSafeDistance: '最大安全距离:',
|
||||
// averageVelocity: '平均速度:',
|
||||
// averageDeceleration: '平均减速度:',
|
||||
// defaultVelocity: '默认速度:',
|
||||
// maxVelocity: '最大速度:',
|
||||
trainWeight:'列车重量',
|
||||
tong:'吨',
|
||||
numberOfCars:'车厢数量',
|
||||
vehicle:'辆',
|
||||
|
||||
trainWindowCode: '车次窗编码:',
|
||||
trainWindowWidth: '车次窗宽度:',
|
||||
|
@ -114,12 +114,15 @@ export default {
|
||||
trainCode: '列车模型Code不能为空',
|
||||
pleaseEnterTrainTypeName: '请输入列车类型名称',
|
||||
trainLength: '请输入列车长度',
|
||||
safeDistance: '请输入安全距离',
|
||||
maxSafeDistance: '请输入最大安全距离',
|
||||
averageVelocity: '请输入平均速度',
|
||||
averageDeceleration: '请输入平均减速度',
|
||||
defaultVelocity: '请输入默认速度',
|
||||
maxVelocity: '请输入最大速度',
|
||||
trainWeight:'请输入列车重量',
|
||||
numberOfCars:'请输入车厢数量',
|
||||
|
||||
// safeDistance: '请输入安全距离',
|
||||
// maxSafeDistance: '请输入最大安全距离',
|
||||
// averageVelocity: '请输入平均速度',
|
||||
// averageDeceleration: '请输入平均减速度',
|
||||
// defaultVelocity: '请输入默认速度',
|
||||
// maxVelocity: '请输入最大速度',
|
||||
|
||||
trainWindowWidth: '请输入车次窗宽度',
|
||||
trainWindowHeight: '请输入车次窗高度',
|
||||
|
@ -14,26 +14,32 @@
|
||||
<el-input v-model="formModel.name" :disabled="!isNew" />
|
||||
</el-form-item>
|
||||
<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 :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-form-item>
|
||||
<el-form-item :label="$t('map.trainMaxSafeDistance')" prop="maxSafeDistance">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('map.trainMaxSafeDistance')" prop="maxSafeDistance">
|
||||
<el-input-number v-model="formModel.maxSafeDistance" :min="0" />{{ $t('map.meter') }}
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.averageVelocity')" prop="averageVelocity">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('map.averageVelocity')" prop="averageVelocity">
|
||||
<el-input-number v-model="formModel.averageVelocity" :min="0" />km/h
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.averageDeceleration')" prop="averageDeceleration">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('map.averageDeceleration')" prop="averageDeceleration">
|
||||
<el-input-number v-model="formModel.averageDeceleration" :min="0" />km/h
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.defaultVelocity')" prop="defaultVelocity">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('map.defaultVelocity')" prop="defaultVelocity">
|
||||
<el-input-number v-model="formModel.defaultVelocity" :min="0" />km/h
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.maxVelocity')" prop="maxVelocity">
|
||||
<el-input-number v-model="formModel.maxVelocity" :min="0" />km/h
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</el-card>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@ -58,13 +64,15 @@ export default {
|
||||
formModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
length: 0,
|
||||
safeDistance: '',
|
||||
maxSafeDistance: '',
|
||||
averageVelocity: 0,
|
||||
averageDeceleration: 0,
|
||||
defaultVelocity: 0,
|
||||
maxVelocity: 0
|
||||
length: 0, // 车长-- 米
|
||||
weight:1, // 车重-- 吨
|
||||
numberOfCars:1 // 车厢数量
|
||||
// safeDistance: '',
|
||||
// maxSafeDistance: '',
|
||||
// averageVelocity: 0,
|
||||
// averageDeceleration: 0,
|
||||
// defaultVelocity: 0,
|
||||
// maxVelocity: 0
|
||||
},
|
||||
type: ''
|
||||
};
|
||||
@ -92,30 +100,52 @@ export default {
|
||||
}
|
||||
],
|
||||
length: [
|
||||
{ required: true, message: this.$t('rules.trainLength'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.trainLength'), trigger: 'change' }
|
||||
],
|
||||
safeDistance: [
|
||||
{ required: true, message: this.$t('rules.safeDistance'), trigger: 'change' }
|
||||
weight:[
|
||||
{ required: true, message: this.$t('rules.trainWeight'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.trainWeight'), 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' }
|
||||
numberOfCars:[
|
||||
{ required: true, message: this.$t('rules.numberOfCars'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.numberOfCars'), 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() {
|
||||
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() {
|
||||
return this.type == 'ADD';
|
||||
@ -140,12 +170,14 @@ export default {
|
||||
this.formModel.code = model.code;
|
||||
this.formModel.name = model.name;
|
||||
this.formModel.length = model.length;
|
||||
this.formModel.safeDistance = model.safeDistance;
|
||||
this.formModel.maxSafeDistance = model.maxSafeDistance;
|
||||
this.formModel.averageVelocity = model.averageVelocity;
|
||||
this.formModel.averageDeceleration = model.averageDeceleration;
|
||||
this.formModel.defaultVelocity = model.defaultVelocity;
|
||||
this.formModel.maxVelocity = model.maxVelocity;
|
||||
this.formModel.weight = model.weight;
|
||||
this.formModel.numberOfCars = model.numberOfCars;
|
||||
// this.formModel.safeDistance = model.safeDistance;
|
||||
// this.formModel.maxSafeDistance = model.maxSafeDistance;
|
||||
// this.formModel.averageVelocity = model.averageVelocity;
|
||||
// this.formModel.averageDeceleration = model.averageDeceleration;
|
||||
// this.formModel.defaultVelocity = model.defaultVelocity;
|
||||
// this.formModel.maxVelocity = model.maxVelocity;
|
||||
}
|
||||
this.rules = this.viewRules;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user