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) {
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;
}
}