askbot-dragon 1.3.64 → 1.3.65

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.64",
3
+ "version": "1.3.65",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -165,11 +165,14 @@ export default {
165
165
  url: url
166
166
  },"*");
167
167
  } else {
168
- if (isMobile()) {
169
- this.$refs.previewPdf.previewShowPopup = false;
170
- } else {
171
- this.$refs.previewPdf.drawer = false;
172
- }
168
+ // if (isMobile()) {
169
+ // this.$refs.previewPdf.drawer = true;
170
+ // this.$refs.previewPdf.previewShowPopup = false;
171
+ // } else {
172
+ // this.$refs.previewPdf.drawer = false;
173
+ // }
174
+ this.$refs.previewPdf.previewShowPopup = false;
175
+ this.$refs.previewPdf.drawer = false;
173
176
  let index = url.lastIndexOf('?')
174
177
  let type = ''
175
178
  let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
@@ -190,8 +193,10 @@ export default {
190
193
  if(res.data.code == '0') {
191
194
  this.previewHref = res.data.data;
192
195
  if (isMobile()){
196
+ this.$refs.previewPdf.drawer = true;
193
197
  this.$refs.previewPdf.previewShowPopup = true;
194
198
  } else {
199
+ this.$refs.previewPdf.previewShowPopup = false;
195
200
  this.$refs.previewPdf.drawer = true;
196
201
  }
197
202
  this.$refs.previewPdf.fileType = type
@@ -210,7 +215,6 @@ export default {
210
215
  }
211
216
  })
212
217
  }
213
-
214
218
  },
215
219
  fileType (url) {
216
220
  const fileType = url.substring(url.lastIndexOf('.'));
@@ -61,7 +61,15 @@ export default {
61
61
  currentPage: 0,
62
62
  changetoolbar: false,
63
63
  allTr:[],
64
- preViewType: 'pdf'
64
+ preViewType: 'pdf',
65
+ displacement:{
66
+ pageX:0,
67
+ pageY:0,
68
+ moveable:false,
69
+ pageX2:0,
70
+ pageY2:0,
71
+ originScale:1,
72
+ }
65
73
  }
66
74
  },
67
75
  // methods:{
@@ -827,14 +835,14 @@ export default {
827
835
  that.displacement.pageY2 = events2.pageY;
828
836
  }
829
837
 
830
- that.displacement.originScale = that.displacement.scale || 1;
838
+ that.displacement.originScale = this.scale || 1;
831
839
  // console.log(that.displacement);
832
840
  });
833
841
  document.addEventListener("touchmove", function (event) {
834
842
  if (!that.displacement.moveable) {
835
843
  return;
836
844
  }
837
- event.preventDefault();
845
+ // event.preventDefault();
838
846
  let touches = event.touches;
839
847
  let events = touches[0];
840
848
  let events2 = touches[1];
@@ -899,156 +907,6 @@ export default {
899
907
  // 在 pdf_view 下创建 所有canvs的容器
900
908
  this.contentView = document.createElement('div')
901
909
  this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + value.join(',')).then(res =>{
902
- res.data = {
903
- "data": [
904
- {
905
- "id": "64592044ec66de61a8971049",
906
- "knowledgeId": "64591f8ca3222a26557e17f0",
907
- "mainId": "137e3903781f45cb8f6d5c4a1e17ac9c",
908
- "page": 1,
909
- "total": 2,
910
- "pageHeight": 841.9,
911
- "pageWidth": 595.3,
912
- "publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/137e3903781f45cb8f6d5c4a1e17ac9c/2023/05/09/12/16/02/64592042ec66de61a8970ff4/1.pdf",
913
- "extractInfo": {
914
- "location": [
915
- 90,
916
- 389.32,
917
- 419.05,
918
- 138.96997
919
- ],
920
- "content": "没想到正直的魏绛一口谢绝了赠礼,并劝晋悼公说:“《书》曰:‘居安思危’,思则有备,有备无患。”意思是说,如今晋国虽然很强大昌盛,但是我们绝对不能因此而大意,因为人在安全的时候,一定要想到未来可能会发生的危险,这样才会先做准备,以避免失败和灾祸的发生。[2]",
921
- "lines": [
922
- {
923
- "content": "没想到正直的魏绛一口谢绝了赠礼,并劝晋悼公说:“《书》曰:",
924
- "location": [
925
- 111,
926
- 389.32,
927
- 398.05,
928
- 14.169983
929
- ]
930
- },
931
- {
932
- "content": "‘居安思危’,思则有备,有备无患。”意思是说,如今晋国虽然很强大",
933
- "location": [
934
- 90,
935
- 420.519,
936
- 415.32794,
937
- 14.17099
938
- ]
939
- },
940
- {
941
- "content": "昌盛,但是我们绝对不能因此而大意,因为人在安全的时候,一定要",
942
- "location": [
943
- 90,
944
- 451.84003,
945
- 415.3284,
946
- 14.049988
947
- ]
948
- },
949
- {
950
- "content": "想到未来可能会发生的危险,这样才会先做准备,以避免失败和灾祸",
951
- "location": [
952
- 90,
953
- 483.04,
954
- 415.32837,
955
- 14.049988
956
- ]
957
- },
958
- {
959
- "content": "的发生。[2]",
960
- "location": [
961
- 90,
962
- 514.24,
963
- 72.16771,
964
- 14.049988
965
- ]
966
- }
967
- ],
968
- "tagId": null
969
- }
970
- },
971
- {
972
- "id": "64592044ec66de61a897104d",
973
- "knowledgeId": "64591f8ca3222a26557e17f0",
974
- "mainId": "137e3903781f45cb8f6d5c4a1e17ac9c",
975
- "page": 2,
976
- "total": 2,
977
- "pageHeight": 841.9,
978
- "pageWidth": 595.3,
979
- "publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/137e3903781f45cb8f6d5c4a1e17ac9c/2023/05/09/12/16/02/64592042ec66de61a8970ff4/2.pdf",
980
- "extractInfo": {
981
- "location": [
982
- 90,
983
- 109.84001,
984
- 415.33,
985
- 170.05
986
- ],
987
- "content": "家来说则更是如此。居安思危是一种超前的危机意识和忧患意识,人的一生当中不可能始终是一帆风顺,总会有曲折与风雨相伴,坎坷与逆境相随。所以,面对任何事情,人们都应当做到未雨绸缪,这样在遇到突发情况时才不至于手忙脚乱。在和平时期,要有居安思危的应变措施,在做好物质准备的同时,思想上还要常守不虞之戒,牢记失戒的教训,只有做到居安思危,才能有备无患,防患于未然。",
988
- "lines": [
989
- {
990
- "content": "家来说则更是如此。居安思危是一种超前的危机意识和忧患意识,人",
991
- "location": [
992
- 90,
993
- 109.84001,
994
- 415.33,
995
- 14.050003
996
- ]
997
- },
998
- {
999
- "content": "的一生当中不可能始终是一帆风顺,总会有曲折与风雨相伴,坎坷与",
1000
- "location": [
1001
- 90,
1002
- 141.03996,
1003
- 415.3284,
1004
- 14.050003
1005
- ]
1006
- },
1007
- {
1008
- "content": "逆境相随。所以,面对任何事情,人们都应当做到未雨绸缪,这样在",
1009
- "location": [
1010
- 90,
1011
- 172.23997,
1012
- 415.3284,
1013
- 14.050003
1014
- ]
1015
- },
1016
- {
1017
- "content": "遇到突发情况时才不至于手忙脚乱。在和平时期,要有居安思危的应",
1018
- "location": [
1019
- 90,
1020
- 203.43999,
1021
- 415.32837,
1022
- 14.050003
1023
- ]
1024
- },
1025
- {
1026
- "content": "变措施,在做好物质准备的同时,思想上还要常守不虞之戒,牢记失",
1027
- "location": [
1028
- 90,
1029
- 234.64,
1030
- 415.3284,
1031
- 14.050003
1032
- ]
1033
- },
1034
- {
1035
- "content": "戒的教训,只有做到居安思危,才能有备无患,防患于未然。",
1036
- "location": [
1037
- 90,
1038
- 265.84003,
1039
- 378.0035,
1040
- 14.049988
1041
- ]
1042
- }
1043
- ],
1044
- "tagId": null
1045
- }
1046
- }
1047
- ],
1048
- "code": "0",
1049
- "msg": null,
1050
- "traceId": null
1051
- }
1052
910
  if (res.data.code == 0) {
1053
911
  // tagIds 会按照gpt识别的生成有序的数组,前端直接按照下标的顺序取就可以了
1054
912
  // 缓存拿到的所有数据
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}" v-if="previewShowPopup">
2
+ <!-- <van-popup v-model="previewShowPopup" position="bottom" :style="{ height: '90%', background:'#FFFFFF'}" v-if="previewShowPopup">
3
3
  <div class="footer">
4
4
  <span>查看详情</span>
5
5
  <section @click="close">
@@ -32,14 +32,17 @@
32
32
  <div class="loading_img" v-show="loading">
33
33
  <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
34
34
  </div>
35
- </van-popup>
35
+ </van-popup> -->
36
36
  <el-drawer
37
37
  title="我是标题"
38
38
  :visible.sync="drawer"
39
- v-else-if="drawer"
40
39
  :with-header="false"
41
- size="65%"
40
+ :append-to-body="true"
41
+ :destroy-on-close="true"
42
+ :direction="previewShowPopup ? 'btt' : 'ltr'"
43
+ :size="previewShowPopup ? '90%' : '65%'"
42
44
  >
45
+ <!-- v-else-if="drawer" -->
43
46
  <div class="drawer-footer">
44
47
  <span>查看详情</span>
45
48
  <section @click="close">