askbot-dragon 1.6.57-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 +42 -10
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,6 +150,7 @@ export default {
|
|
|
146
150
|
},
|
|
147
151
|
mounted() {
|
|
148
152
|
window.addEventListener('message',this.handleIframeMessage,false);
|
|
153
|
+
this.isPcFun();
|
|
149
154
|
},
|
|
150
155
|
props:{
|
|
151
156
|
url:{
|
|
@@ -220,7 +225,6 @@ export default {
|
|
|
220
225
|
},
|
|
221
226
|
knowledgeId:{
|
|
222
227
|
handler(val){
|
|
223
|
-
console.log('knowledgeId',val)
|
|
224
228
|
if (val){
|
|
225
229
|
this.getTextWatermark();
|
|
226
230
|
}
|
|
@@ -331,9 +335,8 @@ export default {
|
|
|
331
335
|
if (this.tagIds.length > 0){
|
|
332
336
|
let intelligentSummary = document.getElementById('intelligentSummary');
|
|
333
337
|
let preCon = document.querySelector('.pdf_view')
|
|
334
|
-
console.log('intelligentSummary',preCon,intelligentSummary)
|
|
335
338
|
if (intelligentSummary){
|
|
336
|
-
let height = intelligentSummary.offsetHeight + 100;
|
|
339
|
+
let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
|
|
337
340
|
if (preCon){
|
|
338
341
|
preCon.style.height = 'calc(100% - ' + height + 'px)'
|
|
339
342
|
}
|
|
@@ -346,7 +349,9 @@ export default {
|
|
|
346
349
|
let url = '/knowledge-api/open/knowledge/getPermissionInfo';
|
|
347
350
|
let obj = {
|
|
348
351
|
"knowledgeId":this.knowledgeId,
|
|
349
|
-
"userId":sessionStorage.getItem('
|
|
352
|
+
"userId":sessionStorage.getItem('_currentUserId'),
|
|
353
|
+
"mainId":sessionStorage.getItem('_mainId'),
|
|
354
|
+
"corpId":sessionStorage.getItem('_corpid')
|
|
350
355
|
}
|
|
351
356
|
this.$http.post(url,obj).then(res => {
|
|
352
357
|
console.log('getTextWatermark',res.data.data)
|
|
@@ -416,6 +421,13 @@ export default {
|
|
|
416
421
|
}
|
|
417
422
|
}
|
|
418
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
|
+
}
|
|
419
431
|
}
|
|
420
432
|
},
|
|
421
433
|
beforeDestroy() {
|
|
@@ -428,6 +440,25 @@ export default {
|
|
|
428
440
|
#drawer_content_pre{
|
|
429
441
|
padding: 20px;
|
|
430
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
|
+
}
|
|
431
462
|
}
|
|
432
463
|
.onload_btn {
|
|
433
464
|
width: 80px;
|
|
@@ -438,8 +469,9 @@ export default {
|
|
|
438
469
|
cursor: pointer;
|
|
439
470
|
margin-right: 10px;
|
|
440
471
|
border-radius: 15px;
|
|
441
|
-
color: #
|
|
442
|
-
background
|
|
472
|
+
color: #366aff;
|
|
473
|
+
background: #ffffff;
|
|
474
|
+
border: 1px solid #a1b9ff;
|
|
443
475
|
}
|
|
444
476
|
.preview_iframe {
|
|
445
477
|
width: 100%;
|