|
@@ -3,11 +3,21 @@
|
|
|
<!-- 搜索工作栏 -->
|
|
|
<ContentWrap>
|
|
|
<Search :schema="allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
|
|
|
+ <div style="display: flex; justify-content: flex-end;">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="handleMultipleResend"
|
|
|
+ v-hasPermi="['system:mail-log:query']"
|
|
|
+ >
|
|
|
+ 重新发送
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</ContentWrap>
|
|
|
|
|
|
<!-- 列表 -->
|
|
|
<ContentWrap>
|
|
|
<Table
|
|
|
+ :selection="true"
|
|
|
:columns="allSchemas.tableColumns"
|
|
|
:data="tableObject.tableList"
|
|
|
:loading="tableObject.loading"
|
|
@@ -16,6 +26,7 @@
|
|
|
}"
|
|
|
v-model:pageSize="tableObject.pageSize"
|
|
|
v-model:currentPage="tableObject.currentPage"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
>
|
|
|
<template #action="{ row }">
|
|
|
<el-button
|
|
@@ -26,6 +37,14 @@
|
|
|
>
|
|
|
详情
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="resend(row.id)"
|
|
|
+ v-hasPermi="['system:mail-log:query']"
|
|
|
+ >
|
|
|
+ 重新发送
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</Table>
|
|
|
</ContentWrap>
|
|
@@ -37,7 +56,7 @@
|
|
|
import { allSchemas } from './log.data'
|
|
|
import * as MailLogApi from '@/api/system/mail/log'
|
|
|
import MailLogDetail from './MailLogDetail.vue'
|
|
|
-
|
|
|
+const message = useMessage() // 消息弹窗
|
|
|
defineOptions({ name: 'SystemMailLog' })
|
|
|
|
|
|
// tableObject:表格的属性对象,可获得分页大小、条数等属性
|
|
@@ -55,6 +74,30 @@ const openDetail = (id: number) => {
|
|
|
detailRef.value.open(id)
|
|
|
}
|
|
|
|
|
|
+const multipleSelection = ref<any[]>([])
|
|
|
+let ids = ''
|
|
|
+const handleSelectionChange = (val: any[]) => {
|
|
|
+ multipleSelection.value = val.map(e => e.id)
|
|
|
+ ids = multipleSelection.value.join(',')
|
|
|
+}
|
|
|
+
|
|
|
+const handleMultipleResend = () => {
|
|
|
+ resend(ids)
|
|
|
+}
|
|
|
+
|
|
|
+/** 重新发送 */
|
|
|
+const resend = async (ids: string) => {
|
|
|
+ try {
|
|
|
+ // 重新发送的二次确认
|
|
|
+ await message.delConfirm(`是否确定对所选中数据重新发送邮件?`)
|
|
|
+ // 发起重新发送
|
|
|
+ await MailLogApi.getMailRetry(ids)
|
|
|
+ message.success('发送邮件成功')
|
|
|
+ // 刷新列表
|
|
|
+ // await getList()
|
|
|
+ } catch {}
|
|
|
+}
|
|
|
+
|
|
|
/** 初始化 **/
|
|
|
onMounted(() => {
|
|
|
getList()
|