修改 预览展示页面

This commit is contained in:
GGJ
2024-06-14 10:26:35 +08:00
parent f15f529842
commit 33aa5a1918
9 changed files with 304 additions and 279 deletions

View File

@@ -21,13 +21,12 @@
</el-descriptions-item>
<el-descriptions-item label="文件">
<div v-for="(item, index) in aList">
<el-icon>
<Link />
<el-icon class="elView" v-if="item?.fileName">
<View @click="openFile(item?.fileName)" />
</el-icon>
<a :href="item.url">
{{ item.fileName }}
</a>
<span @click="openFile(item.fileName)">预览</span>
</div>
</el-descriptions-item>
</el-descriptions>
@@ -61,7 +60,7 @@ import { querySurveyDetail } from '@/api/process-boot/generalTest'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { useDictData } from '@/stores/dictData'
import { Link } from '@element-plus/icons-vue'
import { Link, View } from '@element-plus/icons-vue'
const { query } = useRoute() // 查询参数
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
@@ -150,3 +149,9 @@ onMounted(() => {
getInfo()
})
</script>
<style lang="scss" scoped>
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>