askbot-dragon 1.3.82 → 1.3.83
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 +3 -152
package/package.json
CHANGED
|
@@ -175,7 +175,7 @@ export default {
|
|
|
175
175
|
this.pageSize = pageSize
|
|
176
176
|
// 创建内容绘制区,并设置大小
|
|
177
177
|
this.contentView.style.width = `${pageSize.width}px`;
|
|
178
|
-
this.contentView.style.height = `${(this.totalPageCount * (pageSize.height + this.PAGE_INTVERVAL)) + this.PAGE_INTVERVAL}px`;
|
|
178
|
+
this.contentView.style.height = `${(this.totalPageCount * (pageSize.height + this.PAGE_INTVERVAL)) * (this.$refs.pdfView.clientWidth / pageSize.width) + this.PAGE_INTVERVAL}px`;
|
|
179
179
|
this.contentView.style.margin = '0 auto 0'
|
|
180
180
|
this.contentView.style.position = 'relative'
|
|
181
181
|
// contentView.style.overflowY = 'auto'
|
|
@@ -263,6 +263,8 @@ export default {
|
|
|
263
263
|
pageDom.appendChild(textLayer.textLayerDiv);
|
|
264
264
|
page.dom = pageDom;
|
|
265
265
|
this.contentView.appendChild(pageDom);
|
|
266
|
+
this.contentView.style.transform = `scale(${this.$refs.pdfView.clientWidth / this.pageSize.width}, ${this.$refs.pdfView.clientWidth / this.pageSize.width})`
|
|
267
|
+
|
|
266
268
|
if (this.changetoolbar) {
|
|
267
269
|
setTimeout(() => {
|
|
268
270
|
this.renderHighlights()
|
|
@@ -284,7 +286,6 @@ export default {
|
|
|
284
286
|
} else {
|
|
285
287
|
this.$refs.pdfView.scrollTop = `${((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL))}`
|
|
286
288
|
}
|
|
287
|
-
this.contentView.style.transform = "scale(" + this.$refs.pdfView.clientWidth / this.pageSize.width + ")";
|
|
288
289
|
// zoomElement(this.contentView)
|
|
289
290
|
}, 100)
|
|
290
291
|
}
|
|
@@ -665,156 +666,6 @@ export default {
|
|
|
665
666
|
this.contentView = document.createElement('div')
|
|
666
667
|
this.contentView.style.transformOrigin = '0px 0px 0px'
|
|
667
668
|
this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + value.join(',')).then(res =>{
|
|
668
|
-
res.data = {
|
|
669
|
-
"data": [
|
|
670
|
-
{
|
|
671
|
-
"id": "64592044ec66de61a8971049",
|
|
672
|
-
"knowledgeId": "64591f8ca3222a26557e17f0",
|
|
673
|
-
"mainId": "137e3903781f45cb8f6d5c4a1e17ac9c",
|
|
674
|
-
"page": 1,
|
|
675
|
-
"total": 2,
|
|
676
|
-
"pageHeight": 841.9,
|
|
677
|
-
"pageWidth": 595.3,
|
|
678
|
-
"publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/137e3903781f45cb8f6d5c4a1e17ac9c/2023/05/09/12/16/02/64592042ec66de61a8970ff4/1.pdf",
|
|
679
|
-
"extractInfo": {
|
|
680
|
-
"location": [
|
|
681
|
-
90,
|
|
682
|
-
389.32,
|
|
683
|
-
419.05,
|
|
684
|
-
138.96997
|
|
685
|
-
],
|
|
686
|
-
"content": "没想到正直的魏绛一口谢绝了赠礼,并劝晋悼公说:“《书》曰:‘居安思危’,思则有备,有备无患。”意思是说,如今晋国虽然很强大昌盛,但是我们绝对不能因此而大意,因为人在安全的时候,一定要想到未来可能会发生的危险,这样才会先做准备,以避免失败和灾祸的发生。[2]",
|
|
687
|
-
"lines": [
|
|
688
|
-
{
|
|
689
|
-
"content": "没想到正直的魏绛一口谢绝了赠礼,并劝晋悼公说:“《书》曰:",
|
|
690
|
-
"location": [
|
|
691
|
-
111,
|
|
692
|
-
389.32,
|
|
693
|
-
398.05,
|
|
694
|
-
14.169983
|
|
695
|
-
]
|
|
696
|
-
},
|
|
697
|
-
{
|
|
698
|
-
"content": "‘居安思危’,思则有备,有备无患。”意思是说,如今晋国虽然很强大",
|
|
699
|
-
"location": [
|
|
700
|
-
90,
|
|
701
|
-
420.519,
|
|
702
|
-
415.32794,
|
|
703
|
-
14.17099
|
|
704
|
-
]
|
|
705
|
-
},
|
|
706
|
-
{
|
|
707
|
-
"content": "昌盛,但是我们绝对不能因此而大意,因为人在安全的时候,一定要",
|
|
708
|
-
"location": [
|
|
709
|
-
90,
|
|
710
|
-
451.84003,
|
|
711
|
-
415.3284,
|
|
712
|
-
14.049988
|
|
713
|
-
]
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
"content": "想到未来可能会发生的危险,这样才会先做准备,以避免失败和灾祸",
|
|
717
|
-
"location": [
|
|
718
|
-
90,
|
|
719
|
-
483.04,
|
|
720
|
-
415.32837,
|
|
721
|
-
14.049988
|
|
722
|
-
]
|
|
723
|
-
},
|
|
724
|
-
{
|
|
725
|
-
"content": "的发生。[2]",
|
|
726
|
-
"location": [
|
|
727
|
-
90,
|
|
728
|
-
514.24,
|
|
729
|
-
72.16771,
|
|
730
|
-
14.049988
|
|
731
|
-
]
|
|
732
|
-
}
|
|
733
|
-
],
|
|
734
|
-
"tagId": null
|
|
735
|
-
}
|
|
736
|
-
},
|
|
737
|
-
{
|
|
738
|
-
"id": "64592044ec66de61a897104d",
|
|
739
|
-
"knowledgeId": "64591f8ca3222a26557e17f0",
|
|
740
|
-
"mainId": "137e3903781f45cb8f6d5c4a1e17ac9c",
|
|
741
|
-
"page": 2,
|
|
742
|
-
"total": 2,
|
|
743
|
-
"pageHeight": 841.9,
|
|
744
|
-
"pageWidth": 595.3,
|
|
745
|
-
"publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/137e3903781f45cb8f6d5c4a1e17ac9c/2023/05/09/12/16/02/64592042ec66de61a8970ff4/2.pdf",
|
|
746
|
-
"extractInfo": {
|
|
747
|
-
"location": [
|
|
748
|
-
90,
|
|
749
|
-
109.84001,
|
|
750
|
-
415.33,
|
|
751
|
-
170.05
|
|
752
|
-
],
|
|
753
|
-
"content": "家来说则更是如此。居安思危是一种超前的危机意识和忧患意识,人的一生当中不可能始终是一帆风顺,总会有曲折与风雨相伴,坎坷与逆境相随。所以,面对任何事情,人们都应当做到未雨绸缪,这样在遇到突发情况时才不至于手忙脚乱。在和平时期,要有居安思危的应变措施,在做好物质准备的同时,思想上还要常守不虞之戒,牢记失戒的教训,只有做到居安思危,才能有备无患,防患于未然。",
|
|
754
|
-
"lines": [
|
|
755
|
-
{
|
|
756
|
-
"content": "家来说则更是如此。居安思危是一种超前的危机意识和忧患意识,人",
|
|
757
|
-
"location": [
|
|
758
|
-
90,
|
|
759
|
-
109.84001,
|
|
760
|
-
415.33,
|
|
761
|
-
14.050003
|
|
762
|
-
]
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
"content": "的一生当中不可能始终是一帆风顺,总会有曲折与风雨相伴,坎坷与",
|
|
766
|
-
"location": [
|
|
767
|
-
90,
|
|
768
|
-
141.03996,
|
|
769
|
-
415.3284,
|
|
770
|
-
14.050003
|
|
771
|
-
]
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
"content": "逆境相随。所以,面对任何事情,人们都应当做到未雨绸缪,这样在",
|
|
775
|
-
"location": [
|
|
776
|
-
90,
|
|
777
|
-
172.23997,
|
|
778
|
-
415.3284,
|
|
779
|
-
14.050003
|
|
780
|
-
]
|
|
781
|
-
},
|
|
782
|
-
{
|
|
783
|
-
"content": "遇到突发情况时才不至于手忙脚乱。在和平时期,要有居安思危的应",
|
|
784
|
-
"location": [
|
|
785
|
-
90,
|
|
786
|
-
203.43999,
|
|
787
|
-
415.32837,
|
|
788
|
-
14.050003
|
|
789
|
-
]
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
"content": "变措施,在做好物质准备的同时,思想上还要常守不虞之戒,牢记失",
|
|
793
|
-
"location": [
|
|
794
|
-
90,
|
|
795
|
-
234.64,
|
|
796
|
-
415.3284,
|
|
797
|
-
14.050003
|
|
798
|
-
]
|
|
799
|
-
},
|
|
800
|
-
{
|
|
801
|
-
"content": "戒的教训,只有做到居安思危,才能有备无患,防患于未然。",
|
|
802
|
-
"location": [
|
|
803
|
-
90,
|
|
804
|
-
265.84003,
|
|
805
|
-
378.0035,
|
|
806
|
-
14.049988
|
|
807
|
-
]
|
|
808
|
-
}
|
|
809
|
-
],
|
|
810
|
-
"tagId": null
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
],
|
|
814
|
-
"code": "0",
|
|
815
|
-
"msg": null,
|
|
816
|
-
"traceId": null
|
|
817
|
-
}
|
|
818
669
|
if (res.data.code == 0) {
|
|
819
670
|
// tagIds 会按照gpt识别的生成有序的数组,前端直接按照下标的顺序取就可以了
|
|
820
671
|
// 缓存拿到的所有数据
|