@pangu-backend-ui/user-core 0.0.11 → 0.0.12
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 +90 -87
- package/index.umd.cjs +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as U, ref as
|
|
2
|
-
import { defineStore as
|
|
3
|
-
import { PgTable as
|
|
1
|
+
import { defineComponent as U, ref as w, inject as S, resolveComponent as p, openBlock as m, createElementBlock as T, Fragment as I, createTextVNode as _, toDisplayString as h, createBlock as f, withCtx as t, createVNode as e, createCommentVNode as k, watch as $, computed as E, resolveDirective as z, withDirectives as O, renderList as A, KeepAlive as B, resolveDynamicComponent as F, createElementVNode as x, unref as H, pushScopeId as Y, popScopeId as j } from "vue";
|
|
2
|
+
import { defineStore as G } from "pinia";
|
|
3
|
+
import { PgTable as K } from "@pangu-backend-ui/common";
|
|
4
4
|
const W = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "container"
|
|
@@ -17,7 +17,7 @@ const W = {
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
setup(a) {
|
|
20
|
-
const o = a, l =
|
|
20
|
+
const o = a, l = w({
|
|
21
21
|
plainMobile: null,
|
|
22
22
|
loading: !1
|
|
23
23
|
}), r = S("http");
|
|
@@ -29,14 +29,14 @@ const W = {
|
|
|
29
29
|
}));
|
|
30
30
|
}
|
|
31
31
|
return (s, c) => {
|
|
32
|
-
const u = p("View"), b = p("el-icon"),
|
|
33
|
-
return o.maskMobile != null ? (
|
|
34
|
-
l.value.plainMobile == null ? (
|
|
35
|
-
|
|
36
|
-
], 64)) : (
|
|
37
|
-
|
|
32
|
+
const u = p("View"), b = p("el-icon"), D = p("Loading");
|
|
33
|
+
return o.maskMobile != null ? (m(), T("div", W, [
|
|
34
|
+
l.value.plainMobile == null ? (m(), T(I, { key: 0 }, [
|
|
35
|
+
_(h(o.maskMobile), 1)
|
|
36
|
+
], 64)) : (m(), T(I, { key: 1 }, [
|
|
37
|
+
_(h(l.value.plainMobile), 1)
|
|
38
38
|
], 64)),
|
|
39
|
-
l.value.plainMobile == null && !l.value.loading && o.userId != null ? (
|
|
39
|
+
l.value.plainMobile == null && !l.value.loading && o.userId != null ? (m(), f(b, {
|
|
40
40
|
key: 2,
|
|
41
41
|
class: "view-icon",
|
|
42
42
|
onClick: v
|
|
@@ -46,12 +46,12 @@ const W = {
|
|
|
46
46
|
]),
|
|
47
47
|
_: 1
|
|
48
48
|
})) : k("", !0),
|
|
49
|
-
l.value.loading ? (
|
|
49
|
+
l.value.loading ? (m(), f(b, {
|
|
50
50
|
key: 3,
|
|
51
51
|
class: "is-loading view-icon"
|
|
52
52
|
}, {
|
|
53
53
|
default: t(() => [
|
|
54
|
-
e(
|
|
54
|
+
e(D)
|
|
55
55
|
]),
|
|
56
56
|
_: 1
|
|
57
57
|
})) : k("", !0)
|
|
@@ -69,7 +69,7 @@ const M = (a, o) => {
|
|
|
69
69
|
a.component("PgUserMobile", C);
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
function
|
|
72
|
+
function Q() {
|
|
73
73
|
const a = S("http");
|
|
74
74
|
function o(l) {
|
|
75
75
|
return a == null ? void 0 : a.get(`/api/user/${l}`);
|
|
@@ -78,26 +78,26 @@ function K() {
|
|
|
78
78
|
getUserDetail: o
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const X = /* @__PURE__ */ U({
|
|
82
82
|
__name: "LoginHistory",
|
|
83
83
|
props: ["userId"],
|
|
84
84
|
setup(a) {
|
|
85
|
-
const l =
|
|
85
|
+
const l = w({
|
|
86
86
|
userId: a.userId,
|
|
87
87
|
loginTimeStart: null,
|
|
88
88
|
loginTimeEnd: null
|
|
89
|
-
}), r =
|
|
90
|
-
|
|
89
|
+
}), r = w([]);
|
|
90
|
+
$(r, (c) => {
|
|
91
91
|
c ? (l.value.loginTimeStart = c[0], l.value.loginTimeEnd = c[1]) : (l.value.loginTimeStart = null, l.value.loginTimeEnd = null);
|
|
92
92
|
});
|
|
93
|
-
const v =
|
|
93
|
+
const v = w();
|
|
94
94
|
function s() {
|
|
95
95
|
v.value.search();
|
|
96
96
|
}
|
|
97
97
|
return (c, u) => {
|
|
98
|
-
const b = p("el-date-picker"),
|
|
99
|
-
return
|
|
100
|
-
e(
|
|
98
|
+
const b = p("el-date-picker"), D = p("el-button"), g = p("el-space"), i = p("el-table-column"), d = p("el-tag"), V = p("pg-table");
|
|
99
|
+
return m(), T(I, null, [
|
|
100
|
+
e(g, null, {
|
|
101
101
|
default: t(() => [
|
|
102
102
|
e(b, {
|
|
103
103
|
modelValue: r.value,
|
|
@@ -108,13 +108,13 @@ const Q = /* @__PURE__ */ U({
|
|
|
108
108
|
"end-placeholder": "登录结束时间",
|
|
109
109
|
clearable: ""
|
|
110
110
|
}, null, 8, ["modelValue"]),
|
|
111
|
-
e(
|
|
111
|
+
e(D, {
|
|
112
112
|
type: "primary",
|
|
113
113
|
icon: "search",
|
|
114
114
|
onClick: s
|
|
115
115
|
}, {
|
|
116
116
|
default: t(() => [
|
|
117
|
-
|
|
117
|
+
_("搜索")
|
|
118
118
|
]),
|
|
119
119
|
_: 1
|
|
120
120
|
})
|
|
@@ -153,43 +153,43 @@ const Q = /* @__PURE__ */ U({
|
|
|
153
153
|
"show-overflow-tooltip": ""
|
|
154
154
|
}, {
|
|
155
155
|
default: t(({ row: n }) => [
|
|
156
|
-
n.method === "SMS" ? (
|
|
156
|
+
n.method === "SMS" ? (m(), f(d, {
|
|
157
157
|
key: 0,
|
|
158
158
|
type: "primary",
|
|
159
159
|
size: "small"
|
|
160
160
|
}, {
|
|
161
161
|
default: t(() => [
|
|
162
|
-
|
|
162
|
+
_("短信登录")
|
|
163
163
|
]),
|
|
164
164
|
_: 1
|
|
165
165
|
})) : k("", !0),
|
|
166
|
-
n.method === "THIRD_PLATFORM" ? (
|
|
166
|
+
n.method === "THIRD_PLATFORM" ? (m(), f(d, {
|
|
167
167
|
key: 1,
|
|
168
168
|
type: "primary",
|
|
169
169
|
size: "small"
|
|
170
170
|
}, {
|
|
171
171
|
default: t(() => [
|
|
172
|
-
|
|
172
|
+
_("第三方平台")
|
|
173
173
|
]),
|
|
174
174
|
_: 1
|
|
175
175
|
})) : k("", !0),
|
|
176
|
-
n.method === "UNIVERIFY" ? (
|
|
176
|
+
n.method === "UNIVERIFY" ? (m(), f(d, {
|
|
177
177
|
key: 2,
|
|
178
178
|
type: "primary",
|
|
179
179
|
size: "small"
|
|
180
180
|
}, {
|
|
181
181
|
default: t(() => [
|
|
182
|
-
|
|
182
|
+
_("一键登录")
|
|
183
183
|
]),
|
|
184
184
|
_: 1
|
|
185
185
|
})) : k("", !0),
|
|
186
|
-
n.method === "PASSWORD" ? (
|
|
186
|
+
n.method === "PASSWORD" ? (m(), f(d, {
|
|
187
187
|
key: 3,
|
|
188
188
|
type: "primary",
|
|
189
189
|
size: "small"
|
|
190
190
|
}, {
|
|
191
191
|
default: t(() => [
|
|
192
|
-
|
|
192
|
+
_("帐号密码")
|
|
193
193
|
]),
|
|
194
194
|
_: 1
|
|
195
195
|
})) : k("", !0)
|
|
@@ -220,35 +220,35 @@ const Q = /* @__PURE__ */ U({
|
|
|
220
220
|
], 64);
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
}), N =
|
|
223
|
+
}), N = G("pg-user-core-config-store", () => {
|
|
224
224
|
const a = [];
|
|
225
225
|
return a.push({
|
|
226
226
|
name: "登录历史",
|
|
227
227
|
code: "LOGIN_HISTORY",
|
|
228
|
-
component:
|
|
228
|
+
component: X
|
|
229
229
|
}), {
|
|
230
|
-
userDetailDialogTabs:
|
|
230
|
+
userDetailDialogTabs: E(() => a)
|
|
231
231
|
};
|
|
232
232
|
}), L = /* @__PURE__ */ U({
|
|
233
233
|
__name: "UserDetailDialog",
|
|
234
234
|
setup(a, { expose: o }) {
|
|
235
|
-
const { getUserDetail: l } =
|
|
235
|
+
const { getUserDetail: l } = Q(), r = N(), v = w(!1), s = w(), c = w({
|
|
236
236
|
activeName: r.userDetailDialogTabs[0].code,
|
|
237
237
|
tabs: []
|
|
238
|
-
}), u =
|
|
239
|
-
function b(
|
|
238
|
+
}), u = w(!1);
|
|
239
|
+
function b(D, g) {
|
|
240
240
|
var i;
|
|
241
|
-
u.value = !0, (i = l(
|
|
242
|
-
s.value = d.data, u.value = !1, v.value = !0, c.value.tabs.length = 0, c.value.tabs = c.value.tabs.concat(r.userDetailDialogTabs),
|
|
241
|
+
u.value = !0, (i = l(D)) == null || i.then((d) => {
|
|
242
|
+
s.value = d.data, u.value = !1, v.value = !0, c.value.tabs.length = 0, c.value.tabs = c.value.tabs.concat(r.userDetailDialogTabs), g && (c.value.tabs = c.value.tabs.concat(g));
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
245
|
return o({
|
|
246
246
|
show: b
|
|
247
|
-
}), (
|
|
247
|
+
}), (D, g) => {
|
|
248
248
|
const i = p("el-descriptions-item"), d = p("el-descriptions"), V = p("el-tab-pane"), n = p("el-tabs"), P = p("el-dialog"), R = z("loading");
|
|
249
|
-
return O((
|
|
249
|
+
return O((m(), f(P, {
|
|
250
250
|
modelValue: v.value,
|
|
251
|
-
"onUpdate:modelValue":
|
|
251
|
+
"onUpdate:modelValue": g[1] || (g[1] = (y) => v.value = y),
|
|
252
252
|
title: "用户详情",
|
|
253
253
|
width: "1300"
|
|
254
254
|
}, {
|
|
@@ -257,19 +257,19 @@ const Q = /* @__PURE__ */ U({
|
|
|
257
257
|
default: t(() => [
|
|
258
258
|
e(i, { label: "用户编号" }, {
|
|
259
259
|
default: t(() => [
|
|
260
|
-
|
|
260
|
+
_(h(s.value.id), 1)
|
|
261
261
|
]),
|
|
262
262
|
_: 1
|
|
263
263
|
}),
|
|
264
264
|
e(i, { label: "用户昵称" }, {
|
|
265
265
|
default: t(() => [
|
|
266
|
-
|
|
266
|
+
_(h(s.value.nickname), 1)
|
|
267
267
|
]),
|
|
268
268
|
_: 1
|
|
269
269
|
}),
|
|
270
270
|
e(i, { label: "手机号码" }, {
|
|
271
271
|
default: t(() => [
|
|
272
|
-
(
|
|
272
|
+
(m(), f(C, {
|
|
273
273
|
"mask-mobile": s.value.mobile,
|
|
274
274
|
"user-id": s.value.id,
|
|
275
275
|
key: s.value.id
|
|
@@ -279,43 +279,43 @@ const Q = /* @__PURE__ */ U({
|
|
|
279
279
|
}),
|
|
280
280
|
e(i, { label: "邀请编码" }, {
|
|
281
281
|
default: t(() => [
|
|
282
|
-
|
|
282
|
+
_(h(s.value.inviteCode), 1)
|
|
283
283
|
]),
|
|
284
284
|
_: 1
|
|
285
285
|
}),
|
|
286
286
|
e(i, { label: "活动时间" }, {
|
|
287
287
|
default: t(() => [
|
|
288
|
-
|
|
288
|
+
_(h(s.value.touchTime), 1)
|
|
289
289
|
]),
|
|
290
290
|
_: 1
|
|
291
291
|
}),
|
|
292
292
|
e(i, { label: "注册时间" }, {
|
|
293
293
|
default: t(() => [
|
|
294
|
-
|
|
294
|
+
_(h(s.value.createdTime), 1)
|
|
295
295
|
]),
|
|
296
296
|
_: 1
|
|
297
297
|
}),
|
|
298
298
|
e(i, { label: "最后登陆" }, {
|
|
299
299
|
default: t(() => [
|
|
300
|
-
|
|
300
|
+
_(h(s.value.lastLoginTime), 1)
|
|
301
301
|
]),
|
|
302
302
|
_: 1
|
|
303
303
|
}),
|
|
304
304
|
e(i, { label: "最后更新" }, {
|
|
305
305
|
default: t(() => [
|
|
306
|
-
|
|
306
|
+
_(h(s.value.updatedTime), 1)
|
|
307
307
|
]),
|
|
308
308
|
_: 1
|
|
309
309
|
}),
|
|
310
310
|
e(i, { label: "上级用户" }, {
|
|
311
311
|
default: t(() => [
|
|
312
|
-
|
|
312
|
+
_(h(s.value.parentId), 1)
|
|
313
313
|
]),
|
|
314
314
|
_: 1
|
|
315
315
|
}),
|
|
316
316
|
e(i, { label: "邀请关系" }, {
|
|
317
317
|
default: t(() => [
|
|
318
|
-
|
|
318
|
+
_(h(s.value.relationPath), 1)
|
|
319
319
|
]),
|
|
320
320
|
_: 1
|
|
321
321
|
})
|
|
@@ -324,20 +324,23 @@ const Q = /* @__PURE__ */ U({
|
|
|
324
324
|
}),
|
|
325
325
|
e(n, {
|
|
326
326
|
modelValue: c.value.activeName,
|
|
327
|
-
"onUpdate:modelValue":
|
|
327
|
+
"onUpdate:modelValue": g[0] || (g[0] = (y) => c.value.activeName = y),
|
|
328
328
|
style: { "margin-top": "10px" },
|
|
329
329
|
type: "border-card"
|
|
330
330
|
}, {
|
|
331
331
|
default: t(() => [
|
|
332
|
-
(
|
|
333
|
-
label:
|
|
334
|
-
name:
|
|
335
|
-
key: `user_detail_dialog_${
|
|
332
|
+
(m(!0), T(I, null, A(c.value.tabs, (y, ue) => (m(), f(V, {
|
|
333
|
+
label: y.name,
|
|
334
|
+
name: y.code,
|
|
335
|
+
key: `user_detail_dialog_${y.code}`
|
|
336
336
|
}, {
|
|
337
337
|
default: t(() => [
|
|
338
|
-
(
|
|
339
|
-
|
|
340
|
-
|
|
338
|
+
(m(), f(B, null, [
|
|
339
|
+
c.value.activeName == y.code ? (m(), f(F(y.component), {
|
|
340
|
+
key: `ud_tab_${y.code}`,
|
|
341
|
+
userId: s.value.id
|
|
342
|
+
}, null, 8, ["userId"])) : k("", !0)
|
|
343
|
+
], 1024))
|
|
341
344
|
]),
|
|
342
345
|
_: 2
|
|
343
346
|
}, 1032, ["label", "name"]))), 128))
|
|
@@ -351,37 +354,37 @@ const Q = /* @__PURE__ */ U({
|
|
|
351
354
|
]);
|
|
352
355
|
};
|
|
353
356
|
}
|
|
354
|
-
}),
|
|
357
|
+
}), Z = {
|
|
355
358
|
install: (a) => {
|
|
356
359
|
a.component("PgUserDetailDialog", L);
|
|
357
360
|
}
|
|
358
|
-
},
|
|
361
|
+
}, ee = [
|
|
359
362
|
J,
|
|
360
|
-
|
|
361
|
-
],
|
|
363
|
+
Z
|
|
364
|
+
], le = (a) => (Y("data-v-391c43be"), a = a(), j(), a), te = { class: "page-layout" }, oe = { style: { "margin-top": "10px" } }, ae = /* @__PURE__ */ le(() => /* @__PURE__ */ x("template", { "slot-scope": "{row}" }, null, -1)), ne = /* @__PURE__ */ U({
|
|
362
365
|
__name: "list",
|
|
363
366
|
setup(a) {
|
|
364
|
-
const o =
|
|
367
|
+
const o = w({
|
|
365
368
|
id: null,
|
|
366
369
|
parentId: null,
|
|
367
370
|
phone: null,
|
|
368
371
|
nicekname: null,
|
|
369
372
|
inviteCode: null
|
|
370
|
-
}), l =
|
|
373
|
+
}), l = w(null);
|
|
371
374
|
function r() {
|
|
372
375
|
l.value.search();
|
|
373
376
|
}
|
|
374
|
-
const v =
|
|
377
|
+
const v = w();
|
|
375
378
|
function s(c) {
|
|
376
379
|
v.value.show(c.id);
|
|
377
380
|
}
|
|
378
381
|
return (c, u) => {
|
|
379
|
-
const b = p("el-input"),
|
|
380
|
-
return
|
|
381
|
-
x("div",
|
|
382
|
+
const b = p("el-input"), D = p("el-button"), g = p("el-space"), i = p("el-card"), d = p("el-table-column"), V = p("el-image");
|
|
383
|
+
return m(), T(I, null, [
|
|
384
|
+
x("div", te, [
|
|
382
385
|
e(i, null, {
|
|
383
386
|
default: t(() => [
|
|
384
|
-
e(
|
|
387
|
+
e(g, null, {
|
|
385
388
|
default: t(() => [
|
|
386
389
|
e(b, {
|
|
387
390
|
modelValue: o.value.id,
|
|
@@ -418,13 +421,13 @@ const Q = /* @__PURE__ */ U({
|
|
|
418
421
|
style: { width: "100px" },
|
|
419
422
|
clearable: ""
|
|
420
423
|
}, null, 8, ["modelValue"]),
|
|
421
|
-
e(
|
|
424
|
+
e(D, {
|
|
422
425
|
type: "primary",
|
|
423
426
|
icon: "search",
|
|
424
427
|
onClick: r
|
|
425
428
|
}, {
|
|
426
429
|
default: t(() => [
|
|
427
|
-
|
|
430
|
+
_("搜索")
|
|
428
431
|
]),
|
|
429
432
|
_: 1
|
|
430
433
|
})
|
|
@@ -434,8 +437,8 @@ const Q = /* @__PURE__ */ U({
|
|
|
434
437
|
]),
|
|
435
438
|
_: 1
|
|
436
439
|
}),
|
|
437
|
-
x("div",
|
|
438
|
-
e(H(
|
|
440
|
+
x("div", oe, [
|
|
441
|
+
e(H(K), {
|
|
439
442
|
ref_key: "userTable",
|
|
440
443
|
ref: l,
|
|
441
444
|
"data-url": "/api/user/page",
|
|
@@ -457,7 +460,7 @@ const Q = /* @__PURE__ */ U({
|
|
|
457
460
|
"show-overflow-tooltip": ""
|
|
458
461
|
}, {
|
|
459
462
|
default: t((n) => [
|
|
460
|
-
(
|
|
463
|
+
(m(), f(C, {
|
|
461
464
|
"mask-mobile": n.row.mobile,
|
|
462
465
|
"user-id": n.row.id,
|
|
463
466
|
key: n.row.id
|
|
@@ -545,7 +548,7 @@ const Q = /* @__PURE__ */ U({
|
|
|
545
548
|
fixed: "right"
|
|
546
549
|
}, {
|
|
547
550
|
default: t(() => [
|
|
548
|
-
|
|
551
|
+
ae
|
|
549
552
|
]),
|
|
550
553
|
_: 1
|
|
551
554
|
})
|
|
@@ -562,7 +565,7 @@ const Q = /* @__PURE__ */ U({
|
|
|
562
565
|
};
|
|
563
566
|
}
|
|
564
567
|
});
|
|
565
|
-
const
|
|
568
|
+
const ie = /* @__PURE__ */ M(ne, [["__scopeId", "data-v-391c43be"]]), re = {
|
|
566
569
|
install: (a, o) => {
|
|
567
570
|
let l = o.router, r = l.getRoutes().find((v) => v.path == "/");
|
|
568
571
|
r && r.meta && l.addRoute({
|
|
@@ -573,23 +576,23 @@ const ne = /* @__PURE__ */ M(ae, [["__scopeId", "data-v-391c43be"]]), ie = {
|
|
|
573
576
|
children: [{
|
|
574
577
|
path: "list",
|
|
575
578
|
name: "UserList",
|
|
576
|
-
component:
|
|
579
|
+
component: ie
|
|
577
580
|
}]
|
|
578
581
|
});
|
|
579
582
|
}
|
|
580
|
-
},
|
|
583
|
+
}, se = (a, o) => {
|
|
581
584
|
const l = N();
|
|
582
585
|
if (o.userDetailDialogTabs && o.userDetailDialogTabs.length)
|
|
583
586
|
for (let r of o.userDetailDialogTabs)
|
|
584
587
|
l.userDetailDialogTabs.push(r);
|
|
585
|
-
|
|
586
|
-
},
|
|
587
|
-
install:
|
|
588
|
+
ee.forEach((r) => a.use(r)), a.use(re, o);
|
|
589
|
+
}, me = {
|
|
590
|
+
install: se
|
|
588
591
|
};
|
|
589
592
|
export {
|
|
590
|
-
|
|
593
|
+
Z as UserDetailDialog,
|
|
591
594
|
J as UserMobileComp,
|
|
592
|
-
|
|
593
|
-
|
|
595
|
+
me as default,
|
|
596
|
+
se as install,
|
|
594
597
|
N as useUserCoreConfigStore
|
|
595
598
|
};
|
package/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("pinia"),require("@pangu-backend-ui/common")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","@pangu-backend-ui/common"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m["pg-user-core"]={},m.Vue,m.pinia,m.common))})(this,function(m,e,y,D){"use strict";const T={key:0,class:"container"},B=e.defineComponent({__name:"UserMobileComponent",props:{userId:{type:Number,default:null},maskMobile:{type:String,default:null}},setup(l){const t=l,o=e.ref({plainMobile:null,loading:!1}),i=e.inject("http");function p(){o.value.plainMobile==null&&(o.value.loading=!0,i==null||i.get(`/api/user/${t.userId}/plainmobile`).then(r=>{o.value.plainMobile=r.data,o.value.loading=!1}).finally(()=>{o.value.loading=!1}))}return(r,d)=>{const c=e.resolveComponent("View"),_=e.resolveComponent("el-icon"),g=e.resolveComponent("Loading");return t.maskMobile!=null?(e.openBlock(),e.createElementBlock("div",T,[o.value.plainMobile==null?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.maskMobile),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.value.plainMobile),1)],64)),o.value.plainMobile==null&&!o.value.loading&&t.userId!=null?(e.openBlock(),e.createBlock(_,{key:2,class:"view-icon",onClick:p},{default:e.withCtx(()=>[e.createVNode(c)]),_:1})):e.createCommentVNode("",!0),o.value.loading?(e.openBlock(),e.createBlock(_,{key:3,class:"is-loading view-icon"},{default:e.withCtx(()=>[e.createVNode(g)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}}),q="",N=(l,t)=>{const o=l.__vccOpts||l;for(const[i,p]of t)o[i]=p;return o},V=N(B,[["__scopeId","data-v-76c9c9ae"]]),u={install:l=>{l.component("PgUserMobile",V)}};function S(){const l=e.inject("http");function t(o){return l==null?void 0:l.get(`/api/user/${o}`)}return{getUserDetail:t}}const U=e.defineComponent({__name:"LoginHistory",props:["userId"],setup(l){const t=l,o=e.ref({userId:t.userId,loginTimeStart:null,loginTimeEnd:null}),i=e.ref([]);e.watch(i,d=>{d?(o.value.loginTimeStart=d[0],o.value.loginTimeEnd=d[1]):(o.value.loginTimeStart=null,o.value.loginTimeEnd=null)});const p=e.ref();function r(){p.value.search()}return(d,c)=>{const _=e.resolveComponent("el-date-picker"),g=e.resolveComponent("el-button"),f=e.resolveComponent("el-space"),n=e.resolveComponent("el-table-column"),s=e.resolveComponent("el-tag"),h=e.resolveComponent("pg-table");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(f,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=a=>i.value=a),type:"datetimerange","range-separator":"-","start-placeholder":"登录开始时间","end-placeholder":"登录结束时间",clearable:""},null,8,["modelValue"]),e.createVNode(g,{type:"primary",icon:"search",onClick:r},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1}),e.createVNode(h,{ref_key:"historiesTable",ref:p,style:{"margin-top":"10px"},"data-url":"/api/user/login-history",condition:o.value},{columns:e.withCtx(()=>[e.createVNode(n,{prop:"createdTime",label:"登录时间",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"ip",label:"登录IP",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"runtimeName",label:"运行容器",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{label:"登录方式",align:"center","show-overflow-tooltip":""},{default:e.withCtx(({row:a})=>[a.method==="SMS"?(e.openBlock(),e.createBlock(s,{key:0,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("短信登录")]),_:1})):e.createCommentVNode("",!0),a.method==="THIRD_PLATFORM"?(e.openBlock(),e.createBlock(s,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("第三方平台")]),_:1})):e.createCommentVNode("",!0),a.method==="UNIVERIFY"?(e.openBlock(),e.createBlock(s,{key:2,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("一键登录")]),_:1})):e.createCommentVNode("",!0),a.method==="PASSWORD"?(e.openBlock(),e.createBlock(s,{key:3,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("帐号密码")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{prop:"thirdPlatformName",label:"第三方登录",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"versionCode",label:"版本代码",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"versionName",label:"版本名称",align:"center","show-overflow-tooltip":""})]),_:1},8,["condition"])],64)}}}),w=y.defineStore("pg-user-core-config-store",()=>{const l=[];return l.push({name:"登录历史",code:"LOGIN_HISTORY",component:U}),{userDetailDialogTabs:e.computed(()=>l)}}),C=e.defineComponent({__name:"UserDetailDialog",setup(l,{expose:t}){const{getUserDetail:o}=S(),i=w(),p=e.ref(!1),r=e.ref(),d=e.ref({activeName:i.userDetailDialogTabs[0].code,tabs:[]}),c=e.ref(!1);function _(g,f){var n;c.value=!0,(n=o(g))==null||n.then(s=>{r.value=s.data,c.value=!1,p.value=!0,d.value.tabs.length=0,d.value.tabs=d.value.tabs.concat(i.userDetailDialogTabs),f&&(d.value.tabs=d.value.tabs.concat(f))})}return t({show:_}),(g,f)=>{const n=e.resolveComponent("el-descriptions-item"),s=e.resolveComponent("el-descriptions"),h=e.resolveComponent("el-tab-pane"),a=e.resolveComponent("el-tabs"),z=e.resolveComponent("el-dialog"),j=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(z,{modelValue:p.value,"onUpdate:modelValue":f[1]||(f[1]=b=>p.value=b),title:"用户详情",width:"1300"},{default:e.withCtx(()=>[e.createVNode(s,{border:""},{default:e.withCtx(()=>[e.createVNode(n,{label:"用户编号"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.id),1)]),_:1}),e.createVNode(n,{label:"用户昵称"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.nickname),1)]),_:1}),e.createVNode(n,{label:"手机号码"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(V,{"mask-mobile":r.value.mobile,"user-id":r.value.id,key:r.value.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(n,{label:"邀请编码"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.inviteCode),1)]),_:1}),e.createVNode(n,{label:"活动时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.touchTime),1)]),_:1}),e.createVNode(n,{label:"注册时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.createdTime),1)]),_:1}),e.createVNode(n,{label:"最后登陆"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.lastLoginTime),1)]),_:1}),e.createVNode(n,{label:"最后更新"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.updatedTime),1)]),_:1}),e.createVNode(n,{label:"上级用户"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.parentId),1)]),_:1}),e.createVNode(n,{label:"邀请关系"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.relationPath),1)]),_:1})]),_:1}),e.createVNode(a,{modelValue:d.value.activeName,"onUpdate:modelValue":f[0]||(f[0]=b=>d.value.activeName=b),style:{"margin-top":"10px"},type:"border-card"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tabs,(b,A)=>(e.openBlock(),e.createBlock(h,{label:b.name,name:b.code,key:`user_detail_dialog_${b.code}`},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.component),{userId:r.value.id},null,8,["userId"]))]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])),[[j,c.value]])}}}),k={install:l=>{l.component("PgUserDetailDialog",C)}},I=[u,k],M=l=>(e.pushScopeId("data-v-391c43be"),l=l(),e.popScopeId(),l),E={class:"page-layout"},L={style:{"margin-top":"10px"}},P=M(()=>e.createElementVNode("template",{"slot-scope":"{row}"},null,-1)),R=e.defineComponent({__name:"list",setup(l){const t=e.ref({id:null,parentId:null,phone:null,nicekname:null,inviteCode:null}),o=e.ref(null);function i(){o.value.search()}const p=e.ref();function r(d){p.value.show(d.id)}return(d,c)=>{const _=e.resolveComponent("el-input"),g=e.resolveComponent("el-button"),f=e.resolveComponent("el-space"),n=e.resolveComponent("el-card"),s=e.resolveComponent("el-table-column"),h=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",E,[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:t.value.id,"onUpdate:modelValue":c[0]||(c[0]=a=>t.value.id=a),placeholder:"ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.parentId,"onUpdate:modelValue":c[1]||(c[1]=a=>t.value.parentId=a),placeholder:"父用户ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.phone,"onUpdate:modelValue":c[2]||(c[2]=a=>t.value.phone=a),placeholder:"手机号",style:{width:"120px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.nicekname,"onUpdate:modelValue":c[3]||(c[3]=a=>t.value.nicekname=a),placeholder:"昵称",style:{width:"150px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.inviteCode,"onUpdate:modelValue":c[4]||(c[4]=a=>t.value.inviteCode=a),placeholder:"邀请码",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(g,{type:"primary",icon:"search",onClick:i},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createElementVNode("div",L,[e.createVNode(e.unref(D.PgTable),{ref_key:"userTable",ref:o,"data-url":"/api/user/page",condition:t.value,onRowDbClick:c[5]||(c[5]=a=>r(a))},{columns:e.withCtx(()=>[e.createVNode(s,{prop:"id",label:"UID",width:"80",align:"center"}),e.createVNode(s,{prop:"mobile",label:"手机",width:"115",align:"left","show-overflow-tooltip":""},{default:e.withCtx(a=>[(e.openBlock(),e.createBlock(V,{"mask-mobile":a.row.mobile,"user-id":a.row.id,key:a.row.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(s,{prop:"username",label:"用户名",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"nickname",label:"昵称",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"inviteCode",label:"邀请码",width:"90",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{prop:"avatar",label:"头像",width:"60",align:"center","show-overflow-tooltip":""},{default:e.withCtx(a=>[e.createVNode(h,{fit:"cover",size:30,src:a.row.avatar,"preview-teleported":"","preview-src-list":[a.row.avatar]},null,8,["src","preview-src-list"])]),_:1}),e.createVNode(s,{prop:"parentId",label:"上级ID",width:"80",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"relationPath",label:"邀请关系","min-width":"150",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"blackUnlockTime",label:"黑名单解锁",width:"145",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"lastLoginTime",label:"最后登录时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{prop:"createdTime",label:"创建时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{label:"操作",width:"220",fixed:"right"},{default:e.withCtx(()=>[P]),_:1})]),_:1},8,["condition"])])]),e.createVNode(C,{ref_key:"userDetailDialog",ref:p},null,512)],64)}}}),H="",F=N(R,[["__scopeId","data-v-391c43be"]]),$={install:(l,t)=>{let o=t.router,i=o.getRoutes().find(p=>p.path=="/");i&&i.meta&&o.addRoute({path:"/user",name:"User",redirect:"/user/list",component:i.meta.commonLayout,children:[{path:"list",name:"UserList",component:F}]})}},x=(l,t)=>{const o=w();if(t.userDetailDialogTabs&&t.userDetailDialogTabs.length)for(let i of t.userDetailDialogTabs)o.userDetailDialogTabs.push(i);I.forEach(i=>l.use(i)),l.use($,t)},O={install:x};m.UserDetailDialog=k,m.UserMobileComp=u,m.default=O,m.install=x,m.useUserCoreConfigStore=w,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("pinia"),require("@pangu-backend-ui/common")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","@pangu-backend-ui/common"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m["pg-user-core"]={},m.Vue,m.pinia,m.common))})(this,function(m,e,x,D){"use strict";const T={key:0,class:"container"},B=e.defineComponent({__name:"UserMobileComponent",props:{userId:{type:Number,default:null},maskMobile:{type:String,default:null}},setup(l){const t=l,o=e.ref({plainMobile:null,loading:!1}),r=e.inject("http");function p(){o.value.plainMobile==null&&(o.value.loading=!0,r==null||r.get(`/api/user/${t.userId}/plainmobile`).then(i=>{o.value.plainMobile=i.data,o.value.loading=!1}).finally(()=>{o.value.loading=!1}))}return(i,d)=>{const c=e.resolveComponent("View"),_=e.resolveComponent("el-icon"),b=e.resolveComponent("Loading");return t.maskMobile!=null?(e.openBlock(),e.createElementBlock("div",T,[o.value.plainMobile==null?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.maskMobile),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.value.plainMobile),1)],64)),o.value.plainMobile==null&&!o.value.loading&&t.userId!=null?(e.openBlock(),e.createBlock(_,{key:2,class:"view-icon",onClick:p},{default:e.withCtx(()=>[e.createVNode(c)]),_:1})):e.createCommentVNode("",!0),o.value.loading?(e.openBlock(),e.createBlock(_,{key:3,class:"is-loading view-icon"},{default:e.withCtx(()=>[e.createVNode(b)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}}),q="",N=(l,t)=>{const o=l.__vccOpts||l;for(const[r,p]of t)o[r]=p;return o},V=N(B,[["__scopeId","data-v-76c9c9ae"]]),u={install:l=>{l.component("PgUserMobile",V)}};function S(){const l=e.inject("http");function t(o){return l==null?void 0:l.get(`/api/user/${o}`)}return{getUserDetail:t}}const U=e.defineComponent({__name:"LoginHistory",props:["userId"],setup(l){const t=l,o=e.ref({userId:t.userId,loginTimeStart:null,loginTimeEnd:null}),r=e.ref([]);e.watch(r,d=>{d?(o.value.loginTimeStart=d[0],o.value.loginTimeEnd=d[1]):(o.value.loginTimeStart=null,o.value.loginTimeEnd=null)});const p=e.ref();function i(){p.value.search()}return(d,c)=>{const _=e.resolveComponent("el-date-picker"),b=e.resolveComponent("el-button"),f=e.resolveComponent("el-space"),n=e.resolveComponent("el-table-column"),s=e.resolveComponent("el-tag"),h=e.resolveComponent("pg-table");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(f,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=a=>r.value=a),type:"datetimerange","range-separator":"-","start-placeholder":"登录开始时间","end-placeholder":"登录结束时间",clearable:""},null,8,["modelValue"]),e.createVNode(b,{type:"primary",icon:"search",onClick:i},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1}),e.createVNode(h,{ref_key:"historiesTable",ref:p,style:{"margin-top":"10px"},"data-url":"/api/user/login-history",condition:o.value},{columns:e.withCtx(()=>[e.createVNode(n,{prop:"createdTime",label:"登录时间",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"ip",label:"登录IP",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"runtimeName",label:"运行容器",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{label:"登录方式",align:"center","show-overflow-tooltip":""},{default:e.withCtx(({row:a})=>[a.method==="SMS"?(e.openBlock(),e.createBlock(s,{key:0,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("短信登录")]),_:1})):e.createCommentVNode("",!0),a.method==="THIRD_PLATFORM"?(e.openBlock(),e.createBlock(s,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("第三方平台")]),_:1})):e.createCommentVNode("",!0),a.method==="UNIVERIFY"?(e.openBlock(),e.createBlock(s,{key:2,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("一键登录")]),_:1})):e.createCommentVNode("",!0),a.method==="PASSWORD"?(e.openBlock(),e.createBlock(s,{key:3,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("帐号密码")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{prop:"thirdPlatformName",label:"第三方登录",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"versionCode",label:"版本代码",align:"center","show-overflow-tooltip":""}),e.createVNode(n,{prop:"versionName",label:"版本名称",align:"center","show-overflow-tooltip":""})]),_:1},8,["condition"])],64)}}}),w=x.defineStore("pg-user-core-config-store",()=>{const l=[];return l.push({name:"登录历史",code:"LOGIN_HISTORY",component:U}),{userDetailDialogTabs:e.computed(()=>l)}}),C=e.defineComponent({__name:"UserDetailDialog",setup(l,{expose:t}){const{getUserDetail:o}=S(),r=w(),p=e.ref(!1),i=e.ref(),d=e.ref({activeName:r.userDetailDialogTabs[0].code,tabs:[]}),c=e.ref(!1);function _(b,f){var n;c.value=!0,(n=o(b))==null||n.then(s=>{i.value=s.data,c.value=!1,p.value=!0,d.value.tabs.length=0,d.value.tabs=d.value.tabs.concat(r.userDetailDialogTabs),f&&(d.value.tabs=d.value.tabs.concat(f))})}return t({show:_}),(b,f)=>{const n=e.resolveComponent("el-descriptions-item"),s=e.resolveComponent("el-descriptions"),h=e.resolveComponent("el-tab-pane"),a=e.resolveComponent("el-tabs"),z=e.resolveComponent("el-dialog"),j=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(z,{modelValue:p.value,"onUpdate:modelValue":f[1]||(f[1]=g=>p.value=g),title:"用户详情",width:"1300"},{default:e.withCtx(()=>[e.createVNode(s,{border:""},{default:e.withCtx(()=>[e.createVNode(n,{label:"用户编号"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.id),1)]),_:1}),e.createVNode(n,{label:"用户昵称"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.nickname),1)]),_:1}),e.createVNode(n,{label:"手机号码"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(V,{"mask-mobile":i.value.mobile,"user-id":i.value.id,key:i.value.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(n,{label:"邀请编码"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.inviteCode),1)]),_:1}),e.createVNode(n,{label:"活动时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.touchTime),1)]),_:1}),e.createVNode(n,{label:"注册时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.createdTime),1)]),_:1}),e.createVNode(n,{label:"最后登陆"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.lastLoginTime),1)]),_:1}),e.createVNode(n,{label:"最后更新"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.updatedTime),1)]),_:1}),e.createVNode(n,{label:"上级用户"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.parentId),1)]),_:1}),e.createVNode(n,{label:"邀请关系"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.relationPath),1)]),_:1})]),_:1}),e.createVNode(a,{modelValue:d.value.activeName,"onUpdate:modelValue":f[0]||(f[0]=g=>d.value.activeName=g),style:{"margin-top":"10px"},type:"border-card"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tabs,(g,H)=>(e.openBlock(),e.createBlock(h,{label:g.name,name:g.code,key:`user_detail_dialog_${g.code}`},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[d.value.activeName==g.code?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.component),{key:`ud_tab_${g.code}`,userId:i.value.id},null,8,["userId"])):e.createCommentVNode("",!0)],1024))]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])),[[j,c.value]])}}}),k={install:l=>{l.component("PgUserDetailDialog",C)}},I=[u,k],M=l=>(e.pushScopeId("data-v-391c43be"),l=l(),e.popScopeId(),l),E={class:"page-layout"},L={style:{"margin-top":"10px"}},P=M(()=>e.createElementVNode("template",{"slot-scope":"{row}"},null,-1)),R=e.defineComponent({__name:"list",setup(l){const t=e.ref({id:null,parentId:null,phone:null,nicekname:null,inviteCode:null}),o=e.ref(null);function r(){o.value.search()}const p=e.ref();function i(d){p.value.show(d.id)}return(d,c)=>{const _=e.resolveComponent("el-input"),b=e.resolveComponent("el-button"),f=e.resolveComponent("el-space"),n=e.resolveComponent("el-card"),s=e.resolveComponent("el-table-column"),h=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",E,[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:t.value.id,"onUpdate:modelValue":c[0]||(c[0]=a=>t.value.id=a),placeholder:"ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.parentId,"onUpdate:modelValue":c[1]||(c[1]=a=>t.value.parentId=a),placeholder:"父用户ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.phone,"onUpdate:modelValue":c[2]||(c[2]=a=>t.value.phone=a),placeholder:"手机号",style:{width:"120px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.nicekname,"onUpdate:modelValue":c[3]||(c[3]=a=>t.value.nicekname=a),placeholder:"昵称",style:{width:"150px"},clearable:""},null,8,["modelValue"]),e.createVNode(_,{modelValue:t.value.inviteCode,"onUpdate:modelValue":c[4]||(c[4]=a=>t.value.inviteCode=a),placeholder:"邀请码",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(b,{type:"primary",icon:"search",onClick:r},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createElementVNode("div",L,[e.createVNode(e.unref(D.PgTable),{ref_key:"userTable",ref:o,"data-url":"/api/user/page",condition:t.value,onRowDbClick:c[5]||(c[5]=a=>i(a))},{columns:e.withCtx(()=>[e.createVNode(s,{prop:"id",label:"UID",width:"80",align:"center"}),e.createVNode(s,{prop:"mobile",label:"手机",width:"115",align:"left","show-overflow-tooltip":""},{default:e.withCtx(a=>[(e.openBlock(),e.createBlock(V,{"mask-mobile":a.row.mobile,"user-id":a.row.id,key:a.row.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(s,{prop:"username",label:"用户名",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"nickname",label:"昵称",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"inviteCode",label:"邀请码",width:"90",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{prop:"avatar",label:"头像",width:"60",align:"center","show-overflow-tooltip":""},{default:e.withCtx(a=>[e.createVNode(h,{fit:"cover",size:30,src:a.row.avatar,"preview-teleported":"","preview-src-list":[a.row.avatar]},null,8,["src","preview-src-list"])]),_:1}),e.createVNode(s,{prop:"parentId",label:"上级ID",width:"80",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"relationPath",label:"邀请关系","min-width":"150",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"blackUnlockTime",label:"黑名单解锁",width:"145",align:"left","show-overflow-tooltip":""}),e.createVNode(s,{prop:"lastLoginTime",label:"最后登录时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{prop:"createdTime",label:"创建时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(s,{label:"操作",width:"220",fixed:"right"},{default:e.withCtx(()=>[P]),_:1})]),_:1},8,["condition"])])]),e.createVNode(C,{ref_key:"userDetailDialog",ref:p},null,512)],64)}}}),A="",$=N(R,[["__scopeId","data-v-391c43be"]]),F={install:(l,t)=>{let o=t.router,r=o.getRoutes().find(p=>p.path=="/");r&&r.meta&&o.addRoute({path:"/user",name:"User",redirect:"/user/list",component:r.meta.commonLayout,children:[{path:"list",name:"UserList",component:$}]})}},y=(l,t)=>{const o=w();if(t.userDetailDialogTabs&&t.userDetailDialogTabs.length)for(let r of t.userDetailDialogTabs)o.userDetailDialogTabs.push(r);I.forEach(r=>l.use(r)),l.use(F,t)},O={install:y};m.UserDetailDialog=k,m.UserMobileComp=u,m.default=O,m.install=y,m.useUserCoreConfigStore=w,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|