This commit is contained in:
qsh
2024-08-02 18:03:21 +08:00
parent 605151c5c8
commit 925887f4c9
13 changed files with 251 additions and 60 deletions

View File

@@ -133,6 +133,7 @@
import { useAppStore } from '@/store/modules/app'
import { useUserStore } from '@/store/modules/user'
import { getPlaceList } from '@/api/school/place'
import { getConfigByConfigKey } from '@/api/system/set'
import * as ClueApi from '@/api/clue'
import { getDiyFieldList } from '@/api/clue/clueField'
import { formatDate } from '@/utils/formatTime'
@@ -226,6 +227,7 @@ const defaultLatLng = ref({
lat: 31.86119,
lng: 117.283042
})
const defaultCity = ref('合肥')
const info = ref({})
const diyFieldArr = ref([])
@@ -265,9 +267,14 @@ const open = async (type, id) => {
}
]
address.value = ''
defaultLatLng.value = {
lat: 31.86119,
lng: 117.283042
if (appStore.getAppInfo?.instanceType == 1) {
const data = await getConfigByConfigKey({ configKey: 'defaultLocation' })
const cityInfo = JSON.parse(data.configValue)
defaultLatLng.value = {
lat: cityInfo.lat,
lng: cityInfo.lng
}
defaultCity.value = cityInfo.locationName
}
nextTick(() => {
formRef.value.setValues(info.value, true)
@@ -396,7 +403,7 @@ function initMap(data) {
})
addmark(defaultLatLng.value.lng, defaultLatLng.value.lat, AMap)
AutoComplete.value = new AMap.AutoComplete({
city: '合肥'
city: defaultCity.value
})
geoCoder.value = new AMap.Geocoder()
dialogMap.value.on('click', (e) => {