tableConfig.tsx 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. import WidthEllipsis from "@/components/widthEllipsis"
  2. import { Badge, Progress, Statistic } from "antd"
  3. import React from "react"
  4. import { PRODUCT_TYPE_ENUM } from "../../const"
  5. function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
  6. return [
  7. {
  8. label: '基本信息',
  9. data: [
  10. {
  11. title: '投手', dataIndex: 'pitcher', label: '基本信息', align: 'center', width: 120, default: 1,
  12. render: (a: string) => (<WidthEllipsis value={a} />)
  13. },
  14. {
  15. title: '业务类型', dataIndex: 'productType', label: '基本信息', align: 'center', width: 80, default: 2,
  16. render: (a: string) => (<WidthEllipsis value={PRODUCT_TYPE_ENUM[a as keyof typeof PRODUCT_TYPE_ENUM]} />)
  17. },
  18. {
  19. title: '应用名称', dataIndex: 'appName', label: '基本信息', align: 'center', width: 80, default: 3,
  20. render: (a: string) => (<WidthEllipsis value={a} />)
  21. },
  22. {
  23. title: '应用ID', dataIndex: 'appId', label: '基本信息', align: 'center', width: 80,
  24. render: (a: string) => (<WidthEllipsis value={a} />)
  25. },
  26. {
  27. title: '小程序ID', dataIndex: 'mpId', label: '基本信息', align: 'center', width: 80, default: 4,
  28. render: (a: string) => (<WidthEllipsis value={a} />)
  29. },
  30. {
  31. title: '消耗时间', dataIndex: 'dt', label: '基本信息', align: 'center', width: 80, default: 5,
  32. render: (a: string) => (<WidthEllipsis value={a} />)
  33. },
  34. {
  35. title: '总消耗', dataIndex: 'cost', label: '基本信息', align: 'center', width: 90, default: 6, sorter: true,
  36. className: 'padding_0',
  37. render: (a: number) => <div style={{ height: 26, position: 'relative' }}>
  38. <Progress
  39. strokeColor={{
  40. from: '#10c1e9',
  41. to: '#6892d0',
  42. }}
  43. status="active"
  44. showInfo={false}
  45. percent={a ? a / 20000 * 100 : 0}
  46. />
  47. <span style={{ position: 'absolute', left: '50%', top: '50%', width: '100%', padding: '0 5px', transform: 'translate(-50%, -50%)' }}><Statistic style={{ fontWeight: 'bold' }} value={a || 0} precision={2} valueStyle={a >= 20000 ? { color: '#000', fontWeight: 'bold' } : { fontWeight: 'bold' }} /></span>
  48. </div>
  49. },
  50. {
  51. title: '消耗', dataIndex: 'costToday', label: '基本信息', align: 'center', width: 85, default: 7, sorter: true,
  52. className: 'padding_0',
  53. render: (a: number) => <div style={{ height: 26, position: 'relative' }}>
  54. <Progress
  55. strokeColor={{
  56. from: '#ff5900',
  57. to: '#ffd380',
  58. }}
  59. status="active"
  60. showInfo={false}
  61. percent={a ? a / 20000 * 100 : 0}
  62. />
  63. <span style={{ position: 'absolute', left: '50%', top: '50%', width: '100%', padding: '0 5px', transform: 'translate(-50%, -50%)' }}><Statistic value={a || 0} precision={2} valueStyle={a >= 20000 ? { color: '#000', fontWeight: 'bold' } : { fontWeight: 'bold' }} /></span>
  64. </div>
  65. },
  66. {
  67. title: '赔付金', dataIndex: 'payout', label: '基本信息', align: 'center', width: 80, default: 8, sorter: true,
  68. render: (a: string) => <Statistic value={a || 0} precision={2} />
  69. },
  70. {
  71. title: '推广广告账号数量', tips: '消耗大于0', dataIndex: 'accountCount', label: '基本信息', align: 'center', width: 80, default: 9, sorter: true,
  72. render: (a: string) => <Statistic value={a || 0} />
  73. },
  74. {
  75. title: '推广广告数量', tips: '消耗大于0', dataIndex: 'adCount', label: '基本信息', align: 'center', width: 80, default: 10, sorter: true,
  76. render: (a: string) => <Statistic value={a || 0} />
  77. },
  78. ]
  79. },
  80. {
  81. label: '基础数据',
  82. data: [
  83. {
  84. title: '点击量', dataIndex: 'validClickCount', label: '基础数据', align: 'center', width: 80, default: 11, sorter: true,
  85. render: (a: number) => <Statistic value={a || 0} />
  86. },
  87. {
  88. title: '曝光量', dataIndex: 'viewCount', label: '基础数据', align: 'center', width: 80, default: 12, sorter: true,
  89. render: (a: number) => <Statistic value={a || 0} />
  90. },
  91. {
  92. title: '千次曝光成本', dataIndex: 'thousandDisplayPrice', label: '基础数据', align: 'center', width: 80, default: 13, sorter: true,
  93. render: (a: number) => <Statistic value={a || 0} precision={2} />
  94. },
  95. {
  96. title: '点击均价', dataIndex: 'cpc', label: '基础数据', align: 'center', width: 80, default: 14, sorter: true,
  97. render: (a: number) => <Statistic value={a || 0} precision={2} />
  98. },
  99. {
  100. title: '小游戏注册人数', dataIndex: 'miniGameRegisterUsers', label: '基础数据', align: 'center', width: 80, default: 15, sorter: true,
  101. render: (a: number) => <Statistic value={a || 0} />
  102. },
  103. {
  104. title: '小游戏注册成本', dataIndex: 'miniGameRegisterCost', label: '基础数据', align: 'center', width: 80, default: 16, sorter: true,
  105. render: (a: number) => <Statistic value={a || 0} precision={2} />
  106. },
  107. {
  108. title: '小游戏注册率', dataIndex: 'miniGameRegisterRate', label: '基础数据', align: 'center', width: 80, default: 17, sorter: true,
  109. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  110. },
  111. ]
  112. },
  113. {
  114. label: 'D1数据',
  115. data: [
  116. {
  117. title: '小游戏注册首日广告变现人数(平台上报)', dataIndex: 'miniGameFirstDayAdMonetizationUsers', label: 'D1数据', align: 'center', width: 100, default: 18, sorter: true,
  118. render: (a: number) => <Statistic value={a || 0} />
  119. },
  120. {
  121. title: '激活首日广告变现人数(平台上报)', dataIndex: 'adMonetizationPlaDedupActive1dPv', label: 'D1数据', align: 'center', width: 90, default: 19, sorter: true,
  122. render: (a: number) => <Statistic value={a || 0} />
  123. },
  124. {
  125. title: '激活首日广告变现次数(平台上报)', dataIndex: 'incomePv1dPla', label: 'D1数据', align: 'center', width: 90, default: 20, sorter: true,
  126. render: (a: number) => <Statistic value={a || 0} />
  127. },
  128. {
  129. title: '注册首日广告变现金额(平台上报)', dataIndex: 'miniGameFirstDayAdMonetizationAmount', label: 'D1数据', align: 'center', width: 90, default: 21, sorter: true,
  130. render: (a: number) => <Statistic value={a || 0} precision={2} />
  131. },
  132. {
  133. title: '首日变现ARPPU', dataIndex: 'miniGameFirstDayAdPayingArppu', label: 'D1数据', align: 'center', width: 80, default: 22, sorter: true,
  134. render: (a: number) => <Statistic value={a || 0} precision={2} />
  135. },
  136. {
  137. title: '首日变现ARPU', dataIndex: 'miniGameFirstDayAdPayingArpu', label: 'D1数据', align: 'center', width: 80, default: 23, sorter: true,
  138. render: (a: number) => <Statistic value={a || 0} precision={2} />
  139. },
  140. {
  141. title: '首日广告变现成本(平台上报)', dataIndex: 'miniGameFirstDayAdPayingCost', label: 'D1数据', align: 'center', width: 80, default: 24, sorter: true,
  142. render: (a: number) => <Statistic value={a || 0} precision={2} />
  143. },
  144. {
  145. title: '首日ROI', dataIndex: 'miniGameFirstDayAdPayingRoi', label: 'D1数据', align: 'center', width: 80, default: 25, sorter: true,
  146. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  147. },
  148. ]
  149. },
  150. {
  151. label: '24小时数据',
  152. data: [
  153. {
  154. title: '激活首24小时广告变现人数(平台上报)', dataIndex: 'adPayingUsers24hPla', label: '24小时数据', align: 'center', width: 90, default: 26, sorter: true,
  155. render: (a: number) => <Statistic value={a || 0} />
  156. },
  157. {
  158. title: '激活首24小时广告变现次数(平台上报)', dataIndex: 'incomePv24hPla', label: '24小时数据', align: 'center', width: 90, default: 27, sorter: true,
  159. render: (a: number) => <Statistic value={a || 0} />
  160. },
  161. {
  162. title: '激活首24小时广告变现金额(平台上报)', dataIndex: 'incomeVal24hPla', label: '24小时数据', align: 'center', width: 90, default: 28, sorter: true,
  163. render: (a: number) => <Statistic value={a || 0} precision={2} />
  164. },
  165. {
  166. title: '激活首24小时广告变现ARPPU(平台上报)', dataIndex: 'firstDayAdPurArppuCost24hPla', label: '24小时数据', align: 'center', width: 100, default: 29, sorter: true,
  167. render: (a: number) => <Statistic value={a || 0} precision={2} />
  168. },
  169. {
  170. title: '24小时广告变现ARPU(平台上报)', dataIndex: 'firstDayAdPurArpuCost24hPla', label: '24小时数据', align: 'center', width: 90, default: 30, sorter: true,
  171. render: (a: number) => <Statistic value={a || 0} precision={2} />
  172. },
  173. {
  174. title: '24小时广告变现成本', dataIndex: 'firstDayAdPurArpuCost24hPlaCost', label: '24小时数据', align: 'center', width: 80, default: 31, sorter: true,
  175. render: (a: number) => <Statistic value={a || 0} precision={2} />
  176. },
  177. {
  178. title: '24小时广告变现ROI', dataIndex: 'firstDayAdPurArpuCost24hPlaRoi', label: '24小时数据', align: 'center', width: 80, default: 32, sorter: true,
  179. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  180. },
  181. ]
  182. },
  183. {
  184. label: 'D3数据',
  185. data: [
  186. {
  187. title: '小游戏注册3日广告变现人数(平台上报)', dataIndex: 'minigame3dIncomeUv', label: 'D3数据', align: 'center', width: 90, sorter: true,
  188. render: (a: number) => <Statistic value={a || 0} />
  189. },
  190. {
  191. title: '激活3日广告变现人数(平台上报)', dataIndex: 'regUserTotal', label: 'D3数据', align: 'center', width: 90, sorter: true,
  192. render: (a: number) => <Statistic value={a || 0} />
  193. },
  194. {
  195. title: '小游戏注册3日广告变现次数(平台上报)', dataIndex: 'minigame3dIncomeCount', label: 'D3数据', align: 'center', width: 90, sorter: true,
  196. render: (a: number) => <Statistic value={a || 0} />
  197. },
  198. {
  199. title: '激活3日广告变现次数(平台上报)', dataIndex: 'adMonetizationPlaDedupActive3dPv', label: 'D3数据', align: 'center', width: 90, sorter: true,
  200. render: (a: number) => <Statistic value={a || 0} />
  201. },
  202. {
  203. title: '小游戏注册3日广告变现金额(平台上报)', dataIndex: 'miniGameAdMonetizationAmountD3', label: 'D3数据', align: 'center', width: 90, sorter: true,
  204. render: (a: number) => <Statistic value={a || 0} precision={2} />
  205. },
  206. {
  207. title: '3日广告变现ARPPU(平台上报)', dataIndex: 'adPurArppuDay3Cost', label: 'D3数据', align: 'center', width: 90, sorter: true,
  208. render: (a: number) => <Statistic value={a || 0} precision={2} />
  209. },
  210. {
  211. title: '3日广告变现ARPU(平台上报)', dataIndex: 'adPurArpuDay3Cost', label: 'D3数据', align: 'center', width: 80, sorter: true,
  212. render: (a: number) => <Statistic value={a || 0} precision={2} />
  213. },
  214. {
  215. title: '3日广告变现成本(平台上报)', dataIndex: 'adPurDay3Cost', label: 'D3数据', align: 'center', width: 80, sorter: true,
  216. render: (a: number) => <Statistic value={a || 0} precision={2} />
  217. },
  218. {
  219. title: '3日广告变现ROI', dataIndex: 'adPurDay3Roi', label: 'D3数据', align: 'center', width: 80, sorter: true,
  220. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  221. },
  222. ]
  223. },
  224. {
  225. label: 'D7数据',
  226. data: [
  227. {
  228. title: '小游戏注册7日广告变现人数(平台上报)', dataIndex: 'minigame7dIncomeUv', label: 'D7数据', align: 'center', width: 90, sorter: true,
  229. render: (a: number) => <Statistic value={a || 0} />
  230. },
  231. {
  232. title: '激活7日变现人数(平台上报)', dataIndex: 'adMonetizationPlaDedupActive7dPv', label: 'D7数据', align: 'center', width: 80, sorter: true,
  233. render: (a: number) => <Statistic value={a || 0} />
  234. },
  235. {
  236. title: '激活7日广告变现次数(平台上报)', dataIndex: 'minigame7dIncomeCount', label: 'D7数据', align: 'center', width: 80, sorter: true,
  237. render: (a: number) => <Statistic value={a || 0} />
  238. },
  239. {
  240. title: '小游戏注册7日广告变现金额(平台上报)', dataIndex: 'miniGameRegD7Amount', label: 'D7数据', align: 'center', width: 90, sorter: true,
  241. render: (a: number) => <Statistic value={a || 0} precision={2} />
  242. },
  243. {
  244. title: '7日广告变现ARPPU(平台上报)', dataIndex: 'miniGameRegD7Arppu', label: 'D7数据', align: 'center', width: 80, sorter: true,
  245. render: (a: number) => <Statistic value={a || 0} precision={2} />
  246. },
  247. {
  248. title: '7日广告变现ARPU(平台上报)', dataIndex: 'miniGameRegD7Arpu', label: 'D7数据', align: 'center', width: 80, sorter: true,
  249. render: (a: number) => <Statistic value={a || 0} precision={2} />
  250. },
  251. {
  252. title: '7日广告变现成本(平台上报)', dataIndex: 'miniGameRegD7Cost', label: 'D7数据', align: 'center', width: 80, sorter: true,
  253. render: (a: number) => <Statistic value={a || 0} precision={2} />
  254. },
  255. {
  256. title: '7日广告变现ROI', dataIndex: 'miniGameRegD7Roi', label: 'D7数据', align: 'center', width: 80, sorter: true,
  257. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  258. }
  259. ]
  260. },
  261. {
  262. label: 'D总数据',
  263. data: [
  264. {
  265. title: '广告变现人数(平台上报)', dataIndex: 'miniGameAdMonetizationUsers', label: 'D总数据', align: 'center', width: 80, default: 33, sorter: true,
  266. render: (a: number) => <Statistic value={a || 0} />
  267. },
  268. {
  269. title: '广告变现次数(平台上报)', dataIndex: 'incomePvPla', label: 'D总数据', align: 'center', width: 80, default: 34, sorter: true,
  270. render: (a: number) => <Statistic value={a || 0} />
  271. },
  272. {
  273. title: '广告变现金额(平台上报)', dataIndex: 'miniGameAdMonetizationAmount', label: 'D总数据', align: 'center', width: 80, default: 35, sorter: true,
  274. render: (a: number) => <Statistic value={a || 0} precision={2} />
  275. },
  276. {
  277. title: '广告变现ARPPU(平台上报)', dataIndex: 'miniGameAdMonetizationArppu', label: 'D总数据', align: 'center', width: 80, default: 36, sorter: true,
  278. render: (a: number) => <Statistic value={a || 0} precision={2} />
  279. },
  280. {
  281. title: '广告变现ARPU(平台上报)', dataIndex: 'miniGameAdMonetizationArpu', label: 'D总数据', align: 'center', width: 80, default: 37, sorter: true,
  282. render: (a: number) => <Statistic value={a || 0} precision={2} />
  283. },
  284. {
  285. title: '广告变现成本(平台上报)', dataIndex: 'miniGameAdMonetizationCost', label: 'D总数据', align: 'center', width: 80, default: 38, sorter: true,
  286. render: (a: number) => <Statistic value={a || 0} precision={2} />
  287. },
  288. {
  289. title: '广告变现总ROI', dataIndex: 'miniGameAdMonetizationRoi', label: 'D总数据', align: 'center', width: 80, default: 39, sorter: true,
  290. render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  291. },
  292. ]
  293. }
  294. ]
  295. }
  296. export default columns12