|
@@ -553,6 +553,21 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ const districtSearchOptions = {
|
|
|
+ level: 'country',
|
|
|
+ // 显示下级行政区级数,1表示返回下一级行政区
|
|
|
+ subdistrict: 1
|
|
|
+ }
|
|
|
+ const amapDistrictSearch = new AMap.DistrictSearch(districtSearchOptions)
|
|
|
+ amapDistrictSearch.setLevel('province') // 行政区级别
|
|
|
+ amapDistrictSearch.setExtensions('all')
|
|
|
+ amapDistrictSearch.search('410000', (status, result) => {
|
|
|
+ console.log(result)
|
|
|
+ if (status == 'complete') {
|
|
|
+ console.log(result)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
this.getTradeConfigList()
|
|
|
if (this.module === 'add') {
|
|
|
this.getRegion()
|
|
@@ -770,6 +785,7 @@ export default {
|
|
|
this.formData.positionAddress = data.name
|
|
|
this.formData.address = data.name
|
|
|
var { province, city, district, township } = data.data.addressComponent
|
|
|
+ console.log(province, city, district, township)
|
|
|
const area = district
|
|
|
const street = township
|
|
|
await this.getCallbackPosition(0, province, 'province')
|
|
@@ -788,6 +804,7 @@ export default {
|
|
|
const { data } = await getRegion({ pid: id })
|
|
|
this[name + 'List'] = data
|
|
|
const temp = data.find(k => k[way] == value)
|
|
|
+ console.log(temp, 999, value)
|
|
|
this.formData[name] = temp && temp.name
|
|
|
this.formData[name + 'Id'] = temp && temp.id
|
|
|
},
|