From 4b78fade1577ee6214cff8646aebbb010721d9b9 Mon Sep 17 00:00:00 2001 From: xingyu Date: Tue, 22 Aug 2023 16:26:02 +0800 Subject: [PATCH] feat: add SignInRecord --- src/views/member/signin/record/index.vue | 22 ++++++- src/views/member/signin/record/record.data.ts | 60 +++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 src/views/member/signin/record/record.data.ts 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 }, + }, +]