import React from "react" import { Space } from "antd" import { AdStatus, PromotedObjectType, SpeedMode } from "@/services/launchAdq/enum" import TargetingPopover from "../../components/targetingPopover" import { EyeOutlined } from "@ant-design/icons" function tableConfig(callback: (data: any, type: 'log' | 'page') => void): any { return [ { title: 'ID', dataIndex: 'id', key: 'id', align: 'center', width: 50, }, { title: '计划名称', dataIndex: 'campaignName', key: 'campaignName', align: 'left', width: 180, ellipsis: true, render: (a: any, b: any) => { return {a || '--'} } }, { title: '计划类型', dataIndex: 'campaignType', key: 'campaignType', align: 'center', width: 120, render: (a: any, b: any) => { if (a) { return {a === 'CAMPAIGN_TYPE_NORMAL' ? '普通展示广告' : '微信朋友圈广告'} } else { return -- } } }, { title: '广告状态', dataIndex: 'configuredStatus', key: 'configuredStatus', align: 'center', width: 100, render: (a: any, b: any) => { if (a) { return {AdStatus[a]} } else { return -- } } }, { title: '推广目标', dataIndex: 'promotedObjectType', key: 'promotedObjectType', align: 'center', width: 100, render: (a: any, b: any) => { if (a) { return {PromotedObjectType[a]} } else { return -- } } }, { title: '投放速度模式', dataIndex: 'speedMode', key: 'speedMode', align: 'center', width: 100, render: (a: any, b: any) => { if (a) { return {SpeedMode[a]} } else { return -- } } }, { title: '广告ID', dataIndex: 'sysAdgroupId', key: 'sysAdgroupId', align: 'center', width: 100, render: (a: any, b: any) => { if (a) { return {a} } else { return -- } } }, { title: '定向ID', dataIndex: 'sysTargetingId', key: 'sysTargetingId', align: 'center', width: 80, render: (a: any, b: any) => { if (a) { return {a} } else { return -- } } }, { title: '创意ID', dataIndex: 'sysAdcreativeId', key: 'sysAdcreativeId', align: 'center', width: 100, render: (a: any, b: any) => { if (a) { return {a} } else { return -- } } }, { title: '落地页ID', dataIndex: 'sysPageId', key: 'sysPageId', align: 'center', width: 80, render: (a: any, b: any) => { if (a) { return {a} { callback(b.sysPageId, 'page') }}> } else { return -- } } }, { title: '创建时间', dataIndex: 'createTime', key: 'createTime', align: 'center', width: 140, render: (a: any, b: any) => { return {a || '--'} } }, { title: 操作, dataIndex: 'taskName', key: 'taskName', fixed: 'right', render: (a: any, b: any) => { return { callback({ taskId: b.id, campaignName: b.campaignName }, 'log') }}>日志 {/* { del(b?.id) }} okText="Yes" cancelText="No" > 删除 */} } } ] } export default tableConfig