123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907 |
- import React from 'react'
- import { Badge, Space, Statistic, Switch, Tooltip } from 'antd'
- import '../../launchSystemNew/adq/index.less'
- import { copy } from '@/utils/utils'
- import { ColumnsType } from 'antd/lib/table'
- import StatisticNull from '@/components/StatisticNull'
- import { QuestionCircleOutlined } from '@ant-design/icons'
- import { DELIVERY_MODE, DYNAMIC_CREATIVE_TYPE } from '../adqv3/const'
- import { creativeTemplate } from '../tencentAdPutIn/const'
- import CreativePreview from './CreativePreview'
- function tableDynamicConfig(
- suspendHandle: (b: any, suspend: '启动' | '暂停') => void
- ): ColumnsType<any> {
- let adArr: ColumnsType<any> = [
- {
- title: '启停',
- dataIndex: 'configured_status',
- key: 'configured_status',
- align: 'center',
- width: 40,
- fixed: 'left',
- render: (a: string, b: any) => {
- if (b?.account_id === '总计') {
- return '--'
- }
- return <Switch size="small" checked={a === 'AD_STATUS_NORMAL'} onChange={(checked) => { suspendHandle(b, checked ? '启动' : '暂停') }} />
- }
- },
- {
- title: '所属账号',
- dataIndex: 'account_id',
- key: 'account_id',
- align: 'center',
- width: 80,
- ellipsis: true,
- render: (a: string) => {
- return <Space>
- <a onClick={() => copy(a)} >{a}</a>
- </Space>
- }
- },
- {
- title: '广告ID',
- dataIndex: 'adgroup_id',
- key: 'adgroup_id',
- align: 'center',
- width: 100,
- ellipsis: true,
- render: (a: string, b: any) => {
- if (b?.account_id === '总计') {
- return '--'
- }
- return <Space>
- <a onClick={() => copy(a)} >{a}</a>
- </Space>
- }
- },
- {
- title: '创意ID',
- dataIndex: 'dynamic_creative_id',
- key: 'dynamic_creative_id',
- align: 'center',
- width: 100,
- ellipsis: true,
- render: (a: string, b: any) => {
- if (b?.account_id === '总计') {
- return '--'
- }
- return <Space>
- <a onClick={() => copy(a)} >{a}</a>
- </Space>
- }
- },
- {
- title: '投手',
- dataIndex: 'put_user_name',
- key: 'put_user_name',
- align: 'center',
- width: 70,
- ellipsis: true,
- render(value, record) {
- if (record?.account_id === '总计') return '--';
- return value
- },
- },
- {
- title: '广告名称',
- dataIndex: 'adgroup_name',
- key: 'adgroup_name',
- width: 280,
- ellipsis: true,
- render: (a: string, b: any) => {
- if (b?.account_id === '总计') return '--';
- return a
- }
- },
- {
- title: '创意名称',
- dataIndex: 'dynamic_creative_name',
- key: 'dynamic_creative_name',
- width: 280,
- ellipsis: true,
- render: (a: string, b: any) => {
- if (b?.account_id === '总计') return '--'
- return a
- }
- },
- {
- title: '投放模式',
- dataIndex: 'delivery_mode',
- key: 'delivery_mode',
- align: 'center',
- width: 120,
- render: (a: string) => {
- return DELIVERY_MODE[a as keyof typeof DELIVERY_MODE]
- }
- },
- {
- title: '创意形式匹配方式',
- dataIndex: 'dynamic_creative_type',
- key: 'dynamic_creative_type',
- align: 'center',
- width: 120,
- render: (a: string) => {
- return DYNAMIC_CREATIVE_TYPE[a as keyof typeof DYNAMIC_CREATIVE_TYPE]
- }
- },
- {
- title: '是否已删除',
- dataIndex: 'is_deleted',
- key: 'is_deleted',
- align: 'center',
- width: 60,
- render: (a: any, b: any) => {
- if (b?.account_id === '总计') return '--';
- return <Badge status={!a ? "processing" : "error"} text={a ? '是' : '否'} />
- }
- },
- {
- title: '创意形式',
- dataIndex: 'creative_template_id',
- key: 'creative_template_id',
- align: 'center',
- width: 120,
- ellipsis: true,
- render: (a: string) => {
- return creativeTemplate[a as keyof typeof creativeTemplate] || '--'
- }
- },
- {
- title: '创建时间',
- dataIndex: 'created_time',
- key: 'created_time',
- align: 'center',
- width: 140,
- ellipsis: true,
- },
- {
- title: '创意预览',
- dataIndex: 'creative_components_json',
- key: 'creative_components_json',
- width: 140,
- ellipsis: true,
- render: (_: any, b: any) => {
- return <CreativePreview creativePreview={b?.creative_components ? [b?.creative_components] : []} deliveryMode={[b?.delivery_mode]} />
- }
- },
- {
- title: '操作',
- dataIndex: 'cz',
- key: 'cz',
- width: 130,
- align: 'center',
- render: (a: any, b: any) => {
- if (b?.account_id === '总计') return '--';
- return <Space>
- {/* <Dropdown overlay={<Menu>
- <Menu.Item><a onClick={() => log(b)}>告警日志</a></Menu.Item>
- <Menu.Item><a onClick={() => handleTag(b)}>打标记</a></Menu.Item>
- {b?.tag_value ? <Menu.Item><a style={{ color: 'red' }} onClick={() => delTag(b)}>删除标记</a></Menu.Item> : undefined}
- </Menu>}>
- <a><Space size={2}>更多 <DownOutlined /></Space></a>
- </Dropdown> */}
- <a style={{ color: '#1890ff' }} onClick={() => window.open(`https://ad.qq.com/atlas/${b?.account_id}/admanage/index?tab=adgroup&query={%22operation_status%22:[%22CALCULATE_STATUS_EXCLUDE_DEL%22],%22system_status%22:[],%22search_name%22:%22${b.adgroup_id}%22}`)} target="_blank">腾讯广告</a>
- </Space>
- }
- }
- ]
- let adDataArr: ColumnsType<any> = [
- {
- title: '消耗',
- dataIndex: 'cost_day',
- key: 'cost_day',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='cost_day' />
- }
- },
- {
- title: '曝光量',
- dataIndex: 'view_count_day',
- key: 'view_count_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='view_count_day' />
- }
- },
- {
- title: '点击量',
- dataIndex: 'valid_click_count_day',
- key: 'valid_click_count_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='valid_click_count_day' />
- }
- },
- {
- title: '公众号关注人数(点击归因)',
- dataIndex: 'from_follow_by_click_uv_day',
- key: 'from_follow_by_click_uv_day',
- align: 'center',
- width: 120,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='from_follow_by_click_uv_day' />
- }
- },
- {
- title: '公众号关注成本(点击归因)',
- dataIndex: 'from_follow_by_click_cost_day',
- key: 'from_follow_by_click_cost_day',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='from_follow_by_click_cost_day' precision={2} />
- }
- },
- {
- title: '公众号关注人数(平台上报)',
- dataIndex: 'biz_follow_uv_day',
- key: 'biz_follow_uv_day',
- align: 'center',
- width: 120,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='biz_follow_uv_day' />
- }
- },
- {
- title: '目标转化量',
- dataIndex: 'conversions_count_day',
- key: 'conversions_count_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='conversions_count_day' />
- }
- },
- {
- title: '目标转化成本',
- dataIndex: 'conversions_cost_day',
- key: 'conversions_cost_day',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='conversions_cost_day' precision={2} />
- }
- },
- {
- title: '深度目标转化量',
- dataIndex: 'deep_conversions_count_day',
- key: 'deep_conversions_count_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='deep_conversions_count_day' />
- }
- },
- {
- title: '加企业微信客服次数',
- dataIndex: 'scan_follow_count_day',
- key: 'scan_follow_count_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='scan_follow_count_day' />
- }
- },
- {
- title: '加企业微信客服人数',
- dataIndex: 'scan_follow_user_count_day',
- key: 'scan_follow_user_count_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='scan_follow_user_count_day' />
- }
- },
- {
- title: '下单次数',
- dataIndex: 'order_pv_day',
- key: 'order_pv_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_pv_day' />
- }
- },
- {
- title: '下单人数',
- dataIndex: 'order_uv_day',
- key: 'order_uv_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_uv_day' />
- }
- },
- {
- title: '下单金额',
- dataIndex: 'order_amount_day',
- key: 'order_amount_day',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_amount_day' precision={2} />
- }
- },
- {
- title: '下单次数(点击归因)',
- dataIndex: 'order_by_click_count_day',
- key: 'order_by_click_count_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_by_click_count_day' />
- }
- },
- {
- title: '下单人数(点击归因)',
- dataIndex: 'order_by_click_amount_day',
- key: 'order_by_click_amount_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_by_click_amount_day' />
- }
- },
- {
- title: '点击首日下单次数(点击归因)',
- dataIndex: 'first_day_order_by_click_count_day',
- key: 'first_day_order_by_click_count_day',
- align: 'center',
- width: 120,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='first_day_order_by_click_count_day' />
- }
- },
- {
- title: '点击首日付费次数',
- dataIndex: 'cheout_pv1d_day',
- key: 'cheout_pv1d_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='cheout_pv1d_day' />
- }
- },
- {
- title: '点击首日付费金额',
- dataIndex: 'cheout_fd_day',
- key: 'cheout_fd_day',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='cheout_fd_day' precision={2} />
- }
- },
- {
- title: '点击首日付费成本',
- dataIndex: 'cheout1d_cost_day',
- key: 'cheout1d_cost_day',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='cheout1d_cost_day' precision={2} />
- }
- },
- {
- title: '点击首日付费金额(平台上报)',
- dataIndex: 'purchase_pla_clk1d_amount_day',
- key: 'purchase_pla_clk1d_amount_day',
- align: 'center',
- width: 120,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='purchase_pla_clk1d_amount_day' precision={2} />
- }
- },
- {
- title: '点击首日下单次数(首日新增下单量)',
- dataIndex: 'first_day_order_count_day',
- key: 'first_day_order_count_day',
- align: 'center',
- width: 120,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='first_day_order_count_day' />
- }
- },
- {
- title: '首日新增下单金额(点击归因)',
- dataIndex: 'first_day_order_by_click_amount_day',
- key: 'first_day_order_by_click_amount_day',
- align: 'center',
- width: 120,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='first_day_order_by_click_amount_day' precision={2} />
- }
- },
- {
- title: '点击首日下单金额(首日新增下单金额)',
- dataIndex: 'first_day_order_amount_day',
- key: 'first_day_order_amount_day',
- align: 'center',
- width: 120,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='first_day_order_amount_day' precision={2} />
- }
- },
- {
- title: '点击7日下单次数',
- dataIndex: 'order_clk7d_pv_day',
- key: 'order_clk7d_pv_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_clk7d_pv_day' />
- }
- },
- {
- title: '点击7日下单金额',
- dataIndex: 'order_clk7d_amount_day',
- key: 'order_clk7d_amount_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_clk7d_amount_day' precision={2} />
- }
- },
- {
- title: '点击15日下单次数',
- dataIndex: 'order_clk15d_pv_day',
- key: 'order_clk15d_pv_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_clk15d_pv_day' />
- }
- },
- {
- title: '点击15日下单金额',
- dataIndex: 'order_clk15d_amount_day',
- key: 'order_clk15d_amount_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_clk15d_amount_day' precision={2} />
- }
- },
- {
- title: '点击30日下单次数',
- dataIndex: 'order_clk30d_pv_day',
- key: 'order_clk30d_pv_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_clk30d_pv_day' />
- }
- },
- {
- title: '点击30日下单金额',
- dataIndex: 'order_clk30d_amount_day',
- key: 'order_clk30d_amount_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_clk30d_amount_day' precision={2} />
- }
- },
- {
- title: '不感兴趣点击次数',
- dataIndex: 'no_interest_count_day',
- key: 'no_interest_count_day',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='no_interest_count_day' />
- }
- },
- {
- title: '千次曝光成本',
- dataIndex: 'thousand_display_price',
- key: 'thousand_display_price',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='thousand_display_price' precision={2} />
- }
- },
- {
- title: '点击均价',
- dataIndex: 'cpc',
- key: 'cpc',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='cpc' precision={2} />
- }
- },
- {
- title: '点击率',
- dataIndex: 'ctr',
- key: 'ctr',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.ctr !== undefined && b?.ctr !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '公众号关注率(点击归因)',
- dataIndex: 'biz_follow_rate_click',
- key: 'biz_follow_rate_click',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.biz_follow_rate_click !== undefined && b?.biz_follow_rate_click !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '公众号关注成本(平台上报)',
- dataIndex: 'biz_follow_cost',
- key: 'biz_follow_cost',
- align: 'center',
- width: 120,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='biz_follow_cost' precision={2} />
- }
- },
- {
- title: '公众号关注率(平台上报)',
- dataIndex: 'biz_follow_rate',
- key: 'biz_follow_rate',
- align: 'center',
- width: 120,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.biz_follow_rate !== undefined && b?.biz_follow_rate !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '目标转化率',
- dataIndex: 'conversions_rate',
- key: 'conversions_rate',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.conversions_rate !== undefined && b?.conversions_rate !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '深度目标转化率',
- dataIndex: 'deep_conversions_rate',
- key: 'deep_conversions_rate',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.deep_conversions_rate !== undefined && b?.deep_conversions_rate !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '加企业微信客服成本(人数)',
- dataIndex: 'scan_follow_user_cost',
- key: 'scan_follow_user_cost',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='scan_follow_user_cost' precision={2} />
- }
- },
- {
- title: '加企业微信客服率(人数)',
- dataIndex: 'scan_follow_user_rate',
- key: 'scan_follow_user_rate',
- align: 'center',
- width: 120,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.scan_follow_user_rate !== undefined && b?.scan_follow_user_rate !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '下单单价',
- dataIndex: 'order_unit_price',
- key: 'order_unit_price',
- align: 'center',
- width: 80,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_unit_price' precision={2} />
- }
- },
- {
- title: '下单率',
- dataIndex: 'order_rate',
- key: 'order_rate',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.order_rate !== undefined && b?.order_rate !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '下单成本',
- dataIndex: 'order_by_display_cost',
- key: 'order_by_display_cost',
- align: 'center',
- width: 80,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_by_display_cost' precision={2} />
- }
- },
- {
- title: '下单ROI',
- dataIndex: 'order_roi',
- key: 'order_roi',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.order_roi !== undefined && b?.order_roi !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '客单价',
- dataIndex: 'unit_price',
- key: 'unit_price',
- align: 'center',
- width: 80,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='unit_price' precision={2} />
- }
- },
- {
- title: '下单率(点击归因)',
- dataIndex: 'order_by_click_rate',
- key: 'order_by_click_rate',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.order_by_click_rate !== undefined && b?.order_by_click_rate !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '下单成本(点击归因)',
- dataIndex: 'order_by_click_cost',
- key: 'order_by_click_cost',
- align: 'center',
- width: 80,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_by_click_cost' precision={2} />
- }
- },
- {
- title: '下单ROI(点击归因)',
- dataIndex: 'order_by_click_roi',
- key: 'order_by_click_roi',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.order_by_click_roi !== undefined && b?.order_by_click_roi !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '点击首日付费率',
- dataIndex: 'cheout_1d_rate',
- key: 'cheout_1d_rate',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.cheout_1d_rate !== undefined && b?.cheout_1d_rate !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '点击首日付费ROI',
- dataIndex: 'cheout_fd_reward',
- key: 'cheout_fd_reward',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.cheout_fd_reward !== undefined && b?.cheout_fd_reward !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '点击30日下单单价',
- dataIndex: 'order_clk_30d_unit_price',
- key: 'order_clk_30d_unit_price',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_clk_30d_unit_price' precision={2} />
- }
- },
- {
- title: '点击15日下单单价',
- dataIndex: 'order_clk_15d_unit_price',
- key: 'order_clk_15d_unit_price',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_clk_15d_unit_price' precision={2} />
- }
- },
- {
- title: '点击7日下单单价',
- dataIndex: 'order_clk_7d_unit_price',
- key: 'order_clk_7d_unit_price',
- align: 'center',
- width: 100,
- sorter: true,
- render: (a: any, b: any) => {
- return <StatisticNull data={b} field='order_clk_7d_unit_price' precision={2} />
- }
- },
- {
- title: '点击30日下单ROI',
- dataIndex: 'order_clk_30d_roi',
- key: 'order_clk_30d_roi',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.order_clk_30d_roi !== undefined && b?.order_clk_30d_roi !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '点击15日下单ROI',
- dataIndex: 'order_clk_15d_roi',
- key: 'order_clk_15d_roi',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.order_clk_15d_roi !== undefined && b?.order_clk_15d_roi !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: '点击7日下单ROI',
- dataIndex: 'order_clk_7d_roi',
- key: 'order_clk_7d_roi',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.order_clk_7d_roi !== undefined && b?.order_clk_7d_roi !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- {
- title: <Space>
- <span>点击首日下单ROI</span>
- <Tooltip title="首日新增下单ROI">
- <QuestionCircleOutlined />
- </Tooltip>
- </Space>,
- dataIndex: 'first_day_order_roi',
- key: 'first_day_order_roi',
- align: 'center',
- width: 110,
- sorter: true,
- render: (a: any, b: any) => {
- if (b?.first_day_order_roi !== undefined && b?.first_day_order_roi !== null) {
- return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
- } else {
- return '--'
- }
- }
- },
- ]
- return [
- ...adArr,
- ...adDataArr
- ]
- }
- export default tableDynamicConfig
|