import { Button, Select, Table } from 'antd'; import React, { useEffect, useState } from 'react'; import '../../tencentAdPutIn/index.less' import { useAjax } from '@/Hook/useAjax'; import { getCorpRelationAllApi, getCustomerServiceGroupListApi } from '@/services/adqV3/global'; import { SearchOutlined } from '@ant-design/icons'; import columns from './tableConfig'; import SettingsEnterprise from './settingsEnterprise'; const Group: React.FC<{ adAccountId?: number }> = ({ adAccountId }) => { /**********************************/ const [queryParamsNew, setQueryParamsNew] = useState<{ adAccountId: number, pageNum: number, pageSize: number, tencentCorpId?: string }>({ pageNum: 1, pageSize: 20, adAccountId: adAccountId || 0 }) const [settingsData, setSettingsData] = useState<{ visible: boolean, data: any }>({ visible: false, data: {} }) const getCustomerServiceGroupList = useAjax((params) => getCustomerServiceGroupListApi(params)) const getCorpRelationAll = useAjax((params) => getCorpRelationAllApi(params)) /**********************************/ useEffect(() => { if (adAccountId) { getCorpRelationAll.run({ adAccountId }) } }, [adAccountId]) useEffect(() => { if (adAccountId) { getCustomerServiceGroupList.run({ ...queryParamsNew, adAccountId }) } }, [queryParamsNew, adAccountId]) const handleEdit = (data: any) => { setSettingsData({ visible: true, data }) // setQueryParamsNew({ ...queryParamsNew, tencentCorpId: data.tencentCorpId }) } return <>