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.
@@ -11186,9 +11186,10 @@ var PrintStatus = /*#__PURE__*/function () {
11186
11186
 
11187
11187
  pages.sort(function (a, b) {
11188
11188
  return a - b;
11189
- });
11189
+ }); // console.log(pages);
11190
11190
  // 去重
11191
- this._printPages = (0,toConsumableArray/* default */.Z)(new Set(pages));
11191
+
11192
+ this._printPages = (0,toConsumableArray/* default */.Z)(new Set(pages)); // console.log('页码范围:', this._printPages);
11192
11193
  } catch (error) {
11193
11194
  Exception/* Exception.printCallStack */.P.printCallStack();
11194
11195
  }
@@ -11581,7 +11582,7 @@ var Print = /*#__PURE__*/function () {
11581
11582
 
11582
11583
  case 17:
11583
11584
  if ((_step = _iterator.n()).done) {
11584
- _context3.next = 59;
11585
+ _context3.next = 60;
11585
11586
  break;
11586
11587
  }
11587
11588
 
@@ -11599,7 +11600,7 @@ var Print = /*#__PURE__*/function () {
11599
11600
  });
11600
11601
 
11601
11602
  case 22:
11602
- return _context3.abrupt("continue", 57);
11603
+ return _context3.abrupt("continue", 58);
11603
11604
 
11604
11605
  case 23:
11605
11606
  last = index;
@@ -11610,7 +11611,7 @@ var Print = /*#__PURE__*/function () {
11610
11611
  break;
11611
11612
  }
11612
11613
 
11613
- return _context3.abrupt("break", 59);
11614
+ return _context3.abrupt("break", 60);
11614
11615
 
11615
11616
  case 27:
11616
11617
  if (cpage.drawDomLevel && !cpage.drawDomLevel.stage) {
@@ -11621,7 +11622,7 @@ var Print = /*#__PURE__*/function () {
11621
11622
 
11622
11623
  if (index === hoEditorFactory.startPageNum && positionY) {
11623
11624
  dShape = new createjs.Shape();
11624
- dShape.graphics.beginFill('#fff').rect(0, 0, width, positionY).endFill();
11625
+ dShape.graphics.beginFill('#FFFFFF').rect(0, 0, width, positionY).endFill();
11625
11626
  cpage.drawDocContainer.addChild(dShape);
11626
11627
  cpage.drawFooter.alpha = 0; // 上一页还有空余时续打起始页隐藏页脚
11627
11628
  } // 光标处续打
@@ -11634,7 +11635,7 @@ var Print = /*#__PURE__*/function () {
11634
11635
  if (index === posIndex && posY) {
11635
11636
  _dShape = new createjs.Shape();
11636
11637
 
11637
- _dShape.graphics.beginFill('#fff').rect(0, 0, width, posY).endFill();
11638
+ _dShape.graphics.beginFill('#FFFFFF').rect(0, 0, width, posY).endFill();
11638
11639
 
11639
11640
  cpage.drawDocContainer.addChild(_dShape);
11640
11641
  cpage.drawFooter.alpha = 0;
@@ -11651,7 +11652,7 @@ var Print = /*#__PURE__*/function () {
11651
11652
  y: 0
11652
11653
  };
11653
11654
 
11654
- if (hoEditorFactory.isFixedPrintToA4 && format) {
11655
+ if (hoEditorFactory.isFixedPrintToA4 == '1' && format) {
11655
11656
  if (orientation == 'l') {
11656
11657
  svg2pdfOptions.x = format[0] - width;
11657
11658
  svg2pdfOptions.y = (format[1] - height) / 2;
@@ -11661,14 +11662,15 @@ var Print = /*#__PURE__*/function () {
11661
11662
  }
11662
11663
 
11663
11664
  if (!hoEditorFactory.isUseImagePrint) {
11664
- _context3.next = 43;
11665
+ _context3.next = 44;
11665
11666
  break;
11666
11667
  }
11667
11668
 
11668
11669
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage();
11669
11670
  ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
11671
+ window.printBlack = hoEditorFactory.printBlack;
11670
11672
 
11671
- if (hoEditorFactory.isFixedPrintToA4T && format) {
11673
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && format) {
11672
11674
  // 避免切换纸张的打印方式 绘制只处理竖向情况
11673
11675
  if (orientation === 'p' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5' && index == 0) {
11674
11676
  ctx.translate(0, 1122 / 2); // 由于旋转是默认以左上角为中心 所以需要先移动位置 改变起始点
@@ -11681,10 +11683,10 @@ var Print = /*#__PURE__*/function () {
11681
11683
  ctx.posY = svg2pdfOptions.y;
11682
11684
  ctx && ((_cpage$drawDomLevel = cpage.drawDomLevel) === null || _cpage$drawDomLevel === void 0 ? void 0 : (_cpage$drawDomLevel$s = _cpage$drawDomLevel.stage) === null || _cpage$drawDomLevel$s === void 0 ? void 0 : _cpage$drawDomLevel$s.draw(ctx));
11683
11685
  ctx = null;
11684
- _context3.next = 56;
11686
+ _context3.next = 57;
11685
11687
  break;
11686
11688
 
11687
- case 43:
11689
+ case 44:
11688
11690
  _ctx = new canvas2svg({
11689
11691
  width: width,
11690
11692
  height: height,
@@ -11693,68 +11695,68 @@ var Print = /*#__PURE__*/function () {
11693
11695
  _ctx && ((_cpage$drawDomLevel2 = cpage.drawDomLevel) === null || _cpage$drawDomLevel2 === void 0 ? void 0 : (_cpage$drawDomLevel2$ = _cpage$drawDomLevel2.stage) === null || _cpage$drawDomLevel2$ === void 0 ? void 0 : _cpage$drawDomLevel2$.draw(_ctx));
11694
11696
 
11695
11697
  if (!(type === 'html')) {
11696
- _context3.next = 50;
11698
+ _context3.next = 51;
11697
11699
  break;
11698
11700
  }
11699
11701
 
11700
11702
  svgData = (_ctx2 = _ctx) === null || _ctx2 === void 0 ? void 0 : _ctx2.getSvg();
11701
11703
  svgData && ((_svgBox2 = svgBox) === null || _svgBox2 === void 0 ? void 0 : _svgBox2.appendChild(svgData));
11702
- _context3.next = 55;
11704
+ _context3.next = 56;
11703
11705
  break;
11704
11706
 
11705
- case 50:
11707
+ case 51:
11706
11708
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage();
11707
11709
  _context3.t0 = PDF;
11708
11710
 
11709
11711
  if (!_context3.t0) {
11710
- _context3.next = 55;
11712
+ _context3.next = 56;
11711
11713
  break;
11712
11714
  }
11713
11715
 
11714
- _context3.next = 55;
11716
+ _context3.next = 56;
11715
11717
  return svg2pdf((_ctx3 = _ctx) === null || _ctx3 === void 0 ? void 0 : _ctx3.getSvg(), PDF, svg2pdfOptions);
11716
11718
 
11717
- case 55:
11719
+ case 56:
11718
11720
  _ctx = null;
11719
11721
 
11720
- case 56:
11722
+ case 57:
11721
11723
  index > 0 && ((_cpage$drawDomLevel3 = cpage.drawDomLevel) === null || _cpage$drawDomLevel3 === void 0 ? void 0 : _cpage$drawDomLevel3.clearStage());
11722
11724
 
11723
- case 57:
11725
+ case 58:
11724
11726
  _context3.next = 17;
11725
11727
  break;
11726
11728
 
11727
- case 59:
11728
- _context3.next = 64;
11729
+ case 60:
11730
+ _context3.next = 65;
11729
11731
  break;
11730
11732
 
11731
- case 61:
11732
- _context3.prev = 61;
11733
+ case 62:
11734
+ _context3.prev = 62;
11733
11735
  _context3.t1 = _context3["catch"](15);
11734
11736
 
11735
11737
  _iterator.e(_context3.t1);
11736
11738
 
11737
- case 64:
11738
- _context3.prev = 64;
11739
+ case 65:
11740
+ _context3.prev = 65;
11739
11741
 
11740
11742
  _iterator.f();
11741
11743
 
11742
- return _context3.finish(64);
11744
+ return _context3.finish(65);
11743
11745
 
11744
- case 67:
11746
+ case 68:
11745
11747
  console.timeEnd('绘制svg和生成pdf');
11746
11748
  if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
11747
11749
  hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
11748
11750
 
11749
11751
  if (!(positionY || hoEditorFactory.startPageNum !== 0 && positionY !== undefined)) {
11750
- _context3.next = 76;
11752
+ _context3.next = 77;
11751
11753
  break;
11752
11754
  }
11753
11755
 
11754
11756
  _last = hoEditorFactory.printStatus.printRecord.last();
11755
11757
 
11756
11758
  if (!(_last && hoEditorFactory.startPageNum == _last[0] && positionY === _last[1])) {
11757
- _context3.next = 76;
11759
+ _context3.next = 77;
11758
11760
  break;
11759
11761
  }
11760
11762
 
@@ -11766,21 +11768,21 @@ var Print = /*#__PURE__*/function () {
11766
11768
  reslove && reslove('printend');
11767
11769
  return _context3.abrupt("return");
11768
11770
 
11769
- case 76:
11771
+ case 77:
11770
11772
  if (!(type === 'pdf')) {
11771
- _context3.next = 82;
11773
+ _context3.next = 83;
11772
11774
  break;
11773
11775
  }
11774
11776
 
11775
11777
  PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
11776
11778
  PDF === null || PDF === void 0 ? void 0 : PDF.save(fileName + '.pdf');
11777
11779
  hoEditorFactory.printStatus.drawPrintRecord.clear();
11778
- _context3.next = 88;
11780
+ _context3.next = 89;
11779
11781
  break;
11780
11782
 
11781
- case 82:
11783
+ case 83:
11782
11784
  if (!(svgBox && svgBox.childNodes.length === 0)) {
11783
- _context3.next = 86;
11785
+ _context3.next = 87;
11784
11786
  break;
11785
11787
  }
11786
11788
 
@@ -11792,7 +11794,7 @@ var Print = /*#__PURE__*/function () {
11792
11794
  reslove && reslove('printend');
11793
11795
  return _context3.abrupt("return");
11794
11796
 
11795
- case 86:
11797
+ case 87:
11796
11798
  printStyle = (0,util/* createPrintHTMLStyle */.j_)(hoEditorFactory.pageProperty.pageSize, orientation);
11797
11799
 
11798
11800
  if (type === 'html') {
@@ -11810,7 +11812,7 @@ var Print = /*#__PURE__*/function () {
11810
11812
  return link.remove();
11811
11813
  }, 100);
11812
11814
  } else {
11813
- if (height <= 560 && !hoEditorFactory.isFixedPrintToA4T) {
11815
+ if (height <= 560 && hoEditorFactory.isFixedPrintToA4 !== '2') {
11814
11816
  PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
11815
11817
  }
11816
11818
 
@@ -11819,15 +11821,15 @@ var Print = /*#__PURE__*/function () {
11819
11821
  PDF && this.openDataUriInWindow(PDF, name, hoEditorFactory.pageProperty.widthPixes);
11820
11822
  }
11821
11823
 
11822
- case 88:
11824
+ case 89:
11823
11825
  reslove && reslove('printend');
11824
11826
 
11825
- case 89:
11827
+ case 90:
11826
11828
  case "end":
11827
11829
  return _context3.stop();
11828
11830
  }
11829
11831
  }
11830
- }, _callee2, this, [[15, 61, 64, 67]]);
11832
+ }, _callee2, this, [[15, 62, 65, 68]]);
11831
11833
  }));
11832
11834
 
11833
11835
  function printToPDF(_x2, _x3, _x4, _x5, _x6, _x7, _x8) {
@@ -11865,7 +11867,7 @@ var Print = /*#__PURE__*/function () {
11865
11867
 
11866
11868
  case 11:
11867
11869
  if ((_step2 = _iterator2.n()).done) {
11868
- _context4.next = 39;
11870
+ _context4.next = 40;
11869
11871
  break;
11870
11872
  }
11871
11873
 
@@ -11883,7 +11885,7 @@ var Print = /*#__PURE__*/function () {
11883
11885
  });
11884
11886
 
11885
11887
  case 16:
11886
- return _context4.abrupt("continue", 37);
11888
+ return _context4.abrupt("continue", 38);
11887
11889
 
11888
11890
  case 17:
11889
11891
  last = index;
@@ -11894,7 +11896,7 @@ var Print = /*#__PURE__*/function () {
11894
11896
  break;
11895
11897
  }
11896
11898
 
11897
- return _context4.abrupt("break", 39);
11899
+ return _context4.abrupt("break", 40);
11898
11900
 
11899
11901
  case 21:
11900
11902
  if (cpage.drawDomLevel && !cpage.drawDomLevel.stage) {
@@ -11908,18 +11910,19 @@ var Print = /*#__PURE__*/function () {
11908
11910
  }
11909
11911
 
11910
11912
  if (!hoEditorFactory.isUseImagePrint) {
11911
- _context4.next = 30;
11913
+ _context4.next = 31;
11912
11914
  break;
11913
11915
  }
11914
11916
 
11915
11917
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage();
11916
11918
  ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
11919
+ window.printBlack = hoEditorFactory.printBlack;
11917
11920
  ctx && ((_cpage$drawDomLevel4 = cpage.drawDomLevel) === null || _cpage$drawDomLevel4 === void 0 ? void 0 : (_cpage$drawDomLevel4$ = _cpage$drawDomLevel4.stage) === null || _cpage$drawDomLevel4$ === void 0 ? void 0 : _cpage$drawDomLevel4$.draw(ctx));
11918
11921
  ctx = null;
11919
- _context4.next = 36;
11922
+ _context4.next = 37;
11920
11923
  break;
11921
11924
 
11922
- case 30:
11925
+ case 31:
11923
11926
  _ctx4 = new canvas2svg({
11924
11927
  width: hoEditorFactory.pageProperty.widthPixes,
11925
11928
  height: orientation === 'l' ? hoEditorFactory.pageProperty.heightPixes - 1 : hoEditorFactory.pageProperty.heightPixes,
@@ -11927,37 +11930,37 @@ var Print = /*#__PURE__*/function () {
11927
11930
  });
11928
11931
  _ctx4 && ((_cpage$drawDomLevel5 = cpage.drawDomLevel) === null || _cpage$drawDomLevel5 === void 0 ? void 0 : (_cpage$drawDomLevel5$ = _cpage$drawDomLevel5.stage) === null || _cpage$drawDomLevel5$ === void 0 ? void 0 : _cpage$drawDomLevel5$.draw(_ctx4));
11929
11932
  PDF.addPage();
11930
- _context4.next = 35;
11933
+ _context4.next = 36;
11931
11934
  return svg2pdf((_ctx5 = _ctx4) === null || _ctx5 === void 0 ? void 0 : _ctx5.getSvg(), PDF);
11932
11935
 
11933
- case 35:
11936
+ case 36:
11934
11937
  _ctx4 = null;
11935
11938
 
11936
- case 36:
11939
+ case 37:
11937
11940
  index > 0 && ((_cpage$drawDomLevel6 = cpage.drawDomLevel) === null || _cpage$drawDomLevel6 === void 0 ? void 0 : _cpage$drawDomLevel6.clearStage());
11938
11941
 
11939
- case 37:
11942
+ case 38:
11940
11943
  _context4.next = 11;
11941
11944
  break;
11942
11945
 
11943
- case 39:
11944
- _context4.next = 44;
11946
+ case 40:
11947
+ _context4.next = 45;
11945
11948
  break;
11946
11949
 
11947
- case 41:
11948
- _context4.prev = 41;
11950
+ case 42:
11951
+ _context4.prev = 42;
11949
11952
  _context4.t0 = _context4["catch"](9);
11950
11953
 
11951
11954
  _iterator2.e(_context4.t0);
11952
11955
 
11953
- case 44:
11954
- _context4.prev = 44;
11956
+ case 45:
11957
+ _context4.prev = 45;
11955
11958
 
11956
11959
  _iterator2.f();
11957
11960
 
11958
- return _context4.finish(44);
11961
+ return _context4.finish(45);
11959
11962
 
11960
- case 47:
11963
+ case 48:
11961
11964
  if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) {
11962
11965
  hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
11963
11966
  }
@@ -11965,12 +11968,12 @@ var Print = /*#__PURE__*/function () {
11965
11968
  hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
11966
11969
  reslove && reslove('printend');
11967
11970
 
11968
- case 50:
11971
+ case 51:
11969
11972
  case "end":
11970
11973
  return _context4.stop();
11971
11974
  }
11972
11975
  }
11973
- }, _callee3, null, [[9, 41, 44, 47]]);
11976
+ }, _callee3, null, [[9, 42, 45, 48]]);
11974
11977
  }));
11975
11978
 
11976
11979
  function createPDFBase64(_x9, _x10, _x11) {
@@ -12106,7 +12109,7 @@ var Print = /*#__PURE__*/function () {
12106
12109
  key: "printAllNew",
12107
12110
  value: function () {
12108
12111
  var _printAllNew = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee5(hoEditorFactoryID, reslove, PDF, position) {
12109
- 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;
12112
+ var hoEditorFactory, a4Size, svgBox, last, widthPixes, heightPixes, orientation, formats, format, svg2pdfOptions, _iterator4, _step4, _cpage$drawDomLevel12, index, cpage, _cpage$drawDomLevel9, _cpage$drawDomLevel9$, ctx, _cpage$drawDomLevel10, _cpage$drawDomLevel11, _ctx7, _ctx6, lastPos;
12110
12113
 
12111
12114
  return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee5$(_context6) {
12112
12115
  while (1) {
@@ -12122,34 +12125,53 @@ var Print = /*#__PURE__*/function () {
12122
12125
  svgBox = document.createElement('div');
12123
12126
  svgBox.className = 'ho-print-svg-box';
12124
12127
  last = -1;
12128
+ widthPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.widthMm, true);
12129
+ heightPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.heightMm, true);
12130
+ orientation = widthPixes > heightPixes ? 'l' : 'p';
12131
+ formats = [widthPixes, heightPixes];
12132
+ format = a4Size[orientation];
12133
+ svg2pdfOptions = {
12134
+ x: 0,
12135
+ y: 0
12136
+ };
12137
+
12138
+ if (hoEditorFactory.isFixedPrintToA4 == '1' && format) {
12139
+ if (orientation == 'l') {
12140
+ svg2pdfOptions.x = format[0] - widthPixes;
12141
+ svg2pdfOptions.y = (format[1] - heightPixes) / 2;
12142
+ } else {
12143
+ svg2pdfOptions.x = (format[0] - widthPixes) / 2;
12144
+ }
12145
+ }
12146
+
12125
12147
  _iterator4 = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.printStatus.printProcess());
12126
- _context6.prev = 8;
12148
+ _context6.prev = 15;
12127
12149
 
12128
12150
  _iterator4.s();
12129
12151
 
12130
- case 10:
12152
+ case 17:
12131
12153
  if ((_step4 = _iterator4.n()).done) {
12132
- _context6.next = 48;
12154
+ _context6.next = 50;
12133
12155
  break;
12134
12156
  }
12135
12157
 
12136
12158
  index = _step4.value;
12137
12159
 
12138
12160
  if (!(index == -1)) {
12139
- _context6.next = 16;
12161
+ _context6.next = 23;
12140
12162
  break;
12141
12163
  }
12142
12164
 
12143
- _context6.next = 15;
12165
+ _context6.next = 22;
12144
12166
  return message_box_default().confirm('请进行翻页', '打印提示', {
12145
12167
  confirmButtonText: '确定',
12146
12168
  type: 'info'
12147
12169
  });
12148
12170
 
12149
- case 15:
12150
- return _context6.abrupt("continue", 46);
12171
+ case 22:
12172
+ return _context6.abrupt("continue", 48);
12151
12173
 
12152
- case 16:
12174
+ case 23:
12153
12175
  last = index;
12154
12176
  cpage = hoEditorFactory.drawTree.drawPages[index];
12155
12177
 
@@ -12164,51 +12186,44 @@ var Print = /*#__PURE__*/function () {
12164
12186
  }
12165
12187
 
12166
12188
  if (!(index === hoEditorFactory.drawTree.drawPages.length - 1 && cpage.drawMainDoc.children.length === 2 && !(cpage.drawMainDoc.children[0] instanceof DrawPageTable/* DrawPageTable */.ox) && cpage.drawMainDoc.children[1] && cpage.drawMainDoc.children[1].drawItems.length === 0)) {
12167
- _context6.next = 22;
12189
+ _context6.next = 29;
12168
12190
  break;
12169
12191
  }
12170
12192
 
12171
- return _context6.abrupt("break", 48);
12172
-
12173
- case 22:
12174
- widthPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.widthMm, true);
12175
- heightPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.heightMm, true);
12176
- orientation = widthPixes > heightPixes ? 'l' : 'p';
12177
- formats = [widthPixes, heightPixes];
12178
- format = a4Size[orientation];
12179
- svg2pdfOptions = {
12180
- x: 0,
12181
- y: 0
12182
- };
12183
-
12184
- if (hoEditorFactory.isFixedPrintToA4 && format) {
12185
- if (orientation == 'l') {
12186
- svg2pdfOptions.x = format[0] - widthPixes;
12187
- svg2pdfOptions.y = (format[1] - heightPixes) / 2;
12188
- } else {
12189
- svg2pdfOptions.x = (format[0] - widthPixes) / 2;
12190
- }
12191
- }
12193
+ return _context6.abrupt("break", 50);
12192
12194
 
12195
+ case 29:
12193
12196
  if (!hoEditorFactory.isUseImagePrint) {
12194
- _context6.next = 39;
12197
+ _context6.next = 41;
12195
12198
  break;
12196
12199
  }
12197
12200
 
12198
- if (formats.length == 2 && !hoEditorFactory.isFixedPrintToA4) {
12201
+ if (formats.length == 2 && hoEditorFactory.isFixedPrintToA4 == '1') {
12199
12202
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage(formats, orientation);
12203
+ } else if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
12204
+ PDF === null || PDF === void 0 ? void 0 : PDF.addPage([793, 1122], 'p');
12200
12205
  } else {
12201
12206
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
12202
12207
  }
12203
12208
 
12204
12209
  ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
12205
12210
 
12206
- if (hoEditorFactory.isFixedPrintToA4T && format && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5' && index == 0) {
12211
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && index == 0 && hoEditorFactory.isRotate) {
12212
+ // 复位 需要先按移动过的位置恢复旋转前的角度,然后才能移动位置
12213
+ ctx.rotate(90 * Math.PI / 180);
12214
+ ctx.translate(0, -1122 / 2);
12215
+ hoEditorFactory.isRotate = false;
12216
+ }
12217
+
12218
+ window.printBlack = hoEditorFactory.printBlack;
12219
+
12220
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && index == 0 && !hoEditorFactory.isRotate && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
12207
12221
  // 避免切换纸张的打印方式 绘制只处理竖向情况
12208
12222
  if (orientation === 'p') {
12209
- ctx.translate(0, 1122 / 2); // 由于旋转是默认以左上角为中心 所以需要先移动位置 改变起始点
12210
-
12211
- ctx.rotate(270 * Math.PI / 180); // 旋转 context2d
12223
+ // 旋转是默认以左上角为中心 需要先移动位置 再进行旋转
12224
+ ctx.translate(0, 1122 / 2);
12225
+ ctx.rotate(270 * Math.PI / 180);
12226
+ hoEditorFactory.isRotate = true;
12212
12227
  }
12213
12228
  }
12214
12229
 
@@ -12216,10 +12231,10 @@ var Print = /*#__PURE__*/function () {
12216
12231
  ctx.posY = svg2pdfOptions.y;
12217
12232
  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));
12218
12233
  ctx = null;
12219
- _context6.next = 45;
12234
+ _context6.next = 47;
12220
12235
  break;
12221
12236
 
12222
- case 39:
12237
+ case 41:
12223
12238
  _ctx6 = new canvas2svg({
12224
12239
  width: widthPixes,
12225
12240
  height: orientation === 'l' ? heightPixes - 1 : heightPixes,
@@ -12233,37 +12248,37 @@ var Print = /*#__PURE__*/function () {
12233
12248
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
12234
12249
  }
12235
12250
 
12236
- _context6.next = 44;
12251
+ _context6.next = 46;
12237
12252
  return svg2pdf((_ctx7 = _ctx6) === null || _ctx7 === void 0 ? void 0 : _ctx7.getSvg(), PDF, svg2pdfOptions);
12238
12253
 
12239
- case 44:
12254
+ case 46:
12240
12255
  _ctx6 = null;
12241
12256
 
12242
- case 45:
12257
+ case 47:
12243
12258
  index > 0 && ((_cpage$drawDomLevel12 = cpage.drawDomLevel) === null || _cpage$drawDomLevel12 === void 0 ? void 0 : _cpage$drawDomLevel12.clearStage());
12244
12259
 
12245
- case 46:
12246
- _context6.next = 10;
12247
- break;
12248
-
12249
12260
  case 48:
12250
- _context6.next = 53;
12261
+ _context6.next = 17;
12251
12262
  break;
12252
12263
 
12253
12264
  case 50:
12254
- _context6.prev = 50;
12255
- _context6.t0 = _context6["catch"](8);
12265
+ _context6.next = 55;
12266
+ break;
12267
+
12268
+ case 52:
12269
+ _context6.prev = 52;
12270
+ _context6.t0 = _context6["catch"](15);
12256
12271
 
12257
12272
  _iterator4.e(_context6.t0);
12258
12273
 
12259
- case 53:
12260
- _context6.prev = 53;
12274
+ case 55:
12275
+ _context6.prev = 55;
12261
12276
 
12262
12277
  _iterator4.f();
12263
12278
 
12264
- return _context6.finish(53);
12279
+ return _context6.finish(55);
12265
12280
 
12266
- case 56:
12281
+ case 58:
12267
12282
  if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) {
12268
12283
  hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
12269
12284
  }
@@ -12281,12 +12296,12 @@ var Print = /*#__PURE__*/function () {
12281
12296
  hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
12282
12297
  reslove();
12283
12298
 
12284
- case 60:
12299
+ case 62:
12285
12300
  case "end":
12286
12301
  return _context6.stop();
12287
12302
  }
12288
12303
  }
12289
- }, _callee5, null, [[8, 50, 53, 56]]);
12304
+ }, _callee5, null, [[15, 52, 55, 58]]);
12290
12305
  }));
12291
12306
 
12292
12307
  function printAllNew(_x15, _x16, _x17, _x18) {
@@ -26238,10 +26253,28 @@ var CellNode = /*#__PURE__*/function (_RectNode) {
26238
26253
  // return;
26239
26254
  // }
26240
26255
  // }
26256
+ //const startPath = `${this.getNodePath()}/0`;
26257
+ //const startPath = hoEditorFactory.docTree.curDomRange.startPath;
26258
+
26241
26259
 
26260
+ var endPath = "";
26261
+ var startPath = "";
26262
+
26263
+ if (this.table.tableProperty.isAutoChangeLine) {
26264
+ var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
26265
+
26266
+ if (curDomRange.npEnd.node instanceof _ParagraphNode__WEBPACK_IMPORTED_MODULE_31__/* .ParagraphNode */ .C) {
26267
+ startPath = curDomRange.startPath;
26268
+ endPath = startPath;
26269
+ } else {
26270
+ startPath = curDomRange.npEnd.node.prevSibling().getNodePath();
26271
+ endPath = hoEditorFactory.docTree.getNodeLastPath(curDomRange.npEnd.node);
26272
+ }
26273
+ } else {
26274
+ startPath = "".concat(this.getNodePath(), "/0");
26275
+ endPath = hoEditorFactory.docTree.getNodeLastPath(this);
26276
+ }
26242
26277
 
26243
- var startPath = "".concat(this.getNodePath(), "/0");
26244
- var endPath = hoEditorFactory.docTree.getNodeLastPath(this);
26245
26278
  var aRange = new _DomRange__WEBPACK_IMPORTED_MODULE_24__/* .DomRange */ .a(this._hoEditorFactoryID, startPath, endPath);
26246
26279
  hoEditorFactory.docController.deleteRange(aRange, true);
26247
26280
  hoEditorFactory.docController.insertPlainTextAfterPath(startPath, value);
@@ -30599,27 +30632,32 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
30599
30632
  /* harmony export */ "C": function() { return /* binding */ ParagraphNode; }
30600
30633
  /* harmony export */ });
30601
30634
  /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37174);
30602
- /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35671);
30603
- /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(22342);
30604
- /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(99640);
30605
- /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28214);
30606
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41539);
30607
- /* 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__);
30608
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54747);
30609
- /* 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__);
30610
- /* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40561);
30611
- /* 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__);
30612
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9653);
30613
- /* 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__);
30614
- /* harmony import */ var _BaseNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(50369);
30615
- /* harmony import */ var _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(53570);
30616
- /* harmony import */ var _RectNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27807);
30617
- /* harmony import */ var _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(94407);
30618
- /* harmony import */ var _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(83078);
30619
- /* harmony import */ var _TableNode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(95883);
30620
- /* harmony import */ var _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(34565);
30621
- /* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(41005);
30622
- /* harmony import */ var _CellNode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(15798);
30635
+ /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58913);
30636
+ /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35671);
30637
+ /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(22342);
30638
+ /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99640);
30639
+ /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28214);
30640
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41539);
30641
+ /* 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__);
30642
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(54747);
30643
+ /* 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__);
30644
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(47941);
30645
+ /* 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__);
30646
+ /* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40561);
30647
+ /* 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__);
30648
+ /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9653);
30649
+ /* 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__);
30650
+ /* harmony import */ var _BaseNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(50369);
30651
+ /* harmony import */ var _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(53570);
30652
+ /* harmony import */ var _RectNode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(27807);
30653
+ /* harmony import */ var _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(94407);
30654
+ /* harmony import */ var _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(83078);
30655
+ /* harmony import */ var _TableNode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(95883);
30656
+ /* harmony import */ var _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(34565);
30657
+ /* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(41005);
30658
+ /* harmony import */ var _CellNode__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(15798);
30659
+
30660
+
30623
30661
 
30624
30662
 
30625
30663
 
@@ -30639,31 +30677,58 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
30639
30677
 
30640
30678
 
30641
30679
  var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30642
- (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(ParagraphNode, _BaseNode);
30680
+ (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(ParagraphNode, _BaseNode);
30643
30681
 
30644
- 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);
30682
+ 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);
30645
30683
 
30646
- function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo) {
30684
+ function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo, customProperty) {
30647
30685
  var _this;
30648
30686
 
30649
- (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(this, ParagraphNode);
30687
+ (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(this, ParagraphNode);
30650
30688
 
30651
- _this = _super.call(this, hoEditorFactoryID, rootNodes, parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_8__/* .NodeType.ntParagraph */ .Jq.ntParagraph);
30689
+ _this = _super.call(this, hoEditorFactoryID, rootNodes, parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType.ntParagraph */ .Jq.ntParagraph);
30652
30690
  _this._parentNode = parentNode;
30653
30691
  _this._drawLines = new Array();
30654
30692
  _this._drawNodes = _this._drawLines;
30655
30693
  _this._paraNo = paraNo;
30656
- _this._styleIndex = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(_this.hoEditorFactoryID).docTree.curStyleIndex;
30694
+ _this._styleIndex = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(_this.hoEditorFactoryID).docTree.curStyleIndex;
30657
30695
  _this._dTop = 0;
30658
30696
  _this._dHeight = 0;
30659
30697
  _this._pagePaintStart = null;
30660
30698
  _this._printAsSinglePage = false;
30661
- _this._docId = ""; // this.node2DrawNode();
30699
+ _this._docId = "";
30700
+ _this._customProperty = new Object();
30701
+
30702
+ if (customProperty) {
30703
+ _this.setCustomProperty(customProperty);
30704
+ } // this.node2DrawNode();
30705
+
30662
30706
 
30663
30707
  return _this;
30664
30708
  }
30665
30709
 
30666
- (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z)(ParagraphNode, [{
30710
+ (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z)(ParagraphNode, [{
30711
+ key: "setCustomProperty",
30712
+ value: function setCustomProperty(customProperty) {
30713
+ var assignvalue = function assignvalue(target, source) {
30714
+ Object.keys(source).forEach(function (value) {
30715
+ 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") {
30716
+ if (Object.prototype.toString.call(source[value]) === "[object Object]") {
30717
+ assignvalue(target[value], source[value]);
30718
+ } else {
30719
+ if (source[value] !== "" && source[value] !== null) {
30720
+ assignvalue(target[value], eval("(" + source[value] + ")"));
30721
+ }
30722
+ }
30723
+ } else {
30724
+ target[value] = source[value];
30725
+ }
30726
+ });
30727
+ };
30728
+
30729
+ assignvalue(this._customProperty, customProperty);
30730
+ }
30731
+ }, {
30667
30732
  key: "paraNo",
30668
30733
  get: function get() {
30669
30734
  return this._paraNo;
@@ -30690,6 +30755,16 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30690
30755
  this._styleIndex = val;
30691
30756
  }
30692
30757
  }
30758
+ }, {
30759
+ key: "customProperty",
30760
+ get: function get() {
30761
+ return this._customProperty;
30762
+ },
30763
+ set: function set(val) {
30764
+ if (val != this._customProperty) {
30765
+ this._customProperty = val;
30766
+ }
30767
+ }
30693
30768
  }, {
30694
30769
  key: "combineParagraph",
30695
30770
  get: function get() {
@@ -30711,7 +30786,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30711
30786
  key: "drootNodes",
30712
30787
  get: function get() {
30713
30788
  if (!this._drawRoots) {
30714
- var _HOEditorFactorys$ins = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30789
+ var _HOEditorFactorys$ins = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30715
30790
  _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),
30716
30791
  dCell = _HOEditorFactorys$ins2[0],
30717
30792
  dRoots = _HOEditorFactorys$ins2[1];
@@ -30724,7 +30799,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30724
30799
  }, {
30725
30800
  key: "refreshDrootNodes",
30726
30801
  value: function refreshDrootNodes() {
30727
- var _HOEditorFactorys$ins3 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30802
+ var _HOEditorFactorys$ins3 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30728
30803
  _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),
30729
30804
  dCell = _HOEditorFactorys$ins4[0],
30730
30805
  dRoots = _HOEditorFactorys$ins4[1];
@@ -30735,7 +30810,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30735
30810
  key: "getParagraphLeftWidth",
30736
30811
  value: function getParagraphLeftWidth() {
30737
30812
  //如果父文档节点派生于rectNode(用于表格基类),则取
30738
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
30813
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
30739
30814
  var pNode = this._parentNode;
30740
30815
  var aLeft;
30741
30816
  var aWidth;
@@ -30751,7 +30826,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30751
30826
  aWidth = _pRectNode$getLeftWid2[1];
30752
30827
  bRectAlign = _pRectNode$getLeftWid2[2];
30753
30828
 
30754
- if (pRectNode instanceof _CellNode__WEBPACK_IMPORTED_MODULE_16__/* .CellNode */ .D) {
30829
+ if (pRectNode instanceof _CellNode__WEBPACK_IMPORTED_MODULE_18__/* .CellNode */ .D) {
30755
30830
  aLeft = hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[2] * 10, true);
30756
30831
  aWidth = aWidth - aLeft - hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[3] * 10, true);
30757
30832
  bRectAlign = true;
@@ -30774,7 +30849,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30774
30849
  var dline = this._drawLines[index];
30775
30850
 
30776
30851
  if (dline) {
30777
- var _HOEditorFactorys$ins5 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30852
+ var _HOEditorFactorys$ins5 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
30778
30853
  _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),
30779
30854
  dCell = _HOEditorFactorys$ins6[0],
30780
30855
  dRoots = _HOEditorFactorys$ins6[1];
@@ -30802,9 +30877,9 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30802
30877
  // }
30803
30878
 
30804
30879
  while (pNode) {
30805
- if (pNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_10__/* .RectNode */ .z) {
30880
+ if (pNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z) {
30806
30881
  return pNode;
30807
- } else if (pNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_14__/* .TextInputFieldNode */ .re && pNode.alignWithBlocked) {
30882
+ } else if (pNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_16__/* .TextInputFieldNode */ .re && pNode.alignWithBlocked) {
30808
30883
  return pNode;
30809
30884
  } else {
30810
30885
  pNode = pNode.parentNode;
@@ -30816,14 +30891,14 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30816
30891
  }, {
30817
30892
  key: "updateCombineParagraph",
30818
30893
  value: function updateCombineParagraph() {
30819
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
30894
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
30820
30895
  var para = hoEditorFactory.docTree.paragraphs[this._paraNo];
30821
30896
 
30822
30897
  if (!para) {
30823
30898
  para = hoEditorFactory.docTree.paragraphs[0];
30824
30899
  }
30825
30900
 
30826
- return _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .Paragraph.para2CombinePara */ .nv.para2CombinePara(this._hoEditorFactoryID, this, para, hoEditorFactory.docTree.combineParagraph);
30901
+ return _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Paragraph.para2CombinePara */ .nv.para2CombinePara(this._hoEditorFactoryID, this, para, hoEditorFactory.docTree.combineParagraph);
30827
30902
  }
30828
30903
  /**
30829
30904
  * @author xyl
@@ -30863,10 +30938,10 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30863
30938
 
30864
30939
  if (index > 0) {
30865
30940
  var prevLine = this._drawLines[index - 1];
30866
- if (prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__/* .DrawLine */ .a) prevLine.updateLineStyle();
30941
+ if (prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a) prevLine.updateLineStyle();
30867
30942
  }
30868
30943
 
30869
- var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__/* .DrawLine */ .a(this._rootPath, this, index, paragraphWidth);
30944
+ var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a(this._rootPath, this, index, paragraphWidth);
30870
30945
  aline.dTop = itop;
30871
30946
  aline.dLeft = ileft;
30872
30947
  aline.x = this.combineParagraph.leftMarginPixes;
@@ -30917,7 +30992,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30917
30992
  var dline = this.drawlines[i];
30918
30993
 
30919
30994
  if (dline) {
30920
- if (dline instanceof _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_12__/* .DrawTable */ .t) {
30995
+ if (dline instanceof _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_14__/* .DrawTable */ .t) {
30921
30996
  dline.clear();
30922
30997
  } else {
30923
30998
  if (dline.parent) {
@@ -30935,12 +31010,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30935
31010
  key: "node2DrawNode",
30936
31011
  value: function node2DrawNode() {
30937
31012
  this.clear();
30938
- var itop = this.combineParagraph.topMarginPixes + _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
31013
+ var itop = this.combineParagraph.topMarginPixes + _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
30939
31014
  var leftTopInfos = this.getParagraphLeftWidth();
30940
31015
  var ileft = leftTopInfos[0];
30941
31016
  var paragraphWidth = leftTopInfos[1]; // console.log(this._combineParagraph);
30942
31017
 
30943
- var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__/* .DrawLine */ .a(this._rootPath, this, 0, paragraphWidth);
31018
+ var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a(this._rootPath, this, 0, paragraphWidth);
30944
31019
  this._dHeight = aline.dHeight;
30945
31020
 
30946
31021
  this._drawLines.push(aline);
@@ -30975,7 +31050,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30975
31050
  // this.drootNodes.push(this.drawlines[0]);
30976
31051
  // }
30977
31052
  if (dline) {
30978
- var dTop = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
31053
+ var dTop = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
30979
31054
  this.placeDNodeAfterDTop(dTop, dline); // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.insertDline(droots,index+1,this._drawLines[0]);
30980
31055
  }
30981
31056
  }
@@ -30993,7 +31068,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30993
31068
  var dline = prevDline;
30994
31069
 
30995
31070
  while (index === -1) {
30996
- var _TableNode$isNodeInTa = _TableNode__WEBPACK_IMPORTED_MODULE_13__/* .TableNode.isNodeInTable */ .Fh.isNodeInTable(dline.paragraphNode),
31071
+ var _TableNode$isNodeInTa = _TableNode__WEBPACK_IMPORTED_MODULE_15__/* .TableNode.isNodeInTable */ .Fh.isNodeInTable(dline.paragraphNode),
30997
31072
  _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),
30998
31073
  bret = _TableNode$isNodeInTa2[0],
30999
31074
  aTable = _TableNode$isNodeInTa2[1],
@@ -31068,7 +31143,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31068
31143
  }, {
31069
31144
  key: "isInCell",
31070
31145
  value: function isInCell() {
31071
- return this.parentNode !== null && this.parentNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_10__/* .RectNode */ .z;
31146
+ return this.parentNode !== null && this.parentNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z;
31072
31147
  }
31073
31148
  }, {
31074
31149
  key: "drawlines",
@@ -31078,7 +31153,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31078
31153
  }, {
31079
31154
  key: "adjustNextDline",
31080
31155
  value: function adjustNextDline(dline, index) {
31081
- var droots = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(dline.rootPath);
31156
+ var droots = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(dline.rootPath);
31082
31157
  var dNextLine = this.getNextDline(dline);
31083
31158
 
31084
31159
  for (var i = index; i < dline.drawItems.length; i++) {
@@ -31090,7 +31165,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31090
31165
  }, {
31091
31166
  key: "getParagraphLastNodePath",
31092
31167
  value: function getParagraphLastNodePath() {
31093
- return _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.getParaNodeLastPath(this); // return this.getParagraphLastNode().getNodePath()
31168
+ return _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.getParaNodeLastPath(this); // return this.getParagraphLastNode().getNodePath()
31094
31169
  // const pNode = this._parentNode;
31095
31170
  // if (pNode) {
31096
31171
  // const index = pNode.childNodes.indexOf(this);
@@ -31129,7 +31204,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31129
31204
  value: function updateDrawLineStyle() {
31130
31205
  for (var i = 0; i < this._drawLines.length; i++) {
31131
31206
  var dline = this._drawLines[i];
31132
- if (dline instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__/* .DrawLine */ .a) dline.updateLineStyle();
31207
+ if (dline instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a) dline.updateLineStyle();
31133
31208
  } // if (dline instanceof DrawLine) dline.updateLineStyle();
31134
31209
 
31135
31210
  }
@@ -31159,12 +31234,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31159
31234
  }, {
31160
31235
  key: "node2Json",
31161
31236
  value: function node2Json(range, iscopy) {
31162
- var combinePara = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .CombineParagraph */ .kh(this._hoEditorFactoryID, null);
31237
+ var combinePara = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .CombineParagraph */ .kh(this._hoEditorFactoryID, null);
31163
31238
  combinePara.copyStyle(this.combineParagraph);
31164
31239
  var paragraphStyle = {
31165
31240
  height: this.dHeight,
31166
31241
  top: this.dTop,
31167
- align: _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .Align */ .xM[combinePara.align],
31242
+ align: _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[combinePara.align],
31168
31243
  charSpace: combinePara.charSpace,
31169
31244
  lineSpace: combinePara.lineSpace,
31170
31245
  leftMargin: combinePara.leftMarginMm,
@@ -31180,14 +31255,15 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31180
31255
  //paragraphJson._align = Align[parseInt(paragraphJson._align)];
31181
31256
 
31182
31257
  var paga = {
31183
- nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_8__/* .NodeType */ .Jq[this.nodeType],
31258
+ nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType */ .Jq[this.nodeType],
31184
31259
  style: paragraphStyle,
31185
31260
  // height: this.dHeight,
31186
31261
  // top: this.dTop,
31187
31262
  styleIndex: this._paraNo,
31188
31263
  textStyleNo: this.styleIndex,
31189
31264
  printAsSinglePage: this.printAsSinglePage,
31190
- docId: this.docId
31265
+ docId: this.docId,
31266
+ customProperty: this.customProperty
31191
31267
  }; //const dictType = NodeType[this.nodeType].substring(2);
31192
31268
 
31193
31269
  if (iscopy) {
@@ -31243,20 +31319,20 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31243
31319
  var paraNo = Number(json.styleIndex);
31244
31320
 
31245
31321
  if (json["style"]) {
31246
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__/* .HOEditorFactorys.instance */ .b.instance().getFactory(hoEditorFactoryID);
31322
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(hoEditorFactoryID);
31247
31323
  var style = json.style;
31248
- var paragraph = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .Paragraph */ .nv(hoEditorFactoryID);
31324
+ var paragraph = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Paragraph */ .nv(hoEditorFactoryID);
31249
31325
  paragraph.leftMargin = style._leftMarginMm ? Number(style._leftMarginMm) : Number(style.leftMargin);
31250
31326
  paragraph.rightMargin = style._rightMarginMm ? Number(style._rightMarginMm) : Number(style.rightMargin);
31251
31327
  paragraph.topMargin = style._topMarginMm ? Number(style._topMarginMm) : Number(style.topMargin);
31252
31328
  paragraph.bottomMargin = style._bottomMarginMm ? Number(style._bottomMarginMm) : Number(style.bottomMargin);
31253
- 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]);
31329
+ 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]);
31254
31330
  paragraph.charSpace = style._charSpace ? Number(style._charSpace) : Number(style.charSpace);
31255
31331
  paragraph.lineSpace = style._lineSpace ? Number(style._lineSpace) : Number(style.lineSpace);
31256
31332
  paraNo = hoEditorFactory.docTree.styleCompare(paragraph);
31257
31333
  }
31258
31334
 
31259
- var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo);
31335
+ var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo, json.customProperty);
31260
31336
  paragraphNode.docId = json.docId && json.docId !== "" ? json.docId : "";
31261
31337
  paragraphNode.printAsSinglePage = json.printAsSinglePage ? json.printAsSinglePage === "true" ? true : false : false;
31262
31338
  paragraphNode.styleIndex = json.textStyleNo ? Number(json.textStyleNo) : 0; // paragraphNode._dHeight = Number(json.height);
@@ -31267,7 +31343,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31267
31343
  }]);
31268
31344
 
31269
31345
  return ParagraphNode;
31270
- }(_BaseNode__WEBPACK_IMPORTED_MODULE_8__/* .BaseNode */ .Hd);
31346
+ }(_BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .BaseNode */ .Hd);
31271
31347
 
31272
31348
  /***/ }),
31273
31349
 
@@ -33386,7 +33462,7 @@ var RadioAndCheckBoxNode = /*#__PURE__*/function (_ControlNode) {
33386
33462
  }
33387
33463
 
33388
33464
  json.isAllowDelete = !json.isAllowDelete ? false : json.isAllowDelete;
33389
- json.isSelected = !json.isSelected ? false : json.isSelected;
33465
+ json.isSelected = !json.isSelected ? false : json.isSelected.text != undefined ? json.isSelected.text : json.isSelected;
33390
33466
  json.boxAlign = !json.boxAlign ? false : json.boxAlign;
33391
33467
  json.isEditText = !json.isEditText ? false : json.isEditText;
33392
33468
  json.isTransToText = !json.isTransToText ? false : json.isTransToText;
@@ -38526,12 +38602,13 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
38526
38602
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38527
38603
  /* harmony export */ "OL": function() { return /* binding */ DownListProperty; },
38528
38604
  /* harmony export */ "ZX": function() { return /* binding */ DataFormat; },
38605
+ /* harmony export */ "Zi": function() { return /* binding */ InputFieldType; },
38529
38606
  /* harmony export */ "hc": function() { return /* binding */ ExecuteStatus; },
38530
38607
  /* harmony export */ "mK": function() { return /* binding */ ReadOnlyStatus; },
38531
38608
  /* harmony export */ "re": function() { return /* binding */ TextInputFieldNode; },
38532
38609
  /* harmony export */ "wz": function() { return /* binding */ DataVerifyFormat; }
38533
38610
  /* harmony export */ });
38534
- /* unused harmony exports InputFieldType, SpecialFormat, BandDataSource */
38611
+ /* unused harmony exports SpecialFormat, BandDataSource */
38535
38612
  /* harmony import */ var element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86769);
38536
38613
  /* 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__);
38537
38614
  /* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26982);
@@ -53506,6 +53583,12 @@ var DrawTextNode = /*#__PURE__*/function (_DrawCombineNode) {
53506
53583
  }
53507
53584
  }
53508
53585
 
53586
+ if (hoEditorFactory.isEnabledGlobalColor) {
53587
+ if (!(this.node instanceof MarkNode/* MarkNode */.j) && this.node.parentNode.inputFieldType === 0) {
53588
+ backColor = "transparent";
53589
+ }
53590
+ }
53591
+
53509
53592
  if (this.node.parentNode.enableGlobalColor) {
53510
53593
  backColor = "transparent";
53511
53594
  }
@@ -98058,7 +98141,8 @@ while(len--){curDa=sa.shift();if(typeof curDa!=="string"||Array.isArray(curDa)&&
98058
98141
  //we assume the user knows what they are doing.
98059
98142
  //Convert text into an array anyway to simplify
98060
98143
  //later code.
98061
- if(typeof text==="string"){if(text.match(/[\r?\n]/)){text=[text.replace(/\r\n|\r|\n/g,'')];}else{text=[text];}}//baseline
98144
+ if(typeof text==="string"){if(text.match(/[\r?\n]/)){text=[text.replace(/\r\n|\r|\n/g,'')];// 自定义修改 处理打印回车的问题
98145
+ }else{text=[text];}}//baseline
98062
98146
  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
98063
98147
  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
98064
98148
  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
@@ -98076,7 +98160,8 @@ var prevWidth=0;var newX;if(align==="right"){//The passed in x coordinate define
98076
98160
  //rightmost point of the text.
98077
98161
  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
98078
98162
  //the center point.
98079
- 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
98163
+ 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){// 自定义修改 字符间距
98164
+ 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
98080
98165
  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
98081
98166
  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
98082
98167
  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
@@ -98882,6 +98967,7 @@ stream.push(formObject.scope.__private__.encodeColorString(formObject.color));st
98882
98967
  stream.push(calcRes.text);stream.push("ET");// End Text
98883
98968
  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
98884
98969
  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
98970
+ // 自定义修改 字符间距
98885
98971
  var textSplit=text.split("");var fontSize=maxFontSize;// The Starting fontSize (The Maximum)
98886
98972
  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
98887
98973
  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
@@ -99515,7 +99601,8 @@ out+=String.fromCharCode.apply(null,buf.subarray(i,i+ARRAY_APPLY_BATCH));}return
99515
99601
  * @param {posY}
99516
99602
  *
99517
99603
  * @returns jsPDF
99518
- */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
99604
+ */jsPDFAPI.addImage=function(){// 自定义修改 处理签名图片打印
99605
+ 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
99519
99606
  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;
99520
99607
  // if(posY) y += posY;
99521
99608
  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
@@ -99970,7 +100057,8 @@ var f2,getHorizontalCoordinateString,getVerticalCoordinateString,getHorizontalCo
99970
100057
  * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />
99971
100058
  * A pattern object to use to fill the drawing (not supported by context2d)
99972
100059
  */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 ,以适配不支持透明度的打印机
99973
- 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});}});/**
100060
+ if(rgba.a<1){this.ctx.fillOpacity=0;}else{this.ctx.fillOpacity=rgba.a;}// 自定义修改 处理彩色字体打印问题
100061
+ 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});}});/**
99974
100062
  * Sets or returns the color, gradient, or pattern used for strokes
99975
100063
  *
99976
100064
  * @name strokeStyle
@@ -100009,7 +100097,8 @@ if(fontFace!==null){fontFace.ref={name:family,style:style};fontFaces.push(fontFa
100009
100097
  * will be used. If not set it will fallback to previous behavior.
100010
100098
  */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
100011
100099
  // eslint-disable-next-line no-useless-escape
100012
- 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?)
100100
+ 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
100101
+ }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?)
100013
100102
  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){//自定义修改
100014
100103
  if(value<1){this.ctx.globalAlpha=0;}else{this.ctx.globalAlpha=value;}}});/**
100015
100104
  * A float specifying the amount of the line dash offset. The default value is 0.0.
@@ -100049,7 +100138,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
100049
100138
  * @function
100050
100139
  * @param x {Number} The x-coordinate of where to move the path to
100051
100140
  * @param y {Number} The y-coordinate of where to move the path to
100052
- */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);};/**
100141
+ */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");}// 自定义修改 表格的边框线/页面边框位置不对的问题
100142
+ 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);};/**
100053
100143
  * Creates a path from the current point back to the starting point
100054
100144
  *
100055
100145
  * @name closePath
@@ -100063,7 +100153,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
100063
100153
  * @param x The x-coordinate of where to create the line to
100064
100154
  * @param y The y-coordinate of where to create the line to
100065
100155
  * @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).
100066
- */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);};/**
100156
+ */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");}// 自定义修改 表格的边框线/页面边框位置不对的问题
100157
+ 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);};/**
100067
100158
  * Clips a region of any shape and size from the original canvas
100068
100159
  *
100069
100160
  * @name clip
@@ -100216,7 +100307,9 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
100216
100307
  * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
100217
100308
  * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
100218
100309
  * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.
100219
- */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});};/**
100310
+ */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;// 自定义修改
100311
+ putText.call(this,{text:text,x:x,y:y,scale:scale,renderingMode:"stroke",angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace// 自定义修改
100312
+ });};/**
100220
100313
  * Returns an object that contains the width of the specified text
100221
100314
  *
100222
100315
  * @name measureText
@@ -100280,6 +100373,7 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
100280
100373
  // if (isNaN(f)){
100281
100374
  // f=0;
100282
100375
  // }
100376
+ // 自定义修改 处理打印图片报错
100283
100377
  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);
100284
100378
  };/**
100285
100379
  * Resets the current transform to the identity matrix. Then runs transform()
@@ -100308,8 +100402,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
100308
100402
  * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
100309
100403
  */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
100310
100404
  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);
100311
- 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绘制图像");
100312
- 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);
100405
+ 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;// 自定义修改 处理签名图片打印和普通图片打印
100406
+ 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"){// 自定义修改
100407
+ this.pdf.addImage(img.toDataURL("image/jpg"),'',xRect.x,xRect.y,xRect.w,xRect.h);}else{// 自定义修改
100313
100408
  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;};/**
100314
100409
  * Processes the paths
100315
100410
  *
@@ -100330,10 +100425,13 @@ return y;case"alphabetic":default:return y;}};var getTextBottom=function getText
100330
100425
  * @param counterclockwise
100331
100426
  * @param style
100332
100427
  * @param isClip
100333
- */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
100428
+ */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键的问题
100429
+ 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;//自定义修改
100430
+ 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// 自定义修改
100431
+ });if(needsClipping){this.pdf.restoreGraphicsState();}}}else{// This text is the last element of the page, but it got cut off due to the margin
100334
100432
  // so we render it in the next page
100335
100433
  if(textBoundsOnPage.y<pageHeightMinusBottomMargin){// As a result, all other elements have their y offset increased
100336
- 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);
100434
+ 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;}// 自定义修改
100337
100435
  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,
100338
100436
  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(" "));};/**
100339
100437
  * 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.
@@ -101187,7 +101285,8 @@ var startOfLine=i;workingLen=0;while(i!==l){if(workingLen+widths_array[i]>maxLen
101187
101285
  // By default, for PDF, it's "point".
101188
101286
  var splitParagraphIntoLines=function splitParagraphIntoLines(text,maxlen,options){// at this time works only on Western scripts, ones with space char
101189
101287
  // separating the words. Feel free to expand.
101190
- 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.
101288
+ if(!options){options={};}// 自定义修改 字符间距 split(" ") ==> split("")
101289
+ 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.
101191
101290
  // we just chop these to size. We do NOT insert hiphens
101192
101291
  tmp=splitLongWord.apply(this,[word,widths_array,maxlen-(line_length+separator_length),maxlen]);// first line we add to existing line object
101193
101292
  line.push(tmp.shift());// it's ok to have extra space indicator there
@@ -199003,7 +199102,7 @@ var es_function_name = __webpack_require__(68309);
199003
199102
  // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
199004
199103
  var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(13797);
199005
199104
  var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
199006
- ;// 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&
199105
+ ;// 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&
199007
199106
  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()}
199008
199107
  var staticRenderFns = []
199009
199108
 
@@ -206986,7 +207085,7 @@ var SignNode = __webpack_require__(34450);
206986
207085
  // EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
206987
207086
  var ParagraphNode = __webpack_require__(14208);
206988
207087
  ;// CONCATENATED MODULE: ./src/components/version.ts
206989
- /* harmony default export */ var version = ('2.0.58');
207088
+ /* harmony default export */ var version = ('2.0.61');
206990
207089
  ;// 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&
206991
207090
  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)}
206992
207091
  var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_staticRenderFns = []
@@ -209142,9 +209241,7 @@ var DrawPageTree = /*#__PURE__*/function () {
209142
209241
  }
209143
209242
 
209144
209243
  if (dPage.drawDomLevel && dPage.drawDomLevel.stage) {
209145
- {
209146
- dPage.drawDomLevel.clearStage();
209147
- }
209244
+ dPage.drawDomLevel.clearStage();
209148
209245
  }
209149
209246
  }
209150
209247
  }
@@ -214654,6 +214751,7 @@ var StagePosition = __webpack_require__(57674);
214654
214751
 
214655
214752
 
214656
214753
 
214754
+
214657
214755
 
214658
214756
 
214659
214757
  var VueController = /*#__PURE__*/function () {
@@ -220476,6 +220574,44 @@ var VueController = /*#__PURE__*/function () {
220476
220574
  hoEditorFactory.docTree.curDomRange = newRange;
220477
220575
  hoEditorFactory.drawTree.moveCaretToPath(curDomRange.startPath);
220478
220576
  }
220577
+ /**
220578
+ * 查询光标所在位置之前的文本内容
220579
+ */
220580
+
220581
+ }, {
220582
+ key: "getCaretPreviousTextNode",
220583
+ value: function getCaretPreviousTextNode() {
220584
+ var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
220585
+ var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
220586
+ var node = curDomRange.npEnd.node;
220587
+ var text = "";
220588
+
220589
+ var getText = function getText(previousNode) {
220590
+ if (previousNode instanceof TextNode/* TextNode */.R || previousNode instanceof LabelNode/* LabelNode */.P || previousNode instanceof DownListNode/* DownListNode */.yF) {
220591
+ return previousNode.text;
220592
+ } 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) {
220593
+ return previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode.text;
220594
+ }
220595
+ };
220596
+
220597
+ if (node instanceof TextNode/* TextNode */.R && !(node instanceof TextInputFieldNode/* TextInputFieldNode */.re)) {
220598
+ if (node.text) {
220599
+ text = node.text;
220600
+ } else {
220601
+ text = getText(node.previousLeaf());
220602
+ }
220603
+ } else if ((node === null || node === void 0 ? void 0 : node.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
220604
+ text = getText(node.parentNode.previousLeaf());
220605
+
220606
+ if (!text) {
220607
+ text = getText(node.previousLeaf());
220608
+ }
220609
+ } else if (node instanceof SignNode/* SignNode */.N && node.type !== 3) {
220610
+ text = getText(node.previousLeaf());
220611
+ }
220612
+
220613
+ return text;
220614
+ }
220479
220615
  /**
220480
220616
  * 初始化文档
220481
220617
  */
@@ -220716,6 +220852,11 @@ var VueController = /*#__PURE__*/function () {
220716
220852
  node.imageDataBase64String = src;
220717
220853
  hoEditorFactory.docTree.change(changeEvent);
220718
220854
  }
220855
+ }, {
220856
+ key: "setParaCustomProperty",
220857
+ value: function setParaCustomProperty(paragraphNode, customProperty) {
220858
+ paragraphNode.setCustomProperty(customProperty);
220859
+ }
220719
220860
  }]);
220720
220861
 
220721
220862
  return VueController;
@@ -222778,7 +222919,7 @@ var PrintController = /*#__PURE__*/function () {
222778
222919
  beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
222779
222920
  xml = hoEditorFactory.vueController.getDocXml(true);
222780
222921
  htmlText = {
222781
- text: ""
222922
+ text: ''
222782
222923
  };
222783
222924
  hPromise = Promise.resolve();
222784
222925
  hPromise = hPromise.then(function () {
@@ -222849,12 +222990,14 @@ var PrintController = /*#__PURE__*/function () {
222849
222990
  path = hoEditorFactory.docTree.curDomRange.normalize().endPath;
222850
222991
  beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
222851
222992
  xml = hoEditorFactory.vueController.getDocXml(true);
222852
- orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
222993
+ orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
222853
222994
  format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
222854
222995
  options = {
222855
222996
  orientation: orientation,
222856
- unit: "px",
222857
- format: format
222997
+ unit: 'px',
222998
+ format: format,
222999
+ hotfixes: ['px_scaling'],
223000
+ compress: true
222858
223001
  };
222859
223002
  PDF = new jspdf/* default */.ZP(options);
222860
223003
  hPromise = Promise.resolve();
@@ -222877,7 +223020,7 @@ var PrintController = /*#__PURE__*/function () {
222877
223020
  hoEditorFactory.vueController.openXml(xml);
222878
223021
  PDF.deletePage(1);
222879
223022
  return new Promise(function (resolves) {
222880
- resolves(PDF.output("datauristring"));
223023
+ resolves(PDF.output('datauristring'));
222881
223024
  });
222882
223025
  });
222883
223026
 
@@ -222892,7 +223035,7 @@ var PrintController = /*#__PURE__*/function () {
222892
223035
  setTimeout(function () {
222893
223036
  hoEditorFactory.vueController.moveCaretToPath(path);
222894
223037
  }, 0);
222895
- return _context2.abrupt("return", base64.replace(/^data:application\/pdf;filename=generated.pdf;base64,/, ""));
223038
+ return _context2.abrupt("return", base64.replace(/^data:application\/pdf;filename=generated.pdf;base64,/, ''));
222896
223039
 
222897
223040
  case 20:
222898
223041
  return _context2.abrupt("return", null);
@@ -222919,10 +223062,10 @@ var PrintController = /*#__PURE__*/function () {
222919
223062
  }, {
222920
223063
  key: "setjsPDFFonts",
222921
223064
  value: function setjsPDFFonts(font) {
222922
- jspdf/* default.API.events.push */.ZP.API.events.push(["addFonts", function () {
222923
- this.addFileToVFS("SimSun-normal.ttf", font);
222924
- this.addFont("SimSun-normal.ttf", "SimSun", "normal");
222925
- this.setFont("SimSun", "normal");
223065
+ jspdf/* default.API.events.push */.ZP.API.events.push(['addFonts', function () {
223066
+ this.addFileToVFS('SimSun-normal.ttf', font);
223067
+ this.addFont('SimSun-normal.ttf', 'SimSun', 'normal');
223068
+ this.setFont('SimSun', 'normal');
222926
223069
  }]);
222927
223070
  this._isSetFont = true;
222928
223071
 
@@ -222953,8 +223096,8 @@ var PrintController = /*#__PURE__*/function () {
222953
223096
  return;
222954
223097
  }
222955
223098
 
222956
- var fileType = type ? type : "pdf";
222957
- var fileName = pdfName ? pdfName : hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : "电子病历文档"; // 保存打印前文档状态 和 内容
223099
+ var fileType = type ? type : 'pdf';
223100
+ var fileName = pdfName ? pdfName : hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档'; // 保存打印前文档状态 和 内容
222958
223101
 
222959
223102
  var beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
222960
223103
  var xml = hoEditorFactory.vueController.getDocXml(true);
@@ -222968,21 +223111,21 @@ var PrintController = /*#__PURE__*/function () {
222968
223111
  });
222969
223112
  hPromise = hPromise.then(function () {
222970
223113
  return new Promise(function (resolve) {
222971
- var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
223114
+ var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
222972
223115
  var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
222973
223116
 
222974
- if (hoEditorFactory.isFixedPrintToA4 && isSpecial) {
223117
+ if (hoEditorFactory.isFixedPrintToA4 == '1' && isSpecial) {
222975
223118
  format = _this3._a4Size[orientation];
222976
223119
  }
222977
223120
 
222978
- if (hoEditorFactory.isFixedPrintToA4T && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223121
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
222979
223122
  format = [793, 1122];
222980
223123
  orientation = 'p';
222981
223124
  }
222982
223125
 
222983
223126
  var options = {
222984
223127
  orientation: orientation,
222985
- unit: "px",
223128
+ unit: 'px',
222986
223129
  format: format
222987
223130
  };
222988
223131
  // const PDF = new jsPDF(orientation, "px", [hoEditorFactory.pageProperty.widthMm, hoEditorFactory.pageProperty.heightMm], false, true, );
@@ -223012,14 +223155,20 @@ var PrintController = /*#__PURE__*/function () {
223012
223155
 
223013
223156
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
223014
223157
  var beforeStatus = hoEditorFactory.drawTree.paintStatus;
223158
+ var xml = "";
223159
+
223160
+ if (hoEditorFactory.printStatus.printRange !== 2) {
223161
+ xml = hoEditorFactory.vueController.getDocXml(true, true);
223162
+ }
223163
+
223015
223164
  hoEditorFactory.startPageNum = 0;
223016
223165
  hoEditorFactory.firstPageStartTop = 0;
223017
223166
 
223018
223167
  if (!this._isSetFont) {
223019
223168
  this._waitPrint = true;
223020
223169
 
223021
- 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>", "提示", {
223022
- iconClass: "el-icon-loading",
223170
+ 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>", '提示', {
223171
+ iconClass: 'el-icon-loading',
223023
223172
  center: true,
223024
223173
  showConfirmButton: false,
223025
223174
  dangerouslyUseHTMLString: true
@@ -223033,12 +223182,12 @@ var PrintController = /*#__PURE__*/function () {
223033
223182
  }
223034
223183
 
223035
223184
  if (printMode && printAppoint) {
223036
- var appoint = printAppoint.replace(/\s*/g, "").replace(/[^\d]/g, ",").split(",");
223185
+ var appoint = printAppoint.replace(/\s*/g, '').replace(/[^\d]/g, ',').split(',');
223037
223186
  var maxLen = hoEditorFactory.drawTree.drawPages.length;
223038
223187
  var error = appoint.filter(function (pages) {
223039
223188
  return pages && Number(pages) > maxLen;
223040
223189
  });
223041
- if (error.length > 0) return "指定页输入超出文档页范围";
223190
+ if (error.length > 0) return '指定页输入超出文档页范围';
223042
223191
  }
223043
223192
 
223044
223193
  var setStatus = new Promise( /*#__PURE__*/function () {
@@ -223083,23 +223232,23 @@ var PrintController = /*#__PURE__*/function () {
223083
223232
  setStatus.then(function (res) {
223084
223233
  if (res) {
223085
223234
  return new Promise(function (reslove, reject) {
223086
- var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
223235
+ var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
223087
223236
  var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
223088
223237
 
223089
- if (hoEditorFactory.isFixedPrintToA4) {
223238
+ if (hoEditorFactory.isFixedPrintToA4 == '1') {
223090
223239
  format = _this4._a4Size[orientation];
223091
223240
  }
223092
223241
 
223093
- if (hoEditorFactory.isFixedPrintToA4T && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223242
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223094
223243
  format = [793, 1122];
223095
223244
  orientation = 'p';
223096
223245
  }
223097
223246
 
223098
223247
  var options = {
223099
223248
  orientation: orientation,
223100
- unit: "px",
223249
+ unit: 'px',
223101
223250
  format: format,
223102
- hotfixes: ["px_scaling"],
223251
+ hotfixes: ['px_scaling'],
223103
223252
  compress: true
223104
223253
  };
223105
223254
  var PDF = new jspdf/* default */.ZP(options);
@@ -223107,20 +223256,26 @@ var PrintController = /*#__PURE__*/function () {
223107
223256
  });
223108
223257
  }
223109
223258
  }).then(function (res) {
223110
- if (res === "printend") {
223259
+ if (res === 'printend') {
223111
223260
  if (callback) {
223112
223261
  callback(hoEditorFactory.printStatus.printRecord.last());
223113
223262
  }
223114
223263
 
223115
- hoEditorFactory.drawTree.paintStatus = beforeStatus;
223116
- hoEditorFactory.printStatus.printRange = 2;
223117
223264
  hoEditorFactory.printStatus.printAppoint = '';
223118
223265
  hoEditorFactory.printStatus.drawPrintRecord.Position = [0, 0];
223119
223266
  hoEditorFactory.startPageNum = 0;
223120
223267
  hoEditorFactory.firstPageStartTop = 0;
223121
- hoEditorFactory.printStatus.clearArea();
223122
- hoEditorFactory.printStatus.drawPrintRecord.clear();
223123
- hoEditorFactory.drawTree.rebuildAllDrawLine(false);
223268
+
223269
+ if (hoEditorFactory.printStatus.printRange !== 2) {
223270
+ hoEditorFactory.printStatus.printRange = 2;
223271
+ hoEditorFactory.drawTree.paintStatus = 5;
223272
+ hoEditorFactory.vueController.openXml(xml);
223273
+ } else {
223274
+ hoEditorFactory.drawTree.paintStatus = beforeStatus;
223275
+ hoEditorFactory.printStatus.clearArea();
223276
+ hoEditorFactory.printStatus.drawPrintRecord.clear();
223277
+ hoEditorFactory.vueController.rebuildAll(true);
223278
+ }
223124
223279
  }
223125
223280
  });
223126
223281
  }
@@ -223188,7 +223343,7 @@ var PrintController = /*#__PURE__*/function () {
223188
223343
  while (1) {
223189
223344
  switch (_context5.prev = _context5.next) {
223190
223345
  case 0:
223191
- console.time("连续打印总用时");
223346
+ console.time('连续打印总用时');
223192
223347
  list = [];
223193
223348
  xmlInfoes.xmlList.forEach(function (v) {
223194
223349
  list.push([v.isMerge, v.xml]);
@@ -223207,7 +223362,7 @@ var PrintController = /*#__PURE__*/function () {
223207
223362
  hoEditorFactory.printStatus.printMode = 0;
223208
223363
  hoEditorFactory.drawTree.paintStatus = DrawTree/* PaintState.psPreview */.Dh.psPreview;
223209
223364
  hPromise = Promise.resolve();
223210
- console.time("连续查看病历合并总用时");
223365
+ console.time('连续查看病历合并总用时');
223211
223366
  hPromise = hPromise.then(function (res) {
223212
223367
  return new Promise(function (resolve) {
223213
223368
  Promise.all([hoEditorFactory.vueController.openDocsForPrint(list)]).then(function () {
@@ -223221,8 +223376,8 @@ var PrintController = /*#__PURE__*/function () {
223221
223376
  });
223222
223377
  });
223223
223378
  hPromise = hPromise.then(function () {
223224
- console.timeEnd("连续查看病历合并总用时");
223225
- console.time("生成pdf用时");
223379
+ console.timeEnd('连续查看病历合并总用时');
223380
+ console.time('生成pdf用时');
223226
223381
  return new Promise( /*#__PURE__*/function () {
223227
223382
  var _ref2 = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee4(resolve) {
223228
223383
  var orientation, format, options, PDF;
@@ -223230,23 +223385,23 @@ var PrintController = /*#__PURE__*/function () {
223230
223385
  while (1) {
223231
223386
  switch (_context4.prev = _context4.next) {
223232
223387
  case 0:
223233
- orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
223388
+ orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
223234
223389
  format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
223235
223390
 
223236
- if (hoEditorFactory.isFixedPrintToA4) {
223391
+ if (hoEditorFactory.isFixedPrintToA4 == '1') {
223237
223392
  format = _this5._a4Size[orientation];
223238
223393
  }
223239
223394
 
223240
- if (hoEditorFactory.isFixedPrintToA4T && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223395
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223241
223396
  format = [793, 1122];
223242
223397
  orientation = 'p';
223243
223398
  }
223244
223399
 
223245
223400
  options = {
223246
223401
  orientation: orientation,
223247
- unit: "px",
223402
+ unit: 'px',
223248
223403
  format: format,
223249
- hotfixes: ["px_scaling"]
223404
+ hotfixes: ['px_scaling']
223250
223405
  };
223251
223406
  PDF = new jspdf/* default */.ZP(options);
223252
223407
  PrintStatus/* Print.printToPDF */.Kh.printToPDF(_this5._hoEditorFactoryID, PDF, undefined, undefined, resolve, positionY, format);
@@ -223267,7 +223422,7 @@ var PrintController = /*#__PURE__*/function () {
223267
223422
  _context5.next = 17;
223268
223423
  return hPromise.then(function (res) {
223269
223424
  if (res) {
223270
- console.timeEnd("生成pdf用时");
223425
+ console.timeEnd('生成pdf用时');
223271
223426
  return new Promise(function (resolves) {
223272
223427
  var last = hoEditorFactory.printStatus.printRecord.last();
223273
223428
  var pos;
@@ -223302,7 +223457,7 @@ var PrintController = /*#__PURE__*/function () {
223302
223457
  // hoEditorFactory.drawTree.rebuildAllDrawLine(false);
223303
223458
  // }, 0);
223304
223459
 
223305
- console.timeEnd("连续打印总用时");
223460
+ console.timeEnd('连续打印总用时');
223306
223461
  resolves(pos);
223307
223462
  });
223308
223463
  } else {
@@ -223318,7 +223473,7 @@ var PrintController = /*#__PURE__*/function () {
223318
223473
  // hoEditorFactory.drawTree.rebuildAllDrawLine(false);
223319
223474
  // }, 0);
223320
223475
 
223321
- console.timeEnd("连续打印总用时");
223476
+ console.timeEnd('连续打印总用时');
223322
223477
  return null;
223323
223478
  }
223324
223479
  });
@@ -223356,7 +223511,7 @@ var PrintController = /*#__PURE__*/function () {
223356
223511
  }()
223357
223512
  /**
223358
223513
  * 批量打印病历 当前
223359
- * @param xmlList [boolean, string, boolean, boolean][]
223514
+ * @param xmlList [string, boolean, string, boolean][]
223360
223515
  * 四个参数分别是: xml内容 是否合并 病程记录id:用来判断是否是病程记录和返回对应病程记录的坐标(处理多个不同病程记录的情况) 是否是最后一份病程记录
223361
223516
  */
223362
223517
 
@@ -223380,8 +223535,8 @@ var PrintController = /*#__PURE__*/function () {
223380
223535
  xmlIndex = -1;
223381
223536
  mergeList = [];
223382
223537
  options = {
223383
- unit: "px",
223384
- hotfixes: ["px_scaling"],
223538
+ unit: 'px',
223539
+ hotfixes: ['px_scaling'],
223385
223540
  compress: true
223386
223541
  };
223387
223542
  PDF = new jspdf/* default */.ZP(options);
@@ -223465,7 +223620,7 @@ var PrintController = /*#__PURE__*/function () {
223465
223620
  hoEditorFactory.drawTree.paintStatus = beforePrintStatus;
223466
223621
  hoEditorFactory.vueController.openXml(xml);
223467
223622
  PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
223468
- name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : "电子病历文档";
223623
+ name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档';
223469
223624
  PrintStatus/* Print.openDataUriInWindow */.Kh.openDataUriInWindow(PDF, name, hoEditorFactory.pageProperty.widthPixes);
223470
223625
  }
223471
223626
 
@@ -224376,6 +224531,7 @@ var HOEditorFactory = /*#__PURE__*/function () {
224376
224531
  this._lastSaveTime = new Date(Date.now());
224377
224532
  this._superiorSigns = []; //上级医生签名
224378
224533
 
224534
+ this._isEnabledGlobalColor = false;
224379
224535
  this._hoEditorFactoryId = id;
224380
224536
  }
224381
224537
  /**
@@ -225034,13 +225190,13 @@ var HOEditorFactory = /*#__PURE__*/function () {
225034
225190
  }
225035
225191
  }
225036
225192
  }, {
225037
- key: "isFixedPrintToA4T",
225193
+ key: "isRotate",
225038
225194
  get: function get() {
225039
- return this._isFixedPrintToA4T;
225195
+ return this._isRotate;
225040
225196
  },
225041
225197
  set: function set(value) {
225042
- if (this._isFixedPrintToA4T !== value) {
225043
- this._isFixedPrintToA4T = value;
225198
+ if (this._isRotate !== value) {
225199
+ this._isRotate = value;
225044
225200
  }
225045
225201
  }
225046
225202
  }, {
@@ -225073,6 +225229,16 @@ var HOEditorFactory = /*#__PURE__*/function () {
225073
225229
  this._printBlack = value;
225074
225230
  }
225075
225231
  }
225232
+ }, {
225233
+ key: "isEnabledGlobalColor",
225234
+ get: function get() {
225235
+ return this._isEnabledGlobalColor;
225236
+ },
225237
+ set: function set(value) {
225238
+ if (this._isEnabledGlobalColor !== value) {
225239
+ this._isEnabledGlobalColor = value;
225240
+ }
225241
+ }
225076
225242
  }, {
225077
225243
  key: "clear",
225078
225244
  value: function clear() {
@@ -232596,14 +232762,14 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232596
232762
  _this.defaultDocProperty = {
232597
232763
  version: version,
232598
232764
  type: 0,
232599
- title: "",
232600
- docID: "",
232601
- patientID: "",
232602
- patientName: "",
232603
- lastEditTime: "",
232604
- lastEditorID: "",
232605
- lastEditorName: "",
232606
- currentIP: ""
232765
+ title: '',
232766
+ docID: '',
232767
+ patientID: '',
232768
+ patientName: '',
232769
+ lastEditTime: '',
232770
+ lastEditorID: '',
232771
+ lastEditorName: '',
232772
+ currentIP: ''
232607
232773
  };
232608
232774
  _this.contentIsModify = {
232609
232775
  isModify: false
@@ -232619,7 +232785,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232619
232785
  }, {
232620
232786
  key: "contentIsModifyChange",
232621
232787
  value: function contentIsModifyChange(value) {
232622
- this.$emit("contentIsModify", this.contentIsModify);
232788
+ this.$emit('contentIsModify', this.contentIsModify);
232623
232789
  }
232624
232790
  }, {
232625
232791
  key: "editJsonChange",
@@ -232636,12 +232802,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232636
232802
  }, {
232637
232803
  key: "textStyleChange",
232638
232804
  value: function textStyleChange(val) {
232639
- this.$emit("textStyleChange", val);
232805
+ this.$emit('textStyleChange', val);
232640
232806
  }
232641
232807
  }, {
232642
232808
  key: "modalStatusChange",
232643
232809
  value: function modalStatusChange(newStr) {
232644
- if (newStr[0] !== "find") {
232810
+ if (newStr[0] !== 'find') {
232645
232811
  this.setControlProperty(newStr[0], newStr[1], newStr[2]);
232646
232812
  } else {
232647
232813
  this.controlFindType = true;
@@ -232650,20 +232816,20 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232650
232816
  }, {
232651
232817
  key: "controlTypeChange",
232652
232818
  value: function controlTypeChange(newValue, oldValue) {
232653
- if (newValue === "" && ['text', 'date', 'comment'].includes(oldValue)) {
232654
- this.$emit("closeTextModal");
232819
+ if (newValue === '' && ['text', 'date', 'comment'].includes(oldValue)) {
232820
+ this.$emit('closeTextModal');
232655
232821
  this.customPropertyValue = {};
232656
232822
  }
232657
232823
 
232658
232824
  if (['text', 'date'].includes(newValue)) {
232659
232825
  if ((0,type/* isObject */.Kn)(this.customPropertyValue)) {
232660
- this.$emit("openTextModal", _objectSpread2({}, this.customPropertyValue));
232826
+ this.$emit('openTextModal', _objectSpread2({}, this.customPropertyValue));
232661
232827
  }
232662
232828
  } else if (['comment'].includes(newValue)) {
232663
232829
  var _HOEditorFactorys$ins;
232664
232830
 
232665
232831
  var customProperty = (_HOEditorFactorys$ins = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId).vueController.getOnSelectedComment()) === null || _HOEditorFactorys$ins === void 0 ? void 0 : _HOEditorFactorys$ins.customProperty;
232666
- if (customProperty) this.$emit("openTextModal", _objectSpread2({}, customProperty));
232832
+ if (customProperty) this.$emit('openTextModal', _objectSpread2({}, customProperty));
232667
232833
  }
232668
232834
  }
232669
232835
  }, {
@@ -232695,14 +232861,15 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232695
232861
  value: function isFixedPrintToA4Change() {
232696
232862
  var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
232697
232863
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
232698
- hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
232699
- }
232700
- }, {
232701
- key: "isFixedPrintToA4TChange",
232702
- value: function isFixedPrintToA4TChange() {
232703
- var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
232704
- var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
232705
- hoEditorFactory && (hoEditorFactory.isFixedPrintToA4T = this.isFixedPrintToA4T);
232864
+ var isFixedPrintToA4 = this.isFixedPrintToA4;
232865
+
232866
+ if (isFixedPrintToA4 === true) {
232867
+ isFixedPrintToA4 = '1';
232868
+ } else if (isFixedPrintToA4 === false) {
232869
+ isFixedPrintToA4 = '';
232870
+ }
232871
+
232872
+ hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = isFixedPrintToA4);
232706
232873
  } // 监听默认打印纸张设置变化
232707
232874
 
232708
232875
  }, {
@@ -232746,6 +232913,13 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232746
232913
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
232747
232914
  hoEditorFactory && (hoEditorFactory.printBlack = this.printBlack);
232748
232915
  }
232916
+ }, {
232917
+ key: "isEnabledGlobalColorChange",
232918
+ value: function isEnabledGlobalColorChange() {
232919
+ var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
232920
+ var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
232921
+ hoEditorFactory && (hoEditorFactory.isEnabledGlobalColor = this.isEnabledGlobalColor);
232922
+ }
232749
232923
  }, {
232750
232924
  key: "created",
232751
232925
  value: function created() {
@@ -232776,7 +232950,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232776
232950
  }); // 初始化所有文档
232777
232951
 
232778
232952
  this.docList.forEach(function () {
232779
- var id = (0,util/* generateID */.y)("HO");
232953
+ var id = (0,util/* generateID */.y)('HO');
232780
232954
  var hoEditor = new HOEditorFactory(id);
232781
232955
 
232782
232956
  _this3.hoEditorFactoryIdList.push(id);
@@ -232785,11 +232959,18 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232785
232959
  hoEditor.superiorSigns = (0,toConsumableArray/* default */.Z)(_this3.superiorSigns);
232786
232960
  }
232787
232961
 
232788
- hoEditor.isFixedPrintToA4 = _this3.isFixedPrintToA4;
232789
- hoEditor.isFixedPrintToA4T = _this3.isFixedPrintToA4T;
232962
+ if (_this3.isFixedPrintToA4 === true) {
232963
+ hoEditor.isFixedPrintToA4 = '1';
232964
+ } else if (_this3.isFixedPrintToA4 === false) {
232965
+ hoEditor.isFixedPrintToA4 = '';
232966
+ } else {
232967
+ hoEditor.isFixedPrintToA4 = _this3.isFixedPrintToA4;
232968
+ }
232969
+
232790
232970
  hoEditor.isUseImagePrint = _this3.isUseImagePrint;
232791
232971
  hoEditor.isUseForm = _this3.isUseForm;
232792
232972
  hoEditor.printBlack = _this3.printBlack;
232973
+ hoEditor.isEnabledGlobalColor = _this3.isEnabledGlobalColor;
232793
232974
  hoEditor.contentIsModify = _this3.contentIsModify;
232794
232975
  hoEditor.isCanEditHeadFoot = _this3.isCanEditHeadFoot;
232795
232976
  hoEditor.docTree.docProperty = _this3.defaultDocProperty;
@@ -232820,17 +233001,17 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232820
233001
 
232821
233002
  var getLabelNode = function getLabelNode() {
232822
233003
  var labelNode = [];
232823
- var isIncludes = "";
233004
+ var isIncludes = '';
232824
233005
  var hoEditor = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(_this4.activeDocId);
232825
233006
  var currentDomRange = hoEditor.vueController.getDomRange();
232826
233007
 
232827
233008
  if (currentDomRange !== null && currentDomRange !== void 0 && currentDomRange.isEmpty) {
232828
233009
  if (nodeInfoes.node() instanceof LabelNode/* LabelNode */.P) {
232829
233010
  labelNode.push(nodeInfoes.node());
232830
- isIncludes = "toText";
233011
+ isIncludes = 'toText';
232831
233012
  }
232832
233013
  } else {
232833
- isIncludes = "toLabel";
233014
+ isIncludes = 'toLabel';
232834
233015
  var startPath = currentDomRange.startPath;
232835
233016
  var endPath = currentDomRange.endPath;
232836
233017
  var selectNodes = DomRange/* DomRange.getSelectDomNodes */.a.getSelectDomNodes(_this4.activeDocId, startPath, endPath, true)[0];
@@ -232838,7 +233019,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232838
233019
  if (selectNodes.length > 0) {
232839
233020
  selectNodes.forEach(function (v) {
232840
233021
  if (v instanceof LabelNode/* LabelNode */.P) {
232841
- isIncludes = "toText";
233022
+ isIncludes = 'toText';
232842
233023
  labelNode.push(v);
232843
233024
  }
232844
233025
  });
@@ -232877,7 +233058,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232877
233058
  };
232878
233059
  }
232879
233060
 
232880
- this.$emit("rightClickEvent", nodeInfoes);
233061
+ this.$emit('rightClickEvent', nodeInfoes);
232881
233062
  }
232882
233063
  /**
232883
233064
  * 初始化事件
@@ -232919,7 +233100,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232919
233100
  }, {
232920
233101
  key: "insertComments",
232921
233102
  value: function insertComments(content) {
232922
- this.$emit("insertComments", content);
233103
+ this.$emit('insertComments', content);
232923
233104
  }
232924
233105
  /**
232925
233106
  * 双击事件
@@ -232928,7 +233109,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232928
233109
  }, {
232929
233110
  key: "dblNodeClick",
232930
233111
  value: function dblNodeClick(node) {
232931
- this.$emit("dblClickEvent", node);
233112
+ this.$emit('dblClickEvent', node);
232932
233113
  } // 设置字体
232933
233114
 
232934
233115
  }, {
@@ -232950,7 +233131,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232950
233131
  this.activeDocId = activeDocId;
232951
233132
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId);
232952
233133
  hoEditorFactory.hoLocalStorage.initHoWebSql();
232953
- this.$emit("docReady", {
233134
+ this.$emit('docReady', {
232954
233135
  vueController: hoEditorFactory.vueController,
232955
233136
  baseController: hoEditorFactory.baseController,
232956
233137
  domController: hoEditorFactory.domController,
@@ -232981,7 +233162,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232981
233162
  var property = _objectSpread2({}, pageProperty); // 字体
232982
233163
 
232983
233164
 
232984
- property.fontFormat = property.fontFormat ? (_property$fontFormat = property.fontFormat) === null || _property$fontFormat === void 0 ? void 0 : _property$fontFormat.match(/[\u4e00-\u9fa5]/g).join("") : "宋体"; // 字号
233165
+ property.fontFormat = property.fontFormat ? (_property$fontFormat = property.fontFormat) === null || _property$fontFormat === void 0 ? void 0 : _property$fontFormat.match(/[\u4e00-\u9fa5]/g).join('') : '宋体'; // 字号
232985
233166
 
232986
233167
  if (isNaN(Number(property.fontSize))) {
232987
233168
  json_font_namespaceObject.CH.forEach(function (v) {
@@ -233008,12 +233189,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
233008
233189
 
233009
233190
  if (pageProperty.elementBackColor) {
233010
233191
  hoEditorFactory.vueController.setReviewLevelColor({
233011
- reviewLev1Color: "#F19191",
233012
- reviewLev2Color: "#FFFFFF",
233013
- reviewLev3Color: "#FFFFFF",
233014
- fieldColor: "#DFFFFF",
233015
- dateTimeColor: "#FBFAD0",
233016
- downListColor: "#D2ECB1"
233192
+ reviewLev1Color: '#F19191',
233193
+ reviewLev2Color: '#FFFFFF',
233194
+ reviewLev3Color: '#FFFFFF',
233195
+ fieldColor: '#DFFFFF',
233196
+ dateTimeColor: '#FBFAD0',
233197
+ downListColor: '#D2ECB1'
233017
233198
  });
233018
233199
  } // 复制粘贴基准值
233019
233200
 
@@ -233084,7 +233265,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
233084
233265
  }, {
233085
233266
  key: "closeControlModal",
233086
233267
  value: function closeControlModal() {
233087
- this.setControlProperty("", "add", "");
233268
+ this.setControlProperty('', 'add', '');
233088
233269
  }
233089
233270
  /**
233090
233271
  * 非文档区域右键事件
@@ -233093,7 +233274,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
233093
233274
  }, {
233094
233275
  key: "blankAreaRightClick",
233095
233276
  value: function blankAreaRightClick(e) {
233096
- if (e.target instanceof HTMLDivElement && e.target.className === "editor") {}
233277
+ if (e.target instanceof HTMLDivElement && e.target.className === 'editor') {}
233097
233278
  }
233098
233279
  }]);
233099
233280
 
@@ -233131,13 +233312,9 @@ __decorate([Prop({
233131
233312
  })], HoDocs.prototype, "isUseTipText", void 0);
233132
233313
 
233133
233314
  __decorate([Prop({
233134
- default: false
233315
+ default: ''
233135
233316
  })], HoDocs.prototype, "isFixedPrintToA4", void 0);
233136
233317
 
233137
- __decorate([Prop({
233138
- default: false
233139
- })], HoDocs.prototype, "isFixedPrintToA4T", void 0);
233140
-
233141
233318
  __decorate([Prop({
233142
233319
  default: true
233143
233320
  })], HoDocs.prototype, "isUseImagePrint", void 0);
@@ -233150,58 +233327,60 @@ __decorate([Prop({
233150
233327
  default: true
233151
233328
  })], HoDocs.prototype, "printBlack", void 0);
233152
233329
 
233153
- __decorate([Watch("contentIsModify", {
233330
+ __decorate([Prop({
233331
+ default: false
233332
+ })], HoDocs.prototype, "isEnabledGlobalColor", void 0);
233333
+
233334
+ __decorate([Watch('contentIsModify', {
233154
233335
  deep: true
233155
233336
  })], HoDocs.prototype, "contentIsModifyChange", null);
233156
233337
 
233157
- __decorate([Watch("editJson")], HoDocs.prototype, "editJsonChange", null);
233338
+ __decorate([Watch('editJson')], HoDocs.prototype, "editJsonChange", null);
233158
233339
 
233159
233340
  __decorate([Provide()], HoDocs.prototype, "getCustomProperty", null);
233160
233341
 
233161
- __decorate([Watch("textStyle", {
233342
+ __decorate([Watch('textStyle', {
233162
233343
  deep: true
233163
233344
  })], HoDocs.prototype, "textStyleChange", null);
233164
233345
 
233165
- __decorate([Watch("modalStatus", {
233346
+ __decorate([Watch('modalStatus', {
233166
233347
  deep: true
233167
233348
  })], HoDocs.prototype, "modalStatusChange", null);
233168
233349
 
233169
- __decorate([Watch("controlType", {
233350
+ __decorate([Watch('controlType', {
233170
233351
  deep: true
233171
233352
  })], HoDocs.prototype, "controlTypeChange", null);
233172
233353
 
233173
- __decorate([Watch("pageProperty", {
233354
+ __decorate([Watch('pageProperty', {
233174
233355
  deep: true
233175
233356
  })], HoDocs.prototype, "pagePropertyChange", null);
233176
233357
 
233177
- __decorate([Watch("docProperty", {
233358
+ __decorate([Watch('docProperty', {
233178
233359
  deep: true
233179
233360
  })], HoDocs.prototype, "docPropertyChange", null);
233180
233361
 
233181
- __decorate([Watch("isFixedPrintToA4", {
233362
+ __decorate([Watch('isFixedPrintToA4', {
233182
233363
  deep: true
233183
233364
  })], HoDocs.prototype, "isFixedPrintToA4Change", null);
233184
233365
 
233185
- __decorate([Watch("isFixedPrintToA4T", {
233186
- deep: true
233187
- })], HoDocs.prototype, "isFixedPrintToA4TChange", null);
233188
-
233189
- __decorate([Watch("isUseImagePrint", {
233366
+ __decorate([Watch('isUseImagePrint', {
233190
233367
  deep: true
233191
233368
  })], HoDocs.prototype, "isUseImagePrintChange", null);
233192
233369
 
233193
- __decorate([Watch("isUseForm", {
233370
+ __decorate([Watch('isUseForm', {
233194
233371
  deep: true
233195
233372
  })], HoDocs.prototype, "isUseFormChange", null);
233196
233373
 
233197
- __decorate([Watch("superiorSigns")], HoDocs.prototype, "superiorSignsChange", null);
233374
+ __decorate([Watch('superiorSigns')], HoDocs.prototype, "superiorSignsChange", null);
233375
+
233376
+ __decorate([Watch('isCanEditHeadFoot')], HoDocs.prototype, "isCanEditHeadFootChange", null);
233198
233377
 
233199
- __decorate([Watch("isCanEditHeadFoot")], HoDocs.prototype, "isCanEditHeadFootChange", null);
233378
+ __decorate([Watch('printBlack')], HoDocs.prototype, "printBlackChange", null);
233200
233379
 
233201
- __decorate([Watch("printBlack")], HoDocs.prototype, "printBlackChange", null);
233380
+ __decorate([Watch('isEnabledGlobalColor')], HoDocs.prototype, "isEnabledGlobalColorChange", null);
233202
233381
 
233203
233382
  HoDocs = __decorate([vue_class_component_esm({
233204
- name: "HoDocs",
233383
+ name: 'HoDocs',
233205
233384
  components: {
233206
233385
  HoDoc: components_HoDoc,
233207
233386
  HoFooter: components_HoFooter,
@@ -239031,9 +239210,9 @@ HoRightMenu = __decorate([vue_class_component_esm({
239031
239210
  }
239032
239211
  })], HoRightMenu);
239033
239212
  /* harmony default export */ var toolbar_HoRightMenu = (HoRightMenu);
239034
- ;// 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&
239035
- 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()}
239036
- var viewvue_type_template_id_3c4d2e63_staticRenderFns = []
239213
+ ;// 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&
239214
+ 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()}
239215
+ var viewvue_type_template_id_4a7f3e3a_staticRenderFns = []
239037
239216
 
239038
239217
 
239039
239218
  ;// 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&
@@ -239476,8 +239655,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
239476
239655
  key: "isFixedPrintToA4Change",
239477
239656
  value: function isFixedPrintToA4Change() {
239478
239657
  var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
239479
- var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
239480
- hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
239658
+ var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId); // hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
239481
239659
  } // 打印时彩色字体转成黑色 printBlack
239482
239660
 
239483
239661
  }, {
@@ -239555,7 +239733,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
239555
239733
  __decorate([Prop()], PrintDocs.prototype, "pageProperty", void 0);
239556
239734
 
239557
239735
  __decorate([Prop({
239558
- default: false
239736
+ default: ''
239559
239737
  })], PrintDocs.prototype, "isFixedPrintToA4", void 0);
239560
239738
 
239561
239739
  __decorate([Prop({
@@ -239597,8 +239775,8 @@ PrintDocs = __decorate([vue_class_component_esm({
239597
239775
 
239598
239776
  var view_component = normalizeComponent(
239599
239777
  view_viewvue_type_script_lang_ts_,
239600
- viewvue_type_template_id_3c4d2e63_render,
239601
- viewvue_type_template_id_3c4d2e63_staticRenderFns,
239778
+ viewvue_type_template_id_4a7f3e3a_render,
239779
+ viewvue_type_template_id_4a7f3e3a_staticRenderFns,
239602
239780
  false,
239603
239781
  null,
239604
239782
  null,