|
@@ -534,6 +534,21 @@ export default {
|
|
|
arr.push(obj)
|
|
|
}
|
|
|
}
|
|
|
+ arr = arr.reduce((r, i) => {
|
|
|
+ if (i.function === "between") {
|
|
|
+ let [min, max] = i.values;
|
|
|
+ if (min === undefined && max !== undefined) {
|
|
|
+ i.function = "le";
|
|
|
+ i.values = [max];
|
|
|
+ }
|
|
|
+ if (min !== undefined && max === undefined) {
|
|
|
+ i.function = "ge";
|
|
|
+ i.values = [min];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ r.push(i);
|
|
|
+ return r;
|
|
|
+ }, []);
|
|
|
let json = JSON.stringify(arr) === '[]' ? [] : JSON.stringify(arr)
|
|
|
this.$emit('search', json)
|
|
|
},
|