@pubinfo/module-rbac 2.0.0-beta.10 → 2.0.0-beta.13

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 (82) hide show
  1. package/dist/{animation_item.vue_vue_type_script_setup_true_lang-BQvmwheq.js → animation_item.vue_vue_type_script_setup_true_lang-BlABHm3g.js} +281 -281
  2. package/dist/cloneDeep-T2g9unQR.js +8 -0
  3. package/dist/components/OrgUserSelector/index.d.ts +3 -2
  4. package/dist/{gangweijiekou-BxJq_m0o.js → gangweijiekou-CwKBZZeP.js} +1 -1
  5. package/dist/{index-Cr17VOfm.js → index-47WJIE75.js} +4 -5
  6. package/dist/{index-U8kjKY6p.js → index-B-1Jsa5i.js} +5 -6
  7. package/dist/{index-DNf0NPrD.js → index-B9SnAiRA.js} +3 -3
  8. package/dist/{index-zh8PZXw2.js → index-BJjDMYx8.js} +16 -18
  9. package/dist/index-BmbYHtUo.js +465 -0
  10. package/dist/{index-s32GbmsJ.js → index-Buo7eb6B.js} +3 -3
  11. package/dist/{index-gmUZUdNl.js → index-CIjaZglK.js} +7 -8
  12. package/dist/{index-BhcAk-IH.js → index-CKLCWwPt.js} +1 -1
  13. package/dist/{index-yEpViVkx.js → index-CQ3vb_jT.js} +10 -11
  14. package/dist/{index-CFPhIFyG.js → index-CQNzD8gU.js} +2 -2
  15. package/dist/index-CSRC9-GH.js +7089 -0
  16. package/dist/{index-CTiFd9M0.js → index-CTrsWwwV.js} +3 -3
  17. package/dist/{index-BS45K9vK.js → index-CcmcknCO.js} +5 -6
  18. package/dist/{index-KboUdpTh.js → index-CdodWDJE.js} +12 -15
  19. package/dist/{index-a0E9oj3q.js → index-Cvwv0Juq.js} +12 -13
  20. package/dist/{index-Bl4v-7On.js → index-D6bWQnQN.js} +2 -2
  21. package/dist/{index-j_ln_NSt.js → index-D9_ODpMq.js} +10 -11
  22. package/dist/{index-UZeQsp70.js → index-DIjgGlG6.js} +3 -3
  23. package/dist/{index-BleenJqT.js → index-DWR59p3f.js} +3 -3
  24. package/dist/{index-Bbsiwecf.js → index-DvpacIa_.js} +33 -38
  25. package/dist/{index-D0yB_8b0.js → index-DwECKZP3.js} +3 -3
  26. package/dist/{index-CsHj-xDw.js → index-EoZZJdHB.js} +2 -2
  27. package/dist/{index-CLxqmFPw.js → index-f9JH7TH1.js} +3 -3
  28. package/dist/{index-Cej8u1qo.js → index-j_xONibm.js} +10 -11
  29. package/dist/{index-CLSeuhTv.js → index-r44NDBFT.js} +13 -14
  30. package/dist/index.d.ts +1 -0
  31. package/dist/index.js +7 -3
  32. package/dist/{itemlist-xAbIKRVj.js → itemlist-CKM1UvLl.js} +9 -10
  33. package/dist/{jiaosejiekou-BfY4h7uI.js → jiaosejiekou-D8-56Dhc.js} +1 -1
  34. package/dist/{login_history-CuQv9Iw3.js → login_history-yZSmHn0C.js} +1 -1
  35. package/dist/{operate_history-CGP-1Xy2.js → operate_history-tJ1NKXS0.js} +10 -10
  36. package/dist/{pubJiaosezukongzhiqi-CvYfc8Uz.js → pubJiaosezukongzhiqi-DmA3aBGv.js} +1 -1
  37. package/dist/{setItem-DkOvmWXP.js → setItem-BbFsEYsU.js} +1 -1
  38. package/dist/{shujuquanxianzhubiaokongzhiqi-DyNgf1y6.js → shujuquanxianzhubiaokongzhiqi-D378zzpa.js} +5 -5
  39. package/dist/style.css +1 -1
  40. package/dist/{useAppAndResource-D_b19V4t.js → useAppAndResource-BMsYsunz.js} +2 -2
  41. package/dist/{xitongpeizhifuwu-C1Vm-W1B.js → xitongpeizhifuwu-DDQ84VjN.js} +1 -1
  42. package/dist/{zidianfuwu-yCWHhOfO.js → zidianfuwu-CYqN5-ya.js} +1 -1
  43. package/dist/{ziyuanjiekou-DhrAbneq.js → ziyuanjiekou-Bv8jxVnB.js} +1 -1
  44. package/dist/{zuzhijiaosebiaokongzhiqi-B1g74RqL.js → zuzhijiaosebiaokongzhiqi-L6qeDk5-.js} +1 -1
  45. package/package.json +7 -8
  46. package/src/components/OrgUserSelector/index.ts +5 -0
  47. package/src/index.ts +1 -0
  48. package/dist/OrgSelector.vue_vue_type_script_setup_true_lang-BcL0IFuA.js +0 -567
  49. package/dist/_baseClone-CQ44TFeq.js +0 -191
  50. package/dist/cloneDeep-BI4WNBQ9.js +0 -8
  51. package/dist/index-DFR8dd2B.js +0 -785
  52. package/dist/index-Dm4sOX43.js +0 -27
  53. package/dist/index-MtXfNGqS.js +0 -1246
  54. package/dist/request-DQLgc7lT.js +0 -5
  55. package/dist/zuzhijiekou-PeZuFtCO.js +0 -85
  56. package/src/assets/icons/403.svg +0 -1
  57. package/src/assets/icons/403_dark.svg +0 -1
  58. package/src/assets/icons/404.svg +0 -1
  59. package/src/assets/icons/404_dark.svg +0 -1
  60. package/src/assets/icons/browser-360.svg +0 -1
  61. package/src/assets/icons/browser-chrome.svg +0 -1
  62. package/src/assets/icons/browser-edge.svg +0 -1
  63. package/src/assets/icons/browser-ie.svg +0 -1
  64. package/src/assets/icons/browser-other.svg +0 -1
  65. package/src/assets/icons/browser-qq.svg +0 -1
  66. package/src/assets/icons/browser-safari.svg +0 -1
  67. package/src/assets/icons/browser-uc.svg +0 -1
  68. package/src/assets/icons/change-org.svg +0 -1
  69. package/src/assets/icons/empty-data.svg +0 -1
  70. package/src/assets/icons/favorites.svg +0 -1
  71. package/src/assets/icons/image-load-fail.svg +0 -1
  72. package/src/assets/icons/logo-sig.svg +0 -1
  73. package/src/assets/icons/logo.svg +0 -1
  74. package/src/assets/icons/mima.svg +0 -1
  75. package/src/assets/icons/process-management.svg +0 -1
  76. package/src/assets/icons/project-management.svg +0 -1
  77. package/src/assets/icons/rbac.svg +0 -1
  78. package/src/assets/icons/test.svg +0 -1
  79. package/src/assets/icons/toolbar-collapse.svg +0 -1
  80. package/src/assets/icons/tree_icon.svg +0 -1
  81. package/src/assets/icons/tree_icon_checked.svg +0 -1
  82. package/src/assets/icons/workbench.svg +0 -1
@@ -2,17 +2,15 @@ import { Modal as De, Tabs as Ce, TabPane as Oe, CheckboxGroup as Pe, Tooltip as
2
2
  import { PubinfoIcon as Ae } from "pubinfo";
3
3
  import { PlusCircleOutlined as Me } from "@ant-design/icons-vue";
4
4
  import { defineComponent as de, mergeModels as Ue, ref as v, computed as te, useModel as Ne, createBlock as R, openBlock as r, withCtx as n, createElementVNode as g, createVNode as l, unref as a, isRef as Z, createElementBlock as _, Fragment as B, renderList as ee, createTextVNode as P, toDisplayString as I, createCommentVNode as ae, resolveDirective as Le, withDirectives as re } from "vue";
5
- import "./request-DQLgc7lT.js";
6
- import { g as Ve, p as qe, a as Be, b as Ke, d as Ye } from "./shujuquanxianzhubiaokongzhiqi-DyNgf1y6.js";
7
- import { ProTable as je } from "@pubinfo/pro-components";
8
- import { message as ve, Modal as ze } from "ant-design-vue";
9
- import { p as Qe, _ as He } from "./OrgSelector.vue_vue_type_script_setup_true_lang-BcL0IFuA.js";
5
+ import { u as oe, p as Ve, _ as qe } from "./index-CSRC9-GH.js";
6
+ import { g as Be, p as Ke, a as Ye, b as je, d as ze } from "./shujuquanxianzhubiaokongzhiqi-D378zzpa.js";
7
+ import { ProTable as Qe } from "@pubinfo/pro-components";
8
+ import { message as ve, Modal as He } from "ant-design-vue";
10
9
  import { G as ue } from "./enum-DDKThkSw.js";
11
- import { u as oe } from "./index-Dm4sOX43.js";
12
10
  import { _ as Je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
11
  import { R as We } from "./enum-CTUzwCYG.js";
14
- import { u as Xe } from "./useAppAndResource-D_b19V4t.js";
15
- import { _ as Ze } from "./index-BhcAk-IH.js";
12
+ import { u as Xe } from "./useAppAndResource-BMsYsunz.js";
13
+ import { _ as Ze } from "./index-CKLCWwPt.js";
16
14
  import { D as ie, a as ge, b as et, A as G } from "./enum-BEHz_Q18.js";
17
15
  const tt = { class: "h-340px border-1px border-solid flex flex-row border_color" }, at = { class: "w-360px" }, ot = { class: "flex-1 flex flex-col border-solid border-0px border-l-1px border_color" }, nt = { class: "flex-1 p-10px overflow-auto" }, st = /* @__PURE__ */ de({
18
16
  name: "GroupSelector",
@@ -32,7 +30,7 @@ const tt = { class: "h-340px border-1px border-solid flex flex-row border_color"
32
30
  T(ue.ORG), T(ue.PER);
33
31
  }
34
32
  function T(d) {
35
- Qe({ type: d }).then((o) => {
33
+ Ve({ type: d }).then((o) => {
36
34
  if (o && o.data && o.data.length) {
37
35
  const c = o.data.map((C) => {
38
36
  const { name: k = "", id: $ = "" } = C;
@@ -277,7 +275,7 @@ const tt = { class: "h-340px border-1px border-solid flex flex-row border_color"
277
275
  async function W(u, t) {
278
276
  if (T.value = u, d.value = !1, s.value = { ...y }, F(), ye(), ke(), t) {
279
277
  d.value = !0;
280
- const f = await Ve({ id: t == null ? void 0 : t.id });
278
+ const f = await Be({ id: t == null ? void 0 : t.id });
281
279
  if (f.success && f.data) {
282
280
  const { id: O, type: X, name: q, appId: z, orgs: U, resources: Q, groups: N } = f.data;
283
281
  s.value = {
@@ -340,7 +338,7 @@ const tt = { class: "h-340px border-1px border-solid flex flex-row border_color"
340
338
  var u;
341
339
  (u = m.value) == null || u.validate().then(() => {
342
340
  ce(!0);
343
- const t = d.value ? qe : Be, f = {
341
+ const t = d.value ? Ke : Ye, f = {
344
342
  ...s.value
345
343
  };
346
344
  j.value || delete f.orgIds, J.value || delete f.groupIds, t(f).then((O) => {
@@ -628,7 +626,7 @@ const tt = { class: "h-340px border-1px border-solid flex flex-row border_color"
628
626
  _: 1
629
627
  /* STABLE */
630
628
  }, 8, ["model"]),
631
- l(He, {
629
+ l(qe, {
632
630
  ref_key: "orgRef",
633
631
  ref: C,
634
632
  "model-value": a(k),
@@ -672,7 +670,7 @@ const tt = { class: "h-340px border-1px border-solid flex flex-row border_color"
672
670
  class: "ml-4px"
673
671
  }, kt = ["onClick"], It = {
674
672
  class: "ml-4px"
675
- }, Nt = /* @__PURE__ */ de({
673
+ }, Mt = /* @__PURE__ */ de({
676
674
  name: "DataPermission",
677
675
  __name: "index",
678
676
  setup(ne) {
@@ -718,7 +716,7 @@ const tt = { class: "h-340px border-1px border-solid flex flex-row border_color"
718
716
  pageSize: h,
719
717
  type: F,
720
718
  name: A
721
- } = p, y = await Ke({
719
+ } = p, y = await je({
722
720
  pageSize: h,
723
721
  currentPage: x,
724
722
  doSearchTotal: !0,
@@ -745,11 +743,11 @@ const tt = { class: "h-340px border-1px border-solid flex flex-row border_color"
745
743
  L.value.open(p, x);
746
744
  break;
747
745
  case G.REMOVE:
748
- ze.confirm({
746
+ He.confirm({
749
747
  title: "删除",
750
748
  content: "确定要删除该权限吗?",
751
749
  async onOk() {
752
- E(!0), Ye({
750
+ E(!0), ze({
753
751
  id: x == null ? void 0 : x.id
754
752
  }).then((h) => {
755
753
  h.success && (ve.success("删除成功"), w());
@@ -762,7 +760,7 @@ const tt = { class: "h-340px border-1px border-solid flex flex-row border_color"
762
760
  return (p, x) => {
763
761
  const h = Me, F = pe, A = Ae, T = _e, y = Le("auth");
764
762
  return r(), _("div", gt, [l(
765
- a(je),
763
+ a(Qe),
766
764
  {
767
765
  ref_key: "tableRef",
768
766
  ref: K,
@@ -858,5 +856,5 @@ const tt = { class: "h-340px border-1px border-solid flex flex-row border_color"
858
856
  }
859
857
  });
860
858
  export {
861
- Nt as default
859
+ Mt as default
862
860
  };
@@ -0,0 +1,465 @@
1
+ import { Drawer as j, Form as J, FormItem as Q, Input as X, Textarea as Z, Select as ee, Button as V, Tooltip as te, Space as N, Tabs as ne, TabPane as ae } from "ant-design-vue/es";
2
+ import { PubinfoIcon as oe } from "pubinfo";
3
+ import { PlusCircleOutlined as re } from "@ant-design/icons-vue";
4
+ import { defineComponent as A, reactive as se, ref as k, computed as le, createBlock as $, openBlock as h, unref as t, isRef as ie, withCtx as r, createVNode as n, createElementVNode as y, createTextVNode as E, createElementBlock as O, Fragment as L, renderList as ue, toDisplayString as C, createCommentVNode as pe } from "vue";
5
+ import { u as U, C as me, D as ce, E as de, F as fe, G as _e, H as be } from "./index-CSRC9-GH.js";
6
+ import { ProTable as ge } from "@pubinfo/pro-components";
7
+ import { message as q, Modal as ve } from "ant-design-vue";
8
+ import { G as D, u as xe, A as _ } from "./enum-DDKThkSw.js";
9
+ import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
+ const he = { class: "pt-10px" }, ke = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, we = {
11
+ key: 1,
12
+ class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
13
+ }, Ie = /* @__PURE__ */ A({
14
+ name: "DrawerGroup",
15
+ __name: "drawerGroup",
16
+ emits: ["submit"],
17
+ setup(B, { expose: b, emit: R }) {
18
+ const w = R, p = se({
19
+ title: "",
20
+ type: ""
21
+ }), S = {
22
+ name: [
23
+ { required: !0, message: "请输入群组名称", trigger: "blur" },
24
+ { max: 128, message: "长度不能超过128位", trigger: "change" }
25
+ ],
26
+ remark: [{ max: 250, message: "长度不能超过250位", trigger: ["blur", "change"] }],
27
+ viewScope: [{ required: !0, message: "请选择使用范围", trigger: ["blur", "change"] }],
28
+ pubGroupMemberList: [{ required: !0, message: "请选择群组成员", trigger: ["blur", "change"] }]
29
+ }, [I, G] = U(!1), T = k(), a = k({}), o = le(() => {
30
+ var s, e;
31
+ return (e = (s = a.value) == null ? void 0 : s.pubGroupMemberList) == null ? void 0 : e.map((u) => ({
32
+ ...u,
33
+ name: p.type === D.ORG ? u.orgName : u.userName
34
+ }));
35
+ });
36
+ async function m(s, e, u) {
37
+ if (G(!0), p.title = s, p.type = e, a.value = {}, s === _.EDIT) {
38
+ const l = await me({ id: u == null ? void 0 : u.id });
39
+ l.success && (a.value = (l == null ? void 0 : l.data) ?? {});
40
+ }
41
+ }
42
+ function c() {
43
+ p.type === D.ORG && ce({
44
+ modelValue: a.value.pubGroupMemberList ?? [],
45
+ multiple: !0,
46
+ onSubmit(s = []) {
47
+ a.value.pubGroupMemberList = s;
48
+ }
49
+ }), p.type === D.PER && de({
50
+ modelValue: a.value.pubGroupMemberList ?? [],
51
+ multiple: !0,
52
+ onSubmit(s = []) {
53
+ a.value.pubGroupMemberList = s;
54
+ }
55
+ });
56
+ }
57
+ const [g, d] = U(!1);
58
+ function v() {
59
+ var s;
60
+ (s = T.value) == null || s.validate().then(() => {
61
+ d(!0);
62
+ const { pubGroupMemberList: e = [], ...u } = a.value, l = {
63
+ ...u,
64
+ type: p.type,
65
+ pubGroupMemberList: e == null ? void 0 : e.map((f) => ({
66
+ orgId: f == null ? void 0 : f.orgId,
67
+ userId: f == null ? void 0 : f.userId
68
+ }))
69
+ };
70
+ delete l.createTime, delete l.updateTime, fe(l).then((f) => {
71
+ f.success && (q.success(`${p.title}成功!`), G(!1), w("submit"));
72
+ }).finally(() => d(!1));
73
+ });
74
+ }
75
+ function x() {
76
+ G(!1);
77
+ }
78
+ return b({
79
+ open: m
80
+ }), (s, e) => {
81
+ const u = X, l = Q, f = Z, W = ee, M = V, z = te, H = J, K = N, Y = j;
82
+ return h(), $(Y, {
83
+ open: t(I),
84
+ "onUpdate:open": e[4] || (e[4] = (i) => ie(I) ? I.value = i : null),
85
+ title: `${t(p).title}${t(p).type === t(D).ORG ? "组织" : "人员"}群组`,
86
+ placement: "right",
87
+ width: 600,
88
+ "destroy-on-close": "",
89
+ "footer-style": { textAlign: "right" },
90
+ onClose: x
91
+ }, {
92
+ footer: r(() => [
93
+ n(K, null, {
94
+ default: r(() => [
95
+ n(M, { onClick: x }, {
96
+ default: r(() => e[6] || (e[6] = [
97
+ E(" 取消 ")
98
+ ])),
99
+ _: 1
100
+ /* STABLE */
101
+ }),
102
+ n(M, {
103
+ type: "primary",
104
+ loading: t(g),
105
+ onClick: e[3] || (e[3] = (i) => v())
106
+ }, {
107
+ default: r(() => e[7] || (e[7] = [
108
+ E(" 提交 ")
109
+ ])),
110
+ _: 1
111
+ /* STABLE */
112
+ }, 8, ["loading"])
113
+ ]),
114
+ _: 1
115
+ /* STABLE */
116
+ })
117
+ ]),
118
+ default: r(() => [
119
+ n(H, {
120
+ ref_key: "formRef",
121
+ ref: T,
122
+ model: t(a),
123
+ rules: S,
124
+ "label-col": { span: 5 },
125
+ "label-wrap": !0
126
+ }, {
127
+ default: r(() => [
128
+ n(l, {
129
+ label: "群组名称",
130
+ name: "name"
131
+ }, {
132
+ default: r(() => [
133
+ n(u, {
134
+ value: t(a).name,
135
+ "onUpdate:value": e[0] || (e[0] = (i) => t(a).name = i),
136
+ maxlength: 128
137
+ }, null, 8, ["value"])
138
+ ]),
139
+ _: 1
140
+ /* STABLE */
141
+ }),
142
+ n(l, {
143
+ label: "群组描述",
144
+ name: "remark"
145
+ }, {
146
+ default: r(() => [
147
+ n(f, {
148
+ value: t(a).remark,
149
+ "onUpdate:value": e[1] || (e[1] = (i) => t(a).remark = i),
150
+ maxlength: 250,
151
+ "show-count": ""
152
+ }, null, 8, ["value"])
153
+ ]),
154
+ _: 1
155
+ /* STABLE */
156
+ }),
157
+ n(l, {
158
+ label: "群组使用范围",
159
+ name: "viewScope"
160
+ }, {
161
+ default: r(() => [
162
+ n(W, {
163
+ value: t(a).viewScope,
164
+ "onUpdate:value": e[2] || (e[2] = (i) => t(a).viewScope = i),
165
+ options: t(xe),
166
+ placeholder: "本部门/本部门及子部门/全部"
167
+ }, null, 8, ["value", "options"])
168
+ ]),
169
+ _: 1
170
+ /* STABLE */
171
+ }),
172
+ n(l, {
173
+ label: "群组成员",
174
+ name: "pubGroupMemberList"
175
+ }, {
176
+ default: r(() => [
177
+ n(M, {
178
+ type: "primary",
179
+ onClick: c
180
+ }, {
181
+ default: r(() => e[5] || (e[5] = [
182
+ E(" 编辑成员 ")
183
+ ])),
184
+ _: 1
185
+ /* STABLE */
186
+ }),
187
+ y("div", he, [
188
+ (h(!0), O(
189
+ L,
190
+ null,
191
+ ue(t(o), (i) => {
192
+ var P;
193
+ return h(), O(
194
+ L,
195
+ { key: i },
196
+ [
197
+ i.name && ((P = i.name) == null ? void 0 : P.length) > 20 ? (h(), $(z, {
198
+ key: 0,
199
+ title: i.name
200
+ }, {
201
+ default: r(() => {
202
+ var F;
203
+ return [
204
+ y(
205
+ "span",
206
+ ke,
207
+ C(`${(F = i.name) == null ? void 0 : F.slice(0, 20)}...`),
208
+ 1
209
+ /* TEXT */
210
+ )
211
+ ];
212
+ }),
213
+ _: 2
214
+ /* DYNAMIC */
215
+ }, 1032, ["title"])) : (h(), O(
216
+ "span",
217
+ we,
218
+ C(i.name),
219
+ 1
220
+ /* TEXT */
221
+ ))
222
+ ],
223
+ 64
224
+ /* STABLE_FRAGMENT */
225
+ );
226
+ }),
227
+ 128
228
+ /* KEYED_FRAGMENT */
229
+ ))
230
+ ])
231
+ ]),
232
+ _: 1
233
+ /* STABLE */
234
+ })
235
+ ]),
236
+ _: 1
237
+ /* STABLE */
238
+ }, 8, ["model"])
239
+ ]),
240
+ _: 1
241
+ /* STABLE */
242
+ }, 8, ["open", "title"]);
243
+ };
244
+ }
245
+ }), Ge = {
246
+ "py-10px": "",
247
+ "px-10px": "",
248
+ "w-full": "",
249
+ "h-full": ""
250
+ }, Ce = {
251
+ "h-full": "",
252
+ "w-full": "",
253
+ "bg-white": "",
254
+ "rounded-8px": "",
255
+ class: "dark:bg-[#141414]"
256
+ }, Se = {
257
+ style: {
258
+ height: "calc(100% - 48px)"
259
+ }
260
+ }, Te = ["onClick"], De = {
261
+ class: "ml-4px"
262
+ }, Ee = ["onClick"], Oe = {
263
+ class: "ml-4px"
264
+ }, Re = /* @__PURE__ */ A({
265
+ name: "GroupManage",
266
+ __name: "index",
267
+ setup(B) {
268
+ const b = k({
269
+ type: "1"
270
+ }), R = k([]), w = k(), p = k();
271
+ function S() {
272
+ var o;
273
+ (o = w.value) == null || o.reload();
274
+ }
275
+ async function I(o) {
276
+ var v, x;
277
+ const {
278
+ current: m,
279
+ pageSize: c,
280
+ ...g
281
+ } = o, d = await _e({
282
+ currentPage: m,
283
+ pageSize: c,
284
+ ...g,
285
+ type: b.value.type
286
+ });
287
+ return {
288
+ success: !0,
289
+ data: ((v = d.data) == null ? void 0 : v.records) ?? [],
290
+ total: (x = d.data) == null ? void 0 : x.total
291
+ };
292
+ }
293
+ const G = [{
294
+ valueType: "a-input",
295
+ bind: "value",
296
+ minWidth: 200,
297
+ title: "群组名称",
298
+ dataIndex: "name",
299
+ ellipsis: !0,
300
+ fieldProps: {
301
+ placeholder: "请输入群组名称",
302
+ allowClear: !0
303
+ }
304
+ }, {
305
+ hideInSearch: !0,
306
+ minWidth: 80,
307
+ title: "群组描述",
308
+ dataIndex: "remark",
309
+ ellipsis: !0
310
+ }, {
311
+ hideInSearch: !0,
312
+ minWidth: 100,
313
+ title: "群组使用范围",
314
+ dataIndex: "viewScope",
315
+ customRender: ({
316
+ text: o
317
+ }) => o === "1" ? "本部门" : o === "2" ? "本部门及子部门" : "全部"
318
+ }, {
319
+ hideInSearch: !0,
320
+ minWidth: 100,
321
+ title: "最后一次编辑时间",
322
+ dataIndex: "updateTime",
323
+ ellipsis: !0
324
+ }, {
325
+ hideInSearch: !0,
326
+ minWidth: 100,
327
+ title: "编辑人",
328
+ dataIndex: "updatedUserName"
329
+ }, {
330
+ hideInSearch: !0,
331
+ width: 160,
332
+ title: "操作",
333
+ dataIndex: "action",
334
+ fixed: "right"
335
+ }];
336
+ function T() {
337
+ var o;
338
+ (o = w.value) == null || o.reload();
339
+ }
340
+ function a(o, m, c) {
341
+ var g, d;
342
+ switch (o) {
343
+ case _.EDIT:
344
+ (g = p.value) == null || g.open(o, m, c);
345
+ break;
346
+ case _.ADD:
347
+ (d = p.value) == null || d.open(o, m);
348
+ break;
349
+ case _.REMOVE:
350
+ ve.confirm({
351
+ title: "删除",
352
+ content: "确定要删除该群组吗?",
353
+ onOk() {
354
+ be({
355
+ id: c == null ? void 0 : c.id
356
+ }).then(({
357
+ success: v
358
+ }) => {
359
+ v && (q.success("删除成功"), S());
360
+ });
361
+ }
362
+ });
363
+ break;
364
+ }
365
+ }
366
+ return (o, m) => {
367
+ const c = ae, g = ne, d = re, v = V, x = oe, s = N;
368
+ return h(), O("div", Ge, [y("div", Ce, [n(g, {
369
+ "active-key": t(b).type,
370
+ "onUpdate:activeKey": m[0] || (m[0] = (e) => t(b).type = e),
371
+ class: "tabs_custom",
372
+ onChange: T
373
+ }, {
374
+ default: r(() => [n(c, {
375
+ key: "1",
376
+ tab: "组织群组"
377
+ }), n(c, {
378
+ key: "2",
379
+ tab: "人员群组"
380
+ })]),
381
+ _: 1
382
+ /* STABLE */
383
+ }, 8, ["active-key"]), y("div", Se, [n(t(ge), {
384
+ ref_key: "tableRef",
385
+ ref: w,
386
+ "row-key": "id",
387
+ request: I,
388
+ columns: G,
389
+ "data-source": t(R),
390
+ "auto-height": "",
391
+ scroll: {
392
+ x: 1100
393
+ }
394
+ }, {
395
+ toolbar: r(() => [n(v, {
396
+ type: "primary",
397
+ onClick: m[1] || (m[1] = (e) => a(t(_).ADD, t(b).type))
398
+ }, {
399
+ default: r(() => [n(d), E(
400
+ " " + C(t(_).ADD),
401
+ 1
402
+ /* TEXT */
403
+ )]),
404
+ _: 1
405
+ /* STABLE */
406
+ })]),
407
+ bodyCell: r(({
408
+ column: e,
409
+ record: u
410
+ }) => [e.dataIndex === "action" ? (h(), $(
411
+ s,
412
+ {
413
+ key: 0
414
+ },
415
+ {
416
+ default: r(() => [y("a", {
417
+ class: "flex items-center",
418
+ onClick: (l) => a(t(_).EDIT, t(b).type, u)
419
+ }, [n(x, {
420
+ name: "edit",
421
+ class: "text-base"
422
+ }), y(
423
+ "span",
424
+ De,
425
+ C(t(_).EDIT),
426
+ 1
427
+ /* TEXT */
428
+ )], 8, Te), y("span", {
429
+ class: "flex items-center text-red-500 hover:cursor-pointer hover:opacity-80",
430
+ onClick: (l) => a(t(_).REMOVE, t(b).type, u)
431
+ }, [n(x, {
432
+ name: "remove",
433
+ class: "text-base"
434
+ }), y(
435
+ "span",
436
+ Oe,
437
+ C(t(_).REMOVE),
438
+ 1
439
+ /* TEXT */
440
+ )], 8, Ee)]),
441
+ _: 2
442
+ /* DYNAMIC */
443
+ },
444
+ 1024
445
+ /* DYNAMIC_SLOTS */
446
+ )) : pe("v-if", !0)]),
447
+ _: 1
448
+ /* STABLE */
449
+ }, 8, ["data-source"])])]), n(
450
+ Ie,
451
+ {
452
+ ref_key: "drawerGroupRef",
453
+ ref: p,
454
+ onSubmit: m[2] || (m[2] = (e) => S())
455
+ },
456
+ null,
457
+ 512
458
+ /* NEED_PATCH */
459
+ )]);
460
+ };
461
+ }
462
+ }), qe = /* @__PURE__ */ ye(Re, [["__scopeId", "data-v-80dc6226"]]);
463
+ export {
464
+ qe as default
465
+ };