hoeditor-web 3.1.111 → 3.1.112
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.umd.js +158 -182
- package/lib/hoeditor.umd.min.js +2 -2
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -59693,19 +59693,28 @@ var SignNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
59693
59693
|
}
|
|
59694
59694
|
var signNode = new SignNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, _BaseNode__WEBPACK_IMPORTED_MODULE_20__/* .NodeType */ .Jq.ntSign, number, type, json.name, json.signType ? Number(json.signType) : 0, json.signFormat ? json.signFormat : "签名医师", isClearSign ? "" : json.signor, isClearSign ? "" : json.signTime, json.signTimeFormat ? json.signTimeFormat : "yyyy-MM-dd HH:mm", isClearSign ? "" : json.imgSrc, imgWidth, imgHeight, isClearSign ? undefined : json.customProperty, isTemplate, json.styleIndex ? Number(json.styleIndex) : undefined, json.connectMode, isFront, allowEditSignTime, isClearSign ? "" : json.fingerPrintSrc, isClearSign ? 0 : json.fingerPosition, attribute, json.connectChar, json.otherProperties, json.dataId, json.associatedElement);
|
|
59695
59695
|
// 旧的上级医生签名锁定判断方式 上级医生签名位置 存bec01数组 病历加载时根据签名元素内的bec01处理
|
|
59696
|
-
var superLuck = hoEditorFactory.superiorSigns
|
|
59696
|
+
var superLuck = Array.isArray(hoEditorFactory.superiorSigns) && hoEditorFactory.superiorSigns.includes(signNode.customProperty.bce01);
|
|
59697
59697
|
// hoEditorFactory.forbidEditBeforeSign 锁定已签名元素前内容
|
|
59698
59698
|
// hoEditorFactory.lockContent 锁定非患者签名所在行内容
|
|
59699
|
-
if (signNode.imgSrc) {
|
|
59700
|
-
|
|
59701
|
-
|
|
59702
|
-
hoEditorFactory.structureConvert._superiorSign[0] = signNode;
|
|
59703
|
-
}
|
|
59699
|
+
if (superLuck && signNode.imgSrc) {
|
|
59700
|
+
// 旧的上级签名锁定方式 云his个别医院使用中 与iho锁定判断分开
|
|
59701
|
+
hoEditorFactory.structureConvert._superiorSign[0] = signNode;
|
|
59704
59702
|
} else {
|
|
59705
|
-
|
|
59706
|
-
hoEditorFactory.structureConvert._superiorSign[0] = signNode;
|
|
59707
|
-
}
|
|
59703
|
+
hoEditorFactory.vueController.setLastSignNode(signNode);
|
|
59708
59704
|
}
|
|
59705
|
+
// if(signNode.attribute != 1) {
|
|
59706
|
+
// if ((signNode.imgSrc && (superLuck || hoEditorFactory.forbidEditBeforeSign)) || hoEditorFactory.lockContent) {
|
|
59707
|
+
// hoEditorFactory.structureConvert._superiorSign[0] = signNode;
|
|
59708
|
+
// }
|
|
59709
|
+
// } else if(signNode.attribute == 1 && signNode.imgSrc && (hoEditorFactory.forbidEditBeforeSign || hoEditorFactory.lockContent)) {
|
|
59710
|
+
// hoEditorFactory.structureConvert._superiorSign[0] = signNode;
|
|
59711
|
+
// }
|
|
59712
|
+
// else {
|
|
59713
|
+
// if(hoEditorFactory.reviewMode && (signNode.imgSrc || signNode.fingerPrintSrc)) {
|
|
59714
|
+
// console.log("??????????",signNode)
|
|
59715
|
+
// hoEditorFactory.structureConvert._superiorSign[0] = signNode;
|
|
59716
|
+
// }
|
|
59717
|
+
// }
|
|
59709
59718
|
// if (json.id != "") {
|
|
59710
59719
|
// signNode.id = json.id;
|
|
59711
59720
|
// }
|
|
@@ -209657,7 +209666,7 @@ var TextNode = __webpack_require__(27198);
|
|
|
209657
209666
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
209658
209667
|
var ParagraphNode = __webpack_require__(67945);
|
|
209659
209668
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
209660
|
-
/* harmony default export */ var version = ('3.1.
|
|
209669
|
+
/* harmony default export */ var version = ('3.1.112');
|
|
209661
209670
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
209662
209671
|
var PoperTipText = __webpack_require__(50987);
|
|
209663
209672
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -216871,10 +216880,6 @@ var TOHTMLConverter = /*#__PURE__*/function () {
|
|
|
216871
216880
|
var UnitConvert = __webpack_require__(91404);
|
|
216872
216881
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
|
|
216873
216882
|
var createForOfIteratorHelper = __webpack_require__(17519);
|
|
216874
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.flat.js
|
|
216875
|
-
var es_array_flat = __webpack_require__(84944);
|
|
216876
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.unscopables.flat.js
|
|
216877
|
-
var es_array_unscopables_flat = __webpack_require__(33792);
|
|
216878
216883
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
|
|
216879
216884
|
var web_url = __webpack_require__(60285);
|
|
216880
216885
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.js
|
|
@@ -216885,6 +216890,10 @@ var web_url_search_params_delete = __webpack_require__(46229);
|
|
|
216885
216890
|
var web_url_search_params_has = __webpack_require__(17330);
|
|
216886
216891
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js
|
|
216887
216892
|
var web_url_search_params_size = __webpack_require__(62062);
|
|
216893
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.flat.js
|
|
216894
|
+
var es_array_flat = __webpack_require__(84944);
|
|
216895
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.unscopables.flat.js
|
|
216896
|
+
var es_array_unscopables_flat = __webpack_require__(33792);
|
|
216888
216897
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match-all.js
|
|
216889
216898
|
var es_string_match_all = __webpack_require__(76373);
|
|
216890
216899
|
// EXTERNAL MODULE: ./src/editor/events/NodeChangingEvent.ts
|
|
@@ -219720,7 +219729,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219720
219729
|
key: "hiddenMask",
|
|
219721
219730
|
value: function () {
|
|
219722
219731
|
var _hiddenMask = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee(isHidden) {
|
|
219723
|
-
var hoEditorFactory, i, drawPage, children, j, superiorSign, signNode,
|
|
219732
|
+
var hoEditorFactory, i, drawPage, children, j, superiorSign, signNode, curArea, actualHeight, pageWidth, pageHeight, curPageIndex, pageCount, paintMask, _yield$this$getPreEmp, _yield$this$getPreEmp2, isExist, pSignArr, drawNode, dline, stagePt, localPt, arrs, g, pSign, pDrawNode, pArea, pageIndex, pline, stagePt1, localPt1, start, h, n, k, _k, t, arr, _h, parr, _k2, sarr, _n, _k3, _k4, _i, _i2;
|
|
219724
219733
|
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee$(_context) {
|
|
219725
219734
|
while (1) switch (_context.prev = _context.next) {
|
|
219726
219735
|
case 0:
|
|
@@ -219739,30 +219748,15 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219739
219748
|
}
|
|
219740
219749
|
hoEditorFactory.drawPageTree.updateDrawPage(i);
|
|
219741
219750
|
}
|
|
219742
|
-
_context.next =
|
|
219751
|
+
_context.next = 55;
|
|
219743
219752
|
break;
|
|
219744
219753
|
case 5:
|
|
219745
219754
|
superiorSign = hoEditorFactory.structureConvert._superiorSign;
|
|
219746
219755
|
signNode = superiorSign[0];
|
|
219747
|
-
if (!(hoEditorFactory.forbidEditBeforeSign && hoEditorFactory.reviewMode)) {
|
|
219748
|
-
_context.next = 13;
|
|
219749
|
-
break;
|
|
219750
|
-
}
|
|
219751
|
-
_this$getAllSignNodeL = this.getAllSignNodeList(hoEditorFactory.userInfo.id), bce01List = _this$getAllSignNodeL.bce01List, patientSign = _this$getAllSignNodeL.patientSign;
|
|
219752
|
-
hasPatientSign = patientSign.filter(function (v) {
|
|
219753
|
-
return v.signed;
|
|
219754
|
-
}).length > 0;
|
|
219755
|
-
if (!(!bce01List.length && !hasPatientSign)) {
|
|
219756
|
-
_context.next = 13;
|
|
219757
|
-
break;
|
|
219758
|
-
}
|
|
219759
|
-
this.hiddenMask(true);
|
|
219760
|
-
return _context.abrupt("return");
|
|
219761
|
-
case 13:
|
|
219762
219756
|
curArea = hoEditorFactory.drawPageTree.getMainRootArea(signNode.drawNodes[0]);
|
|
219763
219757
|
actualHeight = hoEditorFactory.drawPageTree.drawHeaders[0].displayHeight;
|
|
219764
219758
|
if (!(curArea && curArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$)) {
|
|
219765
|
-
_context.next =
|
|
219759
|
+
_context.next = 55;
|
|
219766
219760
|
break;
|
|
219767
219761
|
}
|
|
219768
219762
|
pageWidth = hoEditorFactory.pageProperty.widthPixes + 1;
|
|
@@ -219770,7 +219764,6 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219770
219764
|
curPageIndex = curArea.pageIndex;
|
|
219771
219765
|
pageCount = hoEditorFactory.drawPageTree.drawMainDocs.length;
|
|
219772
219766
|
paintMask = function paintMask(index, height, start) {
|
|
219773
|
-
if (height < 6) return;
|
|
219774
219767
|
var drawPage = hoEditorFactory.drawTree.drawPages[index];
|
|
219775
219768
|
var selectContainer = drawPage.selectContainer;
|
|
219776
219769
|
for (var k = selectContainer.children.length - 1; k >= 0; k--) {
|
|
@@ -219784,6 +219777,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219784
219777
|
yVal = start + actualHeight;
|
|
219785
219778
|
heightVal = height - start - actualHeight;
|
|
219786
219779
|
}
|
|
219780
|
+
// heightVal 为负数时 遮罩层不绘制。。。审阅测试出现此情况
|
|
219781
|
+
if (heightVal < 0) {
|
|
219782
|
+
hoEditorFactory.drawPageTree.updateDrawPage(index);
|
|
219783
|
+
return;
|
|
219784
|
+
}
|
|
219787
219785
|
var mask = new createjs.Shape();
|
|
219788
219786
|
mask.setBounds(0, yVal, pageWidth, heightVal);
|
|
219789
219787
|
mask.graphics.clear().beginFill('#000000').drawRect(0, yVal, pageWidth, heightVal).endFill();
|
|
@@ -219798,9 +219796,9 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219798
219796
|
selectContainer.addChild(mask);
|
|
219799
219797
|
hoEditorFactory.drawPageTree.updateDrawPage(index);
|
|
219800
219798
|
};
|
|
219801
|
-
_context.next =
|
|
219799
|
+
_context.next = 17;
|
|
219802
219800
|
return this.getPreEmptySign(signNode);
|
|
219803
|
-
case
|
|
219801
|
+
case 17:
|
|
219804
219802
|
_yield$this$getPreEmp = _context.sent;
|
|
219805
219803
|
_yield$this$getPreEmp2 = (0,esm_slicedToArray/* default */.Z)(_yield$this$getPreEmp, 2);
|
|
219806
219804
|
isExist = _yield$this$getPreEmp2[0];
|
|
@@ -219808,26 +219806,25 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219808
219806
|
drawNode = signNode.drawNodes[0];
|
|
219809
219807
|
dline = hoEditorFactory.drawTree.getDrawLineByDNode(drawNode);
|
|
219810
219808
|
superiorSign[1] = curPageIndex;
|
|
219811
|
-
//superiorSign[2] = dline.y;
|
|
219812
219809
|
stagePt = dline.localToGlobal(drawNode.x, drawNode.y);
|
|
219813
219810
|
localPt = curArea.globalToLocal(stagePt.x, stagePt.y);
|
|
219814
219811
|
superiorSign[2] = localPt.y - hoEditorFactory.signHeight;
|
|
219815
219812
|
if (!isExist) {
|
|
219816
|
-
_context.next =
|
|
219813
|
+
_context.next = 54;
|
|
219817
219814
|
break;
|
|
219818
219815
|
}
|
|
219819
219816
|
arrs = [];
|
|
219820
219817
|
g = 0;
|
|
219821
|
-
case
|
|
219818
|
+
case 30:
|
|
219822
219819
|
if (!(g < pSignArr.length)) {
|
|
219823
|
-
_context.next =
|
|
219820
|
+
_context.next = 49;
|
|
219824
219821
|
break;
|
|
219825
219822
|
}
|
|
219826
219823
|
pSign = pSignArr[g];
|
|
219827
219824
|
pDrawNode = pSign.drawNodes[0];
|
|
219828
219825
|
pArea = hoEditorFactory.drawPageTree.getMainRootArea(pDrawNode);
|
|
219829
219826
|
if (!(pArea && pArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$)) {
|
|
219830
|
-
_context.next =
|
|
219827
|
+
_context.next = 46;
|
|
219831
219828
|
break;
|
|
219832
219829
|
}
|
|
219833
219830
|
pageIndex = pArea.pageIndex;
|
|
@@ -219836,7 +219833,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219836
219833
|
localPt1 = pArea.globalToLocal(stagePt1.x, stagePt1.y);
|
|
219837
219834
|
start = localPt1.y;
|
|
219838
219835
|
if (!(pSignArr.length === 1)) {
|
|
219839
|
-
_context.next =
|
|
219836
|
+
_context.next = 45;
|
|
219840
219837
|
break;
|
|
219841
219838
|
}
|
|
219842
219839
|
for (h = 0; h < pageIndex; h++) {
|
|
@@ -219866,13 +219863,13 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219866
219863
|
}
|
|
219867
219864
|
}
|
|
219868
219865
|
return _context.abrupt("return");
|
|
219869
|
-
case
|
|
219866
|
+
case 45:
|
|
219870
219867
|
arrs.push([pageIndex, start]);
|
|
219871
|
-
case
|
|
219868
|
+
case 46:
|
|
219872
219869
|
g++;
|
|
219873
|
-
_context.next =
|
|
219870
|
+
_context.next = 30;
|
|
219874
219871
|
break;
|
|
219875
|
-
case
|
|
219872
|
+
case 49:
|
|
219876
219873
|
for (t = 0; t < arrs.length; t++) {
|
|
219877
219874
|
arr = arrs[t];
|
|
219878
219875
|
if (t === 0) {
|
|
@@ -219916,9 +219913,9 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219916
219913
|
paintMask(curPageIndex, localPt.y + actualHeight - hoEditorFactory.signHeight);
|
|
219917
219914
|
}
|
|
219918
219915
|
}
|
|
219919
|
-
_context.next =
|
|
219916
|
+
_context.next = 55;
|
|
219920
219917
|
break;
|
|
219921
|
-
case
|
|
219918
|
+
case 54:
|
|
219922
219919
|
if (hoEditorFactory.lockContent) {
|
|
219923
219920
|
for (_i = 0; _i < pageCount; _i++) {
|
|
219924
219921
|
//给前面的页画遮罩层
|
|
@@ -219934,7 +219931,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219934
219931
|
//画当前页的遮罩层
|
|
219935
219932
|
paintMask(curPageIndex, localPt.y + actualHeight - hoEditorFactory.signHeight);
|
|
219936
219933
|
}
|
|
219937
|
-
case
|
|
219934
|
+
case 55:
|
|
219938
219935
|
case "end":
|
|
219939
219936
|
return _context.stop();
|
|
219940
219937
|
}
|
|
@@ -219955,17 +219952,36 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219955
219952
|
var iteratesNodes = function iteratesNodes(nodes) {
|
|
219956
219953
|
for (var i = 0; i < nodes.length; i++) {
|
|
219957
219954
|
var anode = nodes[i];
|
|
219958
|
-
if (anode instanceof SignNode/* SignNode */.N
|
|
219959
|
-
if (hoEditorFactory.lockContent &&
|
|
219960
|
-
|
|
219961
|
-
signArr.push(anode);
|
|
219962
|
-
} else if (!hoEditorFactory.lockContent) {
|
|
219955
|
+
if (anode instanceof SignNode/* SignNode */.N) {
|
|
219956
|
+
if (!hoEditorFactory.lockContent && !hoEditorFactory.reviewMode) {
|
|
219957
|
+
// 普通锁定 判断已签名的签名元素位置在锁定
|
|
219963
219958
|
var path2 = anode.getNodePath();
|
|
219964
219959
|
var result = NodePosition/* NodePosition */.F.treePathCompare(path1, path2);
|
|
219965
219960
|
if (result > 0) {
|
|
219966
219961
|
mark = true;
|
|
219967
219962
|
signArr.push(anode);
|
|
219968
219963
|
}
|
|
219964
|
+
} else if (hoEditorFactory.lockContent && !hoEditorFactory.reviewMode) {
|
|
219965
|
+
// 预览界面 签名行放开 其他全锁定
|
|
219966
|
+
// if(anode.attribute == 1) {
|
|
219967
|
+
mark = true;
|
|
219968
|
+
signArr.push(anode);
|
|
219969
|
+
// }
|
|
219970
|
+
} else if (!hoEditorFactory.lockContent && hoEditorFactory.reviewMode) {
|
|
219971
|
+
var _anode$customProperty, _anode$customProperty2;
|
|
219972
|
+
if (anode.attribute == 1 || ((_anode$customProperty = anode.customProperty) === null || _anode$customProperty === void 0 ? void 0 : _anode$customProperty.bce01) != hoEditorFactory.userInfo.id) {
|
|
219973
|
+
// 审阅 患者签名和非审阅医生签名 判断位置是否锁定
|
|
219974
|
+
var _path = anode.getNodePath();
|
|
219975
|
+
var _result = NodePosition/* NodePosition */.F.treePathCompare(path1, _path);
|
|
219976
|
+
if (_result > 0) {
|
|
219977
|
+
mark = true;
|
|
219978
|
+
signArr.push(anode);
|
|
219979
|
+
}
|
|
219980
|
+
} else if (((_anode$customProperty2 = anode.customProperty) === null || _anode$customProperty2 === void 0 ? void 0 : _anode$customProperty2.bce01) == hoEditorFactory.userInfo.id) {
|
|
219981
|
+
// 审阅上级医生签名位置不用判断 直接返回
|
|
219982
|
+
mark = true;
|
|
219983
|
+
signArr.push(anode);
|
|
219984
|
+
}
|
|
219969
219985
|
}
|
|
219970
219986
|
}
|
|
219971
219987
|
if (anode instanceof BaseCombineNode/* BaseCombineNode */.V) {
|
|
@@ -219979,6 +219995,60 @@ var VueController = /*#__PURE__*/function () {
|
|
|
219979
219995
|
}
|
|
219980
219996
|
return [false, []];
|
|
219981
219997
|
}
|
|
219998
|
+
}, {
|
|
219999
|
+
key: "clearSuperiorSign",
|
|
220000
|
+
value: function clearSuperiorSign() {
|
|
220001
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
220002
|
+
hoEditorFactory.structureConvert._superiorSign = [];
|
|
220003
|
+
this.hiddenMask(true);
|
|
220004
|
+
}
|
|
220005
|
+
}, {
|
|
220006
|
+
key: "updateHiddenMask",
|
|
220007
|
+
value: function updateHiddenMask() {
|
|
220008
|
+
var _this2 = this;
|
|
220009
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
220010
|
+
this.hiddenMask(true);
|
|
220011
|
+
// 处理前缀签名删除后,签名前无签名元素,签名有签名元素情况
|
|
220012
|
+
var iteratesNodes = function iteratesNodes(nodes) {
|
|
220013
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
220014
|
+
var anode = nodes[i];
|
|
220015
|
+
if (anode instanceof SignNode/* SignNode */.N) {
|
|
220016
|
+
_this2.setLastSignNode(anode);
|
|
220017
|
+
}
|
|
220018
|
+
if (anode instanceof BaseCombineNode/* BaseCombineNode */.V) {
|
|
220019
|
+
iteratesNodes(anode.childNodes);
|
|
220020
|
+
}
|
|
220021
|
+
}
|
|
220022
|
+
};
|
|
220023
|
+
iteratesNodes(hoEditorFactory.docTree.mainNodes);
|
|
220024
|
+
if (hoEditorFactory.structureConvert._superiorSign[0]) {
|
|
220025
|
+
this.hiddenMask(false);
|
|
220026
|
+
}
|
|
220027
|
+
}
|
|
220028
|
+
}, {
|
|
220029
|
+
key: "setLastSignNode",
|
|
220030
|
+
value: function setLastSignNode(node) {
|
|
220031
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
220032
|
+
if (node.attribute != 1) {
|
|
220033
|
+
if (hoEditorFactory.lockContent) {
|
|
220034
|
+
// 全锁定参数锁定 除了患者签名所在行外全锁定 无法修改 可以复制
|
|
220035
|
+
hoEditorFactory.structureConvert._superiorSign[0] = node;
|
|
220036
|
+
} else if (hoEditorFactory.forbidEditBeforeSign) {
|
|
220037
|
+
if (hoEditorFactory.reviewMode) {
|
|
220038
|
+
var _node$customProperty;
|
|
220039
|
+
// 审阅 锁定当前审阅医生已签名位置前的内容 无法修改 可以复制
|
|
220040
|
+
if (node.imgSrc && ((_node$customProperty = node.customProperty) === null || _node$customProperty === void 0 ? void 0 : _node$customProperty.bce01) == hoEditorFactory.userInfo.id) {
|
|
220041
|
+
hoEditorFactory.structureConvert._superiorSign[0] = node;
|
|
220042
|
+
}
|
|
220043
|
+
} else if (node.imgSrc) {
|
|
220044
|
+
// 非审阅即正常书写 锁定已签名的医生签名元素前内容 无法修改 可以复制
|
|
220045
|
+
hoEditorFactory.structureConvert._superiorSign[0] = node;
|
|
220046
|
+
}
|
|
220047
|
+
}
|
|
220048
|
+
} else if ((node.imgSrc || node.fingerPrintSrc) && (hoEditorFactory.forbidEditBeforeSign || hoEditorFactory.lockContent)) {
|
|
220049
|
+
hoEditorFactory.structureConvert._superiorSign[0] = node;
|
|
220050
|
+
}
|
|
220051
|
+
}
|
|
219982
220052
|
}, {
|
|
219983
220053
|
key: "isCanEdit",
|
|
219984
220054
|
value: function isCanEdit(pageIndex, stageY) {
|
|
@@ -221936,13 +222006,6 @@ var VueController = /*#__PURE__*/function () {
|
|
|
221936
222006
|
value: function getSelectText() {
|
|
221937
222007
|
return this.getRangeText(this.getDomRange());
|
|
221938
222008
|
}
|
|
221939
|
-
}, {
|
|
221940
|
-
key: "clearSuperiorSign",
|
|
221941
|
-
value: function clearSuperiorSign() {
|
|
221942
|
-
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
221943
|
-
hoEditorFactory.structureConvert._superiorSign = [];
|
|
221944
|
-
this.hiddenMask(true);
|
|
221945
|
-
}
|
|
221946
222009
|
}, {
|
|
221947
222010
|
key: "deleteNode",
|
|
221948
222011
|
value: function deleteNode(node) {
|
|
@@ -222004,37 +222067,8 @@ var VueController = /*#__PURE__*/function () {
|
|
|
222004
222067
|
}
|
|
222005
222068
|
}
|
|
222006
222069
|
var superiorSign = hoEditorFactory.structureConvert._superiorSign;
|
|
222007
|
-
if (superiorSign.length > 0
|
|
222008
|
-
this.
|
|
222009
|
-
// 处理前缀签名删除后,签名前无签名元素,签名有签名元素情况
|
|
222010
|
-
if (hoEditorFactory.forbidEditBeforeSign && hoEditorFactory.reviewMode) {
|
|
222011
|
-
var list = this.getSignNodeList();
|
|
222012
|
-
superiorSign.length = 0;
|
|
222013
|
-
list = list.flat();
|
|
222014
|
-
list.map(function (v) {
|
|
222015
|
-
if (v.node.imgSrc) {
|
|
222016
|
-
superiorSign[0] = v.node;
|
|
222017
|
-
}
|
|
222018
|
-
});
|
|
222019
|
-
if (superiorSign[0]) {
|
|
222020
|
-
this.hiddenMask(false);
|
|
222021
|
-
}
|
|
222022
|
-
} else {
|
|
222023
|
-
var prenode = signNode.previousLeaf();
|
|
222024
|
-
do {
|
|
222025
|
-
if (prenode) {
|
|
222026
|
-
if (prenode instanceof SignNode/* SignNode */.N && prenode.imgSrc != "") {
|
|
222027
|
-
superiorSign[0] = prenode;
|
|
222028
|
-
this.hiddenMask(false);
|
|
222029
|
-
return;
|
|
222030
|
-
}
|
|
222031
|
-
prenode = prenode.previousLeaf();
|
|
222032
|
-
}
|
|
222033
|
-
} while (prenode);
|
|
222034
|
-
if (!prenode) {
|
|
222035
|
-
superiorSign.length = 0;
|
|
222036
|
-
}
|
|
222037
|
-
}
|
|
222070
|
+
if (superiorSign.length > 0) {
|
|
222071
|
+
this.updateHiddenMask();
|
|
222038
222072
|
}
|
|
222039
222073
|
return;
|
|
222040
222074
|
} else {
|
|
@@ -222046,81 +222080,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
222046
222080
|
hoEditorFactory.undoService.commit();
|
|
222047
222081
|
var _superiorSign = hoEditorFactory.structureConvert._superiorSign;
|
|
222048
222082
|
if (_superiorSign.length > 0) {
|
|
222049
|
-
|
|
222050
|
-
if (hoEditorFactory.forbidEditBeforeSign && hoEditorFactory.reviewMode) {
|
|
222051
|
-
this.hiddenMask(true);
|
|
222052
|
-
var _list = this.getSignNodeList();
|
|
222053
|
-
_superiorSign.length = 0;
|
|
222054
|
-
_list = _list.flat();
|
|
222055
|
-
_list.map(function (v) {
|
|
222056
|
-
if (v.node.imgSrc) {
|
|
222057
|
-
_superiorSign[0] = v.node;
|
|
222058
|
-
}
|
|
222059
|
-
});
|
|
222060
|
-
if (_superiorSign[0]) {
|
|
222061
|
-
this.hiddenMask(false);
|
|
222062
|
-
}
|
|
222063
|
-
}
|
|
222083
|
+
this.updateHiddenMask();
|
|
222064
222084
|
}
|
|
222065
222085
|
return;
|
|
222066
222086
|
}
|
|
222067
|
-
/*
|
|
222068
|
-
if (preNode instanceof SignNode) {
|
|
222069
|
-
if (hoEditorFactory.drawTree.paintStatus !== PaintState.psDesign) {
|
|
222070
|
-
if (node.isTemplate && node.number === 0) {
|
|
222071
|
-
message.warn('该签名元素不允许删除!');
|
|
222072
|
-
return;
|
|
222073
|
-
}
|
|
222074
|
-
}
|
|
222075
|
-
let spath = '';
|
|
222076
|
-
if (node.number === 2 || (node.number === 1 && node.isTemplate)) {
|
|
222077
|
-
spath = hoEditorFactory.docTree.getNodeLastPath(preNode.previousLeaf() as BaseNode);
|
|
222078
|
-
} else {
|
|
222079
|
-
spath = hoEditorFactory.docTree.getNodeLastPath(preNode);
|
|
222080
|
-
}
|
|
222081
|
-
//const spath = hoEditorFactory.docTree.getNodeLastPath(preNode as BaseNode);
|
|
222082
|
-
//const epath = hoEditorFactory.docTree.getNodeLastPath(node);
|
|
222083
|
-
const newSignNode = new SignNode(
|
|
222084
|
-
this._hoEditorFactoryID,
|
|
222085
|
-
preNode.rootNodes,
|
|
222086
|
-
preNode.parentNode,
|
|
222087
|
-
NodeType.ntSign,
|
|
222088
|
-
preNode.number,
|
|
222089
|
-
preNode.type,
|
|
222090
|
-
preNode.name === '' ? '签名' : preNode.name,
|
|
222091
|
-
preNode.signType,
|
|
222092
|
-
preNode.signFormat,
|
|
222093
|
-
preNode.signor,
|
|
222094
|
-
preNode.signTime,
|
|
222095
|
-
preNode.signTimeFormat,
|
|
222096
|
-
preNode.imgSrc,
|
|
222097
|
-
preNode.imgWidth,
|
|
222098
|
-
preNode.imgHeight,
|
|
222099
|
-
preNode.customProperty,
|
|
222100
|
-
preNode.isTemplate ? preNode.isTemplate : node.isTemplate,
|
|
222101
|
-
//node.isTemplate,
|
|
222102
|
-
node.styleIndex,
|
|
222103
|
-
preNode.connectMode,
|
|
222104
|
-
preNode.isFront,
|
|
222105
|
-
preNode.allowEditSignTime,
|
|
222106
|
-
preNode.fingerPrintSrc,
|
|
222107
|
-
preNode.fingerPosition,
|
|
222108
|
-
preNode.attribute,
|
|
222109
|
-
preNode.connectChar,
|
|
222110
|
-
preNode.otherProperties
|
|
222111
|
-
);
|
|
222112
|
-
hoEditorFactory.undoService.begin();
|
|
222113
|
-
const nodesDeleteUndoUnit = new NodesDeleteUndoUnit(this._hoEditorFactoryID, spath, ePath, true);
|
|
222114
|
-
hoEditorFactory.undoService.add(nodesDeleteUndoUnit);
|
|
222115
|
-
if (!nodesDeleteUndoUnit.isError && (node.number === 2 || (node.number === 1 && node.isTemplate))) {
|
|
222116
|
-
hoEditorFactory.undoService.add(new NodeInsertUndoUnit(this._hoEditorFactoryID, spath, newSignNode));
|
|
222117
|
-
}
|
|
222118
|
-
hoEditorFactory.undoService.commit();
|
|
222119
|
-
return;
|
|
222120
|
-
}
|
|
222121
|
-
*/
|
|
222122
222087
|
}
|
|
222123
|
-
|
|
222124
222088
|
hoEditorFactory.undoService.begin();
|
|
222125
222089
|
hoEditorFactory.undoService.add(new NodeDeleteUndoUnit/* NodeDeleteUndoUnit */.w(this._hoEditorFactoryID, node));
|
|
222126
222090
|
hoEditorFactory.undoService.commit();
|
|
@@ -222951,7 +222915,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
222951
222915
|
key: "updateElementTextById",
|
|
222952
222916
|
value: function () {
|
|
222953
222917
|
var _updateElementTextById = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee9(id, text) {
|
|
222954
|
-
var
|
|
222918
|
+
var _this3 = this;
|
|
222955
222919
|
var nodes, _loop4, _ret2, i;
|
|
222956
222920
|
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee9$(_context11) {
|
|
222957
222921
|
while (1) switch (_context11.prev = _context11.next) {
|
|
@@ -222981,7 +222945,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
222981
222945
|
}
|
|
222982
222946
|
return _context10.abrupt("return", 0);
|
|
222983
222947
|
case 5:
|
|
222984
|
-
_hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(
|
|
222948
|
+
_hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(_this3._hoEditorFactoryID);
|
|
222985
222949
|
if (!(node instanceof TextInputFieldNode/* TextInputFieldNode */.re)) {
|
|
222986
222950
|
_context10.next = 33;
|
|
222987
222951
|
break;
|
|
@@ -223041,7 +223005,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
223041
223005
|
getChildNodes(json.node.childNodes.node);
|
|
223042
223006
|
spath = node.StartMarkNode.getNodePath();
|
|
223043
223007
|
epath = node.EndMarkNode.getNodePath();
|
|
223044
|
-
range = new DomRange/* DomRange */.a(
|
|
223008
|
+
range = new DomRange/* DomRange */.a(_this3._hoEditorFactoryID, spath, epath);
|
|
223045
223009
|
_hoEditorFactory.docController.deleteRange(range, true, "update");
|
|
223046
223010
|
(_node$childNodes = node.childNodes).splice.apply(_node$childNodes, [1, 0].concat(childNodes));
|
|
223047
223011
|
node.update(0);
|
|
@@ -223053,7 +223017,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
223053
223017
|
break;
|
|
223054
223018
|
}
|
|
223055
223019
|
node.childNodes.splice(1, node.childNodes.length - 2);
|
|
223056
|
-
_nodes4 =
|
|
223020
|
+
_nodes4 = _this3.text2MedicalExpress(text, node.StartMarkNode, node.StartMarkNode.styleIndex);
|
|
223057
223021
|
for (k = 0; k < _nodes4.length; k++) {
|
|
223058
223022
|
node.childNodes.splice(1 + k, 0, _nodes4[k]);
|
|
223059
223023
|
}
|
|
@@ -223191,7 +223155,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
223191
223155
|
}, {
|
|
223192
223156
|
key: "createPNG",
|
|
223193
223157
|
value: function createPNG(quality, type, callback) {
|
|
223194
|
-
var
|
|
223158
|
+
var _this4 = this;
|
|
223195
223159
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
223196
223160
|
var createElementNodes = function createElementNodes() {
|
|
223197
223161
|
var drawpages = hoEditorFactory.drawTree.drawPages;
|
|
@@ -223232,7 +223196,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
223232
223196
|
document.body.appendChild(pngBox);
|
|
223233
223197
|
callback && callback();
|
|
223234
223198
|
document.querySelector('#hoDownLoadImageBtn').onclick = function () {
|
|
223235
|
-
|
|
223199
|
+
_this4.downLoadPNGHTML();
|
|
223236
223200
|
};
|
|
223237
223201
|
};
|
|
223238
223202
|
if (hoEditorFactory.loadImageCount <= 0) {
|
|
@@ -223278,7 +223242,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
223278
223242
|
}, {
|
|
223279
223243
|
key: "createPDF",
|
|
223280
223244
|
value: function createPDF() {
|
|
223281
|
-
var
|
|
223245
|
+
var _this5 = this;
|
|
223282
223246
|
var btn = document.createElement('button');
|
|
223283
223247
|
btn.id = 'hoDownLoadPDFBtn';
|
|
223284
223248
|
btn.style.position = 'fixed';
|
|
@@ -223290,7 +223254,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
223290
223254
|
btn.style.outline = 'none';
|
|
223291
223255
|
document.body.appendChild(btn);
|
|
223292
223256
|
document.querySelector('#hoDownLoadPDFBtn').onclick = function () {
|
|
223293
|
-
|
|
223257
|
+
_this5.saveAsPDF();
|
|
223294
223258
|
};
|
|
223295
223259
|
}
|
|
223296
223260
|
/*
|
|
@@ -223656,7 +223620,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
223656
223620
|
}, {
|
|
223657
223621
|
key: "setBackgroundByName",
|
|
223658
223622
|
value: function setBackgroundByName(items) {
|
|
223659
|
-
var
|
|
223623
|
+
var _this6 = this;
|
|
223660
223624
|
var selectRangeArr = [];
|
|
223661
223625
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
223662
223626
|
var iteratesNodes = function iteratesNodes(nodes) {
|
|
@@ -223666,12 +223630,12 @@ var VueController = /*#__PURE__*/function () {
|
|
|
223666
223630
|
for (var m = 0, len = items.length - 1; m <= len; m++) {
|
|
223667
223631
|
var item = items[m];
|
|
223668
223632
|
if (item.text !== '' && (item.name === anode.name || item.id === anode.id || item.dataId === anode.dataId) && anode.text.includes(item.text)) {
|
|
223669
|
-
var range =
|
|
223633
|
+
var range = _this6.search(anode, item.text);
|
|
223670
223634
|
if (range.length > 0) {
|
|
223671
223635
|
selectRangeArr = selectRangeArr.concat(range);
|
|
223672
223636
|
}
|
|
223673
223637
|
} else if (item.text === '' && (item.name === anode.name || item.id === anode.id || item.dataId === anode.dataId)) {
|
|
223674
|
-
var _range =
|
|
223638
|
+
var _range = _this6.search(anode, anode.text);
|
|
223675
223639
|
if (_range.length > 0) {
|
|
223676
223640
|
selectRangeArr = selectRangeArr.concat(_range);
|
|
223677
223641
|
}
|
|
@@ -224378,7 +224342,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
224378
224342
|
}, {
|
|
224379
224343
|
key: "showElementsEditRecord",
|
|
224380
224344
|
value: function showElementsEditRecord(objects, id) {
|
|
224381
|
-
var
|
|
224345
|
+
var _this7 = this;
|
|
224382
224346
|
var comments = [];
|
|
224383
224347
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(id ? id : this._hoEditorFactoryID);
|
|
224384
224348
|
if (hoEditorFactory.pageProperty.commentWidthMm == 0) {
|
|
@@ -224417,7 +224381,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
224417
224381
|
arr[pos[0]] = [];
|
|
224418
224382
|
}
|
|
224419
224383
|
var obj = {
|
|
224420
|
-
editorId: id ? id :
|
|
224384
|
+
editorId: id ? id : _this7._hoEditorFactoryID,
|
|
224421
224385
|
id: comment.id,
|
|
224422
224386
|
lineHeight: comment.lineHeight,
|
|
224423
224387
|
permissionLevel: comment.permissionLevel,
|
|
@@ -224547,7 +224511,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
224547
224511
|
}, {
|
|
224548
224512
|
key: "getAllSignNodeList",
|
|
224549
224513
|
value: function getAllSignNodeList(bce01, showNode) {
|
|
224550
|
-
var
|
|
224514
|
+
var _this8 = this;
|
|
224551
224515
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
224552
224516
|
var signList = [];
|
|
224553
224517
|
var patientSignList = [];
|
|
@@ -224614,7 +224578,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
224614
224578
|
}
|
|
224615
224579
|
});
|
|
224616
224580
|
if (signColList.length > 0) {
|
|
224617
|
-
var firstDataRowIndex =
|
|
224581
|
+
var firstDataRowIndex = _this8.getTableTitleMaxRowIndex(node) + 1;
|
|
224618
224582
|
node.rows.forEach(function (rows, rowIndex) {
|
|
224619
224583
|
if (rowIndex >= firstDataRowIndex) {
|
|
224620
224584
|
rows.forEach(function (cellNode, colIndex) {
|
|
@@ -224736,7 +224700,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
224736
224700
|
}, {
|
|
224737
224701
|
key: "getSignNodeAndText",
|
|
224738
224702
|
value: function getSignNodeAndText() {
|
|
224739
|
-
var
|
|
224703
|
+
var _this9 = this;
|
|
224740
224704
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
224741
224705
|
var signList = [];
|
|
224742
224706
|
var getAllNodes = function getAllNodes(nodes) {
|
|
@@ -224756,7 +224720,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
224756
224720
|
dataId: _node8.dataId,
|
|
224757
224721
|
name: _node8.name
|
|
224758
224722
|
};
|
|
224759
|
-
sign.previousText =
|
|
224723
|
+
sign.previousText = _this9.getPreviousText(_node8);
|
|
224760
224724
|
signList.push(sign);
|
|
224761
224725
|
}
|
|
224762
224726
|
}
|
|
@@ -224773,7 +224737,6 @@ var VueController = /*#__PURE__*/function () {
|
|
|
224773
224737
|
}, {
|
|
224774
224738
|
key: "getSignNodeList",
|
|
224775
224739
|
value: function getSignNodeList(nodeDataId, bce01) {
|
|
224776
|
-
var _this9 = this;
|
|
224777
224740
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
224778
224741
|
var signList = [];
|
|
224779
224742
|
var count = 0;
|
|
@@ -224791,14 +224754,14 @@ var VueController = /*#__PURE__*/function () {
|
|
|
224791
224754
|
number: _node9.number,
|
|
224792
224755
|
isVerify: _node9.otherProperties && _node9.otherProperties.isVerify ? true : false,
|
|
224793
224756
|
customProperty: _node9.customProperty,
|
|
224794
|
-
previousText: '',
|
|
224757
|
+
// previousText: '',
|
|
224795
224758
|
dataId: _node9.dataId,
|
|
224796
224759
|
name: _node9.name,
|
|
224797
224760
|
node: _node9,
|
|
224798
224761
|
attribute: _node9.attribute,
|
|
224799
224762
|
connectMode: _node9.connectMode
|
|
224800
224763
|
};
|
|
224801
|
-
sign.previousText =
|
|
224764
|
+
// sign.previousText = this.getPreviousText(node);
|
|
224802
224765
|
if (_node9.imgSrc || _node9.fingerPrintSrc) {
|
|
224803
224766
|
sign.signed = true;
|
|
224804
224767
|
}
|
|
@@ -226453,6 +226416,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
226453
226416
|
var isHeightValid = Math.abs(heightMm - A5_HEIGHT) <= TOLERANCE || Math.abs(heightMm - A5_WIDTH) <= TOLERANCE;
|
|
226454
226417
|
return isWidthValid && isHeightValid;
|
|
226455
226418
|
}
|
|
226419
|
+
}, {
|
|
226420
|
+
key: "getHoEditorFactory",
|
|
226421
|
+
value: function getHoEditorFactory() {
|
|
226422
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
226423
|
+
}
|
|
226456
226424
|
}]);
|
|
226457
226425
|
return VueController;
|
|
226458
226426
|
}();
|
|
@@ -227557,6 +227525,14 @@ var EditController = /*#__PURE__*/function () {
|
|
|
227557
227525
|
var drawPage = hoEditorFactory.drawTree.activePage;
|
|
227558
227526
|
if (drawPage) {
|
|
227559
227527
|
var dNode = hoEditorFactory.drawTree.getDNodeByPath(curDomRange.endPath);
|
|
227528
|
+
if (dNode instanceof DrawLine/* DrawLine */.a && dNode.drawItems.length == 0) {
|
|
227529
|
+
var headerHeight = hoEditorFactory.drawPageTree.drawHeaders[0].displayHeight;
|
|
227530
|
+
var y = headerHeight + dNode.y + dNode.dHeight;
|
|
227531
|
+
result = hoEditorFactory.vueController.isCanEdit(drawPage.pageIndex, y);
|
|
227532
|
+
if (!result) {
|
|
227533
|
+
return false;
|
|
227534
|
+
}
|
|
227535
|
+
}
|
|
227560
227536
|
if (dNode instanceof DrawLine/* DrawLine */.a && dNode.drawItems.length > 0) {
|
|
227561
227537
|
dNode = dNode.drawItems[0];
|
|
227562
227538
|
}
|