@pangu-backend-ui/user-core 0.0.20 → 0.0.21
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/index.js +459 -339
- package/index.umd.cjs +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/views/components/CreateUserDialog.vue.d.ts +36 -0
- package/types/views/list.vue.d.ts +36 -0
package/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as M, ref as v, inject as N, resolveComponent as n, openBlock as c, createElementBlock as S, Fragment as $, createTextVNode as p, toDisplayString as D, createBlock as k, withCtx as l, createVNode as e, createCommentVNode as I, watch as j, shallowRef as Q, computed as X, renderList as O, createElementVNode as R, nextTick as Z, resolveDirective as H, createSlots as ee, withDirectives as q, KeepAlive as le, resolveDynamicComponent as oe, onMounted as te, renderSlot as ae, unref as ne, pushScopeId as ie, popScopeId as ue } from "vue";
|
|
2
2
|
import { defineStore as se } from "pinia";
|
|
3
|
-
import { ElMessage as
|
|
3
|
+
import { ElMessage as Y } from "element-plus";
|
|
4
4
|
import { PgTable as re } from "@pangu-backend-ui/common";
|
|
5
5
|
const de = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "container"
|
|
8
|
-
}, ce = /* @__PURE__ */
|
|
8
|
+
}, ce = /* @__PURE__ */ M({
|
|
9
9
|
__name: "UserMobileComponent",
|
|
10
10
|
props: {
|
|
11
11
|
userId: {
|
|
@@ -17,42 +17,42 @@ const de = {
|
|
|
17
17
|
default: null
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
20
|
+
setup(d) {
|
|
21
|
+
const u = d, i = v({
|
|
22
22
|
plainMobile: null,
|
|
23
23
|
loading: !1
|
|
24
24
|
}), a = N("http");
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
function r() {
|
|
26
|
+
i.value.plainMobile == null && (i.value.loading = !0, a == null || a.get(`/api/user/${u.userId}/plainmobile`).then((o) => {
|
|
27
|
+
i.value.plainMobile = o.data, i.value.loading = !1;
|
|
28
28
|
}).finally(() => {
|
|
29
|
-
|
|
29
|
+
i.value.loading = !1;
|
|
30
30
|
}));
|
|
31
31
|
}
|
|
32
|
-
return (
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
p(
|
|
37
|
-
], 64)) : (
|
|
38
|
-
p(
|
|
32
|
+
return (o, b) => {
|
|
33
|
+
const m = n("View"), V = n("el-icon"), g = n("Loading");
|
|
34
|
+
return u.maskMobile != null ? (c(), S("div", de, [
|
|
35
|
+
i.value.plainMobile == null ? (c(), S($, { key: 0 }, [
|
|
36
|
+
p(D(u.maskMobile), 1)
|
|
37
|
+
], 64)) : (c(), S($, { key: 1 }, [
|
|
38
|
+
p(D(i.value.plainMobile), 1)
|
|
39
39
|
], 64)),
|
|
40
|
-
|
|
40
|
+
i.value.plainMobile == null && !i.value.loading && u.userId != null && o.$hasPer("DECRYPT_MOBILE") ? (c(), k(V, {
|
|
41
41
|
key: 2,
|
|
42
42
|
class: "view-icon",
|
|
43
|
-
onClick:
|
|
43
|
+
onClick: r
|
|
44
44
|
}, {
|
|
45
45
|
default: l(() => [
|
|
46
|
-
e(
|
|
46
|
+
e(m)
|
|
47
47
|
]),
|
|
48
48
|
_: 1
|
|
49
49
|
})) : I("", !0),
|
|
50
|
-
|
|
50
|
+
i.value.loading ? (c(), k(V, {
|
|
51
51
|
key: 3,
|
|
52
52
|
class: "is-loading view-icon"
|
|
53
53
|
}, {
|
|
54
54
|
default: l(() => [
|
|
55
|
-
e(
|
|
55
|
+
e(g)
|
|
56
56
|
]),
|
|
57
57
|
_: 1
|
|
58
58
|
})) : I("", !0)
|
|
@@ -60,49 +60,49 @@ const de = {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
const G = (
|
|
64
|
-
const
|
|
65
|
-
for (const [a,
|
|
66
|
-
|
|
67
|
-
return
|
|
68
|
-
},
|
|
69
|
-
install: (
|
|
70
|
-
|
|
63
|
+
const G = (d, u) => {
|
|
64
|
+
const i = d.__vccOpts || d;
|
|
65
|
+
for (const [a, r] of u)
|
|
66
|
+
i[a] = r;
|
|
67
|
+
return i;
|
|
68
|
+
}, A = /* @__PURE__ */ G(ce, [["__scopeId", "data-v-dd075891"]]), pe = {
|
|
69
|
+
install: (d) => {
|
|
70
|
+
d.component("PgUserMobile", A);
|
|
71
71
|
}
|
|
72
|
-
}, me = /* @__PURE__ */
|
|
72
|
+
}, me = /* @__PURE__ */ M({
|
|
73
73
|
__name: "LoginHistory",
|
|
74
74
|
props: ["userId"],
|
|
75
|
-
setup(
|
|
76
|
-
const
|
|
77
|
-
userId:
|
|
75
|
+
setup(d) {
|
|
76
|
+
const i = v({
|
|
77
|
+
userId: d.userId,
|
|
78
78
|
loginTimeStart: null,
|
|
79
79
|
loginTimeEnd: null
|
|
80
|
-
}), a =
|
|
81
|
-
j(a, (
|
|
82
|
-
|
|
80
|
+
}), a = v([]);
|
|
81
|
+
j(a, (b) => {
|
|
82
|
+
b ? (i.value.loginTimeStart = b[0], i.value.loginTimeEnd = b[1]) : (i.value.loginTimeStart = null, i.value.loginTimeEnd = null);
|
|
83
83
|
});
|
|
84
|
-
const
|
|
85
|
-
function
|
|
86
|
-
|
|
84
|
+
const r = v();
|
|
85
|
+
function o() {
|
|
86
|
+
r.value.search();
|
|
87
87
|
}
|
|
88
|
-
return (
|
|
89
|
-
const
|
|
90
|
-
return
|
|
91
|
-
e(
|
|
88
|
+
return (b, m) => {
|
|
89
|
+
const V = n("el-date-picker"), g = n("el-button"), h = n("el-space"), _ = n("el-table-column"), y = n("el-tag"), f = n("pg-table");
|
|
90
|
+
return c(), S($, null, [
|
|
91
|
+
e(h, null, {
|
|
92
92
|
default: l(() => [
|
|
93
|
-
e(
|
|
93
|
+
e(V, {
|
|
94
94
|
modelValue: a.value,
|
|
95
|
-
"onUpdate:modelValue":
|
|
95
|
+
"onUpdate:modelValue": m[0] || (m[0] = (t) => a.value = t),
|
|
96
96
|
type: "datetimerange",
|
|
97
97
|
"range-separator": "-",
|
|
98
98
|
"start-placeholder": "登录开始时间",
|
|
99
99
|
"end-placeholder": "登录结束时间",
|
|
100
100
|
clearable: ""
|
|
101
101
|
}, null, 8, ["modelValue"]),
|
|
102
|
-
e(
|
|
102
|
+
e(g, {
|
|
103
103
|
type: "primary",
|
|
104
104
|
icon: "search",
|
|
105
|
-
onClick:
|
|
105
|
+
onClick: o
|
|
106
106
|
}, {
|
|
107
107
|
default: l(() => [
|
|
108
108
|
p("搜索")
|
|
@@ -112,12 +112,12 @@ const G = (r, s) => {
|
|
|
112
112
|
]),
|
|
113
113
|
_: 1
|
|
114
114
|
}),
|
|
115
|
-
e(
|
|
115
|
+
e(f, {
|
|
116
116
|
ref_key: "historiesTable",
|
|
117
|
-
ref:
|
|
117
|
+
ref: r,
|
|
118
118
|
style: { "margin-top": "10px" },
|
|
119
119
|
"data-url": "/api/user/login-history",
|
|
120
|
-
condition:
|
|
120
|
+
condition: i.value
|
|
121
121
|
}, {
|
|
122
122
|
columns: l(() => [
|
|
123
123
|
e(_, {
|
|
@@ -143,8 +143,8 @@ const G = (r, s) => {
|
|
|
143
143
|
align: "center",
|
|
144
144
|
"show-overflow-tooltip": ""
|
|
145
145
|
}, {
|
|
146
|
-
default: l(({ row:
|
|
147
|
-
|
|
146
|
+
default: l(({ row: t }) => [
|
|
147
|
+
t.method === "SMS" ? (c(), k(y, {
|
|
148
148
|
key: 0,
|
|
149
149
|
type: "primary",
|
|
150
150
|
size: "small"
|
|
@@ -154,7 +154,7 @@ const G = (r, s) => {
|
|
|
154
154
|
]),
|
|
155
155
|
_: 1
|
|
156
156
|
})) : I("", !0),
|
|
157
|
-
|
|
157
|
+
t.method === "THIRD_PLATFORM" ? (c(), k(y, {
|
|
158
158
|
key: 1,
|
|
159
159
|
type: "primary",
|
|
160
160
|
size: "small"
|
|
@@ -164,7 +164,7 @@ const G = (r, s) => {
|
|
|
164
164
|
]),
|
|
165
165
|
_: 1
|
|
166
166
|
})) : I("", !0),
|
|
167
|
-
|
|
167
|
+
t.method === "UNIVERIFY" ? (c(), k(y, {
|
|
168
168
|
key: 2,
|
|
169
169
|
type: "primary",
|
|
170
170
|
size: "small"
|
|
@@ -174,7 +174,7 @@ const G = (r, s) => {
|
|
|
174
174
|
]),
|
|
175
175
|
_: 1
|
|
176
176
|
})) : I("", !0),
|
|
177
|
-
|
|
177
|
+
t.method === "PASSWORD" ? (c(), k(y, {
|
|
178
178
|
key: 3,
|
|
179
179
|
type: "primary",
|
|
180
180
|
size: "small"
|
|
@@ -212,61 +212,61 @@ const G = (r, s) => {
|
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
214
|
}), J = se("pg-user-core-config-store", () => {
|
|
215
|
-
const
|
|
216
|
-
return
|
|
215
|
+
const d = [];
|
|
216
|
+
return d.push({
|
|
217
217
|
name: "登录历史",
|
|
218
218
|
code: "LOGIN_HISTORY",
|
|
219
219
|
component: Q(me)
|
|
220
220
|
}), {
|
|
221
|
-
userDetailDialogTabs: X(() =>
|
|
221
|
+
userDetailDialogTabs: X(() => d)
|
|
222
222
|
};
|
|
223
|
-
}), _e = { style: { width: "100%", position: "relative", display: "flex", "flex-direction": "column", gap: "5px" } }, fe = /* @__PURE__ */
|
|
223
|
+
}), _e = { style: { width: "100%", position: "relative", display: "flex", "flex-direction": "column", gap: "5px" } }, fe = /* @__PURE__ */ M({
|
|
224
224
|
__name: "AddFunctionDisableDialog",
|
|
225
225
|
emits: ["success"],
|
|
226
|
-
setup(
|
|
227
|
-
const a =
|
|
226
|
+
setup(d, { expose: u, emit: i }) {
|
|
227
|
+
const a = v(!1), r = N("http"), o = v({
|
|
228
228
|
functionCode: null,
|
|
229
229
|
expiry: null,
|
|
230
230
|
remark: null,
|
|
231
231
|
disableForever: !0
|
|
232
|
-
}),
|
|
232
|
+
}), b = {
|
|
233
233
|
functionCode: [{ required: !0, message: "请选择禁用功能" }],
|
|
234
234
|
expiry: [{
|
|
235
|
-
validator: (
|
|
236
|
-
|
|
235
|
+
validator: (f, t, T) => {
|
|
236
|
+
o.value.disableForever && (t == null && T(new Error("请选择结束时间")), new Date(t).getTime() <= new Date().getTime() && T(new Error("结束时间不能小于当前时间"))), T();
|
|
237
237
|
}
|
|
238
238
|
}]
|
|
239
|
-
},
|
|
240
|
-
async function
|
|
241
|
-
const
|
|
242
|
-
|
|
239
|
+
}, m = v({});
|
|
240
|
+
async function V() {
|
|
241
|
+
const f = await (r == null ? void 0 : r.get("/api/user/function-disable/functions"));
|
|
242
|
+
m.value = f == null ? void 0 : f.data;
|
|
243
243
|
}
|
|
244
|
-
const
|
|
245
|
-
function
|
|
246
|
-
|
|
247
|
-
|
|
244
|
+
const g = v();
|
|
245
|
+
function h() {
|
|
246
|
+
g.value.validate(async (f) => {
|
|
247
|
+
f && (await (r == null ? void 0 : r.post(`/api/user/${_}/function-disable`, o.value)), Y.success("添加成功"), a.value = !1, o.value.functionCode = null, o.value.expiry = null, o.value.remark = null, o.value.disableForever = !0, i("success"));
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
let _ = null;
|
|
251
|
-
function
|
|
252
|
-
a.value = !0, _ =
|
|
251
|
+
function y(f) {
|
|
252
|
+
a.value = !0, _ = f, V();
|
|
253
253
|
}
|
|
254
|
-
return
|
|
255
|
-
show:
|
|
256
|
-
}), (
|
|
257
|
-
const
|
|
258
|
-
return
|
|
254
|
+
return u({
|
|
255
|
+
show: y
|
|
256
|
+
}), (f, t) => {
|
|
257
|
+
const T = n("el-option"), s = n("el-select"), w = n("el-form-item"), x = n("el-checkbox"), C = n("el-date-picker"), P = n("el-input"), L = n("el-form"), E = n("el-button"), z = n("el-dialog");
|
|
258
|
+
return c(), k(z, {
|
|
259
259
|
modelValue: a.value,
|
|
260
|
-
"onUpdate:modelValue":
|
|
260
|
+
"onUpdate:modelValue": t[4] || (t[4] = (U) => a.value = U),
|
|
261
261
|
title: "添加功能禁用",
|
|
262
262
|
width: "500px",
|
|
263
263
|
"append-to-body": ""
|
|
264
264
|
}, {
|
|
265
265
|
footer: l(() => [
|
|
266
|
-
e(
|
|
266
|
+
e(E, {
|
|
267
267
|
type: "primary",
|
|
268
268
|
size: "mini",
|
|
269
|
-
onClick:
|
|
269
|
+
onClick: h
|
|
270
270
|
}, {
|
|
271
271
|
default: l(() => [
|
|
272
272
|
p("提交")
|
|
@@ -275,28 +275,28 @@ const G = (r, s) => {
|
|
|
275
275
|
})
|
|
276
276
|
]),
|
|
277
277
|
default: l(() => [
|
|
278
|
-
e(
|
|
278
|
+
e(L, {
|
|
279
279
|
ref_key: "addDisabledFunctionForm",
|
|
280
|
-
ref:
|
|
281
|
-
model:
|
|
282
|
-
rules:
|
|
280
|
+
ref: g,
|
|
281
|
+
model: o.value,
|
|
282
|
+
rules: b,
|
|
283
283
|
"label-position": "top"
|
|
284
284
|
}, {
|
|
285
285
|
default: l(() => [
|
|
286
|
-
e(
|
|
286
|
+
e(w, {
|
|
287
287
|
label: "禁用功能",
|
|
288
288
|
prop: "functionCode"
|
|
289
289
|
}, {
|
|
290
290
|
default: l(() => [
|
|
291
|
-
e(
|
|
292
|
-
modelValue:
|
|
293
|
-
"onUpdate:modelValue":
|
|
291
|
+
e(s, {
|
|
292
|
+
modelValue: o.value.functionCode,
|
|
293
|
+
"onUpdate:modelValue": t[0] || (t[0] = (U) => o.value.functionCode = U),
|
|
294
294
|
placeholder: "请选择禁用功能"
|
|
295
295
|
}, {
|
|
296
296
|
default: l(() => [
|
|
297
|
-
(
|
|
297
|
+
(c(!0), S($, null, O(m.value, (U, B) => (c(), k(T, {
|
|
298
298
|
value: B,
|
|
299
|
-
label:
|
|
299
|
+
label: U
|
|
300
300
|
}, null, 8, ["value", "label"]))), 256))
|
|
301
301
|
]),
|
|
302
302
|
_: 1
|
|
@@ -304,22 +304,22 @@ const G = (r, s) => {
|
|
|
304
304
|
]),
|
|
305
305
|
_: 1
|
|
306
306
|
}),
|
|
307
|
-
e(
|
|
307
|
+
e(w, {
|
|
308
308
|
label: "结束时间",
|
|
309
309
|
prop: "endDateTime"
|
|
310
310
|
}, {
|
|
311
311
|
default: l(() => [
|
|
312
|
-
|
|
313
|
-
e(
|
|
314
|
-
modelValue:
|
|
315
|
-
"onUpdate:modelValue":
|
|
312
|
+
R("div", _e, [
|
|
313
|
+
e(x, {
|
|
314
|
+
modelValue: o.value.disableForever,
|
|
315
|
+
"onUpdate:modelValue": t[1] || (t[1] = (U) => o.value.disableForever = U),
|
|
316
316
|
label: "永久禁用"
|
|
317
317
|
}, null, 8, ["modelValue"]),
|
|
318
|
-
|
|
318
|
+
o.value.disableForever ? I("", !0) : (c(), k(C, {
|
|
319
319
|
key: 0,
|
|
320
320
|
type: "datetime",
|
|
321
|
-
modelValue:
|
|
322
|
-
"onUpdate:modelValue":
|
|
321
|
+
modelValue: o.value.expiry,
|
|
322
|
+
"onUpdate:modelValue": t[2] || (t[2] = (U) => o.value.expiry = U),
|
|
323
323
|
placeholder: "请输入结束时间",
|
|
324
324
|
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
325
325
|
clearable: ""
|
|
@@ -328,13 +328,13 @@ const G = (r, s) => {
|
|
|
328
328
|
]),
|
|
329
329
|
_: 1
|
|
330
330
|
}),
|
|
331
|
-
e(
|
|
331
|
+
e(w, { label: "备注" }, {
|
|
332
332
|
default: l(() => [
|
|
333
333
|
e(P, {
|
|
334
334
|
type: "textarea",
|
|
335
335
|
placeholder: "请输入备注",
|
|
336
|
-
modelValue:
|
|
337
|
-
"onUpdate:modelValue":
|
|
336
|
+
modelValue: o.value.remark,
|
|
337
|
+
"onUpdate:modelValue": t[3] || (t[3] = (U) => o.value.remark = U)
|
|
338
338
|
}, null, 8, ["modelValue"])
|
|
339
339
|
]),
|
|
340
340
|
_: 1
|
|
@@ -347,41 +347,41 @@ const G = (r, s) => {
|
|
|
347
347
|
}, 8, ["modelValue"]);
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
}), K = /* @__PURE__ */
|
|
350
|
+
}), K = /* @__PURE__ */ M({
|
|
351
351
|
__name: "FunctionDisableTableDialog",
|
|
352
|
-
setup(
|
|
353
|
-
const
|
|
352
|
+
setup(d, { expose: u }) {
|
|
353
|
+
const i = N("http"), a = v(!1), r = v({
|
|
354
354
|
userId: null
|
|
355
|
-
}),
|
|
356
|
-
function
|
|
357
|
-
a.value = !0,
|
|
355
|
+
}), o = v();
|
|
356
|
+
function b(_) {
|
|
357
|
+
a.value = !0, r.value.userId = _, Z(() => o.value.search());
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
|
|
359
|
+
function m() {
|
|
360
|
+
o.value.search();
|
|
361
361
|
}
|
|
362
|
-
const
|
|
363
|
-
function
|
|
364
|
-
|
|
362
|
+
const V = v();
|
|
363
|
+
function g() {
|
|
364
|
+
V.value.show(r.value.userId);
|
|
365
365
|
}
|
|
366
|
-
async function
|
|
367
|
-
await (
|
|
366
|
+
async function h(_) {
|
|
367
|
+
await (i == null ? void 0 : i.post(`/api/user/function-disable/${_}/enable`)), Y.success("失效成功"), o.value.search();
|
|
368
368
|
}
|
|
369
|
-
return
|
|
370
|
-
show:
|
|
371
|
-
}), (_,
|
|
372
|
-
const
|
|
373
|
-
return
|
|
374
|
-
e(
|
|
369
|
+
return u({
|
|
370
|
+
show: b
|
|
371
|
+
}), (_, y) => {
|
|
372
|
+
const f = n("el-table-column"), t = n("el-tag"), T = n("el-button"), s = n("el-popconfirm"), w = n("pg-table"), x = n("el-dialog");
|
|
373
|
+
return c(), S($, null, [
|
|
374
|
+
e(x, {
|
|
375
375
|
modelValue: a.value,
|
|
376
|
-
"onUpdate:modelValue":
|
|
376
|
+
"onUpdate:modelValue": y[0] || (y[0] = (C) => a.value = C),
|
|
377
377
|
title: "功能禁用",
|
|
378
378
|
width: "900px",
|
|
379
379
|
"append-to-body": ""
|
|
380
380
|
}, {
|
|
381
381
|
footer: l(() => [
|
|
382
|
-
e(
|
|
382
|
+
e(T, {
|
|
383
383
|
type: "primary",
|
|
384
|
-
onClick:
|
|
384
|
+
onClick: g
|
|
385
385
|
}, {
|
|
386
386
|
default: l(() => [
|
|
387
387
|
p(" 添加功能禁用 ")
|
|
@@ -390,79 +390,79 @@ const G = (r, s) => {
|
|
|
390
390
|
})
|
|
391
391
|
]),
|
|
392
392
|
default: l(() => [
|
|
393
|
-
e(
|
|
393
|
+
e(w, {
|
|
394
394
|
ref_key: "table",
|
|
395
|
-
ref:
|
|
395
|
+
ref: o,
|
|
396
396
|
"data-url": "/api/user/function-disable/page-search",
|
|
397
397
|
"fetch-data": !1,
|
|
398
|
-
condition:
|
|
398
|
+
condition: r.value
|
|
399
399
|
}, {
|
|
400
400
|
default: l(() => [
|
|
401
|
-
e(
|
|
401
|
+
e(f, {
|
|
402
402
|
prop: "id",
|
|
403
403
|
label: "ID",
|
|
404
404
|
width: "80",
|
|
405
405
|
align: "center"
|
|
406
406
|
}),
|
|
407
|
-
e(
|
|
407
|
+
e(f, {
|
|
408
408
|
label: "功能",
|
|
409
409
|
prop: "functionLabel",
|
|
410
410
|
align: "center",
|
|
411
411
|
width: "120"
|
|
412
412
|
}),
|
|
413
|
-
e(
|
|
413
|
+
e(f, {
|
|
414
414
|
label: "状态",
|
|
415
415
|
width: "80",
|
|
416
416
|
align: "center"
|
|
417
417
|
}, {
|
|
418
|
-
default: l(({ row:
|
|
419
|
-
e(
|
|
418
|
+
default: l(({ row: C }) => [
|
|
419
|
+
e(t, {
|
|
420
420
|
size: "mini",
|
|
421
|
-
type:
|
|
421
|
+
type: C.expiry == null || new Date(C.expiry).getTime() >= new Date().getTime() ? "success" : "warning"
|
|
422
422
|
}, {
|
|
423
423
|
default: l(() => [
|
|
424
|
-
p(
|
|
424
|
+
p(D(C.expiry == null || new Date(C.expiry).getTime() >= new Date().getTime() ? "生效" : "失效"), 1)
|
|
425
425
|
]),
|
|
426
426
|
_: 2
|
|
427
427
|
}, 1032, ["type"])
|
|
428
428
|
]),
|
|
429
429
|
_: 1
|
|
430
430
|
}),
|
|
431
|
-
e(
|
|
431
|
+
e(f, {
|
|
432
432
|
label: "结束时间",
|
|
433
433
|
align: "center",
|
|
434
434
|
width: "160"
|
|
435
435
|
}, {
|
|
436
|
-
default: l(({ row:
|
|
437
|
-
p(
|
|
436
|
+
default: l(({ row: C }) => [
|
|
437
|
+
p(D(C.expiry ? C.expiry : "永久"), 1)
|
|
438
438
|
]),
|
|
439
439
|
_: 1
|
|
440
440
|
}),
|
|
441
|
-
e(
|
|
441
|
+
e(f, {
|
|
442
442
|
prop: "remark",
|
|
443
443
|
label: "备注",
|
|
444
444
|
"show-overflow-tooltip": "",
|
|
445
445
|
align: "center"
|
|
446
446
|
}),
|
|
447
|
-
e(
|
|
447
|
+
e(f, {
|
|
448
448
|
prop: "createdTime",
|
|
449
449
|
label: "创建时间",
|
|
450
450
|
width: "160",
|
|
451
451
|
align: "center"
|
|
452
452
|
}),
|
|
453
|
-
e(
|
|
453
|
+
e(f, {
|
|
454
454
|
prop: "操作",
|
|
455
455
|
width: "120",
|
|
456
456
|
align: "center"
|
|
457
457
|
}, {
|
|
458
|
-
default: l(({ row:
|
|
459
|
-
|
|
458
|
+
default: l(({ row: C }) => [
|
|
459
|
+
C.expiry == null || new Date(C.expiry).getTime() >= new Date().getTime() ? (c(), k(s, {
|
|
460
460
|
key: 0,
|
|
461
461
|
title: "确定当前操作吗?",
|
|
462
|
-
onConfirm: (P) =>
|
|
462
|
+
onConfirm: (P) => h(C.id)
|
|
463
463
|
}, {
|
|
464
464
|
reference: l(() => [
|
|
465
|
-
e(
|
|
465
|
+
e(T, { type: "warning" }, {
|
|
466
466
|
default: l(() => [
|
|
467
467
|
p("失效")
|
|
468
468
|
]),
|
|
@@ -482,187 +482,187 @@ const G = (r, s) => {
|
|
|
482
482
|
}, 8, ["modelValue"]),
|
|
483
483
|
e(fe, {
|
|
484
484
|
ref_key: "addFunctionDisableDialog",
|
|
485
|
-
ref:
|
|
486
|
-
onSuccess:
|
|
485
|
+
ref: V,
|
|
486
|
+
onSuccess: m
|
|
487
487
|
}, null, 512)
|
|
488
488
|
], 64);
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
|
-
}), ve = { key: 0 }, W = /* @__PURE__ */
|
|
491
|
+
}), ve = { key: 0 }, W = /* @__PURE__ */ M({
|
|
492
492
|
__name: "UserDetailDialog",
|
|
493
|
-
setup(
|
|
494
|
-
const
|
|
495
|
-
activeName:
|
|
493
|
+
setup(d, { expose: u }) {
|
|
494
|
+
const i = J(), a = N("http"), r = v(!1), o = v(), b = v(), m = v({
|
|
495
|
+
activeName: i.userDetailDialogTabs[0].code,
|
|
496
496
|
tabs: []
|
|
497
|
-
}),
|
|
498
|
-
function
|
|
499
|
-
|
|
497
|
+
}), V = v(!1);
|
|
498
|
+
function g(T, s, w) {
|
|
499
|
+
V.value = !0, h(T), s && (m.value.activeName = s), m.value.tabs.length = 0, m.value.tabs = m.value.tabs.concat(i.userDetailDialogTabs), w && (m.value.tabs = m.value.tabs.concat(w));
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
a == null || a.get(`/api/user/${
|
|
503
|
-
|
|
501
|
+
function h(T) {
|
|
502
|
+
a == null || a.get(`/api/user/${T}`).then((s) => {
|
|
503
|
+
o.value = s.data, V.value = !1, r.value = !0, o.value.inBlacklist && _(T);
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function _(
|
|
507
|
-
a == null || a.get(`/api/user/${
|
|
508
|
-
|
|
506
|
+
function _(T) {
|
|
507
|
+
a == null || a.get(`/api/user/${T}/blacklist`).then((s) => {
|
|
508
|
+
b.value = s.data;
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
|
-
const
|
|
512
|
-
function
|
|
513
|
-
|
|
511
|
+
const y = v();
|
|
512
|
+
function f() {
|
|
513
|
+
y.value.show(o.value.id);
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
|
|
515
|
+
function t() {
|
|
516
|
+
o.value = null, b.value = null;
|
|
517
517
|
}
|
|
518
|
-
return
|
|
519
|
-
show:
|
|
520
|
-
}), (
|
|
521
|
-
const
|
|
522
|
-
return
|
|
518
|
+
return u({
|
|
519
|
+
show: g
|
|
520
|
+
}), (T, s) => {
|
|
521
|
+
const w = n("el-descriptions-item"), x = n("el-tag"), C = n("el-descriptions"), P = n("el-tab-pane"), L = n("el-tabs"), E = n("el-button"), z = n("el-dialog"), U = H("loading"), B = H("permission");
|
|
522
|
+
return c(), S($, null, [
|
|
523
523
|
e(z, {
|
|
524
|
-
modelValue:
|
|
525
|
-
"onUpdate:modelValue":
|
|
524
|
+
modelValue: r.value,
|
|
525
|
+
"onUpdate:modelValue": s[1] || (s[1] = (F) => r.value = F),
|
|
526
526
|
title: "用户详情",
|
|
527
527
|
width: "1300",
|
|
528
|
-
onClosed:
|
|
528
|
+
onClosed: t
|
|
529
529
|
}, ee({
|
|
530
530
|
default: l(() => [
|
|
531
|
-
|
|
532
|
-
e(
|
|
531
|
+
o.value ? q((c(), S("div", ve, [
|
|
532
|
+
e(C, { border: "" }, {
|
|
533
533
|
default: l(() => [
|
|
534
|
-
e(
|
|
534
|
+
e(w, { label: "用户编号" }, {
|
|
535
535
|
default: l(() => [
|
|
536
|
-
p(
|
|
536
|
+
p(D(o.value.id), 1)
|
|
537
537
|
]),
|
|
538
538
|
_: 1
|
|
539
539
|
}),
|
|
540
|
-
e(
|
|
540
|
+
e(w, { label: "用户昵称" }, {
|
|
541
541
|
default: l(() => [
|
|
542
|
-
p(
|
|
542
|
+
p(D(o.value.nickname), 1)
|
|
543
543
|
]),
|
|
544
544
|
_: 1
|
|
545
545
|
}),
|
|
546
|
-
e(
|
|
546
|
+
e(w, { label: "手机号码" }, {
|
|
547
547
|
default: l(() => [
|
|
548
|
-
(
|
|
549
|
-
"mask-mobile":
|
|
550
|
-
"user-id":
|
|
551
|
-
key:
|
|
548
|
+
(c(), k(A, {
|
|
549
|
+
"mask-mobile": o.value.mobile,
|
|
550
|
+
"user-id": o.value.id,
|
|
551
|
+
key: o.value.id
|
|
552
552
|
}, null, 8, ["mask-mobile", "user-id"]))
|
|
553
553
|
]),
|
|
554
554
|
_: 1
|
|
555
555
|
}),
|
|
556
|
-
e(
|
|
556
|
+
e(w, { label: "邀请编码" }, {
|
|
557
557
|
default: l(() => [
|
|
558
|
-
p(
|
|
558
|
+
p(D(o.value.inviteCode), 1)
|
|
559
559
|
]),
|
|
560
560
|
_: 1
|
|
561
561
|
}),
|
|
562
|
-
e(
|
|
562
|
+
e(w, { label: "活动时间" }, {
|
|
563
563
|
default: l(() => [
|
|
564
|
-
p(
|
|
564
|
+
p(D(o.value.touchTime), 1)
|
|
565
565
|
]),
|
|
566
566
|
_: 1
|
|
567
567
|
}),
|
|
568
|
-
e(
|
|
568
|
+
e(w, { label: "注册时间" }, {
|
|
569
569
|
default: l(() => [
|
|
570
|
-
p(
|
|
570
|
+
p(D(o.value.createdTime), 1)
|
|
571
571
|
]),
|
|
572
572
|
_: 1
|
|
573
573
|
}),
|
|
574
|
-
e(
|
|
574
|
+
e(w, { label: "最后登陆" }, {
|
|
575
575
|
default: l(() => [
|
|
576
|
-
p(
|
|
576
|
+
p(D(o.value.lastLoginTime), 1)
|
|
577
577
|
]),
|
|
578
578
|
_: 1
|
|
579
579
|
}),
|
|
580
|
-
e(
|
|
580
|
+
e(w, { label: "最后更新" }, {
|
|
581
581
|
default: l(() => [
|
|
582
|
-
p(
|
|
582
|
+
p(D(o.value.updatedTime), 1)
|
|
583
583
|
]),
|
|
584
584
|
_: 1
|
|
585
585
|
}),
|
|
586
|
-
e(
|
|
586
|
+
e(w, { label: "上级用户" }, {
|
|
587
587
|
default: l(() => [
|
|
588
|
-
p(
|
|
588
|
+
p(D(o.value.parentId), 1)
|
|
589
589
|
]),
|
|
590
590
|
_: 1
|
|
591
591
|
}),
|
|
592
|
-
e(
|
|
592
|
+
e(w, { label: "黑名单" }, {
|
|
593
593
|
default: l(() => [
|
|
594
|
-
e(
|
|
595
|
-
type:
|
|
594
|
+
e(x, {
|
|
595
|
+
type: o.value.inBlacklist ? "danger" : "success"
|
|
596
596
|
}, {
|
|
597
597
|
default: l(() => [
|
|
598
|
-
p(
|
|
598
|
+
p(D(o.value.inBlacklist ? "是" : "否"), 1)
|
|
599
599
|
]),
|
|
600
600
|
_: 1
|
|
601
601
|
}, 8, ["type"])
|
|
602
602
|
]),
|
|
603
603
|
_: 1
|
|
604
604
|
}),
|
|
605
|
-
e(
|
|
605
|
+
e(w, { label: "邀请关系" }, {
|
|
606
606
|
default: l(() => [
|
|
607
|
-
p(
|
|
607
|
+
p(D(o.value.relationPath), 1)
|
|
608
608
|
]),
|
|
609
609
|
_: 1
|
|
610
610
|
})
|
|
611
611
|
]),
|
|
612
612
|
_: 1
|
|
613
613
|
}),
|
|
614
|
-
|
|
614
|
+
b.value ? (c(), k(C, {
|
|
615
615
|
key: 0,
|
|
616
616
|
style: { "margin-top": "10px" },
|
|
617
617
|
border: "",
|
|
618
618
|
column: "2"
|
|
619
619
|
}, {
|
|
620
620
|
default: l(() => [
|
|
621
|
-
e(
|
|
621
|
+
e(w, { label: "黑名单解锁时间" }, {
|
|
622
622
|
default: l(() => [
|
|
623
|
-
p(
|
|
623
|
+
p(D(b.value.unlockTime), 1)
|
|
624
624
|
]),
|
|
625
625
|
_: 1
|
|
626
626
|
}),
|
|
627
|
-
e(
|
|
627
|
+
e(w, { label: "加入时间" }, {
|
|
628
628
|
default: l(() => [
|
|
629
|
-
p(
|
|
629
|
+
p(D(b.value.createdTime), 1)
|
|
630
630
|
]),
|
|
631
631
|
_: 1
|
|
632
632
|
}),
|
|
633
|
-
e(
|
|
633
|
+
e(w, { label: "允许权限" }, {
|
|
634
634
|
default: l(() => [
|
|
635
|
-
p(
|
|
635
|
+
p(D(b.value.allowPermissionCodes ? JSON.parse(b.value.allowPermissionCodes).join(", ") : ""), 1)
|
|
636
636
|
]),
|
|
637
637
|
_: 1
|
|
638
638
|
}),
|
|
639
|
-
e(
|
|
639
|
+
e(w, { label: "描述" }, {
|
|
640
640
|
default: l(() => [
|
|
641
|
-
p(
|
|
641
|
+
p(D(b.value.description), 1)
|
|
642
642
|
]),
|
|
643
643
|
_: 1
|
|
644
644
|
})
|
|
645
645
|
]),
|
|
646
646
|
_: 1
|
|
647
647
|
})) : I("", !0),
|
|
648
|
-
(
|
|
649
|
-
modelValue:
|
|
650
|
-
"onUpdate:modelValue":
|
|
651
|
-
key: `usr_tab_${
|
|
648
|
+
(c(), k(L, {
|
|
649
|
+
modelValue: m.value.activeName,
|
|
650
|
+
"onUpdate:modelValue": s[0] || (s[0] = (F) => m.value.activeName = F),
|
|
651
|
+
key: `usr_tab_${o.value.id}`,
|
|
652
652
|
style: { "margin-top": "10px" },
|
|
653
653
|
type: "border-card"
|
|
654
654
|
}, {
|
|
655
655
|
default: l(() => [
|
|
656
|
-
(
|
|
657
|
-
label:
|
|
658
|
-
name:
|
|
659
|
-
key: `user_detail_dialog_${
|
|
656
|
+
(c(!0), S($, null, O(m.value.tabs, (F, Fe) => (c(), k(P, {
|
|
657
|
+
label: F.name,
|
|
658
|
+
name: F.code,
|
|
659
|
+
key: `user_detail_dialog_${F.code}`
|
|
660
660
|
}, {
|
|
661
661
|
default: l(() => [
|
|
662
|
-
(
|
|
663
|
-
|
|
664
|
-
key: `ud_tab_${
|
|
665
|
-
userId:
|
|
662
|
+
(c(), k(le, null, [
|
|
663
|
+
m.value.activeName == F.code ? (c(), k(oe(F.component), {
|
|
664
|
+
key: `ud_tab_${F.code}`,
|
|
665
|
+
userId: o.value.id
|
|
666
666
|
}, null, 8, ["userId"])) : I("", !0)
|
|
667
667
|
], 1024))
|
|
668
668
|
]),
|
|
@@ -672,18 +672,18 @@ const G = (r, s) => {
|
|
|
672
672
|
_: 1
|
|
673
673
|
}, 8, ["modelValue"]))
|
|
674
674
|
])), [
|
|
675
|
-
[
|
|
675
|
+
[U, V.value]
|
|
676
676
|
]) : I("", !0)
|
|
677
677
|
]),
|
|
678
678
|
_: 2
|
|
679
679
|
}, [
|
|
680
|
-
|
|
680
|
+
o.value ? {
|
|
681
681
|
name: "footer",
|
|
682
682
|
fn: l(() => [
|
|
683
|
-
|
|
683
|
+
q((c(), k(E, {
|
|
684
684
|
icon: "lock",
|
|
685
685
|
type: "warning",
|
|
686
|
-
onClick:
|
|
686
|
+
onClick: f
|
|
687
687
|
}, {
|
|
688
688
|
default: l(() => [
|
|
689
689
|
p("添加功能禁用")
|
|
@@ -698,16 +698,16 @@ const G = (r, s) => {
|
|
|
698
698
|
]), 1032, ["modelValue"]),
|
|
699
699
|
e(K, {
|
|
700
700
|
ref_key: "functionDisableTableDialog",
|
|
701
|
-
ref:
|
|
701
|
+
ref: y
|
|
702
702
|
}, null, 512)
|
|
703
703
|
], 64);
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
706
|
}), be = {
|
|
707
|
-
install: (
|
|
708
|
-
|
|
707
|
+
install: (d) => {
|
|
708
|
+
d.component("PgUserDetailDialog", W);
|
|
709
709
|
}
|
|
710
|
-
}, ge = /* @__PURE__ */
|
|
710
|
+
}, ge = /* @__PURE__ */ M({
|
|
711
711
|
__name: "UserSelectorComp",
|
|
712
712
|
props: {
|
|
713
713
|
modelValue: {
|
|
@@ -720,55 +720,55 @@ const G = (r, s) => {
|
|
|
720
720
|
}
|
|
721
721
|
},
|
|
722
722
|
emits: ["update:modelValue"],
|
|
723
|
-
setup(
|
|
724
|
-
const
|
|
725
|
-
|
|
726
|
-
|
|
723
|
+
setup(d, { emit: u }) {
|
|
724
|
+
const i = d, a = N("http");
|
|
725
|
+
te(() => {
|
|
726
|
+
i.modelValue && g(i.modelValue);
|
|
727
727
|
});
|
|
728
|
-
const
|
|
729
|
-
j(
|
|
730
|
-
|
|
728
|
+
const r = v(i.modelValue);
|
|
729
|
+
j(r, (h) => {
|
|
730
|
+
u("update:modelValue", h);
|
|
731
731
|
});
|
|
732
|
-
const
|
|
733
|
-
let
|
|
734
|
-
function
|
|
735
|
-
|
|
732
|
+
const o = v(!1), b = v([]);
|
|
733
|
+
let m = null;
|
|
734
|
+
function V(h) {
|
|
735
|
+
h && (o.value = !0, m && clearTimeout(m), m = setTimeout(() => {
|
|
736
736
|
a == null || a.get("/api/user/keyword-search", {
|
|
737
|
-
keyword:
|
|
738
|
-
pageSize:
|
|
737
|
+
keyword: h,
|
|
738
|
+
pageSize: i.pageSize
|
|
739
739
|
}).then((_) => {
|
|
740
|
-
|
|
740
|
+
b.value = _.data;
|
|
741
741
|
}).finally(() => {
|
|
742
|
-
|
|
742
|
+
o.value = !1;
|
|
743
743
|
});
|
|
744
744
|
}, 200));
|
|
745
745
|
}
|
|
746
|
-
function
|
|
747
|
-
|
|
748
|
-
|
|
746
|
+
function g(h) {
|
|
747
|
+
o.value = !0, a == null || a.get(`/api/user/${h}`).then((_) => {
|
|
748
|
+
b.value = [_.data];
|
|
749
749
|
}).finally(() => {
|
|
750
|
-
|
|
750
|
+
o.value = !1;
|
|
751
751
|
});
|
|
752
752
|
}
|
|
753
|
-
return (
|
|
754
|
-
const
|
|
755
|
-
return
|
|
756
|
-
modelValue:
|
|
757
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
753
|
+
return (h, _) => {
|
|
754
|
+
const y = n("el-option"), f = n("el-select");
|
|
755
|
+
return c(), k(f, {
|
|
756
|
+
modelValue: r.value,
|
|
757
|
+
"onUpdate:modelValue": _[0] || (_[0] = (t) => r.value = t),
|
|
758
758
|
filterable: "",
|
|
759
759
|
remote: "",
|
|
760
|
-
loading:
|
|
761
|
-
"remote-method":
|
|
760
|
+
loading: o.value,
|
|
761
|
+
"remote-method": V
|
|
762
762
|
}, {
|
|
763
763
|
default: l(() => [
|
|
764
|
-
(
|
|
765
|
-
key:
|
|
766
|
-
value:
|
|
767
|
-
label: `${
|
|
764
|
+
(c(!0), S($, null, O(b.value, (t) => (c(), k(y, {
|
|
765
|
+
key: t.id,
|
|
766
|
+
value: t.id,
|
|
767
|
+
label: `${t.id} / ${t.nickname} / ${t.mobile} / ${t.inviteCode}`
|
|
768
768
|
}, {
|
|
769
769
|
default: l(() => [
|
|
770
|
-
ae(
|
|
771
|
-
p(
|
|
770
|
+
ae(h.$slots, "default", { user: t }, () => [
|
|
771
|
+
p(D(t.id) + " / " + D(t.nickname) + " / " + D(t.mobile) + " / " + D(t.inviteCode), 1)
|
|
772
772
|
])
|
|
773
773
|
]),
|
|
774
774
|
_: 2
|
|
@@ -779,79 +779,184 @@ const G = (r, s) => {
|
|
|
779
779
|
};
|
|
780
780
|
}
|
|
781
781
|
}), we = {
|
|
782
|
-
install: (
|
|
783
|
-
|
|
782
|
+
install: (d) => {
|
|
783
|
+
d.component("PgUserSelector", ge);
|
|
784
784
|
}
|
|
785
785
|
}, ye = {
|
|
786
|
-
install: (
|
|
787
|
-
|
|
786
|
+
install: (d) => {
|
|
787
|
+
d.component("PgFunctionDisableTableDialog", K);
|
|
788
788
|
}
|
|
789
789
|
}, he = [
|
|
790
790
|
pe,
|
|
791
791
|
be,
|
|
792
792
|
we,
|
|
793
793
|
ye
|
|
794
|
-
], De =
|
|
794
|
+
], De = {
|
|
795
|
+
__name: "CreateUserDialog",
|
|
796
|
+
emits: ["success"],
|
|
797
|
+
setup(d, { expose: u, emit: i }) {
|
|
798
|
+
const a = N("http"), r = v(!1), o = v({
|
|
799
|
+
mobile: null,
|
|
800
|
+
password: null,
|
|
801
|
+
inviteCode: null
|
|
802
|
+
}), b = {
|
|
803
|
+
mobile: [{ required: !0, message: "请输入手机号" }],
|
|
804
|
+
password: [{ required: !0, message: "请输入登录密码" }]
|
|
805
|
+
}, m = v();
|
|
806
|
+
function V() {
|
|
807
|
+
m.value.validate(async (_) => {
|
|
808
|
+
_ && (await a.post("/api/user/create", o.value), Y.success("创建成功"), i("success"), r.value = !1);
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
function g() {
|
|
812
|
+
r.value = !0;
|
|
813
|
+
}
|
|
814
|
+
function h() {
|
|
815
|
+
m.value.resetFields();
|
|
816
|
+
}
|
|
817
|
+
return u({
|
|
818
|
+
show: g
|
|
819
|
+
}), (_, y) => {
|
|
820
|
+
const f = n("el-input"), t = n("el-form-item"), T = n("el-form"), s = n("el-button"), w = n("el-dialog");
|
|
821
|
+
return c(), k(w, {
|
|
822
|
+
modelValue: r.value,
|
|
823
|
+
"onUpdate:modelValue": y[3] || (y[3] = (x) => r.value = x),
|
|
824
|
+
title: "创建用户",
|
|
825
|
+
width: "400",
|
|
826
|
+
onClosed: h
|
|
827
|
+
}, {
|
|
828
|
+
footer: l(() => [
|
|
829
|
+
e(s, {
|
|
830
|
+
type: "primary",
|
|
831
|
+
onClick: V
|
|
832
|
+
}, {
|
|
833
|
+
default: l(() => [
|
|
834
|
+
p("提交")
|
|
835
|
+
]),
|
|
836
|
+
_: 1
|
|
837
|
+
})
|
|
838
|
+
]),
|
|
839
|
+
default: l(() => [
|
|
840
|
+
e(T, {
|
|
841
|
+
ref_key: "formRef",
|
|
842
|
+
ref: m,
|
|
843
|
+
model: o.value,
|
|
844
|
+
rules: b,
|
|
845
|
+
"label-position": "top"
|
|
846
|
+
}, {
|
|
847
|
+
default: l(() => [
|
|
848
|
+
e(t, {
|
|
849
|
+
label: "手机号",
|
|
850
|
+
prop: "mobile"
|
|
851
|
+
}, {
|
|
852
|
+
default: l(() => [
|
|
853
|
+
e(f, {
|
|
854
|
+
modelValue: o.value.mobile,
|
|
855
|
+
"onUpdate:modelValue": y[0] || (y[0] = (x) => o.value.mobile = x),
|
|
856
|
+
placeholder: "请输入登录手机号"
|
|
857
|
+
}, null, 8, ["modelValue"])
|
|
858
|
+
]),
|
|
859
|
+
_: 1
|
|
860
|
+
}),
|
|
861
|
+
e(t, {
|
|
862
|
+
label: "登录密码",
|
|
863
|
+
prop: "password"
|
|
864
|
+
}, {
|
|
865
|
+
default: l(() => [
|
|
866
|
+
e(f, {
|
|
867
|
+
modelValue: o.value.password,
|
|
868
|
+
"onUpdate:modelValue": y[1] || (y[1] = (x) => o.value.password = x),
|
|
869
|
+
placeholder: "请输入登录密码"
|
|
870
|
+
}, null, 8, ["modelValue"])
|
|
871
|
+
]),
|
|
872
|
+
_: 1
|
|
873
|
+
}),
|
|
874
|
+
e(t, {
|
|
875
|
+
label: "邀请码",
|
|
876
|
+
prop: "inviteCode"
|
|
877
|
+
}, {
|
|
878
|
+
default: l(() => [
|
|
879
|
+
e(f, {
|
|
880
|
+
modelValue: o.value.inviteCode,
|
|
881
|
+
"onUpdate:modelValue": y[2] || (y[2] = (x) => o.value.inviteCode = x),
|
|
882
|
+
placeholder: "请输入邀请码"
|
|
883
|
+
}, null, 8, ["modelValue"])
|
|
884
|
+
]),
|
|
885
|
+
_: 1
|
|
886
|
+
})
|
|
887
|
+
]),
|
|
888
|
+
_: 1
|
|
889
|
+
}, 8, ["model"])
|
|
890
|
+
]),
|
|
891
|
+
_: 1
|
|
892
|
+
}, 8, ["modelValue"]);
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
}, ke = (d) => (ie("data-v-2dcce2b2"), d = d(), ue(), d), Ve = { class: "page-layout" }, Te = { style: { "margin-top": "10px" } }, Ce = /* @__PURE__ */ ke(() => /* @__PURE__ */ R("template", { "slot-scope": "{row}" }, null, -1)), xe = /* @__PURE__ */ M({
|
|
795
896
|
__name: "list",
|
|
796
|
-
setup(
|
|
797
|
-
const
|
|
897
|
+
setup(d) {
|
|
898
|
+
const u = v({
|
|
798
899
|
id: null,
|
|
799
900
|
parentId: null,
|
|
800
901
|
phone: null,
|
|
801
902
|
nicekname: null,
|
|
802
903
|
inviteCode: null
|
|
803
|
-
}),
|
|
904
|
+
}), i = v(null);
|
|
804
905
|
function a() {
|
|
805
|
-
|
|
906
|
+
i.value.search();
|
|
907
|
+
}
|
|
908
|
+
const r = v();
|
|
909
|
+
function o(V) {
|
|
910
|
+
r.value.show(V.id);
|
|
806
911
|
}
|
|
807
|
-
const
|
|
808
|
-
function
|
|
809
|
-
|
|
912
|
+
const b = v();
|
|
913
|
+
function m() {
|
|
914
|
+
b.value.show();
|
|
810
915
|
}
|
|
811
|
-
return (
|
|
812
|
-
const
|
|
813
|
-
return
|
|
814
|
-
|
|
815
|
-
e(
|
|
916
|
+
return (V, g) => {
|
|
917
|
+
const h = n("el-input"), _ = n("el-button"), y = n("el-space"), f = n("el-card"), t = n("el-table-column"), T = n("el-image");
|
|
918
|
+
return c(), S($, null, [
|
|
919
|
+
R("div", Ve, [
|
|
920
|
+
e(f, null, {
|
|
816
921
|
default: l(() => [
|
|
817
|
-
e(
|
|
922
|
+
e(y, null, {
|
|
818
923
|
default: l(() => [
|
|
819
|
-
e(
|
|
820
|
-
modelValue:
|
|
821
|
-
"onUpdate:modelValue":
|
|
924
|
+
e(h, {
|
|
925
|
+
modelValue: u.value.id,
|
|
926
|
+
"onUpdate:modelValue": g[0] || (g[0] = (s) => u.value.id = s),
|
|
822
927
|
placeholder: "ID",
|
|
823
928
|
style: { width: "100px" },
|
|
824
929
|
clearable: ""
|
|
825
930
|
}, null, 8, ["modelValue"]),
|
|
826
|
-
e(
|
|
827
|
-
modelValue:
|
|
828
|
-
"onUpdate:modelValue":
|
|
931
|
+
e(h, {
|
|
932
|
+
modelValue: u.value.parentId,
|
|
933
|
+
"onUpdate:modelValue": g[1] || (g[1] = (s) => u.value.parentId = s),
|
|
829
934
|
placeholder: "父用户ID",
|
|
830
935
|
style: { width: "100px" },
|
|
831
936
|
clearable: ""
|
|
832
937
|
}, null, 8, ["modelValue"]),
|
|
833
|
-
e(
|
|
834
|
-
modelValue:
|
|
835
|
-
"onUpdate:modelValue":
|
|
938
|
+
e(h, {
|
|
939
|
+
modelValue: u.value.phone,
|
|
940
|
+
"onUpdate:modelValue": g[2] || (g[2] = (s) => u.value.phone = s),
|
|
836
941
|
placeholder: "手机号",
|
|
837
942
|
style: { width: "120px" },
|
|
838
943
|
clearable: ""
|
|
839
944
|
}, null, 8, ["modelValue"]),
|
|
840
|
-
e(
|
|
841
|
-
modelValue:
|
|
842
|
-
"onUpdate:modelValue":
|
|
945
|
+
e(h, {
|
|
946
|
+
modelValue: u.value.nicekname,
|
|
947
|
+
"onUpdate:modelValue": g[3] || (g[3] = (s) => u.value.nicekname = s),
|
|
843
948
|
placeholder: "昵称",
|
|
844
949
|
style: { width: "150px" },
|
|
845
950
|
clearable: ""
|
|
846
951
|
}, null, 8, ["modelValue"]),
|
|
847
|
-
e(
|
|
848
|
-
modelValue:
|
|
849
|
-
"onUpdate:modelValue":
|
|
952
|
+
e(h, {
|
|
953
|
+
modelValue: u.value.inviteCode,
|
|
954
|
+
"onUpdate:modelValue": g[4] || (g[4] = (s) => u.value.inviteCode = s),
|
|
850
955
|
placeholder: "邀请码",
|
|
851
956
|
style: { width: "100px" },
|
|
852
957
|
clearable: ""
|
|
853
958
|
}, null, 8, ["modelValue"]),
|
|
854
|
-
e(
|
|
959
|
+
e(_, {
|
|
855
960
|
type: "primary",
|
|
856
961
|
icon: "search",
|
|
857
962
|
onClick: a
|
|
@@ -860,6 +965,16 @@ const G = (r, s) => {
|
|
|
860
965
|
p("搜索")
|
|
861
966
|
]),
|
|
862
967
|
_: 1
|
|
968
|
+
}),
|
|
969
|
+
e(_, {
|
|
970
|
+
type: "warning",
|
|
971
|
+
icon: "plus",
|
|
972
|
+
onClick: m
|
|
973
|
+
}, {
|
|
974
|
+
default: l(() => [
|
|
975
|
+
p("创建用户")
|
|
976
|
+
]),
|
|
977
|
+
_: 1
|
|
863
978
|
})
|
|
864
979
|
]),
|
|
865
980
|
_: 1
|
|
@@ -867,118 +982,118 @@ const G = (r, s) => {
|
|
|
867
982
|
]),
|
|
868
983
|
_: 1
|
|
869
984
|
}),
|
|
870
|
-
|
|
985
|
+
R("div", Te, [
|
|
871
986
|
e(ne(re), {
|
|
872
987
|
ref_key: "userTable",
|
|
873
|
-
ref:
|
|
988
|
+
ref: i,
|
|
874
989
|
"data-url": "/api/user/page",
|
|
875
|
-
condition:
|
|
876
|
-
onRowDbClick:
|
|
990
|
+
condition: u.value,
|
|
991
|
+
onRowDbClick: g[5] || (g[5] = (s) => o(s))
|
|
877
992
|
}, {
|
|
878
993
|
columns: l(() => [
|
|
879
|
-
e(
|
|
994
|
+
e(t, {
|
|
880
995
|
prop: "id",
|
|
881
996
|
label: "UID",
|
|
882
997
|
width: "80",
|
|
883
998
|
align: "center"
|
|
884
999
|
}),
|
|
885
|
-
e(
|
|
1000
|
+
e(t, {
|
|
886
1001
|
prop: "mobile",
|
|
887
1002
|
label: "手机",
|
|
888
1003
|
width: "115",
|
|
889
1004
|
align: "left",
|
|
890
1005
|
"show-overflow-tooltip": ""
|
|
891
1006
|
}, {
|
|
892
|
-
default: l((
|
|
893
|
-
(
|
|
894
|
-
"mask-mobile":
|
|
895
|
-
"user-id":
|
|
896
|
-
key:
|
|
1007
|
+
default: l((s) => [
|
|
1008
|
+
(c(), k(A, {
|
|
1009
|
+
"mask-mobile": s.row.mobile,
|
|
1010
|
+
"user-id": s.row.id,
|
|
1011
|
+
key: s.row.id
|
|
897
1012
|
}, null, 8, ["mask-mobile", "user-id"]))
|
|
898
1013
|
]),
|
|
899
1014
|
_: 1
|
|
900
1015
|
}),
|
|
901
|
-
e(
|
|
1016
|
+
e(t, {
|
|
902
1017
|
prop: "username",
|
|
903
1018
|
label: "用户名",
|
|
904
1019
|
width: "110",
|
|
905
1020
|
align: "left",
|
|
906
1021
|
"show-overflow-tooltip": ""
|
|
907
1022
|
}),
|
|
908
|
-
e(
|
|
1023
|
+
e(t, {
|
|
909
1024
|
prop: "nickname",
|
|
910
1025
|
label: "昵称",
|
|
911
1026
|
width: "110",
|
|
912
1027
|
align: "left",
|
|
913
1028
|
"show-overflow-tooltip": ""
|
|
914
1029
|
}),
|
|
915
|
-
e(
|
|
1030
|
+
e(t, {
|
|
916
1031
|
prop: "inviteCode",
|
|
917
1032
|
label: "邀请码",
|
|
918
1033
|
width: "90",
|
|
919
1034
|
align: "center",
|
|
920
1035
|
"show-overflow-tooltip": ""
|
|
921
1036
|
}),
|
|
922
|
-
e(
|
|
1037
|
+
e(t, {
|
|
923
1038
|
prop: "avatar",
|
|
924
1039
|
label: "头像",
|
|
925
1040
|
width: "60",
|
|
926
1041
|
align: "center",
|
|
927
1042
|
"show-overflow-tooltip": ""
|
|
928
1043
|
}, {
|
|
929
|
-
default: l((
|
|
930
|
-
e(
|
|
1044
|
+
default: l((s) => [
|
|
1045
|
+
e(T, {
|
|
931
1046
|
fit: "cover",
|
|
932
1047
|
size: 30,
|
|
933
|
-
src:
|
|
1048
|
+
src: s.row.avatar,
|
|
934
1049
|
"preview-teleported": "",
|
|
935
|
-
"preview-src-list": [
|
|
1050
|
+
"preview-src-list": [s.row.avatar]
|
|
936
1051
|
}, null, 8, ["src", "preview-src-list"])
|
|
937
1052
|
]),
|
|
938
1053
|
_: 1
|
|
939
1054
|
}),
|
|
940
|
-
e(
|
|
1055
|
+
e(t, {
|
|
941
1056
|
prop: "parentId",
|
|
942
1057
|
label: "上级ID",
|
|
943
1058
|
width: "80",
|
|
944
1059
|
align: "left",
|
|
945
1060
|
"show-overflow-tooltip": ""
|
|
946
1061
|
}),
|
|
947
|
-
e(
|
|
1062
|
+
e(t, {
|
|
948
1063
|
prop: "relationPath",
|
|
949
1064
|
label: "邀请关系",
|
|
950
1065
|
"min-width": "150",
|
|
951
1066
|
align: "left",
|
|
952
1067
|
"show-overflow-tooltip": ""
|
|
953
1068
|
}),
|
|
954
|
-
e(
|
|
1069
|
+
e(t, {
|
|
955
1070
|
prop: "blackUnlockTime",
|
|
956
1071
|
label: "黑名单解锁",
|
|
957
1072
|
width: "145",
|
|
958
1073
|
align: "left",
|
|
959
1074
|
"show-overflow-tooltip": ""
|
|
960
1075
|
}),
|
|
961
|
-
e(
|
|
1076
|
+
e(t, {
|
|
962
1077
|
prop: "lastLoginTime",
|
|
963
1078
|
label: "最后登录时间",
|
|
964
1079
|
width: "145",
|
|
965
1080
|
align: "center",
|
|
966
1081
|
"show-overflow-tooltip": ""
|
|
967
1082
|
}),
|
|
968
|
-
e(
|
|
1083
|
+
e(t, {
|
|
969
1084
|
prop: "createdTime",
|
|
970
1085
|
label: "创建时间",
|
|
971
1086
|
width: "145",
|
|
972
1087
|
align: "center",
|
|
973
1088
|
"show-overflow-tooltip": ""
|
|
974
1089
|
}),
|
|
975
|
-
e(
|
|
1090
|
+
e(t, {
|
|
976
1091
|
label: "操作",
|
|
977
1092
|
width: "220",
|
|
978
1093
|
fixed: "right"
|
|
979
1094
|
}, {
|
|
980
1095
|
default: l(() => [
|
|
981
|
-
|
|
1096
|
+
Ce
|
|
982
1097
|
]),
|
|
983
1098
|
_: 1
|
|
984
1099
|
})
|
|
@@ -989,16 +1104,21 @@ const G = (r, s) => {
|
|
|
989
1104
|
]),
|
|
990
1105
|
e(W, {
|
|
991
1106
|
ref_key: "userDetailDialog",
|
|
992
|
-
ref:
|
|
1107
|
+
ref: r
|
|
1108
|
+
}, null, 512),
|
|
1109
|
+
e(De, {
|
|
1110
|
+
ref_key: "createUserDialog",
|
|
1111
|
+
ref: b,
|
|
1112
|
+
onSuccess: a
|
|
993
1113
|
}, null, 512)
|
|
994
1114
|
], 64);
|
|
995
1115
|
};
|
|
996
1116
|
}
|
|
997
1117
|
});
|
|
998
|
-
const
|
|
999
|
-
install: (
|
|
1000
|
-
let
|
|
1001
|
-
a && a.meta &&
|
|
1118
|
+
const Ue = /* @__PURE__ */ G(xe, [["__scopeId", "data-v-2dcce2b2"]]), Ie = {
|
|
1119
|
+
install: (d, u) => {
|
|
1120
|
+
let i = u.router, a = i.getRoutes().find((r) => r.path == "/");
|
|
1121
|
+
a && a.meta && i.addRoute({
|
|
1002
1122
|
path: "/user",
|
|
1003
1123
|
name: "User",
|
|
1004
1124
|
redirect: "/user/list",
|
|
@@ -1006,7 +1126,7 @@ const Ce = /* @__PURE__ */ G(xe, [["__scopeId", "data-v-391c43be"]]), Ie = {
|
|
|
1006
1126
|
children: [{
|
|
1007
1127
|
path: "list",
|
|
1008
1128
|
name: "UserList",
|
|
1009
|
-
component:
|
|
1129
|
+
component: Ue
|
|
1010
1130
|
// }, {
|
|
1011
1131
|
// path: 'blacklist',
|
|
1012
1132
|
// name: 'BlackListView',
|
|
@@ -1014,21 +1134,21 @@ const Ce = /* @__PURE__ */ G(xe, [["__scopeId", "data-v-391c43be"]]), Ie = {
|
|
|
1014
1134
|
}]
|
|
1015
1135
|
});
|
|
1016
1136
|
}
|
|
1017
|
-
},
|
|
1018
|
-
const
|
|
1019
|
-
if (
|
|
1020
|
-
for (let a of
|
|
1021
|
-
|
|
1022
|
-
he.forEach((a) =>
|
|
1023
|
-
},
|
|
1024
|
-
install:
|
|
1137
|
+
}, Se = (d, u) => {
|
|
1138
|
+
const i = J();
|
|
1139
|
+
if (u.userDetailDialogTabs && u.userDetailDialogTabs.length)
|
|
1140
|
+
for (let a of u.userDetailDialogTabs)
|
|
1141
|
+
i.userDetailDialogTabs.push(a);
|
|
1142
|
+
he.forEach((a) => d.use(a)), d.use(Ie, u);
|
|
1143
|
+
}, Re = {
|
|
1144
|
+
install: Se
|
|
1025
1145
|
};
|
|
1026
1146
|
export {
|
|
1027
1147
|
ye as FunctionDisableDialog,
|
|
1028
1148
|
be as UserDetailDialog,
|
|
1029
1149
|
pe as UserMobileComp,
|
|
1030
1150
|
we as UserSelectComp,
|
|
1031
|
-
|
|
1032
|
-
|
|
1151
|
+
Re as default,
|
|
1152
|
+
Se as install,
|
|
1033
1153
|
J as useUserCoreConfigStore
|
|
1034
1154
|
};
|