fix: 自定义字段解析保护

--bug=1007406 --user=lyh 【测试跟踪】用例列表选择模块不显示所选模块下的用例
https://www.tapd.cn/55049933/s/1058813
This commit is contained in:
shiziyuan9527 2021-10-25 18:37:53 +08:00 committed by shiziyuan9527
parent 6b1d5c38da
commit f1dba94676
1 changed files with 11 additions and 9 deletions

View File

@ -469,16 +469,18 @@ export function getCustomFieldValue(row, field, members) {
else if (['multipleSelect', 'checkbox'].indexOf(field.type) > -1) { else if (['multipleSelect', 'checkbox'].indexOf(field.type) > -1) {
if (item.value) { if (item.value) {
let values = ''; let values = '';
item.value.forEach(v => { if (item.value instanceof Array) {
for (let j = 0; j < field.options.length; j++) { item.value.forEach(v => {
let option = field.options[j]; for (let j = 0; j < field.options.length; j++) {
if (option.value === v) { let option = field.options[j];
values += (field.system ? i18n.t(option.text) : option.text); if (option.value === v) {
values += " "; values += (field.system ? i18n.t(option.text) : option.text);
break; values += " ";
break;
}
} }
} });
}); }
return values; return values;
} }
} }