From b0ac38c0508c3744c58d32a364b73f1d7af331fa Mon Sep 17 00:00:00 2001 From: jhd <1684074631@qq.com> Date: Mon, 6 Jul 2026 11:23:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor(file):=20=E9=87=8D=E6=9E=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2UI=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=92=8C=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将统计卡片改为销售看板风格的汇总卡片布局 - 实现左右分栏布局并支持拖拽调节宽度 - 新增高级搜索功能和文件类型筛选标签页 - 优化搜索栏布局为工具栏样式并支持折叠 - 移除文件元数据卡片改用预览区域显示 - 添加查看文件详情和导出功能按钮 - 重构表格容器为固定高度可滚动布局 - 分离我的文件和共享文件的搜索界面差异 --- klp-ui/src/views/system/file/all.vue | 401 ++++++++++++++----------- klp-ui/src/views/system/file/index.vue | 151 ++++++++-- 2 files changed, 350 insertions(+), 202 deletions(-) diff --git a/klp-ui/src/views/system/file/all.vue b/klp-ui/src/views/system/file/all.vue index 09073a763..aabbde30e 100644 --- a/klp-ui/src/views/system/file/all.vue +++ b/klp-ui/src/views/system/file/all.vue @@ -1,146 +1,134 @@ + - -
- - {{ selectedFile.fileName }} - - - - {{ formatFileSize(selectedFile.fileSize) }} - {{ selectedFile.suffix || '-' }} - {{ selectedFile.viewCount != null ? selectedFile.viewCount : 0 }} 次 - {{ selectedFile.orderNo || '-' }} - {{ selectedFile.dept || '-' }} - - - {{ selectedFile.scopeType === 1 ? '公开' : '私有' }} - - - {{ selectedFile.createBy }} - {{ parseTime(selectedFile.createTime) }} - {{ selectedFile.remark || '-' }} - -
@@ -257,6 +290,7 @@
{{ selectedFile.fileName }}
+ 查看 下载 编辑 删除 @@ -435,6 +469,8 @@ export default { multiple: true, // 显示搜索条件 showSearch: true, + // 显示高级搜索 + showQuery: false, // 总条数 total: 0, // 文件列表 @@ -641,10 +677,15 @@ export default { this.queryParams.pageNum = 1 this.getList() }, + /** 切换高级搜索 */ + toggleQuery() { + this.showQuery = !this.showQuery + }, /** 重置按钮 */ resetQuery() { this.dateRange = [] this.selectedFile = null + this.showQuery = false this.resetForm('queryForm') this.queryParams = { pageNum: 1, @@ -948,13 +989,13 @@ export default { display: flex; align-items: stretch; gap: 0; + height: calc(100vh - 100px); } .file-left { flex-shrink: 0; display: flex; flex-direction: column; - height: calc(100vh - 240px); } .file-right { @@ -1003,7 +1044,6 @@ export default { border: 1px solid #ebeef5; border-radius: 4px; height: 100%; - min-height: calc(100vh - 300px); display: flex; flex-direction: column; } @@ -1131,15 +1171,62 @@ export default { height: 400px; } -/* 左侧表格区域撑满剩余空间可滚动(仅 share / related tab) */ +/* 左侧表格区域撑满剩余空间可滚动 + 边框 */ .file-table-wrapper.scrolling { + flex: 1; + display: flex; + flex-direction: column; + border: 1px solid #ebeef5; + border-radius: 4px; +} + +.file-table-wrapper.scrolling .file-table-scroll { flex: 1; overflow-y: auto; } -/* 左侧文件元数据卡片 */ -.file-meta-card { - margin-top: 12px; +/* 搜索栏(共享文件 / 与我相关 tab) */ +.share-search-area { + margin-bottom: 8px; + padding: 6px 0; +} + +.toolbar-row { + display: flex; + align-items: center; + margin-bottom: 8px; +} + +.toolbar-buttons { + display: flex; + gap: 10px; + flex-shrink: 0; +} + +.toolbar-search { + display: flex; + align-items: center; + gap: 5px; + margin-left: auto; + flex: 0 1 420px; +} + +.advanced-search { + background: #fff; + border: 1px solid #ebeef5; + border-radius: 4px; + padding: 10px 16px; + margin-bottom: 8px; +} + +.advanced-search-form { + display: flex; + flex-wrap: wrap; + gap: 4px; +} + +.advanced-search-form /deep/ .el-form-item { + margin-bottom: 0; }