From 1a15c3dbbe7b076a33a7e5d97c8bc115c5bffe18 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Thu, 5 Sep 2024 14:36:28 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/diy.ts | 19 ++++ src/views/layout/components/main/index.scss | 1 + src/views/layout/components/main/index.vue | 21 ++++- src/views/layout/index.vue | 97 +++++++++++++++------ 4 files changed, 105 insertions(+), 33 deletions(-) diff --git a/src/api/diy.ts b/src/api/diy.ts index 0f1b0043..f0ddfeaa 100644 --- a/src/api/diy.ts +++ b/src/api/diy.ts @@ -18,6 +18,25 @@ class DiyAPI { data, }); } + /** diy导入 */ + static import(data: FormData) { + return request({ + url: `diyapi/diyupload`, + method: 'post', + data, + headers: { + 'Content-Type': 'multipart/form-data', + }, + }); + } + /** diy导出 */ + static export(data: diy) { + return request({ + url: `diyapi/diydownload`, + method: 'post', + data, + }); + } } export default DiyAPI; diff --git a/src/views/layout/components/main/index.scss b/src/views/layout/components/main/index.scss index 127f1efc..a93cfd89 100644 --- a/src/views/layout/components/main/index.scss +++ b/src/views/layout/components/main/index.scss @@ -63,6 +63,7 @@ z-index: 1; .el-button { border-radius: 0.4rem; + width: 11.8rem; } .el-button + .el-button { margin-left: 0; diff --git a/src/views/layout/components/main/index.vue b/src/views/layout/components/main/index.vue index 1faa3267..f3717fd4 100644 --- a/src/views/layout/components/main/index.vue +++ b/src/views/layout/components/main/index.vue @@ -38,7 +38,11 @@
页面设置 导出 - 导入 + + + 清空
@@ -165,6 +169,7 @@