|
@@ -1,12 +1,22 @@
|
|
import React from "react"
|
|
import React from "react"
|
|
-import { Space } from "antd"
|
|
|
|
|
|
+import { Badge, Space } from "antd"
|
|
import { AdStatus, PromotedObjectType, SpeedMode } from "@/services/launchAdq/enum"
|
|
import { AdStatus, PromotedObjectType, SpeedMode } from "@/services/launchAdq/enum"
|
|
import TargetingPopover from "../../components/targetingPopover"
|
|
import TargetingPopover from "../../components/targetingPopover"
|
|
-import { EyeOutlined } from "@ant-design/icons"
|
|
|
|
import AdPopover from "../../components/adPopover"
|
|
import AdPopover from "../../components/adPopover"
|
|
-import AdcreativePopover from "../../components/adcreativePopover"
|
|
|
|
function tableConfig(callback: (data: any, type: 'log' | 'page', allData?: any) => void): any {
|
|
function tableConfig(callback: (data: any, type: 'log' | 'page', allData?: any) => void): any {
|
|
return [
|
|
return [
|
|
|
|
+ {
|
|
|
|
+ title: '操作',
|
|
|
|
+ dataIndex: 'taskName',
|
|
|
|
+ key: 'taskName',
|
|
|
|
+ width: 60,
|
|
|
|
+ align: 'center',
|
|
|
|
+ render: (a: any, b: any) => {
|
|
|
|
+ return <Space>
|
|
|
|
+ <a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => { callback({ taskId: b.id, campaignName: b.campaignName }, 'log', b) }}>日志</a>
|
|
|
|
+ </Space>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
{
|
|
{
|
|
title: 'ID',
|
|
title: 'ID',
|
|
dataIndex: 'id',
|
|
dataIndex: 'id',
|
|
@@ -82,14 +92,15 @@ function tableConfig(callback: (data: any, type: 'log' | 'page', allData?: any)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '广告ID',
|
|
|
|
|
|
+ title: '广告',
|
|
dataIndex: 'sysAdgroupId',
|
|
dataIndex: 'sysAdgroupId',
|
|
key: 'sysAdgroupId',
|
|
key: 'sysAdgroupId',
|
|
align: 'center',
|
|
align: 'center',
|
|
- width: 80,
|
|
|
|
|
|
+ width: 90,
|
|
|
|
+ ellipsis: true,
|
|
render: (a: any, b: any) => {
|
|
render: (a: any, b: any) => {
|
|
if (a) {
|
|
if (a) {
|
|
- return <Space><span style={{ fontSize: "12px" }}>{a}</span><AdPopover id={a}/></Space>
|
|
|
|
|
|
+ return <AdPopover name={b?.sysAdgroupInfo?.adgroupName} id={a} />
|
|
} else {
|
|
} else {
|
|
return <span>--</span>
|
|
return <span>--</span>
|
|
}
|
|
}
|
|
@@ -103,35 +114,7 @@ function tableConfig(callback: (data: any, type: 'log' | 'page', allData?: any)
|
|
width: 80,
|
|
width: 80,
|
|
render: (a: any, b: any) => {
|
|
render: (a: any, b: any) => {
|
|
if (a) {
|
|
if (a) {
|
|
- return <Space><span style={{ fontSize: "12px" }}>{a}</span><TargetingPopover id={b.sysTargetingId}/></Space>
|
|
|
|
- } else {
|
|
|
|
- return <span>--</span>
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '创意ID',
|
|
|
|
- dataIndex: 'sysAdcreativeId',
|
|
|
|
- key: 'sysAdcreativeId',
|
|
|
|
- align: 'center',
|
|
|
|
- width: 80,
|
|
|
|
- render: (a: any, b: any) => {
|
|
|
|
- if (a) {
|
|
|
|
- return <Space><span style={{ fontSize: "12px" }}>{a}</span><AdcreativePopover id={a}/></Space>
|
|
|
|
- } else {
|
|
|
|
- return <span>--</span>
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '落地页ID',
|
|
|
|
- dataIndex: 'sysPageId',
|
|
|
|
- key: 'sysPageId',
|
|
|
|
- align: 'center',
|
|
|
|
- width: 80,
|
|
|
|
- render: (a: any, b: any) => {
|
|
|
|
- if (a) {
|
|
|
|
- return <Space><span style={{ fontSize: "12px" }}>{a}</span><a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => { callback(b.sysPageId, 'page') }}><EyeOutlined /></a></Space>
|
|
|
|
|
|
+ return <Space><span style={{ fontSize: "12px" }}>{a}</span><TargetingPopover id={b.sysTargetingId} /></Space>
|
|
} else {
|
|
} else {
|
|
return <span>--</span>
|
|
return <span>--</span>
|
|
}
|
|
}
|
|
@@ -148,13 +131,15 @@ function tableConfig(callback: (data: any, type: 'log' | 'page', allData?: any)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: <span style={{ marginLeft: 10 }}>操作</span>,
|
|
|
|
- dataIndex: 'taskName',
|
|
|
|
- key: 'taskName',
|
|
|
|
- fixed: 'right',
|
|
|
|
|
|
+ title: <span style={{ marginLeft: 10 }}>任务反馈</span>,
|
|
|
|
+ dataIndex: 'total',
|
|
|
|
+ key: 'total',
|
|
render: (a: any, b: any) => {
|
|
render: (a: any, b: any) => {
|
|
- return <Space style={{ marginLeft: 10 }}>
|
|
|
|
- <a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => { callback({ taskId: b.id, campaignName: b.campaignName }, 'log', b) }}>日志</a>
|
|
|
|
|
|
+ let errCount = a - (b?.successCount || 0)
|
|
|
|
+ return <Space style={{ fontSize: "12px", marginLeft: 10 }} size={20}>
|
|
|
|
+ <span><Badge status="processing" />总条数:{a}条</span>
|
|
|
|
+ {b?.successCount ? <span><Badge status="success" />成功:{b?.successCount || 0}条</span> : null}
|
|
|
|
+ {errCount ? <span><Badge status="error" />失败:{errCount}条</span> : null}
|
|
</Space>
|
|
</Space>
|
|
}
|
|
}
|
|
}
|
|
}
|