2023-02-11 00:44:00 +08:00
|
|
|
|
<template>
|
|
|
|
|
<ContentWrap>
|
2023-03-17 01:35:38 +08:00
|
|
|
|
<!-- TODO @芋艿:setSearchParams -->
|
2023-03-17 00:02:45 +08:00
|
|
|
|
<Search :schema="allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
|
|
|
|
|
</ContentWrap>
|
|
|
|
|
|
2023-03-17 01:35:38 +08:00
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="openModal('create')"
|
|
|
|
|
v-hasPermi="['system:mail-account:create']"
|
|
|
|
|
>
|
|
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
|
|
</el-button>
|
|
|
|
|
|
2023-03-17 00:02:45 +08:00
|
|
|
|
<ContentWrap>
|
|
|
|
|
<Table
|
|
|
|
|
v-model:pageSize="tableObject.pageSize"
|
|
|
|
|
v-model:currentPage="tableObject.currentPage"
|
|
|
|
|
:columns="allSchemas.tableColumns"
|
|
|
|
|
:data="tableObject.tableList"
|
|
|
|
|
:loading="tableObject.loading"
|
|
|
|
|
:pagination="{
|
|
|
|
|
total: tableObject.total
|
|
|
|
|
}"
|
|
|
|
|
@register="register"
|
|
|
|
|
>
|
|
|
|
|
<template #action="{ row }">
|
2023-03-17 01:35:38 +08:00
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="openModal('update', row.id)"
|
|
|
|
|
v-hasPermi="['system:mail-account:update']"
|
|
|
|
|
>
|
|
|
|
|
编辑
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
type="danger"
|
|
|
|
|
v-hasPermi="['system:mail-account:delete']"
|
|
|
|
|
@click="delList(row.id, false)"
|
|
|
|
|
>
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
2023-02-11 00:44:00 +08:00
|
|
|
|
</template>
|
2023-03-17 00:02:45 +08:00
|
|
|
|
</Table>
|
2023-02-11 00:44:00 +08:00
|
|
|
|
</ContentWrap>
|
2023-03-17 01:35:38 +08:00
|
|
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
|
|
|
<mail-account-form ref="modalRef" @success="getList" />
|
2023-02-11 00:44:00 +08:00
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts" name="MailAccount">
|
2023-03-17 00:02:45 +08:00
|
|
|
|
import { allSchemas } from './account.data'
|
|
|
|
|
import { useTable } from '@/hooks/web/useTable'
|
2023-02-11 00:44:00 +08:00
|
|
|
|
import * as MailAccountApi from '@/api/system/mail/account'
|
2023-03-17 01:35:38 +08:00
|
|
|
|
import MailAccountForm from './form.vue'
|
|
|
|
|
|
|
|
|
|
// const { t } = useI18n() // 国际化
|
|
|
|
|
// const message = useMessage() // 消息弹窗
|
2023-02-11 00:44:00 +08:00
|
|
|
|
|
2023-03-17 00:02:45 +08:00
|
|
|
|
const { register, tableObject, methods } = useTable<MailAccountApi.MailAccountVO>({
|
2023-02-11 00:44:00 +08:00
|
|
|
|
getListApi: MailAccountApi.getMailAccountPageApi,
|
2023-03-17 00:02:45 +08:00
|
|
|
|
delListApi: MailAccountApi.deleteMailAccountApi
|
2023-02-11 00:44:00 +08:00
|
|
|
|
})
|
|
|
|
|
|
2023-03-17 00:02:45 +08:00
|
|
|
|
const { getList, setSearchParams } = methods
|
2023-02-11 00:44:00 +08:00
|
|
|
|
|
2023-03-17 01:35:38 +08:00
|
|
|
|
const { delList } = methods
|
|
|
|
|
|
|
|
|
|
/** 添加/修改操作 */
|
|
|
|
|
const modalRef = ref()
|
|
|
|
|
const openModal = (type: string, id?: number) => {
|
|
|
|
|
modalRef.value.openModal(type, id)
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-17 00:02:45 +08:00
|
|
|
|
getList()
|
2023-02-11 00:44:00 +08:00
|
|
|
|
</script>
|