|
@@ -48,46 +48,6 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
|
return data
|
|
|
})
|
|
|
|
|
|
- let defaultStartM = 116
|
|
|
- const Mn = Array(9).fill('').map((_item: string, index: number) => {
|
|
|
- let field = `m${index + 4}`
|
|
|
- let data: any = {
|
|
|
- title: `M${index + 4}`,
|
|
|
- dataIndex: `M${index + 4}`,
|
|
|
- label: "游戏区服数据",
|
|
|
- width: 140,
|
|
|
- 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.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 '--'
|
|
|
- },
|
|
|
- }
|
|
|
- data['default'] = defaultStartM + index
|
|
|
- return data
|
|
|
- })
|
|
|
-
|
|
|
return [
|
|
|
{
|
|
|
label: '基本信息',
|
|
@@ -218,7 +178,28 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
|
render: (a: number) => <Statistic value={a ? a * 100 : 0} precision={2} valueStyle={!a ? {} : a >= 50 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" />
|
|
|
},
|
|
|
...Dn,
|
|
|
- ...Mn
|
|
|
+ {
|
|
|
+ title: `D总`,
|
|
|
+ dataIndex: `total`,
|
|
|
+ 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 '--'
|
|
|
+ },
|
|
|
+ }
|
|
|
]
|
|
|
}
|
|
|
]
|