askbot-dragon 1.3.73 → 1.3.75
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
|
@@ -69,7 +69,8 @@ export default {
|
|
|
69
69
|
pageX2:0,
|
|
70
70
|
pageY2:0,
|
|
71
71
|
originScale:1,
|
|
72
|
-
}
|
|
72
|
+
},
|
|
73
|
+
isTouchMoved: false
|
|
73
74
|
}
|
|
74
75
|
},
|
|
75
76
|
// methods:{
|
|
@@ -601,7 +602,7 @@ export default {
|
|
|
601
602
|
this.loadPdfData(pageIndex)
|
|
602
603
|
},
|
|
603
604
|
pdfScroll (e) {
|
|
604
|
-
if(this.preViewType !== 'pdf') {
|
|
605
|
+
if(this.preViewType !== 'pdf' || !this.isTouchMoved) {
|
|
605
606
|
return
|
|
606
607
|
}
|
|
607
608
|
this.debounceScrollPdf(e, this)
|
|
@@ -835,6 +836,7 @@ export default {
|
|
|
835
836
|
// 获取放大或缩小的区域DOM
|
|
836
837
|
let matrix_box = this.contentView
|
|
837
838
|
matrix_box.addEventListener("touchstart", function (event) {
|
|
839
|
+
this.isTouchMoved = true
|
|
838
840
|
let touches = event.touches;
|
|
839
841
|
let events = touches[0];
|
|
840
842
|
let events2 = touches[1];
|
|
@@ -881,20 +883,19 @@ export default {
|
|
|
881
883
|
x: events2.pageX,
|
|
882
884
|
y: events2.pageY
|
|
883
885
|
}
|
|
884
|
-
)
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
// );
|
|
886
|
+
) - that.getDistance(
|
|
887
|
+
{
|
|
888
|
+
x: that.displacement.pageX,
|
|
889
|
+
y: that.displacement.pageY
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
x: that.displacement.pageX2,
|
|
893
|
+
y: that.displacement.pageY2
|
|
894
|
+
}
|
|
895
|
+
);
|
|
895
896
|
// 应用在元素上的缩放比例
|
|
896
897
|
let newScale = that.displacement.originScale * zoom;
|
|
897
|
-
console.log(newScale);
|
|
898
|
+
console.log(zoom, newScale);
|
|
898
899
|
// 最大缩放比例限制
|
|
899
900
|
if (newScale > 2) {
|
|
900
901
|
newScale = 2;
|
|
@@ -922,6 +923,9 @@ export default {
|
|
|
922
923
|
// matrix_box.style.transformOrigin = "0px 0px 0px";
|
|
923
924
|
}
|
|
924
925
|
},{ passive: false });
|
|
926
|
+
document.addEventListener('touchend',function() {
|
|
927
|
+
that.isTouchMoved = false
|
|
928
|
+
},{ passive: false })
|
|
925
929
|
});
|
|
926
930
|
},
|
|
927
931
|
getDistance(start, stop) {
|
|
@@ -951,156 +955,6 @@ export default {
|
|
|
951
955
|
// 在 pdf_view 下创建 所有canvs的容器
|
|
952
956
|
this.contentView = document.createElement('div')
|
|
953
957
|
this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + value.join(',')).then(res =>{
|
|
954
|
-
res.data = {
|
|
955
|
-
"data": [
|
|
956
|
-
{
|
|
957
|
-
"id": "64592044ec66de61a8971049",
|
|
958
|
-
"knowledgeId": "64591f8ca3222a26557e17f0",
|
|
959
|
-
"mainId": "137e3903781f45cb8f6d5c4a1e17ac9c",
|
|
960
|
-
"page": 1,
|
|
961
|
-
"total": 2,
|
|
962
|
-
"pageHeight": 841.9,
|
|
963
|
-
"pageWidth": 595.3,
|
|
964
|
-
"publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/137e3903781f45cb8f6d5c4a1e17ac9c/2023/05/09/12/16/02/64592042ec66de61a8970ff4/1.pdf",
|
|
965
|
-
"extractInfo": {
|
|
966
|
-
"location": [
|
|
967
|
-
90,
|
|
968
|
-
389.32,
|
|
969
|
-
419.05,
|
|
970
|
-
138.96997
|
|
971
|
-
],
|
|
972
|
-
"content": "没想到正直的魏绛一口谢绝了赠礼,并劝晋悼公说:“《书》曰:‘居安思危’,思则有备,有备无患。”意思是说,如今晋国虽然很强大昌盛,但是我们绝对不能因此而大意,因为人在安全的时候,一定要想到未来可能会发生的危险,这样才会先做准备,以避免失败和灾祸的发生。[2]",
|
|
973
|
-
"lines": [
|
|
974
|
-
{
|
|
975
|
-
"content": "没想到正直的魏绛一口谢绝了赠礼,并劝晋悼公说:“《书》曰:",
|
|
976
|
-
"location": [
|
|
977
|
-
111,
|
|
978
|
-
389.32,
|
|
979
|
-
398.05,
|
|
980
|
-
14.169983
|
|
981
|
-
]
|
|
982
|
-
},
|
|
983
|
-
{
|
|
984
|
-
"content": "‘居安思危’,思则有备,有备无患。”意思是说,如今晋国虽然很强大",
|
|
985
|
-
"location": [
|
|
986
|
-
90,
|
|
987
|
-
420.519,
|
|
988
|
-
415.32794,
|
|
989
|
-
14.17099
|
|
990
|
-
]
|
|
991
|
-
},
|
|
992
|
-
{
|
|
993
|
-
"content": "昌盛,但是我们绝对不能因此而大意,因为人在安全的时候,一定要",
|
|
994
|
-
"location": [
|
|
995
|
-
90,
|
|
996
|
-
451.84003,
|
|
997
|
-
415.3284,
|
|
998
|
-
14.049988
|
|
999
|
-
]
|
|
1000
|
-
},
|
|
1001
|
-
{
|
|
1002
|
-
"content": "想到未来可能会发生的危险,这样才会先做准备,以避免失败和灾祸",
|
|
1003
|
-
"location": [
|
|
1004
|
-
90,
|
|
1005
|
-
483.04,
|
|
1006
|
-
415.32837,
|
|
1007
|
-
14.049988
|
|
1008
|
-
]
|
|
1009
|
-
},
|
|
1010
|
-
{
|
|
1011
|
-
"content": "的发生。[2]",
|
|
1012
|
-
"location": [
|
|
1013
|
-
90,
|
|
1014
|
-
514.24,
|
|
1015
|
-
72.16771,
|
|
1016
|
-
14.049988
|
|
1017
|
-
]
|
|
1018
|
-
}
|
|
1019
|
-
],
|
|
1020
|
-
"tagId": null
|
|
1021
|
-
}
|
|
1022
|
-
},
|
|
1023
|
-
{
|
|
1024
|
-
"id": "64592044ec66de61a897104d",
|
|
1025
|
-
"knowledgeId": "64591f8ca3222a26557e17f0",
|
|
1026
|
-
"mainId": "137e3903781f45cb8f6d5c4a1e17ac9c",
|
|
1027
|
-
"page": 2,
|
|
1028
|
-
"total": 2,
|
|
1029
|
-
"pageHeight": 841.9,
|
|
1030
|
-
"pageWidth": 595.3,
|
|
1031
|
-
"publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/137e3903781f45cb8f6d5c4a1e17ac9c/2023/05/09/12/16/02/64592042ec66de61a8970ff4/2.pdf",
|
|
1032
|
-
"extractInfo": {
|
|
1033
|
-
"location": [
|
|
1034
|
-
90,
|
|
1035
|
-
109.84001,
|
|
1036
|
-
415.33,
|
|
1037
|
-
170.05
|
|
1038
|
-
],
|
|
1039
|
-
"content": "家来说则更是如此。居安思危是一种超前的危机意识和忧患意识,人的一生当中不可能始终是一帆风顺,总会有曲折与风雨相伴,坎坷与逆境相随。所以,面对任何事情,人们都应当做到未雨绸缪,这样在遇到突发情况时才不至于手忙脚乱。在和平时期,要有居安思危的应变措施,在做好物质准备的同时,思想上还要常守不虞之戒,牢记失戒的教训,只有做到居安思危,才能有备无患,防患于未然。",
|
|
1040
|
-
"lines": [
|
|
1041
|
-
{
|
|
1042
|
-
"content": "家来说则更是如此。居安思危是一种超前的危机意识和忧患意识,人",
|
|
1043
|
-
"location": [
|
|
1044
|
-
90,
|
|
1045
|
-
109.84001,
|
|
1046
|
-
415.33,
|
|
1047
|
-
14.050003
|
|
1048
|
-
]
|
|
1049
|
-
},
|
|
1050
|
-
{
|
|
1051
|
-
"content": "的一生当中不可能始终是一帆风顺,总会有曲折与风雨相伴,坎坷与",
|
|
1052
|
-
"location": [
|
|
1053
|
-
90,
|
|
1054
|
-
141.03996,
|
|
1055
|
-
415.3284,
|
|
1056
|
-
14.050003
|
|
1057
|
-
]
|
|
1058
|
-
},
|
|
1059
|
-
{
|
|
1060
|
-
"content": "逆境相随。所以,面对任何事情,人们都应当做到未雨绸缪,这样在",
|
|
1061
|
-
"location": [
|
|
1062
|
-
90,
|
|
1063
|
-
172.23997,
|
|
1064
|
-
415.3284,
|
|
1065
|
-
14.050003
|
|
1066
|
-
]
|
|
1067
|
-
},
|
|
1068
|
-
{
|
|
1069
|
-
"content": "遇到突发情况时才不至于手忙脚乱。在和平时期,要有居安思危的应",
|
|
1070
|
-
"location": [
|
|
1071
|
-
90,
|
|
1072
|
-
203.43999,
|
|
1073
|
-
415.32837,
|
|
1074
|
-
14.050003
|
|
1075
|
-
]
|
|
1076
|
-
},
|
|
1077
|
-
{
|
|
1078
|
-
"content": "变措施,在做好物质准备的同时,思想上还要常守不虞之戒,牢记失",
|
|
1079
|
-
"location": [
|
|
1080
|
-
90,
|
|
1081
|
-
234.64,
|
|
1082
|
-
415.3284,
|
|
1083
|
-
14.050003
|
|
1084
|
-
]
|
|
1085
|
-
},
|
|
1086
|
-
{
|
|
1087
|
-
"content": "戒的教训,只有做到居安思危,才能有备无患,防患于未然。",
|
|
1088
|
-
"location": [
|
|
1089
|
-
90,
|
|
1090
|
-
265.84003,
|
|
1091
|
-
378.0035,
|
|
1092
|
-
14.049988
|
|
1093
|
-
]
|
|
1094
|
-
}
|
|
1095
|
-
],
|
|
1096
|
-
"tagId": null
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
],
|
|
1100
|
-
"code": "0",
|
|
1101
|
-
"msg": null,
|
|
1102
|
-
"traceId": null
|
|
1103
|
-
}
|
|
1104
958
|
if (res.data.code == 0) {
|
|
1105
959
|
// tagIds 会按照gpt识别的生成有序的数组,前端直接按照下标的顺序取就可以了
|
|
1106
960
|
// 缓存拿到的所有数据
|
|
@@ -1156,14 +1010,12 @@ export default {
|
|
|
1156
1010
|
}
|
|
1157
1011
|
})
|
|
1158
1012
|
}
|
|
1159
|
-
console.log(value);
|
|
1160
1013
|
},
|
|
1161
1014
|
deep:true,
|
|
1162
1015
|
immediate:true
|
|
1163
1016
|
}
|
|
1164
1017
|
},
|
|
1165
1018
|
mounted () {
|
|
1166
|
-
|
|
1167
1019
|
}
|
|
1168
1020
|
}
|
|
1169
1021
|
</script>
|