hzzt-kfb-slide 0.0.8 → 0.1.0
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/dist/components/{annotateFlT59Ud8.js → annotateBCPPxCOM.js} +1 -1
- package/dist/components/{annotateR7c0LCw2.js → annotateBe1iGjLm.js} +1 -1
- package/dist/components/annotateBjK38kC5.js +132 -0
- package/dist/components/annotateDswEmgoP.js +1 -0
- package/dist/components/arrowB_iF_C7o.js +1 -0
- package/dist/components/arrowBsGolew1.js +23 -0
- package/dist/components/{arrowDHcko1dw.js → arrowCircleCwh64ps_.js} +1 -1
- package/dist/components/{arrowDRio3eqx.js → arrowCircleDcEhXBbb.js} +9 -9
- package/dist/components/{arrowDownByED8CSr.js → arrowDownBO1BfpJc.js} +1 -1
- package/dist/components/{arrowDownDRpTqVDK.js → arrowDownGBYuSng0.js} +1 -1
- package/dist/components/{arrowLeftCl2XVnFB.js → arrowLeftC5fR0o6a.js} +1 -1
- package/dist/components/{arrowLeftDjcuA_pb.js → arrowLeftD5sInyYk.js} +1 -1
- package/dist/components/{arrowRightClSGs6Mb.js → arrowRightD8w_2T2p.js} +1 -1
- package/dist/components/{arrowRightDSkHKM4y.js → arrowRightDZ5B3UGP.js} +1 -1
- package/dist/components/{arrowUpQVIPK_NQ.js → arrowUpBc9Kyfxz.js} +1 -1
- package/dist/components/{arrowUpCgzq2L8A.js → arrowUpBeusa4Lo.js} +1 -1
- package/dist/components/bilateralCZQNj8IO.js +1 -0
- package/dist/components/bilateraliBpUezXT.js +27 -0
- package/dist/components/{channelCTQgwZV_.js → channelCex9iiR2.js} +1 -1
- package/dist/components/{channelD-dojSaC.js → channelD-i4fzni.js} +1 -1
- package/dist/components/{checkCBxyasVc.js → checkCt32HIH2.js} +1 -1
- package/dist/components/{checkCqCYDYr4.js → checkDdnX-C4X.js} +1 -1
- package/dist/components/{configGeQGhW9C.js → configBFvCGNtv.js} +1 -1
- package/dist/components/{configP_8ZVyfi.js → configBwkv57gw.js} +1 -1
- package/dist/components/customCGjGRDJm.js +1 -0
- package/dist/components/{customBr26z068.js → customCjYE_yPK.js} +3 -2
- package/dist/components/{deleteuibq0KAI.js → deleteB9iRvKYT.js} +1 -1
- package/dist/components/{deleteBNIxfTCo.js → deleteBpbziZfN.js} +1 -1
- package/dist/components/dotBlqZNkl0.js +1 -0
- package/dist/components/dotCF84g70n.js +25 -0
- package/dist/components/{dotBucEP5Z8.js → dotD_biewxL.js} +10 -9
- package/dist/components/{dotBJ-lSESE.js → dotDcO8K7mJ.js} +1 -1
- package/dist/components/dotDeJyIiYJ.js +1 -0
- package/dist/components/{dotDhjymv7s.js → dotDvq6YQgW.js} +1 -1
- package/dist/components/{downloadBrpaJY3x.js → downloadBnieQIP8.js} +1 -1
- package/dist/components/downloadBwUL0Ea7.js +1 -0
- package/dist/components/{downloadDnWeuVMn.js → downloadC8nKUjq6.js} +11 -10
- package/dist/components/{downloadB5STpOaR.js → downloadDy93WSTG.js} +1 -1
- package/dist/components/ellipseBxnZw_Wq.js +1 -0
- package/dist/components/ellipseCp5zAGAh.js +23 -0
- package/dist/components/expandLeft0jc4WZXg.js +21 -0
- package/dist/components/expandLeftC1Ta5tGY.js +1 -0
- package/dist/components/expandRightBH8iguKS.js +21 -0
- package/dist/components/expandRightDb0-tlNj.js +1 -0
- package/dist/components/flagBEcBfVBz.js +1 -0
- package/dist/components/flagDbfaF80Z.js +29 -0
- package/dist/components/{flipD7XBmACU.js → flipBIarRte4.js} +1 -1
- package/dist/components/{flipDlTFW9pO.js → flipChZNTRna.js} +1 -1
- package/dist/components/fontBuHpTztq.js +23 -0
- package/dist/components/fontU7S814K8.js +1 -0
- package/dist/components/{fullscreenCxtySrDu.js → fullscreenBQ1YkrN_.js} +1 -1
- package/dist/components/{fullscreenBGej63GA.js → fullscreenBiMgHdq_.js} +4 -3
- package/dist/components/{fullscreenoNyXD8h3.js → fullscreenBpAk7wDb.js} +1 -1
- package/dist/components/fullscreenuBLuHv03.js +1 -0
- package/dist/components/indexCFzrAiFg.js +4 -0
- package/dist/components/indexCiVL4LuE.js +3009 -0
- package/dist/components/{infoCA6EWNF3.js → infoC4hGYJaF.js} +1 -1
- package/dist/components/{infoBjk0dOPE.js → infoCp7ve5DR.js} +1 -1
- package/dist/components/{levelbRjS_tcK.js → levelCeI--h7X.js} +1 -1
- package/dist/components/{levelCG93ncZs.js → levelKqcfU9Ld.js} +1 -1
- package/dist/components/lineC3B9m1Ug.js +1 -0
- package/dist/components/lineOSorc3WE.js +23 -0
- package/dist/components/{microscopeD-EjOdf2.js → microscopeBFEz_lq4.js} +1 -1
- package/dist/components/{microscopeD-FrVKRB.js → microscopeD9DoPiHa.js} +1 -1
- package/dist/components/{microscopey8VfYeuX.js → microscopeD9m8Vj5p.js} +5 -4
- package/dist/components/microscopemifUUWdo.js +1 -0
- package/dist/components/{moveDYmvf7k8.js → move0dbwvgpp.js} +1 -1
- package/dist/components/{moveCCkgUb-0.js → move67AZY9GV.js} +11 -10
- package/dist/components/{movebJvf1oPR.js → moveCoqqrHrF.js} +1 -1
- package/dist/components/moveP1udjvew.js +1 -0
- package/dist/components/{nextDdiDIgB2.js → next949tlxwI.js} +1 -1
- package/dist/components/{nextC6ATDCIW.js → nextF-0K-c0T.js} +1 -1
- package/dist/components/polygonCVRu0jGg.js +23 -0
- package/dist/components/polygonCY1umCDA.js +1 -0
- package/dist/components/{prevC43MjkJW.js → prevBoMShTVJ.js} +1 -1
- package/dist/components/{prevD3zqAMQc.js → prevZJi0HBQa.js} +1 -1
- package/dist/components/{processCDMD34sa.js → process3Kd9iKAC.js} +1 -1
- package/dist/components/{processDR1VlciH.js → processBtDhC5cN.js} +5 -4
- package/dist/components/{processDq-wdwXj.js → processDFHVq7yX.js} +1 -1
- package/dist/components/processX0dS45XF.js +1 -0
- package/dist/components/rectangleBRcZJKiG.js +1 -0
- package/dist/components/rectangleD42v1SqR.js +23 -0
- package/dist/components/{rotateCVpCm-tK.js → rotate5_xJfsZ2.js} +1 -1
- package/dist/components/rotate7jt-EuDp.js +1 -0
- package/dist/components/{rotateD_vW_yY0.js → rotateDu_mkWYc.js} +10 -9
- package/dist/components/{rotateB2TKrdOd.js → rotateHyLr1dia.js} +1 -1
- package/dist/components/{settingDgfjjrts.js → setting3Ugpfl6Q.js} +1 -1
- package/dist/components/settingBdsG5NNP.js +1 -0
- package/dist/components/{settingB6ugQHJp.js → settingCutO8H2U.js} +1 -1
- package/dist/components/{settingCqgEfv1i.js → settingonwvagGo.js} +5 -4
- package/dist/components/starB6lZrSR_.js +25 -0
- package/dist/components/starBuk9Zpe8.js +1 -0
- package/dist/components/{tailorCBjKU02K.js → tailorC1nOu9Zx.js} +1 -1
- package/dist/components/{tailorDzvy19FE.js → tailorCxS09ZPn.js} +1 -1
- package/dist/components/{useCommonBD-xKHu3.js → useCommonDvVbDPSe.js} +1 -1
- package/dist/components/{useCommonBD90FQd0.js → useCommon_E1byFLe.js} +1 -1
- package/dist/components/voiceCifc7IPf.js +25 -0
- package/dist/components/voiceDFacjiIM.js +1 -0
- package/dist/components/{zoomBcO2XFbA.js → zoomB7VyAZrz.js} +1 -1
- package/dist/components/{zoomB5HF8Hai.js → zoomBFx-vjsG.js} +1 -1
- package/dist/components/{zoomInBrNwgimx.js → zoomInCf25h6Us.js} +1 -1
- package/dist/components/{zoomInC3EAqFg-.js → zoomInRDq1eDLi.js} +1 -1
- package/dist/components/{zoomOutDafuMDlQ.js → zoomOutDdDapD_E.js} +1 -1
- package/dist/components/{zoomOutGi1JWbc1.js → zoomOutjIFNPuhT.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +5 -5
- package/package.json +2 -2
- package/types/components/KfbView/KfbAnnotation.vue.d.ts +17 -0
- package/types/components/KfbView/index.d.ts +2 -0
- package/types/components/KfbView/index.vue.d.ts +6 -2
- package/types/components/KfbView/useLabel.d.ts +81 -0
- package/types/components/icon/expandLeft.vue.d.ts +2 -0
- package/types/components/icon/expandRight.vue.d.ts +2 -0
- package/types/components/icon/mark/arrow.vue.d.ts +2 -0
- package/types/components/icon/mark/bilateral.vue.d.ts +2 -0
- package/types/components/icon/mark/dot.vue.d.ts +2 -0
- package/types/components/icon/mark/ellipse.vue.d.ts +2 -0
- package/types/components/icon/mark/flag.vue.d.ts +2 -0
- package/types/components/icon/mark/font.vue.d.ts +2 -0
- package/types/components/icon/mark/line.vue.d.ts +2 -0
- package/types/components/icon/mark/polygon.vue.d.ts +2 -0
- package/types/components/icon/mark/rectangle.vue.d.ts +2 -0
- package/types/components/icon/mark/star.vue.d.ts +2 -0
- package/types/components/icon/mark/voice.vue.d.ts +2 -0
- package/types/components/toolbox/instances.d.ts +1 -0
- package/types/index.d.ts +12 -0
- package/dist/components/annotateJzE3toJV.js +0 -1
- package/dist/components/annotatemJxZMVPO.js +0 -123
- package/dist/components/customB1-3lgH0.js +0 -1
- package/dist/components/dotDc-QmqaE.js +0 -1
- package/dist/components/downloadDh6wiado.js +0 -1
- package/dist/components/fullscreenOKvUhCk1.js +0 -1
- package/dist/components/indexB0v3MpmE.js +0 -2937
- package/dist/components/indexBkFttmTs.js +0 -4
- package/dist/components/microscopeDd_Bl9hM.js +0 -1
- package/dist/components/moveQ5bEeY1C.js +0 -1
- package/dist/components/processD1w3RPEQ.js +0 -1
- package/dist/components/rotateDEPrY9R8.js +0 -1
- package/dist/components/settingDCqhAo43.js +0 -1
- /package/types/components/icon/{arrow.vue.d.ts → arrowCircle.vue.d.ts} +0 -0
|
@@ -0,0 +1,3009 @@
|
|
|
1
|
+
var Wt = Object.defineProperty, Zt = Object.defineProperties;
|
|
2
|
+
var qt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var yt = Object.getOwnPropertySymbols;
|
|
4
|
+
var Yt = Object.prototype.hasOwnProperty, Xt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var _t = (c, e, o) => e in c ? Wt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : c[e] = o, j = (c, e) => {
|
|
6
|
+
for (var o in e || (e = {}))
|
|
7
|
+
Yt.call(e, o) && _t(c, o, e[o]);
|
|
8
|
+
if (yt)
|
|
9
|
+
for (var o of yt(e))
|
|
10
|
+
Xt.call(e, o) && _t(c, o, e[o]);
|
|
11
|
+
return c;
|
|
12
|
+
}, me = (c, e) => Zt(c, qt(e));
|
|
13
|
+
var Ce = (c, e, o) => new Promise((t, _) => {
|
|
14
|
+
var v = (f) => {
|
|
15
|
+
try {
|
|
16
|
+
i(o.next(f));
|
|
17
|
+
} catch (g) {
|
|
18
|
+
_(g);
|
|
19
|
+
}
|
|
20
|
+
}, u = (f) => {
|
|
21
|
+
try {
|
|
22
|
+
i(o.throw(f));
|
|
23
|
+
} catch (g) {
|
|
24
|
+
_(g);
|
|
25
|
+
}
|
|
26
|
+
}, i = (f) => f.done ? t(f.value) : Promise.resolve(f.value).then(v, u);
|
|
27
|
+
i((o = o.apply(c, e)).next());
|
|
28
|
+
});
|
|
29
|
+
import { inject as J, ref as $, markRaw as H, defineAsyncComponent as M, defineComponent as ee, createBlock as P, openBlock as y, unref as n, normalizeProps as Qt, guardReactiveProps as Jt, withCtx as x, resolveDynamicComponent as xe, useModel as Ee, computed as B, createElementBlock as L, createElementVNode as b, createVNode as T, toDisplayString as V, Fragment as le, renderList as oe, createTextVNode as G, isRef as Ve, watch as ne, h as el, provide as re, renderSlot as ce, mergeProps as Ke, createCommentVNode as A, reactive as ot, onMounted as pe, onBeforeUnmount as Ie, normalizeStyle as W, mergeDefaults as tl, withDirectives as $e, vShow as Re, getCurrentInstance as ll, mergeModels as we, normalizeClass as ye, Teleport as Fe, withModifiers as Be } from "vue";
|
|
30
|
+
import { ElIcon as _e, ElRow as ol, ElCol as nl, ElSwitch as Le, ElRadioGroup as bt, ElRadio as De, ElDialog as je, ElForm as tt, ElFormItem as se, ElInput as et, ElButton as ge, ElMessage as kt, ElLoading as Ct, ElSlider as al, ElTag as Tt, ElCheckbox as Oe, ElTooltip as zt, ElPopover as sl, ElCheckboxGroup as il, ElPagination as rl } from "element-plus";
|
|
31
|
+
import { KfbView as ue, OpenSeadragon as Te } from "kfb-view";
|
|
32
|
+
import ul from "v-lazy-image";
|
|
33
|
+
function de() {
|
|
34
|
+
const c = J("i18n"), e = (o) => o;
|
|
35
|
+
return {
|
|
36
|
+
locale: c == null ? void 0 : c.locale,
|
|
37
|
+
t: (c == null ? void 0 : c.t) || e
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const cl = {
|
|
41
|
+
install(c, e) {
|
|
42
|
+
c.provide("i18n", e == null ? void 0 : e.global);
|
|
43
|
+
}
|
|
44
|
+
}, O = $({
|
|
45
|
+
annotate: H(M(() => import("./annotateBCPPxCOM.js"))),
|
|
46
|
+
arrowCircle: H(M(() => import("./arrowCircleDcEhXBbb.js"))),
|
|
47
|
+
check: H(M(() => import("./checkDdnX-C4X.js"))),
|
|
48
|
+
dot: H(M(() => import("./dotDcO8K7mJ.js"))),
|
|
49
|
+
flip: H(M(() => import("./flipBIarRte4.js"))),
|
|
50
|
+
info: H(M(() => import("./infoCp7ve5DR.js"))),
|
|
51
|
+
microscope: H(M(() => import("./microscopeD9DoPiHa.js"))),
|
|
52
|
+
move: H(M(() => import("./moveCoqqrHrF.js"))),
|
|
53
|
+
next: H(M(() => import("./next949tlxwI.js"))),
|
|
54
|
+
prev: H(M(() => import("./prevBoMShTVJ.js"))),
|
|
55
|
+
process: H(M(() => import("./process3Kd9iKAC.js"))),
|
|
56
|
+
rotate: H(M(() => import("./rotateHyLr1dia.js"))),
|
|
57
|
+
fullscreen: H(M(() => import("./fullscreenBQ1YkrN_.js"))),
|
|
58
|
+
setting: H(M(() => import("./settingCutO8H2U.js"))),
|
|
59
|
+
tailor: H(M(() => import("./tailorCxS09ZPn.js"))),
|
|
60
|
+
download: H(M(() => import("./downloadDy93WSTG.js"))),
|
|
61
|
+
config: H(M(() => import("./configBFvCGNtv.js"))),
|
|
62
|
+
arrowDown: H(M(() => import("./arrowDownGBYuSng0.js"))),
|
|
63
|
+
arrowUp: H(M(() => import("./arrowUpBeusa4Lo.js"))),
|
|
64
|
+
arrowLeft: H(M(() => import("./arrowLeftD5sInyYk.js"))),
|
|
65
|
+
arrowRight: H(M(() => import("./arrowRightDZ5B3UGP.js"))),
|
|
66
|
+
zoomIn: H(M(() => import("./zoomInRDq1eDLi.js"))),
|
|
67
|
+
zoomOut: H(M(() => import("./zoomOutjIFNPuhT.js"))),
|
|
68
|
+
level: H(M(() => import("./levelKqcfU9Ld.js"))),
|
|
69
|
+
channel: H(M(() => import("./channelCex9iiR2.js"))),
|
|
70
|
+
delete: H(M(() => import("./deleteBpbziZfN.js"))),
|
|
71
|
+
expandLeft: H(M(() => import("./expandLeft0jc4WZXg.js"))),
|
|
72
|
+
expandRight: H(M(() => import("./expandRightBH8iguKS.js"))),
|
|
73
|
+
markLine: H(M(() => import("./lineOSorc3WE.js"))),
|
|
74
|
+
markArrow: H(M(() => import("./arrowBsGolew1.js"))),
|
|
75
|
+
markBilateral: H(M(() => import("./bilateraliBpUezXT.js"))),
|
|
76
|
+
markRectangle: H(M(() => import("./rectangleD42v1SqR.js"))),
|
|
77
|
+
markEllipse: H(M(() => import("./ellipseCp5zAGAh.js"))),
|
|
78
|
+
markPolygon: H(M(() => import("./polygonCVRu0jGg.js"))),
|
|
79
|
+
markFlag: H(M(() => import("./flagDbfaF80Z.js"))),
|
|
80
|
+
markStar: H(M(() => import("./starB6lZrSR_.js"))),
|
|
81
|
+
markDot: H(M(() => import("./dotCF84g70n.js"))),
|
|
82
|
+
markFont: H(M(() => import("./fontBuHpTztq.js"))),
|
|
83
|
+
markVoice: H(M(() => import("./voiceCifc7IPf.js")))
|
|
84
|
+
}), X = /* @__PURE__ */ ee({
|
|
85
|
+
__name: "KfbIcon",
|
|
86
|
+
props: {
|
|
87
|
+
name: {
|
|
88
|
+
type: [String, Number],
|
|
89
|
+
required: !0
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
setup(c) {
|
|
93
|
+
return (e, o) => (y(), P(n(_e), Qt(Jt(e.$attrs)), {
|
|
94
|
+
default: x(() => [
|
|
95
|
+
(y(), P(xe(n(O)[c.name])))
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
}, 16));
|
|
99
|
+
}
|
|
100
|
+
}), dl = { class: "hzzt-kfb-tool-config" }, vl = { class: "hzzt-kfb-tool-config__title margin-b-2" }, fl = { class: "hzzt-kfb-tool-config__block flex align-items-center" }, ml = { class: "hzzt-kfb-tool-config__icon flex align-items-center justify-content-center" }, pl = { class: "margin-l-4 flex-1" }, hl = { class: "hzzt-kfb-tool-config__title" }, gl = { class: "flex align-items-center" }, wl = {
|
|
101
|
+
class: "margin-t-2 margin-b-2",
|
|
102
|
+
style: { width: "160px" }
|
|
103
|
+
}, yl = { class: "flex align-items-center" }, _l = {
|
|
104
|
+
class: "margin-t-2 margin-b-2",
|
|
105
|
+
style: { width: "160px" }
|
|
106
|
+
}, bl = /* @__PURE__ */ ee({
|
|
107
|
+
name: "KfbToolConfig",
|
|
108
|
+
__name: "KfbToolConfig",
|
|
109
|
+
props: {
|
|
110
|
+
menus: {
|
|
111
|
+
default: () => []
|
|
112
|
+
},
|
|
113
|
+
menusModifiers: {},
|
|
114
|
+
showText: { type: Boolean },
|
|
115
|
+
showTextModifiers: {}
|
|
116
|
+
},
|
|
117
|
+
emits: ["update:menus", "update:showText"],
|
|
118
|
+
setup(c) {
|
|
119
|
+
const e = Ee(c, "menus"), o = Ee(c, "showText"), { t } = de(), _ = B(() => e.value.filter((g) => g.name !== "line" && g.name !== "config" && g.name !== "zoom")), v = {
|
|
120
|
+
fullscreen: t("全屏"),
|
|
121
|
+
next: t("上一张"),
|
|
122
|
+
prev: t("上一张"),
|
|
123
|
+
flip: t("镜像翻转"),
|
|
124
|
+
setting: t("工具"),
|
|
125
|
+
rotate: t("旋转"),
|
|
126
|
+
dot: t("打点"),
|
|
127
|
+
annotate: t("标注"),
|
|
128
|
+
tailor: t("截图"),
|
|
129
|
+
process: t("图像处理"),
|
|
130
|
+
microscope: t("镜下"),
|
|
131
|
+
move: t("快速移动"),
|
|
132
|
+
info: t("信息"),
|
|
133
|
+
download: t("下载")
|
|
134
|
+
}, u = J("show-keyboard", $(!1));
|
|
135
|
+
function i(g) {
|
|
136
|
+
return g in v;
|
|
137
|
+
}
|
|
138
|
+
function f(g) {
|
|
139
|
+
var h;
|
|
140
|
+
return ((h = g.props) == null ? void 0 : h.text) || (i(g.name) ? v[g.name] : "");
|
|
141
|
+
}
|
|
142
|
+
return (g, h) => (y(), L("div", dl, [
|
|
143
|
+
b("h3", vl, V(n(t)("显示管理")), 1),
|
|
144
|
+
T(n(ol), { gutter: 10 }, {
|
|
145
|
+
default: x(() => [
|
|
146
|
+
(y(!0), L(le, null, oe(_.value, (l) => (y(), P(n(nl), {
|
|
147
|
+
key: l.name,
|
|
148
|
+
span: 8
|
|
149
|
+
}, {
|
|
150
|
+
default: x(() => {
|
|
151
|
+
var a, m;
|
|
152
|
+
return [
|
|
153
|
+
b("div", fl, [
|
|
154
|
+
b("div", ml, [
|
|
155
|
+
(a = l.props) != null && a.component ? (y(), P(xe((m = l.props) == null ? void 0 : m.component), {
|
|
156
|
+
key: 1,
|
|
157
|
+
size: 24
|
|
158
|
+
})) : (y(), P(X, {
|
|
159
|
+
key: 0,
|
|
160
|
+
size: 24,
|
|
161
|
+
name: l.name
|
|
162
|
+
}, null, 8, ["name"]))
|
|
163
|
+
]),
|
|
164
|
+
b("p", pl, V(f(l)), 1),
|
|
165
|
+
T(n(Le), {
|
|
166
|
+
modelValue: l.show,
|
|
167
|
+
"onUpdate:modelValue": (r) => l.show = r,
|
|
168
|
+
"active-text": "",
|
|
169
|
+
"inactive-text": ""
|
|
170
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
171
|
+
])
|
|
172
|
+
];
|
|
173
|
+
}),
|
|
174
|
+
_: 2
|
|
175
|
+
}, 1024))), 128))
|
|
176
|
+
]),
|
|
177
|
+
_: 1
|
|
178
|
+
}),
|
|
179
|
+
b("div", null, [
|
|
180
|
+
b("h3", hl, V(n(t)("其他设置")), 1),
|
|
181
|
+
b("div", gl, [
|
|
182
|
+
b("p", wl, V(n(t)("工具列表显示切换")), 1),
|
|
183
|
+
T(n(bt), {
|
|
184
|
+
modelValue: o.value,
|
|
185
|
+
"onUpdate:modelValue": h[0] || (h[0] = (l) => o.value = l)
|
|
186
|
+
}, {
|
|
187
|
+
default: x(() => [
|
|
188
|
+
T(n(De), { value: !0 }, {
|
|
189
|
+
default: x(() => [
|
|
190
|
+
G(V(n(t)("显示工具名称")), 1)
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
}),
|
|
194
|
+
T(n(De), { value: !1 }, {
|
|
195
|
+
default: x(() => [
|
|
196
|
+
G(V(n(t)("隐藏工具名称")), 1)
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
})
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}, 8, ["modelValue"])
|
|
203
|
+
]),
|
|
204
|
+
b("div", yl, [
|
|
205
|
+
b("p", _l, V(n(t)("小键盘显示切换")), 1),
|
|
206
|
+
T(n(bt), {
|
|
207
|
+
modelValue: n(u),
|
|
208
|
+
"onUpdate:modelValue": h[1] || (h[1] = (l) => Ve(u) ? u.value = l : null)
|
|
209
|
+
}, {
|
|
210
|
+
default: x(() => [
|
|
211
|
+
T(n(De), { value: !0 }, {
|
|
212
|
+
default: x(() => [
|
|
213
|
+
G(V(n(t)("显示小键盘")), 1)
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
}),
|
|
217
|
+
T(n(De), { value: !1 }, {
|
|
218
|
+
default: x(() => [
|
|
219
|
+
G(V(n(t)("隐藏小键盘")), 1)
|
|
220
|
+
]),
|
|
221
|
+
_: 1
|
|
222
|
+
})
|
|
223
|
+
]),
|
|
224
|
+
_: 1
|
|
225
|
+
}, 8, ["modelValue"])
|
|
226
|
+
])
|
|
227
|
+
])
|
|
228
|
+
]));
|
|
229
|
+
}
|
|
230
|
+
}), kl = { class: "hzzt-kfb-toolbox" }, zl = { class: "hzzt-kfb-toolbox__component" }, Ae = /* @__PURE__ */ ee({
|
|
231
|
+
name: "KfbToolbox",
|
|
232
|
+
__name: "KfbToolbox",
|
|
233
|
+
props: {
|
|
234
|
+
menu: {},
|
|
235
|
+
process: {},
|
|
236
|
+
microscope: {},
|
|
237
|
+
showMenuText: { type: Boolean }
|
|
238
|
+
},
|
|
239
|
+
emits: ["tool"],
|
|
240
|
+
setup(c, { emit: e }) {
|
|
241
|
+
const o = c, t = e, { t: _ } = de(), v = {
|
|
242
|
+
prev: _("上一张"),
|
|
243
|
+
next: _("下一张"),
|
|
244
|
+
config: _("配置"),
|
|
245
|
+
info: _("信息"),
|
|
246
|
+
flip: _("镜像"),
|
|
247
|
+
tailor: _("截图")
|
|
248
|
+
}, u = J("kfbViewRef"), i = $(!1), f = $(o.showMenuText), g = $(a(o.menu)), h = {
|
|
249
|
+
fullscreen: M(() => import("./fullscreenBiMgHdq_.js")),
|
|
250
|
+
line: M(() => import("./lineBIoJpzbf.js")),
|
|
251
|
+
setting: M(() => import("./settingonwvagGo.js")),
|
|
252
|
+
rotate: M(() => import("./rotateDu_mkWYc.js")),
|
|
253
|
+
dot: M(() => import("./dotD_biewxL.js")),
|
|
254
|
+
annotate: M(() => import("./annotateBjK38kC5.js")),
|
|
255
|
+
process: M(() => import("./processBtDhC5cN.js")),
|
|
256
|
+
microscope: M(() => import("./microscopeD9m8Vj5p.js")),
|
|
257
|
+
move: M(() => import("./move67AZY9GV.js")),
|
|
258
|
+
custom: M(() => import("./customCjYE_yPK.js")),
|
|
259
|
+
zoom: M(() => import("./zoomBFx-vjsG.js")),
|
|
260
|
+
download: M(() => import("./downloadC8nKUjq6.js"))
|
|
261
|
+
}, l = B(() => g.value.filter((r) => r.show !== !1).map((r) => ({
|
|
262
|
+
component: h[r.name],
|
|
263
|
+
props: r.props,
|
|
264
|
+
slots: r.slots
|
|
265
|
+
})));
|
|
266
|
+
ne(() => o.menu, (r) => {
|
|
267
|
+
g.value = a(r);
|
|
268
|
+
});
|
|
269
|
+
function a(r) {
|
|
270
|
+
return r.map((s) => {
|
|
271
|
+
const p = typeof s == "string" ? s : s.name;
|
|
272
|
+
return v[p] ? {
|
|
273
|
+
name: "custom",
|
|
274
|
+
show: typeof s == "string" ? !0 : s.show !== !1,
|
|
275
|
+
props: me(j({
|
|
276
|
+
text: v[p]
|
|
277
|
+
}, typeof s == "string" ? {} : s.props), {
|
|
278
|
+
name: p,
|
|
279
|
+
component: el(X, {
|
|
280
|
+
name: p
|
|
281
|
+
})
|
|
282
|
+
})
|
|
283
|
+
} : p === "process" ? {
|
|
284
|
+
name: p,
|
|
285
|
+
props: typeof s == "string" ? {
|
|
286
|
+
process: o.process
|
|
287
|
+
} : j({
|
|
288
|
+
process: o.process
|
|
289
|
+
}, s.props),
|
|
290
|
+
slots: typeof s == "string" ? void 0 : s.slots,
|
|
291
|
+
show: typeof s == "string" ? !0 : s.show !== !1
|
|
292
|
+
} : p === "microscope" ? {
|
|
293
|
+
name: p,
|
|
294
|
+
props: typeof s == "string" ? {
|
|
295
|
+
process: o.process
|
|
296
|
+
} : j({
|
|
297
|
+
microscope: o.microscope
|
|
298
|
+
}, s.props),
|
|
299
|
+
slots: typeof s == "string" ? void 0 : s.slots,
|
|
300
|
+
show: typeof s == "string" ? !0 : s.show !== !1
|
|
301
|
+
} : {
|
|
302
|
+
name: p,
|
|
303
|
+
props: typeof s == "string" ? {} : s.props,
|
|
304
|
+
slots: typeof s == "string" ? void 0 : s.slots,
|
|
305
|
+
show: typeof s == "string" ? !0 : s.show !== !1
|
|
306
|
+
};
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
function m(r, s) {
|
|
310
|
+
const p = {
|
|
311
|
+
annotate: () => u.value.startDraw(s),
|
|
312
|
+
tailor: () => u.value.shotScreen(s),
|
|
313
|
+
process: () => u.value.forceRedraw(s),
|
|
314
|
+
microscope: () => u.value.scopeChange(s),
|
|
315
|
+
move: () => u.value.fastMove(s),
|
|
316
|
+
endDraw: () => u.value.endDraw(),
|
|
317
|
+
info: () => u.value.info(),
|
|
318
|
+
zoom: () => u.value.zoomTo(s),
|
|
319
|
+
flip: () => u.value.toggleFlip(s),
|
|
320
|
+
config: () => i.value = !0,
|
|
321
|
+
grid: () => u.value.updateGrid(s),
|
|
322
|
+
ruler: () => u.value.updateGrid(s),
|
|
323
|
+
graduation: () => u.value.updateGraduation(s),
|
|
324
|
+
navigator: () => u.value.updateNavigator(s),
|
|
325
|
+
tool: () => {
|
|
326
|
+
u.value.updateGrid({
|
|
327
|
+
show: s
|
|
328
|
+
}), u.value.updateGraduation({
|
|
329
|
+
show: s
|
|
330
|
+
}), u.value.updateGrid({
|
|
331
|
+
ruler: s
|
|
332
|
+
}), u.value.updateNavigator(s);
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
p[r] ? p[r]() : t("tool", r, s);
|
|
336
|
+
}
|
|
337
|
+
return re("show-text", f), (r, s) => (y(), L("div", kl, [
|
|
338
|
+
ce(r.$slots, "left"),
|
|
339
|
+
b("div", zl, [
|
|
340
|
+
(y(!0), L(le, null, oe(l.value, (p, w) => (y(), P(xe(p.component), Ke({ ref_for: !0 }, p.props, {
|
|
341
|
+
key: w,
|
|
342
|
+
onTool: m
|
|
343
|
+
}), {
|
|
344
|
+
default: x(() => [
|
|
345
|
+
p.slots ? (y(!0), L(le, { key: 0 }, oe(p.slots, (k) => (y(), P(xe(k)))), 256)) : A("", !0)
|
|
346
|
+
]),
|
|
347
|
+
_: 2
|
|
348
|
+
}, 1040))), 128))
|
|
349
|
+
]),
|
|
350
|
+
ce(r.$slots, "right"),
|
|
351
|
+
T(n(je), {
|
|
352
|
+
modelValue: i.value,
|
|
353
|
+
"onUpdate:modelValue": s[2] || (s[2] = (p) => i.value = p),
|
|
354
|
+
width: "800px",
|
|
355
|
+
title: n(_)("阅片工具设置中心")
|
|
356
|
+
}, {
|
|
357
|
+
default: x(() => [
|
|
358
|
+
T(bl, {
|
|
359
|
+
menus: g.value,
|
|
360
|
+
"onUpdate:menus": s[0] || (s[0] = (p) => g.value = p),
|
|
361
|
+
showText: f.value,
|
|
362
|
+
"onUpdate:showText": s[1] || (s[1] = (p) => f.value = p)
|
|
363
|
+
}, null, 8, ["menus", "showText"])
|
|
364
|
+
]),
|
|
365
|
+
_: 1
|
|
366
|
+
}, 8, ["modelValue", "title"])
|
|
367
|
+
]));
|
|
368
|
+
}
|
|
369
|
+
}), Ge = "data:image/svg+xml,%3csvg%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%3e%3cpath%20d='M556.45%20126.8H904.7c31.31%200%2056.26%2025.47%2057.3%2056.78v656.85c-0.68%2031.26-26.03%2056.35-57.3%2056.72H617.28l74.32-291.24-77.38-56.14%2032.3-27.32c8.28-6.66%2015.51-11.46%2025.7-11.46%209.96%200.24%2019.33%204.77%2025.7%2012.45h-0.06l198.87%20214.09-0.58-522.46c-0.75-13.7-12.21-24.35-25.93-24.08H542.45l14-64.19z%20m-118.47%200l-14.01%2064.24H152.41c-13.6%200-24.31%209.84-26.22%2023.44v522.63l242.33-292.28-13.08%2060.14%20204.6%20148.46-62.22%20243.77H118.15a56.398%2056.398%200%200%201-39.86-16.73A56.35%2056.35%200%200%201%2062%20840.43V183.57c0-31.25%2024.89-56.72%2056.14-56.72h319.83v-0.05z%20m203.67%20224.68c-0.86-34.98%2017.31-67.68%2047.47-85.42%2030.16-17.74%2067.56-17.74%2097.73%200%2030.16%2017.74%2048.33%2050.44%2047.47%2085.42%200%2053.22-43.15%2096.37-96.37%2096.37-53.22%200-96.37-43.14-96.37-96.37h0.07z%20m0%200'%20fill='%23ffffff'%3e%3c/path%3e%3c/svg%3e", lt = {
|
|
370
|
+
shape: "50%",
|
|
371
|
+
width: 0.3,
|
|
372
|
+
color: "#FA0404",
|
|
373
|
+
borderWidth: 5
|
|
374
|
+
}, $t = {
|
|
375
|
+
r: 0,
|
|
376
|
+
g: 0,
|
|
377
|
+
b: 0,
|
|
378
|
+
c: 0,
|
|
379
|
+
s: 0,
|
|
380
|
+
l: 0,
|
|
381
|
+
ga: 1
|
|
382
|
+
};
|
|
383
|
+
function Cl(c) {
|
|
384
|
+
const e = ot(j(j({}, $t), c.process));
|
|
385
|
+
ne(() => c.process, (v) => {
|
|
386
|
+
_(v);
|
|
387
|
+
});
|
|
388
|
+
const o = B(() => {
|
|
389
|
+
const v = [
|
|
390
|
+
1 + e.r + e.l + 0.5 * e.c,
|
|
391
|
+
0,
|
|
392
|
+
0,
|
|
393
|
+
0,
|
|
394
|
+
-0.25 * e.c
|
|
395
|
+
], u = [
|
|
396
|
+
0,
|
|
397
|
+
1 + e.g + e.l + 0.5 * e.c,
|
|
398
|
+
0,
|
|
399
|
+
0,
|
|
400
|
+
-0.25 * e.c
|
|
401
|
+
], i = [
|
|
402
|
+
0,
|
|
403
|
+
0,
|
|
404
|
+
1 + e.b + e.l + 0.5 * e.c,
|
|
405
|
+
0,
|
|
406
|
+
-0.25 * e.c
|
|
407
|
+
], f = [0, 0, 0, 1, 0];
|
|
408
|
+
return `${v.join(" ")}
|
|
409
|
+
${u.join(" ")}
|
|
410
|
+
${i.join(" ")}
|
|
411
|
+
${f.join(" ")}`;
|
|
412
|
+
}), t = B(() => String(1 + e.s));
|
|
413
|
+
function _(v) {
|
|
414
|
+
v && Object.assign(e, v);
|
|
415
|
+
}
|
|
416
|
+
return {
|
|
417
|
+
imageProcess: e,
|
|
418
|
+
matrixValues: o,
|
|
419
|
+
saturateValues: t,
|
|
420
|
+
forceRedraw: _
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
function Tl(c, e) {
|
|
424
|
+
function o() {
|
|
425
|
+
e.value.$on(ue.events.EVENT_TAILORING_SCREENSHOT, t);
|
|
426
|
+
}
|
|
427
|
+
function t({ base64: u, region: i }) {
|
|
428
|
+
if (window.ClipboardItem && (navigator != null && navigator.clipboard)) {
|
|
429
|
+
const f = _(u, "image/png");
|
|
430
|
+
navigator.clipboard.write([
|
|
431
|
+
new window.ClipboardItem({
|
|
432
|
+
[f.type]: f
|
|
433
|
+
})
|
|
434
|
+
]);
|
|
435
|
+
}
|
|
436
|
+
c("tool", "screen-shot", { base64: u, region: i });
|
|
437
|
+
}
|
|
438
|
+
function _(u, i) {
|
|
439
|
+
var a, m;
|
|
440
|
+
const f = u.split(",");
|
|
441
|
+
(m = (a = f[0]) == null ? void 0 : a.match(/:(.*?);/)) == null || m[1];
|
|
442
|
+
const g = atob(f == null ? void 0 : f[1]);
|
|
443
|
+
let h = g.length;
|
|
444
|
+
const l = new Uint8Array(h);
|
|
445
|
+
for (; h--; )
|
|
446
|
+
l[h] = g.charCodeAt(h);
|
|
447
|
+
return new Blob([l], { type: i });
|
|
448
|
+
}
|
|
449
|
+
function v(u) {
|
|
450
|
+
const { width: i, height: f } = e.value.$options;
|
|
451
|
+
u ? i > f ? e.value.tailoring.init(
|
|
452
|
+
{
|
|
453
|
+
left: (i - f) / 2,
|
|
454
|
+
top: 0,
|
|
455
|
+
height: f,
|
|
456
|
+
width: f,
|
|
457
|
+
now: !0
|
|
458
|
+
}
|
|
459
|
+
) : e.value.tailoring.init(
|
|
460
|
+
{
|
|
461
|
+
left: 0,
|
|
462
|
+
top: (f - i) / 2,
|
|
463
|
+
height: i,
|
|
464
|
+
width: i,
|
|
465
|
+
now: !0
|
|
466
|
+
}
|
|
467
|
+
) : e.value.tailoring.init(
|
|
468
|
+
{
|
|
469
|
+
left: i / 2 - 100,
|
|
470
|
+
top: f / 2 - 100,
|
|
471
|
+
height: 200,
|
|
472
|
+
width: 200,
|
|
473
|
+
color: "#ff0000"
|
|
474
|
+
}
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
return {
|
|
478
|
+
tailorEvent: o,
|
|
479
|
+
shotScreen: v
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
const $l = ["onClick"], Ll = ["src"], xl = {
|
|
483
|
+
key: 2,
|
|
484
|
+
style: { width: "18px" },
|
|
485
|
+
class: "margin-r-3"
|
|
486
|
+
}, El = {
|
|
487
|
+
key: 1,
|
|
488
|
+
class: "hzzt-kfb-sub-menu"
|
|
489
|
+
}, Vl = ["onClick"], Ml = { class: "flex align-items-center" }, Il = ["src"], Sl = {
|
|
490
|
+
key: 2,
|
|
491
|
+
style: { width: "18px" },
|
|
492
|
+
class: "margin-r-2"
|
|
493
|
+
}, Hl = /* @__PURE__ */ ee({
|
|
494
|
+
__name: "KfbMenu",
|
|
495
|
+
props: {
|
|
496
|
+
menus: {}
|
|
497
|
+
},
|
|
498
|
+
emits: ["tool"],
|
|
499
|
+
setup(c, { emit: e }) {
|
|
500
|
+
const o = $({
|
|
501
|
+
top: "0",
|
|
502
|
+
left: "0",
|
|
503
|
+
display: "none"
|
|
504
|
+
}), t = J("kfbView", $({})), _ = J("currentLabel"), v = c, u = e, { t: i } = de(), f = [
|
|
505
|
+
{
|
|
506
|
+
label: i("直线"),
|
|
507
|
+
value: "line",
|
|
508
|
+
icon: O.value.markLine
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
label: i("箭头"),
|
|
512
|
+
value: "arrow",
|
|
513
|
+
icon: O.value.markArrow
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
label: i("双箭头"),
|
|
517
|
+
value: "bilateral",
|
|
518
|
+
icon: O.value.markBilateral
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
label: i("矩形"),
|
|
522
|
+
value: "rectangle",
|
|
523
|
+
icon: O.value.markRectangle
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
label: i("圆形"),
|
|
527
|
+
value: "ellipse",
|
|
528
|
+
icon: O.value.markEllipse
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
label: i("曲线"),
|
|
532
|
+
value: "polygon",
|
|
533
|
+
icon: O.value.markPolygon
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
label: i("星星"),
|
|
537
|
+
value: "star",
|
|
538
|
+
icon: O.value.markStar
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
label: i("旗帜"),
|
|
542
|
+
value: "flag",
|
|
543
|
+
icon: O.value.markFlag
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
label: i("点"),
|
|
547
|
+
value: "dot",
|
|
548
|
+
icon: O.value.markDot
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
label: i("文字"),
|
|
552
|
+
value: "font",
|
|
553
|
+
icon: O.value.markFont
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
label: i("语音"),
|
|
557
|
+
value: "voice",
|
|
558
|
+
icon: O.value.markVoice
|
|
559
|
+
}
|
|
560
|
+
], g = B(() => {
|
|
561
|
+
var r;
|
|
562
|
+
return _ != null && _.value ? [{
|
|
563
|
+
label: i("删除"),
|
|
564
|
+
value: "delete",
|
|
565
|
+
icon: O.value.delete
|
|
566
|
+
}] : (r = v.menus) != null && r.length ? v.menus.map((s) => s.value === "annotate" ? me(j({}, s), {
|
|
567
|
+
children: f
|
|
568
|
+
}) : me(j({}, s), {
|
|
569
|
+
icon: s.icon || O.value[s.value]
|
|
570
|
+
})) : [
|
|
571
|
+
{
|
|
572
|
+
label: i("上一张"),
|
|
573
|
+
value: "prev"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
label: i("下一张"),
|
|
577
|
+
value: "next"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
label: i("标注"),
|
|
581
|
+
value: "annotate",
|
|
582
|
+
icon: O.value.annotate,
|
|
583
|
+
children: f
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
label: i("一键截图"),
|
|
587
|
+
value: "tailor_now",
|
|
588
|
+
icon: O.value.tailor
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
label: i("区域截图"),
|
|
592
|
+
value: "tailor"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
label: i("镜像翻转"),
|
|
596
|
+
value: "flip",
|
|
597
|
+
icon: O.value.flip
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
label: i("切片信息"),
|
|
601
|
+
value: "info",
|
|
602
|
+
icon: O.value.info
|
|
603
|
+
}
|
|
604
|
+
];
|
|
605
|
+
});
|
|
606
|
+
ne(() => t.value, (r, s) => {
|
|
607
|
+
s != null && s.viewer && (s.viewer.removeHandler("canvas-contextmenu", h), s.viewer.removeHandler("canvas-click", l)), r != null && r.viewer && (r.viewer.addHandler("canvas-contextmenu", h), r.viewer.addHandler("canvas-click", l));
|
|
608
|
+
}), pe(() => {
|
|
609
|
+
var r;
|
|
610
|
+
(r = t.value) != null && r.viewer && (t.value.viewer.addHandler("canvas-contextmenu", h), t.value.viewer.addHandler("canvas-click", l)), document.body.addEventListener("click", l);
|
|
611
|
+
}), Ie(() => {
|
|
612
|
+
var r;
|
|
613
|
+
(r = t.value) != null && r.viewer && (t.value.viewer.removeHandler("canvas-contextmenu", h), t.value.viewer.removeHandler("canvas-click", l)), document.body.removeEventListener("click", l);
|
|
614
|
+
});
|
|
615
|
+
function h(r) {
|
|
616
|
+
r.preventDefault = !0, o.value.top = `${r.position.y}px`, o.value.left = `${r.position.x}px`, o.value.display === "block" ? o.value.display = "none" : o.value.display = "block";
|
|
617
|
+
}
|
|
618
|
+
function l() {
|
|
619
|
+
o.value.display = "none";
|
|
620
|
+
}
|
|
621
|
+
function a(r, s) {
|
|
622
|
+
r.children || ((s == null ? void 0 : s.value) === "annotate" ? u("tool", "annotate", {
|
|
623
|
+
tool: r.value.substring(0, 1).toLocaleUpperCase() + r.value.substring(1),
|
|
624
|
+
once: !0
|
|
625
|
+
}) : r.value === "tailor_now" ? u("tool", "tailor", !0) : u("tool", r.value), l());
|
|
626
|
+
}
|
|
627
|
+
function m(r) {
|
|
628
|
+
return r == null || typeof r != "object" && typeof r != "function" ? !1 : (
|
|
629
|
+
// 函数式组件
|
|
630
|
+
typeof r == "function" || // 对象式组件
|
|
631
|
+
"render" in r || "setup" in r
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
return (r, s) => (y(), L("div", {
|
|
635
|
+
class: "hzzt-kfb-menu",
|
|
636
|
+
style: W(o.value)
|
|
637
|
+
}, [
|
|
638
|
+
(y(!0), L(le, null, oe(g.value, (p, w) => (y(), L("div", {
|
|
639
|
+
key: w,
|
|
640
|
+
class: "hzzt-kfb-menu-item"
|
|
641
|
+
}, [
|
|
642
|
+
b("div", {
|
|
643
|
+
class: "flex align-items-center",
|
|
644
|
+
onClick: (k) => a(p)
|
|
645
|
+
}, [
|
|
646
|
+
m(p.icon) ? (y(), P(n(_e), {
|
|
647
|
+
key: 0,
|
|
648
|
+
class: "margin-r-3",
|
|
649
|
+
size: 18
|
|
650
|
+
}, {
|
|
651
|
+
default: x(() => [
|
|
652
|
+
(y(), P(xe(p.icon)))
|
|
653
|
+
]),
|
|
654
|
+
_: 2
|
|
655
|
+
}, 1024)) : p.icon ? (y(), L("img", {
|
|
656
|
+
key: 1,
|
|
657
|
+
style: { width: "18px" },
|
|
658
|
+
class: "margin-r-2",
|
|
659
|
+
src: p.icon
|
|
660
|
+
}, null, 8, Ll)) : (y(), L("div", xl)),
|
|
661
|
+
b("span", null, V(p.label), 1)
|
|
662
|
+
], 8, $l),
|
|
663
|
+
p.children ? (y(), P(X, {
|
|
664
|
+
key: 0,
|
|
665
|
+
name: "arrowRight",
|
|
666
|
+
class: "margin-r-2",
|
|
667
|
+
size: 14
|
|
668
|
+
})) : A("", !0),
|
|
669
|
+
p.children ? (y(), L("div", El, [
|
|
670
|
+
(y(!0), L(le, null, oe(p.children, (k, d) => (y(), L("div", {
|
|
671
|
+
key: d,
|
|
672
|
+
class: "hzzt-kfb-menu-item",
|
|
673
|
+
onClick: (E) => a(k, p)
|
|
674
|
+
}, [
|
|
675
|
+
b("div", Ml, [
|
|
676
|
+
m(k.icon) ? (y(), P(n(_e), {
|
|
677
|
+
key: 0,
|
|
678
|
+
class: "margin-r-2",
|
|
679
|
+
size: 18
|
|
680
|
+
}, {
|
|
681
|
+
default: x(() => [
|
|
682
|
+
(y(), P(xe(k.icon)))
|
|
683
|
+
]),
|
|
684
|
+
_: 2
|
|
685
|
+
}, 1024)) : k.icon ? (y(), L("img", {
|
|
686
|
+
key: 1,
|
|
687
|
+
style: { width: "18px" },
|
|
688
|
+
class: "margin-r-2",
|
|
689
|
+
src: k.icon
|
|
690
|
+
}, null, 8, Il)) : (y(), L("div", Sl)),
|
|
691
|
+
b("span", null, V(k.label), 1)
|
|
692
|
+
])
|
|
693
|
+
], 8, Vl))), 128))
|
|
694
|
+
])) : A("", !0)
|
|
695
|
+
]))), 128))
|
|
696
|
+
], 4));
|
|
697
|
+
}
|
|
698
|
+
}), he = (c, e) => {
|
|
699
|
+
const o = c.__vccOpts || c;
|
|
700
|
+
for (const [t, _] of e)
|
|
701
|
+
o[t] = _;
|
|
702
|
+
return o;
|
|
703
|
+
}, Pl = /* @__PURE__ */ he(Hl, [["__scopeId", "data-v-414722d0"]]), Rl = {
|
|
704
|
+
key: 0,
|
|
705
|
+
class: "hzzt-kfb-microscope"
|
|
706
|
+
}, Al = /* @__PURE__ */ ee({
|
|
707
|
+
__name: "KfbMicroscope",
|
|
708
|
+
props: /* @__PURE__ */ tl({
|
|
709
|
+
shape: {},
|
|
710
|
+
width: {},
|
|
711
|
+
color: {},
|
|
712
|
+
borderWidth: {}
|
|
713
|
+
}, j({}, lt)),
|
|
714
|
+
setup(c, { expose: e }) {
|
|
715
|
+
const o = c, t = ot(j(j({}, lt), o));
|
|
716
|
+
ne(() => o, (l) => {
|
|
717
|
+
h({ name: "change", value: l });
|
|
718
|
+
});
|
|
719
|
+
const _ = $("200px"), v = $(!1), u = B(() => ({
|
|
720
|
+
borderRadius: t.shape,
|
|
721
|
+
borderColor: t.color,
|
|
722
|
+
borderWidth: t.borderWidth + "px",
|
|
723
|
+
width: _.value,
|
|
724
|
+
height: _.value
|
|
725
|
+
})), i = J("kfbView", $({}));
|
|
726
|
+
ne(() => i.value, (l, a) => {
|
|
727
|
+
a != null && a.viewer && a.viewer.removeHandler("zoom", f), l != null && l.viewer && l.viewer.addHandler("zoom", f);
|
|
728
|
+
}), pe(() => {
|
|
729
|
+
var l;
|
|
730
|
+
(l = i.value) != null && l.viewer && i.value.viewer.addHandler("zoom", f);
|
|
731
|
+
}), Ie(() => {
|
|
732
|
+
var l;
|
|
733
|
+
(l = i.value) != null && l.viewer && i.value.viewer.removeHandler("zoom", f);
|
|
734
|
+
});
|
|
735
|
+
function f() {
|
|
736
|
+
setTimeout(() => {
|
|
737
|
+
h({ name: "change", value: t });
|
|
738
|
+
}, 100);
|
|
739
|
+
}
|
|
740
|
+
function g(l) {
|
|
741
|
+
let { x: a, y: m } = i.value.viewer.viewport.getCenter(!0);
|
|
742
|
+
l === "top" ? m -= 6e-3 : l === "bottom" ? m += 6e-3 : l === "left" ? a -= 6e-3 : l === "right" && (a += 6e-3), i.value.area.moveToLabel({ x: a, y: m });
|
|
743
|
+
}
|
|
744
|
+
function h({ name: l, value: a }) {
|
|
745
|
+
var r, s;
|
|
746
|
+
const m = (s = (r = i.value.$options) == null ? void 0 : r.pxConversion) == null ? void 0 : s.imageCapRes;
|
|
747
|
+
if (l === "visible") {
|
|
748
|
+
if (v.value = a, a) {
|
|
749
|
+
const p = i.value.area.imageToViewerElementRectangle(
|
|
750
|
+
{
|
|
751
|
+
x: 0,
|
|
752
|
+
y: 0,
|
|
753
|
+
width: t.width * 1e3 / m,
|
|
754
|
+
height: t.width * 1e3 / m
|
|
755
|
+
}
|
|
756
|
+
);
|
|
757
|
+
_.value = p.width + "px";
|
|
758
|
+
}
|
|
759
|
+
} else if (l === "change") {
|
|
760
|
+
Object.assign(t, a);
|
|
761
|
+
const p = i.value.area.imageToViewerElementRectangle(
|
|
762
|
+
{
|
|
763
|
+
x: 0,
|
|
764
|
+
y: 0,
|
|
765
|
+
width: t.width * 1e3 / m,
|
|
766
|
+
height: t.width * 1e3 / m
|
|
767
|
+
}
|
|
768
|
+
);
|
|
769
|
+
_.value = p.width + "px";
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
return e({
|
|
773
|
+
scopeChange: h
|
|
774
|
+
}), (l, a) => v.value ? (y(), L("div", Rl, [
|
|
775
|
+
b("div", {
|
|
776
|
+
class: "hzzt-kfb-microscope__container",
|
|
777
|
+
style: W(u.value)
|
|
778
|
+
}, null, 4),
|
|
779
|
+
b("div", {
|
|
780
|
+
class: "hzzt-kfb-microscope__top",
|
|
781
|
+
onClick: a[0] || (a[0] = (m) => g("top"))
|
|
782
|
+
}, [
|
|
783
|
+
T(X, {
|
|
784
|
+
size: "24",
|
|
785
|
+
name: "arrowUp"
|
|
786
|
+
})
|
|
787
|
+
]),
|
|
788
|
+
b("div", {
|
|
789
|
+
class: "hzzt-kfb-microscope__bottom",
|
|
790
|
+
onClick: a[1] || (a[1] = (m) => g("bottom"))
|
|
791
|
+
}, [
|
|
792
|
+
T(X, {
|
|
793
|
+
size: "24",
|
|
794
|
+
name: "arrowDown"
|
|
795
|
+
})
|
|
796
|
+
]),
|
|
797
|
+
b("div", {
|
|
798
|
+
class: "hzzt-kfb-microscope__left",
|
|
799
|
+
onClick: a[2] || (a[2] = (m) => g("left"))
|
|
800
|
+
}, [
|
|
801
|
+
T(X, {
|
|
802
|
+
size: "24",
|
|
803
|
+
name: "arrowLeft"
|
|
804
|
+
})
|
|
805
|
+
]),
|
|
806
|
+
b("div", {
|
|
807
|
+
class: "hzzt-kfb-microscope__right",
|
|
808
|
+
onClick: a[3] || (a[3] = (m) => g("right"))
|
|
809
|
+
}, [
|
|
810
|
+
T(X, {
|
|
811
|
+
size: "24",
|
|
812
|
+
name: "arrowRight"
|
|
813
|
+
})
|
|
814
|
+
])
|
|
815
|
+
])) : A("", !0);
|
|
816
|
+
}
|
|
817
|
+
}), Nl = /* @__PURE__ */ he(Al, [["__scopeId", "data-v-e8b36101"]]), Bl = { class: "hzzt-kfb-label flex column" }, Dl = { class: "hzzt-kfb-label__img flex justify-content-center" }, Ul = ["src"], Fl = { class: "ellipsis flex-1" }, Kl = {
|
|
818
|
+
class: "flex margin-b-4",
|
|
819
|
+
style: { width: "100%" }
|
|
820
|
+
}, jl = {
|
|
821
|
+
class: "flex margin overflow-hidden",
|
|
822
|
+
style: { height: "132px" }
|
|
823
|
+
}, Ol = ["src"], Gl = ["src"], Wl = /* @__PURE__ */ ee({
|
|
824
|
+
__name: "KfbLabel",
|
|
825
|
+
props: {
|
|
826
|
+
info: {},
|
|
827
|
+
slide: {},
|
|
828
|
+
pathologyHandle: { type: Function }
|
|
829
|
+
},
|
|
830
|
+
emits: ["tool"],
|
|
831
|
+
setup(c, { emit: e }) {
|
|
832
|
+
const { t: o } = de(), t = c, _ = e, v = $(!0), u = $(!1), i = B(() => t.slide.pathology_id ? o("修改病理号") : o("绑定病理号"));
|
|
833
|
+
function f() {
|
|
834
|
+
t.slide.angle || (t.slide.angle = 0), t.slide.angle += 90, t.slide.angle > 360 && (t.slide.angle = t.slide.angle % 360), _("tool", "rotate", t.slide.angle);
|
|
835
|
+
}
|
|
836
|
+
function g() {
|
|
837
|
+
u.value = !0;
|
|
838
|
+
}
|
|
839
|
+
function h() {
|
|
840
|
+
t.pathologyHandle && t.pathologyHandle(t.slide).then(() => {
|
|
841
|
+
u.value = !1;
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
return (l, a) => (y(), L("div", Bl, [
|
|
845
|
+
$e(b("div", { class: "hzzt-kfb-label__title" }, V(n(o)(`点击标签旋转${l.pathologyHandle ? ",点击病理号重绑" : ""}`)), 513), [
|
|
846
|
+
[Re, v.value]
|
|
847
|
+
]),
|
|
848
|
+
$e(b("div", Dl, [
|
|
849
|
+
b("img", {
|
|
850
|
+
src: l.info.labelImg,
|
|
851
|
+
style: W({ transform: `rotate(${l.slide.angle}deg)` }),
|
|
852
|
+
onClick: f
|
|
853
|
+
}, null, 12, Ul)
|
|
854
|
+
], 512), [
|
|
855
|
+
[Re, v.value]
|
|
856
|
+
]),
|
|
857
|
+
l.pathologyHandle ? $e((y(), L("div", {
|
|
858
|
+
key: 0,
|
|
859
|
+
class: "hzzt-kfb-label__pathology flex align-items-center justify-content-between",
|
|
860
|
+
onClick: g
|
|
861
|
+
}, [
|
|
862
|
+
b("span", Fl, V(l.slide.pathology_number), 1),
|
|
863
|
+
T(X, {
|
|
864
|
+
size: "14",
|
|
865
|
+
name: "annotate"
|
|
866
|
+
})
|
|
867
|
+
], 512)), [
|
|
868
|
+
[Re, v.value]
|
|
869
|
+
]) : A("", !0),
|
|
870
|
+
b("span", {
|
|
871
|
+
onClick: a[0] || (a[0] = (m) => v.value = !v.value),
|
|
872
|
+
style: W({
|
|
873
|
+
transform: `translateY(${v.value ? "-50%" : 0})`
|
|
874
|
+
}),
|
|
875
|
+
class: "hzzt-kfb-label__expend flex align-items-center justify-content-center"
|
|
876
|
+
}, [
|
|
877
|
+
v.value ? (y(), P(X, {
|
|
878
|
+
key: 0,
|
|
879
|
+
size: "10",
|
|
880
|
+
name: "arrowLeft"
|
|
881
|
+
})) : (y(), P(X, {
|
|
882
|
+
key: 1,
|
|
883
|
+
size: "10",
|
|
884
|
+
name: "arrowRight"
|
|
885
|
+
}))
|
|
886
|
+
], 4),
|
|
887
|
+
T(n(je), {
|
|
888
|
+
modelValue: u.value,
|
|
889
|
+
"onUpdate:modelValue": a[5] || (a[5] = (m) => u.value = m),
|
|
890
|
+
"append-to-body": !0,
|
|
891
|
+
title: i.value,
|
|
892
|
+
width: "450px"
|
|
893
|
+
}, {
|
|
894
|
+
footer: x(() => [
|
|
895
|
+
T(n(ge), {
|
|
896
|
+
onClick: a[4] || (a[4] = (m) => u.value = !1)
|
|
897
|
+
}, {
|
|
898
|
+
default: x(() => [
|
|
899
|
+
G(V(n(o)("取消")), 1)
|
|
900
|
+
]),
|
|
901
|
+
_: 1
|
|
902
|
+
}),
|
|
903
|
+
T(n(ge), {
|
|
904
|
+
type: "primary",
|
|
905
|
+
onClick: h
|
|
906
|
+
}, {
|
|
907
|
+
default: x(() => [
|
|
908
|
+
G(V(n(o)("确认")), 1)
|
|
909
|
+
]),
|
|
910
|
+
_: 1
|
|
911
|
+
})
|
|
912
|
+
]),
|
|
913
|
+
default: x(() => [
|
|
914
|
+
b("div", Kl, [
|
|
915
|
+
b("div", jl, [
|
|
916
|
+
b("img", {
|
|
917
|
+
src: l.slide.labelImg
|
|
918
|
+
}, null, 8, Ol),
|
|
919
|
+
b("img", {
|
|
920
|
+
src: l.slide.previewImg
|
|
921
|
+
}, null, 8, Gl)
|
|
922
|
+
])
|
|
923
|
+
]),
|
|
924
|
+
T(n(tt), { class: "margin-t-2" }, {
|
|
925
|
+
default: x(() => [
|
|
926
|
+
T(n(se), {
|
|
927
|
+
label: n(o)("病理号")
|
|
928
|
+
}, {
|
|
929
|
+
default: x(() => [
|
|
930
|
+
T(n(et), {
|
|
931
|
+
modelValue: l.slide.pathology_number,
|
|
932
|
+
"onUpdate:modelValue": a[1] || (a[1] = (m) => l.slide.pathology_number = m),
|
|
933
|
+
placeholder: n(o)("输入病理号"),
|
|
934
|
+
clearable: ""
|
|
935
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
936
|
+
]),
|
|
937
|
+
_: 1
|
|
938
|
+
}, 8, ["label"]),
|
|
939
|
+
T(n(se), {
|
|
940
|
+
label: n(o)("蜡块号")
|
|
941
|
+
}, {
|
|
942
|
+
default: x(() => [
|
|
943
|
+
T(n(et), {
|
|
944
|
+
modelValue: l.slide.paraffin_block_number,
|
|
945
|
+
"onUpdate:modelValue": a[2] || (a[2] = (m) => l.slide.paraffin_block_number = m),
|
|
946
|
+
placeholder: n(o)("输入蜡块号"),
|
|
947
|
+
clearable: ""
|
|
948
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
949
|
+
]),
|
|
950
|
+
_: 1
|
|
951
|
+
}, 8, ["label"]),
|
|
952
|
+
l.slide.slide_id ? A("", !0) : (y(), P(n(se), {
|
|
953
|
+
key: 0,
|
|
954
|
+
label: n(o)("试剂")
|
|
955
|
+
}, {
|
|
956
|
+
default: x(() => [
|
|
957
|
+
T(n(et), {
|
|
958
|
+
modelValue: l.slide.reagent,
|
|
959
|
+
"onUpdate:modelValue": a[3] || (a[3] = (m) => l.slide.reagent = m),
|
|
960
|
+
placeholder: n(o)("输入试剂"),
|
|
961
|
+
clearable: ""
|
|
962
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
963
|
+
]),
|
|
964
|
+
_: 1
|
|
965
|
+
}, 8, ["label"]))
|
|
966
|
+
]),
|
|
967
|
+
_: 1
|
|
968
|
+
})
|
|
969
|
+
]),
|
|
970
|
+
_: 1
|
|
971
|
+
}, 8, ["modelValue", "title"])
|
|
972
|
+
]));
|
|
973
|
+
}
|
|
974
|
+
}), Zl = /* @__PURE__ */ he(Wl, [["__scopeId", "data-v-7397de48"]]);
|
|
975
|
+
function ql(c, e) {
|
|
976
|
+
const o = $(1), t = $(null), _ = $(null);
|
|
977
|
+
function v() {
|
|
978
|
+
c.value.viewer.addHandler("canvas-drag", (i) => {
|
|
979
|
+
t.value || (t.value = i.position);
|
|
980
|
+
}), c.value.viewer.addHandler("canvas-drag-end", (i) => {
|
|
981
|
+
if (o.value !== 1) {
|
|
982
|
+
_.value = i.position;
|
|
983
|
+
const f = c.value.viewer.viewport.containerSize.x, g = c.value.viewer.viewport.containerSize.y, h = (_.value.x - t.value.x) / (f * e.value) * (o.value - 1), l = (_.value.y - t.value.y) / (g * e.value) * (o.value - 1), a = c.value.viewer.viewport.getCenter(), m = new Te.Point(a.x - h, a.y - l);
|
|
984
|
+
c.value.viewer.viewport.panTo(m), t.value = null;
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
function u({ name: i, value: f }) {
|
|
989
|
+
i === "ratio" && (o.value = f / 1);
|
|
990
|
+
}
|
|
991
|
+
return {
|
|
992
|
+
moveEvent: v,
|
|
993
|
+
fastMove: u
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
function Yl(c, e, o, t, _) {
|
|
997
|
+
const v = $(void 0), u = $([]);
|
|
998
|
+
ne(() => c.aiLabelList, h);
|
|
999
|
+
function i() {
|
|
1000
|
+
o.value.$on(ue.events.EVENT_END_PAINTING, f("add")), o.value.$on(ue.events.EVENT_AREA_MOVE_END, f("move")), o.value.$on(ue.events.EVENT_ADD_POLYGON_POINT, f("add-point")), o.value.$on(ue.events.EVENT_DELETE_POLYGON_POINT, f("delete-point")), o.value.$on(ue.events.EVENT_DELETE_LABEL, f("delete")), o.value.$on(ue.events.EVENT_SELECT_LABEL, (r) => {
|
|
1001
|
+
v.value = r, m(), e("tool", "select-label", v.value);
|
|
1002
|
+
}), o.value.$on(ue.events.EVENT_CANCEL_SELECT_LABEL, () => {
|
|
1003
|
+
v.value = void 0, e("tool", "cancel-select-label", v.value);
|
|
1004
|
+
}), f("list")();
|
|
1005
|
+
}
|
|
1006
|
+
function f(r) {
|
|
1007
|
+
return (s) => g(r, s);
|
|
1008
|
+
}
|
|
1009
|
+
function g(r, s) {
|
|
1010
|
+
var p;
|
|
1011
|
+
if (r === "add" && s && ((s == null ? void 0 : s.subType) || ((p = s == null ? void 0 : s.__data__) == null ? void 0 : p.subType)) === "voice")
|
|
1012
|
+
t(s);
|
|
1013
|
+
else
|
|
1014
|
+
return c.labelHandle(r, c.slide, s).then((w) => {
|
|
1015
|
+
u.value = w, h();
|
|
1016
|
+
}).catch(() => {
|
|
1017
|
+
h();
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
function h() {
|
|
1021
|
+
var r;
|
|
1022
|
+
if ((r = o.value) != null && r.initLabelList) {
|
|
1023
|
+
const s = [...u.value, ...c.aiLabelList || []];
|
|
1024
|
+
s.find(({ id: p }) => {
|
|
1025
|
+
var w;
|
|
1026
|
+
return p === ((w = v.value) == null ? void 0 : w.id);
|
|
1027
|
+
}) || (v.value = void 0), o.value.initLabelList(s);
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
function l(r, s) {
|
|
1031
|
+
var w, k;
|
|
1032
|
+
v.value && (v.value.select = !1, v.value = void 0);
|
|
1033
|
+
const p = (o.value.labelList || []).findIndex((d) => d.id === r.id);
|
|
1034
|
+
if (p > -1) {
|
|
1035
|
+
v.value = (w = o.value.labelList) == null ? void 0 : w[p], v.value.select = !0;
|
|
1036
|
+
const d = o.value.area.getCenterPoint(r.region);
|
|
1037
|
+
o.value.area.moveToLabel(d), (k = o.value.viewer) != null && k.canvas && o.value.viewer.canvas.focus(), m();
|
|
1038
|
+
}
|
|
1039
|
+
s && _(s);
|
|
1040
|
+
}
|
|
1041
|
+
function a(r) {
|
|
1042
|
+
return c.labelHandle("add", c.slide, r).then((s) => {
|
|
1043
|
+
u.value = s, h();
|
|
1044
|
+
}).catch(() => {
|
|
1045
|
+
h();
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
function m() {
|
|
1049
|
+
var s, p, w, k;
|
|
1050
|
+
(((s = v.value) == null ? void 0 : s.subType) || ((w = (p = v.value) == null ? void 0 : p.__data__) == null ? void 0 : w.subType)) === "voice" && ((k = v.value) != null && k.src) && new Audio(v.value.src).play();
|
|
1051
|
+
}
|
|
1052
|
+
return {
|
|
1053
|
+
currentLabel: v,
|
|
1054
|
+
localLabelList: u,
|
|
1055
|
+
initLabel: i,
|
|
1056
|
+
jumpToLabel: l,
|
|
1057
|
+
reloadLabelList: h,
|
|
1058
|
+
eventHandel: f,
|
|
1059
|
+
addHandle: a
|
|
1060
|
+
};
|
|
1061
|
+
}
|
|
1062
|
+
function Xl() {
|
|
1063
|
+
function c(e, o) {
|
|
1064
|
+
e.save(), e.strokeStyle = "rgba(0,0,0,0)", e.miterLimit = 4, e.font = "15px", e.fillStyle = o, e.font = "15px", e.scale(0.02734375, 0.02734375), e.save(), e.font = "15px", e.beginPath(), e.moveTo(512, 427.023), e.moveTo(422, 427.023), e.translate(512, 427.023), e.rotate(0), e.arc(0, 0, 90, 3.141592653589793, 6.283185307179586, !0), e.rotate(0), e.translate(-512, -427.023), e.translate(512, 427.023), e.rotate(0), e.arc(0, 0, 90, 0, 3.141592653589793, !0), e.rotate(0), e.translate(-512, -427.023), e.fill(), e.stroke(), e.restore(), e.save(), e.font = "15px", e.beginPath(), e.moveTo(512, 910.402), e.bezierCurveTo(492.86, 910.402, 474.51800000000003, 904.548, 458.95799999999997, 893.4730000000001), e.bezierCurveTo(444.895, 883.4630000000001, 434.032, 869.8770000000001, 427.36899999999997, 854.013), e.lineTo(255.043, 585.177), e.lineTo(254.889, 584.927), e.bezierCurveTo(225.522, 537.209, 210, 482.605, 210, 427.021), e.bezierCurveTo(210, 346.35400000000004, 241.414, 270.515, 298.454, 213.47500000000002), e.bezierCurveTo(355.494, 156.43500000000006, 431.333, 125.021, 512, 125.021), e.bezierCurveTo(592.6669999999999, 125.021, 668.506, 156.435, 725.546, 213.475), e.bezierCurveTo(782.587, 270.515, 814, 346.354, 814, 427.021), e.bezierCurveTo(814, 482.87, 798.345, 537.692, 768.726, 585.56), e.lineTo(768.462, 585.9789999999999), e.lineTo(596.381, 854.6949999999999), e.bezierCurveTo(589.626, 870.4209999999999, 578.721, 883.871, 564.677, 893.7499999999999), e.bezierCurveTo(549.192, 904.6449999999999, 530.977, 910.4019999999999, 512, 910.4019999999999), e.closePath(), e.moveTo(309.246, 551.141), e.lineTo(484.74, 824.9209999999999), e.lineTo(485.934, 828.1179999999999), e.bezierCurveTo(490.083, 839.2249999999999, 500.31500000000005, 846.4019999999999, 512, 846.4019999999999), e.bezierCurveTo(523.584, 846.4019999999999, 533.791, 839.3309999999999, 538.004, 828.387), e.lineTo(539.169, 825.3589999999999), e.lineTo(714.43, 551.678), e.bezierCurveTo(737.701, 513.983, 750, 470.884, 750, 427.021), e.bezierCurveTo(750, 363.449, 725.244, 303.682, 680.2909999999999, 258.72900000000004), e.bezierCurveTo(635.3389999999999, 213.77800000000005, 575.5719999999999, 189.02100000000004, 511.99999999999994, 189.02100000000004), e.bezierCurveTo(448.428, 189.02100000000004, 388.66099999999994, 213.77700000000004, 343.70799999999997, 258.72900000000004), e.bezierCurveTo(298.755, 303.68100000000004, 274, 363.449, 274, 427.021), e.bezierCurveTo(274, 470.661, 286.186, 513.573, 309.246, 551.1410000000001), e.closePath(), e.fill(), e.stroke(), e.restore(), e.restore();
|
|
1065
|
+
}
|
|
1066
|
+
return {
|
|
1067
|
+
drawDot: c
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
function Ql(c, e) {
|
|
1071
|
+
const { t: o } = de(), t = $(!1), _ = $();
|
|
1072
|
+
let v = null;
|
|
1073
|
+
const u = $(!1), i = $(0);
|
|
1074
|
+
let f = 0;
|
|
1075
|
+
const g = $([]), h = $(void 0);
|
|
1076
|
+
let l = !1;
|
|
1077
|
+
function a(d, E) {
|
|
1078
|
+
d.save(), d.strokeStyle = "rgba(0,0,0,0)", d.miterLimit = 4, d.font = "15px ''", d.fillStyle = E, d.font = " 15px ''", d.scale(0.03125, 0.03125), d.save(), d.font = " 15px ''", d.beginPath(), d.moveTo(515.041727, 670.617766), d.bezierCurveTo(606.625894, 670.617766, 681.137374, 596.113511, 681.137374, 504.52212), d.lineTo(681.137374, 229.350568), d.bezierCurveTo(681.137374, 137.76640100000003, 606.625894, 63.254920999999996, 515.041727, 63.254920999999996), d.bezierCurveTo(423.44311000000005, 63.254920999999996, 348.93885500000005, 137.766401, 348.93885600000004, 229.350568), d.lineTo(348.93885600000004, 504.52212), d.bezierCurveTo(348.93885600000004, 596.113512, 423.44311100000004, 670.617767, 515.041727, 670.617766), d.closePath(), d.fill(), d.stroke(), d.restore(), d.save(), d.font = " 15px ''", d.beginPath(), d.moveTo(801.643237, 874.001665), d.lineTo(558.391759, 874.001665), d.lineTo(558.391759, 828.578057), d.bezierCurveTo(719.899527, 807.264291, 844.993269, 668.7898399999999, 844.993269, 501.55986699999994), d.translate(801.643237, 501.55986699999994), d.rotate(0), d.arc(0, 0, 43.350032, 0, 3.141592653589793, !0), d.rotate(0), d.translate(-801.643237, -501.55986699999994), d.bezierCurveTo(758.2932050000001, 635.684865, 649.166725, 744.811345, 515.0345020000001, 744.811346), d.bezierCurveTo(380.9095040000001, 744.811346, 271.79024900000013, 635.6848659999999, 271.79024900000013, 501.55986699999994), d.translate(228.44021750000013, 501.5664510740879), d.rotate(0), d.arc(0, 0, 43.350032, -15188164315591997e-20, -3.1414407719461273, !0), d.rotate(0), d.translate(-228.44021750000013, -501.5664510740879), d.bezierCurveTo(185.09018600000013, 668.7898389999999, 310.1911530000001, 807.271516, 471.69169500000015, 828.578057), d.lineTo(471.69169500000015, 874.001665), d.lineTo(228.440217, 874.001665), d.translate(228.440217, 917.3516970000001), d.rotate(0), d.arc(0, 0, 43.350032, -1.5707963267948966, 1.5707963267948966, !0), d.rotate(0), d.translate(-228.440217, -917.3516970000001), d.lineTo(801.643237, 960.701729), d.translate(801.643237, 917.3516970000001), d.rotate(0), d.arc(0, 0, 43.350032, 1.5707963267948966, 4.71238898038469, !0), d.rotate(0), d.translate(-801.643237, -917.3516970000001), d.closePath(), d.fill(), d.stroke(), d.restore(), d.restore();
|
|
1079
|
+
}
|
|
1080
|
+
function m() {
|
|
1081
|
+
return Ce(this, null, function* () {
|
|
1082
|
+
try {
|
|
1083
|
+
_.value = yield navigator.mediaDevices.getUserMedia({ audio: !0 }), v = new MediaRecorder(_.value), g.value = [], v.addEventListener("dataavailable", (d) => {
|
|
1084
|
+
g.value.push(d.data);
|
|
1085
|
+
}), v.addEventListener("stop", () => Ce(this, null, function* () {
|
|
1086
|
+
if (h.value) {
|
|
1087
|
+
const d = new Blob(g.value, { type: c.audioType || "audio/wav" });
|
|
1088
|
+
h.value.src = URL.createObjectURL(d);
|
|
1089
|
+
}
|
|
1090
|
+
u.value = !1, l && (yield k());
|
|
1091
|
+
})), v.start(), u.value = !0, f = window.setInterval(() => {
|
|
1092
|
+
i.value++;
|
|
1093
|
+
}, 1e3);
|
|
1094
|
+
} catch (d) {
|
|
1095
|
+
kt.error(o("麦克风启用失败,请确认是否开启麦克风权限"));
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
function r() {
|
|
1100
|
+
_.value && v ? (v.stop(), _.value.getTracks().forEach((d) => d.stop()), v = null, _.value = void 0) : (v = null, _.value = void 0), u.value = !1, f && (clearInterval(f), f = 0), i.value = 0;
|
|
1101
|
+
}
|
|
1102
|
+
function s(d) {
|
|
1103
|
+
t.value = !0, h.value = d, g.value = [], l = !1;
|
|
1104
|
+
}
|
|
1105
|
+
function p() {
|
|
1106
|
+
u.value && r(), t.value = !1, u.value = !1, l = !1;
|
|
1107
|
+
}
|
|
1108
|
+
function w() {
|
|
1109
|
+
return Ce(this, null, function* () {
|
|
1110
|
+
if (!u.value && !g.value.length) {
|
|
1111
|
+
kt.error(o("请先录音"));
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
u.value && r(), u.value = !1, l = !0, g.value.length && (yield k()), t.value = !1;
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
function k() {
|
|
1118
|
+
return Ce(this, null, function* () {
|
|
1119
|
+
if (c.uploadHandle && h.value) {
|
|
1120
|
+
const d = Ct.service({
|
|
1121
|
+
text: o("录音上传中")
|
|
1122
|
+
}), E = new Blob(g.value, { type: c.audioType || "audio/wav" });
|
|
1123
|
+
g.value = [];
|
|
1124
|
+
try {
|
|
1125
|
+
yield c.uploadHandle(c.slide, h.value, E).then((R) => {
|
|
1126
|
+
h.value.src = R;
|
|
1127
|
+
}), d.close(), e(h.value);
|
|
1128
|
+
} catch (R) {
|
|
1129
|
+
d.close();
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
return {
|
|
1135
|
+
voiceVisible: t,
|
|
1136
|
+
voiceForm: h,
|
|
1137
|
+
recordTime: i,
|
|
1138
|
+
isRecording: u,
|
|
1139
|
+
drawVoice: a,
|
|
1140
|
+
startRecording: m,
|
|
1141
|
+
stopRecording: r,
|
|
1142
|
+
initVoice: s,
|
|
1143
|
+
cancelRecord: p,
|
|
1144
|
+
confirmRecord: w
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
function Jl(c, e) {
|
|
1148
|
+
const o = $([]), t = $(0), _ = $(!1);
|
|
1149
|
+
let v = null;
|
|
1150
|
+
ne(() => {
|
|
1151
|
+
var a;
|
|
1152
|
+
return (a = c.hotmap) == null ? void 0 : a.enable;
|
|
1153
|
+
}, () => {
|
|
1154
|
+
var a, m;
|
|
1155
|
+
if ((m = (a = e.value) == null ? void 0 : a.viewer) != null && m.world) {
|
|
1156
|
+
t.value = 0;
|
|
1157
|
+
const r = e.value.viewer.world.getItemAt(0);
|
|
1158
|
+
r && (r.tilesMatrix = {}, r.draw());
|
|
1159
|
+
}
|
|
1160
|
+
}), pe(() => {
|
|
1161
|
+
window.addEventListener("mousemove", f), window.addEventListener("mouseup", h);
|
|
1162
|
+
}), Ie(() => {
|
|
1163
|
+
window.removeEventListener("mousemove", f), window.removeEventListener("mouseup", h);
|
|
1164
|
+
});
|
|
1165
|
+
function u(a, m, r) {
|
|
1166
|
+
var p, w, k, d, E, R;
|
|
1167
|
+
const s = me(j({}, m), {
|
|
1168
|
+
file: (p = c.hotmap) == null ? void 0 : p.file
|
|
1169
|
+
});
|
|
1170
|
+
if ((w = c.hotmap) != null && w.info) {
|
|
1171
|
+
if (r[m.x + "_" + m.y + "_" + Number(m.scale)]) {
|
|
1172
|
+
if (((k = c.hotmap) == null ? void 0 : k.type) === "switch")
|
|
1173
|
+
return c.tileHandle(s);
|
|
1174
|
+
if (((d = c.hotmap) == null ? void 0 : d.type) === "drag")
|
|
1175
|
+
return i(a, s), a;
|
|
1176
|
+
}
|
|
1177
|
+
} else return ((E = c.hotmap) == null ? void 0 : E.type) === "switch" ? c.tileHandle(s) : (((R = c.hotmap) == null ? void 0 : R.type) === "drag" && i(a, s), a);
|
|
1178
|
+
}
|
|
1179
|
+
function i(a, m) {
|
|
1180
|
+
const r = o.value.find((s) => s.url === a) || {
|
|
1181
|
+
url: a,
|
|
1182
|
+
x: m.x,
|
|
1183
|
+
y: m.y,
|
|
1184
|
+
img: void 0,
|
|
1185
|
+
load: ""
|
|
1186
|
+
};
|
|
1187
|
+
if (!(r != null && r.img) && (o.value.push(r), r.load !== "success")) {
|
|
1188
|
+
const s = new Image();
|
|
1189
|
+
s.src = c.tileHandle(m), s.onload = () => {
|
|
1190
|
+
r.load = "success";
|
|
1191
|
+
}, r.img = s;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
function f(a) {
|
|
1195
|
+
_.value && v && (t.value += a.x - v.x, t.value < 0 ? t.value = 0 : t.value > e.value.$options.width && (t.value = e.value.$options.width, _.value = !1), e.value.viewer.forceRedraw()), v = { x: a.x, y: a.y };
|
|
1196
|
+
}
|
|
1197
|
+
function g(a) {
|
|
1198
|
+
const { x: m, y: r } = a;
|
|
1199
|
+
_.value = !0, v = { x: m, y: r };
|
|
1200
|
+
}
|
|
1201
|
+
function h() {
|
|
1202
|
+
_.value = !1, v = null;
|
|
1203
|
+
}
|
|
1204
|
+
function l(a) {
|
|
1205
|
+
const {
|
|
1206
|
+
context: m,
|
|
1207
|
+
sourceWidth: r,
|
|
1208
|
+
sourceHeight: s,
|
|
1209
|
+
position: p,
|
|
1210
|
+
size: w,
|
|
1211
|
+
initRendered: k,
|
|
1212
|
+
tile: d,
|
|
1213
|
+
pixelDensityRatio: E
|
|
1214
|
+
} = a, R = d.getUrl(), I = t.value * E, Z = p.original.x;
|
|
1215
|
+
if (Z < I && Z + w.x > I) {
|
|
1216
|
+
const Q = I - Z, ve = w.x - Q, te = o.value.find((ke) => ke.url === R), be = (te == null ? void 0 : te.load) === "success" ? te.img : k.canvas;
|
|
1217
|
+
m.drawImage(
|
|
1218
|
+
be,
|
|
1219
|
+
0,
|
|
1220
|
+
0,
|
|
1221
|
+
r * Q / w.x,
|
|
1222
|
+
s,
|
|
1223
|
+
p.x,
|
|
1224
|
+
p.y,
|
|
1225
|
+
Q,
|
|
1226
|
+
w.y
|
|
1227
|
+
), m.drawImage(
|
|
1228
|
+
k.canvas,
|
|
1229
|
+
r * Q / w.x,
|
|
1230
|
+
0,
|
|
1231
|
+
r * ve / w.x,
|
|
1232
|
+
s,
|
|
1233
|
+
p.x + Q,
|
|
1234
|
+
p.y,
|
|
1235
|
+
ve,
|
|
1236
|
+
w.y
|
|
1237
|
+
);
|
|
1238
|
+
} else if (Z + w.x <= I) {
|
|
1239
|
+
const Q = o.value.find((te) => te.url === R), ve = (Q == null ? void 0 : Q.load) === "success" ? Q.img : k.canvas;
|
|
1240
|
+
m.drawImage(
|
|
1241
|
+
ve,
|
|
1242
|
+
0,
|
|
1243
|
+
0,
|
|
1244
|
+
r,
|
|
1245
|
+
s,
|
|
1246
|
+
p.x,
|
|
1247
|
+
p.y,
|
|
1248
|
+
w.x,
|
|
1249
|
+
w.y
|
|
1250
|
+
);
|
|
1251
|
+
} else Z >= I && m.drawImage(
|
|
1252
|
+
k.canvas,
|
|
1253
|
+
0,
|
|
1254
|
+
0,
|
|
1255
|
+
r,
|
|
1256
|
+
s,
|
|
1257
|
+
p.x,
|
|
1258
|
+
p.y,
|
|
1259
|
+
w.x,
|
|
1260
|
+
w.y
|
|
1261
|
+
);
|
|
1262
|
+
}
|
|
1263
|
+
return {
|
|
1264
|
+
getHotmapUrl: u,
|
|
1265
|
+
hotmapImgs: o,
|
|
1266
|
+
handlerImage: l,
|
|
1267
|
+
hotmapLine: t,
|
|
1268
|
+
lineMouseDown: g
|
|
1269
|
+
};
|
|
1270
|
+
}
|
|
1271
|
+
function eo(c, e, o) {
|
|
1272
|
+
const t = ll(), _ = $(!1), v = new BroadcastChannel("sync_kfb_view");
|
|
1273
|
+
v.onmessage = (l) => {
|
|
1274
|
+
const a = l.data;
|
|
1275
|
+
g(a);
|
|
1276
|
+
}, pe(() => {
|
|
1277
|
+
var l, a, m;
|
|
1278
|
+
(l = o.value) == null || l.addEventListener("mouseenter", u), (a = o.value) == null || a.addEventListener("mousemove", u), (m = o.value) == null || m.addEventListener("mouseleave", i);
|
|
1279
|
+
}), Ie(() => {
|
|
1280
|
+
var l, a, m;
|
|
1281
|
+
(l = o.value) == null || l.removeEventListener("mouseenter", u), (a = o.value) == null || a.removeEventListener("mousemove", u), (m = o.value) == null || m.removeEventListener("mouseleave", i), v.close();
|
|
1282
|
+
});
|
|
1283
|
+
function u() {
|
|
1284
|
+
_.value = !0;
|
|
1285
|
+
}
|
|
1286
|
+
function i() {
|
|
1287
|
+
_.value = !1;
|
|
1288
|
+
}
|
|
1289
|
+
function f() {
|
|
1290
|
+
let l;
|
|
1291
|
+
e.value.viewer.addHandler("pan", (a) => {
|
|
1292
|
+
var s, p, w, k;
|
|
1293
|
+
if (!l) {
|
|
1294
|
+
l = (p = (s = a.center) == null ? void 0 : s.clone) == null ? void 0 : p.call(s);
|
|
1295
|
+
return;
|
|
1296
|
+
}
|
|
1297
|
+
const m = a.center, r = (w = m == null ? void 0 : m.minus) == null ? void 0 : w.call(m, l);
|
|
1298
|
+
l = (k = m == null ? void 0 : m.clone) == null ? void 0 : k.call(m), c.syncPosition && h({
|
|
1299
|
+
position: r,
|
|
1300
|
+
type: "sync_position"
|
|
1301
|
+
});
|
|
1302
|
+
}), e.value.viewer.addHandler("zoom", (a) => {
|
|
1303
|
+
c.syncZoom && h({
|
|
1304
|
+
zoom: a.zoom,
|
|
1305
|
+
type: "sync_zoom"
|
|
1306
|
+
});
|
|
1307
|
+
}), e.value.viewer.addHandler("animation-finish", () => {
|
|
1308
|
+
var r;
|
|
1309
|
+
if (c.syncZoom && h({
|
|
1310
|
+
zoom: e.value.viewer.viewport.getZoom(!0),
|
|
1311
|
+
type: "sync_zoom"
|
|
1312
|
+
}), !l)
|
|
1313
|
+
return;
|
|
1314
|
+
const a = e.value.viewer.viewport.getCenter(!0), m = (r = a == null ? void 0 : a.minus) == null ? void 0 : r.call(a, l);
|
|
1315
|
+
l = void 0, c.syncPosition && h({
|
|
1316
|
+
position: m,
|
|
1317
|
+
type: "sync_position"
|
|
1318
|
+
});
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
function g(l) {
|
|
1322
|
+
l.uuid && l.type === "sync_position" && l.uuid !== (t == null ? void 0 : t.uid) ? e.value && e.value.viewer.viewport.panBy(l.position, !0) : l.uuid && l.type === "sync_zoom" && l.uuid !== (t == null ? void 0 : t.uid) && e.value && e.value.viewer.viewport.zoomTo(l.zoom);
|
|
1323
|
+
}
|
|
1324
|
+
function h(l) {
|
|
1325
|
+
var a;
|
|
1326
|
+
_.value && v.postMessage(me(j({}, l), {
|
|
1327
|
+
uuid: t == null ? void 0 : t.uid,
|
|
1328
|
+
fileName: (a = c.slide) == null ? void 0 : a.file
|
|
1329
|
+
}));
|
|
1330
|
+
}
|
|
1331
|
+
return {
|
|
1332
|
+
initSync: f
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
const to = { class: "hzzt-kfb-keyword flex wrap" }, lo = ["onMouseenter"], oo = /* @__PURE__ */ ee({
|
|
1336
|
+
__name: "KfbKeyword",
|
|
1337
|
+
setup(c) {
|
|
1338
|
+
const e = $([
|
|
1339
|
+
{ code: "Q", icon: "zoomIn" },
|
|
1340
|
+
{ code: "W", icon: "arrowUp" },
|
|
1341
|
+
{ code: "E", icon: "zoomOut" },
|
|
1342
|
+
{ code: "A", icon: "arrowLeft" },
|
|
1343
|
+
{ code: "S", icon: "arrowDown" },
|
|
1344
|
+
{ code: "D", icon: "arrowRight" }
|
|
1345
|
+
]), o = J("kfbView", $({}));
|
|
1346
|
+
let t = null;
|
|
1347
|
+
function _(u, i) {
|
|
1348
|
+
u.preventDefault(), t && clearTimeout(t), t = setInterval(() => {
|
|
1349
|
+
i === "E" && (o.value.viewer.viewport.zoomBy(1.1), o.value.viewer.viewport.applyConstraints()), i === "Q" && (o.value.viewer.viewport.zoomBy(0.9), o.value.viewer.viewport.applyConstraints()), i === "W" && (o.value.viewer.viewport.panBy(o.value.viewer.viewport.deltaPointsFromPixels(new Te.Point(0, -40))), o.value.viewer.viewport.applyConstraints()), i === "S" && (o.value.viewer.viewport.panBy(o.value.viewer.viewport.deltaPointsFromPixels(new Te.Point(0, 40))), o.value.viewer.viewport.applyConstraints()), i === "A" && (o.value.viewer.viewport.panBy(o.value.viewer.viewport.deltaPointsFromPixels(new Te.Point(-40, 0))), o.value.viewer.viewport.applyConstraints()), i === "D" && (o.value.viewer.viewport.panBy(o.value.viewer.viewport.deltaPointsFromPixels(new Te.Point(40, 0))), o.value.viewer.viewport.applyConstraints());
|
|
1350
|
+
}, 120);
|
|
1351
|
+
}
|
|
1352
|
+
function v() {
|
|
1353
|
+
t && (clearInterval(t), t = null);
|
|
1354
|
+
}
|
|
1355
|
+
return Ie(() => {
|
|
1356
|
+
clearTimeout(t);
|
|
1357
|
+
}), (u, i) => (y(), L("div", to, [
|
|
1358
|
+
(y(!0), L(le, null, oe(e.value, (f) => (y(), L("div", {
|
|
1359
|
+
key: f.code,
|
|
1360
|
+
class: "hzzt-kfb-keyword__code flex column align-items-center justify-content-center",
|
|
1361
|
+
onMouseenter: (g) => _(g, f.code),
|
|
1362
|
+
onMouseleave: v
|
|
1363
|
+
}, [
|
|
1364
|
+
b("p", null, V(f.code), 1),
|
|
1365
|
+
T(X, {
|
|
1366
|
+
size: "14",
|
|
1367
|
+
name: f.icon
|
|
1368
|
+
}, null, 8, ["name"])
|
|
1369
|
+
], 40, lo))), 128))
|
|
1370
|
+
]));
|
|
1371
|
+
}
|
|
1372
|
+
}), no = /* @__PURE__ */ he(oo, [["__scopeId", "data-v-c8d940f0"]]);
|
|
1373
|
+
function ao(c, e, o = {}) {
|
|
1374
|
+
const {
|
|
1375
|
+
panSensitivity: t = 0.2,
|
|
1376
|
+
// 值越大,鼠标移动时图像移动越快
|
|
1377
|
+
zoomSensitivity: _ = 1.1,
|
|
1378
|
+
// 值越大,滚轮缩放幅度越大
|
|
1379
|
+
damping: v = 0.6,
|
|
1380
|
+
// 值越大,惯性滑动时间越长
|
|
1381
|
+
minThreshold: u = 0.05
|
|
1382
|
+
// 值越小,停止移动时的精度越高
|
|
1383
|
+
} = o;
|
|
1384
|
+
let i = !1, f = null, g = 0, h = 0, l = !1;
|
|
1385
|
+
const a = () => {
|
|
1386
|
+
i = document.pointerLockElement === e.value, i || m();
|
|
1387
|
+
}, m = () => {
|
|
1388
|
+
g = 0, h = 0, f && (cancelAnimationFrame(f), f = null), l = !1;
|
|
1389
|
+
}, r = (d) => Ce(this, null, function* () {
|
|
1390
|
+
try {
|
|
1391
|
+
d.key === "l" && e.value && (document.pointerLockElement ? (document.exitPointerLock(), console.log("鼠标已解锁!")) : (yield e.value.requestPointerLock(), console.log("鼠标已锁定!")));
|
|
1392
|
+
} catch (E) {
|
|
1393
|
+
console.error("无法锁定鼠标:", E);
|
|
1394
|
+
}
|
|
1395
|
+
}), s = (d) => {
|
|
1396
|
+
if (i) {
|
|
1397
|
+
d.preventDefault();
|
|
1398
|
+
const E = Math.pow(_, Math.sign(d.deltaY) * -1);
|
|
1399
|
+
c.value.viewer.viewport.zoomBy(E), c.value.viewer.viewport.applyConstraints();
|
|
1400
|
+
}
|
|
1401
|
+
}, p = (d) => {
|
|
1402
|
+
i && (g += d.movementX * t, h += d.movementY * t, !l && (Math.abs(g) > 1 || Math.abs(h) > 1) && (l = !0, f = requestAnimationFrame(w)));
|
|
1403
|
+
}, w = () => {
|
|
1404
|
+
const d = c.value.viewer.viewport;
|
|
1405
|
+
if (Math.abs(g) > u || Math.abs(h) > u) {
|
|
1406
|
+
const E = d.deltaPointsFromPixels(
|
|
1407
|
+
new Te.Point(g, h)
|
|
1408
|
+
);
|
|
1409
|
+
d.panBy(E), d.applyConstraints();
|
|
1410
|
+
}
|
|
1411
|
+
g *= v, h *= v, Math.abs(g) > u || Math.abs(h) > u ? f = requestAnimationFrame(w) : m();
|
|
1412
|
+
}, k = () => {
|
|
1413
|
+
i && document.exitPointerLock();
|
|
1414
|
+
};
|
|
1415
|
+
return pe(() => {
|
|
1416
|
+
var d;
|
|
1417
|
+
(d = e.value) == null || d.addEventListener("keydown", r), document.addEventListener("wheel", s, { passive: !1 }), document.addEventListener("click", k), document.addEventListener("mousemove", p), document.addEventListener("pointerlockchange", a);
|
|
1418
|
+
}), Ie(() => {
|
|
1419
|
+
var d;
|
|
1420
|
+
(d = e.value) == null || d.removeEventListener("keydown", r), document.removeEventListener("click", k), document.removeEventListener("wheel", s), document.removeEventListener("mousemove", p), document.removeEventListener("pointerlockchange", a), m();
|
|
1421
|
+
}), {
|
|
1422
|
+
setConfig: (d) => {
|
|
1423
|
+
Object.assign(o, d);
|
|
1424
|
+
}
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1427
|
+
const so = /* @__PURE__ */ ee({
|
|
1428
|
+
__name: "KfbLevel",
|
|
1429
|
+
props: /* @__PURE__ */ we({
|
|
1430
|
+
slides: { default: () => [] }
|
|
1431
|
+
}, {
|
|
1432
|
+
"model-value": {
|
|
1433
|
+
default: 0
|
|
1434
|
+
},
|
|
1435
|
+
"model-valueModifiers": {}
|
|
1436
|
+
}),
|
|
1437
|
+
emits: ["update:model-value"],
|
|
1438
|
+
setup(c) {
|
|
1439
|
+
const e = c, o = Ee(c, "model-value"), t = J("kfbView", $({})), _ = B(() => Array.from(new Array(e.slides.length + 1)).map((u, i) => i));
|
|
1440
|
+
function v() {
|
|
1441
|
+
const u = t.value.viewer.world.getItemAt(0), i = Object.keys(u.tilesMatrix);
|
|
1442
|
+
i.forEach((f, g) => {
|
|
1443
|
+
g > i.length - 4 && (u.tilesMatrix[f] = {});
|
|
1444
|
+
}), u.draw();
|
|
1445
|
+
}
|
|
1446
|
+
return (u, i) => (y(), L("div", {
|
|
1447
|
+
class: ye(["hzzt-kfb-level flex column align-items-center", u.slides.length > 5 ? "hzzt-kfb-level--large" : ""])
|
|
1448
|
+
}, [
|
|
1449
|
+
T(X, {
|
|
1450
|
+
name: "level",
|
|
1451
|
+
size: "24",
|
|
1452
|
+
class: "margin-b-4 margin-t-2"
|
|
1453
|
+
}),
|
|
1454
|
+
T(n(al), {
|
|
1455
|
+
modelValue: o.value,
|
|
1456
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => o.value = f),
|
|
1457
|
+
vertical: "",
|
|
1458
|
+
min: _.value[0],
|
|
1459
|
+
step: 1,
|
|
1460
|
+
max: _.value[_.value.length - 1],
|
|
1461
|
+
"show-stops": "",
|
|
1462
|
+
"show-tooltip": !0,
|
|
1463
|
+
placement: "left",
|
|
1464
|
+
height: u.slides.length > 5 ? "180px" : "130px",
|
|
1465
|
+
onInput: v
|
|
1466
|
+
}, null, 8, ["modelValue", "min", "max", "height"])
|
|
1467
|
+
], 2));
|
|
1468
|
+
}
|
|
1469
|
+
}), io = {
|
|
1470
|
+
key: 0,
|
|
1471
|
+
class: "flex hzzt-kfb-channel"
|
|
1472
|
+
}, ro = ["onClick"], uo = /* @__PURE__ */ ee({
|
|
1473
|
+
__name: "KfbChannel",
|
|
1474
|
+
props: /* @__PURE__ */ we({
|
|
1475
|
+
info: {}
|
|
1476
|
+
}, {
|
|
1477
|
+
"model-value": {
|
|
1478
|
+
default: () => []
|
|
1479
|
+
},
|
|
1480
|
+
"model-valueModifiers": {}
|
|
1481
|
+
}),
|
|
1482
|
+
emits: /* @__PURE__ */ we(["load"], ["update:model-value"]),
|
|
1483
|
+
setup(c, { emit: e }) {
|
|
1484
|
+
const o = c, t = e, _ = Ee(c, "model-value"), v = [
|
|
1485
|
+
{ key: "DAPI", color: "#4A6CF7" },
|
|
1486
|
+
{ key: "480", color: "#00BFFF" },
|
|
1487
|
+
{ key: "520", color: "#32CD32" },
|
|
1488
|
+
{ key: "570", color: "#FFAA33" },
|
|
1489
|
+
{ key: "620", color: "#FF6347" },
|
|
1490
|
+
{ key: "670", color: "#DC143C" },
|
|
1491
|
+
{ key: "780", color: "#4B0082" }
|
|
1492
|
+
], u = B(() => {
|
|
1493
|
+
var f;
|
|
1494
|
+
return (((f = o.info) == null ? void 0 : f.channel) || []).map((g) => {
|
|
1495
|
+
const h = v.find((l) => l.key === g.eqt_num);
|
|
1496
|
+
return {
|
|
1497
|
+
label: g.eqt_num,
|
|
1498
|
+
color: g.r ? `rgb(${g.r}, ${g.g}, ${g.b})` : h == null ? void 0 : h.color
|
|
1499
|
+
};
|
|
1500
|
+
});
|
|
1501
|
+
});
|
|
1502
|
+
function i(f) {
|
|
1503
|
+
_.value.includes(f) ? _.value = _.value.filter((g) => g !== f) : _.value.push(f), t("load");
|
|
1504
|
+
}
|
|
1505
|
+
return (f, g) => u.value.length > 0 ? (y(), L("div", io, [
|
|
1506
|
+
T(X, {
|
|
1507
|
+
name: "channel",
|
|
1508
|
+
size: "32"
|
|
1509
|
+
}),
|
|
1510
|
+
(y(!0), L(le, null, oe(u.value, (h) => (y(), L("div", {
|
|
1511
|
+
key: h.label,
|
|
1512
|
+
style: W({ background: h.color }),
|
|
1513
|
+
class: ye(["hzzt-kfb-channel__box", _.value.includes(h.label) ? "" : "hzzt-kfb-channel__box--unactive"]),
|
|
1514
|
+
onClick: (l) => i(h.label)
|
|
1515
|
+
}, V(h.label), 15, ro))), 128))
|
|
1516
|
+
])) : A("", !0);
|
|
1517
|
+
}
|
|
1518
|
+
}), co = { class: "flex align-items-center justify-content-between" }, vo = { class: "hzzt-kfb-title" }, fo = { class: "hzzt-kfb-annotation__container flex-1" }, mo = ["onClick"], po = /* @__PURE__ */ ee({
|
|
1519
|
+
__name: "KfbAnnotation",
|
|
1520
|
+
props: /* @__PURE__ */ we({
|
|
1521
|
+
annotation: {},
|
|
1522
|
+
annotations: {}
|
|
1523
|
+
}, {
|
|
1524
|
+
expand: { type: Boolean },
|
|
1525
|
+
expandModifiers: {}
|
|
1526
|
+
}),
|
|
1527
|
+
emits: /* @__PURE__ */ we(["select"], ["update:expand"]),
|
|
1528
|
+
setup(c, { emit: e }) {
|
|
1529
|
+
const o = Ee(c, "expand"), t = e, { t: _ } = de();
|
|
1530
|
+
function v(i) {
|
|
1531
|
+
const f = i.subType || i.tool || "";
|
|
1532
|
+
return `mark${f.substring(0, 1).toLocaleUpperCase()}${f.substring(1)}`;
|
|
1533
|
+
}
|
|
1534
|
+
function u(i) {
|
|
1535
|
+
t("select", i);
|
|
1536
|
+
}
|
|
1537
|
+
return (i, f) => (y(), L("div", {
|
|
1538
|
+
class: ye(["hzzt-kfb-annotation flex column", o.value ? "hzzt-kfb-annotation--expand" : ""])
|
|
1539
|
+
}, [
|
|
1540
|
+
b("div", co, [
|
|
1541
|
+
$e(b("div", vo, [
|
|
1542
|
+
b("span", null, V(n(_)("标注列表")), 1)
|
|
1543
|
+
], 512), [
|
|
1544
|
+
[Re, o.value]
|
|
1545
|
+
]),
|
|
1546
|
+
T(X, {
|
|
1547
|
+
class: "hzzt-kfb-annotation__icon",
|
|
1548
|
+
name: o.value ? "expandLeft" : "expandRight",
|
|
1549
|
+
onClick: f[0] || (f[0] = (g) => o.value = !o.value)
|
|
1550
|
+
}, null, 8, ["name"])
|
|
1551
|
+
]),
|
|
1552
|
+
$e(b("div", fo, [
|
|
1553
|
+
(y(!0), L(le, null, oe(i.annotations, (g, h) => {
|
|
1554
|
+
var l;
|
|
1555
|
+
return y(), L("div", {
|
|
1556
|
+
class: ye(["hzzt-kfb-annotation__item", ((l = i.annotation) == null ? void 0 : l.id) === g.id ? "hzzt-kfb-annotation__item--active" : ""]),
|
|
1557
|
+
key: h,
|
|
1558
|
+
onClick: (a) => u(g)
|
|
1559
|
+
}, [
|
|
1560
|
+
T(X, {
|
|
1561
|
+
size: "16",
|
|
1562
|
+
name: v(g)
|
|
1563
|
+
}, null, 8, ["name"]),
|
|
1564
|
+
b("span", null, V(n(_)("标注")) + V(h + 1), 1)
|
|
1565
|
+
], 10, mo);
|
|
1566
|
+
}), 128))
|
|
1567
|
+
], 512), [
|
|
1568
|
+
[Re, o.value]
|
|
1569
|
+
])
|
|
1570
|
+
], 2));
|
|
1571
|
+
}
|
|
1572
|
+
}), ho = /* @__PURE__ */ he(po, [["__scopeId", "data-v-bfc56a3e"]]), go = ["element-loading-text"], wo = {
|
|
1573
|
+
key: 1,
|
|
1574
|
+
class: "hzzt-kfb-view__main flex align-items-center justify-content-center"
|
|
1575
|
+
}, yo = {
|
|
1576
|
+
class: "hzzt-kfb-view__filter",
|
|
1577
|
+
height: "0",
|
|
1578
|
+
width: "0"
|
|
1579
|
+
}, _o = { id: "colorMatrixFilter" }, bo = ["values"], ko = ["values"], zo = ["exponent"], Co = ["exponent"], To = ["exponent"], $o = { class: "flex nowrap justify-content-center overflow-hidden" }, Lo = ["src"], xo = ["src"], Eo = { class: "flex-1" }, Vo = { class: "flex-1" }, Mo = { class: "flex-1" }, Io = { class: "flex-1" }, So = { class: "flex-1" }, Ho = { class: "flex-1" }, Po = ["src"], Ro = {
|
|
1580
|
+
key: 2,
|
|
1581
|
+
class: "margin-l-2"
|
|
1582
|
+
}, Me = /* @__PURE__ */ ee({
|
|
1583
|
+
name: "HzztKfbView",
|
|
1584
|
+
__name: "index",
|
|
1585
|
+
props: {
|
|
1586
|
+
slide: {},
|
|
1587
|
+
fileHandle: {},
|
|
1588
|
+
labelHandle: {},
|
|
1589
|
+
tileHandle: {},
|
|
1590
|
+
navigatorHandle: {},
|
|
1591
|
+
pathologyHandle: {},
|
|
1592
|
+
uploadHandle: {},
|
|
1593
|
+
options: {},
|
|
1594
|
+
labelDrawing: {},
|
|
1595
|
+
process: { default: () => j({}, $t) },
|
|
1596
|
+
microscope: { default: () => j({}, lt) },
|
|
1597
|
+
menus: {},
|
|
1598
|
+
aiLabelList: {},
|
|
1599
|
+
hotmap: {},
|
|
1600
|
+
syncPosition: { type: Boolean },
|
|
1601
|
+
syncZoom: { type: Boolean },
|
|
1602
|
+
audioType: {}
|
|
1603
|
+
},
|
|
1604
|
+
emits: ["tool"],
|
|
1605
|
+
setup(c, { expose: e, emit: o }) {
|
|
1606
|
+
const t = c, _ = o, { t: v, locale: u } = de(), i = $(), f = $(), g = $(), h = $(!1), l = $({}), a = $(!1), m = $(0), r = $(0), s = $(0), p = $([]), w = $({
|
|
1607
|
+
width: 0,
|
|
1608
|
+
height: 0,
|
|
1609
|
+
fileNum: 0,
|
|
1610
|
+
scanScale: 1,
|
|
1611
|
+
fileName: "",
|
|
1612
|
+
ratiomap: {}
|
|
1613
|
+
}), k = J("show-kfb-label", $(!0)), d = J("show-keyboard", $(!1)), E = J("hidden-all-label", $(!1)), R = $(!1), I = Ct.directive;
|
|
1614
|
+
ne(() => {
|
|
1615
|
+
var z;
|
|
1616
|
+
return (z = t.slide) == null ? void 0 : z.file;
|
|
1617
|
+
}, () => {
|
|
1618
|
+
Ft(), setTimeout(() => {
|
|
1619
|
+
it();
|
|
1620
|
+
}, 100);
|
|
1621
|
+
}), pe(() => {
|
|
1622
|
+
it();
|
|
1623
|
+
});
|
|
1624
|
+
const {
|
|
1625
|
+
imageProcess: Z,
|
|
1626
|
+
matrixValues: Q,
|
|
1627
|
+
saturateValues: ve,
|
|
1628
|
+
forceRedraw: te
|
|
1629
|
+
} = Cl(t), {
|
|
1630
|
+
tailorEvent: be,
|
|
1631
|
+
shotScreen: ke
|
|
1632
|
+
} = Tl(_, l), {
|
|
1633
|
+
moveEvent: Ze,
|
|
1634
|
+
fastMove: qe
|
|
1635
|
+
} = ql(l, r), { initSync: Ye } = eo(t, l, i);
|
|
1636
|
+
ao(l, i);
|
|
1637
|
+
const { drawDot: Xe } = Xl(), {
|
|
1638
|
+
voiceVisible: Se,
|
|
1639
|
+
voiceForm: C,
|
|
1640
|
+
drawVoice: N,
|
|
1641
|
+
recordTime: F,
|
|
1642
|
+
isRecording: ie,
|
|
1643
|
+
startRecording: He,
|
|
1644
|
+
stopRecording: Lt,
|
|
1645
|
+
initVoice: xt,
|
|
1646
|
+
cancelRecord: Et,
|
|
1647
|
+
confirmRecord: Vt
|
|
1648
|
+
} = Ql(t, Pt), {
|
|
1649
|
+
currentLabel: Qe,
|
|
1650
|
+
localLabelList: nt,
|
|
1651
|
+
initLabel: Mt,
|
|
1652
|
+
jumpToLabel: at,
|
|
1653
|
+
reloadLabelList: It,
|
|
1654
|
+
eventHandel: St,
|
|
1655
|
+
addHandle: Ht
|
|
1656
|
+
} = Yl(t, _, l, xt, Je);
|
|
1657
|
+
function Pt(z) {
|
|
1658
|
+
Ht(z);
|
|
1659
|
+
}
|
|
1660
|
+
const {
|
|
1661
|
+
getHotmapUrl: Rt,
|
|
1662
|
+
handlerImage: At,
|
|
1663
|
+
hotmapLine: Nt,
|
|
1664
|
+
lineMouseDown: st,
|
|
1665
|
+
hotmapImgs: Bt
|
|
1666
|
+
} = Jl(t, l);
|
|
1667
|
+
function it() {
|
|
1668
|
+
var z;
|
|
1669
|
+
(z = t.slide) != null && z.file && t.fileHandle && (a.value || (a.value = !0, t.fileHandle(t.slide).then((S) => {
|
|
1670
|
+
var q, ae, fe, K;
|
|
1671
|
+
w.value = S, p.value = (((q = w.value) == null ? void 0 : q.channel) || []).map((U) => U.eqt_num), l.value = new ue(j({
|
|
1672
|
+
el: f.value,
|
|
1673
|
+
fileName: (ae = t.slide) == null ? void 0 : ae.file,
|
|
1674
|
+
scale: w.value.scanScale,
|
|
1675
|
+
lang: (u == null ? void 0 : u.value) === "en-US" ? "en" : u == null ? void 0 : u.value,
|
|
1676
|
+
navigator: {
|
|
1677
|
+
style: "left: 0;bottom: 0",
|
|
1678
|
+
thumbnail: w.value.thumbnailImg,
|
|
1679
|
+
width: 200,
|
|
1680
|
+
height: 180
|
|
1681
|
+
},
|
|
1682
|
+
grid: {
|
|
1683
|
+
show: !1,
|
|
1684
|
+
ruler: !1,
|
|
1685
|
+
pxConversion: !0
|
|
1686
|
+
},
|
|
1687
|
+
thumb: {
|
|
1688
|
+
bgColor: "rgba(0,0,0,0)"
|
|
1689
|
+
},
|
|
1690
|
+
graduation: {
|
|
1691
|
+
show: !0,
|
|
1692
|
+
right: 120,
|
|
1693
|
+
bottom: (K = (fe = w.value) == null ? void 0 : fe.channel) != null && K.length ? 120 : 30,
|
|
1694
|
+
tick: {
|
|
1695
|
+
number: 3,
|
|
1696
|
+
height: 8
|
|
1697
|
+
}
|
|
1698
|
+
},
|
|
1699
|
+
pxConversion: {
|
|
1700
|
+
units: ["um", "mm"],
|
|
1701
|
+
binary: 1e3,
|
|
1702
|
+
imageCapRes: w.value.imageCapRes || w.value.scanResolution || 1
|
|
1703
|
+
},
|
|
1704
|
+
openSeadragonOptions: {
|
|
1705
|
+
maxZoomLevel: w.value.scanScale * 20,
|
|
1706
|
+
pixelsPerArrowPress: 200,
|
|
1707
|
+
animationTime: 0,
|
|
1708
|
+
tileSources: rt()
|
|
1709
|
+
},
|
|
1710
|
+
tileDrawing: At,
|
|
1711
|
+
label: {
|
|
1712
|
+
drawing: (U, D, ze) => {
|
|
1713
|
+
var Ne;
|
|
1714
|
+
if (D != null && D.custom) {
|
|
1715
|
+
const Y = U.getContext("2d");
|
|
1716
|
+
Y.save(), Y.beginPath();
|
|
1717
|
+
const Pe = (D == null ? void 0 : D.subType) || ((Ne = D == null ? void 0 : D.__data__) == null ? void 0 : Ne.subType);
|
|
1718
|
+
Pe === "count" ? (Y.translate(ze.x - 14, ze.y - 22), Xe(Y, (D == null ? void 0 : D.strokeStyle) || "")) : Pe === "voice" ? (Y.translate(ze.x - 16, ze.y - 18), N(Y, (D == null ? void 0 : D.strokeStyle) || "")) : t.labelDrawing && t.labelDrawing(Y, D), Y.restore();
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
}, t.options || {})), l.value.viewer.drawer.canvas.style.filter = "url(#colorMatrixFilter)", Mt(), Ut(), Ye();
|
|
1723
|
+
}).finally(() => {
|
|
1724
|
+
a.value = !1, E.value && (vt({
|
|
1725
|
+
show: !1,
|
|
1726
|
+
ruler: !1
|
|
1727
|
+
}), ft({
|
|
1728
|
+
show: !1
|
|
1729
|
+
}), setTimeout(() => {
|
|
1730
|
+
mt(!1);
|
|
1731
|
+
}, 100));
|
|
1732
|
+
})));
|
|
1733
|
+
}
|
|
1734
|
+
function Dt() {
|
|
1735
|
+
const z = l.value.viewer;
|
|
1736
|
+
if (z.world) {
|
|
1737
|
+
const S = z.world.getItemAt(0), q = z.viewport.getZoom(), ae = z.viewport.getCenter();
|
|
1738
|
+
z.world.removeItem(S), z.addTiledImage({
|
|
1739
|
+
tileSource: rt(),
|
|
1740
|
+
success: function() {
|
|
1741
|
+
z.viewport.zoomTo(q), z.viewport.panTo(ae);
|
|
1742
|
+
}
|
|
1743
|
+
});
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
function rt() {
|
|
1747
|
+
var fe, K;
|
|
1748
|
+
const z = w.value.tileWidth || w.value.imageBlockLen || 256, S = w.value.tileHeight || w.value.imageBlockLen || 256, q = {};
|
|
1749
|
+
(fe = t.hotmap) != null && fe.enable && (((K = t.hotmap) == null ? void 0 : K.info) || []).forEach((U) => {
|
|
1750
|
+
q[U[0] / z + "_" + U[1] / S + "_" + U[2]] = !0;
|
|
1751
|
+
});
|
|
1752
|
+
let ae = 10;
|
|
1753
|
+
return Object.keys(w.value.ratiomap).forEach((U) => {
|
|
1754
|
+
const D = w.value.fileNum - Math.sqrt(w.value.scanScale / Number(U));
|
|
1755
|
+
D > 0 && (ae = ae ? Math.min(ae, D) : D);
|
|
1756
|
+
}), {
|
|
1757
|
+
height: w.value.height,
|
|
1758
|
+
width: w.value.width,
|
|
1759
|
+
tileWidth: z,
|
|
1760
|
+
tileHeight: S,
|
|
1761
|
+
minLevel: Math.floor(ae || 8),
|
|
1762
|
+
getTileUrl: (U, D, ze) => {
|
|
1763
|
+
var pt, ht, gt, wt;
|
|
1764
|
+
const Ne = U, Y = {
|
|
1765
|
+
file: ((pt = t.slide) == null ? void 0 : pt.file) || "",
|
|
1766
|
+
x: D,
|
|
1767
|
+
y: ze,
|
|
1768
|
+
scale: "0",
|
|
1769
|
+
level: U,
|
|
1770
|
+
channel: JSON.stringify(p.value)
|
|
1771
|
+
};
|
|
1772
|
+
w.value.fileNum === U ? (U = w.value.scanScale, Y.scale = U.toFixed(6)) : (U = w.value.scanScale / Math.pow(2, w.value.fileNum - U), Y.scale = U.toFixed(6)), Y.level = Ne, Y.file = s.value === 0 ? Y.file : ((gt = (ht = t.slide) == null ? void 0 : ht.children) == null ? void 0 : gt[s.value - 1]) || "";
|
|
1773
|
+
const Pe = t.tileHandle(Y);
|
|
1774
|
+
return (wt = t.hotmap) != null && wt.enable ? Rt(Pe, Y, q) : Pe;
|
|
1775
|
+
}
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
function Ut() {
|
|
1779
|
+
l.value.viewer.addHandler("rotate", (z) => {
|
|
1780
|
+
m.value = z.degrees || 0;
|
|
1781
|
+
}), l.value.viewer.addHandler("zoom", (z) => {
|
|
1782
|
+
const S = l.value.viewer.viewport.viewportToImageZoom(
|
|
1783
|
+
z.zoom || 0
|
|
1784
|
+
) * Number(l.value.$options.scale);
|
|
1785
|
+
r.value = Number(S.toFixed(2));
|
|
1786
|
+
}), l.value.$on(ue.events.EVENT_NAVIGATOR_VESTIGE, (z) => {
|
|
1787
|
+
t.navigatorHandle && t.navigatorHandle("add", t.slide, z);
|
|
1788
|
+
}), t.navigatorHandle && t.navigatorHandle("list", t.slide).then((z) => {
|
|
1789
|
+
var S, q;
|
|
1790
|
+
(q = (S = l.value.navigator) == null ? void 0 : S.drawPointList) == null || q.call(S, z);
|
|
1791
|
+
}), be(), Ze();
|
|
1792
|
+
}
|
|
1793
|
+
function Ft() {
|
|
1794
|
+
var z;
|
|
1795
|
+
(z = l.value) != null && z.destroy && (l.value.destroy(), l.value = {}, w.value = {
|
|
1796
|
+
width: 0,
|
|
1797
|
+
height: 0,
|
|
1798
|
+
fileNum: 0,
|
|
1799
|
+
scanScale: 1,
|
|
1800
|
+
fileName: "",
|
|
1801
|
+
ratiomap: {}
|
|
1802
|
+
}, Bt.value = [], p.value = [], r.value = 0, m.value = 0, s.value = 0);
|
|
1803
|
+
}
|
|
1804
|
+
function ut(z, S) {
|
|
1805
|
+
z === "annotate" ? ct(S) : z === "tailor" ? ke(S) : z === "info" ? h.value = !0 : z === "flip" ? dt() : z === "delete" ? St("delete")(Qe.value) : _("tool", z, S);
|
|
1806
|
+
}
|
|
1807
|
+
function ct(z) {
|
|
1808
|
+
z.tool === "Voice" && (z.subType = "voice", z.tool = "Dot", z.custom = !0), l.value.board.startDraw(z);
|
|
1809
|
+
}
|
|
1810
|
+
function Kt() {
|
|
1811
|
+
l.value.board.endDraw();
|
|
1812
|
+
}
|
|
1813
|
+
function dt() {
|
|
1814
|
+
l.value.viewer.viewport.toggleFlip();
|
|
1815
|
+
}
|
|
1816
|
+
function jt(z) {
|
|
1817
|
+
var S, q;
|
|
1818
|
+
(q = (S = g.value) == null ? void 0 : S.scopeChange) == null || q.call(S, z);
|
|
1819
|
+
}
|
|
1820
|
+
function Ot() {
|
|
1821
|
+
h.value = !0;
|
|
1822
|
+
}
|
|
1823
|
+
function vt(z) {
|
|
1824
|
+
l.value.grid.updated(z);
|
|
1825
|
+
}
|
|
1826
|
+
function ft(z) {
|
|
1827
|
+
l.value.graduation.updated(z);
|
|
1828
|
+
}
|
|
1829
|
+
function mt(z) {
|
|
1830
|
+
l.value.navigator.element.style.display = z ? "flex" : "none";
|
|
1831
|
+
}
|
|
1832
|
+
function Je(z) {
|
|
1833
|
+
const S = l.value.viewer.viewport.imageToViewportZoom(Number(z / l.value.$options.scale));
|
|
1834
|
+
l.value.viewer.viewport.zoomTo(S);
|
|
1835
|
+
}
|
|
1836
|
+
function Gt(z, S) {
|
|
1837
|
+
l.value.area && (l.value.area.moveToLabel(l.value.viewer.viewport.imageToViewportCoordinates(
|
|
1838
|
+
z.x + z.width / 2,
|
|
1839
|
+
z.y + z.height / 2
|
|
1840
|
+
)), Je(S));
|
|
1841
|
+
}
|
|
1842
|
+
return re("kfbView", l), re("currentLabel", Qe), e({
|
|
1843
|
+
kfbView: l,
|
|
1844
|
+
degrees: m,
|
|
1845
|
+
zoom: r,
|
|
1846
|
+
forceRedraw: te,
|
|
1847
|
+
toggleFlip: dt,
|
|
1848
|
+
startDraw: ct,
|
|
1849
|
+
endDraw: Kt,
|
|
1850
|
+
shotScreen: ke,
|
|
1851
|
+
info: Ot,
|
|
1852
|
+
scopeChange: jt,
|
|
1853
|
+
updateGrid: vt,
|
|
1854
|
+
updateGraduation: ft,
|
|
1855
|
+
updateNavigator: mt,
|
|
1856
|
+
fastMove: qe,
|
|
1857
|
+
zoomTo: Je,
|
|
1858
|
+
jumpToLabel: at,
|
|
1859
|
+
jumpToPosition: Gt,
|
|
1860
|
+
reloadLabelList: It
|
|
1861
|
+
}), (z, S) => {
|
|
1862
|
+
var q, ae, fe;
|
|
1863
|
+
return y(), L("div", {
|
|
1864
|
+
ref_key: "mainKfbViewRef",
|
|
1865
|
+
ref: i,
|
|
1866
|
+
class: "hzzt-kfb-view"
|
|
1867
|
+
}, [
|
|
1868
|
+
z.slide.file ? $e((y(), L("div", {
|
|
1869
|
+
key: 0,
|
|
1870
|
+
ref_key: "kfbViewMainRef",
|
|
1871
|
+
ref: f,
|
|
1872
|
+
class: "hzzt-kfb-view__main",
|
|
1873
|
+
"element-loading-text": n(v)("加载中"),
|
|
1874
|
+
"element-loading-background": "rgba(0, 0, 0, 0.8)"
|
|
1875
|
+
}, null, 8, go)), [
|
|
1876
|
+
[n(I), a.value]
|
|
1877
|
+
]) : (y(), L("div", wo, S[5] || (S[5] = [
|
|
1878
|
+
b("img", {
|
|
1879
|
+
style: { width: "50%" },
|
|
1880
|
+
src: Ge
|
|
1881
|
+
}, null, -1)
|
|
1882
|
+
]))),
|
|
1883
|
+
z.slide.analysis && z.slide.analysis.result ? (y(), P(n(Tt), {
|
|
1884
|
+
key: 2,
|
|
1885
|
+
class: "hzzt-kfb-view__tag"
|
|
1886
|
+
}, {
|
|
1887
|
+
default: x(() => [
|
|
1888
|
+
G(V(z.slide.analysis.result), 1)
|
|
1889
|
+
]),
|
|
1890
|
+
_: 1
|
|
1891
|
+
})) : A("", !0),
|
|
1892
|
+
(y(), L("svg", yo, [
|
|
1893
|
+
b("filter", _o, [
|
|
1894
|
+
b("feColorMatrix", {
|
|
1895
|
+
values: n(Q),
|
|
1896
|
+
type: "matrix"
|
|
1897
|
+
}, null, 8, bo),
|
|
1898
|
+
b("feColorMatrix", {
|
|
1899
|
+
values: n(ve),
|
|
1900
|
+
type: "saturate"
|
|
1901
|
+
}, null, 8, ko),
|
|
1902
|
+
b("feComponentTransfer", null, [
|
|
1903
|
+
b("feFuncR", {
|
|
1904
|
+
id: "feFuncR",
|
|
1905
|
+
type: "gamma",
|
|
1906
|
+
exponent: n(Z).ga,
|
|
1907
|
+
amplitude: "1",
|
|
1908
|
+
offset: "0"
|
|
1909
|
+
}, null, 8, zo),
|
|
1910
|
+
b("feFuncG", {
|
|
1911
|
+
id: "feFuncG",
|
|
1912
|
+
type: "gamma",
|
|
1913
|
+
exponent: n(Z).ga,
|
|
1914
|
+
amplitude: "1",
|
|
1915
|
+
offset: "0"
|
|
1916
|
+
}, null, 8, Co),
|
|
1917
|
+
b("feFuncB", {
|
|
1918
|
+
id: "feFuncB",
|
|
1919
|
+
type: "gamma",
|
|
1920
|
+
exponent: n(Z).ga,
|
|
1921
|
+
amplitude: "1",
|
|
1922
|
+
offset: "0"
|
|
1923
|
+
}, null, 8, To)
|
|
1924
|
+
])
|
|
1925
|
+
])
|
|
1926
|
+
])),
|
|
1927
|
+
T(Pl, {
|
|
1928
|
+
menus: z.menus,
|
|
1929
|
+
onTool: ut
|
|
1930
|
+
}, null, 8, ["menus"]),
|
|
1931
|
+
T(Nl, Ke(z.microscope, {
|
|
1932
|
+
ref_key: "microscopeRef",
|
|
1933
|
+
ref: g
|
|
1934
|
+
}), null, 16),
|
|
1935
|
+
n(k) && z.slide.file ? (y(), P(Zl, {
|
|
1936
|
+
key: 3,
|
|
1937
|
+
info: w.value,
|
|
1938
|
+
slide: z.slide,
|
|
1939
|
+
pathologyHandle: z.pathologyHandle,
|
|
1940
|
+
onTool: ut
|
|
1941
|
+
}, null, 8, ["info", "slide", "pathologyHandle"])) : A("", !0),
|
|
1942
|
+
n(d) ? (y(), P(no, { key: 4 })) : A("", !0),
|
|
1943
|
+
(q = z.slide.children) != null && q.length ? (y(), P(so, {
|
|
1944
|
+
key: 5,
|
|
1945
|
+
modelValue: s.value,
|
|
1946
|
+
"onUpdate:modelValue": S[0] || (S[0] = (K) => s.value = K),
|
|
1947
|
+
slides: z.slide.children
|
|
1948
|
+
}, null, 8, ["modelValue", "slides"])) : A("", !0),
|
|
1949
|
+
(fe = (ae = w.value) == null ? void 0 : ae.channel) != null && fe.length ? (y(), P(uo, {
|
|
1950
|
+
key: 6,
|
|
1951
|
+
modelValue: p.value,
|
|
1952
|
+
"onUpdate:modelValue": S[1] || (S[1] = (K) => p.value = K),
|
|
1953
|
+
info: w.value,
|
|
1954
|
+
onLoad: Dt
|
|
1955
|
+
}, null, 8, ["modelValue", "info"])) : A("", !0),
|
|
1956
|
+
n(nt).length ? (y(), P(ho, {
|
|
1957
|
+
key: 7,
|
|
1958
|
+
expand: R.value,
|
|
1959
|
+
"onUpdate:expand": S[2] || (S[2] = (K) => R.value = K),
|
|
1960
|
+
style: W({
|
|
1961
|
+
top: z.slide.analysis && z.slide.analysis.result ? "24px" : "4px"
|
|
1962
|
+
}),
|
|
1963
|
+
annotation: n(Qe),
|
|
1964
|
+
annotations: n(nt),
|
|
1965
|
+
onSelect: n(at)
|
|
1966
|
+
}, null, 8, ["expand", "style", "annotation", "annotations", "onSelect"])) : A("", !0),
|
|
1967
|
+
T(n(je), {
|
|
1968
|
+
modelValue: h.value,
|
|
1969
|
+
"onUpdate:modelValue": S[3] || (S[3] = (K) => h.value = K),
|
|
1970
|
+
"append-to-body": !0,
|
|
1971
|
+
title: n(v)("图像信息"),
|
|
1972
|
+
width: "700px",
|
|
1973
|
+
top: "5vh"
|
|
1974
|
+
}, {
|
|
1975
|
+
default: x(() => [
|
|
1976
|
+
T(n(tt), { "label-position": "left" }, {
|
|
1977
|
+
default: x(() => [
|
|
1978
|
+
T(n(se), {
|
|
1979
|
+
class: "flex",
|
|
1980
|
+
"label-width": "0px"
|
|
1981
|
+
}, {
|
|
1982
|
+
default: x(() => [
|
|
1983
|
+
b("div", $o, [
|
|
1984
|
+
b("img", {
|
|
1985
|
+
src: w.value.labelImg,
|
|
1986
|
+
style: { height: "180px" }
|
|
1987
|
+
}, null, 8, Lo),
|
|
1988
|
+
b("img", {
|
|
1989
|
+
src: w.value.previewImg,
|
|
1990
|
+
style: { height: "180px" },
|
|
1991
|
+
class: "flex-1"
|
|
1992
|
+
}, null, 8, xo)
|
|
1993
|
+
])
|
|
1994
|
+
]),
|
|
1995
|
+
_: 1
|
|
1996
|
+
}),
|
|
1997
|
+
T(n(se), {
|
|
1998
|
+
label: n(v)("文件名")
|
|
1999
|
+
}, {
|
|
2000
|
+
default: x(() => [
|
|
2001
|
+
b("span", Eo, V(w.value.fileName), 1)
|
|
2002
|
+
]),
|
|
2003
|
+
_: 1
|
|
2004
|
+
}, 8, ["label"]),
|
|
2005
|
+
T(n(se), {
|
|
2006
|
+
label: n(v)("图像像素")
|
|
2007
|
+
}, {
|
|
2008
|
+
default: x(() => [
|
|
2009
|
+
b("span", Vo, V(w.value.width) + "Pixel - " + V(w.value.height) + "Pixel", 1)
|
|
2010
|
+
]),
|
|
2011
|
+
_: 1
|
|
2012
|
+
}, 8, ["label"]),
|
|
2013
|
+
T(n(se), {
|
|
2014
|
+
label: n(v)("扫描倍率")
|
|
2015
|
+
}, {
|
|
2016
|
+
default: x(() => [
|
|
2017
|
+
b("span", Mo, V(w.value.scanScale), 1)
|
|
2018
|
+
]),
|
|
2019
|
+
_: 1
|
|
2020
|
+
}, 8, ["label"]),
|
|
2021
|
+
T(n(se), {
|
|
2022
|
+
label: n(v)("扫描时刻")
|
|
2023
|
+
}, {
|
|
2024
|
+
default: x(() => [
|
|
2025
|
+
b("span", Io, V(w.value.scanTime), 1)
|
|
2026
|
+
]),
|
|
2027
|
+
_: 1
|
|
2028
|
+
}, 8, ["label"]),
|
|
2029
|
+
T(n(se), {
|
|
2030
|
+
label: n(v)("扫描时间")
|
|
2031
|
+
}, {
|
|
2032
|
+
default: x(() => [
|
|
2033
|
+
b("span", So, V(w.value.scanDuration || 0) + "s", 1)
|
|
2034
|
+
]),
|
|
2035
|
+
_: 1
|
|
2036
|
+
}, 8, ["label"]),
|
|
2037
|
+
w.value.ext ? (y(), P(n(se), {
|
|
2038
|
+
key: 0,
|
|
2039
|
+
label: n(v)("扫描设备")
|
|
2040
|
+
}, {
|
|
2041
|
+
default: x(() => [
|
|
2042
|
+
b("span", Ho, V(w.value.ext.machineNum || ""), 1)
|
|
2043
|
+
]),
|
|
2044
|
+
_: 1
|
|
2045
|
+
}, 8, ["label"])) : A("", !0)
|
|
2046
|
+
]),
|
|
2047
|
+
_: 1
|
|
2048
|
+
})
|
|
2049
|
+
]),
|
|
2050
|
+
_: 1
|
|
2051
|
+
}, 8, ["modelValue", "title"]),
|
|
2052
|
+
T(n(je), {
|
|
2053
|
+
modelValue: n(Se),
|
|
2054
|
+
"onUpdate:modelValue": S[4] || (S[4] = (K) => Ve(Se) ? Se.value = K : null),
|
|
2055
|
+
"append-to-body": !0,
|
|
2056
|
+
title: n(v)("语音输入"),
|
|
2057
|
+
width: "500px",
|
|
2058
|
+
top: "5vh"
|
|
2059
|
+
}, {
|
|
2060
|
+
footer: x(() => [
|
|
2061
|
+
T(n(ge), { onClick: n(Et) }, {
|
|
2062
|
+
default: x(() => [
|
|
2063
|
+
G(V(n(v)("取消")), 1)
|
|
2064
|
+
]),
|
|
2065
|
+
_: 1
|
|
2066
|
+
}, 8, ["onClick"]),
|
|
2067
|
+
T(n(ge), {
|
|
2068
|
+
type: "primary",
|
|
2069
|
+
onClick: n(Vt)
|
|
2070
|
+
}, {
|
|
2071
|
+
default: x(() => [
|
|
2072
|
+
G(V(n(v)("确定")), 1)
|
|
2073
|
+
]),
|
|
2074
|
+
_: 1
|
|
2075
|
+
}, 8, ["onClick"])
|
|
2076
|
+
]),
|
|
2077
|
+
default: x(() => [
|
|
2078
|
+
T(n(tt), { "label-position": "left" }, {
|
|
2079
|
+
default: x(() => {
|
|
2080
|
+
var K;
|
|
2081
|
+
return [
|
|
2082
|
+
T(n(se), null, {
|
|
2083
|
+
default: x(() => {
|
|
2084
|
+
var U;
|
|
2085
|
+
return [
|
|
2086
|
+
(U = n(C)) != null && U.src ? (y(), L("audio", {
|
|
2087
|
+
key: 0,
|
|
2088
|
+
class: "width-100%",
|
|
2089
|
+
src: n(C).src,
|
|
2090
|
+
controls: "",
|
|
2091
|
+
preload: "auto"
|
|
2092
|
+
}, null, 8, Po)) : A("", !0)
|
|
2093
|
+
];
|
|
2094
|
+
}),
|
|
2095
|
+
_: 1
|
|
2096
|
+
}),
|
|
2097
|
+
(K = n(C)) != null && K.src ? A("", !0) : (y(), P(n(se), { key: 0 }, {
|
|
2098
|
+
default: x(() => [
|
|
2099
|
+
n(ie) ? (y(), P(n(ge), {
|
|
2100
|
+
key: 1,
|
|
2101
|
+
type: "danger",
|
|
2102
|
+
onClick: n(Lt)
|
|
2103
|
+
}, {
|
|
2104
|
+
default: x(() => [
|
|
2105
|
+
G(V(n(v)("结束录音")), 1)
|
|
2106
|
+
]),
|
|
2107
|
+
_: 1
|
|
2108
|
+
}, 8, ["onClick"])) : (y(), P(n(ge), {
|
|
2109
|
+
key: 0,
|
|
2110
|
+
type: "primary",
|
|
2111
|
+
onClick: n(He)
|
|
2112
|
+
}, {
|
|
2113
|
+
default: x(() => [
|
|
2114
|
+
G(V(n(v)("开始录音")), 1)
|
|
2115
|
+
]),
|
|
2116
|
+
_: 1
|
|
2117
|
+
}, 8, ["onClick"])),
|
|
2118
|
+
n(ie) ? (y(), L("span", Ro, V(n(v)("录音时长")) + ":" + V(n(F)) + "s", 1)) : A("", !0)
|
|
2119
|
+
]),
|
|
2120
|
+
_: 1
|
|
2121
|
+
}))
|
|
2122
|
+
];
|
|
2123
|
+
}),
|
|
2124
|
+
_: 1
|
|
2125
|
+
})
|
|
2126
|
+
]),
|
|
2127
|
+
_: 1
|
|
2128
|
+
}, 8, ["modelValue", "title"]),
|
|
2129
|
+
z.hotmap && z.hotmap.enable && z.hotmap.type !== "switch" ? (y(), L("div", {
|
|
2130
|
+
key: 8,
|
|
2131
|
+
class: "hzzt-kfb-view__hotmap",
|
|
2132
|
+
style: W({ left: n(Nt) + "px" })
|
|
2133
|
+
}, [
|
|
2134
|
+
T(n(_e), {
|
|
2135
|
+
class: "icon-caret-left",
|
|
2136
|
+
size: "30",
|
|
2137
|
+
onMousedown: n(st)
|
|
2138
|
+
}, {
|
|
2139
|
+
default: x(() => S[6] || (S[6] = [
|
|
2140
|
+
b("svg", {
|
|
2141
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2142
|
+
viewBox: "0 0 1024 1024"
|
|
2143
|
+
}, [
|
|
2144
|
+
b("path", {
|
|
2145
|
+
fill: "currentColor",
|
|
2146
|
+
d: "M672 192 288 511.936 672 832z"
|
|
2147
|
+
})
|
|
2148
|
+
], -1)
|
|
2149
|
+
])),
|
|
2150
|
+
_: 1,
|
|
2151
|
+
__: [6]
|
|
2152
|
+
}, 8, ["onMousedown"]),
|
|
2153
|
+
T(n(_e), {
|
|
2154
|
+
class: "icon-caret-right",
|
|
2155
|
+
size: "30",
|
|
2156
|
+
onMousedown: n(st)
|
|
2157
|
+
}, {
|
|
2158
|
+
default: x(() => S[7] || (S[7] = [
|
|
2159
|
+
b("svg", {
|
|
2160
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2161
|
+
viewBox: "0 0 1024 1024"
|
|
2162
|
+
}, [
|
|
2163
|
+
b("path", {
|
|
2164
|
+
fill: "currentColor",
|
|
2165
|
+
d: "M384 192v640l384-320.064z"
|
|
2166
|
+
})
|
|
2167
|
+
], -1)
|
|
2168
|
+
])),
|
|
2169
|
+
_: 1,
|
|
2170
|
+
__: [7]
|
|
2171
|
+
}, 8, ["onMousedown"])
|
|
2172
|
+
], 4)) : A("", !0),
|
|
2173
|
+
ce(z.$slots, "default")
|
|
2174
|
+
], 512);
|
|
2175
|
+
};
|
|
2176
|
+
}
|
|
2177
|
+
});
|
|
2178
|
+
function Ao(c, e) {
|
|
2179
|
+
var h, l;
|
|
2180
|
+
const o = $(!!((h = c.ai) != null && h.default)), t = $(!!((l = c.ai) != null && l.default)), _ = $([]), v = B(
|
|
2181
|
+
() => {
|
|
2182
|
+
var a, m, r, s;
|
|
2183
|
+
return (m = (a = e.value) == null ? void 0 : a.analysis) != null && m.id ? ((s = (r = e.value) == null ? void 0 : r.analysis) == null ? void 0 : s.class) || "auto" : "";
|
|
2184
|
+
}
|
|
2185
|
+
);
|
|
2186
|
+
ne(() => {
|
|
2187
|
+
var a;
|
|
2188
|
+
return (a = c.ai) == null ? void 0 : a.default;
|
|
2189
|
+
}, (a) => {
|
|
2190
|
+
o.value = !!a, t.value = !!a;
|
|
2191
|
+
}), ne(() => {
|
|
2192
|
+
var a;
|
|
2193
|
+
return (a = e == null ? void 0 : e.value) == null ? void 0 : a.id;
|
|
2194
|
+
}, u), pe(() => {
|
|
2195
|
+
var a, m;
|
|
2196
|
+
o.value = !!((a = c.ai) != null && a.default), t.value = !!((m = c.ai) != null && m.default), u();
|
|
2197
|
+
});
|
|
2198
|
+
function u() {
|
|
2199
|
+
var a;
|
|
2200
|
+
(a = e.value) != null && a.id && v.value ? o.value || t.value ? i() : _.value = [] : _.value = [];
|
|
2201
|
+
}
|
|
2202
|
+
function i() {
|
|
2203
|
+
c.ai.handle(v.value, e.value).then((a) => {
|
|
2204
|
+
_.value = a;
|
|
2205
|
+
}).catch(() => {
|
|
2206
|
+
_.value = [], v.value === "IQC" ? t.value = !1 : o.value = !1;
|
|
2207
|
+
});
|
|
2208
|
+
}
|
|
2209
|
+
function f() {
|
|
2210
|
+
t.value = !1, u();
|
|
2211
|
+
}
|
|
2212
|
+
function g() {
|
|
2213
|
+
o.value = !1, u();
|
|
2214
|
+
}
|
|
2215
|
+
return {
|
|
2216
|
+
analysisClass: v,
|
|
2217
|
+
aiLabelList: _,
|
|
2218
|
+
enableAi: o,
|
|
2219
|
+
enableIqc: t,
|
|
2220
|
+
toggleIqc: g,
|
|
2221
|
+
toggleAi: f
|
|
2222
|
+
};
|
|
2223
|
+
}
|
|
2224
|
+
const No = ["src", "fit"], Bo = ["src", "fit"], Ue = /* @__PURE__ */ ee({
|
|
2225
|
+
name: "KfbImage",
|
|
2226
|
+
__name: "KfbImage",
|
|
2227
|
+
props: {
|
|
2228
|
+
src: {
|
|
2229
|
+
type: String,
|
|
2230
|
+
required: !0,
|
|
2231
|
+
default: ""
|
|
2232
|
+
},
|
|
2233
|
+
fit: {
|
|
2234
|
+
type: String,
|
|
2235
|
+
validator: (c) => ["", "contain", "cover", "fill", "none", "scale-down"].includes(c),
|
|
2236
|
+
default: ""
|
|
2237
|
+
},
|
|
2238
|
+
retryTimes: {
|
|
2239
|
+
type: Number,
|
|
2240
|
+
default: 0
|
|
2241
|
+
},
|
|
2242
|
+
load: {
|
|
2243
|
+
type: Function,
|
|
2244
|
+
default: () => ({})
|
|
2245
|
+
}
|
|
2246
|
+
},
|
|
2247
|
+
setup(c) {
|
|
2248
|
+
const e = c;
|
|
2249
|
+
let o = 0;
|
|
2250
|
+
const t = $(!1), _ = ot({
|
|
2251
|
+
x: 0,
|
|
2252
|
+
y: 0
|
|
2253
|
+
}), v = B(() => ({
|
|
2254
|
+
top: `${_.y + 10}px`,
|
|
2255
|
+
left: `${_.x}px`,
|
|
2256
|
+
transform: "translateY(-50%)",
|
|
2257
|
+
width: `${4 * 300 / 3}px`,
|
|
2258
|
+
height: "300px",
|
|
2259
|
+
background: "rgba(0,0,0,0.8)",
|
|
2260
|
+
zIndex: "10000"
|
|
2261
|
+
}));
|
|
2262
|
+
function u(h) {
|
|
2263
|
+
const l = h.target;
|
|
2264
|
+
o < e.retryTimes ? (l.src = e.src, o++) : l.src = Ge;
|
|
2265
|
+
}
|
|
2266
|
+
function i(h) {
|
|
2267
|
+
if (h.target) {
|
|
2268
|
+
const s = h.target, p = s.tagName;
|
|
2269
|
+
let w = "";
|
|
2270
|
+
if (s.tagName === "IMG" ? w = s.src || "" : p === "DIV" && (w = s.children[0].src || ""), w.indexOf(Ge) > -1)
|
|
2271
|
+
return;
|
|
2272
|
+
}
|
|
2273
|
+
const { x: l, y: a } = f(h), m = 4 * 300 / 3, r = 300;
|
|
2274
|
+
_.x = Math.min(Math.max(l, m / 2), window.innerWidth - m / 2), _.y = Math.min(Math.max(a, r / 2), window.innerHeight - r / 2), t.value = !0;
|
|
2275
|
+
}
|
|
2276
|
+
function f(h) {
|
|
2277
|
+
const l = h.target, a = h.offsetX, m = h.offsetY, r = l.clientWidth, s = l.clientHeight;
|
|
2278
|
+
return {
|
|
2279
|
+
x: h.clientX + r - a,
|
|
2280
|
+
y: h.clientY - m + s / 2
|
|
2281
|
+
};
|
|
2282
|
+
}
|
|
2283
|
+
function g() {
|
|
2284
|
+
t.value = !1;
|
|
2285
|
+
}
|
|
2286
|
+
return (h, l) => (y(), L("div", {
|
|
2287
|
+
class: "relative",
|
|
2288
|
+
onMouseenter: i,
|
|
2289
|
+
onMouseleave: g
|
|
2290
|
+
}, [
|
|
2291
|
+
b("img", {
|
|
2292
|
+
src: c.src,
|
|
2293
|
+
fit: c.fit,
|
|
2294
|
+
onError: u,
|
|
2295
|
+
style: {
|
|
2296
|
+
height: "100%",
|
|
2297
|
+
width: "100%"
|
|
2298
|
+
}
|
|
2299
|
+
}, null, 40, No),
|
|
2300
|
+
(y(), P(Fe, { to: "body" }, [
|
|
2301
|
+
t.value ? (y(), L("div", {
|
|
2302
|
+
key: 0,
|
|
2303
|
+
class: "fixed hzzt-kfb-img-triangle-left",
|
|
2304
|
+
style: W(v.value)
|
|
2305
|
+
}, [
|
|
2306
|
+
b("img", {
|
|
2307
|
+
src: c.src,
|
|
2308
|
+
fit: c.fit,
|
|
2309
|
+
style: {
|
|
2310
|
+
objectFit: "contain",
|
|
2311
|
+
height: "100%",
|
|
2312
|
+
width: "100%"
|
|
2313
|
+
},
|
|
2314
|
+
onMouseenter: l[0] || (l[0] = () => {
|
|
2315
|
+
t.value = !0;
|
|
2316
|
+
}),
|
|
2317
|
+
onMouseleave: g
|
|
2318
|
+
}, null, 40, Bo)
|
|
2319
|
+
], 4)) : A("", !0)
|
|
2320
|
+
]))
|
|
2321
|
+
], 32));
|
|
2322
|
+
}
|
|
2323
|
+
}), Do = {}, Uo = {
|
|
2324
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2325
|
+
viewBox: "0 0 1024 1024"
|
|
2326
|
+
};
|
|
2327
|
+
function Fo(c, e) {
|
|
2328
|
+
return y(), L("svg", Uo, e[0] || (e[0] = [
|
|
2329
|
+
b("path", {
|
|
2330
|
+
fill: "currentColor",
|
|
2331
|
+
d: "M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"
|
|
2332
|
+
}, null, -1)
|
|
2333
|
+
]));
|
|
2334
|
+
}
|
|
2335
|
+
const Ko = /* @__PURE__ */ he(Do, [["render", Fo]]), jo = {}, Oo = {
|
|
2336
|
+
width: "16",
|
|
2337
|
+
height: "16",
|
|
2338
|
+
viewBox: "0 0 16 16",
|
|
2339
|
+
fill: "none",
|
|
2340
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2341
|
+
};
|
|
2342
|
+
function Go(c, e) {
|
|
2343
|
+
return y(), L("svg", Oo, e[0] || (e[0] = [
|
|
2344
|
+
b("g", { id: "Frame" }, [
|
|
2345
|
+
b("path", {
|
|
2346
|
+
id: "Vector",
|
|
2347
|
+
d: "M5.33333 2.66659H14V3.99992H5.33333V2.66659ZM2 2.33325H4V4.33325H2V2.33325ZM2 6.99992H4V8.99992H2V6.99992ZM2 11.6666H4V13.6666H2V11.6666ZM5.33333 7.33325H14V8.66659H5.33333V7.33325ZM5.33333 11.9999H14V13.3333H5.33333V11.9999Z",
|
|
2348
|
+
fill: "currentColor",
|
|
2349
|
+
"fill-opacity": "0.9"
|
|
2350
|
+
})
|
|
2351
|
+
], -1)
|
|
2352
|
+
]));
|
|
2353
|
+
}
|
|
2354
|
+
const Wo = /* @__PURE__ */ he(jo, [["render", Go]]), Zo = { class: "hzzt-kfb-slides" }, qo = { class: "hzzt-kfb-slides__row" }, Yo = { class: "hzzt-kfb-slides__top" }, Xo = { class: "text-primary" }, Qo = { class: "flex align-items-center" }, Jo = { key: 0 }, en = ["data-index", "onClick"], tn = { class: "hzzt-kfb-slides__gallery" }, ln = ["onClick"], on = {
|
|
2355
|
+
key: 0,
|
|
2356
|
+
class: "hzzt-kfb-slides__read"
|
|
2357
|
+
}, nn = ["onClick"], an = {
|
|
2358
|
+
key: 1,
|
|
2359
|
+
class: "flex column"
|
|
2360
|
+
}, sn = { class: "hzzt-kfb-slides__header" }, rn = { class: "w-30%" }, un = { class: "w-40%" }, cn = { class: "w-20%" }, dn = ["data-index", "onClick"], vn = { class: "w-30% flex" }, fn = { class: "hzzt-kfb-slides__gallery" }, mn = {
|
|
2361
|
+
key: 0,
|
|
2362
|
+
class: "hzzt-kfb-slides__read"
|
|
2363
|
+
}, pn = { class: "w-40% flex" }, hn = ["onClick"], gn = ["onClick"], wn = {
|
|
2364
|
+
key: 0,
|
|
2365
|
+
class: "flex column py-2"
|
|
2366
|
+
}, yn = { class: "flex align-items-center justify-content-center" }, _n = { class: "margin-r-1" }, bn = {
|
|
2367
|
+
key: 0,
|
|
2368
|
+
class: "margin-r-1 margin-l-2"
|
|
2369
|
+
}, kn = /* @__PURE__ */ ee({
|
|
2370
|
+
__name: "KfbSlideList",
|
|
2371
|
+
props: {
|
|
2372
|
+
slides: {}
|
|
2373
|
+
},
|
|
2374
|
+
emits: ["select", "tool"],
|
|
2375
|
+
setup(c, { expose: e, emit: o }) {
|
|
2376
|
+
const t = c, _ = o, v = J("file-index", {
|
|
2377
|
+
value: 0
|
|
2378
|
+
}), u = J("divide", {
|
|
2379
|
+
value: !1
|
|
2380
|
+
}), i = J("sync", {
|
|
2381
|
+
value: !1
|
|
2382
|
+
}), f = $(!1), g = $(), h = B(() => t.slides.filter(({ read: p }) => p)), l = B(() => t.slides.filter(({ check: p }) => p)), { t: a } = de();
|
|
2383
|
+
function m(p) {
|
|
2384
|
+
v.value = p, _("select", p);
|
|
2385
|
+
}
|
|
2386
|
+
function r(p) {
|
|
2387
|
+
p.check = !p.check;
|
|
2388
|
+
}
|
|
2389
|
+
function s(p) {
|
|
2390
|
+
var k, d, E;
|
|
2391
|
+
const w = ((E = (d = (k = g.value.querySelector('[data-index="0"]')) == null ? void 0 : k.getBoundingClientRect) == null ? void 0 : d.call(k)) == null ? void 0 : E.y) || 0;
|
|
2392
|
+
g.value.scrollTop = g.value.querySelector(`[data-index="${p}"]`).getBoundingClientRect().y - w;
|
|
2393
|
+
}
|
|
2394
|
+
return e({
|
|
2395
|
+
jumpToSlide: s
|
|
2396
|
+
}), (p, w) => (y(), L("div", Zo, [
|
|
2397
|
+
b("div", qo, [
|
|
2398
|
+
b("div", Yo, [
|
|
2399
|
+
b("span", null, [
|
|
2400
|
+
w[4] || (w[4] = G("已读:")),
|
|
2401
|
+
b("span", Xo, V(h.value.length), 1),
|
|
2402
|
+
G("/" + V(p.slides.length), 1)
|
|
2403
|
+
]),
|
|
2404
|
+
b("div", Qo, [
|
|
2405
|
+
T(n(_e), {
|
|
2406
|
+
class: "margin-r-2 pointer",
|
|
2407
|
+
size: "16",
|
|
2408
|
+
color: f.value ? "#999" : "#000",
|
|
2409
|
+
onClick: w[0] || (w[0] = (k) => f.value = !f.value)
|
|
2410
|
+
}, {
|
|
2411
|
+
default: x(() => [
|
|
2412
|
+
T(Ko)
|
|
2413
|
+
]),
|
|
2414
|
+
_: 1
|
|
2415
|
+
}, 8, ["color"]),
|
|
2416
|
+
T(n(_e), {
|
|
2417
|
+
class: "pointer",
|
|
2418
|
+
name: "cus-list",
|
|
2419
|
+
size: "16",
|
|
2420
|
+
color: f.value ? "#000" : "#999",
|
|
2421
|
+
onClick: w[1] || (w[1] = (k) => f.value = !f.value)
|
|
2422
|
+
}, {
|
|
2423
|
+
default: x(() => [
|
|
2424
|
+
T(Wo)
|
|
2425
|
+
]),
|
|
2426
|
+
_: 1
|
|
2427
|
+
}, 8, ["color"])
|
|
2428
|
+
])
|
|
2429
|
+
]),
|
|
2430
|
+
b("div", {
|
|
2431
|
+
class: "flex-1 overflow-auto",
|
|
2432
|
+
style: { width: "100%" },
|
|
2433
|
+
ref_key: "slidesRef",
|
|
2434
|
+
ref: g
|
|
2435
|
+
}, [
|
|
2436
|
+
f.value ? (y(), L("ul", an, [
|
|
2437
|
+
b("li", sn, [
|
|
2438
|
+
w[5] || (w[5] = b("div", { class: "w-10%" }, null, -1)),
|
|
2439
|
+
b("div", rn, V(n(a)("缩略图")), 1),
|
|
2440
|
+
b("div", un, V(n(a)("切片名")), 1),
|
|
2441
|
+
b("div", cn, V(n(a)("评分")), 1)
|
|
2442
|
+
]),
|
|
2443
|
+
(y(!0), L(le, null, oe(p.slides, (k, d) => (y(), L("li", {
|
|
2444
|
+
key: d,
|
|
2445
|
+
"data-index": d,
|
|
2446
|
+
class: "flex align-items-center overflow-hidden",
|
|
2447
|
+
style: W({
|
|
2448
|
+
backgroundColor: n(v) === d ? "rgba(6, 85, 195, 0.1)" : "#fff"
|
|
2449
|
+
}),
|
|
2450
|
+
onClick: (E) => m(d)
|
|
2451
|
+
}, [
|
|
2452
|
+
b("div", {
|
|
2453
|
+
class: "w-10% text-center",
|
|
2454
|
+
onClick: Be(() => {
|
|
2455
|
+
}, ["stop"])
|
|
2456
|
+
}, [
|
|
2457
|
+
T(n(Oe), {
|
|
2458
|
+
modelValue: k.check,
|
|
2459
|
+
"onUpdate:modelValue": (E) => k.check = E,
|
|
2460
|
+
style: { width: "14px", height: "16px" }
|
|
2461
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2462
|
+
]),
|
|
2463
|
+
b("div", vn, [
|
|
2464
|
+
b("div", fn, [
|
|
2465
|
+
T(Ue, {
|
|
2466
|
+
style: W([{ transform: `rotate(${k.angle}deg)` }, { height: "45px" }]),
|
|
2467
|
+
"retry-times": 1,
|
|
2468
|
+
src: k.labelImg,
|
|
2469
|
+
fit: "cover",
|
|
2470
|
+
class: "flex-1"
|
|
2471
|
+
}, null, 8, ["style", "src"]),
|
|
2472
|
+
T(Ue, {
|
|
2473
|
+
"retry-times": 1,
|
|
2474
|
+
fit: "cover",
|
|
2475
|
+
src: k.previewImg,
|
|
2476
|
+
style: { height: "45px" },
|
|
2477
|
+
class: "flex-1"
|
|
2478
|
+
}, null, 8, ["src"]),
|
|
2479
|
+
k.read ? A("", !0) : (y(), L("div", mn, V(n(a)("未读")), 1))
|
|
2480
|
+
])
|
|
2481
|
+
]),
|
|
2482
|
+
b("div", pn, [
|
|
2483
|
+
T(n(zt), {
|
|
2484
|
+
effect: "dark",
|
|
2485
|
+
placement: "bottom",
|
|
2486
|
+
content: `${k.name}`
|
|
2487
|
+
}, {
|
|
2488
|
+
default: x(() => [
|
|
2489
|
+
b("span", {
|
|
2490
|
+
style: { "line-height": "16px" },
|
|
2491
|
+
class: "margin-l-1 ellipsis hzzt-kfb-slides__text",
|
|
2492
|
+
dir: "rtl",
|
|
2493
|
+
onClick: Be((E) => r(k), ["stop"])
|
|
2494
|
+
}, V(k.name), 9, hn)
|
|
2495
|
+
]),
|
|
2496
|
+
_: 2
|
|
2497
|
+
}, 1032, ["content"])
|
|
2498
|
+
]),
|
|
2499
|
+
b("div", {
|
|
2500
|
+
class: "w-20% flex text-center pointer",
|
|
2501
|
+
style: W({
|
|
2502
|
+
color: k.gradeColor
|
|
2503
|
+
}),
|
|
2504
|
+
onClick: (E) => _("tool", "grade", k)
|
|
2505
|
+
}, V(k.grade), 13, gn)
|
|
2506
|
+
], 12, dn))), 128))
|
|
2507
|
+
])) : (y(), L("div", Jo, [
|
|
2508
|
+
(y(!0), L(le, null, oe(p.slides, (k, d) => (y(), L("div", {
|
|
2509
|
+
key: d,
|
|
2510
|
+
class: ye(["hzzt-kfb-slides__box", n(v) === d ? "hzzt-kfb-slides__box--active" : ""]),
|
|
2511
|
+
"data-index": d,
|
|
2512
|
+
onClick: (E) => m(d)
|
|
2513
|
+
}, [
|
|
2514
|
+
b("div", tn, [
|
|
2515
|
+
T(Ue, {
|
|
2516
|
+
style: W({ transform: `rotate(${k.angle}deg)` }),
|
|
2517
|
+
"retry-times": 1,
|
|
2518
|
+
src: k.labelImg,
|
|
2519
|
+
class: "hzzt-kfb-slides__img",
|
|
2520
|
+
fit: "cover"
|
|
2521
|
+
}, null, 8, ["style", "src"]),
|
|
2522
|
+
T(Ue, {
|
|
2523
|
+
"retry-times": 1,
|
|
2524
|
+
src: k.previewImg,
|
|
2525
|
+
class: "flex-1 hzzt-kfb-slides__img1",
|
|
2526
|
+
fit: "cover"
|
|
2527
|
+
}, null, 8, ["src"])
|
|
2528
|
+
]),
|
|
2529
|
+
b("div", {
|
|
2530
|
+
class: "flex justify-content-between align-items-center",
|
|
2531
|
+
onClick: Be(() => {
|
|
2532
|
+
}, ["stop"])
|
|
2533
|
+
}, [
|
|
2534
|
+
T(n(Oe), {
|
|
2535
|
+
modelValue: k.check,
|
|
2536
|
+
"onUpdate:modelValue": (E) => k.check = E,
|
|
2537
|
+
style: { width: "14px", height: "16px" }
|
|
2538
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2539
|
+
T(n(zt), {
|
|
2540
|
+
effect: "dark",
|
|
2541
|
+
placement: "bottom",
|
|
2542
|
+
content: `${k.name}`
|
|
2543
|
+
}, {
|
|
2544
|
+
default: x(() => [
|
|
2545
|
+
b("span", {
|
|
2546
|
+
style: { "line-height": "16px", "text-align": "center", width: "calc(100% - 14px)" },
|
|
2547
|
+
class: "margin-l-1 ellipsis",
|
|
2548
|
+
onClick: Be((E) => r(k), ["stop"])
|
|
2549
|
+
}, V(k.name), 9, ln)
|
|
2550
|
+
]),
|
|
2551
|
+
_: 2
|
|
2552
|
+
}, 1032, ["content"])
|
|
2553
|
+
]),
|
|
2554
|
+
k.read ? A("", !0) : (y(), L("div", on, V(n(a)("未读")), 1)),
|
|
2555
|
+
k.grade ? (y(), L("div", {
|
|
2556
|
+
key: 1,
|
|
2557
|
+
class: "hzzt-kfb-slides__grade",
|
|
2558
|
+
style: W({
|
|
2559
|
+
background: k.gradeColor
|
|
2560
|
+
}),
|
|
2561
|
+
onClick: (E) => _("tool", "grade", k)
|
|
2562
|
+
}, V(k.grade), 13, nn)) : A("", !0),
|
|
2563
|
+
ce(p.$slots, "slide", { slide: k }, void 0, !0)
|
|
2564
|
+
], 10, en))), 128))
|
|
2565
|
+
]))
|
|
2566
|
+
], 512),
|
|
2567
|
+
l.value.length > 1 ? (y(), L("div", wn, [
|
|
2568
|
+
b("div", yn, [
|
|
2569
|
+
b("span", _n, V(n(a)("分屏")), 1),
|
|
2570
|
+
T(n(Le), {
|
|
2571
|
+
modelValue: n(u),
|
|
2572
|
+
"onUpdate:modelValue": w[2] || (w[2] = (k) => Ve(u) ? u.value = k : null)
|
|
2573
|
+
}, null, 8, ["modelValue"]),
|
|
2574
|
+
n(u) ? (y(), L("span", bn, V(n(a)("同步")), 1)) : A("", !0),
|
|
2575
|
+
n(u) ? (y(), P(n(Le), {
|
|
2576
|
+
key: 1,
|
|
2577
|
+
modelValue: n(i),
|
|
2578
|
+
"onUpdate:modelValue": w[3] || (w[3] = (k) => Ve(i) ? i.value = k : null)
|
|
2579
|
+
}, null, 8, ["modelValue"])) : A("", !0)
|
|
2580
|
+
])
|
|
2581
|
+
])) : A("", !0)
|
|
2582
|
+
])
|
|
2583
|
+
]));
|
|
2584
|
+
}
|
|
2585
|
+
}), zn = /* @__PURE__ */ he(kn, [["__scopeId", "data-v-d3cde57c"]]), Cn = { class: "hzzt-kfb-ai overflow-hidden" }, Tn = { class: "flex align-items-center margin-t-1" }, $n = { style: { color: "var(--el-color-success)" } }, Ln = { class: "flex-1 flex overflow-auto wrap margin-t-1" }, xn = ["onClick"], En = {
|
|
2586
|
+
key: 0,
|
|
2587
|
+
style: { "margin-left": "2px" }
|
|
2588
|
+
}, Vn = /* @__PURE__ */ ee({
|
|
2589
|
+
name: "KfbAiList",
|
|
2590
|
+
__name: "list",
|
|
2591
|
+
props: {
|
|
2592
|
+
data: { default: () => [] },
|
|
2593
|
+
slide: { default: () => ({}) }
|
|
2594
|
+
},
|
|
2595
|
+
setup(c, { expose: e }) {
|
|
2596
|
+
const o = c, { t } = de(), _ = J("kfbViewRef"), v = $(-1), u = $(1), i = $(100), f = $(!0), g = $([]), h = B(() => o.data.filter((E) => g.value.includes(E.cls || ""))), l = B(() => h.value.slice((u.value - 1) * i.value, u.value * i.value)), a = B(() => {
|
|
2597
|
+
var R, I;
|
|
2598
|
+
const E = ((I = (R = o.slide) == null ? void 0 : R.analysis) == null ? void 0 : I.result) || "";
|
|
2599
|
+
return E.indexOf("疑似阳性") > -1 ? {
|
|
2600
|
+
type: "warning",
|
|
2601
|
+
name: E
|
|
2602
|
+
} : E.indexOf("阳性") > -1 ? {
|
|
2603
|
+
type: "danger",
|
|
2604
|
+
name: E
|
|
2605
|
+
} : E.indexOf("阴性") > -1 ? {
|
|
2606
|
+
type: "success",
|
|
2607
|
+
name: E
|
|
2608
|
+
} : {
|
|
2609
|
+
type: "info",
|
|
2610
|
+
name: E || t("未知")
|
|
2611
|
+
};
|
|
2612
|
+
}), m = B(() => {
|
|
2613
|
+
const E = /* @__PURE__ */ new Set();
|
|
2614
|
+
return o.data.forEach((R) => {
|
|
2615
|
+
const I = R.cls || "";
|
|
2616
|
+
I && !E.has(I) && E.add(I);
|
|
2617
|
+
}), Array.from(E);
|
|
2618
|
+
}), r = B(() => g.value.length !== 0 && g.value.length !== m.value.length);
|
|
2619
|
+
ne(() => m.value, (E) => {
|
|
2620
|
+
s(), g.value = [...E];
|
|
2621
|
+
}), pe(() => {
|
|
2622
|
+
g.value = [...m.value];
|
|
2623
|
+
});
|
|
2624
|
+
function s() {
|
|
2625
|
+
v.value = -1, u.value = 1, i.value = 100, f.value = !0;
|
|
2626
|
+
}
|
|
2627
|
+
function p(E) {
|
|
2628
|
+
const R = h.value.findIndex((I) => I.id === E.id);
|
|
2629
|
+
v.value = R, _.value.jumpToLabel(E, 5);
|
|
2630
|
+
}
|
|
2631
|
+
function w(E) {
|
|
2632
|
+
const R = o.data.filter((I) => I.cls === E);
|
|
2633
|
+
return R.length ? `(${R.length})` : "";
|
|
2634
|
+
}
|
|
2635
|
+
function k() {
|
|
2636
|
+
v.value = -1, f.value = g.value.length == m.value.length;
|
|
2637
|
+
}
|
|
2638
|
+
function d(E) {
|
|
2639
|
+
g.value = E ? [...m.value] : [], v.value = -1;
|
|
2640
|
+
}
|
|
2641
|
+
return e({
|
|
2642
|
+
labelList: h
|
|
2643
|
+
}), (E, R) => (y(), L("div", Cn, [
|
|
2644
|
+
b("div", Tn, [
|
|
2645
|
+
T(n(sl), {
|
|
2646
|
+
placement: "bottom",
|
|
2647
|
+
trigger: "click",
|
|
2648
|
+
width: "160"
|
|
2649
|
+
}, {
|
|
2650
|
+
reference: x(() => [
|
|
2651
|
+
T(n(ge), {
|
|
2652
|
+
class: "margin-r-1",
|
|
2653
|
+
type: "primary"
|
|
2654
|
+
}, {
|
|
2655
|
+
default: x(() => [
|
|
2656
|
+
G(V(n(t)("分类")) + " ", 1),
|
|
2657
|
+
T(X, { name: "arrowDown" })
|
|
2658
|
+
]),
|
|
2659
|
+
_: 1
|
|
2660
|
+
})
|
|
2661
|
+
]),
|
|
2662
|
+
default: x(() => [
|
|
2663
|
+
b("div", null, [
|
|
2664
|
+
T(n(Oe), {
|
|
2665
|
+
modelValue: f.value,
|
|
2666
|
+
"onUpdate:modelValue": R[0] || (R[0] = (I) => f.value = I),
|
|
2667
|
+
indeterminate: r.value,
|
|
2668
|
+
onChange: d
|
|
2669
|
+
}, {
|
|
2670
|
+
default: x(() => [
|
|
2671
|
+
G(V(n(t)("全选")), 1)
|
|
2672
|
+
]),
|
|
2673
|
+
_: 1
|
|
2674
|
+
}, 8, ["modelValue", "indeterminate"]),
|
|
2675
|
+
T(n(il), {
|
|
2676
|
+
modelValue: g.value,
|
|
2677
|
+
"onUpdate:modelValue": R[1] || (R[1] = (I) => g.value = I),
|
|
2678
|
+
class: "flex column",
|
|
2679
|
+
onChange: k
|
|
2680
|
+
}, {
|
|
2681
|
+
default: x(() => [
|
|
2682
|
+
(y(!0), L(le, null, oe(m.value, (I) => (y(), P(n(Oe), {
|
|
2683
|
+
key: I,
|
|
2684
|
+
value: I
|
|
2685
|
+
}, {
|
|
2686
|
+
default: x(() => [
|
|
2687
|
+
G(V(I) + " ", 1),
|
|
2688
|
+
b("span", $n, V(w(I)), 1)
|
|
2689
|
+
]),
|
|
2690
|
+
_: 2
|
|
2691
|
+
}, 1032, ["value"]))), 128))
|
|
2692
|
+
]),
|
|
2693
|
+
_: 1
|
|
2694
|
+
}, 8, ["modelValue"])
|
|
2695
|
+
])
|
|
2696
|
+
]),
|
|
2697
|
+
_: 1
|
|
2698
|
+
}),
|
|
2699
|
+
T(n(Tt), {
|
|
2700
|
+
type: a.value.type,
|
|
2701
|
+
class: "margin-l-1"
|
|
2702
|
+
}, {
|
|
2703
|
+
default: x(() => [
|
|
2704
|
+
G(V(a.value.name), 1)
|
|
2705
|
+
]),
|
|
2706
|
+
_: 1
|
|
2707
|
+
}, 8, ["type"])
|
|
2708
|
+
]),
|
|
2709
|
+
b("div", Ln, [
|
|
2710
|
+
(y(!0), L(le, null, oe(l.value, (I, Z) => (y(), L("div", {
|
|
2711
|
+
key: Z + (u.value - 1) * i.value,
|
|
2712
|
+
class: ye(`hzzt-kfb-ai__img ${v.value === Z + (u.value - 1) * i.value ? "hzzt-kfb-ai__img--active" : ""}`),
|
|
2713
|
+
onClick: (Q) => p(I)
|
|
2714
|
+
}, [
|
|
2715
|
+
T(n(ul), {
|
|
2716
|
+
"retry-times": 1,
|
|
2717
|
+
src: I.imageUrl,
|
|
2718
|
+
"error-src": n(Ge)
|
|
2719
|
+
}, null, 8, ["src", "error-src"]),
|
|
2720
|
+
b("div", {
|
|
2721
|
+
style: W({ color: I.strokeStyle }),
|
|
2722
|
+
class: "ellipsis"
|
|
2723
|
+
}, [
|
|
2724
|
+
G(V(I.cls) + " ", 1),
|
|
2725
|
+
I.score ? (y(), L("span", En, V(I.score), 1)) : A("", !0)
|
|
2726
|
+
], 4)
|
|
2727
|
+
], 10, xn))), 128))
|
|
2728
|
+
]),
|
|
2729
|
+
T(n(rl), {
|
|
2730
|
+
class: "wrap",
|
|
2731
|
+
"current-page": u.value,
|
|
2732
|
+
"onUpdate:currentPage": R[2] || (R[2] = (I) => u.value = I),
|
|
2733
|
+
"page-size": i.value,
|
|
2734
|
+
"onUpdate:pageSize": R[3] || (R[3] = (I) => i.value = I),
|
|
2735
|
+
"page-sizes": [100, 200, 300, 400],
|
|
2736
|
+
layout: "total, sizes, prev, pager, next",
|
|
2737
|
+
total: h.value.length
|
|
2738
|
+
}, null, 8, ["current-page", "page-size", "total"])
|
|
2739
|
+
]));
|
|
2740
|
+
}
|
|
2741
|
+
}), Mn = { class: "hzzt-kfb-slide" }, In = { class: "flex flex-1 overflow-hidden" }, Sn = { class: "flex flex-1" }, Hn = {
|
|
2742
|
+
key: 0,
|
|
2743
|
+
style: { height: "100%", width: "100%" },
|
|
2744
|
+
class: "flex wrap"
|
|
2745
|
+
}, Pn = ["onClick"], We = /* @__PURE__ */ ee({
|
|
2746
|
+
name: "HzztKfbSlide",
|
|
2747
|
+
__name: "index",
|
|
2748
|
+
props: /* @__PURE__ */ we({
|
|
2749
|
+
menus: { default: () => [] },
|
|
2750
|
+
kfb: {},
|
|
2751
|
+
slides: { default: () => [] },
|
|
2752
|
+
ai: {},
|
|
2753
|
+
teleport: { type: Boolean, default: !1 },
|
|
2754
|
+
process: {},
|
|
2755
|
+
microscope: {},
|
|
2756
|
+
showList: { type: Boolean, default: !0 },
|
|
2757
|
+
showKfbLabel: { type: Boolean, default: !0 },
|
|
2758
|
+
showKeyboard: { type: Boolean, default: !1 },
|
|
2759
|
+
showMenuText: { type: Boolean, default: !0 }
|
|
2760
|
+
}, {
|
|
2761
|
+
index: {
|
|
2762
|
+
default: 0
|
|
2763
|
+
},
|
|
2764
|
+
indexModifiers: {}
|
|
2765
|
+
}),
|
|
2766
|
+
emits: /* @__PURE__ */ we(["tool"], ["update:index"]),
|
|
2767
|
+
setup(c, { expose: e, emit: o }) {
|
|
2768
|
+
const t = c, _ = o, v = Ee(c, "index"), u = B(() => t.slides[v.value]), i = B(() => t.slides.filter(({ check: C }) => C)), f = $(), g = $(), h = $(), l = $(), a = $(t.showKeyboard), m = $(t.showKfbLabel), r = $(!1), s = $(!1), p = $(!1), { t: w } = de(), k = B(() => {
|
|
2769
|
+
var C;
|
|
2770
|
+
if (r.value) {
|
|
2771
|
+
const N = i.value.findIndex(({ id: F }) => {
|
|
2772
|
+
var ie;
|
|
2773
|
+
return F === ((ie = u.value) == null ? void 0 : ie.id);
|
|
2774
|
+
});
|
|
2775
|
+
return ((C = h.value) == null ? void 0 : C[N]) || g.value;
|
|
2776
|
+
} else
|
|
2777
|
+
return g.value;
|
|
2778
|
+
}), d = B(() => i.value.length <= 1 ? {
|
|
2779
|
+
height: "100%",
|
|
2780
|
+
width: "100%"
|
|
2781
|
+
} : i.value.length <= 2 ? {
|
|
2782
|
+
height: "100%",
|
|
2783
|
+
width: "calc((100% - 4px) / 2)"
|
|
2784
|
+
} : i.value.length <= 4 ? {
|
|
2785
|
+
height: "calc((100% - 4px) / 2)",
|
|
2786
|
+
width: "calc((100% - 4px) / 2)"
|
|
2787
|
+
} : i.value.length <= 6 ? {
|
|
2788
|
+
height: "calc((100% - 4px) / 2)",
|
|
2789
|
+
width: "calc((100% - 4px * 2) / 3)"
|
|
2790
|
+
} : i.value.length <= 9 ? {
|
|
2791
|
+
height: "calc((100% - 4px * 2) / 3)",
|
|
2792
|
+
width: "calc((100% - 4px * 2) / 3)"
|
|
2793
|
+
} : {
|
|
2794
|
+
height: "100%",
|
|
2795
|
+
width: "100%"
|
|
2796
|
+
});
|
|
2797
|
+
ne(() => i.value, (C) => {
|
|
2798
|
+
r.value && C.length <= 1 && (r.value = !1);
|
|
2799
|
+
}), ne(() => u.value, (C) => {
|
|
2800
|
+
if (C) {
|
|
2801
|
+
const N = C.read;
|
|
2802
|
+
C.read = !0, _("tool", "choose", {
|
|
2803
|
+
slide: C,
|
|
2804
|
+
read: N
|
|
2805
|
+
});
|
|
2806
|
+
}
|
|
2807
|
+
});
|
|
2808
|
+
const {
|
|
2809
|
+
analysisClass: E,
|
|
2810
|
+
aiLabelList: R,
|
|
2811
|
+
enableAi: I,
|
|
2812
|
+
enableIqc: Z,
|
|
2813
|
+
toggleIqc: Q,
|
|
2814
|
+
toggleAi: ve
|
|
2815
|
+
} = Ao(t, u);
|
|
2816
|
+
function te(C, N) {
|
|
2817
|
+
C === "next" && t.slides[v.value + 1] && v.value++, C === "prev" && t.slides[v.value - 1] && v.value--, (C === "label" || C === "tool") && (m.value = N), _("tool", C, N);
|
|
2818
|
+
}
|
|
2819
|
+
function be(C) {
|
|
2820
|
+
var F, ie, He;
|
|
2821
|
+
const N = me(j({}, t.kfb), {
|
|
2822
|
+
process: t.process,
|
|
2823
|
+
microscope: t.microscope,
|
|
2824
|
+
slide: C,
|
|
2825
|
+
aiLabelList: u.value.id === C.id ? ((F = l.value) == null ? void 0 : F.labelList) || [] : [],
|
|
2826
|
+
hotmap: (ie = C == null ? void 0 : C.hotmap) != null && ie.file ? me(j({}, (C == null ? void 0 : C.hotmap) || {}), {
|
|
2827
|
+
enable: I.value
|
|
2828
|
+
}) : void 0,
|
|
2829
|
+
syncPosition: s.value,
|
|
2830
|
+
syncZoom: s.value,
|
|
2831
|
+
handle: void 0
|
|
2832
|
+
});
|
|
2833
|
+
return (He = t.kfb) != null && He.handle ? t.kfb.handle(C, N) : N;
|
|
2834
|
+
}
|
|
2835
|
+
function ke(C) {
|
|
2836
|
+
v.value = t.slides.findIndex((N) => N.id === C.id);
|
|
2837
|
+
}
|
|
2838
|
+
function Ze(C) {
|
|
2839
|
+
r.value && (t.slides[C].check = !0);
|
|
2840
|
+
}
|
|
2841
|
+
function qe() {
|
|
2842
|
+
var C;
|
|
2843
|
+
m.value = !p.value, (C = r.value ? h.value : [g.value]) == null || C.forEach((N) => {
|
|
2844
|
+
p.value && (N.updateGrid({
|
|
2845
|
+
show: !p.value,
|
|
2846
|
+
ruler: !p.value
|
|
2847
|
+
}), a.value = !p.value), N.updateGraduation({
|
|
2848
|
+
show: !p.value
|
|
2849
|
+
}), N.updateNavigator(!p.value);
|
|
2850
|
+
});
|
|
2851
|
+
}
|
|
2852
|
+
function Ye(C) {
|
|
2853
|
+
v.value = C, f.value && f.value.jumpToSlide(C);
|
|
2854
|
+
}
|
|
2855
|
+
function Xe(C, N) {
|
|
2856
|
+
k.value && k.value.jumpToLabel(C, N);
|
|
2857
|
+
}
|
|
2858
|
+
function Se(C, N) {
|
|
2859
|
+
k.value && k.value.jumpToPosition(C, N);
|
|
2860
|
+
}
|
|
2861
|
+
return re("kfbViewRef", k), re("show-keyboard", a), re("show-kfb-label", m), re("hidden-all-label", p), re("file-index", v), re("divide", r), re("sync", s), e({
|
|
2862
|
+
divide: r,
|
|
2863
|
+
slide: u,
|
|
2864
|
+
kfbViewRef: k,
|
|
2865
|
+
jumpToSlide: Ye,
|
|
2866
|
+
jumpToLabel: Xe,
|
|
2867
|
+
jumpToPosition: Se,
|
|
2868
|
+
enableAI: B(() => {
|
|
2869
|
+
var C;
|
|
2870
|
+
return ((C = t.ai) == null ? void 0 : C.enable) && R.value.length;
|
|
2871
|
+
})
|
|
2872
|
+
}), (C, N) => (y(), L("div", Mn, [
|
|
2873
|
+
C.menus.length ? (y(), P(Ae, {
|
|
2874
|
+
key: 0,
|
|
2875
|
+
menu: C.menus,
|
|
2876
|
+
"show-menu-text": C.showMenuText,
|
|
2877
|
+
process: C.process,
|
|
2878
|
+
microscope: C.microscope,
|
|
2879
|
+
onTool: te
|
|
2880
|
+
}, {
|
|
2881
|
+
left: x(() => [
|
|
2882
|
+
ce(C.$slots, "left")
|
|
2883
|
+
]),
|
|
2884
|
+
right: x(() => [
|
|
2885
|
+
T(n(Le), {
|
|
2886
|
+
modelValue: p.value,
|
|
2887
|
+
"onUpdate:modelValue": N[0] || (N[0] = (F) => p.value = F),
|
|
2888
|
+
"active-text": n(w)("隐藏标签"),
|
|
2889
|
+
class: "margin-r-2",
|
|
2890
|
+
onChange: qe
|
|
2891
|
+
}, null, 8, ["modelValue", "active-text"]),
|
|
2892
|
+
C.ai && C.ai.enable && n(E) === "IQC" ? (y(), P(n(Le), {
|
|
2893
|
+
key: 0,
|
|
2894
|
+
modelValue: n(Z),
|
|
2895
|
+
"onUpdate:modelValue": N[1] || (N[1] = (F) => Ve(Z) ? Z.value = F : null),
|
|
2896
|
+
"active-text": n(w)("AI质控"),
|
|
2897
|
+
class: "margin-r-2",
|
|
2898
|
+
onChange: n(Q)
|
|
2899
|
+
}, null, 8, ["modelValue", "active-text", "onChange"])) : C.ai && C.ai.enable && n(E) ? (y(), P(n(Le), {
|
|
2900
|
+
key: 1,
|
|
2901
|
+
modelValue: n(I),
|
|
2902
|
+
"onUpdate:modelValue": N[2] || (N[2] = (F) => Ve(I) ? I.value = F : null),
|
|
2903
|
+
"active-text": n(w)("AI分析"),
|
|
2904
|
+
class: "margin-r-2",
|
|
2905
|
+
onChange: n(ve)
|
|
2906
|
+
}, null, 8, ["modelValue", "active-text", "onChange"])) : A("", !0),
|
|
2907
|
+
ce(C.$slots, "right")
|
|
2908
|
+
]),
|
|
2909
|
+
_: 3
|
|
2910
|
+
}, 8, ["menu", "show-menu-text", "process", "microscope"])) : A("", !0),
|
|
2911
|
+
b("div", In, [
|
|
2912
|
+
C.showList ? (y(), P(Fe, {
|
|
2913
|
+
key: 0,
|
|
2914
|
+
defer: "",
|
|
2915
|
+
to: "#kfb-slide-list",
|
|
2916
|
+
disabled: !C.teleport
|
|
2917
|
+
}, [
|
|
2918
|
+
T(zn, {
|
|
2919
|
+
ref_key: "slidesRef",
|
|
2920
|
+
ref: f,
|
|
2921
|
+
style: W(C.teleport ? "" : "width: 250px"),
|
|
2922
|
+
slides: C.slides,
|
|
2923
|
+
onSelect: Ze,
|
|
2924
|
+
onTool: te
|
|
2925
|
+
}, {
|
|
2926
|
+
slide: x(({ slide: F }) => [
|
|
2927
|
+
ce(C.$slots, "list", { slide: F })
|
|
2928
|
+
]),
|
|
2929
|
+
_: 3
|
|
2930
|
+
}, 8, ["style", "slides"])
|
|
2931
|
+
], 8, ["disabled"])) : A("", !0),
|
|
2932
|
+
(y(), P(Fe, {
|
|
2933
|
+
defer: "",
|
|
2934
|
+
to: "#kfb-slide-view",
|
|
2935
|
+
disabled: !C.teleport
|
|
2936
|
+
}, [
|
|
2937
|
+
b("div", Sn, [
|
|
2938
|
+
i.value.length && r.value ? (y(), L("ul", Hn, [
|
|
2939
|
+
(y(!0), L(le, null, oe(i.value, (F, ie) => (y(), L("li", {
|
|
2940
|
+
key: ie,
|
|
2941
|
+
style: W(d.value),
|
|
2942
|
+
class: ye(u.value.id === F.id ? "hzzt-kfb-view-screen-active" : ""),
|
|
2943
|
+
onClick: (He) => ke(F)
|
|
2944
|
+
}, [
|
|
2945
|
+
(y(), P(Me, Ke({
|
|
2946
|
+
ref_for: !0,
|
|
2947
|
+
ref_key: "kfbViewRefs",
|
|
2948
|
+
ref: h,
|
|
2949
|
+
key: `kfb-${ie}`
|
|
2950
|
+
}, { ref_for: !0 }, be(F), { onTool: te }), {
|
|
2951
|
+
default: x(() => [
|
|
2952
|
+
ce(C.$slots, "kfb", { slide: F })
|
|
2953
|
+
]),
|
|
2954
|
+
_: 2
|
|
2955
|
+
}, 1040))
|
|
2956
|
+
], 14, Pn))), 128))
|
|
2957
|
+
])) : u.value ? (y(), P(Me, Ke({
|
|
2958
|
+
key: 1,
|
|
2959
|
+
ref_key: "kfbViewRef",
|
|
2960
|
+
ref: g
|
|
2961
|
+
}, be(u.value), { onTool: te }), {
|
|
2962
|
+
default: x(() => [
|
|
2963
|
+
ce(C.$slots, "kfb", { slide: u.value })
|
|
2964
|
+
]),
|
|
2965
|
+
_: 3
|
|
2966
|
+
}, 16)) : A("", !0)
|
|
2967
|
+
])
|
|
2968
|
+
], 8, ["disabled"])),
|
|
2969
|
+
C.ai && C.ai.enable && n(R).length ? (y(), P(Fe, {
|
|
2970
|
+
key: 1,
|
|
2971
|
+
defer: "",
|
|
2972
|
+
to: "#kfb-slide-ai",
|
|
2973
|
+
disabled: !C.teleport
|
|
2974
|
+
}, [
|
|
2975
|
+
T(Vn, {
|
|
2976
|
+
style: W(C.teleport ? "" : "width: 350px"),
|
|
2977
|
+
ref_key: "kfbAiRef",
|
|
2978
|
+
ref: l,
|
|
2979
|
+
data: n(R),
|
|
2980
|
+
slide: u.value
|
|
2981
|
+
}, null, 8, ["style", "data", "slide"])
|
|
2982
|
+
], 8, ["disabled"])) : A("", !0),
|
|
2983
|
+
ce(C.$slots, "default")
|
|
2984
|
+
])
|
|
2985
|
+
]));
|
|
2986
|
+
}
|
|
2987
|
+
});
|
|
2988
|
+
We.name = "HzztKfbSlide";
|
|
2989
|
+
Me.name = "HzztKfbView";
|
|
2990
|
+
Ae.name = "HzztKfbToolbox";
|
|
2991
|
+
const Rn = (c, e) => {
|
|
2992
|
+
c.use(cl, e == null ? void 0 : e.i18n), c.component(We.name, We), c.component(Me.name, Me), c.component(Ae.name, Ae);
|
|
2993
|
+
}, Fn = {
|
|
2994
|
+
install: Rn,
|
|
2995
|
+
HzztKfbSlide: We,
|
|
2996
|
+
HzztKfbView: Me,
|
|
2997
|
+
HzztKfbToolbox: Ae
|
|
2998
|
+
};
|
|
2999
|
+
export {
|
|
3000
|
+
$t as D,
|
|
3001
|
+
he as _,
|
|
3002
|
+
X as a,
|
|
3003
|
+
lt as b,
|
|
3004
|
+
We as c,
|
|
3005
|
+
Me as d,
|
|
3006
|
+
Ae as e,
|
|
3007
|
+
Fn as i,
|
|
3008
|
+
de as u
|
|
3009
|
+
};
|