From 422c016e675f8ac1c7020ef520d661fbfdcb7a44 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Thu, 19 Dec 2024 13:43:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E6=A8=A1=E6=9D=BF=E5=A4=9A=E9=80=89=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1050557 --user=宋昌昌 【缺陷管理】项目集成tapd-缺陷列表-操作-编辑-页面未展示缺陷内容 https://www.tapd.cn/55049933/s/1634409 --- frontend/src/views/bug-management/edit.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/views/bug-management/edit.vue b/frontend/src/views/bug-management/edit.vue index a624a78103..badb575d7c 100644 --- a/frontend/src/views/bug-management/edit.vue +++ b/frontend/src/views/bug-management/edit.vue @@ -729,18 +729,17 @@ tmpObj[item.id] = ''; // 多选类型需要过滤选项 } else if (MULTIPLE_TYPE.includes(item.type)) { + if (!item.value) { + tmpObj[item.id] = []; + } const multipleOptions = getOptionFromTemplate( currentCustomFields.value.find((filed: any) => item.id === filed.fieldId) ); // 如果该值在选项中已经被删除掉 const optionsIds = (multipleOptions || []).map((e: any) => e.value); if (item.type !== 'MULTIPLE_INPUT') { - if (item.value) { - const currentDefaultValue = optionsIds.filter((e: any) => JSON.parse(item.value).includes(e)); - tmpObj[item.id] = currentDefaultValue; - } else { - tmpObj[item.id] = []; - } + const currentDefaultValue = optionsIds.filter((e: any) => JSON.parse(item.value).includes(e)); + tmpObj[item.id] = currentDefaultValue; } else { tmpObj[item.id] = JSON.parse(item.value); }