|
@@ -3,46 +3,142 @@ import { Statistic, Tag } from "antd"
|
|
|
import React from "react"
|
|
|
import moment from "moment"
|
|
|
import style from '../../gameDataStatistics/extensionData/everyday/index.less'
|
|
|
-
|
|
|
+import './index.less'
|
|
|
|
|
|
function columns12(): { label: string, fieldSHow?: { label: string, saveField: string, defaultValue: any[], data: any[] }, data: any[] }[] {
|
|
|
|
|
|
|
|
|
let defaultStart = 26
|
|
|
const Dn = Array(90).fill('').map((_item: string, index: number) => {
|
|
|
- let field = `da${index + 1}`
|
|
|
+ let field = `retainedDa${index + 1}`
|
|
|
let data: any = {
|
|
|
title: `D${index + 1}`,
|
|
|
dataIndex: `D${index + 1}`,
|
|
|
label: "游戏区服数据",
|
|
|
- width: 140,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.gsName === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: `用户人数`,
|
|
|
+ dataIndex: field,
|
|
|
+ key: field + 'user',
|
|
|
+ width: 110,
|
|
|
+ className: "adDataBackColorClass",
|
|
|
+ render: (a: any, b: any) => {
|
|
|
+ let date1 = moment()
|
|
|
+ if (b?.gsName === '总计') {
|
|
|
+ if (b?.beginDay) {
|
|
|
+ date1 = moment(b.beginDay)
|
|
|
+ } else {
|
|
|
+ date1 = moment()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ date1 = moment(b.startTime)
|
|
|
+ }
|
|
|
+ let dt = moment()
|
|
|
+ let day = dt.diff(date1, 'day');
|
|
|
+ if (index <= day) {
|
|
|
+ return <div className={style.dbox}>
|
|
|
+ <span style={{ color: '#52c41a', fontWeight: 600 }}>活跃:<span>{a?.activeNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#a0d911', fontWeight: 600 }}>付费:<span>{a?.payNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#1677ff', fontWeight: 600 }}>累计付费:<span>{a?.totalPayNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#0f538a', fontWeight: 600 }}>小R:<span>{a?.sRNum || 0}</span></span>
|
|
|
+ <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>中R:<span>{a?.mRNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#ff5722', fontWeight: 600 }}>大R:<span>{a?.bRNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#d81b60', fontWeight: 600 }}>超R:<span>{a?.superRNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#52c41a', fontWeight: 600 }}>R总:<span>{a?.totalRNum || 0}</span></span>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: `付费金额`,
|
|
|
+ dataIndex: field,
|
|
|
+ key: field + 'Pay',
|
|
|
+ align: "right",
|
|
|
+ width: 75,
|
|
|
+ render: (a: any, b: any) => {
|
|
|
+ let date1 = moment()
|
|
|
+ if (b?.gsName === '总计') {
|
|
|
+ if (b?.beginDay) {
|
|
|
+ date1 = moment(b.beginDay)
|
|
|
+ } else {
|
|
|
+ date1 = moment()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ date1 = moment(b.startTime)
|
|
|
+ }
|
|
|
+ let dt = moment()
|
|
|
+ let day = dt.diff(date1, 'day');
|
|
|
+ if (index <= day) {
|
|
|
+ return <Statistic value={a?.payMoney || 0} />
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
}
|
|
|
- } else {
|
|
|
- date1 = moment(b.serveDayBegin)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- if (index <= day && b?.[field]) {
|
|
|
- let [count1, count2, count3, count4, count5, count6, count7] = b?.[field]?.split('/')
|
|
|
- return <div className={style.dbox}>
|
|
|
- <span style={{ color: '#52c41a', fontWeight: 600 }}>活跃人数:<span>{count1}</span></span>
|
|
|
- <span style={{ color: '#a0d911', fontWeight: 600 }}>付费人数:<span>{count2}</span></span>
|
|
|
- <span style={{ color: '#1677ff', fontWeight: 600 }}>付费累计人数:<span>{count3}</span></span>
|
|
|
- <span style={{ color: '#0f538a', fontWeight: 600 }}>付费金额:<span><Statistic value={count4 || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>
|
|
|
- <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>付费率:<span>{(count5 * 100)?.toFixed(2)}%</span></span>
|
|
|
- <span style={{ color: '#ff5722', fontWeight: 600 }}>活跃留存率:<span>{(count6 * 100)?.toFixed(2)}%</span></span>
|
|
|
- <span style={{ color: '#d81b60', fontWeight: 600 }}>付费留存率:<span>{(count7 * 100)?.toFixed(2)}%</span></span>
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: `用户占比`,
|
|
|
+ dataIndex: field,
|
|
|
+ key: field + 'Rate',
|
|
|
+ width: 140,
|
|
|
+ className: 'payDataBackColorClass',
|
|
|
+ render: (a: any, b: any) => {
|
|
|
+ let date1 = moment()
|
|
|
+ if (b?.gsName === '总计') {
|
|
|
+ if (b?.beginDay) {
|
|
|
+ date1 = moment(b.beginDay)
|
|
|
+ } else {
|
|
|
+ date1 = moment()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ date1 = moment(b.startTime)
|
|
|
+ }
|
|
|
+ let dt = moment()
|
|
|
+ let day = dt.diff(date1, 'day');
|
|
|
+ if (index <= day) {
|
|
|
+ return <div className={style.dbox}>
|
|
|
+ <span style={{ color: '#d81b60', fontWeight: 600 }}>付费率:<span>{((a?.payRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#ff5722', fontWeight: 600 }}>小R付费比:<span>{a?.sRRate || '0.0'}</span></span>
|
|
|
+ <span style={{ color: '#0f538a', fontWeight: 600 }}>中R付费比:<span>{a?.mRRate || '0.0'}</span></span>
|
|
|
+ <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>大R付费比:<span>{a?.bRRate || '0.0'}</span></span>
|
|
|
+ <span style={{ color: '#52c41a', fontWeight: 600 }}>超R付费比:<span>{a?.superRRate || '0.0'}</span></span>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: `留存率`,
|
|
|
+ dataIndex: field,
|
|
|
+ key: field + 'Ret',
|
|
|
+ width: 100,
|
|
|
+ render: (a: any, b: any) => {
|
|
|
+ let date1 = moment()
|
|
|
+ if (b?.gsName === '总计') {
|
|
|
+ if (b?.beginDay) {
|
|
|
+ date1 = moment(b.beginDay)
|
|
|
+ } else {
|
|
|
+ date1 = moment()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ date1 = moment(b.startTime)
|
|
|
+ }
|
|
|
+ let dt = moment()
|
|
|
+ let day = dt.diff(date1, 'day');
|
|
|
+ if (index <= day) {
|
|
|
+ return <div className={style.dbox}>
|
|
|
+ <span style={{ color: '#1677ff', fontWeight: 600 }}>活跃:<span>{((a?.activeRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#0f538a', fontWeight: 600 }}>付费:<span>{((a?.payRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#d81b60', fontWeight: 600 }}>小R:<span>{((a?.sRRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#a0d911', fontWeight: 600 }}>中R:<span>{((a?.mRRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#52c41a', fontWeight: 600 }}>大R:<span>{((a?.bRRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>超R:<span>{((a?.superRRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#ff5722', fontWeight: 600 }}>R总:<span>{((a?.totalRRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ]
|
|
|
}
|
|
|
data['default'] = defaultStart + index
|
|
|
return data
|
|
@@ -180,25 +276,89 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
|
...Dn,
|
|
|
{
|
|
|
title: `D总`,
|
|
|
- dataIndex: `total`,
|
|
|
+ dataIndex: `retainedTotal`,
|
|
|
label: "游戏区服数据",
|
|
|
- width: 140,
|
|
|
default: 116,
|
|
|
- render: (a: string) => {
|
|
|
- if (a) {
|
|
|
- let [count1, count2, count3, count4, count5, count6, count7] = a?.split('/')
|
|
|
- return <div className={style.dbox}>
|
|
|
- <span style={{ color: '#52c41a', fontWeight: 600 }}>活跃人数:<span>{count1}</span></span>
|
|
|
- <span style={{ color: '#a0d911', fontWeight: 600 }}>付费人数:<span>{count2}</span></span>
|
|
|
- <span style={{ color: '#1677ff', fontWeight: 600 }}>付费累计人数:<span>{count3}</span></span>
|
|
|
- <span style={{ color: '#0f538a', fontWeight: 600 }}>付费金额:<span><Statistic value={count4 || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>
|
|
|
- <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>付费率:<span>{(Number(count5) * 100)?.toFixed(2)}%</span></span>
|
|
|
- <span style={{ color: '#ff5722', fontWeight: 600 }}>活跃留存率:<span>{(Number(count6) * 100)?.toFixed(2)}%</span></span>
|
|
|
- <span style={{ color: '#d81b60', fontWeight: 600 }}>付费留存率:<span>{(Number(count7) * 100)?.toFixed(2)}%</span></span>
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: `用户人数`,
|
|
|
+ dataIndex: 'retainedTotal',
|
|
|
+ key: 'retainedTotaluser',
|
|
|
+ width: 110,
|
|
|
+ fixed: "right",
|
|
|
+ className: "adDataBackColorClass",
|
|
|
+ render: (a: any, b: any) => {
|
|
|
+ if (a) {
|
|
|
+ return <div className={style.dbox}>
|
|
|
+ <span style={{ color: '#52c41a', fontWeight: 600 }}>活跃:<span>{a?.activeNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#a0d911', fontWeight: 600 }}>付费:<span>{a?.payNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#1677ff', fontWeight: 600 }}>累计付费:<span>{a?.totalPayNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#0f538a', fontWeight: 600 }}>小R:<span>{a?.sRNum || 0}</span></span>
|
|
|
+ <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>中R:<span>{a?.mRNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#ff5722', fontWeight: 600 }}>大R:<span>{a?.bRNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#d81b60', fontWeight: 600 }}>超R:<span>{a?.superRNum || 0}</span></span>
|
|
|
+ <span style={{ color: '#52c41a', fontWeight: 600 }}>R总:<span>{a?.totalRNum || 0}</span></span>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: `付费金额`,
|
|
|
+ dataIndex: 'retainedTotal',
|
|
|
+ key: 'retainedTotalPay',
|
|
|
+ align: "right",
|
|
|
+ width: 80,
|
|
|
+ fixed: "right",
|
|
|
+ render: (a: any, b: any) => {
|
|
|
+ if (a) {
|
|
|
+ return <Statistic value={a?.payMoney || 0} />
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: `用户占比`,
|
|
|
+ dataIndex: 'retainedTotal',
|
|
|
+ key: 'retainedTotalRate',
|
|
|
+ width: 140,
|
|
|
+ fixed: "right",
|
|
|
+ className: 'payDataBackColorClass',
|
|
|
+ render: (a: any) => {
|
|
|
+ if (a) {
|
|
|
+ return <div className={style.dbox}>
|
|
|
+ <span style={{ color: '#d81b60', fontWeight: 600 }}>付费率:<span>{((a?.payRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#ff5722', fontWeight: 600 }}>小R付费比:<span>{a?.sRRate || '0.0'}</span></span>
|
|
|
+ <span style={{ color: '#0f538a', fontWeight: 600 }}>中R付费比:<span>{a?.mRRate || '0.0'}</span></span>
|
|
|
+ <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>大R付费比:<span>{a?.bRRate || '0.0'}</span></span>
|
|
|
+ <span style={{ color: '#52c41a', fontWeight: 600 }}>超R付费比:<span>{a?.superRRate || '0.0'}</span></span>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: `留存率`,
|
|
|
+ dataIndex: 'retainedTotal',
|
|
|
+ key: 'retainedTotalRet',
|
|
|
+ width: 100,
|
|
|
+ fixed: "right",
|
|
|
+ render: (a: any) => {
|
|
|
+ if (a) {
|
|
|
+ return <div className={style.dbox}>
|
|
|
+ <span style={{ color: '#1677ff', fontWeight: 600 }}>活跃:<span>{((a?.activeRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#0f538a', fontWeight: 600 }}>付费:<span>{((a?.payRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#d81b60', fontWeight: 600 }}>小R:<span>{((a?.sRRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#a0d911', fontWeight: 600 }}>中R:<span>{((a?.mRRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#52c41a', fontWeight: 600 }}>大R:<span>{((a?.bRRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>超R:<span>{((a?.superRRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ <span style={{ color: '#ff5722', fontWeight: 600 }}>R总:<span>{((a?.totalRRetainedRate || 0) * 100)?.toFixed(2)}%</span></span>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ return '--'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ]
|
|
|
}
|
|
|
]
|
|
|
}
|