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