Przeglądaj źródła

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage

wjx 1 miesiąc temu
rodzic
commit
a46e606a36

+ 20 - 5
src/pages/launchSystemV3/tencenTasset/manageComponent/index.tsx

@@ -23,6 +23,8 @@ const ManageComponent: React.FC = () => {
     const [queryParams, setQueryParams] = React.useState<GetCreativeComponentProps>({ pageNum: 1, pageSize: 20, activeKey: 'IMAGE' })
     const [idSting, setIdSting] = useState<string>();
     const debouncedIdSting = useDebounce(idSting, { wait: 500 });
+    const [componentIdSting, setComponentIdSting] = useState<string>();
+    const debouncedComponentIdStingSting = useDebounce(componentIdSting, { wait: 500 });
     const ref = useRef<HTMLDivElement>(null);
     const size = useSize(ref);
     const [addVisible, setAddVisible] = useState<boolean>(false)
@@ -44,9 +46,14 @@ const ManageComponent: React.FC = () => {
             } else {
                 delete params?.[activeKey === 'IMAGE' ? 'imageId' : 'videoId']
             }
+            if (debouncedComponentIdStingSting) {
+                params['componentId'] = debouncedComponentIdStingSting.split(/[,,\n\s]+/ig).filter((item: any) => item)
+            } else {
+                delete params?.['componentId']
+            }
             getCreativeComponentList.run({ ...params, componentSubType: componentSubType && componentSubType?.length > 0 ? componentSubType : (activeKey === 'IMAGE' ? DEFAULT_COMPONENT_SUB_SHOW_IMAGE : DEFAULT_COMPONENT_SUB_SHOW_VIDEO) })
         }
-    }, [queryParams, debouncedIdSting])
+    }, [queryParams, debouncedIdSting, debouncedComponentIdStingSting])
 
     const handleGet = (adAccountId: number) => {
         getDefaultSharing.run({ adAccountId }).then(res => {
@@ -140,13 +147,21 @@ const ManageComponent: React.FC = () => {
                     allowClear
                     onChange={(e) => setIdSting(e.target.value)}
                 />
+                <Input.TextArea
+                    style={{ width: 160 }}
+                    value={componentIdSting}
+                    rows={1}
+                    placeholder="组件ID(多个,,空格换行)"
+                    allowClear
+                    onChange={(e) => setComponentIdSting(e.target.value)}
+                />
                 <Select
                     showSearch
                     placeholder="二级组件类型"
                     filterOption={(input, option) =>
                         ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                     }
-                    style={{ minWidth: 160 }}
+                    style={{ minWidth: 120 }}
                     maxTagCount={1}
                     mode="multiple"
                     allowClear
@@ -162,7 +177,7 @@ const ManageComponent: React.FC = () => {
                     filterOption={(input, option) =>
                         ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                     }
-                    style={{ width: 120 }}
+                    style={{ width: 100 }}
                     value={queryParams?.isDeleted}
                     allowClear
                     onChange={(e) => {
@@ -179,7 +194,7 @@ const ManageComponent: React.FC = () => {
                     filterOption={(input, option) =>
                         ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                     }
-                    style={{ minWidth: 120 }}
+                    style={{ minWidth: 100 }}
                     maxTagCount={1}
                     mode="multiple"
                     value={queryParams?.potentialStatus}
@@ -194,7 +209,7 @@ const ManageComponent: React.FC = () => {
                     filterOption={(input, option) =>
                         ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                     }
-                    style={{ minWidth: 120 }}
+                    style={{ minWidth: 100 }}
                     maxTagCount={1}
                     mode="multiple"
                     value={queryParams?.generationType}

+ 1 - 1
src/services/adqV3/global.ts

@@ -1179,7 +1179,7 @@ export interface GetCreativeComponentProps {
     pageNum: number,
     pageSize: number,
     adAccountId?: number,
-    componentId?: number[],
+    componentId?: string[],
     componentSubType?: string[]
     componentType?: string[]
     createTimeMin?: string