重大危险源编码非空判断

dev
dengjia 2025-07-23 13:43:24 +08:00
parent 747e282b86
commit 6554d6a497
2 changed files with 6 additions and 3 deletions

View File

@ -392,7 +392,8 @@ const fnGetData = async () => {
: "";
thirdList.value = data.thirdList;
thirdList.value.forEach((item) => {
item.majorHazardCode = JSON.parse(item.majorHazardCode);
if (item.majorHazardCode && item.majorHazardCode.length > 0)
item.majorHazardCode = JSON.parse(item.majorHazardCode);
});
};

View File

@ -110,8 +110,10 @@ const fnGetData = async () => {
}
thirdList.value = info.value.thirdList;
thirdList.value.forEach((item) => {
const codeArr = JSON.parse(item.majorHazardCode);
item.majorHazardCode = codeArr.map((item) => item.code).join(",");
if (item.majorHazardCode && item.majorHazardCode.length > 0) {
const codeArr = JSON.parse(item.majorHazardCode);
item.majorHazardCode = codeArr.map((item) => item.code).join(",");
}
});
const { data: servicePlatformList } = await getBusServicePlatformListAll();
target.value = servicePlatformList.find(