diff --git a/src/pages/websites/account/index.tsx b/src/pages/websites/account/index.tsx index bfbdeed..c015a97 100644 --- a/src/pages/websites/account/index.tsx +++ b/src/pages/websites/account/index.tsx @@ -162,7 +162,7 @@ const WebsiteDnsAccount = () => { const [ filterForm ] = Form.useForm() const { mutate: saveOrUpdate, isPending: isSubmitting, isSuccess } = useAtomValue(saveOrUpdateWebsiteDnsAccountAtom) const [ search, setSearch ] = useAtom(websiteDnsAccountSearchAtom) - const [ currentWebsiteDnsAccount, setWebsiteDnsAccount ] = useAtom(websiteDnsAccountAtom) + const [ setWebsiteDnsAccount ] = useAtom(websiteDnsAccountAtom) const { data, isFetching, isLoading, refetch } = useAtomValue(websiteDnsAccountsAtom) const { mutate: deleteWebsiteDnsAccount, isPending: isDeleting } = useAtomValue(deleteWebsiteDnsAccountAtom) const { mutate: asyncDNS, isPending: isAsyncing } = useAtomValue(syncDNSAtom) @@ -265,7 +265,7 @@ const WebsiteDnsAccount = () => { key={'sync_confirm'} disabled={isAsyncing || record.status === 2} onConfirm={() => { - asyncDNS(record) + asyncDNS(record.id) }} title={t('message.syncConfirm', '您确定要同步吗?')}> {t('actions.sync', '同步')} @@ -283,14 +283,12 @@ const WebsiteDnsAccount = () => { ] } ] as ProColumns[] - }, [ isDeleting, currentWebsiteDnsAccount, search ]) + }, [ isAsyncing, isDeleting, form, asyncDNS, deleteWebsiteDnsAccount]) useEffect(() => { - setSearchKey(search?.title) filterForm.setFieldsValue(search) - - }, [ search ]) + }, [ search]) useEffect(() => { if (isSuccess) { diff --git a/src/pages/websites/dns/DNSList.tsx b/src/pages/websites/dns/DNSList.tsx index d214311..3830888 100644 --- a/src/pages/websites/dns/DNSList.tsx +++ b/src/pages/websites/dns/DNSList.tsx @@ -177,7 +177,6 @@ const DNSList = () => { ] } }, - { title: t('website.ssl.dns.columns.type', '类型'), dataIndex: 'type', diff --git a/src/pages/websites/record/index.tsx b/src/pages/websites/record/index.tsx index e77e438..c7b44e9 100644 --- a/src/pages/websites/record/index.tsx +++ b/src/pages/websites/record/index.tsx @@ -311,9 +311,7 @@ const WebsiteDnsRecords = () => { values[key] = values[key].split(',') } }) - setSearch(values) - }} columns={columns.filter(item => !item.hideInSearch) as ProFormColumnsType[]}/> diff --git a/src/service/websites.ts b/src/service/websites.ts index 178aa9a..01b1265 100644 --- a/src/service/websites.ts +++ b/src/service/websites.ts @@ -20,8 +20,8 @@ const websitesServ = { }, dns: { ...createCURD('/website/dns_account'), - sync: async (params: WebSite.IDnsAccount) => { - return request.post('/website/dns_account/sync', params) + sync: async (id: any) => { + return request.post('/website/dns_account/sync', { id: id }) } }, ca: { @@ -38,7 +38,7 @@ const websitesServ = { }, dnsAccount: { ...createCURD('/website/dns_account'), - sync: async (params:IWebsiteDnsAccount) => { + sync: async (params: IWebsiteDnsAccount) => { return request.post('/website/dns_account/sync', params) } },