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