askbot-dragon 1.6.21-beta → 1.6.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/package.json +8 -11
  2. package/public/index.html +9 -8
  3. package/src/assets/image/default_avt_ui.png +0 -0
  4. package/src/assets/image/filtType/audio.png +0 -0
  5. package/src/assets/image/filtType/excel1.png +0 -0
  6. package/src/assets/image/filtType/general.png +0 -0
  7. package/src/assets/image/filtType/image1.png +0 -0
  8. package/src/assets/image/filtType/link.png +0 -0
  9. package/src/assets/image/filtType/md2.png +0 -0
  10. package/src/assets/image/filtType/mode.png +0 -0
  11. package/src/assets/image/filtType/news.png +0 -0
  12. package/src/assets/image/filtType/pdf1.png +0 -0
  13. package/src/assets/image/filtType/ppt1.png +0 -0
  14. package/src/assets/image/filtType/selfadd1.png +0 -0
  15. package/src/assets/image/filtType/txt1.png +0 -0
  16. package/src/assets/image/filtType/video.png +0 -0
  17. package/src/assets/image/filtType/wechat.png +0 -0
  18. package/src/assets/image/filtType/word1.png +0 -0
  19. package/src/assets/image/loading.gif +0 -0
  20. package/src/assets/js/AliyunlssUtil.js +35 -10
  21. package/src/assets/js/common.js +241 -0
  22. package/src/components/ActionAlertIframe.vue +1 -0
  23. package/src/components/AiGuide.vue +7 -4
  24. package/src/components/AnswerDocknowledge.vue +930 -389
  25. package/src/components/ConversationContainer.vue +7111 -1058
  26. package/src/components/MyEditor.vue +342 -0
  27. package/src/components/QwFeedback.vue +303 -0
  28. package/src/components/actionSatisfaction.vue +2 -2
  29. package/src/components/actionSendToBot.vue +2 -2
  30. package/src/components/answerRadio.vue +145 -64
  31. package/src/components/askVideo.vue +3 -6
  32. package/src/components/assetDetails.vue +14 -6
  33. package/src/components/assetMessage.vue +14 -13
  34. package/src/components/associationIntention.vue +31 -6
  35. package/src/components/fielListView.vue +1 -1
  36. package/src/components/file/AliyunOssComponents.vue +1 -1
  37. package/src/components/formTemplate.vue +1590 -1674
  38. package/src/components/imgView.vue +32 -0
  39. package/src/components/intelligentSummary.vue +231 -0
  40. package/src/components/markDownText.vue +198 -0
  41. package/src/components/myPopup.vue +14 -11
  42. package/src/components/pagination.vue +129 -0
  43. package/src/components/pdfPosition.vue +112 -90
  44. package/src/components/popup.vue +8 -7
  45. package/src/components/preview/docView.vue +114 -0
  46. package/src/components/preview/excelView.vue +187 -0
  47. package/src/components/preview/newPositionPreview.vue +370 -0
  48. package/src/components/preview/pdfView.vue +824 -0
  49. package/src/components/previewDoc.vue +6 -0
  50. package/src/components/previewPdf.vue +963 -200
  51. package/src/components/receiverMessagePlatform.vue +25 -21
  52. package/src/components/recommend.vue +2 -2
  53. package/src/components/senderMessagePlatform.vue +21 -13
  54. package/src/components/tree.vue +116 -103
  55. package/src/components/utils/AliyunIssUtil.js +35 -13
  56. package/src/components/utils/ckeditor.js +64 -56
  57. package/src/components/welcomeKnowledgeFile.vue +344 -0
  58. package/src/components/welcomeLlmCard.vue +141 -0
  59. package/src/components/welcomeSuggest.vue +98 -0
  60. package/src/locales/cn.json +62 -0
  61. package/src/locales/en.json +62 -0
  62. package/src/main.js +19 -3
  63. package/vue.config.js +0 -1
  64. package/src/assets/js/obsBrowser.js +0 -63
  65. package/src/components/utils/ckeditorImageUpload/command.js +0 -112
  66. package/src/components/utils/ckeditorImageUpload/editing.js +0 -12
  67. package/src/components/utils/ckeditorImageUpload/plugin-image.js +0 -12
  68. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +0 -41
  69. package/src/components/utils/ckeditorfileUpload/common.js +0 -175
  70. package/src/components/utils/ckeditorfileUpload/editing.js +0 -12
  71. package/src/components/utils/ckeditorfileUpload/plugin_file.js +0 -12
  72. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +0 -35
@@ -1,270 +1,833 @@
1
+
2
+ <!-- preview-pdf
3
+ 组件主要负责 知识项目中 文件的预览,携带定位信息参数 tagIds tagId 的会解析文件增加定位功能
4
+ 不携带定位信息的 也是走 kkview项目预览
5
+ 另外增加了在知识项目中预览当前文件的一些功能
6
+ -->
1
7
  <template>
2
- <!-- <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}" v-if="previewShowPopup">
3
- <div class="footer">
4
- <span>查看详情</span>
8
+ <el-drawer title="" :visible.sync="drawer" :with-header="false" :append-to-body="true" :destroy-on-close="true"
9
+ :modal="false" :direction="previewShowPopup ? 'btt' : 'rtl'" :size="previewShowPopup ? '90%' : '65%'"
10
+ custom-class="pdf-preview-drawer" v-if="drawer">
11
+ <div class="drawer-header" :class="(isDownload || isHasChat) && isLiBang ? 'has_btn_libang_head' : (isLiBang ? 'libang_head' : (isDownload || isHasChat ? 'has_btn_head' : ''))" v-if="!isPc">
12
+ <div class="header_title">
13
+ <template v-if="isDownload || isHasChat">
14
+ <div class="top-header">
15
+ <div class="header-btn">
16
+ <div class="onload_btn" v-if="isDownload" @click="downLoad">
17
+ {{ $t('dragonCommon.download') }}
18
+ </div>
19
+ <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun" v-if="isHasChat">
20
+ <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
21
+ <span>{{ $t('dragonCommon.smartSummary') }}</span>
22
+ </div>
23
+ <template v-if="isHasChat">
24
+ <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
25
+ <i class="iconfont guoran-wendapingjia"></i>
26
+ {{ $t('dragonCommon.chat') }}
27
+ </div>
28
+ <div class="chat chat_active" @click="previewToDialog(false)" v-else>
29
+ <i class="iconfont guoran-wendapingjia"></i>
30
+ {{ $t('dragonCommon.chat') }}
31
+ </div>
32
+ </template>
33
+ </div>
5
34
  <section @click="close">
6
- <i class="iconfont guoran-shanchu"></i>
35
+ <i class="iconfont guoran-shanchu"></i>
7
36
  </section>
8
- </div>
9
- <template v-if="tagIds && tagIds.length != 0 && previewShowPopup">
10
- <pdfPosition :tagIds="tagIds" ></pdfPosition>
11
- </template>
12
- <template v-else>
13
- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 60px)">
14
- <video :src="url" controls width="100%;" height="98%"></video>
15
37
  </div>
16
- <div v-else-if="fileType == 'HTML'" style="width: 100%;height: calc(100% - 60px)">
17
- <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
18
- </div>
19
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
20
- <iframe class="preview_iframe"
21
- :src="url"
22
- width="100%"
23
- height="100%"
24
- scrolling="100%"
25
- frameborder="no"
26
- border="0"></iframe>
27
- </template>
28
- <template v-else>
29
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
30
- </template>
38
+ <span class="title_left">
39
+ {{ title ? title : $t('dragonCommon.viewDetails') }}
40
+ </span>
31
41
  </template>
32
- <div class="loading_img" v-show="loading">
33
- <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
42
+ <div class="header_close" v-else>
43
+ <span class="title_left">
44
+ {{ title ? title : $t('dragonCommon.viewDetails') }}
45
+ </span>
46
+ <section @click="close">
47
+ <i class="iconfont guoran-shanchu"></i>
48
+ </section>
34
49
  </div>
35
- </van-popup> -->
36
- <el-drawer
37
- title="我是标题"
38
- :visible.sync="drawer"
39
- :with-header="false"
40
- :append-to-body="true"
41
- :destroy-on-close="true"
42
- :model="false"
43
- :direction="previewShowPopup ? 'btt' : 'rtl'"
44
- :size="previewShowPopup ? '90%' : '65%'"
45
- custom-class="pdf-preview-drawer"
46
- v-if="drawer"
47
- >
48
- <!-- v-else-if="drawer" -->
49
- <div class="drawer-footer">
50
- <span>查看详情</span>
51
- <section @click="close">
52
- <i class="iconfont guoran-shanchu"></i>
53
- </section>
50
+ <p v-if="folderName && isLiBang" class="header_floder" @click="clickFloder">
51
+ <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
52
+ {{ folderName }}
53
+ <i v-if="folderUrl" class="iconfont guoran-tongyichicun-dianjichakantuli"></i>
54
+ </p>
55
+ </div>
54
56
  </div>
55
- <div id="drawer_content_pre">
56
- <template v-if="tagIds && tagIds.length != 0 && drawer">
57
- <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord"></pdfPosition>
58
- </template>
57
+ <div class="drawer-header" :class="isLiBang && folderName ? 'libang_head' : ''" v-else>
58
+ <div class="header_title">
59
+ <div :class="isLiBang && folderName ? 'header_close' : 'header_top'">
60
+ <span class="title_left">
61
+ {{ title ? title : $t('dragonCommon.viewDetails') }}
62
+ </span>
63
+ <div class="header-btn">
64
+ <div class="onload_btn" v-if="isDownload" @click="downLoad">
65
+ {{ $t('dragonCommon.download') }}
66
+ </div>
67
+ <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
68
+ v-if="isHasChat">
69
+ <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
70
+ <span>{{ $t('dragonCommon.smartSummary') }}</span>
71
+ </div>
72
+ <template v-if="isHasChat">
73
+ <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
74
+ <i class="iconfont guoran-wendapingjia"></i>
75
+ {{ $t('dragonCommon.chat') }}
76
+ </div>
77
+ <div class="chat chat_active" @click="previewToDialog(false)" v-else>
78
+ <i class="iconfont guoran-wendapingjia"></i>
79
+ {{ $t('dragonCommon.chat') }}
80
+ </div>
81
+ </template>
82
+ <section @click="close">
83
+ <i class="iconfont guoran-shanchu"></i>
84
+ </section>
85
+ </div>
86
+ </div>
87
+ <p v-if="folderName && isLiBang" class="header_floder" @click="clickFloder">
88
+ <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
89
+ {{ folderName }}
90
+ <i v-if="folderUrl" class="iconfont guoran-tongyichicun-dianjichakantuli"></i>
91
+ </p>
92
+ </div>
93
+ </div>
94
+ <div id="drawer_content_pre" :class="(isDownload || isHasChat) && !isPc && isLiBang && folderName ? 'has_btn_libang_content_pre' : (isLiBang && folderName ? 'libang_content_pre' : '')">
95
+ <intelligent-summary v-show="showSummary && isHasChat" :tagIds="tagIds" :knowledgeId="knowledgeId"
96
+ @closeSummary="closeSummary" @recommendQues="recommendQues"
97
+ @getSummarySuccess="getSummarySuccess"></intelligent-summary>
98
+ <div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer && newVersion === false && newFileType !== 'PPT'">
99
+ <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :textWatermarkStr="textWatermarkStr">
100
+ </pdfPosition>
101
+ </div>
102
+ <new-position-preview
103
+ ref="newPositionPreview"
104
+ v-else-if="tagIds && tagIds.length!= 0 && newVersion && newFileType !== 'PPT'"
105
+ :knowledgeId="knowledgeId"
106
+ :tagIds="tagIds"
107
+ :url="previewHref"
108
+ ></new-position-preview>
59
109
  <template v-else>
60
110
  <div v-if="fileType == 'VIDEO'" style="width: 100%;">
61
111
  <video :src="url" controls width="100%;" height="98%"></video>
62
112
  </div>
63
113
  <div v-else-if="fileType == 'HTML'" style="width: 100%;">
64
- <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
114
+ <div class="preview_iframe_html" style="text-align:left" v-html="fileText"></div>
65
115
  </div>
66
116
  <template v-else-if="url.includes('https://www') || url.includes('http://www')">
67
- <iframe class="preview_iframe"
68
- :src="url"
69
- width="100%"
70
- height="100%"
71
- scrolling="100%"
72
- frameborder="no"
73
- border="0"></iframe>
117
+ <iframe class="preview_iframe" :src="url" width="100%" height="100%" scrolling="100%" frameborder="no"
118
+ border="0"></iframe>
74
119
  </template>
75
120
  <template v-else>
76
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
121
+ <iframe class="preview_iframe_kk" :src="previewUrl" style="border:none;"
122
+ :style="{ height: iframeHeight }"></iframe>
123
+ <template v-if="!loading && (newFileType === 'PPT' && pageChunkData.length > 1)">
124
+ <div class="btn_footer" v-if="!isPc">
125
+ <div class="prev" @click="prev">上一段</div>
126
+ <div class="next" @click="next">下一段</div>
127
+ </div>
128
+ <div id="pagination" v-if="isPc">
129
+ <el-pagination :current-page="currentPage + 1" @current-change="currentChange" @prev-click="prev"
130
+ @next-click="next" layout="slot, prev, pager, next" :page-size="1" :total="pageChunkData.length">
131
+ <span class="total-class">答案由{{ pageChunkData.length }}段内容生成</span>
132
+ </el-pagination>
133
+ </div>
134
+ </template>
77
135
  </template>
78
136
  </template>
79
137
  </div>
80
138
  <div class="loading_img" v-show="loading">
81
- <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
82
- </div>
139
+ <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
140
+ </div>
141
+ <div id="text">
142
+ {{ copy }}
143
+ </div>
83
144
  </el-drawer>
84
145
  </template>
85
146
 
86
147
  <script>
87
148
  import pdfPosition from './pdfPosition.vue'
88
149
  import { zoomElement } from '../assets/js/hammer'
150
+ import IntelligentSummary from "./intelligentSummary";
151
+ import { isMobile } from "../assets/js/common";
152
+ import { Toast } from 'vant';
153
+ import NewPositionPreview from "./preview/newPositionPreview";
89
154
  export default {
90
- data () {
91
- return {
92
- previewShowPopup: false,
93
- fileText:'',
94
- fileType:"",
95
- isPc:true,
96
- drawer:false,
97
- tagIds: [],
98
- // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
99
- loading:true,
155
+ data () {
156
+ return {
157
+ previewShowPopup: false,
158
+ fileText: '',
159
+ fileType: "",
160
+ isPc: false,
161
+ drawer: false,
162
+ tagIds: [],
163
+ // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
164
+ loading: true,
165
+ previewKnowledgeId: "",
166
+ showSummary: false,
167
+ iframeHeight: "100%",
168
+ isDownload: false,
169
+ textWatermarkStr: "",
170
+ copy:'',
171
+ newVersion:'',
172
+ previewHref:"",
173
+ newFileType:"",
174
+ numberPage:0,
175
+ pageChunkData:[],
176
+ currentPage:0
177
+ }
178
+ },
179
+ mounted () {
180
+ this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
181
+ window.addEventListener('message', this.handleIframeMessage, false);
182
+ this.isPcFun();
183
+ },
184
+ props: {
185
+ url: {
186
+ type: String,
187
+ required: true,
188
+ },
189
+ officePreviewType: {
190
+ type: String,
191
+ default: ''
192
+ },
193
+ isMessageRecord: {
194
+ type: Boolean,
195
+ default: false,
196
+ },
197
+ sourceFileType: {
198
+ type: String,
199
+ default: '',
200
+ },
201
+ title: {
202
+ type: String,
203
+ default: ''
204
+ },
205
+ isHasChat: {
206
+ type: Boolean,
207
+ default: false
208
+ },
209
+ knowledgeId: {
210
+ type: String,
211
+ default: '',
212
+ },
213
+ previewOssPath: {
214
+ type: String,
215
+ default: '',
216
+ },
217
+ folderName: {
218
+ type: String,
219
+ default: '',
220
+ },
221
+ folderUrl: {
222
+ type: String,
223
+ default: '',
224
+ },
225
+ isLiBang: {
226
+ type: Boolean,
227
+ default: false
228
+ }},
229
+ components: {
230
+ NewPositionPreview,
231
+ IntelligentSummary,
232
+ pdfPosition
233
+ },
234
+ watch: {
235
+ drawer (value) {
236
+ if (value) {
237
+ this.$emit('open')
238
+ this.$nextTick(() => {
239
+ zoomElement(document.getElementById('drawer_content_pre'))
240
+ })
241
+ } else {
242
+ this.$emit('close')
243
+ }
244
+ },
245
+ showSummary: {
246
+ handler (val) {
247
+ // if (!val){
248
+ // this.$nextTick(() => {
249
+ // let preCon = document.querySelector('.pdf_view');
250
+ // if (preCon){
251
+ // preCon.style.height = 'calc(100% - ' + 50 + 'px)'
252
+ // }
253
+ // })
254
+ // } else {
255
+ // this.getSummarySuccess();
256
+ // }
257
+ if (val) {
258
+ this.getSummarySuccess();
100
259
  }
260
+ }
101
261
  },
102
- mounted() {
103
- },
104
- props:{
105
- url:{
106
- type: String,
107
- required: true,
108
- },
109
- officePreviewType:{
110
- type: String,
111
- default: ''
112
- },
113
- isMessageRecord:{
114
- type: Boolean,
115
- default:false,
116
- },
117
- sourceFileType:{
118
- type: String,
119
- default: '',
262
+ knowledgeId: {
263
+ handler (val) {
264
+ if (val) {
265
+ this.getTextWatermark();
120
266
  }
267
+ }
268
+ }
269
+ },
270
+ computed: {
271
+ pdfStyle () {
272
+ return {
273
+ paddingTop: this.isPc ? '30px' : '0', // 30px 是 加上外层的 20 流出 50的上边距展示 放大缩小操作栏
274
+ paddingBottom: this.tagIds > 1 ? '60px' : '0',
275
+ height: '100%'
276
+ }
121
277
  },
122
- components:{
123
- pdfPosition
278
+ previewUrl () {
279
+ console.debug('VUE_APP_ENV', process.env.VUE_APP_ENV)
280
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
281
+ // if(this.url != '') {
282
+ // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
283
+ // url += btoa(encodeURIComponent(this.url))
284
+ // } else {
285
+ // url += btoa(this.url)
286
+ // }
287
+ // }
288
+ url = url + this.url
289
+ if (this.sourceFileType == '.ppt' || this.sourceFileType == '.pptx' || this.sourceFileType == '.pdf') {
290
+ url += '&officePreviewType=pdf'
291
+ }
292
+ console.log('textWatermarkStr 216', this.textWatermarkStr)
293
+ if (this.textWatermarkStr) {
294
+ url += '&textWatermarkValue=' + this.textWatermarkStr
295
+ }
296
+ return url
297
+ },
298
+ // fileType() {
299
+ // const fileType = this.url.substring(this.url.lastIndexOf('.'));
300
+ // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
301
+ // return 'VIDEO'
302
+ // } else {
303
+ // return 'OTHER'
304
+ // }
305
+
306
+ // }
307
+ },
308
+ methods: {
309
+ close () {
310
+ setTimeout(() => {
311
+ this.previewShowPopup = false;
312
+ this.fileType = ''
313
+ }, 300)
314
+ this.drawer = false;
315
+ this.showSummary = false;
124
316
  },
125
- watch:{
126
- drawer(value) {
127
- if(value) {
128
- this.$nextTick(() =>{
129
- zoomElement(document.getElementById('drawer_content_pre'))
130
- })
317
+ loadIframe () {
318
+
319
+ if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0 && this.newFileType !== 'PPT')) {
320
+ this.loading = false
321
+ } else {
322
+ let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
323
+ if (iframe) {
324
+ iframe.onload = () => {
325
+ this.loading = false;
326
+ document.getElementById('drawer_content_pre').style.backgroundImage = 'none'
327
+ }
131
328
  }
329
+ // let time = setInterval(() =>{
330
+ //
331
+ // if(iframe) {
332
+ // this.loading = false
333
+ // clearInterval(time)
334
+ // }
335
+ // }, 500)
132
336
  }
133
337
  },
134
- computed:{
135
- previewUrl() {
136
- console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
137
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
138
- // if(this.url != '') {
139
- // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
140
- // url += btoa(encodeURIComponent(this.url))
141
- // } else {
142
- // url += btoa(this.url)
143
- // }
144
- // }
145
- url = url + this.url
146
- if(this.sourceFileType == '.ppt' || this.sourceFileType == '.pptx') {
147
- url += '&officePreviewType=pdf'
148
- }
149
- return url
150
- },
151
- // fileType() {
152
- // const fileType = this.url.substring(this.url.lastIndexOf('.'));
153
- // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
154
- // return 'VIDEO'
155
- // } else {
156
- // return 'OTHER'
338
+ getBolb () {
339
+ this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false', {
340
+ fileInOssPath: this.url,
341
+ templateId: ''
342
+ }).then(res => {
343
+ if (res.data.code == 0) {
344
+ this.fileText = res.data.data
345
+ this.loading = false
346
+ }
347
+ })
348
+ },
349
+ previewToDialog (flag) {
350
+ this.$emit('previewToDialog', flag)
351
+ },
352
+ closeSummary () {
353
+ this.showSummary = false;
354
+ },
355
+ recommendQues (item, knowledgeId) {
356
+ console.log('recommendQues', item, knowledgeId);
357
+ this.$emit('recommendQues', item, knowledgeId)
358
+ },
359
+ handleIframeMessage (res) {
360
+ if (res.data.type == 'getViewerHeight') {
361
+ let iframeHeight = this.iframeHeight.replace('px', '')
362
+ if (res.data.data && iframeHeight != (res.data.data + 50)) {
363
+ this.iframeHeight = res.data.data + 50 + 'px'
364
+ }
365
+ }
366
+ if (res.data.type == 'getViewPage' && res.data.data){
367
+ this.numberPage = Number(res.data.data);
368
+ if (this.pageChunkData.length > 0){
369
+ this.scrollPPTPage(this.pageChunkData[0])
370
+ }
371
+ }
372
+ if (res.data.type == 'getViewerHeight' || res.data.type == 'getViewPage'){
373
+ if (this.pageChunkData.length > 0){
374
+ this.scrollPPTPage(this.pageChunkData[0])
375
+ }
376
+ }
377
+ },
378
+ summaryFun () {
379
+ this.showSummary = !this.showSummary;
380
+ if (this.showSummary) {
381
+ document.getElementById('drawer_content_pre').scrollTop = 0;
382
+ }
383
+ },
384
+ getSummarySuccess () {
385
+ this.$nextTick(() => {
386
+ // if (this.tagIds.length > 0){
387
+ // let intelligentSummary = document.getElementById('intelligentSummary');
388
+ // let preCon = document.querySelector('.pdf_view')
389
+ // if (intelligentSummary){
390
+ // let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
391
+ // if (preCon){
392
+ // preCon.style.height = 'calc(100% - ' + height + 'px)'
157
393
  // }
158
-
394
+ // console.log('height',height,preCon)
395
+ // }
159
396
  // }
397
+ // let intelligentSummary = document.getElementById('intelligentSummary');
398
+ // let height = intelligentSummary.offsetHeight
399
+ // this.pdfStyle.height = 'calc(100% - ' + height + 'px)'
400
+ })
160
401
  },
161
- methods :{
162
- close() {
163
- setTimeout(() =>{
164
- this.previewShowPopup = false;
165
- this.fileType = ''
166
- }, 300)
167
- this.drawer = false;
168
- },
169
- loadIframe() {
170
-
171
- if(this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
172
- this.loading = false
402
+ getTextWatermark () {
403
+ let url = '/knowledge-api/open/knowledge/getPermissionInfo';
404
+ let obj = {
405
+ "knowledgeId": this.knowledgeId,
406
+ "userId": sessionStorage.getItem('_currentUserId'),
407
+ "mainId": sessionStorage.getItem('_mainId'),
408
+ "corpId": sessionStorage.getItem('_corpid')
409
+ }
410
+ this.$http.post(url, obj).then(res => {
411
+ console.log('getTextWatermark', res.data.data)
412
+ if (res.data.data) {
413
+ this.textWatermarkStr = res.data.data.textWatermarkStr;
414
+ this.isDownload = res.data.data.showDownloadBtn;
415
+ }
416
+ })
417
+ },
418
+ downLoad () {
419
+ let url = this.previewOssPath
420
+ if (decodeURIComponent(url) != url) {
421
+ url = decodeURIComponent(url)
422
+ }
423
+ const fileType = url.substring(url.lastIndexOf('.'));
424
+ this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
425
+ headers: {
426
+ "Content-Type": "application/json",
427
+ }
428
+ }).then(res => {
429
+ console.log('downLoad 341', res)
430
+ if (res.data || res.bodyText) {
431
+ if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
432
+ this.copy = res.data
433
+ if (isMobile()) {
434
+ setTimeout(() =>{
435
+ const range = document.createRange();
436
+ range.selectNode(document.getElementById('text'));
437
+ const selection = window.getSelection();
438
+ //移除之前选中内容
439
+ if (selection.rangeCount > 0) selection.removeAllRanges();
440
+ selection.addRange(range);
441
+ document.execCommand('copy');
442
+ selection.removeAllRanges()
443
+ Toast(this.$t('dragonCommon.Safaridownload'));
444
+ this.close()
445
+ },100)
173
446
  } else {
174
- let time = setInterval(() =>{
175
- let iframe = document.getElementsByClassName('preview_iframe')[0]
176
- if(iframe) {
177
- this.loading = false
178
- clearInterval(time)
447
+ let a = document.createElement('a')
448
+ a.href = res.data
449
+ a.download = (this.title) + fileType
450
+ a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
451
+ }
452
+ return
453
+ } else {
454
+ // setTimeout(() =>{
455
+ // window.open(res.data,'下载', 'noopener')
456
+ // }, 2000)
457
+ // window.open(res.data,'下载', 'noopener')
458
+ if (isMobile()) {
459
+ const iframe = document.createElement("iframe");
460
+ iframe.setAttribute("hidden", "hidden");
461
+ iframe.onload = () => {
462
+ if (iframe) {
463
+ console.log("iframe onload....")
464
+ iframe.setAttribute('src', 'about:blank');
179
465
  }
180
- }, 500)
466
+ };
467
+ document.body.insertBefore(iframe, null);
468
+ iframe.setAttribute("src", res.data);
469
+ } else {
470
+ let a = document.createElement('a')
471
+ a.href = res.data
472
+ a.download = (this.title) + fileType
473
+ a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
474
+ }
475
+ this.close()
476
+ }
477
+ }
478
+ })
479
+ },
480
+ isPcFun () {
481
+ if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
482
+ this.isPc = false
483
+ } else {
484
+ this.isPc = true
485
+ }
486
+ },
487
+ clickFloder() {
488
+ this.$emit('previewClickFloder')
489
+ },
490
+ getOssPath(url){
491
+ let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate';
492
+ let type = this.getFileType(url)
493
+ this.newFileType = type;
494
+ if (type === 'VIDEO' || type === 'PDF' || type === 'EXCEL' || type === 'TXT' || type === 'DOC') {
495
+ httpUrl += '?needEncrypt=false'
496
+ } else {
497
+ httpUrl += '?needEncrypt=true'
498
+ }
499
+ this.$http.post(httpUrl, {
500
+ "fileInOssPath": url
501
+ }).then(res => {
502
+ console.log('getOssPath',res)
503
+ if (res.data.code == '0'){
504
+ this.previewHref = res.data.data;
505
+ }
506
+ })
507
+ },
508
+ getFileType(url){
509
+ let index = url.lastIndexOf('?')
510
+ let newFileInOssPath = url.substring(0, url.indexOf("?"))
511
+ if (index == -1){
512
+ newFileInOssPath = url
513
+ }
514
+ const fileType = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'));
515
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc') {
516
+ return 'VIDEO'
517
+ } else if (fileType === '.html') {
518
+ return 'HTML'
519
+ } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg' || fileType === '.PNG' || fileType === '.JPG' || fileType === '.JPEG') {
520
+ return 'IMAGE'
521
+ } else if (fileType === '.docx' || fileType === '.doc'){
522
+ return 'DOC'
523
+ } else if (fileType === '.ppt' || fileType === '.pptx'){
524
+ return 'PPT'
525
+ } else if (fileType === '.pdf'){
526
+ return 'PDF'
527
+ } else if (fileType === '.txt'){
528
+ return 'TXT'
529
+ } else {
530
+ return 'OTHER'
531
+ }
532
+ },
533
+ //判断是否使用新定位组件
534
+ getLocationInfo(){
535
+ this.newVersion = "";
536
+ this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + this.tagIds.join(',')).then(res => {
537
+ console.log('getLocationInfo',res)
538
+ this.pageChunkData = [];
539
+ if (res.data.code == 0){
540
+ if (res.data.data && res.data.data.length > 0 && res.data.data[0].extractVersion == 'v3'){
541
+ this.newVersion = true;
542
+ if (this.newFileType !== 'PPT'){
543
+ this.loading = false;
544
+ }
545
+ for (let i=0;i<res.data.data.length;i++){
546
+ if (res.data.data[i].paragraphChunkInfo && res.data.data[i].paragraphChunkInfo.pageChunkData){
547
+ this.pageChunkData.push(res.data.data[i].paragraphChunkInfo.pageChunkData.page_number)
548
+ }
549
+ }
550
+ if (this.pageChunkData.length > 1){
551
+ let iframe = document.getElementsByClassName('preview_iframe_kk')
552
+ if (iframe && iframe.length > 0){
553
+ iframe[0].style.paddingBottom = '50px'
554
+ }
181
555
  }
182
- },
183
- getBolb() {
184
- this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false',{
185
- fileInOssPath: this.url,
186
- templateId: ''
187
- }).then(res =>{
188
- if (res.data.code == 0) {
189
- this.fileText = res.data.data
190
- this.loading = false
191
- }
192
- })
193
- },
556
+ } else {
557
+ this.newVersion = false;
558
+ }
559
+ }
560
+ })
561
+ },
562
+ currentChange (value) {
563
+ this.currentPage = value - 1;
564
+ this.scrollPPTPage()
565
+ },
566
+ prev(){
567
+ if (this.currentPage == 0){
568
+ return
569
+ }
570
+ this.currentPage--;
571
+ this.scrollPPTPage()
572
+ },
573
+ next(){
574
+ if (this.currentPage === (this.pageChunkData.length - 1)){
575
+ return;
576
+ }
577
+ this.currentPage++;
578
+ this.scrollPPTPage()
579
+ },
580
+ scrollPPTPage(){
581
+ if (this.numberPage > 0){
582
+ let pageNumber = this.pageChunkData[this.currentPage];
583
+ let height = Math.floor(Number(this.iframeHeight.replace('px',"")));
584
+ let pageHeight = Math.floor(height / this.numberPage);
585
+ let scrollHeight = (pageNumber - 1) * pageHeight;
586
+ let dom = document.getElementById('drawer_content_pre');
587
+ if (dom){
588
+ dom.scrollTo(0,scrollHeight)
589
+ }
590
+ }
194
591
  }
592
+ },
593
+ beforeDestroy () {
594
+ window.removeEventListener('message', this.handleIframeMessage);
595
+ }
195
596
  }
196
597
  </script>
197
598
 
198
599
  <style lang="less" scoped>
199
- .preview_iframe {
600
+ #drawer_content_pre {
601
+ padding: 20px;
602
+ scroll-behavior: smooth;
603
+
604
+ .mobile_onload_btn {
605
+ position: absolute;
606
+ right: 0;
607
+ bottom: 10%;
608
+ width: 20px;
609
+ height: 60px;
610
+ display: flex;
611
+ align-items: center;
612
+ justify-content: center;
613
+ cursor: pointer;
614
+ border-top-left-radius: 10px;
615
+ border-bottom-left-radius: 10px;
616
+ color: #366aff;
617
+ background: #ffffff;
618
+ border: 1px solid #a1b9ff;
619
+ font-size: 12px;
620
+ border-right: none;
621
+ text-align: center;
622
+ }
623
+
624
+ .pdf_positon {
200
625
  width: 100%;
201
- height: calc(100% - 60px);
202
626
  box-sizing: border-box;
203
- background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
204
- background-position: center;
205
- background-size: 50px;
206
- background-repeat: no-repeat;
627
+ }
628
+ }
629
+
630
+ .onload_btn {
631
+ width: 76px;
632
+ height: 26px;
633
+ display: flex;
634
+ align-items: center;
635
+ justify-content: center;
636
+ cursor: pointer;
637
+ margin-right: 10px;
638
+ border-radius: 15px;
639
+ color: #366aff;
640
+ background: #ffffff;
641
+ border: 1px solid #a1b9ff;
642
+ box-sizing: border-box;
643
+ }
644
+
645
+ .preview_iframe {
646
+ width: 100%;
647
+ height: 100%;
648
+ box-sizing: border-box;
649
+ background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
650
+ background-position: center;
651
+ background-size: 50px;
652
+ background-repeat: no-repeat;
653
+ }
654
+
655
+ .preview_iframe_kk {
656
+ width: 100%;
657
+ height: 100%;
658
+ }
659
+ .btn_footer {
660
+ width: 100%;
661
+ height: 60px;
662
+ display: flex;
663
+ align-items: center;
664
+ justify-content: space-around;
665
+ position: absolute;
666
+ bottom: 0px;
667
+ left: 0;
668
+ z-index: 999;
669
+ background: #ffffff;
670
+
671
+ .prev,
672
+ .next {
673
+ width: 35%;
674
+ height: 40px;
675
+ display: flex;
676
+ align-items: center;
677
+ justify-content: center;
678
+ border-radius: 50px;
679
+ cursor: pointer;
680
+ }
681
+
682
+ .prev {
683
+ background: #F2F5FA;
684
+ color: #000;
685
+ }
686
+
687
+ .next {
688
+ background: #366aff;
689
+ color: #ffffff;
690
+ }
691
+ }
692
+ #pagination {
693
+ .total-class {
694
+ margin-right: 13px;
695
+ font-weight: 400;
696
+ }
697
+
698
+ position: absolute;
699
+ bottom: 0px;
700
+ right: 0;
701
+ width: 100%;
702
+ display: flex;
703
+ align-items: center;
704
+ justify-content: center;
705
+ height: 50px;
706
+ background-color: white;
707
+ box-shadow: 0px 0px 18px 0px rgba(29, 55, 129, 0.07);
708
+ border-radius: 5px;
709
+ z-index: 1000;
710
+
711
+
712
+
713
+ /deep/.el-pagination {
714
+ margin-right: 110px;
715
+ }
716
+
717
+ /deep/.el-pager {
718
+ background: #EDF0F6;
719
+ border-radius: 15px;
720
+ }
721
+
722
+ /deep/.el-pagination.is-background .btn-next {
723
+ width: 30px;
724
+ height: 30px;
725
+ background: #EDF0F6;
726
+ border-radius: 50%;
727
+ }
728
+
729
+ /deep/.el-pagination .btn-next {
730
+ width: 30px;
731
+ height: 30px;
732
+ background: #EDF0F6;
733
+ border-radius: 50%;
734
+ padding-left: 0;
735
+ margin-left: 5px;
736
+ }
737
+
738
+ /deep/.el-pagination .btn-prev {
739
+ width: 30px;
740
+ height: 30px;
741
+ background: #EDF0F6;
742
+ border-radius: 50%;
743
+ padding-right: 0;
744
+ margin-right: 5px;
745
+ }
746
+
747
+ /deep/.el-pagination button {
748
+ padding: 0;
749
+ min-width: 30px;
750
+ }
751
+
752
+ /deep/.el-pager li {
753
+ background: #EDF0F6;
754
+ height: 30px;
755
+ min-width: 30px;
756
+ line-height: 30px;
757
+ font-size: 12px;
758
+ color: #717b90;
759
+ }
760
+
761
+ /deep/.el-pager li:first-child {
762
+ border-bottom-left-radius: 15px !important;
763
+ border-top-left-radius: 15px !important;
764
+ }
765
+
766
+ /deep/.el-pager li:last-child {
767
+ border-top-right-radius: 15px !important;
768
+ border-bottom-right-radius: 15px !important;
769
+ }
770
+
771
+ /deep/.el-pager li.active {
772
+ width: 30px;
773
+ height: 30px;
774
+ min-width: 30px;
775
+ background: #366AFF;
776
+ border: 3px solid #A1B9FF;
777
+ border-radius: 50%;
778
+ line-height: 24px;
779
+ color: white;
780
+ }
781
+
782
+ /deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
783
+ background: #366AFF;
784
+ }
207
785
  }
208
- .preview_iframe_html{
786
+ .preview_iframe_html {
209
787
  width: 100%;
210
788
  height: 100%;
211
789
  overflow-y: scroll;
212
790
  text-align: left;
213
791
  box-sizing: border-box;
214
792
  padding: 16px;
215
- /deep/.lake-content{
793
+
794
+ /deep/.lake-content {
216
795
  margin-left: 10px;
217
796
  }
797
+
218
798
  /deep/a:link {
219
- color: #0000ee!important;
799
+ color: #0000ee !important;
220
800
  }
801
+
221
802
  /deep/a:visited {
222
- color: #0000ee!important;
803
+ color: #0000ee !important;
223
804
  }
805
+
224
806
  /deep/a:hover {
225
- color: #0000ee!important;
807
+ color: #0000ee !important;
226
808
  }
809
+
227
810
  /deep/a:active {
228
- color: #0000ee!important;
811
+ color: #0000ee !important;
229
812
  }
230
- /deep/li:not(.rich-text-li), ol:not(.list-paddingleft-2), ul:not(.list-paddingleft-2){
231
- list-style-type: auto!important;
813
+
814
+ /deep/li:not(.rich-text-li),
815
+ ol:not(.list-paddingleft-2),
816
+ ul:not(.list-paddingleft-2) {
817
+ list-style-type: auto !important;
232
818
  }
233
- /deep/img{
819
+
820
+ /deep/img {
234
821
  width: 100%;
235
822
  }
236
- /deep/.ne-table{
823
+
824
+ /deep/.ne-table {
237
825
  width: 100% !important;
238
826
  }
239
827
  }
240
- .footer {
241
- width: calc(100% - 40px);
242
- height: 50px;
243
- display: flex;
244
- align-items: center;
245
- justify-content: space-between;
246
- cursor: pointer;
247
- padding: 0 20px;
248
- border-bottom: 1px solid #cccccc;
249
- }
250
- .loading_img {
251
- display: flex;
252
- align-items: center;
253
- justify-content: center;
254
- width: 100%;
255
- height: 100%;
256
- position: absolute;
257
- top: 0;
258
- left: 0;
259
- background: #FFF;
260
- img {
261
- width: 50px;
262
- height: 50px;
263
- }
264
- }
265
828
 
266
- .drawer-footer{
267
- width:100%;
829
+ .footer {
830
+ width: calc(100% - 40px);
268
831
  height: 50px;
269
832
  display: flex;
270
833
  align-items: center;
@@ -273,11 +836,160 @@ export default {
273
836
  padding: 0 20px;
274
837
  border-bottom: 1px solid #cccccc;
275
838
  }
839
+
840
+ .loading_img {
841
+ display: flex;
842
+ align-items: center;
843
+ justify-content: center;
844
+ width: 100%;
845
+ height: 100%;
846
+ position: absolute;
847
+ top: 0;
848
+ left: 0;
849
+ background: #FFF;
850
+
851
+ img {
852
+ width: 50px;
853
+ height: 50px;
854
+ }
855
+ }
856
+
857
+ .libang_head {
858
+ height: 64px !important;
859
+ }
860
+ .has_btn_libang_head{
861
+ height: 85px!important;
862
+ }
863
+ .has_btn_head{
864
+ height: 60px!important;
865
+ }
866
+ .drawer-header {
867
+ width: 100%;
868
+ height: 50px;
869
+ cursor: pointer;
870
+ padding: 6px 20px;
871
+ border-bottom: 1px solid #cccccc;
872
+ .btn_position {
873
+ position: absolute;
874
+ top: -34px;
875
+ left: 12px;
876
+ }
877
+
878
+ .header-btn {
879
+ display: flex;
880
+ align-items: center;
881
+ justify-content: space-between;
882
+
883
+ .header-right {
884
+ display: flex;
885
+ }
886
+ .summaryBtn {
887
+ flex: none;
888
+ //width: 95px;
889
+ height: 26px;
890
+ padding: 0 8px;
891
+ background: #ffffff;
892
+ display: flex;
893
+ align-items: center;
894
+ justify-content: center;
895
+ box-sizing: border-box;
896
+ border: 1px solid #a1b9ff;
897
+ border-radius: 15px;
898
+ cursor: pointer;
899
+ color: #366aff;
900
+ margin-right: 10px;
901
+ font-size: 14px;
902
+
903
+ i {
904
+ font-size: 14px;
905
+ margin-right: 5px;
906
+ }
907
+ }
908
+
909
+ .summaryActiveBtn {
910
+ background: #366aff !important;
911
+ color: #ffffff !important;
912
+ }
913
+
914
+ .chat {
915
+ flex: none;
916
+ height: 26px;
917
+ padding: 0 8px;
918
+ background: #ffffff;
919
+ display: flex;
920
+ align-items: center;
921
+ justify-content: center;
922
+ box-sizing: border-box;
923
+ border: 1px solid #a1b9ff;
924
+ border-radius: 15px 0px 15px 15px;
925
+ cursor: pointer;
926
+ color: #366aff;
927
+ margin-right: 10px;
928
+ font-size: 14px;
929
+
930
+ i {
931
+ font-size: 14px;
932
+ margin-right: 5px;
933
+ margin-top: 2px;
934
+ }
935
+ }
936
+
937
+ .chat_active {
938
+ background: #366aff !important;
939
+ color: #FFFFFF !important;
940
+ }
941
+ }
942
+
943
+ .header_title {
944
+ font-size: 14px;
945
+ height: 100%;
946
+ .header_close {
947
+ display: flex;
948
+ align-items: center;
949
+ justify-content: space-between;
950
+ line-height: 26px;
951
+ }
952
+ .title_left {
953
+ white-space: nowrap; /* 确保文本不会换行 */
954
+ overflow: hidden; /* 隐藏超出容器的文本 */
955
+ text-overflow: ellipsis; /* 当文本超出容器时显示省略号 */
956
+ margin-right: 8px;
957
+ text-align: left;
958
+ }
959
+ .top-header{
960
+ display: flex;
961
+ align-items: center;
962
+ justify-content: flex-end;
963
+ margin-bottom: 6px;
964
+ }
965
+ .header_floder {
966
+ display: flex;
967
+ align-items: center;
968
+ line-height: 26px;
969
+ text-align: left;
970
+ i {
971
+ margin: 0 5px;
972
+ color: #366aff;
973
+ }
974
+ }
975
+ .header_top {
976
+ height: 100%;
977
+ display: flex;
978
+ align-items: center;
979
+ justify-content: space-between;
980
+ }
981
+ }
982
+ }
983
+ .has_btn_libang_content_pre{
984
+ height: calc(100% - 85px) !important;
985
+ }
276
986
  @media screen and (max-width: 767px) {
277
- /* 这里是针对移动设备的css样式设置 */
278
- /deep/.el-drawer__body{
987
+
988
+ /* 这里是针对移动设备的css样式设置 */
989
+ /deep/.el-drawer__body {
279
990
  height: 100%;
280
991
  }
992
+
281
993
  #drawer_content_pre {
282
994
  overflow: auto;
283
995
  height: calc(100% - 50px);
@@ -287,17 +999,68 @@ export default {
287
999
  background-size: 50px;
288
1000
  background-repeat: no-repeat;
289
1001
  }
1002
+
1003
+ .libang_content_pre {
1004
+ height: calc(100% - 64px) !important;
1005
+ }
290
1006
  }
1007
+
291
1008
  @media screen and (min-width: 768px) {
292
- /* 这里是针对pc设备的css样式设置 */
293
- /deep/.el-drawer__body{
1009
+
1010
+ /* 这里是针对pc设备的css样式设置 */
1011
+ /deep/.el-drawer__body {
294
1012
  height: 100%;
295
1013
  }
1014
+
296
1015
  #drawer_content_pre {
297
1016
  overflow: auto;
298
1017
  height: calc(100% - 50px);
299
1018
  background: #FFF;
300
1019
  }
1020
+
1021
+ .libang_content_pre {
1022
+ height: calc(100% - 64px) !important;
1023
+ }
301
1024
  }
302
1025
 
303
- </style>
1026
+ @media screen and (min-width: 1200px) {
1027
+
1028
+ /* 这里是针对pc设备的css样式设置 */
1029
+ .el-drawer__wrapper {
1030
+ width: 55%;
1031
+ left: calc(100vw - 55%);
1032
+ right: 0;
1033
+
1034
+ /deep/.pdf-preview-drawer {
1035
+ width: 100% !important;
1036
+ }
1037
+ }
1038
+
1039
+ /deep/.el-drawer__body {
1040
+ height: 100%;
1041
+ }
1042
+
1043
+ #drawer_content_pre {
1044
+ overflow: auto;
1045
+ height: calc(100% - 50px);
1046
+ background: #FFF;
1047
+ }
1048
+
1049
+ .libang_content_pre {
1050
+ height: calc(100% - 64px) !important;
1051
+ }
1052
+ }
1053
+ </style>
1054
+ <style lang="less">
1055
+ .pdf-preview-drawer {
1056
+ overflow: visible !important;
1057
+ }
1058
+ .libang_content_pre {
1059
+ .change_scale {
1060
+ top: 64px !important;
1061
+ }
1062
+ .float_intelligentSummary {
1063
+ top: 74px !important;
1064
+ }
1065
+ }
1066
+ </style>