ss-component-new 1.3.792 → 1.3.793

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