askbot-dragon 1.8.26-beta → 1.8.28-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
CHANGED
|
@@ -164,11 +164,14 @@ export default {
|
|
|
164
164
|
}
|
|
165
165
|
await this.$refs.pdfView.loadPage(page);
|
|
166
166
|
this.$refs.pdfView.jumpToHighlight(this.currentPage)
|
|
167
|
-
} else if (this.fileType == 'DOC' || this.fileType == 'DOCX' || this.fileType == 'TXT'){
|
|
167
|
+
} else if (this.fileType == 'DOC' || this.fileType == 'DOCX' || this.fileType == 'TXT' || this.fileType == 'MD' || this.fileType == 'HTML'){
|
|
168
168
|
if (this.splitParagraph[this.currentPage] && this.splitParagraph[this.currentPage].original_paragraph){
|
|
169
169
|
const id = this.splitParagraph[this.currentPage].original_paragraph[0].paragraph_id;
|
|
170
170
|
let dom = document.getElementById(id);
|
|
171
|
-
|
|
171
|
+
let paragraphs = this.$el.querySelectorAll(`[paragraph-id="${this.splitParagraph[this.currentPage].original_paragraph[0].paragraph_id}"]`);
|
|
172
|
+
if (this.fileType == 'HTML'){
|
|
173
|
+
paragraphs = this.$el.querySelectorAll(`[data-paragraph-id="${this.splitParagraph[this.currentPage].original_paragraph[0].paragraph_id}"]`);
|
|
174
|
+
}
|
|
172
175
|
if (dom){
|
|
173
176
|
dom.scrollIntoView({ behavior: 'smooth' });
|
|
174
177
|
}
|
|
@@ -99,12 +99,12 @@
|
|
|
99
99
|
:knowledgeId="knowledgeId" @closeSummary="closeSummary" @recommendQues="recommendQues"
|
|
100
100
|
@getSummarySuccess="getSummarySuccess"></intelligent-summary>
|
|
101
101
|
<div class="pdf_positon" :style="pdfStyle"
|
|
102
|
-
v-if="tagIds && tagIds.length != 0 && drawer && newVersion === false && newFileType !== 'PPT'">
|
|
102
|
+
v-if="tagIds && tagIds.length != 0 && drawer && newVersion === false && newFileType !== 'PPT' && newFileType !== 'PPTX' && newFileType !== 'IMAGE'">
|
|
103
103
|
<pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :textWatermarkStr="textWatermarkStr">
|
|
104
104
|
</pdfPosition>
|
|
105
105
|
</div>
|
|
106
106
|
<new-position-preview ref="newPositionPreview"
|
|
107
|
-
v-else-if="tagIds && tagIds.length != 0 && newVersion && newFileType !== 'PPT' && newFileType !== 'IMAGE'"
|
|
107
|
+
v-else-if="tagIds && tagIds.length != 0 && newVersion && newFileType !== 'PPT' && newFileType !== 'PPTX' && newFileType !== 'IMAGE'"
|
|
108
108
|
:textWatermarkStr="textWatermarkStr"
|
|
109
109
|
:knowledgeId="knowledgeId" :tagIds="tagIds" :url="previewHref"></new-position-preview>
|
|
110
110
|
<template v-else>
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
<template v-else>
|
|
122
122
|
<iframe class="preview_iframe_kk" :src="previewUrl" @load="load" style="border:none;"
|
|
123
123
|
:style="{ height: iframeHeight }"></iframe>
|
|
124
|
-
<template v-if="!loading && (newFileType === 'PPT' && pageChunkData.length > 1)">
|
|
124
|
+
<template v-if="!loading && ((newFileType === 'PPT' || newFileType === 'PPTX') && pageChunkData.length > 1)">
|
|
125
125
|
<div class="btn_footer" v-if="!isPc">
|
|
126
126
|
<div class="prev" @click="prev">{{$t('dragonCommon.previous')}}</div>
|
|
127
127
|
<div class="next" @click="next">{{$t('dragonCommon.next')}}</div>
|
|
@@ -354,7 +354,7 @@ export default {
|
|
|
354
354
|
this.showSummary = false;
|
|
355
355
|
},
|
|
356
356
|
loadIframe() {
|
|
357
|
-
if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0 && this.newFileType !== 'PPT'&& this.newFileType !== 'IMAGE')) {
|
|
357
|
+
if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0 && this.newFileType !== 'PPT'&& this.newFileType !== 'PPTX' && this.newFileType !== 'IMAGE')) {
|
|
358
358
|
this.loading = false
|
|
359
359
|
} else {
|
|
360
360
|
let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
|
|
@@ -532,7 +532,8 @@ export default {
|
|
|
532
532
|
let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate';
|
|
533
533
|
let type = this.getFileType(url)
|
|
534
534
|
this.newFileType = type;
|
|
535
|
-
|
|
535
|
+
console.log('type',type)
|
|
536
|
+
if (type === 'VIDEO' || type === 'PDF' || type === 'EXCEL' || type === 'TXT' || type === 'DOC'|| type === 'MD') {
|
|
536
537
|
httpUrl += '?needEncrypt=false'
|
|
537
538
|
} else {
|
|
538
539
|
httpUrl += '?needEncrypt=true'
|
|
@@ -581,7 +582,7 @@ export default {
|
|
|
581
582
|
if (res.data.code == 0) {
|
|
582
583
|
if (res.data.data && res.data.data.length > 0 && res.data.data[0].extractVersion == 'v3') {
|
|
583
584
|
this.newVersion = true;
|
|
584
|
-
if (this.newFileType !== 'PPT'
|
|
585
|
+
if (this.newFileType !== 'PPT'&& this.newFileType !== 'PPTX' && this.newFileType !== 'IMAGE') {
|
|
585
586
|
this.loading = false;
|
|
586
587
|
}
|
|
587
588
|
for (let i = 0; i < res.data.data.length; i++) {
|
|
@@ -930,7 +931,7 @@ export default {
|
|
|
930
931
|
display: flex;
|
|
931
932
|
align-items: center;
|
|
932
933
|
justify-content: space-between;
|
|
933
|
-
|
|
934
|
+
flex: none;
|
|
934
935
|
.header-right {
|
|
935
936
|
display: flex;
|
|
936
937
|
}
|