yh-pub 2.0.2 → 2.0.7

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.
Files changed (57) hide show
  1. package/{AdminLogin-W5d0M-rz.js → AdminLogin-BQ1XLQaD.js} +83 -72
  2. package/AdminLogin-BQ1XLQaD.js.map +1 -0
  3. package/{Error-BZ9xAkuT.js → Error-mAhb4JTd.js} +2 -2
  4. package/{Error-BZ9xAkuT.js.map → Error-mAhb4JTd.js.map} +1 -1
  5. package/Error401-B7NlVttM.js +31 -0
  6. package/Error401-B7NlVttM.js.map +1 -0
  7. package/Error404-Ba9ueMHc.js +31 -0
  8. package/Error404-Ba9ueMHc.js.map +1 -0
  9. package/Error500-DYjNCZNu.js +31 -0
  10. package/Error500-DYjNCZNu.js.map +1 -0
  11. package/{HomeIndex-DnGu5xD0.js → HomeIndex-BO9gew40.js} +172 -172
  12. package/HomeIndex-BO9gew40.js.map +1 -0
  13. package/{IconExplorer-IvNeUIhq.js → IconExplorer-CAqKbvQ1.js} +25 -25
  14. package/IconExplorer-CAqKbvQ1.js.map +1 -0
  15. package/Index-fSvx8Wih.js +5 -0
  16. package/Index-fSvx8Wih.js.map +1 -0
  17. package/{MainLogin-CgJLift-.js → MainLogin-D2XRuJDW.js} +92 -84
  18. package/MainLogin-D2XRuJDW.js.map +1 -0
  19. package/MenuManage-BPvVvMzw.js +626 -0
  20. package/MenuManage-BPvVvMzw.js.map +1 -0
  21. package/OrgManage-DM43rEPk.js +380 -0
  22. package/OrgManage-DM43rEPk.js.map +1 -0
  23. package/RoleManage-AqGTGljA.js +738 -0
  24. package/RoleManage-AqGTGljA.js.map +1 -0
  25. package/SysConfig-v9nYZf4a.js +733 -0
  26. package/SysConfig-v9nYZf4a.js.map +1 -0
  27. package/TenantList-PeEEKz0o.js +705 -0
  28. package/TenantList-PeEEKz0o.js.map +1 -0
  29. package/{index-C75ufNln.js → index-kZF68V9S.js} +9766 -9641
  30. package/index-kZF68V9S.js.map +1 -0
  31. package/index.es.js +51 -47
  32. package/package.json +1 -1
  33. package/style.css +1 -1
  34. package/AdminLogin-W5d0M-rz.js.map +0 -1
  35. package/Error401-DrA7Y9h3.js +0 -30
  36. package/Error401-DrA7Y9h3.js.map +0 -1
  37. package/Error404-C5K4o1R3.js +0 -30
  38. package/Error404-C5K4o1R3.js.map +0 -1
  39. package/Error500-D9nu1xhW.js +0 -30
  40. package/Error500-D9nu1xhW.js.map +0 -1
  41. package/HomeIndex-DnGu5xD0.js.map +0 -1
  42. package/IconExplorer-IvNeUIhq.js.map +0 -1
  43. package/Index-BMd4lEnI.js +0 -5
  44. package/Index-BMd4lEnI.js.map +0 -1
  45. package/MainLogin-CgJLift-.js.map +0 -1
  46. package/MenuManage-BJkQPgpt.js +0 -640
  47. package/MenuManage-BJkQPgpt.js.map +0 -1
  48. package/OrgManage-jLpAnwf4.js +0 -378
  49. package/OrgManage-jLpAnwf4.js.map +0 -1
  50. package/RoleManage-D2RwwJoM.js +0 -729
  51. package/RoleManage-D2RwwJoM.js.map +0 -1
  52. package/SysConfig-CYcl0wCh.js +0 -727
  53. package/SysConfig-CYcl0wCh.js.map +0 -1
  54. package/TenantList-CNVwmoEt.js +0 -693
  55. package/TenantList-CNVwmoEt.js.map +0 -1
  56. package/index-C75ufNln.js.map +0 -1
  57. package/index.d.ts +0 -35
@@ -0,0 +1,705 @@
1
+ import { defineComponent as Z, ref as v, reactive as A, watch as ne, resolveComponent as m, openBlock as B, createBlock as L, unref as f, withCtx as l, createVNode as e, createTextVNode as x, toDisplayString as w, resolveDirective as pe, createElementVNode as J, withDirectives as me, createElementBlock as H, Fragment as X, renderList as le, createCommentVNode as _e, onMounted as ge, normalizeProps as he, guardReactiveProps as ve } from "vue";
2
+ import { ElMessage as W, ElMessageBox as Ie } from "element-plus";
3
+ import { c as d, s as oe, h as be, j as ke, k as ye, l as Ce, m as Ve, n as De, o as we, _ as Me, p as xe, q as Te } from "./index-kZF68V9S.js";
4
+ import { deepClone as Ne } from "yh-client";
5
+ const Ue = /* @__PURE__ */ Z({
6
+ __name: "TenantForm",
7
+ props: {
8
+ actionData: {}
9
+ },
10
+ emits: ["getinfo"],
11
+ setup(F, { emit: R }) {
12
+ const z = F, I = R, g = v(!1), k = v(), T = v("add"), s = A({}), $ = {
13
+ code: [{ required: !0, message: d("必须输入该项"), trigger: "blur" }],
14
+ name: [{ required: !0, message: d("必须输入该项"), trigger: "blur" }],
15
+ orgValue: [{ required: !0, message: d("必须输入该项"), trigger: "blur" }],
16
+ orgName: [{ required: !0, message: d("必须输入该项"), trigger: "blur" }],
17
+ userName: [{ required: !0, message: d("必须输入该项"), trigger: "blur" }],
18
+ userUserName: [{ required: !0, message: d("必须输入该项"), trigger: "blur" }]
19
+ }, V = (c) => {
20
+ oe({
21
+ adClientId: c
22
+ }).then((p) => {
23
+ p.data.data && Object.assign(s, p.data.data);
24
+ });
25
+ }, D = async () => {
26
+ if (k.value)
27
+ try {
28
+ await k.value.validate(), T.value === "add" ? be(s).then((c) => {
29
+ c.data.data && (W.success(d("保存成功!")), g.value = !1, I("getinfo"));
30
+ }) : T.value === "edit" && ke(s).then((c) => {
31
+ c.data.data && (W.success(d("保存成功!")), g.value = !1, I("getinfo"));
32
+ });
33
+ } catch {
34
+ }
35
+ }, y = () => {
36
+ g.value = !1;
37
+ };
38
+ return ne(
39
+ () => z.actionData,
40
+ (c) => {
41
+ T.value = c.type, c.type === "add" ? (Object.keys(s).forEach((a) => {
42
+ delete s[a];
43
+ }), g.value = !0) : c.type === "edit" ? (V(c.id), g.value = !0) : g.value = !1;
44
+ },
45
+ { deep: !0 }
46
+ ), (c, a) => {
47
+ const p = m("el-input"), h = m("el-form-item"), C = m("el-col"), b = m("el-row"), G = m("el-form"), O = m("el-button"), j = m("el-dialog");
48
+ return B(), L(j, {
49
+ modelValue: g.value,
50
+ "onUpdate:modelValue": a[10] || (a[10] = (r) => g.value = r),
51
+ width: "800px",
52
+ title: f(d)("租户信息")
53
+ }, {
54
+ footer: l(() => [
55
+ e(O, {
56
+ type: "primary",
57
+ onClick: a[8] || (a[8] = (r) => D())
58
+ }, {
59
+ default: l(() => [
60
+ x(w(f(d)("保存")), 1)
61
+ ]),
62
+ _: 1
63
+ }),
64
+ e(O, {
65
+ onClick: a[9] || (a[9] = (r) => y())
66
+ }, {
67
+ default: l(() => [
68
+ x(w(f(d)("取消")), 1)
69
+ ]),
70
+ _: 1
71
+ })
72
+ ]),
73
+ default: l(() => [
74
+ e(G, {
75
+ ref_key: "formRef",
76
+ ref: k,
77
+ rules: $,
78
+ model: s,
79
+ "label-width": "140px"
80
+ }, {
81
+ default: l(() => [
82
+ e(b, null, {
83
+ default: l(() => [
84
+ e(C, { span: 12 }, {
85
+ default: l(() => [
86
+ e(h, {
87
+ prop: "adClientId",
88
+ label: f(d)("客户端ID")
89
+ }, {
90
+ default: l(() => [
91
+ e(p, {
92
+ modelValue: s.adClientId,
93
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => s.adClientId = r),
94
+ disabled: "",
95
+ placeholder: f(d)("自动生成")
96
+ }, null, 8, ["modelValue", "placeholder"])
97
+ ]),
98
+ _: 1
99
+ }, 8, ["label"])
100
+ ]),
101
+ _: 1
102
+ })
103
+ ]),
104
+ _: 1
105
+ }),
106
+ e(b, null, {
107
+ default: l(() => [
108
+ e(C, { span: 12 }, {
109
+ default: l(() => [
110
+ e(h, {
111
+ prop: "code",
112
+ label: f(d)("客户端编码")
113
+ }, {
114
+ default: l(() => [
115
+ e(p, {
116
+ modelValue: s.code,
117
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => s.code = r)
118
+ }, null, 8, ["modelValue"])
119
+ ]),
120
+ _: 1
121
+ }, 8, ["label"])
122
+ ]),
123
+ _: 1
124
+ }),
125
+ e(C, { span: 12 }, {
126
+ default: l(() => [
127
+ e(h, {
128
+ prop: "name",
129
+ label: f(d)("客户端名称")
130
+ }, {
131
+ default: l(() => [
132
+ e(p, {
133
+ modelValue: s.name,
134
+ "onUpdate:modelValue": a[2] || (a[2] = (r) => s.name = r)
135
+ }, null, 8, ["modelValue"])
136
+ ]),
137
+ _: 1
138
+ }, 8, ["label"])
139
+ ]),
140
+ _: 1
141
+ })
142
+ ]),
143
+ _: 1
144
+ }),
145
+ e(b, null, {
146
+ default: l(() => [
147
+ e(C, { span: 12 }, {
148
+ default: l(() => [
149
+ e(h, {
150
+ prop: "orgValue",
151
+ label: f(d)("组织机构编码")
152
+ }, {
153
+ default: l(() => [
154
+ e(p, {
155
+ modelValue: s.orgValue,
156
+ "onUpdate:modelValue": a[3] || (a[3] = (r) => s.orgValue = r)
157
+ }, null, 8, ["modelValue"])
158
+ ]),
159
+ _: 1
160
+ }, 8, ["label"])
161
+ ]),
162
+ _: 1
163
+ }),
164
+ e(C, { span: 12 }, {
165
+ default: l(() => [
166
+ e(h, {
167
+ prop: "orgName",
168
+ label: f(d)("组织机构名称")
169
+ }, {
170
+ default: l(() => [
171
+ e(p, {
172
+ modelValue: s.orgName,
173
+ "onUpdate:modelValue": a[4] || (a[4] = (r) => s.orgName = r)
174
+ }, null, 8, ["modelValue"])
175
+ ]),
176
+ _: 1
177
+ }, 8, ["label"])
178
+ ]),
179
+ _: 1
180
+ })
181
+ ]),
182
+ _: 1
183
+ }),
184
+ e(b, null, {
185
+ default: l(() => [
186
+ e(C, { span: 12 }, {
187
+ default: l(() => [
188
+ e(h, {
189
+ prop: "userName",
190
+ label: f(d)("用户名称")
191
+ }, {
192
+ default: l(() => [
193
+ e(p, {
194
+ modelValue: s.userName,
195
+ "onUpdate:modelValue": a[5] || (a[5] = (r) => s.userName = r)
196
+ }, null, 8, ["modelValue"])
197
+ ]),
198
+ _: 1
199
+ }, 8, ["label"])
200
+ ]),
201
+ _: 1
202
+ }),
203
+ e(C, { span: 12 }, {
204
+ default: l(() => [
205
+ e(h, {
206
+ prop: "userUserName",
207
+ label: f(d)("登录账户名称")
208
+ }, {
209
+ default: l(() => [
210
+ e(p, {
211
+ modelValue: s.userUserName,
212
+ "onUpdate:modelValue": a[6] || (a[6] = (r) => s.userUserName = r),
213
+ disabled: T.value !== "add"
214
+ }, null, 8, ["modelValue", "disabled"])
215
+ ]),
216
+ _: 1
217
+ }, 8, ["label"])
218
+ ]),
219
+ _: 1
220
+ })
221
+ ]),
222
+ _: 1
223
+ }),
224
+ e(b, null, {
225
+ default: l(() => [
226
+ e(C, { span: 24 }, {
227
+ default: l(() => [
228
+ e(h, {
229
+ label: f(d)("客户端备注")
230
+ }, {
231
+ default: l(() => [
232
+ e(p, {
233
+ modelValue: s.description,
234
+ "onUpdate:modelValue": a[7] || (a[7] = (r) => s.description = r),
235
+ type: "textarea",
236
+ rows: 3
237
+ }, null, 8, ["modelValue"])
238
+ ]),
239
+ _: 1
240
+ }, 8, ["label"])
241
+ ]),
242
+ _: 1
243
+ })
244
+ ]),
245
+ _: 1
246
+ })
247
+ ]),
248
+ _: 1
249
+ }, 8, ["model"])
250
+ ]),
251
+ _: 1
252
+ }, 8, ["modelValue", "title"]);
253
+ };
254
+ }
255
+ }), Pe = { class: "drawer-content" }, Ee = { class: "drawer-content" }, Be = { style: { "margin-left": "10px" } }, Re = { class: "drawer-footer br" }, Ae = /* @__PURE__ */ Z({
256
+ __name: "TenantRoleManage",
257
+ props: {
258
+ actionData: {}
259
+ },
260
+ emits: ["getinfo"],
261
+ setup(F, { emit: R }) {
262
+ const z = F, I = R, g = A({}), k = v(!1), T = v([]), s = v({}), $ = v({}), V = v([]), D = v(""), y = v({}), c = v([]), a = v([]), p = v([]), h = v(!0), C = v(""), b = v(!1), G = v(), O = () => {
263
+ y.value = {}, s.value = {}, $.value = {}, V.value = [], T.value = [];
264
+ }, j = () => {
265
+ k.value = !0;
266
+ const n = c.value.join(","), o = {};
267
+ Object.keys(y.value).forEach((u) => {
268
+ o["W_" + u] = y.value[u];
269
+ }), ye({
270
+ roleId: g.adRoleId,
271
+ ids: n,
272
+ btns: JSON.stringify(o),
273
+ adClientId: g.adClientId,
274
+ adOrgId: g.adOrgId
275
+ }).then((u) => {
276
+ k.value = !1;
277
+ const t = u.data;
278
+ t.result ? (W.success(d("操作成功")), S()) : W.error(t.msg);
279
+ });
280
+ }, r = (n) => {
281
+ Ce({ adRoleId: n }).then((o) => {
282
+ if (o.data.data) {
283
+ const u = o.data.data, t = {};
284
+ u.forEach((i) => {
285
+ t[i.sysWindowId] || (t[i.sysWindowId] = []), t[i.sysWindowId].push(i.sysWindowButtonId);
286
+ }), y.value = t;
287
+ }
288
+ });
289
+ }, S = () => {
290
+ O(), b.value = !1, I("getinfo");
291
+ }, de = async (n) => {
292
+ const o = {
293
+ adClientId: n
294
+ };
295
+ let u;
296
+ return await oe(o).then((t) => {
297
+ t.data.data && (u = t.data.data);
298
+ }), u;
299
+ }, se = async (n) => {
300
+ const o = {};
301
+ return a.value = [], c.value = [], await Ve({ adRoleId: n }).then((u) => {
302
+ const t = u.data;
303
+ t.result && t.data.forEach((i) => {
304
+ i.MENU_TYPE !== "GROUP" ? (o[i.AD_MENU_ID] = i, c.value.push(i.AD_MENU_ID)) : a.value.push(i.AD_MENU_ID);
305
+ });
306
+ }), o;
307
+ }, re = (n) => {
308
+ De({}).then((o) => {
309
+ const u = o.data;
310
+ if (u.data) {
311
+ const t = [];
312
+ u.data.forEach((M) => {
313
+ t.push(ae(M));
314
+ }), ee(t, n), p.value = t, h.value = !1;
315
+ }
316
+ });
317
+ }, ee = (n, o) => {
318
+ let u = 0;
319
+ return n.forEach((t) => {
320
+ if (t.expand = !0, o[t.adMenuId] && (t.checked = !0, u++), t.children && t.children.length > 0) {
321
+ const i = ee(t.children, o);
322
+ i === t.children.length ? (t.checked = !0, t.selectable = !0, t.indeterminate = !1) : i > 0 && i < t.children.length ? (t.indeterminate = !0, t.checked = !1, t.selectable = !0) : (t.checked = !1, t.indeterminate = !1);
323
+ }
324
+ }), u;
325
+ }, ue = (n, o) => {
326
+ if (n) {
327
+ if (D.value = n.sysWindowId || "", !D.value) {
328
+ V.value = [], T.value = y.value[D.value] || [];
329
+ return;
330
+ }
331
+ we({ sysWindowId: D.value }).then((u) => {
332
+ const t = u.data, { result: i, data: M } = t;
333
+ if (i && M) {
334
+ const N = [], E = {};
335
+ M.forEach((_) => {
336
+ _.TYPE === "QY" ? (N.push(_), E[_.ID] = []) : E[_.PARENT_ID] && E[_.PARENT_ID].push(_);
337
+ }), N.forEach((_) => {
338
+ _.childs = E[_.ID];
339
+ const Y = y.value[D.value] || [];
340
+ let q = 0;
341
+ E[_.ID].forEach((K) => {
342
+ Y.includes(K.ID) && q++;
343
+ }), q === E[_.ID].length ? (_.checkAll = !0, _.indeterminate = !1) : q > 0 ? (_.checkAll = !1, _.indeterminate = !0) : (_.checkAll = !1, _.indeterminate = !1), _.checkChilds = Y;
344
+ }), V.value = N, T.value = y.value[D.value] || [];
345
+ }
346
+ });
347
+ }
348
+ }, ie = (n, o) => {
349
+ n.menuType !== "GROUP" ? o ? delete s.value[n.adMenuId] : s.value[n.adMenuId] || (s.value[n.adMenuId] = "1") : te(n, !o);
350
+ }, te = (n, o) => {
351
+ o ? (s.value[n.adMenuId] || (s.value[n.adMenuId] = "1"), n.children && n.children.length > 0 && n.children.forEach((u) => {
352
+ te(u, o);
353
+ })) : delete s.value[n.adMenuId];
354
+ }, ce = (n, o, u) => {
355
+ let t = [];
356
+ o.indeterminate ? (t = o.childs.map((i) => i.ID), o.checkAll = !0, o.indeterminate = !1, o.checkChilds = t) : (o.checkAll = !1, o.indeterminate = !1, o.checkChilds = t), y.value[D.value] = t, V.value[u] = o;
357
+ }, fe = (n, o) => {
358
+ const t = Ne(V.value)[o];
359
+ if (n.length > 0) {
360
+ let i = 0, M = 0;
361
+ for (let N = 0; N < t.childs.length; N++)
362
+ n.includes(t.childs[N].ID) && M++;
363
+ M === t.childs.length ? i = 2 : i = 1, i === 1 ? (t.checkAll = !1, t.indeterminate = M !== 0) : i === 2 && (t.checkAll = !0, t.indeterminate = !1);
364
+ } else
365
+ t.checkAll = !1, t.indeterminate = !1;
366
+ t.checkChilds = n, V.value[o] = t, y.value[D.value] = n;
367
+ }, ae = (n, o) => {
368
+ const u = { data: n };
369
+ return u.key = n.adMenuId, u.title = n.name, n._childs && n._childs.length > 0 ? (n._childs.forEach((t) => {
370
+ u.children || (u.children = []), u.children.push(ae(t));
371
+ }), u.isLeaf = !1) : u.isLeaf = !0, delete n._childs, u;
372
+ };
373
+ return ne(
374
+ () => z.actionData,
375
+ async (n) => {
376
+ C.value = n.id;
377
+ const o = await de(n.id);
378
+ Object.assign(g, o), r(g.adRoleId);
379
+ const u = await se(g.adRoleId);
380
+ re(u), b.value = !0;
381
+ },
382
+ { deep: !0 }
383
+ ), (n, o) => {
384
+ const u = m("el-tree"), t = m("el-card"), i = m("el-col"), M = m("el-checkbox"), N = m("el-checkbox-group"), E = m("el-empty"), _ = m("el-button"), Y = m("el-row"), q = m("el-drawer"), K = pe("loading");
385
+ return B(), L(q, {
386
+ title: f(d)("分配权限"),
387
+ modelValue: b.value,
388
+ "onUpdate:modelValue": o[0] || (o[0] = (U) => b.value = U),
389
+ width: 800,
390
+ onClose: S
391
+ }, {
392
+ default: l(() => [
393
+ e(Y, null, {
394
+ default: l(() => [
395
+ e(i, { span: 12 }, {
396
+ default: l(() => [
397
+ e(t, {
398
+ title: f(d)("菜单权限")
399
+ }, {
400
+ default: l(() => [
401
+ J("div", Pe, [
402
+ me(e(u, {
403
+ ref_key: "treeRef",
404
+ ref: G,
405
+ data: p.value,
406
+ props: { label: "title", children: "children" },
407
+ "show-checkbox": "",
408
+ "node-key": "key",
409
+ "default-expand-parent": "",
410
+ onCurrentChange: ue,
411
+ onCheckChange: ie
412
+ }, null, 8, ["data"]), [
413
+ [K, h.value]
414
+ ])
415
+ ])
416
+ ]),
417
+ _: 1
418
+ }, 8, ["title"])
419
+ ]),
420
+ _: 1
421
+ }),
422
+ e(i, { span: 12 }, {
423
+ default: l(() => [
424
+ e(t, {
425
+ title: f(d)("按钮权限")
426
+ }, {
427
+ default: l(() => [
428
+ J("div", Ee, [
429
+ (B(!0), H(X, null, le(V.value, (U, Q) => (B(), L(t, {
430
+ key: Q,
431
+ style: { "margin-top": "5px" }
432
+ }, {
433
+ header: l(() => [
434
+ J("span", Be, w(U.NAME), 1),
435
+ e(M, {
436
+ modelValue: U.checkAll,
437
+ "onUpdate:modelValue": (P) => U.checkAll = P,
438
+ indeterminate: U.indeterminate,
439
+ onChange: (P) => ce(P, U, Q)
440
+ }, {
441
+ default: l(() => [
442
+ x(w(f(d)("全选")), 1)
443
+ ]),
444
+ _: 1
445
+ }, 8, ["modelValue", "onUpdate:modelValue", "indeterminate", "onChange"])
446
+ ]),
447
+ default: l(() => [
448
+ e(N, {
449
+ "model-value": U.checkChilds,
450
+ "onUpdate:modelValue": (P) => fe(P, Q)
451
+ }, {
452
+ default: l(() => [
453
+ (B(!0), H(X, null, le(U.childs, (P) => (B(), L(M, {
454
+ key: P.ID,
455
+ label: P.ID
456
+ }, {
457
+ default: l(() => [
458
+ x(w(P.NAME), 1)
459
+ ]),
460
+ _: 2
461
+ }, 1032, ["label"]))), 128))
462
+ ]),
463
+ _: 2
464
+ }, 1032, ["model-value", "onUpdate:modelValue"])
465
+ ]),
466
+ _: 2
467
+ }, 1024))), 128)),
468
+ V.value.length === 0 ? (B(), L(E, {
469
+ key: 0,
470
+ description: f(d)("暂无权限按钮")
471
+ }, null, 8, ["description"])) : _e("", !0),
472
+ J("div", Re, [
473
+ e(_, {
474
+ type: "primary",
475
+ loading: k.value,
476
+ onClick: j
477
+ }, {
478
+ default: l(() => [
479
+ x(w(f(d)("提交")), 1)
480
+ ]),
481
+ _: 1
482
+ }, 8, ["loading"]),
483
+ e(_, { onClick: S }, {
484
+ default: l(() => [
485
+ x(w(f(d)("取消")), 1)
486
+ ]),
487
+ _: 1
488
+ })
489
+ ])
490
+ ])
491
+ ]),
492
+ _: 1
493
+ }, 8, ["title"])
494
+ ]),
495
+ _: 1
496
+ })
497
+ ]),
498
+ _: 1
499
+ })
500
+ ]),
501
+ _: 1
502
+ }, 8, ["title", "modelValue"]);
503
+ };
504
+ }
505
+ }), ze = /* @__PURE__ */ Me(Ae, [["__scopeId", "data-v-8300e7fd"]]), Ge = /* @__PURE__ */ Z({
506
+ __name: "TenantList",
507
+ setup(F) {
508
+ const R = A({}), z = A({}), I = A({
509
+ total: 0,
510
+ currentPage: 1,
511
+ pageSize: 10
512
+ }), g = A({
513
+ loading: !1,
514
+ border: !1,
515
+ showOverflow: !0,
516
+ align: "center",
517
+ columns: [
518
+ { field: "adClientId", title: d("租户ID"), fixed: "left", width: 200 },
519
+ { field: "code", title: d("客户端编码") },
520
+ { field: "name", title: d("客户端名称") },
521
+ { field: "action", title: "操作", fixed: "right", width: 300, slots: { default: "action" } }
522
+ ],
523
+ data: []
524
+ }), k = A({}), T = ({ currentPage: c, pageSize: a }) => {
525
+ I.currentPage = c, I.pageSize = a, s();
526
+ }, s = () => {
527
+ const c = {
528
+ page: I.currentPage,
529
+ size: I.pageSize,
530
+ name: k.name,
531
+ code: k.code
532
+ };
533
+ g.loading = !0, xe(c).then((a) => {
534
+ const p = a.data;
535
+ p.data.records && (g.data = p.data.records, I.total = p.data.total, I.currentPage = p.data.current), g.loading = !1;
536
+ });
537
+ }, $ = () => {
538
+ Object.assign(R, { type: "add" });
539
+ }, V = (c) => {
540
+ Object.assign(R, { type: "edit", id: c.adClientId });
541
+ }, D = (c) => {
542
+ Object.assign(z, { id: c.adClientId });
543
+ }, y = (c) => {
544
+ Ie.confirm("这将删除租户以及租户下所有数据!是否删除?", "请确认", {
545
+ confirmButtonText: "确定",
546
+ cancelButtonText: "取消",
547
+ type: "warning"
548
+ }).then(() => {
549
+ const a = {
550
+ adClientId: c.adClientId
551
+ };
552
+ Te(a).then((p) => {
553
+ const h = p.data;
554
+ h.result ? (W.success(h.msg), s()) : W.error(h.msg);
555
+ });
556
+ }).catch(() => {
557
+ });
558
+ };
559
+ return ge(() => {
560
+ s();
561
+ }), (c, a) => {
562
+ const p = m("el-input"), h = m("el-form-item"), C = m("YhIcon"), b = m("el-button"), G = m("el-form"), O = m("vxe-pager"), j = m("vxe-grid");
563
+ return B(), H(X, null, [
564
+ e(G, {
565
+ model: k,
566
+ class: "ant-advanced-search-form",
567
+ inline: ""
568
+ }, {
569
+ default: l(() => [
570
+ e(h, {
571
+ label: f(d)("客户端编码")
572
+ }, {
573
+ default: l(() => [
574
+ e(p, {
575
+ modelValue: k.code,
576
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => k.code = r)
577
+ }, null, 8, ["modelValue"])
578
+ ]),
579
+ _: 1
580
+ }, 8, ["label"]),
581
+ e(h, {
582
+ label: f(d)("客户端名称")
583
+ }, {
584
+ default: l(() => [
585
+ e(p, {
586
+ modelValue: k.name,
587
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => k.name = r)
588
+ }, null, 8, ["modelValue"])
589
+ ]),
590
+ _: 1
591
+ }, 8, ["label"]),
592
+ e(h, null, {
593
+ default: l(() => [
594
+ e(b, {
595
+ type: "primary",
596
+ onClick: a[2] || (a[2] = (r) => s())
597
+ }, {
598
+ default: l(() => [
599
+ e(C, {
600
+ slot: "icon",
601
+ name: "search"
602
+ }),
603
+ x(" " + w(f(d)("查询")), 1)
604
+ ]),
605
+ _: 1
606
+ })
607
+ ]),
608
+ _: 1
609
+ }),
610
+ e(h, null, {
611
+ default: l(() => [
612
+ e(b, {
613
+ type: "primary",
614
+ onClick: a[3] || (a[3] = (r) => $())
615
+ }, {
616
+ default: l(() => [
617
+ e(C, {
618
+ slot: "icon",
619
+ name: "plus"
620
+ }),
621
+ x(" " + w(f(d)("初始化租户")), 1)
622
+ ]),
623
+ _: 1
624
+ })
625
+ ]),
626
+ _: 1
627
+ })
628
+ ]),
629
+ _: 1
630
+ }, 8, ["model"]),
631
+ e(j, he(ve(g)), {
632
+ action: l(({ row: r }) => [
633
+ e(b, {
634
+ type: "primary",
635
+ size: "small",
636
+ text: "",
637
+ style: { "margin-right": "5px" },
638
+ onClick: (S) => V(r)
639
+ }, {
640
+ default: l(() => [
641
+ x(w(f(d)("编辑")), 1)
642
+ ]),
643
+ _: 1
644
+ }, 8, ["onClick"]),
645
+ e(b, {
646
+ type: "primary",
647
+ size: "small",
648
+ text: "",
649
+ onClick: (S) => D(r)
650
+ }, {
651
+ default: l(() => [
652
+ x(w(f(d)("授权")), 1)
653
+ ]),
654
+ _: 1
655
+ }, 8, ["onClick"]),
656
+ e(b, {
657
+ type: "danger",
658
+ size: "small",
659
+ text: "",
660
+ onClick: (S) => y(r)
661
+ }, {
662
+ default: l(() => [
663
+ x(w(f(d)("删除")), 1)
664
+ ]),
665
+ _: 1
666
+ }, 8, ["onClick"])
667
+ ]),
668
+ pager: l(() => [
669
+ e(O, {
670
+ layouts: [
671
+ "Sizes",
672
+ "PrevJump",
673
+ "PrevPage",
674
+ "Number",
675
+ "NextPage",
676
+ "NextJump",
677
+ "FullJump",
678
+ "Total"
679
+ ],
680
+ "current-page": I.currentPage,
681
+ "onUpdate:currentPage": a[4] || (a[4] = (r) => I.currentPage = r),
682
+ "page-size": I.pageSize,
683
+ "onUpdate:pageSize": a[5] || (a[5] = (r) => I.pageSize = r),
684
+ total: I.total,
685
+ onPageChange: T
686
+ }, null, 8, ["current-page", "page-size", "total"])
687
+ ]),
688
+ _: 1
689
+ }, 16),
690
+ e(Ue, {
691
+ actionData: R,
692
+ onGetinfo: a[6] || (a[6] = (r) => s())
693
+ }, null, 8, ["actionData"]),
694
+ e(ze, {
695
+ actionData: z,
696
+ onGetinfo: a[7] || (a[7] = (r) => s())
697
+ }, null, 8, ["actionData"])
698
+ ], 64);
699
+ };
700
+ }
701
+ });
702
+ export {
703
+ Ge as default
704
+ };
705
+ //# sourceMappingURL=TenantList-PeEEKz0o.js.map