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