Skip to content

Commit

Permalink
fix: 修复字段隐藏条件判断失败的问题
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 6362
  • Loading branch information
luofann committed Apr 19, 2024
1 parent c4cf730 commit a0dedd3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions frontend/pc/src/views/commonMix/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default {
// 当前节点的类型和expressions的数据一样时,进行处理
if (item.key === list[i].show_conditions.expressions[j].key) {
if (list[i].show_conditions.expressions.length === 1) {
list[i].showFeild = this.conditionSwitch(
list[i].showFeild = !this.conditionSwitch(
item,
list[i].show_conditions.expressions[j]
);
Expand All @@ -134,7 +134,7 @@ export default {
}
}
// 判断当前字段与关联字段的关系
list[i].showFeild = statusList.every(status => !!status);
list[i].showFeild = statusList.some(status => !status);
} else {
// 判断其他字段和关联字段的关系
const statusList = [];
Expand All @@ -149,7 +149,7 @@ export default {
}
}
}
list[i].showFeild = statusList.some(status => !!status);
list[i].showFeild = statusList.every(status => !status);
}
}
}
Expand Down Expand Up @@ -217,14 +217,12 @@ export default {
}
case 'issuperset': {
const issupersetList = value.value.split(',');
const statusList = issupersetList.map(val => item.val.indexOf(val) === -1);
statusInfo = statusList.every(status => !status);
statusInfo = issupersetList.includes(item.val);
break;
}
case 'notissuperset': {
const valnoList = value.value.split(',');
const statusnoList = valnoList.map(val => item.val.indexOf(val) === -1);
statusInfo = !statusnoList.every(status => !status);
statusInfo = !valnoList.includes(item.val);
break;
}
default: {
Expand Down

0 comments on commit a0dedd3

Please sign in to comment.