askbot-dragon 1.6.58-beta → 1.6.59-beta

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 (84) hide show
  1. package/README.md +27 -27
  2. package/babel.config.js +6 -6
  3. package/dragon.iml +7 -7
  4. package/package.json +54 -54
  5. package/public/index.html +72 -72
  6. package/src/App.vue +31 -31
  7. package/src/api/index.js +1 -1
  8. package/src/api/mock.http +2 -2
  9. package/src/api/requestUrl.js +185 -185
  10. package/src/assets/js/AliyunlssUtil.js +92 -92
  11. package/src/assets/js/Base64Util.js +22 -22
  12. package/src/assets/js/common.js +252 -250
  13. package/src/assets/js/hammer.js +100 -100
  14. package/src/assets/js/script.js +36 -36
  15. package/src/assets/less/common.css +6773 -6773
  16. package/src/assets/less/converSationContainer/common.less +199 -199
  17. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  18. package/src/assets/less/iconfont.css +37 -37
  19. package/src/assets/less/ticketMessage.less +294 -294
  20. package/src/components/ActionAlertIframe.vue +177 -177
  21. package/src/components/AiGuide.vue +466 -466
  22. package/src/components/AnswerDocknowledge.vue +701 -693
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +5130 -5317
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/MyEditor.vue +350 -350
  29. package/src/components/actionSatisfaction.vue +107 -107
  30. package/src/components/actionSendToBot.vue +62 -62
  31. package/src/components/answerDissatisfaction.vue +62 -62
  32. package/src/components/answerRadio.vue +186 -186
  33. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  34. package/src/components/ask-components/Msgloading.vue +37 -37
  35. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  36. package/src/components/askVideo.vue +162 -162
  37. package/src/components/assetDetails.vue +378 -378
  38. package/src/components/assetMessage.vue +228 -228
  39. package/src/components/associationIntention.vue +355 -355
  40. package/src/components/attachmentPreview.vue +90 -90
  41. package/src/components/botActionSatisfactor.vue +68 -68
  42. package/src/components/chatContent.vue +513 -513
  43. package/src/components/feedBack.vue +136 -136
  44. package/src/components/fielListView.vue +351 -351
  45. package/src/components/file/AliyunOssComponents.vue +108 -108
  46. package/src/components/formTemplate.vue +3572 -3572
  47. package/src/components/intelligentSummary.vue +209 -209
  48. package/src/components/kkview.vue +1138 -1138
  49. package/src/components/loadingProcess.vue +164 -164
  50. package/src/components/message/ActionAlertIframe.vue +112 -112
  51. package/src/components/message/ShopMessage.vue +164 -164
  52. package/src/components/message/TextMessage.vue +924 -924
  53. package/src/components/message/TicketMessage.vue +201 -201
  54. package/src/components/message/swiper/index.js +4 -4
  55. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  56. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  57. package/src/components/msgLoading.vue +231 -231
  58. package/src/components/myPopup.vue +70 -70
  59. package/src/components/newPdfPosition.vue +877 -877
  60. package/src/components/pdfPosition.vue +1509 -1509
  61. package/src/components/popup.vue +227 -227
  62. package/src/components/previewDoc.vue +247 -247
  63. package/src/components/previewPdf.vue +653 -631
  64. package/src/components/receiverMessagePlatform.vue +65 -65
  65. package/src/components/recommend.vue +80 -80
  66. package/src/components/selector/hOption.vue +20 -20
  67. package/src/components/selector/hSelector.vue +199 -199
  68. package/src/components/selector/hWrapper.vue +216 -216
  69. package/src/components/senderMessagePlatform.vue +50 -50
  70. package/src/components/source/BotMessage.vue +24 -24
  71. package/src/components/source/CustomMessage.vue +24 -24
  72. package/src/components/test.vue +260 -260
  73. package/src/components/tree.vue +294 -294
  74. package/src/components/utils/AliyunIssUtil.js +81 -81
  75. package/src/components/utils/ckeditor.js +174 -174
  76. package/src/components/utils/format_date.js +25 -25
  77. package/src/components/utils/index.js +6 -6
  78. package/src/components/utils/math_utils.js +29 -29
  79. package/src/components/voiceComponent.vue +119 -119
  80. package/src/components/welcomeKnowledgeFile.vue +332 -332
  81. package/src/components/welcomeLlmCard.vue +140 -140
  82. package/src/components/welcomeSuggest.vue +97 -97
  83. package/src/main.js +57 -57
  84. package/vue.config.js +54 -54
@@ -1,632 +1,654 @@
1
-
2
- <!-- preview-pdf
3
- 组件主要负责 知识项目中 文件的预览,携带定位信息参数 tagIds tagId 的会解析文件增加定位功能
4
- 不携带定位信息的 也是走 kkview项目预览
5
- 另外增加了在知识项目中预览当前文件的一些功能
6
- -->
7
- <template>
8
- <!-- <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}" v-if="previewShowPopup">
9
- <div class="footer">
10
- <span>查看详情</span>
11
- <section @click="close">
12
- <i class="iconfont guoran-shanchu"></i>
13
- </section>
14
- </div>
15
- <template v-if="tagIds && tagIds.length != 0 && previewShowPopup">
16
- <pdfPosition :tagIds="tagIds" ></pdfPosition>
17
- </template>
18
- <template v-else>
19
- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 60px)">
20
- <video :src="url" controls width="100%;" height="98%"></video>
21
- </div>
22
- <div v-else-if="fileType == 'HTML'" style="width: 100%;height: calc(100% - 60px)">
23
- <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
24
- </div>
25
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
26
- <iframe class="preview_iframe"
27
- :src="url"
28
- width="100%"
29
- height="100%"
30
- scrolling="100%"
31
- frameborder="no"
32
- border="0"></iframe>
33
- </template>
34
- <template v-else>
35
- <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
36
- </template>
37
- </template>
38
- <div class="loading_img" v-show="loading">
39
- <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
40
- </div>
41
- </van-popup> -->
42
- <el-drawer
43
- title="我是标题"
44
- :visible.sync="drawer"
45
- :with-header="false"
46
- :append-to-body="true"
47
- :destroy-on-close="true"
48
- :model="false"
49
- :direction="previewShowPopup ? 'btt' : 'rtl'"
50
- :size="previewShowPopup ? '90%' : '65%'"
51
- custom-class="pdf-preview-drawer"
52
- v-if="drawer"
53
- >
54
- <!-- v-else-if="drawer" -->
55
- <div class="drawer-footer">
56
- <span>{{title ? title : "查看详情"}}</span>
57
- <div class="header-right">
58
- <div class="onload_btn" v-if="isDownload && isPc" @click="downLoad">
59
- 下载
60
- </div>
61
- <div class="summaryBtn"
62
- :class="showSummary ? 'summaryActiveBtn' : ''"
63
- @click="summaryFun"
64
- v-if="isHasChat"
65
- >
66
- <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
67
- <span>智能摘要</span>
68
- </div>
69
- <template v-if="isHasChat">
70
- <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
71
- <i class="iconfont guoran-wendapingjia"></i>
72
- 聊一聊
73
- </div>
74
- <div class="chat chat_active" @click="previewToDialog(false)" v-else>
75
- <i class="iconfont guoran-wendapingjia"></i>
76
- 聊一聊
77
- </div>
78
- </template>
79
- <section @click="close">
80
- <i class="iconfont guoran-shanchu"></i>
81
- </section>
82
- </div>
83
- </div>
84
- <div id="drawer_content_pre">
85
- <intelligent-summary
86
- v-show="showSummary && isHasChat"
87
- :knowledgeId="knowledgeId"
88
- @closeSummary="closeSummary"
89
- @recommendQues="recommendQues"
90
- @getSummarySuccess="getSummarySuccess"
91
- :style="{marginTop:tagIds && tagIds.length != 0 && isPc ? '50px' : ''}"
92
- ></intelligent-summary>
93
- <template v-if="tagIds && tagIds.length != 0 && drawer">
94
- <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :fileName="fileName" :textWatermarkStr="textWatermarkStr" ref="pdfPosition"></pdfPosition>
95
- </template>
96
- <template v-else>
97
- <div v-if="fileType == 'VIDEO'" style="width: 100%;">
98
- <video :src="url" controls width="100%;" height="98%"></video>
99
- </div>
100
- <div v-else-if="fileType == 'HTML'" style="width: 100%;">
101
- <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
102
- </div>
103
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
104
- <iframe class="preview_iframe"
105
- :src="url"
106
- width="100%"
107
- height="100%"
108
- scrolling="100%"
109
- frameborder="no"
110
- border="0"></iframe>
111
- </template>
112
- <template v-else>
113
- <iframe class="preview_iframe_kk" :src="previewUrl" style="border:none;" :style="{height: iframeHeight}"></iframe>
114
- </template>
115
- </template>
116
- <div class="mobile_onload_btn" v-if="isDownload && !isPc" @click="downLoad">
117
- 下载
118
- </div>
119
- </div>
120
- <div class="loading_img" v-show="loading">
121
- <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
122
- </div>
123
- </el-drawer>
124
- </template>
125
-
126
- <script>
127
- import pdfPosition from './pdfPosition.vue'
128
- import { zoomElement } from '../assets/js/hammer'
129
- import IntelligentSummary from "./intelligentSummary";
130
- import { isMobile } from "../assets/js/common";
131
- import { Toast } from 'vant';
132
- export default {
133
- data () {
134
- return {
135
- previewShowPopup: false,
136
- fileText:'',
137
- fileType:"",
138
- isPc:false,
139
- drawer:false,
140
- tagIds: [],
141
- // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
142
- loading:true,
143
- fileName:'',
144
- previewKnowledgeId:"",
145
- showSummary:true,
146
- iframeHeight:"100%",
147
- isDownload:false,
148
- textWatermarkStr:""
149
- }
150
- },
151
- mounted() {
152
- window.addEventListener('message',this.handleIframeMessage,false);
153
- this.isPcFun();
154
- },
155
- props:{
156
- url:{
157
- type: String,
158
- required: true,
159
- },
160
- officePreviewType:{
161
- type: String,
162
- default: ''
163
- },
164
- isMessageRecord:{
165
- type: Boolean,
166
- default:false,
167
- },
168
- sourceFileType:{
169
- type: String,
170
- default: '',
171
- },
172
- title: {
173
- type: String,
174
- default: ''
175
- },
176
- isHasChat:{
177
- type:Boolean,
178
- default:false
179
- },
180
- knowledgeId:{
181
- type: String,
182
- default: '',
183
- },
184
- previewOssPath:{
185
- type: String,
186
- default: '',
187
- }
188
- },
189
- components:{
190
- IntelligentSummary,
191
- pdfPosition
192
- },
193
- watch:{
194
- drawer(value) {
195
- if(value) {
196
- this.$nextTick(() =>{
197
- if (this.tagIds && this.tagIds.length != 0){
198
- zoomElement(document.getElementById('pdf_container_view'))
199
- }
200
- })
201
- }
202
- setTimeout(() => {
203
- let previewIframe = document.getElementsByClassName('preview_iframe')
204
- Array.from(previewIframe).forEach(item =>{
205
- item.onload = () =>{
206
- console.debug('previewIframe 106',previewIframe,this.drawer)
207
- item.style.backgroundImage = 'none'
208
- }
209
- })
210
- })
211
- },
212
- showSummary:{
213
- handler(val){
214
- if (!val){
215
- this.$nextTick(() => {
216
- let preCon = document.querySelector('.pdf_view');
217
- if (preCon){
218
- preCon.style.height = 'calc(100% - ' + 50 + 'px)'
219
- }
220
- })
221
- } else {
222
- this.getSummarySuccess();
223
- }
224
- }
225
- },
226
- knowledgeId:{
227
- handler(val){
228
- if (val){
229
- this.getTextWatermark();
230
- }
231
- }
232
- }
233
- },
234
- computed:{
235
- previewUrl() {
236
- console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
237
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
238
- // if(this.url != '') {
239
- // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
240
- // url += btoa(encodeURIComponent(this.url))
241
- // } else {
242
- // url += btoa(this.url)
243
- // }
244
- // }
245
- url = url + this.url
246
- url += '&officePreviewType=pdf'
247
- if(this.watermark) {
248
- url = this.watermark.textWatermarkValue ? (url += '&textWatermarkValue=' + this.watermark.textWatermarkValue) : url
249
- url = this.watermark.visitorWatermarkValue ? (url += '&visitorWatermarkValue=' + this.watermark.visitorWatermarkValue) : url
250
- }
251
- console.log('textWatermarkStr 216',this.textWatermarkStr)
252
- if (this.textWatermarkStr){
253
- url += '&textWatermarkValue=' + this.textWatermarkStr
254
- }
255
- return url
256
- },
257
- // fileType() {
258
- // const fileType = this.url.substring(this.url.lastIndexOf('.'));
259
- // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
260
- // return 'VIDEO'
261
- // } else {
262
- // return 'OTHER'
263
- // }
264
-
265
- // }
266
- },
267
- methods :{
268
- close() {
269
- setTimeout(() =>{
270
- this.previewShowPopup = false;
271
- this.fileType = ''
272
- }, 300)
273
- this.drawer = false;
274
- this.showSummary = false;
275
- },
276
- loadIframe() {
277
-
278
- if(this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
279
- this.loading = false
280
- } else {
281
- let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
282
- if (iframe){
283
- iframe.onload = () => {
284
- this.loading = false;
285
- document.getElementById('drawer_content_pre').style.backgroundImage = 'none'
286
- }
287
- }
288
- // let time = setInterval(() =>{
289
- //
290
- // if(iframe) {
291
- // this.loading = false
292
- // clearInterval(time)
293
- // }
294
- // }, 500)
295
- }
296
- },
297
- getBolb() {
298
- this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false',{
299
- fileInOssPath: this.url,
300
- templateId: ''
301
- }).then(res =>{
302
- if (res.data.code == 0) {
303
- this.fileText = res.data.data
304
- this.loading = false
305
- }
306
- })
307
- },
308
- previewToDialog(flag){
309
- this.$emit('previewToDialog',flag)
310
- },
311
- closeSummary(){
312
- this.showSummary = false;
313
- },
314
- recommendQues(item,knowledgeId){
315
- console.log('recommendQues',item,knowledgeId);
316
- this.$emit('recommendQues',item,knowledgeId)
317
- },
318
- handleIframeMessage(res){
319
- console.log('handleIframeMessage',res)
320
- if (res.data.type == 'getViewerHeight'){
321
- let iframeHeight = this.iframeHeight.replace('px','')
322
- if (res.data.data && iframeHeight != (res.data.data + 50)){
323
- this.iframeHeight = res.data.data + 50 + 'px'
324
- }
325
- }
326
- },
327
- summaryFun(){
328
- this.showSummary = !this.showSummary;
329
- if (this.showSummary){
330
- document.getElementById('drawer_content_pre').scrollTop = 0;
331
- }
332
- },
333
- getSummarySuccess(){
334
- this.$nextTick(() => {
335
- if (this.tagIds.length > 0){
336
- let intelligentSummary = document.getElementById('intelligentSummary');
337
- let preCon = document.querySelector('.pdf_view')
338
- if (intelligentSummary){
339
- let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
340
- if (preCon){
341
- preCon.style.height = 'calc(100% - ' + height + 'px)'
342
- }
343
- console.log('height',height,preCon)
344
- }
345
- }
346
- })
347
- },
348
- getTextWatermark(){
349
- let url = '/knowledge-api/open/knowledge/getPermissionInfo';
350
- let obj = {
351
- "knowledgeId":this.knowledgeId,
352
- "userId":sessionStorage.getItem('_currentUserId'),
353
- "mainId":sessionStorage.getItem('_mainId'),
354
- "corpId":sessionStorage.getItem('_corpid')
355
- }
356
- this.$http.post(url,obj).then(res => {
357
- console.log('getTextWatermark',res.data.data)
358
- if (res.data.data){
359
- this.textWatermarkStr = res.data.data.textWatermarkStr;
360
- this.isDownload = res.data.data.showDownloadBtn;
361
- }
362
- })
363
- },
364
- downLoad () {
365
- let url = this.previewOssPath
366
- if (decodeURIComponent(url) != url) {
367
- url = decodeURIComponent(url)
368
- }
369
- const fileType = url.substring(url.lastIndexOf('.'));
370
- this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
371
- headers:{
372
- "Content-Type": "application/json",
373
- }
374
- }).then(res => {
375
- console.log('downLoad 341',res)
376
- if (res.data) {
377
- if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
378
- if(isMobile()) {
379
- setTimeout(() =>{
380
- const range = document.createRange();
381
- range.selectNode(document.getElementById('text'));
382
- const selection = window.getSelection();
383
- //移除之前选中内容
384
- if (selection.rangeCount > 0) selection.removeAllRanges();
385
- selection.addRange(range);
386
- document.execCommand('copy');
387
- selection.removeAllRanges()
388
- Toast('下载地址已复制,请前往Safari浏览器访问下载');
389
- this.close()
390
- },100)
391
- } else {
392
- navigator.clipboard.writeText(res.data)
393
- this.$message.success({
394
- message:'下载地址已复制,请前往Safari浏览器访问下载',
395
- })
396
- }
397
- return
398
- } else {
399
- // setTimeout(() =>{
400
- // window.open(res.data,'下载', 'noopener')
401
- // }, 2000)
402
- // window.open(res.data,'下载', 'noopener')
403
- if(isMobile()) {
404
- const iframe = document.createElement("iframe");
405
- iframe.setAttribute("hidden", "hidden");
406
- iframe.onload = () => {
407
- if (iframe) {
408
- console.log("iframe onload....")
409
- iframe.setAttribute('src', 'about:blank');
410
- }
411
- };
412
- document.body.insertBefore(iframe, null);
413
- iframe.setAttribute("src", res.data);
414
- } else {
415
- let a = document.createElement('a')
416
- a.href = res.data
417
- a.download = (this.title) + fileType
418
- a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
419
- }
420
- this.close()
421
- }
422
- }
423
- })
424
- },
425
- isPcFun(){
426
- if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
427
- this.isPc = false
428
- } else {
429
- this.isPc = true
430
- }
431
- }
432
- },
433
- beforeDestroy() {
434
- window.removeEventListener('message', this.handleIframeMessage);
435
- }
436
- }
437
- </script>
438
-
439
- <style lang="less" scoped>
440
- #drawer_content_pre{
441
- padding: 20px;
442
- scroll-behavior: smooth;
443
- .mobile_onload_btn{
444
- position: absolute;
445
- right: 0;
446
- bottom: 10%;
447
- width: 20px;
448
- height: 60px;
449
- display: flex;
450
- align-items: center;
451
- justify-content: center;
452
- cursor: pointer;
453
- border-top-left-radius: 10px;
454
- border-bottom-left-radius: 10px;
455
- color: #366aff;
456
- background: #ffffff;
457
- border: 1px solid #a1b9ff;
458
- font-size: 12px;
459
- border-right: none;
460
- text-align: center;
461
- }
462
- }
463
- .onload_btn {
464
- width: 80px;
465
- height: 26px;
466
- display: flex;
467
- align-items: center;
468
- justify-content: center;
469
- cursor: pointer;
470
- margin-right: 10px;
471
- border-radius: 15px;
472
- color: #366aff;
473
- background: #ffffff;
474
- border: 1px solid #a1b9ff;
475
- }
476
- .preview_iframe {
477
- width: 100%;
478
- height: 100%;
479
- box-sizing: border-box;
480
- background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
481
- background-position: center;
482
- background-size: 50px;
483
- background-repeat: no-repeat;
484
- }
485
- .preview_iframe_kk{
486
- width: 100%;
487
- height: 100%;
488
- }
489
- .preview_iframe_html{
490
- width: 100%;
491
- height: 100%;
492
- overflow-y: scroll;
493
- text-align: left;
494
- box-sizing: border-box;
495
- padding: 16px;
496
- /deep/.lake-content{
497
- margin-left: 10px;
498
- }
499
- /deep/a:link {
500
- color: #0000ee!important;
501
- }
502
- /deep/a:visited {
503
- color: #0000ee!important;
504
- }
505
- /deep/a:hover {
506
- color: #0000ee!important;
507
- }
508
- /deep/a:active {
509
- color: #0000ee!important;
510
- }
511
- /deep/li:not(.rich-text-li), ol:not(.list-paddingleft-2), ul:not(.list-paddingleft-2){
512
- list-style-type: auto!important;
513
- }
514
- /deep/img{
515
- width: 100%;
516
- }
517
- /deep/.ne-table{
518
- width: 100% !important;
519
- }
520
- }
521
- .footer {
522
- width: calc(100% - 40px);
523
- height: 50px;
524
- display: flex;
525
- align-items: center;
526
- justify-content: space-between;
527
- cursor: pointer;
528
- padding: 0 20px;
529
- border-bottom: 1px solid #cccccc;
530
- }
531
- .loading_img {
532
- display: flex;
533
- align-items: center;
534
- justify-content: center;
535
- width: 100%;
536
- height: 100%;
537
- position: absolute;
538
- top: 0;
539
- left: 0;
540
- background: #FFF;
541
- img {
542
- width: 50px;
543
- height: 50px;
544
- }
545
- }
546
-
547
- .drawer-footer{
548
- width:100%;
549
- height: 50px;
550
- display: flex;
551
- align-items: center;
552
- justify-content: space-between;
553
- cursor: pointer;
554
- padding: 0 20px;
555
- border-bottom: 1px solid #cccccc;
556
- .header-right{
557
- display: flex;
558
- align-items: center;
559
- .summaryBtn{
560
- flex: none;
561
- //width: 95px;
562
- height: 26px;
563
- padding: 0 10px;
564
- background: #ffffff;
565
- display: flex;
566
- align-items: center;
567
- justify-content: center;
568
- box-sizing: border-box;
569
- border: 1px solid #a1b9ff;
570
- border-radius: 15px;
571
- cursor: pointer;
572
- color: #366aff;
573
- margin-right: 10px;
574
- font-size: 14px;
575
- i {
576
- font-size: 18px;
577
- margin: 0 5px;
578
- }
579
- }
580
- .summaryActiveBtn{
581
- background: #366aff !important;
582
- color: #ffffff !important;
583
- }
584
- .chat {
585
- width: 95px;
586
- height: 26px;
587
- background: #ffffff;
588
- display: flex;
589
- align-items: center;
590
- justify-content: center;
591
- box-sizing: border-box;
592
- border: 1px solid #a1b9ff;
593
- border-radius: 15px 0px 15px 15px;
594
- cursor: pointer;
595
- color: #366aff;
596
- margin-right: 10px;
597
- font-size: 14px;
598
- i {
599
- font-size: 16px;
600
- margin: 0 5px;
601
- }
602
- }
603
- .chat_active {
604
- background: #366aff !important;
605
- color: #FFFFFF !important;
606
- }
607
- }
608
- }
609
- @media screen and (max-width: 767px) {
610
- /* 这里是针对移动设备的css样式设置 */
611
- /deep/.el-drawer__body{
612
- height: 100%;
613
- }
614
- #drawer_content_pre {
615
- overflow: auto;
616
- height: calc(100% - 50px);
617
- background: #FFF;
618
- }
619
- }
620
- @media screen and (min-width: 768px) {
621
- /* 这里是针对pc设备的css样式设置 */
622
- /deep/.el-drawer__body{
623
- height: 100%;
624
- }
625
- #drawer_content_pre {
626
- overflow: auto;
627
- height: calc(100% - 50px);
628
- background: #FFF;
629
- }
630
- }
631
-
1
+
2
+ <!-- preview-pdf
3
+ 组件主要负责 知识项目中 文件的预览,携带定位信息参数 tagIds tagId 的会解析文件增加定位功能
4
+ 不携带定位信息的 也是走 kkview项目预览
5
+ 另外增加了在知识项目中预览当前文件的一些功能
6
+ -->
7
+ <template>
8
+ <!-- <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}" v-if="previewShowPopup">
9
+ <div class="footer">
10
+ <span>查看详情</span>
11
+ <section @click="close">
12
+ <i class="iconfont guoran-shanchu"></i>
13
+ </section>
14
+ </div>
15
+ <template v-if="tagIds && tagIds.length != 0 && previewShowPopup">
16
+ <pdfPosition :tagIds="tagIds" ></pdfPosition>
17
+ </template>
18
+ <template v-else>
19
+ <div v-if="fileType == 'VIDEO'" style="width: 100%;height: calc(100% - 60px)">
20
+ <video :src="url" controls width="100%;" height="98%"></video>
21
+ </div>
22
+ <div v-else-if="fileType == 'HTML'" style="width: 100%;height: calc(100% - 60px)">
23
+ <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
24
+ </div>
25
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
26
+ <iframe class="preview_iframe"
27
+ :src="url"
28
+ width="100%"
29
+ height="100%"
30
+ scrolling="100%"
31
+ frameborder="no"
32
+ border="0"></iframe>
33
+ </template>
34
+ <template v-else>
35
+ <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
36
+ </template>
37
+ </template>
38
+ <div class="loading_img" v-show="loading">
39
+ <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
40
+ </div>
41
+ </van-popup> -->
42
+ <el-drawer
43
+ title="我是标题"
44
+ :visible.sync="drawer"
45
+ :with-header="false"
46
+ :append-to-body="true"
47
+ :destroy-on-close="true"
48
+ :model="false"
49
+ :direction="previewShowPopup ? 'btt' : 'rtl'"
50
+ :size="previewShowPopup ? '90%' : '65%'"
51
+ custom-class="pdf-preview-drawer"
52
+ v-if="drawer"
53
+ >
54
+ <!-- v-else-if="drawer" -->
55
+ <div class="drawer-footer">
56
+ <span>{{title ? title : "查看详情"}}</span>
57
+ <div class="header-right">
58
+ <div class="onload_btn" v-if="isDownload && isPc" @click="downLoad">
59
+ 下载
60
+ </div>
61
+ <div class="summaryBtn"
62
+ :class="showSummary ? 'summaryActiveBtn' : ''"
63
+ @click="summaryFun"
64
+ v-if="isHasChat"
65
+ >
66
+ <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
67
+ <span>智能摘要</span>
68
+ </div>
69
+ <template v-if="isHasChat">
70
+ <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
71
+ <i class="iconfont guoran-wendapingjia"></i>
72
+ 聊一聊
73
+ </div>
74
+ <div class="chat chat_active" @click="previewToDialog(false)" v-else>
75
+ <i class="iconfont guoran-wendapingjia"></i>
76
+ 聊一聊
77
+ </div>
78
+ </template>
79
+ <section @click="close">
80
+ <i class="iconfont guoran-shanchu"></i>
81
+ </section>
82
+ </div>
83
+ </div>
84
+ <div id="drawer_content_pre">
85
+ <intelligent-summary
86
+ v-show="showSummary && isHasChat"
87
+ :knowledgeId="knowledgeId"
88
+ @closeSummary="closeSummary"
89
+ @recommendQues="recommendQues"
90
+ @getSummarySuccess="getSummarySuccess"
91
+ :style="{marginTop:tagIds && tagIds.length != 0 && isPc ? '50px' : ''}"
92
+ ></intelligent-summary>
93
+ <template v-if="tagIds && tagIds.length != 0 && drawer">
94
+ <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :fileName="fileName" :textWatermarkStr="textWatermarkStr" ref="pdfPosition"></pdfPosition>
95
+ </template>
96
+ <template v-else>
97
+ <div v-if="fileType == 'VIDEO'" style="width: 100%;">
98
+ <video :src="url" controls width="100%;" height="98%"></video>
99
+ </div>
100
+ <div v-else-if="fileType == 'HTML'" style="width: 100%;">
101
+ <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
102
+ </div>
103
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
104
+ <iframe class="preview_iframe"
105
+ :src="url"
106
+ width="100%"
107
+ height="100%"
108
+ scrolling="100%"
109
+ frameborder="no"
110
+ border="0"></iframe>
111
+ </template>
112
+ <template v-else>
113
+ <iframe class="preview_iframe_kk" :src="previewUrl" style="border:none;" :style="{height: iframeHeight}"></iframe>
114
+ </template>
115
+ </template>
116
+ <div class="mobile_onload_btn" v-if="isDownload && !isPc" @click="downLoad">
117
+ 下载
118
+ </div>
119
+ </div>
120
+ <div class="loading_img" v-show="loading">
121
+ <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
122
+ </div>
123
+ </el-drawer>
124
+ </template>
125
+
126
+ <script>
127
+ import pdfPosition from './pdfPosition.vue'
128
+ import { zoomElement } from '../assets/js/hammer'
129
+ import IntelligentSummary from "./intelligentSummary";
130
+ import { isMobile } from "../assets/js/common";
131
+ import { Toast } from 'vant';
132
+ export default {
133
+ data () {
134
+ return {
135
+ previewShowPopup: false,
136
+ fileText:'',
137
+ fileType:"",
138
+ isPc:false,
139
+ drawer:false,
140
+ tagIds: [],
141
+ // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
142
+ loading:true,
143
+ fileName:'',
144
+ previewKnowledgeId:"",
145
+ showSummary:true,
146
+ iframeHeight:"100%",
147
+ isDownload:false,
148
+ textWatermarkStr:""
149
+ }
150
+ },
151
+ mounted() {
152
+ window.addEventListener('message',this.handleIframeMessage,false);
153
+ this.isPcFun();
154
+ },
155
+ props:{
156
+ url:{
157
+ type: String,
158
+ required: true,
159
+ },
160
+ officePreviewType:{
161
+ type: String,
162
+ default: ''
163
+ },
164
+ isMessageRecord:{
165
+ type: Boolean,
166
+ default:false,
167
+ },
168
+ sourceFileType:{
169
+ type: String,
170
+ default: '',
171
+ },
172
+ title: {
173
+ type: String,
174
+ default: ''
175
+ },
176
+ isHasChat:{
177
+ type:Boolean,
178
+ default:false
179
+ },
180
+ knowledgeId:{
181
+ type: String,
182
+ default: '',
183
+ },
184
+ previewOssPath:{
185
+ type: String,
186
+ default: '',
187
+ }
188
+ },
189
+ components:{
190
+ IntelligentSummary,
191
+ pdfPosition
192
+ },
193
+ watch:{
194
+ drawer(value) {
195
+ if(value) {
196
+ this.$emit('open')
197
+ this.$nextTick(() =>{
198
+ if (this.tagIds && this.tagIds.length != 0){
199
+ zoomElement(document.getElementById('pdf_container_view'))
200
+ }
201
+ })
202
+ } else {
203
+ this.$emit('close')
204
+ }
205
+ setTimeout(() => {
206
+ let previewIframe = document.getElementsByClassName('preview_iframe')
207
+ Array.from(previewIframe).forEach(item =>{
208
+ item.onload = () =>{
209
+ console.debug('previewIframe 106',previewIframe,this.drawer)
210
+ item.style.backgroundImage = 'none'
211
+ }
212
+ })
213
+ })
214
+ },
215
+ showSummary:{
216
+ handler(val){
217
+ if (!val){
218
+ this.$nextTick(() => {
219
+ let preCon = document.querySelector('.pdf_view');
220
+ if (preCon){
221
+ preCon.style.height = 'calc(100% - ' + 50 + 'px)'
222
+ }
223
+ })
224
+ } else {
225
+ this.getSummarySuccess();
226
+ }
227
+ }
228
+ },
229
+ knowledgeId:{
230
+ handler(val){
231
+ if (val){
232
+ this.getTextWatermark();
233
+ }
234
+ }
235
+ }
236
+ },
237
+ computed:{
238
+ previewUrl() {
239
+ console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
240
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
241
+ // if(this.url != '') {
242
+ // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
243
+ // url += btoa(encodeURIComponent(this.url))
244
+ // } else {
245
+ // url += btoa(this.url)
246
+ // }
247
+ // }
248
+ url = url + this.url
249
+ url += '&officePreviewType=pdf'
250
+ if(this.watermark) {
251
+ url = this.watermark.textWatermarkValue ? (url += '&textWatermarkValue=' + this.watermark.textWatermarkValue) : url
252
+ url = this.watermark.visitorWatermarkValue ? (url += '&visitorWatermarkValue=' + this.watermark.visitorWatermarkValue) : url
253
+ }
254
+ console.log('textWatermarkStr 216',this.textWatermarkStr)
255
+ if (this.textWatermarkStr){
256
+ url += '&textWatermarkValue=' + this.textWatermarkStr
257
+ }
258
+ return url
259
+ },
260
+ // fileType() {
261
+ // const fileType = this.url.substring(this.url.lastIndexOf('.'));
262
+ // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
263
+ // return 'VIDEO'
264
+ // } else {
265
+ // return 'OTHER'
266
+ // }
267
+
268
+ // }
269
+ },
270
+ methods :{
271
+ close() {
272
+ setTimeout(() =>{
273
+ this.previewShowPopup = false;
274
+ this.fileType = ''
275
+ }, 300)
276
+ this.drawer = false;
277
+ this.showSummary = false;
278
+ },
279
+ loadIframe() {
280
+
281
+ if(this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
282
+ this.loading = false
283
+ } else {
284
+ let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
285
+ if (iframe){
286
+ iframe.onload = () => {
287
+ this.loading = false;
288
+ document.getElementById('drawer_content_pre').style.backgroundImage = 'none'
289
+ }
290
+ }
291
+ // let time = setInterval(() =>{
292
+ //
293
+ // if(iframe) {
294
+ // this.loading = false
295
+ // clearInterval(time)
296
+ // }
297
+ // }, 500)
298
+ }
299
+ },
300
+ getBolb() {
301
+ this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false',{
302
+ fileInOssPath: this.url,
303
+ templateId: ''
304
+ }).then(res =>{
305
+ if (res.data.code == 0) {
306
+ this.fileText = res.data.data
307
+ this.loading = false
308
+ }
309
+ })
310
+ },
311
+ previewToDialog(flag){
312
+ this.$emit('previewToDialog',flag)
313
+ },
314
+ closeSummary(){
315
+ this.showSummary = false;
316
+ },
317
+ recommendQues(item,knowledgeId){
318
+ console.log('recommendQues',item,knowledgeId);
319
+ this.$emit('recommendQues',item,knowledgeId)
320
+ },
321
+ handleIframeMessage(res){
322
+ console.log('handleIframeMessage',res)
323
+ if (res.data.type == 'getViewerHeight'){
324
+ let iframeHeight = this.iframeHeight.replace('px','')
325
+ if (res.data.data && iframeHeight != (res.data.data + 50)){
326
+ this.iframeHeight = res.data.data + 50 + 'px'
327
+ }
328
+ }
329
+ },
330
+ summaryFun(){
331
+ this.showSummary = !this.showSummary;
332
+ if (this.showSummary){
333
+ document.getElementById('drawer_content_pre').scrollTop = 0;
334
+ }
335
+ },
336
+ getSummarySuccess(){
337
+ this.$nextTick(() => {
338
+ if (this.tagIds.length > 0){
339
+ let intelligentSummary = document.getElementById('intelligentSummary');
340
+ let preCon = document.querySelector('.pdf_view')
341
+ if (intelligentSummary){
342
+ let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
343
+ if (preCon){
344
+ preCon.style.height = 'calc(100% - ' + height + 'px)'
345
+ }
346
+ console.log('height',height,preCon)
347
+ }
348
+ }
349
+ })
350
+ },
351
+ getTextWatermark(){
352
+ let url = '/knowledge-api/open/knowledge/getPermissionInfo';
353
+ let obj = {
354
+ "knowledgeId":this.knowledgeId,
355
+ "userId":sessionStorage.getItem('_currentUserId'),
356
+ "mainId":sessionStorage.getItem('_mainId'),
357
+ "corpId":sessionStorage.getItem('_corpid')
358
+ }
359
+ this.$http.post(url,obj).then(res => {
360
+ console.log('getTextWatermark',res.data.data)
361
+ if (res.data.data){
362
+ this.textWatermarkStr = res.data.data.textWatermarkStr;
363
+ this.isDownload = res.data.data.showDownloadBtn;
364
+ }
365
+ })
366
+ },
367
+ downLoad () {
368
+ let url = this.previewOssPath
369
+ if (decodeURIComponent(url) != url) {
370
+ url = decodeURIComponent(url)
371
+ }
372
+ const fileType = url.substring(url.lastIndexOf('.'));
373
+ this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
374
+ headers:{
375
+ "Content-Type": "application/json",
376
+ }
377
+ }).then(res => {
378
+ console.log('downLoad 341',res)
379
+ if (res.data) {
380
+ if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
381
+ if(isMobile()) {
382
+ setTimeout(() =>{
383
+ const range = document.createRange();
384
+ range.selectNode(document.getElementById('text'));
385
+ const selection = window.getSelection();
386
+ //移除之前选中内容
387
+ if (selection.rangeCount > 0) selection.removeAllRanges();
388
+ selection.addRange(range);
389
+ document.execCommand('copy');
390
+ selection.removeAllRanges()
391
+ Toast('下载地址已复制,请前往Safari浏览器访问下载');
392
+ this.close()
393
+ },100)
394
+ } else {
395
+ navigator.clipboard.writeText(res.data)
396
+ this.$message.success({
397
+ message:'下载地址已复制,请前往Safari浏览器访问下载',
398
+ })
399
+ }
400
+ return
401
+ } else {
402
+ // setTimeout(() =>{
403
+ // window.open(res.data,'下载', 'noopener')
404
+ // }, 2000)
405
+ // window.open(res.data,'下载', 'noopener')
406
+ if(isMobile()) {
407
+ const iframe = document.createElement("iframe");
408
+ iframe.setAttribute("hidden", "hidden");
409
+ iframe.onload = () => {
410
+ if (iframe) {
411
+ console.log("iframe onload....")
412
+ iframe.setAttribute('src', 'about:blank');
413
+ }
414
+ };
415
+ document.body.insertBefore(iframe, null);
416
+ iframe.setAttribute("src", res.data);
417
+ } else {
418
+ let a = document.createElement('a')
419
+ a.href = res.data
420
+ a.download = (this.title) + fileType
421
+ a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
422
+ }
423
+ this.close()
424
+ }
425
+ }
426
+ })
427
+ },
428
+ isPcFun(){
429
+ if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
430
+ this.isPc = false
431
+ } else {
432
+ this.isPc = true
433
+ }
434
+ }
435
+ },
436
+ beforeDestroy() {
437
+ window.removeEventListener('message', this.handleIframeMessage);
438
+ }
439
+ }
440
+ </script>
441
+
442
+ <style lang="less" scoped>
443
+ #drawer_content_pre{
444
+ padding: 20px;
445
+ scroll-behavior: smooth;
446
+ .mobile_onload_btn{
447
+ position: absolute;
448
+ right: 0;
449
+ bottom: 10%;
450
+ width: 20px;
451
+ height: 60px;
452
+ display: flex;
453
+ align-items: center;
454
+ justify-content: center;
455
+ cursor: pointer;
456
+ border-top-left-radius: 10px;
457
+ border-bottom-left-radius: 10px;
458
+ color: #366aff;
459
+ background: #ffffff;
460
+ border: 1px solid #a1b9ff;
461
+ font-size: 12px;
462
+ border-right: none;
463
+ text-align: center;
464
+ }
465
+ }
466
+ .onload_btn {
467
+ width: 80px;
468
+ height: 26px;
469
+ display: flex;
470
+ align-items: center;
471
+ justify-content: center;
472
+ cursor: pointer;
473
+ margin-right: 10px;
474
+ border-radius: 15px;
475
+ color: #366aff;
476
+ background: #ffffff;
477
+ border: 1px solid #a1b9ff;
478
+ }
479
+ .preview_iframe {
480
+ width: 100%;
481
+ height: 100%;
482
+ box-sizing: border-box;
483
+ background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
484
+ background-position: center;
485
+ background-size: 50px;
486
+ background-repeat: no-repeat;
487
+ }
488
+ .preview_iframe_kk{
489
+ width: 100%;
490
+ height: 100%;
491
+ }
492
+ .preview_iframe_html{
493
+ width: 100%;
494
+ height: 100%;
495
+ overflow-y: scroll;
496
+ text-align: left;
497
+ box-sizing: border-box;
498
+ padding: 16px;
499
+ /deep/.lake-content{
500
+ margin-left: 10px;
501
+ }
502
+ /deep/a:link {
503
+ color: #0000ee!important;
504
+ }
505
+ /deep/a:visited {
506
+ color: #0000ee!important;
507
+ }
508
+ /deep/a:hover {
509
+ color: #0000ee!important;
510
+ }
511
+ /deep/a:active {
512
+ color: #0000ee!important;
513
+ }
514
+ /deep/li:not(.rich-text-li), ol:not(.list-paddingleft-2), ul:not(.list-paddingleft-2){
515
+ list-style-type: auto!important;
516
+ }
517
+ /deep/img{
518
+ width: 100%;
519
+ }
520
+ /deep/.ne-table{
521
+ width: 100% !important;
522
+ }
523
+ }
524
+ .footer {
525
+ width: calc(100% - 40px);
526
+ height: 50px;
527
+ display: flex;
528
+ align-items: center;
529
+ justify-content: space-between;
530
+ cursor: pointer;
531
+ padding: 0 20px;
532
+ border-bottom: 1px solid #cccccc;
533
+ }
534
+ .loading_img {
535
+ display: flex;
536
+ align-items: center;
537
+ justify-content: center;
538
+ width: 100%;
539
+ height: 100%;
540
+ position: absolute;
541
+ top: 0;
542
+ left: 0;
543
+ background: #FFF;
544
+ img {
545
+ width: 50px;
546
+ height: 50px;
547
+ }
548
+ }
549
+
550
+ .drawer-footer{
551
+ width:100%;
552
+ height: 50px;
553
+ display: flex;
554
+ align-items: center;
555
+ justify-content: space-between;
556
+ cursor: pointer;
557
+ padding: 0 20px;
558
+ border-bottom: 1px solid #cccccc;
559
+ .header-right{
560
+ display: flex;
561
+ align-items: center;
562
+ .summaryBtn{
563
+ flex: none;
564
+ //width: 95px;
565
+ height: 26px;
566
+ padding: 0 10px;
567
+ background: #ffffff;
568
+ display: flex;
569
+ align-items: center;
570
+ justify-content: center;
571
+ box-sizing: border-box;
572
+ border: 1px solid #a1b9ff;
573
+ border-radius: 15px;
574
+ cursor: pointer;
575
+ color: #366aff;
576
+ margin-right: 10px;
577
+ font-size: 14px;
578
+ i {
579
+ font-size: 18px;
580
+ margin: 0 5px;
581
+ }
582
+ }
583
+ .summaryActiveBtn{
584
+ background: #366aff !important;
585
+ color: #ffffff !important;
586
+ }
587
+ .chat {
588
+ width: 95px;
589
+ height: 26px;
590
+ background: #ffffff;
591
+ display: flex;
592
+ align-items: center;
593
+ justify-content: center;
594
+ box-sizing: border-box;
595
+ border: 1px solid #a1b9ff;
596
+ border-radius: 15px 0px 15px 15px;
597
+ cursor: pointer;
598
+ color: #366aff;
599
+ margin-right: 10px;
600
+ font-size: 14px;
601
+ i {
602
+ font-size: 16px;
603
+ margin: 0 5px;
604
+ }
605
+ }
606
+ .chat_active {
607
+ background: #366aff !important;
608
+ color: #FFFFFF !important;
609
+ }
610
+ }
611
+ }
612
+ @media screen and (max-width: 767px) {
613
+ /* 这里是针对移动设备的css样式设置 */
614
+ /deep/.el-drawer__body{
615
+ height: 100%;
616
+ }
617
+ #drawer_content_pre {
618
+ overflow: auto;
619
+ height: calc(100% - 50px);
620
+ background: #FFF;
621
+ }
622
+ }
623
+ @media screen and (min-width: 768px) {
624
+ /* 这里是针对pc设备的css样式设置 */
625
+ /deep/.el-drawer__body{
626
+ height: 100%;
627
+ }
628
+ #drawer_content_pre {
629
+ overflow: auto;
630
+ height: calc(100% - 50px);
631
+ background: #FFF;
632
+ }
633
+ }
634
+
635
+ @media screen and (min-width: 1350px) {
636
+ /* 这里是针对pc设备的css样式设置 */
637
+ .el-drawer__wrapper {
638
+ width: 55%;
639
+ left: calc(100vw - 55%);
640
+ right: 0;
641
+ /deep/.pdf-preview-drawer {
642
+ width: 100% !important;
643
+ }
644
+ }
645
+ /deep/.el-drawer__body{
646
+ height: 100%;
647
+ }
648
+ #drawer_content_pre {
649
+ overflow: auto;
650
+ height: calc(100% - 50px);
651
+ background: #FFF;
652
+ }
653
+ }
632
654
  </style>