askbot-dragon 1.5.13 → 1.5.15
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
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|
|
69
69
|
</div>
|
|
70
|
-
<previewPdf ref="previewPdf" :url="previewHref" officePreviewType="pdf"></previewPdf>
|
|
70
|
+
<previewPdf ref="previewPdf" :url="previewHref" :sourceFileType="sourceFileType" officePreviewType="pdf"></previewPdf>
|
|
71
71
|
</div>
|
|
72
72
|
</template>
|
|
73
73
|
|
|
@@ -82,6 +82,7 @@ export default {
|
|
|
82
82
|
return {
|
|
83
83
|
isPC: true,
|
|
84
84
|
previewHref: "",
|
|
85
|
+
sourceFileType:'',
|
|
85
86
|
docSource: {
|
|
86
87
|
LOCAL_FILE: "来源于本地文件",
|
|
87
88
|
CREATED_BY_ONESELF: "来源于自建知识",
|
|
@@ -232,6 +233,7 @@ export default {
|
|
|
232
233
|
}).then(res =>{
|
|
233
234
|
if(res.data.code == '0') {
|
|
234
235
|
this.previewHref = res.data.data;
|
|
236
|
+
this.sourceFileType = url.substring(url.lastIndexOf('.'))
|
|
235
237
|
if (isMobile()){
|
|
236
238
|
this.$refs.previewPdf.drawer = true;
|
|
237
239
|
this.$refs.previewPdf.previewShowPopup = true;
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
192
192
|
"images": [{url: 'https://static.guoranbot.com/images/knowledge/e0f6898c6b0d47fa98e8f71ceab1bde8/安全标志--禁止标志.png'}],
|
|
193
193
|
"actionType": "answer_doc_knowledge",
|
|
194
194
|
"text": "中国的省份名称有湖北省、广西壮族自治区等。",
|
|
195
|
-
"list": [{ "tagIds": [], "format": "yqhtml", "srcContentId": "8ee0fa9bb5a89ea01f588843589bf931", "updateTime": "2023-04-14 20:15:50", "source": "YUQUE", "srcContent": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/14/19/54/31/acc2421dcfd04db39eba0c37e7d3b580.html", "knowledgeId": "643940bb6cbe816b83ebbaaf", "knowledgePartId": "lPexf4cBYkmDoUE2eSUt", "from": "2.3 科室", "introduction": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。" }, { "tagIds": [], "format": "feishuhtml", "srcContentId": "8ee0fa9bb5a89ea01f588843589bf931", "updateTime": "2023-04-13 23:19:48", "source": "YUQUE", "srcContent": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/13/22/20/40/0e48cc7b15b34d2f84fe49fd1a89d606.html", "knowledgeId": "643817509ab4545bef50db64", "knowledgePartId": "NeYze4cBh77-s6lwjWOl", "from": "2.12 重要异常科室对照", "introduction": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。" }, { "tagIds": ['12312313123'], "format": "yqhtml", "srcContentId": "8ee0fa9bb5a89ea01f588843589bf931", "updateTime": "2023-04-13 23:19:02", "source": "YUQUE", "srcContent": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/13/22/20/18/5cdf1295ec1649f6ab73948aa82ea810.html", "knowledgeId": "643817509ab4545bef50db58", "knowledgePartId": "Hvcye4cBYkmDoUE21h6V", "from": "2.3 科室", "introduction": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。" }, { "tagId": "6475eab868110215ab821a7c", "tagIds": ["6475eab868110215ab821a7c"], "format": "xlsx", "srcContentId": "0bf639060655ff3ec217484a2fc7827d", "updateTime": "2023-05-30 20:28:21", "source": "CORP_LOCAL_FILE", "srcContent": "产品:外观,解释:VX50有两种套餐可下单: 套餐一:只购买VX50终端设备,不包含摄像头、麦克风 套餐二:除购买VX50终端设备外,可选购SC701云台摄像头及MC30/MC31麦克风", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/5ecf2fcd704541149201ab9c1c31162d/2023/05/30/20/11/85b7b2a5f61e2b060387656e88c02d50/VX30与VX50对比表.xlsx", "knowledgeId": "6475e7eac724c54c46cbfa2d", "knowledgePartId": "T_uhbIgB3v-0X8BLeDAh", "from": "VX30与VX50对比表", "introduction": "产品:外观,解释:VX50有两种套餐可下单: 套餐一:只购买VX50终端设备,不包含摄像头、麦克风 套餐二:除购买VX50终端设备外,可选购SC701云台摄像头及MC30/MC31麦克风" }],
|
|
195
|
+
"list": [{ "tagIds": [], "format": "yqhtml", "srcContentId": "8ee0fa9bb5a89ea01f588843589bf931", "updateTime": "2023-04-14 20:15:50", "source": "YUQUE", "srcContent": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/14/19/54/31/acc2421dcfd04db39eba0c37e7d3b580.html", "knowledgeId": "643940bb6cbe816b83ebbaaf", "knowledgePartId": "lPexf4cBYkmDoUE2eSUt", "from": "2.3 科室", "introduction": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。" }, { "tagIds": [], "format": "feishuhtml", "srcContentId": "8ee0fa9bb5a89ea01f588843589bf931", "updateTime": "2023-04-13 23:19:48", "source": "YUQUE", "srcContent": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/13/22/20/40/0e48cc7b15b34d2f84fe49fd1a89d606.html", "knowledgeId": "643817509ab4545bef50db64", "knowledgePartId": "NeYze4cBh77-s6lwjWOl", "from": "2.12 重要异常科室对照", "introduction": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。" }, { "tagIds": ['12312313123'], "format": "yqhtml", "srcContentId": "8ee0fa9bb5a89ea01f588843589bf931", "updateTime": "2023-04-13 23:19:02", "source": "YUQUE", "srcContent": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/13/22/20/18/5cdf1295ec1649f6ab73948aa82ea810.html", "knowledgeId": "643817509ab4545bef50db58", "knowledgePartId": "Hvcye4cBYkmDoUE21h6V", "from": "2.3 科室", "introduction": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。" }, { "tagId": "6475eab868110215ab821a7c", "tagIds": ["6475eab868110215ab821a7c"], "format": "xlsx", "srcContentId": "0bf639060655ff3ec217484a2fc7827d", "updateTime": "2023-05-30 20:28:21", "source": "CORP_LOCAL_FILE", "srcContent": "产品:外观,解释:VX50有两种套餐可下单: 套餐一:只购买VX50终端设备,不包含摄像头、麦克风 套餐二:除购买VX50终端设备外,可选购SC701云台摄像头及MC30/MC31麦克风", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/5ecf2fcd704541149201ab9c1c31162d/2023/05/30/20/11/85b7b2a5f61e2b060387656e88c02d50/VX30与VX50对比表.xlsx", "knowledgeId": "6475e7eac724c54c46cbfa2d", "knowledgePartId": "T_uhbIgB3v-0X8BLeDAh", "from": "VX30与VX50对比表", "introduction": "产品:外观,解释:VX50有两种套餐可下单: 套餐一:只购买VX50终端设备,不包含摄像头、麦克风 套餐二:除购买VX50终端设备外,可选购SC701云台摄像头及MC30/MC31麦克风" },],
|
|
196
196
|
"renderType": 0,
|
|
197
197
|
"type": 0
|
|
198
198
|
},
|
|
@@ -156,9 +156,10 @@ export default {
|
|
|
156
156
|
this.loadPdfData(pdfResloute.page)
|
|
157
157
|
},
|
|
158
158
|
async loadPdfData (loadPage) {
|
|
159
|
-
if(this.pages[loadPage - 1] && this.pages[loadPage - 1].dom && this.pages[loadPage - 1].dom.children.length > 0) {
|
|
159
|
+
if(this.pages[loadPage - 1] && ((this.pages[loadPage - 1].dom && this.pages[loadPage - 1].dom.children.length > 0) || this.pages[loadPage - 1].loading)) {
|
|
160
160
|
return
|
|
161
161
|
}
|
|
162
|
+
this.pages[loadPage - 1].loading = true
|
|
162
163
|
// pdfjsLib.GlobalWorkerOptions.workerSrc = require("pdfjs-dist/legacy/build/pdf.worker.entry.js");
|
|
163
164
|
// 拿到第一个分片
|
|
164
165
|
const { startPage, url } = await this.fetchPdfFragment(loadPage);
|
|
@@ -352,6 +353,7 @@ export default {
|
|
|
352
353
|
textLayer.render()
|
|
353
354
|
pageDom.appendChild(textLayer.textLayerDiv);
|
|
354
355
|
page.dom = pageDom;
|
|
356
|
+
page.loading = false
|
|
355
357
|
this.contentView.appendChild(pageDom);
|
|
356
358
|
if(this.transformSalce !== null) {
|
|
357
359
|
this.contentView.style.transform = `scale(${this.transformSalce}, ${this.transformSalce})`
|
|
@@ -371,7 +373,7 @@ export default {
|
|
|
371
373
|
} else {
|
|
372
374
|
pageoffsetHeight = (this.pageSize.height + this.PAGE_INTVERVAL)
|
|
373
375
|
}
|
|
374
|
-
if (this.$refs.pdfView.clientHeight - pageoffsetHeight > 0) {
|
|
376
|
+
if (this.$refs.pdfView.clientHeight - pageoffsetHeight > 0 && pageIndex == 1) {
|
|
375
377
|
const height = this.$refs.pdfView.clientHeight;
|
|
376
378
|
let startNum = 0
|
|
377
379
|
let endNum = 0
|
|
@@ -502,6 +504,7 @@ export default {
|
|
|
502
504
|
if (page.dom) {
|
|
503
505
|
this.contentView.removeChild(page.dom);
|
|
504
506
|
page.loadStatus = 0
|
|
507
|
+
page.loading = false
|
|
505
508
|
page.dom = undefined;
|
|
506
509
|
}
|
|
507
510
|
},
|
|
@@ -859,105 +862,6 @@ export default {
|
|
|
859
862
|
// if(value.length === 1) {
|
|
860
863
|
// this.$refs.pdfView.style.height = 'calc(100% - 50px)'
|
|
861
864
|
// }
|
|
862
|
-
// res.data = {
|
|
863
|
-
// "data": [
|
|
864
|
-
// {
|
|
865
|
-
// "id": "64ffc9db73158d7a824f6d60",
|
|
866
|
-
// "knowledgeId": "64ffc9da5e51ee791930a1cd",
|
|
867
|
-
// "mainId": "adbbf75ff2af4fe49561e876210bf70f",
|
|
868
|
-
// "page": 7,
|
|
869
|
-
// "total": 11,
|
|
870
|
-
// "pageHeight": 841.8898,
|
|
871
|
-
// "pageWidth": 595.30396,
|
|
872
|
-
// "publicPageFileUrl": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/adbbf75ff2af4fe49561e876210bf70f/2023/09/12/02/15/54/64ffc9da73158d7a824f6cf5/7.pdf",
|
|
873
|
-
// "extractInfo": {
|
|
874
|
-
// "location": [
|
|
875
|
-
// 56.8,
|
|
876
|
-
// 182.0008,
|
|
877
|
-
// 480.0,
|
|
878
|
-
// 80.0
|
|
879
|
-
// ],
|
|
880
|
-
// "content": "第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:工作时间:9:00至12:00,13:00至18:00;第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:工作时间:9:00至12:00,13:00至18:00;午休时间:12:00至13:00。",
|
|
881
|
-
// "lines": [
|
|
882
|
-
// {
|
|
883
|
-
// "content": "第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:",
|
|
884
|
-
// "location": [
|
|
885
|
-
// 56.8,
|
|
886
|
-
// 182.0008,
|
|
887
|
-
// 480.0,
|
|
888
|
-
// 55.599976
|
|
889
|
-
// ]
|
|
890
|
-
// },
|
|
891
|
-
// {
|
|
892
|
-
// "content": "第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:工作时间:9:00至12:00,13:00至18:00;",
|
|
893
|
-
// "location": [
|
|
894
|
-
// 56.8,
|
|
895
|
-
// 182.0008,
|
|
896
|
-
// 480.0,
|
|
897
|
-
// 67.0
|
|
898
|
-
// ]
|
|
899
|
-
// },
|
|
900
|
-
// {
|
|
901
|
-
// "content": "第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:工作时间:9:00至12:00,13:00至18:00;午休时间:12:00至13:00。",
|
|
902
|
-
// "location": [
|
|
903
|
-
// 56.8,
|
|
904
|
-
// 182.0008,
|
|
905
|
-
// 480.0,
|
|
906
|
-
// 80.0
|
|
907
|
-
// ]
|
|
908
|
-
// }
|
|
909
|
-
// ],
|
|
910
|
-
// "tagId": null
|
|
911
|
-
// },
|
|
912
|
-
// "block": {
|
|
913
|
-
// "type": "TEXT",
|
|
914
|
-
// "location": [
|
|
915
|
-
// 56.8,
|
|
916
|
-
// 182.0008,
|
|
917
|
-
// 480.0,
|
|
918
|
-
// 80.0
|
|
919
|
-
// ],
|
|
920
|
-
// "color": null,
|
|
921
|
-
// "flowChart": null,
|
|
922
|
-
// "image": null,
|
|
923
|
-
// "table": null,
|
|
924
|
-
// "text": {
|
|
925
|
-
// "originText": "第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:工作时间:9:00至12:00,13:00至18:00;第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:工作时间:9:00至12:00,13:00至18:00;午休时间:12:00至13:00。",
|
|
926
|
-
// "indexText": "第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:工作时间:9:00至12:00,13:00至18:00;第五章 工作时间与休假第四十二条 工作时间非实行特殊工时制的岗位,按每周工作五天(周一至周五)、每天工作八小时的标准工时制执行,具体作息时间为:工作时间:9:00至12:00,13:00至18:00;午休时间:12:00至13:00。",
|
|
927
|
-
// "lines": [
|
|
928
|
-
// {
|
|
929
|
-
// "location": [
|
|
930
|
-
// 56.8,
|
|
931
|
-
// 182.0008,
|
|
932
|
-
// 480.0,
|
|
933
|
-
// 55.599976
|
|
934
|
-
// ]
|
|
935
|
-
// },
|
|
936
|
-
// {
|
|
937
|
-
// "location": [
|
|
938
|
-
// 56.8,
|
|
939
|
-
// 182.0008,
|
|
940
|
-
// 480.0,
|
|
941
|
-
// 67.0
|
|
942
|
-
// ]
|
|
943
|
-
// },
|
|
944
|
-
// {
|
|
945
|
-
// "location": [
|
|
946
|
-
// 56.8,
|
|
947
|
-
// 182.0008,
|
|
948
|
-
// 480.0,
|
|
949
|
-
// 80.0
|
|
950
|
-
// ]
|
|
951
|
-
// }
|
|
952
|
-
// ]
|
|
953
|
-
// }
|
|
954
|
-
// }
|
|
955
|
-
// }
|
|
956
|
-
// ],
|
|
957
|
-
// "code": "0",
|
|
958
|
-
// "msg": null,
|
|
959
|
-
// "traceId": null
|
|
960
|
-
// }
|
|
961
865
|
if (res.data.code == 0) {
|
|
962
866
|
// tagIds 会按照gpt识别的生成有序的数组,前端直接按照下标的顺序取就可以了
|
|
963
867
|
// 缓存拿到的所有数据
|
|
@@ -967,7 +871,7 @@ export default {
|
|
|
967
871
|
// console.log(publicPageFileUrl.substring(publicPageFileUrl.lastIndexOf('.')));
|
|
968
872
|
if (publicPageFileUrl.substring(publicPageFileUrl.lastIndexOf('.')) === '.pdf') {
|
|
969
873
|
this.preViewType = 'pdf'
|
|
970
|
-
this.setPageAllLine(this.cachePdf)
|
|
874
|
+
// this.setPageAllLine(this.cachePdf)
|
|
971
875
|
this.getpdfResloutePage(res.data.data[0])
|
|
972
876
|
} else {
|
|
973
877
|
this.preViewType = 'excal'
|
|
@@ -113,6 +113,10 @@ export default {
|
|
|
113
113
|
isMessageRecord:{
|
|
114
114
|
type: Boolean,
|
|
115
115
|
default:false,
|
|
116
|
+
},
|
|
117
|
+
sourceFileType:{
|
|
118
|
+
type: String,
|
|
119
|
+
default: '',
|
|
116
120
|
}
|
|
117
121
|
},
|
|
118
122
|
components:{
|
|
@@ -139,9 +143,9 @@ export default {
|
|
|
139
143
|
// }
|
|
140
144
|
// }
|
|
141
145
|
url = url + this.url
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
146
|
+
if(this.sourceFileType == '.ppt' || this.sourceFileType == '.pptx') {
|
|
147
|
+
url += '&officePreviewType=pdf'
|
|
148
|
+
}
|
|
145
149
|
return url
|
|
146
150
|
},
|
|
147
151
|
// fileType() {
|