|
@@ -40,11 +40,8 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
|
}
|
|
|
// 总付费趋势
|
|
|
let defaultStart = 15
|
|
|
- const zC = Array(30).fill('').map((_item: string, index: number) => {
|
|
|
+ const zC = Array(90).fill('').map((_item: string, index: number) => {
|
|
|
let field = `amountD${index + 1}Trend`
|
|
|
- if (index === 29) [
|
|
|
- field = 'amountM1Trend'
|
|
|
- ]
|
|
|
let data = {
|
|
|
title: `D${index + 1}`,
|
|
|
dataIndex: `D${index + 1}`,
|
|
@@ -89,8 +86,8 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
|
return data
|
|
|
})
|
|
|
|
|
|
- let mDefaultStart = 45, count = 0
|
|
|
- const Mc = [2, 3, 6].map(index => {
|
|
|
+ let mDefaultStart = 105, count = 0
|
|
|
+ const Mc = [4, 5, 6, 7, 8, 9, 10, 11, 12].map(index => {
|
|
|
let field = `amountM${index}Trend`
|
|
|
let data = {
|
|
|
title: `M${index}`,
|
|
@@ -137,51 +134,10 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
|
return data
|
|
|
})
|
|
|
|
|
|
- Mc.push({
|
|
|
- title: "1年",
|
|
|
- default: 48,
|
|
|
- dataIndex: "amountY1Trend",
|
|
|
- label: "时间区间跨度",
|
|
|
- width: 110,
|
|
|
- render: (a: any, b: any) => {
|
|
|
- let date1 = moment()
|
|
|
- if (b?.pitcher === '总计') {
|
|
|
- if (b?.beginDay) {
|
|
|
- date1 = moment(b.beginDay)
|
|
|
- } else {
|
|
|
- date1 = moment()
|
|
|
- }
|
|
|
- } else {
|
|
|
- date1 = moment(b.dt)
|
|
|
- }
|
|
|
- let dt = moment()
|
|
|
- let day = dt.diff(date1, 'day');
|
|
|
- let fieldData = getFieldDta()
|
|
|
- if (fieldData?.length > 0 && 365 <= day) {
|
|
|
- let data: any = {}
|
|
|
- let keyS: string[] = fieldData?.map((item: any) => item.key)
|
|
|
- switch (fieldData[0].type) {
|
|
|
- case '付费趋势':
|
|
|
- if (a) {
|
|
|
- data = a
|
|
|
- return <div className={style.dbox}>
|
|
|
- {keyS?.includes('rechargeUserCount') && <span style={{ color: '#d81b60', fontWeight: 600 }}>充人:<span>{data?.rechargeUserCount}</span></span>}
|
|
|
- {keyS?.includes('rechargeMoney') && <span style={{ color: '#0f538a', fontWeight: 600 }}>充金:<span><Statistic value={data?.rechargeMoney || 0} valueStyle={{ color: '#0f538a', fontWeight: 600 }} /></span></span>}
|
|
|
- {keyS?.includes('increase') && <span style={{ color: 'rgb(12,130,16)', fontWeight: 600 }}>增:<span>{(data?.increase * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('back') && <span style={{ color: '#ff5722', fontWeight: 600 }}>回:<span>{(data?.back * 100)?.toFixed(2)}%</span></span>}
|
|
|
- {keyS?.includes('multiples') && <span style={{ color: '#d81b60', fontWeight: 600 }}>倍:<span>{data?.multiples?.toFixed(2)}</span></span>}
|
|
|
- </div>
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- }
|
|
|
- return '--'
|
|
|
- }
|
|
|
- } as any)
|
|
|
|
|
|
Mc.push({
|
|
|
title: "总",
|
|
|
- default: 49,
|
|
|
+ default: 114,
|
|
|
dataIndex: "amountSumTrend",
|
|
|
label: "时间区间跨度",
|
|
|
align: "center",
|