import { useAjax } from "@/Hook/useAjax" import { getDynamicCreativeV3ListApi } from "@/services/launchAdq/adqv3" import { Button, Col, Form, Input, Row, Select, Space } from "antd" import React, { useEffect } from "react" import { txDynamicConfig } from "../config" import tableConfig from "./tableConfig" import TableData from "@/pages/launchSystemNew/components/TableData" const Creative: React.FC = ({ queryForm, setQueryForm, userId }) => { /*********************************/ const [form] = Form.useForm(); const getDynamicCreativeV3List = useAjax((params) => getDynamicCreativeV3ListApi(params), { formatResult: true }) /*********************************/ useEffect(() => { form.setFieldsValue({ adgroupId: queryForm.adgroupId }) }, [queryForm.adgroupId]) useEffect(() => { getDynamicCreativeV3List.run({ ...queryForm, userId }) }, [userId, queryForm]) const onFinish = (values: any) => { console.log(values) setQueryForm({ ...queryForm, ...values }) } return
tableConfig()} ajax={getDynamicCreativeV3List} fixed={{ left: 2, right: 4 }} dataSource={getDynamicCreativeV3List?.data?.data?.records} loading={getDynamicCreativeV3List?.loading} scroll={{ y: 560 }} total={getDynamicCreativeV3List?.data?.data?.total} page={getDynamicCreativeV3List?.data?.data?.current} pageSize={getDynamicCreativeV3List?.data?.data?.size} myKey={'dynamicCreativeId'} gutter={[0, 10]} config={txDynamicConfig} configName="创意3.0" leftChild={ } onChange={(props: any) => { let { pagination } = props let { current, pageSize } = pagination setQueryForm({ ...queryForm, pageNum: current, pageSize }) }} />
} export default React.memo(Creative)