askbot-dragon 1.6.76-beta → 1.6.78-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 +55 -55
  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 -252
  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 +1059 -1059
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +4934 -4934
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/MyEditor.vue +351 -351
  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 +227 -227
  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 +1508 -1506
  61. package/src/components/popup.vue +227 -227
  62. package/src/components/previewDoc.vue +247 -247
  63. package/src/components/previewPdf.vue +791 -757
  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 +340 -340
  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,757 +1,791 @@
1
-
2
- <!-- preview-pdf
3
- 组件主要负责 知识项目中 文件的预览,携带定位信息参数 tagIds tagId 的会解析文件增加定位功能
4
- 不携带定位信息的 也是走 kkview项目预览
5
- 另外增加了在知识项目中预览当前文件的一些功能
6
- -->
7
- <template>
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
- <!-- v-else-if="drawer" -->
12
- <div class="drawer-header" :class="isLiBang ? 'libang_head' : ''" v-if="!isPc">
13
- <div class="header-btn btn_position">
14
- <div class="onload_btn" v-if="isDownload || true" @click="downLoad">
15
- 下载
16
- </div>
17
- <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
18
- v-if="isHasChat || true">
19
- <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
20
- <span>智能摘要</span>
21
- </div>
22
- <template v-if="isHasChat || true">
23
- <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
24
- <i class="iconfont guoran-wendapingjia"></i>
25
- 聊一聊
26
- </div>
27
- <div class="chat chat_active" @click="previewToDialog(false)" v-else>
28
- <i class="iconfont guoran-wendapingjia"></i>
29
- 聊一聊
30
- </div>
31
- </template>
32
- </div>
33
- <div class="header_title">
34
- <div class="header_close">
35
- <span>
36
- {{ title ? title : "查看详情" }}
37
- </span>
38
- <section @click="close">
39
- <i class="iconfont guoran-shanchu"></i>
40
- </section>
41
- </div>
42
- <p v-if="folderName && isLiBang" class="header_floder" @click="clickFloder">
43
- <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
44
- {{ folderName }}
45
- <i v-if="folderUrl" class="iconfont guoran-tongyichicun-dianjichakantuli"></i>
46
- </p>
47
- </div>
48
- </div>
49
- <div class="drawer-header" :class="isLiBang && folderName ? 'libang_head' : ''" v-else>
50
- <div class="header_title">
51
- <div :class="isLiBang && folderName ? 'header_close' : 'header_top'">
52
- <span>
53
- {{ title ? title : "查看详情" }}
54
- </span>
55
- <div class="header-btn">
56
- <div class="onload_btn" v-if="isDownload || true" @click="downLoad">
57
- 下载
58
- </div>
59
- <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
60
- v-if="isHasChat || true">
61
- <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
62
- <span>智能摘要</span>
63
- </div>
64
- <template v-if="isHasChat || true">
65
- <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
66
- <i class="iconfont guoran-wendapingjia"></i>
67
- 聊一聊
68
- </div>
69
- <div class="chat chat_active" @click="previewToDialog(false)" v-else>
70
- <i class="iconfont guoran-wendapingjia"></i>
71
- 聊一聊
72
- </div>
73
- </template>
74
- <section @click="close">
75
- <i class="iconfont guoran-shanchu"></i>
76
- </section>
77
- </div>
78
- </div>
79
- <p v-if="folderName && isLiBang" class="header_floder" @click="clickFloder">
80
- <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
81
- {{ folderName }}
82
- <i v-if="folderUrl" class="iconfont guoran-tongyichicun-dianjichakantuli"></i>
83
- </p>
84
- </div>
85
- </div>
86
- <div id="drawer_content_pre" :class="isLiBang && folderName ? 'libang_content_pre' : ''">
87
- <!-- :style="{marginTop:tagIds && tagIds.length != 0 && isPc ? '50px' : ''}" -->
88
- <intelligent-summary v-show="showSummary && isHasChat" :tagIds="tagIds" :knowledgeId="knowledgeId"
89
- @closeSummary="closeSummary" @recommendQues="recommendQues"
90
- @getSummarySuccess="getSummarySuccess"></intelligent-summary>
91
- <div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer">
92
- <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :textWatermarkStr="textWatermarkStr">
93
- </pdfPosition>
94
- </div>
95
- <template v-else>
96
- <div v-if="fileType == 'VIDEO'" style="width: 100%;">
97
- <video :src="url" controls width="100%;" height="98%"></video>
98
- </div>
99
- <div v-else-if="fileType == 'HTML'" style="width: 100%;">
100
- <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
101
- </div>
102
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
103
- <iframe class="preview_iframe" :src="url" width="100%" height="100%" scrolling="100%" frameborder="no"
104
- border="0"></iframe>
105
- </template>
106
- <template v-else>
107
- <iframe class="preview_iframe_kk" :src="previewUrl" style="border:none;"
108
- :style="{ height: iframeHeight }"></iframe>
109
- </template>
110
- </template>
111
- <!-- <div class="mobile_onload_btn" v-if="isDownload && !isPc" @click="downLoad">
112
- 下载
113
- </div> -->
114
- </div>
115
- <div class="loading_img" v-show="loading">
116
- <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
117
- </div>
118
- </el-drawer>
119
- </template>
120
-
121
- <script>
122
- import pdfPosition from './pdfPosition.vue'
123
- import { zoomElement } from '../assets/js/hammer'
124
- import IntelligentSummary from "./intelligentSummary";
125
- import { isMobile } from "../assets/js/common";
126
- // import { Toast } from 'vant';
127
- export default {
128
- data () {
129
- return {
130
- previewShowPopup: false,
131
- fileText: '',
132
- fileType: "",
133
- isPc: false,
134
- drawer: false,
135
- tagIds: [],
136
- // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
137
- loading: true,
138
- fileName:'',
139
- previewKnowledgeId:"",
140
- showSummary:true,
141
- iframeHeight:"100%",
142
- isDownload: false,
143
- textWatermarkStr:""
144
- }
145
- },
146
- mounted() {
147
- window.addEventListener('message',this.handleIframeMessage,false);
148
- this.isPcFun();
149
- },
150
- props:{
151
- url:{
152
- type: String,
153
- required: true,
154
- },
155
- officePreviewType:{
156
- type: String,
157
- default: ''
158
- },
159
- isMessageRecord:{
160
- type: Boolean,
161
- default:false,
162
- },
163
- sourceFileType:{
164
- type: String,
165
- default: '',
166
- },
167
- title: {
168
- type: String,
169
- default: ''
170
- },
171
- isHasChat:{
172
- type:Boolean,
173
- default:false
174
- },
175
- knowledgeId:{
176
- type: String,
177
- default: '',
178
- },
179
- previewOssPath:{
180
- type: String,
181
- default: '',
182
- },
183
- folderName: {
184
- type: String,
185
- default: '',
186
- },
187
- folderUrl: {
188
- type: String,
189
- default: '',
190
- },
191
- isLiBang: {
192
- type: Boolean,
193
- default: false
194
- }
195
- },
196
- components: {
197
- IntelligentSummary,
198
- pdfPosition
199
- },
200
- watch: {
201
- drawer (value) {
202
- if (value) {
203
- this.$emit('open')
204
- this.$nextTick(() => {
205
- if (this.tagIds && this.tagIds.length != 0){
206
- zoomElement(document.getElementById('pdf_container_view'))
207
- }
208
- })
209
- } else {
210
- this.$emit('close')
211
- }
212
- setTimeout(() => {
213
- let previewIframe = document.getElementsByClassName('preview_iframe')
214
- Array.from(previewIframe).forEach(item =>{
215
- item.onload = () =>{
216
- console.debug('previewIframe 106',previewIframe,this.drawer)
217
- item.style.backgroundImage = 'none'
218
- }
219
- })
220
- })
221
- },
222
- showSummary:{
223
- handler(val){
224
- // if (!val){
225
- // this.$nextTick(() => {
226
- // let preCon = document.querySelector('.pdf_view');
227
- // if (preCon){
228
- // preCon.style.height = 'calc(100% - ' + 50 + 'px)'
229
- // }
230
- // })
231
- // } else {
232
- // this.getSummarySuccess();
233
- // }
234
- if(val) {
235
- this.getSummarySuccess();
236
- }
237
- }
238
- },
239
- knowledgeId:{
240
- handler(val){
241
- if (val){
242
- this.getTextWatermark();
243
- }
244
- }
245
- }
246
- },
247
- computed:{
248
- pdfStyle() {
249
- return {
250
- paddingTop: this.isPc ? '30px' : '0', // 30px 是 加上外层的 20 流出 50的上边距展示 放大缩小操作栏
251
- paddingBottom: this.tagIds > 1 ? '60px' : '0',
252
- height: '100%'
253
- }
254
- },
255
- previewUrl() {
256
- console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
257
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
258
- // if(this.url != '') {
259
- // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
260
- // url += btoa(encodeURIComponent(this.url))
261
- // } else {
262
- // url += btoa(this.url)
263
- // }
264
- // }
265
- url = url + this.url
266
- url += '&officePreviewType=pdf'
267
- if(this.watermark) {
268
- url = this.watermark.textWatermarkValue ? (url += '&textWatermarkValue=' + this.watermark.textWatermarkValue) : url
269
- url = this.watermark.visitorWatermarkValue ? (url += '&visitorWatermarkValue=' + this.watermark.visitorWatermarkValue) : url
270
- }
271
- console.log('textWatermarkStr 216', this.textWatermarkStr)
272
- if (this.textWatermarkStr) {
273
- url += '&textWatermarkValue=' + this.textWatermarkStr
274
- }
275
- return url
276
- },
277
- // fileType() {
278
- // const fileType = this.url.substring(this.url.lastIndexOf('.'));
279
- // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
280
- // return 'VIDEO'
281
- // } else {
282
- // return 'OTHER'
283
- // }
284
-
285
- // }
286
- },
287
- methods: {
288
- close () {
289
- setTimeout(() => {
290
- this.previewShowPopup = false;
291
- this.fileType = ''
292
- }, 300)
293
- this.drawer = false;
294
- this.showSummary = false;
295
- },
296
- loadIframe () {
297
-
298
- if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
299
- this.loading = false
300
- } else {
301
- let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
302
- if (iframe) {
303
- iframe.onload = () => {
304
- this.loading = false;
305
- document.getElementById('drawer_content_pre').style.backgroundImage = 'none'
306
- }
307
- }
308
- // let time = setInterval(() =>{
309
- //
310
- // if(iframe) {
311
- // this.loading = false
312
- // clearInterval(time)
313
- // }
314
- // }, 500)
315
- }
316
- },
317
- getBolb () {
318
- this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false', {
319
- fileInOssPath: this.url,
320
- templateId: ''
321
- }).then(res => {
322
- if (res.data.code == 0) {
323
- this.fileText = res.data.data
324
- this.loading = false
325
- }
326
- })
327
- },
328
- previewToDialog (flag) {
329
- this.$emit('previewToDialog', flag)
330
- },
331
- closeSummary () {
332
- this.showSummary = false;
333
- },
334
- recommendQues (item, knowledgeId) {
335
- console.log('recommendQues', item, knowledgeId);
336
- this.$emit('recommendQues', item, knowledgeId)
337
- },
338
- handleIframeMessage (res) {
339
- console.log('handleIframeMessage', res)
340
- if (res.data.type == 'getViewerHeight') {
341
- let iframeHeight = this.iframeHeight.replace('px', '')
342
- if (res.data.data && iframeHeight != (res.data.data + 50)) {
343
- this.iframeHeight = res.data.data + 50 + 'px'
344
- }
345
- }
346
- },
347
- summaryFun () {
348
- this.showSummary = !this.showSummary;
349
- if (this.showSummary) {
350
- document.getElementById('drawer_content_pre').scrollTop = 0;
351
- }
352
- },
353
- getSummarySuccess () {
354
- this.$nextTick(() => {
355
- // if (this.tagIds.length > 0){
356
- // let intelligentSummary = document.getElementById('intelligentSummary');
357
- // let preCon = document.querySelector('.pdf_view')
358
- // if (intelligentSummary){
359
- // let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
360
- // if (preCon){
361
- // preCon.style.height = 'calc(100% - ' + height + 'px)'
362
- // }
363
- // console.log('height',height,preCon)
364
- // }
365
- // }
366
- // let intelligentSummary = document.getElementById('intelligentSummary');
367
- // let height = intelligentSummary.offsetHeight
368
- // this.pdfStyle.height = 'calc(100% - ' + height + 'px)'
369
- })
370
- },
371
- getTextWatermark () {
372
- let url = '/knowledge-api/open/knowledge/getPermissionInfo';
373
- let obj = {
374
- "knowledgeId": this.knowledgeId,
375
- "userId": sessionStorage.getItem('_currentUserId'),
376
- "mainId": sessionStorage.getItem('_mainId'),
377
- "corpId": sessionStorage.getItem('_corpid')
378
- }
379
- this.$http.post(url, obj).then(res => {
380
- console.log('getTextWatermark', res.data.data)
381
- if (res.data.data) {
382
- this.textWatermarkStr = res.data.data.textWatermarkStr;
383
- this.isDownload = res.data.data.showDownloadBtn;
384
- }
385
- })
386
- },
387
- downLoad () {
388
- let url = this.previewOssPath
389
- if (decodeURIComponent(url) != url) {
390
- url = decodeURIComponent(url)
391
- }
392
- const fileType = url.substring(url.lastIndexOf('.'));
393
- this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
394
- headers: {
395
- "Content-Type": "application/json",
396
- }
397
- }).then(res => {
398
- console.log('downLoad 341', res)
399
- if (res.data|| res.bodyText) {
400
- if (isMobile()) {
401
-
402
- const iframe = document.createElement("iframe");
403
- iframe.setAttribute("hidden", "hidden");
404
- iframe.onload = () => {
405
- if (iframe) {
406
- console.log("iframe onload....")
407
- iframe.setAttribute('src', 'about:blank');
408
- }
409
- };
410
- document.body.insertBefore(iframe, null);
411
- iframe.setAttribute("src", res.data || res.bodyText);
412
- } else {
413
- let a = document.createElement('a')
414
- a.href = res.data|| res.bodyText
415
- a.download = (this.title) + fileType
416
- a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
417
- }
418
- this.close()
419
-
420
- }
421
- })
422
- },
423
- isPcFun () {
424
- if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
425
- this.isPc = false
426
- } else {
427
- this.isPc = true
428
- }
429
- },
430
- clickFloder() {
431
- this.$emit('previewClickFloder')
432
- }
433
- },
434
- beforeDestroy () {
435
- window.removeEventListener('message', this.handleIframeMessage);
436
- }
437
- }
438
- </script>
439
-
440
- <style lang="less" scoped>
441
- #drawer_content_pre {
442
- padding: 20px;
443
- scroll-behavior: smooth;
444
-
445
- .mobile_onload_btn {
446
- position: absolute;
447
- right: 0;
448
- bottom: 10%;
449
- width: 20px;
450
- height: 60px;
451
- display: flex;
452
- align-items: center;
453
- justify-content: center;
454
- cursor: pointer;
455
- border-top-left-radius: 10px;
456
- border-bottom-left-radius: 10px;
457
- color: #366aff;
458
- background: #ffffff;
459
- border: 1px solid #a1b9ff;
460
- font-size: 12px;
461
- border-right: none;
462
- text-align: center;
463
- }
464
-
465
- .pdf_positon {
466
- width: 100%;
467
- box-sizing: border-box;
468
- }
469
- }
470
-
471
- .onload_btn {
472
- width: 76px;
473
- height: 26px;
474
- display: flex;
475
- align-items: center;
476
- justify-content: center;
477
- cursor: pointer;
478
- margin-right: 10px;
479
- border-radius: 15px;
480
- color: #366aff;
481
- background: #ffffff;
482
- border: 1px solid #a1b9ff;
483
- box-sizing: border-box;
484
- }
485
-
486
- .preview_iframe {
487
- width: 100%;
488
- height: 100%;
489
- box-sizing: border-box;
490
- background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
491
- background-position: center;
492
- background-size: 50px;
493
- background-repeat: no-repeat;
494
- }
495
-
496
- .preview_iframe_kk {
497
- width: 100%;
498
- height: 100%;
499
- }
500
-
501
-
502
- .preview_iframe_html {
503
- width: 100%;
504
- height: 100%;
505
- overflow-y: scroll;
506
- text-align: left;
507
- box-sizing: border-box;
508
- padding: 16px;
509
-
510
- /deep/.lake-content {
511
- margin-left: 10px;
512
- }
513
-
514
- /deep/a:link {
515
- color: #0000ee !important;
516
- }
517
-
518
- /deep/a:visited {
519
- color: #0000ee !important;
520
- }
521
-
522
- /deep/a:hover {
523
- color: #0000ee !important;
524
- }
525
-
526
- /deep/a:active {
527
- color: #0000ee !important;
528
- }
529
-
530
- /deep/li:not(.rich-text-li),
531
- ol:not(.list-paddingleft-2),
532
- ul:not(.list-paddingleft-2) {
533
- list-style-type: auto !important;
534
- }
535
-
536
- /deep/img {
537
- width: 100%;
538
- }
539
-
540
- /deep/.ne-table {
541
- width: 100% !important;
542
- }
543
- }
544
-
545
- .footer {
546
- width: calc(100% - 40px);
547
- height: 50px;
548
- display: flex;
549
- align-items: center;
550
- justify-content: space-between;
551
- cursor: pointer;
552
- padding: 0 20px;
553
- border-bottom: 1px solid #cccccc;
554
- }
555
-
556
- .loading_img {
557
- display: flex;
558
- align-items: center;
559
- justify-content: center;
560
- width: 100%;
561
- height: 100%;
562
- position: absolute;
563
- top: 0;
564
- left: 0;
565
- background: #FFF;
566
-
567
- img {
568
- width: 50px;
569
- height: 50px;
570
- }
571
- }
572
-
573
- .libang_head {
574
- height: 64px !important;
575
- }
576
-
577
- .drawer-header {
578
- width: 100%;
579
- height: 50px;
580
- cursor: pointer;
581
- padding: 6px 20px;
582
- border-bottom: 1px solid #cccccc;
583
- .btn_position {
584
- position: absolute;
585
- top: -34px;
586
- left: 12px;
587
- }
588
-
589
- .header-btn {
590
- display: flex;
591
- align-items: center;
592
- justify-content: space-between;
593
-
594
- .header-right {
595
- display: flex;
596
- }
597
-
598
- .summaryBtn {
599
- flex: none;
600
- //width: 95px;
601
- height: 26px;
602
- padding: 0 8px;
603
- background: #ffffff;
604
- display: flex;
605
- align-items: center;
606
- justify-content: center;
607
- box-sizing: border-box;
608
- border: 1px solid #a1b9ff;
609
- border-radius: 15px;
610
- cursor: pointer;
611
- color: #366aff;
612
- margin-right: 10px;
613
- font-size: 14px;
614
-
615
- i {
616
- font-size: 14px;
617
- margin-right: 5px;
618
- }
619
- }
620
-
621
- .summaryActiveBtn {
622
- background: #366aff !important;
623
- color: #ffffff !important;
624
- }
625
-
626
- .chat {
627
- flex: none;
628
- height: 26px;
629
- padding: 0 8px;
630
- background: #ffffff;
631
- display: flex;
632
- align-items: center;
633
- justify-content: center;
634
- box-sizing: border-box;
635
- border: 1px solid #a1b9ff;
636
- border-radius: 15px 0px 15px 15px;
637
- cursor: pointer;
638
- color: #366aff;
639
- margin-right: 10px;
640
- font-size: 14px;
641
-
642
- i {
643
- font-size: 14px;
644
- margin-right: 5px;
645
- margin-top: 2px;
646
- }
647
- }
648
-
649
- .chat_active {
650
- background: #366aff !important;
651
- color: #FFFFFF !important;
652
- }
653
- }
654
-
655
- .header_title {
656
- font-size: 14px;
657
- height: 100%;
658
- .header_close {
659
- display: flex;
660
- align-items: center;
661
- justify-content: space-between;
662
- line-height: 26px;
663
- }
664
- .header_floder {
665
- display: flex;
666
- align-items: center;
667
- line-height: 26px;
668
- i {
669
- margin: 0 5px;
670
- color: #366aff;
671
- }
672
- }
673
- .header_top {
674
- height: 100%;
675
- display: flex;
676
- align-items: center;
677
- justify-content: space-between;
678
- }
679
- }
680
- }
681
-
682
- @media screen and (max-width: 767px) {
683
-
684
- /* 这里是针对移动设备的css样式设置 */
685
- /deep/.el-drawer__body {
686
- height: 100%;
687
- }
688
-
689
- #drawer_content_pre {
690
- overflow: auto;
691
- height: calc(100% - 50px);
692
- background: #FFF;
693
- }
694
-
695
- .libang_content_pre {
696
- height: calc(100% - 64px) !important;
697
- }
698
- }
699
-
700
- @media screen and (min-width: 768px) {
701
-
702
- /* 这里是针对pc设备的css样式设置 */
703
- /deep/.el-drawer__body {
704
- height: 100%;
705
- }
706
-
707
- #drawer_content_pre {
708
- overflow: auto;
709
- height: calc(100% - 50px);
710
- background: #FFF;
711
- }
712
-
713
- .libang_content_pre {
714
- height: calc(100% - 64px) !important;
715
- }
716
- }
717
-
718
- @media screen and (min-width: 1200px) {
719
-
720
- /* 这里是针对pc设备的css样式设置 */
721
- .el-drawer__wrapper {
722
- width: 55%;
723
- left: calc(100vw - 55%);
724
- right: 0;
725
-
726
- /deep/.pdf-preview-drawer {
727
- width: 100% !important;
728
- }
729
- }
730
-
731
- /deep/.el-drawer__body {
732
- height: 100%;
733
- }
734
-
735
- #drawer_content_pre {
736
- overflow: auto;
737
- height: calc(100% - 50px);
738
- background: #FFF;
739
- }
740
-
741
- .libang_content_pre {
742
- height: calc(100% - 64px) !important;
743
- }
744
- }
745
- </style><style lang="less">
746
- .pdf-preview-drawer {
747
- overflow: visible !important;
748
- }
749
- .libang_content_pre {
750
- .change_scale {
751
- top: 64px !important;
752
- }
753
- .float_intelligentSummary {
754
- top: 74px !important;
755
- }
756
- }
757
- </style>
1
+
2
+ <!-- preview-pdf
3
+ 组件主要负责 知识项目中 文件的预览,携带定位信息参数 tagIds tagId 的会解析文件增加定位功能
4
+ 不携带定位信息的 也是走 kkview项目预览
5
+ 另外增加了在知识项目中预览当前文件的一些功能
6
+ -->
7
+ <template>
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
+ <!-- v-else-if="drawer" -->
12
+ <div class="drawer-header" :class="isLiBang ? 'libang_head' : ''" v-if="!isPc">
13
+ <div class="header-btn btn_position">
14
+ <div class="onload_btn" v-if="isDownload || true" @click="downLoad">
15
+ 下载
16
+ </div>
17
+ <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun" v-if="isHasChat || formKnowledgeManagement">
18
+ <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
19
+ <span>智能摘要</span>
20
+ </div>
21
+ <template v-if="isHasChat">
22
+ <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
23
+ <i class="iconfont guoran-wendapingjia"></i>
24
+ 聊一聊
25
+ </div>
26
+ <div class="chat chat_active" @click="previewToDialog(false)" v-else>
27
+ <i class="iconfont guoran-wendapingjia"></i>
28
+ 聊一聊
29
+ </div>
30
+ </template>
31
+ </div>
32
+ <div class="header_title">
33
+ <div class="header_close">
34
+ <span>
35
+ {{ title ? title : "查看详情" }}
36
+ </span>
37
+ <section @click="close">
38
+ <i class="iconfont guoran-shanchu"></i>
39
+ </section>
40
+ </div>
41
+ <p v-if="folderName && isLiBang" class="header_floder" @click="clickFloder">
42
+ <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
43
+ {{ folderName }}
44
+ <i v-if="folderUrl" class="iconfont guoran-tongyichicun-dianjichakantuli"></i>
45
+ </p>
46
+ </div>
47
+ </div>
48
+ <div class="drawer-header" :class="isLiBang && folderName ? 'libang_head' : ''" v-else>
49
+ <div class="header_title">
50
+ <div :class="isLiBang && folderName ? 'header_close' : 'header_top'">
51
+ <span>
52
+ {{ title ? title : "查看详情" }}
53
+ </span>
54
+ <div class="header-btn">
55
+ <div class="onload_btn" v-if="isDownload || true" @click="downLoad">
56
+ 下载
57
+ </div>
58
+ <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
59
+ v-if="isHasChat || true">
60
+ <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
61
+ <span>智能摘要</span>
62
+ </div>
63
+ <template v-if="isHasChat || true">
64
+ <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
65
+ <i class="iconfont guoran-wendapingjia"></i>
66
+ 聊一聊
67
+ </div>
68
+ <div class="chat chat_active" @click="previewToDialog(false)" v-else>
69
+ <i class="iconfont guoran-wendapingjia"></i>
70
+ 聊一聊
71
+ </div>
72
+ </template>
73
+ <section @click="close">
74
+ <i class="iconfont guoran-shanchu"></i>
75
+ </section>
76
+ </div>
77
+ </div>
78
+ <p v-if="folderName && isLiBang" class="header_floder" @click="clickFloder">
79
+ <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
80
+ {{ folderName }}
81
+ <i v-if="folderUrl" class="iconfont guoran-tongyichicun-dianjichakantuli"></i>
82
+ </p>
83
+ </div>
84
+ </div>
85
+ <div id="drawer_content_pre" :class="isLiBang && folderName ? 'libang_content_pre' : ''">
86
+ <!-- :style="{marginTop:tagIds && tagIds.length != 0 && isPc ? '50px' : ''}" -->
87
+ <intelligent-summary v-show="showSummary && (isHasChat || formKnowledgeManagement)" :tagIds="tagIds" :knowledgeId="knowledgeId"
88
+ @closeSummary="closeSummary" @recommendQues="recommendQues"
89
+ @getSummarySuccess="getSummarySuccess"></intelligent-summary>
90
+ <div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer">
91
+ <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :textWatermarkStr="textWatermarkStr">
92
+ </pdfPosition>
93
+ </div>
94
+ <template v-else>
95
+ <div v-if="fileType == 'VIDEO'" style="width: 100%;">
96
+ <video :src="url" controls width="100%;" height="98%"></video>
97
+ </div>
98
+ <div v-else-if="fileType == 'HTML'" style="width: 100%;">
99
+ <div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
100
+ </div>
101
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
102
+ <iframe class="preview_iframe" :src="url" width="100%" height="100%" scrolling="100%" frameborder="no"
103
+ border="0"></iframe>
104
+ </template>
105
+ <template v-else>
106
+ <iframe class="preview_iframe_kk" :src="previewUrl" style="border:none;"
107
+ :style="{ height: iframeHeight }"></iframe>
108
+ </template>
109
+ </template>
110
+ <!-- <div class="mobile_onload_btn" v-if="isDownload && !isPc" @click="downLoad">
111
+ 下载
112
+ </div> -->
113
+ </div>
114
+ <div class="loading_img" v-show="loading">
115
+ <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
116
+ </div>
117
+ <div id="text">
118
+ {{ copy }}
119
+ </div>
120
+ </el-drawer>
121
+ </template>
122
+
123
+ <script>
124
+ import pdfPosition from './pdfPosition.vue'
125
+ import { zoomElement } from '../assets/js/hammer'
126
+ import IntelligentSummary from "./intelligentSummary";
127
+ import { isMobile } from "../assets/js/common";
128
+ import { Toast } from 'vant';
129
+ export default {
130
+ data () {
131
+ return {
132
+ previewShowPopup: false,
133
+ fileText: '',
134
+ fileType: "",
135
+ isPc: false,
136
+ drawer: false,
137
+ tagIds: [],
138
+ // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
139
+ loading: true,
140
+ fileName:'',
141
+ previewKnowledgeId:"",
142
+ showSummary:true,
143
+ iframeHeight:"100%",
144
+ isDownload: false,
145
+ textWatermarkStr:"",
146
+ copy:''}
147
+ },
148
+ mounted() {
149
+ window.addEventListener('message',this.handleIframeMessage,false);
150
+ this.isPcFun();
151
+ },
152
+ props:{
153
+ url:{
154
+ type: String,
155
+ required: true,
156
+ },
157
+ officePreviewType:{
158
+ type: String,
159
+ default: ''
160
+ },
161
+ isMessageRecord:{
162
+ type: Boolean,
163
+ default:false,
164
+ },
165
+ sourceFileType:{
166
+ type: String,
167
+ default: '',
168
+ },
169
+ title: {
170
+ type: String,
171
+ default: ''
172
+ },
173
+ isHasChat:{
174
+ type:Boolean,
175
+ default:false
176
+ },
177
+ knowledgeId:{
178
+ type: String,
179
+ default: '',
180
+ },
181
+ previewOssPath:{
182
+ type: String,
183
+ default: '',
184
+ },
185
+ folderName: {
186
+ type: String,
187
+ default: '',
188
+ },
189
+ folderUrl: {
190
+ type: String,
191
+ default: '',
192
+ },
193
+ isLiBang: {
194
+ type: Boolean,
195
+ default: false
196
+ },
197
+ formKnowledgeManagement:{
198
+ type: Boolean,
199
+ default: false
200
+ }
201
+ },
202
+ components: {
203
+ IntelligentSummary,
204
+ pdfPosition
205
+ },
206
+ watch: {
207
+ drawer (value) {
208
+ if (value) {
209
+ this.$emit('open')
210
+ this.$nextTick(() => {
211
+ if (this.tagIds && this.tagIds.length != 0){
212
+ zoomElement(document.getElementById('pdf_container_view'))
213
+ }
214
+ })
215
+ } else {
216
+ this.$emit('close')
217
+ }
218
+ setTimeout(() => {
219
+ let previewIframe = document.getElementsByClassName('preview_iframe')
220
+ Array.from(previewIframe).forEach(item =>{
221
+ item.onload = () =>{
222
+ console.debug('previewIframe 106',previewIframe,this.drawer)
223
+ item.style.backgroundImage = 'none'
224
+ }
225
+ })
226
+ })
227
+ },
228
+ showSummary:{
229
+ handler(val){
230
+ // if (!val){
231
+ // this.$nextTick(() => {
232
+ // let preCon = document.querySelector('.pdf_view');
233
+ // if (preCon){
234
+ // preCon.style.height = 'calc(100% - ' + 50 + 'px)'
235
+ // }
236
+ // })
237
+ // } else {
238
+ // this.getSummarySuccess();
239
+ // }
240
+ if(val) {
241
+ this.getSummarySuccess();
242
+ }
243
+ }
244
+ },
245
+ knowledgeId:{
246
+ handler(val){
247
+ if (val){
248
+ this.getTextWatermark();
249
+ }
250
+ }
251
+ }
252
+ },
253
+ computed:{
254
+ pdfStyle() {
255
+ return {
256
+ paddingTop: this.isPc ? '30px' : '0', // 30px 是 加上外层的 20 流出 50的上边距展示 放大缩小操作栏
257
+ paddingBottom: this.tagIds > 1 ? '60px' : '0',
258
+ height: '100%'
259
+ }
260
+ },
261
+ previewUrl() {
262
+ console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
263
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
264
+ // if(this.url != '') {
265
+ // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
266
+ // url += btoa(encodeURIComponent(this.url))
267
+ // } else {
268
+ // url += btoa(this.url)
269
+ // }
270
+ // }
271
+ url = url + this.url
272
+ url += '&officePreviewType=pdf'
273
+ if(this.watermark) {
274
+ url = this.watermark.textWatermarkValue ? (url += '&textWatermarkValue=' + this.watermark.textWatermarkValue) : url
275
+ url = this.watermark.visitorWatermarkValue ? (url += '&visitorWatermarkValue=' + this.watermark.visitorWatermarkValue) : url
276
+ }
277
+ console.log('textWatermarkStr 216', this.textWatermarkStr)
278
+ if (this.textWatermarkStr) {
279
+ url += '&textWatermarkValue=' + this.textWatermarkStr
280
+ }
281
+ return url
282
+ },
283
+ // fileType() {
284
+ // const fileType = this.url.substring(this.url.lastIndexOf('.'));
285
+ // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
286
+ // return 'VIDEO'
287
+ // } else {
288
+ // return 'OTHER'
289
+ // }
290
+
291
+ // }
292
+ },
293
+ methods: {
294
+ close () {
295
+ setTimeout(() => {
296
+ this.previewShowPopup = false;
297
+ this.fileType = ''
298
+ }, 300)
299
+ this.drawer = false;
300
+ this.showSummary = false;
301
+ },
302
+ loadIframe () {
303
+
304
+ if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
305
+ this.loading = false
306
+ } else {
307
+ let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
308
+ if (iframe) {
309
+ iframe.onload = () => {
310
+ this.loading = false;
311
+ document.getElementById('drawer_content_pre').style.backgroundImage = 'none'
312
+ }
313
+ }
314
+ // let time = setInterval(() =>{
315
+ //
316
+ // if(iframe) {
317
+ // this.loading = false
318
+ // clearInterval(time)
319
+ // }
320
+ // }, 500)
321
+ }
322
+ },
323
+ getBolb () {
324
+ this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false', {
325
+ fileInOssPath: this.url,
326
+ templateId: ''
327
+ }).then(res => {
328
+ if (res.data.code == 0) {
329
+ this.fileText = res.data.data
330
+ this.loading = false
331
+ }
332
+ })
333
+ },
334
+ previewToDialog (flag) {
335
+ this.$emit('previewToDialog', flag)
336
+ },
337
+ closeSummary () {
338
+ this.showSummary = false;
339
+ },
340
+ recommendQues (item, knowledgeId) {
341
+ console.log('recommendQues', item, knowledgeId);
342
+ this.$emit('recommendQues', item, knowledgeId)
343
+ },
344
+ handleIframeMessage (res) {
345
+ console.log('handleIframeMessage', res)
346
+ if (res.data.type == 'getViewerHeight') {
347
+ let iframeHeight = this.iframeHeight.replace('px', '')
348
+ if (res.data.data && iframeHeight != (res.data.data + 50)) {
349
+ this.iframeHeight = res.data.data + 50 + 'px'
350
+ }
351
+ }
352
+ },
353
+ summaryFun () {
354
+ this.showSummary = !this.showSummary;
355
+ if (this.showSummary) {
356
+ document.getElementById('drawer_content_pre').scrollTop = 0;
357
+ }
358
+ },
359
+ getSummarySuccess () {
360
+ this.$nextTick(() => {
361
+ // if (this.tagIds.length > 0){
362
+ // let intelligentSummary = document.getElementById('intelligentSummary');
363
+ // let preCon = document.querySelector('.pdf_view')
364
+ // if (intelligentSummary){
365
+ // let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
366
+ // if (preCon){
367
+ // preCon.style.height = 'calc(100% - ' + height + 'px)'
368
+ // }
369
+ // console.log('height',height,preCon)
370
+ // }
371
+ // }
372
+ // let intelligentSummary = document.getElementById('intelligentSummary');
373
+ // let height = intelligentSummary.offsetHeight
374
+ // this.pdfStyle.height = 'calc(100% - ' + height + 'px)'
375
+ })
376
+ },
377
+ getTextWatermark () {
378
+ let url = '/knowledge-api/open/knowledge/getPermissionInfo';
379
+ let obj = {
380
+ "knowledgeId": this.knowledgeId,
381
+ "userId": sessionStorage.getItem('_currentUserId'),
382
+ "mainId": sessionStorage.getItem('_mainId'),
383
+ "corpId": sessionStorage.getItem('_corpid')
384
+ }
385
+ this.$http.post(url, obj).then(res => {
386
+ console.log('getTextWatermark', res.data.data)
387
+ if (res.data.data) {
388
+ this.textWatermarkStr = res.data.data.textWatermarkStr;
389
+ this.isDownload = res.data.data.showDownloadBtn;
390
+ }
391
+ })
392
+ },
393
+ downLoad () {
394
+ let url = this.previewOssPath
395
+ if (decodeURIComponent(url) != url) {
396
+ url = decodeURIComponent(url)
397
+ }
398
+ const fileType = url.substring(url.lastIndexOf('.'));
399
+ this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
400
+ headers: {
401
+ "Content-Type": "application/json",
402
+ }
403
+ }).then(res => {
404
+ console.log('downLoad 341', res)
405
+ if (res.data|| res.bodyText) {
406
+ if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
407
+ this.copy = res.data
408
+ if (isMobile()) {
409
+ setTimeout(() =>{
410
+ const range = document.createRange();
411
+ range.selectNode(document.getElementById('text'));
412
+ const selection = window.getSelection();
413
+ //移除之前选中内容
414
+ if (selection.rangeCount > 0) selection.removeAllRanges();
415
+ selection.addRange(range);
416
+ document.execCommand('copy');
417
+ selection.removeAllRanges()
418
+ Toast('下载地址已复制,请前往Safari浏览器访问下载');
419
+ this.close()
420
+ },100)
421
+ } else {
422
+ let a = document.createElement('a')
423
+ a.href = res.data
424
+ a.download = (this.title) + fileType
425
+ a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
426
+ }
427
+ return
428
+ } else {
429
+ // setTimeout(() =>{
430
+ // window.open(res.data,'下载', 'noopener')
431
+ // }, 2000)
432
+ // window.open(res.data,'下载', 'noopener')
433
+ if (isMobile()) {
434
+
435
+ const iframe = document.createElement("iframe");
436
+ iframe.setAttribute("hidden", "hidden");
437
+ iframe.onload = () => {
438
+ if (iframe) {
439
+ console.log("iframe onload....")
440
+ iframe.setAttribute('src', 'about:blank');
441
+ }
442
+ };
443
+ document.body.insertBefore(iframe, null);
444
+ iframe.setAttribute("src", res.data );
445
+ } else {
446
+ let a = document.createElement('a')
447
+ a.href = res.data
448
+ a.download = (this.title) + fileType
449
+ a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
450
+ }
451
+ this.close()
452
+ }
453
+ }
454
+ })
455
+ },
456
+ isPcFun () {
457
+ if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
458
+ this.isPc = false
459
+ } else {
460
+ this.isPc = true
461
+ }
462
+ },
463
+ clickFloder() {
464
+ this.$emit('previewClickFloder')
465
+ }
466
+ },
467
+ beforeDestroy () {
468
+ window.removeEventListener('message', this.handleIframeMessage);
469
+ }
470
+ }
471
+ </script>
472
+
473
+ <style lang="less" scoped>
474
+ #drawer_content_pre {
475
+ padding: 20px;
476
+ scroll-behavior: smooth;
477
+
478
+ .mobile_onload_btn {
479
+ position: absolute;
480
+ right: 0;
481
+ bottom: 10%;
482
+ width: 20px;
483
+ height: 60px;
484
+ display: flex;
485
+ align-items: center;
486
+ justify-content: center;
487
+ cursor: pointer;
488
+ border-top-left-radius: 10px;
489
+ border-bottom-left-radius: 10px;
490
+ color: #366aff;
491
+ background: #ffffff;
492
+ border: 1px solid #a1b9ff;
493
+ font-size: 12px;
494
+ border-right: none;
495
+ text-align: center;
496
+ }
497
+
498
+ .pdf_positon {
499
+ width: 100%;
500
+ box-sizing: border-box;
501
+ }
502
+ }
503
+
504
+ .onload_btn {
505
+ width: 76px;
506
+ height: 26px;
507
+ display: flex;
508
+ align-items: center;
509
+ justify-content: center;
510
+ cursor: pointer;
511
+ margin-right: 10px;
512
+ border-radius: 15px;
513
+ color: #366aff;
514
+ background: #ffffff;
515
+ border: 1px solid #a1b9ff;
516
+ box-sizing: border-box;
517
+ }
518
+
519
+ .preview_iframe {
520
+ width: 100%;
521
+ height: 100%;
522
+ box-sizing: border-box;
523
+ background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
524
+ background-position: center;
525
+ background-size: 50px;
526
+ background-repeat: no-repeat;
527
+ }
528
+
529
+ .preview_iframe_kk {
530
+ width: 100%;
531
+ height: 100%;
532
+ }
533
+
534
+
535
+ .preview_iframe_html {
536
+ width: 100%;
537
+ height: 100%;
538
+ overflow-y: scroll;
539
+ text-align: left;
540
+ box-sizing: border-box;
541
+ padding: 16px;
542
+
543
+ /deep/.lake-content {
544
+ margin-left: 10px;
545
+ }
546
+
547
+ /deep/a:link {
548
+ color: #0000ee !important;
549
+ }
550
+
551
+ /deep/a:visited {
552
+ color: #0000ee !important;
553
+ }
554
+
555
+ /deep/a:hover {
556
+ color: #0000ee !important;
557
+ }
558
+
559
+ /deep/a:active {
560
+ color: #0000ee !important;
561
+ }
562
+
563
+ /deep/li:not(.rich-text-li),
564
+ ol:not(.list-paddingleft-2),
565
+ ul:not(.list-paddingleft-2) {
566
+ list-style-type: auto !important;
567
+ }
568
+
569
+ /deep/img {
570
+ width: 100%;
571
+ }
572
+
573
+ /deep/.ne-table {
574
+ width: 100% !important;
575
+ }
576
+ }
577
+
578
+ .footer {
579
+ width: calc(100% - 40px);
580
+ height: 50px;
581
+ display: flex;
582
+ align-items: center;
583
+ justify-content: space-between;
584
+ cursor: pointer;
585
+ padding: 0 20px;
586
+ border-bottom: 1px solid #cccccc;
587
+ }
588
+
589
+ .loading_img {
590
+ display: flex;
591
+ align-items: center;
592
+ justify-content: center;
593
+ width: 100%;
594
+ height: 100%;
595
+ position: absolute;
596
+ top: 0;
597
+ left: 0;
598
+ background: #FFF;
599
+
600
+ img {
601
+ width: 50px;
602
+ height: 50px;
603
+ }
604
+ }
605
+
606
+ .libang_head {
607
+ height: 64px !important;
608
+ }
609
+
610
+ .drawer-header {
611
+ width: 100%;
612
+ height: 50px;
613
+ cursor: pointer;
614
+ padding: 6px 20px;
615
+ border-bottom: 1px solid #cccccc;
616
+ .btn_position {
617
+ position: absolute;
618
+ top: -34px;
619
+ left: 12px;
620
+ }
621
+
622
+ .header-btn {
623
+ display: flex;
624
+ align-items: center;
625
+ justify-content: space-between;
626
+
627
+ .header-right {
628
+ display: flex;
629
+ }
630
+
631
+ .summaryBtn {
632
+ flex: none;
633
+ //width: 95px;
634
+ height: 26px;
635
+ padding: 0 8px;
636
+ background: #ffffff;
637
+ display: flex;
638
+ align-items: center;
639
+ justify-content: center;
640
+ box-sizing: border-box;
641
+ border: 1px solid #a1b9ff;
642
+ border-radius: 15px;
643
+ cursor: pointer;
644
+ color: #366aff;
645
+ margin-right: 10px;
646
+ font-size: 14px;
647
+
648
+ i {
649
+ font-size: 14px;
650
+ margin-right: 5px;
651
+ }
652
+ }
653
+
654
+ .summaryActiveBtn {
655
+ background: #366aff !important;
656
+ color: #ffffff !important;
657
+ }
658
+
659
+ .chat {
660
+ flex: none;
661
+ height: 26px;
662
+ padding: 0 8px;
663
+ background: #ffffff;
664
+ display: flex;
665
+ align-items: center;
666
+ justify-content: center;
667
+ box-sizing: border-box;
668
+ border: 1px solid #a1b9ff;
669
+ border-radius: 15px 0px 15px 15px;
670
+ cursor: pointer;
671
+ color: #366aff;
672
+ margin-right: 10px;
673
+ font-size: 14px;
674
+
675
+ i {
676
+ font-size: 14px;
677
+ margin-right: 5px;
678
+ margin-top: 2px;
679
+ }
680
+ }
681
+
682
+ .chat_active {
683
+ background: #366aff !important;
684
+ color: #FFFFFF !important;
685
+ }
686
+ }
687
+
688
+ .header_title {
689
+ font-size: 14px;
690
+ height: 100%;
691
+ .header_close {
692
+ display: flex;
693
+ align-items: center;
694
+ justify-content: space-between;
695
+ line-height: 26px;
696
+ }
697
+ .header_floder {
698
+ display: flex;
699
+ align-items: center;
700
+ line-height: 26px;
701
+ i {
702
+ margin: 0 5px;
703
+ color: #366aff;
704
+ }
705
+ }
706
+ .header_top {
707
+ height: 100%;
708
+ display: flex;
709
+ align-items: center;
710
+ justify-content: space-between;
711
+ }
712
+ }
713
+ }
714
+
715
+ @media screen and (max-width: 767px) {
716
+
717
+ /* 这里是针对移动设备的css样式设置 */
718
+ /deep/.el-drawer__body {
719
+ height: 100%;
720
+ }
721
+
722
+ #drawer_content_pre {
723
+ overflow: auto;
724
+ height: calc(100% - 50px);
725
+ background: #FFF;
726
+ }
727
+
728
+ .libang_content_pre {
729
+ height: calc(100% - 64px) !important;
730
+ }
731
+ }
732
+
733
+ @media screen and (min-width: 768px) {
734
+
735
+ /* 这里是针对pc设备的css样式设置 */
736
+ /deep/.el-drawer__body {
737
+ height: 100%;
738
+ }
739
+
740
+ #drawer_content_pre {
741
+ overflow: auto;
742
+ height: calc(100% - 50px);
743
+ background: #FFF;
744
+ }
745
+
746
+ .libang_content_pre {
747
+ height: calc(100% - 64px) !important;
748
+ }
749
+ }
750
+
751
+ @media screen and (min-width: 1200px) {
752
+
753
+ /* 这里是针对pc设备的css样式设置 */
754
+ .el-drawer__wrapper {
755
+ width: 55%;
756
+ left: calc(100vw - 55%);
757
+ right: 0;
758
+
759
+ /deep/.pdf-preview-drawer {
760
+ width: 100% !important;
761
+ }
762
+ }
763
+
764
+ /deep/.el-drawer__body {
765
+ height: 100%;
766
+ }
767
+
768
+ #drawer_content_pre {
769
+ overflow: auto;
770
+ height: calc(100% - 50px);
771
+ background: #FFF;
772
+ }
773
+
774
+ .libang_content_pre {
775
+ height: calc(100% - 64px) !important;
776
+ }
777
+ }
778
+ </style>
779
+ <style lang="less">
780
+ .pdf-preview-drawer {
781
+ overflow: visible !important;
782
+ }
783
+ .libang_content_pre {
784
+ .change_scale {
785
+ top: 64px !important;
786
+ }
787
+ .float_intelligentSummary {
788
+ top: 74px !important;
789
+ }
790
+ }
791
+ </style>