详情文件预览

This commit is contained in:
zhujiyan
2024-06-06 22:14:20 +08:00
parent 5722259cc1
commit b3fbb68881
15 changed files with 238 additions and 77 deletions

View File

@@ -27,9 +27,7 @@
<a :href="item.url">
{{ item.fileName }}
</a>
<!-- <el-button type="primary" link @click="downloadFile(item.url, item.fileName)">
{{ item.fileName }}
</el-button> -->
<span @click="openFile(item.fileName)">预览</span>
</div>
</el-descriptions-item>
</el-descriptions>
@@ -65,7 +63,9 @@ import { defaultAttribute } from '@/components/table/defaultAttribute'
import { useDictData } from '@/stores/dictData'
import { Link } from '@element-plus/icons-vue'
const { query } = useRoute() // 查询参数
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
const props = defineProps({
id: propTypes.string.def(undefined)
})