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