You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

44 lines
1.3 KiB

<template>
2 years ago
<div>
<BasicTable @register="registerTable">
<template #toolbar>
2 years ago
<a-button type="warning" :preIcon="IconEnum.EXPORT" @click="handleExport"> {{ t('action.export') }} </a-button>
2 years ago
</template>
</BasicTable>
</div>
</template>
<script lang="ts" setup>
2 years ago
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { IconEnum } from '@/enums/appEnum'
2 years ago
import { BasicTable, useTable } from '@/components/Table'
import { OperateLogPageReqVO, exportOperateLog, getOperateLogPage } from '@/api/system/operatelog'
2 years ago
import { columns, searchFormSchema } from './operateLog.data'
defineOptions({ name: 'SystemOperateLog' })
2 years ago
const { t } = useI18n()
const { createConfirm, createMessage } = useMessage()
const [registerTable, { getForm }] = useTable({
title: '操作日志列表',
api: getOperateLogPage,
2 years ago
columns,
formConfig: { labelWidth: 120, schemas: searchFormSchema },
2 years ago
useSearchForm: true,
showTableSetting: true,
showIndexColumn: false
})
async function handleExport() {
createConfirm({
2 years ago
title: t('common.exportTitle'),
2 years ago
iconType: 'warning',
2 years ago
content: t('common.exportMessage'),
2 years ago
async onOk() {
await exportOperateLog(getForm().getFieldsValue() as OperateLogPageReqVO)
2 years ago
createMessage.success(t('common.exportSuccessText'))
}
})
}
</script>