ss-component-new 1.2.27 → 1.2.28

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 (115) hide show
  1. package/dist/{MTLLoader-j7rSXeZy.js → MTLLoader-BreJsr54.js} +1 -1
  2. package/dist/{MTLLoader-CSavblQS.cjs → MTLLoader-Cqv49Ps8.cjs} +1 -1
  3. package/dist/{OrbitControls-BYxGl2XB.js → OrbitControls-BCu-cP7k.js} +1 -1
  4. package/dist/{OrbitControls-dRON011u.cjs → OrbitControls-C956u7BP.cjs} +1 -1
  5. package/dist/{animationData-rmZ0EGb8.cjs → animationData-C3-BiUgV.cjs} +1 -1
  6. package/dist/{animationData-Br4BCkiq.js → animationData-CMjNjOqc.js} +4 -4
  7. package/dist/{array-CeASBMWY.cjs → array-0u9Sf3UC.cjs} +1 -1
  8. package/dist/{array-Cx8FbegO.js → array-BGIM4b6g.js} +2 -2
  9. package/dist/{dataUtil-RzgUhlgJ.cjs → dataUtil-BFjWNDM1.cjs} +1 -1
  10. package/dist/{dataUtil-CJxHUail.js → dataUtil-D9l7-XhR.js} +2 -2
  11. package/dist/{fileUtil-BM6WhafY.cjs → fileUtil-BFtJHTM0.cjs} +1 -1
  12. package/dist/{fileUtil-BVzW5lTY.js → fileUtil-D7XVXEhb.js} +1 -1
  13. package/dist/{iconfont-J7S-v_zE.js → iconfont-B9Cj3DQM.js} +2 -2
  14. package/dist/{iconfont-Dsx_JtWY.cjs → iconfont-BDfcbq2v.cjs} +1 -1
  15. package/dist/icons/svg//344/272/272/345/203/217.svg +1 -0
  16. package/dist/{index-ClzEamlP.js → index-3QB55tXZ.js} +7 -7
  17. package/dist/{index-BGm3sgAn.cjs → index-B33wtiif.cjs} +1 -1
  18. package/dist/{index-D7wMQSEM.js → index-B8bpiPXB.js} +1 -1
  19. package/dist/{index-BvgHldVC.cjs → index-B9TlIok8.cjs} +12 -12
  20. package/dist/{index-DbHiWNBM.cjs → index-BWxbWhC9.cjs} +1 -1
  21. package/dist/{index-BoTEVRWS.js → index-BZwQB2HO.js} +5 -5
  22. package/dist/{index-DRSU72SE.js → index-BaE0DPgC.js} +66 -59
  23. package/dist/{index-DN8avrWv.cjs → index-BccOOMaP.cjs} +1 -1
  24. package/dist/index-BgHY8wmn.cjs +1 -0
  25. package/dist/{index-DpxXt1oz.js → index-Boazv8yC.js} +2 -2
  26. package/dist/{index-D5YeHxKp.js → index-BqRVuEsE.js} +6 -6
  27. package/dist/{index-CyNvD7fs.js → index-BwLaQntz.js} +1 -1
  28. package/dist/{index-Dr7mB3zJ.js → index-C-8LROmP.js} +2 -2
  29. package/dist/{index-DcT0aYIX.js → index-C1lZkQG-.js} +423 -423
  30. package/dist/{index-DWBL8V_4.js → index-C5UpEVah.js} +2 -2
  31. package/dist/index-C5fTUrKx.js +573 -0
  32. package/dist/{index-BH-cEIyF.cjs → index-C9_Cxm8G.cjs} +1 -1
  33. package/dist/{index-D5fqqSXr.cjs → index-CBFF2bsB.cjs} +1 -1
  34. package/dist/{index-YhB_cMji.cjs → index-CC9RkSBT.cjs} +1 -1
  35. package/dist/{index-BJkToJcC.cjs → index-CK5VdzmO.cjs} +1 -1
  36. package/dist/{index-CeWLT1YO.js → index-CKY0sj_X.js} +3 -3
  37. package/dist/{index-Cm99VII_.js → index-CMwwUi6o.js} +6 -6
  38. package/dist/{index-DjMSxB8D.cjs → index-CP7b7BrB.cjs} +1 -1
  39. package/dist/{index-BU5WJczo.js → index-CZu3TggJ.js} +1 -1
  40. package/dist/{index-Bp0GMpLC.cjs → index-C_cWjavY.cjs} +1 -1
  41. package/dist/{index-DVv2nM9_.cjs → index-Cd9j5j41.cjs} +1 -1
  42. package/dist/{index-B7l9bX5c.cjs → index-Cwh5m4lg.cjs} +1 -1
  43. package/dist/index-D0XPyuy4.cjs +1 -0
  44. package/dist/{index-lw6M4N-Q.cjs → index-D3TgRd-7.cjs} +1 -1
  45. package/dist/{index-Ie0BUTFu.js → index-D5Dtcn-_.js} +6 -6
  46. package/dist/{index-Bp5zOMHT.cjs → index-DE-uHAMH.cjs} +1 -1
  47. package/dist/{index-T2VihBuZ.js → index-DHOcRi3S.js} +6 -6
  48. package/dist/{index-CMIII30g.cjs → index-DMyPjpxO.cjs} +1 -1
  49. package/dist/{index-BvB9p0W4.js → index-DR7aNxVH.js} +4 -4
  50. package/dist/{index-0dw7iEtO.cjs → index-DVqfroe6.cjs} +1 -1
  51. package/dist/{index-ggXXcZCO.js → index-DiTYB-a4.js} +63 -58
  52. package/dist/index-DnFxL5wb.cjs +1 -0
  53. package/dist/{index-CaGluCnk.js → index-DqR3IwgZ.js} +12 -12
  54. package/dist/{index-zAZNzNG-.js → index-DsCD1neC.js} +2 -2
  55. package/dist/{index-CNxiv6y5.js → index-Dx2X9pR1.js} +43 -43
  56. package/dist/{index-C2B83Ywj.cjs → index-GGokR_Lx.cjs} +1 -1
  57. package/dist/{index-7pDDKkwc.js → index-HduGypr9.js} +34 -34
  58. package/dist/index-LcnC2GQ4.cjs +1 -0
  59. package/dist/{index-DoWGbQss.js → index-OTxJnh9Z.js} +153 -153
  60. package/dist/{index-DodooTli.js → index-Rr9ZBYig.js} +2 -2
  61. package/dist/{index-BEfXSiWp.js → index-Sa2hQZ0h.js} +2 -2
  62. package/dist/{index-BkcjJQlg.cjs → index-TKouySTA.cjs} +1 -1
  63. package/dist/{index-veEr0Ju4.js → index-gPnrvvE9.js} +1324 -1321
  64. package/dist/{index-BPxe8bKe.js → index-gXbhagnF.js} +3 -3
  65. package/dist/{index-CAPstY_B.cjs → index-mpoVA-DC.cjs} +1 -1
  66. package/dist/{index-C9GfFRyr.cjs → index-uIVtG4RY.cjs} +1 -1
  67. package/dist/index-wQJN1jpI.js +2466 -0
  68. package/dist/index-zLkhy4JK.cjs +1 -0
  69. package/dist/{index-DFbvbOsE.js → index-zZ9bfGNx.js} +1 -1
  70. package/dist/{index-DMHh2MZZ.cjs → index-znR89ub7.cjs} +1 -1
  71. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DGl2lQmW.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CuWDdCiy.js} +2 -2
  72. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BWh0GUiI.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-TDoJ17os.cjs} +1 -1
  73. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BjBzi9R7.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-BQiH2RRX.js} +11 -11
  74. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BwjCaKYV.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-Dqpyi0E8.cjs} +1 -1
  75. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-D21h7jT_.cjs +37 -0
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DZGhek9_.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-PE_6dfIO.js} +12719 -12591
  77. package/dist/{index.vue_vue_type_style_index_1_lang-BHt4rvMd.js → index.vue_vue_type_style_index_1_lang-9ANlnWKt.js} +5 -5
  78. package/dist/index.vue_vue_type_style_index_1_lang-CrmWclPR.cjs +32 -0
  79. package/dist/{index.vue_vue_type_style_index_1_lang-C2PJ2fvM.cjs → index.vue_vue_type_style_index_1_lang-D4RvHwPS.cjs} +1 -1
  80. package/dist/{index.vue_vue_type_style_index_1_lang-WD8HOZyf.js → index.vue_vue_type_style_index_1_lang-DwvuVXW6.js} +2580 -2471
  81. package/dist/{isString-BbPmUYHG.js → isString-BuBBWjRr.js} +1 -1
  82. package/dist/{main-DWa3MZxf.js → main-DpLQlLK2.js} +5 -5
  83. package/dist/{main-DlDkQh0n.cjs → main-Mx9r7ydp.cjs} +1 -1
  84. package/dist/ss-component.cjs +1 -1
  85. package/dist/ss-component.css +2 -2
  86. package/dist/ss-component.js +11 -11
  87. package/dist/ss-component2.cjs +1 -1
  88. package/dist/ss-component2.js +12 -12
  89. package/dist/{threeModel-CBsLcTcX.js → threeModel-CZ-qFwwk.js} +5 -5
  90. package/dist/{threeModel-Dt9Ounip.cjs → threeModel-DTwQnnAO.cjs} +1 -1
  91. package/dist/{threePreview-DSMFTIuC.cjs → threePreview-CUGoEzKf.cjs} +1 -1
  92. package/dist/{threePreview-D99A_IHZ.js → threePreview-DutKTPWH.js} +4 -4
  93. package/dist/{threeSceneView-BD22yXw4.js → threeSceneView-CzgWYHBw.js} +11 -11
  94. package/dist/{threeSceneView-Dv2uGsTN.cjs → threeSceneView-f1V-z4jr.cjs} +1 -1
  95. package/dist/{threeSceneViewForCPMPIP-CpBphI9E.js → threeSceneViewForCPMPIP-2sXIw3I1.js} +61 -61
  96. package/dist/{threeSceneViewForCPMPIP-DfaTaroP.cjs → threeSceneViewForCPMPIP-CojHDVHC.cjs} +1 -1
  97. package/dist/{threeTrackPathView-BGePzJh4.cjs → threeTrackPathView-BGHiOyJo.cjs} +1 -1
  98. package/dist/{threeTrackPathView-bFuXaesk.js → threeTrackPathView-DA4_8jas.js} +6 -6
  99. package/dist/{threeViewerHost-gGHqJpTR.js → threeViewerHost-BNObp9oA.js} +17 -17
  100. package/dist/{threeViewerHost-bQqnJLh9.cjs → threeViewerHost-D3WDKrIQ.cjs} +1 -1
  101. package/dist/{urdfTree-nXEMcLFV.cjs → urdfTree-CWStzmk2.cjs} +1 -1
  102. package/dist/{urdfTree-B2Zs54qS.js → urdfTree-CnkPddyT.js} +1 -1
  103. package/dist/{workpieceTreePanel-CXD_XizT.js → workpieceTreePanel-BvhFt3Xw.js} +5 -5
  104. package/dist/{workpieceTreePanel-Brforhya.cjs → workpieceTreePanel-DXyb_Wnw.cjs} +1 -1
  105. package/package.json +1 -1
  106. package/public/icons/svg//344/272/272/345/203/217.svg +1 -0
  107. package/dist/index-B3l8CoGZ.js +0 -2384
  108. package/dist/index-BRAUJGR3.cjs +0 -1
  109. package/dist/index-BjRAas3a.cjs +0 -1
  110. package/dist/index-CV0r8X5U.js +0 -649
  111. package/dist/index-Cf9NTS7v.cjs +0 -1
  112. package/dist/index-DWTsFx-2.cjs +0 -1
  113. package/dist/index-HVtEP9pD.cjs +0 -1
  114. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BKfBwnMQ.cjs +0 -37
  115. package/dist/index.vue_vue_type_style_index_1_lang-f2wxl9Ai.cjs +0 -32
@@ -1,649 +0,0 @@
1
- import { createElementBlock as F, openBlock as O, createElementVNode as f, renderSlot as k, defineComponent as q, ref as U, resolveComponent as M, createVNode as b, withCtx as d, reactive as se, watch as W, unref as Q, toDisplayString as B, createTextVNode as x } from "vue";
2
- import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import { a as ne, E, u as de, p as ue, s as pe, b as fe, g as X } from "./index-7pDDKkwc.js";
4
- import { d as ye, r as ge, g as me, c as be, b as ve, e as he, f as Ae, h as _e } from "./index.vue_vue_type_style_index_1_lang-WD8HOZyf.js";
5
- import { useRouter as we } from "vue-router";
6
- import { v as Ce } from "./index-DodooTli.js";
7
- const Ie = {}, Se = { class: "left-wrap" }, ke = { class: "left-bg" };
8
- function Ke(I, T) {
9
- return O(), F("div", Se, [
10
- f("div", ke, [
11
- k(I.$slots, "img", {}, void 0, !0)
12
- ])
13
- ]);
14
- }
15
- const Ee = /* @__PURE__ */ V(Ie, [["render", Ke], ["__scopeId", "data-v-9b7ee6c9"]]), Te = { class: "right-wrap" }, Ne = { class: "tab-content" }, Le = { class: "tab-tips" }, Be = { class: "tab-content" }, Ue = { class: "tab-tips" }, Me = { class: "tab-content" }, Re = { class: "tab-tips" }, Pe = /* @__PURE__ */ q({
16
- __name: "index",
17
- props: {
18
- tabList: {
19
- type: Array,
20
- default: []
21
- },
22
- loading: {
23
- type: Boolean,
24
- default: !1
25
- }
26
- },
27
- emits: ["clickLogin", "handleTabChange"],
28
- setup(I, { emit: T }) {
29
- const _ = U("account"), l = T, m = () => {
30
- l("clickLogin", _.value);
31
- }, w = (c) => {
32
- l("handleTabChange", c);
33
- };
34
- return (c, v) => {
35
- const u = M("el-button"), h = M("el-tab-pane"), r = M("el-tabs");
36
- return O(), F("div", Te, [
37
- b(r, {
38
- modelValue: _.value,
39
- "onUpdate:modelValue": v[0] || (v[0] = (p) => _.value = p),
40
- class: "right-tabs",
41
- onTabChange: w
42
- }, {
43
- default: d(() => [
44
- b(h, { name: "account" }, {
45
- label: d(() => [
46
- k(c.$slots, "tabLabel1", {}, void 0, !0)
47
- ]),
48
- default: d(() => [
49
- f("div", Ne, [
50
- k(c.$slots, "tabContent1", {}, void 0, !0)
51
- ]),
52
- f("div", {
53
- class: "tab-button special",
54
- onClick: m
55
- }, [
56
- b(u, { loading: I.loading }, {
57
- default: d(() => [
58
- k(c.$slots, "tabButton1", {}, void 0, !0)
59
- ]),
60
- _: 3
61
- }, 8, ["loading"])
62
- ]),
63
- f("div", Le, [
64
- k(c.$slots, "tabTips1", {}, void 0, !0)
65
- ])
66
- ]),
67
- _: 3
68
- }),
69
- b(h, { name: "face" }, {
70
- label: d(() => [
71
- k(c.$slots, "tabLabel2", {}, void 0, !0)
72
- ]),
73
- default: d(() => [
74
- f("div", Be, [
75
- k(c.$slots, "tabContent2", {}, void 0, !0)
76
- ]),
77
- f("div", Ue, [
78
- k(c.$slots, "tabTips2", {}, void 0, !0)
79
- ])
80
- ]),
81
- _: 3
82
- }),
83
- b(h, { name: "card" }, {
84
- label: d(() => [
85
- k(c.$slots, "tabLabel3", {}, void 0, !0)
86
- ]),
87
- default: d(() => [
88
- f("div", Me, [
89
- k(c.$slots, "tabContent3", {}, void 0, !0)
90
- ]),
91
- f("div", {
92
- class: "tab-button special",
93
- onClick: m
94
- }, [
95
- b(u, { loading: I.loading }, {
96
- default: d(() => [
97
- k(c.$slots, "tabButton3", {}, void 0, !0)
98
- ]),
99
- _: 3
100
- }, 8, ["loading"])
101
- ]),
102
- f("div", Re, [
103
- k(c.$slots, "tabTips3", {}, void 0, !0)
104
- ])
105
- ]),
106
- _: 3
107
- })
108
- ]),
109
- _: 3
110
- }, 8, ["modelValue"])
111
- ]);
112
- };
113
- }
114
- }), xe = /* @__PURE__ */ V(Pe, [["__scopeId", "data-v-079a0fee"]]), De = { class: "account-wrap" }, Qe = /* @__PURE__ */ q({
115
- __name: "index",
116
- props: {
117
- activeTabName: {
118
- type: String,
119
- default: ""
120
- },
121
- isClickLogin: {
122
- type: Boolean,
123
- default: !1
124
- }
125
- },
126
- emits: ["handleLoginFormChange"],
127
- setup(I, { emit: T }) {
128
- const _ = I, l = se({
129
- account: "",
130
- password: ""
131
- }), m = se({
132
- account: [
133
- { required: !0, message: "请输入账号", trigger: "blur" }
134
- ],
135
- password: [
136
- { required: !0, message: "请输入密码", trigger: "blur" }
137
- ]
138
- }), w = U(null), c = T;
139
- return W(() => _.isClickLogin, (v) => {
140
- var u;
141
- v && (_ == null ? void 0 : _.activeTabName) === "account" && ((u = w.value) == null || u.validate((h) => {
142
- var r;
143
- for (let p in l)
144
- l.hasOwnProperty(p) && (l[p] = (r = l[p]) == null ? void 0 : r.trim());
145
- c("handleLoginFormChange", h, h ? l : null);
146
- }));
147
- }, {
148
- immediate: !0
149
- }), W(() => _.activeTabName, (v) => {
150
- var u;
151
- v === "account" && ((u = w.value) == null || u.resetFields());
152
- }), (v, u) => {
153
- const h = M("svg-icon"), r = M("el-input"), p = M("el-form-item"), K = M("el-form");
154
- return O(), F("div", De, [
155
- b(K, {
156
- model: l,
157
- rules: m,
158
- ref_key: "formRef",
159
- ref: w
160
- }, {
161
- default: d(() => [
162
- b(p, {
163
- label: "",
164
- prop: "account"
165
- }, {
166
- default: d(() => [
167
- b(r, {
168
- class: "account-input",
169
- modelValue: l.account,
170
- "onUpdate:modelValue": u[0] || (u[0] = (S) => l.account = S),
171
- placeholder: "请输入账号",
172
- clearable: ""
173
- }, {
174
- prefix: d(() => [
175
- b(h, {
176
- name: "account",
177
- style: { width: "15px", height: "15px" }
178
- })
179
- ]),
180
- _: 1
181
- }, 8, ["modelValue"])
182
- ]),
183
- _: 1
184
- }),
185
- b(p, {
186
- label: "",
187
- prop: "password"
188
- }, {
189
- default: d(() => [
190
- b(r, {
191
- class: "account-input",
192
- modelValue: l.password,
193
- "onUpdate:modelValue": u[1] || (u[1] = (S) => l.password = S),
194
- type: "password",
195
- placeholder: "请输入密码",
196
- "show-password": "",
197
- clearable: ""
198
- }, {
199
- prefix: d(() => [
200
- b(h, {
201
- name: "password",
202
- style: { width: "15px", height: "15px" }
203
- })
204
- ]),
205
- _: 1
206
- }, 8, ["modelValue"])
207
- ]),
208
- _: 1
209
- })
210
- ]),
211
- _: 1
212
- }, 8, ["model", "rules"])
213
- ]);
214
- };
215
- }
216
- }), Fe = /* @__PURE__ */ V(Qe, [["__scopeId", "data-v-48037c0f"]]);
217
- function Oe(I) {
218
- return ne({
219
- url: "http://192.168.124.108:20013/api/face/face-verify",
220
- method: "post",
221
- data: I
222
- });
223
- }
224
- const Ve = { class: "account-wrap" }, Je = { class: "video-wrap" }, $e = /* @__PURE__ */ q({
225
- __name: "index",
226
- props: {
227
- systemKey: { default: "" },
228
- activeTabName: { default: "" },
229
- isClickLogin: { type: Boolean, default: !1 }
230
- },
231
- emits: ["handleLoginFormChange"],
232
- setup(I, { emit: T }) {
233
- const _ = I, l = T, m = U(null), w = U(null);
234
- let c = !1;
235
- const v = async (r) => {
236
- if (!r)
237
- return;
238
- const p = new FormData();
239
- p.set("file", r), _.systemKey && p.set("systemKey", _.systemKey), console.log("Face Recognition", _.systemKey);
240
- const K = await Oe(p), { data: S } = K || {}, { match: N, account: R, password: D } = S;
241
- if (!N) {
242
- E.error("识别失败,请重新识别!");
243
- return;
244
- }
245
- l("handleLoginFormChange", !0, {
246
- account: R,
247
- password: D
248
- });
249
- }, u = () => {
250
- if (!w.value || !m.value)
251
- return;
252
- const r = w.value, p = r.getContext("2d"), K = m.value;
253
- r.width = 200, r.height = 200;
254
- const S = K.videoWidth || 640, N = K.videoHeight || 480, R = Math.min(200 / S, 200 / N), D = S * R, G = N * R, j = (200 - D) / 2, H = (200 - G) / 2;
255
- p == null || p.drawImage(K, 0, 0, S, N, j, H, D, G), r.toBlob((Z) => {
256
- if (Z) {
257
- const z = new File([Z], "face.png", { type: "image/png" });
258
- v(z);
259
- }
260
- }, "image/png");
261
- }, h = async () => {
262
- if (!m.value || c)
263
- return;
264
- const r = m.value;
265
- try {
266
- const p = await navigator.mediaDevices.getUserMedia({
267
- video: { facingMode: "user" },
268
- // 前置;后置用 'environment'
269
- audio: !1
270
- });
271
- if (r) {
272
- const K = r;
273
- K.srcObject = p, c = !0;
274
- }
275
- } catch (p) {
276
- E.warning("摄像头失败: " + p.message);
277
- }
278
- };
279
- return W(() => _.activeTabName, (r) => {
280
- r === "face" && !c && h();
281
- }), (r, p) => (O(), F("div", Ve, [
282
- f("div", Je, [
283
- f("video", {
284
- class: "face-video",
285
- ref_key: "videoRef",
286
- ref: m,
287
- id: "v",
288
- autoplay: "",
289
- playsinline: ""
290
- }, null, 512)
291
- ]),
292
- f("button", {
293
- class: "face-screenshot",
294
- onClick: u
295
- }, "人脸识别"),
296
- f("canvas", {
297
- ref_key: "canvasRef",
298
- ref: w,
299
- id: "canvas"
300
- }, null, 512)
301
- ]));
302
- }
303
- }), Xe = /* @__PURE__ */ V($e, [["__scopeId", "data-v-0c1a330a"]]), qe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAd9JREFUWEftl71OAkEQx/97QC8XEj+iiTGexo/OnvgE0ChPIIXHQwgP4amxsYZGnkCtpbAxxiyJFEqCJie1yK7ZixhUuNtZYkLUa2/+M7+ZnbnbYTB87P3bIpi1BWCt34UEzpkUF35huWjimpmIlCbp8TMGbA7RX/uus27i2xjI9rgMC+i7jpFvI5EC+XEg2+NlSKTBMKmTuS5QlB2ApgRqz66TVXGDCmmIPhh7RxGl0bXrT15pWNLjVQZkdBuwF0i3qaPAv8StMNvjDwBmdIGQwJyfd+51xn7i4GbekvE7bd8SLQUUOi3fnElR0v3GvEPvaQOpHiIDKe9SlIQlTtq7K41BwexjPosXsQNmkWCCpjYCoqRMtP0HiirY76uQBWQRS1xalhCvnW4aQDmqCmHvR6rQsB/oKIMyClDOd53KoGxTHs8IoGpSKWOgeCI29ZhfaA0EOmpMi26n+beBAIzXkanjGLemDlpkrMbepGmjNMZTFuXY9D0dSF09wE7bhaWrsKD2IV+FgNrNtilwVKCK7zo5SgDqJY0EFJPMeSos1ilAKa++ISBruhoSUNi3Z1hA2+PqyLR/uPRLvm6qJnbqkk9dg0ziEDQV8qJIcE42DRbFnkp3lSZHiRZ8WqXfAFwe+He0YFLSAAAAAElFTkSuQmCC", Ge = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAx1JREFUWEfFV01oE1EQnnmpYJRGL/6gYsGLVCoUzMGLNrO1B4sYKooXQT0JWtSK4KEHEVERPCjUHgqCQlFED4raUmP3bS0UhRQKnrTorQdFBBOkBZP97AuJbNo0+2KF7GlJ3sz3zcw3M2+Z6vxwnfHJmkAqlVrT0NCwB8BepdQuAOuJaEMxgK/M/M33/UlmfpvL5cY7Ojp+2gQXSiCdTq/IZrNniOg0gM1WTplniKi/sbHxbjwe/13NpioBrXUcwB0iarUBrnBmipnPiUh6KfslCXiet9/3/af/CFxmppQ6nEgkhiv5qkhAa90N4Ob/AC/5YOZLItK30OciAlrrAwAe24Iz8yul1A0imgPQ5ft+75LpZj4qIi+D/5cRMILLZDJejTXvcRxnwDgdGxtrzufzS9abiKZisVgiKMwyAlrr8wCu2UZvzjHzgIj0mHet9fH59uyvqnrmXhG5/bc0pZehoaFYNBpN27ZaoLY/mPk1EeUAmDnRFEJgZnZ2Nt7Z2ZkpBFA6rLXeB+B5LdEXM/ARwPZa7Jg5KSJvygi4rnuFiC7aOlJKPSCiR4lEYrw4L0aIaKWl/S3HcS6XEfA8b9T3/d2WDoxORhzHmQxk0JSv2cZeKfVunnj7whJ8ALDNwkFBpMy8Q0SOBQhMA9hkYW9sv4jIzoUEvgFYbeHAEOgFcKK9vf1JUf0tAN5b2BaOMPMvETHLrEyEtgQKTmKx2NpSP7uue4GIri6XgG0JTARDInIkkP5hs6ZrILC4BLWIkJlPicigAZyYmIjOzc19twU35yqKsJY2zGazG5PJZNY4c103SUQPayFARIvb0HYQMfOoiBwMpL8PwEkiMkPMkAl9Kg4i21HMzGdF5F4JxfO8TwA+Axg33RGGzsyVR3GxnUKXETM3iUih5lrrFiK6T0TdRPQCwCoLApWXkTG0WceRSKS1ra1tugSUSqWa5397RkRbwsBD13ExqqoXEqXUYD6fvx6JRLYCOEREXQDWWYCb9q1+IQkIq35XsoC46ncpDWSiftfyEom6fpgEhVW3TzMbdS/nTOi34XKc29j+AXyzojCfNKqJAAAAAElFTkSuQmCC", Ze = { class: "card-wrap" }, Ye = { class: "card-icon card" }, We = { class: "card-input" }, je = { class: "card-icon info" }, He = /* @__PURE__ */ q({
304
- __name: "index",
305
- props: {
306
- activeTabName: {
307
- type: String,
308
- default: ""
309
- }
310
- },
311
- emits: ["handleCardInput"],
312
- setup(I, { emit: T }) {
313
- const _ = I, l = U(""), m = T, w = (c) => {
314
- m("handleCardInput", c == null ? void 0 : c.trim());
315
- };
316
- return W(() => _.activeTabName, (c) => {
317
- c && (l.value = "");
318
- }), (c, v) => {
319
- const u = M("el-image"), h = M("el-input");
320
- return O(), F("div", Ze, [
321
- f("div", Ye, [
322
- b(u, {
323
- src: Q(qe),
324
- fit: "contain"
325
- }, null, 8, ["src"])
326
- ]),
327
- f("div", We, [
328
- b(h, {
329
- modelValue: l.value,
330
- "onUpdate:modelValue": v[0] || (v[0] = (r) => l.value = r),
331
- onChange: w,
332
- clearable: ""
333
- }, null, 8, ["modelValue"])
334
- ]),
335
- f("div", je, [
336
- b(u, {
337
- src: Q(Ge),
338
- fit: "contain"
339
- }, null, 8, ["src"])
340
- ])
341
- ]);
342
- };
343
- }
344
- }), ze = /* @__PURE__ */ V(He, [["__scopeId", "data-v-f5ac8fa1"]]);
345
- function ea() {
346
- return ne({
347
- url: "/api/sysAuth/login",
348
- method: "post",
349
- data: {
350
- account: "superadmin",
351
- password: "1c8e7623312244c1feb677732278fb8b2af6af1a5335fdaebbdb2720137b372b7871292d11165b83b2967b9c39fa37027d63d37a2f36d764257b566dcfa99f334faa8995301601aec549adf39aef8d89c8788da03a9164937a5f73af20a15ea60d47c7cf01cf",
352
- tenantId: -1,
353
- code: "",
354
- codeId: 0
355
- }
356
- });
357
- }
358
- const aa = { class: "login-wrap" }, ta = { class: "login-body" }, sa = { class: "login-body-item left" }, na = { class: "title" }, oa = { class: "login-body-item right" }, ca = /* @__PURE__ */ q({
359
- __name: "index",
360
- props: {
361
- oldSystemKey: {}
362
- },
363
- emits: ["change"],
364
- setup(I, { emit: T }) {
365
- const _ = we(), l = de(ue), { systemKey: m, systemInfo: w, loginUserInfo: c } = pe(l), v = U({
366
- // sysCTitle: 'INSOFWORKS',
367
- sysCTitle: "",
368
- sysETitle: "",
369
- // sysETitle: 'Dynamic Test Information System',
370
- loginTitle: "账户密码登录",
371
- tabs: [
372
- {
373
- name: "密码登录",
374
- btnLabel: "登录",
375
- tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
376
- },
377
- {
378
- name: "人脸识别",
379
- btnLabel: "人脸识别",
380
- tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
381
- },
382
- {
383
- name: "刷卡登录",
384
- btnLabel: "登录",
385
- tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
386
- }
387
- ]
388
- }), u = U("account"), h = U(!1), r = U(!1), p = () => {
389
- h.value = !0;
390
- }, K = (a) => {
391
- h.value = !1, ae(a);
392
- }, S = (a, t) => {
393
- h.value = !1, a && ae(t);
394
- }, N = (a) => me(a), R = (a) => {
395
- let t;
396
- const s = be(a), n = ve(s), y = he(n), A = Ae(y, "parentPath");
397
- return t = _e(A), t;
398
- }, D = (a, t) => {
399
- var n, y, A;
400
- const s = (t == null ? void 0 : t.userRoles) ?? (t == null ? void 0 : t.角色名称);
401
- try {
402
- if (t.layer && ((n = t == null ? void 0 : t.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN")
403
- return "superAdmin";
404
- if (Array.isArray(s)) {
405
- if ((s == null ? void 0 : s.length) === 1) {
406
- const o = a == null ? void 0 : a.find((e) => (e == null ? void 0 : e.roleName) === (s == null ? void 0 : s[0]) || e.角色名称 === (s == null ? void 0 : s[0])), C = N(o), i = R(o == null ? void 0 : o[C]);
407
- return o && i && Array.isArray(i) ? o ? i == null ? void 0 : i.flatMap((e) => e.checkedButtons) : [] : [];
408
- }
409
- if ((s == null ? void 0 : s.length) > 1) {
410
- let o = a == null ? void 0 : a.filter((e) => s == null ? void 0 : s.includes(e.roleName || (e == null ? void 0 : e.角色名称)));
411
- const C = N(o == null ? void 0 : o[0]), i = (A = (y = o == null ? void 0 : o.map((e) => Array.isArray(e == null ? void 0 : e[C]) ? e == null ? void 0 : e[C] : [])) == null ? void 0 : y.flat()) == null ? void 0 : A.flatMap((e) => e.checkedButtons);
412
- return (i == null ? void 0 : i.length) === 0 ? E.error("该用户没有权限,请联系管理员") : new Set(i);
413
- }
414
- }
415
- if (typeof s == "string") {
416
- const o = a == null ? void 0 : a.find((e) => (e == null ? void 0 : e.roleName) === s || (e == null ? void 0 : e.角色名称) === s), C = N(o), i = R(o == null ? void 0 : o[C]);
417
- return o && i && Array.isArray(i) ? o ? i == null ? void 0 : i.flatMap((e) => e.checkedButtons) : [] : [];
418
- }
419
- } catch (o) {
420
- throw new Error(o);
421
- }
422
- }, G = async (a) => {
423
- var t, s;
424
- try {
425
- let n = [];
426
- const y = await X({
427
- key: {
428
- // systemKey: user?.systemKey,
429
- systemKey: m.value ? m.value : a == null ? void 0 : a.systemKey,
430
- // pageKey: '/系统管理/角色管理',
431
- pageKey: "系统管理/角色管理",
432
- type: "data"
433
- }
434
- });
435
- if (y.data.code === 200) {
436
- const A = (s = (t = y.data) == null ? void 0 : t.result) == null ? void 0 : s.map((o) => o.value.tableData);
437
- n = D(A, a);
438
- }
439
- if (n)
440
- return Array.isArray(n) ? Array.from(n) : n;
441
- throw E.error("获取用户权限失败,请联系管理员"), new Error("获取用户权限失败,请联系管理员");
442
- } catch (n) {
443
- throw E.error("获取用户权限失败,请联系管理员"), new Error(n);
444
- }
445
- }, j = async (a) => {
446
- var t, s, n, y, A, o, C;
447
- try {
448
- let i = [], e, P, J;
449
- m.value ? J = {
450
- // pageKey: '/系统管理/用户管理',
451
- pageKey: "系统管理/用户管理",
452
- type: "data",
453
- // 通过electron传递的值获取模型key,解决多账号导入同一模型,账号名重复权限失败问题
454
- systemKey: m.value
455
- } : J = {
456
- // pageKey: '/系统管理/用户管理',
457
- pageKey: "系统管理/用户管理",
458
- type: "data"
459
- };
460
- const te = await X({
461
- key: J
462
- });
463
- let Y;
464
- if (!sessionStorage.getItem("systemKey") || sessionStorage.getItem("systemKey") === "" ? Y = await X({
465
- key: {
466
- layer: "superAdmin"
467
- // systemKey:sessionStorage.getItem('tenantKey')
468
- }
469
- }) : Y = await X({
470
- key: {
471
- layer: "superAdmin",
472
- systemKey: sessionStorage.getItem("systemKey")
473
- }
474
- }), te.data.code === 200 && Y.data.code === 200) {
475
- const ie = (s = (t = Y.data) == null ? void 0 : t.result) == null ? void 0 : s.map((g) => {
476
- var L, $;
477
- return {
478
- ...g.value.tableData,
479
- layer: (L = g.key) == null ? void 0 : L.layer,
480
- systemKey: ($ = g == null ? void 0 : g.key) == null ? void 0 : $.systemKey,
481
- id: g.id
482
- };
483
- }), le = (y = (n = te.data) == null ? void 0 : n.result) == null ? void 0 : y.map((g) => {
484
- var L, $;
485
- return {
486
- ...g.value.tableData,
487
- layer: (L = g.key) == null ? void 0 : L.layer,
488
- systemKey: ($ = g == null ? void 0 : g.key) == null ? void 0 : $.systemKey,
489
- id: g.id
490
- };
491
- }), ee = [...ie, ...le];
492
- if (e = ee == null ? void 0 : ee.find((g) => (g == null ? void 0 : g.account) === (a == null ? void 0 : a.account) || (g == null ? void 0 : g.账号) === (a == null ? void 0 : a.account)), e) {
493
- if (((A = e.layer) == null ? void 0 : A.toUpperCase()) !== "SUPERADMIN" && (!(e != null && e.状态) || (e == null ? void 0 : e.状态) === "禁用" || (e == null ? void 0 : e.status) === "禁用")) {
494
- E.error("该用户已被禁用,请联系管理员"), r.value = !1;
495
- return;
496
- }
497
- i = await G(e);
498
- const { privateKey: g } = await l.getModelSecretAsync(e);
499
- let L;
500
- if (e.password ? L = ((o = e.layer) == null ? void 0 : o.toUpperCase()) === "SUPERADMIN" ? e.password : ye(e.password, g) : L = ((C = e.layer) == null ? void 0 : C.toUpperCase()) === "SUPERADMIN" ? e.password : ge, (a == null ? void 0 : a.password) === L)
501
- P = e;
502
- else
503
- throw P = null, E.error("输入的密码错误,请重新输入"), r.value = !1, new Error("输入的密码错误,请重新输入");
504
- } else
505
- return E.error("该用户不存在,请重新输入");
506
- }
507
- return P && i ? {
508
- matchedUser: P,
509
- userAuthority: i
510
- } : void 0;
511
- } catch (i) {
512
- throw new Error(i);
513
- }
514
- }, H = async (a) => {
515
- var s, n, y;
516
- const t = await j(a);
517
- if (t != null && t.matchedUser) {
518
- l.setLoginUserInfo(t.matchedUser), sessionStorage.setItem("authority", JSON.stringify(t.userAuthority));
519
- const A = ((n = (s = t.matchedUser) == null ? void 0 : s.layer) == null ? void 0 : n.toUpperCase()) === "SUPERADMIN";
520
- return sessionStorage.setItem("isSuperAdmin", JSON.stringify(A)), sessionStorage.setItem("systemKey", m.value ? m.value : (y = t.matchedUser) == null ? void 0 : y.systemKey), await Z(t.matchedUser), !0;
521
- } else
522
- throw r.value = !1, new Error("该用户数据处理失败,请联系管理员");
523
- }, Z = async (a) => {
524
- var s, n, y, A, o, C, i, e, P;
525
- const t = await X({
526
- key: {
527
- // pageKey: '/user',
528
- layer: "superAdmin",
529
- systemKey: m.value ? m.value : a == null ? void 0 : a.systemKey
530
- // systemKey: user?.systemKey
531
- }
532
- });
533
- if (t.data.code === 200 && (s = t.data) != null && s.result && Array.isArray((n = t.data) == null ? void 0 : n.result) && ((A = (y = t.data) == null ? void 0 : y.result) == null ? void 0 : A.length) > 0) {
534
- const J = (P = (e = (i = (C = (o = t.data) == null ? void 0 : o.result) == null ? void 0 : C[0]) == null ? void 0 : i.value) == null ? void 0 : e.tableData) == null ? void 0 : P.account;
535
- l.setSuperAdminInfo({
536
- account: J
537
- });
538
- }
539
- }, z = async () => {
540
- var a, t, s;
541
- try {
542
- const n = await ea();
543
- return ((a = n == null ? void 0 : n.data) == null ? void 0 : a.code) === 200 ? (sessionStorage.setItem("loginToken", (s = (t = n.data) == null ? void 0 : t.result) == null ? void 0 : s.accessToken), !0) : !1;
544
- } catch (n) {
545
- E.error(n);
546
- }
547
- }, oe = async () => {
548
- var a, t, s;
549
- try {
550
- const n = await fe.post("http://139.196.154.85:20024/api/sysAuth/login", {
551
- account: "superadmin",
552
- password: "9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",
553
- codeId: 0,
554
- code: ""
555
- });
556
- return ((a = n == null ? void 0 : n.data) == null ? void 0 : a.code) === 200 ? (sessionStorage.setItem("magicToken", (s = (t = n.data) == null ? void 0 : t.result) == null ? void 0 : s.accessToken), !0) : !1;
557
- } catch (n) {
558
- E.error(n);
559
- }
560
- }, ae = async (a) => {
561
- var y, A, o, C;
562
- r.value = !0;
563
- let t = [H(a), z(), oe()];
564
- const s = await Promise.all(t);
565
- (s == null ? void 0 : s.every((i) => i)) && (await Ce(), _.push("/"), l.setLogRecordAsync({
566
- type: "登录",
567
- data: {
568
- account: ((y = c.value) == null ? void 0 : y.account) ?? ((A = c.value) == null ? void 0 : A.账号),
569
- userName: ((o = c.value) == null ? void 0 : o.姓名) || ((C = c.value) == null ? void 0 : C.userName) || "未知"
570
- }
571
- }, "/login", "login"));
572
- }, ce = (a) => {
573
- u.value = a, h.value = !1, r.value = !1;
574
- }, re = (a) => /^[\u4e00-\u9fa5\s,。!?《》“”【】]+$/.test(a);
575
- return (a, t) => (O(), F("div", aa, [
576
- f("div", ta, [
577
- f("div", sa, [
578
- b(Ee, { class: "login-left-bg" }, {
579
- img: d(() => {
580
- var s, n, y, A;
581
- return [
582
- f("div", na, [
583
- f("div", null, B(((s = Q(w)) == null ? void 0 : s.EnglishName) || "INSOFWORKS"), 1),
584
- f("div", null, B((n = Q(w)) != null && n.chineseName && re((y = Q(w)) == null ? void 0 : y.chineseName) ? (A = Q(w)) == null ? void 0 : A.chineseName : "工业软件集成开发平台"), 1)
585
- ]),
586
- t[0] || (t[0] = f("div", { class: "divide-line" }, null, -1))
587
- ];
588
- }),
589
- _: 1
590
- })
591
- ]),
592
- f("div", oa, [
593
- b(xe, {
594
- loading: r.value,
595
- onClickLogin: p,
596
- onHandleTabChange: ce
597
- }, {
598
- title: d(() => [
599
- x(B(v.value.loginTitle), 1)
600
- ]),
601
- tabLabel1: d(() => [
602
- x(B(v.value.tabs[0].name), 1)
603
- ]),
604
- tabContent1: d(() => [
605
- b(Fe, {
606
- activeTabName: u.value,
607
- isClickLogin: h.value,
608
- onHandleLoginFormChange: S
609
- }, null, 8, ["activeTabName", "isClickLogin"])
610
- ]),
611
- tabButton1: d(() => [
612
- x(B(v.value.tabs[0].btnLabel), 1)
613
- ]),
614
- tabLabel2: d(() => [
615
- x(B(v.value.tabs[1].name), 1)
616
- ]),
617
- tabContent2: d(() => [
618
- b(Xe, {
619
- systemKey: a.oldSystemKey,
620
- activeTabName: u.value,
621
- isClickLogin: h.value,
622
- onHandleLoginFormChange: S
623
- }, null, 8, ["systemKey", "activeTabName", "isClickLogin"])
624
- ]),
625
- tabButton2: d(() => [
626
- x(B(v.value.tabs[1].btnLabel), 1)
627
- ]),
628
- tabLabel3: d(() => [
629
- x(B(v.value.tabs[2].name), 1)
630
- ]),
631
- tabContent3: d(() => [
632
- b(ze, {
633
- activeTabName: u.value,
634
- onHandleCardInput: K
635
- }, null, 8, ["activeTabName"])
636
- ]),
637
- tabButton3: d(() => [
638
- x(B(v.value.tabs[2].btnLabel), 1)
639
- ]),
640
- _: 1
641
- }, 8, ["loading"])
642
- ])
643
- ])
644
- ]));
645
- }
646
- }), fa = /* @__PURE__ */ V(ca, [["__scopeId", "data-v-2579cbdb"]]);
647
- export {
648
- fa as default
649
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),k=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BWh0GUiI.cjs"),a=require("./index-Dv1G67_Q.cjs"),w=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),B="ElUpload";class T extends Error{constructor(o,s,i,p){super(o),this.name="UploadAjaxError",this.status=s,this.method=i,this.url=p}}function _(r,o,s){let i;return s.response?i=`${s.response.error||s.response}`:s.responseText?i=`${s.responseText}`:i=`fail to ${o.method} ${r} ${s.status}`,new T(i,s.status,o.method,r)}function R(r){const o=r.responseText||r.response;if(!o)return o;try{return JSON.parse(o)}catch{return o}}const U=r=>{typeof XMLHttpRequest>"u"&&a.throwError(B,"XMLHttpRequest is undefined");const o=new XMLHttpRequest,s=r.action;o.upload&&o.upload.addEventListener("progress",t=>{const c=t;c.percent=t.total>0?t.loaded/t.total*100:0,r.onProgress(c)});const i=new FormData;if(r.data)for(const[t,c]of Object.entries(r.data))a.isArray$1(c)&&c.length?i.append(t,...c):i.append(t,c);i.append(r.filename,r.file,r.file.name),o.addEventListener("error",()=>{r.onError(_(s,r,o))}),o.addEventListener("load",()=>{if(o.status<200||o.status>=300)return r.onError(_(s,r,o));r.onSuccess(R(o))}),o.open(r.method,s,!0),r.withCredentials&&"withCredentials"in o&&(o.withCredentials=!0);const p=r.headers||{};if(p instanceof Headers)p.forEach((t,c)=>o.setRequestHeader(c,t));else for(const[t,c]of Object.entries(p))a.isNil(c)||o.setRequestHeader(t,String(c));return o.send(i),o},h=["text","picture","picture-card"];let D=1;const C=()=>Date.now()+D++,N=a.buildProps({action:{type:String,default:"#"},headers:{type:a.definePropType(Object)},method:{type:String,default:"post"},data:{type:a.definePropType([Object,Function,Promise]),default:()=>a.mutable({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:a.definePropType(Array),default:()=>a.mutable([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:h,default:"text"},httpRequest:{type:a.definePropType(Function),default:U},disabled:Boolean,limit:Number}),L=a.buildProps({...N,beforeUpload:{type:a.definePropType(Function),default:a.NOOP},beforeRemove:{type:a.definePropType(Function)},onRemove:{type:a.definePropType(Function),default:a.NOOP},onChange:{type:a.definePropType(Function),default:a.NOOP},onPreview:{type:a.definePropType(Function),default:a.NOOP},onSuccess:{type:a.definePropType(Function),default:a.NOOP},onProgress:{type:a.definePropType(Function),default:a.NOOP},onError:{type:a.definePropType(Function),default:a.NOOP},onExceed:{type:a.definePropType(Function),default:a.NOOP},crossorigin:{type:a.definePropType(String)}}),F={style:{"text-align":"left"}},j={class:"cropper-warp"},A={class:"cropper-warp-left"},q=["src"],$={class:"cropper-warp-right"},H={class:"cropper-warp-right-item"},z={class:"cropper-warp-right-value"},M=["src"],X={class:"cropper-warp-right-item"},J={class:"cropper-warp-right-value"},G=["src"],K={class:"dialog-footer"},Q=e.defineComponent({__name:"index",props:{title:{type:String,default:""}},emits:["submitImage","deleteImage"],setup(r,{expose:o,emit:s}){const i=s,p=e.ref(),t=e.reactive({isShowDialog:!1,cropperImg:"",cropperImgBase64:"",cropper:null}),c=async l=>{if(!l)return;let n=window.URL||window.webkitURL;t.cropperImg=n.createObjectURL(l),t.isShowDialog=!0,e.nextTick(()=>{v()})},u=()=>{var l;(l=t.cropper)==null||l.destroy(),t.isShowDialog=!1},f=()=>{u()},g=async()=>{const l=await y();i("submitImage",{file:l}),u()},d=async()=>{i("deleteImage")},v=()=>{const l=document.querySelector(".cropper-warp-left-img");l&&l.setAttribute("crossOrigin","anonymous"),t.cropper=new k.Cropper(l,{viewMode:1,dragMode:"none",initialAspectRatio:1,aspectRatio:1,preview:".before",background:!0,autoCropArea:1,checkCrossOrigin:!1,crop:()=>{t.cropperImgBase64=t.cropper.getCroppedCanvas().toDataURL("image/jpeg")}})},y=()=>new Promise(l=>{t.cropper.getCroppedCanvas().toBlob(n=>{l(n)})}),x=async l=>{let n=window.URL||window.webkitURL;t.cropperImg=n.createObjectURL(l.raw),t.cropper.replace(t.cropperImg)},E=l=>{p.value.clearFiles();const n=l[0];n.uid=C(),p.value.handleStart(n)};return o({openDialog:c}),(l,n)=>{const P=e.resolveComponent("ele-Edit"),V=e.resolveComponent("el-icon"),m=e.resolveComponent("el-button"),S=e.resolveComponent("el-upload"),I=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(I,{modelValue:t.isShowDialog,"onUpdate:modelValue":n[0]||(n[0]=O=>t.isShowDialog=O),width:"769px","before-close":f},{header:e.withCtx(()=>[e.createElementVNode("div",F,[e.createVNode(V,{size:"16",style:{"margin-right":"3px",display:"inline","vertical-align":"middle"}},{default:e.withCtx(()=>[e.createVNode(P)]),_:1}),e.createElementVNode("span",null,e.toDisplayString(r.title),1)])]),footer:e.withCtx(()=>[e.createElementVNode("span",K,[e.createVNode(S,{class:"avatar-uploader",ref_key:"uploadSignRef",ref:p,accept:".jpg,.png",limit:1,"show-file-list":!1,"auto-upload":!1,"on-change":x,"on-exceed":E},{trigger:e.withCtx(()=>[e.createVNode(m,{type:"info",icon:"ele-Picture"},{default:e.withCtx(()=>n[4]||(n[4]=[e.createTextVNode("选择图片")])),_:1,__:[4]})]),default:e.withCtx(()=>[e.createVNode(m,{onClick:d,type:"danger",icon:"ele-Picture",style:{"margin-left":"8px"}},{default:e.withCtx(()=>n[5]||(n[5]=[e.createTextVNode("删除图片")])),_:1,__:[5]})]),_:1},512),e.createElementVNode("div",null,[e.createVNode(m,{onClick:f,id:"themeBorderButton"},{default:e.withCtx(()=>n[6]||(n[6]=[e.createTextVNode("取 消")])),_:1,__:[6]}),e.createVNode(m,{onClick:g,id:"themeButton"},{default:e.withCtx(()=>n[7]||(n[7]=[e.createTextVNode("确 定")])),_:1,__:[7]})])])]),default:e.withCtx(()=>[e.createElementVNode("div",j,[e.createElementVNode("div",A,[e.createElementVNode("img",{src:t.cropperImg,class:"cropper-warp-left-img"},null,8,q)]),e.createElementVNode("div",$,[n[3]||(n[3]=e.createElementVNode("div",{class:"cropper-warp-right-title"},"预览",-1)),e.createElementVNode("div",H,[e.createElementVNode("div",z,[e.createElementVNode("img",{src:t.cropperImgBase64,class:"cropper-warp-right-value-img"},null,8,M)]),n[1]||(n[1]=e.createElementVNode("div",{class:"cropper-warp-right-label"},"100 x 100",-1))]),e.createElementVNode("div",X,[e.createElementVNode("div",J,[e.createElementVNode("img",{src:t.cropperImgBase64,class:"cropper-warp-right-value-img cropper-size"},null,8,G)]),n[2]||(n[2]=e.createElementVNode("div",{class:"cropper-warp-right-label"},"50 x 50",-1))])])])]),_:1},8,["modelValue"])])}}}),W=w._export_sfc(Q,[["__scopeId","data-v-5d760968"]]),Y=e.defineComponent({__name:"index",props:{avatarUrl:{type:String,default:""},avatarBlob:{type:Blob,default:""},size:{type:[String,Number],default:"large"},showCropper:{type:Boolean,default:!0},banClick:{type:Boolean,default:!1}},emits:["submitImage","deleteImage","clickAvatar"],setup(r,{emit:o}){const s=r,i=e.ref(),p=e.ref(null),t=o,c=()=>!0,u=async()=>{var d;s!=null&&s.banClick||(t("clickAvatar",s.avatarUrl),(d=i.value)==null||d.openDialog(s.avatarBlob))},f=async d=>{t("submitImage",d)},g=async()=>{t("deleteImage")};return(d,v)=>{const y=e.resolveComponent("el-avatar");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(y,{src:r.avatarUrl,onClick:u,fit:"cover",size:r.size,ref_key:"avatarRef",ref:p,style:{background:"var(--user-avatar-bg)"},alt:"头像查找失败",onError:c},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"avatarDefault",{},void 0,!0)]),_:3},8,["src","size"]),e.withDirectives(e.createVNode(W,{ref_key:"cropperDialogRef",ref:i,title:"更改头像",avatarUrl:r.avatarUrl,onSubmitImage:f,onDeleteImage:g},null,8,["avatarUrl"]),[[e.vShow,r.showCropper]])],64)}}}),b=w._export_sfc(Y,[["__scopeId","data-v-d7aa160e"]]),Z=Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"}));exports.genFileId=C;exports.index=Z;exports.ssAvatar=b;exports.uploadBaseProps=N;exports.uploadListTypes=h;exports.uploadProps=L;