|
@@ -1,6 +1,6 @@
|
|
|
|
|
|
import { useAjax } from '@/Hook/useAjax'
|
|
|
-import { Row, message, Input } from 'antd'
|
|
|
+import { Row, message, Input, Space } from 'antd'
|
|
|
import React, { useEffect, useState, useCallback } from 'react'
|
|
|
import TableData from '../../components/TableData'
|
|
|
import tableConfig from './tableConfig'
|
|
@@ -30,20 +30,20 @@ type Props = {
|
|
|
}) => void
|
|
|
}
|
|
|
function AdAccount(props: Props) {
|
|
|
- let {accountId, adAccountId, userId ,tableIdClick} = props
|
|
|
+ let { accountId, adAccountId, userId, tableIdClick } = props
|
|
|
let [selectedRowKeys, setSelectedRowKeys] = useState<any[]>([])
|
|
|
const [queryForm, setQueryForm] = useState<{
|
|
|
pageNum: number;
|
|
|
pageSize: number;
|
|
|
accountIds?: string;
|
|
|
adcreativeName?: string;
|
|
|
- }>({pageNum: 1, pageSize: 20})
|
|
|
+ }>({ pageNum: 1, pageSize: 20 })
|
|
|
// api方法
|
|
|
const listAjax = useAjax((params) => getAdAccountListApi(params), { formatResult: true })
|
|
|
const syncAjax = useAjax((params) => putAdqAdAccountSyncByIds(params))
|
|
|
useEffect(() => {
|
|
|
getList()
|
|
|
- }, [queryForm, userId,accountId])
|
|
|
+ }, [queryForm, userId, accountId])
|
|
|
// 获取列表
|
|
|
const getList = useCallback(() => {
|
|
|
listAjax.run({ ...queryForm, putUserId: userId })
|
|
@@ -73,7 +73,7 @@ function AdAccount(props: Props) {
|
|
|
page={listAjax?.data?.data?.current}
|
|
|
pageSize={listAjax?.data?.data?.size}
|
|
|
leftChild={<>
|
|
|
- <Row gutter={[10, 10]}>
|
|
|
+ <Space>
|
|
|
<Input
|
|
|
placeholder='广告账号'
|
|
|
allowClear
|
|
@@ -111,7 +111,7 @@ function AdAccount(props: Props) {
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
|
- </Row>
|
|
|
+ </Space>
|
|
|
</>}
|
|
|
rowSelection={{
|
|
|
onChange: (selectedRowKeys: React.Key[], selectedRows: any[]) => {
|