feat(sj_1.0.0_beta3): 新增组导出导入和优化菜单排序
1. 新增组的导入导出 2. 调整定时任务批量和任务管理的顺序 3. 调整工作流任务批量和任务管理的顺序 4. 调整重试场景的顺序
This commit is contained in:
parent
426b36ddac
commit
6d32a839d9
@ -1,9 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import type { UploadCustomRequestOptions, UploadFileInfo } from 'naive-ui';
|
||||
import { request } from '@/service/request';
|
||||
import { $t } from '@/locales';
|
||||
|
||||
defineOptions({
|
||||
name: 'FlieUpload'
|
||||
name: 'FileUpload'
|
||||
});
|
||||
|
||||
interface Props {
|
||||
@ -15,7 +16,7 @@ defineProps<Props>();
|
||||
|
||||
const beforeUpload = (fileData: { file: UploadFileInfo; fileList: UploadFileInfo[] }) => {
|
||||
if (fileData.file.file?.type !== 'application/json') {
|
||||
window.$message?.error('只能上传json格式的文件,请重新上传');
|
||||
window.$message?.error($t('common.checkUploadType'));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -24,6 +24,7 @@ const local: App.I18n.Schema = {
|
||||
rollbackSuccess: 'Rollback Success',
|
||||
deleteSuccess: 'Delete Success',
|
||||
confirmDelete: 'Are you sure you want to delete?',
|
||||
checkUploadType: 'Only JSON format files can be uploaded, please re-upload',
|
||||
import: 'import',
|
||||
export: 'export',
|
||||
batchCopy: 'BatchCopy',
|
||||
|
@ -24,6 +24,7 @@ const local: App.I18n.Schema = {
|
||||
rollbackSuccess: '回滚成功',
|
||||
deleteSuccess: '删除成功',
|
||||
confirmDelete: '确认删除吗?',
|
||||
checkUploadType: '只能上传json格式的文件,请重新上传',
|
||||
import: '导入',
|
||||
export: '导出',
|
||||
batchCopy: '批量复制',
|
||||
|
@ -215,16 +215,6 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
icon: 'eos-icons:cronjob'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'job_batch',
|
||||
path: '/job/batch',
|
||||
component: 'view.job_batch',
|
||||
meta: {
|
||||
title: 'job_batch',
|
||||
i18nKey: 'route.job_batch',
|
||||
icon: 'carbon:batch-job'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'job_task',
|
||||
path: '/job/task',
|
||||
@ -234,6 +224,16 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
i18nKey: 'route.job_task',
|
||||
icon: 'octicon:tasklist'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'job_batch',
|
||||
path: '/job/batch',
|
||||
component: 'view.job_batch',
|
||||
meta: {
|
||||
title: 'job_batch',
|
||||
i18nKey: 'route.job_batch',
|
||||
icon: 'carbon:batch-job'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -444,6 +444,17 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
icon: 'carbon:retry-failed'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'retry_scene',
|
||||
path: '/retry/scene',
|
||||
component: 'view.retry_scene',
|
||||
meta: {
|
||||
title: 'retry_scene',
|
||||
i18nKey: 'route.retry_scene',
|
||||
icon: 'cbi:scene-dynamic',
|
||||
order: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'retry_dead-letter',
|
||||
path: '/retry/dead-letter',
|
||||
@ -466,17 +477,6 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
order: 20
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'retry_scene',
|
||||
path: '/retry/scene',
|
||||
component: 'view.retry_scene',
|
||||
meta: {
|
||||
title: 'retry_scene',
|
||||
i18nKey: 'route.retry_scene',
|
||||
icon: 'cbi:scene-dynamic',
|
||||
order: 40
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'retry_task',
|
||||
path: '/retry/task',
|
||||
@ -537,6 +537,16 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
icon: 'lucide:workflow'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'workflow_task',
|
||||
path: '/workflow/task',
|
||||
component: 'view.workflow_task',
|
||||
meta: {
|
||||
title: 'workflow_task',
|
||||
i18nKey: 'route.workflow_task',
|
||||
icon: 'octicon:tasklist'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'workflow_batch',
|
||||
path: '/workflow/batch',
|
||||
@ -597,16 +607,6 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'workflow_task',
|
||||
path: '/workflow/task',
|
||||
component: 'view.workflow_task',
|
||||
meta: {
|
||||
title: 'workflow_task',
|
||||
i18nKey: 'route.workflow_task',
|
||||
icon: 'octicon:tasklist'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
1
src/typings/app.d.ts
vendored
1
src/typings/app.d.ts
vendored
@ -274,6 +274,7 @@ declare namespace App {
|
||||
rollbackSuccess: string;
|
||||
deleteSuccess: string;
|
||||
confirmDelete: string;
|
||||
checkUploadType: string;
|
||||
import: string;
|
||||
export: string;
|
||||
batchCopy: string;
|
||||
|
@ -10,6 +10,7 @@ import { groupConfigIdModeRecord, yesOrNoRecord } from '@/constants/business';
|
||||
import { tagColor } from '@/utils/common';
|
||||
import StatusSwitch from '@/components/common/status-switch.vue';
|
||||
import { useAuth } from '@/hooks/business/auth';
|
||||
import { downloadFetch } from '@/utils/download';
|
||||
import GroupOperateDrawer from './modules/group-operate-drawer.vue';
|
||||
import GroupDetailDrawer from './modules/group-detail-drawer.vue';
|
||||
import GroupSearch from './modules/group-search.vue';
|
||||
@ -154,6 +155,10 @@ const {
|
||||
function edit(id: string) {
|
||||
handleEdit(id);
|
||||
}
|
||||
|
||||
function handleExport() {
|
||||
downloadFetch('/group/export', checkedRowKeys.value, $t('page.groupConfig.title'));
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -175,7 +180,17 @@ function edit(id: string) {
|
||||
:show-add="hasAuth('R_ADMIN')"
|
||||
@add="handleAdd"
|
||||
@refresh="getData"
|
||||
/>
|
||||
>
|
||||
<template #addAfter>
|
||||
<FileUpload action="/group/import" accept="application/json" />
|
||||
<NButton size="small" ghost type="primary" @click="handleExport">
|
||||
<template #icon>
|
||||
<IconPajamasExport class="text-icon" />
|
||||
</template>
|
||||
{{ $t('common.export') }}
|
||||
</NButton>
|
||||
</template>
|
||||
</TableHeaderOperation>
|
||||
</template>
|
||||
<NDataTable
|
||||
v-model:checked-row-keys="checkedRowKeys"
|
||||
|
Loading…
Reference in New Issue
Block a user