askbot-dragon 1.7.81-beta → 1.7.82-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.
@@ -1,147 +1,148 @@
1
-
2
1
  <!-- preview-pdf
3
2
  组件主要负责 知识项目中 文件的预览,携带定位信息参数 tagIds tagId 的会解析文件增加定位功能
4
3
  不携带定位信息的 也是走 kkview项目预览
5
4
  另外增加了在知识项目中预览当前文件的一些功能
6
5
  -->
7
6
  <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
- <div class="drawer-header" :class="(isDownload || (isHasChat && fileType != 'IMAGE')) && isLiBang ? 'has_btn_libang_head' : (isLiBang ? 'libang_head' : (isDownload || (isHasChat && fileType != 'IMAGE') ? 'has_btn_head' : ''))" v-if="!isPc">
12
- <div class="header_title">
13
- <template v-if="isDownload || (isHasChat && fileType != 'IMAGE')">
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 && fileType != 'IMAGE'">
20
- <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
21
- <span>{{ $t('dragonCommon.smartSummary') }}</span>
22
- </div>
23
- <template v-if="isHasChat && fileType != 'IMAGE'">
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') }}
7
+ <el-drawer title="" :visible.sync="drawer" :with-header="false" :append-to-body="true" :destroy-on-close="true"
8
+ :modal="false" :direction="previewShowPopup ? 'btt' : 'rtl'" :size="previewShowPopup ? '90%' : '65%'"
9
+ custom-class="pdf-preview-drawer" v-if="drawer">
10
+ <div class="drawer-header"
11
+ :class="(isDownload || (isHasChat && fileType != 'IMAGE')) && isLiBang ? 'has_btn_libang_head' : (isLiBang ? 'libang_head' : (isDownload || (isHasChat && fileType != 'IMAGE') ? 'has_btn_head' : ''))"
12
+ v-if="!isPc">
13
+ <div class="header_title">
14
+ <template v-if="isDownload || (isHasChat && fileType != 'IMAGE')">
15
+ <div class="top-header">
16
+ <div class="header-btn">
17
+ <div class="onload_btn" v-if="isDownload" @click="downLoad">
18
+ {{ $t('dragonCommon.download') }}
19
+ </div>
20
+ <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
21
+ v-if="isHasChat && fileType != 'IMAGE'">
22
+ <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
23
+ <span>{{ $t('dragonCommon.smartSummary') }}</span>
24
+ </div>
25
+ <template v-if="isHasChat && fileType != 'IMAGE'">
26
+ <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
27
+ <i class="iconfont guoran-wendapingjia"></i>
28
+ {{ $t('dragonCommon.chat') }}
29
+ </div>
30
+ <div class="chat chat_active" @click="previewToDialog(false)" v-else>
31
+ <i class="iconfont guoran-wendapingjia"></i>
32
+ {{ $t('dragonCommon.chat') }}
33
+ </div>
34
+ </template>
35
+ </div>
36
+ <section @click="close">
37
+ <i class="iconfont guoran-shanchu"></i>
38
+ </section>
39
+ </div>
40
+ <span class="title_left">
41
+ {{ title ? title : $t('dragonCommon.viewDetails') }}
42
+ </span>
43
+ </template>
44
+ <div class="header_close" v-else>
45
+ <span class="title_left">
46
+ {{ title ? title : '查看详情' }}
47
+ </span>
48
+ <section @click="close">
49
+ <i class="iconfont guoran-shanchu"></i>
50
+ </section>
31
51
  </div>
32
- </template>
52
+ <p v-if="folderName && isLiBang" class="header_floder" @click="clickFloder">
53
+ <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
54
+ {{ folderName }}
55
+ <i v-if="folderUrl" class="iconfont guoran-tongyichicun-dianjichakantuli"></i>
56
+ </p>
33
57
  </div>
34
- <section @click="close">
35
- <i class="iconfont guoran-shanchu"></i>
36
- </section>
37
- </div>
38
- <span class="title_left">
39
- {{ title ? title : $t('dragonCommon.viewDetails') }}
40
- </span>
41
- </template>
42
- <div class="header_close" v-else>
43
- <span class="title_left">
44
- {{ title ? title : '查看详情' }}
45
- </span>
46
- <section @click="close">
47
- <i class="iconfont guoran-shanchu"></i>
48
- </section>
49
58
  </div>
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>
56
- </div>
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') }}
59
+ <div class="drawer-header" :class="isLiBang && folderName ? 'libang_head' : ''" v-else>
60
+ <div class="header_title">
61
+ <div :class="isLiBang && folderName ? 'header_close' : 'header_top'">
62
+ <span class="title_left">
63
+ {{ title ? title : $t('dragonCommon.viewDetails') }}
64
+ </span>
65
+ <div class="header-btn">
66
+ <div class="onload_btn" v-if="isDownload" @click="downLoad">
67
+ {{ $t('dragonCommon.download') }}
68
+ </div>
69
+ <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
70
+ v-if="isHasChat && fileType != 'IMAGE'">
71
+ <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
72
+ <span>{{ $t('dragonCommon.smartSummary') }}</span>
73
+ </div>
74
+ <template v-if="isHasChat && fileType != 'IMAGE'">
75
+ <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
76
+ <i class="iconfont guoran-wendapingjia"></i>
77
+ {{ $t('dragonCommon.chat') }}
78
+ </div>
79
+ <div class="chat chat_active" @click="previewToDialog(false)" v-else>
80
+ <i class="iconfont guoran-wendapingjia"></i>
81
+ {{ $t('dragonCommon.chat') }}
82
+ </div>
83
+ </template>
84
+ <section @click="close">
85
+ <i class="iconfont guoran-shanchu"></i>
86
+ </section>
87
+ </div>
88
+ </div>
89
+ <p v-if="folderName && isLiBang" class="header_floder" @click="clickFloder">
90
+ <i class="iconfont guoran-tongyichicun-wenjianjia-zhankaizhuangtai--folderOpen"></i>
91
+ {{ folderName }}
92
+ <i v-if="folderUrl" class="iconfont guoran-tongyichicun-dianjichakantuli"></i>
93
+ </p>
66
94
  </div>
67
- <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
68
- v-if="isHasChat && fileType != 'IMAGE'">
69
- <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
70
- <span>{{ $t('dragonCommon.smartSummary') }}</span>
95
+ </div>
96
+ <div id="drawer_content_pre"
97
+ :class="(isDownload || (isHasChat && fileType != 'IMAGE')) && !isPc && isLiBang && folderName ? 'has_btn_libang_content_pre' : (isLiBang && folderName ? 'libang_content_pre' : '')">
98
+ <intelligent-summary v-show="showSummary && (isHasChat && fileType != 'IMAGE')" :tagIds="tagIds"
99
+ :knowledgeId="knowledgeId" @closeSummary="closeSummary" @recommendQues="recommendQues"
100
+ @getSummarySuccess="getSummarySuccess"></intelligent-summary>
101
+ <div class="pdf_positon" :style="pdfStyle"
102
+ v-if="tagIds && tagIds.length != 0 && drawer && newVersion === false && newFileType !== 'PPT'">
103
+ <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :textWatermarkStr="textWatermarkStr">
104
+ </pdfPosition>
71
105
  </div>
72
- <template v-if="isHasChat && fileType != 'IMAGE'">
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>
106
+ <new-position-preview ref="newPositionPreview"
107
+ v-else-if="tagIds && tagIds.length != 0 && newVersion && newFileType !== 'PPT'"
108
+ :knowledgeId="knowledgeId" :tagIds="tagIds" :url="previewHref"></new-position-preview>
109
+ <template v-else>
110
+ <div v-if="fileType == 'VIDEO'" style="width: 100%;height: 100%">
111
+ <video :src="url" controls width="100%;" height="98%"></video>
112
+ </div>
113
+ <div v-else-if="fileType == 'HTML'" style="width: 100%;">
114
+ <div class="preview_iframe_html" style="text-align:left" v-html="fileText"></div>
115
+ </div>
116
+ <template v-else-if="url.includes('https://www') || url.includes('http://www')">
117
+ <iframe class="preview_iframe" :src="url" width="100%" height="100%" scrolling="100%"
118
+ frameborder="no" border="0"></iframe>
119
+ </template>
120
+ <template v-else>
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"
130
+ @prev-click="prev" @next-click="next" layout="slot, prev, pager, next" :page-size="1"
131
+ :total="pageChunkData.length">
132
+ <span class="total-class">答案由{{ pageChunkData.length }}段内容生成</span>
133
+ </el-pagination>
134
+ </div>
135
+ </template>
136
+ </template>
81
137
  </template>
82
- <section @click="close">
83
- <i class="iconfont guoran-shanchu"></i>
84
- </section>
85
- </div>
86
138
  </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 && fileType != 'IMAGE')) && !isPc && isLiBang && folderName ? 'has_btn_libang_content_pre' : (isLiBang && folderName ? 'libang_content_pre' : '')">
95
- <intelligent-summary v-show="showSummary && (isHasChat && fileType != 'IMAGE')" :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>
109
- <template v-else>
110
- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: 100%">
111
- <video :src="url" controls width="100%;" height="98%"></video>
139
+ <div class="loading_img" v-show="loading">
140
+ <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
112
141
  </div>
113
- <div v-else-if="fileType == 'HTML'" style="width: 100%;">
114
- <div class="preview_iframe_html" style="text-align:left" v-html="fileText"></div>
142
+ <div id="text">
143
+ {{ copy }}
115
144
  </div>
116
- <template v-else-if="url.includes('https://www') || url.includes('http://www')">
117
- <iframe class="preview_iframe" :src="url" width="100%" height="100%" scrolling="100%" frameborder="no"
118
- border="0"></iframe>
119
- </template>
120
- <template v-else>
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>
135
- </template>
136
- </template>
137
- </div>
138
- <div class="loading_img" v-show="loading">
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>
144
- </el-drawer>
145
+ </el-drawer>
145
146
  </template>
146
147
 
147
148
  <script>
@@ -238,8 +239,8 @@ export default {
238
239
  userId: {
239
240
  type: String,
240
241
  default: ''
241
- },
242
- },
242
+ }
243
+ },
243
244
  components: {
244
245
  NewPositionPreview,
245
246
  IntelligentSummary,
@@ -306,12 +307,17 @@ export default {
306
307
  url = this.watermark.textWatermarkValue ? (url += '&textWatermarkValue=' + this.watermark.textWatermarkValue) : url
307
308
  url = this.watermark.visitorWatermarkValue ? (url += '&visitorWatermarkValue=' + this.watermark.visitorWatermarkValue) : url
308
309
  }
310
+ let mainId = sessionStorage.getItem('_mainId')
311
+ let userId = sessionStorage.getItem('_currentUserId')
312
+ let test = process.env.VUE_APP_ENV === 'production'
313
+ url += '&mainId=' + mainId+ '&userId=' + userId + '&test=' + test
309
314
  console.log('textWatermarkStr 216', this.textWatermarkStr)
310
315
  if (this.textWatermarkStr) {
311
316
  url += '&textWatermarkValue=' + this.textWatermarkStr
312
317
  }
313
- return url
314
318
  }
319
+ return url
320
+
315
321
  }
316
322
  // fileType() {
317
323
  // const fileType = this.url.substring(this.url.lastIndexOf('.'));
@@ -334,291 +340,279 @@ export default {
334
340
  },
335
341
  loadIframe() {
336
342
 
337
- if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0 && this.newFileType !== 'PPT')) {
338
- this.loading = false
339
- } else {
340
- let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
341
- if (iframe) {
342
- iframe.onload = () => {
343
- this.loading = false;
344
- document.getElementById('drawer_content_pre').style.backgroundImage = 'none'
345
- window.postMessage({
346
- type: "wx_bind",
347
- data: {
348
- mainId: sessionStorage.getItem('_mainId'),
349
- userId: sessionStorage.getItem('_currentUserId'),
350
- test: process.env.VUE_APP_ENV !== 'production'
351
- }
352
- }, '*')}
353
- }
354
- // let time = setInterval(() =>{
355
- //
356
- // if(iframe) {
357
- // this.loading = false
358
- // clearInterval(time)
359
- // }
360
- // }, 500)
361
- }
362
- },
363
- getBolb() {
364
- this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false', {
365
- fileInOssPath: this.url,
366
- templateId: ''
367
- }).then(res => {
368
- if (res.data.code == 0) {
369
- this.fileText = res.data.data
370
- this.loading = false
371
- }
372
- })
373
- },
374
- previewToDialog(flag) {
375
- this.$emit('previewToDialog', flag)
376
- },
377
- closeSummary() {
378
- this.showSummary = false;
379
- },
380
- recommendQues(item, knowledgeId) {
381
- console.log('recommendQues', item, knowledgeId);
382
- this.$emit('recommendQues', item, knowledgeId)
383
- },
384
- handleIframeMessage(res) {
385
- if (res.data.type == 'getViewerHeight') {
386
- let iframeHeight = this.iframeHeight.replace('px', '')
387
- if (res.data.data && iframeHeight != (res.data.data + 50)) {
388
- this.iframeHeight = res.data.data + 50 + 'px'
389
- }
390
- }
391
- if (res.data.type == 'getViewPage' && res.data.data) {
392
- this.numberPage = Number(res.data.data);
393
- if (this.pageChunkData.length > 0) {
394
- this.scrollPPTPage(this.pageChunkData[0])
395
- }
396
- }
397
- if (res.data.type == 'getViewerHeight' || res.data.type == 'getViewPage') {
398
- if (this.pageChunkData.length > 0) {
399
- this.scrollPPTPage(this.pageChunkData[0])
400
- }
401
- }
402
- },
403
- summaryFun() {
404
- this.showSummary = !this.showSummary;
405
- if (this.showSummary) {
406
- document.getElementById('drawer_content_pre').scrollTop = 0;
407
- }
408
- },
409
- getSummarySuccess() {
410
- this.$nextTick(() => {
411
- // if (this.tagIds.length > 0){
412
- // let intelligentSummary = document.getElementById('intelligentSummary');
413
- // let preCon = document.querySelector('.pdf_view')
414
- // if (intelligentSummary){
415
- // let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
416
- // if (preCon){
417
- // preCon.style.height = 'calc(100% - ' + height + 'px)'
418
- // }
419
- // console.log('height',height,preCon)
420
- // }
421
- // }
422
- // let intelligentSummary = document.getElementById('intelligentSummary');
423
- // let height = intelligentSummary.offsetHeight
424
- // this.pdfStyle.height = 'calc(100% - ' + height + 'px)'
425
- })
426
- },
427
- getTextWatermark() {
428
- let url = '/knowledge-api/open/knowledge/getPermissionInfo';
429
- let obj = {
430
- "knowledgeId": this.knowledgeId,
431
- "userId": sessionStorage.getItem('_currentUserId'),
432
- "mainId": sessionStorage.getItem('_mainId'),
433
- "corpId": sessionStorage.getItem('_corpid')
434
- }
435
- this.$http.post(url, obj).then(res => {
436
- console.log('getTextWatermark', res.data.data)
437
- if (res.data.data) {
438
- this.textWatermarkStr = res.data.data.textWatermarkStr;
439
- this.isDownload = res.data.data.showDownloadBtn;
440
- }
441
- })
442
- },
443
- downLoad() {
444
- // if (this.formKnowledgeManagement) {
445
- // this.$emit('downLoad', this.previewOssPath);
446
- // return
447
- // }
448
- let url = this.previewOssPath
449
- if (decodeURIComponent(url) != url) {
450
- url = decodeURIComponent(url)
451
- }
452
- const fileType = url.substring(url.lastIndexOf('.'));
453
- this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
454
- headers: {
455
- "Content-Type": "application/json",
456
- }
457
- }).then(res => {
458
- console.log('downLoad 341', res)
459
- if (res.data || res.bodyText) {
460
- if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
461
- this.copy = res.data
462
- if (isMobile()) {
463
- setTimeout(() => {
464
- const range = document.createRange();
465
- range.selectNode(document.getElementById('text'));
466
- const selection = window.getSelection();
467
- //移除之前选中内容
468
- if (selection.rangeCount > 0) selection.removeAllRanges();
469
- selection.addRange(range);
470
- document.execCommand('copy');
471
- selection.removeAllRanges()
472
- Toast(this.$t('dragonCommon.Safaridownload'));
473
- this.close()
474
- }, 100)
475
- } else {
476
- let a = document.createElement('a')
477
- a.href = res.data
478
- a.download = (this.title) + fileType
479
- a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
480
- }
481
- return
343
+ if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0 && this.newFileType !== 'PPT')) {
344
+ this.loading = false
482
345
  } else {
483
- // setTimeout(() =>{
484
- // window.open(res.data,'下载', 'noopener')
485
- // }, 2000)
486
- // window.open(res.data,'下载', 'noopener')
487
- if (isMobile()) {
488
-
489
- const iframe = document.createElement("iframe");
490
- iframe.setAttribute("hidden", "hidden");
491
- iframe.onload = () => {
492
- if (iframe) {
493
- console.log("iframe onload....")
494
- iframe.setAttribute('src', 'about:blank');
495
- }
496
- };
497
- document.body.insertBefore(iframe, null);
498
- iframe.setAttribute("src", res.data);
499
- } else {
500
- let a = document.createElement('a')
501
- a.href = res.data
502
- a.download = (this.title) + fileType
503
- a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
504
- }
505
- this.close()
346
+ let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
347
+ if (iframe) {
348
+ iframe.onload = () => {
349
+ this.loading = false;
350
+ document.getElementById('drawer_content_pre').style.backgroundImage = 'none'
351
+ }
352
+ }
353
+ // let time = setInterval(() =>{
354
+ //
355
+ // if(iframe) {
356
+ // this.loading = false
357
+ // clearInterval(time)
358
+ // }
359
+ // }, 500)
506
360
  }
507
- }
508
- })
509
- },
510
- isPcFun() {
511
- if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
512
- this.isPc = false
513
- } else {
514
- this.isPc = true
515
- }
516
- },
517
- clickFloder() {
518
- this.$emit('previewClickFloder')
519
- },
520
- getOssPath(url) {
521
- let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate';
522
- let type = this.getFileType(url)
523
- this.newFileType = type;
524
- if (type === 'VIDEO' || type === 'PDF' || type === 'EXCEL' || type === 'TXT' || type === 'DOC') {
525
- httpUrl += '?needEncrypt=false'
526
- } else {
527
- httpUrl += '?needEncrypt=true'
528
- }
529
- this.$http.post(httpUrl, {
530
- "fileInOssPath": url
531
- }).then(res => {
532
- console.log('getOssPath', res)
533
- if (res.data.code == '0') {
534
- this.previewHref = res.data.data;
535
- }
536
- })
537
- },
538
- getFileType(url) {
539
- let index = url.lastIndexOf('?')
540
- let newFileInOssPath = url.substring(0, url.indexOf("?"))
541
- if (index == -1) {
542
- newFileInOssPath = url
543
- }
544
- const fileType = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'));
545
- if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc') {
546
- return 'VIDEO'
547
- } else if (fileType === '.html') {
548
- return 'HTML'
549
- } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg' || fileType === '.PNG' || fileType === '.JPG' || fileType === '.JPEG') {
550
- return 'IMAGE'
551
- } else if (fileType === '.docx' || fileType === '.doc') {
552
- return 'DOC'
553
- } else if (fileType === '.ppt' || fileType === '.pptx') {
554
- return 'PPT'
555
- } else if (fileType === '.pdf') {
556
- return 'PDF'
557
- } else if (fileType === '.txt') {
558
- return 'TXT'
559
- } else {
560
- return 'OTHER'
561
- }
562
- },
563
- //判断是否使用新定位组件
564
- getLocationInfo() {
565
- this.newVersion = "";
566
- this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + this.tagIds.join(',')).then(res => {
567
- console.log('getLocationInfo', res)
568
- this.pageChunkData = [];
569
- if (res.data.code == 0) {
570
- if (res.data.data && res.data.data.length > 0 && res.data.data[0].extractVersion == 'v3') {
571
- this.newVersion = true;
572
- if (this.newFileType !== 'PPT') {
573
- this.loading = false;
574
- }
575
- for (let i = 0; i < res.data.data.length; i++) {
576
- if (res.data.data[i].paragraphChunkInfo && res.data.data[i].paragraphChunkInfo.pageChunkData) {
577
- this.pageChunkData.push(res.data.data[i].paragraphChunkInfo.pageChunkData.page_number)
361
+ },
362
+ getBolb() {
363
+ this.$http.post('/knowledge-api/knowledge/htmlTextDeal?onlyText=false', {
364
+ fileInOssPath: this.url,
365
+ templateId: ''
366
+ }).then(res => {
367
+ if (res.data.code == 0) {
368
+ this.fileText = res.data.data
369
+ this.loading = false
370
+ }
371
+ })
372
+ },
373
+ previewToDialog(flag) {
374
+ this.$emit('previewToDialog', flag)
375
+ },
376
+ closeSummary() {
377
+ this.showSummary = false;
378
+ },
379
+ recommendQues(item, knowledgeId) {
380
+ console.log('recommendQues', item, knowledgeId);
381
+ this.$emit('recommendQues', item, knowledgeId)
382
+ },
383
+ handleIframeMessage(res) {
384
+ if (res.data.type == 'getViewerHeight') {
385
+ let iframeHeight = this.iframeHeight.replace('px', '')
386
+ if (res.data.data && iframeHeight != (res.data.data + 50)) {
387
+ this.iframeHeight = res.data.data + 50 + 'px'
578
388
  }
579
- }
580
- if (this.pageChunkData.length > 1) {
581
- let iframe = document.getElementsByClassName('preview_iframe_kk')
582
- if (iframe && iframe.length > 0) {
583
- iframe[0].style.paddingBottom = '50px'
389
+ }
390
+ if (res.data.type == 'getViewPage' && res.data.data) {
391
+ this.numberPage = Number(res.data.data);
392
+ if (this.pageChunkData.length > 0) {
393
+ this.scrollPPTPage(this.pageChunkData[0])
394
+ }
395
+ }
396
+ if (res.data.type == 'getViewerHeight' || res.data.type == 'getViewPage') {
397
+ if (this.pageChunkData.length > 0) {
398
+ this.scrollPPTPage(this.pageChunkData[0])
399
+ }
400
+ }
401
+ },
402
+ summaryFun() {
403
+ this.showSummary = !this.showSummary;
404
+ if (this.showSummary) {
405
+ document.getElementById('drawer_content_pre').scrollTop = 0;
406
+ }
407
+ },
408
+ getSummarySuccess() {
409
+ this.$nextTick(() => {
410
+ // if (this.tagIds.length > 0){
411
+ // let intelligentSummary = document.getElementById('intelligentSummary');
412
+ // let preCon = document.querySelector('.pdf_view')
413
+ // if (intelligentSummary){
414
+ // let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
415
+ // if (preCon){
416
+ // preCon.style.height = 'calc(100% - ' + height + 'px)'
417
+ // }
418
+ // console.log('height',height,preCon)
419
+ // }
420
+ // }
421
+ // let intelligentSummary = document.getElementById('intelligentSummary');
422
+ // let height = intelligentSummary.offsetHeight
423
+ // this.pdfStyle.height = 'calc(100% - ' + height + 'px)'
424
+ })
425
+ },
426
+ getTextWatermark() {
427
+ let url = '/knowledge-api/open/knowledge/getPermissionInfo';
428
+ let obj = {
429
+ "knowledgeId": this.knowledgeId,
430
+ "userId": sessionStorage.getItem('_currentUserId'),
431
+ "mainId": sessionStorage.getItem('_mainId'),
432
+ "corpId": sessionStorage.getItem('_corpid')
433
+ }
434
+ this.$http.post(url, obj).then(res => {
435
+ console.log('getTextWatermark', res.data.data)
436
+ if (res.data.data) {
437
+ this.textWatermarkStr = res.data.data.textWatermarkStr;
438
+ this.isDownload = res.data.data.showDownloadBtn;
584
439
  }
585
- }
440
+ })
441
+ },
442
+ downLoad() {
443
+ let url = this.previewOssPath
444
+ if (decodeURIComponent(url) != url) {
445
+ url = decodeURIComponent(url)
446
+ }
447
+ const fileType = url.substring(url.lastIndexOf('.'));
448
+ this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
449
+ headers: {
450
+ "Content-Type": "application/json",
451
+ }
452
+ }).then(res => {
453
+ console.log('downLoad 341', res)
454
+ if (res.data || res.bodyText) {
455
+ if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
456
+ this.copy = res.data
457
+ if (isMobile()) {
458
+ setTimeout(() => {
459
+ const range = document.createRange();
460
+ range.selectNode(document.getElementById('text'));
461
+ const selection = window.getSelection();
462
+ //移除之前选中内容
463
+ if (selection.rangeCount > 0) selection.removeAllRanges();
464
+ selection.addRange(range);
465
+ document.execCommand('copy');
466
+ selection.removeAllRanges()
467
+ Toast(this.$t('dragonCommon.Safaridownload'));
468
+ this.close()
469
+ }, 100)
470
+ } else {
471
+ let a = document.createElement('a')
472
+ a.href = res.data
473
+ a.download = (this.title) + fileType
474
+ a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
475
+ }
476
+ return
477
+ } else {
478
+ // setTimeout(() =>{
479
+ // window.open(res.data,'下载', 'noopener')
480
+ // }, 2000)
481
+ // window.open(res.data,'下载', 'noopener')
482
+ if (isMobile()) {
483
+ const iframe = document.createElement("iframe");
484
+ iframe.setAttribute("hidden", "hidden");
485
+ iframe.onload = () => {
486
+ if (iframe) {
487
+ console.log("iframe onload....")
488
+ iframe.setAttribute('src', 'about:blank');
489
+ }
490
+ };
491
+ document.body.insertBefore(iframe, null);
492
+ iframe.setAttribute("src", res.data);
493
+ } else {
494
+ let a = document.createElement('a')
495
+ a.href = res.data
496
+ a.download = (this.title) + fileType
497
+ a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
498
+ }
499
+ this.close()
500
+ }
501
+ }
502
+ })
503
+ },
504
+ isPcFun() {
505
+ if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
506
+ this.isPc = false
586
507
  } else {
587
- this.newVersion = false;
508
+ this.isPc = true
509
+ }
510
+ },
511
+ clickFloder() {
512
+ this.$emit('previewClickFloder')
513
+ },
514
+ getOssPath(url) {
515
+ let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate';
516
+ let type = this.getFileType(url)
517
+ this.newFileType = type;
518
+ if (type === 'VIDEO' || type === 'PDF' || type === 'EXCEL' || type === 'TXT' || type === 'DOC') {
519
+ httpUrl += '?needEncrypt=false'
520
+ } else {
521
+ httpUrl += '?needEncrypt=true'
522
+ }
523
+ this.$http.post(httpUrl, {
524
+ "fileInOssPath": url
525
+ }).then(res => {
526
+ console.log('getOssPath', res)
527
+ if (res.data.code == '0') {
528
+ this.previewHref = res.data.data;
529
+ }
530
+ })
531
+ },
532
+ getFileType(url) {
533
+ let index = url.lastIndexOf('?')
534
+ let newFileInOssPath = url.substring(0, url.indexOf("?"))
535
+ if (index == -1) {
536
+ newFileInOssPath = url
537
+ }
538
+ const fileType = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'));
539
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc') {
540
+ return 'VIDEO'
541
+ } else if (fileType === '.html') {
542
+ return 'HTML'
543
+ } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg' || fileType === '.PNG' || fileType === '.JPG' || fileType === '.JPEG') {
544
+ return 'IMAGE'
545
+ } else if (fileType === '.docx' || fileType === '.doc') {
546
+ return 'DOC'
547
+ } else if (fileType === '.ppt' || fileType === '.pptx') {
548
+ return 'PPT'
549
+ } else if (fileType === '.pdf') {
550
+ return 'PDF'
551
+ } else if (fileType === '.txt') {
552
+ return 'TXT'
553
+ } else {
554
+ return 'OTHER'
555
+ }
556
+ },
557
+ //判断是否使用新定位组件
558
+ getLocationInfo() {
559
+ this.newVersion = "";
560
+ this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + this.tagIds.join(',')).then(res => {
561
+ console.log('getLocationInfo', res)
562
+ this.pageChunkData = [];
563
+ if (res.data.code == 0) {
564
+ if (res.data.data && res.data.data.length > 0 && res.data.data[0].extractVersion == 'v3') {
565
+ this.newVersion = true;
566
+ if (this.newFileType !== 'PPT') {
567
+ this.loading = false;
568
+ }
569
+ for (let i = 0; i < res.data.data.length; i++) {
570
+ if (res.data.data[i].paragraphChunkInfo && res.data.data[i].paragraphChunkInfo.pageChunkData) {
571
+ this.pageChunkData.push(res.data.data[i].paragraphChunkInfo.pageChunkData.page_number)
572
+ }
573
+ }
574
+ if (this.pageChunkData.length > 1) {
575
+ let iframe = document.getElementsByClassName('preview_iframe_kk')
576
+ if (iframe && iframe.length > 0) {
577
+ iframe[0].style.paddingBottom = '50px'
578
+ }
579
+ }
580
+ } else {
581
+ this.newVersion = false;
582
+ }
583
+ }
584
+ })
585
+ },
586
+ currentChange(value) {
587
+ this.currentPage = value - 1;
588
+ this.scrollPPTPage()
589
+ },
590
+ prev() {
591
+ if (this.currentPage == 0) {
592
+ return
593
+ }
594
+ this.currentPage--;
595
+ this.scrollPPTPage()
596
+ },
597
+ next() {
598
+ if (this.currentPage === (this.pageChunkData.length - 1)) {
599
+ return;
600
+ }
601
+ this.currentPage++;
602
+ this.scrollPPTPage()
603
+ },
604
+ scrollPPTPage() {
605
+ if (this.numberPage > 0) {
606
+ let pageNumber = this.pageChunkData[this.currentPage];
607
+ let height = Math.floor(Number(this.iframeHeight.replace('px', "")));
608
+ let pageHeight = Math.floor(height / this.numberPage);
609
+ let scrollHeight = (pageNumber - 1) * pageHeight;
610
+ let dom = document.getElementById('drawer_content_pre');
611
+ if (dom) {
612
+ dom.scrollTo(0, scrollHeight)
613
+ }
588
614
  }
589
- }
590
- })
591
- },
592
- currentChange(value) {
593
- this.currentPage = value - 1;
594
- this.scrollPPTPage()
595
- },
596
- prev() {
597
- if (this.currentPage == 0) {
598
- return
599
- }
600
- this.currentPage--;
601
- this.scrollPPTPage()
602
- },
603
- next() {
604
- if (this.currentPage === (this.pageChunkData.length - 1)) {
605
- return;
606
- }
607
- this.currentPage++;
608
- this.scrollPPTPage()
609
- },
610
- scrollPPTPage() {
611
- if (this.numberPage > 0) {
612
- let pageNumber = this.pageChunkData[this.currentPage];
613
- let height = Math.floor(Number(this.iframeHeight.replace('px', "")));
614
- let pageHeight = Math.floor(height / this.numberPage);
615
- let scrollHeight = (pageNumber - 1) * pageHeight;
616
- let dom = document.getElementById('drawer_content_pre');
617
- if (dom) {
618
- dom.scrollTo(0, scrollHeight)
619
- }
620
615
  }
621
- }
622
616
  },
623
617
  beforeDestroy() {
624
618
  window.removeEventListener('message', this.handleIframeMessage);
@@ -628,287 +622,294 @@ export default {
628
622
 
629
623
  <style lang="less" scoped>
630
624
  #drawer_content_pre {
631
- padding: 20px;
632
- scroll-behavior: smooth;
625
+ padding: 20px;
626
+ scroll-behavior: smooth;
633
627
 
634
- .mobile_onload_btn {
635
- position: absolute;
636
- right: 0;
637
- bottom: 10%;
638
- width: 20px;
639
- height: 60px;
628
+ .mobile_onload_btn {
629
+ position: absolute;
630
+ right: 0;
631
+ bottom: 10%;
632
+ width: 20px;
633
+ height: 60px;
634
+ display: flex;
635
+ align-items: center;
636
+ justify-content: center;
637
+ cursor: pointer;
638
+ border-top-left-radius: 10px;
639
+ border-bottom-left-radius: 10px;
640
+ color: #366aff;
641
+ background: #ffffff;
642
+ border: 1px solid #a1b9ff;
643
+ font-size: 12px;
644
+ border-right: none;
645
+ text-align: center;
646
+ }
647
+
648
+ .pdf_positon {
649
+ width: 100%;
650
+ box-sizing: border-box;
651
+ }
652
+ }
653
+
654
+ .onload_btn {
655
+ width: 76px;
656
+ height: 26px;
640
657
  display: flex;
641
658
  align-items: center;
642
659
  justify-content: center;
643
660
  cursor: pointer;
644
- border-top-left-radius: 10px;
645
- border-bottom-left-radius: 10px;
661
+ margin-right: 10px;
662
+ border-radius: 15px;
646
663
  color: #366aff;
647
664
  background: #ffffff;
648
665
  border: 1px solid #a1b9ff;
649
- font-size: 12px;
650
- border-right: none;
651
- text-align: center;
652
- }
653
-
654
- .pdf_positon {
655
- width: 100%;
656
666
  box-sizing: border-box;
657
- }
658
- }
659
-
660
- .onload_btn {
661
- width: 76px;
662
- height: 26px;
663
- display: flex;
664
- align-items: center;
665
- justify-content: center;
666
- cursor: pointer;
667
- margin-right: 10px;
668
- border-radius: 15px;
669
- color: #366aff;
670
- background: #ffffff;
671
- border: 1px solid #a1b9ff;
672
- box-sizing: border-box;
673
667
  }
674
668
 
675
669
  .preview_iframe {
676
- width: 100%;
677
- height: 100%;
678
- box-sizing: border-box;
679
- background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
680
- background-position: center;
681
- background-size: 50px;
682
- background-repeat: no-repeat;
670
+ width: 100%;
671
+ height: 100%;
672
+ box-sizing: border-box;
673
+ background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
674
+ background-position: center;
675
+ background-size: 50px;
676
+ background-repeat: no-repeat;
683
677
  }
684
678
 
685
679
  .preview_iframe_kk {
686
- width: 100%;
687
- height: 100%;
680
+ width: 100%;
681
+ height: 100%;
688
682
  }
683
+
689
684
  .btn_footer {
690
- width: 100%;
691
- height: 60px;
692
- display: flex;
693
- align-items: center;
694
- justify-content: space-around;
695
- position: absolute;
696
- bottom: 0px;
697
- left: 0;
698
- z-index: 999;
699
- background: #ffffff;
700
-
701
- .prev,
702
- .next {
703
- width: 35%;
704
- height: 40px;
685
+ width: 100%;
686
+ height: 60px;
705
687
  display: flex;
706
688
  align-items: center;
707
- justify-content: center;
708
- border-radius: 50px;
709
- cursor: pointer;
710
- }
689
+ justify-content: space-around;
690
+ position: absolute;
691
+ bottom: 0px;
692
+ left: 0;
693
+ z-index: 999;
694
+ background: #ffffff;
711
695
 
712
- .prev {
713
- background: #F2F5FA;
714
- color: #000;
715
- }
696
+ .prev,
697
+ .next {
698
+ width: 35%;
699
+ height: 40px;
700
+ display: flex;
701
+ align-items: center;
702
+ justify-content: center;
703
+ border-radius: 50px;
704
+ cursor: pointer;
705
+ }
716
706
 
717
- .next {
718
- background: #366aff;
719
- color: #ffffff;
720
- }
707
+ .prev {
708
+ background: #F2F5FA;
709
+ color: #000;
710
+ }
711
+
712
+ .next {
713
+ background: #366aff;
714
+ color: #ffffff;
715
+ }
721
716
  }
717
+
722
718
  #pagination {
723
- .total-class {
724
- margin-right: 13px;
725
- font-weight: 400;
726
- }
719
+ .total-class {
720
+ margin-right: 13px;
721
+ font-weight: 400;
722
+ }
727
723
 
728
- position: absolute;
729
- bottom: 0px;
730
- right: 0;
731
- width: 100%;
732
- display: flex;
733
- align-items: center;
734
- justify-content: center;
735
- height: 50px;
736
- background-color: white;
737
- box-shadow: 0px 0px 18px 0px rgba(29, 55, 129, 0.07);
738
- border-radius: 5px;
739
- z-index: 1000;
724
+ position: absolute;
725
+ bottom: 0px;
726
+ right: 0;
727
+ width: 100%;
728
+ display: flex;
729
+ align-items: center;
730
+ justify-content: center;
731
+ height: 50px;
732
+ background-color: white;
733
+ box-shadow: 0px 0px 18px 0px rgba(29, 55, 129, 0.07);
734
+ border-radius: 5px;
735
+ z-index: 1000;
740
736
 
741
737
 
742
738
 
743
- /deep/.el-pagination {
744
- margin-right: 110px;
745
- }
739
+ /deep/.el-pagination {
740
+ margin-right: 110px;
741
+ }
746
742
 
747
- /deep/.el-pager {
748
- background: #EDF0F6;
749
- border-radius: 15px;
750
- }
743
+ /deep/.el-pager {
744
+ background: #EDF0F6;
745
+ border-radius: 15px;
746
+ }
751
747
 
752
- /deep/.el-pagination.is-background .btn-next {
753
- width: 30px;
754
- height: 30px;
755
- background: #EDF0F6;
756
- border-radius: 50%;
757
- }
748
+ /deep/.el-pagination.is-background .btn-next {
749
+ width: 30px;
750
+ height: 30px;
751
+ background: #EDF0F6;
752
+ border-radius: 50%;
753
+ }
758
754
 
759
- /deep/.el-pagination .btn-next {
760
- width: 30px;
761
- height: 30px;
762
- background: #EDF0F6;
763
- border-radius: 50%;
764
- padding-left: 0;
765
- margin-left: 5px;
766
- }
755
+ /deep/.el-pagination .btn-next {
756
+ width: 30px;
757
+ height: 30px;
758
+ background: #EDF0F6;
759
+ border-radius: 50%;
760
+ padding-left: 0;
761
+ margin-left: 5px;
762
+ }
767
763
 
768
- /deep/.el-pagination .btn-prev {
769
- width: 30px;
770
- height: 30px;
771
- background: #EDF0F6;
772
- border-radius: 50%;
773
- padding-right: 0;
774
- margin-right: 5px;
775
- }
764
+ /deep/.el-pagination .btn-prev {
765
+ width: 30px;
766
+ height: 30px;
767
+ background: #EDF0F6;
768
+ border-radius: 50%;
769
+ padding-right: 0;
770
+ margin-right: 5px;
771
+ }
776
772
 
777
- /deep/.el-pagination button {
778
- padding: 0;
779
- min-width: 30px;
780
- }
773
+ /deep/.el-pagination button {
774
+ padding: 0;
775
+ min-width: 30px;
776
+ }
781
777
 
782
- /deep/.el-pager li {
783
- background: #EDF0F6;
784
- height: 30px;
785
- min-width: 30px;
786
- line-height: 30px;
787
- font-size: 12px;
788
- color: #717b90;
789
- }
778
+ /deep/.el-pager li {
779
+ background: #EDF0F6;
780
+ height: 30px;
781
+ min-width: 30px;
782
+ line-height: 30px;
783
+ font-size: 12px;
784
+ color: #717b90;
785
+ }
790
786
 
791
- /deep/.el-pager li:first-child {
792
- border-bottom-left-radius: 15px !important;
793
- border-top-left-radius: 15px !important;
794
- }
787
+ /deep/.el-pager li:first-child {
788
+ border-bottom-left-radius: 15px !important;
789
+ border-top-left-radius: 15px !important;
790
+ }
795
791
 
796
- /deep/.el-pager li:last-child {
797
- border-top-right-radius: 15px !important;
798
- border-bottom-right-radius: 15px !important;
799
- }
792
+ /deep/.el-pager li:last-child {
793
+ border-top-right-radius: 15px !important;
794
+ border-bottom-right-radius: 15px !important;
795
+ }
800
796
 
801
- /deep/.el-pager li.active {
802
- width: 30px;
803
- height: 30px;
804
- min-width: 30px;
805
- background: #366AFF;
806
- border: 3px solid #A1B9FF;
807
- border-radius: 50%;
808
- line-height: 24px;
809
- color: white;
810
- }
797
+ /deep/.el-pager li.active {
798
+ width: 30px;
799
+ height: 30px;
800
+ min-width: 30px;
801
+ background: #366AFF;
802
+ border: 3px solid #A1B9FF;
803
+ border-radius: 50%;
804
+ line-height: 24px;
805
+ color: white;
806
+ }
811
807
 
812
- /deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
813
- background: #366AFF;
814
- }
808
+ /deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
809
+ background: #366AFF;
810
+ }
815
811
  }
812
+
816
813
  .preview_iframe_html {
817
- width: 100%;
818
- height: 100%;
819
- overflow-y: scroll;
820
- text-align: left;
821
- box-sizing: border-box;
822
- padding: 16px;
823
-
824
- /deep/.lake-content {
825
- margin-left: 10px;
826
- }
814
+ width: 100%;
815
+ height: 100%;
816
+ overflow-y: scroll;
817
+ text-align: left;
818
+ box-sizing: border-box;
819
+ padding: 16px;
827
820
 
828
- /deep/a:link {
829
- color: #0000ee !important;
830
- }
821
+ /deep/.lake-content {
822
+ margin-left: 10px;
823
+ }
831
824
 
832
- /deep/a:visited {
833
- color: #0000ee !important;
834
- }
825
+ /deep/a:link {
826
+ color: #0000ee !important;
827
+ }
835
828
 
836
- /deep/a:hover {
837
- color: #0000ee !important;
838
- }
829
+ /deep/a:visited {
830
+ color: #0000ee !important;
831
+ }
839
832
 
840
- /deep/a:active {
841
- color: #0000ee !important;
842
- }
833
+ /deep/a:hover {
834
+ color: #0000ee !important;
835
+ }
843
836
 
844
- /deep/li:not(.rich-text-li),
845
- ol:not(.list-paddingleft-2),
846
- ul:not(.list-paddingleft-2) {
847
- list-style-type: auto !important;
848
- }
837
+ /deep/a:active {
838
+ color: #0000ee !important;
839
+ }
849
840
 
850
- /deep/img {
851
- width: 100%;
852
- }
841
+ /deep/li:not(.rich-text-li),
842
+ ol:not(.list-paddingleft-2),
843
+ ul:not(.list-paddingleft-2) {
844
+ list-style-type: auto !important;
845
+ }
853
846
 
854
- /deep/.ne-table {
855
- width: 100% !important;
856
- }
847
+ /deep/img {
848
+ width: 100%;
849
+ }
850
+
851
+ /deep/.ne-table {
852
+ width: 100% !important;
853
+ }
857
854
  }
858
855
 
859
856
  .footer {
860
- width: calc(100% - 40px);
861
- height: 50px;
862
- display: flex;
863
- align-items: center;
864
- justify-content: space-between;
865
- cursor: pointer;
866
- padding: 0 20px;
867
- border-bottom: 1px solid #cccccc;
857
+ width: calc(100% - 40px);
858
+ height: 50px;
859
+ display: flex;
860
+ align-items: center;
861
+ justify-content: space-between;
862
+ cursor: pointer;
863
+ padding: 0 20px;
864
+ border-bottom: 1px solid #cccccc;
868
865
  }
869
866
 
870
867
  .loading_img {
871
- display: flex;
872
- align-items: center;
873
- justify-content: center;
874
- width: 100%;
875
- height: 100%;
876
- position: absolute;
877
- top: 0;
878
- left: 0;
879
- background: #FFF;
880
-
881
- img {
882
- width: 50px;
883
- height: 50px;
884
- }
868
+ display: flex;
869
+ align-items: center;
870
+ justify-content: center;
871
+ width: 100%;
872
+ height: 100%;
873
+ position: absolute;
874
+ top: 0;
875
+ left: 0;
876
+ background: #FFF;
877
+
878
+ img {
879
+ width: 50px;
880
+ height: 50px;
881
+ }
885
882
  }
886
883
 
887
884
  .libang_head {
888
- height: 64px !important;
885
+ height: 64px !important;
889
886
  }
890
- .has_btn_libang_head{
891
- height: 85px!important;
887
+
888
+ .has_btn_libang_head {
889
+ height: 85px !important;
892
890
  }
893
- .has_btn_head{
894
- height: 60px!important;
891
+
892
+ .has_btn_head {
893
+ height: 60px !important;
895
894
  }
895
+
896
896
  .drawer-header {
897
- width: 100%;
898
- height: 50px;
899
- cursor: pointer;
900
- padding: 6px 20px;
901
- border-bottom: 1px solid #cccccc;
902
- .btn_position {
903
- position: absolute;
904
- top: -34px;
905
- left: 12px;
906
- }
897
+ width: 100%;
898
+ height: 50px;
899
+ cursor: pointer;
900
+ padding: 6px 20px;
901
+ border-bottom: 1px solid #cccccc;
907
902
 
908
- .header-btn {
909
- display: flex;
910
- align-items: center;
911
- justify-content: space-between;
903
+ .btn_position {
904
+ position: absolute;
905
+ top: -34px;
906
+ left: 12px;
907
+ }
908
+
909
+ .header-btn {
910
+ display: flex;
911
+ align-items: center;
912
+ justify-content: space-between;
912
913
 
913
914
  .header-right {
914
915
  display: flex;
@@ -931,95 +932,106 @@ justify-content: space-between;
931
932
  margin-right: 10px;
932
933
  font-size: 14px;
933
934
 
934
- i {
935
- font-size: 14px;
936
- margin-right: 5px;
937
- }
938
- }
935
+ i {
936
+ font-size: 14px;
937
+ margin-right: 5px;
938
+ }
939
+ }
939
940
 
940
- .summaryActiveBtn {
941
- background: #366aff !important;
942
- color: #ffffff !important;
943
- }
941
+ .summaryActiveBtn {
942
+ background: #366aff !important;
943
+ color: #ffffff !important;
944
+ }
944
945
 
945
- .chat {
946
- flex: none;
947
- height: 26px;
948
- padding: 0 8px;
949
- background: #ffffff;
950
- display: flex;
951
- align-items: center;
952
- justify-content: center;
953
- box-sizing: border-box;
954
- border: 1px solid #a1b9ff;
955
- border-radius: 15px 0px 15px 15px;
956
- cursor: pointer;
957
- color: #366aff;
958
- margin-right: 10px;
959
- font-size: 14px;
946
+ .chat {
947
+ flex: none;
948
+ height: 26px;
949
+ padding: 0 8px;
950
+ background: #ffffff;
951
+ display: flex;
952
+ align-items: center;
953
+ justify-content: center;
954
+ box-sizing: border-box;
955
+ border: 1px solid #a1b9ff;
956
+ border-radius: 15px 0px 15px 15px;
957
+ cursor: pointer;
958
+ color: #366aff;
959
+ margin-right: 10px;
960
+ font-size: 14px;
960
961
 
961
- i {
962
- font-size: 14px;
963
- margin-right: 5px;
964
- margin-top: 2px;
965
- }
966
- }
962
+ i {
963
+ font-size: 14px;
964
+ margin-right: 5px;
965
+ margin-top: 2px;
966
+ }
967
+ }
967
968
 
968
- .chat_active {
969
- background: #366aff !important;
970
- color: #FFFFFF !important;
969
+ .chat_active {
970
+ background: #366aff !important;
971
+ color: #FFFFFF !important;
972
+ }
971
973
  }
972
- }
973
974
 
974
- .header_title {
975
- font-size: 14px;
976
- height: 100%;
977
- .header_close {
978
- display: flex;
979
- align-items: center;
980
- justify-content: space-between;
981
- line-height: 26px;
982
- }
983
- .title_left {
984
- white-space: nowrap; /* 确保文本不会换行 */
985
- overflow: hidden; /* 隐藏超出容器的文本 */
986
- text-overflow: ellipsis; /* 当文本超出容器时显示省略号 */
987
- margin-right: 8px;
988
- text-align: left;
989
- }
990
- .top-header{
991
- display: flex;
992
- align-items: center;
993
- justify-content: flex-end;
994
- margin-bottom: 6px;
995
- }
996
- .header_floder {
997
- display: flex;
998
- align-items: center;
999
- line-height: 26px;
1000
- text-align: left;
1001
- i {
1002
- margin: 0 5px;
1003
- color: #366aff;
1004
- }
1005
- }
1006
- .header_top {
1007
- height: 100%;
1008
- display: flex;
1009
- align-items: center;
1010
- justify-content: space-between;
975
+ .header_title {
976
+ font-size: 14px;
977
+ height: 100%;
978
+
979
+ .header_close {
980
+ display: flex;
981
+ align-items: center;
982
+ justify-content: space-between;
983
+ line-height: 26px;
984
+ }
985
+
986
+ .title_left {
987
+ white-space: nowrap;
988
+ /* 确保文本不会换行 */
989
+ overflow: hidden;
990
+ /* 隐藏超出容器的文本 */
991
+ text-overflow: ellipsis;
992
+ /* 当文本超出容器时显示省略号 */
993
+ margin-right: 8px;
994
+ text-align: left;
995
+ }
996
+
997
+ .top-header {
998
+ display: flex;
999
+ align-items: center;
1000
+ justify-content: flex-end;
1001
+ margin-bottom: 6px;
1002
+ }
1003
+
1004
+ .header_floder {
1005
+ display: flex;
1006
+ align-items: center;
1007
+ line-height: 26px;
1008
+ text-align: left;
1009
+
1010
+ i {
1011
+ margin: 0 5px;
1012
+ color: #366aff;
1013
+ }
1014
+ }
1015
+
1016
+ .header_top {
1017
+ height: 100%;
1018
+ display: flex;
1019
+ align-items: center;
1020
+ justify-content: space-between;
1021
+ }
1011
1022
  }
1012
- }
1013
1023
  }
1014
- .has_btn_libang_content_pre{
1015
- height: calc(100% - 85px) !important;
1024
+
1025
+ .has_btn_libang_content_pre {
1026
+ height: calc(100% - 85px) !important;
1016
1027
  }
1028
+
1017
1029
  @media screen and (max-width: 767px) {
1018
1030
 
1019
- /* 这里是针对移动设备的css样式设置 */
1020
- /deep/.el-drawer__body {
1021
- height: 100%;
1022
- }
1031
+ /* 这里是针对移动设备的css样式设置 */
1032
+ /deep/.el-drawer__body {
1033
+ height: 100%;
1034
+ }
1023
1035
 
1024
1036
  #drawer_content_pre {
1025
1037
  overflow: auto;
@@ -1027,67 +1039,69 @@ justify-content: space-between;
1027
1039
  background: #FFF;
1028
1040
  }
1029
1041
 
1030
- .libang_content_pre {
1031
- height: calc(100% - 64px) !important;
1032
- }
1042
+ .libang_content_pre {
1043
+ height: calc(100% - 64px) !important;
1044
+ }
1033
1045
  }
1034
1046
 
1035
1047
  @media screen and (min-width: 768px) {
1036
1048
 
1037
- /* 这里是针对pc设备的css样式设置 */
1038
- /deep/.el-drawer__body {
1039
- height: 100%;
1040
- }
1049
+ /* 这里是针对pc设备的css样式设置 */
1050
+ /deep/.el-drawer__body {
1051
+ height: 100%;
1052
+ }
1041
1053
 
1042
- #drawer_content_pre {
1043
- overflow: auto;
1044
- height: calc(100% - 50px);
1045
- background: #FFF;
1046
- }
1054
+ #drawer_content_pre {
1055
+ overflow: auto;
1056
+ height: calc(100% - 50px);
1057
+ background: #FFF;
1058
+ }
1047
1059
 
1048
- .libang_content_pre {
1049
- height: calc(100% - 64px) !important;
1050
- }
1060
+ .libang_content_pre {
1061
+ height: calc(100% - 64px) !important;
1062
+ }
1051
1063
  }
1052
1064
 
1053
1065
  @media screen and (min-width: 1200px) {
1054
1066
 
1055
- /* 这里是针对pc设备的css样式设置 */
1056
- .el-drawer__wrapper {
1057
- width: 55%;
1058
- left: calc(100vw - 55%);
1059
- right: 0;
1067
+ /* 这里是针对pc设备的css样式设置 */
1068
+ .el-drawer__wrapper {
1069
+ width: 55%;
1070
+ left: calc(100vw - 55%);
1071
+ right: 0;
1060
1072
 
1061
- /deep/.pdf-preview-drawer {
1062
- width: 100% !important;
1073
+ /deep/.pdf-preview-drawer {
1074
+ width: 100% !important;
1075
+ }
1063
1076
  }
1064
- }
1065
1077
 
1066
- /deep/.el-drawer__body {
1067
- height: 100%;
1068
- }
1078
+ /deep/.el-drawer__body {
1079
+ height: 100%;
1080
+ }
1069
1081
 
1070
- #drawer_content_pre {
1071
- overflow: auto;
1072
- height: calc(100% - 50px);
1073
- background: #FFF;
1074
- }
1082
+ #drawer_content_pre {
1083
+ overflow: auto;
1084
+ height: calc(100% - 50px);
1085
+ background: #FFF;
1086
+ }
1075
1087
 
1076
- .libang_content_pre {
1077
- height: calc(100% - 64px) !important;
1078
- }
1088
+ .libang_content_pre {
1089
+ height: calc(100% - 64px) !important;
1090
+ }
1079
1091
  }
1080
1092
  </style>
1081
1093
  <style lang="less">
1082
1094
  .pdf-preview-drawer {
1083
- overflow: visible !important;
1095
+ overflow: visible !important;
1084
1096
  }
1097
+
1085
1098
  .libang_content_pre {
1086
- .change_scale {
1087
- top: 64px !important;
1088
- }
1089
- .float_intelligentSummary {
1090
- top: 74px !important;
1091
- }
1099
+ .change_scale {
1100
+ top: 64px !important;
1101
+ }
1102
+
1103
+ .float_intelligentSummary {
1104
+ top: 74px !important;
1105
+ }
1092
1106
  }
1093
1107
  </style>