askbot-dragon 1.7.76-beta → 1.7.78-beta
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 +1 -3
- package/public/index.html +7 -5
- package/src/assets/js/AliyunlssUtil.js +25 -49
- package/src/assets/js/hammer.js +2 -13
- package/src/assets/less/converSationContainer/common.less +0 -7
- package/src/components/ActionAlertIframe.vue +1 -24
- package/src/components/AiGuide.vue +151 -114
- package/src/components/AnswerDocknowledge.vue +19 -7
- package/src/components/ConversationContainer.vue +215 -99
- package/src/components/MyEditor.vue +1 -2
- package/src/components/actionSatisfaction.vue +1 -1
- package/src/components/answerRadio.vue +1 -1
- package/src/components/askVideo.vue +0 -23
- package/src/components/associationIntention.vue +7 -11
- package/src/components/formTemplate.vue +62 -56
- package/src/components/intelligentSummary.vue +1 -5
- package/src/components/message/TextMessage.vue +1 -5
- package/src/components/message/swiper/ticketSwiper.vue +1 -1
- package/src/components/pdfPosition.vue +12 -190
- package/src/components/preview/excelView.vue +10 -2
- package/src/components/previewDoc.vue +0 -4
- package/src/components/previewPdf.vue +395 -416
- package/src/components/senderMessagePlatform.vue +1 -1
- package/src/components/utils/ckeditor.js +1 -1
- package/src/components/welcomeKnowledgeFile.vue +1 -5
- package/src/components/welcomeLlmCard.vue +1 -5
- package/src/main.js +1 -1
- package/src/components/newPdfPosition.vue +0 -878
- package/src/locales/jp.json +0 -73
|
@@ -52,11 +52,10 @@ if (pdfjsLib) {
|
|
|
52
52
|
// 'pdfjs-dist/build/pdf.worker';
|
|
53
53
|
}
|
|
54
54
|
const { TextLayerBuilder } = window['pdfjs-dist/web/pdf_viewer']
|
|
55
|
-
const CSS_UNITS = 96.0 / 72.0
|
|
56
55
|
// import { zoomElement } from '../assets/js/hammer'
|
|
57
56
|
export default {
|
|
58
57
|
name: 'pdfView',
|
|
59
|
-
props: ['tagIds', 'isMessageRecord','
|
|
58
|
+
props: ['tagIds', 'isMessageRecord','textWatermarkStr'],
|
|
60
59
|
data () {
|
|
61
60
|
return {
|
|
62
61
|
url: '',
|
|
@@ -103,7 +102,6 @@ export default {
|
|
|
103
102
|
},
|
|
104
103
|
isTouchMoved: false,
|
|
105
104
|
transformSalce: null,
|
|
106
|
-
defaultTransform:0.8,
|
|
107
105
|
isPC: false,
|
|
108
106
|
handScale: 'auto',
|
|
109
107
|
scaleList: [],
|
|
@@ -264,12 +262,12 @@ export default {
|
|
|
264
262
|
const { pdfPage, pageNo, dom } = page;
|
|
265
263
|
// dom 元素已存在,无须重新渲染,直接返回
|
|
266
264
|
if ((dom && dom.children.length != 0) || page.loading) {
|
|
267
|
-
|
|
265
|
+
return;
|
|
268
266
|
}
|
|
269
267
|
page.loading = true
|
|
270
268
|
const viewport = pdfPage.getViewport({
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
scale: this.scale,
|
|
270
|
+
rotation: this.rotation,
|
|
273
271
|
});
|
|
274
272
|
// 创建新的canvas
|
|
275
273
|
const canvas = document.createElement('canvas');
|
|
@@ -345,7 +343,7 @@ export default {
|
|
|
345
343
|
}
|
|
346
344
|
}
|
|
347
345
|
}
|
|
348
|
-
if (rectdom.children
|
|
346
|
+
if (rectdom.children.length > 0) {
|
|
349
347
|
pageDom.appendChild(rectdom)
|
|
350
348
|
}
|
|
351
349
|
}
|
|
@@ -362,10 +360,6 @@ export default {
|
|
|
362
360
|
page.dom = await pageDom;
|
|
363
361
|
page.loading = false
|
|
364
362
|
this.contentView.appendChild(pageDom);
|
|
365
|
-
let pdf_view = document.getElementsByClassName('pdf_view');
|
|
366
|
-
if (pdf_view && pdf_view[0]){
|
|
367
|
-
pdf_view[0].style.backgroundImage = 'none'
|
|
368
|
-
}
|
|
369
363
|
if (this.transformSalce !== null) {
|
|
370
364
|
this.contentView.style.transform = `scale(${this.transformSalce}, ${this.transformSalce})`
|
|
371
365
|
}
|
|
@@ -432,7 +426,7 @@ export default {
|
|
|
432
426
|
startNum = Math.ceil(scrollTop / (that.pageSize.height + that.PAGE_INTVERVAL))
|
|
433
427
|
endNum = startNum + Math.ceil(height / (that.pageSize.height + that.PAGE_INTVERVAL))
|
|
434
428
|
}
|
|
435
|
-
for (let pageIndex = startNum; pageIndex
|
|
429
|
+
for (let pageIndex = startNum; pageIndex < endNum; pageIndex++) {
|
|
436
430
|
if (pageIndex > 0 && pageIndex <= that.pages.length) {
|
|
437
431
|
that.loadPdfData(pageIndex)
|
|
438
432
|
}
|
|
@@ -676,20 +670,14 @@ export default {
|
|
|
676
670
|
// this.currentPageAllLine[i].allLines.lines.push(item.extractInfo.lines)
|
|
677
671
|
this.currentPageAllLine[i].allLines.push({
|
|
678
672
|
pageCount: index,
|
|
679
|
-
lines: item.extractInfo.lines
|
|
680
|
-
content:"测试内容填充,不必理会",
|
|
681
|
-
location:item.extractInfo.location
|
|
682
|
-
}]
|
|
673
|
+
lines: item.extractInfo.lines
|
|
683
674
|
})
|
|
684
675
|
} else {
|
|
685
676
|
this.currentPageAllLine.push({
|
|
686
677
|
page: item.page,
|
|
687
678
|
allLines: [{
|
|
688
679
|
pageCount: index,
|
|
689
|
-
lines: item.extractInfo.lines
|
|
690
|
-
content:"测试内容填充,不必理会",
|
|
691
|
-
location:item.extractInfo.location
|
|
692
|
-
}]
|
|
680
|
+
lines: item.extractInfo.lines
|
|
693
681
|
}],
|
|
694
682
|
})
|
|
695
683
|
}
|
|
@@ -822,164 +810,6 @@ export default {
|
|
|
822
810
|
this.contentView.style.transform = 'scale(' + this.transformSalce + ')';
|
|
823
811
|
// this.getpdfResloutePage(this.cachePdf[0])
|
|
824
812
|
},
|
|
825
|
-
//添加水印
|
|
826
|
-
watermark() {
|
|
827
|
-
//默认设置
|
|
828
|
-
var defaultSettings = {
|
|
829
|
-
watermark_txt:"",
|
|
830
|
-
watermark_x: 0,//水印起始位置x轴坐标
|
|
831
|
-
watermark_y: 0,//水印起始位置Y轴坐标
|
|
832
|
-
watermark_rows: 0,//水印行数
|
|
833
|
-
watermark_cols: 0,//水印列数
|
|
834
|
-
watermark_x_space: 40,//水印x轴间隔
|
|
835
|
-
watermark_y_space: 60,//水印y轴间隔
|
|
836
|
-
watermark_color: 'black',//水印字体颜色
|
|
837
|
-
watermark_alpha: .3,//水印透明度
|
|
838
|
-
watermark_fontsize: 12,//水印字体大小
|
|
839
|
-
watermark_font: '微软雅黑',//水印字体
|
|
840
|
-
watermark_width: 100,//水印宽度
|
|
841
|
-
watermark_height: 80,//水印长度
|
|
842
|
-
watermark_angle: 20,//水印倾斜度数***
|
|
843
|
-
visitorWatermark_txt:""
|
|
844
|
-
};
|
|
845
|
-
if(this.knowledgeItem.textWatermarkValue){
|
|
846
|
-
defaultSettings.watermark_txt = this.knowledgeItem.textWatermarkValue;
|
|
847
|
-
}
|
|
848
|
-
if (this.knowledgeItem.visitorWatermarkValue){
|
|
849
|
-
defaultSettings.visitorWatermark_txt = this.knowledgeItem.visitorWatermarkValue
|
|
850
|
-
}
|
|
851
|
-
//采用配置项替换默认值,作用类似jquery.extend
|
|
852
|
-
if (arguments.length === 1 && typeof arguments[0] === "object") {
|
|
853
|
-
console.log("arguments = " + JSON.stringify(arguments[0]));
|
|
854
|
-
// 获取参数配置
|
|
855
|
-
var src = arguments[0];
|
|
856
|
-
for (let key in src) {
|
|
857
|
-
if (src[key] && defaultSettings[key] && src[key] === defaultSettings[key])
|
|
858
|
-
continue;
|
|
859
|
-
else if (src[key])
|
|
860
|
-
defaultSettings[key] = src[key];
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
var oTemp = document.createDocumentFragment();
|
|
864
|
-
//获取页面最大宽度
|
|
865
|
-
console.debug('pdf_view',document.getElementById('pdf_view'))
|
|
866
|
-
let scrollWidth = document.getElementById('pdf_view').scrollWidth;
|
|
867
|
-
let clientWidth = document.getElementById('pdf_view').clientWidth;
|
|
868
|
-
var page_width = Math.max(scrollWidth, clientWidth);
|
|
869
|
-
|
|
870
|
-
var cutWidth = page_width * 0.0150;
|
|
871
|
-
|
|
872
|
-
page_width = page_width - cutWidth;
|
|
873
|
-
|
|
874
|
-
//获取页面最大高度
|
|
875
|
-
let height = parseInt(this.totalPageCount * this.pageSize.height)
|
|
876
|
-
var page_height = Math.max(document.getElementById('pdf_container_view').scrollHeight,height);
|
|
877
|
-
|
|
878
|
-
console.debug('page_height',page_height,this.totalPageCount * this.pageSize.height);
|
|
879
|
-
|
|
880
|
-
// var page_height = document.body.scrollHeight+document.body.scrollTop;
|
|
881
|
-
|
|
882
|
-
//如果将水印列数设置为0,或水印列数设置过大,超过页面最大宽度,则重新计算水印列数和水印x轴间隔
|
|
883
|
-
|
|
884
|
-
if (defaultSettings.watermark_cols == 0 || (parseInt(defaultSettings.watermark_x + defaultSettings
|
|
885
|
-
.watermark_width * defaultSettings.watermark_cols + defaultSettings.watermark_x_space *
|
|
886
|
-
(defaultSettings.watermark_cols - 1)) > page_width)) {
|
|
887
|
-
defaultSettings.watermark_cols = parseInt((page_width - defaultSettings.watermark_x + defaultSettings
|
|
888
|
-
.watermark_x_space) / (defaultSettings.watermark_width + defaultSettings
|
|
889
|
-
.watermark_x_space));
|
|
890
|
-
defaultSettings.watermark_x_space = parseInt((page_width - defaultSettings.watermark_x -
|
|
891
|
-
defaultSettings
|
|
892
|
-
.watermark_width * defaultSettings.watermark_cols) / (defaultSettings.watermark_cols - 1));
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
//如果将水印行数设置为0,或水印行数设置过大,超过页面最大长度,则重新计算水印行数和水印y轴间隔
|
|
896
|
-
|
|
897
|
-
if (defaultSettings.watermark_rows == 0 || (parseInt(defaultSettings.watermark_y + defaultSettings
|
|
898
|
-
|
|
899
|
-
.watermark_height * defaultSettings.watermark_rows + defaultSettings.watermark_y_space * (
|
|
900
|
-
|
|
901
|
-
defaultSettings.watermark_rows - 1)) > page_height)) {
|
|
902
|
-
|
|
903
|
-
defaultSettings.watermark_rows = parseInt((defaultSettings.watermark_y_space + page_height -
|
|
904
|
-
|
|
905
|
-
defaultSettings
|
|
906
|
-
|
|
907
|
-
.watermark_y) / (defaultSettings.watermark_height + defaultSettings.watermark_y_space));
|
|
908
|
-
|
|
909
|
-
defaultSettings.watermark_y_space = parseInt(((page_height - defaultSettings.watermark_y) -
|
|
910
|
-
|
|
911
|
-
defaultSettings
|
|
912
|
-
|
|
913
|
-
.watermark_height * defaultSettings.watermark_rows) / (defaultSettings.watermark_rows - 1));
|
|
914
|
-
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
var x;
|
|
918
|
-
|
|
919
|
-
var y;
|
|
920
|
-
|
|
921
|
-
for (var i = 0; i < defaultSettings.watermark_rows; i++) {
|
|
922
|
-
y = defaultSettings.watermark_y + (defaultSettings.watermark_y_space + defaultSettings.watermark_height) * i;
|
|
923
|
-
for (var j = 0; j < defaultSettings.watermark_cols; j++) {
|
|
924
|
-
x = defaultSettings.watermark_x + (defaultSettings.watermark_width + defaultSettings.watermark_x_space) * j;
|
|
925
|
-
|
|
926
|
-
var mask_div = document.createElement('div');
|
|
927
|
-
mask_div.id = 'mask_div' + i + j;
|
|
928
|
-
mask_div.className = 'mask_div';
|
|
929
|
-
|
|
930
|
-
//注意看这里加了图片水印
|
|
931
|
-
mask_div.style.webkitTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
|
|
932
|
-
mask_div.style.MozTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
|
|
933
|
-
mask_div.style.msTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
|
|
934
|
-
mask_div.style.OTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
|
|
935
|
-
mask_div.style.transform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
|
|
936
|
-
mask_div.style.visibility = "";
|
|
937
|
-
mask_div.style.position = "absolute";
|
|
938
|
-
//奇偶行错开,这样水印就不对齐,显的不呆板
|
|
939
|
-
console.debug('x',x)
|
|
940
|
-
if (i % 2 != 0) {
|
|
941
|
-
mask_div.style.left = x + 'px';
|
|
942
|
-
if (j % 2 != 0 && this.knowledgeItem.visitorWatermarkValue){
|
|
943
|
-
mask_div.appendChild(document.createTextNode(defaultSettings.visitorWatermark_txt));
|
|
944
|
-
} else {
|
|
945
|
-
if (!this.knowledgeItem.textWatermarkValue){
|
|
946
|
-
mask_div.appendChild(document.createTextNode(defaultSettings.visitorWatermark_txt));
|
|
947
|
-
} else {
|
|
948
|
-
mask_div.appendChild(document.createTextNode(defaultSettings.watermark_txt));
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
} else {
|
|
952
|
-
mask_div.style.left = x + 'px';
|
|
953
|
-
if (j % 2 != 0 && this.knowledgeItem.textWatermarkValue){
|
|
954
|
-
mask_div.appendChild(document.createTextNode(defaultSettings.watermark_txt));
|
|
955
|
-
} else {
|
|
956
|
-
if (!this.knowledgeItem.visitorWatermarkValue){
|
|
957
|
-
mask_div.appendChild(document.createTextNode(defaultSettings.watermark_txt));
|
|
958
|
-
} else {
|
|
959
|
-
mask_div.appendChild(document.createTextNode(defaultSettings.visitorWatermark_txt));
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
mask_div.style.top = y + 'px';
|
|
965
|
-
mask_div.style.overflow = "hidden";
|
|
966
|
-
mask_div.style.zIndex = "9999";
|
|
967
|
-
mask_div.style.pointerEvents = 'none'; //让水印不遮挡页面的点击事件
|
|
968
|
-
mask_div.style.opacity = defaultSettings.watermark_alpha;
|
|
969
|
-
mask_div.style.fontSize = defaultSettings.watermark_fontsize;
|
|
970
|
-
mask_div.style.fontFamily = defaultSettings.watermark_font;
|
|
971
|
-
mask_div.style.color = defaultSettings.watermark_color;
|
|
972
|
-
mask_div.style.textAlign = "center";
|
|
973
|
-
mask_div.style.width = defaultSettings.watermark_width + 'px';
|
|
974
|
-
mask_div.style.height = defaultSettings.watermark_height + 'px';
|
|
975
|
-
mask_div.style.display = "block";
|
|
976
|
-
oTemp.appendChild(mask_div);
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
let pageDom = document.getElementById('pdf_container_view')
|
|
980
|
-
pageDom.appendChild(oTemp);
|
|
981
|
-
|
|
982
|
-
},
|
|
983
813
|
},
|
|
984
814
|
computed: {
|
|
985
815
|
perviewUrl () {
|
|
@@ -1007,18 +837,16 @@ export default {
|
|
|
1007
837
|
if (value && value.length) {
|
|
1008
838
|
// 在 pdf_view 下创建 所有canvs的容器
|
|
1009
839
|
this.contentView = document.createElement('div')
|
|
1010
|
-
this.contentView.setAttribute('id','contentView')
|
|
1011
840
|
this.contentView.style.transformOrigin = '0px 0px 0px'
|
|
1012
841
|
this.contentView.setAttribute('id','contentView');
|
|
1013
|
-
|
|
1014
|
-
this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + value.join(',')).then(res => {
|
|
842
|
+
this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + value.join(',')).then(res => {
|
|
1015
843
|
// 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}
|
|
1016
844
|
// 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}
|
|
1017
845
|
// 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}
|
|
1018
846
|
// 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}
|
|
1019
847
|
// 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}
|
|
1020
848
|
// if(value.length === 1) {
|
|
1021
|
-
// this.$refs.pdfView.style.height = 'calc(100% - 50px)'
|
|
849
|
+
// this.$refs.pdfView.style.height = 'calc(100% - 50px)'
|
|
1022
850
|
// }
|
|
1023
851
|
// res.data = {
|
|
1024
852
|
// "data": [
|
|
@@ -1193,23 +1021,18 @@ export default {
|
|
|
1193
1021
|
"Content-Type": "application/json",
|
|
1194
1022
|
},
|
|
1195
1023
|
}).then(res => {
|
|
1196
|
-
// 使用原声请求方式 axios会带有不需要的请求头
|
|
1024
|
+
// 使用原声请求方式 axios会带有不需要的请求头
|
|
1197
1025
|
let xhr = new XMLHttpRequest();
|
|
1198
1026
|
xhr.open('GET', res.data || res.bodyText, true);
|
|
1199
1027
|
// 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑
|
|
1200
1028
|
xhr.onload = ({ currentTarget }) => {
|
|
1201
1029
|
// 请求完成
|
|
1202
1030
|
if (currentTarget.status === 200) { // 返回200
|
|
1203
|
-
let pdf_view = document.getElementsByClassName('pdf_view');
|
|
1204
|
-
if (pdf_view && pdf_view[0]){
|
|
1205
|
-
pdf_view[0].style.backgroundImage = 'none'
|
|
1206
|
-
}
|
|
1207
1031
|
this.contentView.innerHTML = currentTarget.response
|
|
1208
1032
|
this.contentView.style.padding = '10px'
|
|
1209
1033
|
// this.contentView.style.position = 'relative'
|
|
1210
1034
|
this.$refs.pdfView.style.backgroundColor = '#FFFFFF'
|
|
1211
1035
|
this.$refs.pdfView.appendChild(this.contentView)
|
|
1212
|
-
|
|
1213
1036
|
let allTr = Array.from(this.$refs.pdfView.getElementsByTagName('tr'))
|
|
1214
1037
|
this.allTr = []
|
|
1215
1038
|
for (let index = 0; index < allTr.length; index++) {
|
|
@@ -1285,7 +1108,6 @@ export default {
|
|
|
1285
1108
|
// height: calc(100% - 110px);
|
|
1286
1109
|
height: 100%;
|
|
1287
1110
|
overflow: auto;
|
|
1288
|
-
//overflow-y: scroll;
|
|
1289
1111
|
background-color: #f5f7fb;
|
|
1290
1112
|
// margin-bottom: 60px;
|
|
1291
1113
|
box-sizing: border-box;
|
|
@@ -1511,4 +1333,4 @@ export default {
|
|
|
1511
1333
|
100% {
|
|
1512
1334
|
background: rgba(255, 136, 0, 0.3);
|
|
1513
1335
|
}
|
|
1514
|
-
}</style>
|
|
1336
|
+
}</style>
|
|
@@ -163,9 +163,17 @@ export default {
|
|
|
163
163
|
newDom.forEach(doms => {
|
|
164
164
|
doms.style.backgroundColor = this.colors[0];
|
|
165
165
|
})
|
|
166
|
-
|
|
166
|
+
const bodyWrapper = this.$refs.table.$el.querySelector('.el-table__body-wrapper');
|
|
167
|
+
const targetRow = this.$refs.table.$el.querySelector('.setBgClass' + rowId); // 获取目标行元素
|
|
168
|
+
const targetHeight = targetRow.offsetTop; // 目标行的高度(从上到下的距离)
|
|
169
|
+
bodyWrapper.scroll({
|
|
170
|
+
top:targetHeight,
|
|
171
|
+
behavior:"smooth"
|
|
172
|
+
}); // 滚动到目标行位置
|
|
173
|
+
|
|
174
|
+
// newDom[0].scrollIntoView({ behavior: "smooth"})
|
|
167
175
|
}
|
|
168
|
-
},
|
|
176
|
+
},800)
|
|
169
177
|
});
|
|
170
178
|
},
|
|
171
179
|
handleCurrentChange(val){
|