|
@@ -1,12 +1,12 @@
|
|
|
|
|
|
import { useAjax } from '@/Hook/useAjax'
|
|
|
import { AdStatusEnum, PromotedObjectType } from '@/services/launchAdq/enum'
|
|
|
-import { Col, Row, Input, Select, message, Space, Button, Popconfirm, Switch, notification, Modal, Tooltip, Checkbox } from 'antd'
|
|
|
+import { Col, Row, Input, Select, message, Space, Button, Popconfirm, Switch, notification, Modal, Tooltip, Checkbox, Dropdown, Menu } from 'antd'
|
|
|
import React, { useEffect, useCallback, useState } from 'react'
|
|
|
import TableData from '../../components/TableData'
|
|
|
import tableConfig from './tableConfig'
|
|
|
import { putAdqAdgroupsSync, getAdqAdgroupsList, delListAdqAdgroupsApi, newEditAdqAdgroupsDataApi, editAdqAdgroupsDataApi, putAdqAdgroupsSyncBatch, putModifyCustomAudienceApi } from '@/services/launchAdq/adq'
|
|
|
-import { CopyOutlined, DeleteOutlined, FieldTimeOutlined, PauseCircleOutlined, PlayCircleOutlined, SyncOutlined, TransactionOutlined } from '@ant-design/icons'
|
|
|
+import { CopyOutlined, DeleteOutlined, DownOutlined, FieldTimeOutlined, PauseCircleOutlined, PlayCircleOutlined, QuestionCircleOutlined, SyncOutlined, TransactionOutlined } from '@ant-design/icons'
|
|
|
import UpdateAd from './updateAd'
|
|
|
import Copy from './copy'
|
|
|
import PlanDetail from '@/pages/adMonitor/adMonitorList/components/planDetail'
|
|
@@ -448,25 +448,53 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
<Switch checkedChildren="普通" unCheckedChildren="ROI" checked={model} onChange={(checked) => { setModel(checked); setSelectedRows([]) }} style={model ? {} : { background: '#67c23a' }} />
|
|
|
</Col>
|
|
|
{model ? <>
|
|
|
- <Col><Button type='primary' style={{ background: '#1890ff' }} icon={<FieldTimeOutlined />} disabled={selectedRows.length === 0} onClick={editScheduling}>修改排期出价名称</Button></Col>
|
|
|
<Col><Button type='primary' style={{ background: '#1890ff' }} icon={<CopyOutlined />} disabled={selectedRows.length === 0} onClick={copyHandle}>复制</Button></Col>
|
|
|
<Col><Button type='primary' style={{ background: '#67c23a', borderColor: '#67c23a' }} loading={editAdqAdgroupsData.loading} icon={<PlayCircleOutlined />} disabled={selectedRows.length === 0} onClick={() => adStatus('play')}>启动</Button></Col>
|
|
|
<Col><Button type='primary' style={{ background: '#e6a23c', borderColor: '#e6a23c' }} loading={editAdqAdgroupsData.loading} icon={<PauseCircleOutlined />} disabled={selectedRows.length === 0} onClick={() => adStatus('suspend')}>暂停</Button></Col>
|
|
|
- <Col><Tooltip title="2023/4/20 16:20:00刷新页面后平台创建的广告可修改,或者其它平台使用定向包创建广告可用">
|
|
|
- <Button type='primary' loading={putModifyCustomAudience.loading} disabled={selectedRows.length > 0 ? !selectedRows.every((item: { accountId: number }) => item.accountId === selectedRows[0].accountId) : true} onClick={() => setRqb()}>修改人群包</Button>
|
|
|
- </Tooltip></Col>
|
|
|
- <Col><Button type='primary' style={{ background: '#00bcd4', borderColor: '#00bcd4' }} loading={putAdqAdgroupsSyncBatchApi.loading} icon={<SyncOutlined />} disabled={selectedRows.length === 0} onClick={syncAd}>同步广告</Button></Col>
|
|
|
<Col><SetEarlyWarning selectedRows={selectedRows} onChange={() => listAjax.refresh()} /></Col>
|
|
|
<Col>
|
|
|
- <Popconfirm
|
|
|
- title="确定删除?"
|
|
|
- onConfirm={() => deleteHandle(1)}
|
|
|
- okText="是"
|
|
|
- cancelText="否"
|
|
|
- disabled={selectedRows.length === 0}
|
|
|
- >
|
|
|
- <Button danger type='primary' loading={delListAdqAdgroups.loading} icon={<DeleteOutlined />} disabled={selectedRows.length === 0}>删除</Button>
|
|
|
- </Popconfirm>
|
|
|
+ <Dropdown overlay={<Menu items={[
|
|
|
+ {
|
|
|
+ key: '1',
|
|
|
+ disabled: selectedRows.length === 0,
|
|
|
+ label: <Button type="link" size='small' style={{ padding: 0 }} icon={<FieldTimeOutlined />} disabled={selectedRows.length === 0} onClick={editScheduling}>修改排期出价名称</Button>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '2',
|
|
|
+ disabled: selectedRows.length > 0 ? !selectedRows.every((item: { accountId: number }) => item.accountId === selectedRows[0].accountId) : true,
|
|
|
+ label: <Button type="link" size='small' style={{ padding: 0 }} loading={putModifyCustomAudience.loading} disabled={selectedRows.length > 0 ? !selectedRows.every((item: { accountId: number }) => item.accountId === selectedRows[0].accountId) : true} onClick={() => setRqb()}>
|
|
|
+ 修改人群包
|
|
|
+ <Tooltip title="2023/4/20 16:20:00刷新页面后平台创建的广告可修改,或者其它平台使用定向包创建广告可用">
|
|
|
+ <QuestionCircleOutlined />
|
|
|
+ </Tooltip>
|
|
|
+ </Button>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '3',
|
|
|
+ disabled: selectedRows.length === 0,
|
|
|
+ label: <Button type="link" size='small' style={{ padding: 0 }} loading={putAdqAdgroupsSyncBatchApi.loading} icon={<SyncOutlined />} disabled={selectedRows.length === 0} onClick={syncAd}>同步广告</Button>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '4',
|
|
|
+ disabled: selectedRows.length === 0,
|
|
|
+ label: <Popconfirm
|
|
|
+ title="确定删除?"
|
|
|
+ onConfirm={() => deleteHandle(1)}
|
|
|
+ okText="是"
|
|
|
+ cancelText="否"
|
|
|
+ disabled={selectedRows.length === 0}
|
|
|
+ >
|
|
|
+ <Button danger type="link" size='small' style={{ padding: 0 }} loading={delListAdqAdgroups.loading} icon={<DeleteOutlined />} disabled={selectedRows.length === 0}>删除</Button>
|
|
|
+ </Popconfirm>,
|
|
|
+ },
|
|
|
+ ]} />}>
|
|
|
+ <a onClick={(e) => e.preventDefault()}>
|
|
|
+ <Space>
|
|
|
+ 更多
|
|
|
+ <DownOutlined />
|
|
|
+ </Space>
|
|
|
+ </a>
|
|
|
+ </Dropdown>
|
|
|
</Col>
|
|
|
</> : <Col><Button type='primary' icon={<TransactionOutlined />} disabled={selectedRows.length === 0} onClick={editDeepConversion}>修改深度优化ROI</Button></Col>}
|
|
|
<Col>
|