wjx il y a 1 an
Parent
commit
d4b1ecb6c5
1 fichiers modifiés avec 2 ajouts et 4 suppressions
  1. 2 4
      src/pages/adMonitor/adMonitorList/monitor1.tsx

+ 2 - 4
src/pages/adMonitor/adMonitorList/monitor1.tsx

@@ -134,8 +134,7 @@ function Monitor(props: { onChange: () => void }) {
     const getTootalCostList = useCallback(async () => {
         let { totalTimeUnit, planTimeUnit, pageNum, pageSize, adgroup, sysUserId, accountId, ...newQueryForm } = queryForm
         let params = adgroup ? { ...newQueryForm, adgroupId: adgroup } : newQueryForm
-        let newPitcherIds = sysUserId?.join()
-        let res = await getCostTrendList.run({ ...params, timeUnit: planTimeUnit, sysUserId: newPitcherIds, accountId: accountId?.join() })
+        let res = await getCostTrendList.run({ ...params, timeUnit: planTimeUnit, sysUserIds: sysUserId, accountId: accountId?.join() })
         let data: any[] = [{ legendName: '消耗' }]
         res?.data?.forEach((item: any) => {
             data[0][item.trendUnit] = item.costOfUnit
@@ -148,8 +147,7 @@ function Monitor(props: { onChange: () => void }) {
     const getPlanCostList = useCallback(async () => {
         let { totalTimeUnit, planTimeUnit, pageNum, pageSize, sysUserId, accountId, ...newQueryForm } = queryForm
         let { adgroup, ...planQueryFrom } = newQueryForm
-        let newPitcherIds = sysUserId?.join()
-        let res = await getCostTopList.run({ ...planQueryFrom, timeUnit: totalTimeUnit, sysUserId: newPitcherIds, accountId: accountId?.join(), topN: 10 })
+        let res = await getCostTopList.run({ ...planQueryFrom, timeUnit: totalTimeUnit, sysUserIds: sysUserId, accountId: accountId?.join(), topN: 10 })
         let data = res?.data?.map((item: { adgroupId: number, cost: number, adgroupName: string, accountId: number }) => {
             return { name: item.adgroupId.toString(), value: item.cost, adName: item.adgroupName, accountId: item.accountId }
         })