@pangu-backend-ui/user-core 0.0.16 → 0.0.17

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 CHANGED
@@ -1,10 +1,10 @@
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 = {
1
+ import { defineComponent as A, ref as g, inject as R, resolveComponent as n, openBlock as p, createElementBlock as S, Fragment as M, createTextVNode as c, toDisplayString as k, createBlock as C, withCtx as l, createVNode as e, createCommentVNode as T, watch as j, shallowRef as Z, computed as ee, renderSlot as J, renderList as q, resolveDirective as F, createSlots as le, withDirectives as K, KeepAlive as te, resolveDynamicComponent as oe, createElementVNode as Y, unref as ae, pushScopeId as ne, popScopeId as ie } from "vue";
2
+ import { defineStore as se } from "pinia";
3
+ import { PgTable as ue } from "@pangu-backend-ui/common";
4
+ const re = {
5
5
  key: 0,
6
6
  class: "container"
7
- }, ue = /* @__PURE__ */ A({
7
+ }, de = /* @__PURE__ */ A({
8
8
  __name: "UserMobileComponent",
9
9
  props: {
10
10
  userId: {
@@ -17,26 +17,26 @@ const se = {
17
17
  }
18
18
  },
19
19
  setup(m) {
20
- const u = m, n = g({
20
+ const u = m, i = g({
21
21
  plainMobile: null,
22
22
  loading: !1
23
23
  }), r = R("http");
24
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;
25
+ i.value.plainMobile == null && (i.value.loading = !0, r == null || r.get(`/api/user/${u.userId}/plainmobile`).then((a) => {
26
+ i.value.plainMobile = a.data, i.value.loading = !1;
27
27
  }).finally(() => {
28
- n.value.loading = !1;
28
+ i.value.loading = !1;
29
29
  }));
30
30
  }
31
- return (i, b) => {
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 }, [
31
+ return (a, b) => {
32
+ const s = n("View"), D = n("el-icon"), f = n("Loading");
33
+ return u.maskMobile != null ? (p(), S("div", re, [
34
+ i.value.plainMobile == null ? (p(), S(M, { key: 0 }, [
35
35
  c(k(u.maskMobile), 1)
36
- ], 64)) : (p(), x(M, { key: 1 }, [
37
- c(k(n.value.plainMobile), 1)
36
+ ], 64)) : (p(), S(M, { key: 1 }, [
37
+ c(k(i.value.plainMobile), 1)
38
38
  ], 64)),
39
- n.value.plainMobile == null && !n.value.loading && u.userId != null ? (p(), C(D, {
39
+ i.value.plainMobile == null && !i.value.loading && u.userId != null ? (p(), C(D, {
40
40
  key: 2,
41
41
  class: "view-icon",
42
42
  onClick: _
@@ -46,7 +46,7 @@ const se = {
46
46
  ]),
47
47
  _: 1
48
48
  })) : T("", !0),
49
- n.value.loading ? (p(), C(D, {
49
+ i.value.loading ? (p(), C(D, {
50
50
  key: 3,
51
51
  class: "is-loading view-icon"
52
52
  }, {
@@ -60,33 +60,33 @@ const se = {
60
60
  }
61
61
  });
62
62
  const G = (m, u) => {
63
- const n = m.__vccOpts || m;
63
+ const i = m.__vccOpts || m;
64
64
  for (const [r, _] of u)
65
- n[r] = _;
66
- return n;
67
- }, O = /* @__PURE__ */ G(ue, [["__scopeId", "data-v-76c9c9ae"]]), re = {
65
+ i[r] = _;
66
+ return i;
67
+ }, E = /* @__PURE__ */ G(de, [["__scopeId", "data-v-76c9c9ae"]]), ce = {
68
68
  install: (m) => {
69
- m.component("PgUserMobile", O);
69
+ m.component("PgUserMobile", E);
70
70
  }
71
- }, de = /* @__PURE__ */ A({
71
+ }, pe = /* @__PURE__ */ A({
72
72
  __name: "LoginHistory",
73
73
  props: ["userId"],
74
74
  setup(m) {
75
- const n = g({
75
+ const i = g({
76
76
  userId: m.userId,
77
77
  loginTimeStart: null,
78
78
  loginTimeEnd: null
79
79
  }), r = g([]);
80
80
  j(r, (b) => {
81
- b ? (n.value.loginTimeStart = b[0], n.value.loginTimeEnd = b[1]) : (n.value.loginTimeStart = null, n.value.loginTimeEnd = null);
81
+ b ? (i.value.loginTimeStart = b[0], i.value.loginTimeEnd = b[1]) : (i.value.loginTimeStart = null, i.value.loginTimeEnd = null);
82
82
  });
83
83
  const _ = g();
84
- function i() {
84
+ function a() {
85
85
  _.value.search();
86
86
  }
87
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, [
88
+ const D = n("el-date-picker"), f = n("el-button"), h = n("el-space"), V = n("el-table-column"), v = n("el-tag"), w = n("pg-table");
89
+ return p(), S(M, null, [
90
90
  e(h, null, {
91
91
  default: l(() => [
92
92
  e(D, {
@@ -101,7 +101,7 @@ const G = (m, u) => {
101
101
  e(f, {
102
102
  type: "primary",
103
103
  icon: "search",
104
- onClick: i
104
+ onClick: a
105
105
  }, {
106
106
  default: l(() => [
107
107
  c("搜索")
@@ -116,7 +116,7 @@ const G = (m, u) => {
116
116
  ref: _,
117
117
  style: { "margin-top": "10px" },
118
118
  "data-url": "/api/user/login-history",
119
- condition: n.value
119
+ condition: i.value
120
120
  }, {
121
121
  columns: l(() => [
122
122
  e(V, {
@@ -210,14 +210,14 @@ const G = (m, u) => {
210
210
  ], 64);
211
211
  };
212
212
  }
213
- }), W = ne("pg-user-core-config-store", () => {
213
+ }), W = se("pg-user-core-config-store", () => {
214
214
  const m = [];
215
215
  return m.push({
216
216
  name: "登录历史",
217
217
  code: "LOGIN_HISTORY",
218
- component: de
218
+ component: Z(pe)
219
219
  }), {
220
- userDetailDialogTabs: Z(() => m)
220
+ userDetailDialogTabs: ee(() => m)
221
221
  };
222
222
  }), Q = /* @__PURE__ */ A({
223
223
  __name: "AddBlacklistComp",
@@ -228,15 +228,19 @@ const G = (m, u) => {
228
228
  },
229
229
  userId: {
230
230
  type: Number,
231
- required: !0
231
+ required: !1
232
232
  }
233
233
  },
234
234
  emits: ["success"],
235
- setup(m, { expose: u, emit: n }) {
236
- const r = m, _ = R("http"), i = g(!1);
235
+ setup(m, { expose: u, emit: i }) {
236
+ const r = m, _ = R("http"), a = g(!1);
237
237
  let b = g(null);
238
238
  function s(t) {
239
- i.value = !0, b.value = t ?? r.userId, t && V(b.value);
239
+ a.value = !0;
240
+ const o = t ?? r.userId;
241
+ if (!o)
242
+ throw Error("未设置用户ID");
243
+ b.value = o, V(b.value);
240
244
  }
241
245
  const D = g({
242
246
  description: [{ required: !0, message: "请输入加入黑名单的说明" }],
@@ -251,8 +255,8 @@ const G = (m, u) => {
251
255
  }), h = g();
252
256
  function V(t) {
253
257
  _ == 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;
258
+ var U, $, L, N, B;
259
+ (U = o.data) != null && U.info && (($ = o.data) != null && $.info.allowPermissionCodes && (f.value.permissions = JSON.parse((L = o.data) == null ? void 0 : L.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
260
  });
257
261
  }
258
262
  const v = g();
@@ -263,12 +267,12 @@ const G = (m, u) => {
263
267
  function d() {
264
268
  var t;
265
269
  (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");
270
+ o && (_ == null || _.post(`/api/user/${b.value}/blacklist`, f.value).then(($) => {
271
+ a.value = !1, i("success");
268
272
  }));
269
273
  });
270
274
  }
271
- const S = [
275
+ const x = [
272
276
  {
273
277
  text: "三天",
274
278
  value: () => {
@@ -322,8 +326,8 @@ const G = (m, u) => {
322
326
  return u({
323
327
  show: s
324
328
  }), (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, [
329
+ const U = n("el-button"), $ = n("el-date-picker"), L = n("el-form-item"), N = n("el-checkbox"), B = n("el-checkbox-group"), I = n("el-input"), P = n("el-form"), O = n("el-dialog");
330
+ return p(), S(M, null, [
327
331
  r.hiddenEntranceSlot ? T("", !0) : J(t.$slots, "default", { key: 0 }, () => [
328
332
  e(U, {
329
333
  icon: "lock",
@@ -336,9 +340,9 @@ const G = (m, u) => {
336
340
  _: 1
337
341
  })
338
342
  ]),
339
- e(E, {
340
- modelValue: i.value,
341
- "onUpdate:modelValue": o[4] || (o[4] = (y) => i.value = y),
343
+ e(O, {
344
+ modelValue: a.value,
345
+ "onUpdate:modelValue": o[4] || (o[4] = (y) => a.value = y),
342
346
  onClosed: w,
343
347
  title: "黑名单管理",
344
348
  width: "500"
@@ -363,21 +367,21 @@ const G = (m, u) => {
363
367
  model: f.value
364
368
  }, {
365
369
  default: l(() => [
366
- e($, {
370
+ e(L, {
367
371
  label: "解锁时间",
368
372
  prop: "unlockTime"
369
373
  }, {
370
374
  default: l(() => [
371
- e(L, {
375
+ e($, {
372
376
  type: "datetime",
373
- shortcuts: S,
377
+ shortcuts: x,
374
378
  modelValue: f.value.unlockTime,
375
379
  "onUpdate:modelValue": o[1] || (o[1] = (y) => f.value.unlockTime = y)
376
380
  }, null, 8, ["modelValue"])
377
381
  ]),
378
382
  _: 1
379
383
  }),
380
- e($, {
384
+ e(L, {
381
385
  label: "允许权限",
382
386
  prop: "allowPermissionCodes"
383
387
  }, {
@@ -387,7 +391,7 @@ const G = (m, u) => {
387
391
  "onUpdate:modelValue": o[2] || (o[2] = (y) => f.value.permissions = y)
388
392
  }, {
389
393
  default: l(() => [
390
- (p(!0), x(M, null, q(h.value, (y, z) => (p(), C(N, {
394
+ (p(!0), S(M, null, q(h.value, (y, z) => (p(), C(N, {
391
395
  label: z,
392
396
  key: z
393
397
  }, {
@@ -402,7 +406,7 @@ const G = (m, u) => {
402
406
  ]),
403
407
  _: 1
404
408
  }),
405
- e($, {
409
+ e(L, {
406
410
  label: "描述",
407
411
  prop: "description"
408
412
  }, {
@@ -424,217 +428,224 @@ const G = (m, u) => {
424
428
  ], 64);
425
429
  };
426
430
  }
427
- }), H = /* @__PURE__ */ A({
431
+ }), me = { key: 0 }, H = /* @__PURE__ */ A({
428
432
  __name: "UserDetailDialog",
429
433
  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,
434
+ const i = W(), r = R("http"), _ = g(!1), a = g(), b = g(), s = g({
435
+ activeName: i.userDetailDialogTabs[0].code,
432
436
  tabs: []
433
437
  }), 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));
438
+ function f(x, t, o) {
439
+ D.value = !0, h(x), t && (s.value.activeName = t), s.value.tabs.length = 0, s.value.tabs = s.value.tabs.concat(i.userDetailDialogTabs), o && (s.value.tabs = s.value.tabs.concat(o));
436
440
  }
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);
441
+ function h(x) {
442
+ r == null || r.get(`/api/user/${x}`).then((t) => {
443
+ a.value = t.data, D.value = !1, _.value = !0, a.value.inBlacklist && V(x);
440
444
  });
441
445
  }
442
- function V(S) {
443
- r == null || r.get(`/api/user/${S}/blacklist`).then((t) => {
446
+ function V(x) {
447
+ r == null || r.get(`/api/user/${x}/blacklist`).then((t) => {
444
448
  b.value = t.data;
445
449
  });
446
450
  }
447
451
  const v = g();
448
452
  function w() {
449
- v.value.show(i.value.id);
453
+ v.value.show(a.value.id);
450
454
  }
451
455
  function d() {
452
- i.value = null, b.value = null;
456
+ a.value = null, b.value = null;
453
457
  }
454
458
  return u({
455
459
  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
+ }), (x, t) => {
461
+ const o = n("el-descriptions-item"), U = n("el-tag"), $ = n("el-descriptions"), L = n("el-tab-pane"), N = n("el-tabs"), B = n("el-button"), I = n("el-dialog"), P = F("loading"), O = F("permission");
462
+ return p(), S(M, null, [
463
+ e(I, {
460
464
  modelValue: _.value,
461
465
  "onUpdate:modelValue": t[1] || (t[1] = (y) => _.value = y),
462
466
  title: "用户详情",
463
467
  width: "1300",
464
468
  onClosed: d
465
- }, {
466
- footer: l(() => [
467
- K((p(), C(B, {
468
- icon: "lock",
469
- type: "warning",
470
- onClick: w
471
- }, {
472
- default: l(() => [
473
- c(k(i.value.inBlacklist ? "修改" : "加入") + "黑名单", 1)
474
- ]),
475
- _: 1
476
- })), [
477
- [P, "ADD_TO_BLACKLIST"]
478
- ])
479
- ]),
469
+ }, le({
480
470
  default: l(() => [
481
- e(L, { border: "" }, {
482
- default: l(() => [
483
- e(o, { label: "用户编号" }, {
484
- default: l(() => [
485
- c(k(i.value.id), 1)
486
- ]),
487
- _: 1
488
- }),
489
- e(o, { label: "用户昵称" }, {
490
- default: l(() => [
491
- c(k(i.value.nickname), 1)
492
- ]),
493
- _: 1
494
- }),
495
- e(o, { label: "手机号码" }, {
496
- default: l(() => [
497
- (p(), C(O, {
498
- "mask-mobile": i.value.mobile,
499
- "user-id": i.value.id,
500
- key: i.value.id
501
- }, null, 8, ["mask-mobile", "user-id"]))
502
- ]),
503
- _: 1
504
- }),
505
- e(o, { label: "邀请编码" }, {
506
- default: l(() => [
507
- c(k(i.value.inviteCode), 1)
508
- ]),
509
- _: 1
510
- }),
511
- e(o, { label: "活动时间" }, {
512
- default: l(() => [
513
- c(k(i.value.touchTime), 1)
514
- ]),
515
- _: 1
516
- }),
517
- e(o, { label: "注册时间" }, {
518
- default: l(() => [
519
- c(k(i.value.createdTime), 1)
520
- ]),
521
- _: 1
522
- }),
523
- e(o, { label: "最后登陆" }, {
524
- default: l(() => [
525
- c(k(i.value.lastLoginTime), 1)
526
- ]),
527
- _: 1
528
- }),
529
- e(o, { label: "最后更新" }, {
530
- default: l(() => [
531
- c(k(i.value.updatedTime), 1)
532
- ]),
533
- _: 1
534
- }),
535
- e(o, { label: "上级用户" }, {
536
- default: l(() => [
537
- c(k(i.value.parentId), 1)
538
- ]),
539
- _: 1
540
- }),
541
- e(o, { label: "黑名单" }, {
542
- default: l(() => [
543
- e(U, {
544
- type: i.value.inBlacklist ? "danger" : "success"
545
- }, {
546
- default: l(() => [
547
- c(k(i.value.inBlacklist ? "是" : "否"), 1)
548
- ]),
549
- _: 1
550
- }, 8, ["type"])
551
- ]),
552
- _: 1
553
- }),
554
- e(o, { label: "邀请关系" }, {
555
- default: l(() => [
556
- c(k(i.value.relationPath), 1)
557
- ]),
558
- _: 1
559
- })
560
- ]),
561
- _: 1
562
- }),
563
- b.value ? (p(), C(L, {
564
- key: 0,
565
- style: { "margin-top": "10px" },
566
- border: "",
567
- column: "2"
568
- }, {
569
- default: l(() => [
570
- e(o, { label: "黑名单解锁时间" }, {
571
- default: l(() => [
572
- c(k(b.value.unlockTime), 1)
573
- ]),
574
- _: 1
575
- }),
576
- e(o, { label: "加入时间" }, {
577
- default: l(() => [
578
- c(k(b.value.createdTime), 1)
579
- ]),
580
- _: 1
581
- }),
582
- e(o, { label: "允许权限" }, {
583
- default: l(() => [
584
- c(k(b.value.allowPermissionCodes ? JSON.parse(b.value.allowPermissionCodes).join(", ") : ""), 1)
585
- ]),
586
- _: 1
587
- }),
588
- e(o, { label: "描述" }, {
589
- default: l(() => [
590
- c(k(b.value.description), 1)
591
- ]),
592
- _: 1
593
- })
594
- ]),
595
- _: 1
596
- })) : T("", !0),
597
- (p(), C(N, {
598
- modelValue: s.value.activeName,
599
- "onUpdate:modelValue": t[0] || (t[0] = (y) => s.value.activeName = y),
600
- key: `usr_tab_${i.value.id}`,
601
- style: { "margin-top": "10px" },
602
- type: "border-card"
603
- }, {
604
- default: l(() => [
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}`
609
- }, {
610
- default: l(() => [
611
- (p(), C(ee, null, [
612
- s.value.activeName == y.code ? (p(), C(le(y.component), {
613
- key: `ud_tab_${y.code}`,
614
- userId: i.value.id
615
- }, null, 8, ["userId"])) : T("", !0)
616
- ], 1024))
617
- ]),
618
- _: 2
619
- }, 1032, ["label", "name"]))), 128))
620
- ]),
621
- _: 1
622
- }, 8, ["modelValue"]))
471
+ a.value ? K((p(), S("div", me, [
472
+ e($, { border: "" }, {
473
+ default: l(() => [
474
+ e(o, { label: "用户编号" }, {
475
+ default: l(() => [
476
+ c(k(a.value.id), 1)
477
+ ]),
478
+ _: 1
479
+ }),
480
+ e(o, { label: "用户昵称" }, {
481
+ default: l(() => [
482
+ c(k(a.value.nickname), 1)
483
+ ]),
484
+ _: 1
485
+ }),
486
+ e(o, { label: "手机号码" }, {
487
+ default: l(() => [
488
+ (p(), C(E, {
489
+ "mask-mobile": a.value.mobile,
490
+ "user-id": a.value.id,
491
+ key: a.value.id
492
+ }, null, 8, ["mask-mobile", "user-id"]))
493
+ ]),
494
+ _: 1
495
+ }),
496
+ e(o, { label: "邀请编码" }, {
497
+ default: l(() => [
498
+ c(k(a.value.inviteCode), 1)
499
+ ]),
500
+ _: 1
501
+ }),
502
+ e(o, { label: "活动时间" }, {
503
+ default: l(() => [
504
+ c(k(a.value.touchTime), 1)
505
+ ]),
506
+ _: 1
507
+ }),
508
+ e(o, { label: "注册时间" }, {
509
+ default: l(() => [
510
+ c(k(a.value.createdTime), 1)
511
+ ]),
512
+ _: 1
513
+ }),
514
+ e(o, { label: "最后登陆" }, {
515
+ default: l(() => [
516
+ c(k(a.value.lastLoginTime), 1)
517
+ ]),
518
+ _: 1
519
+ }),
520
+ e(o, { label: "最后更新" }, {
521
+ default: l(() => [
522
+ c(k(a.value.updatedTime), 1)
523
+ ]),
524
+ _: 1
525
+ }),
526
+ e(o, { label: "上级用户" }, {
527
+ default: l(() => [
528
+ c(k(a.value.parentId), 1)
529
+ ]),
530
+ _: 1
531
+ }),
532
+ e(o, { label: "黑名单" }, {
533
+ default: l(() => [
534
+ e(U, {
535
+ type: a.value.inBlacklist ? "danger" : "success"
536
+ }, {
537
+ default: l(() => [
538
+ c(k(a.value.inBlacklist ? "是" : "否"), 1)
539
+ ]),
540
+ _: 1
541
+ }, 8, ["type"])
542
+ ]),
543
+ _: 1
544
+ }),
545
+ e(o, { label: "邀请关系" }, {
546
+ default: l(() => [
547
+ c(k(a.value.relationPath), 1)
548
+ ]),
549
+ _: 1
550
+ })
551
+ ]),
552
+ _: 1
553
+ }),
554
+ b.value ? (p(), C($, {
555
+ key: 0,
556
+ style: { "margin-top": "10px" },
557
+ border: "",
558
+ column: "2"
559
+ }, {
560
+ default: l(() => [
561
+ e(o, { label: "黑名单解锁时间" }, {
562
+ default: l(() => [
563
+ c(k(b.value.unlockTime), 1)
564
+ ]),
565
+ _: 1
566
+ }),
567
+ e(o, { label: "加入时间" }, {
568
+ default: l(() => [
569
+ c(k(b.value.createdTime), 1)
570
+ ]),
571
+ _: 1
572
+ }),
573
+ e(o, { label: "允许权限" }, {
574
+ default: l(() => [
575
+ c(k(b.value.allowPermissionCodes ? JSON.parse(b.value.allowPermissionCodes).join(", ") : ""), 1)
576
+ ]),
577
+ _: 1
578
+ }),
579
+ e(o, { label: "描述" }, {
580
+ default: l(() => [
581
+ c(k(b.value.description), 1)
582
+ ]),
583
+ _: 1
584
+ })
585
+ ]),
586
+ _: 1
587
+ })) : T("", !0),
588
+ (p(), C(N, {
589
+ modelValue: s.value.activeName,
590
+ "onUpdate:modelValue": t[0] || (t[0] = (y) => s.value.activeName = y),
591
+ key: `usr_tab_${a.value.id}`,
592
+ style: { "margin-top": "10px" },
593
+ type: "border-card"
594
+ }, {
595
+ default: l(() => [
596
+ (p(!0), S(M, null, q(s.value.tabs, (y, z) => (p(), C(L, {
597
+ label: y.name,
598
+ name: y.code,
599
+ key: `user_detail_dialog_${y.code}`
600
+ }, {
601
+ default: l(() => [
602
+ (p(), C(te, null, [
603
+ s.value.activeName == y.code ? (p(), C(oe(y.component), {
604
+ key: `ud_tab_${y.code}`,
605
+ userId: a.value.id
606
+ }, null, 8, ["userId"])) : T("", !0)
607
+ ], 1024))
608
+ ]),
609
+ _: 2
610
+ }, 1032, ["label", "name"]))), 128))
611
+ ]),
612
+ _: 1
613
+ }, 8, ["modelValue"]))
614
+ ])), [
615
+ [P, D.value]
616
+ ]) : T("", !0)
623
617
  ]),
624
- _: 1
625
- }, 8, ["modelValue"])), [
626
- [E, D.value]
627
- ]),
618
+ _: 2
619
+ }, [
620
+ a.value ? {
621
+ name: "footer",
622
+ fn: l(() => [
623
+ K((p(), C(B, {
624
+ icon: "lock",
625
+ type: "warning",
626
+ onClick: w
627
+ }, {
628
+ default: l(() => [
629
+ c(k(a.value.inBlacklist ? "修改" : "加入") + "黑名单", 1)
630
+ ]),
631
+ _: 1
632
+ })), [
633
+ [O, "ADD_TO_BLACKLIST"]
634
+ ])
635
+ ]),
636
+ key: "0"
637
+ } : void 0
638
+ ]), 1032, ["modelValue"]),
628
639
  e(Q, {
629
640
  ref_key: "addBlacklistComp",
630
641
  ref: v,
631
- onSuccess: t[2] || (t[2] = (y) => h(i.value.id)),
642
+ onSuccess: t[2] || (t[2] = (y) => h(a.value.id)),
632
643
  "hidden-entrance-slot": ""
633
644
  }, null, 512)
634
645
  ], 64);
635
646
  };
636
647
  }
637
- }), ce = {
648
+ }), _e = {
638
649
  install: (m) => {
639
650
  m.component("PgUserDetailDialog", H);
640
651
  }
@@ -652,36 +663,36 @@ const G = (m, u) => {
652
663
  },
653
664
  emits: ["update:modelValue"],
654
665
  setup(m, { emit: u }) {
655
- const n = m, r = R("http"), _ = g(n.modelValue);
666
+ const i = m, r = R("http"), _ = g(i.modelValue);
656
667
  j(_, (f) => {
657
668
  u("update:modelValue", f);
658
669
  });
659
- const i = g(!1), b = g([]);
670
+ const a = g(!1), b = g([]);
660
671
  let s = null;
661
672
  function D(f) {
662
- f && (i.value = !0, s && clearTimeout(s), s = setTimeout(() => {
673
+ f && (a.value = !0, s && clearTimeout(s), s = setTimeout(() => {
663
674
  r == null || r.get("/api/user/keyword-search", {
664
675
  keyword: f,
665
- pageSize: n.pageSize
676
+ pageSize: i.pageSize
666
677
  }).then((h) => {
667
678
  b.value = h.data;
668
679
  }).finally(() => {
669
- i.value = !1;
680
+ a.value = !1;
670
681
  });
671
682
  }, 200));
672
683
  }
673
684
  return (f, h) => {
674
- const V = a("el-option"), v = a("el-select");
685
+ const V = n("el-option"), v = n("el-select");
675
686
  return p(), C(v, {
676
687
  modelValue: _.value,
677
688
  "onUpdate:modelValue": h[0] || (h[0] = (w) => _.value = w),
678
689
  filterable: "",
679
690
  remote: "",
680
- loading: i.value,
691
+ loading: a.value,
681
692
  "remote-method": D
682
693
  }, {
683
694
  default: l(() => [
684
- (p(!0), x(M, null, q(b.value, (w) => (p(), C(V, {
695
+ (p(!0), S(M, null, q(b.value, (w) => (p(), C(V, {
685
696
  key: w.id,
686
697
  value: w.id,
687
698
  label: `${w.id} / ${w.nickname} / ${w.mobile} / ${w.inviteCode}`
@@ -698,15 +709,15 @@ const G = (m, u) => {
698
709
  }, 8, ["modelValue", "loading"]);
699
710
  };
700
711
  }
701
- }), pe = {
712
+ }), fe = {
702
713
  install: (m) => {
703
714
  m.component("PgUserSelector", X);
704
715
  }
705
- }, me = [
706
- re,
716
+ }, ve = [
707
717
  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({
718
+ _e,
719
+ fe
720
+ ], be = (m) => (ne("data-v-391c43be"), m = m(), ie(), m), ge = { class: "page-layout" }, ke = { style: { "margin-top": "10px" } }, we = /* @__PURE__ */ be(() => /* @__PURE__ */ Y("template", { "slot-scope": "{row}" }, null, -1)), he = /* @__PURE__ */ A({
710
721
  __name: "list",
711
722
  setup(m) {
712
723
  const u = g({
@@ -715,18 +726,18 @@ const G = (m, u) => {
715
726
  phone: null,
716
727
  nicekname: null,
717
728
  inviteCode: null
718
- }), n = g(null);
729
+ }), i = g(null);
719
730
  function r() {
720
- n.value.search();
731
+ i.value.search();
721
732
  }
722
733
  const _ = g();
723
- function i(b) {
734
+ function a(b) {
724
735
  _.value.show(b.id);
725
736
  }
726
737
  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, [
738
+ const D = n("el-input"), f = n("el-button"), h = n("el-space"), V = n("el-card"), v = n("el-table-column"), w = n("el-image");
739
+ return p(), S(M, null, [
740
+ Y("div", ge, [
730
741
  e(V, null, {
731
742
  default: l(() => [
732
743
  e(h, null, {
@@ -782,13 +793,13 @@ const G = (m, u) => {
782
793
  ]),
783
794
  _: 1
784
795
  }),
785
- Y("div", ve, [
786
- e(te(ie), {
796
+ Y("div", ke, [
797
+ e(ae(ue), {
787
798
  ref_key: "userTable",
788
- ref: n,
799
+ ref: i,
789
800
  "data-url": "/api/user/page",
790
801
  condition: u.value,
791
- onRowDbClick: s[5] || (s[5] = (d) => i(d))
802
+ onRowDbClick: s[5] || (s[5] = (d) => a(d))
792
803
  }, {
793
804
  columns: l(() => [
794
805
  e(v, {
@@ -805,7 +816,7 @@ const G = (m, u) => {
805
816
  "show-overflow-tooltip": ""
806
817
  }, {
807
818
  default: l((d) => [
808
- (p(), C(O, {
819
+ (p(), C(E, {
809
820
  "mask-mobile": d.row.mobile,
810
821
  "user-id": d.row.id,
811
822
  key: d.row.id
@@ -893,7 +904,7 @@ const G = (m, u) => {
893
904
  fixed: "right"
894
905
  }, {
895
906
  default: l(() => [
896
- be
907
+ we
897
908
  ]),
898
909
  _: 1
899
910
  })
@@ -910,17 +921,17 @@ const G = (m, u) => {
910
921
  };
911
922
  }
912
923
  });
913
- const ke = /* @__PURE__ */ G(ge, [["__scopeId", "data-v-391c43be"]]), we = /* @__PURE__ */ A({
924
+ const ye = /* @__PURE__ */ G(he, [["__scopeId", "data-v-391c43be"]]), De = /* @__PURE__ */ A({
914
925
  __name: "BlackListView",
915
926
  setup(m) {
916
- const u = R("http"), n = g({
927
+ const u = R("http"), i = g({
917
928
  userId: null,
918
929
  status: "VALID"
919
930
  }), r = g();
920
931
  function _() {
921
932
  r.value.search();
922
933
  }
923
- function i(h) {
934
+ function a(h) {
924
935
  u == null || u.post(`/api/user/blacklist/${h}/unlock`).then((V) => {
925
936
  _();
926
937
  });
@@ -934,22 +945,22 @@ const ke = /* @__PURE__ */ G(ge, [["__scopeId", "data-v-391c43be"]]), we = /* @_
934
945
  D.value.show(h);
935
946
  }
936
947
  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, [
948
+ const v = n("el-option"), w = n("el-select"), d = n("el-button"), x = n("el-space"), t = n("el-card"), o = n("el-table-column"), U = n("el-link"), $ = n("el-tag"), L = n("el-popconfirm"), N = n("pg-table"), B = F("permission");
949
+ return p(), S(M, null, [
939
950
  e(t, null, {
940
951
  default: l(() => [
941
- e(S, null, {
952
+ e(x, null, {
942
953
  default: l(() => [
943
954
  e(X, {
944
- modelValue: n.value.userId,
945
- "onUpdate:modelValue": V[0] || (V[0] = (I) => n.value.userId = I),
955
+ modelValue: i.value.userId,
956
+ "onUpdate:modelValue": V[0] || (V[0] = (I) => i.value.userId = I),
946
957
  clearable: "",
947
958
  style: { width: "300px" }
948
959
  }, null, 8, ["modelValue"]),
949
960
  e(w, {
950
961
  placeholder: "状态",
951
- modelValue: n.value.status,
952
- "onUpdate:modelValue": V[1] || (V[1] = (I) => n.value.status = I),
962
+ modelValue: i.value.status,
963
+ "onUpdate:modelValue": V[1] || (V[1] = (I) => i.value.status = I),
953
964
  clearable: "",
954
965
  style: { width: "100px" }
955
966
  }, {
@@ -985,7 +996,7 @@ const ke = /* @__PURE__ */ G(ge, [["__scopeId", "data-v-391c43be"]]), we = /* @_
985
996
  ref_key: "table",
986
997
  ref: r,
987
998
  "data-url": "/api/user/blacklist",
988
- condition: n.value,
999
+ condition: i.value,
989
1000
  style: { "margin-top": "10px" }
990
1001
  }, {
991
1002
  columns: l(() => [
@@ -1018,7 +1029,7 @@ const ke = /* @__PURE__ */ G(ge, [["__scopeId", "data-v-391c43be"]]), we = /* @_
1018
1029
  width: "150"
1019
1030
  }, {
1020
1031
  default: l(({ row: I }) => [
1021
- e(O, {
1032
+ e(E, {
1022
1033
  "user-id": I.userId,
1023
1034
  "mask-mobile": I.userMobile
1024
1035
  }, null, 8, ["user-id", "mask-mobile"])
@@ -1050,7 +1061,7 @@ const ke = /* @__PURE__ */ G(ge, [["__scopeId", "data-v-391c43be"]]), we = /* @_
1050
1061
  width: "100"
1051
1062
  }, {
1052
1063
  default: l(({ row: I }) => [
1053
- e(L, {
1064
+ e($, {
1054
1065
  type: I.status == "VALID" ? "success" : "warning"
1055
1066
  }, {
1056
1067
  default: l(() => [
@@ -1076,10 +1087,10 @@ const ke = /* @__PURE__ */ G(ge, [["__scopeId", "data-v-391c43be"]]), we = /* @_
1076
1087
  }),
1077
1088
  e(o, null, {
1078
1089
  default: l(({ row: I }) => [
1079
- I.status == "VALID" && h.$hasPer("BLACKLIST_UNLOCK") ? (p(), C($, {
1090
+ I.status == "VALID" && h.$hasPer("BLACKLIST_UNLOCK") ? (p(), C(L, {
1080
1091
  key: 0,
1081
1092
  title: "确定要解锁吗?",
1082
- onConfirm: i
1093
+ onConfirm: a
1083
1094
  }, {
1084
1095
  reference: l(() => [
1085
1096
  e(d, {
@@ -1125,10 +1136,10 @@ const ke = /* @__PURE__ */ G(ge, [["__scopeId", "data-v-391c43be"]]), we = /* @_
1125
1136
  ], 64);
1126
1137
  };
1127
1138
  }
1128
- }), he = {
1139
+ }), Ve = {
1129
1140
  install: (m, u) => {
1130
- let n = u.router, r = n.getRoutes().find((_) => _.path == "/");
1131
- r && r.meta && n.addRoute({
1141
+ let i = u.router, r = i.getRoutes().find((_) => _.path == "/");
1142
+ r && r.meta && i.addRoute({
1132
1143
  path: "/user",
1133
1144
  name: "User",
1134
1145
  redirect: "/user/list",
@@ -1136,28 +1147,28 @@ const ke = /* @__PURE__ */ G(ge, [["__scopeId", "data-v-391c43be"]]), we = /* @_
1136
1147
  children: [{
1137
1148
  path: "list",
1138
1149
  name: "UserList",
1139
- component: ke
1150
+ component: ye
1140
1151
  }, {
1141
1152
  path: "blacklist",
1142
1153
  name: "BlackListView",
1143
- component: we
1154
+ component: De
1144
1155
  }]
1145
1156
  });
1146
1157
  }
1147
- }, ye = (m, u) => {
1148
- const n = W();
1158
+ }, Ie = (m, u) => {
1159
+ const i = W();
1149
1160
  if (u.userDetailDialogTabs && u.userDetailDialogTabs.length)
1150
1161
  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
1162
+ i.userDetailDialogTabs.push(r);
1163
+ ve.forEach((r) => m.use(r)), m.use(Ve, u);
1164
+ }, xe = {
1165
+ install: Ie
1155
1166
  };
1156
1167
  export {
1157
- ce as UserDetailDialog,
1158
- re as UserMobileComp,
1159
- pe as UserSelectComp,
1160
- Ce as default,
1161
- ye as install,
1168
+ _e as UserDetailDialog,
1169
+ ce as UserMobileComp,
1170
+ fe as UserSelectComp,
1171
+ xe as default,
1172
+ Ie as install,
1162
1173
  W as useUserCoreConfigStore
1163
1174
  };