2023-02-11 00:44:00 +08:00
|
|
|
|
<template>
|
2023-04-05 20:13:35 +08:00
|
|
|
|
<doc-alert title="邮件配置" url="https://doc.iocoder.cn/mail" />
|
|
|
|
|
|
2023-03-18 12:24:21 +08:00
|
|
|
|
<!-- 搜索工作栏 -->
|
2023-04-05 20:13:35 +08:00
|
|
|
|
<ContentWrap>
|
2023-03-18 12:24:21 +08:00
|
|
|
|
<Search :schema="allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
|
2023-04-05 20:13:35 +08:00
|
|
|
|
</ContentWrap>
|
2023-03-18 12:24:21 +08:00
|
|
|
|
|
|
|
|
|
<!-- 列表 -->
|
2023-04-05 20:13:35 +08:00
|
|
|
|
<ContentWrap>
|
2023-03-18 12:24:21 +08:00
|
|
|
|
<Table
|
|
|
|
|
:columns="allSchemas.tableColumns"
|
|
|
|
|
:data="tableObject.tableList"
|
|
|
|
|
:loading="tableObject.loading"
|
|
|
|
|
:pagination="{
|
|
|
|
|
total: tableObject.total
|
|
|
|
|
}"
|
|
|
|
|
v-model:pageSize="tableObject.pageSize"
|
|
|
|
|
v-model:currentPage="tableObject.currentPage"
|
|
|
|
|
>
|
|
|
|
|
<template #action="{ row }">
|
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
type="primary"
|
2023-04-05 20:13:35 +08:00
|
|
|
|
@click="openDetail(row.id)"
|
2023-02-11 00:44:00 +08:00
|
|
|
|
v-hasPermi="['system:mail-log:query']"
|
2023-03-18 12:24:21 +08:00
|
|
|
|
>
|
|
|
|
|
详情
|
|
|
|
|
</el-button>
|
2023-02-11 00:44:00 +08:00
|
|
|
|
</template>
|
2023-03-18 12:24:21 +08:00
|
|
|
|
</Table>
|
2023-04-05 20:13:35 +08:00
|
|
|
|
</ContentWrap>
|
2023-03-18 12:24:21 +08:00
|
|
|
|
|
2023-03-18 20:09:30 +08:00
|
|
|
|
<!-- 表单弹窗:详情 -->
|
2023-04-05 20:13:35 +08:00
|
|
|
|
<mail-log-detail ref="detailRef" />
|
2023-02-11 00:44:00 +08:00
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts" name="MailLog">
|
|
|
|
|
import { allSchemas } from './log.data'
|
|
|
|
|
import * as MailLogApi from '@/api/system/mail/log'
|
2023-04-05 20:13:35 +08:00
|
|
|
|
import MailLogDetail from './MailLogDetail.vue'
|
2023-02-11 00:44:00 +08:00
|
|
|
|
|
2023-03-18 12:24:21 +08:00
|
|
|
|
// tableObject:表格的属性对象,可获得分页大小、条数等属性
|
|
|
|
|
// tableMethods:表格的操作对象,可进行获得分页、删除记录等操作
|
|
|
|
|
// 详细可见:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/components/table.html#usetable
|
|
|
|
|
const { tableObject, tableMethods } = useTable({
|
2023-03-18 13:56:17 +08:00
|
|
|
|
getListApi: MailLogApi.getMailLogPage // 分页接口
|
2023-02-11 00:44:00 +08:00
|
|
|
|
})
|
2023-03-18 12:24:21 +08:00
|
|
|
|
// 获得表格的各种操作
|
|
|
|
|
const { getList, setSearchParams } = tableMethods
|
2023-02-11 00:44:00 +08:00
|
|
|
|
|
2023-03-18 20:09:30 +08:00
|
|
|
|
/** 详情操作 */
|
2023-04-05 20:13:35 +08:00
|
|
|
|
const detailRef = ref()
|
|
|
|
|
const openDetail = (id: number) => {
|
|
|
|
|
detailRef.value.open(id)
|
2023-02-11 00:44:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-18 12:24:21 +08:00
|
|
|
|
/** 初始化 **/
|
2023-02-11 00:44:00 +08:00
|
|
|
|
onMounted(() => {
|
2023-03-18 12:24:21 +08:00
|
|
|
|
getList()
|
2023-02-11 00:44:00 +08:00
|
|
|
|
})
|
|
|
|
|
</script>
|