123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366 |
- import { Statistic } from 'antd'
- import { ColumnsType } from 'antd/lib/table'
- import React from 'react'
- function columns() {
- let newArr: ColumnsType<any> = [
- {
- title: '时间',
- dataIndex: 'date',
- key: 'date',
- align: 'center',
- width: 95,
- fixed: 'left',
- sorter:true
- },
- {
- title: '公众号',
- dataIndex: 'channel',
- key: 'channel',
- align: 'center',
- width: 70,
- fixed: 'left',
- },
- {
- title: '投手',
- dataIndex: 'pitcher',
- key: 'pitcher',
- align: 'center',
- width: 50,
- fixed: 'left',
- },
- {
- title: '期数',
- dataIndex: 'stage',
- key: 'stage',
- align: 'center',
- width: 85,
- fixed: 'left',
- },
- {
- title: '主投书',
- dataIndex: 'book',
- key: 'book',
- width: 90,
- align: 'center',
- fixed: 'left',
- ellipsis: true
- },
- {
- title: '投放位置',
- dataIndex: 'type',
- key: 'type',
- width: 40,
- align: 'center',
- fixed: 'left',
- },
- {
- title: '曝光量',
- dataIndex: 'view_count',
- key: 'view_count',
- align: 'center',
- width: 110,
- sorter:true,
- render:(a:any)=>{
- return <Statistic value={a || 0} />
- }
- },
- {
- title: '点击量',
- dataIndex: 'click_count',
- key: 'click_count',
- align: 'center',
- width: 110,
- sorter:true,
- render:(a:any)=>{
- return <Statistic value={a || 0} />
- }
- },
- {
- title: '点击率',
- dataIndex: 'click_rate',
- key: 'click_rate',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- a = a ? parseFloat((a * 100).toFixed(2)) : 0
- return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
- },
- },
- {
- title: '点击关注率',
- dataIndex: 'click_follow_rate',
- key: 'click_follow_rate',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- a = a ? parseFloat((a * 100).toFixed(2)) : 0
- return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
- },
- },
- {
- title: '关注次数',
- dataIndex: 'follow_user',
- key: 'follow_user',
- align: 'center',
- width: 100,
- sorter:true,
- render:(a:any)=>{
- return <Statistic value={a || 0} />
- }
- },
- // {
- // title: '关注率',
- // dataIndex: 'follow_rate',
- // key: 'follow_rate',
- // align: 'center',
- // width: 75,
- // sorter:true,
- // render: (a: number) => {
- // a = a ? parseFloat((a * 100).toFixed(2)) : 0
- // return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
- // },
- // },
- {
- title: '关注充值率',
- dataIndex: 'follow_order_rate',
- key: 'follow_order_rate',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- a = a ? parseFloat((a * 100).toFixed(2)) : 0
- return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
- },
- },
- {
- title: '关注成本',
- dataIndex: 'follow_per_cost',
- key: 'follow_per_cost',
- align: 'center',
- width: 60,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '首日新用户充值成本',
- dataIndex: 'first_order_user_per_cost',
- key: 'first_order_user_per_cost',
- align: 'center',
- width: 95,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '客单价',
- dataIndex: 'user_per_amount',
- key: 'user_per_amount',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '下单率',
- dataIndex: 'order_rate',
- key: 'order_rate',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- a = a ? parseFloat((a * 100).toFixed(2)) : 0
- return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
- },
- },
- {
- title: '消耗',
- dataIndex: 'cost',
- key: 'cost',
- align: 'center',
- width: 110,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '新用户充值次数',
- dataIndex: 'first_order_count',
- key: 'first_order_count',
- align: 'center',
- width: 90,
- sorter:true,
- render:(a:any)=>{
- return <Statistic value={a || 0} />
- }
- },
- {
- title: '新用户充值人数',
- dataIndex: 'first_order_user',
- key: 'first_order_user',
- align: 'center',
- width: 85,
- sorter:true,
- render:(a:any)=>{
- return <Statistic value={a || 0} />
- }
- },
- {
- title: '新用户充值金额',
- dataIndex: 'first_order_amount',
- key: 'first_order_amount',
- align: 'center',
- width: 110,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '充值次数',
- dataIndex: 'order_count',
- key: 'order_count',
- align: 'center',
- width: 100,
- sorter:true,
- render:(a:any)=>{
- return <Statistic value={a || 0} />
- }
- },
- {
- title: '充值人数',
- dataIndex: 'order_user',
- key: 'order_user',
- align: 'center',
- width: 100,
- sorter:true,
- render:(a:any)=>{
- return <Statistic value={a || 0} />
- }
- },
- {
- title: '充值金额',
- dataIndex: 'order_amount',
- key: 'order_amount',
- align: 'center',
- width: 110,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '老用户充值金额',
- dataIndex: 'old_order_amount',
- key: 'old_order_amount',
- align: 'center',
- width: 110,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '首日客单价',
- dataIndex: 'first_amount_per_user',
- key: 'first_amount_per_user',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '单位关注收益',
- dataIndex: 'amount_per_follow',
- key: 'amount_per_follow',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '新用户充值成本',
- dataIndex: 'first_cost_per_user',
- key: 'first_cost_per_user',
- align: 'center',
- width: 85,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '新用户累计充值',
- dataIndex: 'reg_user_amount',
- key: 'reg_user_amount',
- align: 'center',
- width: 85,
- sorter:true,
- render: (a: number) => {
- return <Statistic value={a || 0} />
- },
- },
- {
- title: '新用户充值率',
- dataIndex: 'new_user_order_rate',
- key: 'new_user_order_rate',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- a = a ? parseFloat((a * 100).toFixed(2)) : 0
- return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
- },
- },
- {
- title: '首日回收率',
- dataIndex: 'day_roi',
- key: 'day_roi',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- a = a ? parseFloat((a * 100).toFixed(2)) : 0
- return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
- },
- },
- {
- title: '当日回收率',
- dataIndex: 'roi',
- key: 'roi',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- a = a ? parseFloat((a * 100).toFixed(2)) : 0
- return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
- },
- },
- {
- title: '复充率',
- dataIndex: 'old_user_once_order_rate',
- key: 'old_user_once_order_rate',
- align: 'center',
- width: 75,
- sorter:true,
- render: (a: number) => {
- a = a ? parseFloat((a * 100).toFixed(2)) : 0
- return <span style={a <= 8 ? { color: '#0f990f', fontWeight: 600 } : a >= 100 ? { color: 'red', fontWeight: 600 } : {}}> {a + '%'}</span >
- },
- },
- ]
- return newArr
- }
- export { columns }
|