diff --git a/src/api/system/dataMigration/index.ts b/src/api/system/dataMigration/index.ts new file mode 100644 index 0000000..b6b67d4 --- /dev/null +++ b/src/api/system/dataMigration/index.ts @@ -0,0 +1,45 @@ +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +enum Api { + ExportDatas= '/system/dataMigration/exportDatas', + DownloadDatas='/system/dataMigration/downloadDatas', +} + +/** + * @description: 系统配置迁移-导出资源 + */ +export async function exportDatas(params, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.ExportDatas, + data:params, + }, + { + errorMessageMode: mode, + }, + ); +} + + +/** + * @description: 根据uuid(目录名称)下载数据 + */ +export async function downloadDatas( + params?: object, + mode: ErrorMessageMode = 'modal' +) { + return defHttp.download( + { + url: Api.DownloadDatas+"/"+params.uuid, + method: 'GET', + responseType: 'blob', + }, + { + errorMessageMode: mode, + }, + ); +} + + + diff --git a/src/views/system/dataMigration/assets/sysconfig_import.png b/src/views/system/dataMigration/assets/sysconfig_import.png new file mode 100644 index 0000000..089f597 Binary files /dev/null and b/src/views/system/dataMigration/assets/sysconfig_import.png differ diff --git a/src/views/system/dataMigration/components/export/index.vue b/src/views/system/dataMigration/components/export/index.vue new file mode 100644 index 0000000..e2d8c77 --- /dev/null +++ b/src/views/system/dataMigration/components/export/index.vue @@ -0,0 +1,262 @@ + + + 导出所选项目{{configType}} + + + + {{ item.name }} + + + + + 选择全部 + + + + + + + + + diff --git a/src/views/system/dataMigration/components/import/ImportSystemConfig.vue b/src/views/system/dataMigration/components/import/ImportSystemConfig.vue new file mode 100644 index 0000000..078a063 --- /dev/null +++ b/src/views/system/dataMigration/components/import/ImportSystemConfig.vue @@ -0,0 +1,157 @@ + + + + + + + + {{ t('将文件拖到此处,或') }}{{ t('点击上传') }} + + + + + + + + diff --git a/src/views/system/dataMigration/components/import/index.vue b/src/views/system/dataMigration/components/import/index.vue new file mode 100644 index 0000000..7cd2484 --- /dev/null +++ b/src/views/system/dataMigration/components/import/index.vue @@ -0,0 +1,43 @@ + + + + 新增模式导入 + + + 覆盖模式导入 + + + + + + + + diff --git a/src/views/system/dataMigration/index.vue b/src/views/system/dataMigration/index.vue new file mode 100644 index 0000000..96a1e5d --- /dev/null +++ b/src/views/system/dataMigration/index.vue @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + +