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 154c3439..11e25fd2 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -1916,6 +1916,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 109c1685..ed2b05b8 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -1916,6 +1916,10 @@ export default { home: '系统首页', homeTip:'确认要提交当前界面为系统界面吗?', homeSet:'系统首页设置', + backup: '系统备份', + backupInstruction: '系统备份将会对当前系统上运行的网元信息记录及配置文件进行备份,可进行系统的恢复操作!', + backupExportTip: '确认要导出系统备份吗?', + backupImportTip: '确认要导入系统备份吗?', }, role:{ allScopeOptions:'全部数据权限', 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 6de533d5..d17581d7 100644 --- a/src/views/system/setting/index.vue +++ b/src/views/system/setting/index.vue @@ -8,6 +8,7 @@ import ChangeHelpDoc from './components/change-help-doc.vue'; import ChangeOfficialUrl from './components/change-official-url.vue'; import ChangeI18n from './components/change-i18n.vue'; import SystemReset from './components/system-reset.vue'; +import SystemBackup from './components/system-backup.vue'; import ChangeHome from './components/change-home-index.vue'; import useI18n from '@/hooks/useI18n'; const { t } = useI18n(); @@ -50,14 +51,24 @@ const { t } = useI18n(); - - {{ t('views.system.setting.homeSet') }} - - - - {{ t('views.system.setting.reset') }} - - +
+ + {{ t('views.system.setting.homeSet') }} + + +
+
+ + {{ t('views.system.setting.backup') }} + + +
+
+ + {{ t('views.system.setting.reset') }} + + +