diff --git a/apps/web-ele/src/views/member/point/record/data.ts b/apps/web-ele/src/views/member/point/record/data.ts index f2496892c..0ddb07272 100644 --- a/apps/web-ele/src/views/member/point/record/data.ts +++ b/apps/web-ele/src/views/member/point/record/data.ts @@ -3,11 +3,11 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import { h } from 'vue'; -import { ElTag } from 'element-plus'; - import { DICT_TYPE } from '@vben/constants'; import { getDictOptions } from '@vben/hooks'; +import { ElTag } from 'element-plus'; + import { getRangePickerDefaultProps } from '#/utils'; /** 列表的搜索表单 */ @@ -17,12 +17,17 @@ export function useGridFormSchema(): VbenFormSchema[] { fieldName: 'nickname', label: '用户', component: 'Input', + componentProps: { + placeholder: '请输入用户昵称', + clearable: true, + }, }, { fieldName: 'bizType', label: '业务类型', component: 'Select', componentProps: { + placeholder: '请选择业务类型', clearable: true, options: getDictOptions(DICT_TYPE.MEMBER_POINT_BIZ_TYPE, 'number'), }, @@ -31,6 +36,10 @@ export function useGridFormSchema(): VbenFormSchema[] { fieldName: 'title', label: '积分标题', component: 'Input', + componentProps: { + placeholder: '请输入积分标题', + clearable: true, + }, }, { fieldName: 'createDate', @@ -50,26 +59,29 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'id', title: '编号', + minWidth: 100, }, { field: 'createTime', title: '获得时间', + minWidth: 180, formatter: 'formatDateTime', }, { field: 'nickname', title: '用户', + minWidth: 150, }, { field: 'point', title: '获得积分', + minWidth: 120, slots: { default: ({ row }) => { return h( ElTag, { - class: 'mr-1', - color: row.point > 0 ? 'blue' : 'red', + type: row.point > 0 ? 'primary' : 'danger', }, () => (row.point > 0 ? `+${row.point}` : row.point), ); @@ -79,22 +91,27 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'totalPoint', title: '总积分', + minWidth: 100, }, { field: 'title', title: '标题', + minWidth: 200, }, { field: 'description', title: '描述', + minWidth: 200, }, { field: 'bizId', title: '业务编码', + minWidth: 120, }, { field: 'bizType', title: '业务类型', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.MEMBER_POINT_BIZ_TYPE }, diff --git a/apps/web-ele/src/views/member/point/record/index.vue b/apps/web-ele/src/views/member/point/record/index.vue index 15d1a8135..921f0df6d 100644 --- a/apps/web-ele/src/views/member/point/record/index.vue +++ b/apps/web-ele/src/views/member/point/record/index.vue @@ -2,7 +2,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { MemberPointRecordApi } from '#/api/member/point/record'; -import { Page } from '@vben/common-ui'; +import { DocAlert, Page } from '@vben/common-ui'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { getRecordPage } from '#/api/member/point/record'; @@ -30,6 +30,7 @@ const [Grid] = useVbenVxeGrid({ }, rowConfig: { keyField: 'id', + isHover: true, }, toolbarConfig: { refresh: true, @@ -41,6 +42,11 @@ const [Grid] = useVbenVxeGrid({