hoeditor-web 2.0.59 → 2.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
  }
@@ -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;
@@ -11669,7 +11670,7 @@ var Print = /*#__PURE__*/function () {
11669
11670
  ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
11670
11671
  window.printBlack = hoEditorFactory.printBlack;
11671
11672
 
11672
- if (hoEditorFactory.isFixedPrintToA4T && format) {
11673
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && format) {
11673
11674
  // 避免切换纸张的打印方式 绘制只处理竖向情况
11674
11675
  if (orientation === 'p' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5' && index == 0) {
11675
11676
  ctx.translate(0, 1122 / 2); // 由于旋转是默认以左上角为中心 所以需要先移动位置 改变起始点
@@ -11811,7 +11812,7 @@ var Print = /*#__PURE__*/function () {
11811
11812
  return link.remove();
11812
11813
  }, 100);
11813
11814
  } else {
11814
- if (height <= 560 && !hoEditorFactory.isFixedPrintToA4T) {
11815
+ if (height <= 560 && hoEditorFactory.isFixedPrintToA4 !== '2') {
11815
11816
  PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
11816
11817
  }
11817
11818
 
@@ -12108,7 +12109,7 @@ var Print = /*#__PURE__*/function () {
12108
12109
  key: "printAllNew",
12109
12110
  value: function () {
12110
12111
  var _printAllNew = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee5(hoEditorFactoryID, reslove, PDF, position) {
12111
- 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;
12112
12113
 
12113
12114
  return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee5$(_context6) {
12114
12115
  while (1) {
@@ -12124,34 +12125,53 @@ var Print = /*#__PURE__*/function () {
12124
12125
  svgBox = document.createElement('div');
12125
12126
  svgBox.className = 'ho-print-svg-box';
12126
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
+
12127
12147
  _iterator4 = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.printStatus.printProcess());
12128
- _context6.prev = 8;
12148
+ _context6.prev = 15;
12129
12149
 
12130
12150
  _iterator4.s();
12131
12151
 
12132
- case 10:
12152
+ case 17:
12133
12153
  if ((_step4 = _iterator4.n()).done) {
12134
- _context6.next = 49;
12154
+ _context6.next = 50;
12135
12155
  break;
12136
12156
  }
12137
12157
 
12138
12158
  index = _step4.value;
12139
12159
 
12140
12160
  if (!(index == -1)) {
12141
- _context6.next = 16;
12161
+ _context6.next = 23;
12142
12162
  break;
12143
12163
  }
12144
12164
 
12145
- _context6.next = 15;
12165
+ _context6.next = 22;
12146
12166
  return message_box_default().confirm('请进行翻页', '打印提示', {
12147
12167
  confirmButtonText: '确定',
12148
12168
  type: 'info'
12149
12169
  });
12150
12170
 
12151
- case 15:
12152
- return _context6.abrupt("continue", 47);
12171
+ case 22:
12172
+ return _context6.abrupt("continue", 48);
12153
12173
 
12154
- case 16:
12174
+ case 23:
12155
12175
  last = index;
12156
12176
  cpage = hoEditorFactory.drawTree.drawPages[index];
12157
12177
 
@@ -12166,52 +12186,44 @@ var Print = /*#__PURE__*/function () {
12166
12186
  }
12167
12187
 
12168
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)) {
12169
- _context6.next = 22;
12189
+ _context6.next = 29;
12170
12190
  break;
12171
12191
  }
12172
12192
 
12173
- return _context6.abrupt("break", 49);
12174
-
12175
- case 22:
12176
- widthPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.widthMm, true);
12177
- heightPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.heightMm, true);
12178
- orientation = widthPixes > heightPixes ? 'l' : 'p';
12179
- formats = [widthPixes, heightPixes];
12180
- format = a4Size[orientation];
12181
- svg2pdfOptions = {
12182
- x: 0,
12183
- y: 0
12184
- };
12185
-
12186
- if (hoEditorFactory.isFixedPrintToA4 && format) {
12187
- if (orientation == 'l') {
12188
- svg2pdfOptions.x = format[0] - widthPixes;
12189
- svg2pdfOptions.y = (format[1] - heightPixes) / 2;
12190
- } else {
12191
- svg2pdfOptions.x = (format[0] - widthPixes) / 2;
12192
- }
12193
- }
12193
+ return _context6.abrupt("break", 50);
12194
12194
 
12195
+ case 29:
12195
12196
  if (!hoEditorFactory.isUseImagePrint) {
12196
- _context6.next = 40;
12197
+ _context6.next = 41;
12197
12198
  break;
12198
12199
  }
12199
12200
 
12200
- if (formats.length == 2 && !hoEditorFactory.isFixedPrintToA4) {
12201
+ if (formats.length == 2 && hoEditorFactory.isFixedPrintToA4 == '1') {
12201
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');
12202
12205
  } else {
12203
12206
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
12204
12207
  }
12205
12208
 
12206
12209
  ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
12210
+
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
+
12207
12218
  window.printBlack = hoEditorFactory.printBlack;
12208
12219
 
12209
- if (hoEditorFactory.isFixedPrintToA4T && format && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5' && index == 0) {
12220
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && index == 0 && !hoEditorFactory.isRotate && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
12210
12221
  // 避免切换纸张的打印方式 绘制只处理竖向情况
12211
12222
  if (orientation === 'p') {
12212
- ctx.translate(0, 1122 / 2); // 由于旋转是默认以左上角为中心 所以需要先移动位置 改变起始点
12213
-
12214
- 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;
12215
12227
  }
12216
12228
  }
12217
12229
 
@@ -12219,10 +12231,10 @@ var Print = /*#__PURE__*/function () {
12219
12231
  ctx.posY = svg2pdfOptions.y;
12220
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));
12221
12233
  ctx = null;
12222
- _context6.next = 46;
12234
+ _context6.next = 47;
12223
12235
  break;
12224
12236
 
12225
- case 40:
12237
+ case 41:
12226
12238
  _ctx6 = new canvas2svg({
12227
12239
  width: widthPixes,
12228
12240
  height: orientation === 'l' ? heightPixes - 1 : heightPixes,
@@ -12236,37 +12248,37 @@ var Print = /*#__PURE__*/function () {
12236
12248
  PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
12237
12249
  }
12238
12250
 
12239
- _context6.next = 45;
12251
+ _context6.next = 46;
12240
12252
  return svg2pdf((_ctx7 = _ctx6) === null || _ctx7 === void 0 ? void 0 : _ctx7.getSvg(), PDF, svg2pdfOptions);
12241
12253
 
12242
- case 45:
12254
+ case 46:
12243
12255
  _ctx6 = null;
12244
12256
 
12245
- case 46:
12257
+ case 47:
12246
12258
  index > 0 && ((_cpage$drawDomLevel12 = cpage.drawDomLevel) === null || _cpage$drawDomLevel12 === void 0 ? void 0 : _cpage$drawDomLevel12.clearStage());
12247
12259
 
12248
- case 47:
12249
- _context6.next = 10;
12260
+ case 48:
12261
+ _context6.next = 17;
12250
12262
  break;
12251
12263
 
12252
- case 49:
12253
- _context6.next = 54;
12264
+ case 50:
12265
+ _context6.next = 55;
12254
12266
  break;
12255
12267
 
12256
- case 51:
12257
- _context6.prev = 51;
12258
- _context6.t0 = _context6["catch"](8);
12268
+ case 52:
12269
+ _context6.prev = 52;
12270
+ _context6.t0 = _context6["catch"](15);
12259
12271
 
12260
12272
  _iterator4.e(_context6.t0);
12261
12273
 
12262
- case 54:
12263
- _context6.prev = 54;
12274
+ case 55:
12275
+ _context6.prev = 55;
12264
12276
 
12265
12277
  _iterator4.f();
12266
12278
 
12267
- return _context6.finish(54);
12279
+ return _context6.finish(55);
12268
12280
 
12269
- case 57:
12281
+ case 58:
12270
12282
  if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) {
12271
12283
  hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
12272
12284
  }
@@ -12284,12 +12296,12 @@ var Print = /*#__PURE__*/function () {
12284
12296
  hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
12285
12297
  reslove();
12286
12298
 
12287
- case 61:
12299
+ case 62:
12288
12300
  case "end":
12289
12301
  return _context6.stop();
12290
12302
  }
12291
12303
  }
12292
- }, _callee5, null, [[8, 51, 54, 57]]);
12304
+ }, _callee5, null, [[15, 52, 55, 58]]);
12293
12305
  }));
12294
12306
 
12295
12307
  function printAllNew(_x15, _x16, _x17, _x18) {
@@ -26241,10 +26253,28 @@ var CellNode = /*#__PURE__*/function (_RectNode) {
26241
26253
  // return;
26242
26254
  // }
26243
26255
  // }
26256
+ //const startPath = `${this.getNodePath()}/0`;
26257
+ //const startPath = hoEditorFactory.docTree.curDomRange.startPath;
26258
+
26259
+
26260
+ var endPath = "";
26261
+ var startPath = "";
26262
+
26263
+ if (this.table.tableProperty.isAutoChangeLine) {
26264
+ var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
26244
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
+ }
26245
26277
 
26246
- var startPath = "".concat(this.getNodePath(), "/0");
26247
- var endPath = hoEditorFactory.docTree.getNodeLastPath(this);
26248
26278
  var aRange = new _DomRange__WEBPACK_IMPORTED_MODULE_24__/* .DomRange */ .a(this._hoEditorFactoryID, startPath, endPath);
26249
26279
  hoEditorFactory.docController.deleteRange(aRange, true);
26250
26280
  hoEditorFactory.docController.insertPlainTextAfterPath(startPath, value);
@@ -30602,27 +30632,32 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
30602
30632
  /* harmony export */ "C": function() { return /* binding */ ParagraphNode; }
30603
30633
  /* harmony export */ });
30604
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);
30605
- /* 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);
30606
- /* 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);
30607
- /* 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);
30608
- /* 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);
30609
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41539);
30610
- /* 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__);
30611
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54747);
30612
- /* 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__);
30613
- /* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40561);
30614
- /* 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__);
30615
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9653);
30616
- /* 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__);
30617
- /* harmony import */ var _BaseNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(50369);
30618
- /* harmony import */ var _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(53570);
30619
- /* harmony import */ var _RectNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27807);
30620
- /* harmony import */ var _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(94407);
30621
- /* harmony import */ var _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(83078);
30622
- /* harmony import */ var _TableNode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(95883);
30623
- /* harmony import */ var _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(34565);
30624
- /* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(41005);
30625
- /* 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
+
30626
30661
 
30627
30662
 
30628
30663
 
@@ -30642,31 +30677,58 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
30642
30677
 
30643
30678
 
30644
30679
  var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30645
- (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);
30646
30681
 
30647
- 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);
30648
30683
 
30649
- function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo) {
30684
+ function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo, customProperty) {
30650
30685
  var _this;
30651
30686
 
30652
- (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);
30653
30688
 
30654
- _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);
30655
30690
  _this._parentNode = parentNode;
30656
30691
  _this._drawLines = new Array();
30657
30692
  _this._drawNodes = _this._drawLines;
30658
30693
  _this._paraNo = paraNo;
30659
- _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;
30660
30695
  _this._dTop = 0;
30661
30696
  _this._dHeight = 0;
30662
30697
  _this._pagePaintStart = null;
30663
30698
  _this._printAsSinglePage = false;
30664
- _this._docId = ""; // this.node2DrawNode();
30699
+ _this._docId = "";
30700
+ _this._customProperty = new Object();
30701
+
30702
+ if (customProperty) {
30703
+ _this.setCustomProperty(customProperty);
30704
+ } // this.node2DrawNode();
30705
+
30665
30706
 
30666
30707
  return _this;
30667
30708
  }
30668
30709
 
30669
- (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
+ }, {
30670
30732
  key: "paraNo",
30671
30733
  get: function get() {
30672
30734
  return this._paraNo;
@@ -30693,6 +30755,16 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30693
30755
  this._styleIndex = val;
30694
30756
  }
30695
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
+ }
30696
30768
  }, {
30697
30769
  key: "combineParagraph",
30698
30770
  get: function get() {
@@ -30714,7 +30786,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30714
30786
  key: "drootNodes",
30715
30787
  get: function get() {
30716
30788
  if (!this._drawRoots) {
30717
- 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()),
30718
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),
30719
30791
  dCell = _HOEditorFactorys$ins2[0],
30720
30792
  dRoots = _HOEditorFactorys$ins2[1];
@@ -30727,7 +30799,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30727
30799
  }, {
30728
30800
  key: "refreshDrootNodes",
30729
30801
  value: function refreshDrootNodes() {
30730
- 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()),
30731
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),
30732
30804
  dCell = _HOEditorFactorys$ins4[0],
30733
30805
  dRoots = _HOEditorFactorys$ins4[1];
@@ -30738,7 +30810,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30738
30810
  key: "getParagraphLeftWidth",
30739
30811
  value: function getParagraphLeftWidth() {
30740
30812
  //如果父文档节点派生于rectNode(用于表格基类),则取
30741
- 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);
30742
30814
  var pNode = this._parentNode;
30743
30815
  var aLeft;
30744
30816
  var aWidth;
@@ -30754,7 +30826,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30754
30826
  aWidth = _pRectNode$getLeftWid2[1];
30755
30827
  bRectAlign = _pRectNode$getLeftWid2[2];
30756
30828
 
30757
- if (pRectNode instanceof _CellNode__WEBPACK_IMPORTED_MODULE_16__/* .CellNode */ .D) {
30829
+ if (pRectNode instanceof _CellNode__WEBPACK_IMPORTED_MODULE_18__/* .CellNode */ .D) {
30758
30830
  aLeft = hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[2] * 10, true);
30759
30831
  aWidth = aWidth - aLeft - hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[3] * 10, true);
30760
30832
  bRectAlign = true;
@@ -30777,7 +30849,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30777
30849
  var dline = this._drawLines[index];
30778
30850
 
30779
30851
  if (dline) {
30780
- 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()),
30781
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),
30782
30854
  dCell = _HOEditorFactorys$ins6[0],
30783
30855
  dRoots = _HOEditorFactorys$ins6[1];
@@ -30805,9 +30877,9 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30805
30877
  // }
30806
30878
 
30807
30879
  while (pNode) {
30808
- if (pNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_10__/* .RectNode */ .z) {
30880
+ if (pNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z) {
30809
30881
  return pNode;
30810
- } 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) {
30811
30883
  return pNode;
30812
30884
  } else {
30813
30885
  pNode = pNode.parentNode;
@@ -30819,14 +30891,14 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30819
30891
  }, {
30820
30892
  key: "updateCombineParagraph",
30821
30893
  value: function updateCombineParagraph() {
30822
- 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);
30823
30895
  var para = hoEditorFactory.docTree.paragraphs[this._paraNo];
30824
30896
 
30825
30897
  if (!para) {
30826
30898
  para = hoEditorFactory.docTree.paragraphs[0];
30827
30899
  }
30828
30900
 
30829
- 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);
30830
30902
  }
30831
30903
  /**
30832
30904
  * @author xyl
@@ -30866,10 +30938,10 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30866
30938
 
30867
30939
  if (index > 0) {
30868
30940
  var prevLine = this._drawLines[index - 1];
30869
- 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();
30870
30942
  }
30871
30943
 
30872
- 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);
30873
30945
  aline.dTop = itop;
30874
30946
  aline.dLeft = ileft;
30875
30947
  aline.x = this.combineParagraph.leftMarginPixes;
@@ -30920,7 +30992,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30920
30992
  var dline = this.drawlines[i];
30921
30993
 
30922
30994
  if (dline) {
30923
- 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) {
30924
30996
  dline.clear();
30925
30997
  } else {
30926
30998
  if (dline.parent) {
@@ -30938,12 +31010,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30938
31010
  key: "node2DrawNode",
30939
31011
  value: function node2DrawNode() {
30940
31012
  this.clear();
30941
- 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);
30942
31014
  var leftTopInfos = this.getParagraphLeftWidth();
30943
31015
  var ileft = leftTopInfos[0];
30944
31016
  var paragraphWidth = leftTopInfos[1]; // console.log(this._combineParagraph);
30945
31017
 
30946
- 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);
30947
31019
  this._dHeight = aline.dHeight;
30948
31020
 
30949
31021
  this._drawLines.push(aline);
@@ -30978,7 +31050,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30978
31050
  // this.drootNodes.push(this.drawlines[0]);
30979
31051
  // }
30980
31052
  if (dline) {
30981
- 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);
30982
31054
  this.placeDNodeAfterDTop(dTop, dline); // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.insertDline(droots,index+1,this._drawLines[0]);
30983
31055
  }
30984
31056
  }
@@ -30996,7 +31068,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
30996
31068
  var dline = prevDline;
30997
31069
 
30998
31070
  while (index === -1) {
30999
- 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),
31000
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),
31001
31073
  bret = _TableNode$isNodeInTa2[0],
31002
31074
  aTable = _TableNode$isNodeInTa2[1],
@@ -31071,7 +31143,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31071
31143
  }, {
31072
31144
  key: "isInCell",
31073
31145
  value: function isInCell() {
31074
- 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;
31075
31147
  }
31076
31148
  }, {
31077
31149
  key: "drawlines",
@@ -31081,7 +31153,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31081
31153
  }, {
31082
31154
  key: "adjustNextDline",
31083
31155
  value: function adjustNextDline(dline, index) {
31084
- 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);
31085
31157
  var dNextLine = this.getNextDline(dline);
31086
31158
 
31087
31159
  for (var i = index; i < dline.drawItems.length; i++) {
@@ -31093,7 +31165,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31093
31165
  }, {
31094
31166
  key: "getParagraphLastNodePath",
31095
31167
  value: function getParagraphLastNodePath() {
31096
- 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()
31097
31169
  // const pNode = this._parentNode;
31098
31170
  // if (pNode) {
31099
31171
  // const index = pNode.childNodes.indexOf(this);
@@ -31132,7 +31204,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31132
31204
  value: function updateDrawLineStyle() {
31133
31205
  for (var i = 0; i < this._drawLines.length; i++) {
31134
31206
  var dline = this._drawLines[i];
31135
- 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();
31136
31208
  } // if (dline instanceof DrawLine) dline.updateLineStyle();
31137
31209
 
31138
31210
  }
@@ -31162,12 +31234,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31162
31234
  }, {
31163
31235
  key: "node2Json",
31164
31236
  value: function node2Json(range, iscopy) {
31165
- 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);
31166
31238
  combinePara.copyStyle(this.combineParagraph);
31167
31239
  var paragraphStyle = {
31168
31240
  height: this.dHeight,
31169
31241
  top: this.dTop,
31170
- align: _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_9__/* .Align */ .xM[combinePara.align],
31242
+ align: _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[combinePara.align],
31171
31243
  charSpace: combinePara.charSpace,
31172
31244
  lineSpace: combinePara.lineSpace,
31173
31245
  leftMargin: combinePara.leftMarginMm,
@@ -31183,14 +31255,15 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31183
31255
  //paragraphJson._align = Align[parseInt(paragraphJson._align)];
31184
31256
 
31185
31257
  var paga = {
31186
- nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_8__/* .NodeType */ .Jq[this.nodeType],
31258
+ nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType */ .Jq[this.nodeType],
31187
31259
  style: paragraphStyle,
31188
31260
  // height: this.dHeight,
31189
31261
  // top: this.dTop,
31190
31262
  styleIndex: this._paraNo,
31191
31263
  textStyleNo: this.styleIndex,
31192
31264
  printAsSinglePage: this.printAsSinglePage,
31193
- docId: this.docId
31265
+ docId: this.docId,
31266
+ customProperty: this.customProperty
31194
31267
  }; //const dictType = NodeType[this.nodeType].substring(2);
31195
31268
 
31196
31269
  if (iscopy) {
@@ -31246,20 +31319,20 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31246
31319
  var paraNo = Number(json.styleIndex);
31247
31320
 
31248
31321
  if (json["style"]) {
31249
- 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);
31250
31323
  var style = json.style;
31251
- 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);
31252
31325
  paragraph.leftMargin = style._leftMarginMm ? Number(style._leftMarginMm) : Number(style.leftMargin);
31253
31326
  paragraph.rightMargin = style._rightMarginMm ? Number(style._rightMarginMm) : Number(style.rightMargin);
31254
31327
  paragraph.topMargin = style._topMarginMm ? Number(style._topMarginMm) : Number(style.topMargin);
31255
31328
  paragraph.bottomMargin = style._bottomMarginMm ? Number(style._bottomMarginMm) : Number(style.bottomMargin);
31256
- 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]);
31257
31330
  paragraph.charSpace = style._charSpace ? Number(style._charSpace) : Number(style.charSpace);
31258
31331
  paragraph.lineSpace = style._lineSpace ? Number(style._lineSpace) : Number(style.lineSpace);
31259
31332
  paraNo = hoEditorFactory.docTree.styleCompare(paragraph);
31260
31333
  }
31261
31334
 
31262
- var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo);
31335
+ var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo, json.customProperty);
31263
31336
  paragraphNode.docId = json.docId && json.docId !== "" ? json.docId : "";
31264
31337
  paragraphNode.printAsSinglePage = json.printAsSinglePage ? json.printAsSinglePage === "true" ? true : false : false;
31265
31338
  paragraphNode.styleIndex = json.textStyleNo ? Number(json.textStyleNo) : 0; // paragraphNode._dHeight = Number(json.height);
@@ -31270,7 +31343,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
31270
31343
  }]);
31271
31344
 
31272
31345
  return ParagraphNode;
31273
- }(_BaseNode__WEBPACK_IMPORTED_MODULE_8__/* .BaseNode */ .Hd);
31346
+ }(_BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .BaseNode */ .Hd);
31274
31347
 
31275
31348
  /***/ }),
31276
31349
 
@@ -38529,12 +38602,13 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
38529
38602
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38530
38603
  /* harmony export */ "OL": function() { return /* binding */ DownListProperty; },
38531
38604
  /* harmony export */ "ZX": function() { return /* binding */ DataFormat; },
38605
+ /* harmony export */ "Zi": function() { return /* binding */ InputFieldType; },
38532
38606
  /* harmony export */ "hc": function() { return /* binding */ ExecuteStatus; },
38533
38607
  /* harmony export */ "mK": function() { return /* binding */ ReadOnlyStatus; },
38534
38608
  /* harmony export */ "re": function() { return /* binding */ TextInputFieldNode; },
38535
38609
  /* harmony export */ "wz": function() { return /* binding */ DataVerifyFormat; }
38536
38610
  /* harmony export */ });
38537
- /* unused harmony exports InputFieldType, SpecialFormat, BandDataSource */
38611
+ /* unused harmony exports SpecialFormat, BandDataSource */
38538
38612
  /* harmony import */ var element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86769);
38539
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__);
38540
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);
@@ -53509,6 +53583,12 @@ var DrawTextNode = /*#__PURE__*/function (_DrawCombineNode) {
53509
53583
  }
53510
53584
  }
53511
53585
 
53586
+ if (hoEditorFactory.isEnabledGlobalColor) {
53587
+ if (!(this.node instanceof MarkNode/* MarkNode */.j) && this.node.parentNode.inputFieldType === 0) {
53588
+ backColor = "transparent";
53589
+ }
53590
+ }
53591
+
53512
53592
  if (this.node.parentNode.enableGlobalColor) {
53513
53593
  backColor = "transparent";
53514
53594
  }
@@ -98061,7 +98141,8 @@ while(len--){curDa=sa.shift();if(typeof curDa!=="string"||Array.isArray(curDa)&&
98061
98141
  //we assume the user knows what they are doing.
98062
98142
  //Convert text into an array anyway to simplify
98063
98143
  //later code.
98064
- 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
98065
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
98066
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
98067
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
@@ -98079,7 +98160,8 @@ var prevWidth=0;var newX;if(align==="right"){//The passed in x coordinate define
98079
98160
  //rightmost point of the text.
98080
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
98081
98162
  //the center point.
98082
- 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
98083
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
98084
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
98085
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
@@ -98885,6 +98967,7 @@ stream.push(formObject.scope.__private__.encodeColorString(formObject.color));st
98885
98967
  stream.push(calcRes.text);stream.push("ET");// End Text
98886
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
98887
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
+ // 自定义修改 字符间距
98888
98971
  var textSplit=text.split("");var fontSize=maxFontSize;// The Starting fontSize (The Maximum)
98889
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
98890
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
@@ -99518,7 +99601,8 @@ out+=String.fromCharCode.apply(null,buf.subarray(i,i+ARRAY_APPLY_BATCH));}return
99518
99601
  * @param {posY}
99519
99602
  *
99520
99603
  * @returns jsPDF
99521
- */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
99522
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;
99523
99607
  // if(posY) y += posY;
99524
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
@@ -99972,7 +100056,7 @@ var f2,getHorizontalCoordinateString,getVerticalCoordinateString,getHorizontalCo
99972
100056
  * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />
99973
100057
  * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />
99974
100058
  * A pattern object to use to fill the drawing (not supported by context2d)
99975
- */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;console.log(this.ctx.fillStyle,this.ctx.fillStyle!=="#000000"&&this.ctx.fillStyle!=="#FFFFFF");//自定义修改 当透明度小于1时改成0 ,以适配不支持透明度的打印机
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 ,以适配不支持透明度的打印机
99976
100060
  if(rgba.a<1){this.ctx.fillOpacity=0;}else{this.ctx.fillOpacity=rgba.a;}// 自定义修改 处理彩色字体打印问题
99977
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});}});/**
99978
100062
  * Sets or returns the color, gradient, or pattern used for strokes
@@ -100013,7 +100097,8 @@ if(fontFace!==null){fontFace.ref={name:family,style:style};fontFaces.push(fontFa
100013
100097
  * will be used. If not set it will fallback to previous behavior.
100014
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
100015
100099
  // eslint-disable-next-line no-useless-escape
100016
- 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?)
100017
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){//自定义修改
100018
100103
  if(value<1){this.ctx.globalAlpha=0;}else{this.ctx.globalAlpha=value;}}});/**
100019
100104
  * A float specifying the amount of the line dash offset. The default value is 0.0.
@@ -100053,7 +100138,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
100053
100138
  * @function
100054
100139
  * @param x {Number} The x-coordinate of where to move the path to
100055
100140
  * @param y {Number} The y-coordinate of where to move the path to
100056
- */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);};/**
100057
100143
  * Creates a path from the current point back to the starting point
100058
100144
  *
100059
100145
  * @name closePath
@@ -100067,7 +100153,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
100067
100153
  * @param x The x-coordinate of where to create the line to
100068
100154
  * @param y The y-coordinate of where to create the line to
100069
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).
100070
- */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);};/**
100071
100158
  * Clips a region of any shape and size from the original canvas
100072
100159
  *
100073
100160
  * @name clip
@@ -100220,7 +100307,9 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
100220
100307
  * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
100221
100308
  * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
100222
100309
  * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.
100223
- */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
+ });};/**
100224
100313
  * Returns an object that contains the width of the specified text
100225
100314
  *
100226
100315
  * @name measureText
@@ -100284,6 +100373,7 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
100284
100373
  // if (isNaN(f)){
100285
100374
  // f=0;
100286
100375
  // }
100376
+ // 自定义修改 处理打印图片报错
100287
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);
100288
100378
  };/**
100289
100379
  * Resets the current transform to the identity matrix. Then runs transform()
@@ -100312,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
100312
100402
  * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
100313
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
100314
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);
100315
- 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绘制图像");
100316
- 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{// 自定义修改
100317
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;};/**
100318
100409
  * Processes the paths
100319
100410
  *
@@ -100334,10 +100425,13 @@ return y;case"alphabetic":default:return y;}};var getTextBottom=function getText
100334
100425
  * @param counterclockwise
100335
100426
  * @param style
100336
100427
  * @param isClip
100337
- */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
100338
100432
  // so we render it in the next page
100339
100433
  if(textBoundsOnPage.y<pageHeightMinusBottomMargin){// As a result, all other elements have their y offset increased
100340
- 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;}// 自定义修改
100341
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,
100342
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(" "));};/**
100343
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.
@@ -101191,7 +101285,8 @@ var startOfLine=i;workingLen=0;while(i!==l){if(workingLen+widths_array[i]>maxLen
101191
101285
  // By default, for PDF, it's "point".
101192
101286
  var splitParagraphIntoLines=function splitParagraphIntoLines(text,maxlen,options){// at this time works only on Western scripts, ones with space char
101193
101287
  // separating the words. Feel free to expand.
101194
- 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.
101195
101290
  // we just chop these to size. We do NOT insert hiphens
101196
101291
  tmp=splitLongWord.apply(this,[word,widths_array,maxlen-(line_length+separator_length),maxlen]);// first line we add to existing line object
101197
101292
  line.push(tmp.shift());// it's ok to have extra space indicator there
@@ -199007,7 +199102,7 @@ var es_function_name = __webpack_require__(68309);
199007
199102
  // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
199008
199103
  var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(13797);
199009
199104
  var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
199010
- ;// 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&
199011
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()}
199012
199107
  var staticRenderFns = []
199013
199108
 
@@ -206990,7 +207085,7 @@ var SignNode = __webpack_require__(34450);
206990
207085
  // EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
206991
207086
  var ParagraphNode = __webpack_require__(14208);
206992
207087
  ;// CONCATENATED MODULE: ./src/components/version.ts
206993
- /* harmony default export */ var version = ('2.0.59');
207088
+ /* harmony default export */ var version = ('2.0.60');
206994
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&
206995
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)}
206996
207091
  var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_staticRenderFns = []
@@ -209146,9 +209241,7 @@ var DrawPageTree = /*#__PURE__*/function () {
209146
209241
  }
209147
209242
 
209148
209243
  if (dPage.drawDomLevel && dPage.drawDomLevel.stage) {
209149
- {
209150
- dPage.drawDomLevel.clearStage();
209151
- }
209244
+ dPage.drawDomLevel.clearStage();
209152
209245
  }
209153
209246
  }
209154
209247
  }
@@ -214658,6 +214751,7 @@ var StagePosition = __webpack_require__(57674);
214658
214751
 
214659
214752
 
214660
214753
 
214754
+
214661
214755
 
214662
214756
 
214663
214757
  var VueController = /*#__PURE__*/function () {
@@ -220480,6 +220574,44 @@ var VueController = /*#__PURE__*/function () {
220480
220574
  hoEditorFactory.docTree.curDomRange = newRange;
220481
220575
  hoEditorFactory.drawTree.moveCaretToPath(curDomRange.startPath);
220482
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
+ }
220483
220615
  /**
220484
220616
  * 初始化文档
220485
220617
  */
@@ -220720,6 +220852,11 @@ var VueController = /*#__PURE__*/function () {
220720
220852
  node.imageDataBase64String = src;
220721
220853
  hoEditorFactory.docTree.change(changeEvent);
220722
220854
  }
220855
+ }, {
220856
+ key: "setParaCustomProperty",
220857
+ value: function setParaCustomProperty(paragraphNode, customProperty) {
220858
+ paragraphNode.setCustomProperty(customProperty);
220859
+ }
220723
220860
  }]);
220724
220861
 
220725
220862
  return VueController;
@@ -222782,7 +222919,7 @@ var PrintController = /*#__PURE__*/function () {
222782
222919
  beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
222783
222920
  xml = hoEditorFactory.vueController.getDocXml(true);
222784
222921
  htmlText = {
222785
- text: ""
222922
+ text: ''
222786
222923
  };
222787
222924
  hPromise = Promise.resolve();
222788
222925
  hPromise = hPromise.then(function () {
@@ -222853,12 +222990,14 @@ var PrintController = /*#__PURE__*/function () {
222853
222990
  path = hoEditorFactory.docTree.curDomRange.normalize().endPath;
222854
222991
  beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
222855
222992
  xml = hoEditorFactory.vueController.getDocXml(true);
222856
- orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
222993
+ orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
222857
222994
  format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
222858
222995
  options = {
222859
222996
  orientation: orientation,
222860
- unit: "px",
222861
- format: format
222997
+ unit: 'px',
222998
+ format: format,
222999
+ hotfixes: ['px_scaling'],
223000
+ compress: true
222862
223001
  };
222863
223002
  PDF = new jspdf/* default */.ZP(options);
222864
223003
  hPromise = Promise.resolve();
@@ -222881,7 +223020,7 @@ var PrintController = /*#__PURE__*/function () {
222881
223020
  hoEditorFactory.vueController.openXml(xml);
222882
223021
  PDF.deletePage(1);
222883
223022
  return new Promise(function (resolves) {
222884
- resolves(PDF.output("datauristring"));
223023
+ resolves(PDF.output('datauristring'));
222885
223024
  });
222886
223025
  });
222887
223026
 
@@ -222896,7 +223035,7 @@ var PrintController = /*#__PURE__*/function () {
222896
223035
  setTimeout(function () {
222897
223036
  hoEditorFactory.vueController.moveCaretToPath(path);
222898
223037
  }, 0);
222899
- 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,/, ''));
222900
223039
 
222901
223040
  case 20:
222902
223041
  return _context2.abrupt("return", null);
@@ -222923,10 +223062,10 @@ var PrintController = /*#__PURE__*/function () {
222923
223062
  }, {
222924
223063
  key: "setjsPDFFonts",
222925
223064
  value: function setjsPDFFonts(font) {
222926
- jspdf/* default.API.events.push */.ZP.API.events.push(["addFonts", function () {
222927
- this.addFileToVFS("SimSun-normal.ttf", font);
222928
- this.addFont("SimSun-normal.ttf", "SimSun", "normal");
222929
- 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');
222930
223069
  }]);
222931
223070
  this._isSetFont = true;
222932
223071
 
@@ -222957,8 +223096,8 @@ var PrintController = /*#__PURE__*/function () {
222957
223096
  return;
222958
223097
  }
222959
223098
 
222960
- var fileType = type ? type : "pdf";
222961
- 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() : '电子病历文档'; // 保存打印前文档状态 和 内容
222962
223101
 
222963
223102
  var beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
222964
223103
  var xml = hoEditorFactory.vueController.getDocXml(true);
@@ -222972,21 +223111,21 @@ var PrintController = /*#__PURE__*/function () {
222972
223111
  });
222973
223112
  hPromise = hPromise.then(function () {
222974
223113
  return new Promise(function (resolve) {
222975
- var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
223114
+ var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
222976
223115
  var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
222977
223116
 
222978
- if (hoEditorFactory.isFixedPrintToA4 && isSpecial) {
223117
+ if (hoEditorFactory.isFixedPrintToA4 == '1' && isSpecial) {
222979
223118
  format = _this3._a4Size[orientation];
222980
223119
  }
222981
223120
 
222982
- if (hoEditorFactory.isFixedPrintToA4T && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223121
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
222983
223122
  format = [793, 1122];
222984
223123
  orientation = 'p';
222985
223124
  }
222986
223125
 
222987
223126
  var options = {
222988
223127
  orientation: orientation,
222989
- unit: "px",
223128
+ unit: 'px',
222990
223129
  format: format
222991
223130
  };
222992
223131
  // const PDF = new jsPDF(orientation, "px", [hoEditorFactory.pageProperty.widthMm, hoEditorFactory.pageProperty.heightMm], false, true, );
@@ -223016,14 +223155,20 @@ var PrintController = /*#__PURE__*/function () {
223016
223155
 
223017
223156
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
223018
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
+
223019
223164
  hoEditorFactory.startPageNum = 0;
223020
223165
  hoEditorFactory.firstPageStartTop = 0;
223021
223166
 
223022
223167
  if (!this._isSetFont) {
223023
223168
  this._waitPrint = true;
223024
223169
 
223025
- 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>", "提示", {
223026
- 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',
223027
223172
  center: true,
223028
223173
  showConfirmButton: false,
223029
223174
  dangerouslyUseHTMLString: true
@@ -223037,12 +223182,12 @@ var PrintController = /*#__PURE__*/function () {
223037
223182
  }
223038
223183
 
223039
223184
  if (printMode && printAppoint) {
223040
- var appoint = printAppoint.replace(/\s*/g, "").replace(/[^\d]/g, ",").split(",");
223185
+ var appoint = printAppoint.replace(/\s*/g, '').replace(/[^\d]/g, ',').split(',');
223041
223186
  var maxLen = hoEditorFactory.drawTree.drawPages.length;
223042
223187
  var error = appoint.filter(function (pages) {
223043
223188
  return pages && Number(pages) > maxLen;
223044
223189
  });
223045
- if (error.length > 0) return "指定页输入超出文档页范围";
223190
+ if (error.length > 0) return '指定页输入超出文档页范围';
223046
223191
  }
223047
223192
 
223048
223193
  var setStatus = new Promise( /*#__PURE__*/function () {
@@ -223087,23 +223232,23 @@ var PrintController = /*#__PURE__*/function () {
223087
223232
  setStatus.then(function (res) {
223088
223233
  if (res) {
223089
223234
  return new Promise(function (reslove, reject) {
223090
- var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
223235
+ var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
223091
223236
  var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
223092
223237
 
223093
- if (hoEditorFactory.isFixedPrintToA4) {
223238
+ if (hoEditorFactory.isFixedPrintToA4 == '1') {
223094
223239
  format = _this4._a4Size[orientation];
223095
223240
  }
223096
223241
 
223097
- if (hoEditorFactory.isFixedPrintToA4T && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223242
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223098
223243
  format = [793, 1122];
223099
223244
  orientation = 'p';
223100
223245
  }
223101
223246
 
223102
223247
  var options = {
223103
223248
  orientation: orientation,
223104
- unit: "px",
223249
+ unit: 'px',
223105
223250
  format: format,
223106
- hotfixes: ["px_scaling"],
223251
+ hotfixes: ['px_scaling'],
223107
223252
  compress: true
223108
223253
  };
223109
223254
  var PDF = new jspdf/* default */.ZP(options);
@@ -223111,20 +223256,26 @@ var PrintController = /*#__PURE__*/function () {
223111
223256
  });
223112
223257
  }
223113
223258
  }).then(function (res) {
223114
- if (res === "printend") {
223259
+ if (res === 'printend') {
223115
223260
  if (callback) {
223116
223261
  callback(hoEditorFactory.printStatus.printRecord.last());
223117
223262
  }
223118
223263
 
223119
- hoEditorFactory.drawTree.paintStatus = beforeStatus;
223120
- hoEditorFactory.printStatus.printRange = 2;
223121
223264
  hoEditorFactory.printStatus.printAppoint = '';
223122
223265
  hoEditorFactory.printStatus.drawPrintRecord.Position = [0, 0];
223123
223266
  hoEditorFactory.startPageNum = 0;
223124
223267
  hoEditorFactory.firstPageStartTop = 0;
223125
- hoEditorFactory.printStatus.clearArea();
223126
- hoEditorFactory.printStatus.drawPrintRecord.clear();
223127
- 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
+ }
223128
223279
  }
223129
223280
  });
223130
223281
  }
@@ -223192,7 +223343,7 @@ var PrintController = /*#__PURE__*/function () {
223192
223343
  while (1) {
223193
223344
  switch (_context5.prev = _context5.next) {
223194
223345
  case 0:
223195
- console.time("连续打印总用时");
223346
+ console.time('连续打印总用时');
223196
223347
  list = [];
223197
223348
  xmlInfoes.xmlList.forEach(function (v) {
223198
223349
  list.push([v.isMerge, v.xml]);
@@ -223211,7 +223362,7 @@ var PrintController = /*#__PURE__*/function () {
223211
223362
  hoEditorFactory.printStatus.printMode = 0;
223212
223363
  hoEditorFactory.drawTree.paintStatus = DrawTree/* PaintState.psPreview */.Dh.psPreview;
223213
223364
  hPromise = Promise.resolve();
223214
- console.time("连续查看病历合并总用时");
223365
+ console.time('连续查看病历合并总用时');
223215
223366
  hPromise = hPromise.then(function (res) {
223216
223367
  return new Promise(function (resolve) {
223217
223368
  Promise.all([hoEditorFactory.vueController.openDocsForPrint(list)]).then(function () {
@@ -223225,8 +223376,8 @@ var PrintController = /*#__PURE__*/function () {
223225
223376
  });
223226
223377
  });
223227
223378
  hPromise = hPromise.then(function () {
223228
- console.timeEnd("连续查看病历合并总用时");
223229
- console.time("生成pdf用时");
223379
+ console.timeEnd('连续查看病历合并总用时');
223380
+ console.time('生成pdf用时');
223230
223381
  return new Promise( /*#__PURE__*/function () {
223231
223382
  var _ref2 = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee4(resolve) {
223232
223383
  var orientation, format, options, PDF;
@@ -223234,23 +223385,23 @@ var PrintController = /*#__PURE__*/function () {
223234
223385
  while (1) {
223235
223386
  switch (_context4.prev = _context4.next) {
223236
223387
  case 0:
223237
- orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? "l" : "p";
223388
+ orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
223238
223389
  format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
223239
223390
 
223240
- if (hoEditorFactory.isFixedPrintToA4) {
223391
+ if (hoEditorFactory.isFixedPrintToA4 == '1') {
223241
223392
  format = _this5._a4Size[orientation];
223242
223393
  }
223243
223394
 
223244
- if (hoEditorFactory.isFixedPrintToA4T && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223395
+ if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
223245
223396
  format = [793, 1122];
223246
223397
  orientation = 'p';
223247
223398
  }
223248
223399
 
223249
223400
  options = {
223250
223401
  orientation: orientation,
223251
- unit: "px",
223402
+ unit: 'px',
223252
223403
  format: format,
223253
- hotfixes: ["px_scaling"]
223404
+ hotfixes: ['px_scaling']
223254
223405
  };
223255
223406
  PDF = new jspdf/* default */.ZP(options);
223256
223407
  PrintStatus/* Print.printToPDF */.Kh.printToPDF(_this5._hoEditorFactoryID, PDF, undefined, undefined, resolve, positionY, format);
@@ -223271,7 +223422,7 @@ var PrintController = /*#__PURE__*/function () {
223271
223422
  _context5.next = 17;
223272
223423
  return hPromise.then(function (res) {
223273
223424
  if (res) {
223274
- console.timeEnd("生成pdf用时");
223425
+ console.timeEnd('生成pdf用时');
223275
223426
  return new Promise(function (resolves) {
223276
223427
  var last = hoEditorFactory.printStatus.printRecord.last();
223277
223428
  var pos;
@@ -223306,7 +223457,7 @@ var PrintController = /*#__PURE__*/function () {
223306
223457
  // hoEditorFactory.drawTree.rebuildAllDrawLine(false);
223307
223458
  // }, 0);
223308
223459
 
223309
- console.timeEnd("连续打印总用时");
223460
+ console.timeEnd('连续打印总用时');
223310
223461
  resolves(pos);
223311
223462
  });
223312
223463
  } else {
@@ -223322,7 +223473,7 @@ var PrintController = /*#__PURE__*/function () {
223322
223473
  // hoEditorFactory.drawTree.rebuildAllDrawLine(false);
223323
223474
  // }, 0);
223324
223475
 
223325
- console.timeEnd("连续打印总用时");
223476
+ console.timeEnd('连续打印总用时');
223326
223477
  return null;
223327
223478
  }
223328
223479
  });
@@ -223360,7 +223511,7 @@ var PrintController = /*#__PURE__*/function () {
223360
223511
  }()
223361
223512
  /**
223362
223513
  * 批量打印病历 当前
223363
- * @param xmlList [boolean, string, boolean, boolean][]
223514
+ * @param xmlList [string, boolean, string, boolean][]
223364
223515
  * 四个参数分别是: xml内容 是否合并 病程记录id:用来判断是否是病程记录和返回对应病程记录的坐标(处理多个不同病程记录的情况) 是否是最后一份病程记录
223365
223516
  */
223366
223517
 
@@ -223384,8 +223535,8 @@ var PrintController = /*#__PURE__*/function () {
223384
223535
  xmlIndex = -1;
223385
223536
  mergeList = [];
223386
223537
  options = {
223387
- unit: "px",
223388
- hotfixes: ["px_scaling"],
223538
+ unit: 'px',
223539
+ hotfixes: ['px_scaling'],
223389
223540
  compress: true
223390
223541
  };
223391
223542
  PDF = new jspdf/* default */.ZP(options);
@@ -223469,7 +223620,7 @@ var PrintController = /*#__PURE__*/function () {
223469
223620
  hoEditorFactory.drawTree.paintStatus = beforePrintStatus;
223470
223621
  hoEditorFactory.vueController.openXml(xml);
223471
223622
  PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
223472
- name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : "电子病历文档";
223623
+ name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档';
223473
223624
  PrintStatus/* Print.openDataUriInWindow */.Kh.openDataUriInWindow(PDF, name, hoEditorFactory.pageProperty.widthPixes);
223474
223625
  }
223475
223626
 
@@ -224380,6 +224531,7 @@ var HOEditorFactory = /*#__PURE__*/function () {
224380
224531
  this._lastSaveTime = new Date(Date.now());
224381
224532
  this._superiorSigns = []; //上级医生签名
224382
224533
 
224534
+ this._isEnabledGlobalColor = false;
224383
224535
  this._hoEditorFactoryId = id;
224384
224536
  }
224385
224537
  /**
@@ -225038,13 +225190,13 @@ var HOEditorFactory = /*#__PURE__*/function () {
225038
225190
  }
225039
225191
  }
225040
225192
  }, {
225041
- key: "isFixedPrintToA4T",
225193
+ key: "isRotate",
225042
225194
  get: function get() {
225043
- return this._isFixedPrintToA4T;
225195
+ return this._isRotate;
225044
225196
  },
225045
225197
  set: function set(value) {
225046
- if (this._isFixedPrintToA4T !== value) {
225047
- this._isFixedPrintToA4T = value;
225198
+ if (this._isRotate !== value) {
225199
+ this._isRotate = value;
225048
225200
  }
225049
225201
  }
225050
225202
  }, {
@@ -225077,6 +225229,16 @@ var HOEditorFactory = /*#__PURE__*/function () {
225077
225229
  this._printBlack = value;
225078
225230
  }
225079
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
+ }
225080
225242
  }, {
225081
225243
  key: "clear",
225082
225244
  value: function clear() {
@@ -232600,14 +232762,14 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232600
232762
  _this.defaultDocProperty = {
232601
232763
  version: version,
232602
232764
  type: 0,
232603
- title: "",
232604
- docID: "",
232605
- patientID: "",
232606
- patientName: "",
232607
- lastEditTime: "",
232608
- lastEditorID: "",
232609
- lastEditorName: "",
232610
- currentIP: ""
232765
+ title: '',
232766
+ docID: '',
232767
+ patientID: '',
232768
+ patientName: '',
232769
+ lastEditTime: '',
232770
+ lastEditorID: '',
232771
+ lastEditorName: '',
232772
+ currentIP: ''
232611
232773
  };
232612
232774
  _this.contentIsModify = {
232613
232775
  isModify: false
@@ -232623,7 +232785,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232623
232785
  }, {
232624
232786
  key: "contentIsModifyChange",
232625
232787
  value: function contentIsModifyChange(value) {
232626
- this.$emit("contentIsModify", this.contentIsModify);
232788
+ this.$emit('contentIsModify', this.contentIsModify);
232627
232789
  }
232628
232790
  }, {
232629
232791
  key: "editJsonChange",
@@ -232640,12 +232802,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232640
232802
  }, {
232641
232803
  key: "textStyleChange",
232642
232804
  value: function textStyleChange(val) {
232643
- this.$emit("textStyleChange", val);
232805
+ this.$emit('textStyleChange', val);
232644
232806
  }
232645
232807
  }, {
232646
232808
  key: "modalStatusChange",
232647
232809
  value: function modalStatusChange(newStr) {
232648
- if (newStr[0] !== "find") {
232810
+ if (newStr[0] !== 'find') {
232649
232811
  this.setControlProperty(newStr[0], newStr[1], newStr[2]);
232650
232812
  } else {
232651
232813
  this.controlFindType = true;
@@ -232654,20 +232816,20 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232654
232816
  }, {
232655
232817
  key: "controlTypeChange",
232656
232818
  value: function controlTypeChange(newValue, oldValue) {
232657
- if (newValue === "" && ['text', 'date', 'comment'].includes(oldValue)) {
232658
- this.$emit("closeTextModal");
232819
+ if (newValue === '' && ['text', 'date', 'comment'].includes(oldValue)) {
232820
+ this.$emit('closeTextModal');
232659
232821
  this.customPropertyValue = {};
232660
232822
  }
232661
232823
 
232662
232824
  if (['text', 'date'].includes(newValue)) {
232663
232825
  if ((0,type/* isObject */.Kn)(this.customPropertyValue)) {
232664
- this.$emit("openTextModal", _objectSpread2({}, this.customPropertyValue));
232826
+ this.$emit('openTextModal', _objectSpread2({}, this.customPropertyValue));
232665
232827
  }
232666
232828
  } else if (['comment'].includes(newValue)) {
232667
232829
  var _HOEditorFactorys$ins;
232668
232830
 
232669
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;
232670
- if (customProperty) this.$emit("openTextModal", _objectSpread2({}, customProperty));
232832
+ if (customProperty) this.$emit('openTextModal', _objectSpread2({}, customProperty));
232671
232833
  }
232672
232834
  }
232673
232835
  }, {
@@ -232699,14 +232861,15 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232699
232861
  value: function isFixedPrintToA4Change() {
232700
232862
  var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
232701
232863
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
232702
- hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
232703
- }
232704
- }, {
232705
- key: "isFixedPrintToA4TChange",
232706
- value: function isFixedPrintToA4TChange() {
232707
- var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
232708
- var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
232709
- 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);
232710
232873
  } // 监听默认打印纸张设置变化
232711
232874
 
232712
232875
  }, {
@@ -232750,6 +232913,13 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232750
232913
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
232751
232914
  hoEditorFactory && (hoEditorFactory.printBlack = this.printBlack);
232752
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
+ }
232753
232923
  }, {
232754
232924
  key: "created",
232755
232925
  value: function created() {
@@ -232780,7 +232950,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232780
232950
  }); // 初始化所有文档
232781
232951
 
232782
232952
  this.docList.forEach(function () {
232783
- var id = (0,util/* generateID */.y)("HO");
232953
+ var id = (0,util/* generateID */.y)('HO');
232784
232954
  var hoEditor = new HOEditorFactory(id);
232785
232955
 
232786
232956
  _this3.hoEditorFactoryIdList.push(id);
@@ -232789,11 +232959,18 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232789
232959
  hoEditor.superiorSigns = (0,toConsumableArray/* default */.Z)(_this3.superiorSigns);
232790
232960
  }
232791
232961
 
232792
- hoEditor.isFixedPrintToA4 = _this3.isFixedPrintToA4;
232793
- 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
+
232794
232970
  hoEditor.isUseImagePrint = _this3.isUseImagePrint;
232795
232971
  hoEditor.isUseForm = _this3.isUseForm;
232796
232972
  hoEditor.printBlack = _this3.printBlack;
232973
+ hoEditor.isEnabledGlobalColor = _this3.isEnabledGlobalColor;
232797
232974
  hoEditor.contentIsModify = _this3.contentIsModify;
232798
232975
  hoEditor.isCanEditHeadFoot = _this3.isCanEditHeadFoot;
232799
232976
  hoEditor.docTree.docProperty = _this3.defaultDocProperty;
@@ -232824,17 +233001,17 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232824
233001
 
232825
233002
  var getLabelNode = function getLabelNode() {
232826
233003
  var labelNode = [];
232827
- var isIncludes = "";
233004
+ var isIncludes = '';
232828
233005
  var hoEditor = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(_this4.activeDocId);
232829
233006
  var currentDomRange = hoEditor.vueController.getDomRange();
232830
233007
 
232831
233008
  if (currentDomRange !== null && currentDomRange !== void 0 && currentDomRange.isEmpty) {
232832
233009
  if (nodeInfoes.node() instanceof LabelNode/* LabelNode */.P) {
232833
233010
  labelNode.push(nodeInfoes.node());
232834
- isIncludes = "toText";
233011
+ isIncludes = 'toText';
232835
233012
  }
232836
233013
  } else {
232837
- isIncludes = "toLabel";
233014
+ isIncludes = 'toLabel';
232838
233015
  var startPath = currentDomRange.startPath;
232839
233016
  var endPath = currentDomRange.endPath;
232840
233017
  var selectNodes = DomRange/* DomRange.getSelectDomNodes */.a.getSelectDomNodes(_this4.activeDocId, startPath, endPath, true)[0];
@@ -232842,7 +233019,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232842
233019
  if (selectNodes.length > 0) {
232843
233020
  selectNodes.forEach(function (v) {
232844
233021
  if (v instanceof LabelNode/* LabelNode */.P) {
232845
- isIncludes = "toText";
233022
+ isIncludes = 'toText';
232846
233023
  labelNode.push(v);
232847
233024
  }
232848
233025
  });
@@ -232881,7 +233058,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232881
233058
  };
232882
233059
  }
232883
233060
 
232884
- this.$emit("rightClickEvent", nodeInfoes);
233061
+ this.$emit('rightClickEvent', nodeInfoes);
232885
233062
  }
232886
233063
  /**
232887
233064
  * 初始化事件
@@ -232923,7 +233100,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232923
233100
  }, {
232924
233101
  key: "insertComments",
232925
233102
  value: function insertComments(content) {
232926
- this.$emit("insertComments", content);
233103
+ this.$emit('insertComments', content);
232927
233104
  }
232928
233105
  /**
232929
233106
  * 双击事件
@@ -232932,7 +233109,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232932
233109
  }, {
232933
233110
  key: "dblNodeClick",
232934
233111
  value: function dblNodeClick(node) {
232935
- this.$emit("dblClickEvent", node);
233112
+ this.$emit('dblClickEvent', node);
232936
233113
  } // 设置字体
232937
233114
 
232938
233115
  }, {
@@ -232954,7 +233131,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232954
233131
  this.activeDocId = activeDocId;
232955
233132
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId);
232956
233133
  hoEditorFactory.hoLocalStorage.initHoWebSql();
232957
- this.$emit("docReady", {
233134
+ this.$emit('docReady', {
232958
233135
  vueController: hoEditorFactory.vueController,
232959
233136
  baseController: hoEditorFactory.baseController,
232960
233137
  domController: hoEditorFactory.domController,
@@ -232985,7 +233162,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
232985
233162
  var property = _objectSpread2({}, pageProperty); // 字体
232986
233163
 
232987
233164
 
232988
- 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('') : '宋体'; // 字号
232989
233166
 
232990
233167
  if (isNaN(Number(property.fontSize))) {
232991
233168
  json_font_namespaceObject.CH.forEach(function (v) {
@@ -233012,12 +233189,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
233012
233189
 
233013
233190
  if (pageProperty.elementBackColor) {
233014
233191
  hoEditorFactory.vueController.setReviewLevelColor({
233015
- reviewLev1Color: "#F19191",
233016
- reviewLev2Color: "#FFFFFF",
233017
- reviewLev3Color: "#FFFFFF",
233018
- fieldColor: "#DFFFFF",
233019
- dateTimeColor: "#FBFAD0",
233020
- downListColor: "#D2ECB1"
233192
+ reviewLev1Color: '#F19191',
233193
+ reviewLev2Color: '#FFFFFF',
233194
+ reviewLev3Color: '#FFFFFF',
233195
+ fieldColor: '#DFFFFF',
233196
+ dateTimeColor: '#FBFAD0',
233197
+ downListColor: '#D2ECB1'
233021
233198
  });
233022
233199
  } // 复制粘贴基准值
233023
233200
 
@@ -233088,7 +233265,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
233088
233265
  }, {
233089
233266
  key: "closeControlModal",
233090
233267
  value: function closeControlModal() {
233091
- this.setControlProperty("", "add", "");
233268
+ this.setControlProperty('', 'add', '');
233092
233269
  }
233093
233270
  /**
233094
233271
  * 非文档区域右键事件
@@ -233097,7 +233274,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
233097
233274
  }, {
233098
233275
  key: "blankAreaRightClick",
233099
233276
  value: function blankAreaRightClick(e) {
233100
- if (e.target instanceof HTMLDivElement && e.target.className === "editor") {}
233277
+ if (e.target instanceof HTMLDivElement && e.target.className === 'editor') {}
233101
233278
  }
233102
233279
  }]);
233103
233280
 
@@ -233135,13 +233312,9 @@ __decorate([Prop({
233135
233312
  })], HoDocs.prototype, "isUseTipText", void 0);
233136
233313
 
233137
233314
  __decorate([Prop({
233138
- default: false
233315
+ default: ''
233139
233316
  })], HoDocs.prototype, "isFixedPrintToA4", void 0);
233140
233317
 
233141
- __decorate([Prop({
233142
- default: false
233143
- })], HoDocs.prototype, "isFixedPrintToA4T", void 0);
233144
-
233145
233318
  __decorate([Prop({
233146
233319
  default: true
233147
233320
  })], HoDocs.prototype, "isUseImagePrint", void 0);
@@ -233154,58 +233327,60 @@ __decorate([Prop({
233154
233327
  default: true
233155
233328
  })], HoDocs.prototype, "printBlack", void 0);
233156
233329
 
233157
- __decorate([Watch("contentIsModify", {
233330
+ __decorate([Prop({
233331
+ default: false
233332
+ })], HoDocs.prototype, "isEnabledGlobalColor", void 0);
233333
+
233334
+ __decorate([Watch('contentIsModify', {
233158
233335
  deep: true
233159
233336
  })], HoDocs.prototype, "contentIsModifyChange", null);
233160
233337
 
233161
- __decorate([Watch("editJson")], HoDocs.prototype, "editJsonChange", null);
233338
+ __decorate([Watch('editJson')], HoDocs.prototype, "editJsonChange", null);
233162
233339
 
233163
233340
  __decorate([Provide()], HoDocs.prototype, "getCustomProperty", null);
233164
233341
 
233165
- __decorate([Watch("textStyle", {
233342
+ __decorate([Watch('textStyle', {
233166
233343
  deep: true
233167
233344
  })], HoDocs.prototype, "textStyleChange", null);
233168
233345
 
233169
- __decorate([Watch("modalStatus", {
233346
+ __decorate([Watch('modalStatus', {
233170
233347
  deep: true
233171
233348
  })], HoDocs.prototype, "modalStatusChange", null);
233172
233349
 
233173
- __decorate([Watch("controlType", {
233350
+ __decorate([Watch('controlType', {
233174
233351
  deep: true
233175
233352
  })], HoDocs.prototype, "controlTypeChange", null);
233176
233353
 
233177
- __decorate([Watch("pageProperty", {
233354
+ __decorate([Watch('pageProperty', {
233178
233355
  deep: true
233179
233356
  })], HoDocs.prototype, "pagePropertyChange", null);
233180
233357
 
233181
- __decorate([Watch("docProperty", {
233358
+ __decorate([Watch('docProperty', {
233182
233359
  deep: true
233183
233360
  })], HoDocs.prototype, "docPropertyChange", null);
233184
233361
 
233185
- __decorate([Watch("isFixedPrintToA4", {
233362
+ __decorate([Watch('isFixedPrintToA4', {
233186
233363
  deep: true
233187
233364
  })], HoDocs.prototype, "isFixedPrintToA4Change", null);
233188
233365
 
233189
- __decorate([Watch("isFixedPrintToA4T", {
233190
- deep: true
233191
- })], HoDocs.prototype, "isFixedPrintToA4TChange", null);
233192
-
233193
- __decorate([Watch("isUseImagePrint", {
233366
+ __decorate([Watch('isUseImagePrint', {
233194
233367
  deep: true
233195
233368
  })], HoDocs.prototype, "isUseImagePrintChange", null);
233196
233369
 
233197
- __decorate([Watch("isUseForm", {
233370
+ __decorate([Watch('isUseForm', {
233198
233371
  deep: true
233199
233372
  })], HoDocs.prototype, "isUseFormChange", null);
233200
233373
 
233201
- __decorate([Watch("superiorSigns")], HoDocs.prototype, "superiorSignsChange", null);
233374
+ __decorate([Watch('superiorSigns')], HoDocs.prototype, "superiorSignsChange", null);
233202
233375
 
233203
- __decorate([Watch("isCanEditHeadFoot")], HoDocs.prototype, "isCanEditHeadFootChange", null);
233376
+ __decorate([Watch('isCanEditHeadFoot')], HoDocs.prototype, "isCanEditHeadFootChange", null);
233204
233377
 
233205
- __decorate([Watch("printBlack")], HoDocs.prototype, "printBlackChange", null);
233378
+ __decorate([Watch('printBlack')], HoDocs.prototype, "printBlackChange", null);
233379
+
233380
+ __decorate([Watch('isEnabledGlobalColor')], HoDocs.prototype, "isEnabledGlobalColorChange", null);
233206
233381
 
233207
233382
  HoDocs = __decorate([vue_class_component_esm({
233208
- name: "HoDocs",
233383
+ name: 'HoDocs',
233209
233384
  components: {
233210
233385
  HoDoc: components_HoDoc,
233211
233386
  HoFooter: components_HoFooter,
@@ -239035,9 +239210,9 @@ HoRightMenu = __decorate([vue_class_component_esm({
239035
239210
  }
239036
239211
  })], HoRightMenu);
239037
239212
  /* harmony default export */ var toolbar_HoRightMenu = (HoRightMenu);
239038
- ;// 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&
239039
- 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()}
239040
- 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 = []
239041
239216
 
239042
239217
 
239043
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&
@@ -239480,8 +239655,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
239480
239655
  key: "isFixedPrintToA4Change",
239481
239656
  value: function isFixedPrintToA4Change() {
239482
239657
  var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
239483
- var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
239484
- hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
239658
+ var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId); // hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
239485
239659
  } // 打印时彩色字体转成黑色 printBlack
239486
239660
 
239487
239661
  }, {
@@ -239559,7 +239733,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
239559
239733
  __decorate([Prop()], PrintDocs.prototype, "pageProperty", void 0);
239560
239734
 
239561
239735
  __decorate([Prop({
239562
- default: false
239736
+ default: ''
239563
239737
  })], PrintDocs.prototype, "isFixedPrintToA4", void 0);
239564
239738
 
239565
239739
  __decorate([Prop({
@@ -239601,8 +239775,8 @@ PrintDocs = __decorate([vue_class_component_esm({
239601
239775
 
239602
239776
  var view_component = normalizeComponent(
239603
239777
  view_viewvue_type_script_lang_ts_,
239604
- viewvue_type_template_id_3c4d2e63_render,
239605
- viewvue_type_template_id_3c4d2e63_staticRenderFns,
239778
+ viewvue_type_template_id_4a7f3e3a_render,
239779
+ viewvue_type_template_id_4a7f3e3a_staticRenderFns,
239606
239780
  false,
239607
239781
  null,
239608
239782
  null,