From a4faa6b48ab727d7fff8a5b827e9a07e19744cd0 Mon Sep 17 00:00:00 2001 From: flower-string <2178503051@qq.com> Date: Sat, 8 Mar 2025 16:58:37 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E4=BA=BA=E5=91=98=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/.env.development | 4 +- ruoyi-ui/src/api/oa/document.js | 24 ++ .../views/oa/peoples/document/FileList.vue | 242 +++++++++------ .../src/views/oa/peoples/document/index.vue | 283 ++++++------------ 4 files changed, 281 insertions(+), 272 deletions(-) diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 301f7ab..990dfd2 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -5,8 +5,8 @@ VUE_APP_TITLE = 福安德综合办公系统 ENV = 'development' # 若依管理系统/开发环境 -VUE_APP_BASE_API = '/prod-api' -# VUE_APP_BASE_API = 'http://110.41.139.73:8080' +# VUE_APP_BASE_API = '/prod-api' +VUE_APP_BASE_API = 'http://110.41.139.73:8080' # 应用访问路径 例如使用前缀 /admin/ VUE_APP_CONTEXT_PATH = '/' diff --git a/ruoyi-ui/src/api/oa/document.js b/ruoyi-ui/src/api/oa/document.js index ad65479..93a175f 100644 --- a/ruoyi-ui/src/api/oa/document.js +++ b/ruoyi-ui/src/api/oa/document.js @@ -31,4 +31,28 @@ export function addFile(userId, fileList) { fileList } }) +} + +/** + * 文件上传 + */ +export function uploadFile(file) { + return request({ + url: '/common/upload', + method: 'post', + data: file, + headers: { + 'Content-Type': 'multipart/form-data' + } + }) +} + +/** + * 获取文件类型字典 + */ +export function getFileTypeList() { + return request({ + url: '/system/dict/data/list?dictType=people_file_type', + method: 'get' + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/views/oa/peoples/document/FileList.vue b/ruoyi-ui/src/views/oa/peoples/document/FileList.vue index bc9ba7d..70c4b78 100644 --- a/ruoyi-ui/src/views/oa/peoples/document/FileList.vue +++ b/ruoyi-ui/src/views/oa/peoples/document/FileList.vue @@ -1,15 +1,10 @@ - - - - +
将文件拖到此处,或点击上传
-
支持格式:doc/docx/pdf/jpg/png,单个文件不超过50MB
+
支持格式:doc/docx/pdf/jpg/png,单个文件不超过50MB
+ + + +
+ {{ file.name }} + + + + +
+
+
+ +
@@ -191,31 +273,21 @@ export default { padding: 20px; } -.operation-bar { - margin-bottom: 15px; +.file-form { + margin-top: 20px; +} + +.file-item { display: flex; align-items: center; - gap: 12px; + gap: 10px; } -.selection-count { - margin-left: auto; - color: #666; - font-size: 14px; -} - -.file-name-cell { - display: flex; - align-items: center; - gap: 8px; -} - -.file-icon { - font-size: 18px; - color: #409EFF; -} - -.upload-demo { - text-align: center; +.file-name { + flex: none; + width: 150px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } \ No newline at end of file diff --git a/ruoyi-ui/src/views/oa/peoples/document/index.vue b/ruoyi-ui/src/views/oa/peoples/document/index.vue index 0d98bd2..90b2fab 100644 --- a/ruoyi-ui/src/views/oa/peoples/document/index.vue +++ b/ruoyi-ui/src/views/oa/peoples/document/index.vue @@ -1,26 +1,18 @@ + + \ No newline at end of file