修改 预览展示页面

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

@@ -23,15 +23,14 @@
{{ getDeviceStatus(detailData?.status) }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="文件">
<el-icon>
<Link />
<el-descriptions-item label="报告文件">
<el-icon class="elView" v-if="detailData?.reportPaths?.fileName">
<View @click="openFile(detailData?.reportPaths?.fileName)" />
</el-icon>
<a :href="detailData.reportPaths?.url">
{{ detailData.reportPaths?.fileName }}
</a>
<span @click="detailData.reportPaths?.fileName">预览</span>
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item label="描述">
{{ detailData?.description }}
</el-descriptions-item>
@@ -47,7 +46,7 @@ import { propTypes } from '@/utils/propTypes'
import { getInfoById } from '@/api/supervision-boot/cycleDetection/index'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
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)
@@ -116,3 +115,9 @@ onMounted(() => {
getInfo()
})
</script>
<style lang="scss" scoped>
.elView {
cursor: pointer;
margin-right: 5px;
}
</style>