ss-component-new 1.3.696 → 1.3.698

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