From 65a0594a67278889347ea187e82708ab203f5626 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Thu, 13 Mar 2025 13:59:29 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/partner/file/file.vue | 167 +++++++++++++++++++++++++++-----
1 file changed, 142 insertions(+), 25 deletions(-)
diff --git a/src/views/partner/file/file.vue b/src/views/partner/file/file.vue
index 423f0c0..4dba46b 100644
--- a/src/views/partner/file/file.vue
+++ b/src/views/partner/file/file.vue
@@ -73,7 +73,8 @@
编辑
-
下载
+
+
预览
分配权限
@@ -99,13 +100,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.fileName }}
+
+
+
+
+
+
+
+
-
+
@@ -155,23 +191,23 @@
取 消
-
+
-
- 点击上传
- 只能上传jpg/png文件,且不超过500kb
-
+
+ 点击上传
+ 只能上传jpg/png文件,且不超过500kb
+
{
+ // this.$refs.filePreview.show()
+ this.selectFile = item
+ this.isImage = item.isImage
+ })
+ console.log(this.imageUrl + this.selectFile.filePath)
+ this.isShowFile = true
+ },
+ handleFileClick(row) {
+ if (row.type === '2') {
+ // this.fileUrl = 'https://view.xdocin.com/view?src=' + this.imageUrl + row.filePath
+ this.fileUrl = 'https://view.officeapps.live.com/op/view.aspx?src=' + this.imageUrl + row.filePath
+ this.$nextTick(() => {
+ // this.$refs.filePreview.show()
+ this.selectFile = row
+ this.isImage = row.isImage
+ })
+ }
+ },
+ getRowClassName({ row }) {
+ console.log('返回的class',row.id === this.selectFile.id ? 'highlight-row' : '')
+ // 如果当前行是选中的文件,添加高亮样式
+ return row.id === this.selectFile.id ? 'highlight-row' : '';
},
clickStaff(fileId) {
this.fileId = fileId
@@ -341,7 +413,7 @@ export default {
// this.queryParams.params["beginWarnTime"] = this.daterangeWarnTime[0];
// this.queryParams.params["endWarnTime"] = this.daterangeWarnTime[1];
// }
- if (this.$route.query.folderId){
+ if (this.$route.query.folderId) {
this.queryParams.fatherId = this.$route.query.folderId
this.fatherId = this.$route.query.folderId
}
@@ -521,8 +593,8 @@ export default {
},
/** 提交按钮 */
submitBatchForm() {
- console.log(this.form,'内容')
- console.log(this.fileList,'文件')
+ console.log(this.form, '内容')
+ console.log(this.fileList, '文件')
this.$refs["formBatch"].validate(valid => {
this.fileList.forEach(item => {
item.fatherId = this.fatherId
@@ -631,7 +703,7 @@ export default {
handleUploadSuccess(res, file) {
if (res.code === 0) {
// edit by 芋道源码
- this.uploadList.push({ name: res.data.name, url: res.data.url });
+ this.uploadList.push({name: res.data.name, url: res.data.url});
this.uploadedSuccessfully();
} else {
this.number--;
@@ -691,6 +763,7 @@ export default {
color: #F56C6C;
cursor: pointer;
}
+
/* 增加步骤间距 */
.custom-step {
margin-bottom: 35px;
@@ -707,7 +780,7 @@ export default {
/* 时间样式 */
.step-time {
font-size: 14px;
- //color: #666;
+//color: #666;
}
/* 文件名称高亮 */
@@ -727,8 +800,52 @@ export default {
.step-download:hover {
color: #307ec7;
}
-/deep/.el-drawer__header {
+
+/deep/ .el-drawer__header {
font-size: 22px;
}
+.preview-container {
+ display: flex;
+ height: 80vh;
+}
+
+
+.preview-iframe {
+ flex: 6;
+ width: 100%;
+ height: 100%;
+ margin-right: 10px;
+}
+
+.file-list {
+ flex: 1;
+ border-left: 1px solid #ebeef5;
+ padding-left: 10px;
+}
+
+.file-item {
+ cursor: pointer;
+ padding: 8px;
+ transition: background 0.3s;
+}
+
+.file-item:hover {
+ background: #f5f7fa;
+}
+
+/* 调整表格高度 */
+:deep(.el-table) {
+ height: calc(100% - 2px) !important;
+}
+
+/* 隐藏表格头 */
+:deep(.el-table__header-wrapper) {
+ display: none;
+}
+
+.highlight-row {
+ background-color: #f0f7ff; /* 高亮背景色 */
+ color: #409eff; /* 高亮文字颜色 */
+}