tableConfig.tsx 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. import WidthEllipsis from "@/components/widthEllipsis"
  2. import { Statistic } from "antd"
  3. import React from "react"
  4. import '../../gameData/flowingWater/index.less'
  5. function columns12() {
  6. let newArr: { label: string, data: any[] }[] = [
  7. {
  8. label: '游戏',
  9. data: [
  10. {
  11. title: '游戏', dataIndex: 'parent_game_name', label: '游戏', align: 'center', width: 90, default: 1,
  12. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  13. },
  14. ]
  15. },
  16. {
  17. label: '区服信息',
  18. data: [
  19. {
  20. title: '区服名称', dataIndex: 'server_name', label: '区服信息', align: 'center', width: 70, default: 2,
  21. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  22. },
  23. {
  24. title: '开服时间', dataIndex: 'dt', label: '区服信息', align: 'center', width: 140, default: 3,
  25. render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  26. },
  27. {
  28. title: '开服天数', dataIndex: 'start_day', label: '区服信息', align: 'center', width: 60, default: 4,
  29. render: (a: string) => <Statistic value={a || 0} />
  30. },
  31. {
  32. title: '区服战力', dataIndex: 'server_combat_num', label: '区服信息', align: 'center', width: 90, default: 5,
  33. render: (a: string) => <Statistic value={a || 0} />
  34. }
  35. ]
  36. },
  37. {
  38. label: '用户信息',
  39. data: [
  40. {
  41. title: '新用户人数', dataIndex: 'new_user_count', label: '用户信息', align: 'center', width: 70, default: 6,
  42. render: (a: string) => <Statistic value={a || 0} />
  43. },
  44. {
  45. title: '创角人数', dataIndex: 'create_role_count', label: '用户信息', align: 'center', width: 70, default: 7,
  46. render: (a: string) => <Statistic value={a || 0} />
  47. },
  48. {
  49. title: '角色数量', dataIndex: 'role_count', label: '用户信息', align: 'center', width: 70, default: 8,
  50. render: (a: string) => <Statistic value={a || 0} />
  51. },
  52. ]
  53. },
  54. {
  55. label: '付费数据',
  56. data: [
  57. {
  58. title: '总付费人数', dataIndex: 'total_num', label: '付费数据', align: 'center', width: 80, default: 9,
  59. render: (a: string) => <Statistic value={a || 0} />
  60. },
  61. {
  62. title: '总付费金额', dataIndex: 'total_amount', label: '付费数据', align: 'center', width: 85, default: 10,
  63. render: (a: string) => <Statistic value={a || 0} />
  64. },
  65. {
  66. title: '付费ARPPU', dataIndex: 'total_arppu', label: '付费数据', align: 'center', width: 80, default: 11,
  67. render: (a: string) => <Statistic value={a || 0} />
  68. },
  69. {
  70. title: '付费率', dataIndex: 'amount_rate', label: '付费数据', align: 'center', width: 80, default: 12,
  71. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 1 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  72. },
  73. {
  74. title: '今天付费人数', dataIndex: 'ba1_num', label: '付费数据', align: 'center', width: 70, default: 13, className: "redColorClass",
  75. render: (a: string) => <Statistic value={a || 0} />
  76. },
  77. {
  78. title: '今天付费次数', dataIndex: 'ba1_count', label: '付费数据', align: 'center', width: 65, default: 14, className: "redColorClass",
  79. render: (a: string) => <Statistic value={a || 0} />
  80. },
  81. {
  82. title: '今天付费金额', dataIndex: 'ba1', label: '付费数据', align: 'center', width: 75, default: 15, className: "redColorClass",
  83. render: (a: string) => <Statistic value={a || 0} />
  84. },
  85. {
  86. title: '昨天付费人数', dataIndex: 'ba2_num', label: '付费数据', align: 'center', width: 70, default: 16, className: "orangeColorClass",
  87. render: (a: string) => <Statistic value={a || 0} />
  88. },
  89. {
  90. title: '昨天付费次数', dataIndex: 'ba2_count', label: '付费数据', align: 'center', width: 65, default: 17, className: "orangeColorClass",
  91. render: (a: string) => <Statistic value={a || 0} />
  92. },
  93. {
  94. title: '昨天付费金额', dataIndex: 'ba2', label: '付费数据', align: 'center', width: 75, default: 18, className: "orangeColorClass",
  95. render: (a: string) => <Statistic value={a || 0} />
  96. },
  97. {
  98. title: '前天付费人数', dataIndex: 'ba3_num', label: '付费数据', align: 'center', width: 65, default: 19, className: 'volcanoColorClass',
  99. render: (a: string) => <Statistic value={a || 0} />
  100. },
  101. {
  102. title: '前天付费次数', dataIndex: 'ba3_count', label: '付费数据', align: 'center', width: 65, default: 20, className: 'volcanoColorClass',
  103. render: (a: string) => <Statistic value={a || 0} />
  104. },
  105. {
  106. title: '前天付费金额', dataIndex: 'ba3', label: '付费数据', align: 'center', width: 75, default: 21, className: 'volcanoColorClass',
  107. render: (a: string) => <Statistic value={a || 0} />
  108. },
  109. ]
  110. },
  111. {
  112. label: '活跃数据',
  113. data: [
  114. {
  115. title: '今日活跃人数', dataIndex: 'ba1_active_num', label: '活跃数据', align: 'center', width: 65, default: 22,
  116. render: (a: string) => <Statistic value={a || 0} />
  117. },
  118. {
  119. title: '昨天活跃人数', dataIndex: 'ba2_active_num', label: '活跃数据', align: 'center', width: 65, default: 23,
  120. render: (a: string) => <Statistic value={a || 0} />
  121. },
  122. {
  123. title: '前天活跃人数', dataIndex: 'ba3_active_num', label: '活跃数据', align: 'center', width: 65, default: 24,
  124. render: (a: string) => <Statistic value={a || 0} />
  125. },
  126. ]
  127. },
  128. {
  129. label: '角色信息',
  130. data: [
  131. {
  132. title: '充值模板',
  133. dataIndex: 'roleInfo',
  134. label: '角色信息',
  135. align: 'center',
  136. default: 25,
  137. children: [
  138. {
  139. title: '角色排名',
  140. dataIndex: 'rank_num',
  141. key: 'rank_num',
  142. width: 65,
  143. align: 'center',
  144. className: "h5BiomassClass green2ColorClass",
  145. render: (a: any, b: any) => {
  146. return <div className='h5BiomassTable'>
  147. {b?.role_rank_date?.map((item: any, index: number) => {
  148. return <div key={'cc' + index}>
  149. <div><span>{item.rank_num}</span></div>
  150. </div>
  151. })}
  152. </div>
  153. }
  154. },
  155. {
  156. title: '角色名称',
  157. dataIndex: 'role_name',
  158. key: 'role_name',
  159. width: 65,
  160. align: 'center',
  161. className: "h5BiomassClass green2ColorClass",
  162. render: (a: any, b: any) => {
  163. return <div className='h5BiomassTable'>
  164. {b?.role_rank_date?.map((item: any, index: number) => {
  165. return <div key={'cc' + index}>
  166. <div><span><WidthEllipsis value={item.role_name} /></span></div>
  167. </div>
  168. })}
  169. </div>
  170. }
  171. },
  172. {
  173. title: '角色等级',
  174. dataIndex: 'role_level',
  175. key: 'role_level',
  176. width: 65,
  177. align: 'center',
  178. className: "h5BiomassClass green2ColorClass",
  179. render: (a: any, b: any) => {
  180. return <div className='h5BiomassTable'>
  181. {b?.role_rank_date?.map((item: any, index: number) => {
  182. return <div key={'cc' + index}>
  183. <div><span>{item.role_level}</span></div>
  184. </div>
  185. })}
  186. </div>
  187. }
  188. },
  189. {
  190. title: '角色攻击力',
  191. dataIndex: 'combat_num',
  192. key: 'combat_num',
  193. width: 65,
  194. align: 'center',
  195. className: "h5BiomassClass green2ColorClass",
  196. render: (a: any, b: any) => {
  197. return <div className='h5BiomassTable'>
  198. {b?.role_rank_date?.map((item: any, index: number) => {
  199. return <div key={'cc' + index}>
  200. <div><span>{item.combat_num}</span></div>
  201. </div>
  202. })}
  203. </div>
  204. }
  205. },
  206. ]
  207. }
  208. ]
  209. }
  210. // {
  211. // label: '角色信息',
  212. // data: [
  213. // {
  214. // title: '角色排名', dataIndex: 'rank_num', label: '角色信息', align: 'center', width: 55, default: 9,
  215. // render: (a: string) => <Statistic value={a || 0} />
  216. // },
  217. // {
  218. // title: '角色名称', dataIndex: 'role_name', label: '区服信息', align: 'center', width: 80, default: 10,
  219. // render: (a: string, b: any) => (<WidthEllipsis value={a} />)
  220. // },
  221. // {
  222. // title: '角色等级', dataIndex: 'role_level', label: '角色信息', align: 'center', width: 70, default: 11,
  223. // render: (a: string) => <Statistic value={a || 0} />
  224. // },
  225. // {
  226. // title: '角色攻击力', dataIndex: 'combat_num', label: '角色信息', align: 'center', width: 85, default: 12,
  227. // render: (a: string) => <Statistic value={a || 0} />
  228. // },
  229. // ]
  230. // },
  231. ]
  232. return newArr
  233. }
  234. export default columns12