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.
44 lines
1.3 KiB
44 lines
1.3 KiB
2 years ago
|
<template>
|
||
2 years ago
|
<div>
|
||
|
<BasicTable @register="registerTable">
|
||
|
<template #toolbar>
|
||
2 years ago
|
<a-button type="warning" v-auth="['system:sms-log:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||
|
{{ t('action.export') }}
|
||
|
</a-button>
|
||
2 years ago
|
</template>
|
||
|
</BasicTable>
|
||
|
</div>
|
||
2 years ago
|
</template>
|
||
2 years ago
|
<script lang="ts" setup name="SmsLog">
|
||
|
import { BasicTable, useTable } from '@/components/Table'
|
||
2 years ago
|
import { IconEnum } from '@/enums/appEnum'
|
||
2 years ago
|
import { SmsLogExportReqVO, exportSmsLog, getSmsLogPage } from '@/api/system/sms/smsLog'
|
||
2 years ago
|
import { columns, searchFormSchema } from './smsLog.data'
|
||
|
import { useI18n } from '@/hooks/web/useI18n'
|
||
|
import { useMessage } from '@/hooks/web/useMessage'
|
||
|
|
||
|
const { t } = useI18n()
|
||
|
const { createConfirm, createMessage } = useMessage()
|
||
|
const [registerTable, { getForm }] = useTable({
|
||
|
title: '短信日志列表',
|
||
2 years ago
|
api: getSmsLogPage,
|
||
2 years ago
|
columns,
|
||
2 years ago
|
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() {
|
||
2 years ago
|
await exportSmsLog(getForm().getFieldsValue() as SmsLogExportReqVO)
|
||
2 years ago
|
createMessage.success(t('common.exportSuccessText'))
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
</script>
|