hoeditor-web 2.0.59 → 2.0.62
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 +568 -292
- package/lib/hoeditor.css +1 -0
- package/lib/hoeditor.umd.js +568 -292
- package/lib/hoeditor.umd.min.js +23 -23
- package/package.json +1 -1
package/lib/hoeditor.common.js
CHANGED
|
@@ -11186,9 +11186,10 @@ var PrintStatus = /*#__PURE__*/function () {
|
|
|
11186
11186
|
|
|
11187
11187
|
pages.sort(function (a, b) {
|
|
11188
11188
|
return a - b;
|
|
11189
|
-
});
|
|
11189
|
+
}); // console.log(pages);
|
|
11190
11190
|
// 去重
|
|
11191
|
-
|
|
11191
|
+
|
|
11192
|
+
this._printPages = (0,toConsumableArray/* default */.Z)(new Set(pages)); // console.log('页码范围:', this._printPages);
|
|
11192
11193
|
} catch (error) {
|
|
11193
11194
|
Exception/* Exception.printCallStack */.P.printCallStack();
|
|
11194
11195
|
}
|
|
@@ -11621,7 +11622,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11621
11622
|
|
|
11622
11623
|
if (index === hoEditorFactory.startPageNum && positionY) {
|
|
11623
11624
|
dShape = new createjs.Shape();
|
|
11624
|
-
dShape.graphics.beginFill('#
|
|
11625
|
+
dShape.graphics.beginFill('#FFFFFF').rect(0, 0, width, positionY).endFill();
|
|
11625
11626
|
cpage.drawDocContainer.addChild(dShape);
|
|
11626
11627
|
cpage.drawFooter.alpha = 0; // 上一页还有空余时续打起始页隐藏页脚
|
|
11627
11628
|
} // 光标处续打
|
|
@@ -11634,7 +11635,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11634
11635
|
if (index === posIndex && posY) {
|
|
11635
11636
|
_dShape = new createjs.Shape();
|
|
11636
11637
|
|
|
11637
|
-
_dShape.graphics.beginFill('#
|
|
11638
|
+
_dShape.graphics.beginFill('#FFFFFF').rect(0, 0, width, posY).endFill();
|
|
11638
11639
|
|
|
11639
11640
|
cpage.drawDocContainer.addChild(_dShape);
|
|
11640
11641
|
cpage.drawFooter.alpha = 0;
|
|
@@ -11651,7 +11652,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11651
11652
|
y: 0
|
|
11652
11653
|
};
|
|
11653
11654
|
|
|
11654
|
-
if (hoEditorFactory.isFixedPrintToA4 && format) {
|
|
11655
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1' && format) {
|
|
11655
11656
|
if (orientation == 'l') {
|
|
11656
11657
|
svg2pdfOptions.x = format[0] - width;
|
|
11657
11658
|
svg2pdfOptions.y = (format[1] - height) / 2;
|
|
@@ -11669,7 +11670,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11669
11670
|
ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
|
|
11670
11671
|
window.printBlack = hoEditorFactory.printBlack;
|
|
11671
11672
|
|
|
11672
|
-
if (hoEditorFactory.
|
|
11673
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && format) {
|
|
11673
11674
|
// 避免切换纸张的打印方式 绘制只处理竖向情况
|
|
11674
11675
|
if (orientation === 'p' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5' && index == 0) {
|
|
11675
11676
|
ctx.translate(0, 1122 / 2); // 由于旋转是默认以左上角为中心 所以需要先移动位置 改变起始点
|
|
@@ -11811,7 +11812,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11811
11812
|
return link.remove();
|
|
11812
11813
|
}, 100);
|
|
11813
11814
|
} else {
|
|
11814
|
-
if (height <= 560 &&
|
|
11815
|
+
if (height <= 560 && hoEditorFactory.isFixedPrintToA4 !== '2') {
|
|
11815
11816
|
PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
|
|
11816
11817
|
}
|
|
11817
11818
|
|
|
@@ -12108,7 +12109,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
12108
12109
|
key: "printAllNew",
|
|
12109
12110
|
value: function () {
|
|
12110
12111
|
var _printAllNew = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee5(hoEditorFactoryID, reslove, PDF, position) {
|
|
12111
|
-
var hoEditorFactory, a4Size, svgBox, last,
|
|
12112
|
+
var hoEditorFactory, a4Size, svgBox, last, widthPixes, heightPixes, orientation, formats, format, svg2pdfOptions, _iterator4, _step4, _cpage$drawDomLevel12, index, cpage, _cpage$drawDomLevel9, _cpage$drawDomLevel9$, ctx, _cpage$drawDomLevel10, _cpage$drawDomLevel11, _ctx7, _ctx6, lastPos;
|
|
12112
12113
|
|
|
12113
12114
|
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee5$(_context6) {
|
|
12114
12115
|
while (1) {
|
|
@@ -12124,34 +12125,53 @@ var Print = /*#__PURE__*/function () {
|
|
|
12124
12125
|
svgBox = document.createElement('div');
|
|
12125
12126
|
svgBox.className = 'ho-print-svg-box';
|
|
12126
12127
|
last = -1;
|
|
12128
|
+
widthPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.widthMm, true);
|
|
12129
|
+
heightPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.heightMm, true);
|
|
12130
|
+
orientation = widthPixes > heightPixes ? 'l' : 'p';
|
|
12131
|
+
formats = [widthPixes, heightPixes];
|
|
12132
|
+
format = a4Size[orientation];
|
|
12133
|
+
svg2pdfOptions = {
|
|
12134
|
+
x: 0,
|
|
12135
|
+
y: 0
|
|
12136
|
+
};
|
|
12137
|
+
|
|
12138
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1' && format) {
|
|
12139
|
+
if (orientation == 'l') {
|
|
12140
|
+
svg2pdfOptions.x = format[0] - widthPixes;
|
|
12141
|
+
svg2pdfOptions.y = (format[1] - heightPixes) / 2;
|
|
12142
|
+
} else {
|
|
12143
|
+
svg2pdfOptions.x = (format[0] - widthPixes) / 2;
|
|
12144
|
+
}
|
|
12145
|
+
}
|
|
12146
|
+
|
|
12127
12147
|
_iterator4 = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.printStatus.printProcess());
|
|
12128
|
-
_context6.prev =
|
|
12148
|
+
_context6.prev = 15;
|
|
12129
12149
|
|
|
12130
12150
|
_iterator4.s();
|
|
12131
12151
|
|
|
12132
|
-
case
|
|
12152
|
+
case 17:
|
|
12133
12153
|
if ((_step4 = _iterator4.n()).done) {
|
|
12134
|
-
_context6.next =
|
|
12154
|
+
_context6.next = 50;
|
|
12135
12155
|
break;
|
|
12136
12156
|
}
|
|
12137
12157
|
|
|
12138
12158
|
index = _step4.value;
|
|
12139
12159
|
|
|
12140
12160
|
if (!(index == -1)) {
|
|
12141
|
-
_context6.next =
|
|
12161
|
+
_context6.next = 23;
|
|
12142
12162
|
break;
|
|
12143
12163
|
}
|
|
12144
12164
|
|
|
12145
|
-
_context6.next =
|
|
12165
|
+
_context6.next = 22;
|
|
12146
12166
|
return message_box_default().confirm('请进行翻页', '打印提示', {
|
|
12147
12167
|
confirmButtonText: '确定',
|
|
12148
12168
|
type: 'info'
|
|
12149
12169
|
});
|
|
12150
12170
|
|
|
12151
|
-
case
|
|
12152
|
-
return _context6.abrupt("continue",
|
|
12171
|
+
case 22:
|
|
12172
|
+
return _context6.abrupt("continue", 48);
|
|
12153
12173
|
|
|
12154
|
-
case
|
|
12174
|
+
case 23:
|
|
12155
12175
|
last = index;
|
|
12156
12176
|
cpage = hoEditorFactory.drawTree.drawPages[index];
|
|
12157
12177
|
|
|
@@ -12166,52 +12186,44 @@ var Print = /*#__PURE__*/function () {
|
|
|
12166
12186
|
}
|
|
12167
12187
|
|
|
12168
12188
|
if (!(index === hoEditorFactory.drawTree.drawPages.length - 1 && cpage.drawMainDoc.children.length === 2 && !(cpage.drawMainDoc.children[0] instanceof DrawPageTable/* DrawPageTable */.ox) && cpage.drawMainDoc.children[1] && cpage.drawMainDoc.children[1].drawItems.length === 0)) {
|
|
12169
|
-
_context6.next =
|
|
12189
|
+
_context6.next = 29;
|
|
12170
12190
|
break;
|
|
12171
12191
|
}
|
|
12172
12192
|
|
|
12173
|
-
return _context6.abrupt("break",
|
|
12174
|
-
|
|
12175
|
-
case 22:
|
|
12176
|
-
widthPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.widthMm, true);
|
|
12177
|
-
heightPixes = hoEditorFactory.unitConvert.mmConversionPx(hoEditorFactory.pageProperty.heightMm, true);
|
|
12178
|
-
orientation = widthPixes > heightPixes ? 'l' : 'p';
|
|
12179
|
-
formats = [widthPixes, heightPixes];
|
|
12180
|
-
format = a4Size[orientation];
|
|
12181
|
-
svg2pdfOptions = {
|
|
12182
|
-
x: 0,
|
|
12183
|
-
y: 0
|
|
12184
|
-
};
|
|
12185
|
-
|
|
12186
|
-
if (hoEditorFactory.isFixedPrintToA4 && format) {
|
|
12187
|
-
if (orientation == 'l') {
|
|
12188
|
-
svg2pdfOptions.x = format[0] - widthPixes;
|
|
12189
|
-
svg2pdfOptions.y = (format[1] - heightPixes) / 2;
|
|
12190
|
-
} else {
|
|
12191
|
-
svg2pdfOptions.x = (format[0] - widthPixes) / 2;
|
|
12192
|
-
}
|
|
12193
|
-
}
|
|
12193
|
+
return _context6.abrupt("break", 50);
|
|
12194
12194
|
|
|
12195
|
+
case 29:
|
|
12195
12196
|
if (!hoEditorFactory.isUseImagePrint) {
|
|
12196
|
-
_context6.next =
|
|
12197
|
+
_context6.next = 41;
|
|
12197
12198
|
break;
|
|
12198
12199
|
}
|
|
12199
12200
|
|
|
12200
|
-
if (formats.length == 2 &&
|
|
12201
|
+
if (formats.length == 2 && hoEditorFactory.isFixedPrintToA4 == '1') {
|
|
12201
12202
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage(formats, orientation);
|
|
12203
|
+
} else if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
12204
|
+
PDF === null || PDF === void 0 ? void 0 : PDF.addPage([793, 1122], 'p');
|
|
12202
12205
|
} else {
|
|
12203
12206
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
|
|
12204
12207
|
}
|
|
12205
12208
|
|
|
12206
12209
|
ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
|
|
12210
|
+
|
|
12211
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && index == 0 && hoEditorFactory.isRotate) {
|
|
12212
|
+
// 复位 需要先按移动过的位置恢复旋转前的角度,然后才能移动位置
|
|
12213
|
+
ctx.rotate(90 * Math.PI / 180);
|
|
12214
|
+
ctx.translate(0, -1122 / 2);
|
|
12215
|
+
hoEditorFactory.isRotate = false;
|
|
12216
|
+
}
|
|
12217
|
+
|
|
12207
12218
|
window.printBlack = hoEditorFactory.printBlack;
|
|
12208
12219
|
|
|
12209
|
-
if (hoEditorFactory.
|
|
12220
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && index == 0 && !hoEditorFactory.isRotate && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
12210
12221
|
// 避免切换纸张的打印方式 绘制只处理竖向情况
|
|
12211
12222
|
if (orientation === 'p') {
|
|
12212
|
-
|
|
12213
|
-
|
|
12214
|
-
ctx.rotate(270 * Math.PI / 180);
|
|
12223
|
+
// 旋转是默认以左上角为中心 需要先移动位置 再进行旋转
|
|
12224
|
+
ctx.translate(0, 1122 / 2);
|
|
12225
|
+
ctx.rotate(270 * Math.PI / 180);
|
|
12226
|
+
hoEditorFactory.isRotate = true;
|
|
12215
12227
|
}
|
|
12216
12228
|
}
|
|
12217
12229
|
|
|
@@ -12219,10 +12231,10 @@ var Print = /*#__PURE__*/function () {
|
|
|
12219
12231
|
ctx.posY = svg2pdfOptions.y;
|
|
12220
12232
|
ctx && ((_cpage$drawDomLevel9 = cpage.drawDomLevel) === null || _cpage$drawDomLevel9 === void 0 ? void 0 : (_cpage$drawDomLevel9$ = _cpage$drawDomLevel9.stage) === null || _cpage$drawDomLevel9$ === void 0 ? void 0 : _cpage$drawDomLevel9$.draw(ctx));
|
|
12221
12233
|
ctx = null;
|
|
12222
|
-
_context6.next =
|
|
12234
|
+
_context6.next = 47;
|
|
12223
12235
|
break;
|
|
12224
12236
|
|
|
12225
|
-
case
|
|
12237
|
+
case 41:
|
|
12226
12238
|
_ctx6 = new canvas2svg({
|
|
12227
12239
|
width: widthPixes,
|
|
12228
12240
|
height: orientation === 'l' ? heightPixes - 1 : heightPixes,
|
|
@@ -12236,37 +12248,37 @@ var Print = /*#__PURE__*/function () {
|
|
|
12236
12248
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage(format, orientation);
|
|
12237
12249
|
}
|
|
12238
12250
|
|
|
12239
|
-
_context6.next =
|
|
12251
|
+
_context6.next = 46;
|
|
12240
12252
|
return svg2pdf((_ctx7 = _ctx6) === null || _ctx7 === void 0 ? void 0 : _ctx7.getSvg(), PDF, svg2pdfOptions);
|
|
12241
12253
|
|
|
12242
|
-
case
|
|
12254
|
+
case 46:
|
|
12243
12255
|
_ctx6 = null;
|
|
12244
12256
|
|
|
12245
|
-
case
|
|
12257
|
+
case 47:
|
|
12246
12258
|
index > 0 && ((_cpage$drawDomLevel12 = cpage.drawDomLevel) === null || _cpage$drawDomLevel12 === void 0 ? void 0 : _cpage$drawDomLevel12.clearStage());
|
|
12247
12259
|
|
|
12248
|
-
case
|
|
12249
|
-
_context6.next =
|
|
12260
|
+
case 48:
|
|
12261
|
+
_context6.next = 17;
|
|
12250
12262
|
break;
|
|
12251
12263
|
|
|
12252
|
-
case
|
|
12253
|
-
_context6.next =
|
|
12264
|
+
case 50:
|
|
12265
|
+
_context6.next = 55;
|
|
12254
12266
|
break;
|
|
12255
12267
|
|
|
12256
|
-
case
|
|
12257
|
-
_context6.prev =
|
|
12258
|
-
_context6.t0 = _context6["catch"](
|
|
12268
|
+
case 52:
|
|
12269
|
+
_context6.prev = 52;
|
|
12270
|
+
_context6.t0 = _context6["catch"](15);
|
|
12259
12271
|
|
|
12260
12272
|
_iterator4.e(_context6.t0);
|
|
12261
12273
|
|
|
12262
|
-
case
|
|
12263
|
-
_context6.prev =
|
|
12274
|
+
case 55:
|
|
12275
|
+
_context6.prev = 55;
|
|
12264
12276
|
|
|
12265
12277
|
_iterator4.f();
|
|
12266
12278
|
|
|
12267
|
-
return _context6.finish(
|
|
12279
|
+
return _context6.finish(55);
|
|
12268
12280
|
|
|
12269
|
-
case
|
|
12281
|
+
case 58:
|
|
12270
12282
|
if (hoEditorFactory.printStatus.printRange !== PrintRange.prSelected) {
|
|
12271
12283
|
hoEditorFactory.printStatus.recordLastPosByPageIndex(last);
|
|
12272
12284
|
}
|
|
@@ -12284,12 +12296,12 @@ var Print = /*#__PURE__*/function () {
|
|
|
12284
12296
|
hoEditorFactory.printStatus.DrawPrintRange().PrintOver();
|
|
12285
12297
|
reslove();
|
|
12286
12298
|
|
|
12287
|
-
case
|
|
12299
|
+
case 62:
|
|
12288
12300
|
case "end":
|
|
12289
12301
|
return _context6.stop();
|
|
12290
12302
|
}
|
|
12291
12303
|
}
|
|
12292
|
-
}, _callee5, null, [[
|
|
12304
|
+
}, _callee5, null, [[15, 52, 55, 58]]);
|
|
12293
12305
|
}));
|
|
12294
12306
|
|
|
12295
12307
|
function printAllNew(_x15, _x16, _x17, _x18) {
|
|
@@ -26241,10 +26253,28 @@ var CellNode = /*#__PURE__*/function (_RectNode) {
|
|
|
26241
26253
|
// return;
|
|
26242
26254
|
// }
|
|
26243
26255
|
// }
|
|
26256
|
+
//const startPath = `${this.getNodePath()}/0`;
|
|
26257
|
+
//const startPath = hoEditorFactory.docTree.curDomRange.startPath;
|
|
26258
|
+
|
|
26259
|
+
|
|
26260
|
+
var endPath = "";
|
|
26261
|
+
var startPath = "";
|
|
26244
26262
|
|
|
26263
|
+
if (this.table.tableProperty.isAutoChangeLine) {
|
|
26264
|
+
var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
26265
|
+
|
|
26266
|
+
if (curDomRange.npEnd.node instanceof _ParagraphNode__WEBPACK_IMPORTED_MODULE_31__/* .ParagraphNode */ .C) {
|
|
26267
|
+
startPath = curDomRange.startPath;
|
|
26268
|
+
endPath = startPath;
|
|
26269
|
+
} else {
|
|
26270
|
+
startPath = curDomRange.npEnd.node.prevSibling().getNodePath();
|
|
26271
|
+
endPath = hoEditorFactory.docTree.getNodeLastPath(curDomRange.npEnd.node);
|
|
26272
|
+
}
|
|
26273
|
+
} else {
|
|
26274
|
+
startPath = "".concat(this.getNodePath(), "/0");
|
|
26275
|
+
endPath = hoEditorFactory.docTree.getNodeLastPath(this);
|
|
26276
|
+
}
|
|
26245
26277
|
|
|
26246
|
-
var startPath = "".concat(this.getNodePath(), "/0");
|
|
26247
|
-
var endPath = hoEditorFactory.docTree.getNodeLastPath(this);
|
|
26248
26278
|
var aRange = new _DomRange__WEBPACK_IMPORTED_MODULE_24__/* .DomRange */ .a(this._hoEditorFactoryID, startPath, endPath);
|
|
26249
26279
|
hoEditorFactory.docController.deleteRange(aRange, true);
|
|
26250
26280
|
hoEditorFactory.docController.insertPlainTextAfterPath(startPath, value);
|
|
@@ -30602,27 +30632,32 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
|
|
|
30602
30632
|
/* harmony export */ "C": function() { return /* binding */ ParagraphNode; }
|
|
30603
30633
|
/* harmony export */ });
|
|
30604
30634
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37174);
|
|
30605
|
-
/* harmony import */ var
|
|
30606
|
-
/* harmony import */ var
|
|
30607
|
-
/* harmony import */ var
|
|
30608
|
-
/* harmony import */ var
|
|
30609
|
-
/* harmony import */ var
|
|
30610
|
-
/* harmony import */ var
|
|
30611
|
-
/* harmony import */ var
|
|
30612
|
-
/* harmony import */ var
|
|
30613
|
-
/* harmony import */ var
|
|
30614
|
-
/* harmony import */ var
|
|
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
|
|
30635
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58913);
|
|
30636
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35671);
|
|
30637
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(22342);
|
|
30638
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99640);
|
|
30639
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28214);
|
|
30640
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41539);
|
|
30641
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
30642
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(54747);
|
|
30643
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
30644
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(47941);
|
|
30645
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
30646
|
+
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40561);
|
|
30647
|
+
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
30648
|
+
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9653);
|
|
30649
|
+
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
30650
|
+
/* harmony import */ var _BaseNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(50369);
|
|
30651
|
+
/* harmony import */ var _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(53570);
|
|
30652
|
+
/* harmony import */ var _RectNode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(27807);
|
|
30653
|
+
/* harmony import */ var _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(94407);
|
|
30654
|
+
/* harmony import */ var _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(83078);
|
|
30655
|
+
/* harmony import */ var _TableNode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(95883);
|
|
30656
|
+
/* harmony import */ var _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(34565);
|
|
30657
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(41005);
|
|
30658
|
+
/* harmony import */ var _CellNode__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(15798);
|
|
30659
|
+
|
|
30660
|
+
|
|
30626
30661
|
|
|
30627
30662
|
|
|
30628
30663
|
|
|
@@ -30642,31 +30677,58 @@ var PageNumNode = /*#__PURE__*/function (_ControlNode) {
|
|
|
30642
30677
|
|
|
30643
30678
|
|
|
30644
30679
|
var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
30645
|
-
(0,
|
|
30680
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(ParagraphNode, _BaseNode);
|
|
30646
30681
|
|
|
30647
|
-
var _super = (0,
|
|
30682
|
+
var _super = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(ParagraphNode);
|
|
30648
30683
|
|
|
30649
|
-
function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo) {
|
|
30684
|
+
function ParagraphNode(hoEditorFactoryID, rootNodes, parentNode, paraNo, customProperty) {
|
|
30650
30685
|
var _this;
|
|
30651
30686
|
|
|
30652
|
-
(0,
|
|
30687
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(this, ParagraphNode);
|
|
30653
30688
|
|
|
30654
|
-
_this = _super.call(this, hoEditorFactoryID, rootNodes, parentNode,
|
|
30689
|
+
_this = _super.call(this, hoEditorFactoryID, rootNodes, parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType.ntParagraph */ .Jq.ntParagraph);
|
|
30655
30690
|
_this._parentNode = parentNode;
|
|
30656
30691
|
_this._drawLines = new Array();
|
|
30657
30692
|
_this._drawNodes = _this._drawLines;
|
|
30658
30693
|
_this._paraNo = paraNo;
|
|
30659
|
-
_this._styleIndex =
|
|
30694
|
+
_this._styleIndex = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(_this.hoEditorFactoryID).docTree.curStyleIndex;
|
|
30660
30695
|
_this._dTop = 0;
|
|
30661
30696
|
_this._dHeight = 0;
|
|
30662
30697
|
_this._pagePaintStart = null;
|
|
30663
30698
|
_this._printAsSinglePage = false;
|
|
30664
|
-
_this._docId = "";
|
|
30699
|
+
_this._docId = "";
|
|
30700
|
+
_this._customProperty = new Object();
|
|
30701
|
+
|
|
30702
|
+
if (customProperty) {
|
|
30703
|
+
_this.setCustomProperty(customProperty);
|
|
30704
|
+
} // this.node2DrawNode();
|
|
30705
|
+
|
|
30665
30706
|
|
|
30666
30707
|
return _this;
|
|
30667
30708
|
}
|
|
30668
30709
|
|
|
30669
|
-
(0,
|
|
30710
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z)(ParagraphNode, [{
|
|
30711
|
+
key: "setCustomProperty",
|
|
30712
|
+
value: function setCustomProperty(customProperty) {
|
|
30713
|
+
var assignvalue = function assignvalue(target, source) {
|
|
30714
|
+
Object.keys(source).forEach(function (value) {
|
|
30715
|
+
if ((0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(target[value]) == "object") {
|
|
30716
|
+
if (Object.prototype.toString.call(source[value]) === "[object Object]") {
|
|
30717
|
+
assignvalue(target[value], source[value]);
|
|
30718
|
+
} else {
|
|
30719
|
+
if (source[value] !== "" && source[value] !== null) {
|
|
30720
|
+
assignvalue(target[value], eval("(" + source[value] + ")"));
|
|
30721
|
+
}
|
|
30722
|
+
}
|
|
30723
|
+
} else {
|
|
30724
|
+
target[value] = source[value];
|
|
30725
|
+
}
|
|
30726
|
+
});
|
|
30727
|
+
};
|
|
30728
|
+
|
|
30729
|
+
assignvalue(this._customProperty, customProperty);
|
|
30730
|
+
}
|
|
30731
|
+
}, {
|
|
30670
30732
|
key: "paraNo",
|
|
30671
30733
|
get: function get() {
|
|
30672
30734
|
return this._paraNo;
|
|
@@ -30693,6 +30755,16 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30693
30755
|
this._styleIndex = val;
|
|
30694
30756
|
}
|
|
30695
30757
|
}
|
|
30758
|
+
}, {
|
|
30759
|
+
key: "customProperty",
|
|
30760
|
+
get: function get() {
|
|
30761
|
+
return this._customProperty;
|
|
30762
|
+
},
|
|
30763
|
+
set: function set(val) {
|
|
30764
|
+
if (val != this._customProperty) {
|
|
30765
|
+
this._customProperty = val;
|
|
30766
|
+
}
|
|
30767
|
+
}
|
|
30696
30768
|
}, {
|
|
30697
30769
|
key: "combineParagraph",
|
|
30698
30770
|
get: function get() {
|
|
@@ -30714,7 +30786,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30714
30786
|
key: "drootNodes",
|
|
30715
30787
|
get: function get() {
|
|
30716
30788
|
if (!this._drawRoots) {
|
|
30717
|
-
var _HOEditorFactorys$ins =
|
|
30789
|
+
var _HOEditorFactorys$ins = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
|
|
30718
30790
|
_HOEditorFactorys$ins2 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_HOEditorFactorys$ins, 2),
|
|
30719
30791
|
dCell = _HOEditorFactorys$ins2[0],
|
|
30720
30792
|
dRoots = _HOEditorFactorys$ins2[1];
|
|
@@ -30727,7 +30799,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30727
30799
|
}, {
|
|
30728
30800
|
key: "refreshDrootNodes",
|
|
30729
30801
|
value: function refreshDrootNodes() {
|
|
30730
|
-
var _HOEditorFactorys$ins3 =
|
|
30802
|
+
var _HOEditorFactorys$ins3 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
|
|
30731
30803
|
_HOEditorFactorys$ins4 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_HOEditorFactorys$ins3, 2),
|
|
30732
30804
|
dCell = _HOEditorFactorys$ins4[0],
|
|
30733
30805
|
dRoots = _HOEditorFactorys$ins4[1];
|
|
@@ -30738,7 +30810,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30738
30810
|
key: "getParagraphLeftWidth",
|
|
30739
30811
|
value: function getParagraphLeftWidth() {
|
|
30740
30812
|
//如果父文档节点派生于rectNode(用于表格基类),则取
|
|
30741
|
-
var hoEditorFactory =
|
|
30813
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
30742
30814
|
var pNode = this._parentNode;
|
|
30743
30815
|
var aLeft;
|
|
30744
30816
|
var aWidth;
|
|
@@ -30754,7 +30826,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30754
30826
|
aWidth = _pRectNode$getLeftWid2[1];
|
|
30755
30827
|
bRectAlign = _pRectNode$getLeftWid2[2];
|
|
30756
30828
|
|
|
30757
|
-
if (pRectNode instanceof
|
|
30829
|
+
if (pRectNode instanceof _CellNode__WEBPACK_IMPORTED_MODULE_18__/* .CellNode */ .D) {
|
|
30758
30830
|
aLeft = hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[2] * 10, true);
|
|
30759
30831
|
aWidth = aWidth - aLeft - hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[3] * 10, true);
|
|
30760
30832
|
bRectAlign = true;
|
|
@@ -30777,7 +30849,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30777
30849
|
var dline = this._drawLines[index];
|
|
30778
30850
|
|
|
30779
30851
|
if (dline) {
|
|
30780
|
-
var _HOEditorFactorys$ins5 =
|
|
30852
|
+
var _HOEditorFactorys$ins5 = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(this.getNodePath()),
|
|
30781
30853
|
_HOEditorFactorys$ins6 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_HOEditorFactorys$ins5, 2),
|
|
30782
30854
|
dCell = _HOEditorFactorys$ins6[0],
|
|
30783
30855
|
dRoots = _HOEditorFactorys$ins6[1];
|
|
@@ -30805,9 +30877,9 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30805
30877
|
// }
|
|
30806
30878
|
|
|
30807
30879
|
while (pNode) {
|
|
30808
|
-
if (pNode instanceof
|
|
30880
|
+
if (pNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z) {
|
|
30809
30881
|
return pNode;
|
|
30810
|
-
} else if (pNode instanceof
|
|
30882
|
+
} else if (pNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_16__/* .TextInputFieldNode */ .re && pNode.alignWithBlocked) {
|
|
30811
30883
|
return pNode;
|
|
30812
30884
|
} else {
|
|
30813
30885
|
pNode = pNode.parentNode;
|
|
@@ -30819,14 +30891,14 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30819
30891
|
}, {
|
|
30820
30892
|
key: "updateCombineParagraph",
|
|
30821
30893
|
value: function updateCombineParagraph() {
|
|
30822
|
-
var hoEditorFactory =
|
|
30894
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
30823
30895
|
var para = hoEditorFactory.docTree.paragraphs[this._paraNo];
|
|
30824
30896
|
|
|
30825
30897
|
if (!para) {
|
|
30826
30898
|
para = hoEditorFactory.docTree.paragraphs[0];
|
|
30827
30899
|
}
|
|
30828
30900
|
|
|
30829
|
-
return
|
|
30901
|
+
return _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Paragraph.para2CombinePara */ .nv.para2CombinePara(this._hoEditorFactoryID, this, para, hoEditorFactory.docTree.combineParagraph);
|
|
30830
30902
|
}
|
|
30831
30903
|
/**
|
|
30832
30904
|
* @author xyl
|
|
@@ -30866,10 +30938,10 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30866
30938
|
|
|
30867
30939
|
if (index > 0) {
|
|
30868
30940
|
var prevLine = this._drawLines[index - 1];
|
|
30869
|
-
if (prevLine instanceof
|
|
30941
|
+
if (prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a) prevLine.updateLineStyle();
|
|
30870
30942
|
}
|
|
30871
30943
|
|
|
30872
|
-
var aline = new
|
|
30944
|
+
var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a(this._rootPath, this, index, paragraphWidth);
|
|
30873
30945
|
aline.dTop = itop;
|
|
30874
30946
|
aline.dLeft = ileft;
|
|
30875
30947
|
aline.x = this.combineParagraph.leftMarginPixes;
|
|
@@ -30920,7 +30992,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30920
30992
|
var dline = this.drawlines[i];
|
|
30921
30993
|
|
|
30922
30994
|
if (dline) {
|
|
30923
|
-
if (dline instanceof
|
|
30995
|
+
if (dline instanceof _editor_draw_drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_14__/* .DrawTable */ .t) {
|
|
30924
30996
|
dline.clear();
|
|
30925
30997
|
} else {
|
|
30926
30998
|
if (dline.parent) {
|
|
@@ -30938,12 +31010,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30938
31010
|
key: "node2DrawNode",
|
|
30939
31011
|
value: function node2DrawNode() {
|
|
30940
31012
|
this.clear();
|
|
30941
|
-
var itop = this.combineParagraph.topMarginPixes +
|
|
31013
|
+
var itop = this.combineParagraph.topMarginPixes + _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
|
|
30942
31014
|
var leftTopInfos = this.getParagraphLeftWidth();
|
|
30943
31015
|
var ileft = leftTopInfos[0];
|
|
30944
31016
|
var paragraphWidth = leftTopInfos[1]; // console.log(this._combineParagraph);
|
|
30945
31017
|
|
|
30946
|
-
var aline = new
|
|
31018
|
+
var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a(this._rootPath, this, 0, paragraphWidth);
|
|
30947
31019
|
this._dHeight = aline.dHeight;
|
|
30948
31020
|
|
|
30949
31021
|
this._drawLines.push(aline);
|
|
@@ -30978,7 +31050,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30978
31050
|
// this.drootNodes.push(this.drawlines[0]);
|
|
30979
31051
|
// }
|
|
30980
31052
|
if (dline) {
|
|
30981
|
-
var dTop =
|
|
31053
|
+
var dTop = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
|
|
30982
31054
|
this.placeDNodeAfterDTop(dTop, dline); // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.insertDline(droots,index+1,this._drawLines[0]);
|
|
30983
31055
|
}
|
|
30984
31056
|
}
|
|
@@ -30996,7 +31068,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
30996
31068
|
var dline = prevDline;
|
|
30997
31069
|
|
|
30998
31070
|
while (index === -1) {
|
|
30999
|
-
var _TableNode$isNodeInTa =
|
|
31071
|
+
var _TableNode$isNodeInTa = _TableNode__WEBPACK_IMPORTED_MODULE_15__/* .TableNode.isNodeInTable */ .Fh.isNodeInTable(dline.paragraphNode),
|
|
31000
31072
|
_TableNode$isNodeInTa2 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_TableNode$isNodeInTa, 3),
|
|
31001
31073
|
bret = _TableNode$isNodeInTa2[0],
|
|
31002
31074
|
aTable = _TableNode$isNodeInTa2[1],
|
|
@@ -31071,7 +31143,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31071
31143
|
}, {
|
|
31072
31144
|
key: "isInCell",
|
|
31073
31145
|
value: function isInCell() {
|
|
31074
|
-
return this.parentNode !== null && this.parentNode instanceof
|
|
31146
|
+
return this.parentNode !== null && this.parentNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_12__/* .RectNode */ .z;
|
|
31075
31147
|
}
|
|
31076
31148
|
}, {
|
|
31077
31149
|
key: "drawlines",
|
|
@@ -31081,7 +31153,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31081
31153
|
}, {
|
|
31082
31154
|
key: "adjustNextDline",
|
|
31083
31155
|
value: function adjustNextDline(dline, index) {
|
|
31084
|
-
var droots =
|
|
31156
|
+
var droots = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(dline.rootPath);
|
|
31085
31157
|
var dNextLine = this.getNextDline(dline);
|
|
31086
31158
|
|
|
31087
31159
|
for (var i = index; i < dline.drawItems.length; i++) {
|
|
@@ -31093,7 +31165,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31093
31165
|
}, {
|
|
31094
31166
|
key: "getParagraphLastNodePath",
|
|
31095
31167
|
value: function getParagraphLastNodePath() {
|
|
31096
|
-
return
|
|
31168
|
+
return _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.getParaNodeLastPath(this); // return this.getParagraphLastNode().getNodePath()
|
|
31097
31169
|
// const pNode = this._parentNode;
|
|
31098
31170
|
// if (pNode) {
|
|
31099
31171
|
// const index = pNode.childNodes.indexOf(this);
|
|
@@ -31132,7 +31204,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31132
31204
|
value: function updateDrawLineStyle() {
|
|
31133
31205
|
for (var i = 0; i < this._drawLines.length; i++) {
|
|
31134
31206
|
var dline = this._drawLines[i];
|
|
31135
|
-
if (dline instanceof
|
|
31207
|
+
if (dline instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_13__/* .DrawLine */ .a) dline.updateLineStyle();
|
|
31136
31208
|
} // if (dline instanceof DrawLine) dline.updateLineStyle();
|
|
31137
31209
|
|
|
31138
31210
|
}
|
|
@@ -31162,12 +31234,12 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31162
31234
|
}, {
|
|
31163
31235
|
key: "node2Json",
|
|
31164
31236
|
value: function node2Json(range, iscopy) {
|
|
31165
|
-
var combinePara = new
|
|
31237
|
+
var combinePara = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .CombineParagraph */ .kh(this._hoEditorFactoryID, null);
|
|
31166
31238
|
combinePara.copyStyle(this.combineParagraph);
|
|
31167
31239
|
var paragraphStyle = {
|
|
31168
31240
|
height: this.dHeight,
|
|
31169
31241
|
top: this.dTop,
|
|
31170
|
-
align:
|
|
31242
|
+
align: _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[combinePara.align],
|
|
31171
31243
|
charSpace: combinePara.charSpace,
|
|
31172
31244
|
lineSpace: combinePara.lineSpace,
|
|
31173
31245
|
leftMargin: combinePara.leftMarginMm,
|
|
@@ -31183,14 +31255,15 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31183
31255
|
//paragraphJson._align = Align[parseInt(paragraphJson._align)];
|
|
31184
31256
|
|
|
31185
31257
|
var paga = {
|
|
31186
|
-
nodeType:
|
|
31258
|
+
nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .NodeType */ .Jq[this.nodeType],
|
|
31187
31259
|
style: paragraphStyle,
|
|
31188
31260
|
// height: this.dHeight,
|
|
31189
31261
|
// top: this.dTop,
|
|
31190
31262
|
styleIndex: this._paraNo,
|
|
31191
31263
|
textStyleNo: this.styleIndex,
|
|
31192
31264
|
printAsSinglePage: this.printAsSinglePage,
|
|
31193
|
-
docId: this.docId
|
|
31265
|
+
docId: this.docId,
|
|
31266
|
+
customProperty: this.customProperty
|
|
31194
31267
|
}; //const dictType = NodeType[this.nodeType].substring(2);
|
|
31195
31268
|
|
|
31196
31269
|
if (iscopy) {
|
|
@@ -31246,20 +31319,20 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31246
31319
|
var paraNo = Number(json.styleIndex);
|
|
31247
31320
|
|
|
31248
31321
|
if (json["style"]) {
|
|
31249
|
-
var hoEditorFactory =
|
|
31322
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(hoEditorFactoryID);
|
|
31250
31323
|
var style = json.style;
|
|
31251
|
-
var paragraph = new
|
|
31324
|
+
var paragraph = new _domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Paragraph */ .nv(hoEditorFactoryID);
|
|
31252
31325
|
paragraph.leftMargin = style._leftMarginMm ? Number(style._leftMarginMm) : Number(style.leftMargin);
|
|
31253
31326
|
paragraph.rightMargin = style._rightMarginMm ? Number(style._rightMarginMm) : Number(style.rightMargin);
|
|
31254
31327
|
paragraph.topMargin = style._topMarginMm ? Number(style._topMarginMm) : Number(style.topMargin);
|
|
31255
31328
|
paragraph.bottomMargin = style._bottomMarginMm ? Number(style._bottomMarginMm) : Number(style.bottomMargin);
|
|
31256
|
-
paragraph.align = style._align !== undefined ? parseInt(
|
|
31329
|
+
paragraph.align = style._align !== undefined ? parseInt(_domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[style._align]) : parseInt(_domNode_Paragraph__WEBPACK_IMPORTED_MODULE_11__/* .Align */ .xM[style.align]);
|
|
31257
31330
|
paragraph.charSpace = style._charSpace ? Number(style._charSpace) : Number(style.charSpace);
|
|
31258
31331
|
paragraph.lineSpace = style._lineSpace ? Number(style._lineSpace) : Number(style.lineSpace);
|
|
31259
31332
|
paraNo = hoEditorFactory.docTree.styleCompare(paragraph);
|
|
31260
31333
|
}
|
|
31261
31334
|
|
|
31262
|
-
var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo);
|
|
31335
|
+
var paragraphNode = new ParagraphNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, paraNo, json.customProperty);
|
|
31263
31336
|
paragraphNode.docId = json.docId && json.docId !== "" ? json.docId : "";
|
|
31264
31337
|
paragraphNode.printAsSinglePage = json.printAsSinglePage ? json.printAsSinglePage === "true" ? true : false : false;
|
|
31265
31338
|
paragraphNode.styleIndex = json.textStyleNo ? Number(json.textStyleNo) : 0; // paragraphNode._dHeight = Number(json.height);
|
|
@@ -31270,7 +31343,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
31270
31343
|
}]);
|
|
31271
31344
|
|
|
31272
31345
|
return ParagraphNode;
|
|
31273
|
-
}(
|
|
31346
|
+
}(_BaseNode__WEBPACK_IMPORTED_MODULE_10__/* .BaseNode */ .Hd);
|
|
31274
31347
|
|
|
31275
31348
|
/***/ }),
|
|
31276
31349
|
|
|
@@ -38529,12 +38602,13 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
|
|
|
38529
38602
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38530
38603
|
/* harmony export */ "OL": function() { return /* binding */ DownListProperty; },
|
|
38531
38604
|
/* harmony export */ "ZX": function() { return /* binding */ DataFormat; },
|
|
38605
|
+
/* harmony export */ "Zi": function() { return /* binding */ InputFieldType; },
|
|
38532
38606
|
/* harmony export */ "hc": function() { return /* binding */ ExecuteStatus; },
|
|
38533
38607
|
/* harmony export */ "mK": function() { return /* binding */ ReadOnlyStatus; },
|
|
38534
38608
|
/* harmony export */ "re": function() { return /* binding */ TextInputFieldNode; },
|
|
38535
38609
|
/* harmony export */ "wz": function() { return /* binding */ DataVerifyFormat; }
|
|
38536
38610
|
/* harmony export */ });
|
|
38537
|
-
/* unused harmony exports
|
|
38611
|
+
/* unused harmony exports SpecialFormat, BandDataSource */
|
|
38538
38612
|
/* harmony import */ var element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86769);
|
|
38539
38613
|
/* harmony import */ var element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_message_box__WEBPACK_IMPORTED_MODULE_0__);
|
|
38540
38614
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26982);
|
|
@@ -53509,6 +53583,12 @@ var DrawTextNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
53509
53583
|
}
|
|
53510
53584
|
}
|
|
53511
53585
|
|
|
53586
|
+
if (hoEditorFactory.isEnabledGlobalColor) {
|
|
53587
|
+
if (!(this.node instanceof MarkNode/* MarkNode */.j) && this.node.parentNode.inputFieldType === 0) {
|
|
53588
|
+
backColor = "transparent";
|
|
53589
|
+
}
|
|
53590
|
+
}
|
|
53591
|
+
|
|
53512
53592
|
if (this.node.parentNode.enableGlobalColor) {
|
|
53513
53593
|
backColor = "transparent";
|
|
53514
53594
|
}
|
|
@@ -67201,8 +67281,8 @@ var dealImage = function dealImage(base64, callback, qualitys, size, img) {
|
|
|
67201
67281
|
var imgWidth, imgHeight;
|
|
67202
67282
|
|
|
67203
67283
|
newImage.onload = function () {
|
|
67204
|
-
imgWidth = newImage.
|
|
67205
|
-
imgHeight = newImage.
|
|
67284
|
+
imgWidth = newImage.naturalWidth;
|
|
67285
|
+
imgHeight = newImage.naturalHeight;
|
|
67206
67286
|
var canvas = document.createElement("canvas");
|
|
67207
67287
|
var ctx = canvas.getContext("2d");
|
|
67208
67288
|
|
|
@@ -98061,7 +98141,8 @@ while(len--){curDa=sa.shift();if(typeof curDa!=="string"||Array.isArray(curDa)&&
|
|
|
98061
98141
|
//we assume the user knows what they are doing.
|
|
98062
98142
|
//Convert text into an array anyway to simplify
|
|
98063
98143
|
//later code.
|
|
98064
|
-
if(typeof text==="string"){if(text.match(/[\r?\n]/)){text=[text.replace(/\r\n|\r|\n/g,'')]
|
|
98144
|
+
if(typeof text==="string"){if(text.match(/[\r?\n]/)){text=[text.replace(/\r\n|\r|\n/g,'')];// 自定义修改 处理打印回车的问题
|
|
98145
|
+
}else{text=[text];}}//baseline
|
|
98065
98146
|
var height=activeFontSize/scope.internal.scaleFactor;var descent=height*(lineHeightFactor-1);switch(options.baseline){case"bottom":y-=descent;break;case"top":y+=height-descent;break;case"hanging":y+=height-2*descent;break;case"middle":y+=height/2-descent;break;}//multiline
|
|
98066
98147
|
maxWidth=options.maxWidth||0;if(maxWidth>0){if(typeof text==="string"){text=scope.splitTextToSize(text,maxWidth);}else if(Object.prototype.toString.call(text)==="[object Array]"){text=text.reduce(function(acc,textLine){return acc.concat(scope.splitTextToSize(textLine,maxWidth));},[]);}}//creating Payload-Object to make text byRef
|
|
98067
98148
|
payload={text:text,x:x,y:y,options:options,mutex:{pdfEscape:pdfEscape,activeFontKey:activeFontKey,fonts:fonts,activeFontSize:activeFontSize}};events.publish("preProcessText",payload);text=payload.text;options=payload.options;//angle
|
|
@@ -98079,7 +98160,8 @@ var prevWidth=0;var newX;if(align==="right"){//The passed in x coordinate define
|
|
|
98079
98160
|
//rightmost point of the text.
|
|
98080
98161
|
x-=lineWidths[0];text=[];len=da.length;for(var i=0;i<len;i++){if(i===0){newX=getHorizontalCoordinate(x);newY=getVerticalCoordinate(y);}else{newX=scale(prevWidth-lineWidths[i]);newY=-leading;}text.push([da[i],newX,newY]);prevWidth=lineWidths[i];}}else if(align==="center"){//The passed in x coordinate defines
|
|
98081
98162
|
//the center point.
|
|
98082
|
-
x-=lineWidths[0]/2;text=[];len=da.length;for(var j=0;j<len;j++){if(j===0){newX=getHorizontalCoordinate(x);newY=getVerticalCoordinate(y);}else{newX=scale((prevWidth-lineWidths[j])/2);newY=-leading;}text.push([da[j],newX,newY]);prevWidth=lineWidths[j];}}else if(align==="left"){text=[];len=da.length;for(var h=0;h<len;h++){text.push(da[h]);}}else if(align==="justify"){text=[];len=da.length;maxWidth=maxWidth!==0?maxWidth:pageWidth;for(var l=0;l<len;l++){newY=l===0?getVerticalCoordinate(y):-leading;newX=l===0?getHorizontalCoordinate(x):0;if(l<len-1){
|
|
98163
|
+
x-=lineWidths[0]/2;text=[];len=da.length;for(var j=0;j<len;j++){if(j===0){newX=getHorizontalCoordinate(x);newY=getVerticalCoordinate(y);}else{newX=scale((prevWidth-lineWidths[j])/2);newY=-leading;}text.push([da[j],newX,newY]);prevWidth=lineWidths[j];}}else if(align==="left"){text=[];len=da.length;for(var h=0;h<len;h++){text.push(da[h]);}}else if(align==="justify"){text=[];len=da.length;maxWidth=maxWidth!==0?maxWidth:pageWidth;for(var l=0;l<len;l++){newY=l===0?getVerticalCoordinate(y):-leading;newX=l===0?getHorizontalCoordinate(x):0;if(l<len-1){// 自定义修改 字符间距
|
|
98164
|
+
wordSpacingPerLine.push(hpf(scale((maxWidth-lineWidths[l])/(da[l].split("").length-1))));}else{wordSpacingPerLine.push(0);}text.push([da[l],newX,newY]);}}else{throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');}}//R2L
|
|
98083
98165
|
var doReversing=typeof options.R2L==="boolean"?options.R2L:R2L;if(doReversing===true){text=processTextByFunction(text,function(text,posX,posY){return[text.split("").reverse().join(""),posX,posY];});}//creating Payload-Object to make text byRef
|
|
98084
98166
|
payload={text:text,x:x,y:y,options:options,mutex:{pdfEscape:pdfEscape,activeFontKey:activeFontKey,fonts:fonts,activeFontSize:activeFontSize}};events.publish("postProcessText",payload);text=payload.text;isHex=payload.mutex.isHex||false;//Escaping
|
|
98085
98167
|
var activeFontEncoding=fonts[activeFontKey].encoding;if(activeFontEncoding==="WinAnsiEncoding"||activeFontEncoding==="StandardEncoding"){text=processTextByFunction(text,function(text,posX,posY){return[ESC(text),posX,posY];});}da=transformTextToSpecialArray(text);text=[];var STRING=0;var ARRAY=1;var variant=Array.isArray(da[0])?ARRAY:STRING;var posX;var posY;var content;var wordSpacing="";var generatePosition=function generatePosition(parmPosX,parmPosY,parmTransformationMatrix){var position="";if(parmTransformationMatrix instanceof Matrix){// It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y
|
|
@@ -98885,6 +98967,7 @@ stream.push(formObject.scope.__private__.encodeColorString(formObject.color));st
|
|
|
98885
98967
|
stream.push(calcRes.text);stream.push("ET");// End Text
|
|
98886
98968
|
stream.push("Q");stream.push("EMC");var appearanceStreamContent=createFormXObject(formObject);appearanceStreamContent.scope=formObject.scope;appearanceStreamContent.stream=stream.join("\n");return appearanceStreamContent;};var calculateX=function calculateX(formObject,text){var maxFontSize=formObject.fontSize===0?formObject.maxFontSize:formObject.fontSize;var returnValue={text:"",fontSize:""};// Remove Brackets
|
|
98887
98969
|
text=text.substr(0,1)=="("?text.substr(1):text;text=text.substr(text.length-1)==")"?text.substr(0,text.length-1):text;// split into array of words
|
|
98970
|
+
// 自定义修改 字符间距
|
|
98888
98971
|
var textSplit=text.split("");var fontSize=maxFontSize;// The Starting fontSize (The Maximum)
|
|
98889
98972
|
var lineSpacing=2;var borderPadding=2;var height=AcroFormAppearance.internal.getHeight(formObject)||0;height=height<0?-height:height;var width=AcroFormAppearance.internal.getWidth(formObject)||0;width=width<0?-width:width;var isSmallerThanWidth=function isSmallerThanWidth(i,lastLine,fontSize){if(i+1<textSplit.length){var tmp=lastLine+" "+textSplit[i+1];var TextWidth=calculateFontSpace(tmp,formObject,fontSize).width;var FieldWidth=width-2*borderPadding;return TextWidth<=FieldWidth;}else{return false;}};fontSize++;FontSize:while(fontSize>0){text="";fontSize--;var textHeight=calculateFontSpace("3",formObject,fontSize).height;var startY=formObject.multiline?height-fontSize:(height-textHeight)/2;startY+=lineSpacing;var startX;var lastY=startY;var firstWordInLine=0,lastWordInLine=0;var lastLength;if(fontSize<=0){// In case, the Text doesn't fit at all
|
|
98890
98973
|
fontSize=12;text="(...) Tj\n";text+="% Width of Text: "+calculateFontSpace(text,formObject,fontSize).width+", FieldWidth:"+width+"\n";break;}var lastLine="";var lineCount=0;Line:for(var i in textSplit){if(textSplit.hasOwnProperty(i)){lastLine+=textSplit[i]+" ";// Remove last blank
|
|
@@ -99518,8 +99601,10 @@ out+=String.fromCharCode.apply(null,buf.subarray(i,i+ARRAY_APPLY_BATCH));}return
|
|
|
99518
99601
|
* @param {posY}
|
|
99519
99602
|
*
|
|
99520
99603
|
* @returns jsPDF
|
|
99521
|
-
*/jsPDFAPI.addImage=function(){
|
|
99522
|
-
var
|
|
99604
|
+
*/jsPDFAPI.addImage=function(){// 自定义修改 处理签名图片打印
|
|
99605
|
+
var imageData,format,x,y,w,h,alias,compression,rotation,posX,posY;imageData=arguments[0];if(typeof arguments[1]==="number"){format=UNKNOWN;x=arguments[1];y=arguments[2];w=arguments[3];h=arguments[4];alias=arguments[5];compression=arguments[6];rotation=arguments[7];posX=arguments[8];posY=arguments[9];}else{format=arguments[1];x=arguments[2];y=arguments[3];w=arguments[4];h=arguments[5];alias=arguments[6];compression=arguments[7];rotation=arguments[8];posX=arguments[9];posY=arguments[10];}if((0,esm_typeof/* default */.Z)(imageData)==="object"&&!isDOMElement(imageData)&&"imageData"in imageData){var options=imageData;imageData=options.imageData;format=options.format||format||UNKNOWN;x=options.x||x||0;y=options.y||y||0;w=options.w||options.width||w;h=options.h||options.height||h;alias=options.alias||alias;compression=options.compression||compression;rotation=options.rotation||options.angle||rotation;}//If compression is not explicitly set, determine if we should use compression
|
|
99606
|
+
var filter=this.internal.getFilters();if(compression===undefined&&filter.indexOf("FlateEncode")!==-1){compression="SLOW";}// 自定义修改 调整 addImage 方法的 compression值压缩图片
|
|
99607
|
+
compression='SLOW';if(isNaN(x)||isNaN(y)){throw new Error("Invalid coordinates passed to jsPDF.addImage");}// if(posX) x += posX;
|
|
99523
99608
|
// if(posY) y += posY;
|
|
99524
99609
|
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
|
|
99525
99610
|
if(notDefined(alias)){alias=generateAliasFromImageData(imageData);}result=checkImagesForAlias.call(this,alias);if(!result){if(supportsArrayBuffer()){// no need to convert if imageData is already uint8array
|
|
@@ -99972,7 +100057,7 @@ var f2,getHorizontalCoordinateString,getVerticalCoordinateString,getHorizontalCo
|
|
|
99972
100057
|
* @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />
|
|
99973
100058
|
* A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />
|
|
99974
100059
|
* A pattern object to use to fill the drawing (not supported by context2d)
|
|
99975
|
-
*/Object.defineProperty(this,"fillStyle",{get:function get(){return this.ctx.fillStyle;},set:function set(value){var rgba;rgba=getRGBA(value);this.ctx.fillStyle=rgba.style;this.ctx.isFillTransparent=rgba.a===0
|
|
100060
|
+
*/Object.defineProperty(this,"fillStyle",{get:function get(){return this.ctx.fillStyle;},set:function set(value){var rgba;rgba=getRGBA(value);this.ctx.fillStyle=rgba.style;this.ctx.isFillTransparent=rgba.a===0;//自定义修改 当透明度小于1时改成0 ,以适配不支持透明度的打印机
|
|
99976
100061
|
if(rgba.a<1){this.ctx.fillOpacity=0;}else{this.ctx.fillOpacity=rgba.a;}// 自定义修改 处理彩色字体打印问题
|
|
99977
100062
|
if(window.printBlack&&this.ctx.fillStyle!=="#000000"&&this.ctx.fillStyle!=="#FFFFFF"){this.ctx.fillStyle="#000000";rgba.r=0;rgba.g=0;rgba.b=0;}var alpha=this.ctx.fillOpacity;this.pdf.setFillColor(rgba.r,rgba.g,rgba.b,{a:alpha});this.pdf.setTextColor(rgba.r,rgba.g,rgba.b,{a:alpha});}});/**
|
|
99978
100063
|
* Sets or returns the color, gradient, or pattern used for strokes
|
|
@@ -100013,7 +100098,8 @@ if(fontFace!==null){fontFace.ref={name:family,style:style};fontFaces.push(fontFa
|
|
|
100013
100098
|
* will be used. If not set it will fallback to previous behavior.
|
|
100014
100099
|
*/Object.defineProperty(this,"fontFaces",{get:function get(){return _fontFaces;},set:function set(value){_fontFaceMap=null;_fontFaces=value;}});Object.defineProperty(this,"font",{get:function get(){return this.ctx.font;},set:function set(value){this.ctx.font=value;var rx,matches;//source: https://stackoverflow.com/a/10136041
|
|
100015
100100
|
// eslint-disable-next-line no-useless-escape
|
|
100016
|
-
rx=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i;matches=rx.exec(value);if(matches!==null){var fontStyle=matches[1];var fontVariant=matches[2];var fontWeight=matches[3];var fontSize=matches[4];var lineHeight=matches[5];var fontFamily=matches[6];}else{return;}var rxFontSize=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;var fontSizeUnit=rxFontSize.exec(fontSize)[2];if("px"===fontSizeUnit){fontSize=parseFloat(fontSize)*this.pdf.internal.scaleFactor
|
|
100101
|
+
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
|
|
100102
|
+
}else if("em"===fontSizeUnit){fontSize=Math.floor(parseFloat(fontSize)*this.pdf.getFontSize());}else{fontSize=Math.floor(parseFloat(fontSize)*this.pdf.internal.scaleFactor);}this.pdf.setFontSize(fontSize);var parts=parseFontFamily(fontFamily);if(this.fontFaces){var fontFaceMap=getFontFaceMap(this.pdf,this.fontFaces);var rules=parts.map(function(ff){return{family:ff,stretch:"normal",// TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)
|
|
100017
100103
|
weight:fontWeight,style:fontStyle};});var font=resolveFontFace(fontFaceMap,rules);this.pdf.setFont(font.ref.name,font.ref.style);return;}var style="";if(fontWeight==="bold"||parseInt(fontWeight,10)>=700||fontStyle==="bold"){style="bold";}if(fontStyle==="italic"){style+="italic";}if(style.length===0){style="normal";}var jsPdfFontName="";var fallbackFonts={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"};for(var i=0;i<parts.length;i++){if(this.pdf.internal.getFont(parts[i],style,{noFallback:true,disableWarning:true})!==undefined){jsPdfFontName=parts[i];break;}else if(style==="bolditalic"&&this.pdf.internal.getFont(parts[i],"bold",{noFallback:true,disableWarning:true})!==undefined){jsPdfFontName=parts[i];style="bold";}else if(this.pdf.internal.getFont(parts[i],"normal",{noFallback:true,disableWarning:true})!==undefined){jsPdfFontName=parts[i];style="normal";break;}}if(jsPdfFontName===""){for(var j=0;j<parts.length;j++){if(fallbackFonts[parts[j]]){jsPdfFontName=fallbackFonts[parts[j]];break;}}}jsPdfFontName=jsPdfFontName===""?"Times":jsPdfFontName;this.pdf.setFont(jsPdfFontName,style);}});Object.defineProperty(this,"globalCompositeOperation",{get:function get(){return this.ctx.globalCompositeOperation;},set:function set(value){this.ctx.globalCompositeOperation=value;}});Object.defineProperty(this,"globalAlpha",{get:function get(){return this.ctx.globalAlpha;},set:function set(value){//自定义修改
|
|
100018
100104
|
if(value<1){this.ctx.globalAlpha=0;}else{this.ctx.globalAlpha=value;}}});/**
|
|
100019
100105
|
* A float specifying the amount of the line dash offset. The default value is 0.0.
|
|
@@ -100053,7 +100139,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
|
|
|
100053
100139
|
* @function
|
|
100054
100140
|
* @param x {Number} The x-coordinate of where to move the path to
|
|
100055
100141
|
* @param y {Number} The y-coordinate of where to move the path to
|
|
100056
|
-
*/Context2D.prototype.moveTo=function(x,y){if(isNaN(x)||isNaN(y)){console.error("jsPDF.context2d.moveTo: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.moveTo");}
|
|
100142
|
+
*/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");}// 自定义修改 表格的边框线/页面边框位置不对的问题
|
|
100143
|
+
x+=this.posX;y+=this.posY;var pt=this.ctx.transform.applyToPoint(new Point(x,y));this.path.push({type:"mt",x:pt.x,y:pt.y});this.ctx.lastPoint=new Point(x,y);};/**
|
|
100057
100144
|
* Creates a path from the current point back to the starting point
|
|
100058
100145
|
*
|
|
100059
100146
|
* @name closePath
|
|
@@ -100067,7 +100154,8 @@ return this.lineDash.slice();}};Context2D.prototype.fill=function(){pathPreProce
|
|
|
100067
100154
|
* @param x The x-coordinate of where to create the line to
|
|
100068
100155
|
* @param y The y-coordinate of where to create the line to
|
|
100069
100156
|
* @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).
|
|
100070
|
-
*/Context2D.prototype.lineTo=function(x,y){if(isNaN(x)||isNaN(y)){console.error("jsPDF.context2d.lineTo: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.lineTo");}
|
|
100157
|
+
*/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");}// 自定义修改 表格的边框线/页面边框位置不对的问题
|
|
100158
|
+
x+=this.posX;y+=this.posY;var pt=this.ctx.transform.applyToPoint(new Point(x,y));this.path.push({type:"lt",x:pt.x,y:pt.y});this.ctx.lastPoint=new Point(pt.x,pt.y);};/**
|
|
100071
100159
|
* Clips a region of any shape and size from the original canvas
|
|
100072
100160
|
*
|
|
100073
100161
|
* @name clip
|
|
@@ -100220,7 +100308,9 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
|
|
|
100220
100308
|
* @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
|
|
100221
100309
|
* @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
|
|
100222
100310
|
* @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.
|
|
100223
|
-
*/Context2D.prototype.strokeText=function(text,x,y,maxWidth){if(isNaN(x)||isNaN(y)||typeof text!=="string"){console.error("jsPDF.context2d.strokeText: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.strokeText");}if(isStrokeTransparent.call(this)){return;}maxWidth=isNaN(maxWidth)?undefined:maxWidth;var degs=rad2deg(this.ctx.transform.rotation);var scale=this.ctx.transform.scaleX;var acharSpace=this.letterSpacing?this.letterSpacing:0
|
|
100311
|
+
*/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;// 自定义修改
|
|
100312
|
+
putText.call(this,{text:text,x:x,y:y,scale:scale,renderingMode:"stroke",angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace// 自定义修改
|
|
100313
|
+
});};/**
|
|
100224
100314
|
* Returns an object that contains the width of the specified text
|
|
100225
100315
|
*
|
|
100226
100316
|
* @name measureText
|
|
@@ -100284,6 +100374,7 @@ putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign
|
|
|
100284
100374
|
// if (isNaN(f)){
|
|
100285
100375
|
// f=0;
|
|
100286
100376
|
// }
|
|
100377
|
+
// 自定义修改 处理打印图片报错
|
|
100287
100378
|
a=isNaN(a)?1:a;b=isNaN(b)?0:b;c=isNaN(c)?0:c;d=isNaN(d)?1:d;e=isNaN(e)?0:e;f=isNaN(f)?0:f;var matrix=new Matrix(a,b,c,d,e,f);this.ctx.transform=this.ctx.transform.multiply(matrix);// console.log("this.transform值",this.ctx.transform);
|
|
100288
100379
|
};/**
|
|
100289
100380
|
* Resets the current transform to the identity matrix. Then runs transform()
|
|
@@ -100312,8 +100403,9 @@ a=isNaN(a)?1:a;b=isNaN(b)?0:b;c=isNaN(c)?0:c;d=isNaN(d)?1:d;e=isNaN(e)?0:e;f=isN
|
|
|
100312
100403
|
* @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
|
|
100313
100404
|
*/Context2D.prototype.drawImage=function(img,sx,sy,swidth,sheight,x,y,width,height){var imageProperties=this.pdf.getImageProperties(img);var factorX=1;var factorY=1;var clipFactorX=1;var clipFactorY=1;if(typeof swidth!=="undefined"&&typeof width!=="undefined"){clipFactorX=width/swidth;clipFactorY=height/sheight;factorX=imageProperties.width/swidth*width/swidth;factorY=imageProperties.height/sheight*height/sheight;}//is sx and sy are set and x and y not, set x and y with values of sx and sy
|
|
100314
100405
|
if(typeof x==="undefined"){x=sx;y=sy;sx=0;sy=0;}if(typeof swidth!=="undefined"&&typeof width==="undefined"){width=swidth;height=sheight;}if(typeof swidth==="undefined"&&typeof width==="undefined"){width=imageProperties.width;height=imageProperties.height;}var decomposedTransformationMatrix=this.ctx.transform.decompose();// console.log("transform.decompose",decomposedTransformationMatrix.scale);
|
|
100315
|
-
var angle=rad2deg(decomposedTransformationMatrix.rotate.shx);var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);if(!swidth){swidth=width;}if(!sheight){sheight=height;}var xRect
|
|
100316
|
-
|
|
100406
|
+
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;// 自定义修改 处理签名图片打印和普通图片打印
|
|
100407
|
+
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"){// 自定义修改
|
|
100408
|
+
this.pdf.addImage(img.toDataURL("image/png"),'',xRect.x,xRect.y,xRect.w,xRect.h);}else{// 自定义修改
|
|
100317
100409
|
this.pdf.addImage(img,"JPEG",xRect.x+this.posX,xRect.y+this.posY,xRect.w,xRect.h,null,null,angle,this.posX,this.posY);}}};var getPagesByPath=function getPagesByPath(path,pageWrapX,pageWrapY){var result=[];pageWrapX=pageWrapX||this.pdf.internal.pageSize.width;pageWrapY=pageWrapY||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var yOffset=this.posY+this.ctx.prevPageLastElemOffset;switch(path.type){default:case"mt":case"lt":result.push(Math.floor((path.y+yOffset)/pageWrapY)+1);break;case"arc":result.push(Math.floor((path.y+yOffset-path.radius)/pageWrapY)+1);result.push(Math.floor((path.y+yOffset+path.radius)/pageWrapY)+1);break;case"qct":var rectOfQuadraticCurve=getQuadraticCurveBoundary(this.ctx.lastPoint.x,this.ctx.lastPoint.y,path.x1,path.y1,path.x,path.y);result.push(Math.floor((rectOfQuadraticCurve.y+yOffset)/pageWrapY)+1);result.push(Math.floor((rectOfQuadraticCurve.y+rectOfQuadraticCurve.h+yOffset)/pageWrapY)+1);break;case"bct":var rectOfBezierCurve=getBezierCurveBoundary(this.ctx.lastPoint.x,this.ctx.lastPoint.y,path.x1,path.y1,path.x2,path.y2,path.x,path.y);result.push(Math.floor((rectOfBezierCurve.y+yOffset)/pageWrapY)+1);result.push(Math.floor((rectOfBezierCurve.y+rectOfBezierCurve.h+yOffset)/pageWrapY)+1);break;case"rect":result.push(Math.floor((path.y+yOffset)/pageWrapY)+1);result.push(Math.floor((path.y+path.h+yOffset)/pageWrapY)+1);}for(var i=0;i<result.length;i+=1){while(this.pdf.internal.getNumberOfPages()<result[i]){addPage.call(this);}}return result;};var addPage=function addPage(){var fillStyle=this.fillStyle;var strokeStyle=this.strokeStyle;var font=this.font;var lineCap=this.lineCap;var lineWidth=this.lineWidth;var lineJoin=this.lineJoin;this.pdf.addPage();this.fillStyle=fillStyle;this.strokeStyle=strokeStyle;this.font=font;this.lineCap=lineCap;this.lineWidth=lineWidth;this.lineJoin=lineJoin;};var pathPositionRedo=function pathPositionRedo(paths,x,y){for(var i=0;i<paths.length;i++){switch(paths[i].type){case"bct":paths[i].x2+=x;paths[i].y2+=y;case"qct":paths[i].x1+=x;paths[i].y1+=y;case"mt":case"lt":case"arc":default:paths[i].x+=x;paths[i].y+=y;}}return paths;};var sortPages=function sortPages(pages){return pages.sort(function(a,b){return a-b;});};var pathPreProcess=function pathPreProcess(rule,isClip){var fillStyle=this.fillStyle;var strokeStyle=this.strokeStyle;var lineCap=this.lineCap;var oldLineWidth=this.lineWidth;var lineWidth=Math.abs(oldLineWidth*this.ctx.transform.scaleX);var lineJoin=this.lineJoin;var origPath=JSON.parse(JSON.stringify(this.path));var xPath=JSON.parse(JSON.stringify(this.path));var clipPath;var tmpPath;var pages=[];for(var i=0;i<xPath.length;i++){if(typeof xPath[i].x!=="undefined"){var page=getPagesByPath.call(this,xPath[i]);for(var ii=0;ii<page.length;ii+=1){if(pages.indexOf(page[ii])===-1){pages.push(page[ii]);}}}}for(var j=0;j<pages.length;j++){while(this.pdf.internal.getNumberOfPages()<pages[j]){addPage.call(this);}}sortPages(pages);if(this.autoPaging){var min=pages[0];var max=pages[pages.length-1];for(var k=min;k<max+1;k++){this.pdf.setPage(k);this.fillStyle=fillStyle;this.strokeStyle=strokeStyle;this.lineCap=lineCap;this.lineWidth=lineWidth;this.lineJoin=lineJoin;var pageWidthMinusMargins=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1];var topMargin=k===1?this.posY+this.margin[0]:this.margin[0];var firstPageHeight=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2];var pageHeightMinusMargins=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var previousPageHeightSum=k===1?0:firstPageHeight+(k-2)*pageHeightMinusMargins;if(this.ctx.clip_path.length!==0){var tmpPaths=this.path;clipPath=JSON.parse(JSON.stringify(this.ctx.clip_path));this.path=pathPositionRedo(clipPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);drawPaths.call(this,rule,true);this.path=tmpPaths;}tmpPath=JSON.parse(JSON.stringify(origPath));this.path=pathPositionRedo(tmpPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);if(isClip===false||k===0){var needsClipping=(k>min||k<max)&&hasMargins.call(this);if(needsClipping){this.pdf.saveGraphicsState();this.pdf.rect(this.margin[3],this.margin[0],pageWidthMinusMargins,pageHeightMinusMargins,null).clip().discardPath();}drawPaths.call(this,rule,isClip);if(needsClipping){this.pdf.restoreGraphicsState();}}this.lineWidth=oldLineWidth;}}else{this.lineWidth=lineWidth;drawPaths.call(this,rule,isClip);this.lineWidth=oldLineWidth;}this.path=origPath;};/**
|
|
100318
100410
|
* Processes the paths
|
|
100319
100411
|
*
|
|
@@ -100334,10 +100426,13 @@ return y;case"alphabetic":default:return y;}};var getTextBottom=function getText
|
|
|
100334
100426
|
* @param counterclockwise
|
|
100335
100427
|
* @param style
|
|
100336
100428
|
* @param isClip
|
|
100337
|
-
*/var drawArc=function drawArc(x,y,r,a1,a2,counterclockwise,style,isClip){var curves=createArc.call(this,r,a1,a2,counterclockwise);for(var i=0;i<curves.length;i++){var curve=curves[i];if(i===0){doMove.call(this,curve.x1+x,curve.y1+y);}drawCurve.call(this,x,y,curve.x2,curve.y2,curve.x3,curve.y3,curve.x4,curve.y4);}if(!isClip){putStyle.call(this,style);}else{doClip.call(this);}};var putStyle=function putStyle(style){switch(style){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f");break;}};var doClip=function doClip(){this.pdf.clip();this.pdf.discardPath();};var doMove=function doMove(x,y){this.pdf.internal.out(getHorizontalCoordinateString(x)+" "+getVerticalCoordinateString(y)+" m");};var putText=function putText(options){var textAlign;switch(options.align){case"right":case"end":textAlign="right";break;case"center":textAlign="center";break;case"left":case"start":default:textAlign="left";break;}var textDimensions=this.pdf.getTextDimensions(options.text);var yBaseLine=getBaseline.call(this,options.y);var yBottom=getTextBottom.call(this,yBaseLine);var yTop=yBottom-textDimensions.h;var pt=this.ctx.transform.applyToPoint(new Point(options.x,yBaseLine));var decomposedTransformationMatrix=this.ctx.transform.decompose();var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);var baselineRect=this.ctx.transform.applyToRectangle(new Rectangle(options.x,yBaseLine,textDimensions.w,textDimensions.h));var textBounds=matrix.applyToRectangle(new Rectangle(options.x,yTop,textDimensions.w,textDimensions.h));var pageArray=getPagesByPath.call(this,textBounds);var pages=[];for(var ii=0;ii<pageArray.length;ii+=1){if(pages.indexOf(pageArray[ii])===-1){pages.push(pageArray[ii]);}}sortPages(pages);var clipPath,oldSize,oldLineWidth;options.text=options.text.replace(/[\t]/g,' ')
|
|
100429
|
+
*/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键的问题
|
|
100430
|
+
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;//自定义修改
|
|
100431
|
+
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// 自定义修改
|
|
100432
|
+
});if(needsClipping){this.pdf.restoreGraphicsState();}}}else{// This text is the last element of the page, but it got cut off due to the margin
|
|
100338
100433
|
// so we render it in the next page
|
|
100339
100434
|
if(textBoundsOnPage.y<pageHeightMinusBottomMargin){// As a result, all other elements have their y offset increased
|
|
100340
|
-
this.ctx.prevPageLastElemOffset+=pageHeightMinusBottomMargin-textBoundsOnPage.y;}}if(options.scale>=0.01){this.pdf.setFontSize(oldSize);this.lineWidth=oldLineWidth;}}}else{if(options.scale>=0.01){oldSize=this.pdf.internal.getFontSize();this.pdf.setFontSize(oldSize*options.scale);oldLineWidth=this.lineWidth;this.lineWidth=oldLineWidth*options.scale;}//
|
|
100435
|
+
this.ctx.prevPageLastElemOffset+=pageHeightMinusBottomMargin-textBoundsOnPage.y;}}if(options.scale>=0.01){this.pdf.setFontSize(oldSize);this.lineWidth=oldLineWidth;}}}else{if(options.scale>=0.01){oldSize=this.pdf.internal.getFontSize();this.pdf.setFontSize(oldSize*options.scale);oldLineWidth=this.lineWidth;this.lineWidth=oldLineWidth*options.scale;}// 自定义修改
|
|
100341
100436
|
var acharSpace=options.charSpace?parseFloat(options.charSpace):0.0;this.pdf.text(options.text,pt.x+this.posX,pt.y+this.posY,{angle:options.angle,align:textAlign,renderingMode:options.renderingMode,// maxWidth: options.maxWidth,
|
|
100342
100437
|
charSpace:acharSpace});if(options.scale>=0.01){this.pdf.setFontSize(oldSize);this.lineWidth=oldLineWidth;}}};var drawLine=function drawLine(x,y,prevX,prevY){prevX=prevX||0;prevY=prevY||0;this.pdf.internal.out(getHorizontalCoordinateString(x+prevX)+" "+getVerticalCoordinateString(y+prevY)+" l");};var drawLines=function drawLines(lines,x,y){return this.pdf.lines(lines,x,y,null,null);};var drawCurve=function drawCurve(x,y,x1,y1,x2,y2,x3,y3){this.pdf.internal.out([f2(getHorizontalCoordinate(x1+x)),f2(getVerticalCoordinate(y1+y)),f2(getHorizontalCoordinate(x2+x)),f2(getVerticalCoordinate(y2+y)),f2(getHorizontalCoordinate(x3+x)),f2(getVerticalCoordinate(y3+y)),"c"].join(" "));};/**
|
|
100343
100438
|
* Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.
|
|
@@ -101191,7 +101286,8 @@ var startOfLine=i;workingLen=0;while(i!==l){if(workingLen+widths_array[i]>maxLen
|
|
|
101191
101286
|
// By default, for PDF, it's "point".
|
|
101192
101287
|
var splitParagraphIntoLines=function splitParagraphIntoLines(text,maxlen,options){// at this time works only on Western scripts, ones with space char
|
|
101193
101288
|
// separating the words. Feel free to expand.
|
|
101194
|
-
if(!options){options={};}
|
|
101289
|
+
if(!options){options={};}// 自定义修改 字符间距 split(" ") ==> split("")
|
|
101290
|
+
var line=[],lines=[line],line_length=options.textIndent||0,separator_length=0,current_word_length=0,word,widths_array,words=text.split(""),spaceCharWidth=getCharWidthsArray.apply(this,[" ",options])[0],i,l,tmp,lineIndent;if(options.lineIndent===-1){lineIndent=words[0].length+2;}else{lineIndent=options.lineIndent||0;}if(lineIndent){var pad=Array(lineIndent).join(" "),wrds=[];words.map(function(wrd){wrd=wrd.split(/\s*\n/);if(wrd.length>1){wrds=wrds.concat(wrd.map(function(wrd,idx){return(idx&&wrd.length?"\n":"")+wrd;}));}else{wrds.push(wrd[0]);}});words=wrds;lineIndent=getStringUnitWidth.apply(this,[pad,options]);}for(i=0,l=words.length;i<l;i++){var force=0;word=words[i];if(lineIndent&&word[0]=="\n"){word=word.substr(1);force=1;}widths_array=getCharWidthsArray.apply(this,[word,options]);current_word_length=widths_array.reduce(function(pv,cv){return pv+cv;},0);if(line_length+separator_length+current_word_length>maxlen||force){if(current_word_length>maxlen){// this happens when you have space-less long URLs for example.
|
|
101195
101291
|
// we just chop these to size. We do NOT insert hiphens
|
|
101196
101292
|
tmp=splitLongWord.apply(this,[word,widths_array,maxlen-(line_length+separator_length),maxlen]);// first line we add to existing line object
|
|
101197
101293
|
line.push(tmp.shift());// it's ok to have extra space indicator there
|
|
@@ -199007,8 +199103,8 @@ var es_function_name = __webpack_require__(68309);
|
|
|
199007
199103
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
199008
199104
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(13797);
|
|
199009
199105
|
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
199010
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDocs.vue?vue&type=template&id=
|
|
199011
|
-
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()}
|
|
199106
|
+
;// 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=0aff533a&
|
|
199107
|
+
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:"hoParagraphModal",fn:function(){return [_vm._t("hoParagraphField")]},proxy:true},{key:"hoComment",fn:function(){return [_vm._t("hoTextComment")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlFindType)?_c('FindReplaceDialog',{attrs:{"hoEditorFactoryId":_vm.activeDocId}}):_vm._e(),(_vm.defaultEditJson.isFooter)?_c('HoFooter',{attrs:{"docProperty":_vm.defaultDocProperty,"hoEditorFactoryId":_vm.activeDocId,"drawPages":_vm.drawPageLength,"currentActivePages":_vm.activePageIndex}}):_vm._e(),_c('ViewContinuousXml',{attrs:{"hoEditorFactoryId":_vm.activeDocId}})],1):_vm._e()}
|
|
199012
199108
|
var staticRenderFns = []
|
|
199013
199109
|
|
|
199014
199110
|
|
|
@@ -206990,7 +207086,7 @@ var SignNode = __webpack_require__(34450);
|
|
|
206990
207086
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
206991
207087
|
var ParagraphNode = __webpack_require__(14208);
|
|
206992
207088
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
206993
|
-
/* harmony default export */ var version = ('2.0.
|
|
207089
|
+
/* harmony default export */ var version = ('2.0.62');
|
|
206994
207090
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/poperTipText/PoperTipText.vue?vue&type=template&id=3fa4e4d3&scoped=true&
|
|
206995
207091
|
var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"},{name:"click-outside",rawName:"v-click-outside",value:(_vm.handleClose),expression:"handleClose"}],ref:"poperTextNode",staticClass:"poper-text-modal animation-in",style:(_vm.posStyle),on:{"mouseenter":_vm.mouseEnter,"mouseleave":_vm.mouseLeave}},_vm._l((_vm.poperText),function(text){return _c('div',{key:text + Math.random(0, 1),staticClass:"poper-text"},[_vm._v(" "+_vm._s(text)+" ")])}),0)}
|
|
206996
207092
|
var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_staticRenderFns = []
|
|
@@ -209146,9 +209242,7 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
209146
209242
|
}
|
|
209147
209243
|
|
|
209148
209244
|
if (dPage.drawDomLevel && dPage.drawDomLevel.stage) {
|
|
209149
|
-
|
|
209150
|
-
dPage.drawDomLevel.clearStage();
|
|
209151
|
-
}
|
|
209245
|
+
dPage.drawDomLevel.clearStage();
|
|
209152
209246
|
}
|
|
209153
209247
|
}
|
|
209154
209248
|
}
|
|
@@ -214658,6 +214752,7 @@ var StagePosition = __webpack_require__(57674);
|
|
|
214658
214752
|
|
|
214659
214753
|
|
|
214660
214754
|
|
|
214755
|
+
|
|
214661
214756
|
|
|
214662
214757
|
|
|
214663
214758
|
var VueController = /*#__PURE__*/function () {
|
|
@@ -220480,6 +220575,44 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220480
220575
|
hoEditorFactory.docTree.curDomRange = newRange;
|
|
220481
220576
|
hoEditorFactory.drawTree.moveCaretToPath(curDomRange.startPath);
|
|
220482
220577
|
}
|
|
220578
|
+
/**
|
|
220579
|
+
* 查询光标所在位置之前的文本内容
|
|
220580
|
+
*/
|
|
220581
|
+
|
|
220582
|
+
}, {
|
|
220583
|
+
key: "getCaretPreviousTextNode",
|
|
220584
|
+
value: function getCaretPreviousTextNode() {
|
|
220585
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
220586
|
+
var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
220587
|
+
var node = curDomRange.npEnd.node;
|
|
220588
|
+
var text = "";
|
|
220589
|
+
|
|
220590
|
+
var getText = function getText(previousNode) {
|
|
220591
|
+
if (previousNode instanceof TextNode/* TextNode */.R || previousNode instanceof LabelNode/* LabelNode */.P || previousNode instanceof DownListNode/* DownListNode */.yF) {
|
|
220592
|
+
return previousNode.text;
|
|
220593
|
+
} 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) {
|
|
220594
|
+
return previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode.text;
|
|
220595
|
+
}
|
|
220596
|
+
};
|
|
220597
|
+
|
|
220598
|
+
if (node instanceof TextNode/* TextNode */.R && !(node instanceof TextInputFieldNode/* TextInputFieldNode */.re)) {
|
|
220599
|
+
if (node.text) {
|
|
220600
|
+
text = node.text;
|
|
220601
|
+
} else {
|
|
220602
|
+
text = getText(node.previousLeaf());
|
|
220603
|
+
}
|
|
220604
|
+
} else if ((node === null || node === void 0 ? void 0 : node.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
220605
|
+
text = getText(node.parentNode.previousLeaf());
|
|
220606
|
+
|
|
220607
|
+
if (!text) {
|
|
220608
|
+
text = getText(node.previousLeaf());
|
|
220609
|
+
}
|
|
220610
|
+
} else if (node instanceof SignNode/* SignNode */.N && node.type !== 3) {
|
|
220611
|
+
text = getText(node.previousLeaf());
|
|
220612
|
+
}
|
|
220613
|
+
|
|
220614
|
+
return text;
|
|
220615
|
+
}
|
|
220483
220616
|
/**
|
|
220484
220617
|
* 初始化文档
|
|
220485
220618
|
*/
|
|
@@ -220720,6 +220853,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220720
220853
|
node.imageDataBase64String = src;
|
|
220721
220854
|
hoEditorFactory.docTree.change(changeEvent);
|
|
220722
220855
|
}
|
|
220856
|
+
}, {
|
|
220857
|
+
key: "setParaCustomProperty",
|
|
220858
|
+
value: function setParaCustomProperty(paragraphNode, customProperty) {
|
|
220859
|
+
paragraphNode.setCustomProperty(customProperty);
|
|
220860
|
+
}
|
|
220723
220861
|
}]);
|
|
220724
220862
|
|
|
220725
220863
|
return VueController;
|
|
@@ -222782,7 +222920,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222782
222920
|
beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
222783
222921
|
xml = hoEditorFactory.vueController.getDocXml(true);
|
|
222784
222922
|
htmlText = {
|
|
222785
|
-
text:
|
|
222923
|
+
text: ''
|
|
222786
222924
|
};
|
|
222787
222925
|
hPromise = Promise.resolve();
|
|
222788
222926
|
hPromise = hPromise.then(function () {
|
|
@@ -222853,12 +222991,14 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222853
222991
|
path = hoEditorFactory.docTree.curDomRange.normalize().endPath;
|
|
222854
222992
|
beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
222855
222993
|
xml = hoEditorFactory.vueController.getDocXml(true);
|
|
222856
|
-
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
222994
|
+
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
222857
222995
|
format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
222858
222996
|
options = {
|
|
222859
222997
|
orientation: orientation,
|
|
222860
|
-
unit:
|
|
222861
|
-
format: format
|
|
222998
|
+
unit: 'px',
|
|
222999
|
+
format: format,
|
|
223000
|
+
hotfixes: ['px_scaling'],
|
|
223001
|
+
compress: true
|
|
222862
223002
|
};
|
|
222863
223003
|
PDF = new jspdf/* default */.ZP(options);
|
|
222864
223004
|
hPromise = Promise.resolve();
|
|
@@ -222881,7 +223021,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222881
223021
|
hoEditorFactory.vueController.openXml(xml);
|
|
222882
223022
|
PDF.deletePage(1);
|
|
222883
223023
|
return new Promise(function (resolves) {
|
|
222884
|
-
resolves(PDF.output(
|
|
223024
|
+
resolves(PDF.output('datauristring'));
|
|
222885
223025
|
});
|
|
222886
223026
|
});
|
|
222887
223027
|
|
|
@@ -222896,7 +223036,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222896
223036
|
setTimeout(function () {
|
|
222897
223037
|
hoEditorFactory.vueController.moveCaretToPath(path);
|
|
222898
223038
|
}, 0);
|
|
222899
|
-
return _context2.abrupt("return", base64.replace(/^data:application\/pdf;filename=generated.pdf;base64,/,
|
|
223039
|
+
return _context2.abrupt("return", base64.replace(/^data:application\/pdf;filename=generated.pdf;base64,/, ''));
|
|
222900
223040
|
|
|
222901
223041
|
case 20:
|
|
222902
223042
|
return _context2.abrupt("return", null);
|
|
@@ -222923,10 +223063,10 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222923
223063
|
}, {
|
|
222924
223064
|
key: "setjsPDFFonts",
|
|
222925
223065
|
value: function setjsPDFFonts(font) {
|
|
222926
|
-
jspdf/* default.API.events.push */.ZP.API.events.push([
|
|
222927
|
-
this.addFileToVFS(
|
|
222928
|
-
this.addFont(
|
|
222929
|
-
this.setFont(
|
|
223066
|
+
jspdf/* default.API.events.push */.ZP.API.events.push(['addFonts', function () {
|
|
223067
|
+
this.addFileToVFS('SimSun-normal.ttf', font);
|
|
223068
|
+
this.addFont('SimSun-normal.ttf', 'SimSun', 'normal');
|
|
223069
|
+
this.setFont('SimSun', 'normal');
|
|
222930
223070
|
}]);
|
|
222931
223071
|
this._isSetFont = true;
|
|
222932
223072
|
|
|
@@ -222957,8 +223097,8 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222957
223097
|
return;
|
|
222958
223098
|
}
|
|
222959
223099
|
|
|
222960
|
-
var fileType = type ? type :
|
|
222961
|
-
var fileName = pdfName ? pdfName : hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() :
|
|
223100
|
+
var fileType = type ? type : 'pdf';
|
|
223101
|
+
var fileName = pdfName ? pdfName : hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档'; // 保存打印前文档状态 和 内容
|
|
222962
223102
|
|
|
222963
223103
|
var beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
222964
223104
|
var xml = hoEditorFactory.vueController.getDocXml(true);
|
|
@@ -222972,21 +223112,21 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
222972
223112
|
});
|
|
222973
223113
|
hPromise = hPromise.then(function () {
|
|
222974
223114
|
return new Promise(function (resolve) {
|
|
222975
|
-
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223115
|
+
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
222976
223116
|
var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
222977
223117
|
|
|
222978
|
-
if (hoEditorFactory.isFixedPrintToA4 && isSpecial) {
|
|
223118
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1' && isSpecial) {
|
|
222979
223119
|
format = _this3._a4Size[orientation];
|
|
222980
223120
|
}
|
|
222981
223121
|
|
|
222982
|
-
if (hoEditorFactory.
|
|
223122
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
222983
223123
|
format = [793, 1122];
|
|
222984
223124
|
orientation = 'p';
|
|
222985
223125
|
}
|
|
222986
223126
|
|
|
222987
223127
|
var options = {
|
|
222988
223128
|
orientation: orientation,
|
|
222989
|
-
unit:
|
|
223129
|
+
unit: 'px',
|
|
222990
223130
|
format: format
|
|
222991
223131
|
};
|
|
222992
223132
|
// const PDF = new jsPDF(orientation, "px", [hoEditorFactory.pageProperty.widthMm, hoEditorFactory.pageProperty.heightMm], false, true, );
|
|
@@ -223016,14 +223156,20 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223016
223156
|
|
|
223017
223157
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
223018
223158
|
var beforeStatus = hoEditorFactory.drawTree.paintStatus;
|
|
223159
|
+
var xml = "";
|
|
223160
|
+
|
|
223161
|
+
if (hoEditorFactory.printStatus.printRange !== 2) {
|
|
223162
|
+
xml = hoEditorFactory.vueController.getDocXml(true, true);
|
|
223163
|
+
}
|
|
223164
|
+
|
|
223019
223165
|
hoEditorFactory.startPageNum = 0;
|
|
223020
223166
|
hoEditorFactory.firstPageStartTop = 0;
|
|
223021
223167
|
|
|
223022
223168
|
if (!this._isSetFont) {
|
|
223023
223169
|
this._waitPrint = true;
|
|
223024
223170
|
|
|
223025
|
-
message_box_default().alert("<p>\u6253\u5370\u6240\u9700\u6587\u4EF6\u6B63\u5728\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u7A0D\u5019</p><p>\u52A0\u8F7D\u5B8C\u6210\u540E\u4F1A\u81EA\u52A8\u8FDB\u884C\u6253\u5370</p>",
|
|
223026
|
-
iconClass:
|
|
223171
|
+
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>", '提示', {
|
|
223172
|
+
iconClass: 'el-icon-loading',
|
|
223027
223173
|
center: true,
|
|
223028
223174
|
showConfirmButton: false,
|
|
223029
223175
|
dangerouslyUseHTMLString: true
|
|
@@ -223037,12 +223183,12 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223037
223183
|
}
|
|
223038
223184
|
|
|
223039
223185
|
if (printMode && printAppoint) {
|
|
223040
|
-
var appoint = printAppoint.replace(/\s*/g,
|
|
223186
|
+
var appoint = printAppoint.replace(/\s*/g, '').replace(/[^\d]/g, ',').split(',');
|
|
223041
223187
|
var maxLen = hoEditorFactory.drawTree.drawPages.length;
|
|
223042
223188
|
var error = appoint.filter(function (pages) {
|
|
223043
223189
|
return pages && Number(pages) > maxLen;
|
|
223044
223190
|
});
|
|
223045
|
-
if (error.length > 0) return
|
|
223191
|
+
if (error.length > 0) return '指定页输入超出文档页范围';
|
|
223046
223192
|
}
|
|
223047
223193
|
|
|
223048
223194
|
var setStatus = new Promise( /*#__PURE__*/function () {
|
|
@@ -223087,23 +223233,23 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223087
223233
|
setStatus.then(function (res) {
|
|
223088
223234
|
if (res) {
|
|
223089
223235
|
return new Promise(function (reslove, reject) {
|
|
223090
|
-
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223236
|
+
var orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
223091
223237
|
var format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
223092
223238
|
|
|
223093
|
-
if (hoEditorFactory.isFixedPrintToA4) {
|
|
223239
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1') {
|
|
223094
223240
|
format = _this4._a4Size[orientation];
|
|
223095
223241
|
}
|
|
223096
223242
|
|
|
223097
|
-
if (hoEditorFactory.
|
|
223243
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
223098
223244
|
format = [793, 1122];
|
|
223099
223245
|
orientation = 'p';
|
|
223100
223246
|
}
|
|
223101
223247
|
|
|
223102
223248
|
var options = {
|
|
223103
223249
|
orientation: orientation,
|
|
223104
|
-
unit:
|
|
223250
|
+
unit: 'px',
|
|
223105
223251
|
format: format,
|
|
223106
|
-
hotfixes: [
|
|
223252
|
+
hotfixes: ['px_scaling'],
|
|
223107
223253
|
compress: true
|
|
223108
223254
|
};
|
|
223109
223255
|
var PDF = new jspdf/* default */.ZP(options);
|
|
@@ -223111,20 +223257,26 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223111
223257
|
});
|
|
223112
223258
|
}
|
|
223113
223259
|
}).then(function (res) {
|
|
223114
|
-
if (res ===
|
|
223260
|
+
if (res === 'printend') {
|
|
223115
223261
|
if (callback) {
|
|
223116
223262
|
callback(hoEditorFactory.printStatus.printRecord.last());
|
|
223117
223263
|
}
|
|
223118
223264
|
|
|
223119
|
-
hoEditorFactory.drawTree.paintStatus = beforeStatus;
|
|
223120
|
-
hoEditorFactory.printStatus.printRange = 2;
|
|
223121
223265
|
hoEditorFactory.printStatus.printAppoint = '';
|
|
223122
223266
|
hoEditorFactory.printStatus.drawPrintRecord.Position = [0, 0];
|
|
223123
223267
|
hoEditorFactory.startPageNum = 0;
|
|
223124
223268
|
hoEditorFactory.firstPageStartTop = 0;
|
|
223125
|
-
|
|
223126
|
-
hoEditorFactory.printStatus.
|
|
223127
|
-
|
|
223269
|
+
|
|
223270
|
+
if (hoEditorFactory.printStatus.printRange !== 2) {
|
|
223271
|
+
hoEditorFactory.printStatus.printRange = 2;
|
|
223272
|
+
hoEditorFactory.drawTree.paintStatus = 5;
|
|
223273
|
+
hoEditorFactory.vueController.openXml(xml);
|
|
223274
|
+
} else {
|
|
223275
|
+
hoEditorFactory.drawTree.paintStatus = beforeStatus;
|
|
223276
|
+
hoEditorFactory.printStatus.clearArea();
|
|
223277
|
+
hoEditorFactory.printStatus.drawPrintRecord.clear();
|
|
223278
|
+
hoEditorFactory.vueController.rebuildAll(true);
|
|
223279
|
+
}
|
|
223128
223280
|
}
|
|
223129
223281
|
});
|
|
223130
223282
|
}
|
|
@@ -223192,7 +223344,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223192
223344
|
while (1) {
|
|
223193
223345
|
switch (_context5.prev = _context5.next) {
|
|
223194
223346
|
case 0:
|
|
223195
|
-
console.time(
|
|
223347
|
+
console.time('连续打印总用时');
|
|
223196
223348
|
list = [];
|
|
223197
223349
|
xmlInfoes.xmlList.forEach(function (v) {
|
|
223198
223350
|
list.push([v.isMerge, v.xml]);
|
|
@@ -223211,7 +223363,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223211
223363
|
hoEditorFactory.printStatus.printMode = 0;
|
|
223212
223364
|
hoEditorFactory.drawTree.paintStatus = DrawTree/* PaintState.psPreview */.Dh.psPreview;
|
|
223213
223365
|
hPromise = Promise.resolve();
|
|
223214
|
-
console.time(
|
|
223366
|
+
console.time('连续查看病历合并总用时');
|
|
223215
223367
|
hPromise = hPromise.then(function (res) {
|
|
223216
223368
|
return new Promise(function (resolve) {
|
|
223217
223369
|
Promise.all([hoEditorFactory.vueController.openDocsForPrint(list)]).then(function () {
|
|
@@ -223225,8 +223377,8 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223225
223377
|
});
|
|
223226
223378
|
});
|
|
223227
223379
|
hPromise = hPromise.then(function () {
|
|
223228
|
-
console.timeEnd(
|
|
223229
|
-
console.time(
|
|
223380
|
+
console.timeEnd('连续查看病历合并总用时');
|
|
223381
|
+
console.time('生成pdf用时');
|
|
223230
223382
|
return new Promise( /*#__PURE__*/function () {
|
|
223231
223383
|
var _ref2 = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee4(resolve) {
|
|
223232
223384
|
var orientation, format, options, PDF;
|
|
@@ -223234,23 +223386,23 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223234
223386
|
while (1) {
|
|
223235
223387
|
switch (_context4.prev = _context4.next) {
|
|
223236
223388
|
case 0:
|
|
223237
|
-
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ?
|
|
223389
|
+
orientation = hoEditorFactory.pageProperty.widthMm > hoEditorFactory.pageProperty.heightMm ? 'l' : 'p';
|
|
223238
223390
|
format = [hoEditorFactory.pageProperty.widthPixes, hoEditorFactory.pageProperty.heightPixes];
|
|
223239
223391
|
|
|
223240
|
-
if (hoEditorFactory.isFixedPrintToA4) {
|
|
223392
|
+
if (hoEditorFactory.isFixedPrintToA4 == '1') {
|
|
223241
223393
|
format = _this5._a4Size[orientation];
|
|
223242
223394
|
}
|
|
223243
223395
|
|
|
223244
|
-
if (hoEditorFactory.
|
|
223396
|
+
if (hoEditorFactory.isFixedPrintToA4 == '2' && hoEditorFactory.pageProperty.pageSize.toLocaleLowerCase() == 'a5') {
|
|
223245
223397
|
format = [793, 1122];
|
|
223246
223398
|
orientation = 'p';
|
|
223247
223399
|
}
|
|
223248
223400
|
|
|
223249
223401
|
options = {
|
|
223250
223402
|
orientation: orientation,
|
|
223251
|
-
unit:
|
|
223403
|
+
unit: 'px',
|
|
223252
223404
|
format: format,
|
|
223253
|
-
hotfixes: [
|
|
223405
|
+
hotfixes: ['px_scaling']
|
|
223254
223406
|
};
|
|
223255
223407
|
PDF = new jspdf/* default */.ZP(options);
|
|
223256
223408
|
PrintStatus/* Print.printToPDF */.Kh.printToPDF(_this5._hoEditorFactoryID, PDF, undefined, undefined, resolve, positionY, format);
|
|
@@ -223271,7 +223423,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223271
223423
|
_context5.next = 17;
|
|
223272
223424
|
return hPromise.then(function (res) {
|
|
223273
223425
|
if (res) {
|
|
223274
|
-
console.timeEnd(
|
|
223426
|
+
console.timeEnd('生成pdf用时');
|
|
223275
223427
|
return new Promise(function (resolves) {
|
|
223276
223428
|
var last = hoEditorFactory.printStatus.printRecord.last();
|
|
223277
223429
|
var pos;
|
|
@@ -223306,7 +223458,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223306
223458
|
// hoEditorFactory.drawTree.rebuildAllDrawLine(false);
|
|
223307
223459
|
// }, 0);
|
|
223308
223460
|
|
|
223309
|
-
console.timeEnd(
|
|
223461
|
+
console.timeEnd('连续打印总用时');
|
|
223310
223462
|
resolves(pos);
|
|
223311
223463
|
});
|
|
223312
223464
|
} else {
|
|
@@ -223322,7 +223474,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223322
223474
|
// hoEditorFactory.drawTree.rebuildAllDrawLine(false);
|
|
223323
223475
|
// }, 0);
|
|
223324
223476
|
|
|
223325
|
-
console.timeEnd(
|
|
223477
|
+
console.timeEnd('连续打印总用时');
|
|
223326
223478
|
return null;
|
|
223327
223479
|
}
|
|
223328
223480
|
});
|
|
@@ -223360,7 +223512,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223360
223512
|
}()
|
|
223361
223513
|
/**
|
|
223362
223514
|
* 批量打印病历 当前
|
|
223363
|
-
* @param xmlList [boolean, string, boolean
|
|
223515
|
+
* @param xmlList [string, boolean, string, boolean][]
|
|
223364
223516
|
* 四个参数分别是: xml内容 是否合并 病程记录id:用来判断是否是病程记录和返回对应病程记录的坐标(处理多个不同病程记录的情况) 是否是最后一份病程记录
|
|
223365
223517
|
*/
|
|
223366
223518
|
|
|
@@ -223384,8 +223536,8 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223384
223536
|
xmlIndex = -1;
|
|
223385
223537
|
mergeList = [];
|
|
223386
223538
|
options = {
|
|
223387
|
-
unit:
|
|
223388
|
-
hotfixes: [
|
|
223539
|
+
unit: 'px',
|
|
223540
|
+
hotfixes: ['px_scaling'],
|
|
223389
223541
|
compress: true
|
|
223390
223542
|
};
|
|
223391
223543
|
PDF = new jspdf/* default */.ZP(options);
|
|
@@ -223469,7 +223621,7 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
223469
223621
|
hoEditorFactory.drawTree.paintStatus = beforePrintStatus;
|
|
223470
223622
|
hoEditorFactory.vueController.openXml(xml);
|
|
223471
223623
|
PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
|
|
223472
|
-
name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() :
|
|
223624
|
+
name = hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档';
|
|
223473
223625
|
PrintStatus/* Print.openDataUriInWindow */.Kh.openDataUriInWindow(PDF, name, hoEditorFactory.pageProperty.widthPixes);
|
|
223474
223626
|
}
|
|
223475
223627
|
|
|
@@ -224380,6 +224532,7 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
224380
224532
|
this._lastSaveTime = new Date(Date.now());
|
|
224381
224533
|
this._superiorSigns = []; //上级医生签名
|
|
224382
224534
|
|
|
224535
|
+
this._isEnabledGlobalColor = false;
|
|
224383
224536
|
this._hoEditorFactoryId = id;
|
|
224384
224537
|
}
|
|
224385
224538
|
/**
|
|
@@ -225038,13 +225191,13 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
225038
225191
|
}
|
|
225039
225192
|
}
|
|
225040
225193
|
}, {
|
|
225041
|
-
key: "
|
|
225194
|
+
key: "isRotate",
|
|
225042
225195
|
get: function get() {
|
|
225043
|
-
return this.
|
|
225196
|
+
return this._isRotate;
|
|
225044
225197
|
},
|
|
225045
225198
|
set: function set(value) {
|
|
225046
|
-
if (this.
|
|
225047
|
-
this.
|
|
225199
|
+
if (this._isRotate !== value) {
|
|
225200
|
+
this._isRotate = value;
|
|
225048
225201
|
}
|
|
225049
225202
|
}
|
|
225050
225203
|
}, {
|
|
@@ -225077,6 +225230,16 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
225077
225230
|
this._printBlack = value;
|
|
225078
225231
|
}
|
|
225079
225232
|
}
|
|
225233
|
+
}, {
|
|
225234
|
+
key: "isEnabledGlobalColor",
|
|
225235
|
+
get: function get() {
|
|
225236
|
+
return this._isEnabledGlobalColor;
|
|
225237
|
+
},
|
|
225238
|
+
set: function set(value) {
|
|
225239
|
+
if (this._isEnabledGlobalColor !== value) {
|
|
225240
|
+
this._isEnabledGlobalColor = value;
|
|
225241
|
+
}
|
|
225242
|
+
}
|
|
225080
225243
|
}, {
|
|
225081
225244
|
key: "clear",
|
|
225082
225245
|
value: function clear() {
|
|
@@ -225433,9 +225596,9 @@ var HoFooter_component = normalizeComponent(
|
|
|
225433
225596
|
)
|
|
225434
225597
|
|
|
225435
225598
|
/* harmony default export */ var components_HoFooter = (HoFooter_component.exports);
|
|
225436
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/ControlModal.vue?vue&type=template&id=
|
|
225437
|
-
var
|
|
225438
|
-
var
|
|
225599
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/ControlModal.vue?vue&type=template&id=36fbe7eb&
|
|
225600
|
+
var ControlModalvue_type_template_id_36fbe7eb_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"toolModals",staticClass:"control-modal",on:{"mousedown":_vm.toolModalDown}},[(_vm.controlType === 'barcode')?_c('Barcode',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'qrcode')?_c('QrCode',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'express')?_c('ExpressionForm',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"controlProperty":_vm.controlProperty},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'text')?_c('TextDialog',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoTextFieldModal",fn:function(){return [_vm._t("hoTextModal")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlType === 'date')?_c('DateDialog',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoDateFieldModal",fn:function(){return [_vm._t("hoDateModal")]},proxy:true},{key:"hoTextFieldModal",fn:function(){return [_vm._t("hoTextModal")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlType === 'select')?_c('SelectDialog',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'gestation')?_c('Gestation',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table')?_c('TableProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table-row')?_c('TableRowProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table-cell')?_c('TableCellProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table-col')?_c('TableColProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.isCustoms)?_c('CustomAttributes',{attrs:{"isTableProperty":_vm.isTableProperty},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.isDataSource)?_c('DataSourceDialog',{on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.isListStyle)?_c('ListSource',{on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'RadioBox' || _vm.controlType === 'CheckBox')?_c('RadioCheckbox',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId,"controlProperty":_vm.controlProperty},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'waterset')?_c('WaterSetDialog',{attrs:{"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'comment')?_c('CommentDialog',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"insertComments":_vm.insertComments,"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoCommentModal",fn:function(){return [_vm._t("hoComment")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlType === 'pageInfoes')?_c('PageInfoes',{attrs:{"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'delimiter')?_c('Delimiter',{attrs:{"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'sign')?_c('Sign',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'upload-image')?_c('UploadImageDialog',{attrs:{"uploadImageParams":_vm.uploadImageParams,"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'edit-image')?_c('CanvasImageDialog',{attrs:{"vueController":_vm.vueController,"hoEditorFactoryId":_vm.hoEditorFactoryId,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'paragraph')?_c('ParagraphDialog',{attrs:{"vueController":_vm.vueController,"controlProperty":_vm.controlProperty,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoParagraph",fn:function(){return [_vm._t("hoParagraphModal")]},proxy:true}],null,true)}):_vm._e()],1)}
|
|
225601
|
+
var ControlModalvue_type_template_id_36fbe7eb_staticRenderFns = []
|
|
225439
225602
|
|
|
225440
225603
|
|
|
225441
225604
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/selectDialog/SelectDialog.vue?vue&type=template&id=3b6d4c1e&scoped=true&
|
|
@@ -229579,6 +229742,94 @@ var CanvasImageDialog_component = normalizeComponent(
|
|
|
229579
229742
|
|
|
229580
229743
|
|
|
229581
229744
|
|
|
229745
|
+
;// 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/paragraph/ParagraphDialog.vue?vue&type=template&id=2a071484&
|
|
229746
|
+
var ParagraphDialogvue_type_template_id_2a071484_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.animationClassNames},[_c('header',{staticClass:"modal-title"},[_c('span',[_vm._v("段落属性设置")]),_c('i',{staticClass:"el-icon-close modal-title-close",on:{"click":_vm.handleClose}})]),_c('section',{staticClass:"modal-content"},[_vm._t("hoParagraph")],2),_c('footer',{staticClass:"ho-modal-footer"},[_c('el-button',{attrs:{"size":"small","type":"primary"},on:{"click":_vm.sure}},[_vm._v("确定")]),_c('el-button',{staticStyle:{"margin-left":"30px"},attrs:{"size":"small"},on:{"click":_vm.handleClose}},[_vm._v("取消")])],1)])}
|
|
229747
|
+
var ParagraphDialogvue_type_template_id_2a071484_staticRenderFns = []
|
|
229748
|
+
|
|
229749
|
+
|
|
229750
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/paragraph/ParagraphDialog.vue?vue&type=script&lang=js&
|
|
229751
|
+
//
|
|
229752
|
+
//
|
|
229753
|
+
//
|
|
229754
|
+
//
|
|
229755
|
+
//
|
|
229756
|
+
//
|
|
229757
|
+
//
|
|
229758
|
+
//
|
|
229759
|
+
//
|
|
229760
|
+
//
|
|
229761
|
+
//
|
|
229762
|
+
//
|
|
229763
|
+
//
|
|
229764
|
+
//
|
|
229765
|
+
//
|
|
229766
|
+
//
|
|
229767
|
+
//
|
|
229768
|
+
//
|
|
229769
|
+
//
|
|
229770
|
+
//
|
|
229771
|
+
/* harmony default export */ var ParagraphDialogvue_type_script_lang_js_ = ({
|
|
229772
|
+
name: 'ParagraphDialog',
|
|
229773
|
+
props: {
|
|
229774
|
+
hoEditorFactoryId: {
|
|
229775
|
+
type: String,
|
|
229776
|
+
required: true
|
|
229777
|
+
},
|
|
229778
|
+
controlStatus: {
|
|
229779
|
+
type: String,
|
|
229780
|
+
required: true
|
|
229781
|
+
},
|
|
229782
|
+
controlProperty: {
|
|
229783
|
+
type: Object,
|
|
229784
|
+
required: true
|
|
229785
|
+
}
|
|
229786
|
+
},
|
|
229787
|
+
data: function data() {
|
|
229788
|
+
return {
|
|
229789
|
+
textActiveName: 'first',
|
|
229790
|
+
animationClassNames: 'control-modal-contents paragraph-modal animation-in'
|
|
229791
|
+
};
|
|
229792
|
+
},
|
|
229793
|
+
created: function created() {},
|
|
229794
|
+
mounted: function mounted() {},
|
|
229795
|
+
methods: {
|
|
229796
|
+
sure: function sure() {
|
|
229797
|
+
this.handleClose();
|
|
229798
|
+
},
|
|
229799
|
+
handleClose: function handleClose() {
|
|
229800
|
+
this.animationClassNames = 'control-modal-contents paragraph-modal animation-out';
|
|
229801
|
+
this.$emit('closed');
|
|
229802
|
+
}
|
|
229803
|
+
}
|
|
229804
|
+
});
|
|
229805
|
+
;// CONCATENATED MODULE: ./src/components/controls/paragraph/ParagraphDialog.vue?vue&type=script&lang=js&
|
|
229806
|
+
/* harmony default export */ var paragraph_ParagraphDialogvue_type_script_lang_js_ = (ParagraphDialogvue_type_script_lang_js_);
|
|
229807
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22[0].rules[0].use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/paragraph/ParagraphDialog.vue?vue&type=style&index=0&lang=scss&
|
|
229808
|
+
// extracted by mini-css-extract-plugin
|
|
229809
|
+
|
|
229810
|
+
;// CONCATENATED MODULE: ./src/components/controls/paragraph/ParagraphDialog.vue?vue&type=style&index=0&lang=scss&
|
|
229811
|
+
|
|
229812
|
+
;// CONCATENATED MODULE: ./src/components/controls/paragraph/ParagraphDialog.vue
|
|
229813
|
+
|
|
229814
|
+
|
|
229815
|
+
|
|
229816
|
+
;
|
|
229817
|
+
|
|
229818
|
+
|
|
229819
|
+
/* normalize component */
|
|
229820
|
+
|
|
229821
|
+
var ParagraphDialog_component = normalizeComponent(
|
|
229822
|
+
paragraph_ParagraphDialogvue_type_script_lang_js_,
|
|
229823
|
+
ParagraphDialogvue_type_template_id_2a071484_render,
|
|
229824
|
+
ParagraphDialogvue_type_template_id_2a071484_staticRenderFns,
|
|
229825
|
+
false,
|
|
229826
|
+
null,
|
|
229827
|
+
null,
|
|
229828
|
+
null
|
|
229829
|
+
|
|
229830
|
+
)
|
|
229831
|
+
|
|
229832
|
+
/* harmony default export */ var ParagraphDialog = (ParagraphDialog_component.exports);
|
|
229582
229833
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/watermark/WaterSet.vue?vue&type=template&id=58b59c58&
|
|
229583
229834
|
var WaterSetvue_type_template_id_58b59c58_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control-modal-contents water-set animation-in"},[_c('header',{staticClass:"modal-title"},[_c('span',[_vm._v("水印")]),_c('i',{staticClass:"el-icon-close modal-title-close",on:{"click":_vm.handleClose}})]),_c('section',{staticClass:"modal-content"},[_c('ul',{staticClass:"control-list"},[_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label",staticStyle:{"width":"50px"}},[_vm._v("内容")]),_c('el-input',{attrs:{"type":"text","size":"mini","clearable":"","placeholder":"文本内容","maxlength":"20","show-word-limit":""},on:{"input":_vm.codeChange},model:{value:(_vm.textContent),callback:function ($$v) {_vm.textContent=$$v},expression:"textContent"}})],1),_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label",staticStyle:{"width":"50px"}},[_vm._v("角度")]),_c('el-radio-group',{attrs:{"size":"mini"},on:{"change":_vm.codeChange},model:{value:(_vm.rotate),callback:function ($$v) {_vm.rotate=$$v},expression:"rotate"}},[_c('el-radio-button',{attrs:{"label":0}},[_vm._v("水平")]),_c('el-radio-button',{attrs:{"label":1}},[_vm._v("倾斜")])],1)],1),_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label",staticStyle:{"width":"50px"}},[_vm._v("颜色")]),_c('el-color-picker',{attrs:{"show-alpha":""},on:{"change":_vm.codeChange},model:{value:(_vm.color),callback:function ($$v) {_vm.color=$$v},expression:"color"}})],1)]),_c('div',{staticClass:"section-right"},[_c('fieldset',{staticClass:"fieldset"},[_c('legend',[_vm._v("预 览")]),_c('div',{attrs:{"id":"water"}},[_c('img',{directives:[{name:"show",rawName:"v-show",value:(_vm.waterUrl),expression:"waterUrl"}],attrs:{"src":_vm.waterUrl,"alt":"背景水印"}})])])])]),_c('footer',{staticClass:"ho-modal-footer"},[_c('el-button',{attrs:{"size":"small","type":"primary"},on:{"click":_vm.sure}},[_vm._v("确定")]),_c('el-button',{staticStyle:{"margin-left":"30px"},attrs:{"size":"small"},on:{"click":_vm.handleClose}},[_vm._v("取消")])],1)])}
|
|
229584
229835
|
var WaterSetvue_type_template_id_58b59c58_staticRenderFns = []
|
|
@@ -231254,6 +231505,7 @@ var TableCellProperty_component = normalizeComponent(
|
|
|
231254
231505
|
|
|
231255
231506
|
|
|
231256
231507
|
|
|
231508
|
+
|
|
231257
231509
|
|
|
231258
231510
|
|
|
231259
231511
|
var ControlModal = /*#__PURE__*/function (_Mixins) {
|
|
@@ -231364,7 +231616,8 @@ ControlModal = __decorate([vue_class_component_esm({
|
|
|
231364
231616
|
PageInfoes: pageInfoes,
|
|
231365
231617
|
Delimiter: delimiter,
|
|
231366
231618
|
UploadImageDialog: upload_UploadImageDialog,
|
|
231367
|
-
CanvasImageDialog: CanvasImageDialog
|
|
231619
|
+
CanvasImageDialog: CanvasImageDialog,
|
|
231620
|
+
ParagraphDialog: ParagraphDialog
|
|
231368
231621
|
}
|
|
231369
231622
|
})], ControlModal);
|
|
231370
231623
|
/* harmony default export */ var ControlModalvue_type_script_lang_ts_ = (ControlModal);
|
|
@@ -231380,8 +231633,8 @@ ControlModal = __decorate([vue_class_component_esm({
|
|
|
231380
231633
|
;
|
|
231381
231634
|
var ControlModal_component = normalizeComponent(
|
|
231382
231635
|
controls_ControlModalvue_type_script_lang_ts_,
|
|
231383
|
-
|
|
231384
|
-
|
|
231636
|
+
ControlModalvue_type_template_id_36fbe7eb_render,
|
|
231637
|
+
ControlModalvue_type_template_id_36fbe7eb_staticRenderFns,
|
|
231385
231638
|
false,
|
|
231386
231639
|
null,
|
|
231387
231640
|
null,
|
|
@@ -232505,12 +232758,6 @@ var json_font_namespaceObject = JSON.parse('{"TN":[{"ch":"宋体","en":"SimSun",
|
|
|
232505
232758
|
|
|
232506
232759
|
|
|
232507
232760
|
|
|
232508
|
-
|
|
232509
|
-
|
|
232510
|
-
|
|
232511
|
-
|
|
232512
|
-
|
|
232513
|
-
|
|
232514
232761
|
|
|
232515
232762
|
|
|
232516
232763
|
|
|
@@ -232600,14 +232847,14 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232600
232847
|
_this.defaultDocProperty = {
|
|
232601
232848
|
version: version,
|
|
232602
232849
|
type: 0,
|
|
232603
|
-
title:
|
|
232604
|
-
docID:
|
|
232605
|
-
patientID:
|
|
232606
|
-
patientName:
|
|
232607
|
-
lastEditTime:
|
|
232608
|
-
lastEditorID:
|
|
232609
|
-
lastEditorName:
|
|
232610
|
-
currentIP:
|
|
232850
|
+
title: '',
|
|
232851
|
+
docID: '',
|
|
232852
|
+
patientID: '',
|
|
232853
|
+
patientName: '',
|
|
232854
|
+
lastEditTime: '',
|
|
232855
|
+
lastEditorID: '',
|
|
232856
|
+
lastEditorName: '',
|
|
232857
|
+
currentIP: ''
|
|
232611
232858
|
};
|
|
232612
232859
|
_this.contentIsModify = {
|
|
232613
232860
|
isModify: false
|
|
@@ -232623,7 +232870,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232623
232870
|
}, {
|
|
232624
232871
|
key: "contentIsModifyChange",
|
|
232625
232872
|
value: function contentIsModifyChange(value) {
|
|
232626
|
-
this.$emit(
|
|
232873
|
+
this.$emit('contentIsModify', this.contentIsModify);
|
|
232627
232874
|
}
|
|
232628
232875
|
}, {
|
|
232629
232876
|
key: "editJsonChange",
|
|
@@ -232640,12 +232887,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232640
232887
|
}, {
|
|
232641
232888
|
key: "textStyleChange",
|
|
232642
232889
|
value: function textStyleChange(val) {
|
|
232643
|
-
this.$emit(
|
|
232890
|
+
this.$emit('textStyleChange', val);
|
|
232644
232891
|
}
|
|
232645
232892
|
}, {
|
|
232646
232893
|
key: "modalStatusChange",
|
|
232647
232894
|
value: function modalStatusChange(newStr) {
|
|
232648
|
-
if (newStr[0] !==
|
|
232895
|
+
if (newStr[0] !== 'find') {
|
|
232649
232896
|
this.setControlProperty(newStr[0], newStr[1], newStr[2]);
|
|
232650
232897
|
} else {
|
|
232651
232898
|
this.controlFindType = true;
|
|
@@ -232654,20 +232901,20 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232654
232901
|
}, {
|
|
232655
232902
|
key: "controlTypeChange",
|
|
232656
232903
|
value: function controlTypeChange(newValue, oldValue) {
|
|
232657
|
-
if (newValue ===
|
|
232658
|
-
this.$emit(
|
|
232904
|
+
if (newValue === '' && ['text', 'date', 'comment'].includes(oldValue)) {
|
|
232905
|
+
this.$emit('closeTextModal');
|
|
232659
232906
|
this.customPropertyValue = {};
|
|
232660
232907
|
}
|
|
232661
232908
|
|
|
232662
232909
|
if (['text', 'date'].includes(newValue)) {
|
|
232663
232910
|
if ((0,type/* isObject */.Kn)(this.customPropertyValue)) {
|
|
232664
|
-
this.$emit(
|
|
232911
|
+
this.$emit('openTextModal', _objectSpread2({}, this.customPropertyValue));
|
|
232665
232912
|
}
|
|
232666
232913
|
} else if (['comment'].includes(newValue)) {
|
|
232667
232914
|
var _HOEditorFactorys$ins;
|
|
232668
232915
|
|
|
232669
232916
|
var customProperty = (_HOEditorFactorys$ins = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId).vueController.getOnSelectedComment()) === null || _HOEditorFactorys$ins === void 0 ? void 0 : _HOEditorFactorys$ins.customProperty;
|
|
232670
|
-
if (customProperty) this.$emit(
|
|
232917
|
+
if (customProperty) this.$emit('openTextModal', _objectSpread2({}, customProperty));
|
|
232671
232918
|
}
|
|
232672
232919
|
}
|
|
232673
232920
|
}, {
|
|
@@ -232699,14 +232946,15 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232699
232946
|
value: function isFixedPrintToA4Change() {
|
|
232700
232947
|
var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
|
|
232701
232948
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
232702
|
-
|
|
232703
|
-
|
|
232704
|
-
|
|
232705
|
-
|
|
232706
|
-
|
|
232707
|
-
|
|
232708
|
-
|
|
232709
|
-
|
|
232949
|
+
var isFixedPrintToA4 = this.isFixedPrintToA4;
|
|
232950
|
+
|
|
232951
|
+
if (isFixedPrintToA4 === true) {
|
|
232952
|
+
isFixedPrintToA4 = '1';
|
|
232953
|
+
} else if (isFixedPrintToA4 === false) {
|
|
232954
|
+
isFixedPrintToA4 = '';
|
|
232955
|
+
}
|
|
232956
|
+
|
|
232957
|
+
hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = isFixedPrintToA4);
|
|
232710
232958
|
} // 监听默认打印纸张设置变化
|
|
232711
232959
|
|
|
232712
232960
|
}, {
|
|
@@ -232750,6 +232998,13 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232750
232998
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
232751
232999
|
hoEditorFactory && (hoEditorFactory.printBlack = this.printBlack);
|
|
232752
233000
|
}
|
|
233001
|
+
}, {
|
|
233002
|
+
key: "isEnabledGlobalColorChange",
|
|
233003
|
+
value: function isEnabledGlobalColorChange() {
|
|
233004
|
+
var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
|
|
233005
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
233006
|
+
hoEditorFactory && (hoEditorFactory.isEnabledGlobalColor = this.isEnabledGlobalColor);
|
|
233007
|
+
}
|
|
232753
233008
|
}, {
|
|
232754
233009
|
key: "created",
|
|
232755
233010
|
value: function created() {
|
|
@@ -232780,7 +233035,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232780
233035
|
}); // 初始化所有文档
|
|
232781
233036
|
|
|
232782
233037
|
this.docList.forEach(function () {
|
|
232783
|
-
var id = (0,util/* generateID */.y)(
|
|
233038
|
+
var id = (0,util/* generateID */.y)('HO');
|
|
232784
233039
|
var hoEditor = new HOEditorFactory(id);
|
|
232785
233040
|
|
|
232786
233041
|
_this3.hoEditorFactoryIdList.push(id);
|
|
@@ -232789,11 +233044,18 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232789
233044
|
hoEditor.superiorSigns = (0,toConsumableArray/* default */.Z)(_this3.superiorSigns);
|
|
232790
233045
|
}
|
|
232791
233046
|
|
|
232792
|
-
|
|
232793
|
-
|
|
233047
|
+
if (_this3.isFixedPrintToA4 === true) {
|
|
233048
|
+
hoEditor.isFixedPrintToA4 = '1';
|
|
233049
|
+
} else if (_this3.isFixedPrintToA4 === false) {
|
|
233050
|
+
hoEditor.isFixedPrintToA4 = '';
|
|
233051
|
+
} else {
|
|
233052
|
+
hoEditor.isFixedPrintToA4 = _this3.isFixedPrintToA4;
|
|
233053
|
+
}
|
|
233054
|
+
|
|
232794
233055
|
hoEditor.isUseImagePrint = _this3.isUseImagePrint;
|
|
232795
233056
|
hoEditor.isUseForm = _this3.isUseForm;
|
|
232796
233057
|
hoEditor.printBlack = _this3.printBlack;
|
|
233058
|
+
hoEditor.isEnabledGlobalColor = _this3.isEnabledGlobalColor;
|
|
232797
233059
|
hoEditor.contentIsModify = _this3.contentIsModify;
|
|
232798
233060
|
hoEditor.isCanEditHeadFoot = _this3.isCanEditHeadFoot;
|
|
232799
233061
|
hoEditor.docTree.docProperty = _this3.defaultDocProperty;
|
|
@@ -232821,20 +233083,21 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232821
233083
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId);
|
|
232822
233084
|
nodeInfoes.rightTypeIsTable = hoEditorFactory.docTree.curDomRange.normalize().inSameTable()[0];
|
|
232823
233085
|
nodeInfoes.rightPosition = rightPosition;
|
|
233086
|
+
var node = nodeInfoes.node();
|
|
232824
233087
|
|
|
232825
|
-
|
|
233088
|
+
nodeInfoes.labelNode = function () {
|
|
232826
233089
|
var labelNode = [];
|
|
232827
|
-
var isIncludes =
|
|
233090
|
+
var isIncludes = '';
|
|
232828
233091
|
var hoEditor = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(_this4.activeDocId);
|
|
232829
233092
|
var currentDomRange = hoEditor.vueController.getDomRange();
|
|
232830
233093
|
|
|
232831
233094
|
if (currentDomRange !== null && currentDomRange !== void 0 && currentDomRange.isEmpty) {
|
|
232832
|
-
if (
|
|
232833
|
-
labelNode.push(
|
|
232834
|
-
isIncludes =
|
|
233095
|
+
if (node instanceof LabelNode/* LabelNode */.P) {
|
|
233096
|
+
labelNode.push(node);
|
|
233097
|
+
isIncludes = 'toText';
|
|
232835
233098
|
}
|
|
232836
233099
|
} else {
|
|
232837
|
-
isIncludes =
|
|
233100
|
+
isIncludes = 'toLabel';
|
|
232838
233101
|
var startPath = currentDomRange.startPath;
|
|
232839
233102
|
var endPath = currentDomRange.endPath;
|
|
232840
233103
|
var selectNodes = DomRange/* DomRange.getSelectDomNodes */.a.getSelectDomNodes(_this4.activeDocId, startPath, endPath, true)[0];
|
|
@@ -232842,7 +233105,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232842
233105
|
if (selectNodes.length > 0) {
|
|
232843
233106
|
selectNodes.forEach(function (v) {
|
|
232844
233107
|
if (v instanceof LabelNode/* LabelNode */.P) {
|
|
232845
|
-
isIncludes =
|
|
233108
|
+
isIncludes = 'toText';
|
|
232846
233109
|
labelNode.push(v);
|
|
232847
233110
|
}
|
|
232848
233111
|
});
|
|
@@ -232853,16 +233116,20 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232853
233116
|
labelNode: [].concat(labelNode),
|
|
232854
233117
|
isIncludes: isIncludes
|
|
232855
233118
|
};
|
|
232856
|
-
};
|
|
233119
|
+
}; // 是否是元素类型;
|
|
232857
233120
|
|
|
232858
|
-
nodeInfoes.labelNode = getLabelNode; // 是否是元素类型;
|
|
232859
233121
|
|
|
232860
233122
|
nodeInfoes.isElement = false;
|
|
232861
|
-
nodeInfoes.canShowComment = hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psEdit */.Dh.psEdit || hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psReview */.Dh.psReview || hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psReadOnly */.Dh.psReadOnly;
|
|
232862
|
-
|
|
232863
|
-
|
|
232864
|
-
|
|
232865
|
-
|
|
233123
|
+
nodeInfoes.canShowComment = hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psEdit */.Dh.psEdit || hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psReview */.Dh.psReview || hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psReadOnly */.Dh.psReadOnly; // if (
|
|
233124
|
+
// node instanceof TextInputFieldNode ||
|
|
233125
|
+
// node instanceof DateTimeNode ||
|
|
233126
|
+
// node instanceof DownListNode ||
|
|
233127
|
+
// node instanceof RadioAndCheckBoxNode ||
|
|
233128
|
+
// node instanceof MarkNode ||
|
|
233129
|
+
// (node instanceof TextNode && node.parentNode instanceof TextInputFieldNode)
|
|
233130
|
+
// ) {
|
|
233131
|
+
// nodeInfoes.isElement = true;
|
|
233132
|
+
// }
|
|
232866
233133
|
|
|
232867
233134
|
nodeInfoes.isHideComments = hoEditorFactory.isHideComments;
|
|
232868
233135
|
nodeInfoes.activePageIndex = this.activePageIndex;
|
|
@@ -232881,7 +233148,19 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232881
233148
|
};
|
|
232882
233149
|
}
|
|
232883
233150
|
|
|
232884
|
-
|
|
233151
|
+
nodeInfoes.getParagraphNode = function () {
|
|
233152
|
+
var _hoEditorFactory$vueC;
|
|
233153
|
+
|
|
233154
|
+
var node = (_hoEditorFactory$vueC = hoEditorFactory.vueController.findNodebyPath(_this4.domRange.endPath)) === null || _hoEditorFactory$vueC === void 0 ? void 0 : _hoEditorFactory$vueC.node;
|
|
233155
|
+
|
|
233156
|
+
if (node) {
|
|
233157
|
+
return hoEditorFactory.drawTree.getDrawLineByDNode(node.drawNodes[0]).paragraphNode;
|
|
233158
|
+
}
|
|
233159
|
+
|
|
233160
|
+
return null;
|
|
233161
|
+
};
|
|
233162
|
+
|
|
233163
|
+
this.$emit('rightClickEvent', nodeInfoes);
|
|
232885
233164
|
}
|
|
232886
233165
|
/**
|
|
232887
233166
|
* 初始化事件
|
|
@@ -232923,7 +233202,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232923
233202
|
}, {
|
|
232924
233203
|
key: "insertComments",
|
|
232925
233204
|
value: function insertComments(content) {
|
|
232926
|
-
this.$emit(
|
|
233205
|
+
this.$emit('insertComments', content);
|
|
232927
233206
|
}
|
|
232928
233207
|
/**
|
|
232929
233208
|
* 双击事件
|
|
@@ -232932,7 +233211,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232932
233211
|
}, {
|
|
232933
233212
|
key: "dblNodeClick",
|
|
232934
233213
|
value: function dblNodeClick(node) {
|
|
232935
|
-
this.$emit(
|
|
233214
|
+
this.$emit('dblClickEvent', node);
|
|
232936
233215
|
} // 设置字体
|
|
232937
233216
|
|
|
232938
233217
|
}, {
|
|
@@ -232954,7 +233233,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232954
233233
|
this.activeDocId = activeDocId;
|
|
232955
233234
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId);
|
|
232956
233235
|
hoEditorFactory.hoLocalStorage.initHoWebSql();
|
|
232957
|
-
this.$emit(
|
|
233236
|
+
this.$emit('docReady', {
|
|
232958
233237
|
vueController: hoEditorFactory.vueController,
|
|
232959
233238
|
baseController: hoEditorFactory.baseController,
|
|
232960
233239
|
domController: hoEditorFactory.domController,
|
|
@@ -232985,7 +233264,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232985
233264
|
var property = _objectSpread2({}, pageProperty); // 字体
|
|
232986
233265
|
|
|
232987
233266
|
|
|
232988
|
-
property.fontFormat = property.fontFormat ? (_property$fontFormat = property.fontFormat) === null || _property$fontFormat === void 0 ? void 0 : _property$fontFormat.match(/[\u4e00-\u9fa5]/g).join(
|
|
233267
|
+
property.fontFormat = property.fontFormat ? (_property$fontFormat = property.fontFormat) === null || _property$fontFormat === void 0 ? void 0 : _property$fontFormat.match(/[\u4e00-\u9fa5]/g).join('') : '宋体'; // 字号
|
|
232989
233268
|
|
|
232990
233269
|
if (isNaN(Number(property.fontSize))) {
|
|
232991
233270
|
json_font_namespaceObject.CH.forEach(function (v) {
|
|
@@ -233012,12 +233291,12 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
233012
233291
|
|
|
233013
233292
|
if (pageProperty.elementBackColor) {
|
|
233014
233293
|
hoEditorFactory.vueController.setReviewLevelColor({
|
|
233015
|
-
reviewLev1Color:
|
|
233016
|
-
reviewLev2Color:
|
|
233017
|
-
reviewLev3Color:
|
|
233018
|
-
fieldColor:
|
|
233019
|
-
dateTimeColor:
|
|
233020
|
-
downListColor:
|
|
233294
|
+
reviewLev1Color: '#F19191',
|
|
233295
|
+
reviewLev2Color: '#FFFFFF',
|
|
233296
|
+
reviewLev3Color: '#FFFFFF',
|
|
233297
|
+
fieldColor: '#DFFFFF',
|
|
233298
|
+
dateTimeColor: '#FBFAD0',
|
|
233299
|
+
downListColor: '#D2ECB1'
|
|
233021
233300
|
});
|
|
233022
233301
|
} // 复制粘贴基准值
|
|
233023
233302
|
|
|
@@ -233088,7 +233367,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
233088
233367
|
}, {
|
|
233089
233368
|
key: "closeControlModal",
|
|
233090
233369
|
value: function closeControlModal() {
|
|
233091
|
-
this.setControlProperty(
|
|
233370
|
+
this.setControlProperty('', 'add', '');
|
|
233092
233371
|
}
|
|
233093
233372
|
/**
|
|
233094
233373
|
* 非文档区域右键事件
|
|
@@ -233097,7 +233376,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
233097
233376
|
}, {
|
|
233098
233377
|
key: "blankAreaRightClick",
|
|
233099
233378
|
value: function blankAreaRightClick(e) {
|
|
233100
|
-
if (e.target instanceof HTMLDivElement && e.target.className ===
|
|
233379
|
+
if (e.target instanceof HTMLDivElement && e.target.className === 'editor') {}
|
|
233101
233380
|
}
|
|
233102
233381
|
}]);
|
|
233103
233382
|
|
|
@@ -233135,13 +233414,9 @@ __decorate([Prop({
|
|
|
233135
233414
|
})], HoDocs.prototype, "isUseTipText", void 0);
|
|
233136
233415
|
|
|
233137
233416
|
__decorate([Prop({
|
|
233138
|
-
default:
|
|
233417
|
+
default: ''
|
|
233139
233418
|
})], HoDocs.prototype, "isFixedPrintToA4", void 0);
|
|
233140
233419
|
|
|
233141
|
-
__decorate([Prop({
|
|
233142
|
-
default: false
|
|
233143
|
-
})], HoDocs.prototype, "isFixedPrintToA4T", void 0);
|
|
233144
|
-
|
|
233145
233420
|
__decorate([Prop({
|
|
233146
233421
|
default: true
|
|
233147
233422
|
})], HoDocs.prototype, "isUseImagePrint", void 0);
|
|
@@ -233154,58 +233429,60 @@ __decorate([Prop({
|
|
|
233154
233429
|
default: true
|
|
233155
233430
|
})], HoDocs.prototype, "printBlack", void 0);
|
|
233156
233431
|
|
|
233157
|
-
__decorate([
|
|
233432
|
+
__decorate([Prop({
|
|
233433
|
+
default: false
|
|
233434
|
+
})], HoDocs.prototype, "isEnabledGlobalColor", void 0);
|
|
233435
|
+
|
|
233436
|
+
__decorate([Watch('contentIsModify', {
|
|
233158
233437
|
deep: true
|
|
233159
233438
|
})], HoDocs.prototype, "contentIsModifyChange", null);
|
|
233160
233439
|
|
|
233161
|
-
__decorate([Watch(
|
|
233440
|
+
__decorate([Watch('editJson')], HoDocs.prototype, "editJsonChange", null);
|
|
233162
233441
|
|
|
233163
233442
|
__decorate([Provide()], HoDocs.prototype, "getCustomProperty", null);
|
|
233164
233443
|
|
|
233165
|
-
__decorate([Watch(
|
|
233444
|
+
__decorate([Watch('textStyle', {
|
|
233166
233445
|
deep: true
|
|
233167
233446
|
})], HoDocs.prototype, "textStyleChange", null);
|
|
233168
233447
|
|
|
233169
|
-
__decorate([Watch(
|
|
233448
|
+
__decorate([Watch('modalStatus', {
|
|
233170
233449
|
deep: true
|
|
233171
233450
|
})], HoDocs.prototype, "modalStatusChange", null);
|
|
233172
233451
|
|
|
233173
|
-
__decorate([Watch(
|
|
233452
|
+
__decorate([Watch('controlType', {
|
|
233174
233453
|
deep: true
|
|
233175
233454
|
})], HoDocs.prototype, "controlTypeChange", null);
|
|
233176
233455
|
|
|
233177
|
-
__decorate([Watch(
|
|
233456
|
+
__decorate([Watch('pageProperty', {
|
|
233178
233457
|
deep: true
|
|
233179
233458
|
})], HoDocs.prototype, "pagePropertyChange", null);
|
|
233180
233459
|
|
|
233181
|
-
__decorate([Watch(
|
|
233460
|
+
__decorate([Watch('docProperty', {
|
|
233182
233461
|
deep: true
|
|
233183
233462
|
})], HoDocs.prototype, "docPropertyChange", null);
|
|
233184
233463
|
|
|
233185
|
-
__decorate([Watch(
|
|
233464
|
+
__decorate([Watch('isFixedPrintToA4', {
|
|
233186
233465
|
deep: true
|
|
233187
233466
|
})], HoDocs.prototype, "isFixedPrintToA4Change", null);
|
|
233188
233467
|
|
|
233189
|
-
__decorate([Watch(
|
|
233190
|
-
deep: true
|
|
233191
|
-
})], HoDocs.prototype, "isFixedPrintToA4TChange", null);
|
|
233192
|
-
|
|
233193
|
-
__decorate([Watch("isUseImagePrint", {
|
|
233468
|
+
__decorate([Watch('isUseImagePrint', {
|
|
233194
233469
|
deep: true
|
|
233195
233470
|
})], HoDocs.prototype, "isUseImagePrintChange", null);
|
|
233196
233471
|
|
|
233197
|
-
__decorate([Watch(
|
|
233472
|
+
__decorate([Watch('isUseForm', {
|
|
233198
233473
|
deep: true
|
|
233199
233474
|
})], HoDocs.prototype, "isUseFormChange", null);
|
|
233200
233475
|
|
|
233201
|
-
__decorate([Watch(
|
|
233476
|
+
__decorate([Watch('superiorSigns')], HoDocs.prototype, "superiorSignsChange", null);
|
|
233477
|
+
|
|
233478
|
+
__decorate([Watch('isCanEditHeadFoot')], HoDocs.prototype, "isCanEditHeadFootChange", null);
|
|
233202
233479
|
|
|
233203
|
-
__decorate([Watch(
|
|
233480
|
+
__decorate([Watch('printBlack')], HoDocs.prototype, "printBlackChange", null);
|
|
233204
233481
|
|
|
233205
|
-
__decorate([Watch(
|
|
233482
|
+
__decorate([Watch('isEnabledGlobalColor')], HoDocs.prototype, "isEnabledGlobalColorChange", null);
|
|
233206
233483
|
|
|
233207
233484
|
HoDocs = __decorate([vue_class_component_esm({
|
|
233208
|
-
name:
|
|
233485
|
+
name: 'HoDocs',
|
|
233209
233486
|
components: {
|
|
233210
233487
|
HoDoc: components_HoDoc,
|
|
233211
233488
|
HoFooter: components_HoFooter,
|
|
@@ -239035,9 +239312,9 @@ HoRightMenu = __decorate([vue_class_component_esm({
|
|
|
239035
239312
|
}
|
|
239036
239313
|
})], HoRightMenu);
|
|
239037
239314
|
/* harmony default export */ var toolbar_HoRightMenu = (HoRightMenu);
|
|
239038
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/view/view.vue?vue&type=template&id=
|
|
239039
|
-
var
|
|
239040
|
-
var
|
|
239315
|
+
;// 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&
|
|
239316
|
+
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()}
|
|
239317
|
+
var viewvue_type_template_id_4a7f3e3a_staticRenderFns = []
|
|
239041
239318
|
|
|
239042
239319
|
|
|
239043
239320
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/view/viewDoc.vue?vue&type=template&id=717b1315&
|
|
@@ -239480,8 +239757,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
239480
239757
|
key: "isFixedPrintToA4Change",
|
|
239481
239758
|
value: function isFixedPrintToA4Change() {
|
|
239482
239759
|
var activeDocId = this.activeDocId ? this.activeDocId : this.hoEditorFactoryIdList[0];
|
|
239483
|
-
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId);
|
|
239484
|
-
hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
|
|
239760
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().hoEditorFactoryMap.get(activeDocId); // hoEditorFactory && (hoEditorFactory.isFixedPrintToA4 = this.isFixedPrintToA4);
|
|
239485
239761
|
} // 打印时彩色字体转成黑色 printBlack
|
|
239486
239762
|
|
|
239487
239763
|
}, {
|
|
@@ -239559,7 +239835,7 @@ var PrintDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
239559
239835
|
__decorate([Prop()], PrintDocs.prototype, "pageProperty", void 0);
|
|
239560
239836
|
|
|
239561
239837
|
__decorate([Prop({
|
|
239562
|
-
default:
|
|
239838
|
+
default: ''
|
|
239563
239839
|
})], PrintDocs.prototype, "isFixedPrintToA4", void 0);
|
|
239564
239840
|
|
|
239565
239841
|
__decorate([Prop({
|
|
@@ -239601,8 +239877,8 @@ PrintDocs = __decorate([vue_class_component_esm({
|
|
|
239601
239877
|
|
|
239602
239878
|
var view_component = normalizeComponent(
|
|
239603
239879
|
view_viewvue_type_script_lang_ts_,
|
|
239604
|
-
|
|
239605
|
-
|
|
239880
|
+
viewvue_type_template_id_4a7f3e3a_render,
|
|
239881
|
+
viewvue_type_template_id_4a7f3e3a_staticRenderFns,
|
|
239606
239882
|
false,
|
|
239607
239883
|
null,
|
|
239608
239884
|
null,
|