|  | @@ -16,10 +16,11 @@ import EarlyWarning from '@/components/EarlyWarning'
 | 
	
		
			
				|  |  |  import SetEarlyWarning from '@/components/EarlyWarning/setEarlyWarning'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  type Props = {
 | 
	
		
			
				|  |  | -    accountId: string,
 | 
	
		
			
				|  |  | -    adAccountId: string,
 | 
	
		
			
				|  |  | +    accountId?: string,
 | 
	
		
			
				|  |  | +    adAccountId?: string,
 | 
	
		
			
				|  |  |      userId: string,
 | 
	
		
			
				|  |  | -    queryParmas: {
 | 
	
		
			
				|  |  | +    Ts?: any,
 | 
	
		
			
				|  |  | +    queryParmas?: {
 | 
	
		
			
				|  |  |          accountId?: string,//账户ID
 | 
	
		
			
				|  |  |          campaignId?: string,//计划ID
 | 
	
		
			
				|  |  |          adgroupId?: string,//广告ID
 | 
	
	
		
			
				|  | @@ -27,7 +28,7 @@ type Props = {
 | 
	
		
			
				|  |  |          pageId?: string,//落地页ID
 | 
	
		
			
				|  |  |          targetingId?: string,//定向ID}
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    tableIdClick: (props: {
 | 
	
		
			
				|  |  | +    tableIdClick?: (props: {
 | 
	
		
			
				|  |  |          activeKey: string, parma: {
 | 
	
		
			
				|  |  |              accountId?: string,//账户ID
 | 
	
		
			
				|  |  |              campaignId?: string,//计划ID
 | 
	
	
		
			
				|  | @@ -42,7 +43,7 @@ type Props = {
 | 
	
		
			
				|  |  |  const Ad: React.FC<Props> = (props) => {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /***********************/
 | 
	
		
			
				|  |  | -    let { accountId, adAccountId, userId, tableIdClick, queryParmas } = props
 | 
	
		
			
				|  |  | +    let { accountId, adAccountId, userId, tableIdClick, queryParmas, Ts } = props
 | 
	
		
			
				|  |  |      const [selectedRows, setSelectedRows] = useState<any[]>([])
 | 
	
		
			
				|  |  |      const [update, setUpdate] = useState<{ visible: boolean, title: string }>({ visible: false, title: '' })
 | 
	
		
			
				|  |  |      const [model, setModel] = useState(true)
 | 
	
	
		
			
				|  | @@ -72,14 +73,14 @@ const Ad: React.FC<Props> = (props) => {
 | 
	
		
			
				|  |  |      /************************/
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      useEffect(() => {
 | 
	
		
			
				|  |  | -        let { accountId, campaignId, adgroupId, ...obj } = queryParmas
 | 
	
		
			
				|  |  | -        let new_queryParmas = {
 | 
	
		
			
				|  |  | -            ...obj,
 | 
	
		
			
				|  |  | -            accountIdList: accountId ? [accountId] : [],
 | 
	
		
			
				|  |  | -            campaignIdList: campaignId ? [campaignId] : [],
 | 
	
		
			
				|  |  | -            adgroupIdList: adgroupId ? [adgroupId] : []
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        getList({ pageNum: 1, pageSize: 20, ...new_queryParmas, accountIdList: accountId ? [accountId] : [] })
 | 
	
		
			
				|  |  | +        // let { accountId, campaignId, adgroupId, ...obj } = queryParmas
 | 
	
		
			
				|  |  | +        // let new_queryParmas = {
 | 
	
		
			
				|  |  | +        //     ...obj,
 | 
	
		
			
				|  |  | +        //     accountIdList: accountId ? [accountId] : [],
 | 
	
		
			
				|  |  | +        //     campaignIdList: campaignId ? [campaignId] : [],
 | 
	
		
			
				|  |  | +        //     adgroupIdList: adgroupId ? [adgroupId] : []
 | 
	
		
			
				|  |  | +        // }
 | 
	
		
			
				|  |  | +        getList({ pageNum: 1, pageSize: 20 })
 | 
	
		
			
				|  |  |      }, [accountId, userId, queryParmas])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      // 获取列表
 | 
	
	
		
			
				|  | @@ -167,6 +168,7 @@ const Ad: React.FC<Props> = (props) => {
 | 
	
		
			
				|  |  |          putAdqAdgroupsSyncBatchApi.run({ adgroupIds: selectedRows?.map(item => item.adgroupId) }).then(res => {
 | 
	
		
			
				|  |  |              if (res) {
 | 
	
		
			
				|  |  |                  message.success('同步成功!')
 | 
	
		
			
				|  |  | +                listAjax.refresh()
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |      }, [selectedRows])
 | 
	
	
		
			
				|  | @@ -205,6 +207,9 @@ const Ad: React.FC<Props> = (props) => {
 | 
	
		
			
				|  |  |          {/* 复制广告 */}
 | 
	
		
			
				|  |  |          {copyData.visible && <Copy selectedRows={selectedRows} {...copyData} onClose={() => setCopyData({ visible: false })} onChange={() => { setCopyData({ visible: false }); listAjax.refresh(); setSelectedRows([]) }} />}
 | 
	
		
			
				|  |  |          <Row gutter={[6, 6]} align='middle' style={{ marginBottom: 15 }}>
 | 
	
		
			
				|  |  | +            <Col>
 | 
	
		
			
				|  |  | +                {Ts && Ts()}
 | 
	
		
			
				|  |  | +            </Col>
 | 
	
		
			
				|  |  |              <Col>
 | 
	
		
			
				|  |  |                  <Input
 | 
	
		
			
				|  |  |                      placeholder='广告账号'
 | 
	
	
		
			
				|  | @@ -358,7 +363,7 @@ const Ad: React.FC<Props> = (props) => {
 | 
	
		
			
				|  |  |          </Row>
 | 
	
		
			
				|  |  |          <TableData
 | 
	
		
			
				|  |  |              isCard={false}
 | 
	
		
			
				|  |  | -            columns={() => tableConfig(onChange, details, handleSave, tableIdClick)}
 | 
	
		
			
				|  |  | +            columns={() => tableConfig(onChange, details, handleSave)}
 | 
	
		
			
				|  |  |              ajax={listAjax}
 | 
	
		
			
				|  |  |              syncAjax={sync}
 | 
	
		
			
				|  |  |              fixed={{ left: 2, right: 4 }}
 | 
	
	
		
			
				|  | @@ -451,6 +456,8 @@ const Ad: React.FC<Props> = (props) => {
 | 
	
		
			
				|  |  |              onChange={(props: any) => {
 | 
	
		
			
				|  |  |                  let { sortData, pagination } = props
 | 
	
		
			
				|  |  |                  let { current, pageSize } = pagination
 | 
	
		
			
				|  |  | +                // console.log(pagination)
 | 
	
		
			
				|  |  | +                // console.log({...queryFrom, pageNum: current, pageSize })
 | 
	
		
			
				|  |  |                  set_queryFrom({ ...queryFrom, pageNum: current, pageSize })
 | 
	
		
			
				|  |  |                  getList({ ...queryFrom, pageNum: current, pageSize })
 | 
	
		
			
				|  |  |              }}
 |