tableConfig.tsx 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. import WidthEllipsis from "@/components/WidthEllipsis";
  2. import { Statistic } from "antd";
  3. function columns12(): NOVEL_DATA_API.ColumnsProps[] {
  4. return [
  5. {
  6. label: '基本信息',
  7. data: [
  8. {
  9. title: '投手', dataIndex: 'pitcher', label: '基本信息', align: 'center', width: 60, default: 1,
  10. render: (a: string) => (<WidthEllipsis value={a} />)
  11. },
  12. {
  13. title: '最早消耗时间', dataIndex: 'start_date', label: '基本信息', align: 'center', width: 90, default: 2,
  14. render: (a: string) => (<WidthEllipsis value={a} />)
  15. },
  16. {
  17. title: '最晚消耗时间', dataIndex: 'end_date', label: '基本信息', align: 'center', width: 90, default: 3,
  18. render: (a: string) => (<WidthEllipsis value={a} />)
  19. },
  20. {
  21. title: '消耗', dataIndex: 'cost', label: '基本信息', align: 'right', width: 110, sorter: true, default: 4,
  22. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  23. },
  24. {
  25. title: '注册用户充值', dataIndex: 'amount', label: '基本信息', align: 'right', width: 120, sorter: true, default: 5,
  26. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  27. },
  28. {
  29. title: '首日充值', dataIndex: 'first_amount', label: '基本信息', align: 'right', width: 110, sorter: true, default: 6,
  30. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  31. },
  32. {
  33. title: '回收率', dataIndex: 'roi', label: '基本信息', align: 'center', width: 90, default: 7, sorter: true,
  34. render: (a: number) => <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={a <= 0.08 ? { color: '#0f990f', fontWeight: 600 } : a >= 1 ? { color: 'red', fontWeight: 600 } : {}} suffix="%" />
  35. },
  36. {
  37. title: '首日回收率', dataIndex: 'first_roi', label: '基本信息', align: 'center', width: 75, default: 8, sorter: true,
  38. render: (a: number) => <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={a <= 0.08 ? { color: '#0f990f', fontWeight: 600 } : a >= 1 ? { color: 'red', fontWeight: 600 } : {}} suffix="%" />
  39. },
  40. {
  41. title: '七日回收率', dataIndex: 'roi7', label: '基本信息', align: 'center', width: 90, default: 9, sorter: true,
  42. render: (a: number) => <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={a <= 0.08 ? { color: '#0f990f', fontWeight: 600 } : a >= 1 ? { color: 'red', fontWeight: 600 } : {}} suffix="%" />
  43. },
  44. {
  45. title: '30日回收率', dataIndex: 'roi30', label: '基本信息', align: 'center', width: 90, default: 10, sorter: true,
  46. render: (a: number) => <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={a <= 0.08 ? { color: '#0f990f', fontWeight: 600 } : a >= 1 ? { color: 'red', fontWeight: 600 } : {}} suffix="%" />
  47. },
  48. {
  49. title: '毛利额', dataIndex: 'profit', label: '基本信息', align: 'right', width: 110, sorter: true, default: 11,
  50. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  51. },
  52. {
  53. title: '点击率', dataIndex: 'click_rate', label: '基本信息', align: 'center', width: 80, default: 12, sorter: true,
  54. render: (a: number) => <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={a <= 0.08 ? { color: '#0f990f', fontWeight: 600 } : a >= 1 ? { color: 'red', fontWeight: 600 } : {}} suffix="%" />
  55. },
  56. {
  57. title: '关注率', dataIndex: 'follow_rate', label: '基本信息', align: 'center', width: 80, default: 13, sorter: true,
  58. render: (a: number) => <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={a <= 0.08 ? { color: '#0f990f', fontWeight: 600 } : a >= 1 ? { color: 'red', fontWeight: 600 } : {}} suffix="%" />
  59. },
  60. {
  61. title: '下单率', dataIndex: 'order_rate', label: '基本信息', align: 'center', width: 80, default: 14, sorter: true,
  62. render: (a: number) => <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={a <= 0.08 ? { color: '#0f990f', fontWeight: 600 } : a >= 1 ? { color: 'red', fontWeight: 600 } : {}} suffix="%" />
  63. },
  64. {
  65. title: '首日下单率', dataIndex: 'first_order_rate', label: '基本信息', align: 'center', width: 85, default: 15, sorter: true,
  66. render: (a: number) => <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={a <= 0.08 ? { color: '#0f990f', fontWeight: 600 } : a >= 1 ? { color: 'red', fontWeight: 600 } : {}} suffix="%" />
  67. },
  68. {
  69. title: '曝光量', dataIndex: 'view_count', label: '基本信息', align: 'center', width: 110, sorter: true, default: 16,
  70. render: (a: number) => (<Statistic value={a || 0} />)
  71. },
  72. {
  73. title: '点击量', dataIndex: 'click_count', label: '基本信息', align: 'center', width: 105, sorter: true, default: 17,
  74. render: (a: number) => (<Statistic value={a || 0} />)
  75. },
  76. {
  77. title: '关注人数', dataIndex: 'follow_user', label: '基本信息', align: 'center', width: 85, sorter: true, default: 18,
  78. render: (a: number) => (<Statistic value={a || 0} />)
  79. },
  80. {
  81. title: '充值人数', dataIndex: 'order_user', label: '基本信息', align: 'center', width: 85, sorter: true, default: 19,
  82. render: (a: number) => (<Statistic value={a || 0} />)
  83. },
  84. {
  85. title: '首日充值人数', dataIndex: 'first_order_user', label: '基本信息', align: 'center', width: 80, sorter: true, default: 20,
  86. render: (a: number) => (<Statistic value={a || 0} />)
  87. },
  88. {
  89. title: '关注成本', dataIndex: 'follow_cost', label: '基本信息', align: 'right', width: 85, sorter: true, default: 21,
  90. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  91. },
  92. {
  93. title: '充值成本', dataIndex: 'order_cost', label: '基本信息', align: 'right', width: 80, sorter: true, default: 22,
  94. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  95. },
  96. {
  97. title: '首日充值成本', dataIndex: 'first_order_cost', label: '基本信息', align: 'right', width: 80, sorter: true, default: 23,
  98. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  99. },
  100. {
  101. title: '客单价', dataIndex: 'avg_amount', label: '基本信息', align: 'right', width: 70, sorter: true, default: 24,
  102. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  103. },
  104. {
  105. title: '今日充值', dataIndex: 'td_amount', label: '基本信息', align: 'right', width: 90, sorter: true, default: 25,
  106. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  107. },
  108. {
  109. title: '昨日充值', dataIndex: 'yd_amount', label: '基本信息', align: 'right', width: 90, sorter: true, default: 26,
  110. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  111. },
  112. {
  113. title: '前日充值', dataIndex: 'byd_amount', label: '基本信息', align: 'right', width: 90, sorter: true, default: 27,
  114. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  115. },
  116. {
  117. title: '真实累计充值', dataIndex: 'reg_user_coefficient_amount', label: '基本信息', align: 'right', width: 120, sorter: true, default: 28,
  118. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  119. },
  120. {
  121. title: '真实首日充值', dataIndex: 'first_user_coefficient_amount', label: '基本信息', align: 'right', width: 120, sorter: true, default: 29,
  122. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  123. },
  124. {
  125. title: '真实累计回本率', dataIndex: 'total_reg_user_coefficient_roi', label: '基本信息', align: 'center', width: 90, sorter: true, default: 30,
  126. render: (a: number) => <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  127. },
  128. {
  129. title: '真实首日回本率', dataIndex: 'total_first_user_coefficient_roi', label: '基本信息', align: 'center', width: 80, sorter: true, default: 31,
  130. render: (a: number) => <Statistic value={a ? (a * 100) : 0} precision={2} valueStyle={!a ? {} : a >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
  131. },
  132. {
  133. title: '书城粉丝数', dataIndex: 'platform_new_user_count', label: '基本信息', align: 'center', width: 70, sorter: true, default: 32,
  134. render: (a: number) => (<Statistic value={a || 0} />)
  135. },
  136. {
  137. title: '书城粉丝关注成本', dataIndex: 'platform_new_user_cost', label: '基本信息', align: 'right', width: 90, sorter: true, default: 33,
  138. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  139. },
  140. {
  141. title: '加企业微信客服人数', dataIndex: 'scan_follow_user_count', label: '基本信息', align: 'center', width: 95, sorter: true, default: 34,
  142. render: (a: number) => (<Statistic value={a || 0} />)
  143. },
  144. {
  145. title: '加企业微信客服成本', dataIndex: 'scan_follow_user_cost', label: '基本信息', align: 'right', width: 95, sorter: true, default: 35,
  146. render: (a: number) => (<Statistic value={a || 0} precision={2} />)
  147. },
  148. ]
  149. }
  150. ]
  151. }
  152. export default columns12