diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts index 80b4e6e..3106f27 100644 --- a/src/typings/api.d.ts +++ b/src/typings/api.d.ts @@ -987,6 +987,11 @@ declare namespace Api { /** JobTask list */ type JobList = Common.PaginatingQueryRecord; + type ExportJob = Common.CommonRecord<{ + jobIds: string[]; + }> & + JobSearchParams; + /** 2、固定时间 3、CRON表达式 99、工作流 */ type TriggerType = 2 | 3 | 99; diff --git a/src/views/job/task/index.vue b/src/views/job/task/index.vue index 586b237..e802b1a 100644 --- a/src/views/job/task/index.vue +++ b/src/views/job/task/index.vue @@ -253,8 +253,17 @@ function goToBatch(jobId: string) { routerPushByKey('job_batch', { query: { jobId } }); } +function body(): Api.Job.ExportJob { + return { + jobIds: checkedRowKeys.value, + groupName: searchParams.groupName, + jobName: searchParams.jobName, + jobStatus: searchParams.jobStatus + }; +} + function handleExport() { - downloadFetch('/job/export', checkedRowKeys.value, $t('page.jobTask.title')); + downloadFetch('/job/export', body(), $t('page.jobTask.title')); }