|
@@ -1,6 +1,6 @@
|
|
import WidthEllipsis from "@/components/widthEllipsis"
|
|
import WidthEllipsis from "@/components/widthEllipsis"
|
|
import { Progress, Statistic } from "antd"
|
|
import { Progress, Statistic } from "antd"
|
|
-import React from "react"
|
|
|
|
|
|
+import React, { Children } from "react"
|
|
import { AdUnitType_Enum, PRODUCT_TYPE_ENUM } from "../../../const"
|
|
import { AdUnitType_Enum, PRODUCT_TYPE_ENUM } from "../../../const"
|
|
import style from './index.less'
|
|
import style from './index.less'
|
|
import moment from "moment"
|
|
import moment from "moment"
|
|
@@ -13,27 +13,50 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
|
|
|
|
const dataIndex = `da${index}`
|
|
const dataIndex = `da${index}`
|
|
return {
|
|
return {
|
|
- title: `D${index}`, dataIndex, label: '基本信息', default: defaultIndex + count, width: 150,
|
|
|
|
- render: (_: any, b: any) => {
|
|
|
|
- if (moment().subtract(1, 'days') >= moment(b.dt === '总计' ? b.costDayBegin : b.dt).add(index - 1, 'days')) {
|
|
|
|
- const data = b?.[dataIndex]?.split('/')
|
|
|
|
- console.log(data)
|
|
|
|
- return <div className={style.dbox} style={{ height: 184 }}>
|
|
|
|
- <span style={{ color: '#F44336', fontWeight: 600, display: 'flex', alignItems: 'center' }}>变现人数:<span><Statistic value={data?.[0] || 0} /></span></span>
|
|
|
|
- <span style={{ color: '#FF9800', fontWeight: 600, display: 'flex', alignItems: 'center' }}>变现次数:<span><Statistic value={data?.[1] || 0} /></span></span>
|
|
|
|
- <span style={{ color: '#d81b60', fontWeight: 600, display: 'flex', alignItems: 'center' }}>新增收入:<span><Statistic value={data?.[2] || 0} precision={2} /></span></span>
|
|
|
|
- <span style={{ color: '#0f538a', fontWeight: 600, display: 'flex', alignItems: 'center' }}>累计收入:<span><Statistic value={data?.[3] || 0} precision={2} /></span></span>
|
|
|
|
- <span style={{ color: '#9C27B0', fontWeight: 600, display: 'flex', alignItems: 'center' }}>arpu:<span><Statistic value={data?.[7] || 0} precision={2} /></span></span>
|
|
|
|
- <span style={{ color: '#2196F3', fontWeight: 600, display: 'flex', alignItems: 'center' }}>arppu:<span><Statistic value={data?.[8] || 0} precision={2} /></span></span>
|
|
|
|
- {index < 8 && <span style={{ color: '#ed2a78', fontWeight: 600, display: 'flex', alignItems: 'center' }}>价值:<span><Statistic value={data?.[9] || 0} precision={2} /></span></span>}
|
|
|
|
- <span style={{ color: 'rgb(12,130,16)', fontWeight: 600, display: 'flex', alignItems: 'center' }}>增:<span><Statistic value={data?.[4] ? data?.[4] * 100 : 0} precision={2} valueStyle={!data?.[4] ? {} : data?.[4] >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" /></span></span>
|
|
|
|
- <span style={{ color: '#ff5722', fontWeight: 600, display: 'flex', alignItems: 'center' }}>回:<span><Statistic value={data?.[5] ? data?.[5] * 100 : 0} precision={2} valueStyle={!data?.[5] ? {} : data?.[5] >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" /></span></span>
|
|
|
|
- <span style={{ color: '#d81b60', fontWeight: 600, display: 'flex', alignItems: 'center' }}>倍:<span><Statistic value={data?.[6] || 0} precision={2} /></span></span>
|
|
|
|
|
|
+ title: `D${index}`, dataIndex, label: '基本信息', default: defaultIndex + count, width: 300, children: [
|
|
|
|
+ {
|
|
|
|
+ title: "",
|
|
|
|
+ key: "left" + index,
|
|
|
|
+ width: 150,
|
|
|
|
+ align: 'center',
|
|
|
|
+ render: (_: any, b: any) => {
|
|
|
|
+ if (moment().subtract(1, 'days') >= moment(b.dt === '总计' ? b.costDayBegin : b.dt).add(index - 1, 'days')) {
|
|
|
|
+ const data = b?.[dataIndex]?.split('/')
|
|
|
|
+ return <div className={` ${style.newbox}`} >
|
|
|
|
+ <span style={{ color: '#F44336', fontWeight: 600, }}>变现人数:<span><Statistic value={data?.[0] || 0} /></span></span>
|
|
|
|
+ <span style={{ color: '#FF9800', fontWeight: 600, }}>变现次数:<span><Statistic value={data?.[1] || 0} /></span></span>
|
|
|
|
+ <span style={{ color: '#d81b60', fontWeight: 600, }}>新增收入:<span><Statistic value={data?.[2] || 0} precision={2} /></span></span>
|
|
|
|
+ <span style={{ color: '#0f538a', fontWeight: 600,}}>累计收入:<span><Statistic value={data?.[3] || 0} precision={2} /></span></span>
|
|
|
|
+ {index < 8 && <span style={{ color: '#ed2a78', fontWeight: 600}}>价值:<span><Statistic value={data?.[9] || 0} precision={2} /></span></span>}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ }
|
|
|
|
+ return <div style={{ height: 102, width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>--</div>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: "",
|
|
|
|
+ key: "right" + index,
|
|
|
|
+ width: 150,
|
|
|
|
+ align: 'center',
|
|
|
|
+ render: (_: any, b: any) => {
|
|
|
|
+ if (moment().subtract(1, 'days') >= moment(b.dt === '总计' ? b.costDayBegin : b.dt).add(index - 1, 'days')) {
|
|
|
|
+ const data = b?.[dataIndex]?.split('/')
|
|
|
|
+ return <div className={style.newbox}>
|
|
|
|
+ <span style={{ color: '#9C27B0', fontWeight: 600, }}>ARPU:<span><Statistic value={data?.[7] || 0} precision={2} /></span></span>
|
|
|
|
+ <span style={{ color: '#2196F3', fontWeight: 600, }}>ARPPU<span><Statistic value={data?.[8] || 0} precision={2} /></span></span>
|
|
|
|
+ <span style={{ color: 'rgb(12,130,16)', fontWeight: 600, }}>增:<span><Statistic value={data?.[4] ? data?.[4] * 100 : 0} precision={2} valueStyle={!data?.[4] ? {} : data?.[4] >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" /></span></span>
|
|
|
|
+ <span style={{ color: '#ff5722', fontWeight: 600,}}>回:<span><Statistic value={data?.[5] ? data?.[5] * 100 : 0} precision={2} valueStyle={!data?.[5] ? {} : data?.[5] >= 0.5 ? { color: 'red' } : { color: '#0f990f' }} suffix="%" /></span></span>
|
|
|
|
+ <span style={{ color: '#d81b60', fontWeight: 600, }}>倍:<span><Statistic value={data?.[6] || 0} precision={2} /></span></span>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ }
|
|
|
|
+ return <div style={{ height: 102, width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>--</div>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
|
|
|
|
- </div>
|
|
|
|
- }
|
|
|
|
- return <div style={{ height: 102, width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>--</div>
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
@@ -80,7 +103,7 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
|
|
{
|
|
{
|
|
title: '消耗', dataIndex: 'cost', label: '基本信息', align: 'right', width: 125, default: 7, sorter: true,
|
|
title: '消耗', dataIndex: 'cost', label: '基本信息', align: 'right', width: 125, default: 7, sorter: true,
|
|
className: 'padding_0',
|
|
className: 'padding_0',
|
|
- render: (a: number) => <div style={{ height: 186, position: 'relative' }}>
|
|
|
|
|
|
+ render: (a: number) => <div style={{ height: 107, position: 'relative' }}>
|
|
<Progress
|
|
<Progress
|
|
strokeColor={{
|
|
strokeColor={{
|
|
from: '#ff5900',
|
|
from: '#ff5900',
|