askbot-dragon 1.3.72 → 1.3.74

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "1.3.72",
3
+ "version": "1.3.74",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -159,7 +159,6 @@ export default {
159
159
  //预览图片
160
160
  lookAttach(url, item, event) {
161
161
  event.preventDefault();
162
- this.isAskLightning = 2
163
162
  if (this.isAskLightning == 1){
164
163
  window.parent.postMessage({
165
164
  data: "bot_preview",
@@ -873,18 +873,15 @@ export default {
873
873
  that.displacement.pageY2 = events2.pageY;
874
874
  }
875
875
  // 双指缩放比例计算
876
- let zoom =
877
- that.getDistance(
878
- {
879
- x: events.pageX,
880
- y: events.pageY
881
- },
876
+ let zoom = that.getDistance({
877
+ x: events.pageX,
878
+ y: events.pageY
879
+ },
882
880
  {
883
881
  x: events2.pageX,
884
882
  y: events2.pageY
885
883
  }
886
- )
887
- that.getDistance(
884
+ ) - that.getDistance(
888
885
  {
889
886
  x: that.displacement.pageX,
890
887
  y: that.displacement.pageY
@@ -896,6 +893,7 @@ export default {
896
893
  );
897
894
  // 应用在元素上的缩放比例
898
895
  let newScale = that.displacement.originScale * zoom;
896
+ console.log(zoom, newScale);
899
897
  // 最大缩放比例限制
900
898
  if (newScale > 2) {
901
899
  newScale = 2;
@@ -906,15 +904,15 @@ export default {
906
904
  // 图像应用缩放效果
907
905
  that.pages.forEach((item, index) =>{
908
906
  if(item.dom) {
909
- item.dom.children.forEach( childDom =>{
910
- if(childDom.getAttribute('react-count')) {
911
- childDom.style.transform = "scale(" + newScale + ")";
912
- childDom.style.transformOrigin = "0px 0px 0px";
913
- } else {
914
- item.dom = null
915
- that.startRenderPages(item.pdfPage, null, index)
916
- }
917
- })
907
+ // item.dom.children.forEach( childDom =>{
908
+ // if(childDom.getAttribute('react-count')) {
909
+ // childDom.style.transform = "scale(" + newScale + ")";
910
+ // childDom.style.transformOrigin = "0px 0px 0px";
911
+ // } else {
912
+ item.dom = null
913
+ that.startRenderPages(item.pdfPage, null, index)
914
+ // }
915
+ // })
918
916
  }
919
917
  })
920
918
  // console.log(newScale);
@@ -952,156 +950,6 @@ export default {
952
950
  // 在 pdf_view 下创建 所有canvs的容器
953
951
  this.contentView = document.createElement('div')
954
952
  this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + value.join(',')).then(res =>{
955
- res.data = {
956
- "data": [
957
- {
958
- "id": "64592044ec66de61a8971049",
959
- "knowledgeId": "64591f8ca3222a26557e17f0",
960
- "mainId": "137e3903781f45cb8f6d5c4a1e17ac9c",
961
- "page": 1,
962
- "total": 2,
963
- "pageHeight": 841.9,
964
- "pageWidth": 595.3,
965
- "publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/137e3903781f45cb8f6d5c4a1e17ac9c/2023/05/09/12/16/02/64592042ec66de61a8970ff4/1.pdf",
966
- "extractInfo": {
967
- "location": [
968
- 90,
969
- 389.32,
970
- 419.05,
971
- 138.96997
972
- ],
973
- "content": "没想到正直的魏绛一口谢绝了赠礼,并劝晋悼公说:“《书》曰:‘居安思危’,思则有备,有备无患。”意思是说,如今晋国虽然很强大昌盛,但是我们绝对不能因此而大意,因为人在安全的时候,一定要想到未来可能会发生的危险,这样才会先做准备,以避免失败和灾祸的发生。[2]",
974
- "lines": [
975
- {
976
- "content": "没想到正直的魏绛一口谢绝了赠礼,并劝晋悼公说:“《书》曰:",
977
- "location": [
978
- 111,
979
- 389.32,
980
- 398.05,
981
- 14.169983
982
- ]
983
- },
984
- {
985
- "content": "‘居安思危’,思则有备,有备无患。”意思是说,如今晋国虽然很强大",
986
- "location": [
987
- 90,
988
- 420.519,
989
- 415.32794,
990
- 14.17099
991
- ]
992
- },
993
- {
994
- "content": "昌盛,但是我们绝对不能因此而大意,因为人在安全的时候,一定要",
995
- "location": [
996
- 90,
997
- 451.84003,
998
- 415.3284,
999
- 14.049988
1000
- ]
1001
- },
1002
- {
1003
- "content": "想到未来可能会发生的危险,这样才会先做准备,以避免失败和灾祸",
1004
- "location": [
1005
- 90,
1006
- 483.04,
1007
- 415.32837,
1008
- 14.049988
1009
- ]
1010
- },
1011
- {
1012
- "content": "的发生。[2]",
1013
- "location": [
1014
- 90,
1015
- 514.24,
1016
- 72.16771,
1017
- 14.049988
1018
- ]
1019
- }
1020
- ],
1021
- "tagId": null
1022
- }
1023
- },
1024
- {
1025
- "id": "64592044ec66de61a897104d",
1026
- "knowledgeId": "64591f8ca3222a26557e17f0",
1027
- "mainId": "137e3903781f45cb8f6d5c4a1e17ac9c",
1028
- "page": 2,
1029
- "total": 2,
1030
- "pageHeight": 841.9,
1031
- "pageWidth": 595.3,
1032
- "publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/137e3903781f45cb8f6d5c4a1e17ac9c/2023/05/09/12/16/02/64592042ec66de61a8970ff4/2.pdf",
1033
- "extractInfo": {
1034
- "location": [
1035
- 90,
1036
- 109.84001,
1037
- 415.33,
1038
- 170.05
1039
- ],
1040
- "content": "家来说则更是如此。居安思危是一种超前的危机意识和忧患意识,人的一生当中不可能始终是一帆风顺,总会有曲折与风雨相伴,坎坷与逆境相随。所以,面对任何事情,人们都应当做到未雨绸缪,这样在遇到突发情况时才不至于手忙脚乱。在和平时期,要有居安思危的应变措施,在做好物质准备的同时,思想上还要常守不虞之戒,牢记失戒的教训,只有做到居安思危,才能有备无患,防患于未然。",
1041
- "lines": [
1042
- {
1043
- "content": "家来说则更是如此。居安思危是一种超前的危机意识和忧患意识,人",
1044
- "location": [
1045
- 90,
1046
- 109.84001,
1047
- 415.33,
1048
- 14.050003
1049
- ]
1050
- },
1051
- {
1052
- "content": "的一生当中不可能始终是一帆风顺,总会有曲折与风雨相伴,坎坷与",
1053
- "location": [
1054
- 90,
1055
- 141.03996,
1056
- 415.3284,
1057
- 14.050003
1058
- ]
1059
- },
1060
- {
1061
- "content": "逆境相随。所以,面对任何事情,人们都应当做到未雨绸缪,这样在",
1062
- "location": [
1063
- 90,
1064
- 172.23997,
1065
- 415.3284,
1066
- 14.050003
1067
- ]
1068
- },
1069
- {
1070
- "content": "遇到突发情况时才不至于手忙脚乱。在和平时期,要有居安思危的应",
1071
- "location": [
1072
- 90,
1073
- 203.43999,
1074
- 415.32837,
1075
- 14.050003
1076
- ]
1077
- },
1078
- {
1079
- "content": "变措施,在做好物质准备的同时,思想上还要常守不虞之戒,牢记失",
1080
- "location": [
1081
- 90,
1082
- 234.64,
1083
- 415.3284,
1084
- 14.050003
1085
- ]
1086
- },
1087
- {
1088
- "content": "戒的教训,只有做到居安思危,才能有备无患,防患于未然。",
1089
- "location": [
1090
- 90,
1091
- 265.84003,
1092
- 378.0035,
1093
- 14.049988
1094
- ]
1095
- }
1096
- ],
1097
- "tagId": null
1098
- }
1099
- }
1100
- ],
1101
- "code": "0",
1102
- "msg": null,
1103
- "traceId": null
1104
- }
1105
953
  if (res.data.code == 0) {
1106
954
  // tagIds 会按照gpt识别的生成有序的数组,前端直接按照下标的顺序取就可以了
1107
955
  // 缓存拿到的所有数据
@@ -1157,14 +1005,12 @@ export default {
1157
1005
  }
1158
1006
  })
1159
1007
  }
1160
- console.log(value);
1161
1008
  },
1162
1009
  deep:true,
1163
1010
  immediate:true
1164
1011
  }
1165
1012
  },
1166
1013
  mounted () {
1167
-
1168
1014
  }
1169
1015
  }
1170
1016
  </script>