|
@@ -42,7 +42,19 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
const [update, setUpdate] = useState<{ visible: boolean, title: string }>({ visible: false, title: '' })
|
|
|
const [model, setModel] = useState(true)
|
|
|
const [copyData, setCopyData] = useState<{ visible: boolean }>({ visible: false })
|
|
|
-
|
|
|
+ const [queryFrom,set_queryFrom]=useState<{
|
|
|
+ pageNum: number;
|
|
|
+ pageSize: number;
|
|
|
+ accountIdList?: any[];
|
|
|
+ adgroupName?: string;
|
|
|
+ adgroupIdList?: any[];
|
|
|
+ promotedObjectType?: string;
|
|
|
+ isDeleted?: boolean
|
|
|
+ campaignIdList?: any[]
|
|
|
+ statusList?:any[],
|
|
|
+ memoList?:any[]
|
|
|
+ remarkList?:any[]
|
|
|
+ }>({pageNum:1,pageSize:20})
|
|
|
const listAjax = useAjax((params) => getAdqAdgroupsList(params), { formatResult: true })
|
|
|
const syncAjax = useAjax((adAccountId) => putAdqAdgroupsSync(adAccountId))
|
|
|
const delListAdqAdgroups = useAjax((params) => delListAdqAdgroupsApi(params))
|
|
@@ -188,7 +200,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter(a=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, accountIdList: arr })
|
|
|
+ set_queryFrom({...queryFrom,accountIdList: arr})
|
|
|
+ getList({ ...queryFrom,pageNum: 1, pageSize: 20, accountIdList: arr })
|
|
|
}}
|
|
|
onKeyDownCapture={(e: any) => {
|
|
|
let key = e.key
|
|
@@ -199,7 +212,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, accountIdList: arr })
|
|
|
+ set_queryFrom({...queryFrom,accountIdList: arr})
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, accountIdList: arr })
|
|
|
}
|
|
|
}}
|
|
|
onChange={(e) => {
|
|
@@ -210,7 +224,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, accountIdList: arr })
|
|
|
+ set_queryFrom({...queryFrom,accountIdList: arr})
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, accountIdList: arr })
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
@@ -222,19 +237,22 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
style={{ width: 150 }}
|
|
|
onBlur={(e) => {
|
|
|
let value = e.target.value
|
|
|
- getList({ pageNum: 1, pageSize: 20, adgroupName: value })
|
|
|
+ set_queryFrom({...queryFrom,adgroupName: value })
|
|
|
+ getList({ ...queryFrom,pageNum: 1, pageSize: 20, adgroupName: value })
|
|
|
}}
|
|
|
onKeyDownCapture={(e: any) => {
|
|
|
let key = e.key
|
|
|
if (key === 'Enter') {
|
|
|
let value = e.target.value
|
|
|
- getList({ pageNum: 1, pageSize: 20, adgroupName: value })
|
|
|
+ set_queryFrom({...queryFrom,adgroupName: value })
|
|
|
+ getList({ ...queryFrom,pageNum: 1, pageSize: 20, adgroupName: value })
|
|
|
}
|
|
|
}}
|
|
|
onChange={(e) => {
|
|
|
let value = e.target.value
|
|
|
if (!value) {
|
|
|
- getList({ pageNum: 1, pageSize: 20, adgroupName: value })
|
|
|
+ set_queryFrom({...queryFrom,adgroupName: value })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, adgroupName: value })
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
@@ -251,7 +269,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, adgroupIdList: arr })
|
|
|
+ set_queryFrom({...queryFrom,adgroupIdList: arr })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, adgroupIdList: arr })
|
|
|
}}
|
|
|
onKeyDownCapture={(e: any) => {
|
|
|
let key = e.key
|
|
@@ -262,7 +281,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, adgroupIdList: arr })
|
|
|
+ set_queryFrom({...queryFrom,adgroupIdList: arr })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, adgroupIdList: arr })
|
|
|
}
|
|
|
}}
|
|
|
onChange={(e) => {
|
|
@@ -273,7 +293,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, adgroupIdList: arr })
|
|
|
+ set_queryFrom({...queryFrom,adgroupIdList: arr })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, adgroupIdList: arr })
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
@@ -290,7 +311,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, campaignIdList: arr })
|
|
|
+ set_queryFrom({...queryFrom,campaignIdList: arr })
|
|
|
+ getList({ ...queryFrom,pageNum: 1, pageSize: 20, campaignIdList: arr })
|
|
|
}}
|
|
|
onKeyDownCapture={(e: any) => {
|
|
|
let key = e.key
|
|
@@ -301,7 +323,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, campaignIdList: arr })
|
|
|
+ set_queryFrom({...queryFrom,campaignIdList: arr })
|
|
|
+ getList({ ...queryFrom,pageNum: 1, pageSize: 20, campaignIdList: arr })
|
|
|
}
|
|
|
}}
|
|
|
onChange={(e) => {
|
|
@@ -312,7 +335,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, campaignIdList: arr })
|
|
|
+ set_queryFrom({...queryFrom,campaignIdList: arr })
|
|
|
+ getList({ ...queryFrom,pageNum: 1, pageSize: 20, campaignIdList: arr })
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
@@ -327,7 +351,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
}
|
|
|
allowClear
|
|
|
onChange={(value: any) => {
|
|
|
- getList({ pageNum: 1, pageSize: 20, promotedObjectType: value })
|
|
|
+ set_queryFrom({...queryFrom,promotedObjectType: value })
|
|
|
+ getList({ ...queryFrom,pageNum: 1, pageSize: 20, promotedObjectType: value })
|
|
|
}}
|
|
|
>
|
|
|
{Object.keys(PromotedObjectType).map(key => {
|
|
@@ -345,7 +370,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
}
|
|
|
allowClear
|
|
|
onChange={(value: any) => {
|
|
|
- getList({ pageNum: 1, pageSize: 20, isDeleted: value })
|
|
|
+ set_queryFrom({...queryFrom,isDeleted: value })
|
|
|
+ getList({ ...queryFrom,pageNum: 1, pageSize: 20, isDeleted: value })
|
|
|
}}
|
|
|
>
|
|
|
<Select.Option value={true}>已删除</Select.Option>
|
|
@@ -363,7 +389,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
}
|
|
|
allowClear
|
|
|
onChange={(value: any) => {
|
|
|
- getList({ pageNum: 1, pageSize: 20, statusList: value })
|
|
|
+ set_queryFrom({...queryFrom,statusList: value })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, statusList: value })
|
|
|
}}
|
|
|
>
|
|
|
{
|
|
@@ -385,7 +412,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter(a=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, memoList: arr })
|
|
|
+ set_queryFrom({...queryFrom,memoList: arr })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, memoList: arr })
|
|
|
}}
|
|
|
onKeyDownCapture={(e: any) => {
|
|
|
let key = e.key
|
|
@@ -396,7 +424,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, memoList: arr })
|
|
|
+ set_queryFrom({...queryFrom,memoList: arr })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, memoList: arr })
|
|
|
}
|
|
|
}}
|
|
|
onChange={(e) => {
|
|
@@ -407,7 +436,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, memoList: arr })
|
|
|
+ set_queryFrom({...queryFrom,memoList: arr })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, memoList: arr })
|
|
|
}
|
|
|
}}
|
|
|
/>
|
|
@@ -424,7 +454,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter(a=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, remarkList: arr })
|
|
|
+ set_queryFrom({...queryFrom,remarkList: arr })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, remarkList: arr })
|
|
|
}}
|
|
|
onKeyDownCapture={(e: any) => {
|
|
|
let key = e.key
|
|
@@ -435,7 +466,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, remarkList: arr })
|
|
|
+ set_queryFrom({...queryFrom,remarkList: arr })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, remarkList: arr })
|
|
|
}
|
|
|
}}
|
|
|
onChange={(e) => {
|
|
@@ -446,7 +478,8 @@ const Ad: React.FC<Props> = (props) => {
|
|
|
value = value.replace(/[,,\s]/g,',')
|
|
|
arr = value.split(',').filter((a: any)=>a)
|
|
|
}
|
|
|
- getList({ pageNum: 1, pageSize: 20, remarkList: arr })
|
|
|
+ set_queryFrom({...queryFrom,remarkList: arr })
|
|
|
+ getList({...queryFrom, pageNum: 1, pageSize: 20, remarkList: arr })
|
|
|
}
|
|
|
}}
|
|
|
/>
|