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