详情文件预览

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

@@ -18,6 +18,7 @@
<Link />
</el-icon>
<a :href='detailData.problemPath' target='_blank'>{{ detailData.problemName }}</a>
<span @click="openFile(detailData.problemName)">预览</span>
</el-descriptions-item>
</template>
<el-descriptions-item :span='2' label='采取措施'>
@@ -28,6 +29,7 @@
<Link />
</el-icon>
<a :href='detailData.reportPath' target='_blank'>{{ detailData.reportName }}</a>
<span @click="openFile(detailData.reportName)">预览</span>
</el-descriptions-item>
</el-descriptions>
</div>
@@ -41,7 +43,9 @@ import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { Link } from '@element-plus/icons-vue'
defineOptions({ name: 'technology/detail' })
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
const { query } = useRoute() // 查询参数
const props = defineProps({