feat: 带查询参数的导出

This commit is contained in:
dap 2024-10-07 17:11:08 +08:00
parent 0f31c8df57
commit 81e2fa856a
11 changed files with 77 additions and 11 deletions

View File

@ -146,7 +146,13 @@ async function handleUnlock() {
</a-button>
<a-button
v-access:code="['monitor:logininfor:export']"
@click="downloadExcel(loginInfoExport, '登录日志', {})"
@click="
downloadExcel(
loginInfoExport,
'登录日志',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>

View File

@ -151,7 +151,13 @@ async function handleDelete() {
</a-button>
<a-button
v-access:code="['monitor:operlog:export']"
@click="downloadExcel(operLogExport, '操作日志', {})"
@click="
downloadExcel(
operLogExport,
'操作日志',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>

View File

@ -126,7 +126,13 @@ const { hasAccessByCodes } = useAccess();
<Space>
<a-button
v-access:code="['system:client:export']"
@click="downloadExcel(clientExport, '系统授权数据', {})"
@click="
downloadExcel(
clientExport,
'客户端数据',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>

View File

@ -139,7 +139,13 @@ async function handleRefreshCache() {
<a-button @click="handleRefreshCache"> 刷新缓存 </a-button>
<a-button
v-access:code="['system:config:export']"
@click="downloadExcel(configExport, '参数配置', {})"
@click="
downloadExcel(
configExport,
'参数配置',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>

View File

@ -151,7 +151,13 @@ emitter.on('rowClick', async (value) => {
<Space>
<a-button
v-access:code="['system:dict:export']"
@click="downloadExcel(dictDataExport, '字典数据', {})"
@click="
downloadExcel(
dictDataExport,
'字典数据',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>

View File

@ -197,7 +197,13 @@ function handleSyncTenantDict() {
</Dropdown>
<a-button
v-access:code="['system:dict:export']"
@click="downloadExcel(dictTypeExport, '字典类型数据', {})"
@click="
downloadExcel(
dictTypeExport,
'字典类型数据',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>

View File

@ -153,7 +153,13 @@ function handleMultiDelete() {
<Space>
<a-button
v-access:code="['system:post:export']"
@click="downloadExcel(postExport, '岗位信息数据', {})"
@click="
downloadExcel(
postExport,
'岗位信息数据',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>

View File

@ -170,7 +170,13 @@ function handleAssignRole(record: Recordable<any>) {
<Space>
<a-button
v-access:code="['system:role:export']"
@click="downloadExcel(roleExport, '角色数据', {})"
@click="
downloadExcel(
roleExport,
'角色数据',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>

View File

@ -162,7 +162,13 @@ const isSuperAdmin = computed(() => {
<Space>
<a-button
v-access:code="['system:tenant:export']"
@click="downloadExcel(tenantExport, '租户数据', {})"
@click="
downloadExcel(
tenantExport,
'租户数据',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>

View File

@ -149,7 +149,13 @@ const isSuperAdmin = computed(() => {
<Space>
<a-button
v-access:code="['system:tenantPackage:export']"
@click="downloadExcel(packageExport, '租户套餐数据', {})"
@click="
downloadExcel(
packageExport,
'租户套餐数据',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>

View File

@ -208,7 +208,13 @@ function handleResetPwd(record: Recordable<any>) {
<Space>
<a-button
v-access:code="['system:user:export']"
@click="downloadExcel(userExport, '用户管理', {})"
@click="
downloadExcel(
userExport,
'用户管理',
tableApi.formApi.form.values,
)
"
>
{{ $t('pages.common.export') }}
</a-button>