refactor:vue3 export function

This commit is contained in:
xingyu
2022-07-28 18:23:09 +08:00
parent 4825e3a2e3
commit e16f8abc3a
14 changed files with 18 additions and 78 deletions

View File

@ -23,10 +23,6 @@ const { getList, setSearchParams, exportList } = methods
const detailRef = ref() // 详情 Ref
const dialogVisible = ref(false) // 是否显示弹出层
const dialogTitle = ref('') // 弹出层标题
// 导出操作
const handleExport = async () => {
await exportList('错误数据.xls')
}
// 详情操作
const handleDetail = (row: ApiErrorLogVO) => {
@ -57,7 +53,7 @@ getList()
<Search :schema="allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<ContentWrap>
<el-button v-hasPermi="['infra:api-error-log:export']" @click="handleExport">
<el-button v-hasPermi="['infra:api-error-log:export']" @click="exportList('错误数据.xls')">
<Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
</el-button>
<!-- 列表 -->

View File

@ -19,11 +19,6 @@ const { register, tableObject, methods } = useTable<ConfigVO>({
})
const { getList, setSearchParams, delList, exportList } = methods
// 导出操作
const handleExport = async () => {
await exportList('参数配置.xls')
}
// ========== CRUD 相关 ==========
const actionLoading = ref(false) // 遮罩层
const actionType = ref('') // 操作按钮的类型
@ -103,7 +98,7 @@ getList()
type="warning"
v-hasPermi="['infra:config:export']"
:loading="tableObject.exportLoading"
@click="handleExport"
@click="exportList('参数配置.xls')"
>
<Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
</el-button>

View File

@ -25,10 +25,6 @@ const getTableList = async () => {
}
await getList()
}
// 导出操作
const handleExport = async () => {
await exportList('定时任务日志.xls')
}
// ========== CRUD 相关 ==========
const dialogVisible = ref(false) // 是否显示弹出层
@ -63,7 +59,7 @@ onMounted(() => {
type="warning"
v-hasPermi="['infra:job:export']"
:loading="tableObject.exportLoading"
@click="handleExport"
@click="exportList('定时任务日志.xls')"
>
<Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
</el-button>

View File

@ -22,11 +22,6 @@ const { register, tableObject, methods } = useTable<JobVO>({
})
const { getList, setSearchParams, delList, exportList } = methods
// 导出操作
const handleExport = async () => {
await exportList('定时任务.xls')
}
// ========== CRUD 相关 ==========
const actionLoading = ref(false) // 遮罩层
const actionType = ref('') // 操作按钮的类型
@ -121,7 +116,7 @@ getList()
type="warning"
v-hasPermi="['infra:job:export']"
:loading="tableObject.exportLoading"
@click="handleExport"
@click="exportList('定时任务.xls')"
>
<Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
</el-button>