ss-component-new 1.3.696 → 1.3.697

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