データ取得処理条件式対応

This commit is contained in:
2025-01-26 16:42:56 +09:00
parent 54d384e7da
commit 4f4482e20d
6 changed files with 586 additions and 147 deletions

View File

@@ -5,7 +5,16 @@ import { getFieldObj } from './helper';
// conditionValue = '' | 'eq' | 'ne'
// conditionItem = { value: 'eq', label: '=(等しい)', type: 'input', func: (a: string, b: string) => a === b }
// = conditionMap[conditionValue]
export type ConditionValue = '' | 'eq' | 'ne' | 'test';
export type ConditionValue = ""| "="
| "!="
| ">="
| "<="
| "<"
| ">"
| "like"
| "not like"
| "in"
| "not in";
type ConditionItem = {
value: ConditionValue;
@@ -16,9 +25,9 @@ type ConditionItem = {
export const conditionList: ConditionItem[] = [
{ value: '', label: '--------', type: '', func: (a: string, b: string) => true },
{ value: 'eq', label: '=(等しい)', type: 'input', func: (a: string, b: string) => a === b },
{ value: 'ne', label: '≠ (等しくない)', type: 'input', func: (a: string, b: string) => a !== b },
{ value: 'test', label: 'test combobox', type: 'select', func: (a: string, b: string) => a < b },
{ value: '=', label: '=(等しい)', type: 'input', func: (a: string, b: string) => a === b },
{ value: '!=', label: '≠ (等しくない)', type: 'input', func: (a: string, b: string) => a !== b },
{ value: '>=', label: 'test combobox', type: 'select', func: (a: string, b: string) => a < b },
];
// search from conditionList