|  | @@ -5,6 +5,7 @@ import { getAccountAllListApi } from "@/services/launchAdq/adAuthorize"
 | 
											
												
													
														|  |  import { useAjax } from "@/Hook/useAjax"
 |  |  import { useAjax } from "@/Hook/useAjax"
 | 
											
												
													
														|  |  import { authAccountAssetsGroupAccountApi, batchAuthAccountAssetsGroupAccountApi, getConversionInfoApi } from "@/services/adqV3/global"
 |  |  import { authAccountAssetsGroupAccountApi, batchAuthAccountAssetsGroupAccountApi, getConversionInfoApi } from "@/services/adqV3/global"
 | 
											
												
													
														|  |  import { GOAL_ROAS_ENUM, OPTIMIZATIONGOAL_ENUM } from "../../tencentAdPutIn/const"
 |  |  import { GOAL_ROAS_ENUM, OPTIMIZATIONGOAL_ENUM } from "../../tencentAdPutIn/const"
 | 
											
												
													
														|  | 
 |  | +import { useDebounce } from "ahooks"
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  interface Props {
 |  |  interface Props {
 | 
											
												
													
														|  |      authType: 'material' | 'conversion'
 |  |      authType: 'material' | 'conversion'
 | 
											
										
											
												
													
														|  | @@ -26,8 +27,9 @@ const AddSubAccount: React.FC<Props> = ({ authType, authMainAccountId, accountAs
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      /************************************/
 |  |      /************************************/
 | 
											
												
													
														|  |      const [form] = Form.useForm()
 |  |      const [form] = Form.useForm()
 | 
											
												
													
														|  | -    const [errorDataList, setErrorDataList] = useState<any[]>([])
 |  | 
 | 
											
												
													
														|  |      const [tableData, setTableData] = useState<any[]>([])//table数据
 |  |      const [tableData, setTableData] = useState<any[]>([])//table数据
 | 
											
												
													
														|  | 
 |  | +    const [value, setValue] = useState<string>();
 | 
											
												
													
														|  | 
 |  | +    const keywords = useDebounce(value, { wait: 300 });
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      const getAccountAllList = useAjax(() => getAccountAllListApi())
 |  |      const getAccountAllList = useAjax(() => getAccountAllListApi())
 | 
											
												
													
														|  |      const authAccountAssetsGroupAccount = useAjax((params) => authAccountAssetsGroupAccountApi(params))
 |  |      const authAccountAssetsGroupAccount = useAjax((params) => authAccountAssetsGroupAccountApi(params))
 | 
											
										
											
												
													
														|  | @@ -37,7 +39,7 @@ const AddSubAccount: React.FC<Props> = ({ authType, authMainAccountId, accountAs
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      useEffect(() => {
 |  |      useEffect(() => {
 | 
											
												
													
														|  |          if (authType === 'conversion') {
 |  |          if (authType === 'conversion') {
 | 
											
												
													
														|  | -            getConversionInfo.run({ accountId: authMainAccountId, pageNum: 1, pageSize: 1000 }).then(res => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +            getConversionInfo.run({ accountId: authMainAccountId, pageNum: 1, pageSize: 1000, keywords }).then(res => {
 | 
											
												
													
														|  |                  setTableData(res?.records?.filter((item: { ownerId: string }) => item.ownerId === authMainAccountId)?.map((item: { conversionName: string; optimizationGoal: string; deepBehaviorOptimizationGoal: string; deepWorthOptimizationGoal: string, conversionId: number, createSourceType: string }) => {
 |  |                  setTableData(res?.records?.filter((item: { ownerId: string }) => item.ownerId === authMainAccountId)?.map((item: { conversionName: string; optimizationGoal: string; deepBehaviorOptimizationGoal: string; deepWorthOptimizationGoal: string, conversionId: number, createSourceType: string }) => {
 | 
											
												
													
														|  |                      const deepGoal = item?.deepBehaviorOptimizationGoal ? OPTIMIZATIONGOAL_ENUM[item?.deepBehaviorOptimizationGoal as keyof typeof OPTIMIZATIONGOAL_ENUM] : item?.deepWorthOptimizationGoal ? GOAL_ROAS_ENUM[item?.deepWorthOptimizationGoal as keyof typeof GOAL_ROAS_ENUM] : null
 |  |                      const deepGoal = item?.deepBehaviorOptimizationGoal ? OPTIMIZATIONGOAL_ENUM[item?.deepBehaviorOptimizationGoal as keyof typeof OPTIMIZATIONGOAL_ENUM] : item?.deepWorthOptimizationGoal ? GOAL_ROAS_ENUM[item?.deepWorthOptimizationGoal as keyof typeof GOAL_ROAS_ENUM] : null
 | 
											
												
													
														|  |                      const cType = item?.createSourceType === 'SELF_CREATED' ? '自建转化' : item?.createSourceType === 'PLATFORM' ? '平台类转化' : ''
 |  |                      const cType = item?.createSourceType === 'SELF_CREATED' ? '自建转化' : item?.createSourceType === 'PLATFORM' ? '平台类转化' : ''
 | 
											
										
											
												
													
														|  | @@ -49,7 +51,12 @@ const AddSubAccount: React.FC<Props> = ({ authType, authMainAccountId, accountAs
 | 
											
												
													
														|  |                  }) || [])
 |  |                  }) || [])
 | 
											
												
													
														|  |              })
 |  |              })
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -    }, [authType])
 |  | 
 | 
											
												
													
														|  | 
 |  | +    }, [authType, keywords])
 | 
											
												
													
														|  | 
 |  | +    
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    const handleSearch = (keywords?: string) => {
 | 
											
												
													
														|  | 
 |  | +        setValue(keywords)
 | 
											
												
													
														|  | 
 |  | +    };
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      useEffect(() => {
 |  |      useEffect(() => {
 | 
											
												
													
														|  |          getAccountAllList.run()
 |  |          getAccountAllList.run()
 | 
											
										
											
												
													
														|  | @@ -106,12 +113,13 @@ const AddSubAccount: React.FC<Props> = ({ authType, authMainAccountId, accountAs
 | 
											
												
													
														|  |                      allowClear
 |  |                      allowClear
 | 
											
												
													
														|  |                      showSearch
 |  |                      showSearch
 | 
											
												
													
														|  |                      mode="multiple"
 |  |                      mode="multiple"
 | 
											
												
													
														|  | -                    filterOption={(input, option) =>
 |  | 
 | 
											
												
													
														|  | -                        (option?.label as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  |                      maxTagCount={5}
 |  |                      maxTagCount={5}
 | 
											
												
													
														|  |                      loading={getConversionInfo.loading}
 |  |                      loading={getConversionInfo.loading}
 | 
											
												
													
														|  |                      options={tableData}
 |  |                      options={tableData}
 | 
											
												
													
														|  | 
 |  | +                    showArrow={false}
 | 
											
												
													
														|  | 
 |  | +                    filterOption={false}
 | 
											
												
													
														|  | 
 |  | +                    onSearch={handleSearch}
 | 
											
												
													
														|  | 
 |  | +                    searchValue={value}
 | 
											
												
													
														|  |                      dropdownMatchSelectWidth={false}
 |  |                      dropdownMatchSelectWidth={false}
 | 
											
												
													
														|  |                  />
 |  |                  />
 | 
											
												
													
														|  |              </Form.Item>}
 |  |              </Form.Item>}
 |