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.
- package/lib/hoeditor.common.js +438 -264
- package/lib/hoeditor.umd.js +438 -264
- package/lib/hoeditor.umd.min.js +22 -22
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -11196,9 +11196,10 @@ var PrintStatus = /*#__PURE__*/function () {
|
|
|
11196
11196
|
|
|
11197
11197
|
pages.sort(function (a, b) {
|
|
11198
11198
|
return a - b;
|
|
11199
|
-
});
|
|
11199
|
+
}); // console.log(pages);
|
|
11200
11200
|
// 去重
|
|
11201
|
-
|
|
11201
|
+
|
|
11202
|
+
this._printPages = (0,toConsumableArray/* default */.Z)(new Set(pages)); // console.log('页码范围:', this._printPages);
|
|
11202
11203
|
} catch (error) {
|
|
11203
11204
|
Exception/* Exception.printCallStack */.P.printCallStack();
|
|
11204
11205
|
}
|
|
@@ -11661,7 +11662,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11661
11662
|
y: 0
|
|
11662
11663
|
};
|
|
11663
11664
|
|
|
11664
|
-
if (hoEditorFactory.isFixedPrintToA4 && format) {
|
|
11665
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1' && format) {
|
|
11665
11666
|
if (orientation == 'l') {
|
|
11666
11667
|
svg2pdfOptions.x = format[0] - width;
|
|
11667
11668
|
svg2pdfOptions.y = (format[1] - height) / 2;
|
|
@@ -11679,7 +11680,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11679
11680
|
ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
|
|
11680
11681
|
window.printBlack = hoEditorFactory.printBlack;
|
|
11681
11682
|
|
|
11682
|
-
if (hoEditorFactory.
|
|
11683
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && format) {
|
|
11683
11684
|
// 避免切换纸张的打印方式 绘制只处理竖向情况
|
|
11684
11685
|
if (orientation === 'p' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5' && index == 0) {
|
|
11685
11686
|
ctx.translate(0, 1122 / 2); // 由于旋转是默认以左上角为中心 所以需要先移动位置 改变起始点
|
|
@@ -11821,7 +11822,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11821
11822
|
return link.remove();
|
|
11822
11823
|
}, 100);
|
|
11823
11824
|
} else {
|
|
11824
|
-
if (height <= 560 &&
|
|
11825
|
+
if (height <= 560 && hoEditorFactory.isFixedPrintToA4 !== '2') {
|
|
11825
11826
|
PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
|
|
11826
11827
|
}
|
|
11827
11828
|
|
|
@@ -12118,7 +12119,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
12118
12119
|
key: "printAllNew",
|
|
12119
12120
|
value: function () {
|
|
12120
12121
|
var _printAllNew = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee5(hoEditorFactoryID, reslove, PDF, position) {
|
|
12121
|
-
var hoEditorFactory, a4Size, svgBox, last,
|
|
12122
|
+
var hoEditorFactory, a4Size, svgBox, last, widthPixes, heightPixes, orientation, formats, format, svg2pdfOptions, _iterator4, _step4, _cpage$drawDomLevel12, index, cpage, _cpage$drawDomLevel9, _cpage$drawDomLevel9$, ctx, _cpage$drawDomLevel10, _cpage$drawDomLevel11, _ctx7, _ctx6, lastPos;
|
|
12122
12123
|
|
|
12123
12124
|
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee5$(_context6) {
|
|
12124
12125
|
while (1) {
|
|
@@ -12134,34 +12135,53 @@ var Print = /*#__PURE__*/function () {
|
|
|
12134
12135
|
svgBox = document.createElement('div');
|
|
12135
12136
|
svgBox.className = 'ho-print-svg-box';
|
|
12136
12137
|
last = -1;
|
|
12138
|
+
widthPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.widthMm, true);
|
|
12139
|
+
heightPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.heightMm, true);
|
|
12140
|
+
orientation = widthPixes > heightPixes ? 'l' : 'p';
|
|
12141
|
+
formats = [widthPixes, heightPixes];
|
|
12142
|
+
format = a4Size[orientation];
|
|
12143
|
+
svg2pdfOptions = {
|
|
12144
|
+
x: 0,
|
|
12145
|
+
y: 0
|
|
12146
|
+
};
|
|
12147
|
+
|
|
12148
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1' && format) {
|
|
12149
|
+
if (orientation == 'l') {
|
|
12150
|
+
svg2pdfOptions.x = format[0] - widthPixes;
|
|
12151
|
+
svg2pdfOptions.y = (format[1] - heightPixes) / 2;
|
|
12152
|
+
} else {
|
|
12153
|
+
svg2pdfOptions.x = (format[0] - widthPixes) / 2;
|
|
12154
|
+
}
|
|
12155
|
+
}
|
|
12156
|
+
|
|
12137
12157
|
_iterator4 = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.printStatus.printProcess());
|
|
12138
|
-
_context6.prev =
|
|
12158
|
+
_context6.prev = 15;
|
|
12139
12159
|
|
|
12140
12160
|
_iterator4.s();
|
|
12141
12161
|
|
|
12142
|
-
case
|
|
12162
|
+
case 17:
|
|
12143
12163
|
if ((_step4 = _iterator4.n()).done) {
|
|
12144
|
-
_context6.next =
|
|
12164
|
+
_context6.next = 50;
|
|
12145
12165
|
break;
|
|
12146
12166
|
}
|
|
12147
12167
|
|
|
12148
12168
|
index = _step4.value;
|
|
12149
12169
|
|
|
12150
12170
|
if (!(index == -1)) {
|
|
12151
|
-
_context6.next =
|
|
12171
|
+
_context6.next = 23;
|
|
12152
12172
|
break;
|
|
12153
12173
|
}
|
|
12154
12174
|
|
|
12155
|
-
_context6.next =
|
|
12175
|
+
_context6.next = 22;
|
|
12156
12176
|
return message_box_default().confirm('请进行翻页', '打印提示', {
|
|
12157
12177
|
confirmButtonText: '确定',
|
|
12158
12178
|
type: 'info'
|
|
12159
12179
|
});
|
|
12160
12180
|
|
|
12161
|
-
case
|
|
12162
|
-
return _context6.abrupt("continue",
|
|
12181
|
+
case 22:
|
|
12182
|
+
return _context6.abrupt("continue", 48);
|
|
12163
12183
|
|
|
12164
|
-
case
|
|
12184
|
+
case 23:
|
|
12165
12185
|
last = index;
|
|
12166
12186
|
cpage = hoEditorFactory.drawTree.drawPages[index];
|
|
12167
12187
|
|
|
@@ -12176,52 +12196,44 @@ var Print = /*#__PURE__*/function () {
|
|
|
12176
12196
|
}
|
|
12177
12197
|
|
|
12178
12198
|
if (!(index === hoEditorFactory.drawTree.drawPages.length - 1 && cpage.drawMainDoc.children.length === 2 && !(cpage.drawMainDoc.children[0] instanceof DrawPageTable/* DrawPageTable */.ox) && cpage.drawMainDoc.children[1] && cpage.drawMainDoc.children[1].drawItems.length === 0)) {
|
|
12179
|
-
_context6.next =
|
|
12199
|
+
_context6.next = 29;
|
|
12180
12200
|
break;
|
|
12181
12201
|
}
|
|
12182
12202
|
|
|
12183
|
-
return _context6.abrupt("break",
|
|
12184
|
-
|
|
12185
|
-
case 22:
|
|
12186
|
-
widthPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.widthMm, true);
|
|
12187
|
-
heightPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.heightMm, true);
|
|
12188
|
-
orientation = widthPixes > heightPixes ? 'l' : 'p';
|
|
12189
|
-
formats = [widthPixes, heightPixes];
|
|
12190
|
-
format = a4Size[orientation];
|
|
12191
|
-
svg2pdfOptions = {
|
|
12192
|
-
x: 0,
|
|
12193
|
-
y: 0
|
|
12194
|
-
};
|
|
12195
|
-
|
|
12196
|
-
if (hoEditorFactory.isFixedPrintToA4 && format) {
|
|
12197
|
-
if (orientation == 'l') {
|
|
12198
|
-
svg2pdfOptions.x = format[0] - widthPixes;
|
|
12199
|
-
svg2pdfOptions.y = (format[1] - heightPixes) / 2;
|
|
12200
|
-
} else {
|
|
12201
|
-
svg2pdfOptions.x = (format[0] - widthPixes) / 2;
|
|
12202
|
-
}
|
|
12203
|
-
}
|
|
12203
|
+
return _context6.abrupt("break", 50);
|
|
12204
12204
|
|
|
12205
|
+
case 29:
|
|
12205
12206
|
if (!hoEditorFactory.isUseImagePrint) {
|
|
12206
|
-
_context6.next =
|
|
12207
|
+
_context6.next = 41;
|
|
12207
12208
|
break;
|
|
12208
12209
|
}
|
|
12209
12210
|
|
|
12210
|
-
if (formats.length == 2 &&
|
|
12211
|
+
if (formats.length == 2 && hoEditorFactory.isFixedPrintToA4 == '1') {
|
|
12211
12212
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage(formats, orientation);
|
|
12213
|
+
} else if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
12214
|
+
PDF === null || PDF === void 0 ? void 0 : PDF.addPage([793, 1122], 'p');
|
|
12212
12215
|
} else {
|
|
12213
12216
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
|
|
12214
12217
|
}
|
|
12215
12218
|
|
|
12216
12219
|
ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
|
|
12220
|
+
|
|
12221
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && index == 0 && hoEditorFactory.isRotate) {
|
|
12222
|
+
// 复位 需要先按移动过的位置恢复旋转前的角度,然后才能移动位置
|
|
12223
|
+
ctx.rotate(90 * Math.PI / 180);
|
|
12224
|
+
ctx.translate(0, -1122 / 2);
|
|
12225
|
+
hoEditorFactory.isRotate = false;
|
|
12226
|
+
}
|
|
12227
|
+
|
|
12217
12228
|
window.printBlack = hoEditorFactory.printBlack;
|
|
12218
12229
|
|
|
12219
|
-
if (hoEditorFactory.
|
|
12230
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && index == 0 && !hoEditorFactory.isRotate && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
12220
12231
|
// 避免切换纸张的打印方式 绘制只处理竖向情况
|
|
12221
12232
|
if (orientation === 'p') {
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
ctx.rotate(270 * Math.PI / 180);
|
|
12233
|
+
// 旋转是默认以左上角为中心 需要先移动位置 再进行旋转
|
|
12234
|
+
ctx.translate(0, 1122 / 2);
|
|
12235
|
+
ctx.rotate(270 * Math.PI / 180);
|
|
12236
|
+
hoEditorFactory.isRotate = true;
|
|
12225
12237
|
}
|
|
12226
12238
|
}
|
|
12227
12239
|
|
|
@@ -12229,10 +12241,10 @@ var Print = /*#__PURE__*/function () {
|
|
|
12229
12241
|
ctx.posY = svg2pdfOptions.y;
|
|
12230
12242
|
ctx && ((_cpage$drawDomLevel9 = cpage.drawDomLevel) === null || _cpage$drawDomLevel9 === void 0 ? void 0 : (_cpage$drawDomLevel9$ = _cpage$drawDomLevel9.stage) === null || _cpage$drawDomLevel9$ === void 0 ? void 0 : _cpage$drawDomLevel9$.draw(ctx));
|
|
12231
12243
|
ctx = null;
|
|
12232
|
-
_context6.next =
|
|
12244
|
+
_context6.next = 47;
|
|
12233
12245
|
break;
|
|
12234
12246
|
|
|
12235
|
-
case
|
|
12247
|
+
case 41:
|
|
12236
12248
|
_ctx6 = new canvas2svg({
|
|
12237
12249
|
width: widthPixes,
|
|
12238
12250
|
height: orientation === 'l' ? heightPixes - 1 : heightPixes,
|
|
@@ -12246,37 +12258,37 @@ var Print = /*#__PURE__*/function () {
|
|
|
12246
12258
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
|
|
12247
12259
|
}
|
|
12248
12260
|
|
|
12249
|
-
_context6.next =
|
|
12261
|
+
_context6.next = 46;
|
|
12250
12262
|
return svg2pdf((_ctx7 = _ctx6) === null || _ctx7 === void 0 ? void 0 : _ctx7.getSvg(), PDF, svg2pdfOptions);
|
|
12251
12263
|
|
|
12252
|
-
case
|
|
12264
|
+
case 46:
|
|
12253
12265
|
_ctx6 = null;
|
|
12254
12266
|
|
|
12255
|
-
case
|
|
12267
|
+
case 47:
|
|
12256
12268
|
index > 0 && ((_cpage$drawDomLevel12 = cpage.drawDomLevel) === null || _cpage$drawDomLevel12 === void 0 ? void 0 : _cpage$drawDomLevel12.clearStage());
|
|
12257
12269
|
|
|
12258
|
-
case
|
|
12259
|
-
_context6.next =
|
|
12270
|
+
case 48:
|
|
12271
|
+
_context6.next = 17;
|
|
12260
12272
|
break;
|
|
12261
12273
|
|
|
12262
|
-
case
|
|
12263
|
-
_context6.next =
|
|
12274
|
+
case 50:
|
|
12275
|
+
_context6.next = 55;
|
|
12264
12276
|
break;
|
|
12265
12277
|
|
|
12266
|
-
case
|
|
12267
|
-
_context6.prev =
|
|
12268
|
-
_context6.t0 = _context6["catch"](
|
|
12278
|
+
case 52:
|
|
12279
|
+
_context6.prev = 52;
|
|
12280
|
+
_context6.t0 = _context6["catch"](15);
|
|
12269
12281
|
|
|
12270
12282
|
_iterator4.e(_context6.t0);
|
|
12271
12283
|
|
|
12272
|
-
case
|
|
12273
|
-
_context6.prev =
|
|
12284
|
+
case 55:
|
|
12285
|
+
_context6.prev = 55;
|
|
12274
12286
|
|
|
12275
12287
|
_iterator4.f();
|
|
12276
12288
|
|
|
12277
|
-
return _context6.finish(
|
|
12289
|
+
return _context6.finish(55);
|
|
12278
12290
|
|
|
12279
|
-
case
|
|
12291
|
+
case 58:
|
|
12280
12292
|
if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) {
|
|
12281
12293
|
hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
|
|
12282
12294
|
}
|
|
@@ -12294,12 +12306,12 @@ var Print = /*#__PURE__*/function () {
|
|
|
12294
12306
|
hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
|
|
12295
12307
|
reslove();
|
|
12296
12308
|
|
|
12297
|
-
case
|
|
12309
|
+
case 62:
|
|
12298
12310
|
case "end":
|
|
12299
12311
|
return _context6.stop();
|
|
12300
12312
|
}
|
|
12301
12313
|
}
|
|
12302
|
-
}, _callee5, null, [[
|
|
12314
|
+
}, _callee5, null, [[15, 52, 55, 58]]);
|
|
12303
12315
|
}));
|
|
12304
12316
|
|
|
12305
12317
|
function printAllNew(_x15, _x16, _x17, _x18) {
|
|
@@ -26251,10 +26263,28 @@ var CellNode = /*#__PURE__*/function (_RectNode) {
|
|
|
26251
26263
|
// return;
|
|
26252
26264
|
// }
|
|
26253
26265
|
// }
|
|
26266
|
+
//const startPath = `${this.getNodePath()}/0`;
|
|
26267
|
+
//const startPath = hoEditorFactory.docTree.curDomRange.startPath;
|
|
26268
|
+
|
|
26269
|
+
|
|
26270
|
+
var endPath = "";
|
|
26271
|
+
var startPath = "";
|
|
26272
|
+
|
|
26273
|
+
if (this.table.tableProperty.isAutoChangeLine) {
|
|
26274
|
+
var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
26254
26275
|
|
|
26276
|
+
if (curDomRange.npEnd.node instanceof _ParagraphNode__WEBPACK_IMPORTED_MODULE_31__/* .ParagraphNode */ .C) {
|
|
26277
|
+
startPath = curDomRange.startPath;
|
|
26278
|
+
endPath = startPath;
|
|
26279
|
+
} else {
|
|
26280
|
+
startPath = curDomRange.npEnd.node.prevSibling().getNodePath();
|
|
26281
|
+
endPath = hoEditorFactory.docTree.getNodeLastPath(curDomRange.npEnd.node);
|
|
26282
|
+
}
|
|
26283
|
+
} else {
|
|
26284
|
+
startPath = "".concat(this.getNodePath(), "/0");
|
|
26285
|
+
endPath = hoEditorFactory.docTree.getNodeLastPath(this);
|
|
26286
|
+
}
|
|
26255
26287
|
|
|
26256
|
-
var startPath = "".concat(this.getNodePath(), "/0");
|
|
26257
|
-
var endPath = hoEditorFactory.docTree.getNodeLastPath(this);
|
|
26258
26288
|
var aRange = new _DomRange__WEBPACK_IMPORTED_MODULE_24__/* .DomRange */ .a(this._hoEditorFactoryID, startPath, endPath);
|
|
26259
26289
|
hoEditorFactory.docController.deleteRange(aRange, true);
|
|
26260
26290
|
hoEditorFactory.docController.insertPlainTextAfterPath(startPath, value);
|
|
@@ -30612,27 +30642,32 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
|
|
|
30612
30642
|
/* harmony export */ "C": function() { return /* binding */ ParagraphNode; }
|
|
30613
30643
|
/* harmony export */ });
|
|
30614
30644
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91347);
|
|
30615
|
-
/* harmony import */ var
|
|
30616
|
-
/* harmony import */ var
|
|
30617
|
-
/* harmony import */ var
|
|
30618
|
-
/* harmony import */ var
|
|
30619
|
-
/* harmony import */ var
|
|
30620
|
-
/* harmony import */ var
|
|
30621
|
-
/* harmony import */ var
|
|
30622
|
-
/* harmony import */ var
|
|
30623
|
-
/* harmony import */ var
|
|
30624
|
-
/* harmony import */ var
|
|
30625
|
-
/* harmony import */ var
|
|
30626
|
-
/* harmony import */ var
|
|
30627
|
-
/* harmony import */ var
|
|
30628
|
-
/* harmony import */ var
|
|
30629
|
-
/* harmony import */ var
|
|
30630
|
-
/* harmony import */ var
|
|
30631
|
-
/* harmony import */ var
|
|
30632
|
-
/* harmony import */ var
|
|
30633
|
-
/* harmony import */ var
|
|
30634
|
-
/* harmony import */ var
|
|
30635
|
-
/* harmony import */ var
|
|
30645
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36768);
|
|
30646
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42015);
|
|
30647
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(16296);
|
|
30648
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(83964);
|
|
30649
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46455);
|
|
30650
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41539);
|
|
30651
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
30652
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(54747);
|
|
30653
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
30654
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(47941);
|
|
30655
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
30656
|
+
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40561);
|
|
30657
|
+
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
30658
|
+
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9653);
|
|
30659
|
+
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
30660
|
+
/* harmony import */ var _BaseNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(92178);
|
|
30661
|
+
/* harmony import */ var _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(28275);
|
|
30662
|
+
/* harmony import */ var _RectNode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4428);
|
|
30663
|
+
/* harmony import */ var _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(95329);
|
|
30664
|
+
/* harmony import */ var _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(646);
|
|
30665
|
+
/* harmony import */ var _TableNode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(59530);
|
|
30666
|
+
/* harmony import */ var _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(69802);
|
|
30667
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(28831);
|
|
30668
|
+
/* harmony import */ var _CellNode__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(69088);
|
|
30669
|
+
|
|
30670
|
+
|
|
30636
30671
|
|
|
30637
30672
|
|
|
30638
30673
|
|
|
@@ -30652,31 +30687,58 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
|
|
|
30652
30687
|
|
|
30653
30688
|
|
|
30654
30689
|
var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
30655
|
-
(0,
|
|
30690
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(ParagraphNode, _BaseNode);
|
|
30656
30691
|
|
|
30657
|
-
var _super = (0,
|
|
30692
|
+
var _super = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(ParagraphNode);
|
|
30658
30693
|
|
|
30659
|
-
function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo) {
|
|
30694
|
+
function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo, customProperty) {
|
|
30660
30695
|
var _this;
|
|
30661
30696
|
|
|
30662
|
-
(0,
|
|
30697
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(this, ParagraphNode);
|
|
30663
30698
|
|
|
30664
|
-
_this = _super.call(this, hoEditorFactoryID, rootNodes, parentNode,
|
|
30699
|
+
_this = _super.call(this, hoEditorFactoryID, rootNodes, parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType.ntParagraph */ .Jq.ntParagraph);
|
|
30665
30700
|
_this._parentNode = parentNode;
|
|
30666
30701
|
_this._drawLines = new Array();
|
|
30667
30702
|
_this._drawNodes = _this._drawLines;
|
|
30668
30703
|
_this._paraNo = paraNo;
|
|
30669
|
-
_this._styleIndex =
|
|
30704
|
+
_this._styleIndex = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(_this.hoEditorFactoryID).docTree.curStyleIndex;
|
|
30670
30705
|
_this._dTop = 0;
|
|
30671
30706
|
_this._dHeight = 0;
|
|
30672
30707
|
_this._pagePaintStart = null;
|
|
30673
30708
|
_this._printAsSinglePage = false;
|
|
30674
|
-
_this._docId = "";
|
|
30709
|
+
_this._docId = "";
|
|
30710
|
+
_this._customProperty = new Object();
|
|
30711
|
+
|
|
30712
|
+
if (customProperty) {
|
|
30713
|
+
_this.setCustomProperty(customProperty);
|
|
30714
|
+
} // this.node2DrawNode();
|
|
30715
|
+
|
|
30675
30716
|
|
|
30676
30717
|
return _this;
|
|
30677
30718
|
}
|
|
30678
30719
|
|
|
30679
|
-
(0,
|
|
30720
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z)(ParagraphNode, [{
|
|
30721
|
+
key: "setCustomProperty",
|
|
30722
|
+
value: function setCustomProperty(customProperty) {
|
|
30723
|
+
var assignvalue = function assignvalue(target, source) {
|
|
30724
|
+
Object.keys(source).forEach(function (value) {
|
|
30725
|
+
if ((0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(target[value]) == "object") {
|
|
30726
|
+
if (Object.prototype.toString.call(source[value]) === "[object Object]") {
|
|
30727
|
+
assignvalue(target[value], source[value]);
|
|
30728
|
+
} else {
|
|
30729
|
+
if (source[value] !== "" && source[value] !== null) {
|
|
30730
|
+
assignvalue(target[value], eval("(" + source[value] + ")"));
|
|
30731
|
+
}
|
|
30732
|
+
}
|
|
30733
|
+
} else {
|
|
30734
|
+
target[value] = source[value];
|
|
30735
|
+
}
|
|
30736
|
+
});
|
|
30737
|
+
};
|
|
30738
|
+
|
|
30739
|
+
assignvalue(this._customProperty, customProperty);
|
|
30740
|
+
}
|
|
30741
|
+
}, {
|
|
30680
30742
|
key: "paraNo",
|
|
30681
30743
|
get: function get() {
|
|
30682
30744
|
return this._paraNo;
|
|
@@ -30703,6 +30765,16 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30703
30765
|
this._styleIndex = val;
|
|
30704
30766
|
}
|
|
30705
30767
|
}
|
|
30768
|
+
}, {
|
|
30769
|
+
key: "customProperty",
|
|
30770
|
+
get: function get() {
|
|
30771
|
+
return this._customProperty;
|
|
30772
|
+
},
|
|
30773
|
+
set: function set(val) {
|
|
30774
|
+
if (val != this._customProperty) {
|
|
30775
|
+
this._customProperty = val;
|
|
30776
|
+
}
|
|
30777
|
+
}
|
|
30706
30778
|
}, {
|
|
30707
30779
|
key: "combineParagraph",
|
|
30708
30780
|
get: function get() {
|
|
@@ -30724,7 +30796,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30724
30796
|
key: "drootNodes",
|
|
30725
30797
|
get: function get() {
|
|
30726
30798
|
if (!this._drawRoots) {
|
|
30727
|
-
var _HOEditorFactorys$ins =
|
|
30799
|
+
var _HOEditorFactorys$ins = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
|
|
30728
30800
|
_HOEditorFactorys$ins2 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_HOEditorFactorys$ins, 2),
|
|
30729
30801
|
dCell = _HOEditorFactorys$ins2[0],
|
|
30730
30802
|
dRoots = _HOEditorFactorys$ins2[1];
|
|
@@ -30737,7 +30809,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30737
30809
|
}, {
|
|
30738
30810
|
key: "refreshDrootNodes",
|
|
30739
30811
|
value: function refreshDrootNodes() {
|
|
30740
|
-
var _HOEditorFactorys$ins3 =
|
|
30812
|
+
var _HOEditorFactorys$ins3 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
|
|
30741
30813
|
_HOEditorFactorys$ins4 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_HOEditorFactorys$ins3, 2),
|
|
30742
30814
|
dCell = _HOEditorFactorys$ins4[0],
|
|
30743
30815
|
dRoots = _HOEditorFactorys$ins4[1];
|
|
@@ -30748,7 +30820,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30748
30820
|
key: "getParagraphLeftWidth",
|
|
30749
30821
|
value: function getParagraphLeftWidth() {
|
|
30750
30822
|
//如果父文档节点派生于rectNode(用于表格基类),则取
|
|
30751
|
-
var hoEditorFactory =
|
|
30823
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
30752
30824
|
var pNode = this._parentNode;
|
|
30753
30825
|
var aLeft;
|
|
30754
30826
|
var aWidth;
|
|
@@ -30764,7 +30836,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30764
30836
|
aWidth = _pRectNode$getLeftWid2[1];
|
|
30765
30837
|
bRectAlign = _pRectNode$getLeftWid2[2];
|
|
30766
30838
|
|
|
30767
|
-
if (pRectNode instanceof
|
|
30839
|
+
if (pRectNode instanceof _CellNode__WEBPACK_IMPORTED_MODULE_18__/* .CellNode */ .D) {
|
|
30768
30840
|
aLeft = hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[2] * 10, true);
|
|
30769
30841
|
aWidth = aWidth - aLeft - hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[3] * 10, true);
|
|
30770
30842
|
bRectAlign = true;
|
|
@@ -30787,7 +30859,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30787
30859
|
var dline = this._drawLines[index];
|
|
30788
30860
|
|
|
30789
30861
|
if (dline) {
|
|
30790
|
-
var _HOEditorFactorys$ins5 =
|
|
30862
|
+
var _HOEditorFactorys$ins5 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
|
|
30791
30863
|
_HOEditorFactorys$ins6 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_HOEditorFactorys$ins5, 2),
|
|
30792
30864
|
dCell = _HOEditorFactorys$ins6[0],
|
|
30793
30865
|
dRoots = _HOEditorFactorys$ins6[1];
|
|
@@ -30815,9 +30887,9 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30815
30887
|
// }
|
|
30816
30888
|
|
|
30817
30889
|
while (pNode) {
|
|
30818
|
-
if (pNode instanceof
|
|
30890
|
+
if (pNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z) {
|
|
30819
30891
|
return pNode;
|
|
30820
|
-
} else if (pNode instanceof
|
|
30892
|
+
} else if (pNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_16__/* .TextInputFieldNode */ .re && pNode.alignWithBlocked) {
|
|
30821
30893
|
return pNode;
|
|
30822
30894
|
} else {
|
|
30823
30895
|
pNode = pNode.parentNode;
|
|
@@ -30829,14 +30901,14 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30829
30901
|
}, {
|
|
30830
30902
|
key: "updateCombineParagraph",
|
|
30831
30903
|
value: function updateCombineParagraph() {
|
|
30832
|
-
var hoEditorFactory =
|
|
30904
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
30833
30905
|
var para = hoEditorFactory.docTree.paragraphs[this._paraNo];
|
|
30834
30906
|
|
|
30835
30907
|
if (!para) {
|
|
30836
30908
|
para = hoEditorFactory.docTree.paragraphs[0];
|
|
30837
30909
|
}
|
|
30838
30910
|
|
|
30839
|
-
return
|
|
30911
|
+
return _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Paragraph.para2CombinePara */ .nv.para2CombinePara(this._hoEditorFactoryID, this, para, hoEditorFactory.docTree.combineParagraph);
|
|
30840
30912
|
}
|
|
30841
30913
|
/**
|
|
30842
30914
|
* @author xyl
|
|
@@ -30876,10 +30948,10 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30876
30948
|
|
|
30877
30949
|
if (index > 0) {
|
|
30878
30950
|
var prevLine = this._drawLines[index - 1];
|
|
30879
|
-
if (prevLine instanceof
|
|
30951
|
+
if (prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a) prevLine.updateLineStyle();
|
|
30880
30952
|
}
|
|
30881
30953
|
|
|
30882
|
-
var aline = new
|
|
30954
|
+
var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a(this._rootPath, this, index, paragraphWidth);
|
|
30883
30955
|
aline.dTop = itop;
|
|
30884
30956
|
aline.dLeft = ileft;
|
|
30885
30957
|
aline.x = this.combineParagraph.leftMarginPixes;
|
|
@@ -30930,7 +31002,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30930
31002
|
var dline = this.drawlines[i];
|
|
30931
31003
|
|
|
30932
31004
|
if (dline) {
|
|
30933
|
-
if (dline instanceof
|
|
31005
|
+
if (dline instanceof _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_14__/* .DrawTable */ .t) {
|
|
30934
31006
|
dline.clear();
|
|
30935
31007
|
} else {
|
|
30936
31008
|
if (dline.parent) {
|
|
@@ -30948,12 +31020,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30948
31020
|
key: "node2DrawNode",
|
|
30949
31021
|
value: function node2DrawNode() {
|
|
30950
31022
|
this.clear();
|
|
30951
|
-
var itop = this.combineParagraph.topMarginPixes +
|
|
31023
|
+
var itop = this.combineParagraph.topMarginPixes + _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
|
|
30952
31024
|
var leftTopInfos = this.getParagraphLeftWidth();
|
|
30953
31025
|
var ileft = leftTopInfos[0];
|
|
30954
31026
|
var paragraphWidth = leftTopInfos[1]; // console.log(this._combineParagraph);
|
|
30955
31027
|
|
|
30956
|
-
var aline = new
|
|
31028
|
+
var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a(this._rootPath, this, 0, paragraphWidth);
|
|
30957
31029
|
this._dHeight = aline.dHeight;
|
|
30958
31030
|
|
|
30959
31031
|
this._drawLines.push(aline);
|
|
@@ -30988,7 +31060,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30988
31060
|
// this.drootNodes.push(this.drawlines[0]);
|
|
30989
31061
|
// }
|
|
30990
31062
|
if (dline) {
|
|
30991
|
-
var dTop =
|
|
31063
|
+
var dTop = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
|
|
30992
31064
|
this.placeDNodeAfterDTop(dTop, dline); // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.insertDline(droots,index+1,this._drawLines[0]);
|
|
30993
31065
|
}
|
|
30994
31066
|
}
|
|
@@ -31006,7 +31078,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31006
31078
|
var dline = prevDline;
|
|
31007
31079
|
|
|
31008
31080
|
while (index === -1) {
|
|
31009
|
-
var _TableNode$isNodeInTa =
|
|
31081
|
+
var _TableNode$isNodeInTa = _TableNode__WEBPACK_IMPORTED_MODULE_15__/* .TableNode.isNodeInTable */ .Fh.isNodeInTable(dline.paragraphNode),
|
|
31010
31082
|
_TableNode$isNodeInTa2 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_TableNode$isNodeInTa, 3),
|
|
31011
31083
|
bret = _TableNode$isNodeInTa2[0],
|
|
31012
31084
|
aTable = _TableNode$isNodeInTa2[1],
|
|
@@ -31081,7 +31153,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31081
31153
|
}, {
|
|
31082
31154
|
key: "isInCell",
|
|
31083
31155
|
value: function isInCell() {
|
|
31084
|
-
return this.parentNode !== null && this.parentNode instanceof
|
|
31156
|
+
return this.parentNode !== null && this.parentNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z;
|
|
31085
31157
|
}
|
|
31086
31158
|
}, {
|
|
31087
31159
|
key: "drawlines",
|
|
@@ -31091,7 +31163,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31091
31163
|
}, {
|
|
31092
31164
|
key: "adjustNextDline",
|
|
31093
31165
|
value: function adjustNextDline(dline, index) {
|
|
31094
|
-
var droots =
|
|
31166
|
+
var droots = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(dline.rootPath);
|
|
31095
31167
|
var dNextLine = this.getNextDline(dline);
|
|
31096
31168
|
|
|
31097
31169
|
for (var i = index; i < dline.drawItems.length; i++) {
|
|
@@ -31103,7 +31175,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31103
31175
|
}, {
|
|
31104
31176
|
key: "getParagraphLastNodePath",
|
|
31105
31177
|
value: function getParagraphLastNodePath() {
|
|
31106
|
-
return
|
|
31178
|
+
return _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.getParaNodeLastPath(this); // return this.getParagraphLastNode().getNodePath()
|
|
31107
31179
|
// const pNode = this._parentNode;
|
|
31108
31180
|
// if (pNode) {
|
|
31109
31181
|
// const index = pNode.childNodes.indexOf(this);
|
|
@@ -31142,7 +31214,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31142
31214
|
value: function updateDrawLineStyle() {
|
|
31143
31215
|
for (var i = 0; i < this._drawLines.length; i++) {
|
|
31144
31216
|
var dline = this._drawLines[i];
|
|
31145
|
-
if (dline instanceof
|
|
31217
|
+
if (dline instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a) dline.updateLineStyle();
|
|
31146
31218
|
} // if (dline instanceof DrawLine) dline.updateLineStyle();
|
|
31147
31219
|
|
|
31148
31220
|
}
|
|
@@ -31172,12 +31244,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31172
31244
|
}, {
|
|
31173
31245
|
key: "node2Json",
|
|
31174
31246
|
value: function node2Json(range, iscopy) {
|
|
31175
|
-
var combinePara = new
|
|
31247
|
+
var combinePara = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .CombineParagraph */ .kh(this._hoEditorFactoryID, null);
|
|
31176
31248
|
combinePara.copyStyle(this.combineParagraph);
|
|
31177
31249
|
var paragraphStyle = {
|
|
31178
31250
|
height: this.dHeight,
|
|
31179
31251
|
top: this.dTop,
|
|
31180
|
-
align:
|
|
31252
|
+
align: _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[combinePara.align],
|
|
31181
31253
|
charSpace: combinePara.charSpace,
|
|
31182
31254
|
lineSpace: combinePara.lineSpace,
|
|
31183
31255
|
leftMargin: combinePara.leftMarginMm,
|
|
@@ -31193,14 +31265,15 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31193
31265
|
//paragraphJson._align = Align[parseInt(paragraphJson._align)];
|
|
31194
31266
|
|
|
31195
31267
|
var paga = {
|
|
31196
|
-
nodeType:
|
|
31268
|
+
nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType */ .Jq[this.nodeType],
|
|
31197
31269
|
style: paragraphStyle,
|
|
31198
31270
|
// height: this.dHeight,
|
|
31199
31271
|
// top: this.dTop,
|
|
31200
31272
|
styleIndex: this._paraNo,
|
|
31201
31273
|
textStyleNo: this.styleIndex,
|
|
31202
31274
|
printAsSinglePage: this.printAsSinglePage,
|
|
31203
|
-
docId: this.docId
|
|
31275
|
+
docId: this.docId,
|
|
31276
|
+
customProperty: this.customProperty
|
|
31204
31277
|
}; //const dictType = NodeType[this.nodeType].substring(2);
|
|
31205
31278
|
|
|
31206
31279
|
if (iscopy) {
|
|
@@ -31256,20 +31329,20 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31256
31329
|
var paraNo = Number(json.styleIndex);
|
|
31257
31330
|
|
|
31258
31331
|
if (json["style"]) {
|
|
31259
|
-
var hoEditorFactory =
|
|
31332
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(hoEditorFactoryID);
|
|
31260
31333
|
var style = json.style;
|
|
31261
|
-
var paragraph = new
|
|
31334
|
+
var paragraph = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Paragraph */ .nv(hoEditorFactoryID);
|
|
31262
31335
|
paragraph.leftMargin = style._leftMarginMm ? Number(style._leftMarginMm) : Number(style.leftMargin);
|
|
31263
31336
|
paragraph.rightMargin = style._rightMarginMm ? Number(style._rightMarginMm) : Number(style.rightMargin);
|
|
31264
31337
|
paragraph.topMargin = style._topMarginMm ? Number(style._topMarginMm) : Number(style.topMargin);
|
|
31265
31338
|
paragraph.bottomMargin = style._bottomMarginMm ? Number(style._bottomMarginMm) : Number(style.bottomMargin);
|
|
31266
|
-
paragraph.align = style._align !== undefined ? parseInt(
|
|
31339
|
+
paragraph.align = style._align !== undefined ? parseInt(_domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[style._align]) : parseInt(_domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[style.align]);
|
|
31267
31340
|
paragraph.charSpace = style._charSpace ? Number(style._charSpace) : Number(style.charSpace);
|
|
31268
31341
|
paragraph.lineSpace = style._lineSpace ? Number(style._lineSpace) : Number(style.lineSpace);
|
|
31269
31342
|
paraNo = hoEditorFactory.docTree.styleCompare(paragraph);
|
|
31270
31343
|
}
|
|
31271
31344
|
|
|
31272
|
-
var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo);
|
|
31345
|
+
var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo, json.customProperty);
|
|
31273
31346
|
paragraphNode.docId = json.docId && json.docId !== "" ? json.docId : "";
|
|
31274
31347
|
paragraphNode.printAsSinglePage = json.printAsSinglePage ? json.printAsSinglePage === "true" ? true : false : false;
|
|
31275
31348
|
paragraphNode.styleIndex = json.textStyleNo ? Number(json.textStyleNo) : 0; // paragraphNode._dHeight = Number(json.height);
|
|
@@ -31280,7 +31353,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31280
31353
|
}]);
|
|
31281
31354
|
|
|
31282
31355
|
return ParagraphNode;
|
|
31283
|
-
}(
|
|
31356
|
+
}(_BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .BaseNode */ .Hd);
|
|
31284
31357
|
|
|
31285
31358
|
/***/ }),
|
|
31286
31359
|
|
|
@@ -38539,12 +38612,13 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
|
|
|
38539
38612
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38540
38613
|
/* harmony export */ "OL": function() { return /* binding */ DownListProperty; },
|
|
38541
38614
|
/* harmony export */ "ZX": function() { return /* binding */ DataFormat; },
|
|
38615
|
+
/* harmony export */ "Zi": function() { return /* binding */ InputFieldType; },
|
|
38542
38616
|
/* harmony export */ "hc": function() { return /* binding */ ExecuteStatus; },
|
|
38543
38617
|
/* harmony export */ "mK": function() { return /* binding */ ReadOnlyStatus; },
|
|
38544
38618
|
/* harmony export */ "re": function() { return /* binding */ TextInputFieldNode; },
|
|
38545
38619
|
/* harmony export */ "wz": function() { return /* binding */ DataVerifyFormat; }
|
|
38546
38620
|
/* harmony export */ });
|
|
38547
|
-
/* unused harmony exports
|
|
38621
|
+
/* unused harmony exports SpecialFormat, BandDataSource */
|
|
38548
38622
|
/* harmony import */ var element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86769);
|
|
38549
38623
|
/* harmony import */ var element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0__);
|
|
38550
38624
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13767);
|
|
@@ -53519,6 +53593,12 @@ var DrawTextNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
53519
53593
|
}
|
|
53520
53594
|
}
|
|
53521
53595
|
|
|
53596
|
+
if (hoEditorFactory.isEnabledGlobalColor) {
|
|
53597
|
+
if (!(this.node instanceof MarkNode/* MarkNode */.j) && this.node.parentNode.inputFieldType === 0) {
|
|
53598
|
+
backColor = "transparent";
|
|
53599
|
+
}
|
|
53600
|
+
}
|
|
53601
|
+
|
|
53522
53602
|
if (this.node.parentNode.enableGlobalColor) {
|
|
53523
53603
|
backColor = "transparent";
|
|
53524
53604
|
}
|
|
@@ -98071,7 +98151,8 @@ while(len--){curDa=sa.shift();if(typeof curDa!=="string"||Array.isArray(curDa)&&
|
|
|
98071
98151
|
//we assume the user knows what they are doing.
|
|
98072
98152
|
//Convert text into an array anyway to simplify
|
|
98073
98153
|
//later code.
|
|
98074
|
-
if(typeof text==="string"){if(text.match(/[\r?\n]/)){text=[text.replace(/\r\n|\r|\n/g,'')]
|
|
98154
|
+
if(typeof text==="string"){if(text.match(/[\r?\n]/)){text=[text.replace(/\r\n|\r|\n/g,'')];// 自定义修改 处理打印回车的问题
|
|
98155
|
+
}else{text=[text];}}//baseline
|
|
98075
98156
|
var height=activeFontSize/scope.internal.scaleFactor;var descent=height*(lineHeightFactor-1);switch(options.baseline){case"bottom":y-=descent;break;case"top":y+=height-descent;break;case"hanging":y+=height-2*descent;break;case"middle":y+=height/2-descent;break;}//multiline
|
|
98076
98157
|
maxWidth=options.maxWidth||0;if(maxWidth>0){if(typeof text==="string"){text=scope.splitTextToSize(text,maxWidth);}else if(Object.prototype.toString.call(text)==="[object Array]"){text=text.reduce(function(acc,textLine){return acc.concat(scope.splitTextToSize(textLine,maxWidth));},[]);}}//creating Payload-Object to make text byRef
|
|
98077
98158
|
payload={text:text,x:x,y:y,options:options,mutex:{pdfEscape:pdfEscape,activeFontKey:activeFontKey,fonts:fonts,activeFontSize:activeFontSize}};events.publish("preProcessText",payload);text=payload.text;options=payload.options;//angle
|
|
@@ -98089,7 +98170,8 @@ var prevWidth=0;var newX;if(align==="right"){//The passed in x coordinate define
|
|
|
98089
98170
|
//rightmost point of the text.
|
|
98090
98171
|
x-=lineWidths[0];text=[];len=da.length;for(var i=0;i<len;i++){if(i===0){newX=getHorizontalCoordinate(x);newY=getVerticalCoordinate(y);}else{newX=scale(prevWidth-lineWidths[i]);newY=-leading;}text.push([da[i],newX,newY]);prevWidth=lineWidths[i];}}else if(align==="center"){//The passed in x coordinate defines
|
|
98091
98172
|
//the center point.
|
|
98092
|
-
x-=lineWidths[0]/2;text=[];len=da.length;for(var j=0;j<len;j++){if(j===0){newX=getHorizontalCoordinate(x);newY=getVerticalCoordinate(y);}else{newX=scale((prevWidth-lineWidths[j])/2);newY=-leading;}text.push([da[j],newX,newY]);prevWidth=lineWidths[j];}}else if(align==="left"){text=[];len=da.length;for(var h=0;h<len;h++){text.push(da[h]);}}else if(align==="justify"){text=[];len=da.length;maxWidth=maxWidth!==0?maxWidth:pageWidth;for(var l=0;l<len;l++){newY=l===0?getVerticalCoordinate(y):-leading;newX=l===0?getHorizontalCoordinate(x):0;if(l<len-1){
|
|
98173
|
+
x-=lineWidths[0]/2;text=[];len=da.length;for(var j=0;j<len;j++){if(j===0){newX=getHorizontalCoordinate(x);newY=getVerticalCoordinate(y);}else{newX=scale((prevWidth-lineWidths[j])/2);newY=-leading;}text.push([da[j],newX,newY]);prevWidth=lineWidths[j];}}else if(align==="left"){text=[];len=da.length;for(var h=0;h<len;h++){text.push(da[h]);}}else if(align==="justify"){text=[];len=da.length;maxWidth=maxWidth!==0?maxWidth:pageWidth;for(var l=0;l<len;l++){newY=l===0?getVerticalCoordinate(y):-leading;newX=l===0?getHorizontalCoordinate(x):0;if(l<len-1){// 自定义修改 字符间距
|
|
98174
|
+
wordSpacingPerLine.push(hpf(scale((maxWidth-lineWidths[l])/(da[l].split("").length-1))));}else{wordSpacingPerLine.push(0);}text.push([da[l],newX,newY]);}}else{throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');}}//R2L
|
|
98093
98175
|
var doReversing=typeof options.R2L==="boolean"?options.R2L:R2L;if(doReversing===true){text=processTextByFunction(text,function(text,posX,posY){return[text.split("").reverse().join(""),posX,posY];});}//creating Payload-Object to make text byRef
|
|
98094
98176
|
payload={text:text,x:x,y:y,options:options,mutex:{pdfEscape:pdfEscape,activeFontKey:activeFontKey,fonts:fonts,activeFontSize:activeFontSize}};events.publish("postProcessText",payload);text=payload.text;isHex=payload.mutex.isHex||false;//Escaping
|
|
98095
98177
|
var activeFontEncoding=fonts[activeFontKey].encoding;if(activeFontEncoding==="WinAnsiEncoding"||activeFontEncoding==="StandardEncoding"){text=processTextByFunction(text,function(text,posX,posY){return[ESC(text),posX,posY];});}da=transformTextToSpecialArray(text);text=[];var STRING=0;var ARRAY=1;var variant=Array.isArray(da[0])?ARRAY:STRING;var posX;var posY;var content;var wordSpacing="";var generatePosition=function generatePosition(parmPosX,parmPosY,parmTransformationMatrix){var position="";if(parmTransformationMatrix instanceof Matrix){// It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y
|
|
@@ -98895,6 +98977,7 @@ stream.push(formObject.scope.__private__.encodeColorString(formObject.color));st
|
|
|
98895
98977
|
stream.push(calcRes.text);stream.push("ET");// End Text
|
|
98896
98978
|
stream.push("Q");stream.push("EMC");var appearanceStreamContent=createFormXObject(formObject);appearanceStreamContent.scope=formObject.scope;appearanceStreamContent.stream=stream.join("\n");return appearanceStreamContent;};var calculateX=function calculateX(formObject,text){var maxFontSize=formObject.fontSize===0?formObject.maxFontSize:formObject.fontSize;var returnValue={text:"",fontSize:""};// Remove Brackets
|
|
98897
98979
|
text=text.substr(0,1)=="("?text.substr(1):text;text=text.substr(text.length-1)==")"?text.substr(0,text.length-1):text;// split into array of words
|
|
98980
|
+
// 自定义修改 字符间距
|
|
98898
98981
|
var textSplit=text.split("");var fontSize=maxFontSize;// The Starting fontSize (The Maximum)
|
|
98899
98982
|
var lineSpacing=2;var borderPadding=2;var height=AcroFormAppearance.internal.getHeight(formObject)||0;height=height<0?-height:height;var width=AcroFormAppearance.internal.getWidth(formObject)||0;width=width<0?-width:width;var isSmallerThanWidth=function isSmallerThanWidth(i,lastLine,fontSize){if(i+1<textSplit.length){var tmp=lastLine+" "+textSplit[i+1];var TextWidth=calculateFontSpace(tmp,formObject,fontSize).width;var FieldWidth=width-2*borderPadding;return TextWidth<=FieldWidth;}else{return false;}};fontSize++;FontSize:while(fontSize>0){text="";fontSize--;var textHeight=calculateFontSpace("3",formObject,fontSize).height;var startY=formObject.multiline?height-fontSize:(height-textHeight)/2;startY+=lineSpacing;var startX;var lastY=startY;var firstWordInLine=0,lastWordInLine=0;var lastLength;if(fontSize<=0){// In case, the Text doesn't fit at all
|
|
98900
98983
|
fontSize=12;text="(...) Tj\n";text+="% Width of Text: "+calculateFontSpace(text,formObject,fontSize).width+", FieldWidth:"+width+"\n";break;}var lastLine="";var lineCount=0;Line:for(var i in textSplit){if(textSplit.hasOwnProperty(i)){lastLine+=textSplit[i]+" ";// Remove last blank
|
|
@@ -99528,7 +99611,8 @@ out+=String.fromCharCode.apply(null,buf.subarray(i,i+ARRAY_APPLY_BATCH));}return
|
|
|
99528
99611
|
* @param {posY}
|
|
99529
99612
|
*
|
|
99530
99613
|
* @returns jsPDF
|
|
99531
|
-
*/jsPDFAPI.addImage=function(){
|
|
99614
|
+
*/jsPDFAPI.addImage=function(){// 自定义修改 处理签名图片打印
|
|
99615
|
+
var imageData,format,x,y,w,h,alias,compression,rotation,posX,posY;imageData=arguments[0];if(typeof arguments[1]==="number"){format=UNKNOWN;x=arguments[1];y=arguments[2];w=arguments[3];h=arguments[4];alias=arguments[5];compression=arguments[6];rotation=arguments[7];posX=arguments[8];posY=arguments[9];}else{format=arguments[1];x=arguments[2];y=arguments[3];w=arguments[4];h=arguments[5];alias=arguments[6];compression=arguments[7];rotation=arguments[8];posX=arguments[9];posY=arguments[10];}if((0,esm_typeof/* default */.Z)(imageData)==="object"&&!isDOMElement(imageData)&&"imageData"in imageData){var options=imageData;imageData=options.imageData;format=options.format||format||UNKNOWN;x=options.x||x||0;y=options.y||y||0;w=options.w||options.width||w;h=options.h||options.height||h;alias=options.alias||alias;compression=options.compression||compression;rotation=options.rotation||options.angle||rotation;}//If compression is not explicitly set, determine if we should use compression
|
|
99532
99616
|
var filter=this.internal.getFilters();if(compression===undefined&&filter.indexOf("FlateEncode")!==-1){compression="SLOW";}if(isNaN(x)||isNaN(y)){throw new Error("Invalid coordinates passed to jsPDF.addImage");}// if(posX) x += posX;
|
|
99533
99617
|
// if(posY) y += posY;
|
|
99534
99618
|
initialize.call(this);var image=processImageData.call(this,imageData,format,alias,compression);writeImageToPDF.call(this,x,y,w,h,image,rotation);return this;};var processImageData=function processImageData(imageData,format,alias,compression){var result,dataAsBinaryString;if(typeof imageData==="string"&&getImageFileTypeByImageData(imageData)===UNKNOWN){imageData=unescape(imageData);var tmpImageData=convertBase64ToBinaryString(imageData,false);if(tmpImageData!==""){imageData=tmpImageData;}else{tmpImageData=jsPDFAPI.loadFile(imageData,true);if(tmpImageData!==undefined){imageData=tmpImageData;}}}if(isDOMElement(imageData)){imageData=getImageDataFromElement(imageData,format);}format=getImageFileTypeByImageData(imageData,format);if(!isImageTypeSupported(format)){throw new Error("addImage does not support files of type '"+format+"', please ensure that a plugin for '"+format+"' support is added.");}// now do the heavy lifting
|
|
@@ -99982,7 +100066,7 @@ var f2,getHorizontalCoordinateString,getVerticalCoordinateString,getHorizontalCo
|
|
|
99982
100066
|
* @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />
|
|
99983
100067
|
* A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />
|
|
99984
100068
|
* A pattern object to use to fill the drawing (not supported by context2d)
|
|
99985
|
-
*/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
|
|
100069
|
+
*/Object.defineProperty(this,"fillStyle",{get:function get(){return this.ctx.fillStyle;},set:function set(value){var rgba;rgba=getRGBA(value);this.ctx.fillStyle=rgba.style;this.ctx.isFillTransparent=rgba.a===0;//自定义修改 当透明度小于1时改成0 ,以适配不支持透明度的打印机
|
|
99986
100070
|
if(rgba.a<1){this.ctx.fillOpacity=0;}else{this.ctx.fillOpacity=rgba.a;}// 自定义修改 处理彩色字体打印问题
|
|
99987
100071
|
if(window.printBlack&&this.ctx.fillStyle!=="#000000"&&this.ctx.fillStyle!=="#FFFFFF"){this.ctx.fillStyle="#000000";rgba.r=0;rgba.g=0;rgba.b=0;}var alpha=this.ctx.fillOpacity;this.pdf.setFillColor(rgba.r,rgba.g,rgba.b,{a:alpha});this.pdf.setTextColor(rgba.r,rgba.g,rgba.b,{a:alpha});}});/**
|
|
99988
100072
|
* Sets or returns the color, gradient, or pattern used for strokes
|
|
@@ -100023,7 +100107,8 @@ if(fontFace!==null){fontFace.ref={name:family,style:style};fontFaces.push(fontFa
|
|
|
100023
100107
|
* will be used. If not set it will fallback to previous behavior.
|
|
100024
100108
|
*/Object.defineProperty(this,"fontFaces",{get:function get(){return _fontFaces;},set:function set(value){_fontFaceMap=null;_fontFaces=value;}});Object.defineProperty(this,"font",{get:function get(){return this.ctx.font;},set:function set(value){this.ctx.font=value;var rx,matches;//source: https://stackoverflow.com/a/10136041
|
|
100025
100109
|
// eslint-disable-next-line no-useless-escape
|
|
100026
|
-
rx=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i;matches=rx.exec(value);if(matches!==null){var fontStyle=matches[1];var fontVariant=matches[2];var fontWeight=matches[3];var fontSize=matches[4];var lineHeight=matches[5];var fontFamily=matches[6];}else{return;}var rxFontSize=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;var fontSizeUnit=rxFontSize.exec(fontSize)[2];if("px"===fontSizeUnit){fontSize=parseFloat(fontSize)*this.pdf.internal.scaleFactor
|
|
100110
|
+
rx=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i;matches=rx.exec(value);if(matches!==null){var fontStyle=matches[1];var fontVariant=matches[2];var fontWeight=matches[3];var fontSize=matches[4];var lineHeight=matches[5];var fontFamily=matches[6];}else{return;}var rxFontSize=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;var fontSizeUnit=rxFontSize.exec(fontSize)[2];if("px"===fontSizeUnit){fontSize=parseFloat(fontSize)*this.pdf.internal.scaleFactor;//自定义修改 pt字体转为px
|
|
100111
|
+
}else if("em"===fontSizeUnit){fontSize=Math.floor(parseFloat(fontSize)*this.pdf.getFontSize());}else{fontSize=Math.floor(parseFloat(fontSize)*this.pdf.internal.scaleFactor);}this.pdf.setFontSize(fontSize);var parts=parseFontFamily(fontFamily);if(this.fontFaces){var fontFaceMap=getFontFaceMap(this.pdf,this.fontFaces);var rules=parts.map(function(ff){return{family:ff,stretch:"normal",// TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)
|
|
100027
100112
|
weight:fontWeight,style:fontStyle};});var font=resolveFontFace(fontFaceMap,rules);this.pdf.setFont(font.ref.name,font.ref.style);return;}var style="";if(fontWeight==="bold"||parseInt(fontWeight,10)>=700||fontStyle==="bold"){style="bold";}if(fontStyle==="italic"){style+="italic";}if(style.length===0){style="normal";}var jsPdfFontName="";var fallbackFonts={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"};for(var i=0;i<parts.length;i++){if(this.pdf.internal.getFont(parts[i],style,{noFallback:true,disableWarning:true})!==undefined){jsPdfFontName=parts[i];break;}else if(style==="bolditalic"&&this.pdf.internal.getFont(parts[i],"bold",{noFallback:true,disableWarning:true})!==undefined){jsPdfFontName=parts[i];style="bold";}else if(this.pdf.internal.getFont(parts[i],"normal",{noFallback:true,disableWarning:true})!==undefined){jsPdfFontName=parts[i];style="normal";break;}}if(jsPdfFontName===""){for(var j=0;j<parts.length;j++){if(fallbackFonts[parts[j]]){jsPdfFontName=fallbackFonts[parts[j]];break;}}}jsPdfFontName=jsPdfFontName===""?"Times":jsPdfFontName;this.pdf.setFont(jsPdfFontName,style);}});Object.defineProperty(this,"globalCompositeOperation",{get:function get(){return this.ctx.globalCompositeOperation;},set:function set(value){this.ctx.globalCompositeOperation=value;}});Object.defineProperty(this,"globalAlpha",{get:function get(){return this.ctx.globalAlpha;},set:function set(value){//自定义修改
|
|
100028
100113
|
if(value<1){this.ctx.globalAlpha=0;}else{this.ctx.globalAlpha=value;}}});/**
|
|
100029
100114
|
* A float specifying the amount of the line dash offset. The default value is 0.0.
|
|
@@ -100063,7 +100148,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
|
|
|
100063
100148
|
* @function
|
|
100064
100149
|
* @param x {Number} The x-coordinate of where to move the path to
|
|
100065
100150
|
* @param y {Number} The y-coordinate of where to move the path to
|
|
100066
|
-
*/Context2D.prototype.moveTo=function(x,y){if(isNaN(x)||isNaN(y)){console.error("jsPDF.context2d.moveTo: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.moveTo");}
|
|
100151
|
+
*/Context2D.prototype.moveTo=function(x,y){if(isNaN(x)||isNaN(y)){console.error("jsPDF.context2d.moveTo: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.moveTo");}// 自定义修改 表格的边框线/页面边框位置不对的问题
|
|
100152
|
+
x+=this.posX;y+=this.posY;var pt=this.ctx.transform.applyToPoint(new Point(x,y));this.path.push({type:"mt",x:pt.x,y:pt.y});this.ctx.lastPoint=new Point(x,y);};/**
|
|
100067
100153
|
* Creates a path from the current point back to the starting point
|
|
100068
100154
|
*
|
|
100069
100155
|
* @name closePath
|
|
@@ -100077,7 +100163,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
|
|
|
100077
100163
|
* @param x The x-coordinate of where to create the line to
|
|
100078
100164
|
* @param y The y-coordinate of where to create the line to
|
|
100079
100165
|
* @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).
|
|
100080
|
-
*/Context2D.prototype.lineTo=function(x,y){if(isNaN(x)||isNaN(y)){console.error("jsPDF.context2d.lineTo: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.lineTo");}
|
|
100166
|
+
*/Context2D.prototype.lineTo=function(x,y){if(isNaN(x)||isNaN(y)){console.error("jsPDF.context2d.lineTo: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.lineTo");}// 自定义修改 表格的边框线/页面边框位置不对的问题
|
|
100167
|
+
x+=this.posX;y+=this.posY;var pt=this.ctx.transform.applyToPoint(new Point(x,y));this.path.push({type:"lt",x:pt.x,y:pt.y});this.ctx.lastPoint=new Point(pt.x,pt.y);};/**
|
|
100081
100168
|
* Clips a region of any shape and size from the original canvas
|
|
100082
100169
|
*
|
|
100083
100170
|
* @name clip
|
|
@@ -100230,7 +100317,9 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
|
|
|
100230
100317
|
* @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
|
|
100231
100318
|
* @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
|
|
100232
100319
|
* @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.
|
|
100233
|
-
*/Context2D.prototype.strokeText=function(text,x,y,maxWidth){if(isNaN(x)||isNaN(y)||typeof text!=="string"){console.error("jsPDF.context2d.strokeText: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.strokeText");}if(isStrokeTransparent.call(this)){return;}maxWidth=isNaN(maxWidth)?undefined:maxWidth;var degs=rad2deg(this.ctx.transform.rotation);var scale=this.ctx.transform.scaleX;var acharSpace=this.letterSpacing?this.letterSpacing:0
|
|
100320
|
+
*/Context2D.prototype.strokeText=function(text,x,y,maxWidth){if(isNaN(x)||isNaN(y)||typeof text!=="string"){console.error("jsPDF.context2d.strokeText: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.strokeText");}if(isStrokeTransparent.call(this)){return;}maxWidth=isNaN(maxWidth)?undefined:maxWidth;var degs=rad2deg(this.ctx.transform.rotation);var scale=this.ctx.transform.scaleX;var acharSpace=this.letterSpacing?this.letterSpacing:0;// 自定义修改
|
|
100321
|
+
putText.call(this,{text:text,x:x,y:y,scale:scale,renderingMode:"stroke",angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace// 自定义修改
|
|
100322
|
+
});};/**
|
|
100234
100323
|
* Returns an object that contains the width of the specified text
|
|
100235
100324
|
*
|
|
100236
100325
|
* @name measureText
|
|
@@ -100294,6 +100383,7 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
|
|
|
100294
100383
|
// if (isNaN(f)){
|
|
100295
100384
|
// f=0;
|
|
100296
100385
|
// }
|
|
100386
|
+
// 自定义修改 处理打印图片报错
|
|
100297
100387
|
a=isNaN(a)?1:a;b=isNaN(b)?0:b;c=isNaN(c)?0:c;d=isNaN(d)?1:d;e=isNaN(e)?0:e;f=isNaN(f)?0:f;var matrix=new Matrix(a,b,c,d,e,f);this.ctx.transform=this.ctx.transform.multiply(matrix);// console.log("this.transform值",this.ctx.transform);
|
|
100298
100388
|
};/**
|
|
100299
100389
|
* Resets the current transform to the identity matrix. Then runs transform()
|
|
@@ -100322,8 +100412,9 @@ a=isNaN(a)?1:a;b=isNaN(b)?0:b;c=isNaN(c)?0:c;d=isNaN(d)?1:d;e=isNaN(e)?0:e;f=isN
|
|
|
100322
100412
|
* @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
|
|
100323
100413
|
*/Context2D.prototype.drawImage=function(img,sx,sy,swidth,sheight,x,y,width,height){var imageProperties=this.pdf.getImageProperties(img);var factorX=1;var factorY=1;var clipFactorX=1;var clipFactorY=1;if(typeof swidth!=="undefined"&&typeof width!=="undefined"){clipFactorX=width/swidth;clipFactorY=height/sheight;factorX=imageProperties.width/swidth*width/swidth;factorY=imageProperties.height/sheight*height/sheight;}//is sx and sy are set and x and y not, set x and y with values of sx and sy
|
|
100324
100414
|
if(typeof x==="undefined"){x=sx;y=sy;sx=0;sy=0;}if(typeof swidth!=="undefined"&&typeof width==="undefined"){width=swidth;height=sheight;}if(typeof swidth==="undefined"&&typeof width==="undefined"){width=imageProperties.width;height=imageProperties.height;}var decomposedTransformationMatrix=this.ctx.transform.decompose();// console.log("transform.decompose",decomposedTransformationMatrix.scale);
|
|
100325
|
-
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
|
|
100326
|
-
|
|
100415
|
+
var angle=rad2deg(decomposedTransformationMatrix.rotate.shx);var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);if(!swidth){swidth=width;}if(!sheight){sheight=height;}var xRect;// 自定义修改 处理签名图片打印和普通图片打印
|
|
100416
|
+
if(img.nodeName&&img.nodeName=="CANVAS"){xRect=matrix.applyToRectangle(new Rectangle(x+this.posX-sx*clipFactorX,y+this.posY-sy*clipFactorY,swidth*factorX,sheight*factorY));}else{xRect=matrix.applyToRectangle(new Rectangle(x-sx*clipFactorX,y-sy*clipFactorY,swidth*factorX,sheight*factorY));}var pageArray=getPagesByPath.call(this,xRect);var pages=[];for(var ii=0;ii<pageArray.length;ii+=1){if(pages.indexOf(pageArray[ii])===-1){pages.push(pageArray[ii]);}}sortPages(pages);var clipPath;if(this.autoPaging){var min=pages[0];var max=pages[pages.length-1];for(var i=min;i<max+1;i++){this.pdf.setPage(i);var pageWidthMinusMargins=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1];var topMargin=i===1?this.posY+this.margin[0]:this.margin[0];var firstPageHeight=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2];var pageHeightMinusMargins=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var previousPageHeightSum=i===1?0:firstPageHeight+(i-2)*pageHeightMinusMargins;if(this.ctx.clip_path.length!==0){var tmpPaths=this.path;clipPath=JSON.parse(JSON.stringify(this.ctx.clip_path));this.path=pathPositionRedo(clipPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);drawPaths.call(this,"fill",true);this.path=tmpPaths;}var tmpRect=JSON.parse(JSON.stringify(xRect));tmpRect=pathPositionRedo([tmpRect],this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset)[0];var needsClipping=(i>min||i<max)&&hasMargins.call(this);if(needsClipping){this.pdf.saveGraphicsState();this.pdf.rect(this.margin[3],this.margin[0],pageWidthMinusMargins,pageHeightMinusMargins,null).clip().discardPath();}this.pdf.addImage(img,"JPEG",tmpRect.x,tmpRect.y,tmpRect.w,tmpRect.h,null,null,angle);if(needsClipping){this.pdf.restoreGraphicsState();}}}else{if(img.nodeName&&img.nodeName=="CANVAS"){// 自定义修改
|
|
100417
|
+
this.pdf.addImage(img.toDataURL("image/jpg"),'',xRect.x,xRect.y,xRect.w,xRect.h);}else{// 自定义修改
|
|
100327
100418
|
this.pdf.addImage(img,"JPEG",xRect.x+this.posX,xRect.y+this.posY,xRect.w,xRect.h,null,null,angle,this.posX,this.posY);}}};var getPagesByPath=function getPagesByPath(path,pageWrapX,pageWrapY){var result=[];pageWrapX=pageWrapX||this.pdf.internal.pageSize.width;pageWrapY=pageWrapY||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var yOffset=this.posY+this.ctx.prevPageLastElemOffset;switch(path.type){default:case"mt":case"lt":result.push(Math.floor((path.y+yOffset)/pageWrapY)+1);break;case"arc":result.push(Math.floor((path.y+yOffset-path.radius)/pageWrapY)+1);result.push(Math.floor((path.y+yOffset+path.radius)/pageWrapY)+1);break;case"qct":var rectOfQuadraticCurve=getQuadraticCurveBoundary(this.ctx.lastPoint.x,this.ctx.lastPoint.y,path.x1,path.y1,path.x,path.y);result.push(Math.floor((rectOfQuadraticCurve.y+yOffset)/pageWrapY)+1);result.push(Math.floor((rectOfQuadraticCurve.y+rectOfQuadraticCurve.h+yOffset)/pageWrapY)+1);break;case"bct":var rectOfBezierCurve=getBezierCurveBoundary(this.ctx.lastPoint.x,this.ctx.lastPoint.y,path.x1,path.y1,path.x2,path.y2,path.x,path.y);result.push(Math.floor((rectOfBezierCurve.y+yOffset)/pageWrapY)+1);result.push(Math.floor((rectOfBezierCurve.y+rectOfBezierCurve.h+yOffset)/pageWrapY)+1);break;case"rect":result.push(Math.floor((path.y+yOffset)/pageWrapY)+1);result.push(Math.floor((path.y+path.h+yOffset)/pageWrapY)+1);}for(var i=0;i<result.length;i+=1){while(this.pdf.internal.getNumberOfPages()<result[i]){addPage.call(this);}}return result;};var addPage=function addPage(){var fillStyle=this.fillStyle;var strokeStyle=this.strokeStyle;var font=this.font;var lineCap=this.lineCap;var lineWidth=this.lineWidth;var lineJoin=this.lineJoin;this.pdf.addPage();this.fillStyle=fillStyle;this.strokeStyle=strokeStyle;this.font=font;this.lineCap=lineCap;this.lineWidth=lineWidth;this.lineJoin=lineJoin;};var pathPositionRedo=function pathPositionRedo(paths,x,y){for(var i=0;i<paths.length;i++){switch(paths[i].type){case"bct":paths[i].x2+=x;paths[i].y2+=y;case"qct":paths[i].x1+=x;paths[i].y1+=y;case"mt":case"lt":case"arc":default:paths[i].x+=x;paths[i].y+=y;}}return paths;};var sortPages=function sortPages(pages){return pages.sort(function(a,b){return a-b;});};var pathPreProcess=function pathPreProcess(rule,isClip){var fillStyle=this.fillStyle;var strokeStyle=this.strokeStyle;var lineCap=this.lineCap;var oldLineWidth=this.lineWidth;var lineWidth=Math.abs(oldLineWidth*this.ctx.transform.scaleX);var lineJoin=this.lineJoin;var origPath=JSON.parse(JSON.stringify(this.path));var xPath=JSON.parse(JSON.stringify(this.path));var clipPath;var tmpPath;var pages=[];for(var i=0;i<xPath.length;i++){if(typeof xPath[i].x!=="undefined"){var page=getPagesByPath.call(this,xPath[i]);for(var ii=0;ii<page.length;ii+=1){if(pages.indexOf(page[ii])===-1){pages.push(page[ii]);}}}}for(var j=0;j<pages.length;j++){while(this.pdf.internal.getNumberOfPages()<pages[j]){addPage.call(this);}}sortPages(pages);if(this.autoPaging){var min=pages[0];var max=pages[pages.length-1];for(var k=min;k<max+1;k++){this.pdf.setPage(k);this.fillStyle=fillStyle;this.strokeStyle=strokeStyle;this.lineCap=lineCap;this.lineWidth=lineWidth;this.lineJoin=lineJoin;var pageWidthMinusMargins=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1];var topMargin=k===1?this.posY+this.margin[0]:this.margin[0];var firstPageHeight=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2];var pageHeightMinusMargins=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var previousPageHeightSum=k===1?0:firstPageHeight+(k-2)*pageHeightMinusMargins;if(this.ctx.clip_path.length!==0){var tmpPaths=this.path;clipPath=JSON.parse(JSON.stringify(this.ctx.clip_path));this.path=pathPositionRedo(clipPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);drawPaths.call(this,rule,true);this.path=tmpPaths;}tmpPath=JSON.parse(JSON.stringify(origPath));this.path=pathPositionRedo(tmpPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);if(isClip===false||k===0){var needsClipping=(k>min||k<max)&&hasMargins.call(this);if(needsClipping){this.pdf.saveGraphicsState();this.pdf.rect(this.margin[3],this.margin[0],pageWidthMinusMargins,pageHeightMinusMargins,null).clip().discardPath();}drawPaths.call(this,rule,isClip);if(needsClipping){this.pdf.restoreGraphicsState();}}this.lineWidth=oldLineWidth;}}else{this.lineWidth=lineWidth;drawPaths.call(this,rule,isClip);this.lineWidth=oldLineWidth;}this.path=origPath;};/**
|
|
100328
100419
|
* Processes the paths
|
|
100329
100420
|
*
|
|
@@ -100344,10 +100435,13 @@ return y;case"alphabetic":default:return y;}};var getTextBottom=function getText
|
|
|
100344
100435
|
* @param counterclockwise
|
|
100345
100436
|
* @param style
|
|
100346
100437
|
* @param isClip
|
|
100347
|
-
*/var drawArc=function drawArc(x,y,r,a1,a2,counterclockwise,style,isClip){var curves=createArc.call(this,r,a1,a2,counterclockwise);for(var i=0;i<curves.length;i++){var curve=curves[i];if(i===0){doMove.call(this,curve.x1+x,curve.y1+y);}drawCurve.call(this,x,y,curve.x2,curve.y2,curve.x3,curve.y3,curve.x4,curve.y4);}if(!isClip){putStyle.call(this,style);}else{doClip.call(this);}};var putStyle=function putStyle(style){switch(style){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f");break;}};var doClip=function doClip(){this.pdf.clip();this.pdf.discardPath();};var doMove=function doMove(x,y){this.pdf.internal.out(getHorizontalCoordinateString(x)+" "+getVerticalCoordinateString(y)+" m");};var putText=function putText(options){var textAlign;switch(options.align){case"right":case"end":textAlign="right";break;case"center":textAlign="center";break;case"left":case"start":default:textAlign="left";break;}var textDimensions=this.pdf.getTextDimensions(options.text);var yBaseLine=getBaseline.call(this,options.y);var yBottom=getTextBottom.call(this,yBaseLine);var yTop=yBottom-textDimensions.h;var pt=this.ctx.transform.applyToPoint(new Point(options.x,yBaseLine));var decomposedTransformationMatrix=this.ctx.transform.decompose();var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);var baselineRect=this.ctx.transform.applyToRectangle(new Rectangle(options.x,yBaseLine,textDimensions.w,textDimensions.h));var textBounds=matrix.applyToRectangle(new Rectangle(options.x,yTop,textDimensions.w,textDimensions.h));var pageArray=getPagesByPath.call(this,textBounds);var pages=[];for(var ii=0;ii<pageArray.length;ii+=1){if(pages.indexOf(pageArray[ii])===-1){pages.push(pageArray[ii]);}}sortPages(pages);var clipPath,oldSize,oldLineWidth;options.text=options.text.replace(/[\t]/g,' ')
|
|
100438
|
+
*/var drawArc=function drawArc(x,y,r,a1,a2,counterclockwise,style,isClip){var curves=createArc.call(this,r,a1,a2,counterclockwise);for(var i=0;i<curves.length;i++){var curve=curves[i];if(i===0){doMove.call(this,curve.x1+x,curve.y1+y);}drawCurve.call(this,x,y,curve.x2,curve.y2,curve.x3,curve.y3,curve.x4,curve.y4);}if(!isClip){putStyle.call(this,style);}else{doClip.call(this);}};var putStyle=function putStyle(style){switch(style){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f");break;}};var doClip=function doClip(){this.pdf.clip();this.pdf.discardPath();};var doMove=function doMove(x,y){this.pdf.internal.out(getHorizontalCoordinateString(x)+" "+getVerticalCoordinateString(y)+" m");};var putText=function putText(options){var textAlign;switch(options.align){case"right":case"end":textAlign="right";break;case"center":textAlign="center";break;case"left":case"start":default:textAlign="left";break;}var textDimensions=this.pdf.getTextDimensions(options.text);var yBaseLine=getBaseline.call(this,options.y);var yBottom=getTextBottom.call(this,yBaseLine);var yTop=yBottom-textDimensions.h;var pt=this.ctx.transform.applyToPoint(new Point(options.x,yBaseLine));var decomposedTransformationMatrix=this.ctx.transform.decompose();var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);var baselineRect=this.ctx.transform.applyToRectangle(new Rectangle(options.x,yBaseLine,textDimensions.w,textDimensions.h));var textBounds=matrix.applyToRectangle(new Rectangle(options.x,yTop,textDimensions.w,textDimensions.h));var pageArray=getPagesByPath.call(this,textBounds);var pages=[];for(var ii=0;ii<pageArray.length;ii+=1){if(pages.indexOf(pageArray[ii])===-1){pages.push(pageArray[ii]);}}sortPages(pages);var clipPath,oldSize,oldLineWidth;options.text=options.text.replace(/[\t]/g,' ');// 自定义修改 修复打印不了tab键的问题
|
|
100439
|
+
if(this.autoPaging){var min=pages[0];var max=pages[pages.length-1];for(var i=min;i<max+1;i++){this.pdf.setPage(i);var topMargin=i===1?this.posY+this.margin[0]:this.margin[0];var firstPageHeight=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2];var pageHeightMinusBottomMargin=this.pdf.internal.pageSize.height-this.margin[2];var pageHeightMinusMargins=pageHeightMinusBottomMargin-this.margin[0];var pageWidthMinusRightMargin=this.pdf.internal.pageSize.width-this.margin[1];var pageWidthMinusMargins=pageWidthMinusRightMargin-this.margin[3];var previousPageHeightSum=i===1?0:firstPageHeight+(i-2)*pageHeightMinusMargins;var acharSpace=options.charSpace?parseFloat(options.charSpace):0.0;//自定义修改
|
|
100440
|
+
if(this.ctx.clip_path.length!==0){var tmpPaths=this.path;clipPath=JSON.parse(JSON.stringify(this.ctx.clip_path));this.path=pathPositionRedo(clipPath,this.posX+this.margin[3],-1*previousPageHeightSum+topMargin);drawPaths.call(this,"fill",true);this.path=tmpPaths;}var textBoundsOnPage=pathPositionRedo([JSON.parse(JSON.stringify(textBounds))],this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset)[0];if(options.scale>=0.01){oldSize=this.pdf.internal.getFontSize();this.pdf.setFontSize(oldSize*options.scale);oldLineWidth=this.lineWidth;this.lineWidth=oldLineWidth*options.scale;}var doSlice=this.autoPaging!=="text";if(doSlice||textBoundsOnPage.y+textBoundsOnPage.h<=pageHeightMinusBottomMargin){if(doSlice||textBoundsOnPage.y>=topMargin&&textBoundsOnPage.x<=pageWidthMinusRightMargin){var croppedText=doSlice?options.text:this.pdf.splitTextToSize(options.text,options.maxWidth||pageWidthMinusRightMargin-textBoundsOnPage.x)[0];var baseLineRectOnPage=pathPositionRedo([JSON.parse(JSON.stringify(baselineRect))],this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset)[0];var needsClipping=doSlice&&(i>min||i<max)&&hasMargins.call(this);if(needsClipping){this.pdf.saveGraphicsState();this.pdf.rect(this.margin[3],this.margin[0],pageWidthMinusMargins,pageHeightMinusMargins,null).clip().discardPath();}this.pdf.text(croppedText,baseLineRectOnPage.x,baseLineRectOnPage.y,{angle:options.angle,align:textAlign,renderingMode:options.renderingMode,charSpace:acharSpace// 自定义修改
|
|
100441
|
+
});if(needsClipping){this.pdf.restoreGraphicsState();}}}else{// This text is the last element of the page, but it got cut off due to the margin
|
|
100348
100442
|
// so we render it in the next page
|
|
100349
100443
|
if(textBoundsOnPage.y<pageHeightMinusBottomMargin){// As a result, all other elements have their y offset increased
|
|
100350
|
-
this.ctx.prevPageLastElemOffset+=pageHeightMinusBottomMargin-textBoundsOnPage.y;}}if(options.scale>=0.01){this.pdf.setFontSize(oldSize);this.lineWidth=oldLineWidth;}}}else{if(options.scale>=0.01){oldSize=this.pdf.internal.getFontSize();this.pdf.setFontSize(oldSize*options.scale);oldLineWidth=this.lineWidth;this.lineWidth=oldLineWidth*options.scale;}//
|
|
100444
|
+
this.ctx.prevPageLastElemOffset+=pageHeightMinusBottomMargin-textBoundsOnPage.y;}}if(options.scale>=0.01){this.pdf.setFontSize(oldSize);this.lineWidth=oldLineWidth;}}}else{if(options.scale>=0.01){oldSize=this.pdf.internal.getFontSize();this.pdf.setFontSize(oldSize*options.scale);oldLineWidth=this.lineWidth;this.lineWidth=oldLineWidth*options.scale;}// 自定义修改
|
|
100351
100445
|
var acharSpace=options.charSpace?parseFloat(options.charSpace):0.0;this.pdf.text(options.text,pt.x+this.posX,pt.y+this.posY,{angle:options.angle,align:textAlign,renderingMode:options.renderingMode,// maxWidth: options.maxWidth,
|
|
100352
100446
|
charSpace:acharSpace});if(options.scale>=0.01){this.pdf.setFontSize(oldSize);this.lineWidth=oldLineWidth;}}};var drawLine=function drawLine(x,y,prevX,prevY){prevX=prevX||0;prevY=prevY||0;this.pdf.internal.out(getHorizontalCoordinateString(x+prevX)+" "+getVerticalCoordinateString(y+prevY)+" l");};var drawLines=function drawLines(lines,x,y){return this.pdf.lines(lines,x,y,null,null);};var drawCurve=function drawCurve(x,y,x1,y1,x2,y2,x3,y3){this.pdf.internal.out([f2(getHorizontalCoordinate(x1+x)),f2(getVerticalCoordinate(y1+y)),f2(getHorizontalCoordinate(x2+x)),f2(getVerticalCoordinate(y2+y)),f2(getHorizontalCoordinate(x3+x)),f2(getVerticalCoordinate(y3+y)),"c"].join(" "));};/**
|
|
100353
100447
|
* Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.
|
|
@@ -101201,7 +101295,8 @@ var startOfLine=i;workingLen=0;while(i!==l){if(workingLen+widths_array[i]>maxLen
|
|
|
101201
101295
|
// By default, for PDF, it's "point".
|
|
101202
101296
|
var splitParagraphIntoLines=function splitParagraphIntoLines(text,maxlen,options){// at this time works only on Western scripts, ones with space char
|
|
101203
101297
|
// separating the words. Feel free to expand.
|
|
101204
|
-
if(!options){options={};}
|
|
101298
|
+
if(!options){options={};}// 自定义修改 字符间距 split(" ") ==> split("")
|
|
101299
|
+
var line=[],lines=[line],line_length=options.textIndent||0,separator_length=0,current_word_length=0,word,widths_array,words=text.split(""),spaceCharWidth=getCharWidthsArray.apply(this,[" ",options])[0],i,l,tmp,lineIndent;if(options.lineIndent===-1){lineIndent=words[0].length+2;}else{lineIndent=options.lineIndent||0;}if(lineIndent){var pad=Array(lineIndent).join(" "),wrds=[];words.map(function(wrd){wrd=wrd.split(/\s*\n/);if(wrd.length>1){wrds=wrds.concat(wrd.map(function(wrd,idx){return(idx&&wrd.length?"\n":"")+wrd;}));}else{wrds.push(wrd[0]);}});words=wrds;lineIndent=getStringUnitWidth.apply(this,[pad,options]);}for(i=0,l=words.length;i<l;i++){var force=0;word=words[i];if(lineIndent&&word[0]=="\n"){word=word.substr(1);force=1;}widths_array=getCharWidthsArray.apply(this,[word,options]);current_word_length=widths_array.reduce(function(pv,cv){return pv+cv;},0);if(line_length+separator_length+current_word_length>maxlen||force){if(current_word_length>maxlen){// this happens when you have space-less long URLs for example.
|
|
101205
101300
|
// we just chop these to size. We do NOT insert hiphens
|
|
101206
101301
|
tmp=splitLongWord.apply(this,[word,widths_array,maxlen-(line_length+separator_length),maxlen]);// first line we add to existing line object
|
|
101207
101302
|
line.push(tmp.shift());// it's ok to have extra space indicator there
|
|
@@ -199017,7 +199112,7 @@ var es_function_name = __webpack_require__(68309);
|
|
|
199017
199112
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
199018
199113
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(77203);
|
|
199019
199114
|
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
199020
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDocs.vue?vue&type=template&id=
|
|
199115
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDocs.vue?vue&type=template&id=78774540&
|
|
199021
199116
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.hoEditorFactoryIdList.length > 0)?_c('div',{staticClass:"ho-docs"},[_c('section',{class:_vm.defaultEditJson.isFooter ? 'ho-editor-list' : 'ho-editor-list editor-no-footer',on:{"contextmenu":function($event){return _vm.blankAreaRightClick.apply(null, arguments)}}},[_vm._l((_vm.hoEditorFactoryIdList),function(hoEditorId,index){return [_c('HoDoc',{key:index,attrs:{"docIndex":index,"hoEditorId":hoEditorId,"hoEditorFactoryIdList":_vm.hoEditorFactoryIdList,"activeDocId":_vm.activeDocId,"editJson":_vm.defaultEditJson,"isUseTipText":_vm.isUseTipText,"textStyle":_vm.textStyle},on:{"dblNodeClick":_vm.dblNodeClick,"setFontStyles":_vm.setFontStyles,"rightClickEvent":_vm.rightClickEvent,"setActiveDocIndex":_vm.setActiveDocIndex,"setActivePageIndex":_vm.setActivePageIndex,"drawPagesLengthChange":_vm.drawPagesLengthChange},scopedSlots:_vm._u([{key:"hoDocHead",fn:function(){return [_vm._t("hoHead")]},proxy:true},{key:"hoDocFoot",fn:function(){return [_vm._t("hoFoot")]},proxy:true}],null,true)})]})],2),(_vm.notUseModal)?_c('ControlModal',{attrs:{"hoEditorFactoryId":_vm.activeDocId,"controlProperty":_vm.controlProperty,"isDataSource":_vm.isDataSource,"isCustoms":_vm.isCustoms,"isTableProperty":_vm.isTableProperty,"isListStyle":_vm.isListStyle,"uploadImageParams":_vm.uploadImageParams},on:{"insertComments":_vm.insertComments,"closeControlmodal":_vm.closeControlModal},scopedSlots:_vm._u([{key:"hoTextModal",fn:function(){return [_vm._t("hoTextField")]},proxy:true},{key:"hoComment",fn:function(){return [_vm._t("hoTextComment")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlFindType)?_c('FindReplaceDialog',{attrs:{"hoEditorFactoryId":_vm.activeDocId}}):_vm._e(),(_vm.defaultEditJson.isFooter)?_c('HoFooter',{attrs:{"docProperty":_vm.defaultDocProperty,"hoEditorFactoryId":_vm.activeDocId,"drawPages":_vm.drawPageLength,"currentActivePages":_vm.activePageIndex}}):_vm._e(),_c('ViewContinuousXml',{attrs:{"hoEditorFactoryId":_vm.activeDocId}})],1):_vm._e()}
|
|
199022
199117
|
var staticRenderFns = []
|
|
199023
199118
|
|
|
@@ -207000,7 +207095,7 @@ var SignNode = __webpack_require__(78975);
|
|
|
207000
207095
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
207001
207096
|
var ParagraphNode = __webpack_require__(13880);
|
|
207002
207097
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
207003
|
-
/* harmony default export */ var version = ('2.0.
|
|
207098
|
+
/* harmony default export */ var version = ('2.0.60');
|
|
207004
207099
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/poperTipText/PoperTipText.vue?vue&type=template&id=3fa4e4d3&scoped=true&
|
|
207005
207100
|
var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"},{name:"click-outside",rawName:"v-click-outside",value:(_vm.handleClose),expression:"handleClose"}],ref:"poperTextNode",staticClass:"poper-text-modal animation-in",style:(_vm.posStyle),on:{"mouseenter":_vm.mouseEnter,"mouseleave":_vm.mouseLeave}},_vm._l((_vm.poperText),function(text){return _c('div',{key:text + Math.random(0, 1),staticClass:"poper-text"},[_vm._v(" "+_vm._s(text)+" ")])}),0)}
|
|
207006
207101
|
var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_staticRenderFns = []
|
|
@@ -209156,9 +209251,7 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
209156
209251
|
}
|
|
209157
209252
|
|
|
209158
209253
|
if (dPage.drawDomLevel && dPage.drawDomLevel.stage) {
|
|
209159
|
-
|
|
209160
|
-
dPage.drawDomLevel.clearStage();
|
|
209161
|
-
}
|
|
209254
|
+
dPage.drawDomLevel.clearStage();
|
|
209162
209255
|
}
|
|
209163
209256
|
}
|
|
209164
209257
|
}
|
|
@@ -214668,6 +214761,7 @@ var StagePosition = __webpack_require__(80691);
|
|
|
214668
214761
|
|
|
214669
214762
|
|
|
214670
214763
|
|
|
214764
|
+
|
|
214671
214765
|
|
|
214672
214766
|
|
|
214673
214767
|
var VueController = /*#__PURE__*/function () {
|
|
@@ -220490,6 +220584,44 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220490
220584
|
hoEditorFactory.docTree.curDomRange = newRange;
|
|
220491
220585
|
hoEditorFactory.drawTree.moveCaretToPath(curDomRange.startPath);
|
|
220492
220586
|
}
|
|
220587
|
+
/**
|
|
220588
|
+
* 查询光标所在位置之前的文本内容
|
|
220589
|
+
*/
|
|
220590
|
+
|
|
220591
|
+
}, {
|
|
220592
|
+
key: "getCaretPreviousTextNode",
|
|
220593
|
+
value: function getCaretPreviousTextNode() {
|
|
220594
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
220595
|
+
var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
220596
|
+
var node = curDomRange.npEnd.node;
|
|
220597
|
+
var text = "";
|
|
220598
|
+
|
|
220599
|
+
var getText = function getText(previousNode) {
|
|
220600
|
+
if (previousNode instanceof TextNode/* TextNode */.R || previousNode instanceof LabelNode/* LabelNode */.P || previousNode instanceof DownListNode/* DownListNode */.yF) {
|
|
220601
|
+
return previousNode.text;
|
|
220602
|
+
} else if ((previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re && (previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode.inputFieldType) === TextInputFieldNode/* InputFieldType.dropDownList */.Zi.dropDownList) {
|
|
220603
|
+
return previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode.text;
|
|
220604
|
+
}
|
|
220605
|
+
};
|
|
220606
|
+
|
|
220607
|
+
if (node instanceof TextNode/* TextNode */.R && !(node instanceof TextInputFieldNode/* TextInputFieldNode */.re)) {
|
|
220608
|
+
if (node.text) {
|
|
220609
|
+
text = node.text;
|
|
220610
|
+
} else {
|
|
220611
|
+
text = getText(node.previousLeaf());
|
|
220612
|
+
}
|
|
220613
|
+
} else if ((node === null || node === void 0 ? void 0 : node.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
220614
|
+
text = getText(node.parentNode.previousLeaf());
|
|
220615
|
+
|
|
220616
|
+
if (!text) {
|
|
220617
|
+
text = getText(node.previousLeaf());
|
|
220618
|
+
}
|
|
220619
|
+
} else if (node instanceof SignNode/* SignNode */.N && node.type !== 3) {
|
|
220620
|
+
text = getText(node.previousLeaf());
|
|
220621
|
+
}
|
|
220622
|
+
|
|
220623
|
+
return text;
|
|
220624
|
+
}
|
|
220493
220625
|
/**
|
|
220494
220626
|
* 初始化文档
|
|
220495
220627
|
*/
|
|
@@ -220730,6 +220862,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220730
220862
|
node.imageDataBase64String = src;
|
|
220731
220863
|
hoEditorFactory.docTree.change(changeEvent);
|
|
220732
220864
|
}
|
|
220865
|
+
}, {
|
|
220866
|
+
key: "setParaCustomProperty",
|
|
220867
|
+
value: function setParaCustomProperty(paragraphNode, customProperty) {
|
|
220868
|
+
paragraphNode.setCustomProperty(customProperty);
|
|
220869
|
+
}
|
|
220733
220870
|
}]);
|
|
220734
220871
|
|
|
220735
220872
|
return VueController;
|
|
@@ -222792,7 +222929,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222792
222929
|
beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
222793
222930
|
xml = hoEditorFactory.vueController.getDocXml(true);
|
|
222794
222931
|
htmlText = {
|
|
222795
|
-
text:
|
|
222932
|
+
text: ''
|
|
222796
222933
|
};
|
|
222797
222934
|
hPromise = Promise.resolve();
|
|
222798
222935
|
hPromise = hPromise.then(function () {
|
|
@@ -222863,12 +223000,14 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222863
223000
|
path = hoEditorFactory.docTree.curDomRange.normalize().endPath;
|
|
222864
223001
|
beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
222865
223002
|
xml = hoEditorFactory.vueController.getDocXml(true);
|
|
222866
|
-
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223003
|
+
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
222867
223004
|
format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
222868
223005
|
options = {
|
|
222869
223006
|
orientation: orientation,
|
|
222870
|
-
unit:
|
|
222871
|
-
format: format
|
|
223007
|
+
unit: 'px',
|
|
223008
|
+
format: format,
|
|
223009
|
+
hotfixes: ['px_scaling'],
|
|
223010
|
+
compress: true
|
|
222872
223011
|
};
|
|
222873
223012
|
PDF = new jspdf/* default */.ZP(options);
|
|
222874
223013
|
hPromise = Promise.resolve();
|
|
@@ -222891,7 +223030,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222891
223030
|
hoEditorFactory.vueController.openXml(xml);
|
|
222892
223031
|
PDF.deletePage(1);
|
|
222893
223032
|
return new Promise(function (resolves) {
|
|
222894
|
-
resolves(PDF.output(
|
|
223033
|
+
resolves(PDF.output('datauristring'));
|
|
222895
223034
|
});
|
|
222896
223035
|
});
|
|
222897
223036
|
|
|
@@ -222906,7 +223045,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222906
223045
|
setTimeout(function () {
|
|
222907
223046
|
hoEditorFactory.vueController.moveCaretToPath(path);
|
|
222908
223047
|
}, 0);
|
|
222909
|
-
return _context2.abrupt("return", base64.replace(/^data:application\/pdf;filename=generated.pdf;base64,/,
|
|
223048
|
+
return _context2.abrupt("return", base64.replace(/^data:application\/pdf;filename=generated.pdf;base64,/, ''));
|
|
222910
223049
|
|
|
222911
223050
|
case 20:
|
|
222912
223051
|
return _context2.abrupt("return", null);
|
|
@@ -222933,10 +223072,10 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222933
223072
|
}, {
|
|
222934
223073
|
key: "setjsPDFFonts",
|
|
222935
223074
|
value: function setjsPDFFonts(font) {
|
|
222936
|
-
jspdf/* default.API.events.push */.ZP.API.events.push([
|
|
222937
|
-
this.addFileToVFS(
|
|
222938
|
-
this.addFont(
|
|
222939
|
-
this.setFont(
|
|
223075
|
+
jspdf/* default.API.events.push */.ZP.API.events.push(['addFonts', function () {
|
|
223076
|
+
this.addFileToVFS('SimSun-normal.ttf', font);
|
|
223077
|
+
this.addFont('SimSun-normal.ttf', 'SimSun', 'normal');
|
|
223078
|
+
this.setFont('SimSun', 'normal');
|
|
222940
223079
|
}]);
|
|
222941
223080
|
this._isSetFont = true;
|
|
222942
223081
|
|
|
@@ -222967,8 +223106,8 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222967
223106
|
return;
|
|
222968
223107
|
}
|
|
222969
223108
|
|
|
222970
|
-
var fileType = type ? type :
|
|
222971
|
-
var fileName = pdfName ? pdfName : hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() :
|
|
223109
|
+
var fileType = type ? type : 'pdf';
|
|
223110
|
+
var fileName = pdfName ? pdfName : hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档'; // 保存打印前文档状态 和 内容
|
|
222972
223111
|
|
|
222973
223112
|
var beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
222974
223113
|
var xml = hoEditorFactory.vueController.getDocXml(true);
|
|
@@ -222982,21 +223121,21 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222982
223121
|
});
|
|
222983
223122
|
hPromise = hPromise.then(function () {
|
|
222984
223123
|
return new Promise(function (resolve) {
|
|
222985
|
-
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223124
|
+
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
222986
223125
|
var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
222987
223126
|
|
|
222988
|
-
if (hoEditorFactory.isFixedPrintToA4 && isSpecial) {
|
|
223127
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1' && isSpecial) {
|
|
222989
223128
|
format = _this3._a4Size[orientation];
|
|
222990
223129
|
}
|
|
222991
223130
|
|
|
222992
|
-
if (hoEditorFactory.
|
|
223131
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
222993
223132
|
format = [793, 1122];
|
|
222994
223133
|
orientation = 'p';
|
|
222995
223134
|
}
|
|
222996
223135
|
|
|
222997
223136
|
var options = {
|
|
222998
223137
|
orientation: orientation,
|
|
222999
|
-
unit:
|
|
223138
|
+
unit: 'px',
|
|
223000
223139
|
format: format
|
|
223001
223140
|
};
|
|
223002
223141
|
// const PDF = new jsPDF(orientation, "px", [hoEditorFactory.pageProperty.widthMm, hoEditorFactory.pageProperty.heightMm], false, true, );
|
|
@@ -223026,14 +223165,20 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223026
223165
|
|
|
223027
223166
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
223028
223167
|
var beforeStatus = hoEditorFactory.drawTree.paintStatus;
|
|
223168
|
+
var xml = "";
|
|
223169
|
+
|
|
223170
|
+
if (hoEditorFactory.printStatus.printRange !== 2) {
|
|
223171
|
+
xml = hoEditorFactory.vueController.getDocXml(true, true);
|
|
223172
|
+
}
|
|
223173
|
+
|
|
223029
223174
|
hoEditorFactory.startPageNum = 0;
|
|
223030
223175
|
hoEditorFactory.firstPageStartTop = 0;
|
|
223031
223176
|
|
|
223032
223177
|
if (!this._isSetFont) {
|
|
223033
223178
|
this._waitPrint = true;
|
|
223034
223179
|
|
|
223035
|
-
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>",
|
|
223036
|
-
iconClass:
|
|
223180
|
+
message_box_default().alert("<p>\u6253\u5370\u6240\u9700\u6587\u4EF6\u6B63\u5728\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u7A0D\u5019</p><p>\u52A0\u8F7D\u5B8C\u6210\u540E\u4F1A\u81EA\u52A8\u8FDB\u884C\u6253\u5370</p>", '提示', {
|
|
223181
|
+
iconClass: 'el-icon-loading',
|
|
223037
223182
|
center: true,
|
|
223038
223183
|
showConfirmButton: false,
|
|
223039
223184
|
dangerouslyUseHTMLString: true
|
|
@@ -223047,12 +223192,12 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223047
223192
|
}
|
|
223048
223193
|
|
|
223049
223194
|
if (printMode && printAppoint) {
|
|
223050
|
-
var appoint = printAppoint.replace(/\s*/g,
|
|
223195
|
+
var appoint = printAppoint.replace(/\s*/g, '').replace(/[^\d]/g, ',').split(',');
|
|
223051
223196
|
var maxLen = hoEditorFactory.drawTree.drawPages.length;
|
|
223052
223197
|
var error = appoint.filter(function (pages) {
|
|
223053
223198
|
return pages && Number(pages) > maxLen;
|
|
223054
223199
|
});
|
|
223055
|
-
if (error.length > 0) return
|
|
223200
|
+
if (error.length > 0) return '指定页输入超出文档页范围';
|
|
223056
223201
|
}
|
|
223057
223202
|
|
|
223058
223203
|
var setStatus = new Promise( /*#__PURE__*/function () {
|
|
@@ -223097,23 +223242,23 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223097
223242
|
setStatus.then(function (res) {
|
|
223098
223243
|
if (res) {
|
|
223099
223244
|
return new Promise(function (reslove, reject) {
|
|
223100
|
-
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223245
|
+
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
223101
223246
|
var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
223102
223247
|
|
|
223103
|
-
if (hoEditorFactory.isFixedPrintToA4) {
|
|
223248
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1') {
|
|
223104
223249
|
format = _this4._a4Size[orientation];
|
|
223105
223250
|
}
|
|
223106
223251
|
|
|
223107
|
-
if (hoEditorFactory.
|
|
223252
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
223108
223253
|
format = [793, 1122];
|
|
223109
223254
|
orientation = 'p';
|
|
223110
223255
|
}
|
|
223111
223256
|
|
|
223112
223257
|
var options = {
|
|
223113
223258
|
orientation: orientation,
|
|
223114
|
-
unit:
|
|
223259
|
+
unit: 'px',
|
|
223115
223260
|
format: format,
|
|
223116
|
-
hotfixes: [
|
|
223261
|
+
hotfixes: ['px_scaling'],
|
|
223117
223262
|
compress: true
|
|
223118
223263
|
};
|
|
223119
223264
|
var PDF = new jspdf/* default */.ZP(options);
|
|
@@ -223121,20 +223266,26 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223121
223266
|
});
|
|
223122
223267
|
}
|
|
223123
223268
|
}).then(function (res) {
|
|
223124
|
-
if (res ===
|
|
223269
|
+
if (res === 'printend') {
|
|
223125
223270
|
if (callback) {
|
|
223126
223271
|
callback(hoEditorFactory.printStatus.printRecord.last());
|
|
223127
223272
|
}
|
|
223128
223273
|
|
|
223129
|
-
hoEditorFactory.drawTree.paintStatus = beforeStatus;
|
|
223130
|
-
hoEditorFactory.printStatus.printRange = 2;
|
|
223131
223274
|
hoEditorFactory.printStatus.printAppoint = '';
|
|
223132
223275
|
hoEditorFactory.printStatus.drawPrintRecord.Position = [0, 0];
|
|
223133
223276
|
hoEditorFactory.startPageNum = 0;
|
|
223134
223277
|
hoEditorFactory.firstPageStartTop = 0;
|
|
223135
|
-
|
|
223136
|
-
hoEditorFactory.printStatus.
|
|
223137
|
-
|
|
223278
|
+
|
|
223279
|
+
if (hoEditorFactory.printStatus.printRange !== 2) {
|
|
223280
|
+
hoEditorFactory.printStatus.printRange = 2;
|
|
223281
|
+
hoEditorFactory.drawTree.paintStatus = 5;
|
|
223282
|
+
hoEditorFactory.vueController.openXml(xml);
|
|
223283
|
+
} else {
|
|
223284
|
+
hoEditorFactory.drawTree.paintStatus = beforeStatus;
|
|
223285
|
+
hoEditorFactory.printStatus.clearArea();
|
|
223286
|
+
hoEditorFactory.printStatus.drawPrintRecord.clear();
|
|
223287
|
+
hoEditorFactory.vueController.rebuildAll(true);
|
|
223288
|
+
}
|
|
223138
223289
|
}
|
|
223139
223290
|
});
|
|
223140
223291
|
}
|
|
@@ -223202,7 +223353,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223202
223353
|
while (1) {
|
|
223203
223354
|
switch (_context5.prev = _context5.next) {
|
|
223204
223355
|
case 0:
|
|
223205
|
-
console.time(
|
|
223356
|
+
console.time('连续打印总用时');
|
|
223206
223357
|
list = [];
|
|
223207
223358
|
xmlInfoes.xmlList.forEach(function (v) {
|
|
223208
223359
|
list.push([v.isMerge, v.xml]);
|
|
@@ -223221,7 +223372,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223221
223372
|
hoEditorFactory.printStatus.printMode = 0;
|
|
223222
223373
|
hoEditorFactory.drawTree.paintStatus = DrawTree/* PaintState.psPreview */.Dh.psPreview;
|
|
223223
223374
|
hPromise = Promise.resolve();
|
|
223224
|
-
console.time(
|
|
223375
|
+
console.time('连续查看病历合并总用时');
|
|
223225
223376
|
hPromise = hPromise.then(function (res) {
|
|
223226
223377
|
return new Promise(function (resolve) {
|
|
223227
223378
|
Promise.all([hoEditorFactory.vueController.openDocsForPrint(list)]).then(function () {
|
|
@@ -223235,8 +223386,8 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223235
223386
|
});
|
|
223236
223387
|
});
|
|
223237
223388
|
hPromise = hPromise.then(function () {
|
|
223238
|
-
console.timeEnd(
|
|
223239
|
-
console.time(
|
|
223389
|
+
console.timeEnd('连续查看病历合并总用时');
|
|
223390
|
+
console.time('生成pdf用时');
|
|
223240
223391
|
return new Promise( /*#__PURE__*/function () {
|
|
223241
223392
|
var _ref2 = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee4(resolve) {
|
|
223242
223393
|
var orientation, format, options, PDF;
|
|
@@ -223244,23 +223395,23 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223244
223395
|
while (1) {
|
|
223245
223396
|
switch (_context4.prev = _context4.next) {
|
|
223246
223397
|
case 0:
|
|
223247
|
-
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223398
|
+
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
223248
223399
|
format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
223249
223400
|
|
|
223250
|
-
if (hoEditorFactory.isFixedPrintToA4) {
|
|
223401
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1') {
|
|
223251
223402
|
format = _this5._a4Size[orientation];
|
|
223252
223403
|
}
|
|
223253
223404
|
|
|
223254
|
-
if (hoEditorFactory.
|
|
223405
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
223255
223406
|
format = [793, 1122];
|
|
223256
223407
|
orientation = 'p';
|
|
223257
223408
|
}
|
|
223258
223409
|
|
|
223259
223410
|
options = {
|
|
223260
223411
|
orientation: orientation,
|
|
223261
|
-
unit:
|
|
223412
|
+
unit: 'px',
|
|
223262
223413
|
format: format,
|
|
223263
|
-
hotfixes: [
|
|
223414
|
+
hotfixes: ['px_scaling']
|
|
223264
223415
|
};
|
|
223265
223416
|
PDF = new jspdf/* default */.ZP(options);
|
|
223266
223417
|
PrintStatus/* Print.printToPDF */.Kh.printToPDF(_this5._hoEditorFactoryID, PDF, undefined, undefined, resolve, positionY, format);
|
|
@@ -223281,7 +223432,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223281
223432
|
_context5.next = 17;
|
|
223282
223433
|
return hPromise.then(function (res) {
|
|
223283
223434
|
if (res) {
|
|
223284
|
-
console.timeEnd(
|
|
223435
|
+
console.timeEnd('生成pdf用时');
|
|
223285
223436
|
return new Promise(function (resolves) {
|
|
223286
223437
|
var last = hoEditorFactory.printStatus.printRecord.last();
|
|
223287
223438
|
var pos;
|
|
@@ -223316,7 +223467,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223316
223467
|
// hoEditorFactory.drawTree.rebuildAllDrawLine(false);
|
|
223317
223468
|
// }, 0);
|
|
223318
223469
|
|
|
223319
|
-
console.timeEnd(
|
|
223470
|
+
console.timeEnd('连续打印总用时');
|
|
223320
223471
|
resolves(pos);
|
|
223321
223472
|
});
|
|
223322
223473
|
} else {
|
|
@@ -223332,7 +223483,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223332
223483
|
// hoEditorFactory.drawTree.rebuildAllDrawLine(false);
|
|
223333
223484
|
// }, 0);
|
|
223334
223485
|
|
|
223335
|
-
console.timeEnd(
|
|
223486
|
+
console.timeEnd('连续打印总用时');
|
|
223336
223487
|
return null;
|
|
223337
223488
|
}
|
|
223338
223489
|
});
|
|
@@ -223370,7 +223521,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223370
223521
|
}()
|
|
223371
223522
|
/**
|
|
223372
223523
|
* 批量打印病历 当前
|
|
223373
|
-
* @param xmlList [boolean, string, boolean
|
|
223524
|
+
* @param xmlList [string, boolean, string, boolean][]
|
|
223374
223525
|
* 四个参数分别是: xml内容 是否合并 病程记录id:用来判断是否是病程记录和返回对应病程记录的坐标(处理多个不同病程记录的情况) 是否是最后一份病程记录
|
|
223375
223526
|
*/
|
|
223376
223527
|
|
|
@@ -223394,8 +223545,8 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223394
223545
|
xmlIndex = -1;
|
|
223395
223546
|
mergeList = [];
|
|
223396
223547
|
options = {
|
|
223397
|
-
unit:
|
|
223398
|
-
hotfixes: [
|
|
223548
|
+
unit: 'px',
|
|
223549
|
+
hotfixes: ['px_scaling'],
|
|
223399
223550
|
compress: true
|
|
223400
223551
|
};
|
|
223401
223552
|
PDF = new jspdf/* default */.ZP(options);
|
|
@@ -223479,7 +223630,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223479
223630
|
hoEditorFactory.drawTree.paintStatus = beforePrintStatus;
|
|
223480
223631
|
hoEditorFactory.vueController.openXml(xml);
|
|
223481
223632
|
PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
|
|
223482
|
-
name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() :
|
|
223633
|
+
name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档';
|
|
223483
223634
|
PrintStatus/* Print.openDataUriInWindow */.Kh.openDataUriInWindow(PDF, name, hoEditorFactory.pageProperty.widthPixes);
|
|
223484
223635
|
}
|
|
223485
223636
|
|
|
@@ -224390,6 +224541,7 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
224390
224541
|
this._lastSaveTime = new Date(Date.now());
|
|
224391
224542
|
this._superiorSigns = []; //上级医生签名
|
|
224392
224543
|
|
|
224544
|
+
this._isEnabledGlobalColor = false;
|
|
224393
224545
|
this._hoEditorFactoryId = id;
|
|
224394
224546
|
}
|
|
224395
224547
|
/**
|
|
@@ -225048,13 +225200,13 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
225048
225200
|
}
|
|
225049
225201
|
}
|
|
225050
225202
|
}, {
|
|
225051
|
-
key: "
|
|
225203
|
+
key: "isRotate",
|
|
225052
225204
|
get: function get() {
|
|
225053
|
-
return this.
|
|
225205
|
+
return this._isRotate;
|
|
225054
225206
|
},
|
|
225055
225207
|
set: function set(value) {
|
|
225056
|
-
if (this.
|
|
225057
|
-
this.
|
|
225208
|
+
if (this._isRotate !== value) {
|
|
225209
|
+
this._isRotate = value;
|
|
225058
225210
|
}
|
|
225059
225211
|
}
|
|
225060
225212
|
}, {
|
|
@@ -225087,6 +225239,16 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
225087
225239
|
this._printBlack = value;
|
|
225088
225240
|
}
|
|
225089
225241
|
}
|
|
225242
|
+
}, {
|
|
225243
|
+
key: "isEnabledGlobalColor",
|
|
225244
|
+
get: function get() {
|
|
225245
|
+
return this._isEnabledGlobalColor;
|
|
225246
|
+
},
|
|
225247
|
+
set: function set(value) {
|
|
225248
|
+
if (this._isEnabledGlobalColor !== value) {
|
|
225249
|
+
this._isEnabledGlobalColor = value;
|
|
225250
|
+
}
|
|
225251
|
+
}
|
|
225090
225252
|
}, {
|
|
225091
225253
|
key: "clear",
|
|
225092
225254
|
value: function clear() {
|
|
@@ -232610,14 +232772,14 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232610
232772
|
_this.defaultDocProperty = {
|
|
232611
232773
|
version: version,
|
|
232612
232774
|
type: 0,
|
|
232613
|
-
title:
|
|
232614
|
-
docID:
|
|
232615
|
-
patientID:
|
|
232616
|
-
patientName:
|
|
232617
|
-
lastEditTime:
|
|
232618
|
-
lastEditorID:
|
|
232619
|
-
lastEditorName:
|
|
232620
|
-
currentIP:
|
|
232775
|
+
title: '',
|
|
232776
|
+
docID: '',
|
|
232777
|
+
patientID: '',
|
|
232778
|
+
patientName: '',
|
|
232779
|
+
lastEditTime: '',
|
|
232780
|
+
lastEditorID: '',
|
|
232781
|
+
lastEditorName: '',
|
|
232782
|
+
currentIP: ''
|
|
232621
232783
|
};
|
|
232622
232784
|
_this.contentIsModify = {
|
|
232623
232785
|
isModify: false
|
|
@@ -232633,7 +232795,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232633
232795
|
}, {
|
|
232634
232796
|
key: "contentIsModifyChange",
|
|
232635
232797
|
value: function contentIsModifyChange(value) {
|
|
232636
|
-
this.$emit(
|
|
232798
|
+
this.$emit('contentIsModify', this.contentIsModify);
|
|
232637
232799
|
}
|
|
232638
232800
|
}, {
|
|
232639
232801
|
key: "editJsonChange",
|
|
@@ -232650,12 +232812,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232650
232812
|
}, {
|
|
232651
232813
|
key: "textStyleChange",
|
|
232652
232814
|
value: function textStyleChange(val) {
|
|
232653
|
-
this.$emit(
|
|
232815
|
+
this.$emit('textStyleChange', val);
|
|
232654
232816
|
}
|
|
232655
232817
|
}, {
|
|
232656
232818
|
key: "modalStatusChange",
|
|
232657
232819
|
value: function modalStatusChange(newStr) {
|
|
232658
|
-
if (newStr[0] !==
|
|
232820
|
+
if (newStr[0] !== 'find') {
|
|
232659
232821
|
this.setControlProperty(newStr[0], newStr[1], newStr[2]);
|
|
232660
232822
|
} else {
|
|
232661
232823
|
this.controlFindType = true;
|
|
@@ -232664,20 +232826,20 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232664
232826
|
}, {
|
|
232665
232827
|
key: "controlTypeChange",
|
|
232666
232828
|
value: function controlTypeChange(newValue, oldValue) {
|
|
232667
|
-
if (newValue ===
|
|
232668
|
-
this.$emit(
|
|
232829
|
+
if (newValue === '' && ['text', 'date', 'comment'].includes(oldValue)) {
|
|
232830
|
+
this.$emit('closeTextModal');
|
|
232669
232831
|
this.customPropertyValue = {};
|
|
232670
232832
|
}
|
|
232671
232833
|
|
|
232672
232834
|
if (['text', 'date'].includes(newValue)) {
|
|
232673
232835
|
if ((0,type/* isObject */.Kn)(this.customPropertyValue)) {
|
|
232674
|
-
this.$emit(
|
|
232836
|
+
this.$emit('openTextModal', _objectSpread2({}, this.customPropertyValue));
|
|
232675
232837
|
}
|
|
232676
232838
|
} else if (['comment'].includes(newValue)) {
|
|
232677
232839
|
var _HOEditorFactorys$ins;
|
|
232678
232840
|
|
|
232679
232841
|
var customProperty = (_HOEditorFactorys$ins = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId).vueController.getOnSelectedComment()) === null || _HOEditorFactorys$ins === void 0 ? void 0 : _HOEditorFactorys$ins.customProperty;
|
|
232680
|
-
if (customProperty) this.$emit(
|
|
232842
|
+
if (customProperty) this.$emit('openTextModal', _objectSpread2({}, customProperty));
|
|
232681
232843
|
}
|
|
232682
232844
|
}
|
|
232683
232845
|
}, {
|
|
@@ -232709,14 +232871,15 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232709
232871
|
value: function isFixedPrintToA4Change() {
|
|
232710
232872
|
var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
|
|
232711
232873
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
232712
|
-
|
|
232713
|
-
|
|
232714
|
-
|
|
232715
|
-
|
|
232716
|
-
|
|
232717
|
-
|
|
232718
|
-
|
|
232719
|
-
|
|
232874
|
+
var isFixedPrintToA4 = this.isFixedPrintToA4;
|
|
232875
|
+
|
|
232876
|
+
if (isFixedPrintToA4 === true) {
|
|
232877
|
+
isFixedPrintToA4 = '1';
|
|
232878
|
+
} else if (isFixedPrintToA4 === false) {
|
|
232879
|
+
isFixedPrintToA4 = '';
|
|
232880
|
+
}
|
|
232881
|
+
|
|
232882
|
+
hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = isFixedPrintToA4);
|
|
232720
232883
|
} // 监听默认打印纸张设置变化
|
|
232721
232884
|
|
|
232722
232885
|
}, {
|
|
@@ -232760,6 +232923,13 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232760
232923
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
232761
232924
|
hoEditorFactory && (hoEditorFactory.printBlack = this.printBlack);
|
|
232762
232925
|
}
|
|
232926
|
+
}, {
|
|
232927
|
+
key: "isEnabledGlobalColorChange",
|
|
232928
|
+
value: function isEnabledGlobalColorChange() {
|
|
232929
|
+
var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
|
|
232930
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
232931
|
+
hoEditorFactory && (hoEditorFactory.isEnabledGlobalColor = this.isEnabledGlobalColor);
|
|
232932
|
+
}
|
|
232763
232933
|
}, {
|
|
232764
232934
|
key: "created",
|
|
232765
232935
|
value: function created() {
|
|
@@ -232790,7 +232960,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232790
232960
|
}); // 初始化所有文档
|
|
232791
232961
|
|
|
232792
232962
|
this.docList.forEach(function () {
|
|
232793
|
-
var id = (0,util/* generateID */.y)(
|
|
232963
|
+
var id = (0,util/* generateID */.y)('HO');
|
|
232794
232964
|
var hoEditor = new HOEditorFactory(id);
|
|
232795
232965
|
|
|
232796
232966
|
_this3.hoEditorFactoryIdList.push(id);
|
|
@@ -232799,11 +232969,18 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232799
232969
|
hoEditor.superiorSigns = (0,toConsumableArray/* default */.Z)(_this3.superiorSigns);
|
|
232800
232970
|
}
|
|
232801
232971
|
|
|
232802
|
-
|
|
232803
|
-
|
|
232972
|
+
if (_this3.isFixedPrintToA4 === true) {
|
|
232973
|
+
hoEditor.isFixedPrintToA4 = '1';
|
|
232974
|
+
} else if (_this3.isFixedPrintToA4 === false) {
|
|
232975
|
+
hoEditor.isFixedPrintToA4 = '';
|
|
232976
|
+
} else {
|
|
232977
|
+
hoEditor.isFixedPrintToA4 = _this3.isFixedPrintToA4;
|
|
232978
|
+
}
|
|
232979
|
+
|
|
232804
232980
|
hoEditor.isUseImagePrint = _this3.isUseImagePrint;
|
|
232805
232981
|
hoEditor.isUseForm = _this3.isUseForm;
|
|
232806
232982
|
hoEditor.printBlack = _this3.printBlack;
|
|
232983
|
+
hoEditor.isEnabledGlobalColor = _this3.isEnabledGlobalColor;
|
|
232807
232984
|
hoEditor.contentIsModify = _this3.contentIsModify;
|
|
232808
232985
|
hoEditor.isCanEditHeadFoot = _this3.isCanEditHeadFoot;
|
|
232809
232986
|
hoEditor.docTree.docProperty = _this3.defaultDocProperty;
|
|
@@ -232834,17 +233011,17 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232834
233011
|
|
|
232835
233012
|
var getLabelNode = function getLabelNode() {
|
|
232836
233013
|
var labelNode = [];
|
|
232837
|
-
var isIncludes =
|
|
233014
|
+
var isIncludes = '';
|
|
232838
233015
|
var hoEditor = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(_this4.activeDocId);
|
|
232839
233016
|
var currentDomRange = hoEditor.vueController.getDomRange();
|
|
232840
233017
|
|
|
232841
233018
|
if (currentDomRange !== null && currentDomRange !== void 0 && currentDomRange.isEmpty) {
|
|
232842
233019
|
if (nodeInfoes.node() instanceof LabelNode/* LabelNode */.P) {
|
|
232843
233020
|
labelNode.push(nodeInfoes.node());
|
|
232844
|
-
isIncludes =
|
|
233021
|
+
isIncludes = 'toText';
|
|
232845
233022
|
}
|
|
232846
233023
|
} else {
|
|
232847
|
-
isIncludes =
|
|
233024
|
+
isIncludes = 'toLabel';
|
|
232848
233025
|
var startPath = currentDomRange.startPath;
|
|
232849
233026
|
var endPath = currentDomRange.endPath;
|
|
232850
233027
|
var selectNodes = DomRange/* DomRange.getSelectDomNodes */.a.getSelectDomNodes(_this4.activeDocId, startPath, endPath, true)[0];
|
|
@@ -232852,7 +233029,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232852
233029
|
if (selectNodes.length > 0) {
|
|
232853
233030
|
selectNodes.forEach(function (v) {
|
|
232854
233031
|
if (v instanceof LabelNode/* LabelNode */.P) {
|
|
232855
|
-
isIncludes =
|
|
233032
|
+
isIncludes = 'toText';
|
|
232856
233033
|
labelNode.push(v);
|
|
232857
233034
|
}
|
|
232858
233035
|
});
|
|
@@ -232891,7 +233068,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232891
233068
|
};
|
|
232892
233069
|
}
|
|
232893
233070
|
|
|
232894
|
-
this.$emit(
|
|
233071
|
+
this.$emit('rightClickEvent', nodeInfoes);
|
|
232895
233072
|
}
|
|
232896
233073
|
/**
|
|
232897
233074
|
* 初始化事件
|
|
@@ -232933,7 +233110,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232933
233110
|
}, {
|
|
232934
233111
|
key: "insertComments",
|
|
232935
233112
|
value: function insertComments(content) {
|
|
232936
|
-
this.$emit(
|
|
233113
|
+
this.$emit('insertComments', content);
|
|
232937
233114
|
}
|
|
232938
233115
|
/**
|
|
232939
233116
|
* 双击事件
|
|
@@ -232942,7 +233119,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232942
233119
|
}, {
|
|
232943
233120
|
key: "dblNodeClick",
|
|
232944
233121
|
value: function dblNodeClick(node) {
|
|
232945
|
-
this.$emit(
|
|
233122
|
+
this.$emit('dblClickEvent', node);
|
|
232946
233123
|
} // 设置字体
|
|
232947
233124
|
|
|
232948
233125
|
}, {
|
|
@@ -232964,7 +233141,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232964
233141
|
this.activeDocId = activeDocId;
|
|
232965
233142
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId);
|
|
232966
233143
|
hoEditorFactory.hoLocalStorage.initHoWebSql();
|
|
232967
|
-
this.$emit(
|
|
233144
|
+
this.$emit('docReady', {
|
|
232968
233145
|
vueController: hoEditorFactory.vueController,
|
|
232969
233146
|
baseController: hoEditorFactory.baseController,
|
|
232970
233147
|
domController: hoEditorFactory.domController,
|
|
@@ -232995,7 +233172,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232995
233172
|
var property = _objectSpread2({}, pageProperty); // 字体
|
|
232996
233173
|
|
|
232997
233174
|
|
|
232998
|
-
property.fontFormat = property.fontFormat ? (_property$fontFormat = property.fontFormat) === null || _property$fontFormat === void 0 ? void 0 : _property$fontFormat.match(/[\u4e00-\u9fa5]/g).join(
|
|
233175
|
+
property.fontFormat = property.fontFormat ? (_property$fontFormat = property.fontFormat) === null || _property$fontFormat === void 0 ? void 0 : _property$fontFormat.match(/[\u4e00-\u9fa5]/g).join('') : '宋体'; // 字号
|
|
232999
233176
|
|
|
233000
233177
|
if (isNaN(Number(property.fontSize))) {
|
|
233001
233178
|
json_font_namespaceObject.CH.forEach(function (v) {
|
|
@@ -233022,12 +233199,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
233022
233199
|
|
|
233023
233200
|
if (pageProperty.elementBackColor) {
|
|
233024
233201
|
hoEditorFactory.vueController.setReviewLevelColor({
|
|
233025
|
-
reviewLev1Color:
|
|
233026
|
-
reviewLev2Color:
|
|
233027
|
-
reviewLev3Color:
|
|
233028
|
-
fieldColor:
|
|
233029
|
-
dateTimeColor:
|
|
233030
|
-
downListColor:
|
|
233202
|
+
reviewLev1Color: '#F19191',
|
|
233203
|
+
reviewLev2Color: '#FFFFFF',
|
|
233204
|
+
reviewLev3Color: '#FFFFFF',
|
|
233205
|
+
fieldColor: '#DFFFFF',
|
|
233206
|
+
dateTimeColor: '#FBFAD0',
|
|
233207
|
+
downListColor: '#D2ECB1'
|
|
233031
233208
|
});
|
|
233032
233209
|
} // 复制粘贴基准值
|
|
233033
233210
|
|
|
@@ -233098,7 +233275,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
233098
233275
|
}, {
|
|
233099
233276
|
key: "closeControlModal",
|
|
233100
233277
|
value: function closeControlModal() {
|
|
233101
|
-
this.setControlProperty(
|
|
233278
|
+
this.setControlProperty('', 'add', '');
|
|
233102
233279
|
}
|
|
233103
233280
|
/**
|
|
233104
233281
|
* 非文档区域右键事件
|
|
@@ -233107,7 +233284,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
233107
233284
|
}, {
|
|
233108
233285
|
key: "blankAreaRightClick",
|
|
233109
233286
|
value: function blankAreaRightClick(e) {
|
|
233110
|
-
if (e.target instanceof HTMLDivElement && e.target.className ===
|
|
233287
|
+
if (e.target instanceof HTMLDivElement && e.target.className === 'editor') {}
|
|
233111
233288
|
}
|
|
233112
233289
|
}]);
|
|
233113
233290
|
|
|
@@ -233145,13 +233322,9 @@ __decorate([Prop({
|
|
|
233145
233322
|
})], HoDocs.prototype, "isUseTipText", void 0);
|
|
233146
233323
|
|
|
233147
233324
|
__decorate([Prop({
|
|
233148
|
-
default:
|
|
233325
|
+
default: ''
|
|
233149
233326
|
})], HoDocs.prototype, "isFixedPrintToA4", void 0);
|
|
233150
233327
|
|
|
233151
|
-
__decorate([Prop({
|
|
233152
|
-
default: false
|
|
233153
|
-
})], HoDocs.prototype, "isFixedPrintToA4T", void 0);
|
|
233154
|
-
|
|
233155
233328
|
__decorate([Prop({
|
|
233156
233329
|
default: true
|
|
233157
233330
|
})], HoDocs.prototype, "isUseImagePrint", void 0);
|
|
@@ -233164,58 +233337,60 @@ __decorate([Prop({
|
|
|
233164
233337
|
default: true
|
|
233165
233338
|
})], HoDocs.prototype, "printBlack", void 0);
|
|
233166
233339
|
|
|
233167
|
-
__decorate([
|
|
233340
|
+
__decorate([Prop({
|
|
233341
|
+
default: false
|
|
233342
|
+
})], HoDocs.prototype, "isEnabledGlobalColor", void 0);
|
|
233343
|
+
|
|
233344
|
+
__decorate([Watch('contentIsModify', {
|
|
233168
233345
|
deep: true
|
|
233169
233346
|
})], HoDocs.prototype, "contentIsModifyChange", null);
|
|
233170
233347
|
|
|
233171
|
-
__decorate([Watch(
|
|
233348
|
+
__decorate([Watch('editJson')], HoDocs.prototype, "editJsonChange", null);
|
|
233172
233349
|
|
|
233173
233350
|
__decorate([Provide()], HoDocs.prototype, "getCustomProperty", null);
|
|
233174
233351
|
|
|
233175
|
-
__decorate([Watch(
|
|
233352
|
+
__decorate([Watch('textStyle', {
|
|
233176
233353
|
deep: true
|
|
233177
233354
|
})], HoDocs.prototype, "textStyleChange", null);
|
|
233178
233355
|
|
|
233179
|
-
__decorate([Watch(
|
|
233356
|
+
__decorate([Watch('modalStatus', {
|
|
233180
233357
|
deep: true
|
|
233181
233358
|
})], HoDocs.prototype, "modalStatusChange", null);
|
|
233182
233359
|
|
|
233183
|
-
__decorate([Watch(
|
|
233360
|
+
__decorate([Watch('controlType', {
|
|
233184
233361
|
deep: true
|
|
233185
233362
|
})], HoDocs.prototype, "controlTypeChange", null);
|
|
233186
233363
|
|
|
233187
|
-
__decorate([Watch(
|
|
233364
|
+
__decorate([Watch('pageProperty', {
|
|
233188
233365
|
deep: true
|
|
233189
233366
|
})], HoDocs.prototype, "pagePropertyChange", null);
|
|
233190
233367
|
|
|
233191
|
-
__decorate([Watch(
|
|
233368
|
+
__decorate([Watch('docProperty', {
|
|
233192
233369
|
deep: true
|
|
233193
233370
|
})], HoDocs.prototype, "docPropertyChange", null);
|
|
233194
233371
|
|
|
233195
|
-
__decorate([Watch(
|
|
233372
|
+
__decorate([Watch('isFixedPrintToA4', {
|
|
233196
233373
|
deep: true
|
|
233197
233374
|
})], HoDocs.prototype, "isFixedPrintToA4Change", null);
|
|
233198
233375
|
|
|
233199
|
-
__decorate([Watch(
|
|
233200
|
-
deep: true
|
|
233201
|
-
})], HoDocs.prototype, "isFixedPrintToA4TChange", null);
|
|
233202
|
-
|
|
233203
|
-
__decorate([Watch("isUseImagePrint", {
|
|
233376
|
+
__decorate([Watch('isUseImagePrint', {
|
|
233204
233377
|
deep: true
|
|
233205
233378
|
})], HoDocs.prototype, "isUseImagePrintChange", null);
|
|
233206
233379
|
|
|
233207
|
-
__decorate([Watch(
|
|
233380
|
+
__decorate([Watch('isUseForm', {
|
|
233208
233381
|
deep: true
|
|
233209
233382
|
})], HoDocs.prototype, "isUseFormChange", null);
|
|
233210
233383
|
|
|
233211
|
-
__decorate([Watch(
|
|
233384
|
+
__decorate([Watch('superiorSigns')], HoDocs.prototype, "superiorSignsChange", null);
|
|
233212
233385
|
|
|
233213
|
-
__decorate([Watch(
|
|
233386
|
+
__decorate([Watch('isCanEditHeadFoot')], HoDocs.prototype, "isCanEditHeadFootChange", null);
|
|
233214
233387
|
|
|
233215
|
-
__decorate([Watch(
|
|
233388
|
+
__decorate([Watch('printBlack')], HoDocs.prototype, "printBlackChange", null);
|
|
233389
|
+
|
|
233390
|
+
__decorate([Watch('isEnabledGlobalColor')], HoDocs.prototype, "isEnabledGlobalColorChange", null);
|
|
233216
233391
|
|
|
233217
233392
|
HoDocs = __decorate([vue_class_component_esm({
|
|
233218
|
-
name:
|
|
233393
|
+
name: 'HoDocs',
|
|
233219
233394
|
components: {
|
|
233220
233395
|
HoDoc: components_HoDoc,
|
|
233221
233396
|
HoFooter: components_HoFooter,
|
|
@@ -239045,9 +239220,9 @@ HoRightMenu = __decorate([vue_class_component_esm({
|
|
|
239045
239220
|
}
|
|
239046
239221
|
})], HoRightMenu);
|
|
239047
239222
|
/* harmony default export */ var toolbar_HoRightMenu = (HoRightMenu);
|
|
239048
|
-
;// 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=
|
|
239049
|
-
var
|
|
239050
|
-
var
|
|
239223
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/view/view.vue?vue&type=template&id=4a7f3e3a&
|
|
239224
|
+
var viewvue_type_template_id_4a7f3e3a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.hoEditorFactoryIdList.length > 0)?_c('div',{staticClass:"ho-docs",staticStyle:{"width":"1px","height":"1px"}},[_c('section',{staticClass:"ho-editor-list editor-no-footer"},[_vm._l((_vm.hoEditorFactoryIdList),function(hoEditorId,index){return [_c('PrintDoc',{key:index,attrs:{"docIndex":index,"hoEditorId":hoEditorId,"hoEditorFactoryIdList":_vm.hoEditorFactoryIdList,"activeDocId":_vm.activeDocId},on:{"setActiveDocIndex":_vm.setActiveDocIndex,"drawPagesLengthChange":_vm.drawPagesLengthChange}})]})],2)]):_vm._e()}
|
|
239225
|
+
var viewvue_type_template_id_4a7f3e3a_staticRenderFns = []
|
|
239051
239226
|
|
|
239052
239227
|
|
|
239053
239228
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/view/viewDoc.vue?vue&type=template&id=717b1315&
|
|
@@ -239490,8 +239665,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
239490
239665
|
key: "isFixedPrintToA4Change",
|
|
239491
239666
|
value: function isFixedPrintToA4Change() {
|
|
239492
239667
|
var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
|
|
239493
|
-
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
239494
|
-
hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
|
|
239668
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId); // hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
|
|
239495
239669
|
} // 打印时彩色字体转成黑色 printBlack
|
|
239496
239670
|
|
|
239497
239671
|
}, {
|
|
@@ -239569,7 +239743,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
239569
239743
|
__decorate([Prop()], PrintDocs.prototype, "pageProperty", void 0);
|
|
239570
239744
|
|
|
239571
239745
|
__decorate([Prop({
|
|
239572
|
-
default:
|
|
239746
|
+
default: ''
|
|
239573
239747
|
})], PrintDocs.prototype, "isFixedPrintToA4", void 0);
|
|
239574
239748
|
|
|
239575
239749
|
__decorate([Prop({
|
|
@@ -239611,8 +239785,8 @@ PrintDocs = __decorate([vue_class_component_esm({
|
|
|
239611
239785
|
|
|
239612
239786
|
var view_component = normalizeComponent(
|
|
239613
239787
|
view_viewvue_type_script_lang_ts_,
|
|
239614
|
-
|
|
239615
|
-
|
|
239788
|
+
viewvue_type_template_id_4a7f3e3a_render,
|
|
239789
|
+
viewvue_type_template_id_4a7f3e3a_staticRenderFns,
|
|
239616
239790
|
false,
|
|
239617
239791
|
null,
|
|
239618
239792
|
null,
|