This commit is contained in:
njdaoyehu 2025-04-23 15:24:05 +08:00
parent bb15f8ca33
commit 3e3b405ae0

View File

@ -118,8 +118,12 @@ const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (
entity.value = data?.record; entity.value = data?.record;
paramData.value = []; paramData.value = [];
const items = entity.value && entity.value.paramJson ? JSON.parse(entity.value.paramJson) : []; const items = entity.value && entity.value.paramJson ? JSON.parse(entity.value.paramJson) : [];
items.forEach((d: any) => { items.forEach((d: any, index: number) => {
paramData.value.push({ ...d }); if (Object.keys(d).includes('sn')) {
paramData.value.push({...d});
} else {
paramData.value.push({ sn: (index + 1) + '', ...d});
}
}); });
await setFieldsValue({ await setFieldsValue({
...data.record, ...data.record,