askbot-dragon 1.7.39-beta → 1.7.40-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
|
@@ -413,7 +413,7 @@ export default {
|
|
|
413
413
|
} else {
|
|
414
414
|
this.$refs.previewPdf.fileName = '';
|
|
415
415
|
}
|
|
416
|
-
if (item.tagIds && item.tagIds.length != 0) {
|
|
416
|
+
if (item.tagIds && item.tagIds.length != 0 && this.$refs.previewPdf.newFileType !== 'PPT') {
|
|
417
417
|
this.$refs.previewPdf.loading = false
|
|
418
418
|
return
|
|
419
419
|
}
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
121
121
|
this.currentPage++;
|
|
122
122
|
this.scrollToParagraph()
|
|
123
123
|
},
|
|
124
|
-
scrollToParagraph(){
|
|
124
|
+
scrollToParagraph(type){
|
|
125
125
|
if (this.fileType == 'PDF') {
|
|
126
126
|
this.$refs.pdfView.jumpToHighlight(this.currentPage)
|
|
127
127
|
} else if (this.fileType == 'DOC' || this.fileType == 'DOCX' || this.fileType == 'TXT'){
|
|
@@ -131,16 +131,25 @@ export default {
|
|
|
131
131
|
if (dom){
|
|
132
132
|
dom.scrollIntoView({ behavior: 'smooth' });
|
|
133
133
|
}
|
|
134
|
-
|
|
135
|
-
const id = this.splitParagraph[this.currentPage].original_paragraph[i].paragraph_id;
|
|
136
|
-
const dom = document.getElementById(id);
|
|
134
|
+
if (type === 'first'){
|
|
137
135
|
if (dom){
|
|
138
|
-
dom.scrollIntoView({ behavior: 'smooth' });
|
|
139
136
|
dom.classList.add('animation')
|
|
140
137
|
setTimeout(() => {
|
|
141
138
|
dom.classList.remove('animation')
|
|
142
139
|
}, 3000)
|
|
143
140
|
}
|
|
141
|
+
} else {
|
|
142
|
+
for (let i=0;i<this.splitParagraph[this.currentPage].original_paragraph.length;i++){
|
|
143
|
+
const id = this.splitParagraph[this.currentPage].original_paragraph[i].paragraph_id;
|
|
144
|
+
const dom = document.getElementById(id);
|
|
145
|
+
if (dom){
|
|
146
|
+
dom.scrollIntoView({ behavior: 'smooth' });
|
|
147
|
+
dom.classList.add('animation')
|
|
148
|
+
setTimeout(() => {
|
|
149
|
+
dom.classList.remove('animation')
|
|
150
|
+
}, 3000)
|
|
151
|
+
}
|
|
152
|
+
}
|
|
144
153
|
}
|
|
145
154
|
} else if (this.splitParagraph[this.currentPage] && this.splitParagraph[this.currentPage].tableId){
|
|
146
155
|
const id = this.splitParagraph[this.currentPage].tableId;
|
|
@@ -170,23 +170,22 @@ export default {
|
|
|
170
170
|
await this.initPdf();
|
|
171
171
|
this.initObserver();
|
|
172
172
|
},
|
|
173
|
-
|
|
173
|
+
initObserver() {
|
|
174
174
|
if (this.observer) {
|
|
175
175
|
this.observer.disconnect();
|
|
176
176
|
}
|
|
177
|
-
this.observer =
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
this.observer = new IntersectionObserver(
|
|
178
|
+
(entries) => {
|
|
179
|
+
entries.forEach( (entry) => {
|
|
180
180
|
if (entry.isIntersecting) {
|
|
181
181
|
const index = Number(entry.target.getAttribute('data-index'));
|
|
182
182
|
const page = this.pages[index];
|
|
183
183
|
if (!page.loaded && !page.loading) {
|
|
184
|
-
|
|
184
|
+
this.renderPage(page.pageNumber);
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
this.updateCurrentPage();
|
|
187
187
|
}
|
|
188
188
|
});
|
|
189
|
-
await this.jumpToHighlight(0);
|
|
190
189
|
},
|
|
191
190
|
{
|
|
192
191
|
root: this.$refs.pdfContainer,
|
|
@@ -204,6 +203,9 @@ export default {
|
|
|
204
203
|
}
|
|
205
204
|
});
|
|
206
205
|
},300)
|
|
206
|
+
setTimeout(() => {
|
|
207
|
+
this.jumpToHighlight(0);
|
|
208
|
+
},1300)
|
|
207
209
|
});
|
|
208
210
|
},
|
|
209
211
|
async loadPage(number){
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
:formKnowledgeManagement="formKnowledgeManagement"
|
|
92
92
|
@closeSummary="closeSummary" @recommendQues="recommendQues"
|
|
93
93
|
@getSummarySuccess="getSummarySuccess"></intelligent-summary>
|
|
94
|
-
<div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer && newVersion === false">
|
|
94
|
+
<div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer && newVersion === false && newFileType !== 'PPT'">
|
|
95
95
|
<pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :textWatermarkStr="textWatermarkStr">
|
|
96
96
|
</pdfPosition>
|
|
97
97
|
</div>
|
|
98
|
-
<new-position-preview ref="newPositionPreview" v-else-if="tagIds && tagIds.length!= 0 && newVersion" :knowledgeId="knowledgeId" :tagIds="tagIds" :url="previewHref"></new-position-preview>
|
|
98
|
+
<new-position-preview ref="newPositionPreview" v-else-if="tagIds && tagIds.length!= 0 && newVersion && newFileType !== 'PPT'" :knowledgeId="knowledgeId" :tagIds="tagIds" :url="previewHref"></new-position-preview>
|
|
99
99
|
<template v-else>
|
|
100
100
|
<div v-if="fileType == 'VIDEO'" style="width: 100%;height: 100%">
|
|
101
101
|
<video :src="url" controls width="100%;" height="98%"></video>
|
|
@@ -151,7 +151,9 @@ export default {
|
|
|
151
151
|
textWatermarkStr:"",
|
|
152
152
|
copy:'',
|
|
153
153
|
newVersion:'',
|
|
154
|
-
previewHref:""
|
|
154
|
+
previewHref:"",
|
|
155
|
+
newFileType:""
|
|
156
|
+
}
|
|
155
157
|
},
|
|
156
158
|
mounted() {
|
|
157
159
|
window.addEventListener('message',this.handleIframeMessage,false);
|
|
@@ -310,7 +312,7 @@ export default {
|
|
|
310
312
|
},
|
|
311
313
|
loadIframe () {
|
|
312
314
|
|
|
313
|
-
if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
|
|
315
|
+
if (this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0 && this.newFileType !== 'PPT')) {
|
|
314
316
|
this.loading = false
|
|
315
317
|
} else {
|
|
316
318
|
let iframe = document.getElementsByClassName('preview_iframe')[0] || document.getElementsByClassName('preview_iframe_kk')[0];
|
|
@@ -479,6 +481,7 @@ export default {
|
|
|
479
481
|
getOssPath(url){
|
|
480
482
|
let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate';
|
|
481
483
|
let type = this.getFileType(url)
|
|
484
|
+
this.newFileType = type;
|
|
482
485
|
if (type === 'VIDEO' || type === 'PDF' || type === 'EXCEL' || type === 'TXT' || type === 'DOC') {
|
|
483
486
|
httpUrl += '?needEncrypt=false'
|
|
484
487
|
} else {
|
|
@@ -526,7 +529,9 @@ export default {
|
|
|
526
529
|
if (res.data.code == 0){
|
|
527
530
|
if (res.data.data && res.data.data.length > 0 && res.data.data[0].extractVersion == 'v3'){
|
|
528
531
|
this.newVersion = true;
|
|
529
|
-
this.
|
|
532
|
+
if (this.newFileType !== 'PPT'){
|
|
533
|
+
this.loading = false;
|
|
534
|
+
}
|
|
530
535
|
} else {
|
|
531
536
|
this.newVersion = false;
|
|
532
537
|
}
|