fix(高级搜索): 多选成员类型字段搜索
This commit is contained in:
parent
9616880d7a
commit
e70b190d18
|
@ -84,10 +84,7 @@
|
|||
select resource_id from custom_field_test_case where field_id = #{custom.id}
|
||||
<choose>
|
||||
<when test="custom.type == 'multipleMember'">
|
||||
<foreach item="item" collection='custom.value.split(",")' open="" separator="" close="">
|
||||
and left(`value`, 1) = '['
|
||||
and find_in_set(#{item}, replace(replace(`value`, ']', ''), '[', ''))
|
||||
</foreach>
|
||||
and JSON_CONTAINS(`value`, #{custom.value})
|
||||
</when>
|
||||
<when test="custom.type == 'date' or custom.type == 'datetime'">
|
||||
and left(replace(unix_timestamp(trim(both '"' from `value`)), '.', ''), 13)
|
||||
|
|
|
@ -120,8 +120,7 @@ export default {
|
|||
let value = component.value;
|
||||
if (component.type === "multipleMember") {
|
||||
try {
|
||||
let str = JSON.stringify(component.value);
|
||||
value = str.substring(1, str.length - 1);
|
||||
value = JSON.stringify(component.value);
|
||||
} catch (e) {
|
||||
// nothing
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue