mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-14 16:02:34 +08:00
* feat: Add operators comparison to advanced search. * Set is null and not null operator. * Add multiple values to IN and NOT IN operators. * Add component render to set values to IN and NOT IN operators. * Add IN and NOT IN operators in date component. * Fix attribute comparison (isAdvancedQuery).
110 lines
2.2 KiB
JavaScript
110 lines
2.2 KiB
JavaScript
|
|
export const OPERATORS = [
|
|
{
|
|
operator: 'EQUAL',
|
|
symbol: '='
|
|
},
|
|
{
|
|
operator: 'NOT_EQUAL',
|
|
symbol: '<>'
|
|
},
|
|
{
|
|
operator: 'LIKE',
|
|
symbol: '%'
|
|
},
|
|
{
|
|
operator: 'NOT_LIKE',
|
|
symbol: '!%'
|
|
},
|
|
{
|
|
operator: 'GREATER',
|
|
symbol: '>'
|
|
},
|
|
{
|
|
operator: 'GREATER_EQUAL',
|
|
symbol: '>='
|
|
},
|
|
{
|
|
operator: 'LESS',
|
|
symbol: '<'
|
|
},
|
|
{
|
|
operator: 'LESS_EQUAL',
|
|
symbol: '<='
|
|
},
|
|
{
|
|
operator: 'BETWEEN',
|
|
symbol: '>-<'
|
|
},
|
|
{
|
|
operator: 'NOT_NULL',
|
|
symbol: ''
|
|
},
|
|
{
|
|
operator: 'NULL',
|
|
symbol: ''
|
|
},
|
|
{
|
|
operator: 'IN',
|
|
symbol: '()'
|
|
},
|
|
{
|
|
operator: 'NOT_IN',
|
|
symbol: '!()'
|
|
}
|
|
]
|
|
|
|
// Components associated with search type
|
|
export const FIELD_OPERATORS_LIST = [
|
|
{
|
|
type: 'FieldBinary',
|
|
isRange: false,
|
|
conditionsList: ['EQUAL', 'NOT_EQUAL', 'IN', 'NOT_IN', 'NULL', 'NOT_NULL']
|
|
},
|
|
{
|
|
type: 'FieldButton',
|
|
isRange: false,
|
|
conditionsList: ['EQUAL', 'NOT_EQUAL', 'IN', 'NOT_IN', 'NULL', 'NOT_NULL']
|
|
},
|
|
{
|
|
type: 'FieldDate',
|
|
isRange: false,
|
|
conditionsList: ['EQUAL', 'NOT_EQUAL', 'GREATER', 'GREATER_EQUAL', 'LESS', 'LESS_EQUAL', 'IN', 'NOT_IN', 'NULL', 'NOT_NULL']
|
|
},
|
|
{
|
|
type: 'FieldImage',
|
|
isRange: false,
|
|
conditionsList: ['EQUAL', 'NOT_EQUAL', 'IN', 'NOT_IN', 'NULL', 'NOT_NULL']
|
|
},
|
|
{
|
|
type: 'FieldNumber',
|
|
isRange: false,
|
|
conditionsList: ['EQUAL', 'NOT_EQUAL', 'GREATER', 'GREATER_EQUAL', 'LESS', 'LESS_EQUAL', 'IN', 'NOT_IN', 'NULL', 'NOT_NULL']
|
|
},
|
|
{
|
|
type: 'FieldSelect',
|
|
isRange: false,
|
|
conditionsList: ['EQUAL', 'NOT_EQUAL', 'IN', 'NOT_IN', 'IN', 'NOT_IN', 'NULL', 'NOT_NULL']
|
|
},
|
|
{
|
|
type: 'FieldText',
|
|
isRange: false,
|
|
conditionsList: ['EQUAL', 'NOT_EQUAL', 'LIKE', 'NOT_LIKE', 'IN', 'NOT_IN', 'NULL', 'NOT_NULL']
|
|
},
|
|
{
|
|
type: 'FieldTextLong',
|
|
isRange: false,
|
|
conditionsList: ['EQUAL', 'NOT_EQUAL', 'LIKE', 'NOT_LIKE', 'IN', 'NOT_IN', 'NULL', 'NOT_NULL']
|
|
},
|
|
{
|
|
type: 'FieldTime',
|
|
isRange: false,
|
|
conditionsList: ['EQUAL', 'NOT_EQUAL', 'GREATER', 'GREATER_EQUAL', 'LESS', 'LESS_EQUAL', 'IN', 'NOT_IN', 'NULL', 'NOT_NULL']
|
|
},
|
|
{
|
|
type: 'FieldYesNo',
|
|
isRange: false,
|
|
conditionsList: ['EQUAL', 'NOT_EQUAL', 'NULL', 'NOT_NULL']
|
|
}
|
|
]
|