shenwu 2 vuotta sitten
vanhempi
commit
de34f38306

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

@@ -1,7 +1,7 @@
 import { FnAjax, useAjax } from '@/Hook/useAjax'
 import { Data, ListData, SysAdgroupsDTO } from '@/services/launchAdq'
 import { PromotedObjectType } from '@/services/launchAdq/enum'
-import { createSysAdgroups, getSysAdgroupsList } from '@/services/launchAdq/localAd'
+import { createSysAdgroups, getSysAdgroupsInfo, getSysAdgroupsList } from '@/services/launchAdq/localAd'
 import { Col, Row, Input, Select, Button } from 'antd'
 import React, { useEffect, useState, useCallback } from 'react'
 import TableData from '../../../components/TableData'
@@ -11,17 +11,20 @@ import tableConfig from './tableConfig'
 export interface ModalConfig {
     visible: boolean;
     title?: string;
+    type?:'add'|'look'|'edit',
+    dataInfo?:null
 }
 
 function Ad() {
     // 变量
     const [modalConfig, setModalConfig] = useState<ModalConfig>({
         visible: false,
-        title: '新建'
+        type:'add'
     })
     const [oldsearchData, setOldsearchData] = useState<any>(null)
     // api方法
     const sysAdgroupsList: FnAjax<ListData<SysAdgroupsDTO> | any>  = useAjax((params) => getSysAdgroupsList(params),{formatResult:true})
+    const getSysAdgroupsInfos:any = useAjax((adgroupsId) => getSysAdgroupsInfo(adgroupsId),{formatResult:true})
     const createSysAdgroup = useAjax((params) => createSysAdgroups(params))
     // 初始获取列表
     useEffect(() => {
@@ -52,10 +55,20 @@ function Ad() {
             }
         })
     }, [sysAdgroupsList])
-    console.log('sysAdgroupsList',sysAdgroupsList)
+    // 获取详情
+    const getInfo = useCallback((adgroupsId,type)=>{
+        getSysAdgroupsInfos.run(adgroupsId).then((res: any)=>{
+            setModalConfig({...modalConfig,visible:true,type,dataInfo:res.data})
+        })
+    },[modalConfig])
+    // 回调
+    const callback=useCallback((data,type)=>{
+        getInfo(data.id,type)
+
+    },[])
     return <div>
         <TableData
-            columns={tableConfig}
+            columns={()=>tableConfig(callback)}
             ajax={sysAdgroupsList}
             dataSource={sysAdgroupsList?.data?.data?.records}
             loading={sysAdgroupsList?.loading}
@@ -115,7 +128,7 @@ function Ad() {
         // config={guanggao}
         // configName={'广告模板列表'}
         />
-        {modalConfig.visible && <AdModal visible={modalConfig.visible} title={modalConfig.title} PupFn={handleModalConfig} callback={submit} confirmLoading={createSysAdgroup.loading} />}
+        {modalConfig.visible && <AdModal visible={modalConfig.visible} PupFn={handleModalConfig} callback={submit} confirmLoading={createSysAdgroup.loading} type={modalConfig.type} dataInfo={modalConfig.dataInfo}/>}
     </div>
 }
 export default Ad

+ 40 - 11
src/pages/launchSystemNew/launchManage/localAd/ad/modal.tsx

@@ -1,5 +1,5 @@
 import React, { useCallback, useEffect } from 'react'
-import { Modal, Form, Input, Divider, Select, Radio, DatePicker, Switch, Checkbox } from 'antd'
+import { Modal, Form, Input, Divider, Select, Radio, DatePicker, Switch, Checkbox, message } from 'antd'
 import { SiteSetEnum, BidModeEnum, OptimizationGoalEnum, BidStrategyEnum, PromotedObjectType, EducationEnum } from '@/services/launchAdq/enum'
 import { ModalConfig } from '.'
 import moment from 'moment';
@@ -8,15 +8,16 @@ import { getSceneTagsList } from '@/services/launchAdq/global';
 const { RangePicker }: { RangePicker: any } = DatePicker;
 let DatePickers: any = DatePicker
 interface Props {
-    title?: string,
     visible: boolean,
     PupFn: (arg: ModalConfig) => void,
     callback: (params: any) => void,
-    confirmLoading: boolean
+    confirmLoading: boolean,
+    type?: 'add' | 'look' | 'edit',//新增,查看,编辑
+    dataInfo?: any
 }
 /**广告模板*/
 function AdModal(props: Props) {
-    let { visible, title, confirmLoading, PupFn, callback } = props
+    let { visible, confirmLoading, PupFn, callback, type, dataInfo } = props
     const sceneTagsList = useAjax((params) => getSceneTagsList(params))
     const [form] = Form.useForm();
     let dateType = Form.useWatch('dateType', form)
@@ -26,6 +27,7 @@ function AdModal(props: Props) {
     let siteSet = Form.useWatch('siteSet', form)
     let wechatPositionType = Form.useWatch('wechatPositionType', form)
     let wechatSceneType = Form.useWatch('wechatSceneType', form)
+
     // 确定事件
     const handleOk = useCallback(() => {
         form.validateFields().then(values => {
@@ -54,7 +56,7 @@ function AdModal(props: Props) {
                                 }
                             }
                         }
-                        
+
                         break;
                 }
             })
@@ -79,20 +81,45 @@ function AdModal(props: Props) {
             delete newValues['date']
             newValues['timeSeries'] = Array(336).fill(1).join('')
             console.log(newValues)
-            // callback(newValues)
+            callback(newValues)
         })
-        // PupFn({ visible: false })
     }, [form])
     // 场景定向
     useEffect(() => {
         sceneTagsList.run({ typeList: ['WECHAT_POSITION', 'OFFICIAL_ACCOUNT_MEDIA_CATEGORY', 'MINI_PROGRAM_AND_MINI_GAME', 'PAY_SCENE'] })
     }, [])
-    console.log()
+    // 数据回填
+    useEffect(() => {
+        if (dataInfo) {
+            console.log('dataInfo', dataInfo)
+            form.setFieldsValue({
+                adgroupName: dataInfo?.adgroupName,//广告名称
+                promotedObjectType: dataInfo?.promotedObjectType,//推广目标
+                siteSet: dataInfo?.siteSet,//广告版位
+                autoAcquisitionEnabled: dataInfo?.autoAcquisitionEnabled,//一键起量
+                bidAmount: dataInfo?.bidAmount,//出价
+                smartBidType: dataInfo?.smartBidType,//出价类型
+                bidStrategy: dataInfo?.bidStrategy,//出价策略
+                bidMode: dataInfo?.bidMode,//出价方式
+                optimizationGoal: dataInfo?.optimizationGoal,//优化目标
+                dateType: dataInfo?.endDate ? '1' : '2',//投放日期
+                dailyBudget: dataInfo?.dailyBudget,//广告日预算
+                date: dataInfo?.endDate ? [moment(dataInfo?.beginDate), moment(dataInfo?.endDate)] : moment(dataInfo?.beginDate),//日期
+                autoAcquisitionBudget: dataInfo?.autoAcquisitionBudget,//起量预算
+                wechatPositionType: dataInfo?.sceneSpec?.wechatPosition ? '1' : '0',//微信公众号与小程序定投
+                wechatPosition: dataInfo?.sceneSpec?.wechatPosition,//微信公众号与小程序定投
+                wechatSceneType: dataInfo?.sceneSpec?.wechatScene?.officialAccountMediaCategory || dataInfo?.sceneSpec?.wechatScene?.miniProgramAndMiniGame || dataInfo?.sceneSpec?.wechatScene?.payScene ? '1' : '0',//微信公众号与小程序场景
+                officialAccountMediaCategory: dataInfo?.sceneSpec?.wechatScene?.officialAccountMediaCategory,//公众号媒体类型
+                miniProgramAndMiniGame: dataInfo?.sceneSpec?.wechatScene?.miniProgramAndMiniGame,//小程序小游戏流量类型
+                payScene: dataInfo?.sceneSpec?.wechatScene?.payScene,//订单详情页消费场景
+            })
+        }
+    }, [dataInfo])
     return <Modal
         visible={visible}
-        title={title + '广告'}
+        title={type === 'add' ? '新建广告' : type === 'look' ? '广告详情' : '编辑广告'}
         onCancel={() => { PupFn({ visible: false }) }}
-        onOk={handleOk}
+        onOk={type === 'look' ? () => message.warning('详情无法改动内容') : handleOk}
         width={900}
         confirmLoading={confirmLoading}
     >
@@ -101,6 +128,8 @@ function AdModal(props: Props) {
             labelCol={{ span: 5 }}
             initialValues={
                 {
+                    promotedObjectType: 'PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT',
+                    siteSet: ['SITE_SET_MOMENTS', 'SITE_SET_WECHAT'],
                     bidMode: 'BID_MODE_OCPM',
                     dateType: '2',
                     bidStrategy: 'BID_STRATEGY_AVERAGE_COST',
@@ -108,7 +137,7 @@ function AdModal(props: Props) {
                     smartBidType: 'SMART_BID_TYPE_CUSTOM',
                     autoAcquisitionEnabled: false,
                     wechatSceneType: '0',
-                    wechatPositionType: '0'
+                    wechatPositionType: '0',
                 }
             }
         >

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

@@ -1,11 +1,14 @@
 import { PromotedObjectType } from '@/services/launchAdq/enum'
-function tableConfig():any{
+import React from 'react'
+import { Space } from 'antd'
+function tableConfig(callback:(data:any,type:'edit'|'look')=>void):any{
     return [
         {
             title: 'ID',
             dataIndex: 'id',
             key: 'id',
             align: 'center',
+            width:70,
         },
         {
             title: '广告名称',
@@ -43,6 +46,19 @@ function tableConfig():any{
             key: 'createTime',
             align: 'center',
         },
+        {
+            title:'操作',
+            dataIndex:'cz',
+            key: 'cz',
+            align: 'center',  
+            render:(a: any,b: any)=>{
+               return <Space>
+                    <a onClick={()=>{
+                        callback(b,'look')
+                    }}>详情</a>
+                </Space>
+            }
+        }
     ]
 }
 export default tableConfig

+ 75 - 35
src/pages/launchSystemNew/launchManage/localAd/creative/modal.tsx

@@ -10,8 +10,6 @@ import { AdcreativeTemplate, AdcreativeTemplateList } from '@/services/launchAdq
 import { mySet } from '@/utils/arrFn'
 import SelectCloud from '@/pages/launchSystemNew/components/selectCloud'
 import { useModel } from '@/.umi/plugin-model/useModel'
-import { DebounceSelect, fetchUserList } from '@/components/DebounceSelect'
-import e from '@umijs/deps/compiled/express'
 interface Props {
     title?: string,
     visible: boolean,
@@ -32,6 +30,7 @@ function CreativeModal(props: Props) {
     const [adcreative_template_list, set_adcreative_template_list] = useState<AdcreativeTemplateList[]>([])
     const [selectImgVisible, set_selectImgVisible] = useState(false)
     const [descriptionShow, setdescriptionshow] = useState(false)
+    const [endPageDescShow, setendPageDescnshow] = useState(false)
     const [titleShow, settitleshow] = useState(false)
     const [form] = Form.useForm();
     const [pupState, setPupState] = useState({
@@ -58,6 +57,8 @@ function CreativeModal(props: Props) {
     let conversionDataType = Form.useWatch('conversionDataType', form)
     let titles = Form.useWatch('title', form)
     let description = Form.useWatch('description', form)
+    let videoOver = Form.useWatch('videoOver', form)
+    let endPageDesc = Form.useWatch('endPageDesc', form)
 
     // 确定事件
     const handleOk = useCallback(() => {
@@ -237,6 +238,12 @@ function CreativeModal(props: Props) {
                     states = { ...states, xd_show: false }
                 }
             }
+            // 视频结束页 end_page
+            if (adcreative_template.adcreativeElements.some(item => item.name === 'end_page')) {
+                // let endPageType =adcreative_template?.adcreativeElements?.filter(item=>item.name === 'end_page_type')[0]?.enumProperty?.enumeration
+                values = { ...values, endPageType: 'END_PAGE_AVATAR_NICKNAME_HIGHLIGHT' }
+                states = { ...states, sp_show: true }
+            }
             setPupState(states)
             form.setFieldsValue(values)
         }
@@ -257,10 +264,17 @@ function CreativeModal(props: Props) {
         let modal = document.querySelector('.myModal')
         let onBiurdescription = (e: any) => {
             let d = document.querySelector('.my_description')
+            let t = document.querySelector('.my_title')
+            let p = document.querySelector('.my_endPageDesc')
             if (!d?.contains(e.target)) {
                 setdescriptionshow(false)
+            }
+            if (!t?.contains(e.target)) {
                 settitleshow(false)
             }
+            if (!p?.contains(e.target)) {
+                setendPageDescnshow(false)
+            }
         }
         modal?.addEventListener('click', onBiurdescription)
         return () => {
@@ -438,11 +452,12 @@ function CreativeModal(props: Props) {
                         {
                             adcreative_template?.adcreativeElements?.filter(item => item.name === 'title').map(item => {
                                 return <div key={item.fieldType}>
-                                    <Form.Item label={<strong>{item.description}(选填)</strong>} className={'my_description'} >
-                                        <Form.Item name={item.name} rules={[{ pattern: RegExp(item.restriction.textRestriction.textPattern), message: '请输入正确的' + item.description }]} noStyle>
+                                    <Form.Item label={<strong>{item.description}(选填)</strong>} className={'my_title'} >
+                                        <Form.Item name={item.name} rules={[{ pattern: RegExp(item.restriction.textRestriction.textPattern?.replace(/\+/ig, `{1,${item.restriction.textRestriction.maxLength}}`)), message: '请输入正确的' + item.description }]} noStyle>
                                             <Input
                                                 placeholder={'请输入' + item.description}
                                                 style={{ width: 500 }}
+                                                allowClear
                                                 onFocus={() => {
                                                     settitleshow(true)
                                                     textList({ maxTextLength: item.restriction.textRestriction.maxLength })
@@ -453,7 +468,7 @@ function CreativeModal(props: Props) {
                                                 }}
                                             />
                                         </Form.Item>
-                                        <span>{`${titles?.length??0}/${item.restriction.textRestriction.maxLength}`}</span>
+                                        <span>{`${titles?.length ?? 0}/${item.restriction.textRestriction.maxLength}`}</span>
                                         {
                                             titleShow && <List
                                                 loading={getTextLsit?.loading}
@@ -475,7 +490,7 @@ function CreativeModal(props: Props) {
                             adcreative_template?.adcreativeElements?.filter(item => item.required && item.name === 'description').map(item => {
                                 return <div key={item.fieldType}>
                                     <Form.Item label={<strong>{item.description}</strong>} className={'my_description'}>
-                                        <Form.Item name={item.name} noStyle rules={[{ required: true, pattern: RegExp(item.restriction.textRestriction.textPattern), message: '请输入正确的' + item.description }]}>
+                                        <Form.Item name={item.name} noStyle rules={[{ required: true, pattern: RegExp(item.restriction.textRestriction.textPattern?.replace(/\+/ig, `{1,${item.restriction.textRestriction.maxLength}}`)), message: '请输入正确的' + item.description }]}>
                                             <Input
                                                 placeholder={'请输入' + item.description}
                                                 style={{ width: 500 }}
@@ -490,7 +505,7 @@ function CreativeModal(props: Props) {
                                                 allowClear
                                             />
                                         </Form.Item>
-                                        <span>{`${description?.length??0}/${item.restriction.textRestriction.maxLength}`}</span>
+                                        <span>{`${description?.length ?? 0}/${item.restriction.textRestriction.maxLength}`}</span>
                                         {
                                             descriptionShow && <List
                                                 loading={getTextLsit?.loading}
@@ -587,37 +602,62 @@ function CreativeModal(props: Props) {
                             </>
                         }
                         {/* ============================================================视频结束页============================================================= */}
-                        {/* {pupState.sp_show && <Form.Item label={<strong>视频结束页</strong>} name='videoOver' valuePropName="checked">
-                <Switch checkedChildren="开启" unCheckedChildren="关闭" />
-            </Form.Item>}
-            {
-                videoOver && <>
-                    <div style={{ display: 'flex' }}>
-                        <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>视频结束页类型</strong></p>
-                        <Form.Item name='linkNameType'>
-                            <Select style={{ width: 200 }} showSearch filterOption={(input, option) =>
-                                (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
-                            } allowClear>
-                                {
-                                    linkNameList?.map((item: { link_name_type: string; description: string; }, index: number) => {
-                                        return <Select.Option value={item.link_name_type} key={item.link_name_type}>{item.description}</Select.Option>
-                                    })
-                                }
-                            </Select>
-                        </Form.Item>
-                    </div>
-                    <div style={{ display: 'flex' }}>
-                        <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>结束文案</strong></p>
-                        <Form.Item name='linkPageType'>
-                            <Input placeholder='请输入结束页文案'/>
-                        </Form.Item>
-                    </div>
-                </>
-            }*/}
+                        {pupState.sp_show && <Form.Item label={<strong>视频结束页</strong>} name='videoOver' valuePropName="checked">
+                            <Switch checkedChildren="开启" unCheckedChildren="关闭" />
+                        </Form.Item>}
+                        {
+                            videoOver && <>
+                                <div style={{ display: 'flex', alignItems: 'center', marginBottom: 10 }}>
+                                    <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>视频结束页类型</strong></p>
+                                    <Form.Item name='endPageType' style={{ marginBottom: 0 }} >
+                                        <Radio.Group>
+                                            {
+                                                adcreative_template?.adcreativeElements?.filter(item => item.name === 'end_page_type')[0]?.enumProperty?.enumeration?.map((item) => {
+                                                    return <Radio.Button value={item.value} key={item.value}>{item.description}</Radio.Button>
+                                                })
+                                            }
+                                        </Radio.Group>
+                                    </Form.Item>
+                                </div>
+                                <div className={'my_endPageDesc'}>
+                                    <div style={{ display: 'flex', alignItems: 'center' }} >
+                                        <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>结束文案</strong></p>
+                                        <Form.Item name='endPageDesc' rules={[{ required: true, pattern: RegExp("^[^\\<\\>\\&'\\\"\\/\\x08\\x09\\x0A\\x0D\\\\]{1,12}$"), message: '请输入正确的结束页文案' }]} style={{ marginBottom: 0, marginRight: 10 }}>
+                                            <Input
+                                                placeholder='请输入结束页文案'
+                                                style={{width:300}}
+                                                onFocus={() => {
+                                                    setendPageDescnshow(true)
+                                                    textList({ maxTextLength: 12 })
+                                                }}
+                                                onChange={(e) => {
+                                                    let value = e.target.value
+                                                    textList({ maxTextLength: 12, keyword: value })
+                                                }}
+                                                allowClear
+                                            />
+                                        </Form.Item>
+                                        <span>{endPageDesc?.length || 0}/12</span>
+                                    </div>
+                                    {
+                                        endPageDescShow && <List
+                                            loading={getTextLsit?.loading}
+                                            size="small"
+                                            style={{ maxHeight: 300, maxWidth: 300, overflowX: 'auto', marginLeft: 253 }}
+                                            bordered
+                                            dataSource={getTextLsit?.data?.returnTexts}
+                                            renderItem={(item: any) => <List.Item onClick={(e: any) => {
+                                                form.setFieldsValue({ endPageDesc: item.text })
+                                                setendPageDescnshow(false)
+                                            }}><span >{item.text}{item.tag && <span className={styles.crt}>{'CTR 高'}</span>}</span></List.Item>}
+                                        />
+                                    }
+                                </div>
+                            </>
+                        }
                     </>
             }
         </Form>
-        {/* //sliderImgContent={sliderImgContent}  */}
         {/* 选择素材 */}
         {
             selectImgVisible && <SelectCloud

+ 14 - 0
src/pages/launchSystemNew/launchManage/localAd/creative/tableConfig.tsx

@@ -1,4 +1,6 @@
 import { PromotedObjectType } from '@/services/launchAdq/enum'
+import React from 'react'
+import { Space } from 'antd'
 function tableConfig():any{
     return [
         {
@@ -6,6 +8,7 @@ function tableConfig():any{
             dataIndex: 'id',
             key: 'id',
             align: 'center',
+            width:70
         },
         {
             title: '广告名称',
@@ -43,6 +46,17 @@ function tableConfig():any{
             key: 'createTime',
             align: 'center',
         },
+        {
+            title:'操作',
+            dataIndex:'cz',
+            key: 'cz',
+            align: 'center',  
+            render:()=>{
+               return <Space>
+                    <a>详情</a>
+                </Space>
+            }
+        }
     ]
 }
 export default tableConfig

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

@@ -14,7 +14,7 @@ const tabsConfig = [
     // { key: '4', tab: '商品库模板', jsx: <Goods /> },
 ]
 function LocalAd() {
-    const [activeKey, setActiveKey] = useState('2')
+    const [activeKey, setActiveKey] = useState('1')
     return <Card>
         <Tabs activeKey={activeKey} type="card" onChange={(activeKey) => { setActiveKey(activeKey) }} >
             {

+ 21 - 9
src/pages/launchSystemNew/launchManage/localAd/targeting/modal.tsx

@@ -22,7 +22,7 @@ function AdModal(props: Props) {
     const [indeterminateIos, setIndeterminateIos] = useState(false);
     const [indeterminateAndroid, setIndeterminateAndroid] = useState(false);
     const [modelList, setModelList] = useState([])
-    const [regionsList, setRegionsList] = useState([])
+    const [regionsList, setRegionsList] = useState<any[]>([])
     let educationType = Form.useWatch('educationType', form)
     let ageType = Form.useWatch('ageType', form)
     let age_min = Form.useWatch('age_min', form)
@@ -52,7 +52,7 @@ function AdModal(props: Props) {
                         if (newValues[key] === '1') {
                             newValues.targeting.geoLocation = {
                                 locationTypes: ['LIVE_IN'],//对于微信流量(site_set=SITE_SET_WECHAT、SITE_SET_MOMENTS、SITE_SET_MINI_GAME_WECHAT),仅能选择"LIVE_IN"(常住);
-                                regions: newValues.regions
+                                regions: newValues.regions && newValues.regions[0] === 1156 ? regionsList[0]?.children?.filter((item:any)=>!item.disabled)?.map((item: { value: any })=>item.value) : newValues.regions
                             }
                         }
                         delete newValues[key]
@@ -170,10 +170,10 @@ function AdModal(props: Props) {
                         break;
                 }
             })
-            // console.log(newValues)
-            callback(newValues)
+            console.log(JSON.stringify(newValues))
+            // callback(newValues)
         })
-    }, [form])
+    }, [form,regionsList])
 
     // 监听ios系统全选事件
     useEffect(() => {
@@ -206,7 +206,8 @@ function AdModal(props: Props) {
                         title: item.name,
                         value: item.id,
                         key: item.id,
-                        parentId: item.parentId
+                        parentId: item.parentId,
+                        disabled: item.parentId === 710000 || item.parentId === 810000 || item.parentId === 820000
                     }))
                 }
                 return obj
@@ -225,10 +226,10 @@ function AdModal(props: Props) {
                 })
                 return { ...item, children: itemArr }
             })
-            // let zg = parentList.filter((item: { title: string }) => item.title === '中国')
+            let zg = parentList.filter((item: { title: string }) => item.title === '中国')
             let zg_children = parentList.filter((item: { title: string }) => (item.title !== '中国' && item.title !== '国外'))
-            // zg[0].children = zg_children
-            setRegionsList(zg_children)
+            zg[0].children = zg_children
+            setRegionsList(zg)
         })
         // 获取手机
         tagsList_MODEL.run({ type: 'DEVICE_BRAND_MODEL' }).then(res => {
@@ -254,6 +255,17 @@ function AdModal(props: Props) {
             setModelList(parentList)
         })
     }, [])
+    // 回填数据
+    useEffect(()=>{
+        if(regionsList.length > 0){
+            console.log(111)
+            let arr = [156,540000,630000,510000,450000,320000,220000,370000,340000,150000,140000,420000,130000,360000,310000,330000,650000,350000,120000,110000,640000,530000,210000,610000,520000,230000,460000,440000,500000,410000,620000,430000]
+            let newArr = regionsList[0]?.children?.filter((item:any)=>!item.disabled)?.map((item: { value: any })=>item.value)
+            form.setFieldsValue({
+                regions:JSON.stringify(arr) === JSON.stringify(newArr) ? [1156] : arr//地域回填
+            })
+        }
+    },[regionsList])
     return <Modal
         visible={visible}
         title={title + '定向'}

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

@@ -1,4 +1,5 @@
-import { PromotedObjectType } from '@/services/launchAdq/enum'
+import React from 'react'
+import { Space } from 'antd'
 function tableConfig():any{
     return [
         {
@@ -6,6 +7,7 @@ function tableConfig():any{
             dataIndex: 'id',
             key: 'id',
             align: 'center',
+            width:70
         },
         {
             title: '定向名称',
@@ -25,6 +27,17 @@ function tableConfig():any{
             key: 'createTime',
             align: 'center',
         },
+         {
+            title:'操作',
+            dataIndex:'cz',
+            key: 'cz',
+            align: 'center',  
+            render:()=>{
+               return <Space>
+                    <a>详情</a>
+                </Space>
+            }
+        }
     ]
 }
 export default tableConfig

+ 4 - 4
src/services/launchAdq/index.d.ts

@@ -577,7 +577,7 @@ export interface AdcreativeTemplate {
         /**最大长度,文本类型适用*/
         maxLength: number;
         /**text 的正则表达式*/
-        textPattern: RegExp;
+        textPattern: any;
       };
       /**图片需满足的限制条件,仅当 elementType 是 ELEMENT_TYPE_IMAGE_ARRAY 或 ELEMENT_TYPE_IMAGE 时返回*/
       imageRestriction: {
@@ -593,7 +593,7 @@ export interface AdcreativeTemplate {
       /**链接需满足的限制条件,仅当 elementType 是 ELEMENT_TYPE_URL 时返回*/
       urlRestriction: {
         /**url 的正则表达式*/
-        urlPattern: RegExp;
+        urlPattern: any;
       };
       /**	视频需满足的限制条件,仅当 elementType 是 ELEMENT_TYPE_VIDEO 时返回*/
       videoRestriction: {
@@ -682,7 +682,7 @@ export interface AdcreativeTemplate {
         /**最大长度,文本类型适用*/
         maxLength: number;
         /**text 的正则表达式*/
-        textPattern: RegExp;
+        textPattern: any;
       };
       /**数值型需满足的限制条件,仅当 elementType 是 ELEMENT_TYPE_INTEGER 时返回*/
       integerDetail: {
@@ -724,7 +724,7 @@ export interface AdcreativeTemplate {
               /**最大长度,文本类型适用*/
               maxLength: number;
               /**text 的正则表达式*/
-              textPattern: RegExp;
+              textPattern: any;
             };
             /**数值型需满足的限制条件,仅当 elementType 是 ELEMENT_TYPE_INTEGER 时返回*/
             integerDetail: {