diff --git a/src/components/ImageFileUpload/index.vue b/src/components/ImageFileUpload/index.vue index 0955a68..e4fb27c 100644 --- a/src/components/ImageFileUpload/index.vue +++ b/src/components/ImageFileUpload/index.vue @@ -25,7 +25,6 @@ </template> <script setup name="ImageFileUpload"> import { sysUpload, sysUploadDel } from '@/api/login.js'; -import { ElMessageBox } from 'element-plus'; const props = defineProps({ // 图片数组值 diff --git a/src/components/ImageFileUpload/index.vue b/src/components/ImageFileUpload/index.vue index 0955a68..e4fb27c 100644 --- a/src/components/ImageFileUpload/index.vue +++ b/src/components/ImageFileUpload/index.vue @@ -25,7 +25,6 @@ </template> <script setup name="ImageFileUpload"> import { sysUpload, sysUploadDel } from '@/api/login.js'; -import { ElMessageBox } from 'element-plus'; const props = defineProps({ // 图片数组值 diff --git a/src/views/sponeScreen/evaluationKH/zzclDialog.vue b/src/views/sponeScreen/evaluationKH/zzclDialog.vue index 0ae9ab6..8179cd8 100644 --- a/src/views/sponeScreen/evaluationKH/zzclDialog.vue +++ b/src/views/sponeScreen/evaluationKH/zzclDialog.vue @@ -17,7 +17,7 @@ <el-table-column label="序号" type="index" width="50" /> <el-table-column label="文件名称" prop="url"> <template #default="{ row }"> - <span class="green" style="cursor: pointer" @click="previewFile(row.name)">{{ row.name }}</span> + <span class="green" style="cursor: pointer" @click="previewFile(row.url)">{{ row.name }}</span> </template> </el-table-column> <el-table-column label="操作" width="100"> @@ -75,13 +75,14 @@ } // 预览文件 -function previewFile(name) { - window.open(name); +function previewFile(url) { + // 1,Base64进行转码,http 预览 + let b64Encoded = Base64.encode(url); + window.open(`previewUrl/onlinePreview?url=` + encodeURIComponent(b64Encoded)); } // 获取佐证材料列表 onMounted(() => { - console.log('------', props.pageParams); fileList.value = props.pageParams.params.fileList; }); </script>