|
|
@ -83,7 +83,7 @@ function AreaManage() { |
|
|
|
} |
|
|
|
|
|
|
|
const handleAreaEdit = ({ name, id, virtually_code, code, lng, lat, type }) => { |
|
|
|
setEditForm({ name, id, virtually_code, code, lng_lat: lng ? `${lng}, ${lat}` : "", type }) |
|
|
|
setEditForm({ name, id, virtually_code, code, latlng: lng ? `${lng}, ${lat}` : "", type }) |
|
|
|
setEditStatus(true) |
|
|
|
setModalAreaVisible(true) |
|
|
|
} |
|
|
@ -126,7 +126,7 @@ function AreaManage() { |
|
|
|
setModalMapVisible(true) |
|
|
|
} |
|
|
|
const handleMapClick = ({ lat, lng }) => { |
|
|
|
setLatlng([lat.toFixed(4), lng.toFixed(4)]) |
|
|
|
setLatlng([lat.toFixed(4), lng.toFixed(4)].join(',')) |
|
|
|
} |
|
|
|
|
|
|
|
// 区域新增 |
|
|
@ -150,9 +150,9 @@ function AreaManage() { |
|
|
|
} |
|
|
|
|
|
|
|
const handleLatLngConfirm = () => { |
|
|
|
if (latlng == '' || latlng == []) { |
|
|
|
if (latlng == '') { |
|
|
|
message.error('请选择经纬度') |
|
|
|
} else if (!(isArray(latlng) && latlng.length == 2)) { |
|
|
|
} else if (latlng.split(',').length != 2) { |
|
|
|
message.error('请检查经纬度格式') |
|
|
|
} else { |
|
|
|
setModalMapVisible(false) |
|
|
|