admin-vben5/apps/web-antd/src/views/system/user/index.vue

30 lines
768 B
Vue
Raw Normal View History

2024-08-07 08:57:56 +08:00
<script setup lang="ts">
2024-09-13 16:22:04 +08:00
import { Page, useVbenModal } from '@vben/common-ui';
import { $t } from '@vben/locales';
2024-08-07 08:57:56 +08:00
2024-09-13 16:22:04 +08:00
import { userExport } from '#/api/system/user';
import { downloadExcel } from '#/utils/file/download';
2024-08-26 09:25:15 +08:00
2024-09-13 16:22:04 +08:00
import userImportModal from './user-import-modal.vue';
2024-08-08 14:05:08 +08:00
2024-09-13 16:22:04 +08:00
const [UserImpotModal, userImportModalApi] = useVbenModal({
connectedComponent: userImportModal,
2024-08-26 09:25:15 +08:00
});
2024-09-13 16:22:04 +08:00
function handleImport() {
userImportModalApi.open();
}
2024-08-07 08:57:56 +08:00
</script>
<template>
2024-09-13 16:22:04 +08:00
<Page>
<div class="flex gap-[8px]">
<a-button @click="downloadExcel(userExport, '用户管理', {})">
{{ $t('pages.common.export') }}
</a-button>
<a-button @click="handleImport">{{ $t('pages.common.import') }}</a-button>
</div>
<UserImpotModal />
</Page>
2024-08-07 08:57:56 +08:00
</template>