diff --git a/src/views/member/signin/record/index.vue b/src/views/member/signin/record/index.vue index ef9fd593..fdc32ac0 100644 --- a/src/views/member/signin/record/index.vue +++ b/src/views/member/signin/record/index.vue @@ -1,3 +1,23 @@ + + diff --git a/src/views/member/signin/record/record.data.ts b/src/views/member/signin/record/record.data.ts new file mode 100644 index 00000000..29603fff --- /dev/null +++ b/src/views/member/signin/record/record.data.ts @@ -0,0 +1,60 @@ +import type { BasicColumn, FormSchema } from '@/components/Table' +import { useRender } from '@/components/Table' + +export const columns: BasicColumn[] = [ + { + title: '编号', + dataIndex: 'id', + width: 100, + }, + { + title: '签到用户', + dataIndex: 'nickname', + width: 200, + }, + { + title: '签到天数', + dataIndex: 'day', + width: 100, + customRender: ({ text }) => { + return useRender.renderTag(`第 ${text} 天`) + }, + }, + { + title: '获得积分', + dataIndex: 'point', + width: 100, + customRender: ({ text }) => { + return useRender.renderTag(text, text > 0 ? 'blue' : 'red') + }, + }, + { + title: '签到时间', + dataIndex: 'createTime', + width: 180, + customRender: ({ text }) => { + return useRender.renderDate(text) + }, + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + label: '签到用户', + field: 'nickname', + component: 'Input', + colProps: { span: 8 }, + }, + { + label: '签到天数', + field: 'bizType', + component: 'Input', + colProps: { span: 8 }, + }, + { + label: '签到时间', + field: 'createTime', + component: 'RangePicker', + colProps: { span: 8 }, + }, +]