From 414aa1a3ca1a42c48f7f4c6dcb88dea94f235b0b Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 19 Feb 2021 13:28:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=BB=98=E5=88=B6=20?= =?UTF-8?q?=E5=88=97=E8=BD=A6=E6=95=B0=E6=8D=AE=E6=A8=A1=E5=9E=8B=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en/map.js | 16 ++- src/i18n/langs/en/rules.js | 15 ++- src/i18n/langs/zh/map.js | 16 ++- src/i18n/langs/zh/rules.js | 15 ++- .../mapoperate/train/trainmodel.vue | 114 +++++++++++------- 5 files changed, 111 insertions(+), 65 deletions(-) diff --git a/src/i18n/langs/en/map.js b/src/i18n/langs/en/map.js index 0464e5279..9f610c48b 100644 --- a/src/i18n/langs/en/map.js +++ b/src/i18n/langs/en/map.js @@ -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:', diff --git a/src/i18n/langs/en/rules.js b/src/i18n/langs/en/rules.js index f71c83cdd..fa9aceabb 100644 --- a/src/i18n/langs/en/rules.js +++ b/src/i18n/langs/en/rules.js @@ -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', diff --git a/src/i18n/langs/zh/map.js b/src/i18n/langs/zh/map.js index 1c45601d6..fc63f9bee 100644 --- a/src/i18n/langs/zh/map.js +++ b/src/i18n/langs/zh/map.js @@ -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: '车次窗宽度:', diff --git a/src/i18n/langs/zh/rules.js b/src/i18n/langs/zh/rules.js index b38c1dcd6..ecfa4ce36 100644 --- a/src/i18n/langs/zh/rules.js +++ b/src/i18n/langs/zh/rules.js @@ -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: '请输入车次窗高度', diff --git a/src/views/newMap/newMapdraft/mapoperate/train/trainmodel.vue b/src/views/newMap/newMapdraft/mapoperate/train/trainmodel.vue index 7c4607fa9..fe9da8737 100644 --- a/src/views/newMap/newMapdraft/mapoperate/train/trainmodel.vue +++ b/src/views/newMap/newMapdraft/mapoperate/train/trainmodel.vue @@ -14,26 +14,32 @@ - {{ $t('map.meter') }} + {{ $t('map.meter') }} - + + {{ $t('map.tong') }} + + + {{ $t('map.vehicle') }} + + + + + + @@ -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 {