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