askbot-dragon 1.6.56-beta → 1.6.58-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.
- package/package.json +1 -1
- package/src/components/previewPdf.vue +49 -12
package/package.json
CHANGED
|
@@ -55,12 +55,13 @@
|
|
|
55
55
|
<div class="drawer-footer">
|
|
56
56
|
<span>{{title ? title : "查看详情"}}</span>
|
|
57
57
|
<div class="header-right">
|
|
58
|
-
<div class="onload_btn" v-if="isDownload" @click="downLoad">
|
|
58
|
+
<div class="onload_btn" v-if="isDownload && isPc" @click="downLoad">
|
|
59
59
|
下载
|
|
60
60
|
</div>
|
|
61
61
|
<div class="summaryBtn"
|
|
62
62
|
:class="showSummary ? 'summaryActiveBtn' : ''"
|
|
63
63
|
@click="summaryFun"
|
|
64
|
+
v-if="isHasChat"
|
|
64
65
|
>
|
|
65
66
|
<i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
|
|
66
67
|
<span>智能摘要</span>
|
|
@@ -82,12 +83,12 @@
|
|
|
82
83
|
</div>
|
|
83
84
|
<div id="drawer_content_pre">
|
|
84
85
|
<intelligent-summary
|
|
85
|
-
v-show="showSummary"
|
|
86
|
+
v-show="showSummary && isHasChat"
|
|
86
87
|
:knowledgeId="knowledgeId"
|
|
87
88
|
@closeSummary="closeSummary"
|
|
88
89
|
@recommendQues="recommendQues"
|
|
89
90
|
@getSummarySuccess="getSummarySuccess"
|
|
90
|
-
:style="{marginTop:tagIds && tagIds.length != 0 ? '50px' : ''}"
|
|
91
|
+
:style="{marginTop:tagIds && tagIds.length != 0 && isPc ? '50px' : ''}"
|
|
91
92
|
></intelligent-summary>
|
|
92
93
|
<template v-if="tagIds && tagIds.length != 0 && drawer">
|
|
93
94
|
<pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :fileName="fileName" :textWatermarkStr="textWatermarkStr" ref="pdfPosition"></pdfPosition>
|
|
@@ -112,6 +113,9 @@
|
|
|
112
113
|
<iframe class="preview_iframe_kk" :src="previewUrl" style="border:none;" :style="{height: iframeHeight}"></iframe>
|
|
113
114
|
</template>
|
|
114
115
|
</template>
|
|
116
|
+
<div class="mobile_onload_btn" v-if="isDownload && !isPc" @click="downLoad">
|
|
117
|
+
下载
|
|
118
|
+
</div>
|
|
115
119
|
</div>
|
|
116
120
|
<div class="loading_img" v-show="loading">
|
|
117
121
|
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
|
|
@@ -131,7 +135,7 @@ export default {
|
|
|
131
135
|
previewShowPopup: false,
|
|
132
136
|
fileText:'',
|
|
133
137
|
fileType:"",
|
|
134
|
-
isPc:
|
|
138
|
+
isPc:false,
|
|
135
139
|
drawer:false,
|
|
136
140
|
tagIds: [],
|
|
137
141
|
// '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
|
|
@@ -146,9 +150,7 @@ export default {
|
|
|
146
150
|
},
|
|
147
151
|
mounted() {
|
|
148
152
|
window.addEventListener('message',this.handleIframeMessage,false);
|
|
149
|
-
|
|
150
|
-
this.getTextWatermark();
|
|
151
|
-
}
|
|
153
|
+
this.isPcFun();
|
|
152
154
|
},
|
|
153
155
|
props:{
|
|
154
156
|
url:{
|
|
@@ -220,6 +222,13 @@ export default {
|
|
|
220
222
|
this.getSummarySuccess();
|
|
221
223
|
}
|
|
222
224
|
}
|
|
225
|
+
},
|
|
226
|
+
knowledgeId:{
|
|
227
|
+
handler(val){
|
|
228
|
+
if (val){
|
|
229
|
+
this.getTextWatermark();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
223
232
|
}
|
|
224
233
|
},
|
|
225
234
|
computed:{
|
|
@@ -326,9 +335,8 @@ export default {
|
|
|
326
335
|
if (this.tagIds.length > 0){
|
|
327
336
|
let intelligentSummary = document.getElementById('intelligentSummary');
|
|
328
337
|
let preCon = document.querySelector('.pdf_view')
|
|
329
|
-
console.log('intelligentSummary',preCon,intelligentSummary)
|
|
330
338
|
if (intelligentSummary){
|
|
331
|
-
let height = intelligentSummary.offsetHeight + 100;
|
|
339
|
+
let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
|
|
332
340
|
if (preCon){
|
|
333
341
|
preCon.style.height = 'calc(100% - ' + height + 'px)'
|
|
334
342
|
}
|
|
@@ -341,7 +349,9 @@ export default {
|
|
|
341
349
|
let url = '/knowledge-api/open/knowledge/getPermissionInfo';
|
|
342
350
|
let obj = {
|
|
343
351
|
"knowledgeId":this.knowledgeId,
|
|
344
|
-
"userId":sessionStorage.getItem('
|
|
352
|
+
"userId":sessionStorage.getItem('_currentUserId'),
|
|
353
|
+
"mainId":sessionStorage.getItem('_mainId'),
|
|
354
|
+
"corpId":sessionStorage.getItem('_corpid')
|
|
345
355
|
}
|
|
346
356
|
this.$http.post(url,obj).then(res => {
|
|
347
357
|
console.log('getTextWatermark',res.data.data)
|
|
@@ -411,6 +421,13 @@ export default {
|
|
|
411
421
|
}
|
|
412
422
|
}
|
|
413
423
|
})
|
|
424
|
+
},
|
|
425
|
+
isPcFun(){
|
|
426
|
+
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
|
|
427
|
+
this.isPc = false
|
|
428
|
+
} else {
|
|
429
|
+
this.isPc = true
|
|
430
|
+
}
|
|
414
431
|
}
|
|
415
432
|
},
|
|
416
433
|
beforeDestroy() {
|
|
@@ -423,6 +440,25 @@ export default {
|
|
|
423
440
|
#drawer_content_pre{
|
|
424
441
|
padding: 20px;
|
|
425
442
|
scroll-behavior: smooth;
|
|
443
|
+
.mobile_onload_btn{
|
|
444
|
+
position: absolute;
|
|
445
|
+
right: 0;
|
|
446
|
+
bottom: 10%;
|
|
447
|
+
width: 20px;
|
|
448
|
+
height: 60px;
|
|
449
|
+
display: flex;
|
|
450
|
+
align-items: center;
|
|
451
|
+
justify-content: center;
|
|
452
|
+
cursor: pointer;
|
|
453
|
+
border-top-left-radius: 10px;
|
|
454
|
+
border-bottom-left-radius: 10px;
|
|
455
|
+
color: #366aff;
|
|
456
|
+
background: #ffffff;
|
|
457
|
+
border: 1px solid #a1b9ff;
|
|
458
|
+
font-size: 12px;
|
|
459
|
+
border-right: none;
|
|
460
|
+
text-align: center;
|
|
461
|
+
}
|
|
426
462
|
}
|
|
427
463
|
.onload_btn {
|
|
428
464
|
width: 80px;
|
|
@@ -433,8 +469,9 @@ export default {
|
|
|
433
469
|
cursor: pointer;
|
|
434
470
|
margin-right: 10px;
|
|
435
471
|
border-radius: 15px;
|
|
436
|
-
color: #
|
|
437
|
-
background
|
|
472
|
+
color: #366aff;
|
|
473
|
+
background: #ffffff;
|
|
474
|
+
border: 1px solid #a1b9ff;
|
|
438
475
|
}
|
|
439
476
|
.preview_iframe {
|
|
440
477
|
width: 100%;
|