空值判断
parent
7f163a0e67
commit
b2fa80e604
|
@ -337,9 +337,13 @@ const fnGetData = async () => {
|
||||||
if (!props.corpInfoId) return;
|
if (!props.corpInfoId) return;
|
||||||
const { data } = await getBusCompanyInfo({ id: props.corpInfoId });
|
const { data } = await getBusCompanyInfo({ id: props.corpInfoId });
|
||||||
form.value = data;
|
form.value = data;
|
||||||
form.value.area = [form.value.province, form.value.city, form.value.county];
|
if (form.value.province) {
|
||||||
|
form.value.area = [form.value.province, form.value.city, form.value.county];
|
||||||
|
}
|
||||||
form.value.sectorId = data.sectorId.split(",");
|
form.value.sectorId = data.sectorId.split(",");
|
||||||
form.value.address = `${form.value.longitude}-${form.value.latitude}`;
|
if (form.value.longitude) {
|
||||||
|
form.value.address = `${form.value.longitude}-${form.value.latitude}`;
|
||||||
|
}
|
||||||
thirdList.value = data.thirdList;
|
thirdList.value = data.thirdList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -102,8 +102,12 @@ const thirdListOptions = [
|
||||||
const fnGetData = async () => {
|
const fnGetData = async () => {
|
||||||
const { data } = await getBusCompanyInfo({ id: id });
|
const { data } = await getBusCompanyInfo({ id: id });
|
||||||
info.value = data;
|
info.value = data;
|
||||||
info.value.area = `${info.value.province},${info.value.city}, ${info.value.county}`;
|
if (info.value.province) {
|
||||||
info.value.address = `${info.value.longitude}-${info.value.latitude}`;
|
info.value.area = `${info.value.province},${info.value.city}, ${info.value.county}`;
|
||||||
|
}
|
||||||
|
if (info.value.longitude) {
|
||||||
|
info.value.address = `${info.value.longitude}-${info.value.latitude}`;
|
||||||
|
}
|
||||||
thirdList.value = info.value.thirdList;
|
thirdList.value = info.value.thirdList;
|
||||||
const { data: servicePlatformList } = await getBusServicePlatformListAll();
|
const { data: servicePlatformList } = await getBusServicePlatformListAll();
|
||||||
target.value = servicePlatformList.find(
|
target.value = servicePlatformList.find(
|
||||||
|
|
Loading…
Reference in New Issue