@pangu-backend-ui/user-core 0.0.19 → 0.0.20

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