|
@@ -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,6 +147,14 @@ 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="二级组件类型"
|