From dae39dea7e2874ebe2f17438949255ce8331ecef Mon Sep 17 00:00:00 2001 From: 董国庆 <364620639@qq.com> Date: 星期四, 26 六月 2025 19:30:45 +0800 Subject: [PATCH] 修改权限 --- laboratory/src/components/DynamicComponent/index.vue | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/laboratory/src/components/DynamicComponent/index.vue b/laboratory/src/components/DynamicComponent/index.vue index c877d0f..a093c13 100644 --- a/laboratory/src/components/DynamicComponent/index.vue +++ b/laboratory/src/components/DynamicComponent/index.vue @@ -63,8 +63,8 @@ <el-button size="small" icon="el-icon-upload2">点击上传</el-button> </el-upload> <div v-else> - <div v-for="file in item.data.fileList" :key="file.uid" class="file-list-item"> - {{ file.name }} + <div v-for="file in item.data.fileList" :key="file.uid" class="file-list-item" > + <span style="color: #409EFF; cursor: pointer;" @click="downloadFileByUrl(file.url, file.name)">{{ file.name }}</span> </div> </div> </div> @@ -116,6 +116,7 @@ import addTableData from "./addTableData.vue"; import apiConfig from '../../utils/baseurl' import { getFullUrl } from '@/utils/utils' +import { downloadFileByUrl } from '@/utils/utils' export default { name: "DynamicComponent", @@ -195,6 +196,7 @@ break; case 'fileUpload': componentData = { fileList: component.data }; + console.log('component.data component.data',component.data) break; case 'imageUpload': componentData = { imageList: component.data.map(item=>{ @@ -219,6 +221,8 @@ } }, methods: { + getFullUrl, + downloadFileByUrl, getUserDisplayText(fieldName, rowData) { // 检查是否有对应的userInfo数据 const userInfoKey = `${fieldName}_userInfo`; @@ -304,6 +308,7 @@ break; case 'fileUpload': componentData = component.data.fileList.map(file => { + console.log('fileUpload fileUpload fileUpload',file) if (file.url && file.url.startsWith(prefix)) { return { ...file, url: file.url.substring(prefix.length) }; } @@ -507,7 +512,6 @@ const updatedComponents = JSON.parse(JSON.stringify(this.components)); this.$emit('update:dataSource', updatedComponents); }, - getFullUrl, }, computed: { }, -- Gitblit v1.7.1