Commit 21b9a46b by wangzhihui

Merge branch 'SAAS+V4.54.0-0630' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.54.0-0630
2 parents 7b242b35 aec57dd2
......@@ -208,7 +208,7 @@ export default {
type: "select",
isClear: true,
optionList: [],
optionId: "adcode",
optionId: "code",
optionLabel: "name",
optionsName: "provinceInfoList",
changeAttr: (value, targetItem) => {
......@@ -216,7 +216,7 @@ export default {
this.baseData.cityList = []
this.getOptionsList()
if (value) {
const params = { districtName: this.baseData.provinceInfoList.find(item => item.adcode == value).name }
const params = { districtName: this.baseData.provinceInfoList.find(item => item.code == value).name }
getDistrictDetail(params).then(res => {
if (res && res.length) {
this.baseData.cityList = res[0].districts
......@@ -1002,69 +1002,29 @@ export default {
// 省市区
getProvinceList() {
var map = new AMap.Map("district", {
resizeEnable: true
})
AMap.plugin(["AMap.DistrictSearch"], () => {
var opts = {
subdistrict: 1, // 返回下一级行政区
level: "city", // 查询的范围
showbiz: true // 查询行政级别为 市
}
var districtSearch = new AMap.DistrictSearch(opts)
districtSearch.search("中国", (status, result) => {
this.baseData.provinceInfoList = result.districtList[0].districtList
const params = { districtName: '中国' }
getDistrictDetail(params).then(res => {
console.log(res)
if (res && res.length) {
this.baseData.provinceInfoList = res[0].districts
this.getOptionsList()
// com.getSelect({
// id: 'startp',
// name: 'provinceName',
// url: '/area/list',
// // value: 'provinceId',
// data: provinceInfoList,
// value: 'name',
// text: 'name',
// param: {},
// select: function (data) {
// const { value } = data
// if (value) {
// // var province = provinceInfoList.find(item => item.provinceId == value)
// var province = provinceInfoList.find(item => item.name == value)
// cityInfo = province.districtList
// merchantForm.provinceCode = province.adcode
// merchantForm.provinceName = province.name
// $('#addrEl').val('')
// } else {
// cityInfo = []
// merchantForm.provinceCode = ''
// merchantForm.provinceName = ''
// }
// merchantForm.cityCode = ''
// merchantForm.cityName = ''
// com.getSelect({
// id: 'startc',
// name: 'cityName',
// url: '/area/list',
// value: 'name',
// text: 'name',
// data: cityInfo,
// link: 'startp',
// select: function (data) {
// const { value } = data
// if (value) {
// // var city = cityInfo.find(item => item.cityId == value)
// var city = cityInfo.find(item => item.name == value)
// merchantForm.cityCode = city.adcode
// merchantForm.cityName = city.name
// } else {
// merchantForm.cityCode = ''
// merchantForm.cityName = ''
// }
// }
// })
// }
// })
})
}
})
// var map = new AMap.Map("district", {
// resizeEnable: true
// })
// AMap.plugin(["AMap.DistrictSearch"], () => {
// var opts = {
// subdistrict: 1, // 返回下一级行政区
// level: "city", // 查询的范围
// showbiz: true // 查询行政级别为 市
// }
// var districtSearch = new AMap.DistrictSearch(opts)
// districtSearch.search("中国", (status, result) => {
// this.baseData.provinceInfoList = result.districtList[0].districtList
// this.getOptionsList()
// })
// })
},
handleSearch() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!