|
@@ -31,7 +31,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
|
}
|
|
|
|
|
|
let defaultStart = 13
|
|
|
- const day = Array(30).fill('').map((_item: string, index: number) => {
|
|
|
+ const day = Array(90).fill('').map((_item: string, index: number) => {
|
|
|
let field = `da${index + 1}Trend`
|
|
|
let data = {
|
|
|
title: `D${index + 1}`,
|
|
@@ -124,8 +124,8 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
|
return data
|
|
|
})
|
|
|
|
|
|
- let defaultStartM = 43
|
|
|
- let month = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map((item, index) => {
|
|
|
+ let defaultStartM = 103
|
|
|
+ let month = [4, 5, 6, 7, 8, 9, 10, 11, 12].map((item, index) => {
|
|
|
let field = `m${item}Trend`
|
|
|
let data = {
|
|
|
title: `M${item}`,
|
|
@@ -216,99 +216,12 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
|
return data
|
|
|
})
|
|
|
|
|
|
- month.push({
|
|
|
- title: `Y1`,
|
|
|
- dataIndex: 'y1Trend',
|
|
|
- label: "D1~Dn",
|
|
|
- default: 53,
|
|
|
- children: [{
|
|
|
- title: `新创角`,
|
|
|
- dataIndex: 'y1Trend',
|
|
|
- align: "center",
|
|
|
- width: 140,
|
|
|
- key: 'newCreate',
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.gameName === '总计') {
|
|
|
- if (b?.dt) {
|
|
|
- date1 = moment(b?.dt)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.dt)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 360 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case 'D1~Dn':
|
|
|
- if (b?.['y1Trend']) {
|
|
|
- data = b?.['y1Trend']
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('regNum') && <span style={{ color: '#2f54eb', fontWeight: 600 }}>新用户人数:<span>{data?.regNum}</span></span>}
|
|
|
- {keyS?.includes('roleNum') && <span style={{ color: '#722ed1', fontWeight: 600 }}>创角人数:<span>{data?.roleNum}</span></span>}
|
|
|
- {keyS?.includes('activeNum') && <span style={{ color: '#eb2f96', fontWeight: 600 }}>活跃人数:<span>{data?.activeNum}</span></span>}
|
|
|
- {keyS?.includes('amountNum') && <span style={{ color: '#d81b60', fontWeight: 600 }}>付费人数:<span>{data?.amountNum}</span></span>}
|
|
|
- {keyS?.includes('amount') && <span style={{ color: '#0f538a', fontWeight: 600 }}>付费金额:<span><Statistic value={data?.amount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }, {
|
|
|
- title: `滚服`,
|
|
|
- dataIndex: 'y1Trend',
|
|
|
- align: "center",
|
|
|
- width: 150,
|
|
|
- key: 'gf',
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.gameName === '总计') {
|
|
|
- if (b?.dt) {
|
|
|
- date1 = moment(b?.dt)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.dt)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 360 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case 'D1~Dn':
|
|
|
- if (b?.['y1Trend']) {
|
|
|
- data = b?.['y1Trend']
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rollServerNum') && <span style={{ color: '#13c2c2', fontWeight: 600 }}>滚服人数:<span>{data?.rollServerNum}</span></span>}
|
|
|
- {keyS?.includes('rollServerAmountNum') && <span style={{ color: '#faad14', fontWeight: 600 }}>滚服付费人数:<span>{data?.rollServerAmountNum}</span></span>}
|
|
|
- {keyS?.includes('rollServerAmount') && <span style={{ color: '#0f538a', fontWeight: 600 }}>滚服付费金额:<span><Statistic value={data?.rollServerAmount || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('rollServerAmountRate') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>滚服占比:<span>{(data?.rollServerAmountRate * 100)?.toFixed(2)}%</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }]
|
|
|
- } as any)
|
|
|
-
|
|
|
month.push({
|
|
|
title: `总`,
|
|
|
dataIndex: 'totalTrend',
|
|
|
label: "D1~Dn",
|
|
|
align: "center",
|
|
|
- default: 54,
|
|
|
+ default: 112,
|
|
|
children: [{
|
|
|
title: `新创角`,
|
|
|
dataIndex: 'totalTrend',
|