reactor:【SYSTEM 系统管理】邮箱日志,重构成 element-plus 标准界面

This commit is contained in:
YunaiV
2025-07-26 22:14:05 +08:00
parent cde1f209fb
commit 01254a0015
2 changed files with 1 additions and 53 deletions

View File

@ -56,16 +56,7 @@
@click="handleDeleteBatch"
v-hasPermi="['system:mail-account:delete']"
>
<Icon icon="ep:delete" class="mr-5px" /> 批量删除</el-button
>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['system:mail-account:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
<Icon icon="ep:delete" class="mr-5px" /> 批量删除
</el-button>
</el-form-item>
</el-form>
@ -134,7 +125,6 @@
import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import * as MailAccountApi from '@/api/system/mail/account'
import download from '@/utils/download'
import MailAccountForm from './MailAccountForm.vue'
defineOptions({ name: 'SystemMailAccount' })
@ -153,7 +143,6 @@ const queryParams = reactive({
username: '',
createTime: []
})
const exportLoading = ref(false) // 导出的加载中
/** 查询列表 */
const getList = async () => {
@ -216,21 +205,6 @@ const handleDeleteBatch = async () => {
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
// 导出的二次确认
await message.exportConfirm()
// 发起导出
exportLoading.value = true
const data = await MailAccountApi.exportMailAccount(queryParams)
download.excel(data, '邮箱账号.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()

View File

@ -89,15 +89,6 @@
>
<Icon icon="ep:delete" class="mr-5px" />批量删除
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['system:mail-template:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
@ -206,7 +197,6 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import * as MailTemplateApi from '@/api/system/mail/template'
import * as MailAccountApi from '@/api/system/mail/account'
import download from '@/utils/download'
import MailTemplateForm from './MailTemplateForm.vue'
import MailTemplateSendForm from './MailTemplateSendForm.vue'
@ -228,7 +218,6 @@ const queryParams = reactive({
status: undefined,
createTime: []
})
const exportLoading = ref(false) // 导出的加载中
const accountList = ref<MailAccountApi.MailAccountVO[]>([]) // 邮箱账号列表
/** 查询列表 */
@ -298,21 +287,6 @@ const handleDeleteBatch = async () => {
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
// 导出的二次确认
await message.exportConfirm()
// 发起导出
exportLoading.value = true
const data = await MailTemplateApi.exportMailTemplate(queryParams)
download.excel(data, '邮件模板.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 获取邮箱账号名称 */
const getAccountMail = (accountId: number) => {
const account = accountList.value.find((account) => account.id === accountId)