From 1ee7f009e12780b55e6ecd8739b376e15f262851 Mon Sep 17 00:00:00 2001 From: sc Date: Mon, 11 Oct 2021 17:31:07 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E7=BB=84=E4=BB=B6=20=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=E9=80=89=E6=8B=A9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add 组件 资源库选择器 scUpload 集成 资源库选择器 --- src/api/model/common.js | 20 +- src/api/model/system.js | 2 +- src/components/scFileSelect/index.vue | 283 ++++++++++++++++++++++++++ src/components/scUpload/index.vue | 30 ++- src/components/scUpload/multiple.vue | 30 ++- src/config/fileSelect.js | 69 +++++++ src/views/vab/fileselect.vue | 62 ++++++ 7 files changed, 483 insertions(+), 13 deletions(-) create mode 100644 src/components/scFileSelect/index.vue create mode 100644 src/config/fileSelect.js create mode 100644 src/views/vab/fileselect.vue diff --git a/src/api/model/common.js b/src/api/model/common.js index 812c5b90..811ca9f8 100644 --- a/src/api/model/common.js +++ b/src/api/model/common.js @@ -5,8 +5,24 @@ export default { upload: { url: `${config.API_URL}/upload`, name: "文件上传", - post: async function(data){ - return await http.post(this.url, data); + post: async function(data, config={}){ + return await http.post(this.url, data, config); + } + }, + file: { + menu: { + url: `${config.API_URL}/file/menu`, + name: "获取文件分类", + get: async function(){ + return await http.get(this.url); + } + }, + list: { + url: `${config.API_URL}/file/list`, + name: "获取文件列表", + get: async function(params){ + return await http.get(this.url, params); + } } } } diff --git a/src/api/model/system.js b/src/api/model/system.js index cc6ceeee..8ea4e27d 100644 --- a/src/api/model/system.js +++ b/src/api/model/system.js @@ -4,7 +4,7 @@ import http from "@/utils/request" export default { menu: { myMenus: { - url: `${config.API_URL}/system/menu/my/1.2.6`, + url: `${config.API_URL}/system/menu/my/1.2.8`, name: "获取我的菜单", get: async function(){ return await http.get(this.url); diff --git a/src/components/scFileSelect/index.vue b/src/components/scFileSelect/index.vue new file mode 100644 index 00000000..10c000b1 --- /dev/null +++ b/src/components/scFileSelect/index.vue @@ -0,0 +1,283 @@ + + + + + + + diff --git a/src/components/scUpload/index.vue b/src/components/scUpload/index.vue index f95e06e6..422f3a3d 100644 --- a/src/components/scUpload/index.vue +++ b/src/components/scUpload/index.vue @@ -7,8 +7,8 @@ -
- +
+
@@ -24,14 +24,22 @@ 确 定 + + + + +
+ +