feat:【antd】【ele】【member 会员】point 迁移 antd
This commit is contained in:
@@ -17,12 +17,17 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'nickname',
|
fieldName: 'nickname',
|
||||||
label: '用户',
|
label: '用户',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入用户昵称',
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'bizType',
|
fieldName: 'bizType',
|
||||||
label: '业务类型',
|
label: '业务类型',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
placeholder: '请选择业务类型',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
options: getDictOptions(DICT_TYPE.MEMBER_POINT_BIZ_TYPE, 'number'),
|
options: getDictOptions(DICT_TYPE.MEMBER_POINT_BIZ_TYPE, 'number'),
|
||||||
},
|
},
|
||||||
@@ -31,6 +36,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'title',
|
fieldName: 'title',
|
||||||
label: '积分标题',
|
label: '积分标题',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入积分标题',
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'createDate',
|
fieldName: 'createDate',
|
||||||
@@ -50,25 +59,28 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||||||
{
|
{
|
||||||
field: 'id',
|
field: 'id',
|
||||||
title: '编号',
|
title: '编号',
|
||||||
|
minWidth: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'createTime',
|
field: 'createTime',
|
||||||
title: '获得时间',
|
title: '获得时间',
|
||||||
|
minWidth: 180,
|
||||||
formatter: 'formatDateTime',
|
formatter: 'formatDateTime',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'nickname',
|
field: 'nickname',
|
||||||
title: '用户',
|
title: '用户',
|
||||||
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'point',
|
field: 'point',
|
||||||
title: '获得积分',
|
title: '获得积分',
|
||||||
|
minWidth: 120,
|
||||||
slots: {
|
slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return h(
|
return h(
|
||||||
Tag,
|
Tag,
|
||||||
{
|
{
|
||||||
class: 'mr-1',
|
|
||||||
color: row.point > 0 ? 'blue' : 'red',
|
color: row.point > 0 ? 'blue' : 'red',
|
||||||
},
|
},
|
||||||
() => (row.point > 0 ? `+${row.point}` : row.point),
|
() => (row.point > 0 ? `+${row.point}` : row.point),
|
||||||
@@ -79,22 +91,27 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||||||
{
|
{
|
||||||
field: 'totalPoint',
|
field: 'totalPoint',
|
||||||
title: '总积分',
|
title: '总积分',
|
||||||
|
minWidth: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'title',
|
field: 'title',
|
||||||
title: '标题',
|
title: '标题',
|
||||||
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'description',
|
field: 'description',
|
||||||
title: '描述',
|
title: '描述',
|
||||||
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'bizId',
|
field: 'bizId',
|
||||||
title: '业务编码',
|
title: '业务编码',
|
||||||
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'bizType',
|
field: 'bizType',
|
||||||
title: '业务类型',
|
title: '业务类型',
|
||||||
|
minWidth: 120,
|
||||||
cellRender: {
|
cellRender: {
|
||||||
name: 'CellDict',
|
name: 'CellDict',
|
||||||
props: { type: DICT_TYPE.MEMBER_POINT_BIZ_TYPE },
|
props: { type: DICT_TYPE.MEMBER_POINT_BIZ_TYPE },
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MemberPointRecordApi } from '#/api/member/point/record';
|
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 { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getRecordPage } from '#/api/member/point/record';
|
import { getRecordPage } from '#/api/member/point/record';
|
||||||
@@ -30,6 +30,7 @@ const [Grid] = useVbenVxeGrid({
|
|||||||
},
|
},
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
|
isHover: true,
|
||||||
},
|
},
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
refresh: true,
|
refresh: true,
|
||||||
@@ -41,6 +42,11 @@ const [Grid] = useVbenVxeGrid({
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Page auto-content-height>
|
<Page auto-content-height>
|
||||||
|
<DocAlert
|
||||||
|
title="会员等级、积分、签到"
|
||||||
|
url="https://doc.iocoder.cn/member/level/"
|
||||||
|
/>
|
||||||
|
|
||||||
<Grid table-title="积分记录列表" />
|
<Grid table-title="积分记录列表" />
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user