Skip to content

Commit 01254a0

Browse files
committed
reactor:【SYSTEM 系统管理】邮箱日志,重构成 element-plus 标准界面
1 parent cde1f20 commit 01254a0

File tree

2 files changed

+1
-53
lines changed

2 files changed

+1
-53
lines changed

src/views/system/mail/account/index.vue

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,7 @@
5656
@click="handleDeleteBatch"
5757
v-hasPermi="['system:mail-account:delete']"
5858
>
59-
<Icon icon="ep:delete" class="mr-5px" /> 批量删除</el-button
60-
>
61-
<el-button
62-
type="success"
63-
plain
64-
@click="handleExport"
65-
:loading="exportLoading"
66-
v-hasPermi="['system:mail-account:export']"
67-
>
68-
<Icon icon="ep:download" class="mr-5px" /> 导出
59+
<Icon icon="ep:delete" class="mr-5px" /> 批量删除
6960
</el-button>
7061
</el-form-item>
7162
</el-form>
@@ -134,7 +125,6 @@
134125
import { DICT_TYPE } from '@/utils/dict'
135126
import { dateFormatter } from '@/utils/formatTime'
136127
import * as MailAccountApi from '@/api/system/mail/account'
137-
import download from '@/utils/download'
138128
import MailAccountForm from './MailAccountForm.vue'
139129
140130
defineOptions({ name: 'SystemMailAccount' })
@@ -153,7 +143,6 @@ const queryParams = reactive({
153143
username: '',
154144
createTime: []
155145
})
156-
const exportLoading = ref(false) // 导出的加载中
157146
158147
/** 查询列表 */
159148
const getList = async () => {
@@ -216,21 +205,6 @@ const handleDeleteBatch = async () => {
216205
} catch {}
217206
}
218207
219-
/** 导出按钮操作 */
220-
const handleExport = async () => {
221-
try {
222-
// 导出的二次确认
223-
await message.exportConfirm()
224-
// 发起导出
225-
exportLoading.value = true
226-
const data = await MailAccountApi.exportMailAccount(queryParams)
227-
download.excel(data, '邮箱账号.xls')
228-
} catch {
229-
} finally {
230-
exportLoading.value = false
231-
}
232-
}
233-
234208
/** 初始化 **/
235209
onMounted(() => {
236210
getList()

src/views/system/mail/template/index.vue

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,6 @@
8989
>
9090
<Icon icon="ep:delete" class="mr-5px" />批量删除
9191
</el-button>
92-
<el-button
93-
type="success"
94-
plain
95-
@click="handleExport"
96-
:loading="exportLoading"
97-
v-hasPermi="['system:mail-template:export']"
98-
>
99-
<Icon icon="ep:download" class="mr-5px" /> 导出
100-
</el-button>
10192
</el-form-item>
10293
</el-form>
10394
</ContentWrap>
@@ -206,7 +197,6 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
206197
import { dateFormatter } from '@/utils/formatTime'
207198
import * as MailTemplateApi from '@/api/system/mail/template'
208199
import * as MailAccountApi from '@/api/system/mail/account'
209-
import download from '@/utils/download'
210200
import MailTemplateForm from './MailTemplateForm.vue'
211201
import MailTemplateSendForm from './MailTemplateSendForm.vue'
212202
@@ -228,7 +218,6 @@ const queryParams = reactive({
228218
status: undefined,
229219
createTime: []
230220
})
231-
const exportLoading = ref(false) // 导出的加载中
232221
const accountList = ref<MailAccountApi.MailAccountVO[]>([]) // 邮箱账号列表
233222
234223
/** 查询列表 */
@@ -298,21 +287,6 @@ const handleDeleteBatch = async () => {
298287
} catch {}
299288
}
300289
301-
/** 导出按钮操作 */
302-
const handleExport = async () => {
303-
try {
304-
// 导出的二次确认
305-
await message.exportConfirm()
306-
// 发起导出
307-
exportLoading.value = true
308-
const data = await MailTemplateApi.exportMailTemplate(queryParams)
309-
download.excel(data, '邮件模板.xls')
310-
} catch {
311-
} finally {
312-
exportLoading.value = false
313-
}
314-
}
315-
316290
/** 获取邮箱账号名称 */
317291
const getAccountMail = (accountId: number) => {
318292
const account = accountList.value.find((account) => account.id === accountId)

0 commit comments

Comments
 (0)