123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- import { ProColumns } from '@ant-design/pro-components';
- import { useModel } from '@umijs/max';
- export const columns = (): ProColumns<any>[] => {
- let { getEnum } = useModel('global')
- return [
- {
- title: 'openId',
- dataIndex: 'openId',
- align: 'center',
- width: 70,
- ellipsis: true,
- render: (_, row) => {
- return row?.wechatMiniappUser?.openId || "-"
- }
- },
- {
- title: '小说名称',
- dataIndex: 'bookName',
- key: 'bookName',
- align: 'center',
- width: 150,
- ellipsis: true,
- render: (a, b) => {
- return b?.bookInfo?.bookName || "-"
- },
- },
- {
- title: "作者笔名",
- dataIndex: 'authorName',
- key: "authorName",
- align: "center",
- render: (a, b) => {
- return b?.bookInfo?.authorInfo?.authorName || "-"
- },
- },
- {
- title: '章节名称',
- dataIndex: 'chapterId',
- align: 'center',
- width: 150,
- ellipsis: true,
- hideInSearch: true,
- render: (a, b) => {
- return b?.chapterInfo?.chapterName|| "-"
- },
- },
- {
- title: '应用名称',
- dataIndex: 'appName',
- key: 'appName',
- width: 120,
- align: 'center',
- ellipsis: true,
- render: (a, b) => {
- return b?.appInfo?.appName;
- },
- },
- {
- title: '分销商名称',
- dataIndex: 'companyName',
- key: 'companyName',
- width: 120,
- align: 'center',
- ellipsis: true,
- render: (a, b) => {
- return b?.distributorInfo?.companyName;
- },
- },
- {
- title: '变更类型',
- dataIndex: 'changeType',
- width: 120,
- align: 'center',
- ellipsis: true,
- valueEnum: getEnum("CHANGE_TYPE", "map")
- },
- {
- title: '变更数量',
- dataIndex: 'coinChangeNum',
- width: 120,
- align: 'center',
- ellipsis: true,
- hideInSearch: true,
- },
- {
- title: '剩余书币',
- dataIndex: 'coinRemainingNum',
- width: 120,
- align: 'center',
- ellipsis: true,
- hideInSearch: true,
- },
- {
- title: '变更时间',
- dataIndex: 'createTime',
- width: 120,
- align: 'center',
- ellipsis: true,
- hideInSearch: true,
- },
- {
- title: "用户注册时间",
- dataIndex: 'createTime',
- key: "createTime",
- hideInSearch: true,
- align: "center",
- render: (_, row) => {
- return row?.wechatMiniappUser?.createTime
- }
- },
- //搜索
- {
- title: '变更时间',
- dataIndex: 'time',
- valueType: 'dateRange',
- fieldProps: {
- style: { width: 250 },
- },
- hideInTable: true,
- },
- ];
- };
|