wjx vor 2 Wochen
Ursprung
Commit
39beaf4863

+ 7 - 1
src/pages/launchSystemV3/adqv3/ad/index.tsx

@@ -33,7 +33,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
     const [addDynamicVisible, setAddDynamicVisible] = useState<boolean>(false)
     const [handleType, setHandleType] = useState<number>(1)
     const [czjlShow, setCzjlShow] = useState(false)
-    const [updateData, setUpdateDate] = useState<{ visible: boolean, type: '修改出价' | '修改名称' | '修改日限额' | '修改投放时间' | '删除' | '深度优化ROI' | '修改投放首日开始时间' }>({ visible: false, type: '修改出价' })
+    const [updateData, setUpdateDate] = useState<{ visible: boolean, type: '修改出价' | '修改名称' | '修改日限额' | '修改投放时间' | '删除' | '深度优化ROI' | '修改投放首日开始时间' | '关闭智能定向' }>({ visible: false, type: '修改出价' })
     const [autoAcqVisible, setAutoAcqVisible] = useState<boolean>(false)
 
     const syncBatch = useAjax((params) => syncBatchApi(params))
@@ -317,6 +317,12 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
                                         key: '6',
                                         disabled: selectedRows.length === 0,
                                         onClick: () => { setAutoAcqVisible(true) }
+                                    },
+                                    {
+                                        label: '关闭智能定向',
+                                        key: '7',
+                                        disabled: selectedRows.length === 0,
+                                        onClick: () => { setUpdateDate({ visible: true, type: '关闭智能定向' }) }
                                     }
                                 ]
                             }}

+ 12 - 0
src/pages/launchSystemV3/adqv3/ad/tableConfig.tsx

@@ -260,6 +260,7 @@ function tableConfig(onChange: () => void, useType: string, creativeHandle?: (id
             key: 'targetingTranslation',
             align: 'center',
             width: 80,
+            ellipsis: true,
             render: (a: any) => {
                 return a || '--'
             }
@@ -312,6 +313,17 @@ function tableConfig(onChange: () => void, useType: string, creativeHandle?: (id
                 return ADGROUP_STATUS[a as keyof typeof ADGROUP_STATUS]
             }
         },
+        {
+            title: '定向智能状态',
+            dataIndex: 'smartTargetingStatus',
+            key: 'smartTargetingStatus',
+            align: 'center',
+            width: 90,
+            fixed: 'right',
+            render: (a: string) => {
+                return a === 'SMART_TARGETING_NONE' ? <Tag color="success">关闭</Tag> : a === 'SMART_TARGETING_AUTO' ? <Tag color='error'>开启</Tag> : '--'
+            }
+        },
         {
             title: '创意预览',
             dataIndex: 'dynamicCreativeList',

+ 13 - 3
src/pages/launchSystemV3/adqv3/ad/updateAd3.tsx

@@ -14,7 +14,7 @@ import New1Radio from "../../components/New1Radio"
 import { SelectTimeList } from "../../tencentAdPutIn/const"
 
 interface Props {
-    type: '修改出价' | '修改名称' | '修改日限额' | '修改投放时间' | '删除' | '深度优化ROI' | '修改投放首日开始时间'
+    type: '修改出价' | '修改名称' | '修改日限额' | '修改投放时间' | '删除' | '深度优化ROI' | '修改投放首日开始时间' | '关闭智能定向'
     updateData: any[],
     visible?: boolean,
     onClose?: () => void
@@ -71,6 +71,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
             case '修改名称':
             case '深度优化ROI':
             case '修改投放首日开始时间':
+            case '关闭智能定向':
                 let params2: any = {}
                 if (type === '深度优化ROI') {
                     params2 = JSON.parse(JSON.stringify(values))
@@ -169,7 +170,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
                     message.error(errorFields?.[0]?.errors?.[0])
                 }}
                 onFinish={handleOk}
-                initialValues={{ timeSeriesType: '0', timeSeries: getTimeSeriesList(), updateType: 'fixed' }}
+                initialValues={{ timeSeriesType: '0', timeSeries: getTimeSeriesList(), updateType: 'fixed', smartTargetingMode: 'SMART_TARGETING_MANUAL' }}
             >
                 <Card
                     title={<strong style={{ fontSize: 14 }}>{type === '删除' ? '确认删除?' : '修改设置'}</strong>}
@@ -319,6 +320,15 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
                             placeholder='请选择首日开始时间'
                             options={SelectTimeList}
                         />
+                    </Form.Item> : type === '关闭智能定向' ? <Form.Item
+                        label={<strong>智能定向</strong>}
+                        name='smartTargetingMode'
+                        rules={[{ required: true, message: '请选择智能定向!' }]}
+                    >
+                        <Radio.Group defaultValue="a" buttonStyle="solid">
+                            <Radio.Button value="SMART_TARGETING_OPEN" disabled>开启</Radio.Button>
+                            <Radio.Button value="SMART_TARGETING_MANUAL">关闭</Radio.Button>
+                        </Radio.Group>
                     </Form.Item> : null}
                 </Card>
                 <Form.Item className="submit_pull">
@@ -363,7 +373,7 @@ const UpdateAd3: React.FC<Props> = ({ visible, type, onClose, onChange, updateDa
                     key: 'messageCn',
                     render: (value) => <span style={{ fontSize: 12 }}>{value}</span>,
                 }]}
-                dataSource={failIdList.map((item, index) => ({...item, id: index}))}
+                dataSource={failIdList.map((item, index) => ({ ...item, id: index }))}
             />
         </Modal>}
     </>

+ 3 - 2
src/pages/launchSystemV3/adqv3/config.ts

@@ -32,8 +32,9 @@ const txAdConfig = [
             { title: '创建时间', dataIndex: 'createdTime', label: '广告详情', default: 27, width: 140 },
             { title: '是否已删除', dataIndex: 'isDeleted', label: '广告详情', default: 28, width: 60 },
             { title: '广告状态', dataIndex: 'systemStatus', label: '广告详情', default: 29, width: 80 },
-            { title: '创意预览', dataIndex: 'dynamicCreativeList', label: '广告详情', default: 30, width: 150 },
-            { title: '操作', dataIndex: 'cz', label: '广告详情', default: 31, width: 65 },
+            { title: '定向智能状态', dataIndex: 'smartTargetingStatus', label: '广告详情', default: 30, width: 80 },
+            { title: '创意预览', dataIndex: 'dynamicCreativeList', label: '广告详情', default: 31, width: 150 },
+            { title: '操作', dataIndex: 'cz', label: '广告详情', default: 32, width: 65 },
         ]
     }
 ]