ss-component-new 1.3.698 → 1.3.700

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 (91) hide show
  1. package/dist/JSEncrypt-B36c1iN5.js +1983 -0
  2. package/dist/MTLLoader-DzQM5Czw.js +657 -0
  3. package/dist/URDFLoader-CPXooEPU.js +2299 -0
  4. package/dist/animationData-DOIhMG9C.js +83 -0
  5. package/dist/array-lig-X3M9.js +1045 -0
  6. package/dist/clone-Dp_gc9ll.js +8 -0
  7. package/dist/config.js +1 -1
  8. package/dist/eleIcon-qStmsM1q.js +29 -0
  9. package/dist/fileUtil-UOt_otFo.js +20 -0
  10. package/dist/iconfont-DwCBmDct.js +1026 -0
  11. package/dist/icons/svg/functionList.svg +1 -0
  12. package/dist/icons/svg/method.svg +1 -0
  13. package/dist/index-11kpzK0A.js +209 -0
  14. package/dist/index-B-AFi1eL.js +873 -0
  15. package/dist/index-B0H3C7WG.js +103 -0
  16. package/dist/index-BDRDpsgF.js +25297 -0
  17. package/dist/{index-BKK_dL6t.js → index-BHtNKL1L.js} +1 -1
  18. package/dist/index-BJ3RS3n_.js +63004 -0
  19. package/dist/index-BJLCuYEK.js +84 -0
  20. package/dist/index-BbyrFzEO.js +93 -0
  21. package/dist/index-Bn1_Pbpm.js +98 -0
  22. package/dist/index-BniHrGik.js +107 -0
  23. package/dist/index-BooO2Bml.js +78 -0
  24. package/dist/index-Bw3sTXPI.js +8993 -0
  25. package/dist/index-C7sOKXGv.js +48 -0
  26. package/dist/index-CGUz8yrZ.js +20503 -0
  27. package/dist/index-CGi0g-VN.js +627 -0
  28. package/dist/index-CV_jQDcg.js +9 -0
  29. package/dist/index-CWOXvFfD.js +44 -0
  30. package/dist/{index-BKoAuSBh.js → index-ChNfRlIP.js} +18 -223
  31. package/dist/index-CjlKFGAF.js +470 -0
  32. package/dist/index-CydXQbtX.js +622 -0
  33. package/dist/index-D9XVxZlg.js +411 -0
  34. package/dist/index-DAJxL40d.js +55 -0
  35. package/dist/index-DBsEVMiM.js +201 -0
  36. package/dist/index-DG4hoOWt.js +665 -0
  37. package/dist/index-DUbk5m5P.js +99 -0
  38. package/dist/index-Ds6m_4JJ.js +28500 -0
  39. package/dist/index-DupTchhl.js +1000 -0
  40. package/dist/index-DxduRnLV.js +93 -0
  41. package/dist/index-DyCq_odP.js +331 -0
  42. package/dist/index-TDMzk3L7.js +83 -0
  43. package/dist/index-UB_oCdlo.js +62 -0
  44. package/dist/index-VV2Ao7jZ.js +119 -0
  45. package/dist/index-YjBTGOkO.js +61 -0
  46. package/dist/index-erE4kNF5.js +30 -0
  47. package/dist/index-iY5h1bpA.js +572 -0
  48. package/dist/index-jbOjjV0j.js +447 -0
  49. package/dist/index-rlStojTL.js +52 -0
  50. package/dist/index-uF-ibwG0.js +9 -0
  51. package/dist/index.vue_vue_type_script_setup_true_lang-DRzriV-s.js +55 -0
  52. package/dist/index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-Mr9QL-WU.js +137877 -0
  53. package/dist/isString-0ZglyOfu.js +8 -0
  54. package/dist/localIcon-D5UoFBU5.js +76 -0
  55. package/dist/main-Cepry4zn.js +502 -0
  56. package/dist/menuIndex-BB0uVPRX.js +159 -0
  57. package/dist/obj/model.mtl +42 -0
  58. package/dist/obj/model.obj +26110 -0
  59. package/dist/request-1RPa2bBn.js +9048 -0
  60. package/dist/ss-component.css +8 -2
  61. package/dist/ss-component.js +64 -28
  62. package/dist/ss-component2.js +75 -15
  63. package/dist/ss-component3.js +1 -1
  64. package/dist/threeModel-DcUyC6Vh.js +1109 -0
  65. package/dist/threePreview-CbGqCMch.js +2810 -0
  66. package/dist/threeSceneView-BDyFpkq-.js +1290 -0
  67. package/dist/threeSceneViewForCPMPIP-DUSufDRq.js +539 -0
  68. package/dist/threeTrackPathView-yLEUuGXc.js +620 -0
  69. package/dist/threeViewerHost-BXdZ6Wgi.js +233 -0
  70. package/dist/urdfTree-C6mx4T9t.js +254 -0
  71. package/dist/workpieceTreePanel-DjR9f2D1.js +559 -0
  72. package/package.json +6 -8
  73. package/public/config.js +1 -1
  74. package/public/icons/svg/functionList.svg +1 -0
  75. package/public/icons/svg/method.svg +1 -0
  76. package/public/obj/model.mtl +42 -0
  77. package/public/obj/model.obj +26110 -0
  78. package/dist/header-R5IfoKTX.js +0 -4029
  79. package/dist/index-B9isvN1d.js +0 -182
  80. package/dist/index-BKKAvqK3.js +0 -1043
  81. package/dist/index-By70dOai.js +0 -50
  82. package/dist/index-Cc1nPEpp.js +0 -49044
  83. package/dist/index-RUwH0Fls.js +0 -365
  84. package/dist/index.vue_vue_type_script_setup_true_lang-Dj5jZLRU.js +0 -11484
  85. package/dist/menu-Blo579Ai.js +0 -5217
  86. /package/dist/icons/svg/{update.svg → Update.svg} +0 -0
  87. /package/dist/icons/svg/{table-close.svg → tableClose.svg} +0 -0
  88. /package/dist/icons/svg/{table-expand.svg → tableExpand.svg} +0 -0
  89. /package/public/icons/svg/{update.svg → Update.svg} +0 -0
  90. /package/public/icons/svg/{table-close.svg → tableClose.svg} +0 -0
  91. /package/public/icons/svg/{table-expand.svg → tableExpand.svg} +0 -0
@@ -1,1043 +0,0 @@
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
- };