wjx 2 سال پیش
والد
کامیت
36af1f59c5

+ 1 - 1
src/pages/launchSystemNew/components/crowdPackModal/index.tsx

@@ -125,7 +125,7 @@ const CrowdPackModal: React.FC<Props> = (props) => {
                 {crowdpackData.map((item: { id: number, name: string }, index: number) => (
                     <div key={index} onClick={() => { handleSelectCp(index + 1) }} className={`${style.accItem} ${selectCp === index + 1 && style.select} `}>
                         {item?.name}
-                        {/* {orientPackage[selectAdz - 1]?.goods?.key === item?.catalogId && orientPackage[selectAdz - 1].goods?.data?.length > 0 && <CheckOutlined style={{ color: '#1890ff' }} />} */}
+                        {data?.some((item: any) => item[getKey(index + 1)]?.length > 0) && <CheckOutlined style={{ color: '#1890ff' }} />}
                     </div>))
                 }
             </div>

+ 3 - 1
src/pages/launchSystemNew/components/targetingPopover/index.tsx

@@ -1,6 +1,7 @@
 import { useAjax } from "@/Hook/useAjax"
 import { getTagsList } from "@/services/launchAdq/global"
 import { getsysTargetingInfo } from "@/services/launchAdq/targeting"
+import { EyeOutlined } from "@ant-design/icons"
 import { Popover, Spin } from "antd"
 import React, { useState } from "react"
 import TargetingTooltip from "../targetingTooltip"
@@ -66,7 +67,8 @@ const TargetingPopover: React.FC<Props> = (props) => {
         visible={visible}
         onVisibleChange={handleVisibleChange}
     >
-        <a style={{ color: '#1890ff', fontSize: 12 }}>查看定向</a>
+        {/* 查看定向 */}
+        <a style={{ color: '#1890ff', fontSize: 12 }}><EyeOutlined /></a>
     </Popover>
 }
 

+ 4 - 2
src/pages/launchSystemNew/components/targetingTooltip/index.tsx

@@ -1,4 +1,4 @@
-import { DevicePriceEnum, EducationEnum, ExcludedDimensionEnum, MaritalStatusEnum, NetworkEnum, OptimizationGoalEnum, UserOsEnum, WechatAdBehaviorEnum } from "@/services/launchAdq/enum"
+import { DevicePriceEnum, EducationEnum, ExcludedDimensionEnum, LocationTypes, MaritalStatusEnum, NetworkEnum, OptimizationGoalEnum, UserOsEnum, WechatAdBehaviorEnum } from "@/services/launchAdq/enum"
 import React, { useEffect, useState } from "react"
 import './index.less'
 
@@ -23,6 +23,7 @@ interface Props {
 }
 interface ContentProps {
     unlimited?: string,         // 不限
+    location?: string[],        // 地点类型
     geoLocation?: any[],        // 地域
     age?: string,               // 年龄
     gender?: string,            // 性别
@@ -67,6 +68,7 @@ const TargetingTooltip: React.FC<Props> = (props) => {
             Object.keys(data?.targeting)?.forEach((item: any) => {
                 switch (item) {
                     case 'geoLocation': // 地域
+                        newConten.location = data?.targeting[item]?.locationTypes || []
                         if (data?.targeting[item]?.regions && data?.targeting[item]?.regions?.length > 0) {
                             newConten.geoLocation = data?.targeting[item]?.regions?.map((item: any) => geoLocationList[item]?.name)
                         }
@@ -132,7 +134,7 @@ const TargetingTooltip: React.FC<Props> = (props) => {
 
     return <div className='targetingTooltip'>
         {content?.geoLocation && <div>
-            地域:<span>{content?.geoLocation?.toString()}</span>
+            地域:<span>{(content?.location && content?.location?.length > 0) && `(${content?.location?.map((key: string) => LocationTypes[key]).toString()})`}{content?.geoLocation?.toString()}</span>
         </div>}
         {content?.age && <div>
             年龄:<span>{content?.age}</span>

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

@@ -226,7 +226,7 @@ const CreateAd: React.FC = () => {
             if (res) {
                 sessionStorage.setItem('CAMP', data?.campaignName)
                 message.success('创建成功')
-                // window.location.href = '/#/launchSystemNew/launchManage/taskList'
+                window.location.href = '/#/launchSystemNew/launchManage/taskList'
             }
         })
     }

+ 57 - 2
src/pages/launchSystemNew/launchManage/taskList/tableConfig.tsx

@@ -2,6 +2,7 @@ import React from "react"
 import { Space } from "antd"
 import { AdStatus, PromotedObjectType, SpeedMode } from "@/services/launchAdq/enum"
 import TargetingPopover from "../../components/targetingPopover"
+import { EyeOutlined } from "@ant-design/icons"
 function tableConfig(callback: (data: any, type: 'log' | 'page') => void): any {
     return [
         {
@@ -78,6 +79,62 @@ function tableConfig(callback: (data: any, type: 'log' | 'page') => void): any {
                 }
             }
         },
+        {
+            title: '广告ID',
+            dataIndex: 'sysAdgroupId',
+            key: 'sysAdgroupId',
+            align: 'center',
+            width: 100,
+            render: (a: any, b: any) => {
+                if (a) {
+                    return <span style={{ fontSize: "12px" }}>{a}</span>
+                } else {
+                    return <span>--</span>
+                }
+            }
+        },
+        {
+            title: '定向ID',
+            dataIndex: 'sysTargetingId',
+            key: 'sysTargetingId',
+            align: 'center',
+            width: 80,
+            render: (a: any, b: any) => {
+                if (a) {
+                    return <Space><span style={{ fontSize: "12px" }}>{a}</span><TargetingPopover id={b.sysTargetingId}/></Space> 
+                } else {
+                    return <span>--</span>
+                }
+            }
+        },
+        {
+            title: '创意ID',
+            dataIndex: 'sysAdcreativeId',
+            key: 'sysAdcreativeId',
+            align: 'center',
+            width: 100,
+            render: (a: any, b: any) => {
+                if (a) {
+                    return <span style={{ fontSize: "12px" }}>{a}</span>
+                } else {
+                    return <span>--</span>
+                }
+            }
+        },
+        {
+            title: '落地页ID',
+            dataIndex: 'sysPageId',
+            key: 'sysPageId',
+            align: 'center',
+            width: 80,
+            render: (a: any, b: any) => {
+                if (a) {
+                    return <Space><span style={{ fontSize: "12px" }}>{a}</span> <a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => { callback(b.sysPageId, 'page') }}><EyeOutlined /></a></Space>
+                } else {
+                    return <span>--</span>
+                }
+            }
+        },
         {
             title: '创建时间',
             dataIndex: 'createTime',
@@ -96,8 +153,6 @@ function tableConfig(callback: (data: any, type: 'log' | 'page') => void): any {
             render: (a: any, b: any) => {
                 return <Space style={{ marginLeft: 10 }}>
                     <a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => { callback({ taskId: b.id, campaignName: b.campaignName }, 'log') }}>日志</a>
-                    <a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => { callback(b.sysPageId, 'page') }}>查看落地页</a>
-                    <TargetingPopover id={b.sysTargetingId}/>
                     {/* <Popconfirm
                     title={`你确定删除"${b?.taskName}"这个任务?`}
                     onConfirm={() => { del(b?.id) }}

+ 9 - 0
src/services/launchAdq/enum.ts

@@ -33,6 +33,15 @@ export enum PromotedObjectType {
 //     PROMOTED_OBJECT_TYPE_LOCAL_ADS='本地广告,仅可读'
 // }
 
+/** 地点类型 */
+export enum LocationTypes {
+  RECENTLY_IN = '近期',
+  VISITED_IN = '去过',
+  LIVE_IN = '常住',
+  TRAVEL_IN = '旅行',
+  LIVE_AND_RECENTLY = '常驻且近期'
+}
+
 /**计费类型*/
 export enum BillingEventEnum {
   BILLINGEVENT_CLICK = '按点击扣费',