import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; export const querySchema: FormSchemaGetter = () => [ { component: 'Input', fieldName: 'serverId', label: '服务id', }, { component: 'Input', fieldName: 'userId', label: '核销人id', }, { component: 'Input', fieldName: 'outcome', label: '核销结果', }, { component: 'DatePicker', componentProps: { showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, fieldName: 'time', label: '核销时间', }, ]; // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 // export const columns: () => VxeGridProps['columns'] = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { title: '主键', field: 'id', }, { title: '服务id', field: 'serverId', }, { title: '核销人id', field: 'userId', }, { title: '核销结果', field: 'outcome', }, { title: '核销时间', field: 'time', }, { title: '备注', field: 'remark', }, { title: '创建时间', field: 'createTime', }, { field: 'action', fixed: 'right', slots: { default: 'action' }, title: '操作', width: 180, }, ]; export const modalSchema: FormSchemaGetter = () => [ { label: '主键', fieldName: 'id', component: 'Input', dependencies: { show: () => false, triggerFields: [''], }, }, { label: '服务id', fieldName: 'serverId', component: 'Input', rules: 'required', }, { label: '核销人id', fieldName: 'userId', component: 'Input', rules: 'required', }, { label: '核销结果', fieldName: 'outcome', component: 'Input', rules: 'required', }, { label: '核销时间', fieldName: 'time', component: 'DatePicker', componentProps: { showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, rules: 'required', }, { label: '备注', fieldName: 'remark', component: 'Input', }, ];