hoeditor-web 3.3.6-beta.10 → 3.3.6-beta.12
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.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "vue";
|
|
2
|
-
import { H as i, d as r, b as e, a as l, e as t, T as H, f as d, i as f } from "./index-
|
|
2
|
+
import { H as i, d as r, b as e, a as l, e as t, T as H, f as d, i as f } from "./index-aSg440zH.mjs";
|
|
3
3
|
export {
|
|
4
4
|
i as HoDocs,
|
|
5
5
|
r as HoEditorProvide,
|
|
@@ -10525,10 +10525,7 @@ class DrawCell extends DrawRect {
|
|
|
10525
10525
|
return;
|
|
10526
10526
|
const [o, n] = this._cell.table.getCellInfos(this._cell);
|
|
10527
10527
|
if (this._cell.table.rowInfos[o].rowProperty.repeatAsTitleAtPageTop)
|
|
10528
|
-
this.drawPageCells.splice(
|
|
10529
|
-
r.table.drawTable.drawPageTables.length,
|
|
10530
|
-
this.drawPageCells.length
|
|
10531
|
-
);
|
|
10528
|
+
this.drawPageCells.splice(r.table.drawTable.drawPageTables.length, this.drawPageCells.length);
|
|
10532
10529
|
else {
|
|
10533
10530
|
const s = this.getDrawPageCell(r);
|
|
10534
10531
|
if (s) {
|
|
@@ -10585,18 +10582,7 @@ class DrawCell extends DrawRect {
|
|
|
10585
10582
|
const m = this._cell.drawCell.calcCellHeight(), g = Math.min(s, m);
|
|
10586
10583
|
this._cell.cellProperty.align === VAlign.vatop ? u = 0 : this._cell.cellProperty.align === VAlign.vacenter && g > this._cell.drawCell.docHeight ? u = (g - this._cell.drawCell.docHeight) / 2 : this._cell.cellProperty.align === VAlign.vabottom && m > this._cell.drawCell.docHeight && (u = m - this._cell.drawCell.docHeight);
|
|
10587
10584
|
}
|
|
10588
|
-
const f = r, p = new DrawPageCell(
|
|
10589
|
-
this._hoEditorFactoryID,
|
|
10590
|
-
f,
|
|
10591
|
-
this._cell,
|
|
10592
|
-
c,
|
|
10593
|
-
o,
|
|
10594
|
-
d,
|
|
10595
|
-
n,
|
|
10596
|
-
this._drawPageCells.length,
|
|
10597
|
-
l,
|
|
10598
|
-
s
|
|
10599
|
-
);
|
|
10585
|
+
const f = r, p = new DrawPageCell(this._hoEditorFactoryID, f, this._cell, c, o, d, n, this._drawPageCells.length, l, s);
|
|
10600
10586
|
p.x = c, p.y = o, r.drawItems.push(p), r.addChild(p), this.drawPageCells.push(p), p.paintArea(this._drawLines, l, u), p.valignTop = u;
|
|
10601
10587
|
}
|
|
10602
10588
|
clear() {
|
|
@@ -10615,6 +10601,7 @@ class DrawCell extends DrawRect {
|
|
|
10615
10601
|
}
|
|
10616
10602
|
updateHeight() {
|
|
10617
10603
|
let r = !0;
|
|
10604
|
+
if (!this.drawLines.length) return;
|
|
10618
10605
|
const o = this.drawLines[this.drawLines.length - 1].paragraphNode, n = this.drawLines[0].paragraphNode;
|
|
10619
10606
|
this.docHeight = o.dTop + o.dHeight - n.dTop + n.combineParagraph.topMarginPixes;
|
|
10620
10607
|
const [s, l] = this._cell.table.getCellInfos(this._cell);
|
|
@@ -23044,7 +23031,7 @@ WebPDecoder.prototype.getData = function() {
|
|
|
23044
23031
|
(function(a) {
|
|
23045
23032
|
function t() {
|
|
23046
23033
|
return function() {
|
|
23047
|
-
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-
|
|
23034
|
+
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-BoBJasEJ.mjs");
|
|
23048
23035
|
}().catch(function(r) {
|
|
23049
23036
|
return Promise.reject(new Error("Could not load canvg: " + r));
|
|
23050
23037
|
}).then(function(r) {
|
|
@@ -24344,7 +24331,7 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
24344
24331
|
const _ = !!(C && (C.isDisplayTitle == "true" || C.isDisplayTitle == !0)), D = !!(C && (C.isDisplayTime == "true" || C.isDisplayTime == !0));
|
|
24345
24332
|
this.attribute === 4 && (_ ? this._title == "" && (this._title = this._abi02) : this._title = "", D ? this._timePosition = C && C.timePosition ? C.timePosition : "" : this._signTime = ""), this._title != "" && (this._drawTitle = new createjs$1.Text(this.title + this._connectChar, this._textStyle, "#000000")), this._signTime != "" && (this.attribute === 4 ? this._drawDate = new createjs$1.Text(this.signTime, this._textStyle, "#000000") : this._drawDate = new createjs$1.Text(this.signTime.substring(0, 16), this._textStyle, "#000000"));
|
|
24346
24333
|
const E = HOEditorFactorys.instance().getFactory(r);
|
|
24347
|
-
if (this.dHeight = E.signHeight, f == 0 && (f = E.signHeight), this.isSignOpinion() && f > 0 && (this.dHeight = f), n.customProperty && n.customProperty.vaq01 && ((d.includes("data:image/") || d.split("/").length > 1) && l == 3 ? (n.type = 1, this.type = 1) : !d.includes("data:image/") && !d.includes("/") && l == 3 && (n.type = 2, this.type = 2)), this.number > 0 && this.type === 2) {
|
|
24334
|
+
if (this.dHeight = E.signHeight, f == 0 && (f = E.signHeight), this.isSignOpinion() && f > 0 && (this.dHeight = f, E.patientSignOpinionWidth != 0 && u > 0 && (this.dHeight = E.patientSignOpinionWidth * (f / u))), n.customProperty && n.customProperty.vaq01 && ((d.includes("data:image/") || d.split("/").length > 1) && l == 3 ? (n.type = 1, this.type = 1) : !d.includes("data:image/") && !d.includes("/") && l == 3 && (n.type = 2, this.type = 2)), this.number > 0 && this.type === 2) {
|
|
24348
24335
|
const T = d.split(`
|
|
24349
24336
|
`);
|
|
24350
24337
|
T.length > 1 && (this.dHeight = HOEditorFactorys.instance().getFactory(r).signHeight * T.length);
|
|
@@ -24464,6 +24451,11 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
24464
24451
|
let l = 1;
|
|
24465
24452
|
return r > n && (l = n / r), o * l > s && (l = Math.min(l, s / o)), l;
|
|
24466
24453
|
}
|
|
24454
|
+
/** 签名意见图片异步加载完成后,刷新所在行高度并让后续内容下移,避免图片高度超出这一行或与后续内容重叠 */
|
|
24455
|
+
refreshParentLineHeight() {
|
|
24456
|
+
const o = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawLineByDNode(this);
|
|
24457
|
+
o instanceof DrawLine && (o.fitLines(), o.updateLineStyle());
|
|
24458
|
+
}
|
|
24467
24459
|
drawSignNodeAfter() {
|
|
24468
24460
|
const r = this, o = HOEditorFactorys.instance().getFactory(r.node.hoEditorFactoryID), n = o.drawPageTree.getMainRootArea(r);
|
|
24469
24461
|
if (n) {
|
|
@@ -24504,7 +24496,7 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
24504
24496
|
const f = () => {
|
|
24505
24497
|
const p = d.naturalWidth !== 0 ? d.naturalWidth : d.width, m = d.naturalHeight !== 0 ? d.naturalHeight : d.height;
|
|
24506
24498
|
let g = n.signHeight / m < 0.4 ? 0.4 : n.signHeight / m > 0.7 ? 1 : n.signHeight / m;
|
|
24507
|
-
if (o.fingerPosition == FingerPosition.center && n.signHeight / m < 0.2 && (g = n.signHeight * 1.5 / m), n.patientSignHeight != 0 && (g = n.patientSignHeight / m), this.isSignOpinion() && (g = 1, r.parentNode instanceof CellNode || (g = this.fitToPageScale(p, m)), n.
|
|
24499
|
+
if (o.fingerPosition == FingerPosition.center && n.signHeight / m < 0.2 && (g = n.signHeight * 1.5 / m), n.patientSignHeight != 0 && (g = n.patientSignHeight / m), this.isSignOpinion() && (g = 1, r.parentNode instanceof CellNode || (g = this.fitToPageScale(p, m)), n.patientSignOpinionWidth != 0 && (g = n.patientSignOpinionWidth / p), this._dHeight = m * g), this._dWidth = p * g, o.fingerPrintSrc !== "")
|
|
24508
24500
|
this._imageManager.addImageQueue(this, () => new Promise(async (y) => {
|
|
24509
24501
|
const w = new Image();
|
|
24510
24502
|
let v;
|
|
@@ -24528,7 +24520,7 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
24528
24520
|
} else
|
|
24529
24521
|
r.imgWidth = this.dWidth, this.isSignOpinion() ? r.imgHeight = m * g : r.imgHeight = n.signHeight, this.isSignOpinion() ? u.setTransform(0, -m * g, g, g) : u.setTransform(0, -(m * g + l) / 2, g, g);
|
|
24530
24522
|
}
|
|
24531
|
-
c(o);
|
|
24523
|
+
this.isSignOpinion() && this.refreshParentLineHeight(), c(o);
|
|
24532
24524
|
};
|
|
24533
24525
|
n.drawTree.paintStatus === PaintState$1.psPreview && n.isFixPrint ? setTimeout(() => f(), this._imageManager.THROTTLE_DELAY) : f();
|
|
24534
24526
|
};
|
|
@@ -24634,7 +24626,7 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
24634
24626
|
}
|
|
24635
24627
|
}
|
|
24636
24628
|
}
|
|
24637
|
-
const version = "3.3.6-beta.
|
|
24629
|
+
const version = "3.3.6-beta.12";
|
|
24638
24630
|
var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
|
|
24639
24631
|
class SignNode extends BaseNode {
|
|
24640
24632
|
constructor(hoEditorFactoryID, rootNodes, pNode, nodeType, number, type, name, signType, signFormat, signor, signTime, signTimeFormat, imgSrc, imgWidth, imgHeight, customProperty, isTemplate, styleIndex, connectMode, isFront, allowEditSignTime, fingerPrintSrc, fingerPosition, attribute, connectChar, otherProperties, dataId, associatedElement, associatedPatientElement, isTemp, innerIdentifier) {
|
|
@@ -73038,8 +73030,8 @@ class HOEditorFactory {
|
|
|
73038
73030
|
// 患者签名签字图片高度
|
|
73039
73031
|
b(this, "_patientFingerHeight", 0);
|
|
73040
73032
|
// 患者指纹签名高度
|
|
73041
|
-
b(this, "
|
|
73042
|
-
//
|
|
73033
|
+
b(this, "_patientSignOpinionWidth", 0);
|
|
73034
|
+
// 患者签名意见宽度
|
|
73043
73035
|
b(this, "_superiorSigns", []);
|
|
73044
73036
|
//上级医生签名之前的内容不允许编辑修改(云his)
|
|
73045
73037
|
b(this, "_forbidEditBeforeSign", !1);
|
|
@@ -73419,11 +73411,11 @@ class HOEditorFactory {
|
|
|
73419
73411
|
set patientFingerHeight(t) {
|
|
73420
73412
|
this._patientFingerHeight !== t && (this._patientFingerHeight = t);
|
|
73421
73413
|
}
|
|
73422
|
-
get
|
|
73423
|
-
return this.
|
|
73414
|
+
get patientSignOpinionWidth() {
|
|
73415
|
+
return this._patientSignOpinionWidth;
|
|
73424
73416
|
}
|
|
73425
|
-
set
|
|
73426
|
-
this.
|
|
73417
|
+
set patientSignOpinionWidth(t) {
|
|
73418
|
+
this._patientSignOpinionWidth !== t && (this._patientSignOpinionWidth = t);
|
|
73427
73419
|
}
|
|
73428
73420
|
get pasteBase() {
|
|
73429
73421
|
return this._pasteBase;
|
|
@@ -84344,6 +84336,12 @@ const FindReplaceDialog = __component__$t.exports, fontFamilys = [{ ch: "宋体"
|
|
|
84344
84336
|
},
|
|
84345
84337
|
isMouseDown: !1,
|
|
84346
84338
|
// 鼠标是否处于按下状态
|
|
84339
|
+
scrollAtTop: !1,
|
|
84340
|
+
// 容器滚动是否到达顶部
|
|
84341
|
+
scrollAtBottom: !1,
|
|
84342
|
+
// 容器滚动是否到达底部
|
|
84343
|
+
scrollEdgeTimer: null,
|
|
84344
|
+
// 滚动到顶部/底部通知的防抖定时器
|
|
84347
84345
|
mouseParams: {
|
|
84348
84346
|
speed: 10,
|
|
84349
84347
|
// 定时器触发时间 值越大滚动越慢
|
|
@@ -84546,6 +84544,35 @@ const FindReplaceDialog = __component__$t.exports, fontFamilys = [{ ch: "宋体"
|
|
|
84546
84544
|
});
|
|
84547
84545
|
},
|
|
84548
84546
|
methods: {
|
|
84547
|
+
/**
|
|
84548
|
+
* 容器滚动到顶部/底部时通知父组件
|
|
84549
|
+
*/
|
|
84550
|
+
handleScroll() {
|
|
84551
|
+
const a = this.$refs.hoEditorListNode;
|
|
84552
|
+
if (!a) return;
|
|
84553
|
+
if (a.scrollHeight <= a.clientHeight) {
|
|
84554
|
+
this.scrollAtTop = !1, this.scrollAtBottom = !1, clearTimeout(this.scrollEdgeTimer), this.scrollEdgeTimer = null;
|
|
84555
|
+
return;
|
|
84556
|
+
}
|
|
84557
|
+
const t = a.scrollTop <= 0, r = a.scrollTop + a.clientHeight >= a.scrollHeight;
|
|
84558
|
+
t && !this.scrollAtTop ? (this.scrollAtTop = !0, this.emitScrollEdge("top")) : !t && this.scrollAtTop && (this.clearPendingScrollEdge("top"), this.scrollAtTop = !1), r && !this.scrollAtBottom ? (this.scrollAtBottom = !0, this.emitScrollEdge("bottom")) : !r && this.scrollAtBottom && (this.clearPendingScrollEdge("bottom"), this.scrollAtBottom = !1);
|
|
84559
|
+
},
|
|
84560
|
+
/**
|
|
84561
|
+
* 防抖通知父组件滚动到达顶部/底部
|
|
84562
|
+
* @param type 'top' | 'bottom'
|
|
84563
|
+
*/
|
|
84564
|
+
emitScrollEdge(a) {
|
|
84565
|
+
clearTimeout(this.scrollEdgeTimer), this._pendingScrollEdgeType = a, this.scrollEdgeTimer = setTimeout(() => {
|
|
84566
|
+
this.scrollEdgeTimer = null, this._pendingScrollEdgeType = "", this.$emit("scrollEdge", a);
|
|
84567
|
+
}, 200);
|
|
84568
|
+
},
|
|
84569
|
+
/**
|
|
84570
|
+
* 离开边界时取消尚未触发的防抖通知
|
|
84571
|
+
* @param type 'top' | 'bottom'
|
|
84572
|
+
*/
|
|
84573
|
+
clearPendingScrollEdge(a) {
|
|
84574
|
+
this._pendingScrollEdgeType === a && (clearTimeout(this.scrollEdgeTimer), this.scrollEdgeTimer = null, this._pendingScrollEdgeType = "");
|
|
84575
|
+
},
|
|
84549
84576
|
/**
|
|
84550
84577
|
* 右键菜单触发
|
|
84551
84578
|
*/
|
|
@@ -84806,7 +84833,7 @@ var _sfc_render$s = function a() {
|
|
|
84806
84833
|
var t = this, r = t._self._c;
|
|
84807
84834
|
return t._self._setupProxy, t.hoEditorFactoryIdList.length > 0 ? r("div", { staticClass: "ho-docs" }, [r("section", { ref: "hoEditorListNode", class: t.defaultEditJson.isFooter ? "ho-editor-list" : "ho-editor-list editor-no-footer", on: { contextmenu: function(o) {
|
|
84808
84835
|
return t.blankAreaRightClick.apply(null, arguments);
|
|
84809
|
-
}, mousedown: t.mouseDown } }, [t._l(t.hoEditorFactoryIdList, function(o, n) {
|
|
84836
|
+
}, mousedown: t.mouseDown, scroll: t.handleScroll } }, [t._l(t.hoEditorFactoryIdList, function(o, n) {
|
|
84810
84837
|
return [r("HoDoc", { key: n, attrs: { docIndex: n, hoEditorId: o, hoEditorFactoryIdList: t.hoEditorFactoryIdList, isUseTipText: t.isUseTipText }, on: { leftclick: t.leftclick, clickEvents: t.clickEvents, dblNodeClick: t.dblNodeClick, setFontStyles: t.setFontStyle, rightClickEventIn: t.rightClickEventIn, setActiveDocIndex: t.setActiveDocIndex, setActivePageIndex: t.setActivePageIndex, drawPagesLengthChange: t.drawPagesLengthChange }, scopedSlots: t._u([{ key: "hoDocHead", fn: function() {
|
|
84811
84838
|
return [t._t("hoHead")];
|
|
84812
84839
|
}, proxy: !0 }, { key: "hoDocFoot", fn: function() {
|