hoeditor-web 2.0.57 → 2.0.60
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/lib/hoeditor.common.js +1375 -487
- package/lib/hoeditor.css +854 -2
- package/lib/hoeditor.umd.js +1375 -487
- package/lib/hoeditor.umd.min.js +23 -23
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -10980,7 +10980,7 @@ var PrintStatus = /*#__PURE__*/function () {
|
|
|
10980
10980
|
this._printRecord = new PrintRecord(hoEditorFactoryID);
|
|
10981
10981
|
this._DrawRange = new Array();
|
|
10982
10982
|
this.pageSettingMap = new Map();
|
|
10983
|
-
this._printAppoint =
|
|
10983
|
+
this._printAppoint = '';
|
|
10984
10984
|
}
|
|
10985
10985
|
|
|
10986
10986
|
(0,createClass/* default */.Z)(PrintStatus, [{
|
|
@@ -11168,16 +11168,16 @@ var PrintStatus = /*#__PURE__*/function () {
|
|
|
11168
11168
|
return;
|
|
11169
11169
|
}
|
|
11170
11170
|
|
|
11171
|
-
if (values ==
|
|
11171
|
+
if (values == '') {
|
|
11172
11172
|
values = "".concat(this.startIndex, "-").concat(hoEditorFactory.drawTree.drawPages.length);
|
|
11173
11173
|
}
|
|
11174
11174
|
|
|
11175
|
-
values = values.replace(/\s*/g,
|
|
11175
|
+
values = values.replace(/\s*/g, '').replace(/[^\d|-]/g, ',').replace(/\,{2,}/g, ',');
|
|
11176
11176
|
var val = values;
|
|
11177
|
-
var arr = val.split(
|
|
11177
|
+
var arr = val.split(',');
|
|
11178
11178
|
var pages = new Array();
|
|
11179
11179
|
arr.forEach(function (value) {
|
|
11180
|
-
var tmp = value.split(
|
|
11180
|
+
var tmp = value.split('-');
|
|
11181
11181
|
|
|
11182
11182
|
if (tmp.length == 1) {
|
|
11183
11183
|
pages.push(parseInt(tmp[0]));
|
|
@@ -11196,9 +11196,10 @@ var PrintStatus = /*#__PURE__*/function () {
|
|
|
11196
11196
|
|
|
11197
11197
|
pages.sort(function (a, b) {
|
|
11198
11198
|
return a - b;
|
|
11199
|
-
});
|
|
11199
|
+
}); // console.log(pages);
|
|
11200
11200
|
// 去重
|
|
11201
|
-
|
|
11201
|
+
|
|
11202
|
+
this._printPages = (0,toConsumableArray/* default */.Z)(new Set(pages)); // console.log('页码范围:', this._printPages);
|
|
11202
11203
|
} catch (error) {
|
|
11203
11204
|
Exception/* Exception.printCallStack */.P.printCallStack();
|
|
11204
11205
|
}
|
|
@@ -11452,21 +11453,21 @@ var Print = /*#__PURE__*/function () {
|
|
|
11452
11453
|
(0,createClass/* default */.Z)(Print, null, [{
|
|
11453
11454
|
key: "openDataUriInWindow",
|
|
11454
11455
|
value: function openDataUriInWindow(PDF, fileName, width) {
|
|
11455
|
-
if (navigator && navigator.userAgent.toLowerCase().indexOf(
|
|
11456
|
-
var htmlForNewWindow =
|
|
11457
|
-
var nW = window.open(
|
|
11456
|
+
if (navigator && navigator.userAgent.toLowerCase().indexOf('electron') !== -1) {
|
|
11457
|
+
var htmlForNewWindow = '<html>' + '<title>' + fileName + '</title>' + '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style>' + '<body>' + '<iframe src="' + PDF.output('bloburl') + '"></iframe>' + '</body></html>';
|
|
11458
|
+
var nW = window.open('', 'modal', 'width=' + (width + 400) + ',height=800');
|
|
11458
11459
|
|
|
11459
11460
|
if (nW) {
|
|
11460
11461
|
nW.document.write(htmlForNewWindow);
|
|
11461
11462
|
}
|
|
11462
11463
|
} else {
|
|
11463
|
-
if (document.querySelector(
|
|
11464
|
-
document.body.removeChild(document.querySelector(
|
|
11464
|
+
if (document.querySelector('#Ho_Editor_Print_Iframe')) {
|
|
11465
|
+
document.body.removeChild(document.querySelector('#Ho_Editor_Print_Iframe'));
|
|
11465
11466
|
}
|
|
11466
11467
|
|
|
11467
11468
|
this.printPage(PDF).catch(function (error) {
|
|
11468
11469
|
PDF.autoPrint();
|
|
11469
|
-
PDF.output(
|
|
11470
|
+
PDF.output('dataurlnewwindow');
|
|
11470
11471
|
});
|
|
11471
11472
|
}
|
|
11472
11473
|
}
|
|
@@ -11479,7 +11480,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11479
11480
|
while (1) {
|
|
11480
11481
|
switch (_context2.prev = _context2.next) {
|
|
11481
11482
|
case 0:
|
|
11482
|
-
oHiddFrame = document.createElement(
|
|
11483
|
+
oHiddFrame = document.createElement('iframe');
|
|
11483
11484
|
printPromise = new Promise(function (resolve, reject) {
|
|
11484
11485
|
oHiddFrame.onload = function () {
|
|
11485
11486
|
try {
|
|
@@ -11488,20 +11489,20 @@ var Print = /*#__PURE__*/function () {
|
|
|
11488
11489
|
oHiddFrame === null || oHiddFrame === void 0 ? void 0 : (_oHiddFrame$contentWi = oHiddFrame.contentWindow) === null || _oHiddFrame$contentWi === void 0 ? void 0 : _oHiddFrame$contentWi.focus(); // Required for IE
|
|
11489
11490
|
|
|
11490
11491
|
oHiddFrame === null || oHiddFrame === void 0 ? void 0 : (_oHiddFrame$contentWi2 = oHiddFrame.contentWindow) === null || _oHiddFrame$contentWi2 === void 0 ? void 0 : _oHiddFrame$contentWi2.print();
|
|
11491
|
-
resolve(
|
|
11492
|
+
resolve('print');
|
|
11492
11493
|
} catch (error) {
|
|
11493
11494
|
reject(error);
|
|
11494
11495
|
}
|
|
11495
11496
|
};
|
|
11496
11497
|
});
|
|
11497
|
-
oHiddFrame.id =
|
|
11498
|
-
oHiddFrame.style.position =
|
|
11499
|
-
oHiddFrame.style.right =
|
|
11500
|
-
oHiddFrame.style.bottom =
|
|
11501
|
-
oHiddFrame.style.width =
|
|
11502
|
-
oHiddFrame.style.height =
|
|
11503
|
-
oHiddFrame.style.border =
|
|
11504
|
-
oHiddFrame.src = PDF.output(
|
|
11498
|
+
oHiddFrame.id = 'Ho_Editor_Print_Iframe';
|
|
11499
|
+
oHiddFrame.style.position = 'fixed';
|
|
11500
|
+
oHiddFrame.style.right = '0';
|
|
11501
|
+
oHiddFrame.style.bottom = '0';
|
|
11502
|
+
oHiddFrame.style.width = '0';
|
|
11503
|
+
oHiddFrame.style.height = '0';
|
|
11504
|
+
oHiddFrame.style.border = '0';
|
|
11505
|
+
oHiddFrame.src = PDF.output('bloburl');
|
|
11505
11506
|
document.body.appendChild(oHiddFrame);
|
|
11506
11507
|
_context2.next = 13;
|
|
11507
11508
|
return printPromise;
|
|
@@ -11541,7 +11542,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11541
11542
|
break;
|
|
11542
11543
|
}
|
|
11543
11544
|
|
|
11544
|
-
message_box_default().alert(
|
|
11545
|
+
message_box_default().alert('病程记录文件有删除或者内容减少,导致上一次记录的打印位置错误无法使用,请用重打进行打印或者删除所有打印记录后续打');
|
|
11545
11546
|
|
|
11546
11547
|
reslove && reslove(null);
|
|
11547
11548
|
return _context3.abrupt("return");
|
|
@@ -11573,17 +11574,17 @@ var Print = /*#__PURE__*/function () {
|
|
|
11573
11574
|
hoEditorFactory.printStatus.DrawPrintRange().preparePrint();
|
|
11574
11575
|
}
|
|
11575
11576
|
|
|
11576
|
-
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
11577
|
+
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
11577
11578
|
width = hoEditorFactory.pageProperty.widthPixes;
|
|
11578
|
-
height = orientation ===
|
|
11579
|
+
height = orientation === 'l' ? hoEditorFactory.pageProperty.heightPixes - 1 : hoEditorFactory.pageProperty.heightPixes;
|
|
11579
11580
|
|
|
11580
|
-
if (type ===
|
|
11581
|
-
svgBox = document.createElement(
|
|
11582
|
-
svgBox.className =
|
|
11581
|
+
if (type === 'html') {
|
|
11582
|
+
svgBox = document.createElement('div');
|
|
11583
|
+
svgBox.className = 'ho-print-svg-box';
|
|
11583
11584
|
}
|
|
11584
11585
|
|
|
11585
11586
|
last = -1;
|
|
11586
|
-
console.time(
|
|
11587
|
+
console.time('绘制svg和生成pdf');
|
|
11587
11588
|
_iterator = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.printStatus.printProcess());
|
|
11588
11589
|
_context3.prev = 15;
|
|
11589
11590
|
|
|
@@ -11591,7 +11592,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11591
11592
|
|
|
11592
11593
|
case 17:
|
|
11593
11594
|
if ((_step = _iterator.n()).done) {
|
|
11594
|
-
_context3.next =
|
|
11595
|
+
_context3.next = 60;
|
|
11595
11596
|
break;
|
|
11596
11597
|
}
|
|
11597
11598
|
|
|
@@ -11603,13 +11604,13 @@ var Print = /*#__PURE__*/function () {
|
|
|
11603
11604
|
}
|
|
11604
11605
|
|
|
11605
11606
|
_context3.next = 22;
|
|
11606
|
-
return message_box_default().confirm(
|
|
11607
|
-
confirmButtonText:
|
|
11608
|
-
type:
|
|
11607
|
+
return message_box_default().confirm('请进行翻页', '打印提示', {
|
|
11608
|
+
confirmButtonText: '确定',
|
|
11609
|
+
type: 'info'
|
|
11609
11610
|
});
|
|
11610
11611
|
|
|
11611
11612
|
case 22:
|
|
11612
|
-
return _context3.abrupt("continue",
|
|
11613
|
+
return _context3.abrupt("continue", 58);
|
|
11613
11614
|
|
|
11614
11615
|
case 23:
|
|
11615
11616
|
last = index;
|
|
@@ -11620,7 +11621,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11620
11621
|
break;
|
|
11621
11622
|
}
|
|
11622
11623
|
|
|
11623
|
-
return _context3.abrupt("break",
|
|
11624
|
+
return _context3.abrupt("break", 60);
|
|
11624
11625
|
|
|
11625
11626
|
case 27:
|
|
11626
11627
|
if (cpage.drawDomLevel && !cpage.drawDomLevel.stage) {
|
|
@@ -11631,7 +11632,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11631
11632
|
|
|
11632
11633
|
if (index === hoEditorFactory.startPageNum && positionY) {
|
|
11633
11634
|
dShape = new createjs.Shape();
|
|
11634
|
-
dShape.graphics.beginFill(
|
|
11635
|
+
dShape.graphics.beginFill('#fff').rect(0, 0, width, positionY).endFill();
|
|
11635
11636
|
cpage.drawDocContainer.addChild(dShape);
|
|
11636
11637
|
cpage.drawFooter.alpha = 0; // 上一页还有空余时续打起始页隐藏页脚
|
|
11637
11638
|
} // 光标处续打
|
|
@@ -11644,7 +11645,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11644
11645
|
if (index === posIndex && posY) {
|
|
11645
11646
|
_dShape = new createjs.Shape();
|
|
11646
11647
|
|
|
11647
|
-
_dShape.graphics.beginFill(
|
|
11648
|
+
_dShape.graphics.beginFill('#fff').rect(0, 0, width, posY).endFill();
|
|
11648
11649
|
|
|
11649
11650
|
cpage.drawDocContainer.addChild(_dShape);
|
|
11650
11651
|
cpage.drawFooter.alpha = 0;
|
|
@@ -11661,8 +11662,8 @@ var Print = /*#__PURE__*/function () {
|
|
|
11661
11662
|
y: 0
|
|
11662
11663
|
};
|
|
11663
11664
|
|
|
11664
|
-
if (hoEditorFactory.isFixedPrintToA4 && format) {
|
|
11665
|
-
if (orientation ==
|
|
11665
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1' && format) {
|
|
11666
|
+
if (orientation == 'l') {
|
|
11666
11667
|
svg2pdfOptions.x = format[0] - width;
|
|
11667
11668
|
svg2pdfOptions.y = (format[1] - height) / 2;
|
|
11668
11669
|
} else {
|
|
@@ -11671,20 +11672,31 @@ var Print = /*#__PURE__*/function () {
|
|
|
11671
11672
|
}
|
|
11672
11673
|
|
|
11673
11674
|
if (!hoEditorFactory.isUseImagePrint) {
|
|
11674
|
-
_context3.next =
|
|
11675
|
+
_context3.next = 44;
|
|
11675
11676
|
break;
|
|
11676
11677
|
}
|
|
11677
11678
|
|
|
11678
11679
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage();
|
|
11679
11680
|
ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
|
|
11681
|
+
window.printBlack = hoEditorFactory.printBlack;
|
|
11682
|
+
|
|
11683
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && format) {
|
|
11684
|
+
// 避免切换纸张的打印方式 绘制只处理竖向情况
|
|
11685
|
+
if (orientation === 'p' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5' && index == 0) {
|
|
11686
|
+
ctx.translate(0, 1122 / 2); // 由于旋转是默认以左上角为中心 所以需要先移动位置 改变起始点
|
|
11687
|
+
|
|
11688
|
+
ctx.rotate(270 * Math.PI / 180); // 旋转 context2d
|
|
11689
|
+
}
|
|
11690
|
+
}
|
|
11691
|
+
|
|
11680
11692
|
ctx.posX = svg2pdfOptions.x;
|
|
11681
11693
|
ctx.posY = svg2pdfOptions.y;
|
|
11682
11694
|
ctx && ((_cpage$drawDomLevel = cpage.drawDomLevel) === null || _cpage$drawDomLevel === void 0 ? void 0 : (_cpage$drawDomLevel$s = _cpage$drawDomLevel.stage) === null || _cpage$drawDomLevel$s === void 0 ? void 0 : _cpage$drawDomLevel$s.draw(ctx));
|
|
11683
11695
|
ctx = null;
|
|
11684
|
-
_context3.next =
|
|
11696
|
+
_context3.next = 57;
|
|
11685
11697
|
break;
|
|
11686
11698
|
|
|
11687
|
-
case
|
|
11699
|
+
case 44:
|
|
11688
11700
|
_ctx = new canvas2svg({
|
|
11689
11701
|
width: width,
|
|
11690
11702
|
height: height,
|
|
@@ -11692,142 +11704,142 @@ var Print = /*#__PURE__*/function () {
|
|
|
11692
11704
|
});
|
|
11693
11705
|
_ctx && ((_cpage$drawDomLevel2 = cpage.drawDomLevel) === null || _cpage$drawDomLevel2 === void 0 ? void 0 : (_cpage$drawDomLevel2$ = _cpage$drawDomLevel2.stage) === null || _cpage$drawDomLevel2$ === void 0 ? void 0 : _cpage$drawDomLevel2$.draw(_ctx));
|
|
11694
11706
|
|
|
11695
|
-
if (!(type ===
|
|
11696
|
-
_context3.next =
|
|
11707
|
+
if (!(type === 'html')) {
|
|
11708
|
+
_context3.next = 51;
|
|
11697
11709
|
break;
|
|
11698
11710
|
}
|
|
11699
11711
|
|
|
11700
11712
|
svgData = (_ctx2 = _ctx) === null || _ctx2 === void 0 ? void 0 : _ctx2.getSvg();
|
|
11701
11713
|
svgData && ((_svgBox2 = svgBox) === null || _svgBox2 === void 0 ? void 0 : _svgBox2.appendChild(svgData));
|
|
11702
|
-
_context3.next =
|
|
11714
|
+
_context3.next = 56;
|
|
11703
11715
|
break;
|
|
11704
11716
|
|
|
11705
|
-
case
|
|
11717
|
+
case 51:
|
|
11706
11718
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage();
|
|
11707
11719
|
_context3.t0 = PDF;
|
|
11708
11720
|
|
|
11709
11721
|
if (!_context3.t0) {
|
|
11710
|
-
_context3.next =
|
|
11722
|
+
_context3.next = 56;
|
|
11711
11723
|
break;
|
|
11712
11724
|
}
|
|
11713
11725
|
|
|
11714
|
-
_context3.next =
|
|
11726
|
+
_context3.next = 56;
|
|
11715
11727
|
return svg2pdf((_ctx3 = _ctx) === null || _ctx3 === void 0 ? void 0 : _ctx3.getSvg(), PDF, svg2pdfOptions);
|
|
11716
11728
|
|
|
11717
|
-
case
|
|
11729
|
+
case 56:
|
|
11718
11730
|
_ctx = null;
|
|
11719
11731
|
|
|
11720
|
-
case
|
|
11732
|
+
case 57:
|
|
11721
11733
|
index > 0 && ((_cpage$drawDomLevel3 = cpage.drawDomLevel) === null || _cpage$drawDomLevel3 === void 0 ? void 0 : _cpage$drawDomLevel3.clearStage());
|
|
11722
11734
|
|
|
11723
|
-
case
|
|
11735
|
+
case 58:
|
|
11724
11736
|
_context3.next = 17;
|
|
11725
11737
|
break;
|
|
11726
11738
|
|
|
11727
|
-
case
|
|
11728
|
-
_context3.next =
|
|
11739
|
+
case 60:
|
|
11740
|
+
_context3.next = 65;
|
|
11729
11741
|
break;
|
|
11730
11742
|
|
|
11731
|
-
case
|
|
11732
|
-
_context3.prev =
|
|
11743
|
+
case 62:
|
|
11744
|
+
_context3.prev = 62;
|
|
11733
11745
|
_context3.t1 = _context3["catch"](15);
|
|
11734
11746
|
|
|
11735
11747
|
_iterator.e(_context3.t1);
|
|
11736
11748
|
|
|
11737
|
-
case
|
|
11738
|
-
_context3.prev =
|
|
11749
|
+
case 65:
|
|
11750
|
+
_context3.prev = 65;
|
|
11739
11751
|
|
|
11740
11752
|
_iterator.f();
|
|
11741
11753
|
|
|
11742
|
-
return _context3.finish(
|
|
11754
|
+
return _context3.finish(65);
|
|
11743
11755
|
|
|
11744
|
-
case
|
|
11745
|
-
console.timeEnd(
|
|
11756
|
+
case 68:
|
|
11757
|
+
console.timeEnd('绘制svg和生成pdf');
|
|
11746
11758
|
if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
|
|
11747
11759
|
hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
|
|
11748
11760
|
|
|
11749
11761
|
if (!(positionY || hoEditorFactory.startPageNum !== 0 && positionY !== undefined)) {
|
|
11750
|
-
_context3.next =
|
|
11762
|
+
_context3.next = 77;
|
|
11751
11763
|
break;
|
|
11752
11764
|
}
|
|
11753
11765
|
|
|
11754
11766
|
_last = hoEditorFactory.printStatus.printRecord.last();
|
|
11755
11767
|
|
|
11756
11768
|
if (!(_last && hoEditorFactory.startPageNum == _last[0] && positionY === _last[1])) {
|
|
11757
|
-
_context3.next =
|
|
11769
|
+
_context3.next = 77;
|
|
11758
11770
|
break;
|
|
11759
11771
|
}
|
|
11760
11772
|
|
|
11761
|
-
message_box_default().confirm(
|
|
11762
|
-
confirmButtonText:
|
|
11763
|
-
type:
|
|
11773
|
+
message_box_default().confirm('无新增内容无法续打,如果要打印最后一份病历,请打开打印记录,删除最近一次打印记录', '打印提示', {
|
|
11774
|
+
confirmButtonText: '确定',
|
|
11775
|
+
type: 'info'
|
|
11764
11776
|
});
|
|
11765
11777
|
|
|
11766
|
-
reslove && reslove(
|
|
11778
|
+
reslove && reslove('printend');
|
|
11767
11779
|
return _context3.abrupt("return");
|
|
11768
11780
|
|
|
11769
|
-
case
|
|
11770
|
-
if (!(type ===
|
|
11771
|
-
_context3.next =
|
|
11781
|
+
case 77:
|
|
11782
|
+
if (!(type === 'pdf')) {
|
|
11783
|
+
_context3.next = 83;
|
|
11772
11784
|
break;
|
|
11773
11785
|
}
|
|
11774
11786
|
|
|
11775
11787
|
PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
|
|
11776
|
-
PDF === null || PDF === void 0 ? void 0 : PDF.save(fileName +
|
|
11788
|
+
PDF === null || PDF === void 0 ? void 0 : PDF.save(fileName + '.pdf');
|
|
11777
11789
|
hoEditorFactory.printStatus.drawPrintRecord.clear();
|
|
11778
|
-
_context3.next =
|
|
11790
|
+
_context3.next = 89;
|
|
11779
11791
|
break;
|
|
11780
11792
|
|
|
11781
|
-
case
|
|
11793
|
+
case 83:
|
|
11782
11794
|
if (!(svgBox && svgBox.childNodes.length === 0)) {
|
|
11783
|
-
_context3.next =
|
|
11795
|
+
_context3.next = 87;
|
|
11784
11796
|
break;
|
|
11785
11797
|
}
|
|
11786
11798
|
|
|
11787
|
-
message_box_default().confirm(
|
|
11788
|
-
confirmButtonText:
|
|
11789
|
-
type:
|
|
11799
|
+
message_box_default().confirm('无新增内容', '打印提示', {
|
|
11800
|
+
confirmButtonText: '确定',
|
|
11801
|
+
type: 'info'
|
|
11790
11802
|
});
|
|
11791
11803
|
|
|
11792
|
-
reslove && reslove(
|
|
11804
|
+
reslove && reslove('printend');
|
|
11793
11805
|
return _context3.abrupt("return");
|
|
11794
11806
|
|
|
11795
|
-
case
|
|
11807
|
+
case 87:
|
|
11796
11808
|
printStyle = (0,util/* createPrintHTMLStyle */.j_)(hoEditorFactory.pageProperty.pageSize, orientation);
|
|
11797
11809
|
|
|
11798
|
-
if (type ===
|
|
11810
|
+
if (type === 'html') {
|
|
11799
11811
|
exportHtml = "\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <style>".concat(printStyle.innerHTML, "</style>\n </head>\n <body>").concat((_svgBox = svgBox) === null || _svgBox === void 0 ? void 0 : _svgBox.innerHTML, "</body>\n </html>\n ");
|
|
11800
11812
|
url = window.URL.createObjectURL(new Blob([exportHtml], {
|
|
11801
11813
|
type: "text/html"
|
|
11802
11814
|
}));
|
|
11803
|
-
link = document.createElement(
|
|
11804
|
-
link.style.display =
|
|
11815
|
+
link = document.createElement('a');
|
|
11816
|
+
link.style.display = 'none';
|
|
11805
11817
|
link.href = url;
|
|
11806
|
-
link.setAttribute(
|
|
11818
|
+
link.setAttribute('download', fileName ? fileName : '电子病历文档');
|
|
11807
11819
|
document.body.appendChild(link);
|
|
11808
11820
|
link.click();
|
|
11809
11821
|
setTimeout(function () {
|
|
11810
11822
|
return link.remove();
|
|
11811
11823
|
}, 100);
|
|
11812
11824
|
} else {
|
|
11813
|
-
if (height <= 560) {
|
|
11825
|
+
if (height <= 560 && hoEditorFactory.isFixedPrintToA4 !== '2') {
|
|
11814
11826
|
PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
|
|
11815
11827
|
}
|
|
11816
11828
|
|
|
11817
11829
|
PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
|
|
11818
|
-
name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() :
|
|
11830
|
+
name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档';
|
|
11819
11831
|
PDF && this.openDataUriInWindow(PDF, name, hoEditorFactory.pageProperty.widthPixes);
|
|
11820
11832
|
}
|
|
11821
11833
|
|
|
11822
|
-
case
|
|
11823
|
-
reslove && reslove(
|
|
11834
|
+
case 89:
|
|
11835
|
+
reslove && reslove('printend');
|
|
11824
11836
|
|
|
11825
|
-
case
|
|
11837
|
+
case 90:
|
|
11826
11838
|
case "end":
|
|
11827
11839
|
return _context3.stop();
|
|
11828
11840
|
}
|
|
11829
11841
|
}
|
|
11830
|
-
}, _callee2, this, [[15,
|
|
11842
|
+
}, _callee2, this, [[15, 62, 65, 68]]);
|
|
11831
11843
|
}));
|
|
11832
11844
|
|
|
11833
11845
|
function printToPDF(_x2, _x3, _x4, _x5, _x6, _x7, _x8) {
|
|
@@ -11854,9 +11866,9 @@ var Print = /*#__PURE__*/function () {
|
|
|
11854
11866
|
hoEditorFactory.printStatus.DrawPrintRange().preparePrint();
|
|
11855
11867
|
}
|
|
11856
11868
|
|
|
11857
|
-
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
11858
|
-
svgBox = document.createElement(
|
|
11859
|
-
svgBox.className =
|
|
11869
|
+
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
11870
|
+
svgBox = document.createElement('div');
|
|
11871
|
+
svgBox.className = 'ho-print-svg-box';
|
|
11860
11872
|
last = -1;
|
|
11861
11873
|
_iterator2 = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.printStatus.printProcess());
|
|
11862
11874
|
_context4.prev = 9;
|
|
@@ -11865,7 +11877,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11865
11877
|
|
|
11866
11878
|
case 11:
|
|
11867
11879
|
if ((_step2 = _iterator2.n()).done) {
|
|
11868
|
-
_context4.next =
|
|
11880
|
+
_context4.next = 40;
|
|
11869
11881
|
break;
|
|
11870
11882
|
}
|
|
11871
11883
|
|
|
@@ -11877,13 +11889,13 @@ var Print = /*#__PURE__*/function () {
|
|
|
11877
11889
|
}
|
|
11878
11890
|
|
|
11879
11891
|
_context4.next = 16;
|
|
11880
|
-
return message_box_default().confirm(
|
|
11881
|
-
confirmButtonText:
|
|
11882
|
-
type:
|
|
11892
|
+
return message_box_default().confirm('请进行翻页', '打印提示', {
|
|
11893
|
+
confirmButtonText: '确定',
|
|
11894
|
+
type: 'info'
|
|
11883
11895
|
});
|
|
11884
11896
|
|
|
11885
11897
|
case 16:
|
|
11886
|
-
return _context4.abrupt("continue",
|
|
11898
|
+
return _context4.abrupt("continue", 38);
|
|
11887
11899
|
|
|
11888
11900
|
case 17:
|
|
11889
11901
|
last = index;
|
|
@@ -11894,7 +11906,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11894
11906
|
break;
|
|
11895
11907
|
}
|
|
11896
11908
|
|
|
11897
|
-
return _context4.abrupt("break",
|
|
11909
|
+
return _context4.abrupt("break", 40);
|
|
11898
11910
|
|
|
11899
11911
|
case 21:
|
|
11900
11912
|
if (cpage.drawDomLevel && !cpage.drawDomLevel.stage) {
|
|
@@ -11908,69 +11920,70 @@ var Print = /*#__PURE__*/function () {
|
|
|
11908
11920
|
}
|
|
11909
11921
|
|
|
11910
11922
|
if (!hoEditorFactory.isUseImagePrint) {
|
|
11911
|
-
_context4.next =
|
|
11923
|
+
_context4.next = 31;
|
|
11912
11924
|
break;
|
|
11913
11925
|
}
|
|
11914
11926
|
|
|
11915
11927
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage();
|
|
11916
11928
|
ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
|
|
11929
|
+
window.printBlack = hoEditorFactory.printBlack;
|
|
11917
11930
|
ctx && ((_cpage$drawDomLevel4 = cpage.drawDomLevel) === null || _cpage$drawDomLevel4 === void 0 ? void 0 : (_cpage$drawDomLevel4$ = _cpage$drawDomLevel4.stage) === null || _cpage$drawDomLevel4$ === void 0 ? void 0 : _cpage$drawDomLevel4$.draw(ctx));
|
|
11918
11931
|
ctx = null;
|
|
11919
|
-
_context4.next =
|
|
11932
|
+
_context4.next = 37;
|
|
11920
11933
|
break;
|
|
11921
11934
|
|
|
11922
|
-
case
|
|
11935
|
+
case 31:
|
|
11923
11936
|
_ctx4 = new canvas2svg({
|
|
11924
11937
|
width: hoEditorFactory.pageProperty.widthPixes,
|
|
11925
|
-
height: orientation ===
|
|
11938
|
+
height: orientation === 'l' ? hoEditorFactory.pageProperty.heightPixes - 1 : hoEditorFactory.pageProperty.heightPixes,
|
|
11926
11939
|
printBlack: hoEditorFactory.printBlack
|
|
11927
11940
|
});
|
|
11928
11941
|
_ctx4 && ((_cpage$drawDomLevel5 = cpage.drawDomLevel) === null || _cpage$drawDomLevel5 === void 0 ? void 0 : (_cpage$drawDomLevel5$ = _cpage$drawDomLevel5.stage) === null || _cpage$drawDomLevel5$ === void 0 ? void 0 : _cpage$drawDomLevel5$.draw(_ctx4));
|
|
11929
11942
|
PDF.addPage();
|
|
11930
|
-
_context4.next =
|
|
11943
|
+
_context4.next = 36;
|
|
11931
11944
|
return svg2pdf((_ctx5 = _ctx4) === null || _ctx5 === void 0 ? void 0 : _ctx5.getSvg(), PDF);
|
|
11932
11945
|
|
|
11933
|
-
case
|
|
11946
|
+
case 36:
|
|
11934
11947
|
_ctx4 = null;
|
|
11935
11948
|
|
|
11936
|
-
case
|
|
11949
|
+
case 37:
|
|
11937
11950
|
index > 0 && ((_cpage$drawDomLevel6 = cpage.drawDomLevel) === null || _cpage$drawDomLevel6 === void 0 ? void 0 : _cpage$drawDomLevel6.clearStage());
|
|
11938
11951
|
|
|
11939
|
-
case
|
|
11952
|
+
case 38:
|
|
11940
11953
|
_context4.next = 11;
|
|
11941
11954
|
break;
|
|
11942
11955
|
|
|
11943
|
-
case
|
|
11944
|
-
_context4.next =
|
|
11956
|
+
case 40:
|
|
11957
|
+
_context4.next = 45;
|
|
11945
11958
|
break;
|
|
11946
11959
|
|
|
11947
|
-
case
|
|
11948
|
-
_context4.prev =
|
|
11960
|
+
case 42:
|
|
11961
|
+
_context4.prev = 42;
|
|
11949
11962
|
_context4.t0 = _context4["catch"](9);
|
|
11950
11963
|
|
|
11951
11964
|
_iterator2.e(_context4.t0);
|
|
11952
11965
|
|
|
11953
|
-
case
|
|
11954
|
-
_context4.prev =
|
|
11966
|
+
case 45:
|
|
11967
|
+
_context4.prev = 45;
|
|
11955
11968
|
|
|
11956
11969
|
_iterator2.f();
|
|
11957
11970
|
|
|
11958
|
-
return _context4.finish(
|
|
11971
|
+
return _context4.finish(45);
|
|
11959
11972
|
|
|
11960
|
-
case
|
|
11973
|
+
case 48:
|
|
11961
11974
|
if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) {
|
|
11962
11975
|
hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
|
|
11963
11976
|
}
|
|
11964
11977
|
|
|
11965
11978
|
hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
|
|
11966
|
-
reslove && reslove(
|
|
11979
|
+
reslove && reslove('printend');
|
|
11967
11980
|
|
|
11968
|
-
case
|
|
11981
|
+
case 51:
|
|
11969
11982
|
case "end":
|
|
11970
11983
|
return _context4.stop();
|
|
11971
11984
|
}
|
|
11972
11985
|
}
|
|
11973
|
-
}, _callee3, null, [[9,
|
|
11986
|
+
}, _callee3, null, [[9, 42, 45, 48]]);
|
|
11974
11987
|
}));
|
|
11975
11988
|
|
|
11976
11989
|
function createPDFBase64(_x9, _x10, _x11) {
|
|
@@ -11992,11 +12005,11 @@ var Print = /*#__PURE__*/function () {
|
|
|
11992
12005
|
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(hoEditorFactoryID);
|
|
11993
12006
|
hoEditorFactory.printStatus.startIndex = 1;
|
|
11994
12007
|
hoEditorFactory.printStatus.generatePageIndexs(hoEditorFactory.printStatus.printAppoint);
|
|
11995
|
-
svgBox = document.createElement(
|
|
11996
|
-
svgBox.className =
|
|
11997
|
-
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
12008
|
+
svgBox = document.createElement('div');
|
|
12009
|
+
svgBox.className = 'ho-print-svg-box';
|
|
12010
|
+
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
11998
12011
|
width = hoEditorFactory.pageProperty.widthPixes;
|
|
11999
|
-
height = orientation ===
|
|
12012
|
+
height = orientation === 'l' ? hoEditorFactory.pageProperty.heightPixes - 1 : hoEditorFactory.pageProperty.heightPixes;
|
|
12000
12013
|
last = -1;
|
|
12001
12014
|
_iterator3 = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.printStatus.printProcess());
|
|
12002
12015
|
_context5.prev = 10;
|
|
@@ -12017,9 +12030,9 @@ var Print = /*#__PURE__*/function () {
|
|
|
12017
12030
|
}
|
|
12018
12031
|
|
|
12019
12032
|
_context5.next = 17;
|
|
12020
|
-
return message_box_default().confirm(
|
|
12021
|
-
confirmButtonText:
|
|
12022
|
-
type:
|
|
12033
|
+
return message_box_default().confirm('请进行翻页', '打印提示', {
|
|
12034
|
+
confirmButtonText: '确定',
|
|
12035
|
+
type: 'info'
|
|
12023
12036
|
});
|
|
12024
12037
|
|
|
12025
12038
|
case 17:
|
|
@@ -12086,7 +12099,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
12086
12099
|
hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
|
|
12087
12100
|
printStyle = (0,util/* createPrintHTMLStyle */.j_)(hoEditorFactory.pageProperty.pageSize, orientation);
|
|
12088
12101
|
htmlText.text = "\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <style>".concat(printStyle.innerHTML, "</style>\n </head>\n <body>").concat(svgBox === null || svgBox === void 0 ? void 0 : svgBox.innerHTML, "</body>\n </html>\n ");
|
|
12089
|
-
reslove && reslove(
|
|
12102
|
+
reslove && reslove('printend');
|
|
12090
12103
|
|
|
12091
12104
|
case 44:
|
|
12092
12105
|
case "end":
|
|
@@ -12106,7 +12119,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
12106
12119
|
key: "printAllNew",
|
|
12107
12120
|
value: function () {
|
|
12108
12121
|
var _printAllNew = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee5(hoEditorFactoryID, reslove, PDF, position) {
|
|
12109
|
-
var hoEditorFactory, a4Size, svgBox, last,
|
|
12122
|
+
var hoEditorFactory, a4Size, svgBox, last, widthPixes, heightPixes, orientation, formats, format, svg2pdfOptions, _iterator4, _step4, _cpage$drawDomLevel12, index, cpage, _cpage$drawDomLevel9, _cpage$drawDomLevel9$, ctx, _cpage$drawDomLevel10, _cpage$drawDomLevel11, _ctx7, _ctx6, lastPos;
|
|
12110
12123
|
|
|
12111
12124
|
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee5$(_context6) {
|
|
12112
12125
|
while (1) {
|
|
@@ -12119,37 +12132,56 @@ var Print = /*#__PURE__*/function () {
|
|
|
12119
12132
|
p: [793, 1122],
|
|
12120
12133
|
l: [1122, 793]
|
|
12121
12134
|
};
|
|
12122
|
-
svgBox = document.createElement(
|
|
12123
|
-
svgBox.className =
|
|
12135
|
+
svgBox = document.createElement('div');
|
|
12136
|
+
svgBox.className = 'ho-print-svg-box';
|
|
12124
12137
|
last = -1;
|
|
12138
|
+
widthPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.widthMm, true);
|
|
12139
|
+
heightPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.heightMm, true);
|
|
12140
|
+
orientation = widthPixes > heightPixes ? 'l' : 'p';
|
|
12141
|
+
formats = [widthPixes, heightPixes];
|
|
12142
|
+
format = a4Size[orientation];
|
|
12143
|
+
svg2pdfOptions = {
|
|
12144
|
+
x: 0,
|
|
12145
|
+
y: 0
|
|
12146
|
+
};
|
|
12147
|
+
|
|
12148
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1' && format) {
|
|
12149
|
+
if (orientation == 'l') {
|
|
12150
|
+
svg2pdfOptions.x = format[0] - widthPixes;
|
|
12151
|
+
svg2pdfOptions.y = (format[1] - heightPixes) / 2;
|
|
12152
|
+
} else {
|
|
12153
|
+
svg2pdfOptions.x = (format[0] - widthPixes) / 2;
|
|
12154
|
+
}
|
|
12155
|
+
}
|
|
12156
|
+
|
|
12125
12157
|
_iterator4 = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.printStatus.printProcess());
|
|
12126
|
-
_context6.prev =
|
|
12158
|
+
_context6.prev = 15;
|
|
12127
12159
|
|
|
12128
12160
|
_iterator4.s();
|
|
12129
12161
|
|
|
12130
|
-
case
|
|
12162
|
+
case 17:
|
|
12131
12163
|
if ((_step4 = _iterator4.n()).done) {
|
|
12132
|
-
_context6.next =
|
|
12164
|
+
_context6.next = 50;
|
|
12133
12165
|
break;
|
|
12134
12166
|
}
|
|
12135
12167
|
|
|
12136
12168
|
index = _step4.value;
|
|
12137
12169
|
|
|
12138
12170
|
if (!(index == -1)) {
|
|
12139
|
-
_context6.next =
|
|
12171
|
+
_context6.next = 23;
|
|
12140
12172
|
break;
|
|
12141
12173
|
}
|
|
12142
12174
|
|
|
12143
|
-
_context6.next =
|
|
12144
|
-
return message_box_default().confirm(
|
|
12145
|
-
confirmButtonText:
|
|
12146
|
-
type:
|
|
12175
|
+
_context6.next = 22;
|
|
12176
|
+
return message_box_default().confirm('请进行翻页', '打印提示', {
|
|
12177
|
+
confirmButtonText: '确定',
|
|
12178
|
+
type: 'info'
|
|
12147
12179
|
});
|
|
12148
12180
|
|
|
12149
|
-
case
|
|
12150
|
-
return _context6.abrupt("continue",
|
|
12181
|
+
case 22:
|
|
12182
|
+
return _context6.abrupt("continue", 48);
|
|
12151
12183
|
|
|
12152
|
-
case
|
|
12184
|
+
case 23:
|
|
12153
12185
|
last = index;
|
|
12154
12186
|
cpage = hoEditorFactory.drawTree.drawPages[index];
|
|
12155
12187
|
|
|
@@ -12164,55 +12196,58 @@ var Print = /*#__PURE__*/function () {
|
|
|
12164
12196
|
}
|
|
12165
12197
|
|
|
12166
12198
|
if (!(index === hoEditorFactory.drawTree.drawPages.length - 1 && cpage.drawMainDoc.children.length === 2 && !(cpage.drawMainDoc.children[0] instanceof DrawPageTable/* DrawPageTable */.ox) && cpage.drawMainDoc.children[1] && cpage.drawMainDoc.children[1].drawItems.length === 0)) {
|
|
12167
|
-
_context6.next =
|
|
12199
|
+
_context6.next = 29;
|
|
12168
12200
|
break;
|
|
12169
12201
|
}
|
|
12170
12202
|
|
|
12171
|
-
return _context6.abrupt("break",
|
|
12172
|
-
|
|
12173
|
-
case 22:
|
|
12174
|
-
widthPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.widthMm, true);
|
|
12175
|
-
heightPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.heightMm, true);
|
|
12176
|
-
orientation = widthPixes > heightPixes ? "l" : "p";
|
|
12177
|
-
formats = [widthPixes, heightPixes];
|
|
12178
|
-
format = a4Size[orientation];
|
|
12179
|
-
svg2pdfOptions = {
|
|
12180
|
-
x: 0,
|
|
12181
|
-
y: 0
|
|
12182
|
-
};
|
|
12183
|
-
|
|
12184
|
-
if (hoEditorFactory.isFixedPrintToA4 && format) {
|
|
12185
|
-
if (orientation == "l") {
|
|
12186
|
-
svg2pdfOptions.x = format[0] - widthPixes;
|
|
12187
|
-
svg2pdfOptions.y = (format[1] - heightPixes) / 2;
|
|
12188
|
-
} else {
|
|
12189
|
-
svg2pdfOptions.x = (format[0] - widthPixes) / 2;
|
|
12190
|
-
}
|
|
12191
|
-
}
|
|
12203
|
+
return _context6.abrupt("break", 50);
|
|
12192
12204
|
|
|
12205
|
+
case 29:
|
|
12193
12206
|
if (!hoEditorFactory.isUseImagePrint) {
|
|
12194
|
-
_context6.next =
|
|
12207
|
+
_context6.next = 41;
|
|
12195
12208
|
break;
|
|
12196
12209
|
}
|
|
12197
12210
|
|
|
12198
|
-
if (formats.length == 2 &&
|
|
12211
|
+
if (formats.length == 2 && hoEditorFactory.isFixedPrintToA4 == '1') {
|
|
12199
12212
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage(formats, orientation);
|
|
12213
|
+
} else if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
12214
|
+
PDF === null || PDF === void 0 ? void 0 : PDF.addPage([793, 1122], 'p');
|
|
12200
12215
|
} else {
|
|
12201
12216
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
|
|
12202
12217
|
}
|
|
12203
12218
|
|
|
12204
12219
|
ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
|
|
12220
|
+
|
|
12221
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && index == 0 && hoEditorFactory.isRotate) {
|
|
12222
|
+
// 复位 需要先按移动过的位置恢复旋转前的角度,然后才能移动位置
|
|
12223
|
+
ctx.rotate(90 * Math.PI / 180);
|
|
12224
|
+
ctx.translate(0, -1122 / 2);
|
|
12225
|
+
hoEditorFactory.isRotate = false;
|
|
12226
|
+
}
|
|
12227
|
+
|
|
12228
|
+
window.printBlack = hoEditorFactory.printBlack;
|
|
12229
|
+
|
|
12230
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && index == 0 && !hoEditorFactory.isRotate && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
12231
|
+
// 避免切换纸张的打印方式 绘制只处理竖向情况
|
|
12232
|
+
if (orientation === 'p') {
|
|
12233
|
+
// 旋转是默认以左上角为中心 需要先移动位置 再进行旋转
|
|
12234
|
+
ctx.translate(0, 1122 / 2);
|
|
12235
|
+
ctx.rotate(270 * Math.PI / 180);
|
|
12236
|
+
hoEditorFactory.isRotate = true;
|
|
12237
|
+
}
|
|
12238
|
+
}
|
|
12239
|
+
|
|
12205
12240
|
ctx.posX = svg2pdfOptions.x;
|
|
12206
12241
|
ctx.posY = svg2pdfOptions.y;
|
|
12207
12242
|
ctx && ((_cpage$drawDomLevel9 = cpage.drawDomLevel) === null || _cpage$drawDomLevel9 === void 0 ? void 0 : (_cpage$drawDomLevel9$ = _cpage$drawDomLevel9.stage) === null || _cpage$drawDomLevel9$ === void 0 ? void 0 : _cpage$drawDomLevel9$.draw(ctx));
|
|
12208
12243
|
ctx = null;
|
|
12209
|
-
_context6.next =
|
|
12244
|
+
_context6.next = 47;
|
|
12210
12245
|
break;
|
|
12211
12246
|
|
|
12212
|
-
case
|
|
12247
|
+
case 41:
|
|
12213
12248
|
_ctx6 = new canvas2svg({
|
|
12214
12249
|
width: widthPixes,
|
|
12215
|
-
height: orientation ===
|
|
12250
|
+
height: orientation === 'l' ? heightPixes - 1 : heightPixes,
|
|
12216
12251
|
printBlack: hoEditorFactory.printBlack
|
|
12217
12252
|
});
|
|
12218
12253
|
_ctx6 && ((_cpage$drawDomLevel10 = cpage.drawDomLevel) === null || _cpage$drawDomLevel10 === void 0 ? void 0 : (_cpage$drawDomLevel11 = _cpage$drawDomLevel10.stage) === null || _cpage$drawDomLevel11 === void 0 ? void 0 : _cpage$drawDomLevel11.draw(_ctx6));
|
|
@@ -12223,37 +12258,37 @@ var Print = /*#__PURE__*/function () {
|
|
|
12223
12258
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
|
|
12224
12259
|
}
|
|
12225
12260
|
|
|
12226
|
-
_context6.next =
|
|
12261
|
+
_context6.next = 46;
|
|
12227
12262
|
return svg2pdf((_ctx7 = _ctx6) === null || _ctx7 === void 0 ? void 0 : _ctx7.getSvg(), PDF, svg2pdfOptions);
|
|
12228
12263
|
|
|
12229
|
-
case
|
|
12264
|
+
case 46:
|
|
12230
12265
|
_ctx6 = null;
|
|
12231
12266
|
|
|
12232
|
-
case
|
|
12267
|
+
case 47:
|
|
12233
12268
|
index > 0 && ((_cpage$drawDomLevel12 = cpage.drawDomLevel) === null || _cpage$drawDomLevel12 === void 0 ? void 0 : _cpage$drawDomLevel12.clearStage());
|
|
12234
12269
|
|
|
12235
|
-
case
|
|
12236
|
-
_context6.next =
|
|
12270
|
+
case 48:
|
|
12271
|
+
_context6.next = 17;
|
|
12237
12272
|
break;
|
|
12238
12273
|
|
|
12239
|
-
case
|
|
12240
|
-
_context6.next =
|
|
12274
|
+
case 50:
|
|
12275
|
+
_context6.next = 55;
|
|
12241
12276
|
break;
|
|
12242
12277
|
|
|
12243
|
-
case
|
|
12244
|
-
_context6.prev =
|
|
12245
|
-
_context6.t0 = _context6["catch"](
|
|
12278
|
+
case 52:
|
|
12279
|
+
_context6.prev = 52;
|
|
12280
|
+
_context6.t0 = _context6["catch"](15);
|
|
12246
12281
|
|
|
12247
12282
|
_iterator4.e(_context6.t0);
|
|
12248
12283
|
|
|
12249
|
-
case
|
|
12250
|
-
_context6.prev =
|
|
12284
|
+
case 55:
|
|
12285
|
+
_context6.prev = 55;
|
|
12251
12286
|
|
|
12252
12287
|
_iterator4.f();
|
|
12253
12288
|
|
|
12254
|
-
return _context6.finish(
|
|
12289
|
+
return _context6.finish(55);
|
|
12255
12290
|
|
|
12256
|
-
case
|
|
12291
|
+
case 58:
|
|
12257
12292
|
if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) {
|
|
12258
12293
|
hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
|
|
12259
12294
|
}
|
|
@@ -12271,12 +12306,12 @@ var Print = /*#__PURE__*/function () {
|
|
|
12271
12306
|
hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
|
|
12272
12307
|
reslove();
|
|
12273
12308
|
|
|
12274
|
-
case
|
|
12309
|
+
case 62:
|
|
12275
12310
|
case "end":
|
|
12276
12311
|
return _context6.stop();
|
|
12277
12312
|
}
|
|
12278
12313
|
}
|
|
12279
|
-
}, _callee5, null, [[
|
|
12314
|
+
}, _callee5, null, [[15, 52, 55, 58]]);
|
|
12280
12315
|
}));
|
|
12281
12316
|
|
|
12282
12317
|
function printAllNew(_x15, _x16, _x17, _x18) {
|
|
@@ -19703,8 +19738,10 @@ var DomRange = /*#__PURE__*/function () {
|
|
|
19703
19738
|
// const hoEditorFactory = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
19704
19739
|
// const isValidPath = hoEditorFactory.docTree.checkPath(value);
|
|
19705
19740
|
if (value.indexOf("-") >= 0) {
|
|
19706
|
-
|
|
19741
|
+
//const hoEditorFactory = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
19742
|
+
element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0___default().alert("当前路径s(" + value + ")异常,请用鼠标点击一下页面(重获路径)再进行之后的操作。(" + this._startPath + ")");
|
|
19707
19743
|
|
|
19744
|
+
this.setSamePath(this._startPath);
|
|
19708
19745
|
return;
|
|
19709
19746
|
} else {
|
|
19710
19747
|
this._startPath = value;
|
|
@@ -19721,8 +19758,9 @@ var DomRange = /*#__PURE__*/function () {
|
|
|
19721
19758
|
// const hoEditorFactory = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
19722
19759
|
// const isValidPath = hoEditorFactory.docTree.checkPath(value);
|
|
19723
19760
|
if (value.indexOf("-") >= 0) {
|
|
19724
|
-
element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0___default().alert("当前路径e(" + value + ")异常,请用鼠标点击一下页面(重获路径)再进行之后的操作。");
|
|
19761
|
+
element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0___default().alert("当前路径e(" + value + ")异常,请用鼠标点击一下页面(重获路径)再进行之后的操作。(" + this._endPath + ")");
|
|
19725
19762
|
|
|
19763
|
+
this.setSamePath(this._endPath);
|
|
19726
19764
|
return;
|
|
19727
19765
|
} else {
|
|
19728
19766
|
this._endPath = value;
|
|
@@ -24771,8 +24809,13 @@ var BaseNode = /*#__PURE__*/function () {
|
|
|
24771
24809
|
var index = parentNodes.indexOf(this);
|
|
24772
24810
|
|
|
24773
24811
|
if (index != -1) {
|
|
24774
|
-
if (this.parentNode)
|
|
24775
|
-
|
|
24812
|
+
if (this.parentNode) {
|
|
24813
|
+
//有父节点,使用父节点的删除方法
|
|
24814
|
+
return this.parentNode.removeChild(this);
|
|
24815
|
+
} else {
|
|
24816
|
+
parentNodes.splice(index, 1);
|
|
24817
|
+
}
|
|
24818
|
+
|
|
24776
24819
|
return true;
|
|
24777
24820
|
}
|
|
24778
24821
|
|
|
@@ -26220,10 +26263,28 @@ var CellNode = /*#__PURE__*/function (_RectNode) {
|
|
|
26220
26263
|
// return;
|
|
26221
26264
|
// }
|
|
26222
26265
|
// }
|
|
26266
|
+
//const startPath = `${this.getNodePath()}/0`;
|
|
26267
|
+
//const startPath = hoEditorFactory.docTree.curDomRange.startPath;
|
|
26268
|
+
|
|
26269
|
+
|
|
26270
|
+
var endPath = "";
|
|
26271
|
+
var startPath = "";
|
|
26272
|
+
|
|
26273
|
+
if (this.table.tableProperty.isAutoChangeLine) {
|
|
26274
|
+
var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
26223
26275
|
|
|
26276
|
+
if (curDomRange.npEnd.node instanceof _ParagraphNode__WEBPACK_IMPORTED_MODULE_31__/* .ParagraphNode */ .C) {
|
|
26277
|
+
startPath = curDomRange.startPath;
|
|
26278
|
+
endPath = startPath;
|
|
26279
|
+
} else {
|
|
26280
|
+
startPath = curDomRange.npEnd.node.prevSibling().getNodePath();
|
|
26281
|
+
endPath = hoEditorFactory.docTree.getNodeLastPath(curDomRange.npEnd.node);
|
|
26282
|
+
}
|
|
26283
|
+
} else {
|
|
26284
|
+
startPath = "".concat(this.getNodePath(), "/0");
|
|
26285
|
+
endPath = hoEditorFactory.docTree.getNodeLastPath(this);
|
|
26286
|
+
}
|
|
26224
26287
|
|
|
26225
|
-
var startPath = "".concat(this.getNodePath(), "/0");
|
|
26226
|
-
var endPath = hoEditorFactory.docTree.getNodeLastPath(this);
|
|
26227
26288
|
var aRange = new _DomRange__WEBPACK_IMPORTED_MODULE_24__/* .DomRange */ .a(this._hoEditorFactoryID, startPath, endPath);
|
|
26228
26289
|
hoEditorFactory.docController.deleteRange(aRange, true);
|
|
26229
26290
|
hoEditorFactory.docController.insertPlainTextAfterPath(startPath, value);
|
|
@@ -28602,8 +28663,8 @@ var BaseNode = __webpack_require__(92178);
|
|
|
28602
28663
|
/*
|
|
28603
28664
|
* @Author: your name
|
|
28604
28665
|
* @Date: 2020-11-11 10:02:30
|
|
28605
|
-
* @LastEditTime:
|
|
28606
|
-
* @LastEditors:
|
|
28666
|
+
* @LastEditTime: 2022-06-23 09:54:03
|
|
28667
|
+
* @LastEditors: liyanan 2441631434@qq.com
|
|
28607
28668
|
* @Description: In User Settings Edit
|
|
28608
28669
|
* @FilePath: \hoeditor-web\src\editor\dom\treeNode\ImageNode.ts
|
|
28609
28670
|
*/
|
|
@@ -28710,6 +28771,12 @@ var ImageNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
28710
28771
|
key: "imageDataBase64String",
|
|
28711
28772
|
get: function get() {
|
|
28712
28773
|
return this._imageDataBase64String;
|
|
28774
|
+
},
|
|
28775
|
+
set: function set(value) {
|
|
28776
|
+
if (this._imageDataBase64String !== value) {
|
|
28777
|
+
this._imageDataBase64String = value;
|
|
28778
|
+
this.node2DrawNodeRange(0, 0);
|
|
28779
|
+
}
|
|
28713
28780
|
}
|
|
28714
28781
|
/**
|
|
28715
28782
|
* imageNode 节点删除时 如果 imageDataBase64String是url地址形式 需要保存url列表
|
|
@@ -28737,6 +28804,7 @@ var ImageNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
28737
28804
|
}, {
|
|
28738
28805
|
key: "node2DrawNodeRange",
|
|
28739
28806
|
value: function node2DrawNodeRange(startIndex, endIndex) {
|
|
28807
|
+
this._drawNodes.length = 0;
|
|
28740
28808
|
var dNode = new DrawImageNode(this._hoEditorFactoryID, this._rootPath, this, 0, this.imageDataBase64String, this.width, this.height //,
|
|
28741
28809
|
//this.scaleX,
|
|
28742
28810
|
//this.scaleY
|
|
@@ -30574,27 +30642,32 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
|
|
|
30574
30642
|
/* harmony export */ "C": function() { return /* binding */ ParagraphNode; }
|
|
30575
30643
|
/* harmony export */ });
|
|
30576
30644
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91347);
|
|
30577
|
-
/* harmony import */ var
|
|
30578
|
-
/* harmony import */ var
|
|
30579
|
-
/* harmony import */ var
|
|
30580
|
-
/* harmony import */ var
|
|
30581
|
-
/* harmony import */ var
|
|
30582
|
-
/* harmony import */ var
|
|
30583
|
-
/* harmony import */ var
|
|
30584
|
-
/* harmony import */ var
|
|
30585
|
-
/* harmony import */ var
|
|
30586
|
-
/* harmony import */ var
|
|
30587
|
-
/* harmony import */ var
|
|
30588
|
-
/* harmony import */ var
|
|
30589
|
-
/* harmony import */ var
|
|
30590
|
-
/* harmony import */ var
|
|
30591
|
-
/* harmony import */ var
|
|
30592
|
-
/* harmony import */ var
|
|
30593
|
-
/* harmony import */ var
|
|
30594
|
-
/* harmony import */ var
|
|
30595
|
-
/* harmony import */ var
|
|
30596
|
-
/* harmony import */ var
|
|
30597
|
-
/* harmony import */ var
|
|
30645
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36768);
|
|
30646
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42015);
|
|
30647
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(16296);
|
|
30648
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(83964);
|
|
30649
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46455);
|
|
30650
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41539);
|
|
30651
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
30652
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(54747);
|
|
30653
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
30654
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(47941);
|
|
30655
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
30656
|
+
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40561);
|
|
30657
|
+
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
30658
|
+
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9653);
|
|
30659
|
+
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
30660
|
+
/* harmony import */ var _BaseNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(92178);
|
|
30661
|
+
/* harmony import */ var _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(28275);
|
|
30662
|
+
/* harmony import */ var _RectNode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4428);
|
|
30663
|
+
/* harmony import */ var _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(95329);
|
|
30664
|
+
/* harmony import */ var _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(646);
|
|
30665
|
+
/* harmony import */ var _TableNode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(59530);
|
|
30666
|
+
/* harmony import */ var _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(69802);
|
|
30667
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(28831);
|
|
30668
|
+
/* harmony import */ var _CellNode__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(69088);
|
|
30669
|
+
|
|
30670
|
+
|
|
30598
30671
|
|
|
30599
30672
|
|
|
30600
30673
|
|
|
@@ -30614,31 +30687,58 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
|
|
|
30614
30687
|
|
|
30615
30688
|
|
|
30616
30689
|
var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
30617
|
-
(0,
|
|
30690
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(ParagraphNode, _BaseNode);
|
|
30618
30691
|
|
|
30619
|
-
var _super = (0,
|
|
30692
|
+
var _super = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(ParagraphNode);
|
|
30620
30693
|
|
|
30621
|
-
function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo) {
|
|
30694
|
+
function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo, customProperty) {
|
|
30622
30695
|
var _this;
|
|
30623
30696
|
|
|
30624
|
-
(0,
|
|
30697
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(this, ParagraphNode);
|
|
30625
30698
|
|
|
30626
|
-
_this = _super.call(this, hoEditorFactoryID, rootNodes, parentNode,
|
|
30699
|
+
_this = _super.call(this, hoEditorFactoryID, rootNodes, parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType.ntParagraph */ .Jq.ntParagraph);
|
|
30627
30700
|
_this._parentNode = parentNode;
|
|
30628
30701
|
_this._drawLines = new Array();
|
|
30629
30702
|
_this._drawNodes = _this._drawLines;
|
|
30630
30703
|
_this._paraNo = paraNo;
|
|
30631
|
-
_this._styleIndex =
|
|
30704
|
+
_this._styleIndex = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(_this.hoEditorFactoryID).docTree.curStyleIndex;
|
|
30632
30705
|
_this._dTop = 0;
|
|
30633
30706
|
_this._dHeight = 0;
|
|
30634
30707
|
_this._pagePaintStart = null;
|
|
30635
30708
|
_this._printAsSinglePage = false;
|
|
30636
|
-
_this._docId = "";
|
|
30709
|
+
_this._docId = "";
|
|
30710
|
+
_this._customProperty = new Object();
|
|
30711
|
+
|
|
30712
|
+
if (customProperty) {
|
|
30713
|
+
_this.setCustomProperty(customProperty);
|
|
30714
|
+
} // this.node2DrawNode();
|
|
30715
|
+
|
|
30637
30716
|
|
|
30638
30717
|
return _this;
|
|
30639
30718
|
}
|
|
30640
30719
|
|
|
30641
|
-
(0,
|
|
30720
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z)(ParagraphNode, [{
|
|
30721
|
+
key: "setCustomProperty",
|
|
30722
|
+
value: function setCustomProperty(customProperty) {
|
|
30723
|
+
var assignvalue = function assignvalue(target, source) {
|
|
30724
|
+
Object.keys(source).forEach(function (value) {
|
|
30725
|
+
if ((0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(target[value]) == "object") {
|
|
30726
|
+
if (Object.prototype.toString.call(source[value]) === "[object Object]") {
|
|
30727
|
+
assignvalue(target[value], source[value]);
|
|
30728
|
+
} else {
|
|
30729
|
+
if (source[value] !== "" && source[value] !== null) {
|
|
30730
|
+
assignvalue(target[value], eval("(" + source[value] + ")"));
|
|
30731
|
+
}
|
|
30732
|
+
}
|
|
30733
|
+
} else {
|
|
30734
|
+
target[value] = source[value];
|
|
30735
|
+
}
|
|
30736
|
+
});
|
|
30737
|
+
};
|
|
30738
|
+
|
|
30739
|
+
assignvalue(this._customProperty, customProperty);
|
|
30740
|
+
}
|
|
30741
|
+
}, {
|
|
30642
30742
|
key: "paraNo",
|
|
30643
30743
|
get: function get() {
|
|
30644
30744
|
return this._paraNo;
|
|
@@ -30665,6 +30765,16 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30665
30765
|
this._styleIndex = val;
|
|
30666
30766
|
}
|
|
30667
30767
|
}
|
|
30768
|
+
}, {
|
|
30769
|
+
key: "customProperty",
|
|
30770
|
+
get: function get() {
|
|
30771
|
+
return this._customProperty;
|
|
30772
|
+
},
|
|
30773
|
+
set: function set(val) {
|
|
30774
|
+
if (val != this._customProperty) {
|
|
30775
|
+
this._customProperty = val;
|
|
30776
|
+
}
|
|
30777
|
+
}
|
|
30668
30778
|
}, {
|
|
30669
30779
|
key: "combineParagraph",
|
|
30670
30780
|
get: function get() {
|
|
@@ -30686,7 +30796,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30686
30796
|
key: "drootNodes",
|
|
30687
30797
|
get: function get() {
|
|
30688
30798
|
if (!this._drawRoots) {
|
|
30689
|
-
var _HOEditorFactorys$ins =
|
|
30799
|
+
var _HOEditorFactorys$ins = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
|
|
30690
30800
|
_HOEditorFactorys$ins2 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_HOEditorFactorys$ins, 2),
|
|
30691
30801
|
dCell = _HOEditorFactorys$ins2[0],
|
|
30692
30802
|
dRoots = _HOEditorFactorys$ins2[1];
|
|
@@ -30699,7 +30809,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30699
30809
|
}, {
|
|
30700
30810
|
key: "refreshDrootNodes",
|
|
30701
30811
|
value: function refreshDrootNodes() {
|
|
30702
|
-
var _HOEditorFactorys$ins3 =
|
|
30812
|
+
var _HOEditorFactorys$ins3 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
|
|
30703
30813
|
_HOEditorFactorys$ins4 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_HOEditorFactorys$ins3, 2),
|
|
30704
30814
|
dCell = _HOEditorFactorys$ins4[0],
|
|
30705
30815
|
dRoots = _HOEditorFactorys$ins4[1];
|
|
@@ -30710,7 +30820,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30710
30820
|
key: "getParagraphLeftWidth",
|
|
30711
30821
|
value: function getParagraphLeftWidth() {
|
|
30712
30822
|
//如果父文档节点派生于rectNode(用于表格基类),则取
|
|
30713
|
-
var hoEditorFactory =
|
|
30823
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
30714
30824
|
var pNode = this._parentNode;
|
|
30715
30825
|
var aLeft;
|
|
30716
30826
|
var aWidth;
|
|
@@ -30726,7 +30836,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30726
30836
|
aWidth = _pRectNode$getLeftWid2[1];
|
|
30727
30837
|
bRectAlign = _pRectNode$getLeftWid2[2];
|
|
30728
30838
|
|
|
30729
|
-
if (pRectNode instanceof
|
|
30839
|
+
if (pRectNode instanceof _CellNode__WEBPACK_IMPORTED_MODULE_18__/* .CellNode */ .D) {
|
|
30730
30840
|
aLeft = hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[2] * 10, true);
|
|
30731
30841
|
aWidth = aWidth - aLeft - hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[3] * 10, true);
|
|
30732
30842
|
bRectAlign = true;
|
|
@@ -30749,7 +30859,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30749
30859
|
var dline = this._drawLines[index];
|
|
30750
30860
|
|
|
30751
30861
|
if (dline) {
|
|
30752
|
-
var _HOEditorFactorys$ins5 =
|
|
30862
|
+
var _HOEditorFactorys$ins5 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
|
|
30753
30863
|
_HOEditorFactorys$ins6 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_HOEditorFactorys$ins5, 2),
|
|
30754
30864
|
dCell = _HOEditorFactorys$ins6[0],
|
|
30755
30865
|
dRoots = _HOEditorFactorys$ins6[1];
|
|
@@ -30777,9 +30887,9 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30777
30887
|
// }
|
|
30778
30888
|
|
|
30779
30889
|
while (pNode) {
|
|
30780
|
-
if (pNode instanceof
|
|
30890
|
+
if (pNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z) {
|
|
30781
30891
|
return pNode;
|
|
30782
|
-
} else if (pNode instanceof
|
|
30892
|
+
} else if (pNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_16__/* .TextInputFieldNode */ .re && pNode.alignWithBlocked) {
|
|
30783
30893
|
return pNode;
|
|
30784
30894
|
} else {
|
|
30785
30895
|
pNode = pNode.parentNode;
|
|
@@ -30791,14 +30901,14 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30791
30901
|
}, {
|
|
30792
30902
|
key: "updateCombineParagraph",
|
|
30793
30903
|
value: function updateCombineParagraph() {
|
|
30794
|
-
var hoEditorFactory =
|
|
30904
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
30795
30905
|
var para = hoEditorFactory.docTree.paragraphs[this._paraNo];
|
|
30796
30906
|
|
|
30797
30907
|
if (!para) {
|
|
30798
30908
|
para = hoEditorFactory.docTree.paragraphs[0];
|
|
30799
30909
|
}
|
|
30800
30910
|
|
|
30801
|
-
return
|
|
30911
|
+
return _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Paragraph.para2CombinePara */ .nv.para2CombinePara(this._hoEditorFactoryID, this, para, hoEditorFactory.docTree.combineParagraph);
|
|
30802
30912
|
}
|
|
30803
30913
|
/**
|
|
30804
30914
|
* @author xyl
|
|
@@ -30838,10 +30948,10 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30838
30948
|
|
|
30839
30949
|
if (index > 0) {
|
|
30840
30950
|
var prevLine = this._drawLines[index - 1];
|
|
30841
|
-
if (prevLine instanceof
|
|
30951
|
+
if (prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a) prevLine.updateLineStyle();
|
|
30842
30952
|
}
|
|
30843
30953
|
|
|
30844
|
-
var aline = new
|
|
30954
|
+
var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a(this._rootPath, this, index, paragraphWidth);
|
|
30845
30955
|
aline.dTop = itop;
|
|
30846
30956
|
aline.dLeft = ileft;
|
|
30847
30957
|
aline.x = this.combineParagraph.leftMarginPixes;
|
|
@@ -30892,7 +31002,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30892
31002
|
var dline = this.drawlines[i];
|
|
30893
31003
|
|
|
30894
31004
|
if (dline) {
|
|
30895
|
-
if (dline instanceof
|
|
31005
|
+
if (dline instanceof _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_14__/* .DrawTable */ .t) {
|
|
30896
31006
|
dline.clear();
|
|
30897
31007
|
} else {
|
|
30898
31008
|
if (dline.parent) {
|
|
@@ -30910,12 +31020,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30910
31020
|
key: "node2DrawNode",
|
|
30911
31021
|
value: function node2DrawNode() {
|
|
30912
31022
|
this.clear();
|
|
30913
|
-
var itop = this.combineParagraph.topMarginPixes +
|
|
31023
|
+
var itop = this.combineParagraph.topMarginPixes + _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
|
|
30914
31024
|
var leftTopInfos = this.getParagraphLeftWidth();
|
|
30915
31025
|
var ileft = leftTopInfos[0];
|
|
30916
31026
|
var paragraphWidth = leftTopInfos[1]; // console.log(this._combineParagraph);
|
|
30917
31027
|
|
|
30918
|
-
var aline = new
|
|
31028
|
+
var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a(this._rootPath, this, 0, paragraphWidth);
|
|
30919
31029
|
this._dHeight = aline.dHeight;
|
|
30920
31030
|
|
|
30921
31031
|
this._drawLines.push(aline);
|
|
@@ -30950,7 +31060,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30950
31060
|
// this.drootNodes.push(this.drawlines[0]);
|
|
30951
31061
|
// }
|
|
30952
31062
|
if (dline) {
|
|
30953
|
-
var dTop =
|
|
31063
|
+
var dTop = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
|
|
30954
31064
|
this.placeDNodeAfterDTop(dTop, dline); // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.insertDline(droots,index+1,this._drawLines[0]);
|
|
30955
31065
|
}
|
|
30956
31066
|
}
|
|
@@ -30968,7 +31078,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30968
31078
|
var dline = prevDline;
|
|
30969
31079
|
|
|
30970
31080
|
while (index === -1) {
|
|
30971
|
-
var _TableNode$isNodeInTa =
|
|
31081
|
+
var _TableNode$isNodeInTa = _TableNode__WEBPACK_IMPORTED_MODULE_15__/* .TableNode.isNodeInTable */ .Fh.isNodeInTable(dline.paragraphNode),
|
|
30972
31082
|
_TableNode$isNodeInTa2 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_TableNode$isNodeInTa, 3),
|
|
30973
31083
|
bret = _TableNode$isNodeInTa2[0],
|
|
30974
31084
|
aTable = _TableNode$isNodeInTa2[1],
|
|
@@ -31043,7 +31153,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31043
31153
|
}, {
|
|
31044
31154
|
key: "isInCell",
|
|
31045
31155
|
value: function isInCell() {
|
|
31046
|
-
return this.parentNode !== null && this.parentNode instanceof
|
|
31156
|
+
return this.parentNode !== null && this.parentNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z;
|
|
31047
31157
|
}
|
|
31048
31158
|
}, {
|
|
31049
31159
|
key: "drawlines",
|
|
@@ -31053,7 +31163,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31053
31163
|
}, {
|
|
31054
31164
|
key: "adjustNextDline",
|
|
31055
31165
|
value: function adjustNextDline(dline, index) {
|
|
31056
|
-
var droots =
|
|
31166
|
+
var droots = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(dline.rootPath);
|
|
31057
31167
|
var dNextLine = this.getNextDline(dline);
|
|
31058
31168
|
|
|
31059
31169
|
for (var i = index; i < dline.drawItems.length; i++) {
|
|
@@ -31065,7 +31175,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31065
31175
|
}, {
|
|
31066
31176
|
key: "getParagraphLastNodePath",
|
|
31067
31177
|
value: function getParagraphLastNodePath() {
|
|
31068
|
-
return
|
|
31178
|
+
return _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.getParaNodeLastPath(this); // return this.getParagraphLastNode().getNodePath()
|
|
31069
31179
|
// const pNode = this._parentNode;
|
|
31070
31180
|
// if (pNode) {
|
|
31071
31181
|
// const index = pNode.childNodes.indexOf(this);
|
|
@@ -31104,7 +31214,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31104
31214
|
value: function updateDrawLineStyle() {
|
|
31105
31215
|
for (var i = 0; i < this._drawLines.length; i++) {
|
|
31106
31216
|
var dline = this._drawLines[i];
|
|
31107
|
-
if (dline instanceof
|
|
31217
|
+
if (dline instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a) dline.updateLineStyle();
|
|
31108
31218
|
} // if (dline instanceof DrawLine) dline.updateLineStyle();
|
|
31109
31219
|
|
|
31110
31220
|
}
|
|
@@ -31134,12 +31244,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31134
31244
|
}, {
|
|
31135
31245
|
key: "node2Json",
|
|
31136
31246
|
value: function node2Json(range, iscopy) {
|
|
31137
|
-
var combinePara = new
|
|
31247
|
+
var combinePara = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .CombineParagraph */ .kh(this._hoEditorFactoryID, null);
|
|
31138
31248
|
combinePara.copyStyle(this.combineParagraph);
|
|
31139
31249
|
var paragraphStyle = {
|
|
31140
31250
|
height: this.dHeight,
|
|
31141
31251
|
top: this.dTop,
|
|
31142
|
-
align:
|
|
31252
|
+
align: _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[combinePara.align],
|
|
31143
31253
|
charSpace: combinePara.charSpace,
|
|
31144
31254
|
lineSpace: combinePara.lineSpace,
|
|
31145
31255
|
leftMargin: combinePara.leftMarginMm,
|
|
@@ -31155,14 +31265,15 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31155
31265
|
//paragraphJson._align = Align[parseInt(paragraphJson._align)];
|
|
31156
31266
|
|
|
31157
31267
|
var paga = {
|
|
31158
|
-
nodeType:
|
|
31268
|
+
nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType */ .Jq[this.nodeType],
|
|
31159
31269
|
style: paragraphStyle,
|
|
31160
31270
|
// height: this.dHeight,
|
|
31161
31271
|
// top: this.dTop,
|
|
31162
31272
|
styleIndex: this._paraNo,
|
|
31163
31273
|
textStyleNo: this.styleIndex,
|
|
31164
31274
|
printAsSinglePage: this.printAsSinglePage,
|
|
31165
|
-
docId: this.docId
|
|
31275
|
+
docId: this.docId,
|
|
31276
|
+
customProperty: this.customProperty
|
|
31166
31277
|
}; //const dictType = NodeType[this.nodeType].substring(2);
|
|
31167
31278
|
|
|
31168
31279
|
if (iscopy) {
|
|
@@ -31192,8 +31303,13 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31192
31303
|
var index = parentNodes.indexOf(this);
|
|
31193
31304
|
|
|
31194
31305
|
if (index != -1) {
|
|
31195
|
-
if (this.parentNode)
|
|
31196
|
-
|
|
31306
|
+
if (this.parentNode) {
|
|
31307
|
+
//有父节点,使用父节点的删除方法
|
|
31308
|
+
return this.parentNode.removeChild(this);
|
|
31309
|
+
} else {
|
|
31310
|
+
parentNodes.splice(index, 1);
|
|
31311
|
+
}
|
|
31312
|
+
|
|
31197
31313
|
return true;
|
|
31198
31314
|
}
|
|
31199
31315
|
|
|
@@ -31213,20 +31329,20 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31213
31329
|
var paraNo = Number(json.styleIndex);
|
|
31214
31330
|
|
|
31215
31331
|
if (json["style"]) {
|
|
31216
|
-
var hoEditorFactory =
|
|
31332
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(hoEditorFactoryID);
|
|
31217
31333
|
var style = json.style;
|
|
31218
|
-
var paragraph = new
|
|
31334
|
+
var paragraph = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Paragraph */ .nv(hoEditorFactoryID);
|
|
31219
31335
|
paragraph.leftMargin = style._leftMarginMm ? Number(style._leftMarginMm) : Number(style.leftMargin);
|
|
31220
31336
|
paragraph.rightMargin = style._rightMarginMm ? Number(style._rightMarginMm) : Number(style.rightMargin);
|
|
31221
31337
|
paragraph.topMargin = style._topMarginMm ? Number(style._topMarginMm) : Number(style.topMargin);
|
|
31222
31338
|
paragraph.bottomMargin = style._bottomMarginMm ? Number(style._bottomMarginMm) : Number(style.bottomMargin);
|
|
31223
|
-
paragraph.align = style._align !== undefined ? parseInt(
|
|
31339
|
+
paragraph.align = style._align !== undefined ? parseInt(_domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[style._align]) : parseInt(_domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[style.align]);
|
|
31224
31340
|
paragraph.charSpace = style._charSpace ? Number(style._charSpace) : Number(style.charSpace);
|
|
31225
31341
|
paragraph.lineSpace = style._lineSpace ? Number(style._lineSpace) : Number(style.lineSpace);
|
|
31226
31342
|
paraNo = hoEditorFactory.docTree.styleCompare(paragraph);
|
|
31227
31343
|
}
|
|
31228
31344
|
|
|
31229
|
-
var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo);
|
|
31345
|
+
var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo, json.customProperty);
|
|
31230
31346
|
paragraphNode.docId = json.docId && json.docId !== "" ? json.docId : "";
|
|
31231
31347
|
paragraphNode.printAsSinglePage = json.printAsSinglePage ? json.printAsSinglePage === "true" ? true : false : false;
|
|
31232
31348
|
paragraphNode.styleIndex = json.textStyleNo ? Number(json.textStyleNo) : 0; // paragraphNode._dHeight = Number(json.height);
|
|
@@ -31237,7 +31353,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31237
31353
|
}]);
|
|
31238
31354
|
|
|
31239
31355
|
return ParagraphNode;
|
|
31240
|
-
}(
|
|
31356
|
+
}(_BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .BaseNode */ .Hd);
|
|
31241
31357
|
|
|
31242
31358
|
/***/ }),
|
|
31243
31359
|
|
|
@@ -33356,7 +33472,7 @@ var RadioAndCheckBoxNode = /*#__PURE__*/function (_ControlNode) {
|
|
|
33356
33472
|
}
|
|
33357
33473
|
|
|
33358
33474
|
json.isAllowDelete = !json.isAllowDelete ? false : json.isAllowDelete;
|
|
33359
|
-
json.isSelected = !json.isSelected ? false : json.isSelected;
|
|
33475
|
+
json.isSelected = !json.isSelected ? false : json.isSelected.text != undefined ? json.isSelected.text : json.isSelected;
|
|
33360
33476
|
json.boxAlign = !json.boxAlign ? false : json.boxAlign;
|
|
33361
33477
|
json.isEditText = !json.isEditText ? false : json.isEditText;
|
|
33362
33478
|
json.isTransToText = !json.isTransToText ? false : json.isTransToText;
|
|
@@ -35770,6 +35886,10 @@ var ColInfos = /*#__PURE__*/function () {
|
|
|
35770
35886
|
return this._colWidth;
|
|
35771
35887
|
},
|
|
35772
35888
|
set: function set(colWidth) {
|
|
35889
|
+
if (isNaN(colWidth)) {
|
|
35890
|
+
console.warn('当前列宽 === NaN');
|
|
35891
|
+
}
|
|
35892
|
+
|
|
35773
35893
|
this._colWidth = colWidth;
|
|
35774
35894
|
}
|
|
35775
35895
|
}, {
|
|
@@ -38492,12 +38612,13 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
|
|
|
38492
38612
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38493
38613
|
/* harmony export */ "OL": function() { return /* binding */ DownListProperty; },
|
|
38494
38614
|
/* harmony export */ "ZX": function() { return /* binding */ DataFormat; },
|
|
38615
|
+
/* harmony export */ "Zi": function() { return /* binding */ InputFieldType; },
|
|
38495
38616
|
/* harmony export */ "hc": function() { return /* binding */ ExecuteStatus; },
|
|
38496
38617
|
/* harmony export */ "mK": function() { return /* binding */ ReadOnlyStatus; },
|
|
38497
38618
|
/* harmony export */ "re": function() { return /* binding */ TextInputFieldNode; },
|
|
38498
38619
|
/* harmony export */ "wz": function() { return /* binding */ DataVerifyFormat; }
|
|
38499
38620
|
/* harmony export */ });
|
|
38500
|
-
/* unused harmony exports
|
|
38621
|
+
/* unused harmony exports SpecialFormat, BandDataSource */
|
|
38501
38622
|
/* harmony import */ var element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86769);
|
|
38502
38623
|
/* harmony import */ var element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0__);
|
|
38503
38624
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13767);
|
|
@@ -42528,8 +42649,8 @@ var DrawLine = /*#__PURE__*/function (_DrawContainer) {
|
|
|
42528
42649
|
/*
|
|
42529
42650
|
* @Author: your name
|
|
42530
42651
|
* @Date: 2021-01-19 10:05:08
|
|
42531
|
-
* @LastEditTime:
|
|
42532
|
-
* @LastEditors:
|
|
42652
|
+
* @LastEditTime: 2022-06-24 16:54:17
|
|
42653
|
+
* @LastEditors: liyanan 2441631434@qq.com
|
|
42533
42654
|
* @Description: In User Settings Edit
|
|
42534
42655
|
* @FilePath: \hoeditor-web\src\editor\draw\DrawResize.ts
|
|
42535
42656
|
*/
|
|
@@ -42601,6 +42722,8 @@ var DrawResize = /*#__PURE__*/function () {
|
|
|
42601
42722
|
|
|
42602
42723
|
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_5__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
42603
42724
|
hoEditorFactory.docTree.curOnDragNode = this.node;
|
|
42725
|
+
this.dragFlag = true;
|
|
42726
|
+
this.sLocation = new createjs.Point(e.stageX, e.stageY);
|
|
42604
42727
|
this.drawBorders(this._drawNode.dWidth, this._drawNode.dHeight, true); //const drawLine = hoEditorFactory.drawTree.getDrawLineByDNode(
|
|
42605
42728
|
//this.drawNode
|
|
42606
42729
|
//);
|
|
@@ -42608,8 +42731,6 @@ var DrawResize = /*#__PURE__*/function () {
|
|
|
42608
42731
|
//drawLine.drawItems.splice(index, 1);
|
|
42609
42732
|
//drawLine.removeChild(this.drawNode);
|
|
42610
42733
|
|
|
42611
|
-
this.dragFlag = true;
|
|
42612
|
-
this.sLocation = new createjs.Point(e.stageX, e.stageY);
|
|
42613
42734
|
var shapes = this.drawNode.children;
|
|
42614
42735
|
shapes.forEach(function (value, index) {
|
|
42615
42736
|
// if (value.name !== this.node.id && value.alpha !== 1) {
|
|
@@ -42791,7 +42912,7 @@ var DrawResize = /*#__PURE__*/function () {
|
|
|
42791
42912
|
//左上
|
|
42792
42913
|
this.drawNode.dWidth = this.drawNode.dWidth - changeX;
|
|
42793
42914
|
this.drawNode.dHeight = this.drawNode.dHeight - changeY;
|
|
42794
|
-
this.imageY = this.imageY
|
|
42915
|
+
this.imageY = this.imageY + changeY;
|
|
42795
42916
|
} else if (e.target.name === "centerTop") {
|
|
42796
42917
|
//向上
|
|
42797
42918
|
this.drawNode.dHeight = this.drawNode.dHeight - changeY;
|
|
@@ -43445,7 +43566,7 @@ var StagePosition = /*#__PURE__*/function () {
|
|
|
43445
43566
|
/* harmony export */ "l": function() { return /* binding */ DrawArea; }
|
|
43446
43567
|
/* harmony export */ });
|
|
43447
43568
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42015);
|
|
43448
|
-
/* harmony import */ var
|
|
43569
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(16296);
|
|
43449
43570
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83964);
|
|
43450
43571
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46455);
|
|
43451
43572
|
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66992);
|
|
@@ -43473,6 +43594,8 @@ var StagePosition = /*#__PURE__*/function () {
|
|
|
43473
43594
|
/* harmony import */ var _editor_dom_NodePosition__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(14245);
|
|
43474
43595
|
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(28831);
|
|
43475
43596
|
/* harmony import */ var _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(59530);
|
|
43597
|
+
/* harmony import */ var _drawNode_DrawPageCell__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(12337);
|
|
43598
|
+
|
|
43476
43599
|
|
|
43477
43600
|
|
|
43478
43601
|
|
|
@@ -43526,7 +43649,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
43526
43649
|
// }
|
|
43527
43650
|
|
|
43528
43651
|
|
|
43529
|
-
(0,
|
|
43652
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_20__/* ["default"] */ .Z)(DrawArea, [{
|
|
43530
43653
|
key: "endDline",
|
|
43531
43654
|
get: function get() {
|
|
43532
43655
|
return this._endDline;
|
|
@@ -44364,7 +44487,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
44364
44487
|
var localPos = _this2.globalToLocal(stagePos.x, stagePos.y); // 末尾标记节点的stage坐标
|
|
44365
44488
|
|
|
44366
44489
|
|
|
44367
|
-
var spX = endDrawNode.x;
|
|
44490
|
+
var spX = dline.parent instanceof _drawNode_DrawPageCell__WEBPACK_IMPORTED_MODULE_19__/* .DrawPageCell */ .k ? localPos.x : endDrawNode.x;
|
|
44368
44491
|
var spY = localPos.y;
|
|
44369
44492
|
|
|
44370
44493
|
_this2.removeComment(value);
|
|
@@ -44595,11 +44718,176 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
44595
44718
|
if (child.name === comment.id) {
|
|
44596
44719
|
child.alpha = 1;
|
|
44597
44720
|
}
|
|
44598
|
-
}
|
|
44721
|
+
}
|
|
44722
|
+
|
|
44723
|
+
hoEditorFactory.drawPageTree.updateDrawPage(this.index);
|
|
44724
|
+
}
|
|
44725
|
+
}, {
|
|
44726
|
+
key: "drawEditRecords",
|
|
44727
|
+
value: function drawEditRecords(comment, nodeX, nodeY, commentY) {
|
|
44728
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
44729
|
+
var commentWidth = hoEditorFactory.pageProperty.rightMarginPixes - 15;
|
|
44730
|
+
var docWidth = this.docWidth;
|
|
44731
|
+
var container = new createjs.Container();
|
|
44732
|
+
container.x = docWidth + 15;
|
|
44733
|
+
container.y = commentY - comment.lineHeight / 2;
|
|
44734
|
+
container.name = comment.id;
|
|
44735
|
+
var commentTextShape = null; // 批注内容
|
|
44736
|
+
|
|
44737
|
+
var commentArr = comment.commentTextWarp(commentWidth, comment.text);
|
|
44738
|
+
var text = commentArr[0];
|
|
44739
|
+
var textLen = commentArr[1] > 1 ? commentArr[1] - 1 : commentArr[1];
|
|
44740
|
+
comment.lineHeight = 20 * textLen + 10;
|
|
44741
|
+
commentTextShape = new createjs.Text(text, "12px 微软雅黑", "#666");
|
|
44742
|
+
commentTextShape.lineWidth = commentWidth - 25;
|
|
44743
|
+
commentTextShape.lineHeight = 20;
|
|
44744
|
+
commentTextShape.name = "oldValue";
|
|
44745
|
+
commentTextShape.x = 5;
|
|
44746
|
+
commentTextShape.y = 10;
|
|
44747
|
+
commentTextShape.alpha = 1; //背景
|
|
44748
|
+
|
|
44749
|
+
var textWidth = commentTextShape.getMeasuredWidth();
|
|
44750
|
+
var shapeWidth = textWidth + 10 > commentWidth - 30 ? commentWidth - 30 : textWidth + 10;
|
|
44751
|
+
var backShape = new createjs.Shape();
|
|
44752
|
+
backShape.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke("rgba(255, 0, 0, 1)").beginFill("#ffe5e5").drawRoundRect(0, 0, shapeWidth, comment.lineHeight, 5);
|
|
44753
|
+
backShape.name = "backShape";
|
|
44754
|
+
backShape.alpha = 0.5; //横线
|
|
44599
44755
|
|
|
44756
|
+
var horizontalLine = new createjs.Shape();
|
|
44757
|
+
horizontalLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke("rgba(255, 0, 0, 1)").moveTo(nodeX, nodeY).lineTo(docWidth, nodeY);
|
|
44758
|
+
horizontalLine.name = comment.id;
|
|
44759
|
+
horizontalLine.alpha = 1; //指向线
|
|
44600
44760
|
|
|
44761
|
+
var guideLine = new createjs.Shape();
|
|
44762
|
+
guideLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke("rgba(255, 0, 0, 1)").moveTo(docWidth, nodeY).lineTo(docWidth + 15, commentY - comment.lineHeight / 4);
|
|
44763
|
+
guideLine.name = comment.id;
|
|
44764
|
+
guideLine.alpha = 1;
|
|
44765
|
+
container.addChild(backShape);
|
|
44766
|
+
container.addChild(commentTextShape);
|
|
44767
|
+
this.addChild(horizontalLine);
|
|
44768
|
+
this.addChild(guideLine);
|
|
44769
|
+
this.addChild(container);
|
|
44601
44770
|
hoEditorFactory.drawPageTree.updateDrawPage(this.index);
|
|
44602
44771
|
}
|
|
44772
|
+
}, {
|
|
44773
|
+
key: "repaintRecored",
|
|
44774
|
+
value: function repaintRecored(comments, comment, nPath, spX, spY) {
|
|
44775
|
+
var _this5 = this;
|
|
44776
|
+
|
|
44777
|
+
var topComments = new Array();
|
|
44778
|
+
var bottomComments = new Array();
|
|
44779
|
+
var tempArr = new Array();
|
|
44780
|
+
|
|
44781
|
+
var getStagePos = function getStagePos(comment) {
|
|
44782
|
+
var endDrawNode = comment.eNode.drawNodes[0];
|
|
44783
|
+
var dline = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(_this5._hoEditorFactoryID).drawTree.getDrawLineByDNode(endDrawNode); // 末尾标记节点所在行
|
|
44784
|
+
|
|
44785
|
+
var stagePos = dline.localToGlobal(endDrawNode.x, endDrawNode.y); // 末尾标记节点的stage坐标
|
|
44786
|
+
|
|
44787
|
+
var localPos = _this5.globalToLocal(stagePos.x, stagePos.y); // 末尾标记节点的stage坐标
|
|
44788
|
+
|
|
44789
|
+
|
|
44790
|
+
return [endDrawNode.x, localPos.y];
|
|
44791
|
+
};
|
|
44792
|
+
|
|
44793
|
+
var commentY = spY;
|
|
44794
|
+
comments.forEach(function (value) {
|
|
44795
|
+
if (value.id !== comment.id) {
|
|
44796
|
+
tempArr.push(value);
|
|
44797
|
+
}
|
|
44798
|
+
});
|
|
44799
|
+
tempArr.forEach(function (value) {
|
|
44800
|
+
var aPath = value.eNode.getNodePath();
|
|
44801
|
+
var result = _editor_dom_NodePosition__WEBPACK_IMPORTED_MODULE_16__/* .NodePosition.treePathCompare */ .F.treePathCompare(nPath, aPath);
|
|
44802
|
+
|
|
44803
|
+
if (result > 0) {
|
|
44804
|
+
topComments.push(value);
|
|
44805
|
+
} else {
|
|
44806
|
+
bottomComments.push(value);
|
|
44807
|
+
}
|
|
44808
|
+
});
|
|
44809
|
+
|
|
44810
|
+
if (topComments.length > 0) {
|
|
44811
|
+
var tempComment = topComments[0];
|
|
44812
|
+
var maxValue = getStagePos(tempComment)[1];
|
|
44813
|
+
var lHeight = tempComment.lineHeight;
|
|
44814
|
+
|
|
44815
|
+
for (var i = 1; i < topComments.length; i++) {
|
|
44816
|
+
var stageY = getStagePos(topComments[i])[1];
|
|
44817
|
+
|
|
44818
|
+
if (stageY > maxValue) {
|
|
44819
|
+
maxValue = stageY;
|
|
44820
|
+
lHeight = topComments[i].lineHeight;
|
|
44821
|
+
tempComment = topComments[i];
|
|
44822
|
+
}
|
|
44823
|
+
}
|
|
44824
|
+
|
|
44825
|
+
if (maxValue + lHeight + 5 > spY) {
|
|
44826
|
+
commentY = maxValue + lHeight + 5;
|
|
44827
|
+
|
|
44828
|
+
for (var j = 0; j < this.children.length; j++) {
|
|
44829
|
+
var child = this.children[j];
|
|
44830
|
+
|
|
44831
|
+
if (child.name === tempComment.id && child instanceof createjs.Container) {
|
|
44832
|
+
if (child.y + tempComment.lineHeight / 2 > maxValue) {
|
|
44833
|
+
commentY = child.y + tempComment.lineHeight / 2 + lHeight + 5;
|
|
44834
|
+
}
|
|
44835
|
+
}
|
|
44836
|
+
}
|
|
44837
|
+
}
|
|
44838
|
+
}
|
|
44839
|
+
|
|
44840
|
+
this.drawEditRecords(comment, spX, spY, commentY);
|
|
44841
|
+
|
|
44842
|
+
if (bottomComments.length > 0) {
|
|
44843
|
+
var repaintComment = function repaintComment(commentObj, commentY, lineHeight) {
|
|
44844
|
+
var nodeX = getStagePos(commentObj)[0];
|
|
44845
|
+
var nodeY = getStagePos(commentObj)[1];
|
|
44846
|
+
var arrIndex = bottomComments.indexOf(commentObj);
|
|
44847
|
+
bottomComments.splice(arrIndex, 1);
|
|
44848
|
+
|
|
44849
|
+
if (commentY + lineHeight + 5 > nodeY) {
|
|
44850
|
+
commentY = commentY + lineHeight + 5;
|
|
44851
|
+
} else {
|
|
44852
|
+
commentY = nodeY;
|
|
44853
|
+
}
|
|
44854
|
+
|
|
44855
|
+
_this5.removeComment(commentObj);
|
|
44856
|
+
|
|
44857
|
+
_this5.drawEditRecords(commentObj, nodeX, nodeY, commentY);
|
|
44858
|
+
|
|
44859
|
+
if (bottomComments.length > 0) {
|
|
44860
|
+
var _minValue2 = getStagePos(bottomComments[0])[1];
|
|
44861
|
+
var _tempComment4 = bottomComments[0];
|
|
44862
|
+
|
|
44863
|
+
for (var _j2 = 1; _j2 < bottomComments.length; _j2++) {
|
|
44864
|
+
var _stageY3 = getStagePos(bottomComments[_j2])[1];
|
|
44865
|
+
|
|
44866
|
+
if (_stageY3 < _minValue2) {
|
|
44867
|
+
_minValue2 = _stageY3;
|
|
44868
|
+
_tempComment4 = bottomComments[_j2];
|
|
44869
|
+
}
|
|
44870
|
+
}
|
|
44871
|
+
|
|
44872
|
+
repaintComment(_tempComment4, commentY, commentObj.lineHeight);
|
|
44873
|
+
}
|
|
44874
|
+
};
|
|
44875
|
+
|
|
44876
|
+
var minValue = getStagePos(bottomComments[0])[1];
|
|
44877
|
+
var _tempComment3 = bottomComments[0];
|
|
44878
|
+
|
|
44879
|
+
for (var _i2 = 1; _i2 < bottomComments.length; _i2++) {
|
|
44880
|
+
var _stageY4 = getStagePos(bottomComments[_i2])[1];
|
|
44881
|
+
|
|
44882
|
+
if (_stageY4 < minValue) {
|
|
44883
|
+
minValue = _stageY4;
|
|
44884
|
+
_tempComment3 = bottomComments[_i2];
|
|
44885
|
+
}
|
|
44886
|
+
}
|
|
44887
|
+
|
|
44888
|
+
repaintComment(_tempComment3, commentY, comment.lineHeight);
|
|
44889
|
+
}
|
|
44890
|
+
}
|
|
44603
44891
|
}]);
|
|
44604
44892
|
|
|
44605
44893
|
return DrawArea;
|
|
@@ -53294,7 +53582,9 @@ var DrawTextNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
53294
53582
|
if (hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPreview */.Dh.psPreview && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPrint */.Dh.psPrint) {
|
|
53295
53583
|
if (this.node.parentNode instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
53296
53584
|
if (this.node.parentNode.inputFieldType === 0) {
|
|
53297
|
-
backColor
|
|
53585
|
+
if (backColor === hoEditorFactory.pageProperty.backColor) {
|
|
53586
|
+
backColor = hoEditorFactory.option.getColorByLevel(10);
|
|
53587
|
+
}
|
|
53298
53588
|
} else {
|
|
53299
53589
|
if (this.node.parentNode.keyValue == "") {
|
|
53300
53590
|
backColor = hoEditorFactory.option.getColorByLevel(120);
|
|
@@ -53303,6 +53593,12 @@ var DrawTextNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
53303
53593
|
}
|
|
53304
53594
|
}
|
|
53305
53595
|
|
|
53596
|
+
if (hoEditorFactory.isEnabledGlobalColor) {
|
|
53597
|
+
if (!(this.node instanceof MarkNode/* MarkNode */.j) && this.node.parentNode.inputFieldType === 0) {
|
|
53598
|
+
backColor = "transparent";
|
|
53599
|
+
}
|
|
53600
|
+
}
|
|
53601
|
+
|
|
53306
53602
|
if (this.node.parentNode.enableGlobalColor) {
|
|
53307
53603
|
backColor = "transparent";
|
|
53308
53604
|
}
|
|
@@ -62984,30 +63280,34 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62984
63280
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
62985
63281
|
/* harmony export */ "e": function() { return /* binding */ ParseUndoUnit; }
|
|
62986
63282
|
/* harmony export */ });
|
|
62987
|
-
/* harmony import */ var
|
|
62988
|
-
/* harmony import */ var
|
|
62989
|
-
/* harmony import */ var
|
|
62990
|
-
/* harmony import */ var
|
|
62991
|
-
/* harmony import */ var
|
|
62992
|
-
/* harmony import */ var
|
|
62993
|
-
/* harmony import */ var
|
|
62994
|
-
/* harmony import */ var
|
|
62995
|
-
/* harmony import */ var
|
|
62996
|
-
/* harmony import */ var
|
|
62997
|
-
/* harmony import */ var
|
|
62998
|
-
/* harmony import */ var
|
|
62999
|
-
/* harmony import */ var
|
|
63000
|
-
/* harmony import */ var
|
|
63001
|
-
/* harmony import */ var
|
|
63002
|
-
/* harmony import */ var
|
|
63003
|
-
/* harmony import */ var
|
|
63004
|
-
/* harmony import */ var
|
|
63005
|
-
/* harmony import */ var
|
|
63006
|
-
/* harmony import */ var
|
|
63007
|
-
/* harmony import */ var
|
|
63008
|
-
/* harmony import */ var
|
|
63009
|
-
/* harmony import */ var
|
|
63010
|
-
/* harmony import */ var
|
|
63283
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87461);
|
|
63284
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60199);
|
|
63285
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42015);
|
|
63286
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(16296);
|
|
63287
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41539);
|
|
63288
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
63289
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54747);
|
|
63290
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
63291
|
+
/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21703);
|
|
63292
|
+
/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
63293
|
+
/* harmony import */ var _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(71080);
|
|
63294
|
+
/* harmony import */ var _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(27564);
|
|
63295
|
+
/* harmony import */ var _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(35657);
|
|
63296
|
+
/* harmony import */ var _dom_DomRange__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(75438);
|
|
63297
|
+
/* harmony import */ var _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(26608);
|
|
63298
|
+
/* harmony import */ var _UndoService__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(19633);
|
|
63299
|
+
/* harmony import */ var _editor_undoRedo_NodesDeleteUndoUnit__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(61965);
|
|
63300
|
+
/* harmony import */ var _dom_NodePosition__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14245);
|
|
63301
|
+
/* harmony import */ var _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(13880);
|
|
63302
|
+
/* harmony import */ var _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(59530);
|
|
63303
|
+
/* harmony import */ var _dom_treeNode_BaseCombineNode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(3267);
|
|
63304
|
+
/* harmony import */ var _draw_SelectRange__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(62938);
|
|
63305
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(28831);
|
|
63306
|
+
/* harmony import */ var _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(69802);
|
|
63307
|
+
/* harmony import */ var _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(92730);
|
|
63308
|
+
/* harmony import */ var _dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(69088);
|
|
63309
|
+
|
|
63310
|
+
|
|
63011
63311
|
|
|
63012
63312
|
|
|
63013
63313
|
|
|
@@ -63031,7 +63331,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63031
63331
|
|
|
63032
63332
|
var ParseUndoUnit = /*#__PURE__*/function () {
|
|
63033
63333
|
function ParseUndoUnit(hoEditorFactoryID, startPath, endPath, nodes) {
|
|
63034
|
-
(0,
|
|
63334
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(this, ParseUndoUnit);
|
|
63035
63335
|
|
|
63036
63336
|
//插入后的,变更范围
|
|
63037
63337
|
this._tmp = {
|
|
@@ -63041,42 +63341,66 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63041
63341
|
this._hoEditorFactoryID = hoEditorFactoryID;
|
|
63042
63342
|
this._startPath = startPath;
|
|
63043
63343
|
this._endPath = endPath;
|
|
63044
|
-
this._undo = new
|
|
63344
|
+
this._undo = new _UndoService__WEBPACK_IMPORTED_MODULE_11__/* .UndoService */ .O(this._hoEditorFactoryID); //hoEditorFactory.undoService;
|
|
63045
63345
|
|
|
63046
63346
|
this._undoNodes = new Array();
|
|
63047
63347
|
this._nodes = nodes;
|
|
63048
63348
|
this._opTime = new Date();
|
|
63049
|
-
this._affectText =
|
|
63349
|
+
this._affectText = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_18__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.getNodesText(nodes);
|
|
63050
63350
|
}
|
|
63051
63351
|
|
|
63052
|
-
(0,
|
|
63352
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_22__/* ["default"] */ .Z)(ParseUndoUnit, [{
|
|
63053
63353
|
key: "undo",
|
|
63054
|
-
value: function
|
|
63055
|
-
var
|
|
63354
|
+
value: function () {
|
|
63355
|
+
var _undo = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)( /*#__PURE__*/(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)().mark(function _callee() {
|
|
63356
|
+
var hoEditorFactory, delEvent, np;
|
|
63357
|
+
return (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)().wrap(function _callee$(_context) {
|
|
63358
|
+
while (1) {
|
|
63359
|
+
switch (_context.prev = _context.next) {
|
|
63360
|
+
case 0:
|
|
63361
|
+
hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_18__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
63362
|
+
delEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_8__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_6__/* .DocAction.daUndoInsert */ .gk.daUndoInsert, this._tmp.start, this._tmp.start);
|
|
63363
|
+
delEvent.oldEndPath = this._tmp.end;
|
|
63364
|
+
delEvent.oldDrawTreeLines = new _draw_SelectRange__WEBPACK_IMPORTED_MODULE_17__/* .SelectRange */ .E(this._hoEditorFactoryID).getRangeDrawTreeLines(this._tmp.start, this._tmp.end); //删除插入的节点
|
|
63056
63365
|
|
|
63057
|
-
|
|
63366
|
+
this._undoNodes.forEach(function (value) {
|
|
63367
|
+
hoEditorFactory.docTree.deleteNode(value, "update");
|
|
63368
|
+
});
|
|
63058
63369
|
|
|
63059
|
-
|
|
63060
|
-
|
|
63061
|
-
|
|
63370
|
+
delEvent.afterChangePath = this._tmp.start;
|
|
63371
|
+
_context.next = 8;
|
|
63372
|
+
return hoEditorFactory.docTree.change(delEvent);
|
|
63062
63373
|
|
|
63063
|
-
|
|
63064
|
-
|
|
63065
|
-
|
|
63374
|
+
case 8:
|
|
63375
|
+
hoEditorFactory.docTree.curDomRange.setSamePath(this._tmp.start);
|
|
63376
|
+
|
|
63377
|
+
while (!this._undo.atBottom()) {
|
|
63378
|
+
this._undo.undo();
|
|
63379
|
+
}
|
|
63066
63380
|
|
|
63067
|
-
|
|
63068
|
-
|
|
63069
|
-
|
|
63381
|
+
hoEditorFactory.docTree.curDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_9__/* .DomRange */ .a(this._hoEditorFactoryID, this._startPath, this._endPath);
|
|
63382
|
+
hoEditorFactory.drawTree.moveCaretToPath(this._endPath);
|
|
63383
|
+
np = hoEditorFactory.docTree.findNodePositionByPath(this._endPath);
|
|
63070
63384
|
|
|
63071
|
-
|
|
63072
|
-
|
|
63073
|
-
|
|
63385
|
+
if (np && np.node instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_20__/* .MarkNode */ .j && np.node.parentNode && np.node.parentNode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_19__/* .TextInputFieldNode */ .re && np.node.parentNode.childNodes.length === 2) {
|
|
63386
|
+
hoEditorFactory.docController.resetEmptyInputFieldNode(hoEditorFactory, np.node.parentNode);
|
|
63387
|
+
} // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.repaintSelectShape();
|
|
63074
63388
|
|
|
63075
|
-
if (np && np.node instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_18__/* .MarkNode */ .j && np.node.parentNode && np.node.parentNode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_17__/* .TextInputFieldNode */ .re && np.node.parentNode.childNodes.length === 2) {
|
|
63076
|
-
hoEditorFactory.docController.resetEmptyInputFieldNode(hoEditorFactory, np.node.parentNode);
|
|
63077
|
-
} // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.repaintSelectShape();
|
|
63078
63389
|
|
|
63079
|
-
|
|
63390
|
+
case 14:
|
|
63391
|
+
case "end":
|
|
63392
|
+
return _context.stop();
|
|
63393
|
+
}
|
|
63394
|
+
}
|
|
63395
|
+
}, _callee, this);
|
|
63396
|
+
}));
|
|
63397
|
+
|
|
63398
|
+
function undo() {
|
|
63399
|
+
return _undo.apply(this, arguments);
|
|
63400
|
+
}
|
|
63401
|
+
|
|
63402
|
+
return undo;
|
|
63403
|
+
}()
|
|
63080
63404
|
/**
|
|
63081
63405
|
* @description 初始化变量,因为有撤销恢复可能需要反复操作,初始化不能放到create里
|
|
63082
63406
|
*/
|
|
@@ -63095,8 +63419,8 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63095
63419
|
_startPosition$node;
|
|
63096
63420
|
|
|
63097
63421
|
this.initParam();
|
|
63098
|
-
var curRange = new
|
|
63099
|
-
var hoEditorFactory =
|
|
63422
|
+
var curRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_9__/* .DomRange */ .a(this._hoEditorFactoryID, this._startPath, this._endPath).normalize();
|
|
63423
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_18__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
63100
63424
|
var rootNodes = hoEditorFactory.docTree.getPathRoots(this._startPath);
|
|
63101
63425
|
|
|
63102
63426
|
if (!rootNodes) {
|
|
@@ -63110,7 +63434,7 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63110
63434
|
//删除选中节点
|
|
63111
63435
|
this._undo.begin();
|
|
63112
63436
|
|
|
63113
|
-
this._undo.add(new
|
|
63437
|
+
this._undo.add(new _editor_undoRedo_NodesDeleteUndoUnit__WEBPACK_IMPORTED_MODULE_12__/* .NodesDeleteUndoUnit */ .F(this._hoEditorFactoryID, curRange.startPath, curRange.endPath));
|
|
63114
63438
|
|
|
63115
63439
|
this._undo.commit();
|
|
63116
63440
|
}
|
|
@@ -63123,12 +63447,12 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63123
63447
|
var prevNode = startPosition.node;
|
|
63124
63448
|
var i = -1;
|
|
63125
63449
|
var path = nodeLastPath;
|
|
63126
|
-
var positon =
|
|
63450
|
+
var positon = _dom_NodePosition__WEBPACK_IMPORTED_MODULE_13__/* .NodePosition.treePathCompare */ .F.treePathCompare(curRange.startPath, nodeLastPath);
|
|
63127
63451
|
|
|
63128
63452
|
if (positon < 0) {
|
|
63129
63453
|
//如果是中间,先拆分
|
|
63130
|
-
if (startPosition.node instanceof
|
|
63131
|
-
var textNodeSplitUndoUnit = new
|
|
63454
|
+
if (startPosition.node instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_7__/* .TextNode */ .R) {
|
|
63455
|
+
var textNodeSplitUndoUnit = new _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_10__/* .TextNodeSplitUndoUnit */ .W(this._hoEditorFactoryID, curRange.startPath, startPosition.node, new _dom_DomRange__WEBPACK_IMPORTED_MODULE_9__/* .DomRange */ .a(this._hoEditorFactoryID, curRange.startPath, nodeLastPath));
|
|
63132
63456
|
|
|
63133
63457
|
this._undo.begin();
|
|
63134
63458
|
|
|
@@ -63147,7 +63471,7 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63147
63471
|
//第一个节点是段落时,不插入
|
|
63148
63472
|
var curr = hoEditorFactory.docTree.findNodePositionByPath(curRange.startPath).node;
|
|
63149
63473
|
|
|
63150
|
-
if (curr instanceof
|
|
63474
|
+
if (curr instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__/* .ParagraphNode */ .C) {
|
|
63151
63475
|
curr.combineParagraph.copyStyle(node.combineParagraph);
|
|
63152
63476
|
} else {
|
|
63153
63477
|
hoEditorFactory.docTree.insertNodeAfterPath(path, node);
|
|
@@ -63165,7 +63489,7 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63165
63489
|
var _prevNode;
|
|
63166
63490
|
|
|
63167
63491
|
return {
|
|
63168
|
-
isTable: _this._nodes[index] instanceof
|
|
63492
|
+
isTable: _this._nodes[index] instanceof _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_15__/* .TableNode */ .Fh,
|
|
63169
63493
|
prevNode: index == 0 ? prevNode : _this._nodes[index - 1],
|
|
63170
63494
|
nextNode: index == _this._nodes.length - 1 ? (_prevNode = prevNode) === null || _prevNode === void 0 ? void 0 : _prevNode.nextSibling() : _this._nodes[index + 1]
|
|
63171
63495
|
};
|
|
@@ -63178,7 +63502,7 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63178
63502
|
|
|
63179
63503
|
var checkTableNode2 = function checkTableNode2(node) {
|
|
63180
63504
|
return {
|
|
63181
|
-
isTable: node instanceof
|
|
63505
|
+
isTable: node instanceof _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_15__/* .TableNode */ .Fh,
|
|
63182
63506
|
node: node,
|
|
63183
63507
|
prevNode: node.prevSibling(),
|
|
63184
63508
|
nextNode: node.nextSibling()
|
|
@@ -63194,8 +63518,8 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63194
63518
|
var insertParaNode = function insertParaNode(info) {
|
|
63195
63519
|
if (!info.isTable) return;
|
|
63196
63520
|
|
|
63197
|
-
if (!(info.prevNode instanceof
|
|
63198
|
-
var lpara = new
|
|
63521
|
+
if (!(info.prevNode instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__/* .ParagraphNode */ .C)) {
|
|
63522
|
+
var lpara = new _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__/* .ParagraphNode */ .C(_this._hoEditorFactoryID, hoEditorFactory.docTree.activeNodes, hoEditorFactory.docTree.getParentNode(info.node.getNodePath()), hoEditorFactory.docTree.curParaNo);
|
|
63199
63523
|
hoEditorFactory.docTree.insertNodeAfterPath(hoEditorFactory.docTree.getNodeLastPath(info.prevNode), lpara);
|
|
63200
63524
|
|
|
63201
63525
|
_this._undoNodes.push(lpara);
|
|
@@ -63203,8 +63527,8 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63203
63527
|
info.node.paragraphNode = lpara; // endNode = lpara;
|
|
63204
63528
|
}
|
|
63205
63529
|
|
|
63206
|
-
if (!(info.nextNode instanceof
|
|
63207
|
-
var _lpara = new
|
|
63530
|
+
if (!(info.nextNode instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__/* .ParagraphNode */ .C)) {
|
|
63531
|
+
var _lpara = new _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__/* .ParagraphNode */ .C(_this._hoEditorFactoryID, hoEditorFactory.docTree.activeNodes, hoEditorFactory.docTree.getParentNode(info.node.getNodePath()), hoEditorFactory.docTree.curParaNo);
|
|
63208
63532
|
|
|
63209
63533
|
hoEditorFactory.docTree.insertNodeAfterPath(hoEditorFactory.docTree.getNodeLastPath(info.node), _lpara);
|
|
63210
63534
|
|
|
@@ -63225,7 +63549,7 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63225
63549
|
insertParaNode(info);
|
|
63226
63550
|
}
|
|
63227
63551
|
|
|
63228
|
-
if (node instanceof
|
|
63552
|
+
if (node instanceof _dom_treeNode_BaseCombineNode__WEBPACK_IMPORTED_MODULE_16__/* .BaseCombineNode */ .V) {
|
|
63229
63553
|
node.childNodes.forEach(function (value) {
|
|
63230
63554
|
var info = checkTableNode2(value);
|
|
63231
63555
|
|
|
@@ -63246,8 +63570,8 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63246
63570
|
var info = checkTableNode(i);
|
|
63247
63571
|
|
|
63248
63572
|
if (info.isTable) {
|
|
63249
|
-
if (!(info.nextNode instanceof
|
|
63250
|
-
var lpara = new
|
|
63573
|
+
if (!(info.nextNode instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__/* .ParagraphNode */ .C)) {
|
|
63574
|
+
var lpara = new _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__/* .ParagraphNode */ .C(this._hoEditorFactoryID, hoEditorFactory.docTree.activeNodes, hoEditorFactory.docTree.getParentNode(startPosition.path), hoEditorFactory.docTree.curParaNo);
|
|
63251
63575
|
hoEditorFactory.docTree.insertNodeAfterPath(path, lpara);
|
|
63252
63576
|
|
|
63253
63577
|
this._undoNodes.push(lpara);
|
|
@@ -63259,8 +63583,8 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63259
63583
|
|
|
63260
63584
|
this._undoNodes.push(node);
|
|
63261
63585
|
|
|
63262
|
-
if (!(info.prevNode instanceof
|
|
63263
|
-
var _lpara2 = new
|
|
63586
|
+
if (!(info.prevNode instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__/* .ParagraphNode */ .C)) {
|
|
63587
|
+
var _lpara2 = new _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__/* .ParagraphNode */ .C(this._hoEditorFactoryID, hoEditorFactory.docTree.activeNodes, hoEditorFactory.docTree.getParentNode(path), hoEditorFactory.docTree.curParaNo);
|
|
63264
63588
|
|
|
63265
63589
|
hoEditorFactory.docTree.insertNodeAfterPath(path, _lpara2);
|
|
63266
63590
|
node.paragraphNode = _lpara2;
|
|
@@ -63279,7 +63603,7 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63279
63603
|
|
|
63280
63604
|
hoEditorFactory.docTree.insertNodeAfterPath(path, node);
|
|
63281
63605
|
|
|
63282
|
-
if (node instanceof
|
|
63606
|
+
if (node instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_14__/* .ParagraphNode */ .C) {
|
|
63283
63607
|
node.refreshDrootNodes();
|
|
63284
63608
|
}
|
|
63285
63609
|
|
|
@@ -63294,22 +63618,22 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63294
63618
|
|
|
63295
63619
|
endNode = this._nodes[this._nodes.length - 1];
|
|
63296
63620
|
|
|
63297
|
-
if (endNode instanceof
|
|
63621
|
+
if (endNode instanceof _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_15__/* .TableNode */ .Fh) {
|
|
63298
63622
|
endNode = this._nodes[this._nodes.length - 1].nextSibling();
|
|
63299
63623
|
}
|
|
63300
63624
|
}
|
|
63301
63625
|
|
|
63302
63626
|
var endPath = hoEditorFactory.docTree.getNodeLastPath(endNode);
|
|
63303
|
-
var changeEvent = new
|
|
63627
|
+
var changeEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_8__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_6__/* .DocAction.daInsert */ .gk.daInsert, curRange.startPath, endPath);
|
|
63304
63628
|
hoEditorFactory.docTree.change(changeEvent);
|
|
63305
63629
|
|
|
63306
|
-
if (((_startPosition$node = startPosition.node) === null || _startPosition$node === void 0 ? void 0 : _startPosition$node.parentNode) instanceof
|
|
63630
|
+
if (((_startPosition$node = startPosition.node) === null || _startPosition$node === void 0 ? void 0 : _startPosition$node.parentNode) instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_19__/* .TextInputFieldNode */ .re) {
|
|
63307
63631
|
var _startPosition$node2;
|
|
63308
63632
|
|
|
63309
63633
|
(_startPosition$node2 = startPosition.node) === null || _startPosition$node2 === void 0 ? void 0 : _startPosition$node2.parentNode.update();
|
|
63310
63634
|
var ppNode = startPosition.node.parentNode.parentNode;
|
|
63311
63635
|
|
|
63312
|
-
if (ppNode instanceof
|
|
63636
|
+
if (ppNode instanceof _dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_21__/* .CellNode */ .D && ppNode.drawCell.drawPageCells.length > 1) {
|
|
63313
63637
|
ppNode.drawCell.needUpdate = true;
|
|
63314
63638
|
ppNode.table.update();
|
|
63315
63639
|
}
|
|
@@ -63318,7 +63642,7 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
63318
63642
|
this._tmp.start = curRange.startPath;
|
|
63319
63643
|
this._tmp.end = endPath;
|
|
63320
63644
|
hoEditorFactory.drawTree.moveCaretToPath(endPath);
|
|
63321
|
-
hoEditorFactory.docTree.curDomRange = new
|
|
63645
|
+
hoEditorFactory.docTree.curDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_9__/* .DomRange */ .a(this._hoEditorFactoryID, endPath, endPath); // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.repaintSelectShape();
|
|
63322
63646
|
}
|
|
63323
63647
|
}, {
|
|
63324
63648
|
key: "isEmpty",
|
|
@@ -97827,7 +98151,8 @@ while(len--){curDa=sa.shift();if(typeof curDa!=="string"||Array.isArray(curDa)&&
|
|
|
97827
98151
|
//we assume the user knows what they are doing.
|
|
97828
98152
|
//Convert text into an array anyway to simplify
|
|
97829
98153
|
//later code.
|
|
97830
|
-
if(typeof text==="string"){if(text.match(/[\r?\n]/)){text=[text.replace(/\r\n|\r|\n/g,'')]
|
|
98154
|
+
if(typeof text==="string"){if(text.match(/[\r?\n]/)){text=[text.replace(/\r\n|\r|\n/g,'')];// 自定义修改 处理打印回车的问题
|
|
98155
|
+
}else{text=[text];}}//baseline
|
|
97831
98156
|
var height=activeFontSize/scope.internal.scaleFactor;var descent=height*(lineHeightFactor-1);switch(options.baseline){case"bottom":y-=descent;break;case"top":y+=height-descent;break;case"hanging":y+=height-2*descent;break;case"middle":y+=height/2-descent;break;}//multiline
|
|
97832
98157
|
maxWidth=options.maxWidth||0;if(maxWidth>0){if(typeof text==="string"){text=scope.splitTextToSize(text,maxWidth);}else if(Object.prototype.toString.call(text)==="[object Array]"){text=text.reduce(function(acc,textLine){return acc.concat(scope.splitTextToSize(textLine,maxWidth));},[]);}}//creating Payload-Object to make text byRef
|
|
97833
98158
|
payload={text:text,x:x,y:y,options:options,mutex:{pdfEscape:pdfEscape,activeFontKey:activeFontKey,fonts:fonts,activeFontSize:activeFontSize}};events.publish("preProcessText",payload);text=payload.text;options=payload.options;//angle
|
|
@@ -97845,7 +98170,8 @@ var prevWidth=0;var newX;if(align==="right"){//The passed in x coordinate define
|
|
|
97845
98170
|
//rightmost point of the text.
|
|
97846
98171
|
x-=lineWidths[0];text=[];len=da.length;for(var i=0;i<len;i++){if(i===0){newX=getHorizontalCoordinate(x);newY=getVerticalCoordinate(y);}else{newX=scale(prevWidth-lineWidths[i]);newY=-leading;}text.push([da[i],newX,newY]);prevWidth=lineWidths[i];}}else if(align==="center"){//The passed in x coordinate defines
|
|
97847
98172
|
//the center point.
|
|
97848
|
-
x-=lineWidths[0]/2;text=[];len=da.length;for(var j=0;j<len;j++){if(j===0){newX=getHorizontalCoordinate(x);newY=getVerticalCoordinate(y);}else{newX=scale((prevWidth-lineWidths[j])/2);newY=-leading;}text.push([da[j],newX,newY]);prevWidth=lineWidths[j];}}else if(align==="left"){text=[];len=da.length;for(var h=0;h<len;h++){text.push(da[h]);}}else if(align==="justify"){text=[];len=da.length;maxWidth=maxWidth!==0?maxWidth:pageWidth;for(var l=0;l<len;l++){newY=l===0?getVerticalCoordinate(y):-leading;newX=l===0?getHorizontalCoordinate(x):0;if(l<len-1){
|
|
98173
|
+
x-=lineWidths[0]/2;text=[];len=da.length;for(var j=0;j<len;j++){if(j===0){newX=getHorizontalCoordinate(x);newY=getVerticalCoordinate(y);}else{newX=scale((prevWidth-lineWidths[j])/2);newY=-leading;}text.push([da[j],newX,newY]);prevWidth=lineWidths[j];}}else if(align==="left"){text=[];len=da.length;for(var h=0;h<len;h++){text.push(da[h]);}}else if(align==="justify"){text=[];len=da.length;maxWidth=maxWidth!==0?maxWidth:pageWidth;for(var l=0;l<len;l++){newY=l===0?getVerticalCoordinate(y):-leading;newX=l===0?getHorizontalCoordinate(x):0;if(l<len-1){// 自定义修改 字符间距
|
|
98174
|
+
wordSpacingPerLine.push(hpf(scale((maxWidth-lineWidths[l])/(da[l].split("").length-1))));}else{wordSpacingPerLine.push(0);}text.push([da[l],newX,newY]);}}else{throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');}}//R2L
|
|
97849
98175
|
var doReversing=typeof options.R2L==="boolean"?options.R2L:R2L;if(doReversing===true){text=processTextByFunction(text,function(text,posX,posY){return[text.split("").reverse().join(""),posX,posY];});}//creating Payload-Object to make text byRef
|
|
97850
98176
|
payload={text:text,x:x,y:y,options:options,mutex:{pdfEscape:pdfEscape,activeFontKey:activeFontKey,fonts:fonts,activeFontSize:activeFontSize}};events.publish("postProcessText",payload);text=payload.text;isHex=payload.mutex.isHex||false;//Escaping
|
|
97851
98177
|
var activeFontEncoding=fonts[activeFontKey].encoding;if(activeFontEncoding==="WinAnsiEncoding"||activeFontEncoding==="StandardEncoding"){text=processTextByFunction(text,function(text,posX,posY){return[ESC(text),posX,posY];});}da=transformTextToSpecialArray(text);text=[];var STRING=0;var ARRAY=1;var variant=Array.isArray(da[0])?ARRAY:STRING;var posX;var posY;var content;var wordSpacing="";var generatePosition=function generatePosition(parmPosX,parmPosY,parmTransformationMatrix){var position="";if(parmTransformationMatrix instanceof Matrix){// It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y
|
|
@@ -98651,6 +98977,7 @@ stream.push(formObject.scope.__private__.encodeColorString(formObject.color));st
|
|
|
98651
98977
|
stream.push(calcRes.text);stream.push("ET");// End Text
|
|
98652
98978
|
stream.push("Q");stream.push("EMC");var appearanceStreamContent=createFormXObject(formObject);appearanceStreamContent.scope=formObject.scope;appearanceStreamContent.stream=stream.join("\n");return appearanceStreamContent;};var calculateX=function calculateX(formObject,text){var maxFontSize=formObject.fontSize===0?formObject.maxFontSize:formObject.fontSize;var returnValue={text:"",fontSize:""};// Remove Brackets
|
|
98653
98979
|
text=text.substr(0,1)=="("?text.substr(1):text;text=text.substr(text.length-1)==")"?text.substr(0,text.length-1):text;// split into array of words
|
|
98980
|
+
// 自定义修改 字符间距
|
|
98654
98981
|
var textSplit=text.split("");var fontSize=maxFontSize;// The Starting fontSize (The Maximum)
|
|
98655
98982
|
var lineSpacing=2;var borderPadding=2;var height=AcroFormAppearance.internal.getHeight(formObject)||0;height=height<0?-height:height;var width=AcroFormAppearance.internal.getWidth(formObject)||0;width=width<0?-width:width;var isSmallerThanWidth=function isSmallerThanWidth(i,lastLine,fontSize){if(i+1<textSplit.length){var tmp=lastLine+" "+textSplit[i+1];var TextWidth=calculateFontSpace(tmp,formObject,fontSize).width;var FieldWidth=width-2*borderPadding;return TextWidth<=FieldWidth;}else{return false;}};fontSize++;FontSize:while(fontSize>0){text="";fontSize--;var textHeight=calculateFontSpace("3",formObject,fontSize).height;var startY=formObject.multiline?height-fontSize:(height-textHeight)/2;startY+=lineSpacing;var startX;var lastY=startY;var firstWordInLine=0,lastWordInLine=0;var lastLength;if(fontSize<=0){// In case, the Text doesn't fit at all
|
|
98656
98983
|
fontSize=12;text="(...) Tj\n";text+="% Width of Text: "+calculateFontSpace(text,formObject,fontSize).width+", FieldWidth:"+width+"\n";break;}var lastLine="";var lineCount=0;Line:for(var i in textSplit){if(textSplit.hasOwnProperty(i)){lastLine+=textSplit[i]+" ";// Remove last blank
|
|
@@ -99284,7 +99611,8 @@ out+=String.fromCharCode.apply(null,buf.subarray(i,i+ARRAY_APPLY_BATCH));}return
|
|
|
99284
99611
|
* @param {posY}
|
|
99285
99612
|
*
|
|
99286
99613
|
* @returns jsPDF
|
|
99287
|
-
*/jsPDFAPI.addImage=function(){
|
|
99614
|
+
*/jsPDFAPI.addImage=function(){// 自定义修改 处理签名图片打印
|
|
99615
|
+
var imageData,format,x,y,w,h,alias,compression,rotation,posX,posY;imageData=arguments[0];if(typeof arguments[1]==="number"){format=UNKNOWN;x=arguments[1];y=arguments[2];w=arguments[3];h=arguments[4];alias=arguments[5];compression=arguments[6];rotation=arguments[7];posX=arguments[8];posY=arguments[9];}else{format=arguments[1];x=arguments[2];y=arguments[3];w=arguments[4];h=arguments[5];alias=arguments[6];compression=arguments[7];rotation=arguments[8];posX=arguments[9];posY=arguments[10];}if((0,esm_typeof/* default */.Z)(imageData)==="object"&&!isDOMElement(imageData)&&"imageData"in imageData){var options=imageData;imageData=options.imageData;format=options.format||format||UNKNOWN;x=options.x||x||0;y=options.y||y||0;w=options.w||options.width||w;h=options.h||options.height||h;alias=options.alias||alias;compression=options.compression||compression;rotation=options.rotation||options.angle||rotation;}//If compression is not explicitly set, determine if we should use compression
|
|
99288
99616
|
var filter=this.internal.getFilters();if(compression===undefined&&filter.indexOf("FlateEncode")!==-1){compression="SLOW";}if(isNaN(x)||isNaN(y)){throw new Error("Invalid coordinates passed to jsPDF.addImage");}// if(posX) x += posX;
|
|
99289
99617
|
// if(posY) y += posY;
|
|
99290
99618
|
initialize.call(this);var image=processImageData.call(this,imageData,format,alias,compression);writeImageToPDF.call(this,x,y,w,h,image,rotation);return this;};var processImageData=function processImageData(imageData,format,alias,compression){var result,dataAsBinaryString;if(typeof imageData==="string"&&getImageFileTypeByImageData(imageData)===UNKNOWN){imageData=unescape(imageData);var tmpImageData=convertBase64ToBinaryString(imageData,false);if(tmpImageData!==""){imageData=tmpImageData;}else{tmpImageData=jsPDFAPI.loadFile(imageData,true);if(tmpImageData!==undefined){imageData=tmpImageData;}}}if(isDOMElement(imageData)){imageData=getImageDataFromElement(imageData,format);}format=getImageFileTypeByImageData(imageData,format);if(!isImageTypeSupported(format)){throw new Error("addImage does not support files of type '"+format+"', please ensure that a plugin for '"+format+"' support is added.");}// now do the heavy lifting
|
|
@@ -99739,7 +100067,8 @@ var f2,getHorizontalCoordinateString,getVerticalCoordinateString,getHorizontalCo
|
|
|
99739
100067
|
* A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />
|
|
99740
100068
|
* A pattern object to use to fill the drawing (not supported by context2d)
|
|
99741
100069
|
*/Object.defineProperty(this,"fillStyle",{get:function get(){return this.ctx.fillStyle;},set:function set(value){var rgba;rgba=getRGBA(value);this.ctx.fillStyle=rgba.style;this.ctx.isFillTransparent=rgba.a===0;//自定义修改 当透明度小于1时改成0 ,以适配不支持透明度的打印机
|
|
99742
|
-
if(rgba.a<1){this.ctx.fillOpacity=0;}else{this.ctx.fillOpacity=rgba.a;}
|
|
100070
|
+
if(rgba.a<1){this.ctx.fillOpacity=0;}else{this.ctx.fillOpacity=rgba.a;}// 自定义修改 处理彩色字体打印问题
|
|
100071
|
+
if(window.printBlack&&this.ctx.fillStyle!=="#000000"&&this.ctx.fillStyle!=="#FFFFFF"){this.ctx.fillStyle="#000000";rgba.r=0;rgba.g=0;rgba.b=0;}var alpha=this.ctx.fillOpacity;this.pdf.setFillColor(rgba.r,rgba.g,rgba.b,{a:alpha});this.pdf.setTextColor(rgba.r,rgba.g,rgba.b,{a:alpha});}});/**
|
|
99743
100072
|
* Sets or returns the color, gradient, or pattern used for strokes
|
|
99744
100073
|
*
|
|
99745
100074
|
* @name strokeStyle
|
|
@@ -99778,7 +100107,8 @@ if(fontFace!==null){fontFace.ref={name:family,style:style};fontFaces.push(fontFa
|
|
|
99778
100107
|
* will be used. If not set it will fallback to previous behavior.
|
|
99779
100108
|
*/Object.defineProperty(this,"fontFaces",{get:function get(){return _fontFaces;},set:function set(value){_fontFaceMap=null;_fontFaces=value;}});Object.defineProperty(this,"font",{get:function get(){return this.ctx.font;},set:function set(value){this.ctx.font=value;var rx,matches;//source: https://stackoverflow.com/a/10136041
|
|
99780
100109
|
// eslint-disable-next-line no-useless-escape
|
|
99781
|
-
rx=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i;matches=rx.exec(value);if(matches!==null){var fontStyle=matches[1];var fontVariant=matches[2];var fontWeight=matches[3];var fontSize=matches[4];var lineHeight=matches[5];var fontFamily=matches[6];}else{return;}var rxFontSize=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;var fontSizeUnit=rxFontSize.exec(fontSize)[2];if("px"===fontSizeUnit){fontSize=parseFloat(fontSize)*this.pdf.internal.scaleFactor
|
|
100110
|
+
rx=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i;matches=rx.exec(value);if(matches!==null){var fontStyle=matches[1];var fontVariant=matches[2];var fontWeight=matches[3];var fontSize=matches[4];var lineHeight=matches[5];var fontFamily=matches[6];}else{return;}var rxFontSize=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;var fontSizeUnit=rxFontSize.exec(fontSize)[2];if("px"===fontSizeUnit){fontSize=parseFloat(fontSize)*this.pdf.internal.scaleFactor;//自定义修改 pt字体转为px
|
|
100111
|
+
}else if("em"===fontSizeUnit){fontSize=Math.floor(parseFloat(fontSize)*this.pdf.getFontSize());}else{fontSize=Math.floor(parseFloat(fontSize)*this.pdf.internal.scaleFactor);}this.pdf.setFontSize(fontSize);var parts=parseFontFamily(fontFamily);if(this.fontFaces){var fontFaceMap=getFontFaceMap(this.pdf,this.fontFaces);var rules=parts.map(function(ff){return{family:ff,stretch:"normal",// TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)
|
|
99782
100112
|
weight:fontWeight,style:fontStyle};});var font=resolveFontFace(fontFaceMap,rules);this.pdf.setFont(font.ref.name,font.ref.style);return;}var style="";if(fontWeight==="bold"||parseInt(fontWeight,10)>=700||fontStyle==="bold"){style="bold";}if(fontStyle==="italic"){style+="italic";}if(style.length===0){style="normal";}var jsPdfFontName="";var fallbackFonts={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"};for(var i=0;i<parts.length;i++){if(this.pdf.internal.getFont(parts[i],style,{noFallback:true,disableWarning:true})!==undefined){jsPdfFontName=parts[i];break;}else if(style==="bolditalic"&&this.pdf.internal.getFont(parts[i],"bold",{noFallback:true,disableWarning:true})!==undefined){jsPdfFontName=parts[i];style="bold";}else if(this.pdf.internal.getFont(parts[i],"normal",{noFallback:true,disableWarning:true})!==undefined){jsPdfFontName=parts[i];style="normal";break;}}if(jsPdfFontName===""){for(var j=0;j<parts.length;j++){if(fallbackFonts[parts[j]]){jsPdfFontName=fallbackFonts[parts[j]];break;}}}jsPdfFontName=jsPdfFontName===""?"Times":jsPdfFontName;this.pdf.setFont(jsPdfFontName,style);}});Object.defineProperty(this,"globalCompositeOperation",{get:function get(){return this.ctx.globalCompositeOperation;},set:function set(value){this.ctx.globalCompositeOperation=value;}});Object.defineProperty(this,"globalAlpha",{get:function get(){return this.ctx.globalAlpha;},set:function set(value){//自定义修改
|
|
99783
100113
|
if(value<1){this.ctx.globalAlpha=0;}else{this.ctx.globalAlpha=value;}}});/**
|
|
99784
100114
|
* A float specifying the amount of the line dash offset. The default value is 0.0.
|
|
@@ -99818,7 +100148,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
|
|
|
99818
100148
|
* @function
|
|
99819
100149
|
* @param x {Number} The x-coordinate of where to move the path to
|
|
99820
100150
|
* @param y {Number} The y-coordinate of where to move the path to
|
|
99821
|
-
*/Context2D.prototype.moveTo=function(x,y){if(isNaN(x)||isNaN(y)){console.error("jsPDF.context2d.moveTo: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.moveTo");}
|
|
100151
|
+
*/Context2D.prototype.moveTo=function(x,y){if(isNaN(x)||isNaN(y)){console.error("jsPDF.context2d.moveTo: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.moveTo");}// 自定义修改 表格的边框线/页面边框位置不对的问题
|
|
100152
|
+
x+=this.posX;y+=this.posY;var pt=this.ctx.transform.applyToPoint(new Point(x,y));this.path.push({type:"mt",x:pt.x,y:pt.y});this.ctx.lastPoint=new Point(x,y);};/**
|
|
99822
100153
|
* Creates a path from the current point back to the starting point
|
|
99823
100154
|
*
|
|
99824
100155
|
* @name closePath
|
|
@@ -99832,7 +100163,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
|
|
|
99832
100163
|
* @param x The x-coordinate of where to create the line to
|
|
99833
100164
|
* @param y The y-coordinate of where to create the line to
|
|
99834
100165
|
* @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).
|
|
99835
|
-
*/Context2D.prototype.lineTo=function(x,y){if(isNaN(x)||isNaN(y)){console.error("jsPDF.context2d.lineTo: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.lineTo");}
|
|
100166
|
+
*/Context2D.prototype.lineTo=function(x,y){if(isNaN(x)||isNaN(y)){console.error("jsPDF.context2d.lineTo: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.lineTo");}// 自定义修改 表格的边框线/页面边框位置不对的问题
|
|
100167
|
+
x+=this.posX;y+=this.posY;var pt=this.ctx.transform.applyToPoint(new Point(x,y));this.path.push({type:"lt",x:pt.x,y:pt.y});this.ctx.lastPoint=new Point(pt.x,pt.y);};/**
|
|
99836
100168
|
* Clips a region of any shape and size from the original canvas
|
|
99837
100169
|
*
|
|
99838
100170
|
* @name clip
|
|
@@ -99985,7 +100317,9 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
|
|
|
99985
100317
|
* @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
|
|
99986
100318
|
* @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
|
|
99987
100319
|
* @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.
|
|
99988
|
-
*/Context2D.prototype.strokeText=function(text,x,y,maxWidth){if(isNaN(x)||isNaN(y)||typeof text!=="string"){console.error("jsPDF.context2d.strokeText: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.strokeText");}if(isStrokeTransparent.call(this)){return;}maxWidth=isNaN(maxWidth)?undefined:maxWidth;var degs=rad2deg(this.ctx.transform.rotation);var scale=this.ctx.transform.scaleX;var acharSpace=this.letterSpacing?this.letterSpacing:0
|
|
100320
|
+
*/Context2D.prototype.strokeText=function(text,x,y,maxWidth){if(isNaN(x)||isNaN(y)||typeof text!=="string"){console.error("jsPDF.context2d.strokeText: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.strokeText");}if(isStrokeTransparent.call(this)){return;}maxWidth=isNaN(maxWidth)?undefined:maxWidth;var degs=rad2deg(this.ctx.transform.rotation);var scale=this.ctx.transform.scaleX;var acharSpace=this.letterSpacing?this.letterSpacing:0;// 自定义修改
|
|
100321
|
+
putText.call(this,{text:text,x:x,y:y,scale:scale,renderingMode:"stroke",angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace// 自定义修改
|
|
100322
|
+
});};/**
|
|
99989
100323
|
* Returns an object that contains the width of the specified text
|
|
99990
100324
|
*
|
|
99991
100325
|
* @name measureText
|
|
@@ -100049,6 +100383,7 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
|
|
|
100049
100383
|
// if (isNaN(f)){
|
|
100050
100384
|
// f=0;
|
|
100051
100385
|
// }
|
|
100386
|
+
// 自定义修改 处理打印图片报错
|
|
100052
100387
|
a=isNaN(a)?1:a;b=isNaN(b)?0:b;c=isNaN(c)?0:c;d=isNaN(d)?1:d;e=isNaN(e)?0:e;f=isNaN(f)?0:f;var matrix=new Matrix(a,b,c,d,e,f);this.ctx.transform=this.ctx.transform.multiply(matrix);// console.log("this.transform值",this.ctx.transform);
|
|
100053
100388
|
};/**
|
|
100054
100389
|
* Resets the current transform to the identity matrix. Then runs transform()
|
|
@@ -100077,8 +100412,9 @@ a=isNaN(a)?1:a;b=isNaN(b)?0:b;c=isNaN(c)?0:c;d=isNaN(d)?1:d;e=isNaN(e)?0:e;f=isN
|
|
|
100077
100412
|
* @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
|
|
100078
100413
|
*/Context2D.prototype.drawImage=function(img,sx,sy,swidth,sheight,x,y,width,height){var imageProperties=this.pdf.getImageProperties(img);var factorX=1;var factorY=1;var clipFactorX=1;var clipFactorY=1;if(typeof swidth!=="undefined"&&typeof width!=="undefined"){clipFactorX=width/swidth;clipFactorY=height/sheight;factorX=imageProperties.width/swidth*width/swidth;factorY=imageProperties.height/sheight*height/sheight;}//is sx and sy are set and x and y not, set x and y with values of sx and sy
|
|
100079
100414
|
if(typeof x==="undefined"){x=sx;y=sy;sx=0;sy=0;}if(typeof swidth!=="undefined"&&typeof width==="undefined"){width=swidth;height=sheight;}if(typeof swidth==="undefined"&&typeof width==="undefined"){width=imageProperties.width;height=imageProperties.height;}var decomposedTransformationMatrix=this.ctx.transform.decompose();// console.log("transform.decompose",decomposedTransformationMatrix.scale);
|
|
100080
|
-
var angle=rad2deg(decomposedTransformationMatrix.rotate.shx);var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);if(!swidth){swidth=width;}if(!sheight){sheight=height;}var xRect
|
|
100081
|
-
|
|
100415
|
+
var angle=rad2deg(decomposedTransformationMatrix.rotate.shx);var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);if(!swidth){swidth=width;}if(!sheight){sheight=height;}var xRect;// 自定义修改 处理签名图片打印和普通图片打印
|
|
100416
|
+
if(img.nodeName&&img.nodeName=="CANVAS"){xRect=matrix.applyToRectangle(new Rectangle(x+this.posX-sx*clipFactorX,y+this.posY-sy*clipFactorY,swidth*factorX,sheight*factorY));}else{xRect=matrix.applyToRectangle(new Rectangle(x-sx*clipFactorX,y-sy*clipFactorY,swidth*factorX,sheight*factorY));}var pageArray=getPagesByPath.call(this,xRect);var pages=[];for(var ii=0;ii<pageArray.length;ii+=1){if(pages.indexOf(pageArray[ii])===-1){pages.push(pageArray[ii]);}}sortPages(pages);var clipPath;if(this.autoPaging){var min=pages[0];var max=pages[pages.length-1];for(var i=min;i<max+1;i++){this.pdf.setPage(i);var pageWidthMinusMargins=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1];var topMargin=i===1?this.posY+this.margin[0]:this.margin[0];var firstPageHeight=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2];var pageHeightMinusMargins=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var previousPageHeightSum=i===1?0:firstPageHeight+(i-2)*pageHeightMinusMargins;if(this.ctx.clip_path.length!==0){var tmpPaths=this.path;clipPath=JSON.parse(JSON.stringify(this.ctx.clip_path));this.path=pathPositionRedo(clipPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);drawPaths.call(this,"fill",true);this.path=tmpPaths;}var tmpRect=JSON.parse(JSON.stringify(xRect));tmpRect=pathPositionRedo([tmpRect],this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset)[0];var needsClipping=(i>min||i<max)&&hasMargins.call(this);if(needsClipping){this.pdf.saveGraphicsState();this.pdf.rect(this.margin[3],this.margin[0],pageWidthMinusMargins,pageHeightMinusMargins,null).clip().discardPath();}this.pdf.addImage(img,"JPEG",tmpRect.x,tmpRect.y,tmpRect.w,tmpRect.h,null,null,angle);if(needsClipping){this.pdf.restoreGraphicsState();}}}else{if(img.nodeName&&img.nodeName=="CANVAS"){// 自定义修改
|
|
100417
|
+
this.pdf.addImage(img.toDataURL("image/jpg"),'',xRect.x,xRect.y,xRect.w,xRect.h);}else{// 自定义修改
|
|
100082
100418
|
this.pdf.addImage(img,"JPEG",xRect.x+this.posX,xRect.y+this.posY,xRect.w,xRect.h,null,null,angle,this.posX,this.posY);}}};var getPagesByPath=function getPagesByPath(path,pageWrapX,pageWrapY){var result=[];pageWrapX=pageWrapX||this.pdf.internal.pageSize.width;pageWrapY=pageWrapY||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var yOffset=this.posY+this.ctx.prevPageLastElemOffset;switch(path.type){default:case"mt":case"lt":result.push(Math.floor((path.y+yOffset)/pageWrapY)+1);break;case"arc":result.push(Math.floor((path.y+yOffset-path.radius)/pageWrapY)+1);result.push(Math.floor((path.y+yOffset+path.radius)/pageWrapY)+1);break;case"qct":var rectOfQuadraticCurve=getQuadraticCurveBoundary(this.ctx.lastPoint.x,this.ctx.lastPoint.y,path.x1,path.y1,path.x,path.y);result.push(Math.floor((rectOfQuadraticCurve.y+yOffset)/pageWrapY)+1);result.push(Math.floor((rectOfQuadraticCurve.y+rectOfQuadraticCurve.h+yOffset)/pageWrapY)+1);break;case"bct":var rectOfBezierCurve=getBezierCurveBoundary(this.ctx.lastPoint.x,this.ctx.lastPoint.y,path.x1,path.y1,path.x2,path.y2,path.x,path.y);result.push(Math.floor((rectOfBezierCurve.y+yOffset)/pageWrapY)+1);result.push(Math.floor((rectOfBezierCurve.y+rectOfBezierCurve.h+yOffset)/pageWrapY)+1);break;case"rect":result.push(Math.floor((path.y+yOffset)/pageWrapY)+1);result.push(Math.floor((path.y+path.h+yOffset)/pageWrapY)+1);}for(var i=0;i<result.length;i+=1){while(this.pdf.internal.getNumberOfPages()<result[i]){addPage.call(this);}}return result;};var addPage=function addPage(){var fillStyle=this.fillStyle;var strokeStyle=this.strokeStyle;var font=this.font;var lineCap=this.lineCap;var lineWidth=this.lineWidth;var lineJoin=this.lineJoin;this.pdf.addPage();this.fillStyle=fillStyle;this.strokeStyle=strokeStyle;this.font=font;this.lineCap=lineCap;this.lineWidth=lineWidth;this.lineJoin=lineJoin;};var pathPositionRedo=function pathPositionRedo(paths,x,y){for(var i=0;i<paths.length;i++){switch(paths[i].type){case"bct":paths[i].x2+=x;paths[i].y2+=y;case"qct":paths[i].x1+=x;paths[i].y1+=y;case"mt":case"lt":case"arc":default:paths[i].x+=x;paths[i].y+=y;}}return paths;};var sortPages=function sortPages(pages){return pages.sort(function(a,b){return a-b;});};var pathPreProcess=function pathPreProcess(rule,isClip){var fillStyle=this.fillStyle;var strokeStyle=this.strokeStyle;var lineCap=this.lineCap;var oldLineWidth=this.lineWidth;var lineWidth=Math.abs(oldLineWidth*this.ctx.transform.scaleX);var lineJoin=this.lineJoin;var origPath=JSON.parse(JSON.stringify(this.path));var xPath=JSON.parse(JSON.stringify(this.path));var clipPath;var tmpPath;var pages=[];for(var i=0;i<xPath.length;i++){if(typeof xPath[i].x!=="undefined"){var page=getPagesByPath.call(this,xPath[i]);for(var ii=0;ii<page.length;ii+=1){if(pages.indexOf(page[ii])===-1){pages.push(page[ii]);}}}}for(var j=0;j<pages.length;j++){while(this.pdf.internal.getNumberOfPages()<pages[j]){addPage.call(this);}}sortPages(pages);if(this.autoPaging){var min=pages[0];var max=pages[pages.length-1];for(var k=min;k<max+1;k++){this.pdf.setPage(k);this.fillStyle=fillStyle;this.strokeStyle=strokeStyle;this.lineCap=lineCap;this.lineWidth=lineWidth;this.lineJoin=lineJoin;var pageWidthMinusMargins=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1];var topMargin=k===1?this.posY+this.margin[0]:this.margin[0];var firstPageHeight=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2];var pageHeightMinusMargins=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var previousPageHeightSum=k===1?0:firstPageHeight+(k-2)*pageHeightMinusMargins;if(this.ctx.clip_path.length!==0){var tmpPaths=this.path;clipPath=JSON.parse(JSON.stringify(this.ctx.clip_path));this.path=pathPositionRedo(clipPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);drawPaths.call(this,rule,true);this.path=tmpPaths;}tmpPath=JSON.parse(JSON.stringify(origPath));this.path=pathPositionRedo(tmpPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);if(isClip===false||k===0){var needsClipping=(k>min||k<max)&&hasMargins.call(this);if(needsClipping){this.pdf.saveGraphicsState();this.pdf.rect(this.margin[3],this.margin[0],pageWidthMinusMargins,pageHeightMinusMargins,null).clip().discardPath();}drawPaths.call(this,rule,isClip);if(needsClipping){this.pdf.restoreGraphicsState();}}this.lineWidth=oldLineWidth;}}else{this.lineWidth=lineWidth;drawPaths.call(this,rule,isClip);this.lineWidth=oldLineWidth;}this.path=origPath;};/**
|
|
100083
100419
|
* Processes the paths
|
|
100084
100420
|
*
|
|
@@ -100099,10 +100435,13 @@ return y;case"alphabetic":default:return y;}};var getTextBottom=function getText
|
|
|
100099
100435
|
* @param counterclockwise
|
|
100100
100436
|
* @param style
|
|
100101
100437
|
* @param isClip
|
|
100102
|
-
*/var drawArc=function drawArc(x,y,r,a1,a2,counterclockwise,style,isClip){var curves=createArc.call(this,r,a1,a2,counterclockwise);for(var i=0;i<curves.length;i++){var curve=curves[i];if(i===0){doMove.call(this,curve.x1+x,curve.y1+y);}drawCurve.call(this,x,y,curve.x2,curve.y2,curve.x3,curve.y3,curve.x4,curve.y4);}if(!isClip){putStyle.call(this,style);}else{doClip.call(this);}};var putStyle=function putStyle(style){switch(style){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f");break;}};var doClip=function doClip(){this.pdf.clip();this.pdf.discardPath();};var doMove=function doMove(x,y){this.pdf.internal.out(getHorizontalCoordinateString(x)+" "+getVerticalCoordinateString(y)+" m");};var putText=function putText(options){var textAlign;switch(options.align){case"right":case"end":textAlign="right";break;case"center":textAlign="center";break;case"left":case"start":default:textAlign="left";break;}var textDimensions=this.pdf.getTextDimensions(options.text);var yBaseLine=getBaseline.call(this,options.y);var yBottom=getTextBottom.call(this,yBaseLine);var yTop=yBottom-textDimensions.h;var pt=this.ctx.transform.applyToPoint(new Point(options.x,yBaseLine));var decomposedTransformationMatrix=this.ctx.transform.decompose();var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);var baselineRect=this.ctx.transform.applyToRectangle(new Rectangle(options.x,yBaseLine,textDimensions.w,textDimensions.h));var textBounds=matrix.applyToRectangle(new Rectangle(options.x,yTop,textDimensions.w,textDimensions.h));var pageArray=getPagesByPath.call(this,textBounds);var pages=[];for(var ii=0;ii<pageArray.length;ii+=1){if(pages.indexOf(pageArray[ii])===-1){pages.push(pageArray[ii]);}}sortPages(pages);var clipPath,oldSize,oldLineWidth;options.text=options.text.replace(/[\t]/g,' ')
|
|
100438
|
+
*/var drawArc=function drawArc(x,y,r,a1,a2,counterclockwise,style,isClip){var curves=createArc.call(this,r,a1,a2,counterclockwise);for(var i=0;i<curves.length;i++){var curve=curves[i];if(i===0){doMove.call(this,curve.x1+x,curve.y1+y);}drawCurve.call(this,x,y,curve.x2,curve.y2,curve.x3,curve.y3,curve.x4,curve.y4);}if(!isClip){putStyle.call(this,style);}else{doClip.call(this);}};var putStyle=function putStyle(style){switch(style){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f");break;}};var doClip=function doClip(){this.pdf.clip();this.pdf.discardPath();};var doMove=function doMove(x,y){this.pdf.internal.out(getHorizontalCoordinateString(x)+" "+getVerticalCoordinateString(y)+" m");};var putText=function putText(options){var textAlign;switch(options.align){case"right":case"end":textAlign="right";break;case"center":textAlign="center";break;case"left":case"start":default:textAlign="left";break;}var textDimensions=this.pdf.getTextDimensions(options.text);var yBaseLine=getBaseline.call(this,options.y);var yBottom=getTextBottom.call(this,yBaseLine);var yTop=yBottom-textDimensions.h;var pt=this.ctx.transform.applyToPoint(new Point(options.x,yBaseLine));var decomposedTransformationMatrix=this.ctx.transform.decompose();var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);var baselineRect=this.ctx.transform.applyToRectangle(new Rectangle(options.x,yBaseLine,textDimensions.w,textDimensions.h));var textBounds=matrix.applyToRectangle(new Rectangle(options.x,yTop,textDimensions.w,textDimensions.h));var pageArray=getPagesByPath.call(this,textBounds);var pages=[];for(var ii=0;ii<pageArray.length;ii+=1){if(pages.indexOf(pageArray[ii])===-1){pages.push(pageArray[ii]);}}sortPages(pages);var clipPath,oldSize,oldLineWidth;options.text=options.text.replace(/[\t]/g,' ');// 自定义修改 修复打印不了tab键的问题
|
|
100439
|
+
if(this.autoPaging){var min=pages[0];var max=pages[pages.length-1];for(var i=min;i<max+1;i++){this.pdf.setPage(i);var topMargin=i===1?this.posY+this.margin[0]:this.margin[0];var firstPageHeight=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2];var pageHeightMinusBottomMargin=this.pdf.internal.pageSize.height-this.margin[2];var pageHeightMinusMargins=pageHeightMinusBottomMargin-this.margin[0];var pageWidthMinusRightMargin=this.pdf.internal.pageSize.width-this.margin[1];var pageWidthMinusMargins=pageWidthMinusRightMargin-this.margin[3];var previousPageHeightSum=i===1?0:firstPageHeight+(i-2)*pageHeightMinusMargins;var acharSpace=options.charSpace?parseFloat(options.charSpace):0.0;//自定义修改
|
|
100440
|
+
if(this.ctx.clip_path.length!==0){var tmpPaths=this.path;clipPath=JSON.parse(JSON.stringify(this.ctx.clip_path));this.path=pathPositionRedo(clipPath,this.posX+this.margin[3],-1*previousPageHeightSum+topMargin);drawPaths.call(this,"fill",true);this.path=tmpPaths;}var textBoundsOnPage=pathPositionRedo([JSON.parse(JSON.stringify(textBounds))],this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset)[0];if(options.scale>=0.01){oldSize=this.pdf.internal.getFontSize();this.pdf.setFontSize(oldSize*options.scale);oldLineWidth=this.lineWidth;this.lineWidth=oldLineWidth*options.scale;}var doSlice=this.autoPaging!=="text";if(doSlice||textBoundsOnPage.y+textBoundsOnPage.h<=pageHeightMinusBottomMargin){if(doSlice||textBoundsOnPage.y>=topMargin&&textBoundsOnPage.x<=pageWidthMinusRightMargin){var croppedText=doSlice?options.text:this.pdf.splitTextToSize(options.text,options.maxWidth||pageWidthMinusRightMargin-textBoundsOnPage.x)[0];var baseLineRectOnPage=pathPositionRedo([JSON.parse(JSON.stringify(baselineRect))],this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset)[0];var needsClipping=doSlice&&(i>min||i<max)&&hasMargins.call(this);if(needsClipping){this.pdf.saveGraphicsState();this.pdf.rect(this.margin[3],this.margin[0],pageWidthMinusMargins,pageHeightMinusMargins,null).clip().discardPath();}this.pdf.text(croppedText,baseLineRectOnPage.x,baseLineRectOnPage.y,{angle:options.angle,align:textAlign,renderingMode:options.renderingMode,charSpace:acharSpace// 自定义修改
|
|
100441
|
+
});if(needsClipping){this.pdf.restoreGraphicsState();}}}else{// This text is the last element of the page, but it got cut off due to the margin
|
|
100103
100442
|
// so we render it in the next page
|
|
100104
100443
|
if(textBoundsOnPage.y<pageHeightMinusBottomMargin){// As a result, all other elements have their y offset increased
|
|
100105
|
-
this.ctx.prevPageLastElemOffset+=pageHeightMinusBottomMargin-textBoundsOnPage.y;}}if(options.scale>=0.01){this.pdf.setFontSize(oldSize);this.lineWidth=oldLineWidth;}}}else{if(options.scale>=0.01){oldSize=this.pdf.internal.getFontSize();this.pdf.setFontSize(oldSize*options.scale);oldLineWidth=this.lineWidth;this.lineWidth=oldLineWidth*options.scale;}//
|
|
100444
|
+
this.ctx.prevPageLastElemOffset+=pageHeightMinusBottomMargin-textBoundsOnPage.y;}}if(options.scale>=0.01){this.pdf.setFontSize(oldSize);this.lineWidth=oldLineWidth;}}}else{if(options.scale>=0.01){oldSize=this.pdf.internal.getFontSize();this.pdf.setFontSize(oldSize*options.scale);oldLineWidth=this.lineWidth;this.lineWidth=oldLineWidth*options.scale;}// 自定义修改
|
|
100106
100445
|
var acharSpace=options.charSpace?parseFloat(options.charSpace):0.0;this.pdf.text(options.text,pt.x+this.posX,pt.y+this.posY,{angle:options.angle,align:textAlign,renderingMode:options.renderingMode,// maxWidth: options.maxWidth,
|
|
100107
100446
|
charSpace:acharSpace});if(options.scale>=0.01){this.pdf.setFontSize(oldSize);this.lineWidth=oldLineWidth;}}};var drawLine=function drawLine(x,y,prevX,prevY){prevX=prevX||0;prevY=prevY||0;this.pdf.internal.out(getHorizontalCoordinateString(x+prevX)+" "+getVerticalCoordinateString(y+prevY)+" l");};var drawLines=function drawLines(lines,x,y){return this.pdf.lines(lines,x,y,null,null);};var drawCurve=function drawCurve(x,y,x1,y1,x2,y2,x3,y3){this.pdf.internal.out([f2(getHorizontalCoordinate(x1+x)),f2(getVerticalCoordinate(y1+y)),f2(getHorizontalCoordinate(x2+x)),f2(getVerticalCoordinate(y2+y)),f2(getHorizontalCoordinate(x3+x)),f2(getVerticalCoordinate(y3+y)),"c"].join(" "));};/**
|
|
100108
100447
|
* Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.
|
|
@@ -100956,7 +101295,8 @@ var startOfLine=i;workingLen=0;while(i!==l){if(workingLen+widths_array[i]>maxLen
|
|
|
100956
101295
|
// By default, for PDF, it's "point".
|
|
100957
101296
|
var splitParagraphIntoLines=function splitParagraphIntoLines(text,maxlen,options){// at this time works only on Western scripts, ones with space char
|
|
100958
101297
|
// separating the words. Feel free to expand.
|
|
100959
|
-
if(!options){options={};}
|
|
101298
|
+
if(!options){options={};}// 自定义修改 字符间距 split(" ") ==> split("")
|
|
101299
|
+
var line=[],lines=[line],line_length=options.textIndent||0,separator_length=0,current_word_length=0,word,widths_array,words=text.split(""),spaceCharWidth=getCharWidthsArray.apply(this,[" ",options])[0],i,l,tmp,lineIndent;if(options.lineIndent===-1){lineIndent=words[0].length+2;}else{lineIndent=options.lineIndent||0;}if(lineIndent){var pad=Array(lineIndent).join(" "),wrds=[];words.map(function(wrd){wrd=wrd.split(/\s*\n/);if(wrd.length>1){wrds=wrds.concat(wrd.map(function(wrd,idx){return(idx&&wrd.length?"\n":"")+wrd;}));}else{wrds.push(wrd[0]);}});words=wrds;lineIndent=getStringUnitWidth.apply(this,[pad,options]);}for(i=0,l=words.length;i<l;i++){var force=0;word=words[i];if(lineIndent&&word[0]=="\n"){word=word.substr(1);force=1;}widths_array=getCharWidthsArray.apply(this,[word,options]);current_word_length=widths_array.reduce(function(pv,cv){return pv+cv;},0);if(line_length+separator_length+current_word_length>maxlen||force){if(current_word_length>maxlen){// this happens when you have space-less long URLs for example.
|
|
100960
101300
|
// we just chop these to size. We do NOT insert hiphens
|
|
100961
101301
|
tmp=splitLongWord.apply(this,[word,widths_array,maxlen-(line_length+separator_length),maxlen]);// first line we add to existing line object
|
|
100962
101302
|
line.push(tmp.shift());// it's ok to have extra space indicator there
|
|
@@ -198772,7 +199112,7 @@ var es_function_name = __webpack_require__(68309);
|
|
|
198772
199112
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
198773
199113
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(77203);
|
|
198774
199114
|
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
198775
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDocs.vue?vue&type=template&id=
|
|
199115
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDocs.vue?vue&type=template&id=78774540&
|
|
198776
199116
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.hoEditorFactoryIdList.length > 0)?_c('div',{staticClass:"ho-docs"},[_c('section',{class:_vm.defaultEditJson.isFooter ? 'ho-editor-list' : 'ho-editor-list editor-no-footer',on:{"contextmenu":function($event){return _vm.blankAreaRightClick.apply(null, arguments)}}},[_vm._l((_vm.hoEditorFactoryIdList),function(hoEditorId,index){return [_c('HoDoc',{key:index,attrs:{"docIndex":index,"hoEditorId":hoEditorId,"hoEditorFactoryIdList":_vm.hoEditorFactoryIdList,"activeDocId":_vm.activeDocId,"editJson":_vm.defaultEditJson,"isUseTipText":_vm.isUseTipText,"textStyle":_vm.textStyle},on:{"dblNodeClick":_vm.dblNodeClick,"setFontStyles":_vm.setFontStyles,"rightClickEvent":_vm.rightClickEvent,"setActiveDocIndex":_vm.setActiveDocIndex,"setActivePageIndex":_vm.setActivePageIndex,"drawPagesLengthChange":_vm.drawPagesLengthChange},scopedSlots:_vm._u([{key:"hoDocHead",fn:function(){return [_vm._t("hoHead")]},proxy:true},{key:"hoDocFoot",fn:function(){return [_vm._t("hoFoot")]},proxy:true}],null,true)})]})],2),(_vm.notUseModal)?_c('ControlModal',{attrs:{"hoEditorFactoryId":_vm.activeDocId,"controlProperty":_vm.controlProperty,"isDataSource":_vm.isDataSource,"isCustoms":_vm.isCustoms,"isTableProperty":_vm.isTableProperty,"isListStyle":_vm.isListStyle,"uploadImageParams":_vm.uploadImageParams},on:{"insertComments":_vm.insertComments,"closeControlmodal":_vm.closeControlModal},scopedSlots:_vm._u([{key:"hoTextModal",fn:function(){return [_vm._t("hoTextField")]},proxy:true},{key:"hoComment",fn:function(){return [_vm._t("hoTextComment")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlFindType)?_c('FindReplaceDialog',{attrs:{"hoEditorFactoryId":_vm.activeDocId}}):_vm._e(),(_vm.defaultEditJson.isFooter)?_c('HoFooter',{attrs:{"docProperty":_vm.defaultDocProperty,"hoEditorFactoryId":_vm.activeDocId,"drawPages":_vm.drawPageLength,"currentActivePages":_vm.activePageIndex}}):_vm._e(),_c('ViewContinuousXml',{attrs:{"hoEditorFactoryId":_vm.activeDocId}})],1):_vm._e()}
|
|
198777
199117
|
var staticRenderFns = []
|
|
198778
199118
|
|
|
@@ -200376,11 +200716,12 @@ var DrawSelectLevel = /*#__PURE__*/function () {
|
|
|
200376
200716
|
drawNode.children.splice(d, 1);
|
|
200377
200717
|
}
|
|
200378
200718
|
}
|
|
200379
|
-
}
|
|
200380
200719
|
|
|
200381
|
-
|
|
200382
|
-
|
|
200720
|
+
hoeditorfactory.docTree.curOnDragNode = null;
|
|
200721
|
+
HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID).drawPageTree.updateDrawPage(dPage.pageIndex);
|
|
200722
|
+
} //if (drawLine instanceof DrawLine) drawLine.updateCache();
|
|
200383
200723
|
//drawNode.stage.update();
|
|
200724
|
+
|
|
200384
200725
|
}
|
|
200385
200726
|
|
|
200386
200727
|
var curComment = hoeditorfactory.drawTree.curOnSelectedComment;
|
|
@@ -206754,7 +207095,7 @@ var SignNode = __webpack_require__(78975);
|
|
|
206754
207095
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
206755
207096
|
var ParagraphNode = __webpack_require__(13880);
|
|
206756
207097
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
206757
|
-
/* harmony default export */ var version = ('2.0.
|
|
207098
|
+
/* harmony default export */ var version = ('2.0.60');
|
|
206758
207099
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/poperTipText/PoperTipText.vue?vue&type=template&id=3fa4e4d3&scoped=true&
|
|
206759
207100
|
var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"},{name:"click-outside",rawName:"v-click-outside",value:(_vm.handleClose),expression:"handleClose"}],ref:"poperTextNode",staticClass:"poper-text-modal animation-in",style:(_vm.posStyle),on:{"mouseenter":_vm.mouseEnter,"mouseleave":_vm.mouseLeave}},_vm._l((_vm.poperText),function(text){return _c('div',{key:text + Math.random(0, 1),staticClass:"poper-text"},[_vm._v(" "+_vm._s(text)+" ")])}),0)}
|
|
206760
207101
|
var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_staticRenderFns = []
|
|
@@ -208910,9 +209251,7 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
208910
209251
|
}
|
|
208911
209252
|
|
|
208912
209253
|
if (dPage.drawDomLevel && dPage.drawDomLevel.stage) {
|
|
208913
|
-
|
|
208914
|
-
dPage.drawDomLevel.clearStage();
|
|
208915
|
-
}
|
|
209254
|
+
dPage.drawDomLevel.clearStage();
|
|
208916
209255
|
}
|
|
208917
209256
|
}
|
|
208918
209257
|
}
|
|
@@ -214418,6 +214757,9 @@ var StagePosition = __webpack_require__(80691);
|
|
|
214418
214757
|
|
|
214419
214758
|
|
|
214420
214759
|
|
|
214760
|
+
|
|
214761
|
+
|
|
214762
|
+
|
|
214421
214763
|
|
|
214422
214764
|
|
|
214423
214765
|
|
|
@@ -219215,7 +219557,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219215
219557
|
var _loop2 = function _loop2(i) {
|
|
219216
219558
|
var node = nodes[i];
|
|
219217
219559
|
|
|
219218
|
-
if (node instanceof DownListNode/* DownListNode */.yF && node.isReadOnly || node instanceof DateTimeNode/* DateTimeNode */.Z && node.isReadOnly || node instanceof TextInputFieldNode/* TextInputFieldNode */.re &&
|
|
219560
|
+
if (node instanceof DownListNode/* DownListNode */.yF && node.isReadOnly || node instanceof DateTimeNode/* DateTimeNode */.Z && node.isReadOnly || node instanceof TextInputFieldNode/* TextInputFieldNode */.re && node.inputFieldType == 0 && node.childNodes.filter(function (child) {
|
|
219219
219561
|
return child instanceof TextInputFieldNode/* TextInputFieldNode */.re;
|
|
219220
219562
|
}).length === 0) {
|
|
219221
219563
|
if (arr.filter(function (v) {
|
|
@@ -219677,6 +220019,17 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219677
220019
|
var y = (hoEditorFactory.pageProperty.heightPixes - caret.stageY) * 0.75;
|
|
219678
220020
|
return [caret.pageIndex + 1, caret.stageX * 0.75, y];
|
|
219679
220021
|
}
|
|
220022
|
+
/**
|
|
220023
|
+
* 获取光标位置
|
|
220024
|
+
* returns [pageIndex, x, y]
|
|
220025
|
+
*/
|
|
220026
|
+
// public getSignNodePosition(): [number, number, number] {
|
|
220027
|
+
// const hoEditorFactory = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
220028
|
+
// const caret = hoEditorFactory.drawTree.caret;
|
|
220029
|
+
// const y = (hoEditorFactory.pageProperty.heightPixes - caret.stageY) * 0.75;
|
|
220030
|
+
// return [caret.pageIndex + 1, caret.stageX * 0.75, y];
|
|
220031
|
+
// }
|
|
220032
|
+
|
|
219680
220033
|
/**
|
|
219681
220034
|
* 文档生成并返回base64格式pdf文件 患者签名使用
|
|
219682
220035
|
*/
|
|
@@ -219759,7 +220112,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219759
220112
|
|
|
219760
220113
|
}, {
|
|
219761
220114
|
key: "insertWriteSign",
|
|
219762
|
-
value: function insertWriteSign(imgSrc, fingerPrintSrc, fingerPosition) {
|
|
220115
|
+
value: function insertWriteSign(imgSrc, fingerPrintSrc, fingerPosition, callback) {
|
|
219763
220116
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
219764
220117
|
var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
219765
220118
|
var startPath = curDomRange.normalize().startPath;
|
|
@@ -219790,7 +220143,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219790
220143
|
var changingEvent = new NodeChangingEvent/* NodeChangingEvent */.Q(DocTree/* DocAction.daInsert */.gk.daInsert, startPath, endPath, NodeChangingEvent/* OperType.insertSign */.y.insertSign);
|
|
219791
220144
|
|
|
219792
220145
|
if (hoEditorFactory.docTree.changing(changingEvent)) {
|
|
219793
|
-
hoEditorFactory.docController.insertSignNode(curDomRange, 1, "患者签名", node.signor, node.signTime, node.signTimeFormat, imgSrc, node.imgWidth, node.imgHeight, node.customProperty, fingerPrintSrc, fingerPosition)
|
|
220146
|
+
Promise.all([hoEditorFactory.docController.insertSignNode(curDomRange, 1, "患者签名", node.signor, node.signTime, node.signTimeFormat, imgSrc, node.imgWidth, node.imgHeight, node.customProperty, fingerPrintSrc, fingerPosition)]).then(function () {
|
|
220147
|
+
setTimeout(function () {
|
|
220148
|
+
callback && callback();
|
|
220149
|
+
}, 0);
|
|
220150
|
+
});
|
|
219794
220151
|
}
|
|
219795
220152
|
}, 0);
|
|
219796
220153
|
}
|
|
@@ -219798,7 +220155,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219798
220155
|
var changingEvent = new NodeChangingEvent/* NodeChangingEvent */.Q(DocTree/* DocAction.daInsert */.gk.daInsert, startPath, endPath, NodeChangingEvent/* OperType.insertSign */.y.insertSign);
|
|
219799
220156
|
|
|
219800
220157
|
if (hoEditorFactory.docTree.changing(changingEvent)) {
|
|
219801
|
-
hoEditorFactory.docController.insertSignNode(curDomRange, 1, "患者签名", "", "", "", imgSrc, 0, 0, {}, fingerPrintSrc, fingerPosition)
|
|
220158
|
+
Promise.all([hoEditorFactory.docController.insertSignNode(curDomRange, 1, "患者签名", "", "", "", imgSrc, 0, 0, {}, fingerPrintSrc, fingerPosition)]).then(function () {
|
|
220159
|
+
setTimeout(function () {
|
|
220160
|
+
callback && callback();
|
|
220161
|
+
}, 0);
|
|
220162
|
+
});
|
|
219802
220163
|
}
|
|
219803
220164
|
}
|
|
219804
220165
|
}
|
|
@@ -220223,6 +220584,44 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220223
220584
|
hoEditorFactory.docTree.curDomRange = newRange;
|
|
220224
220585
|
hoEditorFactory.drawTree.moveCaretToPath(curDomRange.startPath);
|
|
220225
220586
|
}
|
|
220587
|
+
/**
|
|
220588
|
+
* 查询光标所在位置之前的文本内容
|
|
220589
|
+
*/
|
|
220590
|
+
|
|
220591
|
+
}, {
|
|
220592
|
+
key: "getCaretPreviousTextNode",
|
|
220593
|
+
value: function getCaretPreviousTextNode() {
|
|
220594
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
220595
|
+
var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
220596
|
+
var node = curDomRange.npEnd.node;
|
|
220597
|
+
var text = "";
|
|
220598
|
+
|
|
220599
|
+
var getText = function getText(previousNode) {
|
|
220600
|
+
if (previousNode instanceof TextNode/* TextNode */.R || previousNode instanceof LabelNode/* LabelNode */.P || previousNode instanceof DownListNode/* DownListNode */.yF) {
|
|
220601
|
+
return previousNode.text;
|
|
220602
|
+
} else if ((previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re && (previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode.inputFieldType) === TextInputFieldNode/* InputFieldType.dropDownList */.Zi.dropDownList) {
|
|
220603
|
+
return previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode.text;
|
|
220604
|
+
}
|
|
220605
|
+
};
|
|
220606
|
+
|
|
220607
|
+
if (node instanceof TextNode/* TextNode */.R && !(node instanceof TextInputFieldNode/* TextInputFieldNode */.re)) {
|
|
220608
|
+
if (node.text) {
|
|
220609
|
+
text = node.text;
|
|
220610
|
+
} else {
|
|
220611
|
+
text = getText(node.previousLeaf());
|
|
220612
|
+
}
|
|
220613
|
+
} else if ((node === null || node === void 0 ? void 0 : node.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
220614
|
+
text = getText(node.parentNode.previousLeaf());
|
|
220615
|
+
|
|
220616
|
+
if (!text) {
|
|
220617
|
+
text = getText(node.previousLeaf());
|
|
220618
|
+
}
|
|
220619
|
+
} else if (node instanceof SignNode/* SignNode */.N && node.type !== 3) {
|
|
220620
|
+
text = getText(node.previousLeaf());
|
|
220621
|
+
}
|
|
220622
|
+
|
|
220623
|
+
return text;
|
|
220624
|
+
}
|
|
220226
220625
|
/**
|
|
220227
220626
|
* 初始化文档
|
|
220228
220627
|
*/
|
|
@@ -220402,6 +220801,72 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220402
220801
|
}
|
|
220403
220802
|
}
|
|
220404
220803
|
}
|
|
220804
|
+
}, {
|
|
220805
|
+
key: "showElementsEditRecord",
|
|
220806
|
+
value: function showElementsEditRecord(objects) {
|
|
220807
|
+
var comments = [];
|
|
220808
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
220809
|
+
|
|
220810
|
+
for (var i = 0; i < objects.length; i++) {
|
|
220811
|
+
var object = objects[i];
|
|
220812
|
+
var name = object.name;
|
|
220813
|
+
var oldValue = object.oldValue;
|
|
220814
|
+
var elements = this.getNodesByName("main", true, name);
|
|
220815
|
+
|
|
220816
|
+
for (var j = 0; j < elements.length; j++) {
|
|
220817
|
+
var element = elements[j];
|
|
220818
|
+
|
|
220819
|
+
if (element instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
220820
|
+
var commentID = hoEditorFactory.gernerateCode.generateID("C");
|
|
220821
|
+
var comment = new Comment/* Comment */.s(this._hoEditorFactoryID, commentID, oldValue, element.EndMarkNode);
|
|
220822
|
+
comment.lineHeight = comment.lineHeight - 20;
|
|
220823
|
+
comments.push(comment);
|
|
220824
|
+
}
|
|
220825
|
+
}
|
|
220826
|
+
}
|
|
220827
|
+
|
|
220828
|
+
comments.forEach(function (comment, index) {
|
|
220829
|
+
index++;
|
|
220830
|
+
var endDrawNode = comment.eNode.drawNodes[0];
|
|
220831
|
+
var drawArea = hoEditorFactory.drawPageTree.getMainRootArea(endDrawNode);
|
|
220832
|
+
var dline = hoEditorFactory.drawTree.getDrawLineByDNode(endDrawNode); // 末尾标记节点所在行
|
|
220833
|
+
|
|
220834
|
+
var stagePos = dline.localToGlobal(endDrawNode.x, endDrawNode.y); // 末尾标记节点的stage坐标
|
|
220835
|
+
|
|
220836
|
+
var localPos = drawArea.globalToLocal(stagePos.x, stagePos.y); // 末尾标记节点的stage坐标
|
|
220837
|
+
|
|
220838
|
+
var spX = dline.parent instanceof DrawPageCell/* DrawPageCell */.k ? localPos.x : endDrawNode.x;
|
|
220839
|
+
var spY = localPos.y;
|
|
220840
|
+
drawArea.removeComment(comment);
|
|
220841
|
+
var path = comment.eNode.getNodePath();
|
|
220842
|
+
|
|
220843
|
+
if (index === 1) {
|
|
220844
|
+
drawArea.drawEditRecords(comment, spX, spY, spY);
|
|
220845
|
+
}
|
|
220846
|
+
|
|
220847
|
+
if (index >= 2) {
|
|
220848
|
+
drawArea.repaintRecored(comments, comment, path, spX, spY);
|
|
220849
|
+
}
|
|
220850
|
+
});
|
|
220851
|
+
}
|
|
220852
|
+
}, {
|
|
220853
|
+
key: "updateImageSrc",
|
|
220854
|
+
value: function updateImageSrc(node, src) {
|
|
220855
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
220856
|
+
var sPath = hoEditorFactory.docTree.getNodeLastPath(node.previousLeaf());
|
|
220857
|
+
var ePath = node.getNodePath();
|
|
220858
|
+
var changeEvent = new NodeChangeEvent/* NodeChangeEvent */.G(this._hoEditorFactoryID, DocTree/* DocAction.daModifyStyle */.gk.daModifyStyle, sPath, ePath);
|
|
220859
|
+
changeEvent.oldEndPath = ePath;
|
|
220860
|
+
changeEvent.afterChangePath = ePath;
|
|
220861
|
+
changeEvent.oldDrawLines = new SelectRange/* SelectRange */.E(this._hoEditorFactoryID).getRangeDrawLines(sPath, ePath, true);
|
|
220862
|
+
node.imageDataBase64String = src;
|
|
220863
|
+
hoEditorFactory.docTree.change(changeEvent);
|
|
220864
|
+
}
|
|
220865
|
+
}, {
|
|
220866
|
+
key: "setParaCustomProperty",
|
|
220867
|
+
value: function setParaCustomProperty(paragraphNode, customProperty) {
|
|
220868
|
+
paragraphNode.setCustomProperty(customProperty);
|
|
220869
|
+
}
|
|
220405
220870
|
}]);
|
|
220406
220871
|
|
|
220407
220872
|
return VueController;
|
|
@@ -222464,7 +222929,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222464
222929
|
beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
222465
222930
|
xml = hoEditorFactory.vueController.getDocXml(true);
|
|
222466
222931
|
htmlText = {
|
|
222467
|
-
text:
|
|
222932
|
+
text: ''
|
|
222468
222933
|
};
|
|
222469
222934
|
hPromise = Promise.resolve();
|
|
222470
222935
|
hPromise = hPromise.then(function () {
|
|
@@ -222535,12 +223000,14 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222535
223000
|
path = hoEditorFactory.docTree.curDomRange.normalize().endPath;
|
|
222536
223001
|
beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
222537
223002
|
xml = hoEditorFactory.vueController.getDocXml(true);
|
|
222538
|
-
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223003
|
+
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
222539
223004
|
format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
222540
223005
|
options = {
|
|
222541
223006
|
orientation: orientation,
|
|
222542
|
-
unit:
|
|
222543
|
-
format: format
|
|
223007
|
+
unit: 'px',
|
|
223008
|
+
format: format,
|
|
223009
|
+
hotfixes: ['px_scaling'],
|
|
223010
|
+
compress: true
|
|
222544
223011
|
};
|
|
222545
223012
|
PDF = new jspdf/* default */.ZP(options);
|
|
222546
223013
|
hPromise = Promise.resolve();
|
|
@@ -222563,7 +223030,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222563
223030
|
hoEditorFactory.vueController.openXml(xml);
|
|
222564
223031
|
PDF.deletePage(1);
|
|
222565
223032
|
return new Promise(function (resolves) {
|
|
222566
|
-
resolves(PDF.output(
|
|
223033
|
+
resolves(PDF.output('datauristring'));
|
|
222567
223034
|
});
|
|
222568
223035
|
});
|
|
222569
223036
|
|
|
@@ -222578,7 +223045,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222578
223045
|
setTimeout(function () {
|
|
222579
223046
|
hoEditorFactory.vueController.moveCaretToPath(path);
|
|
222580
223047
|
}, 0);
|
|
222581
|
-
return _context2.abrupt("return", base64.replace(/^data:application\/pdf;filename=generated.pdf;base64,/,
|
|
223048
|
+
return _context2.abrupt("return", base64.replace(/^data:application\/pdf;filename=generated.pdf;base64,/, ''));
|
|
222582
223049
|
|
|
222583
223050
|
case 20:
|
|
222584
223051
|
return _context2.abrupt("return", null);
|
|
@@ -222605,10 +223072,10 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222605
223072
|
}, {
|
|
222606
223073
|
key: "setjsPDFFonts",
|
|
222607
223074
|
value: function setjsPDFFonts(font) {
|
|
222608
|
-
jspdf/* default.API.events.push */.ZP.API.events.push([
|
|
222609
|
-
this.addFileToVFS(
|
|
222610
|
-
this.addFont(
|
|
222611
|
-
this.setFont(
|
|
223075
|
+
jspdf/* default.API.events.push */.ZP.API.events.push(['addFonts', function () {
|
|
223076
|
+
this.addFileToVFS('SimSun-normal.ttf', font);
|
|
223077
|
+
this.addFont('SimSun-normal.ttf', 'SimSun', 'normal');
|
|
223078
|
+
this.setFont('SimSun', 'normal');
|
|
222612
223079
|
}]);
|
|
222613
223080
|
this._isSetFont = true;
|
|
222614
223081
|
|
|
@@ -222639,8 +223106,8 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222639
223106
|
return;
|
|
222640
223107
|
}
|
|
222641
223108
|
|
|
222642
|
-
var fileType = type ? type :
|
|
222643
|
-
var fileName = pdfName ? pdfName : hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() :
|
|
223109
|
+
var fileType = type ? type : 'pdf';
|
|
223110
|
+
var fileName = pdfName ? pdfName : hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档'; // 保存打印前文档状态 和 内容
|
|
222644
223111
|
|
|
222645
223112
|
var beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
222646
223113
|
var xml = hoEditorFactory.vueController.getDocXml(true);
|
|
@@ -222654,16 +223121,21 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222654
223121
|
});
|
|
222655
223122
|
hPromise = hPromise.then(function () {
|
|
222656
223123
|
return new Promise(function (resolve) {
|
|
222657
|
-
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223124
|
+
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
222658
223125
|
var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
222659
223126
|
|
|
222660
|
-
if (hoEditorFactory.isFixedPrintToA4 && isSpecial) {
|
|
223127
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1' && isSpecial) {
|
|
222661
223128
|
format = _this3._a4Size[orientation];
|
|
222662
223129
|
}
|
|
222663
223130
|
|
|
223131
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
223132
|
+
format = [793, 1122];
|
|
223133
|
+
orientation = 'p';
|
|
223134
|
+
}
|
|
223135
|
+
|
|
222664
223136
|
var options = {
|
|
222665
223137
|
orientation: orientation,
|
|
222666
|
-
unit:
|
|
223138
|
+
unit: 'px',
|
|
222667
223139
|
format: format
|
|
222668
223140
|
};
|
|
222669
223141
|
// const PDF = new jsPDF(orientation, "px", [hoEditorFactory.pageProperty.widthMm, hoEditorFactory.pageProperty.heightMm], false, true, );
|
|
@@ -222693,14 +223165,20 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222693
223165
|
|
|
222694
223166
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
222695
223167
|
var beforeStatus = hoEditorFactory.drawTree.paintStatus;
|
|
223168
|
+
var xml = "";
|
|
223169
|
+
|
|
223170
|
+
if (hoEditorFactory.printStatus.printRange !== 2) {
|
|
223171
|
+
xml = hoEditorFactory.vueController.getDocXml(true, true);
|
|
223172
|
+
}
|
|
223173
|
+
|
|
222696
223174
|
hoEditorFactory.startPageNum = 0;
|
|
222697
223175
|
hoEditorFactory.firstPageStartTop = 0;
|
|
222698
223176
|
|
|
222699
223177
|
if (!this._isSetFont) {
|
|
222700
223178
|
this._waitPrint = true;
|
|
222701
223179
|
|
|
222702
|
-
message_box_default().alert("<p>\u6253\u5370\u6240\u9700\u6587\u4EF6\u6B63\u5728\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u7A0D\u5019</p><p>\u52A0\u8F7D\u5B8C\u6210\u540E\u4F1A\u81EA\u52A8\u8FDB\u884C\u6253\u5370</p>",
|
|
222703
|
-
iconClass:
|
|
223180
|
+
message_box_default().alert("<p>\u6253\u5370\u6240\u9700\u6587\u4EF6\u6B63\u5728\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u7A0D\u5019</p><p>\u52A0\u8F7D\u5B8C\u6210\u540E\u4F1A\u81EA\u52A8\u8FDB\u884C\u6253\u5370</p>", '提示', {
|
|
223181
|
+
iconClass: 'el-icon-loading',
|
|
222704
223182
|
center: true,
|
|
222705
223183
|
showConfirmButton: false,
|
|
222706
223184
|
dangerouslyUseHTMLString: true
|
|
@@ -222714,12 +223192,12 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222714
223192
|
}
|
|
222715
223193
|
|
|
222716
223194
|
if (printMode && printAppoint) {
|
|
222717
|
-
var appoint = printAppoint.replace(/\s*/g,
|
|
223195
|
+
var appoint = printAppoint.replace(/\s*/g, '').replace(/[^\d]/g, ',').split(',');
|
|
222718
223196
|
var maxLen = hoEditorFactory.drawTree.drawPages.length;
|
|
222719
223197
|
var error = appoint.filter(function (pages) {
|
|
222720
223198
|
return pages && Number(pages) > maxLen;
|
|
222721
223199
|
});
|
|
222722
|
-
if (error.length > 0) return
|
|
223200
|
+
if (error.length > 0) return '指定页输入超出文档页范围';
|
|
222723
223201
|
}
|
|
222724
223202
|
|
|
222725
223203
|
var setStatus = new Promise( /*#__PURE__*/function () {
|
|
@@ -222764,18 +223242,23 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222764
223242
|
setStatus.then(function (res) {
|
|
222765
223243
|
if (res) {
|
|
222766
223244
|
return new Promise(function (reslove, reject) {
|
|
222767
|
-
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223245
|
+
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
222768
223246
|
var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
222769
223247
|
|
|
222770
|
-
if (hoEditorFactory.isFixedPrintToA4) {
|
|
223248
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1') {
|
|
222771
223249
|
format = _this4._a4Size[orientation];
|
|
222772
223250
|
}
|
|
222773
223251
|
|
|
223252
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
223253
|
+
format = [793, 1122];
|
|
223254
|
+
orientation = 'p';
|
|
223255
|
+
}
|
|
223256
|
+
|
|
222774
223257
|
var options = {
|
|
222775
223258
|
orientation: orientation,
|
|
222776
|
-
unit:
|
|
223259
|
+
unit: 'px',
|
|
222777
223260
|
format: format,
|
|
222778
|
-
hotfixes: [
|
|
223261
|
+
hotfixes: ['px_scaling'],
|
|
222779
223262
|
compress: true
|
|
222780
223263
|
};
|
|
222781
223264
|
var PDF = new jspdf/* default */.ZP(options);
|
|
@@ -222783,20 +223266,26 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222783
223266
|
});
|
|
222784
223267
|
}
|
|
222785
223268
|
}).then(function (res) {
|
|
222786
|
-
if (res ===
|
|
223269
|
+
if (res === 'printend') {
|
|
222787
223270
|
if (callback) {
|
|
222788
223271
|
callback(hoEditorFactory.printStatus.printRecord.last());
|
|
222789
223272
|
}
|
|
222790
223273
|
|
|
222791
|
-
hoEditorFactory.drawTree.paintStatus = beforeStatus;
|
|
222792
|
-
hoEditorFactory.printStatus.printRange = 2;
|
|
222793
223274
|
hoEditorFactory.printStatus.printAppoint = '';
|
|
222794
223275
|
hoEditorFactory.printStatus.drawPrintRecord.Position = [0, 0];
|
|
222795
223276
|
hoEditorFactory.startPageNum = 0;
|
|
222796
223277
|
hoEditorFactory.firstPageStartTop = 0;
|
|
222797
|
-
|
|
222798
|
-
hoEditorFactory.printStatus.
|
|
222799
|
-
|
|
223278
|
+
|
|
223279
|
+
if (hoEditorFactory.printStatus.printRange !== 2) {
|
|
223280
|
+
hoEditorFactory.printStatus.printRange = 2;
|
|
223281
|
+
hoEditorFactory.drawTree.paintStatus = 5;
|
|
223282
|
+
hoEditorFactory.vueController.openXml(xml);
|
|
223283
|
+
} else {
|
|
223284
|
+
hoEditorFactory.drawTree.paintStatus = beforeStatus;
|
|
223285
|
+
hoEditorFactory.printStatus.clearArea();
|
|
223286
|
+
hoEditorFactory.printStatus.drawPrintRecord.clear();
|
|
223287
|
+
hoEditorFactory.vueController.rebuildAll(true);
|
|
223288
|
+
}
|
|
222800
223289
|
}
|
|
222801
223290
|
});
|
|
222802
223291
|
}
|
|
@@ -222864,7 +223353,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222864
223353
|
while (1) {
|
|
222865
223354
|
switch (_context5.prev = _context5.next) {
|
|
222866
223355
|
case 0:
|
|
222867
|
-
console.time(
|
|
223356
|
+
console.time('连续打印总用时');
|
|
222868
223357
|
list = [];
|
|
222869
223358
|
xmlInfoes.xmlList.forEach(function (v) {
|
|
222870
223359
|
list.push([v.isMerge, v.xml]);
|
|
@@ -222883,7 +223372,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222883
223372
|
hoEditorFactory.printStatus.printMode = 0;
|
|
222884
223373
|
hoEditorFactory.drawTree.paintStatus = DrawTree/* PaintState.psPreview */.Dh.psPreview;
|
|
222885
223374
|
hPromise = Promise.resolve();
|
|
222886
|
-
console.time(
|
|
223375
|
+
console.time('连续查看病历合并总用时');
|
|
222887
223376
|
hPromise = hPromise.then(function (res) {
|
|
222888
223377
|
return new Promise(function (resolve) {
|
|
222889
223378
|
Promise.all([hoEditorFactory.vueController.openDocsForPrint(list)]).then(function () {
|
|
@@ -222897,8 +223386,8 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222897
223386
|
});
|
|
222898
223387
|
});
|
|
222899
223388
|
hPromise = hPromise.then(function () {
|
|
222900
|
-
console.timeEnd(
|
|
222901
|
-
console.time(
|
|
223389
|
+
console.timeEnd('连续查看病历合并总用时');
|
|
223390
|
+
console.time('生成pdf用时');
|
|
222902
223391
|
return new Promise( /*#__PURE__*/function () {
|
|
222903
223392
|
var _ref2 = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee4(resolve) {
|
|
222904
223393
|
var orientation, format, options, PDF;
|
|
@@ -222906,23 +223395,28 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222906
223395
|
while (1) {
|
|
222907
223396
|
switch (_context4.prev = _context4.next) {
|
|
222908
223397
|
case 0:
|
|
222909
|
-
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223398
|
+
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
222910
223399
|
format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
222911
223400
|
|
|
222912
|
-
if (hoEditorFactory.isFixedPrintToA4) {
|
|
223401
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1') {
|
|
222913
223402
|
format = _this5._a4Size[orientation];
|
|
222914
223403
|
}
|
|
222915
223404
|
|
|
223405
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
223406
|
+
format = [793, 1122];
|
|
223407
|
+
orientation = 'p';
|
|
223408
|
+
}
|
|
223409
|
+
|
|
222916
223410
|
options = {
|
|
222917
223411
|
orientation: orientation,
|
|
222918
|
-
unit:
|
|
223412
|
+
unit: 'px',
|
|
222919
223413
|
format: format,
|
|
222920
|
-
hotfixes: [
|
|
223414
|
+
hotfixes: ['px_scaling']
|
|
222921
223415
|
};
|
|
222922
223416
|
PDF = new jspdf/* default */.ZP(options);
|
|
222923
223417
|
PrintStatus/* Print.printToPDF */.Kh.printToPDF(_this5._hoEditorFactoryID, PDF, undefined, undefined, resolve, positionY, format);
|
|
222924
223418
|
|
|
222925
|
-
case
|
|
223419
|
+
case 7:
|
|
222926
223420
|
case "end":
|
|
222927
223421
|
return _context4.stop();
|
|
222928
223422
|
}
|
|
@@ -222938,7 +223432,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222938
223432
|
_context5.next = 17;
|
|
222939
223433
|
return hPromise.then(function (res) {
|
|
222940
223434
|
if (res) {
|
|
222941
|
-
console.timeEnd(
|
|
223435
|
+
console.timeEnd('生成pdf用时');
|
|
222942
223436
|
return new Promise(function (resolves) {
|
|
222943
223437
|
var last = hoEditorFactory.printStatus.printRecord.last();
|
|
222944
223438
|
var pos;
|
|
@@ -222973,7 +223467,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222973
223467
|
// hoEditorFactory.drawTree.rebuildAllDrawLine(false);
|
|
222974
223468
|
// }, 0);
|
|
222975
223469
|
|
|
222976
|
-
console.timeEnd(
|
|
223470
|
+
console.timeEnd('连续打印总用时');
|
|
222977
223471
|
resolves(pos);
|
|
222978
223472
|
});
|
|
222979
223473
|
} else {
|
|
@@ -222989,7 +223483,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222989
223483
|
// hoEditorFactory.drawTree.rebuildAllDrawLine(false);
|
|
222990
223484
|
// }, 0);
|
|
222991
223485
|
|
|
222992
|
-
console.timeEnd(
|
|
223486
|
+
console.timeEnd('连续打印总用时');
|
|
222993
223487
|
return null;
|
|
222994
223488
|
}
|
|
222995
223489
|
});
|
|
@@ -223027,7 +223521,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223027
223521
|
}()
|
|
223028
223522
|
/**
|
|
223029
223523
|
* 批量打印病历 当前
|
|
223030
|
-
* @param xmlList [boolean, string, boolean
|
|
223524
|
+
* @param xmlList [string, boolean, string, boolean][]
|
|
223031
223525
|
* 四个参数分别是: xml内容 是否合并 病程记录id:用来判断是否是病程记录和返回对应病程记录的坐标(处理多个不同病程记录的情况) 是否是最后一份病程记录
|
|
223032
223526
|
*/
|
|
223033
223527
|
|
|
@@ -223051,8 +223545,8 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223051
223545
|
xmlIndex = -1;
|
|
223052
223546
|
mergeList = [];
|
|
223053
223547
|
options = {
|
|
223054
|
-
unit:
|
|
223055
|
-
hotfixes: [
|
|
223548
|
+
unit: 'px',
|
|
223549
|
+
hotfixes: ['px_scaling'],
|
|
223056
223550
|
compress: true
|
|
223057
223551
|
};
|
|
223058
223552
|
PDF = new jspdf/* default */.ZP(options);
|
|
@@ -223112,6 +223606,8 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223112
223606
|
} else {
|
|
223113
223607
|
hoEditorFactory.loadImageCallback = toPrint;
|
|
223114
223608
|
}
|
|
223609
|
+
|
|
223610
|
+
mergeList = [];
|
|
223115
223611
|
});
|
|
223116
223612
|
} else {
|
|
223117
223613
|
createSvg();
|
|
@@ -223134,7 +223630,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223134
223630
|
hoEditorFactory.drawTree.paintStatus = beforePrintStatus;
|
|
223135
223631
|
hoEditorFactory.vueController.openXml(xml);
|
|
223136
223632
|
PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
|
|
223137
|
-
name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() :
|
|
223633
|
+
name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档';
|
|
223138
223634
|
PrintStatus/* Print.openDataUriInWindow */.Kh.openDataUriInWindow(PDF, name, hoEditorFactory.pageProperty.widthPixes);
|
|
223139
223635
|
}
|
|
223140
223636
|
|
|
@@ -224045,6 +224541,7 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
224045
224541
|
this._lastSaveTime = new Date(Date.now());
|
|
224046
224542
|
this._superiorSigns = []; //上级医生签名
|
|
224047
224543
|
|
|
224544
|
+
this._isEnabledGlobalColor = false;
|
|
224048
224545
|
this._hoEditorFactoryId = id;
|
|
224049
224546
|
}
|
|
224050
224547
|
/**
|
|
@@ -224702,6 +225199,16 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
224702
225199
|
this._isFixedPrintToA4 = value;
|
|
224703
225200
|
}
|
|
224704
225201
|
}
|
|
225202
|
+
}, {
|
|
225203
|
+
key: "isRotate",
|
|
225204
|
+
get: function get() {
|
|
225205
|
+
return this._isRotate;
|
|
225206
|
+
},
|
|
225207
|
+
set: function set(value) {
|
|
225208
|
+
if (this._isRotate !== value) {
|
|
225209
|
+
this._isRotate = value;
|
|
225210
|
+
}
|
|
225211
|
+
}
|
|
224705
225212
|
}, {
|
|
224706
225213
|
key: "isUseImagePrint",
|
|
224707
225214
|
get: function get() {
|
|
@@ -224732,6 +225239,16 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
224732
225239
|
this._printBlack = value;
|
|
224733
225240
|
}
|
|
224734
225241
|
}
|
|
225242
|
+
}, {
|
|
225243
|
+
key: "isEnabledGlobalColor",
|
|
225244
|
+
get: function get() {
|
|
225245
|
+
return this._isEnabledGlobalColor;
|
|
225246
|
+
},
|
|
225247
|
+
set: function set(value) {
|
|
225248
|
+
if (this._isEnabledGlobalColor !== value) {
|
|
225249
|
+
this._isEnabledGlobalColor = value;
|
|
225250
|
+
}
|
|
225251
|
+
}
|
|
224735
225252
|
}, {
|
|
224736
225253
|
key: "clear",
|
|
224737
225254
|
value: function clear() {
|
|
@@ -225088,9 +225605,9 @@ var HoFooter_component = normalizeComponent(
|
|
|
225088
225605
|
)
|
|
225089
225606
|
|
|
225090
225607
|
/* harmony default export */ var components_HoFooter = (HoFooter_component.exports);
|
|
225091
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/ControlModal.vue?vue&type=template&id=
|
|
225092
|
-
var
|
|
225093
|
-
var
|
|
225608
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/ControlModal.vue?vue&type=template&id=35544190&
|
|
225609
|
+
var ControlModalvue_type_template_id_35544190_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"toolModals",staticClass:"control-modal",on:{"mousedown":_vm.toolModalDown}},[(_vm.controlType === 'barcode')?_c('Barcode',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'qrcode')?_c('QrCode',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'express')?_c('ExpressionForm',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"controlProperty":_vm.controlProperty},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'text')?_c('TextDialog',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoTextFieldModal",fn:function(){return [_vm._t("hoTextModal")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlType === 'date')?_c('DateDialog',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoDateFieldModal",fn:function(){return [_vm._t("hoDateModal")]},proxy:true},{key:"hoTextFieldModal",fn:function(){return [_vm._t("hoTextModal")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlType === 'select')?_c('SelectDialog',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'gestation')?_c('Gestation',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table')?_c('TableProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table-row')?_c('TableRowProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table-cell')?_c('TableCellProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table-col')?_c('TableColProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.isCustoms)?_c('CustomAttributes',{attrs:{"isTableProperty":_vm.isTableProperty},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.isDataSource)?_c('DataSourceDialog',{on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.isListStyle)?_c('ListSource',{on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'RadioBox' || _vm.controlType === 'CheckBox')?_c('RadioCheckbox',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId,"controlProperty":_vm.controlProperty},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'waterset')?_c('WaterSetDialog',{attrs:{"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'comment')?_c('CommentDialog',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"insertComments":_vm.insertComments,"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoCommentModal",fn:function(){return [_vm._t("hoComment")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlType === 'pageInfoes')?_c('PageInfoes',{attrs:{"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'delimiter')?_c('Delimiter',{attrs:{"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'sign')?_c('Sign',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'upload-image')?_c('UploadImageDialog',{attrs:{"uploadImageParams":_vm.uploadImageParams,"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'edit-image')?_c('CanvasImageDialog',{attrs:{"vueController":_vm.vueController,"hoEditorFactoryId":_vm.hoEditorFactoryId,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e()],1)}
|
|
225610
|
+
var ControlModalvue_type_template_id_35544190_staticRenderFns = []
|
|
225094
225611
|
|
|
225095
225612
|
|
|
225096
225613
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/selectDialog/SelectDialog.vue?vue&type=template&id=3b6d4c1e&scoped=true&
|
|
@@ -228376,9 +228893,9 @@ var Delimiter_component = normalizeComponent(
|
|
|
228376
228893
|
;// CONCATENATED MODULE: ./src/components/controls/delimiter/index.ts
|
|
228377
228894
|
|
|
228378
228895
|
/* harmony default export */ var delimiter = (delimiter_Delimiter);
|
|
228379
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/sign/Sign.vue?vue&type=template&id=
|
|
228380
|
-
var
|
|
228381
|
-
var
|
|
228896
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/sign/Sign.vue?vue&type=template&id=6c042af0&
|
|
228897
|
+
var Signvue_type_template_id_6c042af0_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.animationClassNames},[_c('header',{staticClass:"modal-title"},[_c('span',[_vm._v("签名")]),_c('i',{staticClass:"el-icon-close modal-title-close",on:{"click":_vm.handleClose}})]),_c('section',{staticClass:"modal-content",staticStyle:{"paDDing":"20px"}},[_c('ul',{staticClass:"control-list"},[_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label"},[_vm._v("签名名称")]),_c('el-input',{staticStyle:{"width":"120px","display":"flex"},attrs:{"size":"mini"},model:{value:(_vm.name),callback:function ($$v) {_vm.name=$$v},expression:"name"}})],1),_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label"}),_c('el-radio',{attrs:{"label":0},model:{value:(_vm.signType),callback:function ($$v) {_vm.signType=$$v},expression:"signType"}},[_vm._v("常规签名")]),_c('el-radio',{attrs:{"label":1},model:{value:(_vm.signType),callback:function ($$v) {_vm.signType=$$v},expression:"signType"}},[_vm._v("自定义签名")])],1),(_vm.signType === 1)?_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label"},[_vm._v("签名格式")]),_c('el-select',{attrs:{"size":"mini","placeholder":"请选择"},model:{value:(_vm.signFormat),callback:function ($$v) {_vm.signFormat=$$v},expression:"signFormat"}},[_c('el-option',{attrs:{"label":"<医师姓名>","value":"<医师姓名>"}}),_c('el-option',{attrs:{"label":"<医师姓名>(<医师职称>)","value":"<医师姓名>(<医师职称>)"}}),_c('el-option',{attrs:{"label":"<医师姓名>:<医师职称>","value":"<医师姓名>:<医师职称>"}}),_c('el-option',{attrs:{"label":"<医师姓名>:<医师职称>\\n<签名时间>","value":"<医师姓名>:<医师职称>\\n<签名时间>"}}),_vm._l((_vm.customSignFormatList),function(format){return _c('el-option',{key:format.label,attrs:{"label":format.label,"value":format.value}})})],2)],1):_vm._e(),(_vm.signType === 1)?_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label"},[_vm._v("签名时间格式")]),_c('el-select',{attrs:{"size":"mini","placeholder":"请选择"},model:{value:(_vm.signTimeFormat),callback:function ($$v) {_vm.signTimeFormat=$$v},expression:"signTimeFormat"}},[_c('el-option',{attrs:{"label":"yyyy-MM-DD HH:mm:ss","value":"yyyy-MM-DD HH:mm:ss"}}),_c('el-option',{attrs:{"label":"yyyy-MM-DD HH:mm","value":"yyyy-MM-DD HH:mm"}}),_c('el-option',{attrs:{"label":"yyyy/MM/DD HH:mm:ss","value":"yyyy/MM/DD HH:mm:ss"}}),_c('el-option',{attrs:{"label":"yyyy/MM/DD HH:mm","value":"yyyy/MM/DD HH:mm"}}),_c('el-option',{attrs:{"label":"yyyy年MM月DD日 HH时mm分ss秒","value":"yyyy年MM月DD日 HH时mm分ss秒"}}),_c('el-option',{attrs:{"label":"yyyy年MM月DD日 HH时mm分","value":"yyyy年MM月DD日 HH时mm分"}})],1)],1):_vm._e(),(_vm.signType === 1)?_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label"},[_vm._v("签名连接方式")]),_c('el-select',{attrs:{"size":"mini","placeholder":"请选择"},model:{value:(_vm.connectMode),callback:function ($$v) {_vm.connectMode=$$v},expression:"connectMode"}},[_c('el-option',{attrs:{"label":"/","value":"/"}}),_c('el-option',{attrs:{"label":"换行","value":"换行"}}),_c('el-option',{attrs:{"label":"、","value":"、"}}),_c('el-option',{attrs:{"label":",","value":","}})],1)],1):_vm._e(),(_vm.signType === 1)?_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label"}),_c('el-checkbox',{model:{value:(_vm.isFront),callback:function ($$v) {_vm.isFront=$$v},expression:"isFront"}},[_vm._v("连接符前置")]),_c('el-tooltip',{attrs:{"placement":"right","effect":"dark"}},[_c('div',{attrs:{"slot":"content"},slot:"content"},[_vm._v("不勾选参数: 医师签名 / "),_c('br'),_vm._v(" 勾选参数: / 医师签名 ")]),_c('i',{staticClass:"el-icon-info",staticStyle:{"font-size":"18px","margin-left":"10px"}})])],1):_vm._e(),(_vm.signType === 1)?_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label"}),_c('el-checkbox',{model:{value:(_vm.allowEditSignTime),callback:function ($$v) {_vm.allowEditSignTime=$$v},expression:"allowEditSignTime"}},[_vm._v("允许修改签名时间")])],1):_vm._e()]),(_vm.signType === 1)?_c('div',{staticClass:"section-right"},[_c('div',{staticClass:"custom-format-tool-box"},[_c('ul',{staticClass:"custom-format-tool"},[_c('li',[_c('el-button',{attrs:{"size":"small","plain":""},on:{"click":function($event){_vm.customFormatContent += '<医师姓名>'}}},[_vm._v("医师姓名")]),_c('i',{staticClass:"el-icon-circle-plus"})],1),_c('li',[_c('el-button',{attrs:{"size":"small","plain":""},on:{"click":function($event){_vm.customFormatContent += '<医师工号>'}}},[_vm._v("医师工号")]),_c('i',{staticClass:"el-icon-circle-plus"})],1),_c('li',[_c('el-button',{attrs:{"size":"small","plain":""},on:{"click":function($event){_vm.customFormatContent += '<医师职称>'}}},[_vm._v("医师职称")]),_c('i',{staticClass:"el-icon-circle-plus"})],1),_c('li',[_c('el-button',{attrs:{"size":"small","plain":""},on:{"click":function($event){_vm.customFormatContent += '<签名时间>'}}},[_vm._v("签名时间")]),_c('i',{staticClass:"el-icon-circle-plus"})],1)]),_c('el-input',{attrs:{"type":"textarea","placeholder":"请输入内容"},model:{value:(_vm.customFormatContent),callback:function ($$v) {_vm.customFormatContent=$$v},expression:"customFormatContent"}})],1),_c('p',[_vm._v("提示:")]),_c('p',[_vm._v("1. 尖括号内的内容用来替换, 不能修改")]),_c('p',[_vm._v("2. 尖括号外的内容处理格式,可以编辑")]),_c('p',[_vm._v("2. 回车键可以自动换行,或者手动插入换行符\\n")]),_c('div',{staticClass:"custom-format-tool-btn"},[_c('el-button',{attrs:{"size":"small","type":"primary"},on:{"click":_vm.createSignFormat}},[_vm._v("添加自定义签名格式")])],1)]):_vm._e()]),_c('footer',{staticClass:"ho-modal-footer"},[_c('el-button',{attrs:{"size":"small","type":"primary"},on:{"click":_vm.insertSign}},[_vm._v("确定")]),_c('el-button',{staticStyle:{"margin-left":"30px"},attrs:{"size":"small"},on:{"click":_vm.handleClose}},[_vm._v("取消")])],1)])}
|
|
228898
|
+
var Signvue_type_template_id_6c042af0_staticRenderFns = []
|
|
228382
228899
|
|
|
228383
228900
|
|
|
228384
228901
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-84[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/sign/Sign.vue?vue&type=script&lang=ts&
|
|
@@ -228525,8 +229042,8 @@ Sign = __decorate([vue_class_component_esm({
|
|
|
228525
229042
|
|
|
228526
229043
|
var Sign_component = normalizeComponent(
|
|
228527
229044
|
sign_Signvue_type_script_lang_ts_,
|
|
228528
|
-
|
|
228529
|
-
|
|
229045
|
+
Signvue_type_template_id_6c042af0_render,
|
|
229046
|
+
Signvue_type_template_id_6c042af0_staticRenderFns,
|
|
228530
229047
|
false,
|
|
228531
229048
|
null,
|
|
228532
229049
|
null,
|
|
@@ -228901,9 +229418,339 @@ var UploadImageDialog_component = normalizeComponent(
|
|
|
228901
229418
|
)
|
|
228902
229419
|
|
|
228903
229420
|
/* harmony default export */ var upload_UploadImageDialog = (UploadImageDialog_component.exports);
|
|
229421
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/upload/CanvasImageDialog.vue?vue&type=template&id=6832ea7e&scoped=true&
|
|
229422
|
+
var CanvasImageDialogvue_type_template_id_6832ea7e_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"canvas-image",class:_vm.animationClassNames,style:({ width: _vm.canvasWidth + 250 + 'px', height: _vm.canvasHeight + 150 + 'px' })},[_c('header',{staticClass:"modal-title"},[_c('span',[_vm._v("编辑图片")]),_c('i',{staticClass:"el-icon-close modal-title-close",on:{"click":_vm.handleClose}})]),_c('section',{staticClass:"modal-content",attrs:{"id":"loon_canvas_editor"}},[_c('div',{style:({ width: _vm.canvasWidth + 'px', height: _vm.canvasHeight + 'px' }),attrs:{"id":"loon_canvas_editor_box"}},[_c('canvas',{style:({ width: _vm.canvasWidth + 'px', height: _vm.canvasHeight + 'px' }),attrs:{"id":"image_canvas","width":_vm.canvasWidth,"height":_vm.canvasHeight}}),(_vm.tool === 0 && _vm.textAreaStyle.width)?_c('textarea',{ref:"textCanvas",style:(_vm.textAreaStyle),attrs:{"id":"text_canvas"},on:{"blur":function($event){return _vm.drawText()}}}):_vm._e()])]),_c('footer',{staticClass:"ho-modal-footer"},[_c('el-button',{attrs:{"type":_vm.tool === 0 ? 'primary' : '',"size":"small"},on:{"click":function($event){_vm.tool = 0}}},[_vm._v("文字")]),_c('el-button',{attrs:{"type":_vm.tool === 1 ? 'primary' : '',"size":"small"},on:{"click":function($event){_vm.tool = 1}}},[_vm._v("画笔")]),_c('el-button',{attrs:{"size":"small"},on:{"click":function($event){return _vm.canvasUndo()}}},[_vm._v("撤销")]),_c('el-button',{attrs:{"size":"small"},on:{"click":function($event){return _vm.canvasRedo()}}},[_vm._v("恢复")]),_c('el-button',{staticStyle:{"margin-left":"30px"},attrs:{"size":"small","loading":_vm.uploadLoading,"type":"primary"},on:{"click":_vm.sure}},[_vm._v("保存")]),_c('el-button',{attrs:{"size":"small"},on:{"click":_vm.handleClose}},[_vm._v("取消")])],1)])}
|
|
229423
|
+
var CanvasImageDialogvue_type_template_id_6832ea7e_scoped_true_staticRenderFns = []
|
|
229424
|
+
|
|
229425
|
+
|
|
229426
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/upload/CanvasImageDialog.vue?vue&type=script&lang=js&
|
|
229427
|
+
|
|
229428
|
+
|
|
229429
|
+
|
|
229430
|
+
//
|
|
229431
|
+
//
|
|
229432
|
+
//
|
|
229433
|
+
//
|
|
229434
|
+
//
|
|
229435
|
+
//
|
|
229436
|
+
//
|
|
229437
|
+
//
|
|
229438
|
+
//
|
|
229439
|
+
//
|
|
229440
|
+
//
|
|
229441
|
+
//
|
|
229442
|
+
//
|
|
229443
|
+
//
|
|
229444
|
+
//
|
|
229445
|
+
//
|
|
229446
|
+
//
|
|
229447
|
+
//
|
|
229448
|
+
//
|
|
229449
|
+
//
|
|
229450
|
+
//
|
|
229451
|
+
//
|
|
229452
|
+
//
|
|
229453
|
+
//
|
|
229454
|
+
|
|
229455
|
+
|
|
229456
|
+
/* harmony default export */ var CanvasImageDialogvue_type_script_lang_js_ = ({
|
|
229457
|
+
name: 'canvasImageDialog',
|
|
229458
|
+
props: {
|
|
229459
|
+
hoEditorFactoryId: {
|
|
229460
|
+
type: String,
|
|
229461
|
+
required: true
|
|
229462
|
+
},
|
|
229463
|
+
vueController: {
|
|
229464
|
+
type: Object,
|
|
229465
|
+
required: true
|
|
229466
|
+
}
|
|
229467
|
+
},
|
|
229468
|
+
data: function data() {
|
|
229469
|
+
return {
|
|
229470
|
+
canvasWidth: 500,
|
|
229471
|
+
canvasHeight: 400,
|
|
229472
|
+
animationClassNames: 'control-modal-contents image-modal animation-in',
|
|
229473
|
+
uploadLoading: false,
|
|
229474
|
+
eraserEnabled: false,
|
|
229475
|
+
activeBgColor: '#fff',
|
|
229476
|
+
ifPop: false,
|
|
229477
|
+
lWidth: 2,
|
|
229478
|
+
opacity: 1,
|
|
229479
|
+
strokeColor: '#FF0000',
|
|
229480
|
+
radius: 5,
|
|
229481
|
+
canvasHistory: [],
|
|
229482
|
+
step: -1,
|
|
229483
|
+
canvas: null,
|
|
229484
|
+
textarea: null,
|
|
229485
|
+
canvasArea: null,
|
|
229486
|
+
context: null,
|
|
229487
|
+
painting: false,
|
|
229488
|
+
// 定义一个变量初始化画笔状态
|
|
229489
|
+
startPoint: {
|
|
229490
|
+
x: undefined,
|
|
229491
|
+
y: undefined
|
|
229492
|
+
},
|
|
229493
|
+
// 记录画笔最后一次的位置
|
|
229494
|
+
tool: 1,
|
|
229495
|
+
textAreaStyle: {}
|
|
229496
|
+
};
|
|
229497
|
+
},
|
|
229498
|
+
watch: {
|
|
229499
|
+
tool: function tool() {
|
|
229500
|
+
if (this.tool === 0) {
|
|
229501
|
+
this.canvas.removeEventListener('mousemove', this.move);
|
|
229502
|
+
} else if (this.tool === 1) {
|
|
229503
|
+
this.canvas.addEventListener('mousemove', this.move);
|
|
229504
|
+
}
|
|
229505
|
+
},
|
|
229506
|
+
canvasHistory: function canvasHistory() {}
|
|
229507
|
+
},
|
|
229508
|
+
mounted: function mounted() {
|
|
229509
|
+
var _this = this;
|
|
229510
|
+
|
|
229511
|
+
this.canvas = document.querySelector('#image_canvas');
|
|
229512
|
+
this.canvasArea = document.querySelector('#loon_canvas_editor_box');
|
|
229513
|
+
this.context = this.canvas.getContext('2d');
|
|
229514
|
+
this.listenDrawLine();
|
|
229515
|
+
var updateNode = this.getImageNode();
|
|
229516
|
+
var image = new Image();
|
|
229517
|
+
image.src = updateNode.imageDataBase64String;
|
|
229518
|
+
|
|
229519
|
+
image.onload = function () {
|
|
229520
|
+
_this.canvasWidth = image.naturalWidth;
|
|
229521
|
+
_this.canvasHeight = image.naturalHeight;
|
|
229522
|
+
|
|
229523
|
+
_this.context.clearRect(0, 0, _this.canvasWidth, _this.canvasHeight);
|
|
229524
|
+
|
|
229525
|
+
setTimeout(function () {
|
|
229526
|
+
_this.context.drawImage(image, 0, 0, _this.canvasWidth, _this.canvasHeight);
|
|
229527
|
+
|
|
229528
|
+
_this.canvasDraw();
|
|
229529
|
+
}, 0);
|
|
229530
|
+
};
|
|
229531
|
+
},
|
|
229532
|
+
methods: {
|
|
229533
|
+
getImageNode: function getImageNode() {
|
|
229534
|
+
var value;
|
|
229535
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.hoEditorFactoryId);
|
|
229536
|
+
var curOnDragNode = hoEditorFactory.docTree.curOnDragNode;
|
|
229537
|
+
|
|
229538
|
+
if (curOnDragNode instanceof ImageNode/* ImageNode */.H) {
|
|
229539
|
+
value = curOnDragNode;
|
|
229540
|
+
}
|
|
229541
|
+
|
|
229542
|
+
return value;
|
|
229543
|
+
},
|
|
229544
|
+
listenDrawLine: function listenDrawLine() {
|
|
229545
|
+
this.canvas.addEventListener('mousedown', this.down);
|
|
229546
|
+
this.canvas.addEventListener('mousemove', this.move);
|
|
229547
|
+
this.canvasArea.addEventListener('mouseup', this.up);
|
|
229548
|
+
},
|
|
229549
|
+
clearListenDrawLine: function clearListenDrawLine() {
|
|
229550
|
+
this.canvas.removeEventListener('mousedown', this.down);
|
|
229551
|
+
this.canvas.removeEventListener('mousemove', this.move);
|
|
229552
|
+
this.canvasArea.removeEventListener('mouseup', this.up);
|
|
229553
|
+
},
|
|
229554
|
+
changeTool: function changeTool(tool) {
|
|
229555
|
+
this.tool = tool;
|
|
229556
|
+
},
|
|
229557
|
+
down: function down(e) {
|
|
229558
|
+
var _this2 = this;
|
|
229559
|
+
|
|
229560
|
+
this.painting = true;
|
|
229561
|
+
this.startPoint = {
|
|
229562
|
+
x: e.offsetX,
|
|
229563
|
+
y: e.offsetY
|
|
229564
|
+
};
|
|
229565
|
+
|
|
229566
|
+
if (this.tool === 0) {
|
|
229567
|
+
this.textAreaStyle = {
|
|
229568
|
+
width: '100px',
|
|
229569
|
+
height: '27px',
|
|
229570
|
+
left: e.offsetX + 'px',
|
|
229571
|
+
top: e.offsetY + 'px'
|
|
229572
|
+
};
|
|
229573
|
+
setTimeout(function () {
|
|
229574
|
+
if (_this2.$refs.textCanvas) {
|
|
229575
|
+
_this2.$refs.textCanvas.focus();
|
|
229576
|
+
}
|
|
229577
|
+
}, 0);
|
|
229578
|
+
}
|
|
229579
|
+
|
|
229580
|
+
e.stopPropagation();
|
|
229581
|
+
e.preventDefault();
|
|
229582
|
+
},
|
|
229583
|
+
move: function move(e) {
|
|
229584
|
+
switch (this.tool) {
|
|
229585
|
+
case 0:
|
|
229586
|
+
{
|
|
229587
|
+
this.drawText(e);
|
|
229588
|
+
break;
|
|
229589
|
+
}
|
|
229590
|
+
|
|
229591
|
+
case 1:
|
|
229592
|
+
{
|
|
229593
|
+
this.drawLine(e);
|
|
229594
|
+
break;
|
|
229595
|
+
}
|
|
229596
|
+
}
|
|
229597
|
+
},
|
|
229598
|
+
up: function up(e) {
|
|
229599
|
+
if (this.tool === 0) {
|
|
229600
|
+
this.canvas.removeEventListener('mousemove', this.move);
|
|
229601
|
+
}
|
|
229602
|
+
|
|
229603
|
+
this.painting = false;
|
|
229604
|
+
|
|
229605
|
+
if (this.tool === 1) {
|
|
229606
|
+
this.canvasDraw();
|
|
229607
|
+
}
|
|
229608
|
+
|
|
229609
|
+
e.stopPropagation();
|
|
229610
|
+
e.preventDefault();
|
|
229611
|
+
},
|
|
229612
|
+
changeText: function changeText(e) {
|
|
229613
|
+
if (e.offsetX - this.startPoint.x > 0) {
|
|
229614
|
+
this.textAreaStyle.width = e.offsetX - this.startPoint.x + 'px';
|
|
229615
|
+
} else {
|
|
229616
|
+
this.textAreaStyle.width = -(e.offsetX - this.startPoint.x) + 'px';
|
|
229617
|
+
this.textAreaStyle.left = e.offsetX + 'px';
|
|
229618
|
+
}
|
|
229619
|
+
|
|
229620
|
+
if (e.offsetY - this.startPoint.y > 0) {
|
|
229621
|
+
this.textAreaStyle.height = e.offsetY - this.startPoint.y + 'px';
|
|
229622
|
+
} else {
|
|
229623
|
+
this.textAreaStyle.height = -(e.offsetY - this.startPoint.y) + 'px';
|
|
229624
|
+
this.textAreaStyle.top = e.offsetY + 'px';
|
|
229625
|
+
}
|
|
229626
|
+
},
|
|
229627
|
+
drawText: function drawText() {
|
|
229628
|
+
if (this.$refs.textCanvas && this.$refs.textCanvas.value) {
|
|
229629
|
+
this.context.font = '16px 宋体';
|
|
229630
|
+
this.context.fillStyle = '#F00';
|
|
229631
|
+
this.context.fillText(this.$refs.textCanvas.value, this.textAreaStyle.left.split('px')[0], Number(this.textAreaStyle.top.split('px')[0]) + 16);
|
|
229632
|
+
this.canvasDraw();
|
|
229633
|
+
this.$refs.textCanvas.value = '';
|
|
229634
|
+
this.textAreaStyle = {};
|
|
229635
|
+
}
|
|
229636
|
+
},
|
|
229637
|
+
drawLine: function drawLine(e) {
|
|
229638
|
+
if (!this.painting) return;
|
|
229639
|
+
this.context.beginPath();
|
|
229640
|
+
this.context.lineWidth = this.lWidth;
|
|
229641
|
+
this.context.strokeStyle = this.strokeColor; // 设置线条末端样式。
|
|
229642
|
+
|
|
229643
|
+
this.context.lineCap = 'round'; // 设定线条与线条间接合处的样式
|
|
229644
|
+
|
|
229645
|
+
this.context.lineJoin = 'round';
|
|
229646
|
+
this.context.moveTo(this.startPoint.x, this.startPoint.y);
|
|
229647
|
+
this.context.lineTo(e.offsetX, e.offsetY);
|
|
229648
|
+
this.context.stroke();
|
|
229649
|
+
this.context.closePath();
|
|
229650
|
+
this.startPoint = {
|
|
229651
|
+
x: e.offsetX,
|
|
229652
|
+
y: e.offsetY
|
|
229653
|
+
};
|
|
229654
|
+
e.stopPropagation();
|
|
229655
|
+
e.preventDefault();
|
|
229656
|
+
},
|
|
229657
|
+
// 绘制方法
|
|
229658
|
+
canvasDraw: function canvasDraw() {
|
|
229659
|
+
this.step++;
|
|
229660
|
+
|
|
229661
|
+
if (this.step < this.canvasHistory.length) {
|
|
229662
|
+
this.canvasHistory.length = this.step; // 截断数组
|
|
229663
|
+
}
|
|
229664
|
+
|
|
229665
|
+
var quality = 1;
|
|
229666
|
+
var base64 = this.canvas.toDataURL('image/jpeg', quality); //压缩语句
|
|
229667
|
+
// 如想确保图片压缩到自己想要的尺寸,如要求在100kb以下,请加以下语句,quality初始值根据情况自定
|
|
229668
|
+
|
|
229669
|
+
while (base64.length / 1024 > 100) {
|
|
229670
|
+
quality -= 0.01;
|
|
229671
|
+
base64 = this.canvas.toDataURL('image/jpeg', quality);
|
|
229672
|
+
} // 添加新的绘制到历史记录
|
|
229673
|
+
|
|
229674
|
+
|
|
229675
|
+
this.canvasHistory.push(this.canvas.toDataURL());
|
|
229676
|
+
},
|
|
229677
|
+
// 撤销方法
|
|
229678
|
+
canvasUndo: function canvasUndo() {
|
|
229679
|
+
var _this3 = this;
|
|
229680
|
+
|
|
229681
|
+
if (this.step > 0) {
|
|
229682
|
+
this.step--;
|
|
229683
|
+
var canvasPic = new Image();
|
|
229684
|
+
canvasPic.src = this.canvasHistory[this.step];
|
|
229685
|
+
this.context.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
|
|
229686
|
+
|
|
229687
|
+
canvasPic.onload = function () {
|
|
229688
|
+
_this3.context.drawImage(canvasPic, 0, 0);
|
|
229689
|
+
};
|
|
229690
|
+
}
|
|
229691
|
+
},
|
|
229692
|
+
// 恢复方法
|
|
229693
|
+
canvasRedo: function canvasRedo() {
|
|
229694
|
+
var _this4 = this;
|
|
229695
|
+
|
|
229696
|
+
if (this.step < this.canvasHistory.length - 1) {
|
|
229697
|
+
this.step++;
|
|
229698
|
+
var canvasPic = new Image();
|
|
229699
|
+
canvasPic.src = this.canvasHistory[this.step];
|
|
229700
|
+
this.context.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
|
|
229701
|
+
|
|
229702
|
+
canvasPic.onload = function () {
|
|
229703
|
+
_this4.context.drawImage(canvasPic, 0, 0);
|
|
229704
|
+
};
|
|
229705
|
+
}
|
|
229706
|
+
},
|
|
229707
|
+
handleClose: function handleClose() {
|
|
229708
|
+
this.clearListenDrawLine();
|
|
229709
|
+
this.$emit('closed');
|
|
229710
|
+
},
|
|
229711
|
+
sure: function sure() {
|
|
229712
|
+
var updateNode = this.getImageNode();
|
|
229713
|
+
var src = this.canvasHistory[this.canvasHistory.length - 1];
|
|
229714
|
+
|
|
229715
|
+
if (updateNode && src) {
|
|
229716
|
+
this.vueController.updateImageSrc(updateNode, src);
|
|
229717
|
+
this.handleClose();
|
|
229718
|
+
}
|
|
229719
|
+
}
|
|
229720
|
+
}
|
|
229721
|
+
});
|
|
229722
|
+
;// CONCATENATED MODULE: ./src/components/controls/upload/CanvasImageDialog.vue?vue&type=script&lang=js&
|
|
229723
|
+
/* harmony default export */ var upload_CanvasImageDialogvue_type_script_lang_js_ = (CanvasImageDialogvue_type_script_lang_js_);
|
|
229724
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-65[0].rules[0].use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65[0].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65[0].rules[0].use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/upload/CanvasImageDialog.vue?vue&type=style&index=0&id=6832ea7e&lang=scss&scoped=true&
|
|
229725
|
+
// extracted by mini-css-extract-plugin
|
|
229726
|
+
|
|
229727
|
+
;// CONCATENATED MODULE: ./src/components/controls/upload/CanvasImageDialog.vue?vue&type=style&index=0&id=6832ea7e&lang=scss&scoped=true&
|
|
229728
|
+
|
|
229729
|
+
;// CONCATENATED MODULE: ./src/components/controls/upload/CanvasImageDialog.vue
|
|
229730
|
+
|
|
229731
|
+
|
|
229732
|
+
|
|
229733
|
+
;
|
|
229734
|
+
|
|
229735
|
+
|
|
229736
|
+
/* normalize component */
|
|
229737
|
+
|
|
229738
|
+
var CanvasImageDialog_component = normalizeComponent(
|
|
229739
|
+
upload_CanvasImageDialogvue_type_script_lang_js_,
|
|
229740
|
+
CanvasImageDialogvue_type_template_id_6832ea7e_scoped_true_render,
|
|
229741
|
+
CanvasImageDialogvue_type_template_id_6832ea7e_scoped_true_staticRenderFns,
|
|
229742
|
+
false,
|
|
229743
|
+
null,
|
|
229744
|
+
"6832ea7e",
|
|
229745
|
+
null
|
|
229746
|
+
|
|
229747
|
+
)
|
|
229748
|
+
|
|
229749
|
+
/* harmony default export */ var CanvasImageDialog = (CanvasImageDialog_component.exports);
|
|
228904
229750
|
;// CONCATENATED MODULE: ./src/components/controls/upload/index.ts
|
|
228905
229751
|
|
|
228906
|
-
|
|
229752
|
+
|
|
229753
|
+
|
|
228907
229754
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/watermark/WaterSet.vue?vue&type=template&id=58b59c58&
|
|
228908
229755
|
var WaterSetvue_type_template_id_58b59c58_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control-modal-contents water-set animation-in"},[_c('header',{staticClass:"modal-title"},[_c('span',[_vm._v("水印")]),_c('i',{staticClass:"el-icon-close modal-title-close",on:{"click":_vm.handleClose}})]),_c('section',{staticClass:"modal-content"},[_c('ul',{staticClass:"control-list"},[_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label",staticStyle:{"width":"50px"}},[_vm._v("内容")]),_c('el-input',{attrs:{"type":"text","size":"mini","clearable":"","placeholder":"文本内容","maxlength":"20","show-word-limit":""},on:{"input":_vm.codeChange},model:{value:(_vm.textContent),callback:function ($$v) {_vm.textContent=$$v},expression:"textContent"}})],1),_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label",staticStyle:{"width":"50px"}},[_vm._v("角度")]),_c('el-radio-group',{attrs:{"size":"mini"},on:{"change":_vm.codeChange},model:{value:(_vm.rotate),callback:function ($$v) {_vm.rotate=$$v},expression:"rotate"}},[_c('el-radio-button',{attrs:{"label":0}},[_vm._v("水平")]),_c('el-radio-button',{attrs:{"label":1}},[_vm._v("倾斜")])],1)],1),_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label",staticStyle:{"width":"50px"}},[_vm._v("颜色")]),_c('el-color-picker',{attrs:{"show-alpha":""},on:{"change":_vm.codeChange},model:{value:(_vm.color),callback:function ($$v) {_vm.color=$$v},expression:"color"}})],1)]),_c('div',{staticClass:"section-right"},[_c('fieldset',{staticClass:"fieldset"},[_c('legend',[_vm._v("预 览")]),_c('div',{attrs:{"id":"water"}},[_c('img',{directives:[{name:"show",rawName:"v-show",value:(_vm.waterUrl),expression:"waterUrl"}],attrs:{"src":_vm.waterUrl,"alt":"背景水印"}})])])])]),_c('footer',{staticClass:"ho-modal-footer"},[_c('el-button',{attrs:{"size":"small","type":"primary"},on:{"click":_vm.sure}},[_vm._v("确定")]),_c('el-button',{staticStyle:{"margin-left":"30px"},attrs:{"size":"small"},on:{"click":_vm.handleClose}},[_vm._v("取消")])],1)])}
|
|
228909
229756
|
var WaterSetvue_type_template_id_58b59c58_staticRenderFns = []
|
|
@@ -230688,7 +231535,8 @@ ControlModal = __decorate([vue_class_component_esm({
|
|
|
230688
231535
|
CommentDialog: commentDialog,
|
|
230689
231536
|
PageInfoes: pageInfoes,
|
|
230690
231537
|
Delimiter: delimiter,
|
|
230691
|
-
UploadImageDialog:
|
|
231538
|
+
UploadImageDialog: upload_UploadImageDialog,
|
|
231539
|
+
CanvasImageDialog: CanvasImageDialog
|
|
230692
231540
|
}
|
|
230693
231541
|
})], ControlModal);
|
|
230694
231542
|
/* harmony default export */ var ControlModalvue_type_script_lang_ts_ = (ControlModal);
|
|
@@ -230704,8 +231552,8 @@ ControlModal = __decorate([vue_class_component_esm({
|
|
|
230704
231552
|
;
|
|
230705
231553
|
var ControlModal_component = normalizeComponent(
|
|
230706
231554
|
controls_ControlModalvue_type_script_lang_ts_,
|
|
230707
|
-
|
|
230708
|
-
|
|
231555
|
+
ControlModalvue_type_template_id_35544190_render,
|
|
231556
|
+
ControlModalvue_type_template_id_35544190_staticRenderFns,
|
|
230709
231557
|
false,
|
|
230710
231558
|
null,
|
|
230711
231559
|
null,
|
|
@@ -231394,7 +232242,7 @@ var ControlMixin = /*#__PURE__*/function (_Vue) {
|
|
|
231394
232242
|
this.rightType = node.controlStyle;
|
|
231395
232243
|
this.dataSource = node.bandDataSource;
|
|
231396
232244
|
} else if (node instanceof ImageNode/* ImageNode */.H) {
|
|
231397
|
-
this.rightType = "
|
|
232245
|
+
this.rightType = "edit-image";
|
|
231398
232246
|
} else if (node instanceof LabelNode/* LabelNode */.P) {
|
|
231399
232247
|
this.rightType = "label";
|
|
231400
232248
|
} else if (node instanceof SignNode/* SignNode */.N) {
|
|
@@ -231924,14 +232772,14 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
231924
232772
|
_this.defaultDocProperty = {
|
|
231925
232773
|
version: version,
|
|
231926
232774
|
type: 0,
|
|
231927
|
-
title:
|
|
231928
|
-
docID:
|
|
231929
|
-
patientID:
|
|
231930
|
-
patientName:
|
|
231931
|
-
lastEditTime:
|
|
231932
|
-
lastEditorID:
|
|
231933
|
-
lastEditorName:
|
|
231934
|
-
currentIP:
|
|
232775
|
+
title: '',
|
|
232776
|
+
docID: '',
|
|
232777
|
+
patientID: '',
|
|
232778
|
+
patientName: '',
|
|
232779
|
+
lastEditTime: '',
|
|
232780
|
+
lastEditorID: '',
|
|
232781
|
+
lastEditorName: '',
|
|
232782
|
+
currentIP: ''
|
|
231935
232783
|
};
|
|
231936
232784
|
_this.contentIsModify = {
|
|
231937
232785
|
isModify: false
|
|
@@ -231947,7 +232795,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
231947
232795
|
}, {
|
|
231948
232796
|
key: "contentIsModifyChange",
|
|
231949
232797
|
value: function contentIsModifyChange(value) {
|
|
231950
|
-
this.$emit(
|
|
232798
|
+
this.$emit('contentIsModify', this.contentIsModify);
|
|
231951
232799
|
}
|
|
231952
232800
|
}, {
|
|
231953
232801
|
key: "editJsonChange",
|
|
@@ -231964,12 +232812,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
231964
232812
|
}, {
|
|
231965
232813
|
key: "textStyleChange",
|
|
231966
232814
|
value: function textStyleChange(val) {
|
|
231967
|
-
this.$emit(
|
|
232815
|
+
this.$emit('textStyleChange', val);
|
|
231968
232816
|
}
|
|
231969
232817
|
}, {
|
|
231970
232818
|
key: "modalStatusChange",
|
|
231971
232819
|
value: function modalStatusChange(newStr) {
|
|
231972
|
-
if (newStr[0] !==
|
|
232820
|
+
if (newStr[0] !== 'find') {
|
|
231973
232821
|
this.setControlProperty(newStr[0], newStr[1], newStr[2]);
|
|
231974
232822
|
} else {
|
|
231975
232823
|
this.controlFindType = true;
|
|
@@ -231978,20 +232826,20 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
231978
232826
|
}, {
|
|
231979
232827
|
key: "controlTypeChange",
|
|
231980
232828
|
value: function controlTypeChange(newValue, oldValue) {
|
|
231981
|
-
if (newValue ===
|
|
231982
|
-
this.$emit(
|
|
232829
|
+
if (newValue === '' && ['text', 'date', 'comment'].includes(oldValue)) {
|
|
232830
|
+
this.$emit('closeTextModal');
|
|
231983
232831
|
this.customPropertyValue = {};
|
|
231984
232832
|
}
|
|
231985
232833
|
|
|
231986
232834
|
if (['text', 'date'].includes(newValue)) {
|
|
231987
232835
|
if ((0,type/* isObject */.Kn)(this.customPropertyValue)) {
|
|
231988
|
-
this.$emit(
|
|
232836
|
+
this.$emit('openTextModal', _objectSpread2({}, this.customPropertyValue));
|
|
231989
232837
|
}
|
|
231990
232838
|
} else if (['comment'].includes(newValue)) {
|
|
231991
232839
|
var _HOEditorFactorys$ins;
|
|
231992
232840
|
|
|
231993
232841
|
var customProperty = (_HOEditorFactorys$ins = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId).vueController.getOnSelectedComment()) === null || _HOEditorFactorys$ins === void 0 ? void 0 : _HOEditorFactorys$ins.customProperty;
|
|
231994
|
-
if (customProperty) this.$emit(
|
|
232842
|
+
if (customProperty) this.$emit('openTextModal', _objectSpread2({}, customProperty));
|
|
231995
232843
|
}
|
|
231996
232844
|
}
|
|
231997
232845
|
}, {
|
|
@@ -232023,7 +232871,15 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232023
232871
|
value: function isFixedPrintToA4Change() {
|
|
232024
232872
|
var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
|
|
232025
232873
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
232026
|
-
|
|
232874
|
+
var isFixedPrintToA4 = this.isFixedPrintToA4;
|
|
232875
|
+
|
|
232876
|
+
if (isFixedPrintToA4 === true) {
|
|
232877
|
+
isFixedPrintToA4 = '1';
|
|
232878
|
+
} else if (isFixedPrintToA4 === false) {
|
|
232879
|
+
isFixedPrintToA4 = '';
|
|
232880
|
+
}
|
|
232881
|
+
|
|
232882
|
+
hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = isFixedPrintToA4);
|
|
232027
232883
|
} // 监听默认打印纸张设置变化
|
|
232028
232884
|
|
|
232029
232885
|
}, {
|
|
@@ -232067,6 +232923,13 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232067
232923
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
232068
232924
|
hoEditorFactory && (hoEditorFactory.printBlack = this.printBlack);
|
|
232069
232925
|
}
|
|
232926
|
+
}, {
|
|
232927
|
+
key: "isEnabledGlobalColorChange",
|
|
232928
|
+
value: function isEnabledGlobalColorChange() {
|
|
232929
|
+
var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
|
|
232930
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
232931
|
+
hoEditorFactory && (hoEditorFactory.isEnabledGlobalColor = this.isEnabledGlobalColor);
|
|
232932
|
+
}
|
|
232070
232933
|
}, {
|
|
232071
232934
|
key: "created",
|
|
232072
232935
|
value: function created() {
|
|
@@ -232097,7 +232960,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232097
232960
|
}); // 初始化所有文档
|
|
232098
232961
|
|
|
232099
232962
|
this.docList.forEach(function () {
|
|
232100
|
-
var id = (0,util/* generateID */.y)(
|
|
232963
|
+
var id = (0,util/* generateID */.y)('HO');
|
|
232101
232964
|
var hoEditor = new HOEditorFactory(id);
|
|
232102
232965
|
|
|
232103
232966
|
_this3.hoEditorFactoryIdList.push(id);
|
|
@@ -232106,10 +232969,18 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232106
232969
|
hoEditor.superiorSigns = (0,toConsumableArray/* default */.Z)(_this3.superiorSigns);
|
|
232107
232970
|
}
|
|
232108
232971
|
|
|
232109
|
-
|
|
232972
|
+
if (_this3.isFixedPrintToA4 === true) {
|
|
232973
|
+
hoEditor.isFixedPrintToA4 = '1';
|
|
232974
|
+
} else if (_this3.isFixedPrintToA4 === false) {
|
|
232975
|
+
hoEditor.isFixedPrintToA4 = '';
|
|
232976
|
+
} else {
|
|
232977
|
+
hoEditor.isFixedPrintToA4 = _this3.isFixedPrintToA4;
|
|
232978
|
+
}
|
|
232979
|
+
|
|
232110
232980
|
hoEditor.isUseImagePrint = _this3.isUseImagePrint;
|
|
232111
232981
|
hoEditor.isUseForm = _this3.isUseForm;
|
|
232112
232982
|
hoEditor.printBlack = _this3.printBlack;
|
|
232983
|
+
hoEditor.isEnabledGlobalColor = _this3.isEnabledGlobalColor;
|
|
232113
232984
|
hoEditor.contentIsModify = _this3.contentIsModify;
|
|
232114
232985
|
hoEditor.isCanEditHeadFoot = _this3.isCanEditHeadFoot;
|
|
232115
232986
|
hoEditor.docTree.docProperty = _this3.defaultDocProperty;
|
|
@@ -232140,17 +233011,17 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232140
233011
|
|
|
232141
233012
|
var getLabelNode = function getLabelNode() {
|
|
232142
233013
|
var labelNode = [];
|
|
232143
|
-
var isIncludes =
|
|
233014
|
+
var isIncludes = '';
|
|
232144
233015
|
var hoEditor = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(_this4.activeDocId);
|
|
232145
233016
|
var currentDomRange = hoEditor.vueController.getDomRange();
|
|
232146
233017
|
|
|
232147
233018
|
if (currentDomRange !== null && currentDomRange !== void 0 && currentDomRange.isEmpty) {
|
|
232148
233019
|
if (nodeInfoes.node() instanceof LabelNode/* LabelNode */.P) {
|
|
232149
233020
|
labelNode.push(nodeInfoes.node());
|
|
232150
|
-
isIncludes =
|
|
233021
|
+
isIncludes = 'toText';
|
|
232151
233022
|
}
|
|
232152
233023
|
} else {
|
|
232153
|
-
isIncludes =
|
|
233024
|
+
isIncludes = 'toLabel';
|
|
232154
233025
|
var startPath = currentDomRange.startPath;
|
|
232155
233026
|
var endPath = currentDomRange.endPath;
|
|
232156
233027
|
var selectNodes = DomRange/* DomRange.getSelectDomNodes */.a.getSelectDomNodes(_this4.activeDocId, startPath, endPath, true)[0];
|
|
@@ -232158,7 +233029,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232158
233029
|
if (selectNodes.length > 0) {
|
|
232159
233030
|
selectNodes.forEach(function (v) {
|
|
232160
233031
|
if (v instanceof LabelNode/* LabelNode */.P) {
|
|
232161
|
-
isIncludes =
|
|
233032
|
+
isIncludes = 'toText';
|
|
232162
233033
|
labelNode.push(v);
|
|
232163
233034
|
}
|
|
232164
233035
|
});
|
|
@@ -232197,7 +233068,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232197
233068
|
};
|
|
232198
233069
|
}
|
|
232199
233070
|
|
|
232200
|
-
this.$emit(
|
|
233071
|
+
this.$emit('rightClickEvent', nodeInfoes);
|
|
232201
233072
|
}
|
|
232202
233073
|
/**
|
|
232203
233074
|
* 初始化事件
|
|
@@ -232239,7 +233110,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232239
233110
|
}, {
|
|
232240
233111
|
key: "insertComments",
|
|
232241
233112
|
value: function insertComments(content) {
|
|
232242
|
-
this.$emit(
|
|
233113
|
+
this.$emit('insertComments', content);
|
|
232243
233114
|
}
|
|
232244
233115
|
/**
|
|
232245
233116
|
* 双击事件
|
|
@@ -232248,7 +233119,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232248
233119
|
}, {
|
|
232249
233120
|
key: "dblNodeClick",
|
|
232250
233121
|
value: function dblNodeClick(node) {
|
|
232251
|
-
this.$emit(
|
|
233122
|
+
this.$emit('dblClickEvent', node);
|
|
232252
233123
|
} // 设置字体
|
|
232253
233124
|
|
|
232254
233125
|
}, {
|
|
@@ -232270,7 +233141,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232270
233141
|
this.activeDocId = activeDocId;
|
|
232271
233142
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId);
|
|
232272
233143
|
hoEditorFactory.hoLocalStorage.initHoWebSql();
|
|
232273
|
-
this.$emit(
|
|
233144
|
+
this.$emit('docReady', {
|
|
232274
233145
|
vueController: hoEditorFactory.vueController,
|
|
232275
233146
|
baseController: hoEditorFactory.baseController,
|
|
232276
233147
|
domController: hoEditorFactory.domController,
|
|
@@ -232301,7 +233172,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232301
233172
|
var property = _objectSpread2({}, pageProperty); // 字体
|
|
232302
233173
|
|
|
232303
233174
|
|
|
232304
|
-
property.fontFormat = property.fontFormat ? (_property$fontFormat = property.fontFormat) === null || _property$fontFormat === void 0 ? void 0 : _property$fontFormat.match(/[\u4e00-\u9fa5]/g).join(
|
|
233175
|
+
property.fontFormat = property.fontFormat ? (_property$fontFormat = property.fontFormat) === null || _property$fontFormat === void 0 ? void 0 : _property$fontFormat.match(/[\u4e00-\u9fa5]/g).join('') : '宋体'; // 字号
|
|
232305
233176
|
|
|
232306
233177
|
if (isNaN(Number(property.fontSize))) {
|
|
232307
233178
|
json_font_namespaceObject.CH.forEach(function (v) {
|
|
@@ -232328,12 +233199,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232328
233199
|
|
|
232329
233200
|
if (pageProperty.elementBackColor) {
|
|
232330
233201
|
hoEditorFactory.vueController.setReviewLevelColor({
|
|
232331
|
-
reviewLev1Color:
|
|
232332
|
-
reviewLev2Color:
|
|
232333
|
-
reviewLev3Color:
|
|
232334
|
-
fieldColor:
|
|
232335
|
-
dateTimeColor:
|
|
232336
|
-
downListColor:
|
|
233202
|
+
reviewLev1Color: '#F19191',
|
|
233203
|
+
reviewLev2Color: '#FFFFFF',
|
|
233204
|
+
reviewLev3Color: '#FFFFFF',
|
|
233205
|
+
fieldColor: '#DFFFFF',
|
|
233206
|
+
dateTimeColor: '#FBFAD0',
|
|
233207
|
+
downListColor: '#D2ECB1'
|
|
232337
233208
|
});
|
|
232338
233209
|
} // 复制粘贴基准值
|
|
232339
233210
|
|
|
@@ -232404,7 +233275,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232404
233275
|
}, {
|
|
232405
233276
|
key: "closeControlModal",
|
|
232406
233277
|
value: function closeControlModal() {
|
|
232407
|
-
this.setControlProperty(
|
|
233278
|
+
this.setControlProperty('', 'add', '');
|
|
232408
233279
|
}
|
|
232409
233280
|
/**
|
|
232410
233281
|
* 非文档区域右键事件
|
|
@@ -232413,7 +233284,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232413
233284
|
}, {
|
|
232414
233285
|
key: "blankAreaRightClick",
|
|
232415
233286
|
value: function blankAreaRightClick(e) {
|
|
232416
|
-
if (e.target instanceof HTMLDivElement && e.target.className ===
|
|
233287
|
+
if (e.target instanceof HTMLDivElement && e.target.className === 'editor') {}
|
|
232417
233288
|
}
|
|
232418
233289
|
}]);
|
|
232419
233290
|
|
|
@@ -232451,7 +233322,7 @@ __decorate([Prop({
|
|
|
232451
233322
|
})], HoDocs.prototype, "isUseTipText", void 0);
|
|
232452
233323
|
|
|
232453
233324
|
__decorate([Prop({
|
|
232454
|
-
default:
|
|
233325
|
+
default: ''
|
|
232455
233326
|
})], HoDocs.prototype, "isFixedPrintToA4", void 0);
|
|
232456
233327
|
|
|
232457
233328
|
__decorate([Prop({
|
|
@@ -232466,54 +233337,60 @@ __decorate([Prop({
|
|
|
232466
233337
|
default: true
|
|
232467
233338
|
})], HoDocs.prototype, "printBlack", void 0);
|
|
232468
233339
|
|
|
232469
|
-
__decorate([
|
|
233340
|
+
__decorate([Prop({
|
|
233341
|
+
default: false
|
|
233342
|
+
})], HoDocs.prototype, "isEnabledGlobalColor", void 0);
|
|
233343
|
+
|
|
233344
|
+
__decorate([Watch('contentIsModify', {
|
|
232470
233345
|
deep: true
|
|
232471
233346
|
})], HoDocs.prototype, "contentIsModifyChange", null);
|
|
232472
233347
|
|
|
232473
|
-
__decorate([Watch(
|
|
233348
|
+
__decorate([Watch('editJson')], HoDocs.prototype, "editJsonChange", null);
|
|
232474
233349
|
|
|
232475
233350
|
__decorate([Provide()], HoDocs.prototype, "getCustomProperty", null);
|
|
232476
233351
|
|
|
232477
|
-
__decorate([Watch(
|
|
233352
|
+
__decorate([Watch('textStyle', {
|
|
232478
233353
|
deep: true
|
|
232479
233354
|
})], HoDocs.prototype, "textStyleChange", null);
|
|
232480
233355
|
|
|
232481
|
-
__decorate([Watch(
|
|
233356
|
+
__decorate([Watch('modalStatus', {
|
|
232482
233357
|
deep: true
|
|
232483
233358
|
})], HoDocs.prototype, "modalStatusChange", null);
|
|
232484
233359
|
|
|
232485
|
-
__decorate([Watch(
|
|
233360
|
+
__decorate([Watch('controlType', {
|
|
232486
233361
|
deep: true
|
|
232487
233362
|
})], HoDocs.prototype, "controlTypeChange", null);
|
|
232488
233363
|
|
|
232489
|
-
__decorate([Watch(
|
|
233364
|
+
__decorate([Watch('pageProperty', {
|
|
232490
233365
|
deep: true
|
|
232491
233366
|
})], HoDocs.prototype, "pagePropertyChange", null);
|
|
232492
233367
|
|
|
232493
|
-
__decorate([Watch(
|
|
233368
|
+
__decorate([Watch('docProperty', {
|
|
232494
233369
|
deep: true
|
|
232495
233370
|
})], HoDocs.prototype, "docPropertyChange", null);
|
|
232496
233371
|
|
|
232497
|
-
__decorate([Watch(
|
|
233372
|
+
__decorate([Watch('isFixedPrintToA4', {
|
|
232498
233373
|
deep: true
|
|
232499
233374
|
})], HoDocs.prototype, "isFixedPrintToA4Change", null);
|
|
232500
233375
|
|
|
232501
|
-
__decorate([Watch(
|
|
233376
|
+
__decorate([Watch('isUseImagePrint', {
|
|
232502
233377
|
deep: true
|
|
232503
233378
|
})], HoDocs.prototype, "isUseImagePrintChange", null);
|
|
232504
233379
|
|
|
232505
|
-
__decorate([Watch(
|
|
233380
|
+
__decorate([Watch('isUseForm', {
|
|
232506
233381
|
deep: true
|
|
232507
233382
|
})], HoDocs.prototype, "isUseFormChange", null);
|
|
232508
233383
|
|
|
232509
|
-
__decorate([Watch(
|
|
233384
|
+
__decorate([Watch('superiorSigns')], HoDocs.prototype, "superiorSignsChange", null);
|
|
232510
233385
|
|
|
232511
|
-
__decorate([Watch(
|
|
233386
|
+
__decorate([Watch('isCanEditHeadFoot')], HoDocs.prototype, "isCanEditHeadFootChange", null);
|
|
232512
233387
|
|
|
232513
|
-
__decorate([Watch(
|
|
233388
|
+
__decorate([Watch('printBlack')], HoDocs.prototype, "printBlackChange", null);
|
|
233389
|
+
|
|
233390
|
+
__decorate([Watch('isEnabledGlobalColor')], HoDocs.prototype, "isEnabledGlobalColorChange", null);
|
|
232514
233391
|
|
|
232515
233392
|
HoDocs = __decorate([vue_class_component_esm({
|
|
232516
|
-
name:
|
|
233393
|
+
name: 'HoDocs',
|
|
232517
233394
|
components: {
|
|
232518
233395
|
HoDoc: components_HoDoc,
|
|
232519
233396
|
HoFooter: components_HoFooter,
|
|
@@ -236648,9 +237525,9 @@ var ToolTablevue_type_template_id_194f516e_render = function () {var _vm=this;va
|
|
|
236648
237525
|
var ToolTablevue_type_template_id_194f516e_staticRenderFns = []
|
|
236649
237526
|
|
|
236650
237527
|
|
|
236651
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/toolbar/insert/HoTableFeatures.vue?vue&type=template&id=
|
|
236652
|
-
var HoTableFeaturesvue_type_template_id_2fd610cb_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',{ref:"hoTableFeatures",staticClass:"ho-table-features"},[_c('el-dialog',{attrs:{"width":"520px","top":"20%","center":"","append-to-body":"","close-on-click-modal":false,"title":_vm.dialogFormTitle,"visible":_vm.dialogFormVisible},on:{"update:visible":function($event){_vm.dialogFormVisible=$event}}},[_c('p',{staticStyle:{"padding":"10px 0"}},[_vm._v(" 请输入表单项对应的单元格编号,从左到右依次为ABCD...,从上到下依次为1234... ")]),(_vm.formula === 'a1: a2' || _vm.formula === '(a1 + a2) * 2')?_c('section',[_c('div',{staticStyle:{"height":"26px","line-height":"36px","font-size":"16px"}},[_vm._v(" "+_vm._s(_vm.dialogFormTitle)+" ")]),_c('div',{staticStyle:{"height":"36px","line-height":"36px"}},[_vm._v("示例: "+_vm._s(_vm.dialogFormTitle === '表格行列求和公式' ? 'a1: a2' : '(a1 + a2) * 2'))]),_c('el-checkbox',{model:{value:(_vm.isHideZero),callback:function ($$v) {_vm.isHideZero=$$v},expression:"isHideZero"}},[_vm._v("结果为 0 不显示")]),_c('p',{staticStyle:{"height":"10px"}}),_c('el-input',{attrs:{"autocomplete":"off"},model:{value:(_vm.simpleFormula),callback:function ($$v) {_vm.simpleFormula=$$v},expression:"simpleFormula"}})],1):_vm._e(),(_vm.formula === 'bmi')?_c('section',[_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v("身高")]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.height),callback:function ($$v) {_vm.height=$$v},expression:"height"}})],1),_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v("体重")]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.weight),callback:function ($$v) {_vm.weight=$$v},expression:"weight"}})],1)]):_vm._e(),(_vm.formula === 'labor')?_c('section',[_c('el-checkbox',{model:{value:(_vm.isHideZero),callback:function ($$v) {_vm.isHideZero=$$v},expression:"isHideZero"}},[_vm._v("结果为 0 不显示")]),_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v("产程类型")]),_c('el-select',{attrs:{"size":"mini"},on:{"change":_vm.laborTypeChange},model:{value:(_vm.laborType),callback:function ($$v) {_vm.laborType=$$v},expression:"laborType"}},[_c('el-option',{attrs:{"value":1,"label":"第一产程"}}),_c('el-option',{attrs:{"value":2,"label":"第二产程"}}),_c('el-option',{attrs:{"value":3,"label":"第三产程"}}),_c('el-option',{attrs:{"value":0,"label":"总产程"}})],1)],1),_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v(_vm._s(['第一产程', '宫缩开始', '宫口全开', '胎儿娩出'][_vm.laborType]))]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.labor1),callback:function ($$v) {_vm.labor1=$$v},expression:"labor1"}})],1),_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v(_vm._s(['第二产程', '宫口全开', '胎儿娩出', '胎盘娩出'][_vm.laborType]))]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.labor2),callback:function ($$v) {_vm.labor2=$$v},expression:"labor2"}})],1),(_vm.laborType === 0)?_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v(_vm._s(['第三产程', '宫缩开始', '宫口全开', '胎儿娩出'][_vm.laborType]))]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.labor3),callback:function ($$v) {_vm.labor3=$$v},expression:"labor3"}})],1):_vm._e()],1):_vm._e(),(_vm.formula === 'expectedDate' || _vm.formula === 'pregnantDays' || _vm.formula === 'pregnantWeeks')?_c('section',[_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v("末次月经")]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.expectedDate),callback:function ($$v) {_vm.expectedDate=$$v},expression:"expectedDate"}})],1)]):_vm._e(),(_vm.formula === 'ftScoreMapping')?_c('section',[_c('div',{staticClass:"ho-table-features-list"},[_c('p',{staticStyle:{"width":"220px"}},[_vm._v("分值所在的单元格编号")]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.ftScoreMapping.cell),callback:function ($$v) {_vm.$set(_vm.ftScoreMapping, "cell", $$v)},expression:"ftScoreMapping.cell"}})],1),_c('div',{staticClass:"ho-table-features-list"},[_c('p',{staticStyle:{"width":"143px"}},[_vm._v("分值区间及映射值")]),_c('ul',[_vm._l((_vm.ftScoreMapping.item),function(item,index){return _c('li',[_c('el-input-number',{staticClass:"ft-score-mapping-input",attrs:{"size":"mini","controls":false,"min":0},model:{value:(item.range[0]),callback:function ($$v) {_vm.$set(item.range, 0, $$v)},expression:"item.range[0]"}}),_c('span',{staticStyle:{"padding":"0 10px"}},[_vm._v("到")]),_c('el-input-number',{staticClass:"ft-score-mapping-input",attrs:{"size":"mini","controls":false,"min":1},model:{value:(item.range[1]),callback:function ($$v) {_vm.$set(item.range, 1, $$v)},expression:"item.range[1]"}}),_c('span',{staticStyle:{"padding":"0 10px 0 0"}},[_vm._v(" :")]),_c('el-input',{staticClass:"ft-score-mapping-input",attrs:{"size":"mini","autocomplete":"off"},model:{value:(item.text),callback:function ($$v) {_vm.$set(item, "text", $$v)},expression:"item.text"}})],1)}),_c('li',[_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.addFtScoreMappingItem}},[_c('i',{staticClass:"el-icon-folder-add",staticStyle:{"font-size":"20px"}})])],1)],2)])]):_vm._e(),_c('div',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.sure}},[_vm._v("确 定")]),_c('el-button',{attrs:{"size":"small"},on:{"click":function($event){_vm.dialogFormVisible = false}}},[_vm._v("取 消")])],1)]),(_vm.table.tableFormula)?_c('div',{staticClass:"sub-bar-items"},[_c('el-dropdown',{class:_vm.dropdownClassName,attrs:{"trigger":"click","placement":"bottom-start","popper-append-to-body":"","tabindex":-1},on:{"visible-change":_vm.dropdownChange}},[_c('span',{staticClass:"el-dropdown-link"},[_c('span',[_vm._v("表格计算公式")]),_c('i',{staticClass:"el-icon-arrow-down el-icon--right"})]),_c('el-dropdown-menu',{attrs:{"slot":"dropdown"},slot:"dropdown"},[(_vm.table.isTableCode)?_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{directives:[{name:"debounce",rawName:"v-debounce:30.click",value:(_vm.setCellCode),expression:"setCellCode",arg:"30",modifiers:{"click":true}}]},[_c('span',[_vm._v(_vm._s(_vm.tableCellCode ? '隐藏' : '显示')+"单元格编号")])])]):_vm._e(),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"sumFormula"},on:{"click":function($event){return _vm.openFormula(['表格行列求和公式', 'a1: a2'])}}},[_vm._v(" 表格行列求和 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"arithmeticFormula"},on:{"click":function($event){_vm.openFormula(['表格行列混合运算公式', '(a1 + a2) * 2'])}}},[_vm._v(" 表格行列混合运算 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"bmiFormula"},on:{"click":function($event){return _vm.openFormula(['BMI指数计算公式', 'bmi'])}}},[_vm._v(" BMI指数 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"laborFormula"},on:{"click":function($event){return _vm.openFormula(['产程计算公式', 'labor'])}}},[_vm._v(" 产程 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"expectedDate"},on:{"click":function($event){return _vm.openFormula(['预产期计算公式', 'expectedDate'])}}},[_vm._v(" 预产期 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"pregnantWeeks"},on:{"click":function($event){return _vm.openFormula(['孕周计算公式', 'pregnantWeeks'])}}},[_vm._v(" 孕周 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"ftScoreMapping"},on:{"click":function($event){return _vm.openFormula(['分值映射计算公式', 'ftScoreMapping'])}}},[_vm._v(" 分值映射 ")])])],1)],1)],1):_vm._e(),(_vm.table.insertRowAbove && _vm.tableProperty.canAddRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableInsertRowAbove),expression:"tableInsertRowAbove",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("上方插入 ")]),_c('el-input-number',{staticClass:"insert-top",attrs:{"size":"mini","controls":false,"precision":0,"min":1},model:{value:(_vm.topRows),callback:function ($$v) {_vm.topRows=$$v},expression:"topRows"}}),_c('span',[_vm._v(" 行")])],1):_vm._e(),(_vm.table.insertRowBelow && _vm.tableProperty.canAddRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableInsertRowBelow),expression:"tableInsertRowBelow",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("下方插入 ")]),_c('el-input-number',{staticClass:"insert-bottom",attrs:{"size":"mini","controls":false,"precision":0,"min":1},model:{value:(_vm.bottomRows),callback:function ($$v) {_vm.bottomRows=$$v},expression:"bottomRows"}}),_c('span',[_vm._v(" 行")])],1):_vm._e(),(_vm.table.insertColLeft && _vm.tableProperty.canAddRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableInsertColLeft),expression:"tableInsertColLeft",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("左侧插入 ")]),_c('el-input-number',{staticClass:"insert-left",attrs:{"size":"mini","controls":false,"precision":0,"min":1},model:{value:(_vm.leftRows),callback:function ($$v) {_vm.leftRows=$$v},expression:"leftRows"}}),_c('span',[_vm._v(" 列")])],1):_vm._e(),(_vm.table.insertColRight && _vm.tableProperty.canAddRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableInsertColRight),expression:"tableInsertColRight",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("右侧插入 ")]),_c('el-input-number',{staticClass:"insert-right",attrs:{"size":"mini","precision":0,"controls":false,"min":1},model:{value:(_vm.rightRows),callback:function ($$v) {_vm.rightRows=$$v},expression:"rightRows"}}),_c('span',[_vm._v(" 列")])],1):_vm._e(),(_vm.table.deleteRows && _vm.tableProperty.canDeleteRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableDeleteRows),expression:"tableDeleteRows",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("删除行")])]):_vm._e(),(_vm.table.deleteCols && _vm.tableProperty.canDeleteRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableDeleteCols),expression:"tableDeleteCols",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("删除列")])]):_vm._e(),(_vm.table.mergerCells)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableMergerCells),expression:"tableMergerCells",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("合并单元格")])]):_vm._e(),(_vm.table.unMergerCells)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableUnMergerCells),expression:"tableUnMergerCells",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("取消合并单元格")])]):_vm._e()],1)}
|
|
236653
|
-
var
|
|
237528
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/toolbar/insert/HoTableFeatures.vue?vue&type=template&id=02d0c560&
|
|
237529
|
+
var HoTableFeaturesvue_type_template_id_02d0c560_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',{ref:"hoTableFeatures",staticClass:"ho-table-features"},[_c('el-dialog',{attrs:{"width":"520px","top":"20%","center":"","append-to-body":"","close-on-click-modal":false,"title":_vm.dialogFormTitle,"visible":_vm.dialogFormVisible},on:{"update:visible":function($event){_vm.dialogFormVisible=$event}}},[_c('p',{staticStyle:{"padding":"10px 0"}},[_vm._v(" 请输入表单项对应的单元格编号,从左到右依次为ABCD...,从上到下依次为1234... ")]),(_vm.formula === 'a1: a2' || _vm.formula === '(a1 + a2) * 2')?_c('section',[_c('div',{staticStyle:{"height":"26px","line-height":"36px","font-size":"16px"}},[_vm._v(" "+_vm._s(_vm.dialogFormTitle)+" ")]),_c('div',{staticStyle:{"height":"36px","line-height":"36px"}},[_vm._v("示例: "+_vm._s(_vm.dialogFormTitle === '表格行列求和公式' ? 'a1: a2' : '(a1 + a2) * 2'))]),_c('el-checkbox',{model:{value:(_vm.isHideZero),callback:function ($$v) {_vm.isHideZero=$$v},expression:"isHideZero"}},[_vm._v("结果为 0 不显示")]),_c('p',{staticStyle:{"height":"10px"}}),_c('el-input',{attrs:{"autocomplete":"off"},model:{value:(_vm.simpleFormula),callback:function ($$v) {_vm.simpleFormula=$$v},expression:"simpleFormula"}})],1):_vm._e(),(_vm.formula === 'bmi')?_c('section',[_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v("身高")]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.height),callback:function ($$v) {_vm.height=$$v},expression:"height"}})],1),_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v("体重")]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.weight),callback:function ($$v) {_vm.weight=$$v},expression:"weight"}})],1)]):_vm._e(),(_vm.formula === 'labor')?_c('section',[_c('el-checkbox',{model:{value:(_vm.isHideZero),callback:function ($$v) {_vm.isHideZero=$$v},expression:"isHideZero"}},[_vm._v("结果为 0 不显示")]),_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v("产程类型")]),_c('el-select',{attrs:{"size":"mini"},on:{"change":_vm.laborTypeChange},model:{value:(_vm.laborType),callback:function ($$v) {_vm.laborType=$$v},expression:"laborType"}},[_c('el-option',{attrs:{"value":1,"label":"第一产程"}}),_c('el-option',{attrs:{"value":2,"label":"第二产程"}}),_c('el-option',{attrs:{"value":3,"label":"第三产程"}}),_c('el-option',{attrs:{"value":0,"label":"总产程"}})],1)],1),_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v(_vm._s(['第一产程', '宫缩开始', '宫口全开', '胎儿娩出'][_vm.laborType]))]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.labor1),callback:function ($$v) {_vm.labor1=$$v},expression:"labor1"}})],1),_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v(_vm._s(['第二产程', '宫口全开', '胎儿娩出', '胎盘娩出'][_vm.laborType]))]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.labor2),callback:function ($$v) {_vm.labor2=$$v},expression:"labor2"}})],1),(_vm.laborType === 0)?_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v(_vm._s(['第三产程', '宫缩开始', '宫口全开', '胎儿娩出'][_vm.laborType]))]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.labor3),callback:function ($$v) {_vm.labor3=$$v},expression:"labor3"}})],1):_vm._e()],1):_vm._e(),(_vm.formula === 'expectedDate' || _vm.formula === 'pregnantDays' || _vm.formula === 'pregnantWeeks')?_c('section',[_c('div',{staticClass:"ho-table-features-list"},[_c('p',[_vm._v("末次月经")]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.expectedDate),callback:function ($$v) {_vm.expectedDate=$$v},expression:"expectedDate"}})],1)]):_vm._e(),(_vm.formula === 'ftScoreMapping')?_c('section',[_c('div',{staticClass:"ho-table-features-list"},[_c('p',{staticStyle:{"width":"220px"}},[_vm._v("分值所在的单元格编号")]),_c('el-input',{attrs:{"size":"mini","autocomplete":"off"},model:{value:(_vm.ftScoreMapping.cell),callback:function ($$v) {_vm.$set(_vm.ftScoreMapping, "cell", $$v)},expression:"ftScoreMapping.cell"}})],1),_c('div',{staticClass:"ho-table-features-list"},[_c('p',{staticStyle:{"width":"143px"}},[_vm._v("分值区间及映射值")]),_c('ul',[_vm._l((_vm.ftScoreMapping.item),function(item,index){return _c('li',[_c('el-input-number',{staticClass:"ft-score-mapping-input",attrs:{"size":"mini","controls":false,"min":0},model:{value:(item.range[0]),callback:function ($$v) {_vm.$set(item.range, 0, $$v)},expression:"item.range[0]"}}),_c('span',{staticStyle:{"padding":"0 10px"}},[_vm._v("到")]),_c('el-input-number',{staticClass:"ft-score-mapping-input",attrs:{"size":"mini","controls":false,"min":1},model:{value:(item.range[1]),callback:function ($$v) {_vm.$set(item.range, 1, $$v)},expression:"item.range[1]"}}),_c('span',{staticStyle:{"padding":"0 10px 0 0"}},[_vm._v(" :")]),_c('el-input',{staticClass:"ft-score-mapping-input",attrs:{"size":"mini","autocomplete":"off"},model:{value:(item.text),callback:function ($$v) {_vm.$set(item, "text", $$v)},expression:"item.text"}})],1)}),_c('li',[_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.addFtScoreMappingItem}},[_c('i',{staticClass:"el-icon-folder-add",staticStyle:{"font-size":"20px"}})])],1)],2)])]):_vm._e(),_c('div',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.sure}},[_vm._v("确 定")]),_c('el-button',{attrs:{"size":"small"},on:{"click":function($event){_vm.dialogFormVisible = false}}},[_vm._v("取 消")])],1)]),(_vm.table.tableFormula)?_c('div',{staticClass:"sub-bar-items"},[_c('el-dropdown',{class:_vm.dropdownClassName,attrs:{"trigger":"click","placement":"bottom-start","popper-append-to-body":"","tabindex":-1},on:{"visible-change":_vm.dropdownChange}},[_c('span',{staticClass:"el-dropdown-link"},[_c('span',[_vm._v("表格计算公式")]),_c('i',{staticClass:"el-icon-arrow-down el-icon--right"})]),_c('el-dropdown-menu',{attrs:{"slot":"dropdown"},slot:"dropdown"},[(_vm.table.isTableCode)?_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{directives:[{name:"debounce",rawName:"v-debounce:30.click",value:(_vm.setCellCode),expression:"setCellCode",arg:"30",modifiers:{"click":true}}]},[_c('span',[_vm._v(_vm._s(_vm.tableCellCode ? '隐藏' : '显示')+"单元格编号")])])]):_vm._e(),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"sumFormula"},on:{"click":function($event){return _vm.openFormula(['表格行列求和公式', 'a1: a2'])}}},[_vm._v(" 表格行列求和 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"arithmeticFormula"},on:{"click":function($event){_vm.openFormula(['表格行列混合运算公式', '(a1 + a2) * 2'])}}},[_vm._v(" 表格行列混合运算 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"bmiFormula"},on:{"click":function($event){return _vm.openFormula(['BMI指数计算公式', 'bmi'])}}},[_vm._v(" BMI指数 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"laborFormula"},on:{"click":function($event){return _vm.openFormula(['产程计算公式', 'labor'])}}},[_vm._v(" 产程 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"expectedDate"},on:{"click":function($event){return _vm.openFormula(['预产期计算公式', 'expectedDate'])}}},[_vm._v(" 预产期 ")])]),_c('el-dropdown-item',{staticClass:"ho-insert-table-item"},[_c('div',{attrs:{"index":"ftScoreMapping"},on:{"click":function($event){return _vm.openFormula(['分值映射计算公式', 'ftScoreMapping'])}}},[_vm._v(" 分值映射 ")])])],1)],1)],1):_vm._e(),(_vm.table.insertRowAbove && _vm.tableProperty.canAddRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableInsertRowAbove),expression:"tableInsertRowAbove",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("上方插入 ")]),_c('el-input-number',{staticClass:"insert-top",attrs:{"size":"mini","controls":false,"precision":0,"min":1},model:{value:(_vm.topRows),callback:function ($$v) {_vm.topRows=$$v},expression:"topRows"}}),_c('span',[_vm._v(" 行")])],1):_vm._e(),(_vm.table.insertRowBelow && _vm.tableProperty.canAddRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableInsertRowBelow),expression:"tableInsertRowBelow",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("下方插入 ")]),_c('el-input-number',{staticClass:"insert-bottom",attrs:{"size":"mini","controls":false,"precision":0,"min":1},model:{value:(_vm.bottomRows),callback:function ($$v) {_vm.bottomRows=$$v},expression:"bottomRows"}}),_c('span',[_vm._v(" 行")])],1):_vm._e(),(_vm.table.insertColLeft && _vm.tableProperty.canAddRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableInsertColLeft),expression:"tableInsertColLeft",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("左侧插入 ")]),_c('el-input-number',{staticClass:"insert-left",attrs:{"size":"mini","controls":false,"precision":0,"min":1},model:{value:(_vm.leftRows),callback:function ($$v) {_vm.leftRows=$$v},expression:"leftRows"}}),_c('span',[_vm._v(" 列")])],1):_vm._e(),(_vm.table.insertColRight && _vm.tableProperty.canAddRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableInsertColRight),expression:"tableInsertColRight",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("右侧插入 ")]),_c('el-input-number',{staticClass:"insert-right",attrs:{"size":"mini","precision":0,"controls":false,"min":1},model:{value:(_vm.rightRows),callback:function ($$v) {_vm.rightRows=$$v},expression:"rightRows"}}),_c('span',[_vm._v(" 列")])],1):_vm._e(),(_vm.table.deleteRows && _vm.tableProperty.canDeleteRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableDeleteRows),expression:"tableDeleteRows",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("删除行")])]):_vm._e(),(_vm.table.deleteCols && _vm.tableProperty.canDeleteRow)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableDeleteCols),expression:"tableDeleteCols",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("删除列")])]):_vm._e(),(_vm.table.mergerCells)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableMergerCells),expression:"tableMergerCells",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("合并单元格")])]):_vm._e(),(_vm.table.unMergerCells)?_c('div',{directives:[{name:"debounce",rawName:"v-debounce:1000.click",value:(_vm.tableUnMergerCells),expression:"tableUnMergerCells",arg:"1000",modifiers:{"click":true}}],staticClass:"sub-bar-items"},[_c('span',[_vm._v("取消合并单元格")])]):_vm._e()],1)}
|
|
237530
|
+
var HoTableFeaturesvue_type_template_id_02d0c560_staticRenderFns = []
|
|
236654
237531
|
|
|
236655
237532
|
|
|
236656
237533
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/toolbar/insert/HoTableFeatures.vue?vue&type=script&lang=js&
|
|
@@ -237054,8 +237931,8 @@ var HoTableFeaturesvue_type_template_id_2fd610cb_staticRenderFns = []
|
|
|
237054
237931
|
|
|
237055
237932
|
var HoTableFeatures_component = normalizeComponent(
|
|
237056
237933
|
insert_HoTableFeaturesvue_type_script_lang_js_,
|
|
237057
|
-
|
|
237058
|
-
|
|
237934
|
+
HoTableFeaturesvue_type_template_id_02d0c560_render,
|
|
237935
|
+
HoTableFeaturesvue_type_template_id_02d0c560_staticRenderFns,
|
|
237059
237936
|
false,
|
|
237060
237937
|
null,
|
|
237061
237938
|
null,
|
|
@@ -238135,7 +239012,8 @@ var HoRightMenu = /*#__PURE__*/function (_Mixins) {
|
|
|
238135
239012
|
_this$rightNode13,
|
|
238136
239013
|
_this$rightNode14,
|
|
238137
239014
|
_this$rightNode15,
|
|
238138
|
-
_this$rightNode16
|
|
239015
|
+
_this$rightNode16,
|
|
239016
|
+
_this$rightNode17;
|
|
238139
239017
|
|
|
238140
239018
|
var h = arguments[0];
|
|
238141
239019
|
return h("div", {
|
|
@@ -238233,7 +239111,18 @@ var HoRightMenu = /*#__PURE__*/function (_Mixins) {
|
|
|
238233
239111
|
return _this4.toUpdateNodes("qrcode", event);
|
|
238234
239112
|
}
|
|
238235
239113
|
}
|
|
238236
|
-
}, ["\u4E8C\u7EF4\u7801\u5C5E\u6027"])]), ((
|
|
239114
|
+
}, ["\u4E8C\u7EF4\u7801\u5C5E\u6027"])]), ((_this$rightNode11 = this.rightNode) === null || _this$rightNode11 === void 0 ? void 0 : _this$rightNode11.type) === "edit-image" && h("ul", {
|
|
239115
|
+
"class": "mouse-right-menu"
|
|
239116
|
+
}, [h("li", {
|
|
239117
|
+
"class": "mouse-menu-item mouse-right-menu-line"
|
|
239118
|
+
}), h("li", {
|
|
239119
|
+
"class": "mouse-menu-item",
|
|
239120
|
+
"on": {
|
|
239121
|
+
"click": function click() {
|
|
239122
|
+
return _this4.toUpdateNodes("edit-image", event);
|
|
239123
|
+
}
|
|
239124
|
+
}
|
|
239125
|
+
}, ["\u7F16\u8F91\u56FE\u7247"])]), (((_this$rightNode12 = this.rightNode) === null || _this$rightNode12 === void 0 ? void 0 : _this$rightNode12.type) === "text" || this.emrDebug) && h("ul", {
|
|
238237
239126
|
"class": "mouse-right-menu"
|
|
238238
239127
|
}, [h("li", {
|
|
238239
239128
|
"class": "mouse-menu-item mouse-right-menu-line"
|
|
@@ -238244,7 +239133,7 @@ var HoRightMenu = /*#__PURE__*/function (_Mixins) {
|
|
|
238244
239133
|
return _this4.toUpdateNodes("text", event);
|
|
238245
239134
|
}
|
|
238246
239135
|
}
|
|
238247
|
-
}, ["\u6587\u672C\u57DF\u5C5E\u6027"])]), (((_this$
|
|
239136
|
+
}, ["\u6587\u672C\u57DF\u5C5E\u6027"])]), (((_this$rightNode13 = this.rightNode) === null || _this$rightNode13 === void 0 ? void 0 : _this$rightNode13.rightTypeIsTable) && this.defaultTable && ((_this$rightNode14 = this.rightNode) === null || _this$rightNode14 === void 0 ? void 0 : _this$rightNode14.paintStatus) === 0 || this.emrDebug) && h("ul", {
|
|
238248
239137
|
"class": "mouse-right-menu"
|
|
238249
239138
|
}, [h("li", {
|
|
238250
239139
|
"class": "mouse-menu-item mouse-right-menu-line"
|
|
@@ -238276,7 +239165,7 @@ var HoRightMenu = /*#__PURE__*/function (_Mixins) {
|
|
|
238276
239165
|
return _this4.toUpdateNodes("table-cell", event);
|
|
238277
239166
|
}
|
|
238278
239167
|
}
|
|
238279
|
-
}, ["\u5355\u5143\u683C\u5C5E\u6027"])]), ((_this$
|
|
239168
|
+
}, ["\u5355\u5143\u683C\u5C5E\u6027"])]), ((_this$rightNode15 = this.rightNode) === null || _this$rightNode15 === void 0 ? void 0 : _this$rightNode15.rightTypeIsTable) && this.defaultTable && h("ul", {
|
|
238280
239169
|
"class": "mouse-right-menu"
|
|
238281
239170
|
}, [h("li", {
|
|
238282
239171
|
"class": "mouse-menu-item mouse-right-menu-line"
|
|
@@ -238290,7 +239179,7 @@ var HoRightMenu = /*#__PURE__*/function (_Mixins) {
|
|
|
238290
239179
|
table: this.defaultTable,
|
|
238291
239180
|
tableProperty: this.rightNode.tableProperty
|
|
238292
239181
|
})
|
|
238293
|
-
})]), ((_this$
|
|
239182
|
+
})]), ((_this$rightNode16 = this.rightNode) === null || _this$rightNode16 === void 0 ? void 0 : _this$rightNode16.canShowComment) && h("ul", {
|
|
238294
239183
|
"class": "mouse-right-menu"
|
|
238295
239184
|
}, [h("li", {
|
|
238296
239185
|
"class": "mouse-menu-item",
|
|
@@ -238299,7 +239188,7 @@ var HoRightMenu = /*#__PURE__*/function (_Mixins) {
|
|
|
238299
239188
|
return _this4.hideComments();
|
|
238300
239189
|
}
|
|
238301
239190
|
}
|
|
238302
|
-
}, [(_this$
|
|
239191
|
+
}, [(_this$rightNode17 = this.rightNode) !== null && _this$rightNode17 !== void 0 && _this$rightNode17.isHideComments ? "显示" : "隐藏", "\u6279\u6CE8"])]), h("ul", {
|
|
238303
239192
|
"class": "mouse-right-menu"
|
|
238304
239193
|
}, [h("li", {
|
|
238305
239194
|
"class": "mouse-menu-item"
|
|
@@ -238331,9 +239220,9 @@ HoRightMenu = __decorate([vue_class_component_esm({
|
|
|
238331
239220
|
}
|
|
238332
239221
|
})], HoRightMenu);
|
|
238333
239222
|
/* harmony default export */ var toolbar_HoRightMenu = (HoRightMenu);
|
|
238334
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/view/view.vue?vue&type=template&id=
|
|
238335
|
-
var
|
|
238336
|
-
var
|
|
239223
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/view/view.vue?vue&type=template&id=4a7f3e3a&
|
|
239224
|
+
var viewvue_type_template_id_4a7f3e3a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.hoEditorFactoryIdList.length > 0)?_c('div',{staticClass:"ho-docs",staticStyle:{"width":"1px","height":"1px"}},[_c('section',{staticClass:"ho-editor-list editor-no-footer"},[_vm._l((_vm.hoEditorFactoryIdList),function(hoEditorId,index){return [_c('PrintDoc',{key:index,attrs:{"docIndex":index,"hoEditorId":hoEditorId,"hoEditorFactoryIdList":_vm.hoEditorFactoryIdList,"activeDocId":_vm.activeDocId},on:{"setActiveDocIndex":_vm.setActiveDocIndex,"drawPagesLengthChange":_vm.drawPagesLengthChange}})]})],2)]):_vm._e()}
|
|
239225
|
+
var viewvue_type_template_id_4a7f3e3a_staticRenderFns = []
|
|
238337
239226
|
|
|
238338
239227
|
|
|
238339
239228
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/view/viewDoc.vue?vue&type=template&id=717b1315&
|
|
@@ -238776,8 +239665,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
238776
239665
|
key: "isFixedPrintToA4Change",
|
|
238777
239666
|
value: function isFixedPrintToA4Change() {
|
|
238778
239667
|
var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
|
|
238779
|
-
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
238780
|
-
hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
|
|
239668
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId); // hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
|
|
238781
239669
|
} // 打印时彩色字体转成黑色 printBlack
|
|
238782
239670
|
|
|
238783
239671
|
}, {
|
|
@@ -238855,7 +239743,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
238855
239743
|
__decorate([Prop()], PrintDocs.prototype, "pageProperty", void 0);
|
|
238856
239744
|
|
|
238857
239745
|
__decorate([Prop({
|
|
238858
|
-
default:
|
|
239746
|
+
default: ''
|
|
238859
239747
|
})], PrintDocs.prototype, "isFixedPrintToA4", void 0);
|
|
238860
239748
|
|
|
238861
239749
|
__decorate([Prop({
|
|
@@ -238897,8 +239785,8 @@ PrintDocs = __decorate([vue_class_component_esm({
|
|
|
238897
239785
|
|
|
238898
239786
|
var view_component = normalizeComponent(
|
|
238899
239787
|
view_viewvue_type_script_lang_ts_,
|
|
238900
|
-
|
|
238901
|
-
|
|
239788
|
+
viewvue_type_template_id_4a7f3e3a_render,
|
|
239789
|
+
viewvue_type_template_id_4a7f3e3a_staticRenderFns,
|
|
238902
239790
|
false,
|
|
238903
239791
|
null,
|
|
238904
239792
|
null,
|
|
@@ -238969,8 +239857,8 @@ var form_item_default = /*#__PURE__*/__webpack_require__.n(form_item);
|
|
|
238969
239857
|
var lib_form = __webpack_require__(54223);
|
|
238970
239858
|
var form_default = /*#__PURE__*/__webpack_require__.n(lib_form);
|
|
238971
239859
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/upload.js
|
|
238972
|
-
var
|
|
238973
|
-
var upload_default = /*#__PURE__*/__webpack_require__.n(
|
|
239860
|
+
var upload = __webpack_require__(26906);
|
|
239861
|
+
var upload_default = /*#__PURE__*/__webpack_require__.n(upload);
|
|
238974
239862
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/dropdown-item.js
|
|
238975
239863
|
var dropdown_item = __webpack_require__(42173);
|
|
238976
239864
|
var dropdown_item_default = /*#__PURE__*/__webpack_require__.n(dropdown_item);
|