refactor(web-admin): generalize server column filter queryKey mapping.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3ab447b735
commit
f33b905f0d
3 files changed
+35
-20
No files matched your search
@@ -858,15 +858,22 @@ const { rows, total, currentPage, pageSize, rangeText, loading, refresh, search,
|
||||
const quickSearchKeyword = ref('')
|
||||
|
||||
const columnFilterDefs: ColumnFilterDef[] = [
|
||||
{ prop: 'applyTime', label: '申请时间', type: 'datetime' },
|
||||
{ prop: 'applyCode', label: '报销单号', type: 'text' },
|
||||
{ prop: 'title', label: '报销标题', type: 'text' },
|
||||
{ prop: 'expenseName', label: '费用项目', type: 'text' },
|
||||
{ prop: 'amount', label: '报销金额(元)', type: 'number' },
|
||||
{
|
||||
prop: 'applyTime',
|
||||
label: '申请时间',
|
||||
type: 'datetime',
|
||||
queryKeyFrom: 'applyDateFrom',
|
||||
queryKeyTo: 'applyDateTo'
|
||||
},
|
||||
{ prop: 'applyCode', label: '报销单号', type: 'text', queryKey: 'applyCode' },
|
||||
{ prop: 'title', label: '报销标题', type: 'text', queryKey: 'title' },
|
||||
{ prop: 'expenseName', label: '费用项目', type: 'text', queryKey: 'expenseName' },
|
||||
{ prop: 'amount', label: '报销金额(元)', type: 'number', queryKeyPrefix: 'amount' },
|
||||
{
|
||||
prop: 'status',
|
||||
label: '状态',
|
||||
type: 'enum',
|
||||
queryKey: 'status',
|
||||
enumOptions: [
|
||||
{ value: 'draft', label: '待提交' },
|
||||
{ value: 'pending', label: '审批中' },
|
||||
@@ -874,7 +881,7 @@ const columnFilterDefs: ColumnFilterDef[] = [
|
||||
{ value: 'rejected', label: '审批驳回' }
|
||||
]
|
||||
},
|
||||
{ prop: 'currentNode', label: '当前节点', type: 'text' }
|
||||
{ prop: 'currentNode', label: '当前节点', type: 'text', queryKey: 'currentNode' }
|
||||
]
|
||||
|
||||
const {
|
||||
|
||||
Reference in new issue
Block a user