askbot-dragon 1.4.35 → 1.4.37
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
|
@@ -131,7 +131,7 @@ export default {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
|
-
props: ['msg','isAskLightning', 'isMessageRecord'],
|
|
134
|
+
props: ['msg','isAskLightning', 'isMessageRecord',"isApp"],
|
|
135
135
|
beforeMounted() {
|
|
136
136
|
|
|
137
137
|
},
|
|
@@ -175,7 +175,7 @@ export default {
|
|
|
175
175
|
//预览图片
|
|
176
176
|
lookAttach(url, item, event) {
|
|
177
177
|
event.preventDefault();
|
|
178
|
-
if (this.isAskLightning == 1){
|
|
178
|
+
if (this.isAskLightning == 1 && !this.isApp){
|
|
179
179
|
window.parent.postMessage({
|
|
180
180
|
data: "bot_preview",
|
|
181
181
|
item: JSON.stringify(item),
|
|
@@ -169,7 +169,7 @@ export default {
|
|
|
169
169
|
"content":{
|
|
170
170
|
"actionType":"answer_doc_knowledge",
|
|
171
171
|
"text":"中国的省份名称有湖北省、广西壮族自治区等。",
|
|
172
|
-
"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":"yqhtml","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":[],"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":"功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。"}],
|
|
172
|
+
"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":"yqhtml","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麦克风"}],
|
|
173
173
|
"renderType":0,
|
|
174
174
|
"type":0
|
|
175
175
|
},
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="pdf_view" ref="pdfView" @scroll="pdfScroll">
|
|
3
|
-
<div class="btn_footer" v-if="tagIds.length > 1">
|
|
3
|
+
<div class="btn_footer" v-if="tagIds.length > 1 && !isPC">
|
|
4
4
|
<div class="prev" @click="prev">上一段</div>
|
|
5
|
-
<div class="next" @click="next">下一段</div>
|
|
5
|
+
<div class="next" @click="next">下一段</div>
|
|
6
|
+
</div>
|
|
7
|
+
<div id="pagination" v-if=" tagIds.length > 1 && isPC">
|
|
8
|
+
<el-pagination :current-page="currentPage + 1" @current-change="currentChange" @prev-click="prev"
|
|
9
|
+
@next-click="next" layout="slot, prev, pager, next" :page-size="1" :total="tagIds.length">
|
|
10
|
+
<span class="total-class">答案由{{ tagIds.length }}段内容生成</span>
|
|
11
|
+
</el-pagination>
|
|
6
12
|
</div>
|
|
7
13
|
</div>
|
|
8
14
|
</template>
|
|
@@ -28,8 +34,6 @@ export default {
|
|
|
28
34
|
data() {
|
|
29
35
|
return {
|
|
30
36
|
url: '',
|
|
31
|
-
// pdfjsLib: window['pdfjs-dist/build/pdf'],
|
|
32
|
-
// pdfjsLib: pdfjsLib,
|
|
33
37
|
pages: [],
|
|
34
38
|
pageLoadStatus: {
|
|
35
39
|
WAIT: 0,
|
|
@@ -73,6 +77,7 @@ export default {
|
|
|
73
77
|
},
|
|
74
78
|
isTouchMoved: false,
|
|
75
79
|
transformSalce: null,
|
|
80
|
+
isPC: false,
|
|
76
81
|
}
|
|
77
82
|
},
|
|
78
83
|
methods: {
|
|
@@ -294,9 +299,20 @@ export default {
|
|
|
294
299
|
pageoffsetHeight = (this.pageSize.height + this.PAGE_INTVERVAL)
|
|
295
300
|
}
|
|
296
301
|
if (this.$refs.pdfView.clientHeight - pageoffsetHeight > 0) {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
302
|
+
const height = this.$refs.pdfView.clientHeight;
|
|
303
|
+
let startNum = 0
|
|
304
|
+
let endNum = 0
|
|
305
|
+
if(this.transformSalce !== null) {
|
|
306
|
+
startNum = Math.ceil(this.$refs.pdfView.scrollTop / ((this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce))
|
|
307
|
+
endNum = startNum + Math.ceil(height / ((this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce))
|
|
308
|
+
} else {
|
|
309
|
+
startNum = Math.ceil(this.$refs.pdfView.scrollTop / (this.pageSize.height + this.PAGE_INTVERVAL))
|
|
310
|
+
endNum = startNum + Math.ceil(height / (this.pageSize.height + this.PAGE_INTVERVAL))
|
|
311
|
+
}
|
|
312
|
+
for (let pageIndex = startNum; pageIndex <= endNum; pageIndex++) {
|
|
313
|
+
if(pageIndex > 0 && pageIndex <= this.pages.length) {
|
|
314
|
+
this.loadPdfData(pageIndex)
|
|
315
|
+
}
|
|
300
316
|
}
|
|
301
317
|
}
|
|
302
318
|
if (this.$refs.pdfView.scrollTop == Math.floor((pageNo - 1) * pageoffsetHeight)) {
|
|
@@ -305,33 +321,6 @@ export default {
|
|
|
305
321
|
this.$refs.pdfView.scrollTop = `${((pageNo - 1) * pageoffsetHeight)}`
|
|
306
322
|
this.fisrtLoad = false
|
|
307
323
|
}
|
|
308
|
-
// if(this.transformSalce !== null) {
|
|
309
|
-
// if (this.$refs.pdfView.clientHeight - (this.pageSize.height + this.PAGE_INTVERVAL) > 0 ) {
|
|
310
|
-
// let loadNum = Math.ceil(this.$refs.pdfView.clientHeight / (this.pageSize.height + this.PAGE_INTVERVAL))
|
|
311
|
-
// for (let n = 0; n < loadNum; n++) {
|
|
312
|
-
// this.loadPdfData(pageNo + n)
|
|
313
|
-
// }
|
|
314
|
-
// }
|
|
315
|
-
// if (this.$refs.pdfView.scrollTop == Math.floor((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL)) * this.transformSalce ) {
|
|
316
|
-
// this.fisrtLoad = false
|
|
317
|
-
// } else {
|
|
318
|
-
// this.$refs.pdfView.scrollTop = `${((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce)}`
|
|
319
|
-
// this.fisrtLoad = false
|
|
320
|
-
// }
|
|
321
|
-
// } else {
|
|
322
|
-
// if (this.$refs.pdfView.clientHeight - (this.pageSize.height + this.PAGE_INTVERVAL) > 0 ) {
|
|
323
|
-
// let loadNum = Math.ceil(this.$refs.pdfView.clientHeight / (this.pageSize.height + this.PAGE_INTVERVAL))
|
|
324
|
-
// for (let n = 0; n < loadNum; n++) {
|
|
325
|
-
// this.loadPdfData(pageNo + n)
|
|
326
|
-
// }
|
|
327
|
-
// }
|
|
328
|
-
// if (this.$refs.pdfView.scrollTop == Math.floor((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL))) {
|
|
329
|
-
// this.fisrtLoad = false
|
|
330
|
-
// } else {
|
|
331
|
-
// this.$refs.pdfView.scrollTop = `${((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL))}`
|
|
332
|
-
// this.fisrtLoad = false
|
|
333
|
-
// }
|
|
334
|
-
// }
|
|
335
324
|
this.renderHighlights()
|
|
336
325
|
// zoomElement(this.contentView)
|
|
337
326
|
}, 100)
|
|
@@ -347,14 +336,8 @@ export default {
|
|
|
347
336
|
}
|
|
348
337
|
const scrollTop = e.target.scrollTop;
|
|
349
338
|
const height = e.target.clientHeight;
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
// Math.ceil((scrollTop + (height / 2)) / (that.pageSize.height + that.PAGE_INTVERVAL)) :
|
|
353
|
-
// 1;
|
|
354
|
-
let startNum = 0
|
|
355
|
-
let endNum = 0
|
|
356
|
-
|
|
357
|
-
// console.log(pageIndex);
|
|
339
|
+
let startNum = 0
|
|
340
|
+
let endNum = 0
|
|
358
341
|
if(this.transformSalce !== null) {
|
|
359
342
|
startNum = Math.ceil(scrollTop / ((that.pageSize.height + that.PAGE_INTVERVAL) * this.transformSalce))
|
|
360
343
|
endNum = startNum + Math.ceil(height / ((that.pageSize.height + that.PAGE_INTVERVAL) * this.transformSalce))
|
|
@@ -368,9 +351,6 @@ export default {
|
|
|
368
351
|
that.loadPdfData(pageIndex)
|
|
369
352
|
}
|
|
370
353
|
}
|
|
371
|
-
// pageIndex - 1 != 0 && that.loadPdfData(pageIndex - 1)
|
|
372
|
-
// that.loadPdfData(pageIndex)
|
|
373
|
-
// pageIndex + 1 < that.totalPageCount.length && that.loadPdfData(pageIndex + 1)
|
|
374
354
|
}, 200),
|
|
375
355
|
directScrolling (e, that) {
|
|
376
356
|
if (this.fisrtLoad) {
|
|
@@ -394,21 +374,9 @@ export default {
|
|
|
394
374
|
// 分片每次只做一次处理,所以不考虑多片情况
|
|
395
375
|
loadBefore (pageIndex) {
|
|
396
376
|
this.loadPdfData(pageIndex)
|
|
397
|
-
// const start = (Math.floor(pageIndex / this.SLICE_COUNT) * this.SLICE_COUNT) - (this.SLICE_COUNT - 1);
|
|
398
|
-
// if (start > 0) {
|
|
399
|
-
// // const prevPage = this.pages[start - 1] || {};
|
|
400
|
-
// this.loadPdfData(start)
|
|
401
|
-
// // prevPage.loadStatus === this.pageLoadStatus.WAIT && this.loadPdfData(start);
|
|
402
|
-
// }
|
|
403
377
|
},
|
|
404
378
|
loadAfter (pageIndex) {
|
|
405
379
|
this.loadPdfData(pageIndex)
|
|
406
|
-
// const start = (Math.floor(pageIndex / this.SLICE_COUNT) * this.SLICE_COUNT) + 1;
|
|
407
|
-
// if (start <= this.pages.length) {
|
|
408
|
-
// // const nextPage = this.pages[start - 1] || {};
|
|
409
|
-
// this.loadPdfData(start)
|
|
410
|
-
// // nextPage.loadStatus === this.pageLoadStatus.WAIT && this.loadPdfData(start);
|
|
411
|
-
// }
|
|
412
380
|
},
|
|
413
381
|
// 首先我们获取到需要渲染的范围
|
|
414
382
|
// 根据当前的可视范围内的页码,我们前后只保留 8 页
|
|
@@ -476,8 +444,14 @@ export default {
|
|
|
476
444
|
prev () {
|
|
477
445
|
this.currentPage--
|
|
478
446
|
if (this.currentPage < 0) {
|
|
479
|
-
// this.currentPage = this.tagIds.length - 1
|
|
480
447
|
this.currentPage = 0
|
|
448
|
+
if(!this.isPC) {
|
|
449
|
+
this.$toast({
|
|
450
|
+
message:'当前已经是第一段了',
|
|
451
|
+
duration:2000,
|
|
452
|
+
})
|
|
453
|
+
return
|
|
454
|
+
}
|
|
481
455
|
}
|
|
482
456
|
if(this.preViewType == 'pdf') {
|
|
483
457
|
this.scrollToUplaodePage(this.currentPage)
|
|
@@ -490,6 +464,13 @@ export default {
|
|
|
490
464
|
this.currentPage++
|
|
491
465
|
if (this.currentPage >= this.tagIds.length) {
|
|
492
466
|
this.currentPage = this.tagIds.length - 1
|
|
467
|
+
if(!this.isPC) {
|
|
468
|
+
this.$toast({
|
|
469
|
+
message:'当前已经是最后一段了',
|
|
470
|
+
duration:2000,
|
|
471
|
+
})
|
|
472
|
+
return
|
|
473
|
+
}
|
|
493
474
|
}
|
|
494
475
|
if(this.preViewType == 'pdf') {
|
|
495
476
|
this.scrollToUplaodePage(this.currentPage)
|
|
@@ -534,13 +515,23 @@ export default {
|
|
|
534
515
|
if(index == currentPage) {
|
|
535
516
|
Array.from(this.allTr[index].children).forEach(item =>{
|
|
536
517
|
item.style.background = 'rgba(255, 136, 0, 0.6)'
|
|
518
|
+
item.classList.add('animation')
|
|
519
|
+
setTimeout(() =>{
|
|
520
|
+
item.classList.remove('animation')
|
|
521
|
+
}, 4000)
|
|
537
522
|
})
|
|
538
|
-
//
|
|
539
|
-
this
|
|
540
|
-
|
|
523
|
+
// getBoundingClientRect().top 当前元素距离屏幕顶部的高度 + 弹窗header 高度
|
|
524
|
+
if(!this.isPC) {
|
|
525
|
+
let top = this.allTr[index].getBoundingClientRect().top - this.$refs.pdfView.getBoundingClientRect().top
|
|
526
|
+
this.$refs.pdfView.scrollTop = top
|
|
527
|
+
} else {
|
|
528
|
+
let top = this.allTr[index].getBoundingClientRect().top
|
|
529
|
+
this.$refs.pdfView.scrollTop = top - 50
|
|
530
|
+
}
|
|
541
531
|
} else {
|
|
542
532
|
Array.from(this.allTr[index].children).forEach(item =>{
|
|
543
533
|
item.style.background = 'rgba(54, 106, 255, 0.6)'
|
|
534
|
+
item.classList.remove('animation')
|
|
544
535
|
})
|
|
545
536
|
}
|
|
546
537
|
}
|
|
@@ -554,8 +545,13 @@ export default {
|
|
|
554
545
|
for (let i = 0; i < d.children.length; i++) {
|
|
555
546
|
if (d.getAttribute('react-count') == this.currentPage) {
|
|
556
547
|
d.children[i].style.backgroundColor = 'rgba(255, 136, 0, 0.3)'
|
|
548
|
+
d.children[i].classList.add('animation')
|
|
549
|
+
setTimeout(() =>{
|
|
550
|
+
d.children[i].classList.remove('animation')
|
|
551
|
+
}, 4000)
|
|
557
552
|
} else {
|
|
558
553
|
d.children[i].style.backgroundColor = 'rgba(54, 106, 255, 0.3)'
|
|
554
|
+
d.children[i].classList.remove('animation')
|
|
559
555
|
}
|
|
560
556
|
}
|
|
561
557
|
})
|
|
@@ -734,10 +730,16 @@ export default {
|
|
|
734
730
|
// 在 pdf_view 下创建 所有canvs的容器
|
|
735
731
|
this.contentView = document.createElement('div')
|
|
736
732
|
this.contentView.style.transformOrigin = '0px 0px 0px'
|
|
733
|
+
|
|
737
734
|
this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + value.join(',')).then(res =>{
|
|
738
735
|
// res.data = {"data":[{"id":"64591b7d8bb8ab1b91c65f24","knowledgeId":"64591a9c8da27649473f3b4b","mainId":"fb348d095c0b4fd7bbd37826563dac7d","page":3,"total":18,"pageHeight":540.0,"pageWidth":960.00946,"publicPageFileUrl":"https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/fb348d095c0b4fd7bbd37826563dac7d/2023/05/08/11/55/18/64591b638bb8ab1b91c65eed/3.pdf","extractInfo":{"location":[280.488,161.32,398.71573,61.99298],"content":"黄花城水长城旅游区位于北京市怀柔区九渡河镇境内,距北京市区65公里,是以奇而著称,融山川、碧水、古长城为一体的旅游休闲胜地。而这里的“三绝景”更是引人入","lines":[{"content":"黄花城水长城旅游区位于北京市怀柔区九渡河镇境内,距","location":[280.488,161.32,398.71573,15.9869995]},{"content":"北京市区65公里,是以奇而著称,融山川、碧水、古长","location":[283.691,184.30899,392.3055,15.9869995]},{"content":"城为一体的旅游休闲胜地。而这里的“三绝景”更是引人入","location":[282.699,207.32599,394.3033,15.9869995]}],"tagId":null}}],"code":"0","msg":null,"traceId":null}
|
|
739
736
|
// res.data = {"data":[{"id":"64590ce1eb1320043401cc90","knowledgeId":"64590cd5017b461d67e282e1","mainId":"fb348d095c0b4fd7bbd37826563dac7d","page":2,"total":5,"pageHeight":841.8898,"pageWidth":595.30396,"publicPageFileUrl":"https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/fb348d095c0b4fd7bbd37826563dac7d/2023/05/08/10/53/20/64590ce0eb1320043401cc7b/2.pdf","extractInfo":{"location":[89.32981,638.1907,415.15512,98.63251],"content":":北京地铁 13\r号线 :藤黄\r色 :西直门站—\r东直门站 :17 :41.\r5 :6\r准\rB :2002年\r09月\r28日 ","lines":[{"content":":北京地铁 13\r号线 ","location":[89.32981,638.1907,99.44599,98.63251]},{"content":":藤黄\r色 ","location":[188.7758,638.1907,46.79959,98.63251]},{"content":":西直门站—\r东直门站 ","location":[235.5754,638.1907,86.09996,98.63251]},{"content":":17 ","location":[321.67535,638.1907,36.200012,98.63251]},{"content":":41.\r5 ","location":[357.87537,638.1907,39.400696,98.63251]},{"content":":6\r准\rB ","location":[397.27606,638.1907,41.099,98.63251]},{"content":":2002年\r09月\r28日 ","location":[438.37506,638.1907,66.10986,98.63251]}],"tagId":null}}],"code":"0","msg":null,"traceId":null}
|
|
740
737
|
// res.data = {"data":[{"id":"64591b7d8bb8ab1b91c65f24","knowledgeId":"64591a9c8da27649473f3b4b","mainId":"fb348d095c0b4fd7bbd37826563dac7d","page":3,"total":18,"pageHeight":540.0,"pageWidth":960.00946,"publicPageFileUrl":"https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/fb348d095c0b4fd7bbd37826563dac7d/2023/05/08/11/55/18/64591b638bb8ab1b91c65eed/3.pdf","extractInfo":{"location":[280.488,161.32,398.71573,61.99298],"content":"黄花城水长城旅游区位于北京市怀柔区九渡河镇境内,距北京市区65公里,是以奇而著称,融山川、碧水、古长城为一体的旅游休闲胜地。而这里的“三绝景”更是引人入","lines":[{"content":"黄花城水长城旅游区位于北京市怀柔区九渡河镇境内,距","location":[280.488,161.32,398.71573,15.9869995]},{"content":"北京市区65公里,是以奇而著称,融山川、碧水、古长","location":[283.691,184.30899,392.3055,15.9869995]},{"content":"城为一体的旅游休闲胜地。而这里的“三绝景”更是引人入","location":[282.699,207.32599,394.3033,15.9869995]}],"tagId":null}}],"code":"0","msg":null,"traceId":null}
|
|
738
|
+
// res.data = {"data":[{"id":"6475eab868110215ab821a80","knowledgeId":"6475e7eac724c54c46cbfa2d","mainId":"5ecf2fcd704541149201ab9c1c31162d","page":0,"total":1,"pageHeight":0.0,"pageWidth":0.0,"publicPageFileUrl":"https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/5ecf2fcd704541149201ab9c1c31162d/2023/05/30/08/23/20/6475eab63339db423f26b196/0.html","extractInfo":{"location":null,"content":"产品:系统配置,产品型号:存储,VX30:4G+16G,VX50:16G+256G","lines":null,"tagId":"6475eab868110215ab821a80"}}],"code":"0","msg":null,"traceId":null}
|
|
739
|
+
// res.data = {"data":[{"id":"6475e9393339db423f26af01","knowledgeId":"6475e44fc724c54c46cbfa21","mainId":"5ecf2fcd704541149201ab9c1c31162d","page":2,"total":2,"pageHeight":510.25,"pageWidth":1559.05,"publicPageFileUrl":"https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/5ecf2fcd704541149201ab9c1c31162d/2023/05/30/08/00/29/6475e55d3339db423f26a9b8/2.pdf","extractInfo":{"location":[327.70532,288.0498,414.9734,12.241608],"content":"三、指示灯状态说明1.白色常亮:开机/开机中2.红色常亮:待机3.白色呼吸:息屏4.红色闪烁:升级1.LAN:通过网线连接到主机的Camera端口2.电源开关:电源切换开关","lines":[{"content":"三、指示灯状态说明","location":[634.3203,288.0498,108.3584,12.0]},{"content":"1.白色常亮:开机/开机中","location":[634.3203,320.08978,108.23407,9.0]},{"content":"2.红色常亮:待机","location":[634.3204,341.3298,78.597046,9.0]},{"content":"3.白色呼吸:息屏","location":[634.32043,362.45282,78.597046,9.0]},{"content":"4.红色闪烁:升级","location":[634.3205,383.6928,78.597046,9.0]},{"content":"1.LAN:通过网线连接到主机的","location":[327.70535,291.2914,144.35995,9.0]},{"content":"Camera端口","location":[327.70532,306.88843,55.322998,9.0]},{"content":"2.电源开关:电源切换开关","location":[482.74832,291.2914,105.36301,9.0]}],"tagId":null}}],"code":"0","msg":null,"traceId":null}
|
|
740
|
+
if(value.length === 1) {
|
|
741
|
+
this.$refs.pdfView.style.height = 'calc(100% - 51px)'
|
|
742
|
+
}
|
|
741
743
|
if (res.data.code == 0) {
|
|
742
744
|
// tagIds 会按照gpt识别的生成有序的数组,前端直接按照下标的顺序取就可以了
|
|
743
745
|
// 缓存拿到的所有数据
|
|
@@ -800,6 +802,11 @@ export default {
|
|
|
800
802
|
}
|
|
801
803
|
},
|
|
802
804
|
mounted () {
|
|
805
|
+
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
|
|
806
|
+
this.isPC = false
|
|
807
|
+
} else {
|
|
808
|
+
this.isPC = true
|
|
809
|
+
}
|
|
803
810
|
}
|
|
804
811
|
}
|
|
805
812
|
</script>
|
|
@@ -807,10 +814,10 @@ export default {
|
|
|
807
814
|
<style lang="less" scoped>
|
|
808
815
|
.pdf_view {
|
|
809
816
|
width: 100%;
|
|
810
|
-
height: calc(100% -
|
|
817
|
+
height: calc(100% - 101px);
|
|
811
818
|
overflow: auto;
|
|
812
819
|
background-color: #f5f7fb;
|
|
813
|
-
|
|
820
|
+
margin-bottom: 60px;
|
|
814
821
|
box-sizing: border-box;
|
|
815
822
|
// position: relative;
|
|
816
823
|
// > div {
|
|
@@ -865,5 +872,122 @@ export default {
|
|
|
865
872
|
color: #ffffff;
|
|
866
873
|
}
|
|
867
874
|
}
|
|
875
|
+
#pagination {
|
|
876
|
+
.total-class {
|
|
877
|
+
margin-right: 13px;
|
|
878
|
+
font-weight: 400;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
position: absolute;
|
|
882
|
+
bottom: 0px;
|
|
883
|
+
right: 0;
|
|
884
|
+
width: 100%;
|
|
885
|
+
display: flex;
|
|
886
|
+
align-items: center;
|
|
887
|
+
justify-content: center;
|
|
888
|
+
height: 50px;
|
|
889
|
+
background-color: white;
|
|
890
|
+
box-shadow: 0px 0px 18px 0px rgba(29, 55, 129, 0.07);
|
|
891
|
+
border-radius: 5px;
|
|
892
|
+
z-index: 1000;
|
|
893
|
+
|
|
894
|
+
/deep/.el-pagination {
|
|
895
|
+
margin-right: 110px;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
/deep/.el-pager {
|
|
899
|
+
background: #EDF0F6;
|
|
900
|
+
border-radius: 15px;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/deep/.el-pagination.is-background .btn-next {
|
|
904
|
+
width: 30px;
|
|
905
|
+
height: 30px;
|
|
906
|
+
background: #EDF0F6;
|
|
907
|
+
border-radius: 50%;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/deep/.el-pagination .btn-next {
|
|
911
|
+
width: 30px;
|
|
912
|
+
height: 30px;
|
|
913
|
+
background: #EDF0F6;
|
|
914
|
+
border-radius: 50%;
|
|
915
|
+
padding-left: 0;
|
|
916
|
+
margin-left: 5px;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
/deep/.el-pagination .btn-prev {
|
|
920
|
+
width: 30px;
|
|
921
|
+
height: 30px;
|
|
922
|
+
background: #EDF0F6;
|
|
923
|
+
border-radius: 50%;
|
|
924
|
+
padding-right: 0;
|
|
925
|
+
margin-right: 5px;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/deep/.el-pagination button {
|
|
929
|
+
padding: 0;
|
|
930
|
+
min-width: 30px;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/deep/.el-pager li {
|
|
934
|
+
background: #EDF0F6;
|
|
935
|
+
height: 30px;
|
|
936
|
+
min-width: 30px;
|
|
937
|
+
line-height: 30px;
|
|
938
|
+
font-size: 12px;
|
|
939
|
+
color: #717b90;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/deep/.el-pager li:first-child {
|
|
943
|
+
border-bottom-left-radius: 15px !important;
|
|
944
|
+
border-top-left-radius: 15px !important;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/deep/.el-pager li:last-child {
|
|
948
|
+
border-top-right-radius: 15px !important;
|
|
949
|
+
border-bottom-right-radius: 15px !important;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
/deep/.el-pager li.active {
|
|
953
|
+
width: 30px;
|
|
954
|
+
height: 30px;
|
|
955
|
+
min-width: 30px;
|
|
956
|
+
background: #366AFF;
|
|
957
|
+
border: 3px solid #A1B9FF;
|
|
958
|
+
border-radius: 50%;
|
|
959
|
+
line-height: 24px;
|
|
960
|
+
color: white;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
/deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
|
|
964
|
+
background: #366AFF;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
</style>
|
|
971
|
+
<style lang="less">
|
|
972
|
+
.animation {
|
|
973
|
+
animation-name: highlight;
|
|
974
|
+
animation-duration: 4s;
|
|
975
|
+
}
|
|
976
|
+
@keyframes highlight {
|
|
977
|
+
0% {
|
|
978
|
+
background:rgba(255, 136, 0, 0.3);
|
|
979
|
+
}
|
|
980
|
+
25% {
|
|
981
|
+
background:rgba(255, 136, 0, 0.6);
|
|
982
|
+
}
|
|
983
|
+
50% {
|
|
984
|
+
background:rgba(255, 136, 0, 0.3);
|
|
985
|
+
}
|
|
986
|
+
75% {
|
|
987
|
+
background:rgba(255, 136, 0, 0.6);
|
|
988
|
+
}
|
|
989
|
+
100% {
|
|
990
|
+
background:rgba(255, 136, 0, 0.3);
|
|
991
|
+
}
|
|
868
992
|
}
|
|
869
993
|
</style>
|