reactor:【SYSTEM 系统管理】邮箱日志,重构成 element-plus 标准界面
This commit is contained in:
@ -56,16 +56,7 @@
|
|||||||
@click="handleDeleteBatch"
|
@click="handleDeleteBatch"
|
||||||
v-hasPermi="['system:mail-account:delete']"
|
v-hasPermi="['system:mail-account:delete']"
|
||||||
>
|
>
|
||||||
<Icon icon="ep:delete" class="mr-5px" /> 批量删除</el-button
|
<Icon icon="ep:delete" class="mr-5px" /> 批量删除
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
@click="handleExport"
|
|
||||||
:loading="exportLoading"
|
|
||||||
v-hasPermi="['system:mail-account:export']"
|
|
||||||
>
|
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -134,7 +125,6 @@
|
|||||||
import { DICT_TYPE } from '@/utils/dict'
|
import { DICT_TYPE } from '@/utils/dict'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import * as MailAccountApi from '@/api/system/mail/account'
|
import * as MailAccountApi from '@/api/system/mail/account'
|
||||||
import download from '@/utils/download'
|
|
||||||
import MailAccountForm from './MailAccountForm.vue'
|
import MailAccountForm from './MailAccountForm.vue'
|
||||||
|
|
||||||
defineOptions({ name: 'SystemMailAccount' })
|
defineOptions({ name: 'SystemMailAccount' })
|
||||||
@ -153,7 +143,6 @@ const queryParams = reactive({
|
|||||||
username: '',
|
username: '',
|
||||||
createTime: []
|
createTime: []
|
||||||
})
|
})
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
|
||||||
|
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
@ -216,21 +205,6 @@ const handleDeleteBatch = async () => {
|
|||||||
} catch {}
|
} 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(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
|
|||||||
@ -89,15 +89,6 @@
|
|||||||
>
|
>
|
||||||
<Icon icon="ep:delete" class="mr-5px" />批量删除
|
<Icon icon="ep:delete" class="mr-5px" />批量删除
|
||||||
</el-button>
|
</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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
@ -206,7 +197,6 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import * as MailTemplateApi from '@/api/system/mail/template'
|
import * as MailTemplateApi from '@/api/system/mail/template'
|
||||||
import * as MailAccountApi from '@/api/system/mail/account'
|
import * as MailAccountApi from '@/api/system/mail/account'
|
||||||
import download from '@/utils/download'
|
|
||||||
import MailTemplateForm from './MailTemplateForm.vue'
|
import MailTemplateForm from './MailTemplateForm.vue'
|
||||||
import MailTemplateSendForm from './MailTemplateSendForm.vue'
|
import MailTemplateSendForm from './MailTemplateSendForm.vue'
|
||||||
|
|
||||||
@ -228,7 +218,6 @@ const queryParams = reactive({
|
|||||||
status: undefined,
|
status: undefined,
|
||||||
createTime: []
|
createTime: []
|
||||||
})
|
})
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
|
||||||
const accountList = ref<MailAccountApi.MailAccountVO[]>([]) // 邮箱账号列表
|
const accountList = ref<MailAccountApi.MailAccountVO[]>([]) // 邮箱账号列表
|
||||||
|
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
@ -298,21 +287,6 @@ const handleDeleteBatch = async () => {
|
|||||||
} catch {}
|
} 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 getAccountMail = (accountId: number) => {
|
||||||
const account = accountList.value.find((account) => account.id === accountId)
|
const account = accountList.value.find((account) => account.id === accountId)
|
||||||
|
|||||||
Reference in New Issue
Block a user