Bläddra i källkod

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage

wjx 1 år sedan
förälder
incheckning
eaf69e19f7
1 ändrade filer med 67 tillägg och 68 borttagningar
  1. 67 68
      src/pages/launchSystemNew/adq/ad/index.tsx

+ 67 - 68
src/pages/launchSystemNew/adq/ad/index.tsx

@@ -512,73 +512,72 @@ const Ad: React.FC<Props> = (props) => {
                     <Col>
                         <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={<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><SetEarlyWarning selectedRows={selectedRows} onChange={() => listAjax.refresh()} /></Col>
-                        <Col>
-                            <Dropdown overlay={<Menu
-                                onClick={(e) => {
-                                    switch (e.key) {
-                                        case '1':
-                                            editScheduling()
-                                            break
-                                        case '2':
-                                            setRqb()
-                                            break
-                                        case '3':
-                                            syncAd()
-                                            break
-                                        case '4':
-                                            Modal.confirm({
-                                                title: '删除',
-                                                content: '确定删除?',
-                                                icon: <ExclamationCircleOutlined />,
-                                                okType: 'danger',
-                                                onOk() {
-                                                    deleteHandle(1)
-                                                }
-                                            });
-                                            break
-                                    }
-                                }}
-                                items={[
-                                    {
-                                        key: '1',
-                                        disabled: selectedRows.length === 0,
-                                        label: <Button type="link" size='small' style={{ padding: 0 }} icon={<FieldTimeOutlined />} disabled={selectedRows.length === 0}>修改排期出价名称</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 }} icon={<FormOutlined />} loading={putModifyCustomAudience.loading} disabled={selectedRows.length > 0 ? !selectedRows.every((item: { accountId: number }) => item.accountId === selectedRows[0].accountId) : true}>
-                                            修改人群包
-                                            <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}>同步广告</Button>,
-                                    },
-                                    {
-                                        key: '4',
-                                        disabled: selectedRows.length === 0,
-                                        label: <Button danger type="link" size='small' style={{ padding: 0 }} loading={delListAdqAdgroups.loading} icon={<DeleteOutlined />} disabled={selectedRows.length === 0}>删除</Button>,
-                                    },
-                                ]} />}>
-                                <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>}
+                    {!model && <Col><Button type='primary' icon={<TransactionOutlined />} disabled={selectedRows.length === 0} onClick={editDeepConversion}>修改深度优化ROI</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><SetEarlyWarning selectedRows={selectedRows} onChange={() => listAjax.refresh()} /></Col>
+                    <Col>
+                        <Dropdown overlay={<Menu
+                            onClick={(e) => {
+                                switch (e.key) {
+                                    case '1':
+                                        editScheduling()
+                                        break
+                                    case '2':
+                                        setRqb()
+                                        break
+                                    case '3':
+                                        syncAd()
+                                        break
+                                    case '4':
+                                        Modal.confirm({
+                                            title: '删除',
+                                            content: '确定删除?',
+                                            icon: <ExclamationCircleOutlined />,
+                                            okType: 'danger',
+                                            onOk() {
+                                                deleteHandle(1)
+                                            }
+                                        });
+                                        break
+                                }
+                            }}
+                            items={[
+                                {
+                                    key: '1',
+                                    disabled: selectedRows.length === 0,
+                                    label: <Button type="link" size='small' style={{ padding: 0 }} icon={<FieldTimeOutlined />} disabled={selectedRows.length === 0}>修改排期出价名称</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 }} icon={<FormOutlined />} loading={putModifyCustomAudience.loading} disabled={selectedRows.length > 0 ? !selectedRows.every((item: { accountId: number }) => item.accountId === selectedRows[0].accountId) : true}>
+                                        修改人群包
+                                        <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}>同步广告</Button>,
+                                },
+                                {
+                                    key: '4',
+                                    disabled: selectedRows.length === 0,
+                                    label: <Button danger type="link" size='small' style={{ padding: 0 }} loading={delListAdqAdgroups.loading} icon={<DeleteOutlined />} disabled={selectedRows.length === 0}>删除</Button>,
+                                },
+                            ]} />}>
+                            <a onClick={(e) => e.preventDefault()}>
+                                <Space>
+                                    更多
+                                    <DownOutlined />
+                                </Space>
+                            </a>
+                        </Dropdown>
+                    </Col>
                     <Col>
                         <Button type='dashed' onClick={() => { setCzjlShow(true) }}>操作记录</Button>
                     </Col>
@@ -588,7 +587,7 @@ const Ad: React.FC<Props> = (props) => {
                     <Col>
                         <AdIdSearch userId={userId} onChange={(e) => {
                             getList({ ...queryFrom, pageNum: 1, adgroupIdList: e })
-                        }}/>
+                        }} />
                     </Col>
                 </Row>
             </Space>}