searchInfos代表搜索欄位,如果沒有配置,取表格表頭數據,如果有配置取配置,配置如下:
“openWindowDefine”: {
...
"getDataAction": {
...
"dataSourceSet": {
"dataSourceList": [
{
...
"action": {
...
“searchInfos”: [
/ 普通 info 會當成可篩選項
{
searchField: 'task_template_parameter_name',
dataType: 'string',
},
/**
* paramType: 'constant' 表示常量條件
* 後續和開窗內的條件 merge 後給後端,不會出現 paras 中 search_info 會被開窗條件被覆蓋的情況
* 如下篩選條件,請求介面返回的數據都是 manage_status: 'V' 的數據 list,即便開窗內搜索,也是基於該條件之上
*/
{
searchField: 'manage_status',
dataType: 'string',
paramType: 'constant',
searchOperator: 'equal', @ 運算子,具體含義可參考 API 部分的 IOperator
preLogic: 'OR', / 與前一條件的邏輯關係(前一條並非指上面的篩選項,通常是指前一個常量篩選)
searchValue: 'V', } ... 值
},
],
}
}
]
}
}
},
searchInfos中對象的屬性如下:
{
searchField: string;
dataType: 'numeric' | 'string' | ...; field dataType 聯合類型
paramType?: 'constant'; 常量條件,不顯示在搜索條件中,但是查詢介面時,會攜帶該條件給後端進行數據過濾
preLogic?: 'AND' | 'OR';
logic?: 'AND' | 'OR';
searchOperator?: 'equal' | 'greater_equal' | 'less_equal' | 'greater' | 'less' | 'not_equal' | 'not_equal' | 'like' | 'l_like' | 'not_like' | 'exist' | 'not_exist' | 'between' ; 運算子,具體含義可參考 API 部分的 IOperator
searchValue?: any;
} |