feat(sj_1.0.0_beta3): 工作流

1.定时任务 - 工作流任务管理列表新增导出导出功能
This commit is contained in:
wodeyangzipingpingwuqi 2024-05-29 17:40:13 +08:00
parent bea1d3f85c
commit 94b9c5c68e

View File

@ -14,6 +14,7 @@ import { triggerTypeRecord } from '@/constants/business';
import StatusSwitch from '@/components/common/status-switch.vue';
import { tagColor } from '@/utils/common';
import { useAuth } from '@/hooks/business/auth';
import { downloadFetch } from '@/utils/download';
import WorkflowSearch from './modules/workflow-search.vue';
const { hasAuth } = useAuth();
@ -249,6 +250,10 @@ async function execute(id: string) {
getData();
}
}
function handleExport() {
downloadFetch('/workflow/export', checkedRowKeys.value, $t('page.workflow.title'));
}
</script>
<template>
@ -270,7 +275,28 @@ async function execute(id: string) {
@add="handleAdd"
@delete="handleBatchDelete"
@refresh="getData"
/>
>
<template #addAfter>
<FileUpload action="/workflow/import" accept="application/json" />
<NPopconfirm @positive-click="handleExport">
<template #trigger>
<NButton size="small" ghost type="primary" :disabled="checkedRowKeys.length === 0 && hasAuth('R_USER')">
<template #icon>
<IconPajamasExport class="text-icon" />
</template>
{{ $t('common.export') }}
</NButton>
</template>
<template #default>
{{
checkedRowKeys.length === 0
? $t('common.exportAll')
: $t('common.exportPar', { num: checkedRowKeys.length })
}}
</template>
</NPopconfirm>
</template>
</TableHeaderOperation>
</template>
<NDataTable
v-model:checked-row-keys="checkedRowKeys"