From a1ddef7aeb7e864e5efce261c801099599484daa Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Tue, 8 Sep 2020 17:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF=E9=87=87?= =?UTF-8?q?=E9=9B=86-bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/user/househeadedit.vue | 45 +++++++++------- .../user/houseresidentInfo-add-or-update.vue | 13 +++-- .../user/housinginformation-add-or-update.vue | 52 +++++++++++-------- .../modules/user/populationMotorVehicle.vue | 11 ++-- 4 files changed, 71 insertions(+), 50 deletions(-) diff --git a/src/views/modules/user/househeadedit.vue b/src/views/modules/user/househeadedit.vue index 95abbb7..1152eb9 100644 --- a/src/views/modules/user/househeadedit.vue +++ b/src/views/modules/user/househeadedit.vue @@ -16,13 +16,13 @@
- + - + - + @@ -61,11 +61,11 @@ - + - +
@@ -97,7 +97,7 @@
- +

@@ -112,10 +112,10 @@ - + - +
@@ -166,15 +166,17 @@
- - + + - - {{item.dictName}} - + + + {{item.dictName}} + + @@ -226,6 +228,7 @@ export default { helpStatus: '', motorVehicleNum: '', motorVehicleCategory: '', + motorVehicleCategoryList: [], dogStatus: '', familyMemberNum: '', familyMemberOutNum: '', @@ -299,9 +302,6 @@ export default { helpStatus: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], - motorVehicleNum: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } - ], dogStatus: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ] @@ -495,9 +495,16 @@ export default { } } } - if (this.dataForm.motorVehicleNum !== 0 && (this.dataForm.motorVehicleCategory === '' || this.dataForm.motorVehicleCategory === null)) { + if (this.dataForm.motorVehicleNum !== 0 && (this.dataForm.motorVehicleCategoryList.length === 0)) { return this.$message.error('请选择机动车类型') } + let motorVehicleCategoryStr = '' + if (this.dataForm.motorVehicleCategoryList.length > 0) { + for (let i = 0; i < this.dataForm.motorVehicleCategoryList.length; i++) { + motorVehicleCategoryStr += ',' + this.dataForm.motorVehicleCategoryList[i] + } + } + this.dataForm.motorVehicleCategory = motorVehicleCategoryStr.substr(1) this.dataForm.isSubmit = '0' this.$http[!this.dataForm.id ? 'post' : 'put']('/app-user/populationinformation/', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { diff --git a/src/views/modules/user/houseresidentInfo-add-or-update.vue b/src/views/modules/user/houseresidentInfo-add-or-update.vue index 31d2bd4..79af221 100644 --- a/src/views/modules/user/houseresidentInfo-add-or-update.vue +++ b/src/views/modules/user/houseresidentInfo-add-or-update.vue @@ -11,7 +11,7 @@ - + @@ -20,13 +20,13 @@ - + - + - - + +