shenwu hace 2 años
padre
commit
545cd0d567

+ 3 - 2
src/components/Tables/index.tsx

@@ -55,11 +55,12 @@ interface Props {
     handelResize?:(columns:any)=>void//当表头被拖动改变宽度时回调设置对应的本地保存
     sortDirections?: SortOrder[],
     isShowTotal?: boolean,  // 是否展示总计
+    myKey?:any,//自定义要用哪个值做key
 }
 
 function Tables(props: Props) {
     // //导出数据
-    let { columns, dataSource, excle, total,handelResize, rowSelection, onRow, isShowTotal = true, hideOnSinglePage, rowClassName, className, expandedRowRender, scroll, summary, showHeader, bordered, size = 'small', onChange, sortDirections, pagination, ...prop } = props
+    let { columns, dataSource, excle, total,handelResize, rowSelection, onRow, isShowTotal = true, hideOnSinglePage, rowClassName, className, expandedRowRender, scroll, summary, showHeader, bordered, size = 'small', onChange, sortDirections, pagination,myKey, ...prop } = props
     let handleExcle = () => {
         if (dataSource.length < 1) {
             message.error('请先搜索再导出');
@@ -119,7 +120,7 @@ function Tables(props: Props) {
             scroll={scroll ? { ...scroll, scrollToFirstRowOnChange: true } : undefined}
             size={size}
             rowKey={(a: any) => {
-                return (JSON.stringify(a?.id) || JSON.stringify(a?.key))
+                return (JSON.stringify(a?.id) || JSON.stringify(a?.key) || JSON.stringify(a[myKey]))
             }}
             rowSelection={rowSelection ? rowSelection : undefined}
             onRow={record => {

+ 2 - 2
src/pages/launchSystemNew/adq/creative/index.tsx

@@ -112,8 +112,8 @@ function Creative(props:{accountId:string}) {
                 </Row>
             </>}
             onChange={(props: any) => {
-                let { sortData, pagination } = props
-                let { current, pageSize } = pagination
+                // let { sortData, pagination } = props
+                // let { current, pageSize } = pagination
                 // getList({ pageNum: current, pageSize })
             }}
         />

+ 24 - 8
src/pages/launchSystemNew/adq/index.tsx

@@ -6,6 +6,8 @@ import Creative from './creative';
 import { useModel } from '@/.umi/plugin-model/useModel';
 import LandingPage from './landingPage';
 import { useAjax } from '@/Hook/useAjax';
+import { getAdAccountAllOfMember } from '@/services/launchAdq/adq';
+import Targeting from './targeting';
 const { TabPane } = Tabs;
 let Menus: any = Menu
 const tabsConfig = [
@@ -14,15 +16,20 @@ const tabsConfig = [
     { key: '3', tab: '广告', jsx: (props: any) => <Ad {...props} /> },
     { key: '4', tab: '创意', jsx: (props: any) => <Creative {...props} /> },
     { key: '5', tab: '落地页', jsx: (props: any) => <LandingPage {...props} /> },
-    { key: '6', tab: '定向', jsx: (props: any) => <LandingPage {...props} /> },
+    { key: '6', tab: '定向', jsx: (props: any) => <Targeting {...props} /> },
 ]
 function Adq() {
-    const [activeKey, setActiveKey] = useState('4')
+    const [activeKey, setActiveKey] = useState('6')
     const { getAdAccount } = useModel('useLaunchAdq.useAdAuthorize')
     const [menuKey, setmenuKey] = useState(['1'])
     const [childrenObj, setChildrenObj] = useState<any>({})
-    const [accountId, setaccountId] = useState<any>(getAdAccount?.data?.data[0].accountId)
+    const [accountId, setaccountId] = useState<any>()
+    const [idS,setIds]=useState({//需要用到的accountId,adAccountId
+        accountId:'',
+        adAccountId:''
+    })
     useEffect(() => {
+        // getAdAccountAllOfMember()
     }, [])
     useEffect(() => {
         // 获取账号列表
@@ -33,12 +40,16 @@ function Adq() {
                 if (res.data) {
                     setChildrenObj({
                         ...childrenObj,
-                        [name]: res.data?.map((item: { accountId: any; }) => {
-                            return { key: item.accountId, label: item.accountId + '_' + menuKey[0], }
+                        [name]: res.data?.map((item: { accountId: any; id:number}) => {
+                            return { key: item.accountId+'_'+item.id, label: item.accountId + '_' + item.id, }
                         })
                     })
+                    setaccountId(res.data[0].accountId+'_'+res.data[0].id)
+                    setIds({
+                        accountId:res.data[0].accountId,
+                        adAccountId:res.data[0].id
+                    })
                 }
-                setaccountId(res.data[0].accountId)
             })
         }
     }, [menuKey, childrenObj])
@@ -48,12 +59,17 @@ function Adq() {
     //     })
 
     // },[menuKey])
+    
     console.log(accountId)
     return <Row >
         <Col span={3} style={{ height: 'calc(100vh - 150px)' }}>
             <Menus
                 theme='light'
                 onClick={(e: any) => {
+                    let arr = e.key.split('_')
+                    let accountId = arr[0]
+                    let adAccountId = arr[1]
+                    setIds({accountId,adAccountId})
                     setaccountId(e.key)
                 }}
                 onOpenChange={(openKeys: any) => {
@@ -61,7 +77,7 @@ function Adq() {
                 }}
 
                 // style={{ width: 256 }}
-                // selectedKeys={}
+                selectedKeys={accountId}
                 mode="inline"
                 multiple={false}
                 openKeys={menuKey}
@@ -80,7 +96,7 @@ function Adq() {
                     {
                         tabsConfig?.map(item => {
                             return <TabPane tab={item.tab} key={item.key} >
-                                {item.jsx({ accountId })}
+                                {item.jsx(idS)}
                             </TabPane>
                         })
                     }

+ 94 - 5
src/pages/launchSystemNew/adq/landingPage/index.tsx

@@ -1,8 +1,97 @@
-import React,{useEffect} from 'react'
-import {} from 'antd'
+import React, { useEffect, useCallback } from 'react'
+import { Col, Input, message, Row } from 'antd'
+import { useAjax } from '@/Hook/useAjax'
+import { getAdqLandingPageList, putAdqLandingPage } from '@/services/launchAdq/adq'
+import TableData from '../../components/TableData'
+import tableConfig from './tableConfig'
 
-function LandingPage(){
-  
-    return <div>123</div>
+function LandingPage(props: { accountId: string, adAccountId: string }) {
+    let { accountId, adAccountId } = props
+    const listAjax = useAjax((params) => getAdqLandingPageList(params), { formatResult: true })
+    const syncAjax = useAjax((adAccountId) => putAdqLandingPage(adAccountId))
+    useEffect(() => {
+        getList({ pageNum: 1, pageSize: 20 })
+    }, [accountId])
+    // 获取列表
+    const getList = useCallback((params: {
+        pageNum: number;
+        pageSize: number;
+        accountId?: string;
+        pageName?: string;
+        pageType?: string;
+        pageTemplateId?: string;
+        pageStatus?: string;
+    }) => {
+        accountId &&  listAjax.run({ ...params, accountId })
+    }, [accountId])
+    // 同步 
+    const sync = useCallback(() => {
+        syncAjax.run(adAccountId).then(res => {
+            console.log(res)
+            res && listAjax.refresh()
+            res? message.success('同步成功!') : message.error('同步失败!')
+
+        })
+    }, [adAccountId, listAjax])
+    return <div>
+        <TableData
+            columns={tableConfig}
+            ajax={listAjax}
+            syncAjax={sync}
+            dataSource={listAjax?.data?.data?.records}
+            loading={listAjax?.loading || syncAjax?.loading}
+            // scroll={{ y: 600 }}
+            total={listAjax?.data?.data?.total}
+            page={listAjax?.data?.data?.current}
+            pageSize={listAjax?.data?.data?.size}
+            myKey={'pageId'}
+            leftChild={<>
+                <Row gutter={[10, 10]}>
+                    <Col>
+                        <Input
+                            placeholder='创意名称'
+                            allowClear
+                            onBlur={(e) => {
+                                let value = e.target.value
+                                getList({ pageNum: 1, pageSize: 20 })
+                            }}
+                            onKeyDownCapture={(e: any) => {
+                                let key = e.key
+                                if (key === 'Enter') {
+                                    let value = e.target.value
+                                    getList({ pageNum: 1, pageSize: 20 })
+                                }
+                            }}
+                            onChange={(e) => {
+                                let value = e.target.value
+                                if (!value) {
+                                    getList({ pageNum: 1, pageSize: 20 })
+                                }
+                            }}
+                        />
+                    </Col>
+                    {/* <Col>
+                        <Select placeholder='推广目标选择' style={{ minWidth: 200 }} showSearch filterOption={(input: any, option: any) =>
+                            (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
+                        } allowClear onChange={(value: any) => {
+                            getList({ pageNum: 1, pageSize: 20, accountId})
+                        }}>
+                            {
+                                Object.keys(PromotedObjectType).map(key => {
+                                    // let obj = JSON.parse(PromotedObjectType[key])
+                                    return <Select.Option value={key} key={key}>{PromotedObjectType[key]}</Select.Option>
+                                })
+                            }
+                        </Select>
+                    </Col> */}
+                </Row>
+            </>}
+            onChange={(props: any) => {
+                let { sortData, pagination } = props
+                let { current, pageSize } = pagination
+                getList({ pageNum: current, pageSize })
+            }}
+        />
+    </div>
 }
 export default LandingPage

+ 78 - 0
src/pages/launchSystemNew/adq/landingPage/tableConfig.tsx

@@ -0,0 +1,78 @@
+import { CanvasTypeEnum, PageStatusEnum, PageTypeEnum, PromotedObjectType, SourceTypeEnum, VideoResourceStatusEnum } from '@/services/launchAdq/enum'
+import React from 'react'
+import { Badge, Space } from 'antd'
+function tableConfig(): any {
+    return [
+        {
+            title: 'ID',
+            dataIndex: 'pageId',
+            key: 'pageId',
+            align: 'center',
+            width:100
+        },
+        {
+            title: '落地页名称',
+            dataIndex: 'pageName',
+            key: 'pageName',
+            align: 'center',
+        },
+        {
+            title: '原生页类型',
+            dataIndex: 'canvasType',
+            key: 'canvasType',
+            align: 'center',
+            width:110,
+            render: (a: string | number) => {
+                return CanvasTypeEnum[a]
+            }
+        },
+        {
+            title: '落地页类型',
+            dataIndex: 'pageType',
+            key: 'pageType',
+            align: 'center',
+            width:110,
+            render: (a: string) => {
+                return PageTypeEnum[a]
+            }
+        },
+        {
+            title: '落地页状态',
+            dataIndex: 'pageStatus',
+            key: 'pageStatus',
+            align: 'center',
+            width:90,
+            render:(a: string | number)=>{
+                return  <Badge status={a === 'NORMAL' ? "processing" :"error" } text={PageStatusEnum[a]} />
+            }
+        },
+        {
+            title: '配置来源',
+            dataIndex: 'sourceType',
+            key: 'sourceType',
+            align: 'center',
+            width:110,
+            render: (a: any, b: any) => {
+                return SourceTypeEnum[a]
+            }
+        },
+        {
+            title: '微信原生页视频资源状态',
+            dataIndex: 'videoResourceStatus',
+            key: 'videoResourceStatus',
+            align: 'center',
+            width:160,
+            render: (a: any, b: any) => {
+                return  <Badge status={a === 'VIDEO_RESOURCE_STATUS_VALID' ? "processing" :a === 'VIDEO_RESOURCE_STATUS_PENDING'? "warning" :"error" } text={VideoResourceStatusEnum[a]} />
+            }
+        },
+        {
+            title: '创建时间',
+            dataIndex: 'createdTime',
+            key: 'createdTime',
+            align: 'center',
+            width:160,
+        },
+    ]
+}
+export default tableConfig

+ 97 - 0
src/pages/launchSystemNew/adq/targeting/index.tsx

@@ -0,0 +1,97 @@
+import React, { useEffect, useCallback } from 'react'
+import { Col, Input, message, Row } from 'antd'
+import { useAjax } from '@/Hook/useAjax'
+import { getAdqTargetingList, putAdqTargetingSyncAll } from '@/services/launchAdq/adq'
+import TableData from '../../components/TableData'
+import tableConfig from './tableConfig'
+
+function Targeting(props: { accountId: string, adAccountId: string }) {
+    let { accountId, adAccountId } = props
+    const listAjax = useAjax((params) => getAdqTargetingList(params), { formatResult: true })
+    const syncAjax = useAjax((adAccountId) => putAdqTargetingSyncAll(adAccountId))
+    useEffect(() => {
+        getList({ pageNum: 1, pageSize: 20 })
+    }, [accountId])
+    // 获取列表
+    const getList = useCallback((params: {
+        pageNum: number;
+        pageSize: number;
+        accountId?: string;
+        pageName?: string;
+        pageType?: string;
+        pageTemplateId?: string;
+        pageStatus?: string;
+    }) => {
+        accountId && listAjax.run({ ...params, accountId })
+    }, [accountId])
+    // 同步 
+    const sync = useCallback(() => {
+        syncAjax.run(adAccountId).then(res => {
+            console.log(res)
+            res && listAjax.refresh()
+            res? message.success('同步成功!') : message.error('同步失败!')
+
+        })
+    }, [adAccountId, listAjax])
+    return <div>
+        <TableData
+            columns={tableConfig}
+            ajax={listAjax}
+            syncAjax={sync}
+            dataSource={listAjax?.data?.data?.records}
+            loading={listAjax?.loading || syncAjax?.loading}
+            scroll={{ x: 2000 }}
+            total={listAjax?.data?.data?.total}
+            page={listAjax?.data?.data?.current}
+            pageSize={listAjax?.data?.data?.size}
+            myKey={'targetingId'}
+            leftChild={<>
+                <Row gutter={[10, 10]}>
+                    <Col>
+                        <Input
+                            placeholder='定向名称'
+                            allowClear
+                            onBlur={(e) => {
+                                let value = e.target.value
+                                getList({ pageNum: 1, pageSize: 20 })
+                            }}
+                            onKeyDownCapture={(e: any) => {
+                                let key = e.key
+                                if (key === 'Enter') {
+                                    let value = e.target.value
+                                    getList({ pageNum: 1, pageSize: 20 })
+                                }
+                            }}
+                            onChange={(e) => {
+                                let value = e.target.value
+                                if (!value) {
+                                    getList({ pageNum: 1, pageSize: 20 })
+                                }
+                            }}
+                        />
+                    </Col>
+                    {/* <Col>
+                        <Select placeholder='推广目标选择' style={{ minWidth: 200 }} showSearch filterOption={(input: any, option: any) =>
+                            (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
+                        } allowClear onChange={(value: any) => {
+                            getList({ pageNum: 1, pageSize: 20, accountId})
+                        }}>
+                            {
+                                Object.keys(PromotedObjectType).map(key => {
+                                    // let obj = JSON.parse(PromotedObjectType[key])
+                                    return <Select.Option value={key} key={key}>{PromotedObjectType[key]}</Select.Option>
+                                })
+                            }
+                        </Select>
+                    </Col> */}
+                </Row>
+            </>}
+            onChange={(props: any) => {
+                let { sortData, pagination } = props
+                let { current, pageSize } = pagination
+                getList({ pageNum: current, pageSize })
+            }}
+        />
+    </div>
+}
+export default Targeting

+ 106 - 0
src/pages/launchSystemNew/adq/targeting/tableConfig.tsx

@@ -0,0 +1,106 @@
+import {  TargetingSourceTypeEnum,  } from '@/services/launchAdq/enum'
+import React from 'react'
+import { Badge, Tooltip } from 'antd'
+function tableConfig(): any {
+    return [
+        {
+            title: 'ID',
+            dataIndex: 'targetingId',
+            key: 'targetingId',
+            align: 'center',
+            width: 100
+        },
+        {
+            title: '定向名称',
+            dataIndex: 'targetingName',
+            key: 'targetingName',
+            align: 'center',
+            width: 250
+        },
+        {
+            title: '定向描述',
+            dataIndex: 'description',
+            key: 'description',
+            align: 'center',
+            width: 250
+        },
+        {
+            title: '地理位置',
+            dataIndex: 'targetingTranslation',
+            key: 'targetingTranslation',
+            align: 'center',
+            width: 600,
+            render: (a: any) => {
+                return <Tooltip
+                    overlayInnerStyle={a?.length > 200 ? { width: 800 } :{}}
+                    title={
+                        <div style={{ display: 'flex', flexFlow: 'column' }}>
+                            {
+                                a?.split(';')?.filter((str: any) => !!str)?.map((str: string) => {
+                                    let arr = str?.split(':')
+                                    return <span>{arr[0]}:<a>{arr[1]}</a></span>
+                                })
+                            }
+                        </div>
+                    }>
+                    <div style={{ display: 'flex', flexFlow: 'column' }}>
+                        {
+                            a?.split(';')?.filter((str: any) => !!str)?.map((str: string) => {
+                                if (str.includes('地理位置')) {
+                                    let arr = str?.split(':')
+                                    return <span>{arr[0]}:<a>{arr[1]}....</a></span>
+                                } else {
+                                    return null
+                                }
+                            })
+                        }
+                    </div>
+                </Tooltip>
+            }
+        },
+        {
+            title: '定向包来源',
+            dataIndex: 'targetingSourceType',
+            key: 'targetingSourceType',
+            align: 'center',
+            width: 170,
+            render: (a: string | number, b: any) => {
+                return <div style={{ display: 'flex', flexFlow: 'column' }}>
+                    <span> {a && TargetingSourceTypeEnum[a]}</span>
+                    {
+                        !!b?.shareFromAccountId && <span>来源账号ID:<a>{b?.shareFromAccountId}</a></span>
+                    }
+                    {
+                        !!b?.shareFromTargetingId && <span>来源包ID:<a>{b?.shareFromTargetingId}</a></span>
+                    }
+                </div>
+            }
+        },
+        {
+            title: '是否包含不支持定向',
+            dataIndex: 'includeUnsupportedTargeting',
+            key: 'includeUnsupportedTargeting',
+            align: 'center',
+            width: 90,
+            render: (a: boolean) => {
+                return <Badge status={!a ? "processing" : "error"} text={a ? '包含' : '不包含'} />
+            }
+        },
+        {
+            title: '创建时间',
+            dataIndex: 'createdTime',
+            key: 'createdTime',
+            align: 'center',
+            width: 160,
+        },
+        {
+            title: '最后修改时间',
+            dataIndex: 'lastModifiedTime',
+            key: 'lastModifiedTime',
+            align: 'center',
+            width: 160,
+        },
+
+    ]
+}
+export default tableConfig

+ 26 - 9
src/pages/launchSystemNew/components/TableData/index.tsx

@@ -1,7 +1,7 @@
 import CustomListModel from '@/components/CustomList'
 import Tables from '@/components/Tables'
 import { quanpin } from '@/utils/fullScreen'
-import { FullscreenExitOutlined, FullscreenOutlined, RedoOutlined, SettingOutlined } from '@ant-design/icons'
+import { FullscreenExitOutlined, FullscreenOutlined, RedoOutlined, SettingOutlined, SyncOutlined } from '@ant-design/icons'
 import { Button, Card, Col, Row, Space, Spin, Tooltip, } from 'antd'
 import { ColumnsType } from 'antd/lib/table'
 import React, { useEffect, useRef, useState, useCallback } from 'react'
@@ -36,12 +36,14 @@ interface Prosp {
         }
     }) => void,
     ajax?: any,//接口刷新
+    syncAjax?:any,//同步
     hoverable?: boolean,
-    rowSelection?: any
+    rowSelection?: any,
+    myKey?:any,//自定义使用哪个值做key
 }
 
 function TableData(props: Prosp) {
-    const { isZj, scroll, columns, title, dataSource, expandedRowRender, className, leftChild, page = undefined, rowSelection = false, pageSize = undefined, size = 'small', total = 0, loading = false, onChange, config, configName, ajax, hoverable = true } = props
+    const { isZj, scroll, columns, title, dataSource, expandedRowRender, className, leftChild, page = undefined, rowSelection = false, pageSize = undefined, size = 'small', total = 0, loading = false, onChange, config, configName, ajax,syncAjax, hoverable = true ,myKey} = props
     const { state: userState } = useModel('useOperating.useUser')
     const { isFell } = userState
     const [visible, setVisible] = useState<boolean>(false)
@@ -129,29 +131,43 @@ function TableData(props: Prosp) {
                     {leftChild}
                 </Space>
                 {/*紧凑*/}
-                <Space style={{ float: 'right' }}>
+                <div style={{ float: 'right',display:'flex',flexFlow:'row' }}>
                     {
                         ajax && <Button
                             size='small'
                             type='text'
+                            style={{display:'flex',alignItems:'center'}}
                             onClick={() => {
                                 ajax.refresh()
                             }}>
                             <span style={{ fontSize: 10, color: '#999' }}>刷新时间:{ajax?.data?.reqTime}</span>
-                            <Tooltip title='刷新'><RedoOutlined /></Tooltip>
+                            <Tooltip title='刷新'><RedoOutlined style={{color:'#2196f3',fontSize:17}}/></Tooltip>
+                        </Button>
+                    }
+                    {
+                        syncAjax && <Button
+                            size='small'
+                            type='text'
+                            style={{display:'flex',alignItems:'center'}}
+                            onClick={() => {
+                                syncAjax()
+                            }}>
+                            <Tooltip title='同步最新'><SyncOutlined style={{color:'red',fontSize:17}}/></Tooltip>
                         </Button>
                     }
                     {config && <Button
                         size='small'
                         type='text'
+                        style={{display:'flex',alignItems:'center'}}
                         onClick={() => {
                             setVisible(true)
                         }}>
-                        <Tooltip title='设置'><SettingOutlined /></Tooltip>
+                        <Tooltip title='设置'><SettingOutlined style={{fontSize:17}}/></Tooltip>
                     </Button>}
                     <Button
                         type='text'
                         size='small'
+                        style={{display:'flex',alignItems:'center'}}
                         onClick={() => {
                             if (ref?.current) {
                                 quanpin(ref?.current)
@@ -162,7 +178,7 @@ function TableData(props: Prosp) {
                         }
                     </Button>
                     {visible && <CustomListModel version={version} config={config} configName={configName} visible={visible} onClose={() => { setVisible(false) }} onChange={(arr: any) => { setSelectData(arr) }} columns={newColumns?.length > 0 ? newColumns : columns()} />}
-                </Space>
+                </div>
             </Col>
         </Row>
     </Col>
@@ -176,7 +192,7 @@ function TableData(props: Prosp) {
             >
                 <Row gutter={[0, 20]}>
                     {header}
-                    <Tab {...{ size, newColumns, handelResize, className, isZj, rowSelection, columns, loading, scroll, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax }} />
+                    <Tab {...{ size, newColumns, handelResize, className, isZj, rowSelection, columns, loading, scroll, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax ,myKey}} />
                 </Row>
             </Card>
         </Col>
@@ -188,7 +204,7 @@ function TableData(props: Prosp) {
 
 /**表格 */
 const Tab = React.memo((props: any) => {
-    const { size, newColumns, className, handelResize, columns, scroll, loading, rowSelection, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax } = props
+    const { size, newColumns, className, handelResize, columns, scroll, loading, rowSelection, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax ,myKey} = props
     return < Col span={24} >
         <div className={`${style[size]} ${className ? style[className] : ''} `}>
             {dataSource || !ajax?.loading ? <Tables
@@ -209,6 +225,7 @@ const Tab = React.memo((props: any) => {
                 defaultPageSize={20}
                 rowSelection={rowSelection}
                 handelResize={((columns: any) => handelResize(columns))}
+                myKey={myKey}
             /> : <div className={style.example}>
                 <Spin />
             </div>}

+ 1 - 1
src/pages/launchSystemNew/launchManage/localAd/ad/index.tsx

@@ -72,7 +72,7 @@ function Ad() {
             ajax={sysAdgroupsList}
             dataSource={sysAdgroupsList?.data?.data?.records}
             loading={sysAdgroupsList?.loading}
-            scroll={{ y: 600 }}
+            // scroll={{ y: 600 }}
             total={sysAdgroupsList?.data?.data?.total}
             page={sysAdgroupsList?.data?.data?.current}
             pageSize={sysAdgroupsList?.data?.data?.size}

+ 1 - 1
src/pages/launchSystemNew/launchManage/localAd/creative/index.tsx

@@ -72,7 +72,7 @@ function Creative() {
             ajax={sysAdcreativeList}
             dataSource={sysAdcreativeList?.data?.data?.records}
             loading={sysAdcreativeList?.loading}
-            scroll={{ y: 600 }}
+            // scroll={{ y: 600 }}
             total={sysAdcreativeList?.data?.data?.total}
             page={sysAdcreativeList?.data?.data?.current}
             pageSize={sysAdcreativeList?.data?.data?.size}

+ 1 - 1
src/pages/launchSystemNew/launchManage/localAd/targeting/index.tsx

@@ -71,7 +71,7 @@ function Targeting() {
             ajax={list}
             dataSource={list?.data?.data?.records}
             loading={list?.loading}
-            scroll={{ y: 600 }}
+            // scroll={{ y: 600 }}
             total={list?.data?.data?.total}
             page={list?.data?.data?.current}
             pageSize={list?.data?.data?.size}

+ 78 - 15
src/services/launchAdq/adq.ts

@@ -1,8 +1,54 @@
 import { request } from 'umi';
 import { api } from '../api';
 
-
-
+/**
+ * 获取组员及组员账号列表
+*/
+export async function getAdAccountAllOfMember() {
+  return request(api + '/adq/adAccount/allOfMember');
+}
+// export async function get_allOfMember() {
+//   return fetch(api + '/adq/adAccount/allOfMember',{
+//     headers:{
+//       "content-Type":"application/json;charset=UTF-8",
+//       "Authorization": `Bearer ${sessionStorage.getItem("Admin-Token")}`
+//     }
+//   }).then(res=>res.json())
+// }
+/**
+ * 获取ADQ广告列表
+ * @param adgroupName 广告名称
+ * @param promotedObjectType 广告类型
+ * @param accountId 账户ID
+ * @param adgroupName 广告名称
+ */
+ export async function getAdqAdgroupsList(params: {
+  pageNum: number;
+  pageSize: number;
+  accountId: string;
+  adgroupName?:string
+}) {
+  return request(api + '/adq/adgroups/list', {
+    method: 'POST',
+    data: params,
+  });
+}
+/**
+ * 同步ADQ广告列表
+ * @param accountId 账户ID
+ * @param adgroupIds id列表
+ * @param lastModifiedTime 时间 yyyy
+ */
+ export async function putAdqAdgroupsSync(params: {
+  adgroupIds?: any[];
+  accountId: string;
+  lastModifiedTime?:string
+}) {
+  return request(api + '/adgroups/sync', {
+    method: 'POST',
+    data: params,
+  });
+}
 /**
  * 获取ADQ创意列表
  * @param adgroupName 广告名称
@@ -43,7 +89,7 @@ export async function getAdqLandingPageList(params: {
 
 /**
  * 按账号同步落地页
- * @param accountId 账户ID
+ * @param adAccountId 本地ID
  */
  export async function putAdqLandingPage(adAccountId: any) {
   return request(api + `/adq/landingPageWechat/syncAll/${adAccountId} `, {
@@ -51,16 +97,33 @@ export async function getAdqLandingPageList(params: {
   });
 }
 /**
- * 获取组员及组员账号列表
-*/
-export async function getAdAccountAllOfMember() {
-  return request(api + '/adq/adAccount/allOfMember');
+ * 获取ADQ定向列表
+ * @param adgroupName 广告名称
+ * @param promotedObjectType 广告类型
+ * @param accountId 账户ID
+ */
+export async function getAdqTargetingList(params: {
+  pageNum: number;
+  pageSize: number;
+  accountId: string;
+  pageName: string;
+  pageType: string;
+  pageTemplateId: string;
+  pageStatus: string;
+}) {
+  return request(api + '/adq/targeting/list ', {
+    method: 'POST',
+    data: params,
+  });
 }
-// export async function get_allOfMember() {
-//   return fetch(api + '/adq/adAccount/allOfMember',{
-//     headers:{
-//       "content-Type":"application/json;charset=UTF-8",
-//       "Authorization": `Bearer ${sessionStorage.getItem("Admin-Token")}`
-//     }
-//   }).then(res=>res.json())
-// }
+
+/**
+ * 按账号同步ADQ定向列表
+ * @param adAccountId 本地ID
+ */
+ export async function putAdqTargetingSyncAll(adAccountId: any) {
+  return request(api + `/adq/targeting/syncAll/${adAccountId} `, {
+    method: 'PUT',
+  });
+}
+

+ 33 - 1
src/services/launchAdq/enum.ts

@@ -357,4 +357,36 @@ export enum CrowdSourceEnum {
   ADVERTISER_OWN_DATA = '一方人群',
   TENCENT_DATA = '二方人群',
   UNKNOWN = '未知类型',
-}
+}
+
+/**微信原生页视频资源状态*/
+export enum VideoResourceStatusEnum {
+  VIDEO_RESOURCE_STATUS_VALID = '有效',
+  VIDEO_RESOURCE_STATUS_PENDING = '待处理',
+  VIDEO_RESOURCE_ERROR = '异常',
+}
+
+/**配置来源*/
+export enum SourceTypeEnum {
+  UNKNOWN = '未知',
+  SOURCE_TYPE_EQQ = '投放端配置',
+  SOURCE_TYPE_CRM = '内部工具配置',
+}
+/**落地页状态*/
+export enum PageStatusEnum {
+  NORMAL = '有效',
+  DELETED = '删除',
+}
+/**原生页类型*/
+export enum CanvasTypeEnum {
+  CANVAS_TYPE_VIDEO = '顶部组件是视频',
+  CANVAS_TYPE_IMAGE = '顶部组件是图片',
+  CANVAS_TYPE_PORTRAIT_VIDEO = '竖版视频(高 1536)',
+  CANVAS_TYPE_PORTRAIT_VIDEO_2 = '竖版视频(高 1334)',
+  CANVAS_TYPE_COMMON_PAGE = ' 引用外层素材原生页',
+}
+/**定向包来源*/
+export enum TargetingSourceTypeEnum {
+  TARGETING_SOURCE_TYPE_CREATE = '自己创建',
+  TARGETING_SOURCE_TYPE_SHARE = '他人分享',
+}