wip(sj_1.0.0): 定时任务导入、导出
This commit is contained in:
parent
f6d99c6e69
commit
1049a082c2
@ -10,9 +10,11 @@ import { blockStrategyRecord, taskTypeRecord, triggerTypeRecord } from '@/consta
|
|||||||
import StatusSwitch from '@/components/common/status-switch.vue';
|
import StatusSwitch from '@/components/common/status-switch.vue';
|
||||||
import { useRouterPush } from '@/hooks/common/router';
|
import { useRouterPush } from '@/hooks/common/router';
|
||||||
import { useAuth } from '@/hooks/business/auth';
|
import { useAuth } from '@/hooks/business/auth';
|
||||||
|
import { downloadFetch } from '@/utils/download';
|
||||||
import JobTaskOperateDrawer from './modules/job-task-operate-drawer.vue';
|
import JobTaskOperateDrawer from './modules/job-task-operate-drawer.vue';
|
||||||
import JobTaskSearch from './modules/job-task-search.vue';
|
import JobTaskSearch from './modules/job-task-search.vue';
|
||||||
import JobTaskDetailDrawer from './modules/job-task-detail-drawer.vue';
|
import JobTaskDetailDrawer from './modules/job-task-detail-drawer.vue';
|
||||||
|
|
||||||
const { hasAuth } = useAuth();
|
const { hasAuth } = useAuth();
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
@ -33,6 +35,11 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
|||||||
jobStatus: null
|
jobStatus: null
|
||||||
},
|
},
|
||||||
columns: () => [
|
columns: () => [
|
||||||
|
{
|
||||||
|
type: 'selection',
|
||||||
|
align: 'center',
|
||||||
|
width: 48
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'index',
|
key: 'index',
|
||||||
title: $t('common.index'),
|
title: $t('common.index'),
|
||||||
@ -245,6 +252,10 @@ async function handleTriggerJob(id: string) {
|
|||||||
function goToBatch(jobId: string) {
|
function goToBatch(jobId: string) {
|
||||||
routerPushByKey('job_batch', { query: { jobId } });
|
routerPushByKey('job_batch', { query: { jobId } });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleExport() {
|
||||||
|
downloadFetch('/job/export', checkedRowKeys.value, $t('page.jobTask.title'));
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -264,7 +275,17 @@ function goToBatch(jobId: string) {
|
|||||||
:show-delete="false"
|
:show-delete="false"
|
||||||
@add="handleAdd"
|
@add="handleAdd"
|
||||||
@refresh="getData"
|
@refresh="getData"
|
||||||
/>
|
>
|
||||||
|
<template #addAfter>
|
||||||
|
<FileUpload action="/job/import" accept="application/json" />
|
||||||
|
<NButton size="small" ghost type="primary" :disabled="checkedRowKeys.length === 0" @click="handleExport">
|
||||||
|
<template #icon>
|
||||||
|
<IconPajamasExport class="text-icon" />
|
||||||
|
</template>
|
||||||
|
{{ $t('common.export') }}
|
||||||
|
</NButton>
|
||||||
|
</template>
|
||||||
|
</TableHeaderOperation>
|
||||||
</template>
|
</template>
|
||||||
<NDataTable
|
<NDataTable
|
||||||
v-model:checked-row-keys="checkedRowKeys"
|
v-model:checked-row-keys="checkedRowKeys"
|
||||||
|
@ -212,7 +212,7 @@ function handleExport() {
|
|||||||
>
|
>
|
||||||
<template #addAfter>
|
<template #addAfter>
|
||||||
<FileUpload action="/scene-config/import" accept="application/json" />
|
<FileUpload action="/scene-config/import" accept="application/json" />
|
||||||
<NButton size="small" ghost type="primary" @click="handleExport">
|
<NButton size="small" ghost type="primary" :disabled="checkedRowKeys.length === 0" @click="handleExport">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<IconPajamasExport class="text-icon" />
|
<IconPajamasExport class="text-icon" />
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user