tableConfig.tsx 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import ProgressTable from "@/components/ProgressTable"
  2. import WidthEllipsis from "@/components/widthEllipsis"
  3. import { Statistic } from "antd"
  4. import React from "react"
  5. function columns12() {
  6. let newArr: { label: string, data: any[] }[] = [
  7. {
  8. label: '玩家充值排行榜',
  9. data: [
  10. { title: '玩家ID', dataIndex: 'playerId', label: '玩家充值排行榜', align: 'center', width: 70 },
  11. { title: '玩家账号', dataIndex: 'playerAccountId', label: '玩家充值排行榜', align: 'center', width: 120, default: 1, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
  12. { title: '注册渠道', dataIndex: 'regAgentName', label: '玩家充值排行榜', align: 'center', width: 80, default: 2, render: (a: string, b: any) => (<WidthEllipsis isCopy value={a} />) },
  13. { title: '注册渠道ID', dataIndex: 'regAgentId', label: '玩家充值排行榜', align: 'center', width: 80 },
  14. { title: '注册时间', dataIndex: 'regUserTime', label: '玩家充值排行榜', align: 'center', width: 140, default: 3, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
  15. { title: '注册游戏', dataIndex: 'regGameName', label: '玩家充值排行榜', align: 'center', width: 70, default: 4, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
  16. { title: '玩家操作系统', dataIndex: 'playerOs', label: '玩家充值排行榜', align: 'center', width: 70, default: 5 },
  17. {
  18. title: '当天充值金额', dataIndex: 'todayTotalAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 6, sorter: true,
  19. className: 'progress',
  20. render: (a: number) => {
  21. return <ProgressTable
  22. strokeColor={{
  23. from: '#108ee9',
  24. to: '#87d068',
  25. }}
  26. percent={a ? a / 2000 * 100 : 0}
  27. value={a || 0}
  28. valueStyle={a >= 1000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
  29. />
  30. },
  31. },
  32. { title: '首充金额', dataIndex: 'firstAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 7, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
  33. { title: '最近充值金额', dataIndex: 'lastAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 8, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
  34. {
  35. title: '累计充值金额', dataIndex: 'totalAmount', label: '玩家充值排行榜', align: 'center', width: 100, default: 9, sorter: true, className: 'progress',
  36. render: (a: number) => {
  37. return <ProgressTable
  38. strokeColor={{
  39. from: '#ff5900',
  40. to: '#ffd380',
  41. }}
  42. percent={a ? a / 10000 * 100 : 0}
  43. value={a || 0}
  44. valueStyle={a >= 5000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }}
  45. />
  46. },
  47. },
  48. { title: '平均单价', dataIndex: 'avgAmount', label: '玩家充值排行榜', align: 'center', width: 70, default: 10, sorter: true, render: (a: string) => <Statistic value={a || 0} /> },
  49. { title: '累计充值次数', dataIndex: 'totalAmountCount', label: '玩家充值排行榜', align: 'center', width: 70, default: 11, sorter: true },
  50. // { title: '玩家等级标签', dataIndex: '13', label: '玩家充值排行榜', align: 'center', width: 70, default: 14 },
  51. { title: '最近充值游戏', dataIndex: 'lastAmountGameName', label: '玩家充值排行榜', align: 'center', width: 70, default: 12, render: (a: string, b: any) => (<WidthEllipsis value={a} />) },
  52. { title: '最近充值时间', dataIndex: 'lastAmountTime', label: '玩家充值排行榜', align: 'center', width: 140, default: 13, render: (a: string, b: any) => (<WidthEllipsis value={a} />) }
  53. ]
  54. },
  55. ]
  56. return newArr
  57. }
  58. export default columns12