diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts
index 1fb829f..e47c07e 100644
--- a/src/locales/langs/en-us.ts
+++ b/src/locales/langs/en-us.ts
@@ -24,6 +24,9 @@ const local: App.I18n.Schema = {
rollbackSuccess: 'Rollback Success',
deleteSuccess: 'Delete Success',
confirmDelete: 'Are you sure you want to delete?',
+ import: 'import',
+ export: 'export',
+ batchCopy: 'BatchCopy',
edit: 'Edit',
detail: 'Detail',
index: 'Index',
diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts
index 1f29627..70415e2 100644
--- a/src/locales/langs/zh-cn.ts
+++ b/src/locales/langs/zh-cn.ts
@@ -24,6 +24,9 @@ const local: App.I18n.Schema = {
rollbackSuccess: '回滚成功',
deleteSuccess: '删除成功',
confirmDelete: '确认删除吗?',
+ import: '导入',
+ export: '导出',
+ batchCopy: '批量复制',
edit: '编辑',
detail: '详情',
index: '序号',
diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts
index 97adfe1..f6f86e4 100644
--- a/src/typings/app.d.ts
+++ b/src/typings/app.d.ts
@@ -274,6 +274,9 @@ declare namespace App {
rollbackSuccess: string;
deleteSuccess: string;
confirmDelete: string;
+ import: string;
+ export: string;
+ batchCopy: string;
edit: string;
detail: string;
index: string;
diff --git a/src/views/retry/scene/index.vue b/src/views/retry/scene/index.vue
index 3219301..c3f68ac 100644
--- a/src/views/retry/scene/index.vue
+++ b/src/views/retry/scene/index.vue
@@ -2,6 +2,7 @@
import { NButton, NTag } from 'naive-ui';
import { ref } from 'vue';
import { useBoolean } from '@sa/hooks';
+import type { UploadFileInfo } from 'naive-ui';
import { fetchGetRetryScenePageList, fetchUpdateSceneStatus } from '@/service/api';
import { $t } from '@/locales';
import { useAppStore } from '@/store/modules/app';
@@ -179,6 +180,14 @@ function triggerInterval(backOff: number, maxRetryCount: number) {
}
return desc.substring(1, desc.length);
}
+
+async function beforeUpload(fileData: { file: UploadFileInfo; fileList: UploadFileInfo[] }) {
+ if (fileData.file.file?.type !== 'application/json') {
+ window.$message?.error('只能上传json格式的文件,请重新上传');
+ return false;
+ }
+ return true;
+}
@@ -199,7 +208,30 @@ function triggerInterval(backOff: number, maxRetryCount: number) {
:show-delete="false"
@add="handleAdd"
@refresh="getData"
- />
+ >
+
+
+
+
+
+
+ {{ $t('common.import') }}
+
+
+
+
+
+
+ {{ $t('common.export') }}
+
+
+
+
+
+ {{ $t('common.batchCopy') }}
+
+
+