wjx преди 4 месеца
родител
ревизия
6c5d222067
променени са 1 файла, в които са добавени 6 реда и са изтрити 5 реда
  1. 6 5
      src/pages/launchSystemV3/tencenTasset/accountAssetSharing/addSubAccount.tsx

+ 6 - 5
src/pages/launchSystemV3/tencenTasset/accountAssetSharing/addSubAccount.tsx

@@ -39,13 +39,13 @@ const AddSubAccount: React.FC<Props> = ({ authType, authMainAccountId, accountAs
 
     useEffect(() => {
         if (authType === 'conversion') {
-            getConversionInfo.run({ accountId: authMainAccountId, pageNum: 1, pageSize: 1000, keywords }).then(res => {
+            getConversionInfo.run({ accountId: authMainAccountId, pageNum: 1, pageSize: 20, 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 }) => {
                     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' ? '平台类转化' : ''
                     return {
                         label: item.conversionName + `(优化目标:${OPTIMIZATIONGOAL_ENUM[item?.optimizationGoal as keyof typeof OPTIMIZATIONGOAL_ENUM]}${deepGoal ? '/深度优化目标:' + deepGoal : ''}/上报类型:${cType})`, //+ '_' + (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) + '_' + item?.createSourceType === 'SELF_CREATED' ? '自建转化' : item?.createSourceType === 'PLATFORM' ? '平台类转化' : '',
-                        value: item.conversionId,
+                        value: item.conversionId + "$" + item.conversionName,
                         name: item.conversionName
                     }
                 }) || [])
@@ -68,11 +68,12 @@ const AddSubAccount: React.FC<Props> = ({ authType, authMainAccountId, accountAs
             let params = { ...valid, accountAssetsGroupId: accountAssetsGroupId }
             if (authType === 'conversion') {
                 if (valid.assetId?.length) {
-                    params.assetsDTOS = valid.assetId.map((id: any) => {
-                        const assetName = tableData.find(item => item.value === id).name
-                        return { assetId: id, assetName }
+                    params.assetsDTOS = valid.assetId.map((conversion: string) => {
+                        const [assetId, assetName] = conversion.split('$')
+                        return { assetId, assetName }
                     })
                     delete valid.assetId
+                    delete params.assetId
                 }
                 batchAuthAccountAssetsGroupAccount.run(params).then(res => {
                     console.log(res)