fix(高级搜索): 缺陷管理按照严重程度搜索无效

--bug=1015254 --user=李玉号 【测试跟踪】缺陷管理-高级搜索,按照“严重程度”筛选无效
https://www.tapd.cn/55049933/s/1209297
This commit is contained in:
shiziyuan9527 2022-07-25 11:40:35 +08:00 committed by shiziyuan9527
parent 9f86d1df9b
commit 047ad4eb01
1 changed files with 28 additions and 24 deletions

View File

@ -109,31 +109,35 @@ export default {
this.visible = false;
},
setCondition(condition, component) {
if (!component.custom) {
condition[component.key] = {
operator: component.operator.value,
value: component.value
};
} else {
if (!condition.customs) {
condition['customs'] = [];
}
let value = component.value;
if (component.type === "multipleMember") {
try {
value = JSON.stringify(component.value);
} catch (e) {
// nothing
}
}
condition['customs'].push({
id: component.key,
operator: component.operator.value,
value: value,
type: component.type
});
// custom false
//
if (component.custom || (component.label === '严重程度' || component.label === '处理人' || component.label === '状态')) {
this.handleCustomField(condition, component);
return;
}
condition[component.key] = {
operator: component.operator.value,
value: component.value
};
},
handleCustomField(condition, component) {
if (!condition.customs) {
condition['customs'] = [];
}
let value = component.value;
if (component.type === "multipleMember") {
try {
value = JSON.stringify(component.value);
} catch (e) {
// nothing
}
}
condition['customs'].push({
id: component.key,
operator: component.operator.value,
value: value,
type: component.type
});
},
reset() {
let source = this.condition.components;