hoeditor-web 2.0.58 → 2.0.61

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.
@@ -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
- this._printPages = (0,toConsumableArray/* default */.Z)(new Set(pages));
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
  }
@@ -11591,7 +11592,7 @@ var Print = /*#__PURE__*/function () {
11591
11592
 
11592
11593
  case 17:
11593
11594
  if ((_step = _iterator.n()).done) {
11594
- _context3.next = 59;
11595
+ _context3.next = 60;
11595
11596
  break;
11596
11597
  }
11597
11598
 
@@ -11609,7 +11610,7 @@ var Print = /*#__PURE__*/function () {
11609
11610
  });
11610
11611
 
11611
11612
  case 22:
11612
- return _context3.abrupt("continue", 57);
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", 59);
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('#fff').rect(0, 0, width, positionY).endFill();
11635
+ dShape.graphics.beginFill('#FFFFFF').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('#fff').rect(0, 0, width, posY).endFill();
11648
+ _dShape.graphics.beginFill('#FFFFFF').rect(0, 0, width, posY).endFill();
11648
11649
 
11649
11650
  cpage.drawDocContainer.addChild(_dShape);
11650
11651
  cpage.drawFooter.alpha = 0;
@@ -11661,7 +11662,7 @@ var Print = /*#__PURE__*/function () {
11661
11662
  y: 0
11662
11663
  };
11663
11664
 
11664
- if (hoEditorFactory.isFixedPrintToA4 && format) {
11665
+ if (hoEditorFactory.isFixedPrintToA4 == '1' && format) {
11665
11666
  if (orientation == 'l') {
11666
11667
  svg2pdfOptions.x = format[0] - width;
11667
11668
  svg2pdfOptions.y = (format[1] - height) / 2;
@@ -11671,14 +11672,15 @@ var Print = /*#__PURE__*/function () {
11671
11672
  }
11672
11673
 
11673
11674
  if (!hoEditorFactory.isUseImagePrint) {
11674
- _context3.next = 43;
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;
11680
11682
 
11681
- if (hoEditorFactory.isFixedPrintToA4T && format) {
11683
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && format) {
11682
11684
  // 避免切换纸张的打印方式 绘制只处理竖向情况
11683
11685
  if (orientation === 'p' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5' && index == 0) {
11684
11686
  ctx.translate(0, 1122 / 2); // 由于旋转是默认以左上角为中心 所以需要先移动位置 改变起始点
@@ -11691,10 +11693,10 @@ var Print = /*#__PURE__*/function () {
11691
11693
  ctx.posY = svg2pdfOptions.y;
11692
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));
11693
11695
  ctx = null;
11694
- _context3.next = 56;
11696
+ _context3.next = 57;
11695
11697
  break;
11696
11698
 
11697
- case 43:
11699
+ case 44:
11698
11700
  _ctx = new canvas2svg({
11699
11701
  width: width,
11700
11702
  height: height,
@@ -11703,68 +11705,68 @@ var Print = /*#__PURE__*/function () {
11703
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));
11704
11706
 
11705
11707
  if (!(type === 'html')) {
11706
- _context3.next = 50;
11708
+ _context3.next = 51;
11707
11709
  break;
11708
11710
  }
11709
11711
 
11710
11712
  svgData = (_ctx2 = _ctx) === null || _ctx2 === void 0 ? void 0 : _ctx2.getSvg();
11711
11713
  svgData && ((_svgBox2 = svgBox) === null || _svgBox2 === void 0 ? void 0 : _svgBox2.appendChild(svgData));
11712
- _context3.next = 55;
11714
+ _context3.next = 56;
11713
11715
  break;
11714
11716
 
11715
- case 50:
11717
+ case 51:
11716
11718
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage();
11717
11719
  _context3.t0 = PDF;
11718
11720
 
11719
11721
  if (!_context3.t0) {
11720
- _context3.next = 55;
11722
+ _context3.next = 56;
11721
11723
  break;
11722
11724
  }
11723
11725
 
11724
- _context3.next = 55;
11726
+ _context3.next = 56;
11725
11727
  return svg2pdf((_ctx3 = _ctx) === null || _ctx3 === void 0 ? void 0 : _ctx3.getSvg(), PDF, svg2pdfOptions);
11726
11728
 
11727
- case 55:
11729
+ case 56:
11728
11730
  _ctx = null;
11729
11731
 
11730
- case 56:
11732
+ case 57:
11731
11733
  index > 0 && ((_cpage$drawDomLevel3 = cpage.drawDomLevel) === null || _cpage$drawDomLevel3 === void 0 ? void 0 : _cpage$drawDomLevel3.clearStage());
11732
11734
 
11733
- case 57:
11735
+ case 58:
11734
11736
  _context3.next = 17;
11735
11737
  break;
11736
11738
 
11737
- case 59:
11738
- _context3.next = 64;
11739
+ case 60:
11740
+ _context3.next = 65;
11739
11741
  break;
11740
11742
 
11741
- case 61:
11742
- _context3.prev = 61;
11743
+ case 62:
11744
+ _context3.prev = 62;
11743
11745
  _context3.t1 = _context3["catch"](15);
11744
11746
 
11745
11747
  _iterator.e(_context3.t1);
11746
11748
 
11747
- case 64:
11748
- _context3.prev = 64;
11749
+ case 65:
11750
+ _context3.prev = 65;
11749
11751
 
11750
11752
  _iterator.f();
11751
11753
 
11752
- return _context3.finish(64);
11754
+ return _context3.finish(65);
11753
11755
 
11754
- case 67:
11756
+ case 68:
11755
11757
  console.timeEnd('绘制svg和生成pdf');
11756
11758
  if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
11757
11759
  hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
11758
11760
 
11759
11761
  if (!(positionY || hoEditorFactory.startPageNum !== 0 && positionY !== undefined)) {
11760
- _context3.next = 76;
11762
+ _context3.next = 77;
11761
11763
  break;
11762
11764
  }
11763
11765
 
11764
11766
  _last = hoEditorFactory.printStatus.printRecord.last();
11765
11767
 
11766
11768
  if (!(_last && hoEditorFactory.startPageNum == _last[0] && positionY === _last[1])) {
11767
- _context3.next = 76;
11769
+ _context3.next = 77;
11768
11770
  break;
11769
11771
  }
11770
11772
 
@@ -11776,21 +11778,21 @@ var Print = /*#__PURE__*/function () {
11776
11778
  reslove && reslove('printend');
11777
11779
  return _context3.abrupt("return");
11778
11780
 
11779
- case 76:
11781
+ case 77:
11780
11782
  if (!(type === 'pdf')) {
11781
- _context3.next = 82;
11783
+ _context3.next = 83;
11782
11784
  break;
11783
11785
  }
11784
11786
 
11785
11787
  PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
11786
11788
  PDF === null || PDF === void 0 ? void 0 : PDF.save(fileName + '.pdf');
11787
11789
  hoEditorFactory.printStatus.drawPrintRecord.clear();
11788
- _context3.next = 88;
11790
+ _context3.next = 89;
11789
11791
  break;
11790
11792
 
11791
- case 82:
11793
+ case 83:
11792
11794
  if (!(svgBox && svgBox.childNodes.length === 0)) {
11793
- _context3.next = 86;
11795
+ _context3.next = 87;
11794
11796
  break;
11795
11797
  }
11796
11798
 
@@ -11802,7 +11804,7 @@ var Print = /*#__PURE__*/function () {
11802
11804
  reslove && reslove('printend');
11803
11805
  return _context3.abrupt("return");
11804
11806
 
11805
- case 86:
11807
+ case 87:
11806
11808
  printStyle = (0,util/* createPrintHTMLStyle */.j_)(hoEditorFactory.pageProperty.pageSize, orientation);
11807
11809
 
11808
11810
  if (type === 'html') {
@@ -11820,7 +11822,7 @@ var Print = /*#__PURE__*/function () {
11820
11822
  return link.remove();
11821
11823
  }, 100);
11822
11824
  } else {
11823
- if (height <= 560 && !hoEditorFactory.isFixedPrintToA4T) {
11825
+ if (height <= 560 && hoEditorFactory.isFixedPrintToA4 !== '2') {
11824
11826
  PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
11825
11827
  }
11826
11828
 
@@ -11829,15 +11831,15 @@ var Print = /*#__PURE__*/function () {
11829
11831
  PDF && this.openDataUriInWindow(PDF, name, hoEditorFactory.pageProperty.widthPixes);
11830
11832
  }
11831
11833
 
11832
- case 88:
11834
+ case 89:
11833
11835
  reslove && reslove('printend');
11834
11836
 
11835
- case 89:
11837
+ case 90:
11836
11838
  case "end":
11837
11839
  return _context3.stop();
11838
11840
  }
11839
11841
  }
11840
- }, _callee2, this, [[15, 61, 64, 67]]);
11842
+ }, _callee2, this, [[15, 62, 65, 68]]);
11841
11843
  }));
11842
11844
 
11843
11845
  function printToPDF(_x2, _x3, _x4, _x5, _x6, _x7, _x8) {
@@ -11875,7 +11877,7 @@ var Print = /*#__PURE__*/function () {
11875
11877
 
11876
11878
  case 11:
11877
11879
  if ((_step2 = _iterator2.n()).done) {
11878
- _context4.next = 39;
11880
+ _context4.next = 40;
11879
11881
  break;
11880
11882
  }
11881
11883
 
@@ -11893,7 +11895,7 @@ var Print = /*#__PURE__*/function () {
11893
11895
  });
11894
11896
 
11895
11897
  case 16:
11896
- return _context4.abrupt("continue", 37);
11898
+ return _context4.abrupt("continue", 38);
11897
11899
 
11898
11900
  case 17:
11899
11901
  last = index;
@@ -11904,7 +11906,7 @@ var Print = /*#__PURE__*/function () {
11904
11906
  break;
11905
11907
  }
11906
11908
 
11907
- return _context4.abrupt("break", 39);
11909
+ return _context4.abrupt("break", 40);
11908
11910
 
11909
11911
  case 21:
11910
11912
  if (cpage.drawDomLevel && !cpage.drawDomLevel.stage) {
@@ -11918,18 +11920,19 @@ var Print = /*#__PURE__*/function () {
11918
11920
  }
11919
11921
 
11920
11922
  if (!hoEditorFactory.isUseImagePrint) {
11921
- _context4.next = 30;
11923
+ _context4.next = 31;
11922
11924
  break;
11923
11925
  }
11924
11926
 
11925
11927
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage();
11926
11928
  ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
11929
+ window.printBlack = hoEditorFactory.printBlack;
11927
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));
11928
11931
  ctx = null;
11929
- _context4.next = 36;
11932
+ _context4.next = 37;
11930
11933
  break;
11931
11934
 
11932
- case 30:
11935
+ case 31:
11933
11936
  _ctx4 = new canvas2svg({
11934
11937
  width: hoEditorFactory.pageProperty.widthPixes,
11935
11938
  height: orientation === 'l' ? hoEditorFactory.pageProperty.heightPixes - 1 : hoEditorFactory.pageProperty.heightPixes,
@@ -11937,37 +11940,37 @@ var Print = /*#__PURE__*/function () {
11937
11940
  });
11938
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));
11939
11942
  PDF.addPage();
11940
- _context4.next = 35;
11943
+ _context4.next = 36;
11941
11944
  return svg2pdf((_ctx5 = _ctx4) === null || _ctx5 === void 0 ? void 0 : _ctx5.getSvg(), PDF);
11942
11945
 
11943
- case 35:
11946
+ case 36:
11944
11947
  _ctx4 = null;
11945
11948
 
11946
- case 36:
11949
+ case 37:
11947
11950
  index > 0 && ((_cpage$drawDomLevel6 = cpage.drawDomLevel) === null || _cpage$drawDomLevel6 === void 0 ? void 0 : _cpage$drawDomLevel6.clearStage());
11948
11951
 
11949
- case 37:
11952
+ case 38:
11950
11953
  _context4.next = 11;
11951
11954
  break;
11952
11955
 
11953
- case 39:
11954
- _context4.next = 44;
11956
+ case 40:
11957
+ _context4.next = 45;
11955
11958
  break;
11956
11959
 
11957
- case 41:
11958
- _context4.prev = 41;
11960
+ case 42:
11961
+ _context4.prev = 42;
11959
11962
  _context4.t0 = _context4["catch"](9);
11960
11963
 
11961
11964
  _iterator2.e(_context4.t0);
11962
11965
 
11963
- case 44:
11964
- _context4.prev = 44;
11966
+ case 45:
11967
+ _context4.prev = 45;
11965
11968
 
11966
11969
  _iterator2.f();
11967
11970
 
11968
- return _context4.finish(44);
11971
+ return _context4.finish(45);
11969
11972
 
11970
- case 47:
11973
+ case 48:
11971
11974
  if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) {
11972
11975
  hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
11973
11976
  }
@@ -11975,12 +11978,12 @@ var Print = /*#__PURE__*/function () {
11975
11978
  hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
11976
11979
  reslove && reslove('printend');
11977
11980
 
11978
- case 50:
11981
+ case 51:
11979
11982
  case "end":
11980
11983
  return _context4.stop();
11981
11984
  }
11982
11985
  }
11983
- }, _callee3, null, [[9, 41, 44, 47]]);
11986
+ }, _callee3, null, [[9, 42, 45, 48]]);
11984
11987
  }));
11985
11988
 
11986
11989
  function createPDFBase64(_x9, _x10, _x11) {
@@ -12116,7 +12119,7 @@ var Print = /*#__PURE__*/function () {
12116
12119
  key: "printAllNew",
12117
12120
  value: function () {
12118
12121
  var _printAllNew = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee5(hoEditorFactoryID, reslove, PDF, position) {
12119
- var hoEditorFactory, a4Size, svgBox, last, _iterator4, _step4, _cpage$drawDomLevel12, index, cpage, widthPixes, heightPixes, orientation, formats, format, svg2pdfOptions, _cpage$drawDomLevel9, _cpage$drawDomLevel9$, ctx, _cpage$drawDomLevel10, _cpage$drawDomLevel11, _ctx7, _ctx6, lastPos;
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;
12120
12123
 
12121
12124
  return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee5$(_context6) {
12122
12125
  while (1) {
@@ -12132,34 +12135,53 @@ var Print = /*#__PURE__*/function () {
12132
12135
  svgBox = document.createElement('div');
12133
12136
  svgBox.className = 'ho-print-svg-box';
12134
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
+
12135
12157
  _iterator4 = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.printStatus.printProcess());
12136
- _context6.prev = 8;
12158
+ _context6.prev = 15;
12137
12159
 
12138
12160
  _iterator4.s();
12139
12161
 
12140
- case 10:
12162
+ case 17:
12141
12163
  if ((_step4 = _iterator4.n()).done) {
12142
- _context6.next = 48;
12164
+ _context6.next = 50;
12143
12165
  break;
12144
12166
  }
12145
12167
 
12146
12168
  index = _step4.value;
12147
12169
 
12148
12170
  if (!(index == -1)) {
12149
- _context6.next = 16;
12171
+ _context6.next = 23;
12150
12172
  break;
12151
12173
  }
12152
12174
 
12153
- _context6.next = 15;
12175
+ _context6.next = 22;
12154
12176
  return message_box_default().confirm('请进行翻页', '打印提示', {
12155
12177
  confirmButtonText: '确定',
12156
12178
  type: 'info'
12157
12179
  });
12158
12180
 
12159
- case 15:
12160
- return _context6.abrupt("continue", 46);
12181
+ case 22:
12182
+ return _context6.abrupt("continue", 48);
12161
12183
 
12162
- case 16:
12184
+ case 23:
12163
12185
  last = index;
12164
12186
  cpage = hoEditorFactory.drawTree.drawPages[index];
12165
12187
 
@@ -12174,51 +12196,44 @@ var Print = /*#__PURE__*/function () {
12174
12196
  }
12175
12197
 
12176
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)) {
12177
- _context6.next = 22;
12199
+ _context6.next = 29;
12178
12200
  break;
12179
12201
  }
12180
12202
 
12181
- return _context6.abrupt("break", 48);
12182
-
12183
- case 22:
12184
- widthPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.widthMm, true);
12185
- heightPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.heightMm, true);
12186
- orientation = widthPixes > heightPixes ? 'l' : 'p';
12187
- formats = [widthPixes, heightPixes];
12188
- format = a4Size[orientation];
12189
- svg2pdfOptions = {
12190
- x: 0,
12191
- y: 0
12192
- };
12193
-
12194
- if (hoEditorFactory.isFixedPrintToA4 && format) {
12195
- if (orientation == 'l') {
12196
- svg2pdfOptions.x = format[0] - widthPixes;
12197
- svg2pdfOptions.y = (format[1] - heightPixes) / 2;
12198
- } else {
12199
- svg2pdfOptions.x = (format[0] - widthPixes) / 2;
12200
- }
12201
- }
12203
+ return _context6.abrupt("break", 50);
12202
12204
 
12205
+ case 29:
12203
12206
  if (!hoEditorFactory.isUseImagePrint) {
12204
- _context6.next = 39;
12207
+ _context6.next = 41;
12205
12208
  break;
12206
12209
  }
12207
12210
 
12208
- if (formats.length == 2 && !hoEditorFactory.isFixedPrintToA4) {
12211
+ if (formats.length == 2 && hoEditorFactory.isFixedPrintToA4 == '1') {
12209
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');
12210
12215
  } else {
12211
12216
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
12212
12217
  }
12213
12218
 
12214
12219
  ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
12215
12220
 
12216
- if (hoEditorFactory.isFixedPrintToA4T && format && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5' && index == 0) {
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') {
12217
12231
  // 避免切换纸张的打印方式 绘制只处理竖向情况
12218
12232
  if (orientation === 'p') {
12219
- ctx.translate(0, 1122 / 2); // 由于旋转是默认以左上角为中心 所以需要先移动位置 改变起始点
12220
-
12221
- ctx.rotate(270 * Math.PI / 180); // 旋转 context2d
12233
+ // 旋转是默认以左上角为中心 需要先移动位置 再进行旋转
12234
+ ctx.translate(0, 1122 / 2);
12235
+ ctx.rotate(270 * Math.PI / 180);
12236
+ hoEditorFactory.isRotate = true;
12222
12237
  }
12223
12238
  }
12224
12239
 
@@ -12226,10 +12241,10 @@ var Print = /*#__PURE__*/function () {
12226
12241
  ctx.posY = svg2pdfOptions.y;
12227
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));
12228
12243
  ctx = null;
12229
- _context6.next = 45;
12244
+ _context6.next = 47;
12230
12245
  break;
12231
12246
 
12232
- case 39:
12247
+ case 41:
12233
12248
  _ctx6 = new canvas2svg({
12234
12249
  width: widthPixes,
12235
12250
  height: orientation === 'l' ? heightPixes - 1 : heightPixes,
@@ -12243,37 +12258,37 @@ var Print = /*#__PURE__*/function () {
12243
12258
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
12244
12259
  }
12245
12260
 
12246
- _context6.next = 44;
12261
+ _context6.next = 46;
12247
12262
  return svg2pdf((_ctx7 = _ctx6) === null || _ctx7 === void 0 ? void 0 : _ctx7.getSvg(), PDF, svg2pdfOptions);
12248
12263
 
12249
- case 44:
12264
+ case 46:
12250
12265
  _ctx6 = null;
12251
12266
 
12252
- case 45:
12267
+ case 47:
12253
12268
  index > 0 && ((_cpage$drawDomLevel12 = cpage.drawDomLevel) === null || _cpage$drawDomLevel12 === void 0 ? void 0 : _cpage$drawDomLevel12.clearStage());
12254
12269
 
12255
- case 46:
12256
- _context6.next = 10;
12257
- break;
12258
-
12259
12270
  case 48:
12260
- _context6.next = 53;
12271
+ _context6.next = 17;
12261
12272
  break;
12262
12273
 
12263
12274
  case 50:
12264
- _context6.prev = 50;
12265
- _context6.t0 = _context6["catch"](8);
12275
+ _context6.next = 55;
12276
+ break;
12277
+
12278
+ case 52:
12279
+ _context6.prev = 52;
12280
+ _context6.t0 = _context6["catch"](15);
12266
12281
 
12267
12282
  _iterator4.e(_context6.t0);
12268
12283
 
12269
- case 53:
12270
- _context6.prev = 53;
12284
+ case 55:
12285
+ _context6.prev = 55;
12271
12286
 
12272
12287
  _iterator4.f();
12273
12288
 
12274
- return _context6.finish(53);
12289
+ return _context6.finish(55);
12275
12290
 
12276
- case 56:
12291
+ case 58:
12277
12292
  if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) {
12278
12293
  hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
12279
12294
  }
@@ -12291,12 +12306,12 @@ var Print = /*#__PURE__*/function () {
12291
12306
  hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
12292
12307
  reslove();
12293
12308
 
12294
- case 60:
12309
+ case 62:
12295
12310
  case "end":
12296
12311
  return _context6.stop();
12297
12312
  }
12298
12313
  }
12299
- }, _callee5, null, [[8, 50, 53, 56]]);
12314
+ }, _callee5, null, [[15, 52, 55, 58]]);
12300
12315
  }));
12301
12316
 
12302
12317
  function printAllNew(_x15, _x16, _x17, _x18) {
@@ -26248,10 +26263,28 @@ var CellNode = /*#__PURE__*/function (_RectNode) {
26248
26263
  // return;
26249
26264
  // }
26250
26265
  // }
26266
+ //const startPath = `${this.getNodePath()}/0`;
26267
+ //const startPath = hoEditorFactory.docTree.curDomRange.startPath;
26268
+
26251
26269
 
26270
+ var endPath = "";
26271
+ var startPath = "";
26272
+
26273
+ if (this.table.tableProperty.isAutoChangeLine) {
26274
+ var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
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
+ }
26252
26287
 
26253
- var startPath = "".concat(this.getNodePath(), "/0");
26254
- var endPath = hoEditorFactory.docTree.getNodeLastPath(this);
26255
26288
  var aRange = new _DomRange__WEBPACK_IMPORTED_MODULE_24__/* .DomRange */ .a(this._hoEditorFactoryID, startPath, endPath);
26256
26289
  hoEditorFactory.docController.deleteRange(aRange, true);
26257
26290
  hoEditorFactory.docController.insertPlainTextAfterPath(startPath, value);
@@ -30609,27 +30642,32 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
30609
30642
  /* harmony export */ "C": function() { return /* binding */ ParagraphNode; }
30610
30643
  /* harmony export */ });
30611
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);
30612
- /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42015);
30613
- /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(16296);
30614
- /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83964);
30615
- /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46455);
30616
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41539);
30617
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_4__);
30618
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54747);
30619
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5__);
30620
- /* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40561);
30621
- /* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_6__);
30622
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9653);
30623
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_7__);
30624
- /* harmony import */ var _BaseNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(92178);
30625
- /* harmony import */ var _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(28275);
30626
- /* harmony import */ var _RectNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4428);
30627
- /* harmony import */ var _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(95329);
30628
- /* harmony import */ var _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(646);
30629
- /* harmony import */ var _TableNode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(59530);
30630
- /* harmony import */ var _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(69802);
30631
- /* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(28831);
30632
- /* harmony import */ var _CellNode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(69088);
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
+
30633
30671
 
30634
30672
 
30635
30673
 
@@ -30649,31 +30687,58 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
30649
30687
 
30650
30688
 
30651
30689
  var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30652
- (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(ParagraphNode, _BaseNode);
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);
30653
30691
 
30654
- var _super = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(ParagraphNode);
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);
30655
30693
 
30656
- function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo) {
30694
+ function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo, customProperty) {
30657
30695
  var _this;
30658
30696
 
30659
- (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(this, ParagraphNode);
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);
30660
30698
 
30661
- _this = _super.call(this, hoEditorFactoryID, rootNodes, parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_8__/* .NodeType.ntParagraph */ .Jq.ntParagraph);
30699
+ _this = _super.call(this, hoEditorFactoryID, rootNodes, parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType.ntParagraph */ .Jq.ntParagraph);
30662
30700
  _this._parentNode = parentNode;
30663
30701
  _this._drawLines = new Array();
30664
30702
  _this._drawNodes = _this._drawLines;
30665
30703
  _this._paraNo = paraNo;
30666
- _this._styleIndex = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(_this.hoEditorFactoryID).docTree.curStyleIndex;
30704
+ _this._styleIndex = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(_this.hoEditorFactoryID).docTree.curStyleIndex;
30667
30705
  _this._dTop = 0;
30668
30706
  _this._dHeight = 0;
30669
30707
  _this._pagePaintStart = null;
30670
30708
  _this._printAsSinglePage = false;
30671
- _this._docId = ""; // this.node2DrawNode();
30709
+ _this._docId = "";
30710
+ _this._customProperty = new Object();
30711
+
30712
+ if (customProperty) {
30713
+ _this.setCustomProperty(customProperty);
30714
+ } // this.node2DrawNode();
30715
+
30672
30716
 
30673
30717
  return _this;
30674
30718
  }
30675
30719
 
30676
- (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z)(ParagraphNode, [{
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
+ }, {
30677
30742
  key: "paraNo",
30678
30743
  get: function get() {
30679
30744
  return this._paraNo;
@@ -30700,6 +30765,16 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30700
30765
  this._styleIndex = val;
30701
30766
  }
30702
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
+ }
30703
30778
  }, {
30704
30779
  key: "combineParagraph",
30705
30780
  get: function get() {
@@ -30721,7 +30796,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30721
30796
  key: "drootNodes",
30722
30797
  get: function get() {
30723
30798
  if (!this._drawRoots) {
30724
- var _HOEditorFactorys$ins = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30799
+ var _HOEditorFactorys$ins = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30725
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),
30726
30801
  dCell = _HOEditorFactorys$ins2[0],
30727
30802
  dRoots = _HOEditorFactorys$ins2[1];
@@ -30734,7 +30809,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30734
30809
  }, {
30735
30810
  key: "refreshDrootNodes",
30736
30811
  value: function refreshDrootNodes() {
30737
- var _HOEditorFactorys$ins3 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30812
+ var _HOEditorFactorys$ins3 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30738
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),
30739
30814
  dCell = _HOEditorFactorys$ins4[0],
30740
30815
  dRoots = _HOEditorFactorys$ins4[1];
@@ -30745,7 +30820,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30745
30820
  key: "getParagraphLeftWidth",
30746
30821
  value: function getParagraphLeftWidth() {
30747
30822
  //如果父文档节点派生于rectNode(用于表格基类),则取
30748
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
30823
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
30749
30824
  var pNode = this._parentNode;
30750
30825
  var aLeft;
30751
30826
  var aWidth;
@@ -30761,7 +30836,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30761
30836
  aWidth = _pRectNode$getLeftWid2[1];
30762
30837
  bRectAlign = _pRectNode$getLeftWid2[2];
30763
30838
 
30764
- if (pRectNode instanceof _CellNode__WEBPACK_IMPORTED_MODULE_16__/* .CellNode */ .D) {
30839
+ if (pRectNode instanceof _CellNode__WEBPACK_IMPORTED_MODULE_18__/* .CellNode */ .D) {
30765
30840
  aLeft = hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[2] * 10, true);
30766
30841
  aWidth = aWidth - aLeft - hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[3] * 10, true);
30767
30842
  bRectAlign = true;
@@ -30784,7 +30859,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30784
30859
  var dline = this._drawLines[index];
30785
30860
 
30786
30861
  if (dline) {
30787
- var _HOEditorFactorys$ins5 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30862
+ var _HOEditorFactorys$ins5 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30788
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),
30789
30864
  dCell = _HOEditorFactorys$ins6[0],
30790
30865
  dRoots = _HOEditorFactorys$ins6[1];
@@ -30812,9 +30887,9 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30812
30887
  // }
30813
30888
 
30814
30889
  while (pNode) {
30815
- if (pNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_10__/* .RectNode */ .z) {
30890
+ if (pNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z) {
30816
30891
  return pNode;
30817
- } else if (pNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_14__/* .TextInputFieldNode */ .re && pNode.alignWithBlocked) {
30892
+ } else if (pNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_16__/* .TextInputFieldNode */ .re && pNode.alignWithBlocked) {
30818
30893
  return pNode;
30819
30894
  } else {
30820
30895
  pNode = pNode.parentNode;
@@ -30826,14 +30901,14 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30826
30901
  }, {
30827
30902
  key: "updateCombineParagraph",
30828
30903
  value: function updateCombineParagraph() {
30829
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
30904
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
30830
30905
  var para = hoEditorFactory.docTree.paragraphs[this._paraNo];
30831
30906
 
30832
30907
  if (!para) {
30833
30908
  para = hoEditorFactory.docTree.paragraphs[0];
30834
30909
  }
30835
30910
 
30836
- return _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .Paragraph.para2CombinePara */ .nv.para2CombinePara(this._hoEditorFactoryID, this, para, hoEditorFactory.docTree.combineParagraph);
30911
+ return _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Paragraph.para2CombinePara */ .nv.para2CombinePara(this._hoEditorFactoryID, this, para, hoEditorFactory.docTree.combineParagraph);
30837
30912
  }
30838
30913
  /**
30839
30914
  * @author xyl
@@ -30873,10 +30948,10 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30873
30948
 
30874
30949
  if (index > 0) {
30875
30950
  var prevLine = this._drawLines[index - 1];
30876
- if (prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__/* .DrawLine */ .a) prevLine.updateLineStyle();
30951
+ if (prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a) prevLine.updateLineStyle();
30877
30952
  }
30878
30953
 
30879
- var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__/* .DrawLine */ .a(this._rootPath, this, index, paragraphWidth);
30954
+ var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a(this._rootPath, this, index, paragraphWidth);
30880
30955
  aline.dTop = itop;
30881
30956
  aline.dLeft = ileft;
30882
30957
  aline.x = this.combineParagraph.leftMarginPixes;
@@ -30927,7 +31002,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30927
31002
  var dline = this.drawlines[i];
30928
31003
 
30929
31004
  if (dline) {
30930
- if (dline instanceof _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_12__/* .DrawTable */ .t) {
31005
+ if (dline instanceof _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_14__/* .DrawTable */ .t) {
30931
31006
  dline.clear();
30932
31007
  } else {
30933
31008
  if (dline.parent) {
@@ -30945,12 +31020,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30945
31020
  key: "node2DrawNode",
30946
31021
  value: function node2DrawNode() {
30947
31022
  this.clear();
30948
- var itop = this.combineParagraph.topMarginPixes + _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
31023
+ var itop = this.combineParagraph.topMarginPixes + _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
30949
31024
  var leftTopInfos = this.getParagraphLeftWidth();
30950
31025
  var ileft = leftTopInfos[0];
30951
31026
  var paragraphWidth = leftTopInfos[1]; // console.log(this._combineParagraph);
30952
31027
 
30953
- var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__/* .DrawLine */ .a(this._rootPath, this, 0, paragraphWidth);
31028
+ var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a(this._rootPath, this, 0, paragraphWidth);
30954
31029
  this._dHeight = aline.dHeight;
30955
31030
 
30956
31031
  this._drawLines.push(aline);
@@ -30985,7 +31060,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30985
31060
  // this.drootNodes.push(this.drawlines[0]);
30986
31061
  // }
30987
31062
  if (dline) {
30988
- var dTop = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
31063
+ var dTop = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
30989
31064
  this.placeDNodeAfterDTop(dTop, dline); // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.insertDline(droots,index+1,this._drawLines[0]);
30990
31065
  }
30991
31066
  }
@@ -31003,7 +31078,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31003
31078
  var dline = prevDline;
31004
31079
 
31005
31080
  while (index === -1) {
31006
- var _TableNode$isNodeInTa = _TableNode__WEBPACK_IMPORTED_MODULE_13__/* .TableNode.isNodeInTable */ .Fh.isNodeInTable(dline.paragraphNode),
31081
+ var _TableNode$isNodeInTa = _TableNode__WEBPACK_IMPORTED_MODULE_15__/* .TableNode.isNodeInTable */ .Fh.isNodeInTable(dline.paragraphNode),
31007
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),
31008
31083
  bret = _TableNode$isNodeInTa2[0],
31009
31084
  aTable = _TableNode$isNodeInTa2[1],
@@ -31078,7 +31153,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31078
31153
  }, {
31079
31154
  key: "isInCell",
31080
31155
  value: function isInCell() {
31081
- return this.parentNode !== null && this.parentNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_10__/* .RectNode */ .z;
31156
+ return this.parentNode !== null && this.parentNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z;
31082
31157
  }
31083
31158
  }, {
31084
31159
  key: "drawlines",
@@ -31088,7 +31163,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31088
31163
  }, {
31089
31164
  key: "adjustNextDline",
31090
31165
  value: function adjustNextDline(dline, index) {
31091
- var droots = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(dline.rootPath);
31166
+ var droots = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(dline.rootPath);
31092
31167
  var dNextLine = this.getNextDline(dline);
31093
31168
 
31094
31169
  for (var i = index; i < dline.drawItems.length; i++) {
@@ -31100,7 +31175,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31100
31175
  }, {
31101
31176
  key: "getParagraphLastNodePath",
31102
31177
  value: function getParagraphLastNodePath() {
31103
- return _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.getParaNodeLastPath(this); // return this.getParagraphLastNode().getNodePath()
31178
+ return _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.getParaNodeLastPath(this); // return this.getParagraphLastNode().getNodePath()
31104
31179
  // const pNode = this._parentNode;
31105
31180
  // if (pNode) {
31106
31181
  // const index = pNode.childNodes.indexOf(this);
@@ -31139,7 +31214,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31139
31214
  value: function updateDrawLineStyle() {
31140
31215
  for (var i = 0; i < this._drawLines.length; i++) {
31141
31216
  var dline = this._drawLines[i];
31142
- if (dline instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__/* .DrawLine */ .a) dline.updateLineStyle();
31217
+ if (dline instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a) dline.updateLineStyle();
31143
31218
  } // if (dline instanceof DrawLine) dline.updateLineStyle();
31144
31219
 
31145
31220
  }
@@ -31169,12 +31244,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31169
31244
  }, {
31170
31245
  key: "node2Json",
31171
31246
  value: function node2Json(range, iscopy) {
31172
- var combinePara = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .CombineParagraph */ .kh(this._hoEditorFactoryID, null);
31247
+ var combinePara = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .CombineParagraph */ .kh(this._hoEditorFactoryID, null);
31173
31248
  combinePara.copyStyle(this.combineParagraph);
31174
31249
  var paragraphStyle = {
31175
31250
  height: this.dHeight,
31176
31251
  top: this.dTop,
31177
- align: _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .Align */ .xM[combinePara.align],
31252
+ align: _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[combinePara.align],
31178
31253
  charSpace: combinePara.charSpace,
31179
31254
  lineSpace: combinePara.lineSpace,
31180
31255
  leftMargin: combinePara.leftMarginMm,
@@ -31190,14 +31265,15 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31190
31265
  //paragraphJson._align = Align[parseInt(paragraphJson._align)];
31191
31266
 
31192
31267
  var paga = {
31193
- nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_8__/* .NodeType */ .Jq[this.nodeType],
31268
+ nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType */ .Jq[this.nodeType],
31194
31269
  style: paragraphStyle,
31195
31270
  // height: this.dHeight,
31196
31271
  // top: this.dTop,
31197
31272
  styleIndex: this._paraNo,
31198
31273
  textStyleNo: this.styleIndex,
31199
31274
  printAsSinglePage: this.printAsSinglePage,
31200
- docId: this.docId
31275
+ docId: this.docId,
31276
+ customProperty: this.customProperty
31201
31277
  }; //const dictType = NodeType[this.nodeType].substring(2);
31202
31278
 
31203
31279
  if (iscopy) {
@@ -31253,20 +31329,20 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31253
31329
  var paraNo = Number(json.styleIndex);
31254
31330
 
31255
31331
  if (json["style"]) {
31256
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(hoEditorFactoryID);
31332
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(hoEditorFactoryID);
31257
31333
  var style = json.style;
31258
- var paragraph = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .Paragraph */ .nv(hoEditorFactoryID);
31334
+ var paragraph = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Paragraph */ .nv(hoEditorFactoryID);
31259
31335
  paragraph.leftMargin = style._leftMarginMm ? Number(style._leftMarginMm) : Number(style.leftMargin);
31260
31336
  paragraph.rightMargin = style._rightMarginMm ? Number(style._rightMarginMm) : Number(style.rightMargin);
31261
31337
  paragraph.topMargin = style._topMarginMm ? Number(style._topMarginMm) : Number(style.topMargin);
31262
31338
  paragraph.bottomMargin = style._bottomMarginMm ? Number(style._bottomMarginMm) : Number(style.bottomMargin);
31263
- paragraph.align = style._align !== undefined ? parseInt(_domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .Align */ .xM[style._align]) : parseInt(_domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .Align */ .xM[style.align]);
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]);
31264
31340
  paragraph.charSpace = style._charSpace ? Number(style._charSpace) : Number(style.charSpace);
31265
31341
  paragraph.lineSpace = style._lineSpace ? Number(style._lineSpace) : Number(style.lineSpace);
31266
31342
  paraNo = hoEditorFactory.docTree.styleCompare(paragraph);
31267
31343
  }
31268
31344
 
31269
- var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo);
31345
+ var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo, json.customProperty);
31270
31346
  paragraphNode.docId = json.docId && json.docId !== "" ? json.docId : "";
31271
31347
  paragraphNode.printAsSinglePage = json.printAsSinglePage ? json.printAsSinglePage === "true" ? true : false : false;
31272
31348
  paragraphNode.styleIndex = json.textStyleNo ? Number(json.textStyleNo) : 0; // paragraphNode._dHeight = Number(json.height);
@@ -31277,7 +31353,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31277
31353
  }]);
31278
31354
 
31279
31355
  return ParagraphNode;
31280
- }(_BaseNode__WEBPACK_IMPORTED_MODULE_8__/* .BaseNode */ .Hd);
31356
+ }(_BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .BaseNode */ .Hd);
31281
31357
 
31282
31358
  /***/ }),
31283
31359
 
@@ -33396,7 +33472,7 @@ var RadioAndCheckBoxNode = /*#__PURE__*/function (_ControlNode) {
33396
33472
  }
33397
33473
 
33398
33474
  json.isAllowDelete = !json.isAllowDelete ? false : json.isAllowDelete;
33399
- json.isSelected = !json.isSelected ? false : json.isSelected;
33475
+ json.isSelected = !json.isSelected ? false : json.isSelected.text != undefined ? json.isSelected.text : json.isSelected;
33400
33476
  json.boxAlign = !json.boxAlign ? false : json.boxAlign;
33401
33477
  json.isEditText = !json.isEditText ? false : json.isEditText;
33402
33478
  json.isTransToText = !json.isTransToText ? false : json.isTransToText;
@@ -38536,12 +38612,13 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
38536
38612
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38537
38613
  /* harmony export */ "OL": function() { return /* binding */ DownListProperty; },
38538
38614
  /* harmony export */ "ZX": function() { return /* binding */ DataFormat; },
38615
+ /* harmony export */ "Zi": function() { return /* binding */ InputFieldType; },
38539
38616
  /* harmony export */ "hc": function() { return /* binding */ ExecuteStatus; },
38540
38617
  /* harmony export */ "mK": function() { return /* binding */ ReadOnlyStatus; },
38541
38618
  /* harmony export */ "re": function() { return /* binding */ TextInputFieldNode; },
38542
38619
  /* harmony export */ "wz": function() { return /* binding */ DataVerifyFormat; }
38543
38620
  /* harmony export */ });
38544
- /* unused harmony exports InputFieldType, SpecialFormat, BandDataSource */
38621
+ /* unused harmony exports SpecialFormat, BandDataSource */
38545
38622
  /* harmony import */ var element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86769);
38546
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__);
38547
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);
@@ -53516,6 +53593,12 @@ var DrawTextNode = /*#__PURE__*/function (_DrawCombineNode) {
53516
53593
  }
53517
53594
  }
53518
53595
 
53596
+ if (hoEditorFactory.isEnabledGlobalColor) {
53597
+ if (!(this.node instanceof MarkNode/* MarkNode */.j) && this.node.parentNode.inputFieldType === 0) {
53598
+ backColor = "transparent";
53599
+ }
53600
+ }
53601
+
53519
53602
  if (this.node.parentNode.enableGlobalColor) {
53520
53603
  backColor = "transparent";
53521
53604
  }
@@ -98068,7 +98151,8 @@ while(len--){curDa=sa.shift();if(typeof curDa!=="string"||Array.isArray(curDa)&&
98068
98151
  //we assume the user knows what they are doing.
98069
98152
  //Convert text into an array anyway to simplify
98070
98153
  //later code.
98071
- if(typeof text==="string"){if(text.match(/[\r?\n]/)){text=[text.replace(/\r\n|\r|\n/g,'')];}else{text=[text];}}//baseline
98154
+ if(typeof text==="string"){if(text.match(/[\r?\n]/)){text=[text.replace(/\r\n|\r|\n/g,'')];// 自定义修改 处理打印回车的问题
98155
+ }else{text=[text];}}//baseline
98072
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
98073
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
98074
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
@@ -98086,7 +98170,8 @@ var prevWidth=0;var newX;if(align==="right"){//The passed in x coordinate define
98086
98170
  //rightmost point of the text.
98087
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
98088
98172
  //the center point.
98089
- 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){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
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
98090
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
98091
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
98092
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
@@ -98892,6 +98977,7 @@ stream.push(formObject.scope.__private__.encodeColorString(formObject.color));st
98892
98977
  stream.push(calcRes.text);stream.push("ET");// End Text
98893
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
98894
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
+ // 自定义修改 字符间距
98895
98981
  var textSplit=text.split("");var fontSize=maxFontSize;// The Starting fontSize (The Maximum)
98896
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
98897
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
@@ -99525,7 +99611,8 @@ out+=String.fromCharCode.apply(null,buf.subarray(i,i+ARRAY_APPLY_BATCH));}return
99525
99611
  * @param {posY}
99526
99612
  *
99527
99613
  * @returns jsPDF
99528
- */jsPDFAPI.addImage=function(){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
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
99529
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;
99530
99617
  // if(posY) y += posY;
99531
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
@@ -99980,7 +100067,8 @@ var f2,getHorizontalCoordinateString,getVerticalCoordinateString,getHorizontalCo
99980
100067
  * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />
99981
100068
  * A pattern object to use to fill the drawing (not supported by context2d)
99982
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 ,以适配不支持透明度的打印机
99983
- if(rgba.a<1){this.ctx.fillOpacity=0;}else{this.ctx.fillOpacity=rgba.a;}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});}});/**
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});}});/**
99984
100072
  * Sets or returns the color, gradient, or pattern used for strokes
99985
100073
  *
99986
100074
  * @name strokeStyle
@@ -100019,7 +100107,8 @@ if(fontFace!==null){fontFace.ref={name:family,style:style};fontFaces.push(fontFa
100019
100107
  * will be used. If not set it will fallback to previous behavior.
100020
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
100021
100109
  // eslint-disable-next-line no-useless-escape
100022
- 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;}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?)
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?)
100023
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){//自定义修改
100024
100113
  if(value<1){this.ctx.globalAlpha=0;}else{this.ctx.globalAlpha=value;}}});/**
100025
100114
  * A float specifying the amount of the line dash offset. The default value is 0.0.
@@ -100059,7 +100148,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
100059
100148
  * @function
100060
100149
  * @param x {Number} The x-coordinate of where to move the path to
100061
100150
  * @param y {Number} The y-coordinate of where to move the path to
100062
- */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");}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);};/**
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);};/**
100063
100153
  * Creates a path from the current point back to the starting point
100064
100154
  *
100065
100155
  * @name closePath
@@ -100073,7 +100163,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
100073
100163
  * @param x The x-coordinate of where to create the line to
100074
100164
  * @param y The y-coordinate of where to create the line to
100075
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).
100076
- */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");}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);};/**
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);};/**
100077
100168
  * Clips a region of any shape and size from the original canvas
100078
100169
  *
100079
100170
  * @name clip
@@ -100226,7 +100317,9 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
100226
100317
  * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
100227
100318
  * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
100228
100319
  * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.
100229
- */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;putText.call(this,{text:text,x:x,y:y,scale:scale,renderingMode:"stroke",angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace});};/**
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
+ });};/**
100230
100323
  * Returns an object that contains the width of the specified text
100231
100324
  *
100232
100325
  * @name measureText
@@ -100290,6 +100383,7 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
100290
100383
  // if (isNaN(f)){
100291
100384
  // f=0;
100292
100385
  // }
100386
+ // 自定义修改 处理打印图片报错
100293
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);
100294
100388
  };/**
100295
100389
  * Resets the current transform to the identity matrix. Then runs transform()
@@ -100318,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
100318
100412
  * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
100319
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
100320
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);
100321
- 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;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"){// console.log("使用canvas绘制图像");
100322
- this.pdf.addImage(img.toDataURL("image/jpg"),'',xRect.x,xRect.y,xRect.w,xRect.h);}else{// console.log("pdf.addImage绘制图片", xRect.x, xRect.y, xRect.w, xRect.h, null, null, angle);
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{// 自定义修改
100323
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;};/**
100324
100419
  * Processes the paths
100325
100420
  *
@@ -100340,10 +100435,13 @@ return y;case"alphabetic":default:return y;}};var getTextBottom=function getText
100340
100435
  * @param counterclockwise
100341
100436
  * @param style
100342
100437
  * @param isClip
100343
- */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,' ');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;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});if(needsClipping){this.pdf.restoreGraphicsState();}}}else{// This text is the last element of the page, but it got cut off due to the margin
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
100344
100442
  // so we render it in the next page
100345
100443
  if(textBoundsOnPage.y<pageHeightMinusBottomMargin){// As a result, all other elements have their y offset increased
100346
- 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;}// console.log("options.text",options.text);
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;}// 自定义修改
100347
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,
100348
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(" "));};/**
100349
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.
@@ -101197,7 +101295,8 @@ var startOfLine=i;workingLen=0;while(i!==l){if(workingLen+widths_array[i]>maxLen
101197
101295
  // By default, for PDF, it's "point".
101198
101296
  var splitParagraphIntoLines=function splitParagraphIntoLines(text,maxlen,options){// at this time works only on Western scripts, ones with space char
101199
101297
  // separating the words. Feel free to expand.
101200
- if(!options){options={};}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.
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.
101201
101300
  // we just chop these to size. We do NOT insert hiphens
101202
101301
  tmp=splitLongWord.apply(this,[word,widths_array,maxlen-(line_length+separator_length),maxlen]);// first line we add to existing line object
101203
101302
  line.push(tmp.shift());// it's ok to have extra space indicator there
@@ -199013,7 +199112,7 @@ var es_function_name = __webpack_require__(68309);
199013
199112
  // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
199014
199113
  var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(77203);
199015
199114
  var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
199016
- ;// 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=08a395d8&
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&
199017
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()}
199018
199117
  var staticRenderFns = []
199019
199118
 
@@ -206996,7 +207095,7 @@ var SignNode = __webpack_require__(78975);
206996
207095
  // EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
206997
207096
  var ParagraphNode = __webpack_require__(13880);
206998
207097
  ;// CONCATENATED MODULE: ./src/components/version.ts
206999
- /* harmony default export */ var version = ('2.0.58');
207098
+ /* harmony default export */ var version = ('2.0.61');
207000
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&
207001
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)}
207002
207101
  var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_staticRenderFns = []
@@ -209152,9 +209251,7 @@ var DrawPageTree = /*#__PURE__*/function () {
209152
209251
  }
209153
209252
 
209154
209253
  if (dPage.drawDomLevel && dPage.drawDomLevel.stage) {
209155
- {
209156
- dPage.drawDomLevel.clearStage();
209157
- }
209254
+ dPage.drawDomLevel.clearStage();
209158
209255
  }
209159
209256
  }
209160
209257
  }
@@ -214664,6 +214761,7 @@ var StagePosition = __webpack_require__(80691);
214664
214761
 
214665
214762
 
214666
214763
 
214764
+
214667
214765
 
214668
214766
 
214669
214767
  var VueController = /*#__PURE__*/function () {
@@ -220486,6 +220584,44 @@ var VueController = /*#__PURE__*/function () {
220486
220584
  hoEditorFactory.docTree.curDomRange = newRange;
220487
220585
  hoEditorFactory.drawTree.moveCaretToPath(curDomRange.startPath);
220488
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
+ }
220489
220625
  /**
220490
220626
  * 初始化文档
220491
220627
  */
@@ -220726,6 +220862,11 @@ var VueController = /*#__PURE__*/function () {
220726
220862
  node.imageDataBase64String = src;
220727
220863
  hoEditorFactory.docTree.change(changeEvent);
220728
220864
  }
220865
+ }, {
220866
+ key: "setParaCustomProperty",
220867
+ value: function setParaCustomProperty(paragraphNode, customProperty) {
220868
+ paragraphNode.setCustomProperty(customProperty);
220869
+ }
220729
220870
  }]);
220730
220871
 
220731
220872
  return VueController;
@@ -222788,7 +222929,7 @@ var PrintController = /*#__PURE__*/function () {
222788
222929
  beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
222789
222930
  xml = hoEditorFactory.vueController.getDocXml(true);
222790
222931
  htmlText = {
222791
- text: ""
222932
+ text: ''
222792
222933
  };
222793
222934
  hPromise = Promise.resolve();
222794
222935
  hPromise = hPromise.then(function () {
@@ -222859,12 +223000,14 @@ var PrintController = /*#__PURE__*/function () {
222859
223000
  path = hoEditorFactory.docTree.curDomRange.normalize().endPath;
222860
223001
  beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
222861
223002
  xml = hoEditorFactory.vueController.getDocXml(true);
222862
- orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
223003
+ orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
222863
223004
  format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
222864
223005
  options = {
222865
223006
  orientation: orientation,
222866
- unit: "px",
222867
- format: format
223007
+ unit: 'px',
223008
+ format: format,
223009
+ hotfixes: ['px_scaling'],
223010
+ compress: true
222868
223011
  };
222869
223012
  PDF = new jspdf/* default */.ZP(options);
222870
223013
  hPromise = Promise.resolve();
@@ -222887,7 +223030,7 @@ var PrintController = /*#__PURE__*/function () {
222887
223030
  hoEditorFactory.vueController.openXml(xml);
222888
223031
  PDF.deletePage(1);
222889
223032
  return new Promise(function (resolves) {
222890
- resolves(PDF.output("datauristring"));
223033
+ resolves(PDF.output('datauristring'));
222891
223034
  });
222892
223035
  });
222893
223036
 
@@ -222902,7 +223045,7 @@ var PrintController = /*#__PURE__*/function () {
222902
223045
  setTimeout(function () {
222903
223046
  hoEditorFactory.vueController.moveCaretToPath(path);
222904
223047
  }, 0);
222905
- 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,/, ''));
222906
223049
 
222907
223050
  case 20:
222908
223051
  return _context2.abrupt("return", null);
@@ -222929,10 +223072,10 @@ var PrintController = /*#__PURE__*/function () {
222929
223072
  }, {
222930
223073
  key: "setjsPDFFonts",
222931
223074
  value: function setjsPDFFonts(font) {
222932
- jspdf/* default.API.events.push */.ZP.API.events.push(["addFonts", function () {
222933
- this.addFileToVFS("SimSun-normal.ttf", font);
222934
- this.addFont("SimSun-normal.ttf", "SimSun", "normal");
222935
- this.setFont("SimSun", "normal");
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');
222936
223079
  }]);
222937
223080
  this._isSetFont = true;
222938
223081
 
@@ -222963,8 +223106,8 @@ var PrintController = /*#__PURE__*/function () {
222963
223106
  return;
222964
223107
  }
222965
223108
 
222966
- var fileType = type ? type : "pdf";
222967
- 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() : '电子病历文档'; // 保存打印前文档状态 和 内容
222968
223111
 
222969
223112
  var beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
222970
223113
  var xml = hoEditorFactory.vueController.getDocXml(true);
@@ -222978,21 +223121,21 @@ var PrintController = /*#__PURE__*/function () {
222978
223121
  });
222979
223122
  hPromise = hPromise.then(function () {
222980
223123
  return new Promise(function (resolve) {
222981
- var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
223124
+ var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
222982
223125
  var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
222983
223126
 
222984
- if (hoEditorFactory.isFixedPrintToA4 && isSpecial) {
223127
+ if (hoEditorFactory.isFixedPrintToA4 == '1' && isSpecial) {
222985
223128
  format = _this3._a4Size[orientation];
222986
223129
  }
222987
223130
 
222988
- if (hoEditorFactory.isFixedPrintToA4T && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223131
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
222989
223132
  format = [793, 1122];
222990
223133
  orientation = 'p';
222991
223134
  }
222992
223135
 
222993
223136
  var options = {
222994
223137
  orientation: orientation,
222995
- unit: "px",
223138
+ unit: 'px',
222996
223139
  format: format
222997
223140
  };
222998
223141
  // const PDF = new jsPDF(orientation, "px", [hoEditorFactory.pageProperty.widthMm, hoEditorFactory.pageProperty.heightMm], false, true, );
@@ -223022,14 +223165,20 @@ var PrintController = /*#__PURE__*/function () {
223022
223165
 
223023
223166
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
223024
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
+
223025
223174
  hoEditorFactory.startPageNum = 0;
223026
223175
  hoEditorFactory.firstPageStartTop = 0;
223027
223176
 
223028
223177
  if (!this._isSetFont) {
223029
223178
  this._waitPrint = true;
223030
223179
 
223031
- 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>", "提示", {
223032
- iconClass: "el-icon-loading",
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',
223033
223182
  center: true,
223034
223183
  showConfirmButton: false,
223035
223184
  dangerouslyUseHTMLString: true
@@ -223043,12 +223192,12 @@ var PrintController = /*#__PURE__*/function () {
223043
223192
  }
223044
223193
 
223045
223194
  if (printMode && printAppoint) {
223046
- var appoint = printAppoint.replace(/\s*/g, "").replace(/[^\d]/g, ",").split(",");
223195
+ var appoint = printAppoint.replace(/\s*/g, '').replace(/[^\d]/g, ',').split(',');
223047
223196
  var maxLen = hoEditorFactory.drawTree.drawPages.length;
223048
223197
  var error = appoint.filter(function (pages) {
223049
223198
  return pages && Number(pages) > maxLen;
223050
223199
  });
223051
- if (error.length > 0) return "指定页输入超出文档页范围";
223200
+ if (error.length > 0) return '指定页输入超出文档页范围';
223052
223201
  }
223053
223202
 
223054
223203
  var setStatus = new Promise( /*#__PURE__*/function () {
@@ -223093,23 +223242,23 @@ var PrintController = /*#__PURE__*/function () {
223093
223242
  setStatus.then(function (res) {
223094
223243
  if (res) {
223095
223244
  return new Promise(function (reslove, reject) {
223096
- var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
223245
+ var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
223097
223246
  var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
223098
223247
 
223099
- if (hoEditorFactory.isFixedPrintToA4) {
223248
+ if (hoEditorFactory.isFixedPrintToA4 == '1') {
223100
223249
  format = _this4._a4Size[orientation];
223101
223250
  }
223102
223251
 
223103
- if (hoEditorFactory.isFixedPrintToA4T && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223252
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223104
223253
  format = [793, 1122];
223105
223254
  orientation = 'p';
223106
223255
  }
223107
223256
 
223108
223257
  var options = {
223109
223258
  orientation: orientation,
223110
- unit: "px",
223259
+ unit: 'px',
223111
223260
  format: format,
223112
- hotfixes: ["px_scaling"],
223261
+ hotfixes: ['px_scaling'],
223113
223262
  compress: true
223114
223263
  };
223115
223264
  var PDF = new jspdf/* default */.ZP(options);
@@ -223117,20 +223266,26 @@ var PrintController = /*#__PURE__*/function () {
223117
223266
  });
223118
223267
  }
223119
223268
  }).then(function (res) {
223120
- if (res === "printend") {
223269
+ if (res === 'printend') {
223121
223270
  if (callback) {
223122
223271
  callback(hoEditorFactory.printStatus.printRecord.last());
223123
223272
  }
223124
223273
 
223125
- hoEditorFactory.drawTree.paintStatus = beforeStatus;
223126
- hoEditorFactory.printStatus.printRange = 2;
223127
223274
  hoEditorFactory.printStatus.printAppoint = '';
223128
223275
  hoEditorFactory.printStatus.drawPrintRecord.Position = [0, 0];
223129
223276
  hoEditorFactory.startPageNum = 0;
223130
223277
  hoEditorFactory.firstPageStartTop = 0;
223131
- hoEditorFactory.printStatus.clearArea();
223132
- hoEditorFactory.printStatus.drawPrintRecord.clear();
223133
- hoEditorFactory.drawTree.rebuildAllDrawLine(false);
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
+ }
223134
223289
  }
223135
223290
  });
223136
223291
  }
@@ -223198,7 +223353,7 @@ var PrintController = /*#__PURE__*/function () {
223198
223353
  while (1) {
223199
223354
  switch (_context5.prev = _context5.next) {
223200
223355
  case 0:
223201
- console.time("连续打印总用时");
223356
+ console.time('连续打印总用时');
223202
223357
  list = [];
223203
223358
  xmlInfoes.xmlList.forEach(function (v) {
223204
223359
  list.push([v.isMerge, v.xml]);
@@ -223217,7 +223372,7 @@ var PrintController = /*#__PURE__*/function () {
223217
223372
  hoEditorFactory.printStatus.printMode = 0;
223218
223373
  hoEditorFactory.drawTree.paintStatus = DrawTree/* PaintState.psPreview */.Dh.psPreview;
223219
223374
  hPromise = Promise.resolve();
223220
- console.time("连续查看病历合并总用时");
223375
+ console.time('连续查看病历合并总用时');
223221
223376
  hPromise = hPromise.then(function (res) {
223222
223377
  return new Promise(function (resolve) {
223223
223378
  Promise.all([hoEditorFactory.vueController.openDocsForPrint(list)]).then(function () {
@@ -223231,8 +223386,8 @@ var PrintController = /*#__PURE__*/function () {
223231
223386
  });
223232
223387
  });
223233
223388
  hPromise = hPromise.then(function () {
223234
- console.timeEnd("连续查看病历合并总用时");
223235
- console.time("生成pdf用时");
223389
+ console.timeEnd('连续查看病历合并总用时');
223390
+ console.time('生成pdf用时');
223236
223391
  return new Promise( /*#__PURE__*/function () {
223237
223392
  var _ref2 = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee4(resolve) {
223238
223393
  var orientation, format, options, PDF;
@@ -223240,23 +223395,23 @@ var PrintController = /*#__PURE__*/function () {
223240
223395
  while (1) {
223241
223396
  switch (_context4.prev = _context4.next) {
223242
223397
  case 0:
223243
- orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
223398
+ orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
223244
223399
  format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
223245
223400
 
223246
- if (hoEditorFactory.isFixedPrintToA4) {
223401
+ if (hoEditorFactory.isFixedPrintToA4 == '1') {
223247
223402
  format = _this5._a4Size[orientation];
223248
223403
  }
223249
223404
 
223250
- if (hoEditorFactory.isFixedPrintToA4T && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223405
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223251
223406
  format = [793, 1122];
223252
223407
  orientation = 'p';
223253
223408
  }
223254
223409
 
223255
223410
  options = {
223256
223411
  orientation: orientation,
223257
- unit: "px",
223412
+ unit: 'px',
223258
223413
  format: format,
223259
- hotfixes: ["px_scaling"]
223414
+ hotfixes: ['px_scaling']
223260
223415
  };
223261
223416
  PDF = new jspdf/* default */.ZP(options);
223262
223417
  PrintStatus/* Print.printToPDF */.Kh.printToPDF(_this5._hoEditorFactoryID, PDF, undefined, undefined, resolve, positionY, format);
@@ -223277,7 +223432,7 @@ var PrintController = /*#__PURE__*/function () {
223277
223432
  _context5.next = 17;
223278
223433
  return hPromise.then(function (res) {
223279
223434
  if (res) {
223280
- console.timeEnd("生成pdf用时");
223435
+ console.timeEnd('生成pdf用时');
223281
223436
  return new Promise(function (resolves) {
223282
223437
  var last = hoEditorFactory.printStatus.printRecord.last();
223283
223438
  var pos;
@@ -223312,7 +223467,7 @@ var PrintController = /*#__PURE__*/function () {
223312
223467
  // hoEditorFactory.drawTree.rebuildAllDrawLine(false);
223313
223468
  // }, 0);
223314
223469
 
223315
- console.timeEnd("连续打印总用时");
223470
+ console.timeEnd('连续打印总用时');
223316
223471
  resolves(pos);
223317
223472
  });
223318
223473
  } else {
@@ -223328,7 +223483,7 @@ var PrintController = /*#__PURE__*/function () {
223328
223483
  // hoEditorFactory.drawTree.rebuildAllDrawLine(false);
223329
223484
  // }, 0);
223330
223485
 
223331
- console.timeEnd("连续打印总用时");
223486
+ console.timeEnd('连续打印总用时');
223332
223487
  return null;
223333
223488
  }
223334
223489
  });
@@ -223366,7 +223521,7 @@ var PrintController = /*#__PURE__*/function () {
223366
223521
  }()
223367
223522
  /**
223368
223523
  * 批量打印病历 当前
223369
- * @param xmlList [boolean, string, boolean, boolean][]
223524
+ * @param xmlList [string, boolean, string, boolean][]
223370
223525
  * 四个参数分别是: xml内容 是否合并 病程记录id:用来判断是否是病程记录和返回对应病程记录的坐标(处理多个不同病程记录的情况) 是否是最后一份病程记录
223371
223526
  */
223372
223527
 
@@ -223390,8 +223545,8 @@ var PrintController = /*#__PURE__*/function () {
223390
223545
  xmlIndex = -1;
223391
223546
  mergeList = [];
223392
223547
  options = {
223393
- unit: "px",
223394
- hotfixes: ["px_scaling"],
223548
+ unit: 'px',
223549
+ hotfixes: ['px_scaling'],
223395
223550
  compress: true
223396
223551
  };
223397
223552
  PDF = new jspdf/* default */.ZP(options);
@@ -223475,7 +223630,7 @@ var PrintController = /*#__PURE__*/function () {
223475
223630
  hoEditorFactory.drawTree.paintStatus = beforePrintStatus;
223476
223631
  hoEditorFactory.vueController.openXml(xml);
223477
223632
  PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
223478
- name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : "电子病历文档";
223633
+ name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档';
223479
223634
  PrintStatus/* Print.openDataUriInWindow */.Kh.openDataUriInWindow(PDF, name, hoEditorFactory.pageProperty.widthPixes);
223480
223635
  }
223481
223636
 
@@ -224386,6 +224541,7 @@ var HOEditorFactory = /*#__PURE__*/function () {
224386
224541
  this._lastSaveTime = new Date(Date.now());
224387
224542
  this._superiorSigns = []; //上级医生签名
224388
224543
 
224544
+ this._isEnabledGlobalColor = false;
224389
224545
  this._hoEditorFactoryId = id;
224390
224546
  }
224391
224547
  /**
@@ -225044,13 +225200,13 @@ var HOEditorFactory = /*#__PURE__*/function () {
225044
225200
  }
225045
225201
  }
225046
225202
  }, {
225047
- key: "isFixedPrintToA4T",
225203
+ key: "isRotate",
225048
225204
  get: function get() {
225049
- return this._isFixedPrintToA4T;
225205
+ return this._isRotate;
225050
225206
  },
225051
225207
  set: function set(value) {
225052
- if (this._isFixedPrintToA4T !== value) {
225053
- this._isFixedPrintToA4T = value;
225208
+ if (this._isRotate !== value) {
225209
+ this._isRotate = value;
225054
225210
  }
225055
225211
  }
225056
225212
  }, {
@@ -225083,6 +225239,16 @@ var HOEditorFactory = /*#__PURE__*/function () {
225083
225239
  this._printBlack = value;
225084
225240
  }
225085
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
+ }
225086
225252
  }, {
225087
225253
  key: "clear",
225088
225254
  value: function clear() {
@@ -232606,14 +232772,14 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232606
232772
  _this.defaultDocProperty = {
232607
232773
  version: version,
232608
232774
  type: 0,
232609
- title: "",
232610
- docID: "",
232611
- patientID: "",
232612
- patientName: "",
232613
- lastEditTime: "",
232614
- lastEditorID: "",
232615
- lastEditorName: "",
232616
- currentIP: ""
232775
+ title: '',
232776
+ docID: '',
232777
+ patientID: '',
232778
+ patientName: '',
232779
+ lastEditTime: '',
232780
+ lastEditorID: '',
232781
+ lastEditorName: '',
232782
+ currentIP: ''
232617
232783
  };
232618
232784
  _this.contentIsModify = {
232619
232785
  isModify: false
@@ -232629,7 +232795,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232629
232795
  }, {
232630
232796
  key: "contentIsModifyChange",
232631
232797
  value: function contentIsModifyChange(value) {
232632
- this.$emit("contentIsModify", this.contentIsModify);
232798
+ this.$emit('contentIsModify', this.contentIsModify);
232633
232799
  }
232634
232800
  }, {
232635
232801
  key: "editJsonChange",
@@ -232646,12 +232812,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232646
232812
  }, {
232647
232813
  key: "textStyleChange",
232648
232814
  value: function textStyleChange(val) {
232649
- this.$emit("textStyleChange", val);
232815
+ this.$emit('textStyleChange', val);
232650
232816
  }
232651
232817
  }, {
232652
232818
  key: "modalStatusChange",
232653
232819
  value: function modalStatusChange(newStr) {
232654
- if (newStr[0] !== "find") {
232820
+ if (newStr[0] !== 'find') {
232655
232821
  this.setControlProperty(newStr[0], newStr[1], newStr[2]);
232656
232822
  } else {
232657
232823
  this.controlFindType = true;
@@ -232660,20 +232826,20 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232660
232826
  }, {
232661
232827
  key: "controlTypeChange",
232662
232828
  value: function controlTypeChange(newValue, oldValue) {
232663
- if (newValue === "" && ['text', 'date', 'comment'].includes(oldValue)) {
232664
- this.$emit("closeTextModal");
232829
+ if (newValue === '' && ['text', 'date', 'comment'].includes(oldValue)) {
232830
+ this.$emit('closeTextModal');
232665
232831
  this.customPropertyValue = {};
232666
232832
  }
232667
232833
 
232668
232834
  if (['text', 'date'].includes(newValue)) {
232669
232835
  if ((0,type/* isObject */.Kn)(this.customPropertyValue)) {
232670
- this.$emit("openTextModal", _objectSpread2({}, this.customPropertyValue));
232836
+ this.$emit('openTextModal', _objectSpread2({}, this.customPropertyValue));
232671
232837
  }
232672
232838
  } else if (['comment'].includes(newValue)) {
232673
232839
  var _HOEditorFactorys$ins;
232674
232840
 
232675
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;
232676
- if (customProperty) this.$emit("openTextModal", _objectSpread2({}, customProperty));
232842
+ if (customProperty) this.$emit('openTextModal', _objectSpread2({}, customProperty));
232677
232843
  }
232678
232844
  }
232679
232845
  }, {
@@ -232705,14 +232871,15 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232705
232871
  value: function isFixedPrintToA4Change() {
232706
232872
  var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
232707
232873
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
232708
- hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
232709
- }
232710
- }, {
232711
- key: "isFixedPrintToA4TChange",
232712
- value: function isFixedPrintToA4TChange() {
232713
- var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
232714
- var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
232715
- hoEditorFactory && (hoEditorFactory.isFixedPrintToA4T = this.isFixedPrintToA4T);
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);
232716
232883
  } // 监听默认打印纸张设置变化
232717
232884
 
232718
232885
  }, {
@@ -232756,6 +232923,13 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232756
232923
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
232757
232924
  hoEditorFactory && (hoEditorFactory.printBlack = this.printBlack);
232758
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
+ }
232759
232933
  }, {
232760
232934
  key: "created",
232761
232935
  value: function created() {
@@ -232786,7 +232960,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232786
232960
  }); // 初始化所有文档
232787
232961
 
232788
232962
  this.docList.forEach(function () {
232789
- var id = (0,util/* generateID */.y)("HO");
232963
+ var id = (0,util/* generateID */.y)('HO');
232790
232964
  var hoEditor = new HOEditorFactory(id);
232791
232965
 
232792
232966
  _this3.hoEditorFactoryIdList.push(id);
@@ -232795,11 +232969,18 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232795
232969
  hoEditor.superiorSigns = (0,toConsumableArray/* default */.Z)(_this3.superiorSigns);
232796
232970
  }
232797
232971
 
232798
- hoEditor.isFixedPrintToA4 = _this3.isFixedPrintToA4;
232799
- hoEditor.isFixedPrintToA4T = _this3.isFixedPrintToA4T;
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
+
232800
232980
  hoEditor.isUseImagePrint = _this3.isUseImagePrint;
232801
232981
  hoEditor.isUseForm = _this3.isUseForm;
232802
232982
  hoEditor.printBlack = _this3.printBlack;
232983
+ hoEditor.isEnabledGlobalColor = _this3.isEnabledGlobalColor;
232803
232984
  hoEditor.contentIsModify = _this3.contentIsModify;
232804
232985
  hoEditor.isCanEditHeadFoot = _this3.isCanEditHeadFoot;
232805
232986
  hoEditor.docTree.docProperty = _this3.defaultDocProperty;
@@ -232830,17 +233011,17 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232830
233011
 
232831
233012
  var getLabelNode = function getLabelNode() {
232832
233013
  var labelNode = [];
232833
- var isIncludes = "";
233014
+ var isIncludes = '';
232834
233015
  var hoEditor = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(_this4.activeDocId);
232835
233016
  var currentDomRange = hoEditor.vueController.getDomRange();
232836
233017
 
232837
233018
  if (currentDomRange !== null && currentDomRange !== void 0 && currentDomRange.isEmpty) {
232838
233019
  if (nodeInfoes.node() instanceof LabelNode/* LabelNode */.P) {
232839
233020
  labelNode.push(nodeInfoes.node());
232840
- isIncludes = "toText";
233021
+ isIncludes = 'toText';
232841
233022
  }
232842
233023
  } else {
232843
- isIncludes = "toLabel";
233024
+ isIncludes = 'toLabel';
232844
233025
  var startPath = currentDomRange.startPath;
232845
233026
  var endPath = currentDomRange.endPath;
232846
233027
  var selectNodes = DomRange/* DomRange.getSelectDomNodes */.a.getSelectDomNodes(_this4.activeDocId, startPath, endPath, true)[0];
@@ -232848,7 +233029,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232848
233029
  if (selectNodes.length > 0) {
232849
233030
  selectNodes.forEach(function (v) {
232850
233031
  if (v instanceof LabelNode/* LabelNode */.P) {
232851
- isIncludes = "toText";
233032
+ isIncludes = 'toText';
232852
233033
  labelNode.push(v);
232853
233034
  }
232854
233035
  });
@@ -232887,7 +233068,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232887
233068
  };
232888
233069
  }
232889
233070
 
232890
- this.$emit("rightClickEvent", nodeInfoes);
233071
+ this.$emit('rightClickEvent', nodeInfoes);
232891
233072
  }
232892
233073
  /**
232893
233074
  * 初始化事件
@@ -232929,7 +233110,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232929
233110
  }, {
232930
233111
  key: "insertComments",
232931
233112
  value: function insertComments(content) {
232932
- this.$emit("insertComments", content);
233113
+ this.$emit('insertComments', content);
232933
233114
  }
232934
233115
  /**
232935
233116
  * 双击事件
@@ -232938,7 +233119,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232938
233119
  }, {
232939
233120
  key: "dblNodeClick",
232940
233121
  value: function dblNodeClick(node) {
232941
- this.$emit("dblClickEvent", node);
233122
+ this.$emit('dblClickEvent', node);
232942
233123
  } // 设置字体
232943
233124
 
232944
233125
  }, {
@@ -232960,7 +233141,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232960
233141
  this.activeDocId = activeDocId;
232961
233142
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId);
232962
233143
  hoEditorFactory.hoLocalStorage.initHoWebSql();
232963
- this.$emit("docReady", {
233144
+ this.$emit('docReady', {
232964
233145
  vueController: hoEditorFactory.vueController,
232965
233146
  baseController: hoEditorFactory.baseController,
232966
233147
  domController: hoEditorFactory.domController,
@@ -232991,7 +233172,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232991
233172
  var property = _objectSpread2({}, pageProperty); // 字体
232992
233173
 
232993
233174
 
232994
- 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('') : '宋体'; // 字号
232995
233176
 
232996
233177
  if (isNaN(Number(property.fontSize))) {
232997
233178
  json_font_namespaceObject.CH.forEach(function (v) {
@@ -233018,12 +233199,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
233018
233199
 
233019
233200
  if (pageProperty.elementBackColor) {
233020
233201
  hoEditorFactory.vueController.setReviewLevelColor({
233021
- reviewLev1Color: "#F19191",
233022
- reviewLev2Color: "#FFFFFF",
233023
- reviewLev3Color: "#FFFFFF",
233024
- fieldColor: "#DFFFFF",
233025
- dateTimeColor: "#FBFAD0",
233026
- downListColor: "#D2ECB1"
233202
+ reviewLev1Color: '#F19191',
233203
+ reviewLev2Color: '#FFFFFF',
233204
+ reviewLev3Color: '#FFFFFF',
233205
+ fieldColor: '#DFFFFF',
233206
+ dateTimeColor: '#FBFAD0',
233207
+ downListColor: '#D2ECB1'
233027
233208
  });
233028
233209
  } // 复制粘贴基准值
233029
233210
 
@@ -233094,7 +233275,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
233094
233275
  }, {
233095
233276
  key: "closeControlModal",
233096
233277
  value: function closeControlModal() {
233097
- this.setControlProperty("", "add", "");
233278
+ this.setControlProperty('', 'add', '');
233098
233279
  }
233099
233280
  /**
233100
233281
  * 非文档区域右键事件
@@ -233103,7 +233284,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
233103
233284
  }, {
233104
233285
  key: "blankAreaRightClick",
233105
233286
  value: function blankAreaRightClick(e) {
233106
- if (e.target instanceof HTMLDivElement && e.target.className === "editor") {}
233287
+ if (e.target instanceof HTMLDivElement && e.target.className === 'editor') {}
233107
233288
  }
233108
233289
  }]);
233109
233290
 
@@ -233141,13 +233322,9 @@ __decorate([Prop({
233141
233322
  })], HoDocs.prototype, "isUseTipText", void 0);
233142
233323
 
233143
233324
  __decorate([Prop({
233144
- default: false
233325
+ default: ''
233145
233326
  })], HoDocs.prototype, "isFixedPrintToA4", void 0);
233146
233327
 
233147
- __decorate([Prop({
233148
- default: false
233149
- })], HoDocs.prototype, "isFixedPrintToA4T", void 0);
233150
-
233151
233328
  __decorate([Prop({
233152
233329
  default: true
233153
233330
  })], HoDocs.prototype, "isUseImagePrint", void 0);
@@ -233160,58 +233337,60 @@ __decorate([Prop({
233160
233337
  default: true
233161
233338
  })], HoDocs.prototype, "printBlack", void 0);
233162
233339
 
233163
- __decorate([Watch("contentIsModify", {
233340
+ __decorate([Prop({
233341
+ default: false
233342
+ })], HoDocs.prototype, "isEnabledGlobalColor", void 0);
233343
+
233344
+ __decorate([Watch('contentIsModify', {
233164
233345
  deep: true
233165
233346
  })], HoDocs.prototype, "contentIsModifyChange", null);
233166
233347
 
233167
- __decorate([Watch("editJson")], HoDocs.prototype, "editJsonChange", null);
233348
+ __decorate([Watch('editJson')], HoDocs.prototype, "editJsonChange", null);
233168
233349
 
233169
233350
  __decorate([Provide()], HoDocs.prototype, "getCustomProperty", null);
233170
233351
 
233171
- __decorate([Watch("textStyle", {
233352
+ __decorate([Watch('textStyle', {
233172
233353
  deep: true
233173
233354
  })], HoDocs.prototype, "textStyleChange", null);
233174
233355
 
233175
- __decorate([Watch("modalStatus", {
233356
+ __decorate([Watch('modalStatus', {
233176
233357
  deep: true
233177
233358
  })], HoDocs.prototype, "modalStatusChange", null);
233178
233359
 
233179
- __decorate([Watch("controlType", {
233360
+ __decorate([Watch('controlType', {
233180
233361
  deep: true
233181
233362
  })], HoDocs.prototype, "controlTypeChange", null);
233182
233363
 
233183
- __decorate([Watch("pageProperty", {
233364
+ __decorate([Watch('pageProperty', {
233184
233365
  deep: true
233185
233366
  })], HoDocs.prototype, "pagePropertyChange", null);
233186
233367
 
233187
- __decorate([Watch("docProperty", {
233368
+ __decorate([Watch('docProperty', {
233188
233369
  deep: true
233189
233370
  })], HoDocs.prototype, "docPropertyChange", null);
233190
233371
 
233191
- __decorate([Watch("isFixedPrintToA4", {
233372
+ __decorate([Watch('isFixedPrintToA4', {
233192
233373
  deep: true
233193
233374
  })], HoDocs.prototype, "isFixedPrintToA4Change", null);
233194
233375
 
233195
- __decorate([Watch("isFixedPrintToA4T", {
233196
- deep: true
233197
- })], HoDocs.prototype, "isFixedPrintToA4TChange", null);
233198
-
233199
- __decorate([Watch("isUseImagePrint", {
233376
+ __decorate([Watch('isUseImagePrint', {
233200
233377
  deep: true
233201
233378
  })], HoDocs.prototype, "isUseImagePrintChange", null);
233202
233379
 
233203
- __decorate([Watch("isUseForm", {
233380
+ __decorate([Watch('isUseForm', {
233204
233381
  deep: true
233205
233382
  })], HoDocs.prototype, "isUseFormChange", null);
233206
233383
 
233207
- __decorate([Watch("superiorSigns")], HoDocs.prototype, "superiorSignsChange", null);
233384
+ __decorate([Watch('superiorSigns')], HoDocs.prototype, "superiorSignsChange", null);
233385
+
233386
+ __decorate([Watch('isCanEditHeadFoot')], HoDocs.prototype, "isCanEditHeadFootChange", null);
233208
233387
 
233209
- __decorate([Watch("isCanEditHeadFoot")], HoDocs.prototype, "isCanEditHeadFootChange", null);
233388
+ __decorate([Watch('printBlack')], HoDocs.prototype, "printBlackChange", null);
233210
233389
 
233211
- __decorate([Watch("printBlack")], HoDocs.prototype, "printBlackChange", null);
233390
+ __decorate([Watch('isEnabledGlobalColor')], HoDocs.prototype, "isEnabledGlobalColorChange", null);
233212
233391
 
233213
233392
  HoDocs = __decorate([vue_class_component_esm({
233214
- name: "HoDocs",
233393
+ name: 'HoDocs',
233215
233394
  components: {
233216
233395
  HoDoc: components_HoDoc,
233217
233396
  HoFooter: components_HoFooter,
@@ -239041,9 +239220,9 @@ HoRightMenu = __decorate([vue_class_component_esm({
239041
239220
  }
239042
239221
  })], HoRightMenu);
239043
239222
  /* harmony default export */ var toolbar_HoRightMenu = (HoRightMenu);
239044
- ;// 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=3c4d2e63&
239045
- var viewvue_type_template_id_3c4d2e63_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()}
239046
- var viewvue_type_template_id_3c4d2e63_staticRenderFns = []
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 = []
239047
239226
 
239048
239227
 
239049
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&
@@ -239486,8 +239665,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
239486
239665
  key: "isFixedPrintToA4Change",
239487
239666
  value: function isFixedPrintToA4Change() {
239488
239667
  var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
239489
- var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
239490
- hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
239668
+ var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId); // hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
239491
239669
  } // 打印时彩色字体转成黑色 printBlack
239492
239670
 
239493
239671
  }, {
@@ -239565,7 +239743,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
239565
239743
  __decorate([Prop()], PrintDocs.prototype, "pageProperty", void 0);
239566
239744
 
239567
239745
  __decorate([Prop({
239568
- default: false
239746
+ default: ''
239569
239747
  })], PrintDocs.prototype, "isFixedPrintToA4", void 0);
239570
239748
 
239571
239749
  __decorate([Prop({
@@ -239607,8 +239785,8 @@ PrintDocs = __decorate([vue_class_component_esm({
239607
239785
 
239608
239786
  var view_component = normalizeComponent(
239609
239787
  view_viewvue_type_script_lang_ts_,
239610
- viewvue_type_template_id_3c4d2e63_render,
239611
- viewvue_type_template_id_3c4d2e63_staticRenderFns,
239788
+ viewvue_type_template_id_4a7f3e3a_render,
239789
+ viewvue_type_template_id_4a7f3e3a_staticRenderFns,
239612
239790
  false,
239613
239791
  null,
239614
239792
  null,