From f1dba94676466cb1de05a8091e15c77c327be347 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 25 Oct 2021 18:37:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E8=A7=A3=E6=9E=90=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1007406 --user=lyh 【测试跟踪】用例列表选择模块不显示所选模块下的用例 https://www.tapd.cn/55049933/s/1058813 --- frontend/src/common/js/tableUtils.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/frontend/src/common/js/tableUtils.js b/frontend/src/common/js/tableUtils.js index 84bdd89d58..dcfff9b76c 100644 --- a/frontend/src/common/js/tableUtils.js +++ b/frontend/src/common/js/tableUtils.js @@ -469,16 +469,18 @@ export function getCustomFieldValue(row, field, members) { else if (['multipleSelect', 'checkbox'].indexOf(field.type) > -1) { if (item.value) { let values = ''; - item.value.forEach(v => { - for (let j = 0; j < field.options.length; j++) { - let option = field.options[j]; - if (option.value === v) { - values += (field.system ? i18n.t(option.text) : option.text); - values += " "; - break; + if (item.value instanceof Array) { + item.value.forEach(v => { + for (let j = 0; j < field.options.length; j++) { + let option = field.options[j]; + if (option.value === v) { + values += (field.system ? i18n.t(option.text) : option.text); + values += " "; + break; + } } - } - }); + }); + } return values; } }