Browse Source

列表

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

10
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) {

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

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

2
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[]}/>
</ListPageLayout>

6
src/service/websites.ts

@ -20,8 +20,8 @@ const websitesServ = {
},
dns: {
...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: {
@ -38,7 +38,7 @@ const websitesServ = {
},
dnsAccount: {
...createCURD<any, IWebsiteDnsAccount>('/website/dns_account'),
sync: async (params:IWebsiteDnsAccount) => {
sync: async (params: IWebsiteDnsAccount) => {
return request.post<any, IWebsiteDnsAccount>('/website/dns_account/sync', params)
}
},

Loading…
Cancel
Save