hzzt-kfb-slide 0.0.9 → 0.1.1
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/{annotateCskNt8uV.js → annotateB3lFxMEo.js} +3 -3
- package/dist/components/{annotateWlJ-PlkO.js → annotateB8zoDimf.js} +1 -1
- package/dist/components/{annotateBSN_N98d.js → annotateCLaAaHN_.js} +1 -1
- package/dist/components/{annotateDQQc3oYO.js → annotateDa-PLWsY.js} +1 -1
- package/dist/components/{arrowCircleDN2Qevn_.js → arrowCircleCiliVlpQ.js} +1 -1
- package/dist/components/{arrowCircleCLHjzy7J.js → arrowCircleD-pOtQNL.js} +1 -1
- package/dist/components/{arrowqeUXLexE.js → arrowCmICz6PS.js} +1 -1
- package/dist/components/{arrowq3GgyGtl.js → arrowDjWPvUqv.js} +1 -1
- package/dist/components/{arrowDownB5PEMVYP.js → arrowDownBiQp1p0i.js} +1 -1
- package/dist/components/{arrowDownztxcPDK2.js → arrowDownCLuKnhgC.js} +1 -1
- package/dist/components/{arrowLeftBTScpoSq.js → arrowLeftC5Xn0ZKF.js} +1 -1
- package/dist/components/{arrowLeftC_h3QrNf.js → arrowLeftCBSwbPg8.js} +1 -1
- package/dist/components/{arrowRightDaLk5ye2.js → arrowRightC-gQEqoF.js} +1 -1
- package/dist/components/{arrowRightBAEhIIeD.js → arrowRightDxs4lV9Z.js} +1 -1
- package/dist/components/{arrowUpB_mDEoVE.js → arrowUpBfRL3fhE.js} +1 -1
- package/dist/components/{arrowUpBuwILzVM.js → arrowUpCs2jBl9R.js} +1 -1
- package/dist/components/{bilateralC8BCqacM.js → bilateral1NHhlA6z.js} +1 -1
- package/dist/components/{bilateralsYVc46ez.js → bilateralxnj69N0V.js} +1 -1
- package/dist/components/{channelCm6WfZhE.js → channelChBho3_o.js} +1 -1
- package/dist/components/{channelCxhiBqFa.js → channelD9KcPJ4H.js} +1 -1
- package/dist/components/{checklhwJw6ij.js → checkDJiCkpCP.js} +1 -1
- package/dist/components/{checkgqabT7oF.js → checkPjfQU2X-.js} +1 -1
- package/dist/components/{config8wBzwVWe.js → configBVvJPXEW.js} +1 -1
- package/dist/components/{configCo2pzSSl.js → configBoVZz6t_.js} +1 -1
- package/dist/components/{customoXQbJYSP.js → customBqUoJeja.js} +1 -1
- package/dist/components/{customDdRy3S9S.js → customCuFCEEmf.js} +1 -1
- package/dist/components/{deleteDFVCacNy.js → deleteBK4VaII7.js} +1 -1
- package/dist/components/{deletegLcmbyGU.js → deleteBbL8JyJH.js} +1 -1
- package/dist/components/{dotBjtFccSw.js → dotC3ho5Naw.js} +1 -1
- package/dist/components/{dotB2b_Bc58.js → dotCZFwvsGJ.js} +4 -4
- package/dist/components/{dotBx_U-TRs.js → dotCZmc5XHw.js} +1 -1
- package/dist/components/{dotBdyZ6Zs_.js → dotD0RUyAOF.js} +1 -1
- package/dist/components/{dotBOQVdiVZ.js → dotDdB7hEiU.js} +1 -1
- package/dist/components/{dotDVIxo3b0.js → dotDf3m-ZtS.js} +1 -1
- package/dist/components/{downloadCO9Cz6dr.js → downloadBPbhAwsC.js} +1 -1
- package/dist/components/{downloadDfTBHJ7d.js → downloadC9SBQxWS.js} +1 -1
- package/dist/components/{downloadDYN6iKOq.js → downloadGVNhdAbp.js} +3 -3
- package/dist/components/{downloadCq-yv4BU.js → downloadi5H6HjoE.js} +1 -1
- package/dist/components/{ellipseDxOwmrP-.js → ellipseBBwG5L6y.js} +1 -1
- package/dist/components/{ellipseDPdtULn7.js → ellipseGq_BKpIA.js} +1 -1
- package/dist/components/{expandLeftDgZEeCXR.js → expandLeftBVBh6iI1.js} +1 -1
- package/dist/components/{expandLeftBmr3uw-F.js → expandLeftCWohfvHq.js} +1 -1
- package/dist/components/{expandRightBPDxAHAT.js → expandRight-KeLeoCw.js} +1 -1
- package/dist/components/{expandRightBvHDRlw9.js → expandRightCuU0Ktmj.js} +1 -1
- package/dist/components/{flagC_HXmW12.js → flagCNdHcaOr.js} +1 -1
- package/dist/components/{flagDCxIuLfr.js → flagDNqPx5NT.js} +1 -1
- package/dist/components/{flipCNkGkJFc.js → flip2i6pDnun.js} +1 -1
- package/dist/components/{flipK09gW4-M.js → flipBJRiEs27.js} +1 -1
- package/dist/components/{fontDXUcdfsw.js → fontBvWU1Zty.js} +1 -1
- package/dist/components/{fontBIHY17oy.js → fontCsdG88OT.js} +1 -1
- package/dist/components/{fullscreenDd3GiUQ4.js → fullscreenB7VOC9nF.js} +1 -1
- package/dist/components/{fullscreenDPi8Xahs.js → fullscreenCfE6L14I.js} +1 -1
- package/dist/components/{fullscreenCEFKqV7l.js → fullscreenilcy7g6R.js} +2 -2
- package/dist/components/{fullscreenDZYz-sfk.js → fullscreenkPWhn6hX.js} +1 -1
- package/dist/components/indexBk8PrnQT.js +3021 -0
- package/dist/components/indexh_hCt-Tc.js +4 -0
- package/dist/components/{infoBWvCO9_7.js → infoBKGJei_W.js} +1 -1
- package/dist/components/{infolJ1oViok.js → infoDD1pEfcw.js} +1 -1
- package/dist/components/{levelBeCwZgz9.js → level0LJ8aEMv.js} +1 -1
- package/dist/components/{level3wMXDN6Y.js → levelCkmf3f6J.js} +1 -1
- package/dist/components/{lineBYCqffsD.js → lineCFav17ki.js} +1 -1
- package/dist/components/{linerKZy_PBV.js → linerlsB9JL7.js} +1 -1
- package/dist/components/{microscopeDsuJ4oWc.js → microscopeBBz0yD7E.js} +1 -1
- package/dist/components/{microscopeB9wC5wRM.js → microscopeCLmgCovH.js} +3 -3
- package/dist/components/{microscopeB6_xwHWr.js → microscopeCgg0Ym67.js} +1 -1
- package/dist/components/{microscopeBm3v4wJv.js → microscopeCq6kF8bY.js} +1 -1
- package/dist/components/{movel8WgST25.js → moveB41ZcoNK.js} +1 -1
- package/dist/components/{moveDU5gi3Hs.js → moveB8_22tie.js} +1 -1
- package/dist/components/{moveCCEIbSgO.js → moveBGpoQ1-D.js} +3 -3
- package/dist/components/{moveDB4RR4wM.js → moveCkVAoMeQ.js} +1 -1
- package/dist/components/{next_hDHaXI8.js → nextD5Z4bZnT.js} +1 -1
- package/dist/components/{nextCU-KJqvj.js → nextDRedCGZe.js} +1 -1
- package/dist/components/{polygonI_Zz93ii.js → polygonCp9oWQ3l.js} +1 -1
- package/dist/components/{polygonidXC3FDF.js → polygongm9CHAwB.js} +1 -1
- package/dist/components/{prevBeyGPDD3.js → prevCPX6EC1A.js} +1 -1
- package/dist/components/{prevDVlS4e4B.js → prevgL7_Qz0_.js} +1 -1
- package/dist/components/{processD0b1s4d4.js → processBAq39ThA.js} +1 -1
- package/dist/components/{processDAd-rsJz.js → processDgdAEClC.js} +1 -1
- package/dist/components/{processpK6pP0DH.js → processMgvhvblB.js} +1 -1
- package/dist/components/{processBUT2dQY5.js → processnL7rVPu0.js} +3 -3
- package/dist/components/{rectangleD7n6Vvt6.js → rectangleDDWXtsEU.js} +1 -1
- package/dist/components/{rectangleD4mKwQvO.js → rectangleqZeguu3p.js} +1 -1
- package/dist/components/{rotateDh6-tIqc.js → rotate7bzyW-OB.js} +1 -1
- package/dist/components/{rotatePTOj7NOR.js → rotateCEBfde_V.js} +4 -4
- package/dist/components/{rotateDZ2LcDRk.js → rotateCUUn3DGL.js} +1 -1
- package/dist/components/{rotateBgGcEeK6.js → rotateb49G-Q8z.js} +1 -1
- package/dist/components/{settingDx9NClvs.js → settingB3EwckOT.js} +1 -1
- package/dist/components/{settingDCw5DNWc.js → settingDFygEEDe.js} +1 -1
- package/dist/components/{settingB_4RabuF.js → settingDWDMPbdO.js} +3 -3
- package/dist/components/{settingsSpWOZGB.js → settingh3PMi-mk.js} +1 -1
- package/dist/components/{starZ-R1XM0P.js → starBXSy-NoI.js} +1 -1
- package/dist/components/{starDBBLg7cl.js → starCx7mYpn2.js} +1 -1
- package/dist/components/{tailorvV9idwBq.js → tailorBzcPtJBg.js} +1 -1
- package/dist/components/{tailorBIcgkHyw.js → tailorCvYJnrbK.js} +1 -1
- package/dist/components/{useCommonDOhNsd5o.js → useCommonBRWUFIsx.js} +1 -1
- package/dist/components/{useCommonSF_YB4y_.js → useCommonBT6Pfwp3.js} +1 -1
- package/dist/components/{voiceoSSHyjHA.js → voiceCCipOfTa.js} +1 -1
- package/dist/components/{voice0zCcCgj_.js → voiceDJghWoc3.js} +1 -1
- package/dist/components/{zoomluz7C-Dr.js → zoomDePdFm9E.js} +1 -1
- package/dist/components/{zoomInBW6dNl06.js → zoomInC4xFE1uN.js} +1 -1
- package/dist/components/{zoomInDtlrDlNR.js → zoomInDzq-DbIa.js} +1 -1
- package/dist/components/{zoomOutBKc239cL.js → zoomOutBQz07s5R.js} +1 -1
- package/dist/components/{zoomOut_jWy0Idj.js → zoomOutDnt66Lz5.js} +1 -1
- package/dist/components/{zoomDQAi2Vcg.js → zoomqK-uW5RK.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/package.json +2 -2
- package/types/components/KfbView/index.d.ts +2 -0
- package/types/components/KfbView/index.vue.d.ts +4 -0
- package/types/components/ai/useAiResult.d.ts +7 -0
- package/types/index.d.ts +12 -0
- package/dist/components/indexBMt2qfwG.js +0 -3006
- package/dist/components/indexCIVMES3X.js +0 -4
|
@@ -0,0 +1,3021 @@
|
|
|
1
|
+
var qt = Object.defineProperty, Yt = Object.defineProperties;
|
|
2
|
+
var Xt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var yt = Object.getOwnPropertySymbols;
|
|
4
|
+
var Qt = Object.prototype.hasOwnProperty, Jt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var _t = (u, e, n) => e in u ? qt(u, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : u[e] = n, j = (u, e) => {
|
|
6
|
+
for (var n in e || (e = {}))
|
|
7
|
+
Qt.call(e, n) && _t(u, n, e[n]);
|
|
8
|
+
if (yt)
|
|
9
|
+
for (var n of yt(e))
|
|
10
|
+
Jt.call(e, n) && _t(u, n, e[n]);
|
|
11
|
+
return u;
|
|
12
|
+
}, me = (u, e) => Yt(u, Xt(e));
|
|
13
|
+
var Ce = (u, e, n) => new Promise((t, y) => {
|
|
14
|
+
var d = (f) => {
|
|
15
|
+
try {
|
|
16
|
+
i(n.next(f));
|
|
17
|
+
} catch (g) {
|
|
18
|
+
y(g);
|
|
19
|
+
}
|
|
20
|
+
}, c = (f) => {
|
|
21
|
+
try {
|
|
22
|
+
i(n.throw(f));
|
|
23
|
+
} catch (g) {
|
|
24
|
+
y(g);
|
|
25
|
+
}
|
|
26
|
+
}, i = (f) => f.done ? t(f.value) : Promise.resolve(f.value).then(d, c);
|
|
27
|
+
i((n = n.apply(u, e)).next());
|
|
28
|
+
});
|
|
29
|
+
import { inject as J, ref as $, markRaw as H, defineAsyncComponent as V, defineComponent as ee, createBlock as P, openBlock as _, unref as o, normalizeProps as el, guardReactiveProps as tl, withCtx as x, resolveDynamicComponent as xe, useModel as Ee, computed as B, createElementBlock as L, createElementVNode as b, createVNode as T, toDisplayString as E, Fragment as le, renderList as oe, createTextVNode as G, isRef as Ve, watch as ne, h as ll, provide as ue, renderSlot as de, mergeProps as Ke, createCommentVNode as A, reactive as ot, onMounted as pe, onBeforeUnmount as Ie, normalizeStyle as Z, mergeDefaults as ol, withDirectives as $e, vShow as Pe, getCurrentInstance as nl, mergeModels as we, normalizeClass as ye, Teleport as Fe, withModifiers as Be } from "vue";
|
|
30
|
+
import { ElIcon as _e, ElRow as al, ElCol as sl, 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 il, ElTag as Tt, ElCheckbox as Oe, ElTooltip as zt, ElPopover as rl, ElCheckboxGroup as ul, ElPagination as cl } from "element-plus";
|
|
31
|
+
import { KfbView as ce, OpenSeadragon as Te } from "kfb-view";
|
|
32
|
+
import dl from "v-lazy-image";
|
|
33
|
+
function ie() {
|
|
34
|
+
const u = J("i18n"), e = (n) => n;
|
|
35
|
+
return {
|
|
36
|
+
locale: u == null ? void 0 : u.locale,
|
|
37
|
+
t: (u == null ? void 0 : u.t) || e
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const vl = {
|
|
41
|
+
install(u, e) {
|
|
42
|
+
u.provide("i18n", e == null ? void 0 : e.global);
|
|
43
|
+
}
|
|
44
|
+
}, O = $({
|
|
45
|
+
annotate: H(V(() => import("./annotateDa-PLWsY.js"))),
|
|
46
|
+
arrowCircle: H(V(() => import("./arrowCircleCiliVlpQ.js"))),
|
|
47
|
+
check: H(V(() => import("./checkPjfQU2X-.js"))),
|
|
48
|
+
dot: H(V(() => import("./dotCZmc5XHw.js"))),
|
|
49
|
+
flip: H(V(() => import("./flip2i6pDnun.js"))),
|
|
50
|
+
info: H(V(() => import("./infoBKGJei_W.js"))),
|
|
51
|
+
microscope: H(V(() => import("./microscopeCgg0Ym67.js"))),
|
|
52
|
+
move: H(V(() => import("./moveB41ZcoNK.js"))),
|
|
53
|
+
next: H(V(() => import("./nextD5Z4bZnT.js"))),
|
|
54
|
+
prev: H(V(() => import("./prevCPX6EC1A.js"))),
|
|
55
|
+
process: H(V(() => import("./processBAq39ThA.js"))),
|
|
56
|
+
rotate: H(V(() => import("./rotateCUUn3DGL.js"))),
|
|
57
|
+
fullscreen: H(V(() => import("./fullscreenkPWhn6hX.js"))),
|
|
58
|
+
setting: H(V(() => import("./settingDFygEEDe.js"))),
|
|
59
|
+
tailor: H(V(() => import("./tailorBzcPtJBg.js"))),
|
|
60
|
+
download: H(V(() => import("./downloadBPbhAwsC.js"))),
|
|
61
|
+
config: H(V(() => import("./configBVvJPXEW.js"))),
|
|
62
|
+
arrowDown: H(V(() => import("./arrowDownBiQp1p0i.js"))),
|
|
63
|
+
arrowUp: H(V(() => import("./arrowUpBfRL3fhE.js"))),
|
|
64
|
+
arrowLeft: H(V(() => import("./arrowLeftCBSwbPg8.js"))),
|
|
65
|
+
arrowRight: H(V(() => import("./arrowRightDxs4lV9Z.js"))),
|
|
66
|
+
zoomIn: H(V(() => import("./zoomInDzq-DbIa.js"))),
|
|
67
|
+
zoomOut: H(V(() => import("./zoomOutDnt66Lz5.js"))),
|
|
68
|
+
level: H(V(() => import("./level0LJ8aEMv.js"))),
|
|
69
|
+
channel: H(V(() => import("./channelD9KcPJ4H.js"))),
|
|
70
|
+
delete: H(V(() => import("./deleteBK4VaII7.js"))),
|
|
71
|
+
expandLeft: H(V(() => import("./expandLeftCWohfvHq.js"))),
|
|
72
|
+
expandRight: H(V(() => import("./expandRight-KeLeoCw.js"))),
|
|
73
|
+
markLine: H(V(() => import("./linerlsB9JL7.js"))),
|
|
74
|
+
markArrow: H(V(() => import("./arrowDjWPvUqv.js"))),
|
|
75
|
+
markBilateral: H(V(() => import("./bilateralxnj69N0V.js"))),
|
|
76
|
+
markRectangle: H(V(() => import("./rectangleqZeguu3p.js"))),
|
|
77
|
+
markEllipse: H(V(() => import("./ellipseGq_BKpIA.js"))),
|
|
78
|
+
markPolygon: H(V(() => import("./polygonCp9oWQ3l.js"))),
|
|
79
|
+
markFlag: H(V(() => import("./flagCNdHcaOr.js"))),
|
|
80
|
+
markStar: H(V(() => import("./starBXSy-NoI.js"))),
|
|
81
|
+
markDot: H(V(() => import("./dotDf3m-ZtS.js"))),
|
|
82
|
+
markFont: H(V(() => import("./fontBvWU1Zty.js"))),
|
|
83
|
+
markVoice: H(V(() => import("./voiceDJghWoc3.js")))
|
|
84
|
+
}), X = /* @__PURE__ */ ee({
|
|
85
|
+
__name: "KfbIcon",
|
|
86
|
+
props: {
|
|
87
|
+
name: {
|
|
88
|
+
type: [String, Number],
|
|
89
|
+
required: !0
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
setup(u) {
|
|
93
|
+
return (e, n) => (_(), P(o(_e), el(tl(e.$attrs)), {
|
|
94
|
+
default: x(() => [
|
|
95
|
+
(_(), P(xe(o(O)[u.name])))
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
}, 16));
|
|
99
|
+
}
|
|
100
|
+
}), fl = { class: "hzzt-kfb-tool-config" }, ml = { class: "hzzt-kfb-tool-config__title margin-b-2" }, pl = { class: "hzzt-kfb-tool-config__block flex align-items-center" }, hl = { class: "hzzt-kfb-tool-config__icon flex align-items-center justify-content-center" }, gl = { class: "margin-l-4 flex-1" }, wl = { class: "hzzt-kfb-tool-config__title" }, yl = { class: "flex align-items-center" }, _l = {
|
|
101
|
+
class: "margin-t-2 margin-b-2",
|
|
102
|
+
style: { width: "160px" }
|
|
103
|
+
}, bl = { class: "flex align-items-center" }, kl = {
|
|
104
|
+
class: "margin-t-2 margin-b-2",
|
|
105
|
+
style: { width: "160px" }
|
|
106
|
+
}, zl = /* @__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(u) {
|
|
119
|
+
const e = Ee(u, "menus"), n = Ee(u, "showText"), { t } = ie(), y = B(() => e.value.filter((g) => g.name !== "line" && g.name !== "config" && g.name !== "zoom")), d = {
|
|
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
|
+
}, c = J("show-keyboard", $(!1));
|
|
135
|
+
function i(g) {
|
|
136
|
+
return g in d;
|
|
137
|
+
}
|
|
138
|
+
function f(g) {
|
|
139
|
+
var h;
|
|
140
|
+
return ((h = g.props) == null ? void 0 : h.text) || (i(g.name) ? d[g.name] : "");
|
|
141
|
+
}
|
|
142
|
+
return (g, h) => (_(), L("div", fl, [
|
|
143
|
+
b("h3", ml, E(o(t)("显示管理")), 1),
|
|
144
|
+
T(o(al), { gutter: 10 }, {
|
|
145
|
+
default: x(() => [
|
|
146
|
+
(_(!0), L(le, null, oe(y.value, (l) => (_(), P(o(sl), {
|
|
147
|
+
key: l.name,
|
|
148
|
+
span: 8
|
|
149
|
+
}, {
|
|
150
|
+
default: x(() => {
|
|
151
|
+
var a, p;
|
|
152
|
+
return [
|
|
153
|
+
b("div", pl, [
|
|
154
|
+
b("div", hl, [
|
|
155
|
+
(a = l.props) != null && a.component ? (_(), P(xe((p = l.props) == null ? void 0 : p.component), {
|
|
156
|
+
key: 1,
|
|
157
|
+
size: 24
|
|
158
|
+
})) : (_(), P(X, {
|
|
159
|
+
key: 0,
|
|
160
|
+
size: 24,
|
|
161
|
+
name: l.name
|
|
162
|
+
}, null, 8, ["name"]))
|
|
163
|
+
]),
|
|
164
|
+
b("p", gl, E(f(l)), 1),
|
|
165
|
+
T(o(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", wl, E(o(t)("其他设置")), 1),
|
|
181
|
+
b("div", yl, [
|
|
182
|
+
b("p", _l, E(o(t)("工具列表显示切换")), 1),
|
|
183
|
+
T(o(bt), {
|
|
184
|
+
modelValue: n.value,
|
|
185
|
+
"onUpdate:modelValue": h[0] || (h[0] = (l) => n.value = l)
|
|
186
|
+
}, {
|
|
187
|
+
default: x(() => [
|
|
188
|
+
T(o(De), { value: !0 }, {
|
|
189
|
+
default: x(() => [
|
|
190
|
+
G(E(o(t)("显示工具名称")), 1)
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
}),
|
|
194
|
+
T(o(De), { value: !1 }, {
|
|
195
|
+
default: x(() => [
|
|
196
|
+
G(E(o(t)("隐藏工具名称")), 1)
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
})
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}, 8, ["modelValue"])
|
|
203
|
+
]),
|
|
204
|
+
b("div", bl, [
|
|
205
|
+
b("p", kl, E(o(t)("小键盘显示切换")), 1),
|
|
206
|
+
T(o(bt), {
|
|
207
|
+
modelValue: o(c),
|
|
208
|
+
"onUpdate:modelValue": h[1] || (h[1] = (l) => Ve(c) ? c.value = l : null)
|
|
209
|
+
}, {
|
|
210
|
+
default: x(() => [
|
|
211
|
+
T(o(De), { value: !0 }, {
|
|
212
|
+
default: x(() => [
|
|
213
|
+
G(E(o(t)("显示小键盘")), 1)
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
}),
|
|
217
|
+
T(o(De), { value: !1 }, {
|
|
218
|
+
default: x(() => [
|
|
219
|
+
G(E(o(t)("隐藏小键盘")), 1)
|
|
220
|
+
]),
|
|
221
|
+
_: 1
|
|
222
|
+
})
|
|
223
|
+
]),
|
|
224
|
+
_: 1
|
|
225
|
+
}, 8, ["modelValue"])
|
|
226
|
+
])
|
|
227
|
+
])
|
|
228
|
+
]));
|
|
229
|
+
}
|
|
230
|
+
}), Cl = { class: "hzzt-kfb-toolbox" }, Tl = { class: "hzzt-kfb-toolbox__component" }, Re = /* @__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(u, { emit: e }) {
|
|
241
|
+
const n = u, t = e, { t: y } = ie(), d = {
|
|
242
|
+
prev: y("上一张"),
|
|
243
|
+
next: y("下一张"),
|
|
244
|
+
config: y("配置"),
|
|
245
|
+
info: y("信息"),
|
|
246
|
+
flip: y("镜像"),
|
|
247
|
+
tailor: y("截图")
|
|
248
|
+
}, c = J("kfbViewRef"), i = $(!1), f = $(n.showMenuText), g = $(a(n.menu)), h = {
|
|
249
|
+
fullscreen: V(() => import("./fullscreenilcy7g6R.js")),
|
|
250
|
+
line: V(() => import("./lineBIoJpzbf.js")),
|
|
251
|
+
setting: V(() => import("./settingDWDMPbdO.js")),
|
|
252
|
+
rotate: V(() => import("./rotateCEBfde_V.js")),
|
|
253
|
+
dot: V(() => import("./dotCZFwvsGJ.js")),
|
|
254
|
+
annotate: V(() => import("./annotateB3lFxMEo.js")),
|
|
255
|
+
process: V(() => import("./processnL7rVPu0.js")),
|
|
256
|
+
microscope: V(() => import("./microscopeCLmgCovH.js")),
|
|
257
|
+
move: V(() => import("./moveBGpoQ1-D.js")),
|
|
258
|
+
custom: V(() => import("./customBqUoJeja.js")),
|
|
259
|
+
zoom: V(() => import("./zoomqK-uW5RK.js")),
|
|
260
|
+
download: V(() => import("./downloadGVNhdAbp.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(() => n.menu, (r) => {
|
|
267
|
+
g.value = a(r);
|
|
268
|
+
});
|
|
269
|
+
function a(r) {
|
|
270
|
+
return r.map((s) => {
|
|
271
|
+
const m = typeof s == "string" ? s : s.name;
|
|
272
|
+
return d[m] ? {
|
|
273
|
+
name: "custom",
|
|
274
|
+
show: typeof s == "string" ? !0 : s.show !== !1,
|
|
275
|
+
props: me(j({
|
|
276
|
+
text: d[m]
|
|
277
|
+
}, typeof s == "string" ? {} : s.props), {
|
|
278
|
+
name: m,
|
|
279
|
+
component: ll(X, {
|
|
280
|
+
name: m
|
|
281
|
+
})
|
|
282
|
+
})
|
|
283
|
+
} : m === "process" ? {
|
|
284
|
+
name: m,
|
|
285
|
+
props: typeof s == "string" ? {
|
|
286
|
+
process: n.process
|
|
287
|
+
} : j({
|
|
288
|
+
process: n.process
|
|
289
|
+
}, s.props),
|
|
290
|
+
slots: typeof s == "string" ? void 0 : s.slots,
|
|
291
|
+
show: typeof s == "string" ? !0 : s.show !== !1
|
|
292
|
+
} : m === "microscope" ? {
|
|
293
|
+
name: m,
|
|
294
|
+
props: typeof s == "string" ? {
|
|
295
|
+
process: n.process
|
|
296
|
+
} : j({
|
|
297
|
+
microscope: n.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: m,
|
|
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 p(r, s) {
|
|
310
|
+
const m = {
|
|
311
|
+
annotate: () => c.value.startDraw(s),
|
|
312
|
+
tailor: () => c.value.shotScreen(s),
|
|
313
|
+
process: () => c.value.forceRedraw(s),
|
|
314
|
+
microscope: () => c.value.scopeChange(s),
|
|
315
|
+
move: () => c.value.fastMove(s),
|
|
316
|
+
endDraw: () => c.value.endDraw(),
|
|
317
|
+
info: () => c.value.info(),
|
|
318
|
+
zoom: () => c.value.zoomTo(s),
|
|
319
|
+
flip: () => c.value.toggleFlip(s),
|
|
320
|
+
config: () => i.value = !0,
|
|
321
|
+
grid: () => c.value.updateGrid(s),
|
|
322
|
+
ruler: () => c.value.updateGrid(s),
|
|
323
|
+
graduation: () => c.value.updateGraduation(s),
|
|
324
|
+
navigator: () => c.value.updateNavigator(s),
|
|
325
|
+
tool: () => {
|
|
326
|
+
c.value.updateGrid({
|
|
327
|
+
show: s
|
|
328
|
+
}), c.value.updateGraduation({
|
|
329
|
+
show: s
|
|
330
|
+
}), c.value.updateGrid({
|
|
331
|
+
ruler: s
|
|
332
|
+
}), c.value.updateNavigator(s);
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
m[r] ? m[r]() : t("tool", r, s);
|
|
336
|
+
}
|
|
337
|
+
return ue("show-text", f), (r, s) => (_(), L("div", Cl, [
|
|
338
|
+
de(r.$slots, "left"),
|
|
339
|
+
b("div", Tl, [
|
|
340
|
+
(_(!0), L(le, null, oe(l.value, (m, w) => (_(), P(xe(m.component), Ke({ ref_for: !0 }, m.props, {
|
|
341
|
+
key: w,
|
|
342
|
+
onTool: p
|
|
343
|
+
}), {
|
|
344
|
+
default: x(() => [
|
|
345
|
+
m.slots ? (_(!0), L(le, { key: 0 }, oe(m.slots, (k) => (_(), P(xe(k)))), 256)) : A("", !0)
|
|
346
|
+
]),
|
|
347
|
+
_: 2
|
|
348
|
+
}, 1040))), 128))
|
|
349
|
+
]),
|
|
350
|
+
de(r.$slots, "right"),
|
|
351
|
+
T(o(je), {
|
|
352
|
+
modelValue: i.value,
|
|
353
|
+
"onUpdate:modelValue": s[2] || (s[2] = (m) => i.value = m),
|
|
354
|
+
width: "800px",
|
|
355
|
+
title: o(y)("阅片工具设置中心")
|
|
356
|
+
}, {
|
|
357
|
+
default: x(() => [
|
|
358
|
+
T(zl, {
|
|
359
|
+
menus: g.value,
|
|
360
|
+
"onUpdate:menus": s[0] || (s[0] = (m) => g.value = m),
|
|
361
|
+
showText: f.value,
|
|
362
|
+
"onUpdate:showText": s[1] || (s[1] = (m) => f.value = m)
|
|
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 $l(u) {
|
|
384
|
+
const e = ot(j(j({}, $t), u.process));
|
|
385
|
+
ne(() => u.process, (d) => {
|
|
386
|
+
y(d);
|
|
387
|
+
});
|
|
388
|
+
const n = B(() => {
|
|
389
|
+
const d = [
|
|
390
|
+
1 + e.r + e.l + 0.5 * e.c,
|
|
391
|
+
0,
|
|
392
|
+
0,
|
|
393
|
+
0,
|
|
394
|
+
-0.25 * e.c
|
|
395
|
+
], c = [
|
|
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 `${d.join(" ")}
|
|
409
|
+
${c.join(" ")}
|
|
410
|
+
${i.join(" ")}
|
|
411
|
+
${f.join(" ")}`;
|
|
412
|
+
}), t = B(() => String(1 + e.s));
|
|
413
|
+
function y(d) {
|
|
414
|
+
d && Object.assign(e, d);
|
|
415
|
+
}
|
|
416
|
+
return {
|
|
417
|
+
imageProcess: e,
|
|
418
|
+
matrixValues: n,
|
|
419
|
+
saturateValues: t,
|
|
420
|
+
forceRedraw: y
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
function Ll(u, e) {
|
|
424
|
+
function n() {
|
|
425
|
+
e.value.$on(ce.events.EVENT_TAILORING_SCREENSHOT, t);
|
|
426
|
+
}
|
|
427
|
+
function t({ base64: c, region: i }) {
|
|
428
|
+
if (window.ClipboardItem && (navigator != null && navigator.clipboard)) {
|
|
429
|
+
const f = y(c, "image/png");
|
|
430
|
+
navigator.clipboard.write([
|
|
431
|
+
new window.ClipboardItem({
|
|
432
|
+
[f.type]: f
|
|
433
|
+
})
|
|
434
|
+
]);
|
|
435
|
+
}
|
|
436
|
+
u("tool", "screen-shot", { base64: c, region: i });
|
|
437
|
+
}
|
|
438
|
+
function y(c, i) {
|
|
439
|
+
var a, p;
|
|
440
|
+
const f = c.split(",");
|
|
441
|
+
(p = (a = f[0]) == null ? void 0 : a.match(/:(.*?);/)) == null || p[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 d(c) {
|
|
450
|
+
const { width: i, height: f } = e.value.$options;
|
|
451
|
+
c ? 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: n,
|
|
479
|
+
shotScreen: d
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
const xl = ["onClick"], El = ["src"], Vl = {
|
|
483
|
+
key: 2,
|
|
484
|
+
style: { width: "18px" },
|
|
485
|
+
class: "margin-r-3"
|
|
486
|
+
}, Ml = {
|
|
487
|
+
key: 1,
|
|
488
|
+
class: "hzzt-kfb-sub-menu"
|
|
489
|
+
}, Il = ["onClick"], Sl = { class: "flex align-items-center" }, Hl = ["src"], Pl = {
|
|
490
|
+
key: 2,
|
|
491
|
+
style: { width: "18px" },
|
|
492
|
+
class: "margin-r-2"
|
|
493
|
+
}, Rl = /* @__PURE__ */ ee({
|
|
494
|
+
__name: "KfbMenu",
|
|
495
|
+
props: {
|
|
496
|
+
menus: {}
|
|
497
|
+
},
|
|
498
|
+
emits: ["tool"],
|
|
499
|
+
setup(u, { emit: e }) {
|
|
500
|
+
const n = $({
|
|
501
|
+
top: "0",
|
|
502
|
+
left: "0",
|
|
503
|
+
display: "none"
|
|
504
|
+
}), t = J("kfbView", $({})), y = J("currentLabel"), d = u, c = e, { t: i } = ie(), 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 y != null && y.value ? [{
|
|
563
|
+
label: i("删除"),
|
|
564
|
+
value: "delete",
|
|
565
|
+
icon: O.value.delete
|
|
566
|
+
}] : (r = d.menus) != null && r.length ? d.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, n.value.top = `${r.position.y}px`, n.value.left = `${r.position.x}px`, n.value.display === "block" ? n.value.display = "none" : n.value.display = "block";
|
|
617
|
+
}
|
|
618
|
+
function l() {
|
|
619
|
+
n.value.display = "none";
|
|
620
|
+
}
|
|
621
|
+
function a(r, s) {
|
|
622
|
+
r.children || ((s == null ? void 0 : s.value) === "annotate" ? c("tool", "annotate", {
|
|
623
|
+
tool: r.value.substring(0, 1).toLocaleUpperCase() + r.value.substring(1),
|
|
624
|
+
once: !0
|
|
625
|
+
}) : r.value === "tailor_now" ? c("tool", "tailor", !0) : c("tool", r.value), l());
|
|
626
|
+
}
|
|
627
|
+
function p(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) => (_(), L("div", {
|
|
635
|
+
class: "hzzt-kfb-menu",
|
|
636
|
+
style: Z(n.value)
|
|
637
|
+
}, [
|
|
638
|
+
(_(!0), L(le, null, oe(g.value, (m, w) => (_(), 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(m)
|
|
645
|
+
}, [
|
|
646
|
+
p(m.icon) ? (_(), P(o(_e), {
|
|
647
|
+
key: 0,
|
|
648
|
+
class: "margin-r-3",
|
|
649
|
+
size: 18
|
|
650
|
+
}, {
|
|
651
|
+
default: x(() => [
|
|
652
|
+
(_(), P(xe(m.icon)))
|
|
653
|
+
]),
|
|
654
|
+
_: 2
|
|
655
|
+
}, 1024)) : m.icon ? (_(), L("img", {
|
|
656
|
+
key: 1,
|
|
657
|
+
style: { width: "18px" },
|
|
658
|
+
class: "margin-r-2",
|
|
659
|
+
src: m.icon
|
|
660
|
+
}, null, 8, El)) : (_(), L("div", Vl)),
|
|
661
|
+
b("span", null, E(m.label), 1)
|
|
662
|
+
], 8, xl),
|
|
663
|
+
m.children ? (_(), P(X, {
|
|
664
|
+
key: 0,
|
|
665
|
+
name: "arrowRight",
|
|
666
|
+
class: "margin-r-2",
|
|
667
|
+
size: 14
|
|
668
|
+
})) : A("", !0),
|
|
669
|
+
m.children ? (_(), L("div", Ml, [
|
|
670
|
+
(_(!0), L(le, null, oe(m.children, (k, v) => (_(), L("div", {
|
|
671
|
+
key: v,
|
|
672
|
+
class: "hzzt-kfb-menu-item",
|
|
673
|
+
onClick: (M) => a(k, m)
|
|
674
|
+
}, [
|
|
675
|
+
b("div", Sl, [
|
|
676
|
+
p(k.icon) ? (_(), P(o(_e), {
|
|
677
|
+
key: 0,
|
|
678
|
+
class: "margin-r-2",
|
|
679
|
+
size: 18
|
|
680
|
+
}, {
|
|
681
|
+
default: x(() => [
|
|
682
|
+
(_(), P(xe(k.icon)))
|
|
683
|
+
]),
|
|
684
|
+
_: 2
|
|
685
|
+
}, 1024)) : k.icon ? (_(), L("img", {
|
|
686
|
+
key: 1,
|
|
687
|
+
style: { width: "18px" },
|
|
688
|
+
class: "margin-r-2",
|
|
689
|
+
src: k.icon
|
|
690
|
+
}, null, 8, Hl)) : (_(), L("div", Pl)),
|
|
691
|
+
b("span", null, E(k.label), 1)
|
|
692
|
+
])
|
|
693
|
+
], 8, Il))), 128))
|
|
694
|
+
])) : A("", !0)
|
|
695
|
+
]))), 128))
|
|
696
|
+
], 4));
|
|
697
|
+
}
|
|
698
|
+
}), he = (u, e) => {
|
|
699
|
+
const n = u.__vccOpts || u;
|
|
700
|
+
for (const [t, y] of e)
|
|
701
|
+
n[t] = y;
|
|
702
|
+
return n;
|
|
703
|
+
}, Al = /* @__PURE__ */ he(Rl, [["__scopeId", "data-v-414722d0"]]), Nl = {
|
|
704
|
+
key: 0,
|
|
705
|
+
class: "hzzt-kfb-microscope"
|
|
706
|
+
}, Bl = /* @__PURE__ */ ee({
|
|
707
|
+
__name: "KfbMicroscope",
|
|
708
|
+
props: /* @__PURE__ */ ol({
|
|
709
|
+
shape: {},
|
|
710
|
+
width: {},
|
|
711
|
+
color: {},
|
|
712
|
+
borderWidth: {}
|
|
713
|
+
}, j({}, lt)),
|
|
714
|
+
setup(u, { expose: e }) {
|
|
715
|
+
const n = u, t = ot(j(j({}, lt), n));
|
|
716
|
+
ne(() => n, (l) => {
|
|
717
|
+
h({ name: "change", value: l });
|
|
718
|
+
});
|
|
719
|
+
const y = $("200px"), d = $(!1), c = B(() => ({
|
|
720
|
+
borderRadius: t.shape,
|
|
721
|
+
borderColor: t.color,
|
|
722
|
+
borderWidth: t.borderWidth + "px",
|
|
723
|
+
width: y.value,
|
|
724
|
+
height: y.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: p } = i.value.viewer.viewport.getCenter(!0);
|
|
742
|
+
l === "top" ? p -= 6e-3 : l === "bottom" ? p += 6e-3 : l === "left" ? a -= 6e-3 : l === "right" && (a += 6e-3), i.value.area.moveToLabel({ x: a, y: p });
|
|
743
|
+
}
|
|
744
|
+
function h({ name: l, value: a }) {
|
|
745
|
+
var r, s;
|
|
746
|
+
const p = (s = (r = i.value.$options) == null ? void 0 : r.pxConversion) == null ? void 0 : s.imageCapRes;
|
|
747
|
+
if (l === "visible") {
|
|
748
|
+
if (d.value = a, a) {
|
|
749
|
+
const m = i.value.area.imageToViewerElementRectangle(
|
|
750
|
+
{
|
|
751
|
+
x: 0,
|
|
752
|
+
y: 0,
|
|
753
|
+
width: t.width * 1e3 / p,
|
|
754
|
+
height: t.width * 1e3 / p
|
|
755
|
+
}
|
|
756
|
+
);
|
|
757
|
+
y.value = m.width + "px";
|
|
758
|
+
}
|
|
759
|
+
} else if (l === "change") {
|
|
760
|
+
Object.assign(t, a);
|
|
761
|
+
const m = i.value.area.imageToViewerElementRectangle(
|
|
762
|
+
{
|
|
763
|
+
x: 0,
|
|
764
|
+
y: 0,
|
|
765
|
+
width: t.width * 1e3 / p,
|
|
766
|
+
height: t.width * 1e3 / p
|
|
767
|
+
}
|
|
768
|
+
);
|
|
769
|
+
y.value = m.width + "px";
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
return e({
|
|
773
|
+
scopeChange: h
|
|
774
|
+
}), (l, a) => d.value ? (_(), L("div", Nl, [
|
|
775
|
+
b("div", {
|
|
776
|
+
class: "hzzt-kfb-microscope__container",
|
|
777
|
+
style: Z(c.value)
|
|
778
|
+
}, null, 4),
|
|
779
|
+
b("div", {
|
|
780
|
+
class: "hzzt-kfb-microscope__top",
|
|
781
|
+
onClick: a[0] || (a[0] = (p) => 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] = (p) => 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] = (p) => 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] = (p) => g("right"))
|
|
809
|
+
}, [
|
|
810
|
+
T(X, {
|
|
811
|
+
size: "24",
|
|
812
|
+
name: "arrowRight"
|
|
813
|
+
})
|
|
814
|
+
])
|
|
815
|
+
])) : A("", !0);
|
|
816
|
+
}
|
|
817
|
+
}), Dl = /* @__PURE__ */ he(Bl, [["__scopeId", "data-v-e8b36101"]]), Ul = { class: "hzzt-kfb-label flex column" }, Fl = { class: "hzzt-kfb-label__img flex justify-content-center" }, Kl = ["src"], jl = { class: "ellipsis flex-1" }, Ol = {
|
|
818
|
+
class: "flex margin-b-4",
|
|
819
|
+
style: { width: "100%" }
|
|
820
|
+
}, Gl = {
|
|
821
|
+
class: "flex margin overflow-hidden",
|
|
822
|
+
style: { height: "132px" }
|
|
823
|
+
}, Wl = ["src"], Zl = ["src"], ql = /* @__PURE__ */ ee({
|
|
824
|
+
__name: "KfbLabel",
|
|
825
|
+
props: {
|
|
826
|
+
info: {},
|
|
827
|
+
slide: {},
|
|
828
|
+
pathologyHandle: { type: Function }
|
|
829
|
+
},
|
|
830
|
+
emits: ["tool"],
|
|
831
|
+
setup(u, { emit: e }) {
|
|
832
|
+
const { t: n } = ie(), t = u, y = e, d = $(!0), c = $(!1), i = B(() => t.slide.pathology_id ? n("修改病理号") : n("绑定病理号"));
|
|
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), y("tool", "rotate", t.slide.angle);
|
|
835
|
+
}
|
|
836
|
+
function g() {
|
|
837
|
+
c.value = !0;
|
|
838
|
+
}
|
|
839
|
+
function h() {
|
|
840
|
+
t.pathologyHandle && t.pathologyHandle(t.slide).then(() => {
|
|
841
|
+
c.value = !1;
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
return (l, a) => (_(), L("div", Ul, [
|
|
845
|
+
$e(b("div", { class: "hzzt-kfb-label__title" }, E(o(n)(`点击标签旋转${l.pathologyHandle ? ",点击病理号重绑" : ""}`)), 513), [
|
|
846
|
+
[Pe, d.value]
|
|
847
|
+
]),
|
|
848
|
+
$e(b("div", Fl, [
|
|
849
|
+
b("img", {
|
|
850
|
+
src: l.info.labelImg,
|
|
851
|
+
style: Z({ transform: `rotate(${l.slide.angle}deg)` }),
|
|
852
|
+
onClick: f
|
|
853
|
+
}, null, 12, Kl)
|
|
854
|
+
], 512), [
|
|
855
|
+
[Pe, d.value]
|
|
856
|
+
]),
|
|
857
|
+
l.pathologyHandle ? $e((_(), 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", jl, E(l.slide.pathology_number), 1),
|
|
863
|
+
T(X, {
|
|
864
|
+
size: "14",
|
|
865
|
+
name: "annotate"
|
|
866
|
+
})
|
|
867
|
+
], 512)), [
|
|
868
|
+
[Pe, d.value]
|
|
869
|
+
]) : A("", !0),
|
|
870
|
+
b("span", {
|
|
871
|
+
onClick: a[0] || (a[0] = (p) => d.value = !d.value),
|
|
872
|
+
style: Z({
|
|
873
|
+
transform: `translateY(${d.value ? "-50%" : 0})`
|
|
874
|
+
}),
|
|
875
|
+
class: "hzzt-kfb-label__expend flex align-items-center justify-content-center"
|
|
876
|
+
}, [
|
|
877
|
+
d.value ? (_(), P(X, {
|
|
878
|
+
key: 0,
|
|
879
|
+
size: "10",
|
|
880
|
+
name: "arrowLeft"
|
|
881
|
+
})) : (_(), P(X, {
|
|
882
|
+
key: 1,
|
|
883
|
+
size: "10",
|
|
884
|
+
name: "arrowRight"
|
|
885
|
+
}))
|
|
886
|
+
], 4),
|
|
887
|
+
T(o(je), {
|
|
888
|
+
modelValue: c.value,
|
|
889
|
+
"onUpdate:modelValue": a[5] || (a[5] = (p) => c.value = p),
|
|
890
|
+
"append-to-body": !0,
|
|
891
|
+
title: i.value,
|
|
892
|
+
width: "450px"
|
|
893
|
+
}, {
|
|
894
|
+
footer: x(() => [
|
|
895
|
+
T(o(ge), {
|
|
896
|
+
onClick: a[4] || (a[4] = (p) => c.value = !1)
|
|
897
|
+
}, {
|
|
898
|
+
default: x(() => [
|
|
899
|
+
G(E(o(n)("取消")), 1)
|
|
900
|
+
]),
|
|
901
|
+
_: 1
|
|
902
|
+
}),
|
|
903
|
+
T(o(ge), {
|
|
904
|
+
type: "primary",
|
|
905
|
+
onClick: h
|
|
906
|
+
}, {
|
|
907
|
+
default: x(() => [
|
|
908
|
+
G(E(o(n)("确认")), 1)
|
|
909
|
+
]),
|
|
910
|
+
_: 1
|
|
911
|
+
})
|
|
912
|
+
]),
|
|
913
|
+
default: x(() => [
|
|
914
|
+
b("div", Ol, [
|
|
915
|
+
b("div", Gl, [
|
|
916
|
+
b("img", {
|
|
917
|
+
src: l.slide.labelImg
|
|
918
|
+
}, null, 8, Wl),
|
|
919
|
+
b("img", {
|
|
920
|
+
src: l.slide.previewImg
|
|
921
|
+
}, null, 8, Zl)
|
|
922
|
+
])
|
|
923
|
+
]),
|
|
924
|
+
T(o(tt), { class: "margin-t-2" }, {
|
|
925
|
+
default: x(() => [
|
|
926
|
+
T(o(se), {
|
|
927
|
+
label: o(n)("病理号")
|
|
928
|
+
}, {
|
|
929
|
+
default: x(() => [
|
|
930
|
+
T(o(et), {
|
|
931
|
+
modelValue: l.slide.pathology_number,
|
|
932
|
+
"onUpdate:modelValue": a[1] || (a[1] = (p) => l.slide.pathology_number = p),
|
|
933
|
+
placeholder: o(n)("输入病理号"),
|
|
934
|
+
clearable: ""
|
|
935
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
936
|
+
]),
|
|
937
|
+
_: 1
|
|
938
|
+
}, 8, ["label"]),
|
|
939
|
+
T(o(se), {
|
|
940
|
+
label: o(n)("蜡块号")
|
|
941
|
+
}, {
|
|
942
|
+
default: x(() => [
|
|
943
|
+
T(o(et), {
|
|
944
|
+
modelValue: l.slide.paraffin_block_number,
|
|
945
|
+
"onUpdate:modelValue": a[2] || (a[2] = (p) => l.slide.paraffin_block_number = p),
|
|
946
|
+
placeholder: o(n)("输入蜡块号"),
|
|
947
|
+
clearable: ""
|
|
948
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
949
|
+
]),
|
|
950
|
+
_: 1
|
|
951
|
+
}, 8, ["label"]),
|
|
952
|
+
l.slide.slide_id ? A("", !0) : (_(), P(o(se), {
|
|
953
|
+
key: 0,
|
|
954
|
+
label: o(n)("试剂")
|
|
955
|
+
}, {
|
|
956
|
+
default: x(() => [
|
|
957
|
+
T(o(et), {
|
|
958
|
+
modelValue: l.slide.reagent,
|
|
959
|
+
"onUpdate:modelValue": a[3] || (a[3] = (p) => l.slide.reagent = p),
|
|
960
|
+
placeholder: o(n)("输入试剂"),
|
|
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
|
+
}), Yl = /* @__PURE__ */ he(ql, [["__scopeId", "data-v-7397de48"]]);
|
|
975
|
+
function Xl(u, e) {
|
|
976
|
+
const n = $(1), t = $(null), y = $(null);
|
|
977
|
+
function d() {
|
|
978
|
+
u.value.viewer.addHandler("canvas-drag", (i) => {
|
|
979
|
+
t.value || (t.value = i.position);
|
|
980
|
+
}), u.value.viewer.addHandler("canvas-drag-end", (i) => {
|
|
981
|
+
if (n.value !== 1) {
|
|
982
|
+
y.value = i.position;
|
|
983
|
+
const f = u.value.viewer.viewport.containerSize.x, g = u.value.viewer.viewport.containerSize.y, h = (y.value.x - t.value.x) / (f * e.value) * (n.value - 1), l = (y.value.y - t.value.y) / (g * e.value) * (n.value - 1), a = u.value.viewer.viewport.getCenter(), p = new Te.Point(a.x - h, a.y - l);
|
|
984
|
+
u.value.viewer.viewport.panTo(p), t.value = null;
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
function c({ name: i, value: f }) {
|
|
989
|
+
i === "ratio" && (n.value = f / 1);
|
|
990
|
+
}
|
|
991
|
+
return {
|
|
992
|
+
moveEvent: d,
|
|
993
|
+
fastMove: c
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
function Ql(u, e, n, t, y) {
|
|
997
|
+
const d = $(void 0), c = $([]);
|
|
998
|
+
ne(() => u.aiLabelList, h);
|
|
999
|
+
function i() {
|
|
1000
|
+
n.value.$on(ce.events.EVENT_END_PAINTING, f("add")), n.value.$on(ce.events.EVENT_AREA_MOVE_END, f("move")), n.value.$on(ce.events.EVENT_ADD_POLYGON_POINT, f("add-point")), n.value.$on(ce.events.EVENT_DELETE_POLYGON_POINT, f("delete-point")), n.value.$on(ce.events.EVENT_DELETE_LABEL, f("delete")), n.value.$on(ce.events.EVENT_SELECT_LABEL, (r) => {
|
|
1001
|
+
d.value = r, p(), e("tool", "select-label", d.value);
|
|
1002
|
+
}), n.value.$on(ce.events.EVENT_CANCEL_SELECT_LABEL, () => {
|
|
1003
|
+
d.value = void 0, e("tool", "cancel-select-label", d.value);
|
|
1004
|
+
}), f("list")();
|
|
1005
|
+
}
|
|
1006
|
+
function f(r) {
|
|
1007
|
+
return (s) => g(r, s);
|
|
1008
|
+
}
|
|
1009
|
+
function g(r, s) {
|
|
1010
|
+
var m;
|
|
1011
|
+
if (r === "add" && s && ((s == null ? void 0 : s.subType) || ((m = s == null ? void 0 : s.__data__) == null ? void 0 : m.subType)) === "voice")
|
|
1012
|
+
t(s);
|
|
1013
|
+
else
|
|
1014
|
+
return u.labelHandle(r, u.slide, s).then((w) => {
|
|
1015
|
+
c.value = w, h();
|
|
1016
|
+
}).catch(() => {
|
|
1017
|
+
h();
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
function h() {
|
|
1021
|
+
var r;
|
|
1022
|
+
if ((r = n.value) != null && r.initLabelList) {
|
|
1023
|
+
const s = [...c.value, ...u.aiLabelList || []];
|
|
1024
|
+
s.find(({ id: m }) => {
|
|
1025
|
+
var w;
|
|
1026
|
+
return m === ((w = d.value) == null ? void 0 : w.id);
|
|
1027
|
+
}) || (d.value = void 0), n.value.initLabelList(s);
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
function l(r, s) {
|
|
1031
|
+
var w, k;
|
|
1032
|
+
d.value && (d.value.select = !1, d.value = void 0);
|
|
1033
|
+
const m = (n.value.labelList || []).findIndex((v) => v.id === r.id);
|
|
1034
|
+
if (m > -1) {
|
|
1035
|
+
d.value = (w = n.value.labelList) == null ? void 0 : w[m], d.value.select = !0;
|
|
1036
|
+
const v = n.value.area.getCenterPoint(r.region);
|
|
1037
|
+
n.value.area.moveToLabel(v), (k = n.value.viewer) != null && k.canvas && n.value.viewer.canvas.focus(), p();
|
|
1038
|
+
}
|
|
1039
|
+
s && y(s);
|
|
1040
|
+
}
|
|
1041
|
+
function a(r) {
|
|
1042
|
+
return u.labelHandle("add", u.slide, r).then((s) => {
|
|
1043
|
+
c.value = s, h();
|
|
1044
|
+
}).catch(() => {
|
|
1045
|
+
h();
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
function p() {
|
|
1049
|
+
var s, m, w, k;
|
|
1050
|
+
(((s = d.value) == null ? void 0 : s.subType) || ((w = (m = d.value) == null ? void 0 : m.__data__) == null ? void 0 : w.subType)) === "voice" && ((k = d.value) != null && k.src) && new Audio(d.value.src).play();
|
|
1051
|
+
}
|
|
1052
|
+
return {
|
|
1053
|
+
currentLabel: d,
|
|
1054
|
+
localLabelList: c,
|
|
1055
|
+
initLabel: i,
|
|
1056
|
+
jumpToLabel: l,
|
|
1057
|
+
reloadLabelList: h,
|
|
1058
|
+
eventHandel: f,
|
|
1059
|
+
addHandle: a
|
|
1060
|
+
};
|
|
1061
|
+
}
|
|
1062
|
+
function Jl() {
|
|
1063
|
+
function u(e, n) {
|
|
1064
|
+
e.save(), e.strokeStyle = "rgba(0,0,0,0)", e.miterLimit = 4, e.font = "15px", e.fillStyle = n, 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: u
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
function eo(u, e) {
|
|
1071
|
+
const { t: n } = ie(), t = $(!1), y = $();
|
|
1072
|
+
let d = null;
|
|
1073
|
+
const c = $(!1), i = $(0);
|
|
1074
|
+
let f = 0;
|
|
1075
|
+
const g = $([]), h = $(void 0);
|
|
1076
|
+
let l = !1;
|
|
1077
|
+
function a(v, M) {
|
|
1078
|
+
v.save(), v.strokeStyle = "rgba(0,0,0,0)", v.miterLimit = 4, v.font = "15px ''", v.fillStyle = M, v.font = " 15px ''", v.scale(0.03125, 0.03125), v.save(), v.font = " 15px ''", v.beginPath(), v.moveTo(515.041727, 670.617766), v.bezierCurveTo(606.625894, 670.617766, 681.137374, 596.113511, 681.137374, 504.52212), v.lineTo(681.137374, 229.350568), v.bezierCurveTo(681.137374, 137.76640100000003, 606.625894, 63.254920999999996, 515.041727, 63.254920999999996), v.bezierCurveTo(423.44311000000005, 63.254920999999996, 348.93885500000005, 137.766401, 348.93885600000004, 229.350568), v.lineTo(348.93885600000004, 504.52212), v.bezierCurveTo(348.93885600000004, 596.113512, 423.44311100000004, 670.617767, 515.041727, 670.617766), v.closePath(), v.fill(), v.stroke(), v.restore(), v.save(), v.font = " 15px ''", v.beginPath(), v.moveTo(801.643237, 874.001665), v.lineTo(558.391759, 874.001665), v.lineTo(558.391759, 828.578057), v.bezierCurveTo(719.899527, 807.264291, 844.993269, 668.7898399999999, 844.993269, 501.55986699999994), v.translate(801.643237, 501.55986699999994), v.rotate(0), v.arc(0, 0, 43.350032, 0, 3.141592653589793, !0), v.rotate(0), v.translate(-801.643237, -501.55986699999994), v.bezierCurveTo(758.2932050000001, 635.684865, 649.166725, 744.811345, 515.0345020000001, 744.811346), v.bezierCurveTo(380.9095040000001, 744.811346, 271.79024900000013, 635.6848659999999, 271.79024900000013, 501.55986699999994), v.translate(228.44021750000013, 501.5664510740879), v.rotate(0), v.arc(0, 0, 43.350032, -15188164315591997e-20, -3.1414407719461273, !0), v.rotate(0), v.translate(-228.44021750000013, -501.5664510740879), v.bezierCurveTo(185.09018600000013, 668.7898389999999, 310.1911530000001, 807.271516, 471.69169500000015, 828.578057), v.lineTo(471.69169500000015, 874.001665), v.lineTo(228.440217, 874.001665), v.translate(228.440217, 917.3516970000001), v.rotate(0), v.arc(0, 0, 43.350032, -1.5707963267948966, 1.5707963267948966, !0), v.rotate(0), v.translate(-228.440217, -917.3516970000001), v.lineTo(801.643237, 960.701729), v.translate(801.643237, 917.3516970000001), v.rotate(0), v.arc(0, 0, 43.350032, 1.5707963267948966, 4.71238898038469, !0), v.rotate(0), v.translate(-801.643237, -917.3516970000001), v.closePath(), v.fill(), v.stroke(), v.restore(), v.restore();
|
|
1079
|
+
}
|
|
1080
|
+
function p() {
|
|
1081
|
+
return Ce(this, null, function* () {
|
|
1082
|
+
try {
|
|
1083
|
+
y.value = yield navigator.mediaDevices.getUserMedia({ audio: !0 }), d = new MediaRecorder(y.value), g.value = [], d.addEventListener("dataavailable", (v) => {
|
|
1084
|
+
g.value.push(v.data);
|
|
1085
|
+
}), d.addEventListener("stop", () => Ce(this, null, function* () {
|
|
1086
|
+
if (h.value) {
|
|
1087
|
+
const v = new Blob(g.value, { type: u.audioType || "audio/wav" });
|
|
1088
|
+
h.value.src = URL.createObjectURL(v);
|
|
1089
|
+
}
|
|
1090
|
+
c.value = !1, l && (yield k());
|
|
1091
|
+
})), d.start(), c.value = !0, f = window.setInterval(() => {
|
|
1092
|
+
i.value++;
|
|
1093
|
+
}, 1e3);
|
|
1094
|
+
} catch (v) {
|
|
1095
|
+
kt.error(n("麦克风启用失败,请确认是否开启麦克风权限"));
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
function r() {
|
|
1100
|
+
y.value && d ? (d.stop(), y.value.getTracks().forEach((v) => v.stop()), d = null, y.value = void 0) : (d = null, y.value = void 0), c.value = !1, f && (clearInterval(f), f = 0), i.value = 0;
|
|
1101
|
+
}
|
|
1102
|
+
function s(v) {
|
|
1103
|
+
t.value = !0, h.value = v, g.value = [], l = !1;
|
|
1104
|
+
}
|
|
1105
|
+
function m() {
|
|
1106
|
+
c.value && r(), t.value = !1, c.value = !1, l = !1;
|
|
1107
|
+
}
|
|
1108
|
+
function w() {
|
|
1109
|
+
return Ce(this, null, function* () {
|
|
1110
|
+
if (!c.value && !g.value.length) {
|
|
1111
|
+
kt.error(n("请先录音"));
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
c.value && r(), c.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 (u.uploadHandle && h.value) {
|
|
1120
|
+
const v = Ct.service({
|
|
1121
|
+
text: n("录音上传中")
|
|
1122
|
+
}), M = new Blob(g.value, { type: u.audioType || "audio/wav" });
|
|
1123
|
+
g.value = [];
|
|
1124
|
+
try {
|
|
1125
|
+
yield u.uploadHandle(u.slide, h.value, M).then((R) => {
|
|
1126
|
+
h.value.src = R;
|
|
1127
|
+
}), v.close(), e(h.value);
|
|
1128
|
+
} catch (R) {
|
|
1129
|
+
v.close();
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
return {
|
|
1135
|
+
voiceVisible: t,
|
|
1136
|
+
voiceForm: h,
|
|
1137
|
+
recordTime: i,
|
|
1138
|
+
isRecording: c,
|
|
1139
|
+
drawVoice: a,
|
|
1140
|
+
startRecording: p,
|
|
1141
|
+
stopRecording: r,
|
|
1142
|
+
initVoice: s,
|
|
1143
|
+
cancelRecord: m,
|
|
1144
|
+
confirmRecord: w
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
function to(u, e) {
|
|
1148
|
+
const n = $([]), t = $(0), y = $(!1);
|
|
1149
|
+
let d = null;
|
|
1150
|
+
ne(() => {
|
|
1151
|
+
var a;
|
|
1152
|
+
return (a = u.hotmap) == null ? void 0 : a.enable;
|
|
1153
|
+
}, () => {
|
|
1154
|
+
var a, p;
|
|
1155
|
+
if ((p = (a = e.value) == null ? void 0 : a.viewer) != null && p.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 c(a, p, r) {
|
|
1166
|
+
var m, w, k, v, M, R;
|
|
1167
|
+
const s = me(j({}, p), {
|
|
1168
|
+
file: (m = u.hotmap) == null ? void 0 : m.file
|
|
1169
|
+
});
|
|
1170
|
+
if ((w = u.hotmap) != null && w.info) {
|
|
1171
|
+
if (r[p.x + "_" + p.y + "_" + Number(p.scale)]) {
|
|
1172
|
+
if (((k = u.hotmap) == null ? void 0 : k.type) === "switch")
|
|
1173
|
+
return u.tileHandle(s);
|
|
1174
|
+
if (((v = u.hotmap) == null ? void 0 : v.type) === "drag")
|
|
1175
|
+
return i(a, s), a;
|
|
1176
|
+
}
|
|
1177
|
+
} else return ((M = u.hotmap) == null ? void 0 : M.type) === "switch" ? u.tileHandle(s) : (((R = u.hotmap) == null ? void 0 : R.type) === "drag" && i(a, s), a);
|
|
1178
|
+
}
|
|
1179
|
+
function i(a, p) {
|
|
1180
|
+
const r = n.value.find((s) => s.url === a) || {
|
|
1181
|
+
url: a,
|
|
1182
|
+
x: p.x,
|
|
1183
|
+
y: p.y,
|
|
1184
|
+
img: void 0,
|
|
1185
|
+
load: ""
|
|
1186
|
+
};
|
|
1187
|
+
if (!(r != null && r.img) && (n.value.push(r), r.load !== "success")) {
|
|
1188
|
+
const s = new Image();
|
|
1189
|
+
s.src = u.tileHandle(p), s.onload = () => {
|
|
1190
|
+
r.load = "success";
|
|
1191
|
+
}, r.img = s;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
function f(a) {
|
|
1195
|
+
y.value && d && (t.value += a.x - d.x, t.value < 0 ? t.value = 0 : t.value > e.value.$options.width && (t.value = e.value.$options.width, y.value = !1), e.value.viewer.forceRedraw()), d = { x: a.x, y: a.y };
|
|
1196
|
+
}
|
|
1197
|
+
function g(a) {
|
|
1198
|
+
const { x: p, y: r } = a;
|
|
1199
|
+
y.value = !0, d = { x: p, y: r };
|
|
1200
|
+
}
|
|
1201
|
+
function h() {
|
|
1202
|
+
y.value = !1, d = null;
|
|
1203
|
+
}
|
|
1204
|
+
function l(a) {
|
|
1205
|
+
const {
|
|
1206
|
+
context: p,
|
|
1207
|
+
sourceWidth: r,
|
|
1208
|
+
sourceHeight: s,
|
|
1209
|
+
position: m,
|
|
1210
|
+
size: w,
|
|
1211
|
+
initRendered: k,
|
|
1212
|
+
tile: v,
|
|
1213
|
+
pixelDensityRatio: M
|
|
1214
|
+
} = a, R = v.getUrl(), S = t.value * M, Q = m.original.x;
|
|
1215
|
+
if (Q < S && Q + w.x > S) {
|
|
1216
|
+
const W = S - Q, ve = w.x - W, te = n.value.find((Se) => Se.url === R), be = (te == null ? void 0 : te.load) === "success" ? te.img : k.canvas;
|
|
1217
|
+
p.drawImage(
|
|
1218
|
+
be,
|
|
1219
|
+
0,
|
|
1220
|
+
0,
|
|
1221
|
+
r * W / w.x,
|
|
1222
|
+
s,
|
|
1223
|
+
m.x,
|
|
1224
|
+
m.y,
|
|
1225
|
+
W,
|
|
1226
|
+
w.y
|
|
1227
|
+
), p.drawImage(
|
|
1228
|
+
k.canvas,
|
|
1229
|
+
r * W / w.x,
|
|
1230
|
+
0,
|
|
1231
|
+
r * ve / w.x,
|
|
1232
|
+
s,
|
|
1233
|
+
m.x + W,
|
|
1234
|
+
m.y,
|
|
1235
|
+
ve,
|
|
1236
|
+
w.y
|
|
1237
|
+
);
|
|
1238
|
+
} else if (Q + w.x <= S) {
|
|
1239
|
+
const W = n.value.find((te) => te.url === R), ve = (W == null ? void 0 : W.load) === "success" ? W.img : k.canvas;
|
|
1240
|
+
p.drawImage(
|
|
1241
|
+
ve,
|
|
1242
|
+
0,
|
|
1243
|
+
0,
|
|
1244
|
+
r,
|
|
1245
|
+
s,
|
|
1246
|
+
m.x,
|
|
1247
|
+
m.y,
|
|
1248
|
+
w.x,
|
|
1249
|
+
w.y
|
|
1250
|
+
);
|
|
1251
|
+
} else Q >= S && p.drawImage(
|
|
1252
|
+
k.canvas,
|
|
1253
|
+
0,
|
|
1254
|
+
0,
|
|
1255
|
+
r,
|
|
1256
|
+
s,
|
|
1257
|
+
m.x,
|
|
1258
|
+
m.y,
|
|
1259
|
+
w.x,
|
|
1260
|
+
w.y
|
|
1261
|
+
);
|
|
1262
|
+
}
|
|
1263
|
+
return {
|
|
1264
|
+
getHotmapUrl: c,
|
|
1265
|
+
hotmapImgs: n,
|
|
1266
|
+
handlerImage: l,
|
|
1267
|
+
hotmapLine: t,
|
|
1268
|
+
lineMouseDown: g
|
|
1269
|
+
};
|
|
1270
|
+
}
|
|
1271
|
+
function lo(u, e, n) {
|
|
1272
|
+
const t = nl(), y = $(!1), d = new BroadcastChannel("sync_kfb_view");
|
|
1273
|
+
d.onmessage = (l) => {
|
|
1274
|
+
const a = l.data;
|
|
1275
|
+
g(a);
|
|
1276
|
+
}, pe(() => {
|
|
1277
|
+
var l, a, p;
|
|
1278
|
+
(l = n.value) == null || l.addEventListener("mouseenter", c), (a = n.value) == null || a.addEventListener("mousemove", c), (p = n.value) == null || p.addEventListener("mouseleave", i);
|
|
1279
|
+
}), Ie(() => {
|
|
1280
|
+
var l, a, p;
|
|
1281
|
+
(l = n.value) == null || l.removeEventListener("mouseenter", c), (a = n.value) == null || a.removeEventListener("mousemove", c), (p = n.value) == null || p.removeEventListener("mouseleave", i), d.close();
|
|
1282
|
+
});
|
|
1283
|
+
function c() {
|
|
1284
|
+
y.value = !0;
|
|
1285
|
+
}
|
|
1286
|
+
function i() {
|
|
1287
|
+
y.value = !1;
|
|
1288
|
+
}
|
|
1289
|
+
function f() {
|
|
1290
|
+
let l;
|
|
1291
|
+
e.value.viewer.addHandler("pan", (a) => {
|
|
1292
|
+
var s, m, w, k;
|
|
1293
|
+
if (!l) {
|
|
1294
|
+
l = (m = (s = a.center) == null ? void 0 : s.clone) == null ? void 0 : m.call(s);
|
|
1295
|
+
return;
|
|
1296
|
+
}
|
|
1297
|
+
const p = a.center, r = (w = p == null ? void 0 : p.minus) == null ? void 0 : w.call(p, l);
|
|
1298
|
+
l = (k = p == null ? void 0 : p.clone) == null ? void 0 : k.call(p), u.syncPosition && h({
|
|
1299
|
+
position: r,
|
|
1300
|
+
type: "sync_position"
|
|
1301
|
+
});
|
|
1302
|
+
}), e.value.viewer.addHandler("zoom", (a) => {
|
|
1303
|
+
u.syncZoom && h({
|
|
1304
|
+
zoom: a.zoom,
|
|
1305
|
+
type: "sync_zoom"
|
|
1306
|
+
});
|
|
1307
|
+
}), e.value.viewer.addHandler("animation-finish", () => {
|
|
1308
|
+
var r;
|
|
1309
|
+
if (u.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), p = (r = a == null ? void 0 : a.minus) == null ? void 0 : r.call(a, l);
|
|
1315
|
+
l = void 0, u.syncPosition && h({
|
|
1316
|
+
position: p,
|
|
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
|
+
y.value && d.postMessage(me(j({}, l), {
|
|
1327
|
+
uuid: t == null ? void 0 : t.uid,
|
|
1328
|
+
fileName: (a = u.slide) == null ? void 0 : a.file
|
|
1329
|
+
}));
|
|
1330
|
+
}
|
|
1331
|
+
return {
|
|
1332
|
+
initSync: f
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
const oo = { class: "hzzt-kfb-keyword flex wrap" }, no = ["onMouseenter"], ao = /* @__PURE__ */ ee({
|
|
1336
|
+
__name: "KfbKeyword",
|
|
1337
|
+
setup(u) {
|
|
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
|
+
]), n = J("kfbView", $({}));
|
|
1346
|
+
let t = null;
|
|
1347
|
+
function y(c, i) {
|
|
1348
|
+
c.preventDefault(), t && clearTimeout(t), t = setInterval(() => {
|
|
1349
|
+
i === "E" && (n.value.viewer.viewport.zoomBy(1.1), n.value.viewer.viewport.applyConstraints()), i === "Q" && (n.value.viewer.viewport.zoomBy(0.9), n.value.viewer.viewport.applyConstraints()), i === "W" && (n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new Te.Point(0, -40))), n.value.viewer.viewport.applyConstraints()), i === "S" && (n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new Te.Point(0, 40))), n.value.viewer.viewport.applyConstraints()), i === "A" && (n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new Te.Point(-40, 0))), n.value.viewer.viewport.applyConstraints()), i === "D" && (n.value.viewer.viewport.panBy(n.value.viewer.viewport.deltaPointsFromPixels(new Te.Point(40, 0))), n.value.viewer.viewport.applyConstraints());
|
|
1350
|
+
}, 120);
|
|
1351
|
+
}
|
|
1352
|
+
function d() {
|
|
1353
|
+
t && (clearInterval(t), t = null);
|
|
1354
|
+
}
|
|
1355
|
+
return Ie(() => {
|
|
1356
|
+
clearTimeout(t);
|
|
1357
|
+
}), (c, i) => (_(), L("div", oo, [
|
|
1358
|
+
(_(!0), L(le, null, oe(e.value, (f) => (_(), L("div", {
|
|
1359
|
+
key: f.code,
|
|
1360
|
+
class: "hzzt-kfb-keyword__code flex column align-items-center justify-content-center",
|
|
1361
|
+
onMouseenter: (g) => y(g, f.code),
|
|
1362
|
+
onMouseleave: d
|
|
1363
|
+
}, [
|
|
1364
|
+
b("p", null, E(f.code), 1),
|
|
1365
|
+
T(X, {
|
|
1366
|
+
size: "14",
|
|
1367
|
+
name: f.icon
|
|
1368
|
+
}, null, 8, ["name"])
|
|
1369
|
+
], 40, no))), 128))
|
|
1370
|
+
]));
|
|
1371
|
+
}
|
|
1372
|
+
}), so = /* @__PURE__ */ he(ao, [["__scopeId", "data-v-c8d940f0"]]);
|
|
1373
|
+
function io(u, e, n = {}) {
|
|
1374
|
+
const {
|
|
1375
|
+
panSensitivity: t = 0.2,
|
|
1376
|
+
// 值越大,鼠标移动时图像移动越快
|
|
1377
|
+
zoomSensitivity: y = 1.1,
|
|
1378
|
+
// 值越大,滚轮缩放幅度越大
|
|
1379
|
+
damping: d = 0.6,
|
|
1380
|
+
// 值越大,惯性滑动时间越长
|
|
1381
|
+
minThreshold: c = 0.05
|
|
1382
|
+
// 值越小,停止移动时的精度越高
|
|
1383
|
+
} = n;
|
|
1384
|
+
let i = !1, f = null, g = 0, h = 0, l = !1;
|
|
1385
|
+
const a = () => {
|
|
1386
|
+
i = document.pointerLockElement === e.value, i || p();
|
|
1387
|
+
}, p = () => {
|
|
1388
|
+
g = 0, h = 0, f && (cancelAnimationFrame(f), f = null), l = !1;
|
|
1389
|
+
}, r = (v) => Ce(this, null, function* () {
|
|
1390
|
+
try {
|
|
1391
|
+
v.key === "l" && e.value && (document.pointerLockElement ? (document.exitPointerLock(), console.log("鼠标已解锁!")) : (yield e.value.requestPointerLock(), console.log("鼠标已锁定!")));
|
|
1392
|
+
} catch (M) {
|
|
1393
|
+
console.error("无法锁定鼠标:", M);
|
|
1394
|
+
}
|
|
1395
|
+
}), s = (v) => {
|
|
1396
|
+
if (i) {
|
|
1397
|
+
v.preventDefault();
|
|
1398
|
+
const M = Math.pow(y, Math.sign(v.deltaY) * -1);
|
|
1399
|
+
u.value.viewer.viewport.zoomBy(M), u.value.viewer.viewport.applyConstraints();
|
|
1400
|
+
}
|
|
1401
|
+
}, m = (v) => {
|
|
1402
|
+
i && (g += v.movementX * t, h += v.movementY * t, !l && (Math.abs(g) > 1 || Math.abs(h) > 1) && (l = !0, f = requestAnimationFrame(w)));
|
|
1403
|
+
}, w = () => {
|
|
1404
|
+
const v = u.value.viewer.viewport;
|
|
1405
|
+
if (Math.abs(g) > c || Math.abs(h) > c) {
|
|
1406
|
+
const M = v.deltaPointsFromPixels(
|
|
1407
|
+
new Te.Point(g, h)
|
|
1408
|
+
);
|
|
1409
|
+
v.panBy(M), v.applyConstraints();
|
|
1410
|
+
}
|
|
1411
|
+
g *= d, h *= d, Math.abs(g) > c || Math.abs(h) > c ? f = requestAnimationFrame(w) : p();
|
|
1412
|
+
}, k = () => {
|
|
1413
|
+
i && document.exitPointerLock();
|
|
1414
|
+
};
|
|
1415
|
+
return pe(() => {
|
|
1416
|
+
var v;
|
|
1417
|
+
(v = e.value) == null || v.addEventListener("keydown", r), document.addEventListener("wheel", s, { passive: !1 }), document.addEventListener("click", k), document.addEventListener("mousemove", m), document.addEventListener("pointerlockchange", a);
|
|
1418
|
+
}), Ie(() => {
|
|
1419
|
+
var v;
|
|
1420
|
+
(v = e.value) == null || v.removeEventListener("keydown", r), document.removeEventListener("click", k), document.removeEventListener("wheel", s), document.removeEventListener("mousemove", m), document.removeEventListener("pointerlockchange", a), p();
|
|
1421
|
+
}), {
|
|
1422
|
+
setConfig: (v) => {
|
|
1423
|
+
Object.assign(n, v);
|
|
1424
|
+
}
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1427
|
+
const ro = /* @__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(u) {
|
|
1439
|
+
const e = u, n = Ee(u, "model-value"), t = J("kfbView", $({})), y = B(() => Array.from(new Array(e.slides.length + 1)).map((c, i) => i));
|
|
1440
|
+
function d() {
|
|
1441
|
+
const c = t.value.viewer.world.getItemAt(0), i = Object.keys(c.tilesMatrix);
|
|
1442
|
+
i.forEach((f, g) => {
|
|
1443
|
+
g > i.length - 4 && (c.tilesMatrix[f] = {});
|
|
1444
|
+
}), c.draw();
|
|
1445
|
+
}
|
|
1446
|
+
return (c, i) => (_(), L("div", {
|
|
1447
|
+
class: ye(["hzzt-kfb-level flex column align-items-center", c.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(o(il), {
|
|
1455
|
+
modelValue: n.value,
|
|
1456
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => n.value = f),
|
|
1457
|
+
vertical: "",
|
|
1458
|
+
min: y.value[0],
|
|
1459
|
+
step: 1,
|
|
1460
|
+
max: y.value[y.value.length - 1],
|
|
1461
|
+
"show-stops": "",
|
|
1462
|
+
"show-tooltip": !0,
|
|
1463
|
+
placement: "left",
|
|
1464
|
+
height: c.slides.length > 5 ? "180px" : "130px",
|
|
1465
|
+
onInput: d
|
|
1466
|
+
}, null, 8, ["modelValue", "min", "max", "height"])
|
|
1467
|
+
], 2));
|
|
1468
|
+
}
|
|
1469
|
+
}), uo = {
|
|
1470
|
+
key: 0,
|
|
1471
|
+
class: "flex hzzt-kfb-channel"
|
|
1472
|
+
}, co = ["onClick"], vo = /* @__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(u, { emit: e }) {
|
|
1484
|
+
const n = u, t = e, y = Ee(u, "model-value"), d = [
|
|
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
|
+
], c = B(() => {
|
|
1493
|
+
var f;
|
|
1494
|
+
return (((f = n.info) == null ? void 0 : f.channel) || []).map((g) => {
|
|
1495
|
+
const h = d.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
|
+
y.value.includes(f) ? y.value = y.value.filter((g) => g !== f) : y.value.push(f), t("load");
|
|
1504
|
+
}
|
|
1505
|
+
return (f, g) => c.value.length > 0 ? (_(), L("div", uo, [
|
|
1506
|
+
T(X, {
|
|
1507
|
+
name: "channel",
|
|
1508
|
+
size: "32"
|
|
1509
|
+
}),
|
|
1510
|
+
(_(!0), L(le, null, oe(c.value, (h) => (_(), L("div", {
|
|
1511
|
+
key: h.label,
|
|
1512
|
+
style: Z({ background: h.color }),
|
|
1513
|
+
class: ye(["hzzt-kfb-channel__box", y.value.includes(h.label) ? "" : "hzzt-kfb-channel__box--unactive"]),
|
|
1514
|
+
onClick: (l) => i(h.label)
|
|
1515
|
+
}, E(h.label), 15, co))), 128))
|
|
1516
|
+
])) : A("", !0);
|
|
1517
|
+
}
|
|
1518
|
+
}), fo = { class: "flex align-items-center justify-content-between" }, mo = { class: "hzzt-kfb-title" }, po = { class: "hzzt-kfb-annotation__container flex-1" }, ho = ["onClick"], go = /* @__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(u, { emit: e }) {
|
|
1529
|
+
const n = Ee(u, "expand"), t = e, { t: y } = ie();
|
|
1530
|
+
function d(i) {
|
|
1531
|
+
const f = i.subType || i.tool || "";
|
|
1532
|
+
return `mark${f.substring(0, 1).toLocaleUpperCase()}${f.substring(1)}`;
|
|
1533
|
+
}
|
|
1534
|
+
function c(i) {
|
|
1535
|
+
t("select", i);
|
|
1536
|
+
}
|
|
1537
|
+
return (i, f) => (_(), L("div", {
|
|
1538
|
+
class: ye(["hzzt-kfb-annotation flex column", n.value ? "hzzt-kfb-annotation--expand" : ""])
|
|
1539
|
+
}, [
|
|
1540
|
+
b("div", fo, [
|
|
1541
|
+
$e(b("div", mo, [
|
|
1542
|
+
b("span", null, E(o(y)("标注列表")), 1)
|
|
1543
|
+
], 512), [
|
|
1544
|
+
[Pe, n.value]
|
|
1545
|
+
]),
|
|
1546
|
+
T(X, {
|
|
1547
|
+
class: "hzzt-kfb-annotation__icon",
|
|
1548
|
+
name: n.value ? "expandLeft" : "expandRight",
|
|
1549
|
+
onClick: f[0] || (f[0] = (g) => n.value = !n.value)
|
|
1550
|
+
}, null, 8, ["name"])
|
|
1551
|
+
]),
|
|
1552
|
+
$e(b("div", po, [
|
|
1553
|
+
(_(!0), L(le, null, oe(i.annotations, (g, h) => {
|
|
1554
|
+
var l;
|
|
1555
|
+
return _(), 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) => c(g)
|
|
1559
|
+
}, [
|
|
1560
|
+
T(X, {
|
|
1561
|
+
size: "16",
|
|
1562
|
+
name: d(g)
|
|
1563
|
+
}, null, 8, ["name"]),
|
|
1564
|
+
b("span", null, E(o(y)("标注")) + E(h + 1), 1)
|
|
1565
|
+
], 10, ho);
|
|
1566
|
+
}), 128))
|
|
1567
|
+
], 512), [
|
|
1568
|
+
[Pe, n.value]
|
|
1569
|
+
])
|
|
1570
|
+
], 2));
|
|
1571
|
+
}
|
|
1572
|
+
}), wo = /* @__PURE__ */ he(go, [["__scopeId", "data-v-bfc56a3e"]]);
|
|
1573
|
+
function Lt(u) {
|
|
1574
|
+
const { t: e } = ie();
|
|
1575
|
+
return B(() => {
|
|
1576
|
+
var y, d;
|
|
1577
|
+
const t = ((d = (y = u == null ? void 0 : u.slide) == null ? void 0 : y.analysis) == null ? void 0 : d.result) || "";
|
|
1578
|
+
return t.indexOf("疑似阳性") > -1 ? {
|
|
1579
|
+
type: "warning",
|
|
1580
|
+
name: t
|
|
1581
|
+
} : t.indexOf("阳性") > -1 ? {
|
|
1582
|
+
type: "danger",
|
|
1583
|
+
name: t
|
|
1584
|
+
} : t.indexOf("阴性") > -1 ? {
|
|
1585
|
+
type: "success",
|
|
1586
|
+
name: t
|
|
1587
|
+
} : t.indexOf("不合格") > -1 ? {
|
|
1588
|
+
type: "danger",
|
|
1589
|
+
name: t
|
|
1590
|
+
} : t.indexOf("合格") > -1 ? {
|
|
1591
|
+
type: "success",
|
|
1592
|
+
name: t
|
|
1593
|
+
} : {
|
|
1594
|
+
type: "info",
|
|
1595
|
+
name: t || e("未知")
|
|
1596
|
+
};
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1599
|
+
const yo = ["element-loading-text"], _o = {
|
|
1600
|
+
key: 1,
|
|
1601
|
+
class: "hzzt-kfb-view__main flex align-items-center justify-content-center"
|
|
1602
|
+
}, bo = {
|
|
1603
|
+
class: "hzzt-kfb-view__filter",
|
|
1604
|
+
height: "0",
|
|
1605
|
+
width: "0"
|
|
1606
|
+
}, ko = { id: "colorMatrixFilter" }, zo = ["values"], Co = ["values"], To = ["exponent"], $o = ["exponent"], Lo = ["exponent"], xo = { class: "flex nowrap justify-content-center overflow-hidden" }, Eo = ["src"], Vo = ["src"], Mo = { class: "flex-1" }, Io = { class: "flex-1" }, So = { class: "flex-1" }, Ho = { class: "flex-1" }, Po = { class: "flex-1" }, Ro = { class: "flex-1" }, Ao = ["src"], No = {
|
|
1607
|
+
key: 2,
|
|
1608
|
+
class: "margin-l-2"
|
|
1609
|
+
}, Me = /* @__PURE__ */ ee({
|
|
1610
|
+
name: "HzztKfbView",
|
|
1611
|
+
__name: "index",
|
|
1612
|
+
props: {
|
|
1613
|
+
slide: {},
|
|
1614
|
+
fileHandle: {},
|
|
1615
|
+
labelHandle: {},
|
|
1616
|
+
tileHandle: {},
|
|
1617
|
+
navigatorHandle: {},
|
|
1618
|
+
pathologyHandle: {},
|
|
1619
|
+
uploadHandle: {},
|
|
1620
|
+
options: {},
|
|
1621
|
+
labelDrawing: {},
|
|
1622
|
+
process: { default: () => j({}, $t) },
|
|
1623
|
+
microscope: { default: () => j({}, lt) },
|
|
1624
|
+
menus: {},
|
|
1625
|
+
aiLabelList: {},
|
|
1626
|
+
hotmap: {},
|
|
1627
|
+
syncPosition: { type: Boolean },
|
|
1628
|
+
syncZoom: { type: Boolean },
|
|
1629
|
+
audioType: {}
|
|
1630
|
+
},
|
|
1631
|
+
emits: ["tool"],
|
|
1632
|
+
setup(u, { expose: e, emit: n }) {
|
|
1633
|
+
const t = u, y = n, { t: d, locale: c } = ie(), i = $(), f = $(), g = $(), h = $(!1), l = $({}), a = $(!1), p = $(0), r = $(0), s = $(0), m = $([]), w = $({
|
|
1634
|
+
width: 0,
|
|
1635
|
+
height: 0,
|
|
1636
|
+
fileNum: 0,
|
|
1637
|
+
scanScale: 1,
|
|
1638
|
+
fileName: "",
|
|
1639
|
+
ratiomap: {}
|
|
1640
|
+
}), k = J("show-kfb-label", $(!0)), v = J("show-keyboard", $(!1)), M = J("hidden-all-label", $(!1)), R = $(!1), S = Ct.directive;
|
|
1641
|
+
ne(() => {
|
|
1642
|
+
var z;
|
|
1643
|
+
return (z = t.slide) == null ? void 0 : z.file;
|
|
1644
|
+
}, () => {
|
|
1645
|
+
jt(), setTimeout(() => {
|
|
1646
|
+
it();
|
|
1647
|
+
}, 100);
|
|
1648
|
+
}), pe(() => {
|
|
1649
|
+
it();
|
|
1650
|
+
});
|
|
1651
|
+
const Q = Lt(t), {
|
|
1652
|
+
imageProcess: W,
|
|
1653
|
+
matrixValues: ve,
|
|
1654
|
+
saturateValues: te,
|
|
1655
|
+
forceRedraw: be
|
|
1656
|
+
} = $l(t), {
|
|
1657
|
+
tailorEvent: Se,
|
|
1658
|
+
shotScreen: Ae
|
|
1659
|
+
} = Ll(y, l), {
|
|
1660
|
+
moveEvent: Ze,
|
|
1661
|
+
fastMove: qe
|
|
1662
|
+
} = Xl(l, r), { initSync: Ye } = lo(t, l, i);
|
|
1663
|
+
io(l, i);
|
|
1664
|
+
const { drawDot: Xe } = Jl(), {
|
|
1665
|
+
voiceVisible: C,
|
|
1666
|
+
voiceForm: N,
|
|
1667
|
+
drawVoice: F,
|
|
1668
|
+
recordTime: re,
|
|
1669
|
+
isRecording: ke,
|
|
1670
|
+
startRecording: xt,
|
|
1671
|
+
stopRecording: Et,
|
|
1672
|
+
initVoice: Vt,
|
|
1673
|
+
cancelRecord: Mt,
|
|
1674
|
+
confirmRecord: It
|
|
1675
|
+
} = eo(t, At), {
|
|
1676
|
+
currentLabel: Qe,
|
|
1677
|
+
localLabelList: nt,
|
|
1678
|
+
initLabel: St,
|
|
1679
|
+
jumpToLabel: at,
|
|
1680
|
+
reloadLabelList: Ht,
|
|
1681
|
+
eventHandel: Pt,
|
|
1682
|
+
addHandle: Rt
|
|
1683
|
+
} = Ql(t, y, l, Vt, Je);
|
|
1684
|
+
function At(z) {
|
|
1685
|
+
Rt(z);
|
|
1686
|
+
}
|
|
1687
|
+
const {
|
|
1688
|
+
getHotmapUrl: Nt,
|
|
1689
|
+
handlerImage: Bt,
|
|
1690
|
+
hotmapLine: Dt,
|
|
1691
|
+
lineMouseDown: st,
|
|
1692
|
+
hotmapImgs: Ut
|
|
1693
|
+
} = to(t, l);
|
|
1694
|
+
function it() {
|
|
1695
|
+
var z;
|
|
1696
|
+
(z = t.slide) != null && z.file && t.fileHandle && (a.value || (a.value = !0, t.fileHandle(t.slide).then((I) => {
|
|
1697
|
+
var q, ae, fe, K;
|
|
1698
|
+
w.value = I, m.value = (((q = w.value) == null ? void 0 : q.channel) || []).map((U) => U.eqt_num), l.value = new ce(j({
|
|
1699
|
+
el: f.value,
|
|
1700
|
+
fileName: (ae = t.slide) == null ? void 0 : ae.file,
|
|
1701
|
+
scale: w.value.scanScale,
|
|
1702
|
+
lang: (c == null ? void 0 : c.value) === "en-US" ? "en" : c == null ? void 0 : c.value,
|
|
1703
|
+
navigator: {
|
|
1704
|
+
style: "left: 0;bottom: 0",
|
|
1705
|
+
thumbnail: w.value.thumbnailImg,
|
|
1706
|
+
width: 200,
|
|
1707
|
+
height: 180
|
|
1708
|
+
},
|
|
1709
|
+
grid: {
|
|
1710
|
+
show: !1,
|
|
1711
|
+
ruler: !1,
|
|
1712
|
+
pxConversion: !0
|
|
1713
|
+
},
|
|
1714
|
+
thumb: {
|
|
1715
|
+
bgColor: "rgba(0,0,0,0)"
|
|
1716
|
+
},
|
|
1717
|
+
graduation: {
|
|
1718
|
+
show: !0,
|
|
1719
|
+
right: 120,
|
|
1720
|
+
bottom: (K = (fe = w.value) == null ? void 0 : fe.channel) != null && K.length ? 120 : 30,
|
|
1721
|
+
tick: {
|
|
1722
|
+
number: 3,
|
|
1723
|
+
height: 8
|
|
1724
|
+
}
|
|
1725
|
+
},
|
|
1726
|
+
pxConversion: {
|
|
1727
|
+
units: ["um", "mm"],
|
|
1728
|
+
binary: 1e3,
|
|
1729
|
+
imageCapRes: w.value.imageCapRes || w.value.scanResolution || 1
|
|
1730
|
+
},
|
|
1731
|
+
openSeadragonOptions: {
|
|
1732
|
+
maxZoomLevel: w.value.scanScale * 20,
|
|
1733
|
+
pixelsPerArrowPress: 200,
|
|
1734
|
+
animationTime: 0,
|
|
1735
|
+
tileSources: rt()
|
|
1736
|
+
},
|
|
1737
|
+
tileDrawing: Bt,
|
|
1738
|
+
label: {
|
|
1739
|
+
drawing: (U, D, ze) => {
|
|
1740
|
+
var Ne;
|
|
1741
|
+
if (D != null && D.custom) {
|
|
1742
|
+
const Y = U.getContext("2d");
|
|
1743
|
+
Y.save(), Y.beginPath();
|
|
1744
|
+
const He = (D == null ? void 0 : D.subType) || ((Ne = D == null ? void 0 : D.__data__) == null ? void 0 : Ne.subType);
|
|
1745
|
+
He === "count" ? (Y.translate(ze.x - 14, ze.y - 22), Xe(Y, (D == null ? void 0 : D.strokeStyle) || "")) : He === "voice" ? (Y.translate(ze.x - 16, ze.y - 18), F(Y, (D == null ? void 0 : D.strokeStyle) || "")) : t.labelDrawing && t.labelDrawing(Y, D), Y.restore();
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
}, t.options || {})), l.value.viewer.drawer.canvas.style.filter = "url(#colorMatrixFilter)", St(), Kt(), Ye();
|
|
1750
|
+
}).finally(() => {
|
|
1751
|
+
a.value = !1, M.value && (vt({
|
|
1752
|
+
show: !1,
|
|
1753
|
+
ruler: !1
|
|
1754
|
+
}), ft({
|
|
1755
|
+
show: !1
|
|
1756
|
+
}), setTimeout(() => {
|
|
1757
|
+
mt(!1);
|
|
1758
|
+
}, 100));
|
|
1759
|
+
})));
|
|
1760
|
+
}
|
|
1761
|
+
function Ft() {
|
|
1762
|
+
const z = l.value.viewer;
|
|
1763
|
+
if (z.world) {
|
|
1764
|
+
const I = z.world.getItemAt(0), q = z.viewport.getZoom(), ae = z.viewport.getCenter();
|
|
1765
|
+
z.world.removeItem(I), z.addTiledImage({
|
|
1766
|
+
tileSource: rt(),
|
|
1767
|
+
success: function() {
|
|
1768
|
+
z.viewport.zoomTo(q), z.viewport.panTo(ae);
|
|
1769
|
+
}
|
|
1770
|
+
});
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
function rt() {
|
|
1774
|
+
var fe, K;
|
|
1775
|
+
const z = w.value.tileWidth || w.value.imageBlockLen || 256, I = w.value.tileHeight || w.value.imageBlockLen || 256, q = {};
|
|
1776
|
+
(fe = t.hotmap) != null && fe.enable && (((K = t.hotmap) == null ? void 0 : K.info) || []).forEach((U) => {
|
|
1777
|
+
q[U[0] / z + "_" + U[1] / I + "_" + U[2]] = !0;
|
|
1778
|
+
});
|
|
1779
|
+
let ae = 10;
|
|
1780
|
+
return Object.keys(w.value.ratiomap).forEach((U) => {
|
|
1781
|
+
const D = w.value.fileNum - Math.sqrt(w.value.scanScale / Number(U));
|
|
1782
|
+
D > 0 && (ae = ae ? Math.min(ae, D) : D);
|
|
1783
|
+
}), {
|
|
1784
|
+
height: w.value.height,
|
|
1785
|
+
width: w.value.width,
|
|
1786
|
+
tileWidth: z,
|
|
1787
|
+
tileHeight: I,
|
|
1788
|
+
minLevel: Math.floor(ae || 8),
|
|
1789
|
+
getTileUrl: (U, D, ze) => {
|
|
1790
|
+
var pt, ht, gt, wt;
|
|
1791
|
+
const Ne = U, Y = {
|
|
1792
|
+
file: ((pt = t.slide) == null ? void 0 : pt.file) || "",
|
|
1793
|
+
x: D,
|
|
1794
|
+
y: ze,
|
|
1795
|
+
scale: "0",
|
|
1796
|
+
level: U,
|
|
1797
|
+
channel: JSON.stringify(m.value)
|
|
1798
|
+
};
|
|
1799
|
+
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]) || "";
|
|
1800
|
+
const He = t.tileHandle(Y);
|
|
1801
|
+
return (wt = t.hotmap) != null && wt.enable ? Nt(He, Y, q) : He;
|
|
1802
|
+
}
|
|
1803
|
+
};
|
|
1804
|
+
}
|
|
1805
|
+
function Kt() {
|
|
1806
|
+
l.value.viewer.addHandler("rotate", (z) => {
|
|
1807
|
+
p.value = z.degrees || 0;
|
|
1808
|
+
}), l.value.viewer.addHandler("zoom", (z) => {
|
|
1809
|
+
const I = l.value.viewer.viewport.viewportToImageZoom(
|
|
1810
|
+
z.zoom || 0
|
|
1811
|
+
) * Number(l.value.$options.scale);
|
|
1812
|
+
r.value = Number(I.toFixed(2));
|
|
1813
|
+
}), l.value.$on(ce.events.EVENT_NAVIGATOR_VESTIGE, (z) => {
|
|
1814
|
+
t.navigatorHandle && t.navigatorHandle("add", t.slide, z);
|
|
1815
|
+
}), t.navigatorHandle && t.navigatorHandle("list", t.slide).then((z) => {
|
|
1816
|
+
var I, q;
|
|
1817
|
+
(q = (I = l.value.navigator) == null ? void 0 : I.drawPointList) == null || q.call(I, z);
|
|
1818
|
+
}), Se(), Ze();
|
|
1819
|
+
}
|
|
1820
|
+
function jt() {
|
|
1821
|
+
var z;
|
|
1822
|
+
(z = l.value) != null && z.destroy && (l.value.destroy(), l.value = {}, w.value = {
|
|
1823
|
+
width: 0,
|
|
1824
|
+
height: 0,
|
|
1825
|
+
fileNum: 0,
|
|
1826
|
+
scanScale: 1,
|
|
1827
|
+
fileName: "",
|
|
1828
|
+
ratiomap: {}
|
|
1829
|
+
}, Ut.value = [], m.value = [], r.value = 0, p.value = 0, s.value = 0);
|
|
1830
|
+
}
|
|
1831
|
+
function ut(z, I) {
|
|
1832
|
+
z === "annotate" ? ct(I) : z === "tailor" ? Ae(I) : z === "info" ? h.value = !0 : z === "flip" ? dt() : z === "delete" ? Pt("delete")(Qe.value) : y("tool", z, I);
|
|
1833
|
+
}
|
|
1834
|
+
function ct(z) {
|
|
1835
|
+
z.tool === "Voice" && (z.subType = "voice", z.tool = "Dot", z.custom = !0), l.value.board.startDraw(z);
|
|
1836
|
+
}
|
|
1837
|
+
function Ot() {
|
|
1838
|
+
l.value.board.endDraw();
|
|
1839
|
+
}
|
|
1840
|
+
function dt() {
|
|
1841
|
+
l.value.viewer.viewport.toggleFlip();
|
|
1842
|
+
}
|
|
1843
|
+
function Gt(z) {
|
|
1844
|
+
var I, q;
|
|
1845
|
+
(q = (I = g.value) == null ? void 0 : I.scopeChange) == null || q.call(I, z);
|
|
1846
|
+
}
|
|
1847
|
+
function Wt() {
|
|
1848
|
+
h.value = !0;
|
|
1849
|
+
}
|
|
1850
|
+
function vt(z) {
|
|
1851
|
+
l.value.grid.updated(z);
|
|
1852
|
+
}
|
|
1853
|
+
function ft(z) {
|
|
1854
|
+
l.value.graduation.updated(z);
|
|
1855
|
+
}
|
|
1856
|
+
function mt(z) {
|
|
1857
|
+
l.value.navigator.element.style.display = z ? "flex" : "none";
|
|
1858
|
+
}
|
|
1859
|
+
function Je(z) {
|
|
1860
|
+
const I = l.value.viewer.viewport.imageToViewportZoom(Number(z / l.value.$options.scale));
|
|
1861
|
+
l.value.viewer.viewport.zoomTo(I);
|
|
1862
|
+
}
|
|
1863
|
+
function Zt(z, I) {
|
|
1864
|
+
l.value.area && (l.value.area.moveToLabel(l.value.viewer.viewport.imageToViewportCoordinates(
|
|
1865
|
+
z.x + z.width / 2,
|
|
1866
|
+
z.y + z.height / 2
|
|
1867
|
+
)), Je(I));
|
|
1868
|
+
}
|
|
1869
|
+
return ue("kfbView", l), ue("currentLabel", Qe), e({
|
|
1870
|
+
kfbView: l,
|
|
1871
|
+
degrees: p,
|
|
1872
|
+
zoom: r,
|
|
1873
|
+
forceRedraw: be,
|
|
1874
|
+
toggleFlip: dt,
|
|
1875
|
+
startDraw: ct,
|
|
1876
|
+
endDraw: Ot,
|
|
1877
|
+
shotScreen: Ae,
|
|
1878
|
+
info: Wt,
|
|
1879
|
+
scopeChange: Gt,
|
|
1880
|
+
updateGrid: vt,
|
|
1881
|
+
updateGraduation: ft,
|
|
1882
|
+
updateNavigator: mt,
|
|
1883
|
+
fastMove: qe,
|
|
1884
|
+
zoomTo: Je,
|
|
1885
|
+
jumpToLabel: at,
|
|
1886
|
+
jumpToPosition: Zt,
|
|
1887
|
+
reloadLabelList: Ht
|
|
1888
|
+
}), (z, I) => {
|
|
1889
|
+
var q, ae, fe;
|
|
1890
|
+
return _(), L("div", {
|
|
1891
|
+
ref_key: "mainKfbViewRef",
|
|
1892
|
+
ref: i,
|
|
1893
|
+
class: "hzzt-kfb-view"
|
|
1894
|
+
}, [
|
|
1895
|
+
z.slide.file ? $e((_(), L("div", {
|
|
1896
|
+
key: 0,
|
|
1897
|
+
ref_key: "kfbViewMainRef",
|
|
1898
|
+
ref: f,
|
|
1899
|
+
class: "hzzt-kfb-view__main",
|
|
1900
|
+
"element-loading-text": o(d)("加载中"),
|
|
1901
|
+
"element-loading-background": "rgba(0, 0, 0, 0.8)"
|
|
1902
|
+
}, null, 8, yo)), [
|
|
1903
|
+
[o(S), a.value]
|
|
1904
|
+
]) : (_(), L("div", _o, I[5] || (I[5] = [
|
|
1905
|
+
b("img", {
|
|
1906
|
+
style: { width: "50%" },
|
|
1907
|
+
src: Ge
|
|
1908
|
+
}, null, -1)
|
|
1909
|
+
]))),
|
|
1910
|
+
z.slide.analysis && z.slide.analysis.result ? (_(), P(o(Tt), {
|
|
1911
|
+
key: 2,
|
|
1912
|
+
class: "hzzt-kfb-view__tag",
|
|
1913
|
+
type: o(Q).type
|
|
1914
|
+
}, {
|
|
1915
|
+
default: x(() => [
|
|
1916
|
+
G(E(o(Q).name), 1)
|
|
1917
|
+
]),
|
|
1918
|
+
_: 1
|
|
1919
|
+
}, 8, ["type"])) : A("", !0),
|
|
1920
|
+
(_(), L("svg", bo, [
|
|
1921
|
+
b("filter", ko, [
|
|
1922
|
+
b("feColorMatrix", {
|
|
1923
|
+
values: o(ve),
|
|
1924
|
+
type: "matrix"
|
|
1925
|
+
}, null, 8, zo),
|
|
1926
|
+
b("feColorMatrix", {
|
|
1927
|
+
values: o(te),
|
|
1928
|
+
type: "saturate"
|
|
1929
|
+
}, null, 8, Co),
|
|
1930
|
+
b("feComponentTransfer", null, [
|
|
1931
|
+
b("feFuncR", {
|
|
1932
|
+
id: "feFuncR",
|
|
1933
|
+
type: "gamma",
|
|
1934
|
+
exponent: o(W).ga,
|
|
1935
|
+
amplitude: "1",
|
|
1936
|
+
offset: "0"
|
|
1937
|
+
}, null, 8, To),
|
|
1938
|
+
b("feFuncG", {
|
|
1939
|
+
id: "feFuncG",
|
|
1940
|
+
type: "gamma",
|
|
1941
|
+
exponent: o(W).ga,
|
|
1942
|
+
amplitude: "1",
|
|
1943
|
+
offset: "0"
|
|
1944
|
+
}, null, 8, $o),
|
|
1945
|
+
b("feFuncB", {
|
|
1946
|
+
id: "feFuncB",
|
|
1947
|
+
type: "gamma",
|
|
1948
|
+
exponent: o(W).ga,
|
|
1949
|
+
amplitude: "1",
|
|
1950
|
+
offset: "0"
|
|
1951
|
+
}, null, 8, Lo)
|
|
1952
|
+
])
|
|
1953
|
+
])
|
|
1954
|
+
])),
|
|
1955
|
+
T(Al, {
|
|
1956
|
+
menus: z.menus,
|
|
1957
|
+
onTool: ut
|
|
1958
|
+
}, null, 8, ["menus"]),
|
|
1959
|
+
T(Dl, Ke(z.microscope, {
|
|
1960
|
+
ref_key: "microscopeRef",
|
|
1961
|
+
ref: g
|
|
1962
|
+
}), null, 16),
|
|
1963
|
+
o(k) && z.slide.file ? (_(), P(Yl, {
|
|
1964
|
+
key: 3,
|
|
1965
|
+
info: w.value,
|
|
1966
|
+
slide: z.slide,
|
|
1967
|
+
pathologyHandle: z.pathologyHandle,
|
|
1968
|
+
onTool: ut
|
|
1969
|
+
}, null, 8, ["info", "slide", "pathologyHandle"])) : A("", !0),
|
|
1970
|
+
o(v) ? (_(), P(so, { key: 4 })) : A("", !0),
|
|
1971
|
+
(q = z.slide.children) != null && q.length ? (_(), P(ro, {
|
|
1972
|
+
key: 5,
|
|
1973
|
+
modelValue: s.value,
|
|
1974
|
+
"onUpdate:modelValue": I[0] || (I[0] = (K) => s.value = K),
|
|
1975
|
+
slides: z.slide.children
|
|
1976
|
+
}, null, 8, ["modelValue", "slides"])) : A("", !0),
|
|
1977
|
+
(fe = (ae = w.value) == null ? void 0 : ae.channel) != null && fe.length ? (_(), P(vo, {
|
|
1978
|
+
key: 6,
|
|
1979
|
+
modelValue: m.value,
|
|
1980
|
+
"onUpdate:modelValue": I[1] || (I[1] = (K) => m.value = K),
|
|
1981
|
+
info: w.value,
|
|
1982
|
+
onLoad: Ft
|
|
1983
|
+
}, null, 8, ["modelValue", "info"])) : A("", !0),
|
|
1984
|
+
o(nt).length ? (_(), P(wo, {
|
|
1985
|
+
key: 7,
|
|
1986
|
+
expand: R.value,
|
|
1987
|
+
"onUpdate:expand": I[2] || (I[2] = (K) => R.value = K),
|
|
1988
|
+
style: Z({
|
|
1989
|
+
top: z.slide.analysis && z.slide.analysis.result ? "24px" : "4px"
|
|
1990
|
+
}),
|
|
1991
|
+
annotation: o(Qe),
|
|
1992
|
+
annotations: o(nt),
|
|
1993
|
+
onSelect: o(at)
|
|
1994
|
+
}, null, 8, ["expand", "style", "annotation", "annotations", "onSelect"])) : A("", !0),
|
|
1995
|
+
T(o(je), {
|
|
1996
|
+
modelValue: h.value,
|
|
1997
|
+
"onUpdate:modelValue": I[3] || (I[3] = (K) => h.value = K),
|
|
1998
|
+
"append-to-body": !0,
|
|
1999
|
+
title: o(d)("图像信息"),
|
|
2000
|
+
width: "700px",
|
|
2001
|
+
top: "5vh"
|
|
2002
|
+
}, {
|
|
2003
|
+
default: x(() => [
|
|
2004
|
+
T(o(tt), { "label-position": "left" }, {
|
|
2005
|
+
default: x(() => [
|
|
2006
|
+
T(o(se), {
|
|
2007
|
+
class: "flex",
|
|
2008
|
+
"label-width": "0px"
|
|
2009
|
+
}, {
|
|
2010
|
+
default: x(() => [
|
|
2011
|
+
b("div", xo, [
|
|
2012
|
+
b("img", {
|
|
2013
|
+
src: w.value.labelImg,
|
|
2014
|
+
style: { height: "180px" }
|
|
2015
|
+
}, null, 8, Eo),
|
|
2016
|
+
b("img", {
|
|
2017
|
+
src: w.value.previewImg,
|
|
2018
|
+
style: { height: "180px" },
|
|
2019
|
+
class: "flex-1"
|
|
2020
|
+
}, null, 8, Vo)
|
|
2021
|
+
])
|
|
2022
|
+
]),
|
|
2023
|
+
_: 1
|
|
2024
|
+
}),
|
|
2025
|
+
T(o(se), {
|
|
2026
|
+
label: o(d)("文件名")
|
|
2027
|
+
}, {
|
|
2028
|
+
default: x(() => [
|
|
2029
|
+
b("span", Mo, E(w.value.fileName), 1)
|
|
2030
|
+
]),
|
|
2031
|
+
_: 1
|
|
2032
|
+
}, 8, ["label"]),
|
|
2033
|
+
T(o(se), {
|
|
2034
|
+
label: o(d)("图像像素")
|
|
2035
|
+
}, {
|
|
2036
|
+
default: x(() => [
|
|
2037
|
+
b("span", Io, E(w.value.width) + "Pixel - " + E(w.value.height) + "Pixel", 1)
|
|
2038
|
+
]),
|
|
2039
|
+
_: 1
|
|
2040
|
+
}, 8, ["label"]),
|
|
2041
|
+
T(o(se), {
|
|
2042
|
+
label: o(d)("扫描倍率")
|
|
2043
|
+
}, {
|
|
2044
|
+
default: x(() => [
|
|
2045
|
+
b("span", So, E(w.value.scanScale), 1)
|
|
2046
|
+
]),
|
|
2047
|
+
_: 1
|
|
2048
|
+
}, 8, ["label"]),
|
|
2049
|
+
T(o(se), {
|
|
2050
|
+
label: o(d)("扫描时刻")
|
|
2051
|
+
}, {
|
|
2052
|
+
default: x(() => [
|
|
2053
|
+
b("span", Ho, E(w.value.scanTime), 1)
|
|
2054
|
+
]),
|
|
2055
|
+
_: 1
|
|
2056
|
+
}, 8, ["label"]),
|
|
2057
|
+
T(o(se), {
|
|
2058
|
+
label: o(d)("扫描时间")
|
|
2059
|
+
}, {
|
|
2060
|
+
default: x(() => [
|
|
2061
|
+
b("span", Po, E(w.value.scanDuration || 0) + "s", 1)
|
|
2062
|
+
]),
|
|
2063
|
+
_: 1
|
|
2064
|
+
}, 8, ["label"]),
|
|
2065
|
+
w.value.ext ? (_(), P(o(se), {
|
|
2066
|
+
key: 0,
|
|
2067
|
+
label: o(d)("扫描设备")
|
|
2068
|
+
}, {
|
|
2069
|
+
default: x(() => [
|
|
2070
|
+
b("span", Ro, E(w.value.ext.machineNum || ""), 1)
|
|
2071
|
+
]),
|
|
2072
|
+
_: 1
|
|
2073
|
+
}, 8, ["label"])) : A("", !0)
|
|
2074
|
+
]),
|
|
2075
|
+
_: 1
|
|
2076
|
+
})
|
|
2077
|
+
]),
|
|
2078
|
+
_: 1
|
|
2079
|
+
}, 8, ["modelValue", "title"]),
|
|
2080
|
+
T(o(je), {
|
|
2081
|
+
modelValue: o(C),
|
|
2082
|
+
"onUpdate:modelValue": I[4] || (I[4] = (K) => Ve(C) ? C.value = K : null),
|
|
2083
|
+
"append-to-body": !0,
|
|
2084
|
+
title: o(d)("语音输入"),
|
|
2085
|
+
width: "500px",
|
|
2086
|
+
top: "5vh"
|
|
2087
|
+
}, {
|
|
2088
|
+
footer: x(() => [
|
|
2089
|
+
T(o(ge), { onClick: o(Mt) }, {
|
|
2090
|
+
default: x(() => [
|
|
2091
|
+
G(E(o(d)("取消")), 1)
|
|
2092
|
+
]),
|
|
2093
|
+
_: 1
|
|
2094
|
+
}, 8, ["onClick"]),
|
|
2095
|
+
T(o(ge), {
|
|
2096
|
+
type: "primary",
|
|
2097
|
+
onClick: o(It)
|
|
2098
|
+
}, {
|
|
2099
|
+
default: x(() => [
|
|
2100
|
+
G(E(o(d)("确定")), 1)
|
|
2101
|
+
]),
|
|
2102
|
+
_: 1
|
|
2103
|
+
}, 8, ["onClick"])
|
|
2104
|
+
]),
|
|
2105
|
+
default: x(() => [
|
|
2106
|
+
T(o(tt), { "label-position": "left" }, {
|
|
2107
|
+
default: x(() => {
|
|
2108
|
+
var K;
|
|
2109
|
+
return [
|
|
2110
|
+
T(o(se), null, {
|
|
2111
|
+
default: x(() => {
|
|
2112
|
+
var U;
|
|
2113
|
+
return [
|
|
2114
|
+
(U = o(N)) != null && U.src ? (_(), L("audio", {
|
|
2115
|
+
key: 0,
|
|
2116
|
+
class: "width-100%",
|
|
2117
|
+
src: o(N).src,
|
|
2118
|
+
controls: "",
|
|
2119
|
+
preload: "auto"
|
|
2120
|
+
}, null, 8, Ao)) : A("", !0)
|
|
2121
|
+
];
|
|
2122
|
+
}),
|
|
2123
|
+
_: 1
|
|
2124
|
+
}),
|
|
2125
|
+
(K = o(N)) != null && K.src ? A("", !0) : (_(), P(o(se), { key: 0 }, {
|
|
2126
|
+
default: x(() => [
|
|
2127
|
+
o(ke) ? (_(), P(o(ge), {
|
|
2128
|
+
key: 1,
|
|
2129
|
+
type: "danger",
|
|
2130
|
+
onClick: o(Et)
|
|
2131
|
+
}, {
|
|
2132
|
+
default: x(() => [
|
|
2133
|
+
G(E(o(d)("结束录音")), 1)
|
|
2134
|
+
]),
|
|
2135
|
+
_: 1
|
|
2136
|
+
}, 8, ["onClick"])) : (_(), P(o(ge), {
|
|
2137
|
+
key: 0,
|
|
2138
|
+
type: "primary",
|
|
2139
|
+
onClick: o(xt)
|
|
2140
|
+
}, {
|
|
2141
|
+
default: x(() => [
|
|
2142
|
+
G(E(o(d)("开始录音")), 1)
|
|
2143
|
+
]),
|
|
2144
|
+
_: 1
|
|
2145
|
+
}, 8, ["onClick"])),
|
|
2146
|
+
o(ke) ? (_(), L("span", No, E(o(d)("录音时长")) + ":" + E(o(re)) + "s", 1)) : A("", !0)
|
|
2147
|
+
]),
|
|
2148
|
+
_: 1
|
|
2149
|
+
}))
|
|
2150
|
+
];
|
|
2151
|
+
}),
|
|
2152
|
+
_: 1
|
|
2153
|
+
})
|
|
2154
|
+
]),
|
|
2155
|
+
_: 1
|
|
2156
|
+
}, 8, ["modelValue", "title"]),
|
|
2157
|
+
z.hotmap && z.hotmap.enable && z.hotmap.type !== "switch" ? (_(), L("div", {
|
|
2158
|
+
key: 8,
|
|
2159
|
+
class: "hzzt-kfb-view__hotmap",
|
|
2160
|
+
style: Z({ left: o(Dt) + "px" })
|
|
2161
|
+
}, [
|
|
2162
|
+
T(o(_e), {
|
|
2163
|
+
class: "icon-caret-left",
|
|
2164
|
+
size: "30",
|
|
2165
|
+
onMousedown: o(st)
|
|
2166
|
+
}, {
|
|
2167
|
+
default: x(() => I[6] || (I[6] = [
|
|
2168
|
+
b("svg", {
|
|
2169
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2170
|
+
viewBox: "0 0 1024 1024"
|
|
2171
|
+
}, [
|
|
2172
|
+
b("path", {
|
|
2173
|
+
fill: "currentColor",
|
|
2174
|
+
d: "M672 192 288 511.936 672 832z"
|
|
2175
|
+
})
|
|
2176
|
+
], -1)
|
|
2177
|
+
])),
|
|
2178
|
+
_: 1,
|
|
2179
|
+
__: [6]
|
|
2180
|
+
}, 8, ["onMousedown"]),
|
|
2181
|
+
T(o(_e), {
|
|
2182
|
+
class: "icon-caret-right",
|
|
2183
|
+
size: "30",
|
|
2184
|
+
onMousedown: o(st)
|
|
2185
|
+
}, {
|
|
2186
|
+
default: x(() => I[7] || (I[7] = [
|
|
2187
|
+
b("svg", {
|
|
2188
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2189
|
+
viewBox: "0 0 1024 1024"
|
|
2190
|
+
}, [
|
|
2191
|
+
b("path", {
|
|
2192
|
+
fill: "currentColor",
|
|
2193
|
+
d: "M384 192v640l384-320.064z"
|
|
2194
|
+
})
|
|
2195
|
+
], -1)
|
|
2196
|
+
])),
|
|
2197
|
+
_: 1,
|
|
2198
|
+
__: [7]
|
|
2199
|
+
}, 8, ["onMousedown"])
|
|
2200
|
+
], 4)) : A("", !0),
|
|
2201
|
+
de(z.$slots, "default")
|
|
2202
|
+
], 512);
|
|
2203
|
+
};
|
|
2204
|
+
}
|
|
2205
|
+
});
|
|
2206
|
+
function Bo(u, e) {
|
|
2207
|
+
var h, l;
|
|
2208
|
+
const n = $(!!((h = u.ai) != null && h.default)), t = $(!!((l = u.ai) != null && l.default)), y = $([]), d = B(
|
|
2209
|
+
() => {
|
|
2210
|
+
var a, p, r, s;
|
|
2211
|
+
return (p = (a = e.value) == null ? void 0 : a.analysis) != null && p.id ? ((s = (r = e.value) == null ? void 0 : r.analysis) == null ? void 0 : s.class) || "auto" : "";
|
|
2212
|
+
}
|
|
2213
|
+
);
|
|
2214
|
+
ne(() => {
|
|
2215
|
+
var a;
|
|
2216
|
+
return (a = u.ai) == null ? void 0 : a.default;
|
|
2217
|
+
}, (a) => {
|
|
2218
|
+
n.value = !!a, t.value = !!a;
|
|
2219
|
+
}), ne(() => {
|
|
2220
|
+
var a;
|
|
2221
|
+
return (a = e == null ? void 0 : e.value) == null ? void 0 : a.id;
|
|
2222
|
+
}, c), pe(() => {
|
|
2223
|
+
var a, p;
|
|
2224
|
+
n.value = !!((a = u.ai) != null && a.default), t.value = !!((p = u.ai) != null && p.default), c();
|
|
2225
|
+
});
|
|
2226
|
+
function c() {
|
|
2227
|
+
var a;
|
|
2228
|
+
(a = e.value) != null && a.id && d.value ? n.value || t.value ? i() : y.value = [] : y.value = [];
|
|
2229
|
+
}
|
|
2230
|
+
function i() {
|
|
2231
|
+
u.ai.handle(d.value, e.value).then((a) => {
|
|
2232
|
+
y.value = a;
|
|
2233
|
+
}).catch(() => {
|
|
2234
|
+
y.value = [], d.value === "IQC" ? t.value = !1 : n.value = !1;
|
|
2235
|
+
});
|
|
2236
|
+
}
|
|
2237
|
+
function f() {
|
|
2238
|
+
t.value = !1, c();
|
|
2239
|
+
}
|
|
2240
|
+
function g() {
|
|
2241
|
+
n.value = !1, c();
|
|
2242
|
+
}
|
|
2243
|
+
return {
|
|
2244
|
+
analysisClass: d,
|
|
2245
|
+
aiLabelList: y,
|
|
2246
|
+
enableAi: n,
|
|
2247
|
+
enableIqc: t,
|
|
2248
|
+
toggleIqc: g,
|
|
2249
|
+
toggleAi: f
|
|
2250
|
+
};
|
|
2251
|
+
}
|
|
2252
|
+
const Do = ["src", "fit"], Uo = ["src", "fit"], Ue = /* @__PURE__ */ ee({
|
|
2253
|
+
name: "KfbImage",
|
|
2254
|
+
__name: "KfbImage",
|
|
2255
|
+
props: {
|
|
2256
|
+
src: {
|
|
2257
|
+
type: String,
|
|
2258
|
+
required: !0,
|
|
2259
|
+
default: ""
|
|
2260
|
+
},
|
|
2261
|
+
fit: {
|
|
2262
|
+
type: String,
|
|
2263
|
+
validator: (u) => ["", "contain", "cover", "fill", "none", "scale-down"].includes(u),
|
|
2264
|
+
default: ""
|
|
2265
|
+
},
|
|
2266
|
+
retryTimes: {
|
|
2267
|
+
type: Number,
|
|
2268
|
+
default: 0
|
|
2269
|
+
},
|
|
2270
|
+
load: {
|
|
2271
|
+
type: Function,
|
|
2272
|
+
default: () => ({})
|
|
2273
|
+
}
|
|
2274
|
+
},
|
|
2275
|
+
setup(u) {
|
|
2276
|
+
const e = u;
|
|
2277
|
+
let n = 0;
|
|
2278
|
+
const t = $(!1), y = ot({
|
|
2279
|
+
x: 0,
|
|
2280
|
+
y: 0
|
|
2281
|
+
}), d = B(() => ({
|
|
2282
|
+
top: `${y.y + 10}px`,
|
|
2283
|
+
left: `${y.x}px`,
|
|
2284
|
+
transform: "translateY(-50%)",
|
|
2285
|
+
width: `${4 * 300 / 3}px`,
|
|
2286
|
+
height: "300px",
|
|
2287
|
+
background: "rgba(0,0,0,0.8)",
|
|
2288
|
+
zIndex: "10000"
|
|
2289
|
+
}));
|
|
2290
|
+
function c(h) {
|
|
2291
|
+
const l = h.target;
|
|
2292
|
+
n < e.retryTimes ? (l.src = e.src, n++) : l.src = Ge;
|
|
2293
|
+
}
|
|
2294
|
+
function i(h) {
|
|
2295
|
+
if (h.target) {
|
|
2296
|
+
const s = h.target, m = s.tagName;
|
|
2297
|
+
let w = "";
|
|
2298
|
+
if (s.tagName === "IMG" ? w = s.src || "" : m === "DIV" && (w = s.children[0].src || ""), w.indexOf(Ge) > -1)
|
|
2299
|
+
return;
|
|
2300
|
+
}
|
|
2301
|
+
const { x: l, y: a } = f(h), p = 4 * 300 / 3, r = 300;
|
|
2302
|
+
y.x = Math.min(Math.max(l, p / 2), window.innerWidth - p / 2), y.y = Math.min(Math.max(a, r / 2), window.innerHeight - r / 2), t.value = !0;
|
|
2303
|
+
}
|
|
2304
|
+
function f(h) {
|
|
2305
|
+
const l = h.target, a = h.offsetX, p = h.offsetY, r = l.clientWidth, s = l.clientHeight;
|
|
2306
|
+
return {
|
|
2307
|
+
x: h.clientX + r - a,
|
|
2308
|
+
y: h.clientY - p + s / 2
|
|
2309
|
+
};
|
|
2310
|
+
}
|
|
2311
|
+
function g() {
|
|
2312
|
+
t.value = !1;
|
|
2313
|
+
}
|
|
2314
|
+
return (h, l) => (_(), L("div", {
|
|
2315
|
+
class: "relative",
|
|
2316
|
+
onMouseenter: i,
|
|
2317
|
+
onMouseleave: g
|
|
2318
|
+
}, [
|
|
2319
|
+
b("img", {
|
|
2320
|
+
src: u.src,
|
|
2321
|
+
fit: u.fit,
|
|
2322
|
+
onError: c,
|
|
2323
|
+
style: {
|
|
2324
|
+
height: "100%",
|
|
2325
|
+
width: "100%"
|
|
2326
|
+
}
|
|
2327
|
+
}, null, 40, Do),
|
|
2328
|
+
(_(), P(Fe, { to: "body" }, [
|
|
2329
|
+
t.value ? (_(), L("div", {
|
|
2330
|
+
key: 0,
|
|
2331
|
+
class: "fixed hzzt-kfb-img-triangle-left",
|
|
2332
|
+
style: Z(d.value)
|
|
2333
|
+
}, [
|
|
2334
|
+
b("img", {
|
|
2335
|
+
src: u.src,
|
|
2336
|
+
fit: u.fit,
|
|
2337
|
+
style: {
|
|
2338
|
+
objectFit: "contain",
|
|
2339
|
+
height: "100%",
|
|
2340
|
+
width: "100%"
|
|
2341
|
+
},
|
|
2342
|
+
onMouseenter: l[0] || (l[0] = () => {
|
|
2343
|
+
t.value = !0;
|
|
2344
|
+
}),
|
|
2345
|
+
onMouseleave: g
|
|
2346
|
+
}, null, 40, Uo)
|
|
2347
|
+
], 4)) : A("", !0)
|
|
2348
|
+
]))
|
|
2349
|
+
], 32));
|
|
2350
|
+
}
|
|
2351
|
+
}), Fo = {}, Ko = {
|
|
2352
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2353
|
+
viewBox: "0 0 1024 1024"
|
|
2354
|
+
};
|
|
2355
|
+
function jo(u, e) {
|
|
2356
|
+
return _(), L("svg", Ko, e[0] || (e[0] = [
|
|
2357
|
+
b("path", {
|
|
2358
|
+
fill: "currentColor",
|
|
2359
|
+
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"
|
|
2360
|
+
}, null, -1)
|
|
2361
|
+
]));
|
|
2362
|
+
}
|
|
2363
|
+
const Oo = /* @__PURE__ */ he(Fo, [["render", jo]]), Go = {}, Wo = {
|
|
2364
|
+
width: "16",
|
|
2365
|
+
height: "16",
|
|
2366
|
+
viewBox: "0 0 16 16",
|
|
2367
|
+
fill: "none",
|
|
2368
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2369
|
+
};
|
|
2370
|
+
function Zo(u, e) {
|
|
2371
|
+
return _(), L("svg", Wo, e[0] || (e[0] = [
|
|
2372
|
+
b("g", { id: "Frame" }, [
|
|
2373
|
+
b("path", {
|
|
2374
|
+
id: "Vector",
|
|
2375
|
+
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",
|
|
2376
|
+
fill: "currentColor",
|
|
2377
|
+
"fill-opacity": "0.9"
|
|
2378
|
+
})
|
|
2379
|
+
], -1)
|
|
2380
|
+
]));
|
|
2381
|
+
}
|
|
2382
|
+
const qo = /* @__PURE__ */ he(Go, [["render", Zo]]), Yo = { class: "hzzt-kfb-slides" }, Xo = { class: "hzzt-kfb-slides__row" }, Qo = { class: "hzzt-kfb-slides__top" }, Jo = { class: "text-primary" }, en = { class: "flex align-items-center" }, tn = { key: 0 }, ln = ["data-index", "onClick"], on = { class: "hzzt-kfb-slides__gallery" }, nn = ["onClick"], an = {
|
|
2383
|
+
key: 0,
|
|
2384
|
+
class: "hzzt-kfb-slides__read"
|
|
2385
|
+
}, sn = ["onClick"], rn = {
|
|
2386
|
+
key: 1,
|
|
2387
|
+
class: "flex column"
|
|
2388
|
+
}, un = { class: "hzzt-kfb-slides__header" }, cn = { class: "w-30%" }, dn = { class: "w-40%" }, vn = { class: "w-20%" }, fn = ["data-index", "onClick"], mn = { class: "w-30% flex" }, pn = { class: "hzzt-kfb-slides__gallery" }, hn = {
|
|
2389
|
+
key: 0,
|
|
2390
|
+
class: "hzzt-kfb-slides__read"
|
|
2391
|
+
}, gn = { class: "w-40% flex" }, wn = ["onClick"], yn = ["onClick"], _n = {
|
|
2392
|
+
key: 0,
|
|
2393
|
+
class: "flex column py-2"
|
|
2394
|
+
}, bn = { class: "flex align-items-center justify-content-center" }, kn = { class: "margin-r-1" }, zn = {
|
|
2395
|
+
key: 0,
|
|
2396
|
+
class: "margin-r-1 margin-l-2"
|
|
2397
|
+
}, Cn = /* @__PURE__ */ ee({
|
|
2398
|
+
__name: "KfbSlideList",
|
|
2399
|
+
props: {
|
|
2400
|
+
slides: {}
|
|
2401
|
+
},
|
|
2402
|
+
emits: ["select", "tool"],
|
|
2403
|
+
setup(u, { expose: e, emit: n }) {
|
|
2404
|
+
const t = u, y = n, d = J("file-index", {
|
|
2405
|
+
value: 0
|
|
2406
|
+
}), c = J("divide", {
|
|
2407
|
+
value: !1
|
|
2408
|
+
}), i = J("sync", {
|
|
2409
|
+
value: !1
|
|
2410
|
+
}), f = $(!1), g = $(), h = B(() => t.slides.filter(({ read: m }) => m)), l = B(() => t.slides.filter(({ check: m }) => m)), { t: a } = ie();
|
|
2411
|
+
function p(m) {
|
|
2412
|
+
d.value = m, y("select", m);
|
|
2413
|
+
}
|
|
2414
|
+
function r(m) {
|
|
2415
|
+
m.check = !m.check;
|
|
2416
|
+
}
|
|
2417
|
+
function s(m) {
|
|
2418
|
+
var k, v, M;
|
|
2419
|
+
const w = ((M = (v = (k = g.value.querySelector('[data-index="0"]')) == null ? void 0 : k.getBoundingClientRect) == null ? void 0 : v.call(k)) == null ? void 0 : M.y) || 0;
|
|
2420
|
+
g.value.scrollTop = g.value.querySelector(`[data-index="${m}"]`).getBoundingClientRect().y - w;
|
|
2421
|
+
}
|
|
2422
|
+
return e({
|
|
2423
|
+
jumpToSlide: s
|
|
2424
|
+
}), (m, w) => (_(), L("div", Yo, [
|
|
2425
|
+
b("div", Xo, [
|
|
2426
|
+
b("div", Qo, [
|
|
2427
|
+
b("span", null, [
|
|
2428
|
+
w[4] || (w[4] = G("已读:")),
|
|
2429
|
+
b("span", Jo, E(h.value.length), 1),
|
|
2430
|
+
G("/" + E(m.slides.length), 1)
|
|
2431
|
+
]),
|
|
2432
|
+
b("div", en, [
|
|
2433
|
+
T(o(_e), {
|
|
2434
|
+
class: "margin-r-2 pointer",
|
|
2435
|
+
size: "16",
|
|
2436
|
+
color: f.value ? "#999" : "#000",
|
|
2437
|
+
onClick: w[0] || (w[0] = (k) => f.value = !f.value)
|
|
2438
|
+
}, {
|
|
2439
|
+
default: x(() => [
|
|
2440
|
+
T(Oo)
|
|
2441
|
+
]),
|
|
2442
|
+
_: 1
|
|
2443
|
+
}, 8, ["color"]),
|
|
2444
|
+
T(o(_e), {
|
|
2445
|
+
class: "pointer",
|
|
2446
|
+
name: "cus-list",
|
|
2447
|
+
size: "16",
|
|
2448
|
+
color: f.value ? "#000" : "#999",
|
|
2449
|
+
onClick: w[1] || (w[1] = (k) => f.value = !f.value)
|
|
2450
|
+
}, {
|
|
2451
|
+
default: x(() => [
|
|
2452
|
+
T(qo)
|
|
2453
|
+
]),
|
|
2454
|
+
_: 1
|
|
2455
|
+
}, 8, ["color"])
|
|
2456
|
+
])
|
|
2457
|
+
]),
|
|
2458
|
+
b("div", {
|
|
2459
|
+
class: "flex-1 overflow-auto",
|
|
2460
|
+
style: { width: "100%" },
|
|
2461
|
+
ref_key: "slidesRef",
|
|
2462
|
+
ref: g
|
|
2463
|
+
}, [
|
|
2464
|
+
f.value ? (_(), L("ul", rn, [
|
|
2465
|
+
b("li", un, [
|
|
2466
|
+
w[5] || (w[5] = b("div", { class: "w-10%" }, null, -1)),
|
|
2467
|
+
b("div", cn, E(o(a)("缩略图")), 1),
|
|
2468
|
+
b("div", dn, E(o(a)("切片名")), 1),
|
|
2469
|
+
b("div", vn, E(o(a)("评分")), 1)
|
|
2470
|
+
]),
|
|
2471
|
+
(_(!0), L(le, null, oe(m.slides, (k, v) => (_(), L("li", {
|
|
2472
|
+
key: v,
|
|
2473
|
+
"data-index": v,
|
|
2474
|
+
class: "flex align-items-center overflow-hidden",
|
|
2475
|
+
style: Z({
|
|
2476
|
+
backgroundColor: o(d) === v ? "rgba(6, 85, 195, 0.1)" : "#fff"
|
|
2477
|
+
}),
|
|
2478
|
+
onClick: (M) => p(v)
|
|
2479
|
+
}, [
|
|
2480
|
+
b("div", {
|
|
2481
|
+
class: "w-10% text-center",
|
|
2482
|
+
onClick: Be(() => {
|
|
2483
|
+
}, ["stop"])
|
|
2484
|
+
}, [
|
|
2485
|
+
T(o(Oe), {
|
|
2486
|
+
modelValue: k.check,
|
|
2487
|
+
"onUpdate:modelValue": (M) => k.check = M,
|
|
2488
|
+
style: { width: "14px", height: "16px" }
|
|
2489
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2490
|
+
]),
|
|
2491
|
+
b("div", mn, [
|
|
2492
|
+
b("div", pn, [
|
|
2493
|
+
T(Ue, {
|
|
2494
|
+
style: Z([{ transform: `rotate(${k.angle}deg)` }, { height: "45px" }]),
|
|
2495
|
+
"retry-times": 1,
|
|
2496
|
+
src: k.labelImg,
|
|
2497
|
+
fit: "cover",
|
|
2498
|
+
class: "flex-1"
|
|
2499
|
+
}, null, 8, ["style", "src"]),
|
|
2500
|
+
T(Ue, {
|
|
2501
|
+
"retry-times": 1,
|
|
2502
|
+
fit: "cover",
|
|
2503
|
+
src: k.previewImg,
|
|
2504
|
+
style: { height: "45px" },
|
|
2505
|
+
class: "flex-1"
|
|
2506
|
+
}, null, 8, ["src"]),
|
|
2507
|
+
k.read ? A("", !0) : (_(), L("div", hn, E(o(a)("未读")), 1))
|
|
2508
|
+
])
|
|
2509
|
+
]),
|
|
2510
|
+
b("div", gn, [
|
|
2511
|
+
T(o(zt), {
|
|
2512
|
+
effect: "dark",
|
|
2513
|
+
placement: "bottom",
|
|
2514
|
+
content: `${k.name}`
|
|
2515
|
+
}, {
|
|
2516
|
+
default: x(() => [
|
|
2517
|
+
b("span", {
|
|
2518
|
+
style: { "line-height": "16px" },
|
|
2519
|
+
class: "margin-l-1 ellipsis hzzt-kfb-slides__text",
|
|
2520
|
+
dir: "rtl",
|
|
2521
|
+
onClick: Be((M) => r(k), ["stop"])
|
|
2522
|
+
}, E(k.name), 9, wn)
|
|
2523
|
+
]),
|
|
2524
|
+
_: 2
|
|
2525
|
+
}, 1032, ["content"])
|
|
2526
|
+
]),
|
|
2527
|
+
b("div", {
|
|
2528
|
+
class: "w-20% flex text-center pointer",
|
|
2529
|
+
style: Z({
|
|
2530
|
+
color: k.gradeColor
|
|
2531
|
+
}),
|
|
2532
|
+
onClick: (M) => y("tool", "grade", k)
|
|
2533
|
+
}, E(k.grade), 13, yn)
|
|
2534
|
+
], 12, fn))), 128))
|
|
2535
|
+
])) : (_(), L("div", tn, [
|
|
2536
|
+
(_(!0), L(le, null, oe(m.slides, (k, v) => (_(), L("div", {
|
|
2537
|
+
key: v,
|
|
2538
|
+
class: ye(["hzzt-kfb-slides__box", o(d) === v ? "hzzt-kfb-slides__box--active" : ""]),
|
|
2539
|
+
"data-index": v,
|
|
2540
|
+
onClick: (M) => p(v)
|
|
2541
|
+
}, [
|
|
2542
|
+
b("div", on, [
|
|
2543
|
+
T(Ue, {
|
|
2544
|
+
style: Z({ transform: `rotate(${k.angle}deg)` }),
|
|
2545
|
+
"retry-times": 1,
|
|
2546
|
+
src: k.labelImg,
|
|
2547
|
+
class: "hzzt-kfb-slides__img",
|
|
2548
|
+
fit: "cover"
|
|
2549
|
+
}, null, 8, ["style", "src"]),
|
|
2550
|
+
T(Ue, {
|
|
2551
|
+
"retry-times": 1,
|
|
2552
|
+
src: k.previewImg,
|
|
2553
|
+
class: "flex-1 hzzt-kfb-slides__img1",
|
|
2554
|
+
fit: "cover"
|
|
2555
|
+
}, null, 8, ["src"])
|
|
2556
|
+
]),
|
|
2557
|
+
b("div", {
|
|
2558
|
+
class: "flex justify-content-between align-items-center",
|
|
2559
|
+
onClick: Be(() => {
|
|
2560
|
+
}, ["stop"])
|
|
2561
|
+
}, [
|
|
2562
|
+
T(o(Oe), {
|
|
2563
|
+
modelValue: k.check,
|
|
2564
|
+
"onUpdate:modelValue": (M) => k.check = M,
|
|
2565
|
+
style: { width: "14px", height: "16px" }
|
|
2566
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2567
|
+
T(o(zt), {
|
|
2568
|
+
effect: "dark",
|
|
2569
|
+
placement: "bottom",
|
|
2570
|
+
content: `${k.name}`
|
|
2571
|
+
}, {
|
|
2572
|
+
default: x(() => [
|
|
2573
|
+
b("span", {
|
|
2574
|
+
style: { "line-height": "16px", "text-align": "center", width: "calc(100% - 14px)" },
|
|
2575
|
+
class: "margin-l-1 ellipsis",
|
|
2576
|
+
onClick: Be((M) => r(k), ["stop"])
|
|
2577
|
+
}, E(k.name), 9, nn)
|
|
2578
|
+
]),
|
|
2579
|
+
_: 2
|
|
2580
|
+
}, 1032, ["content"])
|
|
2581
|
+
]),
|
|
2582
|
+
k.read ? A("", !0) : (_(), L("div", an, E(o(a)("未读")), 1)),
|
|
2583
|
+
k.grade ? (_(), L("div", {
|
|
2584
|
+
key: 1,
|
|
2585
|
+
class: "hzzt-kfb-slides__grade",
|
|
2586
|
+
style: Z({
|
|
2587
|
+
background: k.gradeColor
|
|
2588
|
+
}),
|
|
2589
|
+
onClick: (M) => y("tool", "grade", k)
|
|
2590
|
+
}, E(k.grade), 13, sn)) : A("", !0),
|
|
2591
|
+
de(m.$slots, "slide", { slide: k }, void 0, !0)
|
|
2592
|
+
], 10, ln))), 128))
|
|
2593
|
+
]))
|
|
2594
|
+
], 512),
|
|
2595
|
+
l.value.length > 1 ? (_(), L("div", _n, [
|
|
2596
|
+
b("div", bn, [
|
|
2597
|
+
b("span", kn, E(o(a)("分屏")), 1),
|
|
2598
|
+
T(o(Le), {
|
|
2599
|
+
modelValue: o(c),
|
|
2600
|
+
"onUpdate:modelValue": w[2] || (w[2] = (k) => Ve(c) ? c.value = k : null)
|
|
2601
|
+
}, null, 8, ["modelValue"]),
|
|
2602
|
+
o(c) ? (_(), L("span", zn, E(o(a)("同步")), 1)) : A("", !0),
|
|
2603
|
+
o(c) ? (_(), P(o(Le), {
|
|
2604
|
+
key: 1,
|
|
2605
|
+
modelValue: o(i),
|
|
2606
|
+
"onUpdate:modelValue": w[3] || (w[3] = (k) => Ve(i) ? i.value = k : null)
|
|
2607
|
+
}, null, 8, ["modelValue"])) : A("", !0)
|
|
2608
|
+
])
|
|
2609
|
+
])) : A("", !0)
|
|
2610
|
+
])
|
|
2611
|
+
]));
|
|
2612
|
+
}
|
|
2613
|
+
}), Tn = /* @__PURE__ */ he(Cn, [["__scopeId", "data-v-d3cde57c"]]), $n = { class: "hzzt-kfb-ai overflow-hidden" }, Ln = { class: "flex align-items-center margin-t-1" }, xn = { style: { color: "var(--el-color-success)" } }, En = { class: "flex-1 flex overflow-auto wrap margin-t-1" }, Vn = ["onClick"], Mn = {
|
|
2614
|
+
key: 0,
|
|
2615
|
+
style: { "margin-left": "2px" }
|
|
2616
|
+
}, In = /* @__PURE__ */ ee({
|
|
2617
|
+
name: "KfbAiList",
|
|
2618
|
+
__name: "list",
|
|
2619
|
+
props: {
|
|
2620
|
+
data: { default: () => [] },
|
|
2621
|
+
slide: { default: () => ({}) }
|
|
2622
|
+
},
|
|
2623
|
+
setup(u, { expose: e }) {
|
|
2624
|
+
const n = u, { t } = ie(), y = J("kfbViewRef"), d = $(-1), c = $(1), i = $(100), f = $(!0), g = $([]), h = B(() => n.data.filter((M) => g.value.includes(M.cls || ""))), l = B(() => h.value.slice((c.value - 1) * i.value, c.value * i.value)), a = B(() => {
|
|
2625
|
+
const M = /* @__PURE__ */ new Set();
|
|
2626
|
+
return n.data.forEach((R) => {
|
|
2627
|
+
const S = R.cls || "";
|
|
2628
|
+
S && !M.has(S) && M.add(S);
|
|
2629
|
+
}), Array.from(M);
|
|
2630
|
+
}), p = B(() => g.value.length !== 0 && g.value.length !== a.value.length), r = Lt(n);
|
|
2631
|
+
ne(() => a.value, (M) => {
|
|
2632
|
+
s(), g.value = [...M];
|
|
2633
|
+
}), pe(() => {
|
|
2634
|
+
g.value = [...a.value];
|
|
2635
|
+
});
|
|
2636
|
+
function s() {
|
|
2637
|
+
d.value = -1, c.value = 1, i.value = 100, f.value = !0;
|
|
2638
|
+
}
|
|
2639
|
+
function m(M) {
|
|
2640
|
+
const R = h.value.findIndex((S) => S.id === M.id);
|
|
2641
|
+
d.value = R, y.value.jumpToLabel(M, 5);
|
|
2642
|
+
}
|
|
2643
|
+
function w(M) {
|
|
2644
|
+
const R = n.data.filter((S) => S.cls === M);
|
|
2645
|
+
return R.length ? `(${R.length})` : "";
|
|
2646
|
+
}
|
|
2647
|
+
function k() {
|
|
2648
|
+
d.value = -1, f.value = g.value.length == a.value.length;
|
|
2649
|
+
}
|
|
2650
|
+
function v(M) {
|
|
2651
|
+
g.value = M ? [...a.value] : [], d.value = -1;
|
|
2652
|
+
}
|
|
2653
|
+
return e({
|
|
2654
|
+
labelList: h
|
|
2655
|
+
}), (M, R) => (_(), L("div", $n, [
|
|
2656
|
+
b("div", Ln, [
|
|
2657
|
+
T(o(rl), {
|
|
2658
|
+
placement: "bottom",
|
|
2659
|
+
trigger: "click",
|
|
2660
|
+
width: "160"
|
|
2661
|
+
}, {
|
|
2662
|
+
reference: x(() => [
|
|
2663
|
+
T(o(ge), {
|
|
2664
|
+
class: "margin-r-1",
|
|
2665
|
+
type: "primary"
|
|
2666
|
+
}, {
|
|
2667
|
+
default: x(() => [
|
|
2668
|
+
G(E(o(t)("分类")) + " ", 1),
|
|
2669
|
+
T(X, { name: "arrowDown" })
|
|
2670
|
+
]),
|
|
2671
|
+
_: 1
|
|
2672
|
+
})
|
|
2673
|
+
]),
|
|
2674
|
+
default: x(() => [
|
|
2675
|
+
b("div", null, [
|
|
2676
|
+
T(o(Oe), {
|
|
2677
|
+
modelValue: f.value,
|
|
2678
|
+
"onUpdate:modelValue": R[0] || (R[0] = (S) => f.value = S),
|
|
2679
|
+
indeterminate: p.value,
|
|
2680
|
+
onChange: v
|
|
2681
|
+
}, {
|
|
2682
|
+
default: x(() => [
|
|
2683
|
+
G(E(o(t)("全选")), 1)
|
|
2684
|
+
]),
|
|
2685
|
+
_: 1
|
|
2686
|
+
}, 8, ["modelValue", "indeterminate"]),
|
|
2687
|
+
T(o(ul), {
|
|
2688
|
+
modelValue: g.value,
|
|
2689
|
+
"onUpdate:modelValue": R[1] || (R[1] = (S) => g.value = S),
|
|
2690
|
+
class: "flex column",
|
|
2691
|
+
onChange: k
|
|
2692
|
+
}, {
|
|
2693
|
+
default: x(() => [
|
|
2694
|
+
(_(!0), L(le, null, oe(a.value, (S) => (_(), P(o(Oe), {
|
|
2695
|
+
key: S,
|
|
2696
|
+
value: S
|
|
2697
|
+
}, {
|
|
2698
|
+
default: x(() => [
|
|
2699
|
+
G(E(S) + " ", 1),
|
|
2700
|
+
b("span", xn, E(w(S)), 1)
|
|
2701
|
+
]),
|
|
2702
|
+
_: 2
|
|
2703
|
+
}, 1032, ["value"]))), 128))
|
|
2704
|
+
]),
|
|
2705
|
+
_: 1
|
|
2706
|
+
}, 8, ["modelValue"])
|
|
2707
|
+
])
|
|
2708
|
+
]),
|
|
2709
|
+
_: 1
|
|
2710
|
+
}),
|
|
2711
|
+
T(o(Tt), {
|
|
2712
|
+
type: o(r).type,
|
|
2713
|
+
class: "margin-l-1"
|
|
2714
|
+
}, {
|
|
2715
|
+
default: x(() => [
|
|
2716
|
+
G(E(o(r).name), 1)
|
|
2717
|
+
]),
|
|
2718
|
+
_: 1
|
|
2719
|
+
}, 8, ["type"])
|
|
2720
|
+
]),
|
|
2721
|
+
b("div", En, [
|
|
2722
|
+
(_(!0), L(le, null, oe(l.value, (S, Q) => (_(), L("div", {
|
|
2723
|
+
key: Q + (c.value - 1) * i.value,
|
|
2724
|
+
class: ye(`hzzt-kfb-ai__img ${d.value === Q + (c.value - 1) * i.value ? "hzzt-kfb-ai__img--active" : ""}`),
|
|
2725
|
+
onClick: (W) => m(S)
|
|
2726
|
+
}, [
|
|
2727
|
+
T(o(dl), {
|
|
2728
|
+
"retry-times": 1,
|
|
2729
|
+
src: S.imageUrl,
|
|
2730
|
+
"error-src": o(Ge)
|
|
2731
|
+
}, null, 8, ["src", "error-src"]),
|
|
2732
|
+
b("div", {
|
|
2733
|
+
style: Z({ color: S.strokeStyle }),
|
|
2734
|
+
class: "ellipsis"
|
|
2735
|
+
}, [
|
|
2736
|
+
G(E(S.cls) + " ", 1),
|
|
2737
|
+
S.score ? (_(), L("span", Mn, E(S.score), 1)) : A("", !0)
|
|
2738
|
+
], 4)
|
|
2739
|
+
], 10, Vn))), 128))
|
|
2740
|
+
]),
|
|
2741
|
+
T(o(cl), {
|
|
2742
|
+
class: "wrap",
|
|
2743
|
+
"current-page": c.value,
|
|
2744
|
+
"onUpdate:currentPage": R[2] || (R[2] = (S) => c.value = S),
|
|
2745
|
+
"page-size": i.value,
|
|
2746
|
+
"onUpdate:pageSize": R[3] || (R[3] = (S) => i.value = S),
|
|
2747
|
+
"page-sizes": [100, 200, 300, 400],
|
|
2748
|
+
layout: "total, sizes, prev, pager, next",
|
|
2749
|
+
total: h.value.length
|
|
2750
|
+
}, null, 8, ["current-page", "page-size", "total"])
|
|
2751
|
+
]));
|
|
2752
|
+
}
|
|
2753
|
+
}), Sn = { class: "hzzt-kfb-slide" }, Hn = { class: "flex flex-1 overflow-hidden" }, Pn = { class: "flex flex-1" }, Rn = {
|
|
2754
|
+
key: 0,
|
|
2755
|
+
style: { height: "100%", width: "100%" },
|
|
2756
|
+
class: "flex wrap"
|
|
2757
|
+
}, An = ["onClick"], We = /* @__PURE__ */ ee({
|
|
2758
|
+
name: "HzztKfbSlide",
|
|
2759
|
+
__name: "index",
|
|
2760
|
+
props: /* @__PURE__ */ we({
|
|
2761
|
+
menus: { default: () => [] },
|
|
2762
|
+
kfb: {},
|
|
2763
|
+
slides: { default: () => [] },
|
|
2764
|
+
ai: {},
|
|
2765
|
+
teleport: { type: Boolean, default: !1 },
|
|
2766
|
+
process: {},
|
|
2767
|
+
microscope: {},
|
|
2768
|
+
showList: { type: Boolean, default: !0 },
|
|
2769
|
+
showKfbLabel: { type: Boolean, default: !0 },
|
|
2770
|
+
showKeyboard: { type: Boolean, default: !1 },
|
|
2771
|
+
showMenuText: { type: Boolean, default: !0 }
|
|
2772
|
+
}, {
|
|
2773
|
+
index: {
|
|
2774
|
+
default: 0
|
|
2775
|
+
},
|
|
2776
|
+
indexModifiers: {}
|
|
2777
|
+
}),
|
|
2778
|
+
emits: /* @__PURE__ */ we(["tool"], ["update:index"]),
|
|
2779
|
+
setup(u, { expose: e, emit: n }) {
|
|
2780
|
+
const t = u, y = n, d = Ee(u, "index"), c = B(() => t.slides[d.value]), i = B(() => t.slides.filter(({ check: C }) => C)), f = $(), g = $(), h = $(), l = $(), a = $(t.showKeyboard), p = $(t.showKfbLabel), r = $(!1), s = $(!1), m = $(!1), { t: w } = ie(), k = B(() => {
|
|
2781
|
+
var C;
|
|
2782
|
+
if (r.value) {
|
|
2783
|
+
const N = i.value.findIndex(({ id: F }) => {
|
|
2784
|
+
var re;
|
|
2785
|
+
return F === ((re = c.value) == null ? void 0 : re.id);
|
|
2786
|
+
});
|
|
2787
|
+
return ((C = h.value) == null ? void 0 : C[N]) || g.value;
|
|
2788
|
+
} else
|
|
2789
|
+
return g.value;
|
|
2790
|
+
}), v = B(() => i.value.length <= 1 ? {
|
|
2791
|
+
height: "100%",
|
|
2792
|
+
width: "100%"
|
|
2793
|
+
} : i.value.length <= 2 ? {
|
|
2794
|
+
height: "100%",
|
|
2795
|
+
width: "calc((100% - 4px) / 2)"
|
|
2796
|
+
} : i.value.length <= 4 ? {
|
|
2797
|
+
height: "calc((100% - 4px) / 2)",
|
|
2798
|
+
width: "calc((100% - 4px) / 2)"
|
|
2799
|
+
} : i.value.length <= 6 ? {
|
|
2800
|
+
height: "calc((100% - 4px) / 2)",
|
|
2801
|
+
width: "calc((100% - 4px * 2) / 3)"
|
|
2802
|
+
} : i.value.length <= 9 ? {
|
|
2803
|
+
height: "calc((100% - 4px * 2) / 3)",
|
|
2804
|
+
width: "calc((100% - 4px * 2) / 3)"
|
|
2805
|
+
} : {
|
|
2806
|
+
height: "100%",
|
|
2807
|
+
width: "100%"
|
|
2808
|
+
});
|
|
2809
|
+
ne(() => i.value, (C) => {
|
|
2810
|
+
r.value && C.length <= 1 && (r.value = !1);
|
|
2811
|
+
}), ne(() => c.value, (C) => {
|
|
2812
|
+
if (C) {
|
|
2813
|
+
const N = C.read;
|
|
2814
|
+
C.read = !0, y("tool", "choose", {
|
|
2815
|
+
slide: C,
|
|
2816
|
+
read: N
|
|
2817
|
+
});
|
|
2818
|
+
}
|
|
2819
|
+
});
|
|
2820
|
+
const {
|
|
2821
|
+
analysisClass: M,
|
|
2822
|
+
aiLabelList: R,
|
|
2823
|
+
enableAi: S,
|
|
2824
|
+
enableIqc: Q,
|
|
2825
|
+
toggleIqc: W,
|
|
2826
|
+
toggleAi: ve
|
|
2827
|
+
} = Bo(t, c);
|
|
2828
|
+
function te(C, N) {
|
|
2829
|
+
C === "next" && t.slides[d.value + 1] && d.value++, C === "prev" && t.slides[d.value - 1] && d.value--, (C === "label" || C === "tool") && (p.value = N), y("tool", C, N);
|
|
2830
|
+
}
|
|
2831
|
+
function be(C) {
|
|
2832
|
+
var F, re, ke;
|
|
2833
|
+
const N = me(j({}, t.kfb), {
|
|
2834
|
+
process: t.process,
|
|
2835
|
+
microscope: t.microscope,
|
|
2836
|
+
slide: C,
|
|
2837
|
+
aiLabelList: c.value.id === C.id ? ((F = l.value) == null ? void 0 : F.labelList) || [] : [],
|
|
2838
|
+
hotmap: (re = C == null ? void 0 : C.hotmap) != null && re.file ? me(j({}, (C == null ? void 0 : C.hotmap) || {}), {
|
|
2839
|
+
enable: S.value
|
|
2840
|
+
}) : void 0,
|
|
2841
|
+
syncPosition: s.value,
|
|
2842
|
+
syncZoom: s.value,
|
|
2843
|
+
handle: void 0
|
|
2844
|
+
});
|
|
2845
|
+
return (ke = t.kfb) != null && ke.handle ? t.kfb.handle(C, N) : N;
|
|
2846
|
+
}
|
|
2847
|
+
function Se(C) {
|
|
2848
|
+
d.value = t.slides.findIndex((N) => N.id === C.id);
|
|
2849
|
+
}
|
|
2850
|
+
function Ae(C) {
|
|
2851
|
+
r.value && (t.slides[C].check = !0);
|
|
2852
|
+
}
|
|
2853
|
+
function Ze() {
|
|
2854
|
+
var C;
|
|
2855
|
+
p.value = !m.value, (C = r.value ? h.value : [g.value]) == null || C.forEach((N) => {
|
|
2856
|
+
m.value && (N.updateGrid({
|
|
2857
|
+
show: !m.value,
|
|
2858
|
+
ruler: !m.value
|
|
2859
|
+
}), a.value = !m.value), N.updateGraduation({
|
|
2860
|
+
show: !m.value
|
|
2861
|
+
}), N.updateNavigator(!m.value);
|
|
2862
|
+
});
|
|
2863
|
+
}
|
|
2864
|
+
function qe(C) {
|
|
2865
|
+
d.value = C, f.value && f.value.jumpToSlide(C);
|
|
2866
|
+
}
|
|
2867
|
+
function Ye(C, N) {
|
|
2868
|
+
k.value && k.value.jumpToLabel(C, N);
|
|
2869
|
+
}
|
|
2870
|
+
function Xe(C, N) {
|
|
2871
|
+
k.value && k.value.jumpToPosition(C, N);
|
|
2872
|
+
}
|
|
2873
|
+
return ue("kfbViewRef", k), ue("show-keyboard", a), ue("show-kfb-label", p), ue("hidden-all-label", m), ue("file-index", d), ue("divide", r), ue("sync", s), e({
|
|
2874
|
+
divide: r,
|
|
2875
|
+
slide: c,
|
|
2876
|
+
kfbViewRef: k,
|
|
2877
|
+
jumpToSlide: qe,
|
|
2878
|
+
jumpToLabel: Ye,
|
|
2879
|
+
jumpToPosition: Xe,
|
|
2880
|
+
enableAI: B(() => {
|
|
2881
|
+
var C;
|
|
2882
|
+
return ((C = t.ai) == null ? void 0 : C.enable) && R.value.length;
|
|
2883
|
+
})
|
|
2884
|
+
}), (C, N) => (_(), L("div", Sn, [
|
|
2885
|
+
C.menus.length ? (_(), P(Re, {
|
|
2886
|
+
key: 0,
|
|
2887
|
+
menu: C.menus,
|
|
2888
|
+
"show-menu-text": C.showMenuText,
|
|
2889
|
+
process: C.process,
|
|
2890
|
+
microscope: C.microscope,
|
|
2891
|
+
onTool: te
|
|
2892
|
+
}, {
|
|
2893
|
+
left: x(() => [
|
|
2894
|
+
de(C.$slots, "left")
|
|
2895
|
+
]),
|
|
2896
|
+
right: x(() => [
|
|
2897
|
+
T(o(Le), {
|
|
2898
|
+
modelValue: m.value,
|
|
2899
|
+
"onUpdate:modelValue": N[0] || (N[0] = (F) => m.value = F),
|
|
2900
|
+
"active-text": o(w)("隐藏标签"),
|
|
2901
|
+
class: "margin-r-2",
|
|
2902
|
+
onChange: Ze
|
|
2903
|
+
}, null, 8, ["modelValue", "active-text"]),
|
|
2904
|
+
C.ai && C.ai.enable && o(M) === "IQC" ? (_(), P(o(Le), {
|
|
2905
|
+
key: 0,
|
|
2906
|
+
modelValue: o(Q),
|
|
2907
|
+
"onUpdate:modelValue": N[1] || (N[1] = (F) => Ve(Q) ? Q.value = F : null),
|
|
2908
|
+
"active-text": o(w)("AI质控"),
|
|
2909
|
+
class: "margin-r-2",
|
|
2910
|
+
onChange: o(W)
|
|
2911
|
+
}, null, 8, ["modelValue", "active-text", "onChange"])) : C.ai && C.ai.enable && o(M) ? (_(), P(o(Le), {
|
|
2912
|
+
key: 1,
|
|
2913
|
+
modelValue: o(S),
|
|
2914
|
+
"onUpdate:modelValue": N[2] || (N[2] = (F) => Ve(S) ? S.value = F : null),
|
|
2915
|
+
"active-text": o(w)("AI分析"),
|
|
2916
|
+
class: "margin-r-2",
|
|
2917
|
+
onChange: o(ve)
|
|
2918
|
+
}, null, 8, ["modelValue", "active-text", "onChange"])) : A("", !0),
|
|
2919
|
+
de(C.$slots, "right")
|
|
2920
|
+
]),
|
|
2921
|
+
_: 3
|
|
2922
|
+
}, 8, ["menu", "show-menu-text", "process", "microscope"])) : A("", !0),
|
|
2923
|
+
b("div", Hn, [
|
|
2924
|
+
C.showList ? (_(), P(Fe, {
|
|
2925
|
+
key: 0,
|
|
2926
|
+
defer: "",
|
|
2927
|
+
to: "#kfb-slide-list",
|
|
2928
|
+
disabled: !C.teleport
|
|
2929
|
+
}, [
|
|
2930
|
+
T(Tn, {
|
|
2931
|
+
ref_key: "slidesRef",
|
|
2932
|
+
ref: f,
|
|
2933
|
+
style: Z(C.teleport ? "" : "width: 250px"),
|
|
2934
|
+
slides: C.slides,
|
|
2935
|
+
onSelect: Ae,
|
|
2936
|
+
onTool: te
|
|
2937
|
+
}, {
|
|
2938
|
+
slide: x(({ slide: F }) => [
|
|
2939
|
+
de(C.$slots, "list", { slide: F })
|
|
2940
|
+
]),
|
|
2941
|
+
_: 3
|
|
2942
|
+
}, 8, ["style", "slides"])
|
|
2943
|
+
], 8, ["disabled"])) : A("", !0),
|
|
2944
|
+
(_(), P(Fe, {
|
|
2945
|
+
defer: "",
|
|
2946
|
+
to: "#kfb-slide-view",
|
|
2947
|
+
disabled: !C.teleport
|
|
2948
|
+
}, [
|
|
2949
|
+
b("div", Pn, [
|
|
2950
|
+
i.value.length && r.value ? (_(), L("ul", Rn, [
|
|
2951
|
+
(_(!0), L(le, null, oe(i.value, (F, re) => (_(), L("li", {
|
|
2952
|
+
key: re,
|
|
2953
|
+
style: Z(v.value),
|
|
2954
|
+
class: ye(c.value.id === F.id ? "hzzt-kfb-view-screen-active" : ""),
|
|
2955
|
+
onClick: (ke) => Se(F)
|
|
2956
|
+
}, [
|
|
2957
|
+
(_(), P(Me, Ke({
|
|
2958
|
+
ref_for: !0,
|
|
2959
|
+
ref_key: "kfbViewRefs",
|
|
2960
|
+
ref: h,
|
|
2961
|
+
key: `kfb-${re}`
|
|
2962
|
+
}, { ref_for: !0 }, be(F), { onTool: te }), {
|
|
2963
|
+
default: x(() => [
|
|
2964
|
+
de(C.$slots, "kfb", { slide: F })
|
|
2965
|
+
]),
|
|
2966
|
+
_: 2
|
|
2967
|
+
}, 1040))
|
|
2968
|
+
], 14, An))), 128))
|
|
2969
|
+
])) : c.value ? (_(), P(Me, Ke({
|
|
2970
|
+
key: 1,
|
|
2971
|
+
ref_key: "kfbViewRef",
|
|
2972
|
+
ref: g
|
|
2973
|
+
}, be(c.value), { onTool: te }), {
|
|
2974
|
+
default: x(() => [
|
|
2975
|
+
de(C.$slots, "kfb", { slide: c.value })
|
|
2976
|
+
]),
|
|
2977
|
+
_: 3
|
|
2978
|
+
}, 16)) : A("", !0)
|
|
2979
|
+
])
|
|
2980
|
+
], 8, ["disabled"])),
|
|
2981
|
+
C.ai && C.ai.enable && o(R).length ? (_(), P(Fe, {
|
|
2982
|
+
key: 1,
|
|
2983
|
+
defer: "",
|
|
2984
|
+
to: "#kfb-slide-ai",
|
|
2985
|
+
disabled: !C.teleport
|
|
2986
|
+
}, [
|
|
2987
|
+
T(In, {
|
|
2988
|
+
style: Z(C.teleport ? "" : "width: 350px"),
|
|
2989
|
+
ref_key: "kfbAiRef",
|
|
2990
|
+
ref: l,
|
|
2991
|
+
data: o(R),
|
|
2992
|
+
slide: c.value
|
|
2993
|
+
}, null, 8, ["style", "data", "slide"])
|
|
2994
|
+
], 8, ["disabled"])) : A("", !0),
|
|
2995
|
+
de(C.$slots, "default")
|
|
2996
|
+
])
|
|
2997
|
+
]));
|
|
2998
|
+
}
|
|
2999
|
+
});
|
|
3000
|
+
We.name = "HzztKfbSlide";
|
|
3001
|
+
Me.name = "HzztKfbView";
|
|
3002
|
+
Re.name = "HzztKfbToolbox";
|
|
3003
|
+
const Nn = (u, e) => {
|
|
3004
|
+
u.use(vl, e == null ? void 0 : e.i18n), u.component(We.name, We), u.component(Me.name, Me), u.component(Re.name, Re);
|
|
3005
|
+
}, jn = {
|
|
3006
|
+
install: Nn,
|
|
3007
|
+
HzztKfbSlide: We,
|
|
3008
|
+
HzztKfbView: Me,
|
|
3009
|
+
HzztKfbToolbox: Re
|
|
3010
|
+
};
|
|
3011
|
+
export {
|
|
3012
|
+
$t as D,
|
|
3013
|
+
he as _,
|
|
3014
|
+
X as a,
|
|
3015
|
+
lt as b,
|
|
3016
|
+
We as c,
|
|
3017
|
+
Me as d,
|
|
3018
|
+
Re as e,
|
|
3019
|
+
jn as i,
|
|
3020
|
+
ie as u
|
|
3021
|
+
};
|