diff --git a/apps/web-antd/src/views/system/client/index.vue b/apps/web-antd/src/views/system/client/index.vue index 90dcf3d1..7e3f0c52 100644 --- a/apps/web-antd/src/views/system/client/index.vue +++ b/apps/web-antd/src/views/system/client/index.vue @@ -6,6 +6,7 @@ import type { Client } from '#/api/system/client/model'; import { useAccess } from '@vben/access'; import { Page, useVbenDrawer } from '@vben/common-ui'; +import { DEFAULT_CLIENT_ID, EnableStatus } from '@vben/constants'; import { Modal, Popconfirm, Space } from 'antdv-next'; @@ -16,7 +17,7 @@ import { clientList, clientRemove, } from '#/api/system/client'; -import { TableSwitch } from '#/components/table'; +import { ApiSwitch } from '#/components/global'; import { commonDownloadExcel } from '#/utils/file/download'; import clientDrawer from './client-drawer.vue'; @@ -108,6 +109,12 @@ function handleDownloadExcel() { } const { hasAccessByCodes } = useAccess(); +async function handleChangeStatus(checked: boolean, row: Client) { + await clientChangeStatus({ + clientId: row.id, + status: checked ? EnableStatus.Enable : EnableStatus.Disable, + }); +}