|
@@ -690,6 +690,8 @@ export default defineComponent(
|
|
|
formState.dataModel[key] = result[key];
|
|
|
}
|
|
|
})
|
|
|
+ // 调用地址变更事件
|
|
|
+ companyAddressChange();
|
|
|
formRef.value?.validate();
|
|
|
}
|
|
|
}).finally(() => {
|
|
@@ -769,12 +771,14 @@ export default defineComponent(
|
|
|
|
|
|
// 根据地址获取经纬度
|
|
|
function companyAddressChange() {
|
|
|
- getAddressLonLat(formState.dataModel.companyAddress).then((result: any) => {
|
|
|
- if (result.lon && result.lat) {
|
|
|
- formState.dataModel.longitude = result.lon;
|
|
|
- formState.dataModel.latitude = result.lat;
|
|
|
- }
|
|
|
- });
|
|
|
+ if (formState.dataModel.companyAddress) {
|
|
|
+ getAddressLonLat(formState.dataModel.companyAddress).then((result: any) => {
|
|
|
+ if (result.lon && result.lat) {
|
|
|
+ formState.dataModel.longitude = result.lon;
|
|
|
+ formState.dataModel.latitude = result.lat;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return {
|