tableConfig.tsx 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. import WidthEllipsis from "@/components/widthEllipsis"
  2. import { Badge, Statistic, Tag } from "antd"
  3. import React from "react"
  4. function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
  5. return [
  6. {
  7. label: '基本信息',
  8. data: [
  9. {
  10. title: 'GS名称', dataIndex: 'gsName', label: '基本信息', align: 'center', width: 75, default: 1,
  11. render: (a: string) => (<WidthEllipsis value={a} />)
  12. },
  13. {
  14. title: '父游戏名称', dataIndex: 'parentGameName', label: '基本信息', align: 'center', width: 85, default: 2,
  15. render: (a: string) => (<WidthEllipsis value={a} />)
  16. },
  17. {
  18. title: '角色名称', dataIndex: 'roleName', label: '基本信息', align: 'center', width: 85, default: 3,
  19. render: (a: string) => (<WidthEllipsis value={a} />)
  20. },
  21. {
  22. title: '角色创建时间', dataIndex: 'roleTime', label: '基本信息', align: 'center', width: 125, default: 4,
  23. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  24. },
  25. {
  26. title: '角色创角天数', dataIndex: 'roleCreateDayDiff', label: '基本信息', align: 'center', width: 60, default: 5,
  27. render: (a: string) => (<WidthEllipsis value={a} />)
  28. },
  29. {
  30. title: '角色来源', dataIndex: 'roleSource', label: '基本信息', align: 'center', width: 75, default: 6,
  31. render: (a: string) => (<WidthEllipsis value={{ '1': '区服指派', '2': '角色指派' }[a]} />)
  32. },
  33. {
  34. title: '角色所在区服名称', dataIndex: 'endServerName', label: '基本信息', align: 'center', width: 80, default: 7,
  35. render: (a: string) => (<WidthEllipsis value={a} />)
  36. },
  37. {
  38. title: '服务时间', dataIndex: 'gsStartTime', label: '基本信息', align: 'center', width: 160, default: 8,
  39. render: (a: string, b: any) => (<WidthEllipsis value={`${a}-${b?.gsEndTime}`} />)
  40. },
  41. {
  42. title: '服务天数', dataIndex: 'gsServeDays', label: '基本信息', align: 'center', width: 45, default: 9,
  43. render: (a: string) => (<WidthEllipsis value={a} />)
  44. },
  45. {
  46. title: '服务状态', dataIndex: 'serveStatus', label: '基本信息', align: 'center', width: 75, default: 10,
  47. render: (a: boolean) => {
  48. return a ? <Tag color="success" style={{ marginRight: 0 }}>服务完成</Tag> : <Tag color="processing" style={{ marginRight: 0 }}>服务中</Tag>
  49. }
  50. },
  51. {
  52. title: '角色当前状态(系统)', dataIndex: 'systemRemoveGameStatus', label: '基本信息', align: 'center', width: 75, default: 11,
  53. render: (a: number) => {
  54. return a === 0 ? <Badge status="success" text={<span style={{ fontSize: 12 }}>正常</span>} /> : a === 1 ? <Badge status="error" text={<span style={{ fontSize: 12 }}>退游</span>} /> : '--'
  55. }
  56. },
  57. {
  58. title: '角色当前状态(人工)', dataIndex: 'humanRemoveGameStatus', label: '基本信息', align: 'center', width: 75, default: 12,
  59. render: (a: number) => {
  60. return a === 0 ? <Badge status="success" text={<span style={{ fontSize: 12 }}>正常</span>} /> : a === 1 ? <Badge status="error" text={<span style={{ fontSize: 12 }}>退游</span>} /> : '--'
  61. }
  62. },
  63. ]
  64. },
  65. {
  66. label: '角色游戏数据',
  67. data: [
  68. {
  69. title: '角色VIP等级', dataIndex: 'roleVip', label: '角色游戏数据', align: 'center', width: 55, sorter: true, default: 13,
  70. render: (a: string) => <Statistic value={a || 0} />
  71. },
  72. {
  73. title: '角色攻击力', dataIndex: 'combatNum', label: '角色游戏数据', align: 'right', width: 80, sorter: true, default: 14,
  74. render: (a: string) => <Statistic value={a || 0} />
  75. },
  76. {
  77. title: '角色游戏等级', dataIndex: 'roleLevel', label: '角色游戏数据', align: 'center', width: 60, sorter: true, default: 15,
  78. render: (a: string) => <Statistic value={a || 0} />
  79. },
  80. {
  81. title: '角色首充金额', dataIndex: 'firstAmount', label: '角色游戏数据', align: 'right', width: 55, sorter: true, default: 16,
  82. render: (a: string) => <Statistic value={a || 0} />
  83. },
  84. {
  85. title: '创角24小时付费金额', dataIndex: 'roleHourAmount', label: '角色游戏数据', align: 'right', width: 70, sorter: true, default: 17,
  86. render: (a: string) => <Statistic value={a || 0} />
  87. },
  88. {
  89. title: '角色累计充值次数', dataIndex: 'totalCnt', label: '角色游戏数据', align: 'center', width: 70, sorter: true, default: 18,
  90. render: (a: string) => <Statistic value={a || 0} />
  91. },
  92. {
  93. title: '角色累计充值金额', dataIndex: 'totalAmount', label: '角色游戏数据', align: 'right', width: 70, sorter: true, default: 19,
  94. render: (a: string) => <Statistic value={a || 0} />
  95. },
  96. {
  97. title: '角色最近充值金额', dataIndex: 'lastAmount', label: '角色游戏数据', align: 'right', width: 70, sorter: true, default: 20,
  98. render: (a: string) => <Statistic value={a || 0} />
  99. },
  100. {
  101. title: '角色最近充值产品', dataIndex: 'productName', label: '角色游戏数据', align: 'center', width: 85, default: 21,
  102. render: (a: string) => (<WidthEllipsis value={a} />)
  103. },
  104. {
  105. title: '角色最近充值时间', dataIndex: 'lastOrderTime', label: '角色游戏数据', align: 'center', width: 120, default: 22,
  106. render: (a: string) => (<WidthEllipsis value={a} />)
  107. },
  108. {
  109. title: '角色最近活跃时间', dataIndex: 'activeTime', label: '角色游戏数据', align: 'center', width: 120, default: 23,
  110. render: (a: string) => (<WidthEllipsis value={a} />)
  111. },
  112. {
  113. title: '角色最近充值时间距今', dataIndex: 'lastOrderDayDiff', label: '角色游戏数据', align: 'center', width: 65, default: 24,
  114. render: (a: number) => (<span style={{ fontSize: 12, color: a > 5 ? 'red' : '#000' }}>{a}</span>)
  115. },
  116. {
  117. title: '角色最近活跃时间距今', dataIndex: 'roleActiveDayDiff', label: '角色游戏数据', align: 'center', width: 65, default: 25,
  118. render: (a: number) => (<span style={{ fontSize: 12, color: a > 5 ? 'red' : '#000' }}>{a}</span>)
  119. }
  120. ]
  121. }
  122. ]
  123. }
  124. export default columns12