Browse Source

列表

main
chenyang 5 months ago
parent
commit
16b662c319
  1. 8
      src/pages/websites/account/index.tsx
  2. 1
      src/pages/websites/dns/DNSList.tsx
  3. 2
      src/pages/websites/record/index.tsx
  4. 4
      src/service/websites.ts

8
src/pages/websites/account/index.tsx

@ -162,7 +162,7 @@ const WebsiteDnsAccount = () => {
const [ filterForm ] = Form.useForm() const [ filterForm ] = Form.useForm()
const { mutate: saveOrUpdate, isPending: isSubmitting, isSuccess } = useAtomValue(saveOrUpdateWebsiteDnsAccountAtom) const { mutate: saveOrUpdate, isPending: isSubmitting, isSuccess } = useAtomValue(saveOrUpdateWebsiteDnsAccountAtom)
const [ search, setSearch ] = useAtom(websiteDnsAccountSearchAtom) const [ search, setSearch ] = useAtom(websiteDnsAccountSearchAtom)
const [ currentWebsiteDnsAccount, setWebsiteDnsAccount ] = useAtom(websiteDnsAccountAtom)
const [ setWebsiteDnsAccount ] = useAtom(websiteDnsAccountAtom)
const { data, isFetching, isLoading, refetch } = useAtomValue(websiteDnsAccountsAtom) const { data, isFetching, isLoading, refetch } = useAtomValue(websiteDnsAccountsAtom)
const { mutate: deleteWebsiteDnsAccount, isPending: isDeleting } = useAtomValue(deleteWebsiteDnsAccountAtom) const { mutate: deleteWebsiteDnsAccount, isPending: isDeleting } = useAtomValue(deleteWebsiteDnsAccountAtom)
const { mutate: asyncDNS, isPending: isAsyncing } = useAtomValue(syncDNSAtom) const { mutate: asyncDNS, isPending: isAsyncing } = useAtomValue(syncDNSAtom)
@ -265,7 +265,7 @@ const WebsiteDnsAccount = () => {
key={'sync_confirm'} key={'sync_confirm'}
disabled={isAsyncing || record.status === 2} disabled={isAsyncing || record.status === 2}
onConfirm={() => { onConfirm={() => {
asyncDNS(record)
asyncDNS(record.id)
}} }}
title={t('message.syncConfirm', '您确定要同步吗?')}> title={t('message.syncConfirm', '您确定要同步吗?')}>
{t('actions.sync', '同步')} {t('actions.sync', '同步')}
@ -283,13 +283,11 @@ const WebsiteDnsAccount = () => {
] ]
} }
] as ProColumns[] ] as ProColumns[]
}, [ isDeleting, currentWebsiteDnsAccount, search ])
}, [ isAsyncing, isDeleting, form, asyncDNS, deleteWebsiteDnsAccount])
useEffect(() => { useEffect(() => {
setSearchKey(search?.title) setSearchKey(search?.title)
filterForm.setFieldsValue(search) filterForm.setFieldsValue(search)
}, [ search]) }, [ search])
useEffect(() => { useEffect(() => {

1
src/pages/websites/dns/DNSList.tsx

@ -177,7 +177,6 @@ const DNSList = () => {
] ]
} }
}, },
{ {
title: t('website.ssl.dns.columns.type', '类型'), title: t('website.ssl.dns.columns.type', '类型'),
dataIndex: 'type', dataIndex: 'type',

2
src/pages/websites/record/index.tsx

@ -311,9 +311,7 @@ const WebsiteDnsRecords = () => {
values[key] = values[key].split(',') values[key] = values[key].split(',')
} }
}) })
setSearch(values) setSearch(values)
}} }}
columns={columns.filter(item => !item.hideInSearch) as ProFormColumnsType[]}/> columns={columns.filter(item => !item.hideInSearch) as ProFormColumnsType[]}/>
</ListPageLayout> </ListPageLayout>

4
src/service/websites.ts

@ -20,8 +20,8 @@ const websitesServ = {
}, },
dns: { dns: {
...createCURD<any, WebSite.IDnsAccount>('/website/dns_account'), ...createCURD<any, WebSite.IDnsAccount>('/website/dns_account'),
sync: async (params: WebSite.IDnsAccount) => {
return request.post<any, WebSite.IDnsAccount>('/website/dns_account/sync', params)
sync: async (id: any) => {
return request.post<any, WebSite.IDnsAccount>('/website/dns_account/sync', { id: id })
} }
}, },
ca: { ca: {

Loading…
Cancel
Save