diff --git a/pages/fillIn/fillIn.vue b/pages/fillIn/fillIn.vue index 574b38b9151a2d29265c166a66fc2b9ddff7b90d..dbee7b37b322afc2d60fe815df7b472e83856ae0 100644 --- a/pages/fillIn/fillIn.vue +++ b/pages/fillIn/fillIn.vue @@ -1655,7 +1655,7 @@ residenceAddress: '', planReturnDate: '' }, - formMat:{} + formMat: {} } }, @@ -1685,8 +1685,9 @@ let list = [] d.object.list.forEach(item => { list.push({ - label: item.orgName, - value: item.id + label: `${item.orgName} (${item.city} ${item.district} ${item.address} ${item.park})`, + value: item.id, + desc: item.orgName }) }) this.list[0].opts = list @@ -1703,8 +1704,10 @@ this.isRead = true const data = d.object.reportContent || {} this.form = data - this.form['householdValues'] = data['householdProvince'] + "," +data['householdCity'] + "," +data['householdDistrict'] - this.form['residenceValue'] = data['residenceProvince'] + "," + data['residenceCity'] + "," +data['residenceDistrict'] + this.form['householdValues'] = data['householdProvince'] + "," + data['householdCity'] + "," + data[ + 'householdDistrict'] + this.form['residenceValue'] = data['residenceProvince'] + "," + data['residenceCity'] + "," + data[ + 'residenceDistrict'] // 赋值 for (let k in data) { const val = data[k] @@ -1726,19 +1729,15 @@ } if (item.type == "picker") { item.opts.forEach(opt => { - if(opt.value == val) { - this.formMat[k] = opt.label - } - }) - - } - if (item.type == "pickerAddress") { - item.opts.forEach(opt => { - if(opt.value == val) { - this.formMat[k] = opt.label + if (opt.value == val) { + if (opt.desc) { + this.formMat[k] = opt.desc + } else { + this.formMat[k] = opt.label + } } }) - + } } } @@ -1875,8 +1874,13 @@ this.$set(this.form, prop, val) return } - this.$set(this.form, prop, opts[val].value) + this.$set(this.form, prop, opts[val].value) + if (opts[val].desc) { + this.$set(this.formMat, prop, opts[val].desc) + } else { this.$set(this.formMat, prop, opts[val].label) + } + if (item.show) { this.showChange(event, item) diff --git a/pages/fillInDay/fillInDay.vue b/pages/fillInDay/fillInDay.vue index 1557518d8e3e764aa5eb862d30af98c2e83127d9..8aa58f8e7702419013fe3196ed5d15addd2d2f0b 100644 --- a/pages/fillInDay/fillInDay.vue +++ b/pages/fillInDay/fillInDay.vue @@ -702,14 +702,7 @@ }) } - if (item.type == "pickerAddress") { - item.opts.forEach(opt => { - if (opt.value == val) { - this.formMat[k] = opt.label - } - }) - } } } }