From 6b994d09bd7cff484174d3d11355c2e456ce6ac0 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 11 四月 2025 14:03:01 +0800
Subject: [PATCH] 配置线芯修改
---
src/views/structural/capabilityAndLaboratory/workshop/components/fileList.vue | 41 ++++++++++++++++++++++++++++++++---------
1 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/src/views/structural/capabilityAndLaboratory/workshop/components/fileList.vue b/src/views/structural/capabilityAndLaboratory/workshop/components/fileList.vue
index 5d420d3..476d257 100644
--- a/src/views/structural/capabilityAndLaboratory/workshop/components/fileList.vue
+++ b/src/views/structural/capabilityAndLaboratory/workshop/components/fileList.vue
@@ -4,23 +4,38 @@
<el-upload ref='upload' :action="fileAction" :auto-upload="true" :before-upload="fileBeforeUpload"
:data="{ id: currentId }" :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp"
:show-file-list="false" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
- style="width: 80px !important;">
+ style="width: 80px !important;" v-if="!isLook">
<el-button size="small" style="height: 38px" type="primary">闄勪欢涓婁紶</el-button>
</el-upload>
</div>
<lims-table :tableData="tableDataFile" :column="columnFile" height="500px" key="tableDataFile"
:tableLoading="tableLoadingFile"></lims-table>
+ <el-dialog title="鏌ョ湅闄勪欢" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen append-to-body>
+ <filePreview v-if="lookDialogVisible" :fileUrl="currentInfo.fileMinioUrl" :currentFile="currentInfo"
+ style="max-height: 90vh;overflow-y: auto;" />
+ </el-dialog>
</div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import { fileList, delFile } from "@/api/structural/workshop.js"
+import filePreview from "@/components/Preview/filePreview.vue";
export default {
components: {
limsTable,
+ filePreview,
},
- props: ['currentId'],
+ props: {
+ currentId: {
+ type: String,
+ default: ''
+ },
+ isLook: {
+ type: Boolean,
+ default: false
+ }
+ },
computed: {
fileAction() {
return this.javaApi + '/workShop/uploadFile'
@@ -73,6 +88,17 @@
type: 'text',
clickFun: (row) => {
this.delete(row);
+ },
+ showHide: (row) => {
+ return !this.isLook
+ }
+ },
+ {
+ name: '棰勮',
+ type: 'text',
+ clickFun: (row) => {
+ this.currentInfo = row
+ this.lookDialogVisible = true
}
},
]
@@ -80,6 +106,8 @@
],
tableDataFile: [],
tableLoadingFile: false,
+ lookDialogVisible: false,
+ currentInfo: {},
}
},
mounted() {
@@ -93,6 +121,7 @@
this.tableLoadingFile = false
if (res.code === 200) {
this.tableDataFile = res.data
+ console.log('鏂囦欢鍒楄〃鏁版嵁:', this.tableDataFile)
}
}).catch(err => {
this.tableLoadingFile = false
@@ -119,13 +148,7 @@
},
// 涓嬭浇闄勪欢鐨勬枃浠�
handleDown(row) {
- downFile({
- id: row.id,
- }).then(res => {
- this.$download.saveAs(res.data.fileUrl, row.fileName);
- }).catch(error => {
-
- })
+ this.$download.saveAs(row.fileUrl, row.fileName);
},
// 鍒犻櫎闄勪欢鏂囦欢
delete(row) {
--
Gitblit v1.9.3