From 80f72549a20d6eb9aebc6577ad0124753b4c487d Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 19 Sep 2025 16:12:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=87=E4=BB=BD=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=8C=85=E6=8B=AC?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BAOMC=E7=9A=84API=E5=92=8C?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/neData/backup.ts | 30 ++++ src/i18n/locales/en-US.ts | 4 + src/i18n/locales/zh-CN.ts | 4 + ...{change-home-index.vue => change-home.vue} | 0 .../setting/components/system-backup.vue | 140 ++++++++++++++++++ src/views/system/setting/index.vue | 29 ++-- 6 files changed, 198 insertions(+), 9 deletions(-) rename src/views/system/setting/components/{change-home-index.vue => change-home.vue} (100%) create mode 100644 src/views/system/setting/components/system-backup.vue diff --git a/src/api/neData/backup.ts b/src/api/neData/backup.ts index eeb3781c..95e9bc47 100644 --- a/src/api/neData/backup.ts +++ b/src/api/neData/backup.ts @@ -36,3 +36,33 @@ export function updateBackupFTP(data: Record) { data, }); } + +/** + * 备份文件-导出OMC + * @returns object + */ +export function exportBackupOMC() { + return request({ + url: '/neData/backup/export-omc', + method: 'POST', + responseType: 'blob', + timeout: 180_000, + }); +} + +/** + * 备份文件-导入OMC + * @param filePath 备份文件上传返回的/upload 路径 + * @returns object + */ +export function importBackupOMC(filePath: string) { + return request({ + url: '/neData/backup/import-omc', + method: 'POST', + data: { + neType: 'OMC', + path: filePath, + }, + timeout: 180_000, + }); +} diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 4706ed84..a4f3cd82 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -1867,6 +1867,10 @@ export default { home: 'Home Page', homeTip:'Do you want to submit the current interface as the system interface?', homeSet:'Home Page Settings', + backup: 'System Backup', + backupInstruction: 'System backup will back up the net element information records and configuration files running on the current system, and can restore the system to the previous state!', + backupExportTip: 'Confirm to export system backup?', + backupImportTip: 'Confirm to import system backup?', }, role:{ allScopeOptions:'All data permissions', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 7c33af08..a6e4b010 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -1867,6 +1867,10 @@ export default { home: '系统首页', homeTip:'确认要提交当前界面为系统界面吗?', homeSet:'系统首页设置', + backup: '系统备份', + backupInstruction: '系统备份将会对当前系统上运行的网元信息记录及配置文件进行备份,可进行系统的恢复操作!', + backupExportTip: '确认要导出系统备份吗?', + backupImportTip: '确认要导入系统备份吗?', }, role:{ allScopeOptions:'全部数据权限', diff --git a/src/views/system/setting/components/change-home-index.vue b/src/views/system/setting/components/change-home.vue similarity index 100% rename from src/views/system/setting/components/change-home-index.vue rename to src/views/system/setting/components/change-home.vue diff --git a/src/views/system/setting/components/system-backup.vue b/src/views/system/setting/components/system-backup.vue new file mode 100644 index 00000000..ce3af6f5 --- /dev/null +++ b/src/views/system/setting/components/system-backup.vue @@ -0,0 +1,140 @@ + + + + + diff --git a/src/views/system/setting/index.vue b/src/views/system/setting/index.vue index 47fce7cf..cbc8b913 100644 --- a/src/views/system/setting/index.vue +++ b/src/views/system/setting/index.vue @@ -7,7 +7,8 @@ import ChangeCopyright from './components/change-copyright.vue'; import ChangeHelpDoc from './components/change-help-doc.vue'; import ChangeOfficialUrl from './components/change-official-url.vue'; import ChangeI18n from './components/change-i18n.vue'; -import ChangeHome from './components/change-home-index.vue'; +import ChangeHome from './components/change-home.vue'; +import SystemBackup from './components/system-backup.vue'; import SystemReset from './components/system-reset.vue'; import useI18n from '@/hooks/useI18n'; const { t } = useI18n(); @@ -50,14 +51,24 @@ const { t } = useI18n(); - - - {{ t('views.system.setting.reset') }} - - +
+ + {{ t('views.system.setting.homeSet') }} + + +
+
+ + {{ t('views.system.setting.backup') }} + + +
+
+ + {{ t('views.system.setting.reset') }} + + +