From cb2a01ee7dea28a2661720060b03c41dc372acb5 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期五, 01 八月 2025 11:53:16 +0800
Subject: [PATCH] 完善串口处理数据,数据选择
---
src/components/Preview/filePreview.vue | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/components/Preview/filePreview.vue b/src/components/Preview/filePreview.vue
index b449e48..aedb375 100644
--- a/src/components/Preview/filePreview.vue
+++ b/src/components/Preview/filePreview.vue
@@ -3,10 +3,11 @@
<div v-if="isImage">
<img :src="imgUrl" alt="Image Preview" />
</div>
- <div v-if="isPdf">
- <object :data="fileUrl" type="application/pdf" width="100%" height="750px">
- <p>鎮ㄧ殑娴忚鍣ㄤ笉鏀寔 PDF 棰勮銆�<a :href="fileUrl">涓嬭浇 PDF 鏂囦欢</a></p>
- </object>
+ <div v-if="isPdf" style="height: 80vh;">
+<!-- <object :data="fileUrl" type="application/pdf" width="100%" height="750px">-->
+<!-- <p>鎮ㄧ殑娴忚鍣ㄤ笉鏀寔 PDF 棰勮銆�<a :href="fileUrl" style="color: #3a7bfa;" target="_blank">涓嬭浇 PDF 鏂囦欢</a></p>-->
+<!-- </object>-->
+ <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
</div>
<div v-if="isDoc">
<p v-if="!isDocShow">鏂囨。鏃犳硶鐩存帴棰勮锛岃涓嬭浇鏌ョ湅銆�</p>
@@ -58,8 +59,10 @@
import VueOfficeExcel from '@vue-office/excel'
//寮曞叆鐩稿叧鏍峰紡
import '@vue-office/excel/lib/index.css'
+import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
export default {
components: {
+ onlyoffice,
VueOfficeDocx,
VueOfficeExcel,
},
@@ -71,6 +74,9 @@
currentFile: {
type: Object,
required: true
+ },
+ option: {
+ type: Object,
},
},
data() {
@@ -96,7 +102,6 @@
if (state) {
this.imgUrl = this.fileUrl.replaceAll('word', 'img')
}
- console.log(11111, this.imgUrl)
return state;
},
isPdf() {
--
Gitblit v1.9.3