ss-component-new 1.3.782 → 1.3.783
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.
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { b as
|
|
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-Bw3sTXPI.js";
|
|
4
4
|
import { _ as te } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
|
|
5
|
-
import { c as Ae, a as qe, f as Ie, b as
|
|
5
|
+
import { c as Ae, a as qe, f as Ie, b as ue, E as de } from "./request-1RPa2bBn.js";
|
|
6
6
|
import "./JSEncrypt-B36c1iN5.js";
|
|
7
7
|
import { u as Fe } from "./index-UB_oCdlo.js";
|
|
8
8
|
import { useRouter as xe } from "vue-router";
|
|
9
9
|
import { l as Re } from "./index-DAJxL40d.js";
|
|
10
10
|
const Ne = {}, Se = { class: "left-wrap" }, De = { class: "left-bg" };
|
|
11
|
-
function Ee(
|
|
12
|
-
return
|
|
11
|
+
function Ee(C, w) {
|
|
12
|
+
return $(), x("div", Se, [
|
|
13
13
|
i("div", De, [
|
|
14
|
-
D(
|
|
14
|
+
D(C.$slots, "img", {}, void 0, !0)
|
|
15
15
|
])
|
|
16
16
|
]);
|
|
17
17
|
}
|
|
18
|
-
const Me = /* @__PURE__ */
|
|
18
|
+
const Me = /* @__PURE__ */ K(Ne, [["render", Ee], ["__scopeId", "data-v-9b7ee6c9"]]), oe = {
|
|
19
19
|
ACCOUNT: "account",
|
|
20
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__ */
|
|
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
22
|
__name: "index",
|
|
23
23
|
props: {
|
|
24
24
|
tabList: {
|
|
@@ -31,38 +31,38 @@ const Me = /* @__PURE__ */ H(Ne, [["render", Ee], ["__scopeId", "data-v-9b7ee6c9
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
emits: ["clickLogin", "handleTabChange"],
|
|
34
|
-
setup(
|
|
35
|
-
const p = f(oe.ACCOUNT), d =
|
|
34
|
+
setup(C, { emit: w }) {
|
|
35
|
+
const p = f(oe.ACCOUNT), d = w, T = () => {
|
|
36
36
|
d("clickLogin", p.value);
|
|
37
37
|
}, e = (v) => {
|
|
38
38
|
d("handleTabChange", v);
|
|
39
39
|
};
|
|
40
|
-
return (v,
|
|
41
|
-
const m = b("el-button"),
|
|
42
|
-
return
|
|
43
|
-
t(
|
|
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
44
|
modelValue: p.value,
|
|
45
|
-
"onUpdate:modelValue":
|
|
45
|
+
"onUpdate:modelValue": k[0] || (k[0] = (h) => p.value = h),
|
|
46
46
|
class: "right-tabs",
|
|
47
47
|
onTabChange: e
|
|
48
48
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
t(
|
|
51
|
-
name:
|
|
49
|
+
default: a(() => [
|
|
50
|
+
t(U, {
|
|
51
|
+
name: H(oe).ACCOUNT
|
|
52
52
|
}, {
|
|
53
|
-
label:
|
|
53
|
+
label: a(() => [
|
|
54
54
|
D(v.$slots, "tabLabel1", {}, void 0, !0)
|
|
55
55
|
]),
|
|
56
|
-
default:
|
|
56
|
+
default: a(() => [
|
|
57
57
|
i("div", Be, [
|
|
58
58
|
D(v.$slots, "tabContent1", {}, void 0, !0)
|
|
59
59
|
]),
|
|
60
60
|
i("div", {
|
|
61
61
|
class: "tab-button special",
|
|
62
|
-
onClick:
|
|
62
|
+
onClick: T
|
|
63
63
|
}, [
|
|
64
|
-
t(m, { loading:
|
|
65
|
-
default:
|
|
64
|
+
t(m, { loading: C.loading }, {
|
|
65
|
+
default: a(() => [
|
|
66
66
|
D(v.$slots, "tabButton1", {}, void 0, !0)
|
|
67
67
|
]),
|
|
68
68
|
_: 3
|
|
@@ -74,13 +74,13 @@ const Me = /* @__PURE__ */ H(Ne, [["render", Ee], ["__scopeId", "data-v-9b7ee6c9
|
|
|
74
74
|
]),
|
|
75
75
|
_: 3
|
|
76
76
|
}, 8, ["name"]),
|
|
77
|
-
t(
|
|
78
|
-
name:
|
|
77
|
+
t(U, {
|
|
78
|
+
name: H(oe).FACE
|
|
79
79
|
}, {
|
|
80
|
-
label:
|
|
80
|
+
label: a(() => [
|
|
81
81
|
D(v.$slots, "tabLabel2", {}, void 0, !0)
|
|
82
82
|
]),
|
|
83
|
-
default:
|
|
83
|
+
default: a(() => [
|
|
84
84
|
i("div", je, [
|
|
85
85
|
D(v.$slots, "tabContent2", {}, void 0, !0)
|
|
86
86
|
]),
|
|
@@ -96,15 +96,15 @@ const Me = /* @__PURE__ */ H(Ne, [["render", Ee], ["__scopeId", "data-v-9b7ee6c9
|
|
|
96
96
|
]);
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
}), ze = /* @__PURE__ */
|
|
100
|
-
function We(
|
|
101
|
-
|
|
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
102
|
try {
|
|
103
|
-
const
|
|
103
|
+
const w = new URL(C);
|
|
104
104
|
return {
|
|
105
|
-
host:
|
|
105
|
+
host: w.hostname,
|
|
106
106
|
// 域名:example.com
|
|
107
|
-
port:
|
|
107
|
+
port: w.port || null
|
|
108
108
|
// 端口:8080(默认端口返回空字符串,转为 null)
|
|
109
109
|
};
|
|
110
110
|
} catch {
|
|
@@ -117,76 +117,76 @@ function We(h) {
|
|
|
117
117
|
const Xe = () => ({ initUrlInfo: () => ({
|
|
118
118
|
host: null,
|
|
119
119
|
port: null
|
|
120
|
-
}), hasProtocol:
|
|
121
|
-
const { host: d, port:
|
|
120
|
+
}), hasProtocol: pe, generateUrl: (p) => {
|
|
121
|
+
const { host: d, port: T } = p;
|
|
122
122
|
if (!d)
|
|
123
123
|
return null;
|
|
124
124
|
let e = `${d}`;
|
|
125
|
-
return
|
|
126
|
-
} }), Ge = { class: "body-wrapper" }, Je = { class: "api-form-wrapper" }, Ye = { class: "edit-footer" }, Ze = { class: "footer-right" }, et = /* @__PURE__ */
|
|
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
127
|
__name: "index",
|
|
128
128
|
emits: ["updateApiUrl"],
|
|
129
|
-
setup(
|
|
130
|
-
const d = p,
|
|
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
131
|
host: [
|
|
132
132
|
{ required: !0, message: "请输入职位名称", trigger: "blur" }
|
|
133
133
|
]
|
|
134
|
-
}),
|
|
135
|
-
m.value = We(
|
|
134
|
+
}), h = W(() => e.value || "http://222.92.178.198:63002"), A = () => {
|
|
135
|
+
m.value = We(h.value);
|
|
136
136
|
};
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
ve(() => {
|
|
138
|
+
A();
|
|
139
139
|
});
|
|
140
|
-
const
|
|
141
|
-
|
|
140
|
+
const l = f(!1), o = () => {
|
|
141
|
+
A(), l.value = !0;
|
|
142
142
|
}, r = () => {
|
|
143
|
-
|
|
144
|
-
},
|
|
143
|
+
l.value = !1;
|
|
144
|
+
}, u = () => {
|
|
145
145
|
r();
|
|
146
146
|
}, g = async () => {
|
|
147
|
-
var
|
|
148
|
-
await ((
|
|
149
|
-
const
|
|
150
|
-
d("updateApiUrl",
|
|
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
151
|
};
|
|
152
|
-
return
|
|
152
|
+
return w({
|
|
153
153
|
openDialog: o,
|
|
154
|
-
handleClose:
|
|
155
|
-
}), (
|
|
156
|
-
const
|
|
157
|
-
return
|
|
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
158
|
class: "api-form-dialog",
|
|
159
|
-
modelValue:
|
|
160
|
-
"onUpdate:modelValue":
|
|
161
|
-
"before-close":
|
|
159
|
+
modelValue: l.value,
|
|
160
|
+
"onUpdate:modelValue": c[2] || (c[2] = (L) => l.value = L),
|
|
161
|
+
"before-close": u,
|
|
162
162
|
"destroy-on-close": "",
|
|
163
163
|
"show-close": !1
|
|
164
164
|
}, {
|
|
165
|
-
header:
|
|
166
|
-
default:
|
|
165
|
+
header: a(() => c[3] || (c[3] = [])),
|
|
166
|
+
default: a(() => [
|
|
167
167
|
i("div", Ge, [
|
|
168
168
|
i("div", Je, [
|
|
169
|
-
t(
|
|
169
|
+
t(E, {
|
|
170
170
|
class: "api-edit-form",
|
|
171
171
|
ref_key: "apiFormRef",
|
|
172
|
-
ref:
|
|
172
|
+
ref: U,
|
|
173
173
|
model: m.value,
|
|
174
|
-
rules:
|
|
174
|
+
rules: V
|
|
175
175
|
}, {
|
|
176
|
-
default:
|
|
177
|
-
t(
|
|
178
|
-
default:
|
|
179
|
-
t(
|
|
180
|
-
default:
|
|
176
|
+
default: a(() => [
|
|
177
|
+
t(B, { gutter: 20 }, {
|
|
178
|
+
default: a(() => [
|
|
179
|
+
t(S, { span: 12 }, {
|
|
180
|
+
default: a(() => [
|
|
181
181
|
t(R, {
|
|
182
182
|
prop: "host",
|
|
183
183
|
label: "主机名",
|
|
184
184
|
"label-position": "top"
|
|
185
185
|
}, {
|
|
186
|
-
default:
|
|
187
|
-
t(
|
|
186
|
+
default: a(() => [
|
|
187
|
+
t(q, {
|
|
188
188
|
modelValue: m.value.host,
|
|
189
|
-
"onUpdate:modelValue":
|
|
189
|
+
"onUpdate:modelValue": c[0] || (c[0] = (L) => m.value.host = L),
|
|
190
190
|
"aria-label": "主机名",
|
|
191
191
|
placeholder: "主机名"
|
|
192
192
|
}, null, 8, ["modelValue"])
|
|
@@ -196,17 +196,17 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
196
196
|
]),
|
|
197
197
|
_: 1
|
|
198
198
|
}),
|
|
199
|
-
t(
|
|
200
|
-
default:
|
|
199
|
+
t(S, { span: 12 }, {
|
|
200
|
+
default: a(() => [
|
|
201
201
|
t(R, {
|
|
202
202
|
prop: "port",
|
|
203
203
|
label: "端口",
|
|
204
204
|
"label-position": "top"
|
|
205
205
|
}, {
|
|
206
|
-
default:
|
|
207
|
-
t(
|
|
206
|
+
default: a(() => [
|
|
207
|
+
t(q, {
|
|
208
208
|
modelValue: m.value.port,
|
|
209
|
-
"onUpdate:modelValue":
|
|
209
|
+
"onUpdate:modelValue": c[1] || (c[1] = (L) => m.value.port = L),
|
|
210
210
|
"aria-label": "端口",
|
|
211
211
|
placeholder: "端口"
|
|
212
212
|
}, null, 8, ["modelValue"])
|
|
@@ -225,14 +225,14 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
225
225
|
])
|
|
226
226
|
])
|
|
227
227
|
]),
|
|
228
|
-
footer:
|
|
228
|
+
footer: a(() => [
|
|
229
229
|
i("div", Ye, [
|
|
230
|
-
|
|
230
|
+
c[4] || (c[4] = i("div", { class: "footer-left" }, null, -1)),
|
|
231
231
|
i("div", Ze, [
|
|
232
232
|
t(te, {
|
|
233
233
|
class: "cancel",
|
|
234
234
|
emptyColor: !0,
|
|
235
|
-
onClickTrigger:
|
|
235
|
+
onClickTrigger: u,
|
|
236
236
|
modelValue: "取消",
|
|
237
237
|
buttonType: "info"
|
|
238
238
|
}),
|
|
@@ -250,7 +250,7 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
250
250
|
}, 8, ["modelValue"]);
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
|
-
}), tt = /* @__PURE__ */
|
|
253
|
+
}), tt = /* @__PURE__ */ K(et, [["__scopeId", "data-v-20c1098b"]]), ot = { class: "dialog-header" }, at = { class: "dialog-subtitle" }, lt = {
|
|
254
254
|
key: 0,
|
|
255
255
|
class: "restart-panel"
|
|
256
256
|
}, st = { class: "restart-title" }, nt = { class: "restart-subtitle" }, it = {
|
|
@@ -259,10 +259,10 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
259
259
|
}, rt = { class: "db-type-selector" }, ct = { key: "sqlite" }, ut = { key: "pgsql" }, dt = {
|
|
260
260
|
key: 0,
|
|
261
261
|
class: "dialog-footer"
|
|
262
|
-
}, pt = 6e4,
|
|
262
|
+
}, pt = 6e4, fe = 2e3, mt = /* @__PURE__ */ J({
|
|
263
263
|
__name: "index",
|
|
264
|
-
setup(
|
|
265
|
-
const p =
|
|
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
266
|
databaseType: "sqlite",
|
|
267
267
|
sqliteDir: "sqlite-data",
|
|
268
268
|
user: "",
|
|
@@ -270,154 +270,154 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
270
270
|
database: "",
|
|
271
271
|
password: "",
|
|
272
272
|
port: "5432"
|
|
273
|
-
}), v =
|
|
273
|
+
}), v = W(() => e.databaseType === "sqlite" ? {
|
|
274
274
|
sqliteDir: [{ required: !0, message: "请输入数据库目录", trigger: "blur" }]
|
|
275
275
|
} : {
|
|
276
276
|
host: [{ required: !0, message: "请输入主机地址", trigger: "blur" }],
|
|
277
277
|
port: [{ required: !0, message: "请输入端口号", trigger: "blur" }],
|
|
278
278
|
database: [{ required: !0, message: "请输入数据库名", trigger: "blur" }],
|
|
279
279
|
user: [{ required: !0, message: "请输入用户名", trigger: "blur" }]
|
|
280
|
-
}),
|
|
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
281
|
let r = null;
|
|
282
|
-
const
|
|
283
|
-
let
|
|
284
|
-
const
|
|
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
285
|
r && (clearInterval(r), r = null);
|
|
286
286
|
}, R = () => {
|
|
287
|
-
|
|
288
|
-
},
|
|
289
|
-
|
|
287
|
+
y && (clearInterval(y), y = null), c && (clearInterval(c), c = null), q();
|
|
288
|
+
}, S = () => {
|
|
289
|
+
A.value = 0;
|
|
290
290
|
let _ = 0;
|
|
291
|
-
|
|
291
|
+
y = setInterval(() => {
|
|
292
292
|
_ += 100;
|
|
293
293
|
const s = 90 * (1 - Math.exp(-_ / 8e3));
|
|
294
|
-
|
|
294
|
+
A.value = Math.min(parseFloat(s.toFixed(1)), 90);
|
|
295
295
|
}, 100);
|
|
296
|
-
},
|
|
296
|
+
}, B = () => {
|
|
297
297
|
o.value = 1, r = setInterval(() => {
|
|
298
298
|
o.value = o.value >= 3 ? 1 : o.value + 1;
|
|
299
299
|
}, 500);
|
|
300
|
-
},
|
|
301
|
-
|
|
300
|
+
}, E = () => {
|
|
301
|
+
q();
|
|
302
302
|
const _ = setInterval(() => {
|
|
303
|
-
|
|
303
|
+
A.value = Math.min(A.value + 3, 100), A.value >= 100 && (clearInterval(_), l.value = "success");
|
|
304
304
|
}, 30);
|
|
305
|
-
},
|
|
305
|
+
}, n = () => {
|
|
306
306
|
let _ = 0;
|
|
307
|
-
|
|
308
|
-
if (_ +=
|
|
309
|
-
R(),
|
|
307
|
+
c = setInterval(async () => {
|
|
308
|
+
if (_ += fe, _ >= pt) {
|
|
309
|
+
R(), l.value = "timeout";
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
312
|
try {
|
|
313
|
-
const { data: s } = await
|
|
314
|
-
(s == null ? void 0 : s.code) === 200 && (R(),
|
|
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
315
|
} catch {
|
|
316
316
|
}
|
|
317
|
-
},
|
|
318
|
-
},
|
|
317
|
+
}, fe);
|
|
318
|
+
}, L = async () => {
|
|
319
319
|
try {
|
|
320
|
-
|
|
321
|
-
const { data: _ } = await
|
|
320
|
+
U.value = !0;
|
|
321
|
+
const { data: _ } = await ue.get(T.value + "/platform/config/db");
|
|
322
322
|
if ((_ == null ? void 0 : _.code) === 200 && (_ != null && _.data)) {
|
|
323
323
|
const s = _.data;
|
|
324
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
325
|
}
|
|
326
326
|
} catch {
|
|
327
327
|
} finally {
|
|
328
|
-
|
|
328
|
+
U.value = !1;
|
|
329
329
|
}
|
|
330
|
-
},
|
|
331
|
-
|
|
332
|
-
},
|
|
330
|
+
}, P = () => {
|
|
331
|
+
h.value = !1, l.value = "running", A.value = 0, o.value = 1, m.value = !0, L();
|
|
332
|
+
}, M = () => {
|
|
333
333
|
R(), m.value = !1;
|
|
334
|
-
},
|
|
335
|
-
|
|
336
|
-
},
|
|
337
|
-
var _, s,
|
|
338
|
-
await ((_ =
|
|
334
|
+
}, Y = () => M(), ae = (_) => {
|
|
335
|
+
h.value || _();
|
|
336
|
+
}, Z = async () => {
|
|
337
|
+
var _, s, z;
|
|
338
|
+
await ((_ = k.value) == null ? void 0 : _.validate());
|
|
339
339
|
try {
|
|
340
|
-
|
|
341
|
-
const
|
|
342
|
-
e.databaseType === "sqlite" ?
|
|
343
|
-
} catch (
|
|
344
|
-
const
|
|
345
|
-
|
|
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
346
|
} finally {
|
|
347
|
-
|
|
347
|
+
V.value = !1;
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
|
-
return
|
|
351
|
-
const
|
|
352
|
-
return
|
|
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
353
|
class: "db-config-dialog",
|
|
354
354
|
modelValue: m.value,
|
|
355
|
-
"onUpdate:modelValue": s[8] || (s[8] = (
|
|
356
|
-
"before-close":
|
|
357
|
-
"close-on-click-modal": !
|
|
358
|
-
"close-on-press-escape": !
|
|
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
359
|
"destroy-on-close": "",
|
|
360
360
|
"show-close": !1,
|
|
361
361
|
width: "480px"
|
|
362
362
|
}, {
|
|
363
|
-
header:
|
|
363
|
+
header: a(() => [
|
|
364
364
|
i("div", ot, [
|
|
365
365
|
s[9] || (s[9] = i("span", { class: "dialog-title" }, "数据库配置", -1)),
|
|
366
|
-
i("span", at,
|
|
366
|
+
i("span", at, N(h.value ? "" : "修改后服务将自动重启"), 1)
|
|
367
367
|
])
|
|
368
368
|
]),
|
|
369
|
-
default:
|
|
370
|
-
|
|
371
|
-
|
|
369
|
+
default: a(() => [
|
|
370
|
+
h.value ? ($(), x("div", lt, [
|
|
371
|
+
l.value !== "running" ? ($(), x("div", {
|
|
372
372
|
key: 0,
|
|
373
|
-
class:
|
|
373
|
+
class: ce(["restart-icon-wrap", { success: l.value === "success", error: l.value === "timeout" }])
|
|
374
374
|
}, [
|
|
375
|
-
|
|
375
|
+
l.value === "success" ? ($(), ee(z, {
|
|
376
376
|
key: 0,
|
|
377
377
|
class: "restart-icon"
|
|
378
378
|
}, {
|
|
379
|
-
default:
|
|
380
|
-
t(
|
|
379
|
+
default: a(() => [
|
|
380
|
+
t(H(Ae))
|
|
381
381
|
]),
|
|
382
382
|
_: 1
|
|
383
|
-
})) : (
|
|
383
|
+
})) : ($(), ee(z, {
|
|
384
384
|
key: 1,
|
|
385
385
|
class: "restart-icon"
|
|
386
386
|
}, {
|
|
387
|
-
default:
|
|
388
|
-
t(
|
|
387
|
+
default: a(() => [
|
|
388
|
+
t(H(qe))
|
|
389
389
|
]),
|
|
390
390
|
_: 1
|
|
391
391
|
}))
|
|
392
|
-
], 2)) :
|
|
393
|
-
i("div", st,
|
|
394
|
-
i("div", nt,
|
|
395
|
-
t(
|
|
392
|
+
], 2)) : se("", !0),
|
|
393
|
+
i("div", st, N(u.value), 1),
|
|
394
|
+
i("div", nt, N(g.value), 1),
|
|
395
|
+
t(F, {
|
|
396
396
|
class: "restart-progress",
|
|
397
|
-
percentage: Math.round(
|
|
398
|
-
status:
|
|
397
|
+
percentage: Math.round(A.value),
|
|
398
|
+
status: l.value === "success" ? "success" : l.value === "timeout" ? "exception" : "",
|
|
399
399
|
"stroke-width": 10
|
|
400
400
|
}, null, 8, ["percentage", "status"]),
|
|
401
|
-
|
|
401
|
+
l.value === "success" || l.value === "timeout" ? ($(), ee(te, {
|
|
402
402
|
key: 1,
|
|
403
403
|
class: "restart-close-btn",
|
|
404
404
|
emptyColor: !0,
|
|
405
|
-
onClickTrigger:
|
|
406
|
-
modelValue:
|
|
407
|
-
buttonType:
|
|
408
|
-
}, null, 8, ["modelValue", "buttonType"])) :
|
|
409
|
-
])) : he((
|
|
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
410
|
i("div", rt, [
|
|
411
411
|
i("div", {
|
|
412
|
-
class:
|
|
413
|
-
onClick: s[0] || (s[0] = (
|
|
412
|
+
class: ce(["db-type-card", { active: e.databaseType === "sqlite" }]),
|
|
413
|
+
onClick: s[0] || (s[0] = (I) => e.databaseType = "sqlite")
|
|
414
414
|
}, s[10] || (s[10] = [
|
|
415
415
|
i("span", { class: "db-label" }, "SQLite", -1),
|
|
416
416
|
i("span", { class: "db-desc" }, "本地文件数据库", -1)
|
|
417
417
|
]), 2),
|
|
418
418
|
i("div", {
|
|
419
|
-
class:
|
|
420
|
-
onClick: s[1] || (s[1] = (
|
|
419
|
+
class: ce(["db-type-card", { active: e.databaseType === "pgsql" }]),
|
|
420
|
+
onClick: s[1] || (s[1] = (I) => e.databaseType = "pgsql")
|
|
421
421
|
}, s[11] || (s[11] = [
|
|
422
422
|
i("span", { class: "db-label" }, "PostgreSQL", -1),
|
|
423
423
|
i("span", { class: "db-desc" }, "远程关系型数据库", -1)
|
|
@@ -425,34 +425,34 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
425
425
|
]),
|
|
426
426
|
t(ge, {
|
|
427
427
|
ref_key: "formRef",
|
|
428
|
-
ref:
|
|
428
|
+
ref: k,
|
|
429
429
|
model: e,
|
|
430
430
|
rules: v.value,
|
|
431
431
|
"label-position": "top",
|
|
432
432
|
class: "config-form"
|
|
433
433
|
}, {
|
|
434
|
-
default:
|
|
434
|
+
default: a(() => [
|
|
435
435
|
t(Ce, {
|
|
436
436
|
name: "fade-slide",
|
|
437
437
|
mode: "out-in"
|
|
438
438
|
}, {
|
|
439
|
-
default:
|
|
440
|
-
e.databaseType === "sqlite" ? (
|
|
441
|
-
t(
|
|
439
|
+
default: a(() => [
|
|
440
|
+
e.databaseType === "sqlite" ? ($(), x("div", ct, [
|
|
441
|
+
t(Q, {
|
|
442
442
|
label: "数据库目录",
|
|
443
443
|
prop: "sqliteDir"
|
|
444
444
|
}, {
|
|
445
|
-
default:
|
|
446
|
-
t(
|
|
445
|
+
default: a(() => [
|
|
446
|
+
t(O, {
|
|
447
447
|
modelValue: e.sqliteDir,
|
|
448
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
|
448
|
+
"onUpdate:modelValue": s[2] || (s[2] = (I) => e.sqliteDir = I),
|
|
449
449
|
placeholder: "例如:sqlite-data",
|
|
450
450
|
clearable: ""
|
|
451
451
|
}, {
|
|
452
|
-
prefix:
|
|
453
|
-
t(
|
|
454
|
-
default:
|
|
455
|
-
t(
|
|
452
|
+
prefix: a(() => [
|
|
453
|
+
t(z, null, {
|
|
454
|
+
default: a(() => [
|
|
455
|
+
t(H(Ie))
|
|
456
456
|
]),
|
|
457
457
|
_: 1
|
|
458
458
|
})
|
|
@@ -464,19 +464,19 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
464
464
|
_: 1,
|
|
465
465
|
__: [12]
|
|
466
466
|
})
|
|
467
|
-
])) : (
|
|
468
|
-
t(
|
|
469
|
-
default:
|
|
470
|
-
t(
|
|
471
|
-
default:
|
|
472
|
-
t(
|
|
467
|
+
])) : ($(), x("div", ut, [
|
|
468
|
+
t(me, { gutter: 16 }, {
|
|
469
|
+
default: a(() => [
|
|
470
|
+
t(le, { span: 16 }, {
|
|
471
|
+
default: a(() => [
|
|
472
|
+
t(Q, {
|
|
473
473
|
label: "主机地址",
|
|
474
474
|
prop: "host"
|
|
475
475
|
}, {
|
|
476
|
-
default:
|
|
477
|
-
t(
|
|
476
|
+
default: a(() => [
|
|
477
|
+
t(O, {
|
|
478
478
|
modelValue: e.host,
|
|
479
|
-
"onUpdate:modelValue": s[3] || (s[3] = (
|
|
479
|
+
"onUpdate:modelValue": s[3] || (s[3] = (I) => e.host = I),
|
|
480
480
|
placeholder: "127.0.0.1",
|
|
481
481
|
clearable: ""
|
|
482
482
|
}, null, 8, ["modelValue"])
|
|
@@ -486,16 +486,16 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
486
486
|
]),
|
|
487
487
|
_: 1
|
|
488
488
|
}),
|
|
489
|
-
t(
|
|
490
|
-
default:
|
|
491
|
-
t(
|
|
489
|
+
t(le, { span: 8 }, {
|
|
490
|
+
default: a(() => [
|
|
491
|
+
t(Q, {
|
|
492
492
|
label: "端口",
|
|
493
493
|
prop: "port"
|
|
494
494
|
}, {
|
|
495
|
-
default:
|
|
496
|
-
t(
|
|
495
|
+
default: a(() => [
|
|
496
|
+
t(O, {
|
|
497
497
|
modelValue: e.port,
|
|
498
|
-
"onUpdate:modelValue": s[4] || (s[4] = (
|
|
498
|
+
"onUpdate:modelValue": s[4] || (s[4] = (I) => e.port = I),
|
|
499
499
|
placeholder: "5432",
|
|
500
500
|
clearable: ""
|
|
501
501
|
}, null, 8, ["modelValue"])
|
|
@@ -508,32 +508,32 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
508
508
|
]),
|
|
509
509
|
_: 1
|
|
510
510
|
}),
|
|
511
|
-
t(
|
|
511
|
+
t(Q, {
|
|
512
512
|
label: "数据库名",
|
|
513
513
|
prop: "database"
|
|
514
514
|
}, {
|
|
515
|
-
default:
|
|
516
|
-
t(
|
|
515
|
+
default: a(() => [
|
|
516
|
+
t(O, {
|
|
517
517
|
modelValue: e.database,
|
|
518
|
-
"onUpdate:modelValue": s[5] || (s[5] = (
|
|
518
|
+
"onUpdate:modelValue": s[5] || (s[5] = (I) => e.database = I),
|
|
519
519
|
placeholder: "new_insofworks_admin",
|
|
520
520
|
clearable: ""
|
|
521
521
|
}, null, 8, ["modelValue"])
|
|
522
522
|
]),
|
|
523
523
|
_: 1
|
|
524
524
|
}),
|
|
525
|
-
t(
|
|
526
|
-
default:
|
|
527
|
-
t(
|
|
528
|
-
default:
|
|
529
|
-
t(
|
|
525
|
+
t(me, { gutter: 16 }, {
|
|
526
|
+
default: a(() => [
|
|
527
|
+
t(le, { span: 12 }, {
|
|
528
|
+
default: a(() => [
|
|
529
|
+
t(Q, {
|
|
530
530
|
label: "用户名",
|
|
531
531
|
prop: "user"
|
|
532
532
|
}, {
|
|
533
|
-
default:
|
|
534
|
-
t(
|
|
533
|
+
default: a(() => [
|
|
534
|
+
t(O, {
|
|
535
535
|
modelValue: e.user,
|
|
536
|
-
"onUpdate:modelValue": s[6] || (s[6] = (
|
|
536
|
+
"onUpdate:modelValue": s[6] || (s[6] = (I) => e.user = I),
|
|
537
537
|
placeholder: "postgres",
|
|
538
538
|
clearable: ""
|
|
539
539
|
}, null, 8, ["modelValue"])
|
|
@@ -543,16 +543,16 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
543
543
|
]),
|
|
544
544
|
_: 1
|
|
545
545
|
}),
|
|
546
|
-
t(
|
|
547
|
-
default:
|
|
548
|
-
t(
|
|
546
|
+
t(le, { span: 12 }, {
|
|
547
|
+
default: a(() => [
|
|
548
|
+
t(Q, {
|
|
549
549
|
label: "密码",
|
|
550
550
|
prop: "password"
|
|
551
551
|
}, {
|
|
552
|
-
default:
|
|
553
|
-
t(
|
|
552
|
+
default: a(() => [
|
|
553
|
+
t(O, {
|
|
554
554
|
modelValue: e.password,
|
|
555
|
-
"onUpdate:modelValue": s[7] || (s[7] = (
|
|
555
|
+
"onUpdate:modelValue": s[7] || (s[7] = (I) => e.password = I),
|
|
556
556
|
type: "password",
|
|
557
557
|
"show-password": "",
|
|
558
558
|
clearable: ""
|
|
@@ -574,21 +574,21 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
574
574
|
_: 1
|
|
575
575
|
}, 8, ["model", "rules"])
|
|
576
576
|
])), [
|
|
577
|
-
[be,
|
|
577
|
+
[be, U.value]
|
|
578
578
|
])
|
|
579
579
|
]),
|
|
580
|
-
footer:
|
|
581
|
-
|
|
580
|
+
footer: a(() => [
|
|
581
|
+
h.value ? se("", !0) : ($(), x("div", dt, [
|
|
582
582
|
t(te, {
|
|
583
583
|
emptyColor: !0,
|
|
584
|
-
onClickTrigger:
|
|
584
|
+
onClickTrigger: Y,
|
|
585
585
|
modelValue: "取消",
|
|
586
586
|
buttonType: "info"
|
|
587
587
|
}),
|
|
588
588
|
t(te, {
|
|
589
589
|
emptyColor: !0,
|
|
590
|
-
loading:
|
|
591
|
-
onClickTrigger:
|
|
590
|
+
loading: V.value,
|
|
591
|
+
onClickTrigger: Z,
|
|
592
592
|
modelValue: "保存并重启",
|
|
593
593
|
buttonType: "primary"
|
|
594
594
|
}, null, 8, ["loading"])
|
|
@@ -598,7 +598,7 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
598
598
|
}, 8, ["modelValue", "close-on-click-modal", "close-on-press-escape"]);
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
|
-
}), ft = /* @__PURE__ */
|
|
601
|
+
}), ft = /* @__PURE__ */ K(mt, [["__scopeId", "data-v-01b4eb9b"]]), vt = { class: "account-wrap" }, gt = { class: "extra-operate" }, _t = /* @__PURE__ */ J({
|
|
602
602
|
__name: "index",
|
|
603
603
|
props: {
|
|
604
604
|
activeTabName: {
|
|
@@ -615,67 +615,67 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
615
615
|
}
|
|
616
616
|
},
|
|
617
617
|
emits: ["handleLoginFormChange", "updateApiUrl"],
|
|
618
|
-
setup(
|
|
619
|
-
const p =
|
|
618
|
+
setup(C, { emit: w }) {
|
|
619
|
+
const p = C, d = ne({
|
|
620
620
|
account: "",
|
|
621
621
|
password: ""
|
|
622
|
-
}),
|
|
622
|
+
}), T = ne({
|
|
623
623
|
account: [
|
|
624
624
|
{ required: !0, message: "请输入账号", trigger: "blur" }
|
|
625
625
|
],
|
|
626
626
|
password: [
|
|
627
627
|
{ required: !0, message: "请输入密码", trigger: "blur" }
|
|
628
628
|
]
|
|
629
|
-
}), e = f(null), v = f(!1),
|
|
630
|
-
|
|
629
|
+
}), e = f(null), v = f(!1), k = w;
|
|
630
|
+
X(() => p.isClickLogin, (l) => {
|
|
631
631
|
var o;
|
|
632
|
-
|
|
633
|
-
var
|
|
632
|
+
l && (p == null ? void 0 : p.activeTabName) === "account" && ((o = e.value) == null || o.validate((r) => {
|
|
633
|
+
var u;
|
|
634
634
|
for (let g in d)
|
|
635
|
-
d.hasOwnProperty(g) && (d[g] = (
|
|
636
|
-
|
|
635
|
+
d.hasOwnProperty(g) && (d[g] = (u = d[g]) == null ? void 0 : u.trim());
|
|
636
|
+
k("handleLoginFormChange", r, r ? d : null);
|
|
637
637
|
}));
|
|
638
638
|
}, {
|
|
639
639
|
immediate: !0
|
|
640
|
-
}),
|
|
640
|
+
}), X(() => p.activeTabName, (l) => {
|
|
641
641
|
var o;
|
|
642
|
-
|
|
643
|
-
}),
|
|
644
|
-
|
|
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
645
|
}, { immediate: !0 });
|
|
646
|
-
const m = f(),
|
|
647
|
-
var
|
|
648
|
-
(o = (
|
|
649
|
-
},
|
|
650
|
-
|
|
651
|
-
},
|
|
652
|
-
var
|
|
653
|
-
(o = (
|
|
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
654
|
};
|
|
655
|
-
return (
|
|
656
|
-
const r = b("svg-icon"),
|
|
657
|
-
return
|
|
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
658
|
i("div", vt, [
|
|
659
|
-
t(
|
|
659
|
+
t(y, {
|
|
660
660
|
model: d,
|
|
661
|
-
rules:
|
|
661
|
+
rules: T,
|
|
662
662
|
ref_key: "formRef",
|
|
663
663
|
ref: e
|
|
664
664
|
}, {
|
|
665
|
-
default:
|
|
665
|
+
default: a(() => [
|
|
666
666
|
t(g, {
|
|
667
667
|
label: "",
|
|
668
668
|
prop: "account"
|
|
669
669
|
}, {
|
|
670
|
-
default:
|
|
671
|
-
t(
|
|
670
|
+
default: a(() => [
|
|
671
|
+
t(u, {
|
|
672
672
|
class: "account-input",
|
|
673
673
|
modelValue: d.account,
|
|
674
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
674
|
+
"onUpdate:modelValue": o[0] || (o[0] = (q) => d.account = q),
|
|
675
675
|
placeholder: "请输入账号",
|
|
676
676
|
clearable: ""
|
|
677
677
|
}, {
|
|
678
|
-
prefix:
|
|
678
|
+
prefix: a(() => [
|
|
679
679
|
t(r, {
|
|
680
680
|
name: "account",
|
|
681
681
|
style: { width: "15px", height: "15px" }
|
|
@@ -690,17 +690,17 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
690
690
|
label: "",
|
|
691
691
|
prop: "password"
|
|
692
692
|
}, {
|
|
693
|
-
default:
|
|
694
|
-
t(
|
|
693
|
+
default: a(() => [
|
|
694
|
+
t(u, {
|
|
695
695
|
class: "account-input",
|
|
696
696
|
modelValue: d.password,
|
|
697
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
697
|
+
"onUpdate:modelValue": o[1] || (o[1] = (q) => d.password = q),
|
|
698
698
|
type: "password",
|
|
699
699
|
placeholder: "请输入密码",
|
|
700
700
|
"show-password": "",
|
|
701
701
|
clearable: ""
|
|
702
702
|
}, {
|
|
703
|
-
prefix:
|
|
703
|
+
prefix: a(() => [
|
|
704
704
|
t(r, {
|
|
705
705
|
name: "password",
|
|
706
706
|
style: { width: "15px", height: "15px" }
|
|
@@ -715,24 +715,24 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
715
715
|
_: 1
|
|
716
716
|
}, 8, ["model", "rules"]),
|
|
717
717
|
i("div", gt, [
|
|
718
|
-
t(
|
|
718
|
+
t(c, {
|
|
719
719
|
class: "api-button",
|
|
720
720
|
type: "primary",
|
|
721
|
-
onClick:
|
|
721
|
+
onClick: U
|
|
722
722
|
}, {
|
|
723
|
-
default:
|
|
724
|
-
|
|
723
|
+
default: a(() => o[2] || (o[2] = [
|
|
724
|
+
j("接口地址")
|
|
725
725
|
])),
|
|
726
726
|
_: 1,
|
|
727
727
|
__: [2]
|
|
728
728
|
}),
|
|
729
|
-
t(
|
|
729
|
+
t(c, {
|
|
730
730
|
class: "db-button",
|
|
731
731
|
type: "primary",
|
|
732
|
-
onClick:
|
|
732
|
+
onClick: A
|
|
733
733
|
}, {
|
|
734
|
-
default:
|
|
735
|
-
|
|
734
|
+
default: a(() => o[3] || (o[3] = [
|
|
735
|
+
j("数据库配置")
|
|
736
736
|
])),
|
|
737
737
|
_: 1,
|
|
738
738
|
__: [3]
|
|
@@ -742,16 +742,16 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
742
742
|
t(tt, {
|
|
743
743
|
ref_key: "apiFormDialogRef",
|
|
744
744
|
ref: m,
|
|
745
|
-
onUpdateApiUrl:
|
|
745
|
+
onUpdateApiUrl: V
|
|
746
746
|
}, null, 512),
|
|
747
747
|
t(ft, {
|
|
748
748
|
ref_key: "dbConfigDialogRef",
|
|
749
|
-
ref:
|
|
749
|
+
ref: h
|
|
750
750
|
}, null, 512)
|
|
751
751
|
], 64);
|
|
752
752
|
};
|
|
753
753
|
}
|
|
754
|
-
}), bt = /* @__PURE__ */
|
|
754
|
+
}), bt = /* @__PURE__ */ K(_t, [["__scopeId", "data-v-d1e15373"]]), yt = { class: "account-wrap" }, ht = { class: "video-wrap" }, Ct = /* @__PURE__ */ J({
|
|
755
755
|
__name: "index",
|
|
756
756
|
props: {
|
|
757
757
|
systemKey: { default: "" },
|
|
@@ -759,37 +759,37 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
759
759
|
isClickLogin: { type: Boolean, default: !1 }
|
|
760
760
|
},
|
|
761
761
|
emits: ["handleLoginFormChange"],
|
|
762
|
-
setup(
|
|
763
|
-
const p =
|
|
764
|
-
|
|
765
|
-
const { initVerify:
|
|
766
|
-
let
|
|
767
|
-
const
|
|
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
768
|
if (!o)
|
|
769
769
|
return;
|
|
770
|
-
const r = await
|
|
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
771
|
if (!g) {
|
|
772
|
-
|
|
772
|
+
de.warning(c || "识别失败,请重新识别!");
|
|
773
773
|
return;
|
|
774
774
|
}
|
|
775
775
|
d("handleLoginFormChange", !0, {
|
|
776
776
|
account: g,
|
|
777
|
-
password:
|
|
777
|
+
password: y
|
|
778
778
|
});
|
|
779
|
-
},
|
|
779
|
+
}, V = () => {
|
|
780
780
|
if (!v.value || !e.value)
|
|
781
781
|
return;
|
|
782
|
-
const o = v.value, r = o.getContext("2d"),
|
|
782
|
+
const o = v.value, r = o.getContext("2d"), u = e.value;
|
|
783
783
|
o.width = 200, o.height = 200;
|
|
784
|
-
const g =
|
|
785
|
-
r == null || r.drawImage(
|
|
786
|
-
if (
|
|
787
|
-
const
|
|
788
|
-
|
|
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
789
|
}
|
|
790
790
|
}, "image/png");
|
|
791
|
-
},
|
|
792
|
-
if (!e.value ||
|
|
791
|
+
}, h = async () => {
|
|
792
|
+
if (!e.value || k)
|
|
793
793
|
return;
|
|
794
794
|
const o = e.value;
|
|
795
795
|
try {
|
|
@@ -799,33 +799,33 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
799
799
|
audio: !1
|
|
800
800
|
}), o) {
|
|
801
801
|
const r = o;
|
|
802
|
-
r.srcObject = m,
|
|
802
|
+
r.srcObject = m, k = !0;
|
|
803
803
|
}
|
|
804
804
|
} catch {
|
|
805
|
-
|
|
805
|
+
de.warning("摄像头启动失败");
|
|
806
806
|
}
|
|
807
807
|
};
|
|
808
|
-
function
|
|
808
|
+
function A(o) {
|
|
809
809
|
if (o && (o.getTracks().forEach((r) => r.stop()), e.value)) {
|
|
810
810
|
const r = e.value;
|
|
811
811
|
r.srcObject = null;
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
|
-
const
|
|
815
|
-
|
|
814
|
+
const l = () => {
|
|
815
|
+
A(m), k = !1;
|
|
816
816
|
};
|
|
817
|
-
return
|
|
817
|
+
return X(() => p.activeTabName, (o) => {
|
|
818
818
|
if (o !== oe.FACE) {
|
|
819
|
-
|
|
819
|
+
l();
|
|
820
820
|
return;
|
|
821
821
|
}
|
|
822
|
-
if (o === oe.FACE && !
|
|
823
|
-
|
|
822
|
+
if (o === oe.FACE && !k) {
|
|
823
|
+
h();
|
|
824
824
|
return;
|
|
825
825
|
}
|
|
826
826
|
}), we(() => {
|
|
827
|
-
|
|
828
|
-
}), (o, r) => (
|
|
827
|
+
l();
|
|
828
|
+
}), (o, r) => ($(), x("div", yt, [
|
|
829
829
|
i("div", ht, [
|
|
830
830
|
i("video", {
|
|
831
831
|
class: "face-video",
|
|
@@ -839,7 +839,7 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
839
839
|
D(o.$slots, "default", {}, () => [
|
|
840
840
|
i("button", {
|
|
841
841
|
class: "face-screenshot",
|
|
842
|
-
onClick:
|
|
842
|
+
onClick: V
|
|
843
843
|
}, "人脸识别")
|
|
844
844
|
], !0),
|
|
845
845
|
i("canvas", {
|
|
@@ -849,30 +849,30 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
849
849
|
}, null, 512)
|
|
850
850
|
]));
|
|
851
851
|
}
|
|
852
|
-
}), Tt = /* @__PURE__ */
|
|
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
853
|
key: 0,
|
|
854
854
|
class: "logo"
|
|
855
|
-
}, At = ["src"], qt = { class: "english-name" }, It = { class: "login-body-item right" }, Ft = /* @__PURE__ */
|
|
855
|
+
}, At = ["src"], qt = { class: "english-name" }, It = { class: "login-body-item right" }, Ft = /* @__PURE__ */ J({
|
|
856
856
|
__name: "index",
|
|
857
857
|
props: {
|
|
858
858
|
oldSystemKey: {},
|
|
859
859
|
loginContent: {}
|
|
860
860
|
},
|
|
861
861
|
emits: ["change", "projectLogin", "updateApiUrl", "systemContent"],
|
|
862
|
-
setup(
|
|
863
|
-
const p =
|
|
864
|
-
const
|
|
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
865
|
url: n
|
|
866
866
|
});
|
|
867
|
-
return URL.createObjectURL(
|
|
868
|
-
},
|
|
869
|
-
|
|
867
|
+
return URL.createObjectURL(L == null ? void 0 : L.data);
|
|
868
|
+
}, o = f("");
|
|
869
|
+
X(() => {
|
|
870
870
|
var n;
|
|
871
|
-
return (n =
|
|
871
|
+
return (n = U.value) == null ? void 0 : n.logo;
|
|
872
872
|
}, async (n) => {
|
|
873
|
-
n ?
|
|
873
|
+
n ? o.value = await l(n) : o.value = Le;
|
|
874
874
|
}, { immediate: !0 });
|
|
875
|
-
const
|
|
875
|
+
const r = f({
|
|
876
876
|
// sysCTitle: 'INSOFWORKS',
|
|
877
877
|
sysCTitle: "",
|
|
878
878
|
sysETitle: "",
|
|
@@ -895,64 +895,64 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
895
895
|
tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
|
|
896
896
|
}
|
|
897
897
|
]
|
|
898
|
-
}),
|
|
899
|
-
|
|
900
|
-
},
|
|
901
|
-
|
|
902
|
-
},
|
|
903
|
-
|
|
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
904
|
const n = localStorage.getItem("lastLoginAccount");
|
|
905
|
-
n && (
|
|
905
|
+
n && (h.value = n), await R();
|
|
906
906
|
});
|
|
907
|
-
const
|
|
908
|
-
var
|
|
909
|
-
if (
|
|
910
|
-
n != null && n.account && localStorage.setItem("lastLoginAccount", n.account),
|
|
911
|
-
let
|
|
912
|
-
|
|
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
913
|
type: "登录",
|
|
914
914
|
data: {
|
|
915
|
-
account: ((
|
|
916
|
-
userName: ((
|
|
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
917
|
}
|
|
918
918
|
}, "/login", "login"), e.setHasClickEditComp(!1);
|
|
919
919
|
} else
|
|
920
|
-
|
|
921
|
-
|
|
920
|
+
y.value = !1;
|
|
921
|
+
y.value = !1;
|
|
922
922
|
};
|
|
923
|
-
|
|
923
|
+
X(
|
|
924
924
|
() => p == null ? void 0 : p.loginContent,
|
|
925
925
|
() => {
|
|
926
926
|
let n = p == null ? void 0 : p.loginContent;
|
|
927
|
-
n != null && n.account && (n != null && n.password) && !
|
|
927
|
+
n != null && n.account && (n != null && n.password) && !k.value && S(n);
|
|
928
928
|
},
|
|
929
929
|
{ deep: !0, immediate: !0 }
|
|
930
930
|
);
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
},
|
|
934
|
-
|
|
931
|
+
const B = (n) => {
|
|
932
|
+
u.value = n, g.value = !1, y.value = !1;
|
|
933
|
+
}, E = (n) => {
|
|
934
|
+
T("updateApiUrl", n);
|
|
935
935
|
};
|
|
936
|
-
return (n,
|
|
936
|
+
return (n, L) => ($(), x("div", wt, [
|
|
937
937
|
i("div", kt, [
|
|
938
938
|
i("div", Ut, [
|
|
939
939
|
t(Me, { class: "login-left-bg" }, {
|
|
940
|
-
img:
|
|
941
|
-
var
|
|
940
|
+
img: a(() => {
|
|
941
|
+
var P, M;
|
|
942
942
|
return [
|
|
943
943
|
i("div", Lt, [
|
|
944
944
|
i("div", $t, [
|
|
945
|
-
|
|
945
|
+
o.value ? ($(), x("div", Vt, [
|
|
946
946
|
i("img", {
|
|
947
|
-
src:
|
|
947
|
+
src: o.value,
|
|
948
948
|
alt: ""
|
|
949
949
|
}, null, 8, At)
|
|
950
|
-
])) :
|
|
951
|
-
i("div", qt,
|
|
950
|
+
])) : se("", !0),
|
|
951
|
+
i("div", qt, N(((P = H(U)) == null ? void 0 : P.EnglishName) || "Insofworks"), 1)
|
|
952
952
|
]),
|
|
953
|
-
i("div", null,
|
|
953
|
+
i("div", null, N(((M = H(U)) == null ? void 0 : M.chineseName) || "工业软件建模与开发系统"), 1)
|
|
954
954
|
]),
|
|
955
|
-
|
|
955
|
+
L[0] || (L[0] = i("div", { class: "divide-line" }, null, -1))
|
|
956
956
|
];
|
|
957
957
|
}),
|
|
958
958
|
_: 1
|
|
@@ -960,41 +960,41 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
960
960
|
]),
|
|
961
961
|
i("div", It, [
|
|
962
962
|
t(ze, {
|
|
963
|
-
loading:
|
|
964
|
-
onClickLogin:
|
|
965
|
-
onHandleTabChange:
|
|
963
|
+
loading: y.value,
|
|
964
|
+
onClickLogin: c,
|
|
965
|
+
onHandleTabChange: B
|
|
966
966
|
}, {
|
|
967
|
-
title:
|
|
968
|
-
|
|
967
|
+
title: a(() => [
|
|
968
|
+
j(N(r.value.loginTitle), 1)
|
|
969
969
|
]),
|
|
970
|
-
tabLabel1:
|
|
971
|
-
|
|
970
|
+
tabLabel1: a(() => [
|
|
971
|
+
j(N(r.value.tabs[0].name), 1)
|
|
972
972
|
]),
|
|
973
|
-
tabContent1:
|
|
973
|
+
tabContent1: a(() => [
|
|
974
974
|
t(bt, {
|
|
975
|
-
activeTabName:
|
|
976
|
-
isClickLogin:
|
|
977
|
-
loginContent:
|
|
978
|
-
onHandleLoginFormChange:
|
|
979
|
-
onUpdateApiUrl:
|
|
975
|
+
activeTabName: u.value,
|
|
976
|
+
isClickLogin: g.value,
|
|
977
|
+
loginContent: A.value,
|
|
978
|
+
onHandleLoginFormChange: q,
|
|
979
|
+
onUpdateApiUrl: E
|
|
980
980
|
}, null, 8, ["activeTabName", "isClickLogin", "loginContent"])
|
|
981
981
|
]),
|
|
982
|
-
tabButton1:
|
|
983
|
-
|
|
982
|
+
tabButton1: a(() => [
|
|
983
|
+
j(N(r.value.tabs[0].btnLabel), 1)
|
|
984
984
|
]),
|
|
985
|
-
tabLabel2:
|
|
986
|
-
|
|
985
|
+
tabLabel2: a(() => [
|
|
986
|
+
j(N(r.value.tabs[1].name), 1)
|
|
987
987
|
]),
|
|
988
|
-
tabContent2:
|
|
988
|
+
tabContent2: a(() => [
|
|
989
989
|
t(Tt, {
|
|
990
990
|
systemKey: n.oldSystemKey,
|
|
991
|
-
activeTabName:
|
|
992
|
-
isClickLogin:
|
|
993
|
-
onHandleLoginFormChange:
|
|
991
|
+
activeTabName: u.value,
|
|
992
|
+
isClickLogin: g.value,
|
|
993
|
+
onHandleLoginFormChange: q
|
|
994
994
|
}, null, 8, ["systemKey", "activeTabName", "isClickLogin"])
|
|
995
995
|
]),
|
|
996
|
-
tabButton2:
|
|
997
|
-
|
|
996
|
+
tabButton2: a(() => [
|
|
997
|
+
j(N(r.value.tabs[1].btnLabel), 1)
|
|
998
998
|
]),
|
|
999
999
|
_: 1
|
|
1000
1000
|
}, 8, ["loading"])
|
|
@@ -1002,7 +1002,7 @@ const Xe = () => ({ initUrlInfo: () => ({
|
|
|
1002
1002
|
])
|
|
1003
1003
|
]));
|
|
1004
1004
|
}
|
|
1005
|
-
}), Pt = /* @__PURE__ */
|
|
1005
|
+
}), Pt = /* @__PURE__ */ K(Ft, [["__scopeId", "data-v-3cff58f1"]]);
|
|
1006
1006
|
export {
|
|
1007
1007
|
Pt as default
|
|
1008
1008
|
};
|