wjx 2 yıl önce
ebeveyn
işleme
cc5d1f7837
1 değiştirilmiş dosya ile 16 ekleme ve 2 silme
  1. 16 2
      src/pages/adMonitor/adMonitorList/monitor.tsx

+ 16 - 2
src/pages/adMonitor/adMonitorList/monitor.tsx

@@ -121,7 +121,9 @@ function Monitor(props: { onChange: () => void }) {
             setMode('detail')//切到明细
             getPlanDetailList.run({ ...newQueryForm, adgroupId: adgroup, sysUserId, accountId: accountId ? accountId : clickAccountId }).then((res: any) => {
                 setPlanDetailList(res?.data ? [...res?.data] : [])
-                setQueryForm({ ...queryForm, adgroup })
+                if (adgroup != aa) {
+                    setQueryForm({ ...queryForm, adgroup })
+                }
             })
         }
     }, [queryForm, getPlanList, planDetailList])
@@ -140,7 +142,9 @@ function Monitor(props: { onChange: () => void }) {
             setMode('minute')
             getMinuteList.run({ ...newQueryForm, adgroupId: adgroup, sysUserId, accountId: accountId ? accountId : clickAccountId }).then((res: any) => {
                 setMinuteList(res?.data ? [...res?.data] : [])
-                setQueryForm({ ...queryForm, adgroup })
+                if (adgroup != aa) {
+                    setQueryForm({ ...queryForm, adgroup })
+                }
             })
         }
     }, [queryForm, getPlanList, minuteList, adgroup])
@@ -307,6 +311,11 @@ function Monitor(props: { onChange: () => void }) {
                             if (!isNaN(Number(value))) {
                                 setQueryForm({ ...queryForm, campaign: value })
                             }
+                            if (mode === 'detail') {
+                                getDetailList(queryForm?.adgroup, queryForm?.accountId)
+                            } else if (mode === 'minute') {
+                                getMinuList(queryForm?.adgroup, queryForm?.accountId)
+                            }
                         }}
                         allowClear
                     />
@@ -321,6 +330,11 @@ function Monitor(props: { onChange: () => void }) {
                             if (!value) {
                                 setClickAccountId([])
                             }
+                            if (mode === 'detail') {
+                                getDetailList(e.target.value, queryForm?.accountId)
+                            } else if (mode === 'minute') {
+                                getMinuList(e.target.value, queryForm?.accountId)
+                            }
                         }}
                         allowClear
                     />