askbot-dragon 1.5.22-beta → 1.5.23-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/pdfPosition.vue +101 -432
package/package.json
CHANGED
|
@@ -143,7 +143,6 @@ export default {
|
|
|
143
143
|
getpdfResloutePage (pdfResloute) {
|
|
144
144
|
// 根据当前页面宽度设置缩放比例
|
|
145
145
|
// this.scale = Math.round(this.$refs.pdfView.clientWidth / pdfResloute.pageWidth * 100) / 100
|
|
146
|
-
// console.log(this.scale,'this.scale');
|
|
147
146
|
if(this.isMessageRecord) {
|
|
148
147
|
this.scale = Math.round(this.$refs.pdfView.clientWidth / pdfResloute.pageWidth * 100) / 100
|
|
149
148
|
} else {
|
|
@@ -156,36 +155,45 @@ export default {
|
|
|
156
155
|
this.loadPdfData(pdfResloute.page)
|
|
157
156
|
},
|
|
158
157
|
async loadPdfData (loadPage) {
|
|
159
|
-
if(this.pages[loadPage - 1] && ((this.pages[loadPage - 1].dom && this.pages[loadPage - 1].dom.children.length > 0) || this.pages[loadPage - 1].
|
|
158
|
+
if(this.pages[loadPage - 1] && ((this.pages[loadPage - 1].dom && this.pages[loadPage - 1].dom.children.length > 0) || this.pages[loadPage - 1].loadStatus)) {
|
|
160
159
|
return
|
|
160
|
+
} else {
|
|
161
|
+
if (this.changetoolbar) {
|
|
162
|
+
this.$nextTick(() => {
|
|
163
|
+
this.renderHighlights()
|
|
164
|
+
})
|
|
165
|
+
this.changetoolbar = false
|
|
166
|
+
}
|
|
161
167
|
}
|
|
162
|
-
|
|
168
|
+
// 记录开始缓存的状态
|
|
163
169
|
// pdfjsLib.GlobalWorkerOptions.workerSrc = require("pdfjs-dist/legacy/build/pdf.worker.entry.js");
|
|
164
170
|
// 拿到第一个分片
|
|
165
171
|
const { startPage, url } = await this.fetchPdfFragment(loadPage);
|
|
166
172
|
let loadingTask = pdfjsLib.getDocument(url)
|
|
167
|
-
loadingTask.promise.then((pdfDoc) => {
|
|
173
|
+
loadingTask.promise.then(async (pdfDoc) => {
|
|
168
174
|
// 将已经下载的分片保存到 pages 数组中
|
|
169
|
-
for (let i = 0; i < pdfDoc.numPages; i += 1) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
175
|
+
// for (let i = 0; i < pdfDoc.numPages; i += 1) {
|
|
176
|
+
// const pageIndex = startPage + i;
|
|
177
|
+
// const page = this.pages[pageIndex - 1];
|
|
178
|
+
// // // 不在缓存列表内,重新获取本页pdf
|
|
179
|
+
// // if (page.loadStatus !== this.pageLoadStatus.LOADED) {
|
|
180
|
+
|
|
181
|
+
// // } else {
|
|
182
|
+
// // if (this.changetoolbar) {
|
|
183
|
+
// // this.$nextTick(() => {
|
|
184
|
+
// // this.renderHighlights()
|
|
185
|
+
// // })
|
|
186
|
+
// // this.changetoolbar = false
|
|
187
|
+
// // }
|
|
188
|
+
// // }
|
|
189
|
+
// }
|
|
190
|
+
const page = this.pages[loadPage - 1]
|
|
191
|
+
await pdfDoc.getPage(1).then( async (pdfPage) => {
|
|
192
|
+
this.pages[loadPage - 1].loadStatus = true
|
|
193
|
+
this.pages[loadPage - 1].pdfPage = pdfPage;
|
|
194
|
+
// 通知可以进行渲染了
|
|
195
|
+
await this.startRenderPages(pdfPage, page, loadPage)
|
|
196
|
+
});
|
|
189
197
|
});
|
|
190
198
|
},
|
|
191
199
|
initPages (totalPage) {
|
|
@@ -194,7 +202,7 @@ export default {
|
|
|
194
202
|
for (let i = 0; i < totalPage; i += 1) {
|
|
195
203
|
this.pages.push({
|
|
196
204
|
pageNo: i + 1,
|
|
197
|
-
loadStatus:
|
|
205
|
+
loadStatus: false,
|
|
198
206
|
pdfPage: null,
|
|
199
207
|
dom: null
|
|
200
208
|
});
|
|
@@ -261,12 +269,29 @@ export default {
|
|
|
261
269
|
}
|
|
262
270
|
this.renderPages(pageIndex)
|
|
263
271
|
},
|
|
264
|
-
|
|
272
|
+
// 渲染需要展示的页面,不需展示的页码将其清除
|
|
273
|
+
renderPages (pageIndex) {
|
|
274
|
+
const pagesToRender = this.getRenderScope(pageIndex);
|
|
275
|
+
for (const i of this.pages) {
|
|
276
|
+
if(pagesToRender.some(p =>{ return p.pageNo == i.pageNo })) {
|
|
277
|
+
if(i.loadStatus === true) {
|
|
278
|
+
this.renderPageContent(i, i.pageNo)
|
|
279
|
+
} else {
|
|
280
|
+
this.renderPageLoading(i, i.pageNo)
|
|
281
|
+
}
|
|
282
|
+
} else {
|
|
283
|
+
this.clearPage(i);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
},
|
|
288
|
+
async renderPageContent (page, pageIndex) {
|
|
265
289
|
const { pdfPage, pageNo, dom } = page;
|
|
266
290
|
// dom 元素已存在,无须重新渲染,直接返回
|
|
267
|
-
if (dom && dom.children.length != 0) {
|
|
291
|
+
if ((dom && dom.children.length != 0) || page.loading) {
|
|
268
292
|
return;
|
|
269
293
|
}
|
|
294
|
+
page.loading = true
|
|
270
295
|
const viewport = pdfPage.getViewport({
|
|
271
296
|
scale: this.scale,
|
|
272
297
|
rotation: this.rotation,
|
|
@@ -283,16 +308,16 @@ export default {
|
|
|
283
308
|
pageDom.style.top = `${((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL)) + this.PAGE_INTVERVAL}px`;
|
|
284
309
|
pageDom.style.width = `${this.pageSize.width}px`;
|
|
285
310
|
pageDom.style.height = `${this.pageSize.height}px`;
|
|
311
|
+
pageDom.setAttribute('data-id', 'page' + pageNo)
|
|
286
312
|
pageDom.appendChild(canvas);
|
|
287
313
|
// 渲染内容
|
|
288
314
|
let renderContext = {
|
|
289
315
|
canvasContext: context,
|
|
290
316
|
viewport: viewport,
|
|
291
317
|
}
|
|
292
|
-
pdfPage.render(renderContext).promise.then(() => {
|
|
293
|
-
console.log(pdfPage.getTextContent(), 'getTextContent');
|
|
318
|
+
await pdfPage.render(renderContext).promise.then(() => {
|
|
294
319
|
return pdfPage.getTextContent()
|
|
295
|
-
}).then((textContent) => {
|
|
320
|
+
}).then( async (textContent) => {
|
|
296
321
|
const textLayerDiv = document.createElement('div');
|
|
297
322
|
textLayerDiv.setAttribute('class', 'textLayer');
|
|
298
323
|
// 将文本图层div添加至每页pdf的div中
|
|
@@ -307,7 +332,6 @@ export default {
|
|
|
307
332
|
if (findPage) {
|
|
308
333
|
let AllLines = findPage.allLines
|
|
309
334
|
// setTimeout(() => {
|
|
310
|
-
console.log(findPage,'findPage');
|
|
311
335
|
if (AllLines.length > 0) {
|
|
312
336
|
for (let j = 0; j < AllLines.length; j++) {
|
|
313
337
|
let lines = AllLines[j].lines
|
|
@@ -339,7 +363,6 @@ export default {
|
|
|
339
363
|
// if(this.isPC) {
|
|
340
364
|
// rectdomTop = rectdomTop - 50 < 0 ? 0 : rectdomTop - 50
|
|
341
365
|
// }
|
|
342
|
-
// console.log(rectdomTop,div.style.top, (postionArr[1] + postionArr[3] / 9) * this.scale);
|
|
343
366
|
}
|
|
344
367
|
}
|
|
345
368
|
}
|
|
@@ -352,7 +375,12 @@ export default {
|
|
|
352
375
|
textLayer.setTextContent(textContent);
|
|
353
376
|
textLayer.render()
|
|
354
377
|
pageDom.appendChild(textLayer.textLayerDiv);
|
|
355
|
-
|
|
378
|
+
|
|
379
|
+
let backgroundDom = document.getElementById('backgroundLoad' + pageNo)
|
|
380
|
+
if(backgroundDom) {
|
|
381
|
+
this.contentView.removeChild(backgroundDom);
|
|
382
|
+
}
|
|
383
|
+
page.dom = await pageDom;
|
|
356
384
|
page.loading = false
|
|
357
385
|
this.contentView.appendChild(pageDom);
|
|
358
386
|
if(this.transformSalce !== null) {
|
|
@@ -364,7 +392,6 @@ export default {
|
|
|
364
392
|
this.changetoolbar = false
|
|
365
393
|
}, 500)
|
|
366
394
|
}
|
|
367
|
-
// console.log(this.fisrtLoad,'this.fisrtLoad');
|
|
368
395
|
if (this.fisrtLoad) {
|
|
369
396
|
setTimeout(() => {
|
|
370
397
|
let pageoffsetHeight = 0
|
|
@@ -380,8 +407,6 @@ export default {
|
|
|
380
407
|
if(this.transformSalce !== null) {
|
|
381
408
|
startNum = Math.ceil(this.$refs.pdfView.scrollTop / ((this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce))
|
|
382
409
|
endNum = startNum + Math.ceil(height / ((this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce))
|
|
383
|
-
console.log( Math.ceil(height / ((this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce)),this.pageSize.height , this.PAGE_INTVERVAL, height, this.transformSalce,'startNum');
|
|
384
|
-
|
|
385
410
|
} else {
|
|
386
411
|
startNum = Math.ceil(this.$refs.pdfView.scrollTop / (this.pageSize.height + this.PAGE_INTVERVAL))
|
|
387
412
|
endNum = startNum + Math.ceil(height / (this.pageSize.height + this.PAGE_INTVERVAL))
|
|
@@ -424,12 +449,11 @@ export default {
|
|
|
424
449
|
startNum = Math.ceil(scrollTop / (that.pageSize.height + that.PAGE_INTVERVAL))
|
|
425
450
|
endNum = startNum + Math.ceil(height / (that.pageSize.height + that.PAGE_INTVERVAL))
|
|
426
451
|
}
|
|
427
|
-
for (let pageIndex = startNum; pageIndex
|
|
428
|
-
if(pageIndex > 0 && pageIndex
|
|
452
|
+
for (let pageIndex = startNum; pageIndex < endNum; pageIndex++) {
|
|
453
|
+
if(pageIndex > 0 && pageIndex < that.pages.length) {
|
|
429
454
|
that.loadPdfData(pageIndex)
|
|
430
455
|
}
|
|
431
456
|
}
|
|
432
|
-
console.log('=======');
|
|
433
457
|
}, 200),
|
|
434
458
|
directScrolling (e, that) {
|
|
435
459
|
if (this.fisrtLoad) {
|
|
@@ -484,26 +508,18 @@ export default {
|
|
|
484
508
|
j += 1;
|
|
485
509
|
}
|
|
486
510
|
}
|
|
511
|
+
// for (let index = 0; index < array.length; index++) {
|
|
512
|
+
// const element = array[index];
|
|
513
|
+
|
|
514
|
+
// }
|
|
487
515
|
return pagesToRender;
|
|
488
516
|
},
|
|
489
|
-
|
|
490
|
-
renderPages (pageIndex) {
|
|
491
|
-
const pagesToRender = this.getRenderScope(pageIndex);
|
|
492
|
-
for (const i of this.pages) {
|
|
493
|
-
if (pagesToRender.includes(i)) {
|
|
494
|
-
i.loadStatus === this.pageLoadStatus.LOADED ?
|
|
495
|
-
this.renderPageContent(i, pageIndex) :
|
|
496
|
-
this.renderPageLoading(i);
|
|
497
|
-
} else {
|
|
498
|
-
this.clearPage(i);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
},
|
|
517
|
+
|
|
502
518
|
// 清除页面 dom
|
|
503
519
|
clearPage (page) {
|
|
504
|
-
if
|
|
520
|
+
if(this.contentView.contains(page.dom) && page.dom) {
|
|
505
521
|
this.contentView.removeChild(page.dom);
|
|
506
|
-
page.loadStatus =
|
|
522
|
+
page.loadStatus = false
|
|
507
523
|
page.loading = false
|
|
508
524
|
page.dom = undefined;
|
|
509
525
|
}
|
|
@@ -514,6 +530,10 @@ export default {
|
|
|
514
530
|
if (dom && dom.children.length != 0) {
|
|
515
531
|
return;
|
|
516
532
|
}
|
|
533
|
+
let backgroundDom = document.getElementById('backgroundLoad' + pageNo)
|
|
534
|
+
if(this.contentView.contains(backgroundDom)) {
|
|
535
|
+
return
|
|
536
|
+
}
|
|
517
537
|
const pageDom = document.createElement('div');
|
|
518
538
|
pageDom.style.width = `${this.pageSize.width}px`;
|
|
519
539
|
pageDom.style.height = `${this.pageSize.height}px`;
|
|
@@ -524,6 +544,7 @@ export default {
|
|
|
524
544
|
pageDom.style.backgroundPosition = 'center'
|
|
525
545
|
pageDom.style.backgroundRepeat = 'no-repeat'
|
|
526
546
|
pageDom.style.backgroundColor = '#FFF'
|
|
547
|
+
pageDom.setAttribute('id', 'backgroundLoad' + pageNo)
|
|
527
548
|
page.dom = pageDom;
|
|
528
549
|
this.contentView.appendChild(pageDom);
|
|
529
550
|
},
|
|
@@ -626,7 +647,6 @@ export default {
|
|
|
626
647
|
// pdf是否需要重新渲染高亮位置
|
|
627
648
|
renderHighlights () {
|
|
628
649
|
let lineHeightDom = Array.from(document.getElementsByClassName('rectdom'))
|
|
629
|
-
console.log(lineHeightDom, this.currentPage, 'this.currentPage');
|
|
630
650
|
if (lineHeightDom) {
|
|
631
651
|
lineHeightDom.forEach((d) => {
|
|
632
652
|
for (let i = 0; i < d.children.length; i++) {
|
|
@@ -728,7 +748,6 @@ export default {
|
|
|
728
748
|
}
|
|
729
749
|
|
|
730
750
|
that.displacement.originScale = this.scale || 1;
|
|
731
|
-
// console.log(that.displacement);
|
|
732
751
|
});
|
|
733
752
|
document.addEventListener("touchmove", function (event) {
|
|
734
753
|
if (!that.displacement.moveable) {
|
|
@@ -768,7 +787,6 @@ export default {
|
|
|
768
787
|
);
|
|
769
788
|
// 应用在元素上的缩放比例
|
|
770
789
|
let newScale = that.displacement.originScale * zoom;
|
|
771
|
-
console.log(zoom, newScale , this.scale, 'newScale');
|
|
772
790
|
// 最大缩放比例限制
|
|
773
791
|
if (newScale > 2) {
|
|
774
792
|
newScale = 2;
|
|
@@ -800,7 +818,6 @@ export default {
|
|
|
800
818
|
canvas.width = width
|
|
801
819
|
canvas.height = height
|
|
802
820
|
const ctx = canvas.getContext('2d');
|
|
803
|
-
console.log(canvas.width, canvas.height, dpr, this.scale);
|
|
804
821
|
ctx?.scale(dpr, dpr );
|
|
805
822
|
return ctx;
|
|
806
823
|
},
|
|
@@ -865,377 +882,30 @@ export default {
|
|
|
865
882
|
// res.data = {
|
|
866
883
|
// "data": [
|
|
867
884
|
// {
|
|
868
|
-
// "id": "
|
|
869
|
-
// "knowledgeId": "
|
|
870
|
-
// "mainId": "
|
|
871
|
-
// "page":
|
|
872
|
-
// "total":
|
|
873
|
-
// "pageHeight": 540.0,
|
|
874
|
-
// "pageWidth": 960.00946,
|
|
875
|
-
// "publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/b3cec709ed904d56b29cb95362dc181f/2023/09/13/08/43/12/6501ae451169c35ace9739b7/5.pdf",
|
|
876
|
-
// "extractInfo": {
|
|
877
|
-
// "location": [
|
|
878
|
-
// 42.208,
|
|
879
|
-
// 297.014,
|
|
880
|
-
// 723.56104,
|
|
881
|
-
// 41.18799
|
|
882
|
-
// ],
|
|
883
|
-
// "content": "体验整体提升,推出全渠道、智能化知识管理平台,面向员工智能服务,业务自动化,知识智能搜索与问答场景。成为飞书ISVAI交互专利发布国家高新技术企业北京市科技型中小企业认证北京市创新型中小企业认证AAA企业信用评价认证优衣库",
|
|
884
|
-
// "lines": [
|
|
885
|
-
// {
|
|
886
|
-
// "content": "体验整体提升,推出全",
|
|
887
|
-
// "location": [
|
|
888
|
-
// 42.208,
|
|
889
|
-
// 297.014,
|
|
890
|
-
// 119.874016,
|
|
891
|
-
// 11.990997
|
|
892
|
-
// ]
|
|
893
|
-
// },
|
|
894
|
-
// {
|
|
895
|
-
// "content": "渠道、智能化知识管理",
|
|
896
|
-
// "location": [
|
|
897
|
-
// 42.208,
|
|
898
|
-
// 314.50302,
|
|
899
|
-
// 119.874016,
|
|
900
|
-
// 11.990997
|
|
901
|
-
// ]
|
|
902
|
-
// },
|
|
903
|
-
// {
|
|
904
|
-
// "content": "平台,面向员工智能服",
|
|
905
|
-
// "location": [
|
|
906
|
-
// 42.208,
|
|
907
|
-
// 332.022,
|
|
908
|
-
// 119.874016,
|
|
909
|
-
// 11.990997
|
|
910
|
-
// ]
|
|
911
|
-
// },
|
|
912
|
-
// {
|
|
913
|
-
// "content": "务,业务自动化,知识",
|
|
914
|
-
// "location": [
|
|
915
|
-
// 42.208,
|
|
916
|
-
// 349.398,
|
|
917
|
-
// 119.874016,
|
|
918
|
-
// 11.990997
|
|
919
|
-
// ]
|
|
920
|
-
// },
|
|
921
|
-
// {
|
|
922
|
-
// "content": "智能搜索与问答场景。",
|
|
923
|
-
// "location": [
|
|
924
|
-
// 42.208,
|
|
925
|
-
// 366.916,
|
|
926
|
-
// 119.874016,
|
|
927
|
-
// 11.990997
|
|
928
|
-
// ]
|
|
929
|
-
// },
|
|
930
|
-
// {
|
|
931
|
-
// "content": "成为飞书",
|
|
932
|
-
// "location": [
|
|
933
|
-
// 362.409,
|
|
934
|
-
// 270.311,
|
|
935
|
-
// 47.951996,
|
|
936
|
-
// 11.990997
|
|
937
|
-
// ]
|
|
938
|
-
// },
|
|
939
|
-
// {
|
|
940
|
-
// "content": "ISV",
|
|
941
|
-
// "location": [
|
|
942
|
-
// 362.409,
|
|
943
|
-
// 284.711,
|
|
944
|
-
// 18.47815,
|
|
945
|
-
// 11.990997
|
|
946
|
-
// ]
|
|
947
|
-
// },
|
|
948
|
-
// {
|
|
949
|
-
// "content": "AI交互专利发",
|
|
950
|
-
// "location": [
|
|
951
|
-
// 362.409,
|
|
952
|
-
// 300.018,
|
|
953
|
-
// 74.64407,
|
|
954
|
-
// 11.990997
|
|
955
|
-
// ]
|
|
956
|
-
// },
|
|
957
|
-
// {
|
|
958
|
-
// "content": "布",
|
|
959
|
-
// "location": [
|
|
960
|
-
// 362.409,
|
|
961
|
-
// 314.418,
|
|
962
|
-
// 11.990997,
|
|
963
|
-
// 11.990997
|
|
964
|
-
// ]
|
|
965
|
-
// },
|
|
966
|
-
// {
|
|
967
|
-
// "content": "国家高新技术企",
|
|
968
|
-
// "location": [
|
|
969
|
-
// 363.713,
|
|
970
|
-
// 330.009,
|
|
971
|
-
// 83.93698,
|
|
972
|
-
// 11.990997
|
|
973
|
-
// ]
|
|
974
|
-
// },
|
|
975
|
-
// {
|
|
976
|
-
// "content": "业",
|
|
977
|
-
// "location": [
|
|
978
|
-
// 363.713,
|
|
979
|
-
// 344.409,
|
|
980
|
-
// 11.990997,
|
|
981
|
-
// 11.990997
|
|
982
|
-
// ]
|
|
983
|
-
// },
|
|
984
|
-
// {
|
|
985
|
-
// "content": "北京市科技型中小企业认",
|
|
986
|
-
// "location": [
|
|
987
|
-
// 363.798,
|
|
988
|
-
// 359.915,
|
|
989
|
-
// 131.90097,
|
|
990
|
-
// 11.990997
|
|
991
|
-
// ]
|
|
992
|
-
// },
|
|
993
|
-
// {
|
|
994
|
-
// "content": "证",
|
|
995
|
-
// "location": [
|
|
996
|
-
// 363.798,
|
|
997
|
-
// 374.315,
|
|
998
|
-
// 11.990997,
|
|
999
|
-
// 11.990997
|
|
1000
|
-
// ]
|
|
1001
|
-
// },
|
|
1002
|
-
// {
|
|
1003
|
-
// "content": "北京市创新型中小企业认",
|
|
1004
|
-
// "location": [
|
|
1005
|
-
// 363.798,
|
|
1006
|
-
// 389.905,
|
|
1007
|
-
// 131.90097,
|
|
1008
|
-
// 11.990997
|
|
1009
|
-
// ]
|
|
1010
|
-
// },
|
|
1011
|
-
// {
|
|
1012
|
-
// "content": "证",
|
|
1013
|
-
// "location": [
|
|
1014
|
-
// 363.798,
|
|
1015
|
-
// 404.22,
|
|
1016
|
-
// 11.990997,
|
|
1017
|
-
// 11.990997
|
|
1018
|
-
// ]
|
|
1019
|
-
// },
|
|
1020
|
-
// {
|
|
1021
|
-
// "content": "AAA企业信用评价认",
|
|
1022
|
-
// "location": [
|
|
1023
|
-
// 362.409,
|
|
1024
|
-
// 419.811,
|
|
1025
|
-
// 112.02899,
|
|
1026
|
-
// 11.990997
|
|
1027
|
-
// ]
|
|
1028
|
-
// },
|
|
1029
|
-
// {
|
|
1030
|
-
// "content": "证",
|
|
1031
|
-
// "location": [
|
|
1032
|
-
// 362.409,
|
|
1033
|
-
// 434.09702,
|
|
1034
|
-
// 11.990997,
|
|
1035
|
-
// 11.990997
|
|
1036
|
-
// ]
|
|
1037
|
-
// },
|
|
1038
|
-
// {
|
|
1039
|
-
// "content": "优衣库",
|
|
1040
|
-
// "location": [
|
|
1041
|
-
// 729.808,
|
|
1042
|
-
// 326.211,
|
|
1043
|
-
// 35.96106,
|
|
1044
|
-
// 11.990997
|
|
1045
|
-
// ]
|
|
1046
|
-
// }
|
|
1047
|
-
// ],
|
|
1048
|
-
// "tagId": null
|
|
1049
|
-
// },
|
|
1050
|
-
// "block": {
|
|
1051
|
-
// "type": "TEXT",
|
|
1052
|
-
// "location": [
|
|
1053
|
-
// 42.208,
|
|
1054
|
-
// 297.014,
|
|
1055
|
-
// 723.56104,
|
|
1056
|
-
// 41.18799
|
|
1057
|
-
// ],
|
|
1058
|
-
// "color": null,
|
|
1059
|
-
// "flowChart": null,
|
|
1060
|
-
// "image": null,
|
|
1061
|
-
// "table": null,
|
|
1062
|
-
// "text": {
|
|
1063
|
-
// "originText": "体验整体提升,推出全渠道、智能化知识管理平台,面向员工智能服务,业务自动化,知识智能搜索与问答场景。成为飞书ISVAI交互专利发布国家高新技术企业北京市科技型中小企业认证北京市创新型中小企业认证AAA企业信用评价认证优衣库",
|
|
1064
|
-
// "indexText": "体验整体提升,推出全渠道、智能化知识管理平台,面向员工智能服务,业务自动化,知识智能搜索与问答场景。成为飞书ISVAI交互专利发布国家高新技术企业北京市科技型中小企业认证北京市创新型中小企业认证AAA企业信用评价认证优衣库",
|
|
1065
|
-
// "lines": [
|
|
1066
|
-
// {
|
|
1067
|
-
// "location": [
|
|
1068
|
-
// 42.208,
|
|
1069
|
-
// 297.014,
|
|
1070
|
-
// 119.874016,
|
|
1071
|
-
// 11.990997
|
|
1072
|
-
// ]
|
|
1073
|
-
// },
|
|
1074
|
-
// {
|
|
1075
|
-
// "location": [
|
|
1076
|
-
// 42.208,
|
|
1077
|
-
// 314.50302,
|
|
1078
|
-
// 119.874016,
|
|
1079
|
-
// 11.990997
|
|
1080
|
-
// ]
|
|
1081
|
-
// },
|
|
1082
|
-
// {
|
|
1083
|
-
// "location": [
|
|
1084
|
-
// 42.208,
|
|
1085
|
-
// 332.022,
|
|
1086
|
-
// 119.874016,
|
|
1087
|
-
// 11.990997
|
|
1088
|
-
// ]
|
|
1089
|
-
// },
|
|
1090
|
-
// {
|
|
1091
|
-
// "location": [
|
|
1092
|
-
// 42.208,
|
|
1093
|
-
// 349.398,
|
|
1094
|
-
// 119.874016,
|
|
1095
|
-
// 11.990997
|
|
1096
|
-
// ]
|
|
1097
|
-
// },
|
|
1098
|
-
// {
|
|
1099
|
-
// "location": [
|
|
1100
|
-
// 42.208,
|
|
1101
|
-
// 366.916,
|
|
1102
|
-
// 119.874016,
|
|
1103
|
-
// 11.990997
|
|
1104
|
-
// ]
|
|
1105
|
-
// },
|
|
1106
|
-
// {
|
|
1107
|
-
// "location": [
|
|
1108
|
-
// 362.409,
|
|
1109
|
-
// 270.311,
|
|
1110
|
-
// 47.951996,
|
|
1111
|
-
// 11.990997
|
|
1112
|
-
// ]
|
|
1113
|
-
// },
|
|
1114
|
-
// {
|
|
1115
|
-
// "location": [
|
|
1116
|
-
// 362.409,
|
|
1117
|
-
// 284.711,
|
|
1118
|
-
// 18.47815,
|
|
1119
|
-
// 11.990997
|
|
1120
|
-
// ]
|
|
1121
|
-
// },
|
|
1122
|
-
// {
|
|
1123
|
-
// "location": [
|
|
1124
|
-
// 362.409,
|
|
1125
|
-
// 300.018,
|
|
1126
|
-
// 74.64407,
|
|
1127
|
-
// 11.990997
|
|
1128
|
-
// ]
|
|
1129
|
-
// },
|
|
1130
|
-
// {
|
|
1131
|
-
// "location": [
|
|
1132
|
-
// 362.409,
|
|
1133
|
-
// 314.418,
|
|
1134
|
-
// 11.990997,
|
|
1135
|
-
// 11.990997
|
|
1136
|
-
// ]
|
|
1137
|
-
// },
|
|
1138
|
-
// {
|
|
1139
|
-
// "location": [
|
|
1140
|
-
// 363.713,
|
|
1141
|
-
// 330.009,
|
|
1142
|
-
// 83.93698,
|
|
1143
|
-
// 11.990997
|
|
1144
|
-
// ]
|
|
1145
|
-
// },
|
|
1146
|
-
// {
|
|
1147
|
-
// "location": [
|
|
1148
|
-
// 363.713,
|
|
1149
|
-
// 344.409,
|
|
1150
|
-
// 11.990997,
|
|
1151
|
-
// 11.990997
|
|
1152
|
-
// ]
|
|
1153
|
-
// },
|
|
1154
|
-
// {
|
|
1155
|
-
// "location": [
|
|
1156
|
-
// 363.798,
|
|
1157
|
-
// 359.915,
|
|
1158
|
-
// 131.90097,
|
|
1159
|
-
// 11.990997
|
|
1160
|
-
// ]
|
|
1161
|
-
// },
|
|
1162
|
-
// {
|
|
1163
|
-
// "location": [
|
|
1164
|
-
// 363.798,
|
|
1165
|
-
// 374.315,
|
|
1166
|
-
// 11.990997,
|
|
1167
|
-
// 11.990997
|
|
1168
|
-
// ]
|
|
1169
|
-
// },
|
|
1170
|
-
// {
|
|
1171
|
-
// "location": [
|
|
1172
|
-
// 363.798,
|
|
1173
|
-
// 389.905,
|
|
1174
|
-
// 131.90097,
|
|
1175
|
-
// 11.990997
|
|
1176
|
-
// ]
|
|
1177
|
-
// },
|
|
1178
|
-
// {
|
|
1179
|
-
// "location": [
|
|
1180
|
-
// 363.798,
|
|
1181
|
-
// 404.22,
|
|
1182
|
-
// 11.990997,
|
|
1183
|
-
// 11.990997
|
|
1184
|
-
// ]
|
|
1185
|
-
// },
|
|
1186
|
-
// {
|
|
1187
|
-
// "location": [
|
|
1188
|
-
// 362.409,
|
|
1189
|
-
// 419.811,
|
|
1190
|
-
// 112.02899,
|
|
1191
|
-
// 11.990997
|
|
1192
|
-
// ]
|
|
1193
|
-
// },
|
|
1194
|
-
// {
|
|
1195
|
-
// "location": [
|
|
1196
|
-
// 362.409,
|
|
1197
|
-
// 434.09702,
|
|
1198
|
-
// 11.990997,
|
|
1199
|
-
// 11.990997
|
|
1200
|
-
// ]
|
|
1201
|
-
// },
|
|
1202
|
-
// {
|
|
1203
|
-
// "location": [
|
|
1204
|
-
// 729.808,
|
|
1205
|
-
// 326.211,
|
|
1206
|
-
// 35.96106,
|
|
1207
|
-
// 11.990997
|
|
1208
|
-
// ]
|
|
1209
|
-
// }
|
|
1210
|
-
// ]
|
|
1211
|
-
// }
|
|
1212
|
-
// }
|
|
1213
|
-
// },
|
|
1214
|
-
// {
|
|
1215
|
-
// "id": "6501ae871169c35ace973a87",
|
|
1216
|
-
// "knowledgeId": "6501ae444f324a70bf677cce",
|
|
1217
|
-
// "mainId": "b3cec709ed904d56b29cb95362dc181f",
|
|
1218
|
-
// "page": 32,
|
|
1219
|
-
// "total": 118,
|
|
885
|
+
// "id": "6502b03a5dc4b63cce992224",
|
|
886
|
+
// "knowledgeId": "6502a777a7c9df4fb3115df8",
|
|
887
|
+
// "mainId": "09a585f5cecf43678a979b542e685cea",
|
|
888
|
+
// "page": 63,
|
|
889
|
+
// "total": 115,
|
|
1220
890
|
// "pageHeight": 540.0,
|
|
1221
891
|
// "pageWidth": 960.00946,
|
|
1222
|
-
// "publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/
|
|
892
|
+
// "publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/09a585f5cecf43678a979b542e685cea/2023/09/14/07/03/18/6502b0355dc4b63cce9921e3/63.pdf",
|
|
1223
893
|
// "extractInfo": {
|
|
1224
894
|
// "location": [
|
|
1225
|
-
//
|
|
1226
|
-
//
|
|
1227
|
-
//
|
|
1228
|
-
//
|
|
895
|
+
// 269.802,
|
|
896
|
+
// 284.004,
|
|
897
|
+
// 420.5398,
|
|
898
|
+
// 24.009003
|
|
1229
899
|
// ],
|
|
1230
|
-
// "content": "
|
|
900
|
+
// "content": "ios会崩溃的原因是,或者是文件太大了",
|
|
1231
901
|
// "lines": [
|
|
1232
902
|
// {
|
|
1233
|
-
// "content": "
|
|
903
|
+
// "content": "ios会崩溃的原因是,或者是文件太大了",
|
|
1234
904
|
// "location": [
|
|
1235
|
-
//
|
|
1236
|
-
//
|
|
1237
|
-
//
|
|
1238
|
-
//
|
|
905
|
+
// 269.802,
|
|
906
|
+
// 284.004,
|
|
907
|
+
// 420.5398,
|
|
908
|
+
// 24.009003
|
|
1239
909
|
// ]
|
|
1240
910
|
// }
|
|
1241
911
|
// ],
|
|
@@ -1244,25 +914,25 @@ export default {
|
|
|
1244
914
|
// "block": {
|
|
1245
915
|
// "type": "TEXT",
|
|
1246
916
|
// "location": [
|
|
1247
|
-
//
|
|
1248
|
-
//
|
|
1249
|
-
//
|
|
1250
|
-
//
|
|
917
|
+
// 269.802,
|
|
918
|
+
// 284.004,
|
|
919
|
+
// 420.5398,
|
|
920
|
+
// 24.009003
|
|
1251
921
|
// ],
|
|
1252
922
|
// "color": null,
|
|
1253
923
|
// "flowChart": null,
|
|
1254
924
|
// "image": null,
|
|
1255
925
|
// "table": null,
|
|
1256
926
|
// "text": {
|
|
1257
|
-
// "originText": "
|
|
1258
|
-
// "indexText": "
|
|
927
|
+
// "originText": "ios会崩溃的原因是,或者是文件太大了",
|
|
928
|
+
// "indexText": "ios会崩溃的原因是,或者是文件太大了",
|
|
1259
929
|
// "lines": [
|
|
1260
930
|
// {
|
|
1261
931
|
// "location": [
|
|
1262
|
-
//
|
|
1263
|
-
//
|
|
1264
|
-
//
|
|
1265
|
-
//
|
|
932
|
+
// 269.802,
|
|
933
|
+
// 284.004,
|
|
934
|
+
// 420.5398,
|
|
935
|
+
// 24.009003
|
|
1266
936
|
// ]
|
|
1267
937
|
// }
|
|
1268
938
|
// ]
|
|
@@ -1280,7 +950,6 @@ export default {
|
|
|
1280
950
|
this.cachePdf = res.data.data
|
|
1281
951
|
let publicPageFileUrl = res.data.data[0].publicPageFileUrl
|
|
1282
952
|
this.currentPage = 0
|
|
1283
|
-
// console.log(publicPageFileUrl.substring(publicPageFileUrl.lastIndexOf('.')));
|
|
1284
953
|
if (publicPageFileUrl.substring(publicPageFileUrl.lastIndexOf('.')) === '.pdf') {
|
|
1285
954
|
this.preViewType = 'pdf'
|
|
1286
955
|
this.setPageAllLine(this.cachePdf)
|