ss-component-new 1.3.699 → 1.3.701

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 (84) hide show
  1. package/dist/JSEncrypt-B36c1iN5.js +1983 -0
  2. package/dist/MTLLoader-DC5Di-ql.js +657 -0
  3. package/dist/URDFLoader-BqfNCQLH.js +2299 -0
  4. package/dist/animationData-BNQm3jIu.js +83 -0
  5. package/dist/array-BXz16Xf3.js +1045 -0
  6. package/dist/clone-Dp_gc9ll.js +8 -0
  7. package/dist/config.js +1 -1
  8. package/dist/eleIcon-qStmsM1q.js +29 -0
  9. package/dist/fileUtil-UOt_otFo.js +20 -0
  10. package/dist/iconfont-B2Moc_Mi.js +1026 -0
  11. package/dist/icons/svg/functionList.svg +1 -0
  12. package/dist/icons/svg/method.svg +1 -0
  13. package/dist/index-11kpzK0A.js +209 -0
  14. package/dist/index-B0H3C7WG.js +103 -0
  15. package/dist/index-B3OyTnhN.js +119 -0
  16. package/dist/{index-BKK_dL6t.js → index-BHtNKL1L.js} +1 -1
  17. package/dist/index-Bbwy0rRx.js +411 -0
  18. package/dist/index-BbyrFzEO.js +93 -0
  19. package/dist/index-Bk_HGMFV.js +20578 -0
  20. package/dist/index-BooO2Bml.js +78 -0
  21. package/dist/index-BpgixwCC.js +83 -0
  22. package/dist/index-Bw3sTXPI.js +8993 -0
  23. package/dist/index-Bz8vSCfN.js +84 -0
  24. package/dist/index-CAm10a_p.js +107 -0
  25. package/dist/index-CGVmScXF.js +470 -0
  26. package/dist/index-CGi0g-VN.js +627 -0
  27. package/dist/index-CTD1ZbEQ.js +873 -0
  28. package/dist/index-CV_jQDcg.js +9 -0
  29. package/dist/index-CWOXvFfD.js +44 -0
  30. package/dist/{index-BKoAuSBh.js → index-ChNfRlIP.js} +18 -223
  31. package/dist/index-Ch_Lf81f.js +63004 -0
  32. package/dist/index-CjsQSzV6.js +572 -0
  33. package/dist/index-Ck_oTi7E.js +25297 -0
  34. package/dist/index-CydXQbtX.js +622 -0
  35. package/dist/index-DAJxL40d.js +55 -0
  36. package/dist/index-DBsEVMiM.js +201 -0
  37. package/dist/index-DG4hoOWt.js +665 -0
  38. package/dist/index-DUbk5m5P.js +99 -0
  39. package/dist/index-Ds6m_4JJ.js +28500 -0
  40. package/dist/index-DupTchhl.js +1000 -0
  41. package/dist/index-DyCq_odP.js +331 -0
  42. package/dist/index-DynGQqC3.js +93 -0
  43. package/dist/index-UB_oCdlo.js +62 -0
  44. package/dist/index-YjBTGOkO.js +61 -0
  45. package/dist/index-ib1DMe8v.js +98 -0
  46. package/dist/index-jbOjjV0j.js +447 -0
  47. package/dist/index-ke-XsSa7.js +30 -0
  48. package/dist/index-lPVVum78.js +48 -0
  49. package/dist/index-rlStojTL.js +52 -0
  50. package/dist/index-uF-ibwG0.js +9 -0
  51. package/dist/{index-DzkvwqGK.js → index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-D9DRZPyb.js} +113595 -105662
  52. package/dist/isString-0ZglyOfu.js +8 -0
  53. package/dist/localIcon-D5UoFBU5.js +76 -0
  54. package/dist/main-1uytY6Nj.js +502 -0
  55. package/dist/menuIndex-BB0uVPRX.js +159 -0
  56. package/dist/request-1RPa2bBn.js +9048 -0
  57. package/dist/ss-component.css +8 -2
  58. package/dist/ss-component.js +64 -28
  59. package/dist/ss-component2.js +75 -15
  60. package/dist/ss-component3.js +1 -1
  61. package/dist/threeModel-BEmaHjYZ.js +1109 -0
  62. package/dist/threePreview-D7ncVQLV.js +2810 -0
  63. package/dist/threeSceneView-ClvW-1FZ.js +1290 -0
  64. package/dist/threeSceneViewForCPMPIP-D7zwZFBW.js +539 -0
  65. package/dist/threeTrackPathView-VySiazeH.js +620 -0
  66. package/dist/threeViewerHost-sD-GHVTI.js +233 -0
  67. package/dist/urdfTree-B-7DfE39.js +254 -0
  68. package/dist/workpieceTreePanel-DB06G34P.js +559 -0
  69. package/package.json +6 -8
  70. package/public/config.js +1 -1
  71. package/public/icons/svg/functionList.svg +1 -0
  72. package/public/icons/svg/method.svg +1 -0
  73. package/dist/index-BqyJXXmI.js +0 -213
  74. package/dist/index-CTEz1Xq6.js +0 -182
  75. package/dist/index-CrIVk8ml.js +0 -1044
  76. package/dist/index-D1ebCzlM.js +0 -50
  77. package/dist/menu-ZnhLgjWw.js +0 -5218
  78. package/dist/origin-Bs605dr-.js +0 -11468
  79. /package/dist/icons/svg/{update.svg → Update.svg} +0 -0
  80. /package/dist/icons/svg/{table-close.svg → tableClose.svg} +0 -0
  81. /package/dist/icons/svg/{table-expand.svg → tableExpand.svg} +0 -0
  82. /package/public/icons/svg/{update.svg → Update.svg} +0 -0
  83. /package/public/icons/svg/{table-close.svg → tableClose.svg} +0 -0
  84. /package/public/icons/svg/{table-expand.svg → tableExpand.svg} +0 -0
@@ -0,0 +1,1000 @@
1
+ import { createElementBlock as F, openBlock as L, createElementVNode as s, renderSlot as E, defineComponent as W, ref as _, resolveComponent as b, createVNode as t, withCtx as a, unref as P, reactive as le, computed as G, onMounted as me, createBlock as J, resolveDirective as ye, createCommentVNode as ae, withDirectives as he, normalizeClass as ie, toDisplayString as S, Transition as Ce, watch as ee, Fragment as we, createTextVNode as O, onBeforeUnmount as Te } from "vue";
2
+ import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ import { b as ne, p as Q, s as se, u as ke, a as Ue, l as Ve, e as Le, v as $e } from "./index-Bw3sTXPI.js";
4
+ import { _ as Y } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
5
+ import { c as qe, a as Ae, f as Ie, b as re, E as ce } from "./request-1RPa2bBn.js";
6
+ import "./JSEncrypt-B36c1iN5.js";
7
+ import { u as De } from "./index-UB_oCdlo.js";
8
+ import { useRouter as Fe } from "vue-router";
9
+ import { l as xe } from "./index-DAJxL40d.js";
10
+ const Re = {}, Ne = { class: "left-wrap" }, Se = { class: "left-bg" };
11
+ function Ee(y, T) {
12
+ return L(), F("div", Ne, [
13
+ s("div", Se, [
14
+ E(y.$slots, "img", {}, void 0, !0)
15
+ ])
16
+ ]);
17
+ }
18
+ const Me = /* @__PURE__ */ H(Re, [["render", Ee], ["__scopeId", "data-v-9b7ee6c9"]]), Z = {
19
+ ACCOUNT: "account",
20
+ FACE: "face"
21
+ }, Be = { class: "right-wrap" }, Oe = { class: "tab-content" }, Pe = { class: "tab-tips" }, He = { class: "tab-content" }, je = { class: "tab-tips" }, Ke = /* @__PURE__ */ W({
22
+ __name: "index",
23
+ props: {
24
+ tabList: {
25
+ type: Array,
26
+ default: []
27
+ },
28
+ loading: {
29
+ type: Boolean,
30
+ default: !1
31
+ }
32
+ },
33
+ emits: ["clickLogin", "handleTabChange"],
34
+ setup(y, { emit: T }) {
35
+ const m = _(Z.ACCOUNT), p = T, C = () => {
36
+ p("clickLogin", m.value);
37
+ }, e = (v) => {
38
+ p("handleTabChange", v);
39
+ };
40
+ return (v, k) => {
41
+ const f = b("el-button"), U = b("el-tab-pane"), V = b("el-tabs");
42
+ return L(), F("div", Be, [
43
+ t(V, {
44
+ modelValue: m.value,
45
+ "onUpdate:modelValue": k[0] || (k[0] = (w) => m.value = w),
46
+ class: "right-tabs",
47
+ onTabChange: e
48
+ }, {
49
+ default: a(() => [
50
+ t(U, {
51
+ name: P(Z).ACCOUNT
52
+ }, {
53
+ label: a(() => [
54
+ E(v.$slots, "tabLabel1", {}, void 0, !0)
55
+ ]),
56
+ default: a(() => [
57
+ s("div", Oe, [
58
+ E(v.$slots, "tabContent1", {}, void 0, !0)
59
+ ]),
60
+ s("div", {
61
+ class: "tab-button special",
62
+ onClick: C
63
+ }, [
64
+ t(f, { loading: y.loading }, {
65
+ default: a(() => [
66
+ E(v.$slots, "tabButton1", {}, void 0, !0)
67
+ ]),
68
+ _: 3
69
+ }, 8, ["loading"])
70
+ ]),
71
+ s("div", Pe, [
72
+ E(v.$slots, "tabTips1", {}, void 0, !0)
73
+ ])
74
+ ]),
75
+ _: 3
76
+ }, 8, ["name"]),
77
+ t(U, {
78
+ name: P(Z).FACE
79
+ }, {
80
+ label: a(() => [
81
+ E(v.$slots, "tabLabel2", {}, void 0, !0)
82
+ ]),
83
+ default: a(() => [
84
+ s("div", He, [
85
+ E(v.$slots, "tabContent2", {}, void 0, !0)
86
+ ]),
87
+ s("div", je, [
88
+ E(v.$slots, "tabTips2", {}, void 0, !0)
89
+ ])
90
+ ]),
91
+ _: 3
92
+ }, 8, ["name"])
93
+ ]),
94
+ _: 3
95
+ }, 8, ["modelValue"])
96
+ ]);
97
+ };
98
+ }
99
+ }), ze = /* @__PURE__ */ H(Ke, [["__scopeId", "data-v-8b1962f0"]]), Qe = /^[a-z][a-z0-9+.-]*:\/\//i, ue = (y) => Qe.test(y);
100
+ function We(y) {
101
+ ue(y) || (y = `http://${y}`);
102
+ try {
103
+ const T = new URL(y);
104
+ return {
105
+ host: T.hostname,
106
+ // 域名:example.com
107
+ port: T.port || null
108
+ // 端口:8080(默认端口返回空字符串,转为 null)
109
+ };
110
+ } catch {
111
+ return {
112
+ host: null,
113
+ port: null
114
+ };
115
+ }
116
+ }
117
+ const Xe = () => ({ initUrlInfo: () => ({
118
+ host: null,
119
+ port: null
120
+ }), hasProtocol: ue, generateUrl: (m) => {
121
+ const { host: p, port: C } = m;
122
+ if (!p)
123
+ return null;
124
+ let e = `${p}`;
125
+ return ue(p) || (e = `http://${e}`), C && (e = `${e}:${C}`), e;
126
+ } }), Ge = { class: "body-wrapper" }, Je = { class: "api-form-wrapper" }, Ye = { class: "edit-footer" }, Ze = { class: "footer-right" }, et = /* @__PURE__ */ W({
127
+ __name: "index",
128
+ emits: ["updateApiUrl"],
129
+ setup(y, { expose: T, emit: m }) {
130
+ const p = m, C = ne(Q), { systemUrl: e } = se(C), { initUrlInfo: v, generateUrl: k } = Xe(), f = _(v()), U = _(), V = le({
131
+ host: [
132
+ { required: !0, message: "请输入职位名称", trigger: "blur" }
133
+ ]
134
+ }), w = G(() => e.value || "http://222.92.178.198:63002"), i = () => {
135
+ f.value = We(w.value);
136
+ };
137
+ me(() => {
138
+ i();
139
+ });
140
+ const o = _(!1), n = () => {
141
+ i(), o.value = !0;
142
+ }, r = () => {
143
+ o.value = !1;
144
+ }, u = () => {
145
+ r();
146
+ }, A = async () => {
147
+ var d;
148
+ await ((d = U.value) == null ? void 0 : d.validate());
149
+ const h = k(f.value);
150
+ p("updateApiUrl", h), u();
151
+ };
152
+ return T({
153
+ openDialog: n,
154
+ handleClose: u
155
+ }), (h, d) => {
156
+ const x = b("el-input"), R = b("el-form-item"), M = b("el-col"), c = b("el-row"), $ = b("el-form"), N = b("el-dialog");
157
+ return L(), J(N, {
158
+ class: "api-form-dialog",
159
+ modelValue: o.value,
160
+ "onUpdate:modelValue": d[2] || (d[2] = (I) => o.value = I),
161
+ "before-close": u,
162
+ "destroy-on-close": "",
163
+ "show-close": !1
164
+ }, {
165
+ header: a(() => d[3] || (d[3] = [])),
166
+ default: a(() => [
167
+ s("div", Ge, [
168
+ s("div", Je, [
169
+ t($, {
170
+ class: "api-edit-form",
171
+ ref_key: "apiFormRef",
172
+ ref: U,
173
+ model: f.value,
174
+ rules: V
175
+ }, {
176
+ default: a(() => [
177
+ t(c, { gutter: 20 }, {
178
+ default: a(() => [
179
+ t(M, { span: 12 }, {
180
+ default: a(() => [
181
+ t(R, {
182
+ prop: "host",
183
+ label: "主机名",
184
+ "label-position": "top"
185
+ }, {
186
+ default: a(() => [
187
+ t(x, {
188
+ modelValue: f.value.host,
189
+ "onUpdate:modelValue": d[0] || (d[0] = (I) => f.value.host = I),
190
+ "aria-label": "主机名",
191
+ placeholder: "主机名"
192
+ }, null, 8, ["modelValue"])
193
+ ]),
194
+ _: 1
195
+ })
196
+ ]),
197
+ _: 1
198
+ }),
199
+ t(M, { span: 12 }, {
200
+ default: a(() => [
201
+ t(R, {
202
+ prop: "port",
203
+ label: "端口",
204
+ "label-position": "top"
205
+ }, {
206
+ default: a(() => [
207
+ t(x, {
208
+ modelValue: f.value.port,
209
+ "onUpdate:modelValue": d[1] || (d[1] = (I) => f.value.port = I),
210
+ "aria-label": "端口",
211
+ placeholder: "端口"
212
+ }, null, 8, ["modelValue"])
213
+ ]),
214
+ _: 1
215
+ })
216
+ ]),
217
+ _: 1
218
+ })
219
+ ]),
220
+ _: 1
221
+ })
222
+ ]),
223
+ _: 1
224
+ }, 8, ["model", "rules"])
225
+ ])
226
+ ])
227
+ ]),
228
+ footer: a(() => [
229
+ s("div", Ye, [
230
+ d[4] || (d[4] = s("div", { class: "footer-left" }, null, -1)),
231
+ s("div", Ze, [
232
+ t(Y, {
233
+ class: "cancel",
234
+ emptyColor: !0,
235
+ onClickTrigger: u,
236
+ modelValue: "取消",
237
+ buttonType: "info"
238
+ }),
239
+ t(Y, {
240
+ class: "confirm",
241
+ emptyColor: !0,
242
+ onClickTrigger: A,
243
+ modelValue: "确定",
244
+ buttonType: "primary"
245
+ })
246
+ ])
247
+ ])
248
+ ]),
249
+ _: 1
250
+ }, 8, ["modelValue"]);
251
+ };
252
+ }
253
+ }), tt = /* @__PURE__ */ H(et, [["__scopeId", "data-v-20c1098b"]]), ot = { class: "dialog-header" }, at = { class: "dialog-subtitle" }, lt = {
254
+ key: 0,
255
+ class: "restart-panel"
256
+ }, st = { class: "restart-title" }, nt = { class: "restart-subtitle" }, it = {
257
+ key: 1,
258
+ class: "dialog-body"
259
+ }, rt = { class: "db-type-selector" }, ct = { key: "sqlite" }, ut = { key: "pgsql" }, dt = {
260
+ key: 0,
261
+ class: "dialog-footer"
262
+ }, pt = 6e4, pe = 2e3, mt = /* @__PURE__ */ W({
263
+ __name: "index",
264
+ setup(y, { expose: T }) {
265
+ const m = ne(Q), { systemUrl: p } = se(m), C = G(() => p.value || "http://222.92.178.198:63002"), e = le({
266
+ databaseType: "sqlite",
267
+ sqliteDir: "sqlite-data",
268
+ user: "",
269
+ host: "",
270
+ database: "",
271
+ password: "",
272
+ port: "5432"
273
+ }), v = G(() => e.databaseType === "sqlite" ? {
274
+ sqliteDir: [{ required: !0, message: "请输入数据库目录", trigger: "blur" }]
275
+ } : {
276
+ host: [{ required: !0, message: "请输入主机地址", trigger: "blur" }],
277
+ port: [{ required: !0, message: "请输入端口号", trigger: "blur" }],
278
+ database: [{ required: !0, message: "请输入数据库名", trigger: "blur" }],
279
+ user: [{ required: !0, message: "请输入用户名", trigger: "blur" }]
280
+ }), k = _(null), f = _(!1), U = _(!1), V = _(!1), w = _(!1), i = _(0), o = _("running"), n = _(1);
281
+ let r = null;
282
+ const u = G(() => o.value === "success" ? "重启成功!" : o.value === "timeout" ? "连接超时" : "正在应用配置并等待服务重新启动中..."), A = G(() => o.value === "success" ? "服务已恢复,配置已生效" : o.value === "timeout" ? "超过最大等待时间,请手动检查服务状态" : "请稍后" + ".".repeat(n.value));
283
+ let h = null, d = null;
284
+ const x = () => {
285
+ r && (clearInterval(r), r = null);
286
+ }, R = () => {
287
+ h && (clearInterval(h), h = null), d && (clearInterval(d), d = null), x();
288
+ }, M = () => {
289
+ i.value = 0;
290
+ let g = 0;
291
+ h = setInterval(() => {
292
+ g += 100;
293
+ const l = 90 * (1 - Math.exp(-g / 8e3));
294
+ i.value = Math.min(parseFloat(l.toFixed(1)), 90);
295
+ }, 100);
296
+ }, c = () => {
297
+ n.value = 1, r = setInterval(() => {
298
+ n.value = n.value >= 3 ? 1 : n.value + 1;
299
+ }, 500);
300
+ }, $ = () => {
301
+ x();
302
+ const g = setInterval(() => {
303
+ i.value = Math.min(i.value + 3, 100), i.value >= 100 && (clearInterval(g), o.value = "success");
304
+ }, 30);
305
+ }, N = () => {
306
+ let g = 0;
307
+ d = setInterval(async () => {
308
+ if (g += pe, g >= pt) {
309
+ R(), o.value = "timeout";
310
+ return;
311
+ }
312
+ try {
313
+ const { data: l } = await re.get(C.value + "/platform/config/db", { timeout: 3e3 });
314
+ (l == null ? void 0 : l.code) === 200 && (R(), $());
315
+ } catch {
316
+ }
317
+ }, pe);
318
+ }, I = async () => {
319
+ try {
320
+ U.value = !0;
321
+ const { data: g } = await re.get(C.value + "/platform/config/db");
322
+ if ((g == null ? void 0 : g.code) === 200 && (g != null && g.data)) {
323
+ const l = g.data;
324
+ e.databaseType = l.databaseType === "pgsql" ? "pgsql" : "sqlite", e.sqliteDir = l.sqliteDir || "sqlite-data", e.user = l.user || "", e.host = l.host || "", e.database = l.database || "", e.password = l.password || "", e.port = String(l.port || 5432);
325
+ }
326
+ } catch {
327
+ } finally {
328
+ U.value = !1;
329
+ }
330
+ }, te = () => {
331
+ w.value = !1, o.value = "running", i.value = 0, n.value = 1, f.value = !0, I();
332
+ }, X = () => {
333
+ R(), f.value = !1;
334
+ }, j = () => X(), fe = (g) => {
335
+ w.value || g();
336
+ }, ve = async () => {
337
+ var g, l, K;
338
+ await ((g = k.value) == null ? void 0 : g.validate());
339
+ try {
340
+ V.value = !0;
341
+ const D = { databaseType: e.databaseType };
342
+ e.databaseType === "sqlite" ? D.sqliteDir = e.sqliteDir.trim() : (D.user = e.user.trim(), D.host = e.host.trim(), D.database = e.database.trim(), D.password = e.password, D.port = Number(e.port)), await re.post(C.value + "/platform/config/db", D), w.value = !0, o.value = "running", M(), c(), setTimeout(N, 1e3);
343
+ } catch (D) {
344
+ const B = ((K = (l = D == null ? void 0 : D.response) == null ? void 0 : l.data) == null ? void 0 : K.message) || "保存失败,请重试";
345
+ ce.error(B);
346
+ } finally {
347
+ V.value = !1;
348
+ }
349
+ };
350
+ return T({ openDialog: te, handleClose: j }), (g, l) => {
351
+ const K = b("el-icon"), D = b("el-progress"), B = b("el-input"), z = b("el-form-item"), oe = b("el-col"), de = b("el-row"), ge = b("el-form"), _e = b("el-dialog"), be = ye("loading");
352
+ return L(), J(_e, {
353
+ class: "db-config-dialog",
354
+ modelValue: f.value,
355
+ "onUpdate:modelValue": l[8] || (l[8] = (q) => f.value = q),
356
+ "before-close": fe,
357
+ "close-on-click-modal": !w.value,
358
+ "close-on-press-escape": !w.value,
359
+ "destroy-on-close": "",
360
+ "show-close": !1,
361
+ width: "480px"
362
+ }, {
363
+ header: a(() => [
364
+ s("div", ot, [
365
+ l[9] || (l[9] = s("span", { class: "dialog-title" }, "数据库配置", -1)),
366
+ s("span", at, S(w.value ? "" : "修改后服务将自动重启"), 1)
367
+ ])
368
+ ]),
369
+ default: a(() => [
370
+ w.value ? (L(), F("div", lt, [
371
+ o.value !== "running" ? (L(), F("div", {
372
+ key: 0,
373
+ class: ie(["restart-icon-wrap", { success: o.value === "success", error: o.value === "timeout" }])
374
+ }, [
375
+ o.value === "success" ? (L(), J(K, {
376
+ key: 0,
377
+ class: "restart-icon"
378
+ }, {
379
+ default: a(() => [
380
+ t(P(qe))
381
+ ]),
382
+ _: 1
383
+ })) : (L(), J(K, {
384
+ key: 1,
385
+ class: "restart-icon"
386
+ }, {
387
+ default: a(() => [
388
+ t(P(Ae))
389
+ ]),
390
+ _: 1
391
+ }))
392
+ ], 2)) : ae("", !0),
393
+ s("div", st, S(u.value), 1),
394
+ s("div", nt, S(A.value), 1),
395
+ t(D, {
396
+ class: "restart-progress",
397
+ percentage: Math.round(i.value),
398
+ status: o.value === "success" ? "success" : o.value === "timeout" ? "exception" : "",
399
+ "stroke-width": 10
400
+ }, null, 8, ["percentage", "status"]),
401
+ o.value === "success" || o.value === "timeout" ? (L(), J(Y, {
402
+ key: 1,
403
+ class: "restart-close-btn",
404
+ emptyColor: !0,
405
+ onClickTrigger: X,
406
+ modelValue: o.value === "success" ? "确定" : "关闭",
407
+ buttonType: o.value === "success" ? "primary" : "info"
408
+ }, null, 8, ["modelValue", "buttonType"])) : ae("", !0)
409
+ ])) : he((L(), F("div", it, [
410
+ s("div", rt, [
411
+ s("div", {
412
+ class: ie(["db-type-card", { active: e.databaseType === "sqlite" }]),
413
+ onClick: l[0] || (l[0] = (q) => e.databaseType = "sqlite")
414
+ }, l[10] || (l[10] = [
415
+ s("span", { class: "db-label" }, "SQLite", -1),
416
+ s("span", { class: "db-desc" }, "本地文件数据库", -1)
417
+ ]), 2),
418
+ s("div", {
419
+ class: ie(["db-type-card", { active: e.databaseType === "pgsql" }]),
420
+ onClick: l[1] || (l[1] = (q) => e.databaseType = "pgsql")
421
+ }, l[11] || (l[11] = [
422
+ s("span", { class: "db-label" }, "PostgreSQL", -1),
423
+ s("span", { class: "db-desc" }, "远程关系型数据库", -1)
424
+ ]), 2)
425
+ ]),
426
+ t(ge, {
427
+ ref_key: "formRef",
428
+ ref: k,
429
+ model: e,
430
+ rules: v.value,
431
+ "label-position": "top",
432
+ class: "config-form"
433
+ }, {
434
+ default: a(() => [
435
+ t(Ce, {
436
+ name: "fade-slide",
437
+ mode: "out-in"
438
+ }, {
439
+ default: a(() => [
440
+ e.databaseType === "sqlite" ? (L(), F("div", ct, [
441
+ t(z, {
442
+ label: "数据库目录",
443
+ prop: "sqliteDir"
444
+ }, {
445
+ default: a(() => [
446
+ t(B, {
447
+ modelValue: e.sqliteDir,
448
+ "onUpdate:modelValue": l[2] || (l[2] = (q) => e.sqliteDir = q),
449
+ placeholder: "例如:sqlite-data",
450
+ clearable: ""
451
+ }, {
452
+ prefix: a(() => [
453
+ t(K, null, {
454
+ default: a(() => [
455
+ t(P(Ie))
456
+ ]),
457
+ _: 1
458
+ })
459
+ ]),
460
+ _: 1
461
+ }, 8, ["modelValue"]),
462
+ l[12] || (l[12] = s("div", { class: "field-hint" }, "相对于后端 exe 所在目录的路径", -1))
463
+ ]),
464
+ _: 1,
465
+ __: [12]
466
+ })
467
+ ])) : (L(), F("div", ut, [
468
+ t(de, { gutter: 16 }, {
469
+ default: a(() => [
470
+ t(oe, { span: 16 }, {
471
+ default: a(() => [
472
+ t(z, {
473
+ label: "主机地址",
474
+ prop: "host"
475
+ }, {
476
+ default: a(() => [
477
+ t(B, {
478
+ modelValue: e.host,
479
+ "onUpdate:modelValue": l[3] || (l[3] = (q) => e.host = q),
480
+ placeholder: "127.0.0.1",
481
+ clearable: ""
482
+ }, null, 8, ["modelValue"])
483
+ ]),
484
+ _: 1
485
+ })
486
+ ]),
487
+ _: 1
488
+ }),
489
+ t(oe, { span: 8 }, {
490
+ default: a(() => [
491
+ t(z, {
492
+ label: "端口",
493
+ prop: "port"
494
+ }, {
495
+ default: a(() => [
496
+ t(B, {
497
+ modelValue: e.port,
498
+ "onUpdate:modelValue": l[4] || (l[4] = (q) => e.port = q),
499
+ placeholder: "5432",
500
+ clearable: ""
501
+ }, null, 8, ["modelValue"])
502
+ ]),
503
+ _: 1
504
+ })
505
+ ]),
506
+ _: 1
507
+ })
508
+ ]),
509
+ _: 1
510
+ }),
511
+ t(z, {
512
+ label: "数据库名",
513
+ prop: "database"
514
+ }, {
515
+ default: a(() => [
516
+ t(B, {
517
+ modelValue: e.database,
518
+ "onUpdate:modelValue": l[5] || (l[5] = (q) => e.database = q),
519
+ placeholder: "new_insofworks_admin",
520
+ clearable: ""
521
+ }, null, 8, ["modelValue"])
522
+ ]),
523
+ _: 1
524
+ }),
525
+ t(de, { gutter: 16 }, {
526
+ default: a(() => [
527
+ t(oe, { span: 12 }, {
528
+ default: a(() => [
529
+ t(z, {
530
+ label: "用户名",
531
+ prop: "user"
532
+ }, {
533
+ default: a(() => [
534
+ t(B, {
535
+ modelValue: e.user,
536
+ "onUpdate:modelValue": l[6] || (l[6] = (q) => e.user = q),
537
+ placeholder: "postgres",
538
+ clearable: ""
539
+ }, null, 8, ["modelValue"])
540
+ ]),
541
+ _: 1
542
+ })
543
+ ]),
544
+ _: 1
545
+ }),
546
+ t(oe, { span: 12 }, {
547
+ default: a(() => [
548
+ t(z, {
549
+ label: "密码",
550
+ prop: "password"
551
+ }, {
552
+ default: a(() => [
553
+ t(B, {
554
+ modelValue: e.password,
555
+ "onUpdate:modelValue": l[7] || (l[7] = (q) => e.password = q),
556
+ type: "password",
557
+ "show-password": "",
558
+ clearable: ""
559
+ }, null, 8, ["modelValue"])
560
+ ]),
561
+ _: 1
562
+ })
563
+ ]),
564
+ _: 1
565
+ })
566
+ ]),
567
+ _: 1
568
+ })
569
+ ]))
570
+ ]),
571
+ _: 1
572
+ })
573
+ ]),
574
+ _: 1
575
+ }, 8, ["model", "rules"])
576
+ ])), [
577
+ [be, U.value]
578
+ ])
579
+ ]),
580
+ footer: a(() => [
581
+ w.value ? ae("", !0) : (L(), F("div", dt, [
582
+ t(Y, {
583
+ emptyColor: !0,
584
+ onClickTrigger: j,
585
+ modelValue: "取消",
586
+ buttonType: "info"
587
+ }),
588
+ t(Y, {
589
+ emptyColor: !0,
590
+ loading: V.value,
591
+ onClickTrigger: ve,
592
+ modelValue: "保存并重启",
593
+ buttonType: "primary"
594
+ }, null, 8, ["loading"])
595
+ ]))
596
+ ]),
597
+ _: 1
598
+ }, 8, ["modelValue", "close-on-click-modal", "close-on-press-escape"]);
599
+ };
600
+ }
601
+ }), ft = /* @__PURE__ */ H(mt, [["__scopeId", "data-v-01b4eb9b"]]), vt = { class: "account-wrap" }, gt = { class: "extra-operate" }, _t = /* @__PURE__ */ W({
602
+ __name: "index",
603
+ props: {
604
+ activeTabName: {
605
+ type: String,
606
+ default: ""
607
+ },
608
+ isClickLogin: {
609
+ type: Boolean,
610
+ default: !1
611
+ }
612
+ },
613
+ emits: ["handleLoginFormChange", "updateApiUrl"],
614
+ setup(y, { emit: T }) {
615
+ const m = y, p = le({
616
+ account: "",
617
+ password: ""
618
+ }), C = le({
619
+ account: [
620
+ { required: !0, message: "请输入账号", trigger: "blur" }
621
+ ],
622
+ password: [
623
+ { required: !0, message: "请输入密码", trigger: "blur" }
624
+ ]
625
+ }), e = _(null), v = T;
626
+ ee(() => m.isClickLogin, (i) => {
627
+ var o;
628
+ i && (m == null ? void 0 : m.activeTabName) === "account" && ((o = e.value) == null || o.validate((n) => {
629
+ var r;
630
+ for (let u in p)
631
+ p.hasOwnProperty(u) && (p[u] = (r = p[u]) == null ? void 0 : r.trim());
632
+ v("handleLoginFormChange", n, n ? p : null);
633
+ }));
634
+ }, {
635
+ immediate: !0
636
+ }), ee(() => m.activeTabName, (i) => {
637
+ var o;
638
+ i === "account" && ((o = e.value) == null || o.resetFields());
639
+ });
640
+ const k = _(), f = () => {
641
+ var i, o;
642
+ (o = (i = k.value) == null ? void 0 : i.openDialog) == null || o.call(i);
643
+ }, U = (i) => {
644
+ v("updateApiUrl", i);
645
+ }, V = _(), w = () => {
646
+ var i, o;
647
+ (o = (i = V.value) == null ? void 0 : i.openDialog) == null || o.call(i);
648
+ };
649
+ return (i, o) => {
650
+ const n = b("svg-icon"), r = b("el-input"), u = b("el-form-item"), A = b("el-form"), h = b("el-link");
651
+ return L(), F(we, null, [
652
+ s("div", vt, [
653
+ t(A, {
654
+ model: p,
655
+ rules: C,
656
+ ref_key: "formRef",
657
+ ref: e
658
+ }, {
659
+ default: a(() => [
660
+ t(u, {
661
+ label: "",
662
+ prop: "account"
663
+ }, {
664
+ default: a(() => [
665
+ t(r, {
666
+ class: "account-input",
667
+ modelValue: p.account,
668
+ "onUpdate:modelValue": o[0] || (o[0] = (d) => p.account = d),
669
+ placeholder: "请输入账号",
670
+ clearable: ""
671
+ }, {
672
+ prefix: a(() => [
673
+ t(n, {
674
+ name: "account",
675
+ style: { width: "15px", height: "15px" }
676
+ })
677
+ ]),
678
+ _: 1
679
+ }, 8, ["modelValue"])
680
+ ]),
681
+ _: 1
682
+ }),
683
+ t(u, {
684
+ label: "",
685
+ prop: "password"
686
+ }, {
687
+ default: a(() => [
688
+ t(r, {
689
+ class: "account-input",
690
+ modelValue: p.password,
691
+ "onUpdate:modelValue": o[1] || (o[1] = (d) => p.password = d),
692
+ type: "password",
693
+ placeholder: "请输入密码",
694
+ "show-password": "",
695
+ clearable: ""
696
+ }, {
697
+ prefix: a(() => [
698
+ t(n, {
699
+ name: "password",
700
+ style: { width: "15px", height: "15px" }
701
+ })
702
+ ]),
703
+ _: 1
704
+ }, 8, ["modelValue"])
705
+ ]),
706
+ _: 1
707
+ })
708
+ ]),
709
+ _: 1
710
+ }, 8, ["model", "rules"]),
711
+ s("div", gt, [
712
+ t(h, {
713
+ class: "api-button",
714
+ type: "primary",
715
+ onClick: f
716
+ }, {
717
+ default: a(() => o[2] || (o[2] = [
718
+ O("接口地址")
719
+ ])),
720
+ _: 1,
721
+ __: [2]
722
+ }),
723
+ t(h, {
724
+ class: "db-button",
725
+ type: "primary",
726
+ onClick: w
727
+ }, {
728
+ default: a(() => o[3] || (o[3] = [
729
+ O("数据库配置")
730
+ ])),
731
+ _: 1,
732
+ __: [3]
733
+ })
734
+ ])
735
+ ]),
736
+ t(tt, {
737
+ ref_key: "apiFormDialogRef",
738
+ ref: k,
739
+ onUpdateApiUrl: U
740
+ }, null, 512),
741
+ t(ft, {
742
+ ref_key: "dbConfigDialogRef",
743
+ ref: V
744
+ }, null, 512)
745
+ ], 64);
746
+ };
747
+ }
748
+ }), bt = /* @__PURE__ */ H(_t, [["__scopeId", "data-v-101a522a"]]), yt = { class: "account-wrap" }, ht = { class: "video-wrap" }, Ct = /* @__PURE__ */ W({
749
+ __name: "index",
750
+ props: {
751
+ systemKey: { default: "" },
752
+ activeTabName: { default: "" },
753
+ isClickLogin: { type: Boolean, default: !1 }
754
+ },
755
+ emits: ["handleLoginFormChange"],
756
+ setup(y, { emit: T }) {
757
+ const m = y, p = T;
758
+ ne(Q);
759
+ const { initVerify: C } = De(), e = _(null), v = _(null);
760
+ let k = !1, f = null;
761
+ const U = async (n) => {
762
+ if (!n)
763
+ return;
764
+ const r = await C(n), { data: u } = r || {}, { account: A, password: h } = (u == null ? void 0 : u.data) || {}, d = u == null ? void 0 : u.msg;
765
+ if (!A) {
766
+ ce.warning(d || "识别失败,请重新识别!");
767
+ return;
768
+ }
769
+ p("handleLoginFormChange", !0, {
770
+ account: A,
771
+ password: h
772
+ });
773
+ }, V = () => {
774
+ if (!v.value || !e.value)
775
+ return;
776
+ const n = v.value, r = n.getContext("2d"), u = e.value;
777
+ n.width = 200, n.height = 200;
778
+ const A = u.videoWidth || 640, h = u.videoHeight || 480, d = Math.min(200 / A, 200 / h), x = A * d, R = h * d, M = (200 - x) / 2, c = (200 - R) / 2;
779
+ r == null || r.drawImage(u, 0, 0, A, h, M, c, x, R), n.toBlob(($) => {
780
+ if ($) {
781
+ const N = new File([$], "face.png", { type: "image/png" });
782
+ U(N);
783
+ }
784
+ }, "image/png");
785
+ }, w = async () => {
786
+ if (!e.value || k)
787
+ return;
788
+ const n = e.value;
789
+ try {
790
+ if (f = await navigator.mediaDevices.getUserMedia({
791
+ video: { facingMode: "user" },
792
+ // 前置;后置用 'environment'
793
+ audio: !1
794
+ }), n) {
795
+ const r = n;
796
+ r.srcObject = f, k = !0;
797
+ }
798
+ } catch {
799
+ ce.warning("摄像头启动失败");
800
+ }
801
+ };
802
+ function i(n) {
803
+ if (n && (n.getTracks().forEach((r) => r.stop()), e.value)) {
804
+ const r = e.value;
805
+ r.srcObject = null;
806
+ }
807
+ }
808
+ const o = () => {
809
+ i(f), k = !1;
810
+ };
811
+ return ee(() => m.activeTabName, (n) => {
812
+ if (n !== Z.FACE) {
813
+ o();
814
+ return;
815
+ }
816
+ if (n === Z.FACE && !k) {
817
+ w();
818
+ return;
819
+ }
820
+ }), Te(() => {
821
+ o();
822
+ }), (n, r) => (L(), F("div", yt, [
823
+ s("div", ht, [
824
+ s("video", {
825
+ class: "face-video",
826
+ ref_key: "videoRef",
827
+ ref: e,
828
+ id: "v",
829
+ autoplay: "",
830
+ playsinline: ""
831
+ }, null, 512)
832
+ ]),
833
+ E(n.$slots, "default", {}, () => [
834
+ s("button", {
835
+ class: "face-screenshot",
836
+ onClick: V
837
+ }, "人脸识别")
838
+ ], !0),
839
+ s("canvas", {
840
+ ref_key: "canvasRef",
841
+ ref: v,
842
+ id: "canvas"
843
+ }, null, 512)
844
+ ]));
845
+ }
846
+ }), wt = /* @__PURE__ */ H(Ct, [["__scopeId", "data-v-b64bc91c"]]), Tt = { class: "login-wrap" }, kt = { class: "login-body" }, Ut = { class: "login-body-item left" }, Vt = { class: "title" }, Lt = { class: "first-level" }, $t = {
847
+ key: 0,
848
+ class: "logo"
849
+ }, qt = ["src"], At = { class: "english-name" }, It = { class: "login-body-item right" }, Dt = /* @__PURE__ */ W({
850
+ __name: "index",
851
+ props: {
852
+ oldSystemKey: {},
853
+ loginContent: {}
854
+ },
855
+ emits: ["change", "projectLogin", "updateApiUrl", "systemContent"],
856
+ setup(y, { emit: T }) {
857
+ const m = y, p = Fe(), C = T, e = ke(Q), v = Ue(Q), { refreshLogin: k } = se(v), f = ne(Q), { systemInfo: U, loginUserInfo: V } = se(f), w = async (c) => {
858
+ const $ = await Le({
859
+ url: c
860
+ });
861
+ return URL.createObjectURL($ == null ? void 0 : $.data);
862
+ }, i = _("");
863
+ ee(() => {
864
+ var c;
865
+ return (c = U.value) == null ? void 0 : c.logo;
866
+ }, async (c) => {
867
+ c ? i.value = await w(c) : i.value = Ve;
868
+ }, { immediate: !0 });
869
+ const o = _({
870
+ // sysCTitle: 'INSOFWORKS',
871
+ sysCTitle: "",
872
+ sysETitle: "",
873
+ // sysETitle: 'Dynamic Test Information System',
874
+ loginTitle: "账户密码登录",
875
+ tabs: [
876
+ {
877
+ name: "密码登录",
878
+ btnLabel: "登录",
879
+ tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
880
+ },
881
+ {
882
+ name: "人脸识别",
883
+ btnLabel: "人脸识别",
884
+ tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
885
+ },
886
+ {
887
+ name: "刷卡登录",
888
+ btnLabel: "登录",
889
+ tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
890
+ }
891
+ ]
892
+ }), n = _("account"), r = _(!1), u = _(!1), A = () => {
893
+ r.value = !0;
894
+ }, h = (c, $) => {
895
+ r.value = !1, c && x($);
896
+ }, d = async () => (sessionStorage.setItem("loginToken", "111"), !0);
897
+ me(async () => {
898
+ await d();
899
+ });
900
+ const x = async (c) => {
901
+ var N, I, te, X;
902
+ if (u.value = !0, await xe(c)) {
903
+ C("projectLogin", c);
904
+ let j = await $e();
905
+ C("systemContent", j == null ? void 0 : j.allMenuContents), p.push("/"), f.setLogRecordAsync({
906
+ type: "登录",
907
+ data: {
908
+ account: ((N = V.value) == null ? void 0 : N.account) ?? ((I = V.value) == null ? void 0 : I.账号),
909
+ userName: ((te = V.value) == null ? void 0 : te.姓名) || ((X = V.value) == null ? void 0 : X.userName) || "未知"
910
+ }
911
+ }, "/login", "login"), e.setHasClickEditComp(!1);
912
+ } else
913
+ u.value = !1;
914
+ u.value = !1;
915
+ };
916
+ ee(
917
+ () => m == null ? void 0 : m.loginContent,
918
+ () => {
919
+ let c = m == null ? void 0 : m.loginContent;
920
+ c != null && c.account && (c != null && c.password) && !k.value && x(c);
921
+ },
922
+ { deep: !0, immediate: !0 }
923
+ );
924
+ const R = (c) => {
925
+ n.value = c, r.value = !1, u.value = !1;
926
+ }, M = (c) => {
927
+ C("updateApiUrl", c);
928
+ };
929
+ return (c, $) => (L(), F("div", Tt, [
930
+ s("div", kt, [
931
+ s("div", Ut, [
932
+ t(Me, { class: "login-left-bg" }, {
933
+ img: a(() => {
934
+ var N, I;
935
+ return [
936
+ s("div", Vt, [
937
+ s("div", Lt, [
938
+ i.value ? (L(), F("div", $t, [
939
+ s("img", {
940
+ src: i.value,
941
+ alt: ""
942
+ }, null, 8, qt)
943
+ ])) : ae("", !0),
944
+ s("div", At, S(((N = P(U)) == null ? void 0 : N.EnglishName) || "Insofworks"), 1)
945
+ ]),
946
+ s("div", null, S(((I = P(U)) == null ? void 0 : I.chineseName) || "工业软件建模与开发系统"), 1)
947
+ ]),
948
+ $[0] || ($[0] = s("div", { class: "divide-line" }, null, -1))
949
+ ];
950
+ }),
951
+ _: 1
952
+ })
953
+ ]),
954
+ s("div", It, [
955
+ t(ze, {
956
+ loading: u.value,
957
+ onClickLogin: A,
958
+ onHandleTabChange: R
959
+ }, {
960
+ title: a(() => [
961
+ O(S(o.value.loginTitle), 1)
962
+ ]),
963
+ tabLabel1: a(() => [
964
+ O(S(o.value.tabs[0].name), 1)
965
+ ]),
966
+ tabContent1: a(() => [
967
+ t(bt, {
968
+ activeTabName: n.value,
969
+ isClickLogin: r.value,
970
+ onHandleLoginFormChange: h,
971
+ onUpdateApiUrl: M
972
+ }, null, 8, ["activeTabName", "isClickLogin"])
973
+ ]),
974
+ tabButton1: a(() => [
975
+ O(S(o.value.tabs[0].btnLabel), 1)
976
+ ]),
977
+ tabLabel2: a(() => [
978
+ O(S(o.value.tabs[1].name), 1)
979
+ ]),
980
+ tabContent2: a(() => [
981
+ t(wt, {
982
+ systemKey: c.oldSystemKey,
983
+ activeTabName: n.value,
984
+ isClickLogin: r.value,
985
+ onHandleLoginFormChange: h
986
+ }, null, 8, ["systemKey", "activeTabName", "isClickLogin"])
987
+ ]),
988
+ tabButton2: a(() => [
989
+ O(S(o.value.tabs[1].btnLabel), 1)
990
+ ]),
991
+ _: 1
992
+ }, 8, ["loading"])
993
+ ])
994
+ ])
995
+ ]));
996
+ }
997
+ }), Pt = /* @__PURE__ */ H(Dt, [["__scopeId", "data-v-43bcd58d"]]);
998
+ export {
999
+ Pt as default
1000
+ };