import { TargetingSourceTypeEnum, } from '@/services/launchAdq/enum'
import React from 'react'
import { Badge, Space, Tooltip } from 'antd'
import { copy } from '@/utils/utils'
import { CopyOutlined } from '@ant-design/icons'
function tableConfig(tableIdClick: any): any {
return [
{
title: '所属账号',
dataIndex: 'accountId',
key: 'accountId',
align: 'center',
width: 100,
ellipsis: true,
render: (a: string) => {
return
copy(a)} >{a}
}
},
{
title: '定向ID',
dataIndex: 'targetingId',
key: 'targetingId',
align: 'center',
width: 100,
ellipsis: true,
render: (a: string) => {
return copy(a)}>{a}
}
},
{
title: '定向名称',
dataIndex: 'targetingName',
key: 'targetingName',
align: 'center',
width: 250
},
{
title: '定向描述',
dataIndex: 'description',
key: 'description',
align: 'center',
width: 250
},
{
title: '地理位置',
dataIndex: 'targetingTranslation',
key: 'targetingTranslation',
align: 'center',
width: 600,
render: (a: any) => {
return 200 ? { width: 800 } : {}}
title={
{
a?.split(';')?.filter((str: any) => !!str)?.map((str: string, index: number) => {
let arr = str?.split(':')
return
{arr[0]}:{arr[1]}
})
}
}>
{
a?.split(';')?.filter((str: any) => !!str)?.map((str: string, index: number) => {
if (str.includes('地理位置')) {
let arr = str?.split(':')
return
{arr[0]}:{arr[1]}....
} else {
return null
}
})
}
}
},
{
title: '定向包来源',
dataIndex: 'targetingSourceType',
key: 'targetingSourceType',
align: 'center',
width: 170,
render: (a: string | number, b: any) => {
return
}
},
{
title: '是否包含不支持定向',
dataIndex: 'includeUnsupportedTargeting',
key: 'includeUnsupportedTargeting',
align: 'center',
width: 120,
render: (a: boolean) => {
return
}
},
{
title: '创建时间',
dataIndex: 'createdTime',
key: 'createdTime',
align: 'center',
width: 160,
},
{
title: '最后修改时间',
dataIndex: 'lastModifiedTime',
key: 'lastModifiedTime',
align: 'center',
width: 160,
},
]
}
export default tableConfig