shenwu il y a 2 ans
Parent
commit
8ac537f10e

+ 2 - 1
src/pages/launchSystemNew/adq/ad/index.tsx

@@ -165,9 +165,10 @@ const Ad: React.FC<Props> = (props) => {
         putAdqAdgroupsSyncBatchApi.run({adgroupIds:selectedRows?.map(item=>item.adgroupId)}).then(res=>{
             if(res){
                 message.success('同步成功!')
+                listAjax.refresh()
             }
         })
-    },[selectedRows])
+    },[selectedRows,listAjax])
     // 批量复制
     const copyHandle = () => {
         setCopyData({ visible: true })

+ 6 - 6
src/pages/launchSystemNew/adq/adAccount/index.tsx

@@ -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[]) => {