askbot-dragon 88.0.32 → 88.0.34
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
CHANGED
|
@@ -27,11 +27,8 @@
|
|
|
27
27
|
<template v-if="!isLiBang">
|
|
28
28
|
<div class="ad-list" :class="msg.content.type == 0 ? 'ad-list-recognition' : ''">
|
|
29
29
|
<template v-if="msg.content.type == 1">
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
:key="itemIndex"
|
|
33
|
-
:style="{paddingBottom: itemIndex === msg.content.list.length - 1?0:'10px'}"
|
|
34
|
-
class="ad-list-cell">
|
|
30
|
+
<div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex"
|
|
31
|
+
:style="{ paddingBottom: itemIndex === msg.content.list.length - 1 ? 0 : '10px' }" class="ad-list-cell">
|
|
35
32
|
<div class="alc-title">
|
|
36
33
|
<div class="alc-box">
|
|
37
34
|
<div class="alc-source-left">
|
|
@@ -146,9 +143,10 @@
|
|
|
146
143
|
<template v-if="msg.content.type == 0">
|
|
147
144
|
<div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex"
|
|
148
145
|
class="libang_list_cell_recognition" @click="lookAttach(item.url, item, $event)">
|
|
149
|
-
<div class="libang_list_cell_left"
|
|
150
|
-
<div class="libang_source_name"
|
|
151
|
-
<img class="libang_title_icon" height="18px" width="18px" :src="getIconSrc(item)" alt
|
|
146
|
+
<div class="libang_list_cell_left">
|
|
147
|
+
<div class="libang_source_name">
|
|
148
|
+
<img class="libang_title_icon" height="18px" width="18px" :src="getIconSrc(item)" alt
|
|
149
|
+
srcset />
|
|
152
150
|
<span class="libang_title_from">{{ item.from }}</span> -
|
|
153
151
|
<div v-show="docSource[item.source]" class="upload_source">
|
|
154
152
|
{{ docSource[item.source] }}
|
|
@@ -167,10 +165,10 @@
|
|
|
167
165
|
</template>
|
|
168
166
|
|
|
169
167
|
<previewPdf ref="previewPdf" :url="previewHref" :previewOssPath="previewOssPath" :title="title"
|
|
170
|
-
:folderName="folderName" :folderUrl="folderUrl"
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
:folderName="folderName" :folderUrl="folderUrl" :sourceFileType="sourceFileType" officePreviewType="pdf"
|
|
169
|
+
@previewToDialog="previewToDialog" @recommendQues="recommendQues" @close="close" @open="open"
|
|
170
|
+
:isHasChat="isHasChat" :knowledgeId="previewKnowledgeId" :isLiBang="isLiBang"
|
|
171
|
+
@previewClickFloder="previewClickFloder"></previewPdf>
|
|
174
172
|
</div>
|
|
175
173
|
</template>
|
|
176
174
|
|
|
@@ -267,8 +265,8 @@ export default {
|
|
|
267
265
|
allKnowledgeList: [],
|
|
268
266
|
loadMoreFlag: false,
|
|
269
267
|
title: '',
|
|
270
|
-
folderName:'',
|
|
271
|
-
folderUrl:'',
|
|
268
|
+
folderName: '',
|
|
269
|
+
folderUrl: '',
|
|
272
270
|
previewKnowledgeId: "",
|
|
273
271
|
previewKnowledge: {},
|
|
274
272
|
previewOssPath: ""
|
|
@@ -336,78 +334,78 @@ export default {
|
|
|
336
334
|
//预览图片
|
|
337
335
|
lookAttach (url, item, event) {
|
|
338
336
|
// console.log(item.knowledgeId);
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
337
|
+
// this.$http.get("/knowledge-api/internal/knowledgeBaseStructure/" + "642ffbccde420e2772f7787b")
|
|
338
|
+
// debugger
|
|
339
|
+
event.preventDefault();
|
|
340
|
+
if (this.isAskLightning == 1 && !this.isApp) {
|
|
341
|
+
window.parent.postMessage({
|
|
342
|
+
data: "bot_preview",
|
|
343
|
+
item: JSON.stringify(item),
|
|
344
|
+
url: url
|
|
345
|
+
}, "*");
|
|
346
|
+
} else {
|
|
347
|
+
// if (isMobile()) {
|
|
348
|
+
// this.$refs.previewPdf.drawer = true;
|
|
349
|
+
// this.$refs.previewPdf.previewShowPopup = false;
|
|
350
|
+
// } else {
|
|
351
|
+
// this.$refs.previewPdf.drawer = false;
|
|
352
|
+
// }
|
|
353
|
+
this.title = item.from || item.name
|
|
354
|
+
this.folderName = item.folderName
|
|
357
355
|
this.folderUrl = item.folderUrl
|
|
358
356
|
this.previewKnowledge = item;
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
} else {
|
|
370
|
-
type = this.fileType(url)
|
|
371
|
-
}
|
|
372
|
-
if (type === '' || type === 'OTHER') {
|
|
373
|
-
httpUrl = httpUrl += '?needEncrypt=true'
|
|
374
|
-
} else {
|
|
375
|
-
httpUrl = httpUrl += '?needEncrypt=false'
|
|
376
|
-
}
|
|
377
|
-
this.$http.post(httpUrl, {
|
|
378
|
-
"fileInOssPath":url
|
|
379
|
-
}).then(res =>{
|
|
380
|
-
if(res.data.code == '0') {
|
|
381
|
-
this.previewHref = res.data.data;
|
|
382
|
-
this.sourceFileType = url.substring(url.lastIndexOf('.'))
|
|
383
|
-
let isOhmPc = sessionStorage.getItem('isOhmPc')
|
|
384
|
-
if (isMobile() || isOhmPc == 'true'){
|
|
385
|
-
this.$refs.previewPdf.drawer = true;
|
|
386
|
-
this.$refs.previewPdf.previewShowPopup = true;
|
|
357
|
+
this.previewKnowledgeId = item.knowledgeId
|
|
358
|
+
this.$refs.previewPdf.previewShowPopup = false;
|
|
359
|
+
this.$refs.previewPdf.drawer = false;
|
|
360
|
+
this.previewOssPath = url;
|
|
361
|
+
let index = url.lastIndexOf('?')
|
|
362
|
+
let type = ''
|
|
363
|
+
let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
|
|
364
|
+
if (index !== -1) {
|
|
365
|
+
url = url.substring(0, index)
|
|
366
|
+
type = this.fileType(url)
|
|
387
367
|
} else {
|
|
388
|
-
|
|
389
|
-
this.$refs.previewPdf.drawer = true;
|
|
368
|
+
type = this.fileType(url)
|
|
390
369
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
this.$refs.previewPdf.previewKnowledgeId = this.activeKnowledgeId
|
|
370
|
+
if (type === '' || type === 'OTHER' || type == 'IMAGE') {
|
|
371
|
+
httpUrl = httpUrl += '?needEncrypt=true'
|
|
394
372
|
} else {
|
|
395
|
-
|
|
396
|
-
}
|
|
397
|
-
this.$refs.previewPdf.fileType = type
|
|
398
|
-
this.$refs.previewPdf.tagIds = item.tagIds
|
|
399
|
-
this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false ;
|
|
400
|
-
let index = url.indexOf("?");
|
|
401
|
-
let newFileInOssPath = url;
|
|
402
|
-
if (index !== -1){
|
|
403
|
-
newFileInOssPath = url.substring(0, url.indexOf("?"))
|
|
404
|
-
}
|
|
405
|
-
let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
|
|
406
|
-
if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt'|| fileName === '.html'){
|
|
407
|
-
this.$refs.previewPdf.fileName = fileName;
|
|
408
|
-
} else {
|
|
409
|
-
this.$refs.previewPdf.fileName = '';
|
|
373
|
+
httpUrl = httpUrl += '?needEncrypt=false'
|
|
410
374
|
}
|
|
375
|
+
this.$http.post(httpUrl, {
|
|
376
|
+
"fileInOssPath": url
|
|
377
|
+
}).then(res => {
|
|
378
|
+
if (res.data.code == '0') {
|
|
379
|
+
this.previewHref = res.data.data;
|
|
380
|
+
this.sourceFileType = url.substring(url.lastIndexOf('.'))
|
|
381
|
+
let isOhmPc = sessionStorage.getItem('isOhmPc')
|
|
382
|
+
if (isMobile() || isOhmPc == 'true') {
|
|
383
|
+
this.$refs.previewPdf.drawer = true;
|
|
384
|
+
this.$refs.previewPdf.previewShowPopup = true;
|
|
385
|
+
} else {
|
|
386
|
+
this.$refs.previewPdf.previewShowPopup = false;
|
|
387
|
+
this.$refs.previewPdf.drawer = true;
|
|
388
|
+
}
|
|
389
|
+
//聊一聊按钮的选中状态
|
|
390
|
+
if (this.activeKnowledgeId == item.knowledgeId) {
|
|
391
|
+
this.$refs.previewPdf.previewKnowledgeId = this.activeKnowledgeId
|
|
392
|
+
} else {
|
|
393
|
+
this.$refs.previewPdf.previewKnowledgeId = ""
|
|
394
|
+
}
|
|
395
|
+
this.$refs.previewPdf.fileType = type
|
|
396
|
+
this.$refs.previewPdf.tagIds = item.tagIds
|
|
397
|
+
this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false;
|
|
398
|
+
let index = url.indexOf("?");
|
|
399
|
+
let newFileInOssPath = url;
|
|
400
|
+
if (index !== -1) {
|
|
401
|
+
newFileInOssPath = url.substring(0, url.indexOf("?"))
|
|
402
|
+
}
|
|
403
|
+
let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
|
|
404
|
+
if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt' || fileName === '.html') {
|
|
405
|
+
this.$refs.previewPdf.fileName = fileName;
|
|
406
|
+
} else {
|
|
407
|
+
this.$refs.previewPdf.fileName = '';
|
|
408
|
+
}
|
|
411
409
|
if (item.tagIds && item.tagIds.length != 0) {
|
|
412
410
|
this.$refs.previewPdf.loading = false
|
|
413
411
|
return
|
|
@@ -436,7 +434,7 @@ export default {
|
|
|
436
434
|
} else if (fileType === '.html') {
|
|
437
435
|
return 'HTML'
|
|
438
436
|
} else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg') {
|
|
439
|
-
|
|
437
|
+
return 'IMAGE'
|
|
440
438
|
} else {
|
|
441
439
|
return 'OTHER'
|
|
442
440
|
}
|
|
@@ -483,9 +481,9 @@ export default {
|
|
|
483
481
|
return
|
|
484
482
|
}
|
|
485
483
|
},
|
|
486
|
-
previewToDialog(flag){
|
|
487
|
-
if (!flag){
|
|
488
|
-
|
|
484
|
+
previewToDialog (flag) {
|
|
485
|
+
if (!flag) {
|
|
486
|
+
this.$refs.previewPdf.previewKnowledgeId = ""
|
|
489
487
|
} else {
|
|
490
488
|
this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
|
|
491
489
|
}
|
|
@@ -497,13 +495,13 @@ export default {
|
|
|
497
495
|
recommendQues (item, knowledgeId) {
|
|
498
496
|
this.$emit('recommendQues', item, knowledgeId)
|
|
499
497
|
},
|
|
500
|
-
clickFloder(item) {
|
|
498
|
+
clickFloder (item) {
|
|
501
499
|
this.$emit('clickFloder', item)
|
|
502
500
|
},
|
|
503
|
-
previewClickFloder() {
|
|
501
|
+
previewClickFloder () {
|
|
504
502
|
let item = null
|
|
505
503
|
this.msg.content.list.forEach(element => {
|
|
506
|
-
if(element.knowledgeId == this.previewKnowledgeId) {
|
|
504
|
+
if (element.knowledgeId == this.previewKnowledgeId) {
|
|
507
505
|
item = element
|
|
508
506
|
}
|
|
509
507
|
});
|
|
@@ -647,24 +645,25 @@ export default {
|
|
|
647
645
|
|
|
648
646
|
.alc-box-introduction-previewImage {
|
|
649
647
|
width: 100%;
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
648
|
+
display: block;
|
|
649
|
+
overflow: hidden;
|
|
650
|
+
text-overflow: ellipsis;
|
|
651
|
+
display: -webkit-box;
|
|
652
|
+
-webkit-line-clamp: 3;
|
|
653
|
+
-webkit-box-orient: vertical;
|
|
654
|
+
margin-top: 10px;
|
|
655
|
+
color: #616161;
|
|
656
|
+
// font-size: 12px;
|
|
657
|
+
line-height: 24px;
|
|
658
|
+
text-align: left;
|
|
659
|
+
|
|
660
|
+
img {
|
|
661
|
+
max-width: 300px;
|
|
662
|
+
width: 100%;
|
|
663
|
+
max-height: 150px;
|
|
664
|
+
margin: 10px;
|
|
665
|
+
cursor: pointer;
|
|
666
|
+
}
|
|
668
667
|
}
|
|
669
668
|
|
|
670
669
|
.alc-updateTime {
|
|
@@ -908,10 +907,12 @@ export default {
|
|
|
908
907
|
font-size: 13px;
|
|
909
908
|
width: 100%;
|
|
910
909
|
margin-top: 10px;
|
|
910
|
+
|
|
911
911
|
.libang_updataTime_left {
|
|
912
912
|
width: calc(100% - 40px);
|
|
913
913
|
display: flex;
|
|
914
914
|
align-items: center;
|
|
915
|
+
|
|
915
916
|
.upload-source {
|
|
916
917
|
flex: none;
|
|
917
918
|
height: 18px;
|
|
@@ -925,8 +926,9 @@ export default {
|
|
|
925
926
|
padding: 0 8px;
|
|
926
927
|
color: #00c2bb;
|
|
927
928
|
}
|
|
929
|
+
|
|
928
930
|
.libang_floder {
|
|
929
|
-
width:calc(100% - 90px);
|
|
931
|
+
width: calc(100% - 90px);
|
|
930
932
|
// margin-left: 10px;
|
|
931
933
|
overflow: hidden;
|
|
932
934
|
text-overflow: ellipsis;
|
|
@@ -934,20 +936,24 @@ export default {
|
|
|
934
936
|
color: #366aff;
|
|
935
937
|
cursor: pointer;
|
|
936
938
|
text-align: left;
|
|
939
|
+
|
|
937
940
|
i {
|
|
938
941
|
margin-left: 8px;
|
|
939
942
|
}
|
|
940
943
|
}
|
|
941
944
|
}
|
|
945
|
+
|
|
942
946
|
.libang_content_text {
|
|
943
947
|
color: #366aff;
|
|
944
948
|
cursor: pointer;
|
|
945
949
|
}
|
|
950
|
+
|
|
946
951
|
.time {
|
|
947
952
|
color: #999999;
|
|
948
953
|
margin-left: 10px;
|
|
949
954
|
}
|
|
950
955
|
}
|
|
956
|
+
|
|
951
957
|
.alc-title-icon {
|
|
952
958
|
margin: 0 2px;
|
|
953
959
|
width: 18px;
|
|
@@ -1020,11 +1026,13 @@ export default {
|
|
|
1020
1026
|
|
|
1021
1027
|
.libang_list_cell_left {
|
|
1022
1028
|
margin-right: 5px;
|
|
1029
|
+
|
|
1023
1030
|
.libang_source_name {
|
|
1024
1031
|
display: flex;
|
|
1025
1032
|
align-items: center;
|
|
1026
1033
|
height: 20px;
|
|
1027
1034
|
margin-bottom: 2px;
|
|
1035
|
+
|
|
1028
1036
|
img {
|
|
1029
1037
|
vertical-align: middle;
|
|
1030
1038
|
// width: 16px;
|
|
@@ -1040,6 +1048,7 @@ export default {
|
|
|
1040
1048
|
line-height: 20px;
|
|
1041
1049
|
}
|
|
1042
1050
|
}
|
|
1051
|
+
|
|
1043
1052
|
.libang_source_floder {
|
|
1044
1053
|
max-width: calc(226px - 24px);
|
|
1045
1054
|
text-align: left;
|
|
@@ -1048,11 +1057,13 @@ export default {
|
|
|
1048
1057
|
text-overflow: ellipsis;
|
|
1049
1058
|
white-space: nowrap;
|
|
1050
1059
|
cursor: pointer;
|
|
1060
|
+
|
|
1051
1061
|
.iconfont {
|
|
1052
1062
|
margin: 0 8px;
|
|
1053
1063
|
}
|
|
1054
1064
|
}
|
|
1055
1065
|
}
|
|
1066
|
+
|
|
1056
1067
|
i {
|
|
1057
1068
|
font-size: 12px;
|
|
1058
1069
|
}
|
|
@@ -253,7 +253,7 @@ export default {
|
|
|
253
253
|
},
|
|
254
254
|
previewUrl () {
|
|
255
255
|
console.debug('VUE_APP_ENV', process.env.VUE_APP_ENV)
|
|
256
|
-
let url =
|
|
256
|
+
let url = 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
|
|
257
257
|
// if(this.url != '') {
|
|
258
258
|
// if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
|
|
259
259
|
// url += btoa(encodeURIComponent(this.url))
|