|
@@ -15,6 +15,7 @@ import { columnsMonitor } from "./tableMonitorConfig";
|
|
import { qiliangpaihanghour } from "./config";
|
|
import { qiliangpaihanghour } from "./config";
|
|
import { syncBatchApi } from "@/services/launchAdq/adqv3";
|
|
import { syncBatchApi } from "@/services/launchAdq/adqv3";
|
|
import { useAjax } from "@/Hook/useAjax";
|
|
import { useAjax } from "@/Hook/useAjax";
|
|
|
|
+import { useDebounce, useUpdateEffect } from "ahooks";
|
|
interface newListType extends ListType {
|
|
interface newListType extends ListType {
|
|
totalTimeUnit: 'total' | 'minute' | 'hour' | 'day',
|
|
totalTimeUnit: 'total' | 'minute' | 'hour' | 'day',
|
|
planTimeUnit: 'minute' | 'hour' | 'day'
|
|
planTimeUnit: 'minute' | 'hour' | 'day'
|
|
@@ -47,6 +48,8 @@ function Monitor(props: { onChange: () => void }) {
|
|
const [adgroupName, setAdgroupName] = useState<string>('')
|
|
const [adgroupName, setAdgroupName] = useState<string>('')
|
|
const [accountIdRule, setAccountIdRule] = useState<string>('')
|
|
const [accountIdRule, setAccountIdRule] = useState<string>('')
|
|
const [trendColumns, setTrendColumns] = useState<string[]>(['cost'])
|
|
const [trendColumns, setTrendColumns] = useState<string[]>(['cost'])
|
|
|
|
+ const [adName, setAdName] = useState<string>();
|
|
|
|
+ const debouncedAdName = useDebounce(adName, { wait: 500 });
|
|
|
|
|
|
const { totalTimeUnit, planTimeUnit, adgroup, accountId, sysUserId, groupAccountIds, adgroupName: qfadgroupName } = queryForm
|
|
const { totalTimeUnit, planTimeUnit, adgroup, accountId, sysUserId, groupAccountIds, adgroupName: qfadgroupName } = queryForm
|
|
const configName = '起量广告排行明细3.0'
|
|
const configName = '起量广告排行明细3.0'
|
|
@@ -274,6 +277,10 @@ function Monitor(props: { onChange: () => void }) {
|
|
}).catch(() => hide())
|
|
}).catch(() => hide())
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ useUpdateEffect(() => {
|
|
|
|
+ setQueryForm({ ...queryForm, adgroupName: debouncedAdName, pageNum: 1 })
|
|
|
|
+ }, [debouncedAdName])
|
|
|
|
+
|
|
return <Space direction='vertical' style={{ width: '100%' }} className="monitor">
|
|
return <Space direction='vertical' style={{ width: '100%' }} className="monitor">
|
|
<Card hoverable bodyStyle={{ padding: '12px 16px' }}>
|
|
<Card hoverable bodyStyle={{ padding: '12px 16px' }}>
|
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
@@ -283,9 +290,9 @@ function Monitor(props: { onChange: () => void }) {
|
|
allowClear
|
|
allowClear
|
|
style={{ width: 150 }}
|
|
style={{ width: 150 }}
|
|
onChange={(e: any) => {
|
|
onChange={(e: any) => {
|
|
- setQueryForm({ ...queryForm, adgroupName: e.target.value, pageNum: 1 })
|
|
|
|
|
|
+ setAdName(e.target.value)
|
|
}}
|
|
}}
|
|
- value={queryForm?.adgroupName}
|
|
|
|
|
|
+ value={adName}
|
|
/>
|
|
/>
|
|
<Select
|
|
<Select
|
|
showSearch
|
|
showSearch
|