Commit c0842439 authored by lrw's avatar lrw

单位名称补全

parent f03401ad
...@@ -1655,7 +1655,7 @@ ...@@ -1655,7 +1655,7 @@
residenceAddress: '', residenceAddress: '',
planReturnDate: '' planReturnDate: ''
}, },
formMat:{} formMat: {}
} }
}, },
...@@ -1685,8 +1685,9 @@ ...@@ -1685,8 +1685,9 @@
let list = [] let list = []
d.object.list.forEach(item => { d.object.list.forEach(item => {
list.push({ list.push({
label: item.orgName, label: `${item.orgName} (${item.city} ${item.district} ${item.address} ${item.park})`,
value: item.id value: item.id,
desc: item.orgName
}) })
}) })
this.list[0].opts = list this.list[0].opts = list
...@@ -1703,8 +1704,10 @@ ...@@ -1703,8 +1704,10 @@
this.isRead = true this.isRead = true
const data = d.object.reportContent || {} const data = d.object.reportContent || {}
this.form = data this.form = data
this.form['householdValues'] = data['householdProvince'] + "," +data['householdCity'] + "," +data['householdDistrict'] this.form['householdValues'] = data['householdProvince'] + "," + data['householdCity'] + "," + data[
this.form['residenceValue'] = data['residenceProvince'] + "," + data['residenceCity'] + "," +data['residenceDistrict'] 'householdDistrict']
this.form['residenceValue'] = data['residenceProvince'] + "," + data['residenceCity'] + "," + data[
'residenceDistrict']
// 赋值 // 赋值
for (let k in data) { for (let k in data) {
const val = data[k] const val = data[k]
...@@ -1726,16 +1729,12 @@ ...@@ -1726,16 +1729,12 @@
} }
if (item.type == "picker") { if (item.type == "picker") {
item.opts.forEach(opt => { item.opts.forEach(opt => {
if(opt.value == val) { if (opt.value == val) {
if (opt.desc) {
this.formMat[k] = opt.desc
} else {
this.formMat[k] = opt.label this.formMat[k] = opt.label
} }
})
}
if (item.type == "pickerAddress") {
item.opts.forEach(opt => {
if(opt.value == val) {
this.formMat[k] = opt.label
} }
}) })
...@@ -1876,7 +1875,12 @@ ...@@ -1876,7 +1875,12 @@
return 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) this.$set(this.formMat, prop, opts[val].label)
}
if (item.show) { if (item.show) {
this.showChange(event, item) this.showChange(event, item)
......
...@@ -702,18 +702,11 @@ ...@@ -702,18 +702,11 @@
}) })
} }
if (item.type == "pickerAddress") {
item.opts.forEach(opt => {
if (opt.value == val) {
this.formMat[k] = opt.label
}
})
} }
} }
} }
} }
}
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment