@pubinfo/module-rbac 2.0.12 → 2.0.14

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 (97) hide show
  1. package/dist/{DynamicRoutesForm-DzOGoyf3.js → DynamicRoutesForm-BU4EAISs.js} +1 -1
  2. package/dist/{DynamicRoutesForm.vue_vue_type_script_setup_true_lang-lpCaLpPL.js → DynamicRoutesForm.vue_vue_type_script_setup_true_lang-bEqJ03T_.js} +6 -6
  3. package/dist/{IconSelect-CkqLR5Dg.js → IconSelect-DtNpk3Rj.js} +1 -1
  4. package/dist/IconSelect.css +1 -1
  5. package/dist/IconSelect.vue_vue_type_script_setup_true_lang-D450SiKg.js +757 -0
  6. package/dist/{ImportExport-BD8o7IvB.js → ImportExport-DAe_Sl13.js} +1 -1
  7. package/dist/{ImportExport.vue_vue_type_script_setup_true_lang-BzdP0ADd.js → ImportExport.vue_vue_type_script_setup_true_lang-CV0DrMvw.js} +1 -1
  8. package/dist/LayoutForm-C-vNwp3q.js +173 -0
  9. package/dist/LayoutForm.css +1 -0
  10. package/dist/{MetaForm-DtlyvzoM.js → MetaForm-13JASu7v.js} +142 -105
  11. package/dist/MetaForm.css +1 -1
  12. package/dist/{ResourceEdit-WpEdbzaw.js → ResourceEdit-D2YFu-Gk.js} +1 -1
  13. package/dist/ResourceEdit.vue_vue_type_script_setup_true_lang-Cb0mKIlJ.js +429 -0
  14. package/dist/{ResourceRelation-DGiGYy6V.js → ResourceRelation-CeM9Eq39.js} +10 -11
  15. package/dist/{ResourceRelation-26FnHEfU.js → ResourceRelation-qhIdXLAy.js} +12 -13
  16. package/dist/{TenantEdit-B24X5nND.js → TenantEdit-C61O1pSu.js} +1 -1
  17. package/dist/{TenantEdit.vue_vue_type_script_setup_true_lang-Bu5HcJJv.js → TenantEdit.vue_vue_type_script_setup_true_lang-BwsA9hth.js} +39 -40
  18. package/dist/{UserAuthorization-Co6JV0py.js → UserAuthorization-rqttVub5.js} +9 -10
  19. package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +1 -1
  20. package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +1 -1
  21. package/dist/components/ResourceIcones/BoxColorPicker.vue.d.ts +3 -0
  22. package/dist/components/ResourceIcones/Select.vue.d.ts +3 -0
  23. package/dist/{createAndEditDataPermission-BhOLGGna.js → createAndEditDataPermission-DPeFulie.js} +1 -1
  24. package/dist/{createAndEditDataPermission.vue_vue_type_script_setup_true_lang-D5wInKwO.js → createAndEditDataPermission.vue_vue_type_script_setup_true_lang-DlUIYtif.js} +98 -101
  25. package/dist/{drawerRole-DHLv47_z.js → drawerRole-CXGVqxPX.js} +1 -1
  26. package/dist/{drawerRole-DUWRM43j.js → drawerRole-CfJjf3v_.js} +1 -1
  27. package/dist/{drawerRole.vue_vue_type_script_setup_true_lang-BET5ukoo.js → drawerRole.vue_vue_type_script_setup_true_lang-B-VZS3gq.js} +42 -43
  28. package/dist/{drawerRole.vue_vue_type_script_setup_true_lang-BK3zjhop.js → drawerRole.vue_vue_type_script_setup_true_lang-B1eT0e_Q.js} +1 -1
  29. package/dist/{enum-CjyX3J0o.js → enum-D5iPiZiT.js} +0 -1
  30. package/dist/{index-Csfu3kAr.js → index-B5aP0re3.js} +6 -7
  31. package/dist/{index-DwpOyfRe.js → index-BEB4liGe.js} +8 -9
  32. package/dist/{index-DfuGXjYh.js → index-BNwGLzXe.js} +21 -22
  33. package/dist/{index-DdoOaWs-.js → index-BPkJOFXE.js} +3 -3
  34. package/dist/{index-ioZh8Qom.js → index-BXvJhqJD.js} +6 -7
  35. package/dist/{index-BFx8F5lO.js → index-C2G4xRrJ.js} +8 -9
  36. package/dist/{index-x9Iim2eD.js → index-C5WD-YUu.js} +7 -8
  37. package/dist/{index-rNYtJ7Om.js → index-CbVJdR5M.js} +6 -7
  38. package/dist/{index-DECno0gv.js → index-ChWnVs6j.js} +2 -2
  39. package/dist/{index-C9hHp4Iw.js → index-CoZM8pyH.js} +1 -1
  40. package/dist/{index-B2tTTlBE.js → index-Copy5kiW.js} +276 -273
  41. package/dist/index-D3Xw_aOi.js +144 -0
  42. package/dist/{index-CCw3ZJgQ.js → index-DHVEXch0.js} +8 -9
  43. package/dist/{index-COWUocfL.js → index-Dl0hWfIE.js} +7 -8
  44. package/dist/{index-BIpmC999.js → index-En8oOf9e.js} +8 -9
  45. package/dist/{index-ZQuRR9fG.js → index-VZuizuKs.js} +1 -1
  46. package/dist/{index-BwWrE3dY.js → index-XhYtVVT9.js} +6 -7
  47. package/dist/{index-BUmMaC21.js → index-nAPHtTM7.js} +5 -6
  48. package/dist/{index-y9CQTo95.js → index-qn7U9T51.js} +9 -10
  49. package/dist/index.d.ts +1 -0
  50. package/dist/index.js +2578 -2303
  51. package/dist/index10.css +1 -1
  52. package/dist/index11.css +1 -1
  53. package/dist/index12.css +1 -1
  54. package/dist/index13.css +1 -1
  55. package/dist/index14.css +1 -1
  56. package/dist/index15.css +1 -1
  57. package/dist/index16.css +1 -1
  58. package/dist/index17.css +1 -1
  59. package/dist/index4.css +1 -1
  60. package/dist/index5.css +1 -1
  61. package/dist/index6.css +1 -1
  62. package/dist/index7.css +1 -1
  63. package/dist/index8.css +1 -1
  64. package/dist/index9.css +1 -1
  65. package/dist/{loginHistoryDetail-B6eI-TmJ.js → loginHistoryDetail-BZVwG8m2.js} +1 -1
  66. package/dist/{login_history-B4Q1NCJn.js → login_history-CMZGS2PN.js} +5 -6
  67. package/dist/{operateHistoryDetail-CLZ9lyua.js → operateHistoryDetail-Badx3zl-.js} +1 -1
  68. package/dist/{operate_history-KASZ7_JO.js → operate_history-B42WNY1u.js} +5 -6
  69. package/dist/{setItem-BwMHXOUm.js → setItem-Blb3dox4.js} +1 -1
  70. package/dist/{useAppAndResource-38HCqYKa.js → useAppAndResource-DDywX2iz.js} +11 -12
  71. package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +3 -3
  72. package/dist/views/data-permission/index.vue.d.ts +3 -3
  73. package/dist/views/resource/components/LayoutForm.vue.d.ts +10 -0
  74. package/dist/views/resource/hooks/useLayoutForm.d.ts +12 -0
  75. package/dist/views/resource/model.d.ts +13 -0
  76. package/package.json +7 -7
  77. package/src/components/ResourceIcones/BoxColorPicker.vue +64 -8
  78. package/src/components/ResourceIcones/Select.vue +13 -5
  79. package/src/index.ts +1 -0
  80. package/src/views/organization/index.vue +17 -10
  81. package/src/views/resource/components/DynamicRoutesForm.vue +1 -1
  82. package/src/views/resource/components/IconSelect.vue +7 -3
  83. package/src/views/resource/components/LayoutForm.vue +92 -0
  84. package/src/views/resource/components/MetaForm.vue +11 -0
  85. package/src/views/resource/components/ResourceEdit.vue +26 -8
  86. package/src/views/resource/enum.ts +0 -1
  87. package/src/views/resource/hooks/useLayoutForm.ts +57 -0
  88. package/src/views/resource/hooks/useMetaForm.ts +4 -0
  89. package/src/views/resource/index.vue +0 -3
  90. package/src/views/resource/model.ts +23 -1
  91. package/dist/IconSelect.vue_vue_type_script_setup_true_lang-BoGxAoNd.js +0 -703
  92. package/dist/ResourceEdit.vue_vue_type_script_setup_true_lang-id6jZAko.js +0 -392
  93. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  94. package/dist/enum-CTUzwCYG.js +0 -4
  95. package/dist/index-53oBz1jp.js +0 -299
  96. package/dist/index-DVt5k9xh.js +0 -145
  97. package/dist/index18.css +0 -1
@@ -1,299 +0,0 @@
1
- import { Modal as te, Tree as ne, Dropdown as oe, Menu as le, MenuItem as se, Tooltip as de, Tag as ce, Button as ie } from "ant-design-vue/es";
2
- import { DownOutlined as ae } from "@ant-design/icons-vue";
3
- import { PubinfoIcon as re } from "pubinfo";
4
- import { defineComponent as ue, mergeModels as R, computed as fe, ref as h, useModel as pe, watch as he, createBlock as k, openBlock as r, withCtx as i, createElementVNode as c, toDisplayString as _, unref as u, createVNode as a, isRef as T, createCommentVNode as ke, withModifiers as me, createElementBlock as B, Fragment as _e, renderList as xe, createTextVNode as g } from "vue";
5
- import { Form as ve } from "ant-design-vue";
6
- import { R as K } from "./enum-CTUzwCYG.js";
7
- import { u as ye } from "./index.js";
8
- import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- import './index4.css';const Ce = { class: "h-340px border-1px border-solid flex flex-row border_color" }, be = { class: "w-360px flex flex-col" }, Ie = { class: "w-full h-34px bg-[#F2F3F5] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#1D2129] dark:text-[#F2F3F5]" }, we = { class: "flex-1 overflow-auto py-10px pr-10px" }, Fe = { class: "flex items-center" }, De = { class: "mx-4px" }, Ee = ["onClick"], Ne = ["onClick"], Me = ["onClick"], Oe = ["onClick"], Ae = { class: "flex-1 flex flex-col border-solid border-0px border-l-1px border_color" }, Se = { class: "flex-1 p-10px overflow-auto" }, $e = /* @__PURE__ */ ue({
10
- name: "ResourceSelector",
11
- __name: "index",
12
- props: /* @__PURE__ */ R({
13
- title: { default: "资源选择" },
14
- mode: { default: K.ROLE }
15
- }, {
16
- open: { type: Boolean },
17
- openModifiers: {}
18
- }),
19
- emits: /* @__PURE__ */ R(["select"], ["update:open"]),
20
- setup(E, { expose: z, emit: P }) {
21
- const U = E, V = P, x = fe(() => U.mode === K.DATA_PERMISSION), l = h({ checked: [], halfChecked: [] }), v = h([]), C = h([]), b = h({}), N = h(0), p = h([]), I = pe(E, "open"), w = ye(I);
22
- he(() => l.value.checked, (o) => {
23
- C.value = o.reduce((e, t) => {
24
- const n = {
25
- id: t,
26
- name: b.value[t]
27
- };
28
- return e.push(n), e;
29
- }, []);
30
- }, { deep: !0 });
31
- function L(o, e, t) {
32
- l.value.checked = [...o], p.value = e, b.value = t, N.value = Object.keys(b.value).length, e[0]?.id && (v.value = [e[0]?.id]), w(!0);
33
- }
34
- function j(o, e) {
35
- if (!x.value) {
36
- if (e.checked) {
37
- let t = function(n) {
38
- n.parent ? (l.value.checked.push(n.key), t(n.parent)) : l.value.checked.push(n.key);
39
- };
40
- t(e.node);
41
- } else
42
- F([e.node], e.node.id).forEach((n) => {
43
- const d = l.value.checked.findIndex((f) => f === n);
44
- d >= 0 && l.value.checked.splice(d, 1);
45
- });
46
- l.value.checked = Array.from(new Set(l.value.checked));
47
- }
48
- }
49
- function q() {
50
- l.value.checked = [];
51
- }
52
- function M(o) {
53
- F(p.value, o).forEach((t) => {
54
- const n = l.value.checked.findIndex((d) => d === t);
55
- n >= 0 && l.value.checked.splice(n, 1);
56
- });
57
- }
58
- function y(o, e) {
59
- for (const t of o) {
60
- if (t.id === e)
61
- return t;
62
- if (t.children) {
63
- const n = y(t.children, e);
64
- if (n)
65
- return n;
66
- }
67
- }
68
- }
69
- function F(o, e) {
70
- const t = [], n = y(o, e);
71
- if (n) {
72
- let d = function(f) {
73
- if (t.push(f.id), f.children)
74
- for (const D of f.children)
75
- d(D);
76
- };
77
- d(n);
78
- }
79
- return t;
80
- }
81
- function G(o) {
82
- const e = A(o.id);
83
- e.length > 0 && (e.push(o.id), e.forEach((t) => {
84
- l.value.checked.findIndex((d) => d === t) < 0 && l.value.checked.push(t);
85
- }));
86
- }
87
- function H(o) {
88
- A(o.id).forEach((t) => {
89
- const n = l.value.checked.findIndex((d) => d === t);
90
- n >= 0 && l.value.checked.splice(n, 1);
91
- });
92
- }
93
- function J(o) {
94
- const e = O(o.id);
95
- e.length > 0 && (e.push(o.id), e.forEach((t) => {
96
- l.value.checked.findIndex((d) => d === t) < 0 && l.value.checked.push(t);
97
- }));
98
- }
99
- function Q(o) {
100
- O(o.id).forEach((t) => {
101
- const n = l.value.checked.findIndex((d) => d === t);
102
- n >= 0 && l.value.checked.splice(n, 1);
103
- });
104
- }
105
- function O(o) {
106
- const e = y(p.value, o);
107
- return e && e.children && e.children.length > 0 ? e.children.reduce((t, n) => (x.value && n?.disabled || t.push(n.id), t), []) : [];
108
- }
109
- function A(o) {
110
- const e = F(p.value, o), t = e.indexOf(o);
111
- return e.splice(t, 1), e?.map((n) => y(p.value, n))?.filter((n) => x.value ? !n.disabled : !0)?.map((n) => n.id);
112
- }
113
- const { onFieldChange: W } = ve.useInjectFormItemContext();
114
- function X() {
115
- V("select", C.value), W(), w(!1);
116
- }
117
- return z({
118
- open: L
119
- }), (o, e) => {
120
- const t = re, n = ae, d = se, f = le, D = oe, Y = ne, S = ce, Z = de, $ = ie, ee = te;
121
- return r(), k(ee, {
122
- open: I.value,
123
- "onUpdate:open": e[4] || (e[4] = (s) => I.value = s),
124
- class: "custom_modal",
125
- title: o.title,
126
- "mask-closable": !1,
127
- width: 750
128
- }, {
129
- footer: i(() => [
130
- a($, {
131
- onClick: e[3] || (e[3] = (s) => u(w)(!1))
132
- }, {
133
- default: i(() => e[8] || (e[8] = [
134
- g(" 取消 ")
135
- ])),
136
- _: 1,
137
- __: [8]
138
- }),
139
- a($, {
140
- type: "primary",
141
- onClick: X
142
- }, {
143
- default: i(() => e[9] || (e[9] = [
144
- g(" 确定 ")
145
- ])),
146
- _: 1,
147
- __: [9]
148
- })
149
- ]),
150
- default: i(() => [
151
- c("div", Ce, [
152
- c("div", be, [
153
- c("div", Ie, [
154
- e[5] || (e[5] = c("div", { class: "" }, " 全部资源 ", -1)),
155
- c("div", null, _(u(l).checked.length) + "/" + _(u(N)), 1)
156
- ]),
157
- c("div", we, [
158
- a(Y, {
159
- "checked-keys": u(l),
160
- "onUpdate:checkedKeys": e[1] || (e[1] = (s) => T(l) ? l.value = s : null),
161
- "expanded-keys": u(v),
162
- "onUpdate:expandedKeys": e[2] || (e[2] = (s) => T(v) ? v.value = s : null),
163
- class: "h-full custom_tree",
164
- "block-node": "",
165
- checkable: "",
166
- "check-strictly": "",
167
- "field-names": { children: "children", title: "name", key: "id" },
168
- "tree-data": u(p),
169
- onCheck: j
170
- }, {
171
- title: i((s) => [
172
- c("div", Fe, [
173
- s.checked ? (r(), k(t, {
174
- key: 0,
175
- name: "zy_checked",
176
- size: "24px"
177
- })) : (r(), k(t, {
178
- key: 1,
179
- name: "zy_default",
180
- size: "24px"
181
- })),
182
- c("span", De, _(s.name), 1),
183
- !s.leaf && (!u(x) || !s.disabled) ? (r(), k(D, {
184
- key: 2,
185
- class: "bg-[#e8f3ff] dark:bg-[#141414]",
186
- trigger: ["click"]
187
- }, {
188
- overlay: i(() => [
189
- a(f, null, {
190
- default: i(() => [
191
- a(d, { key: "0" }, {
192
- default: i(() => [
193
- c("a", {
194
- onClick: (m) => G(s)
195
- }, "选中所有下级", 8, Ee)
196
- ]),
197
- _: 2
198
- }, 1024),
199
- a(d, { key: "1" }, {
200
- default: i(() => [
201
- c("a", {
202
- onClick: (m) => H(s)
203
- }, "取消所有下级", 8, Ne)
204
- ]),
205
- _: 2
206
- }, 1024),
207
- a(d, { key: "3" }, {
208
- default: i(() => [
209
- c("a", {
210
- onClick: (m) => J(s)
211
- }, "选中下一级", 8, Me)
212
- ]),
213
- _: 2
214
- }, 1024),
215
- a(d, { key: "4" }, {
216
- default: i(() => [
217
- c("a", {
218
- onClick: (m) => Q(s)
219
- }, "取消下一级", 8, Oe)
220
- ]),
221
- _: 2
222
- }, 1024)
223
- ]),
224
- _: 2
225
- }, 1024)
226
- ]),
227
- default: i(() => [
228
- c("a", {
229
- class: "ant-dropdown-link whitespace-nowrap",
230
- style: { padding: "2px 4px" },
231
- onClick: e[0] || (e[0] = me(() => {
232
- }, ["prevent"]))
233
- }, [
234
- e[6] || (e[6] = c("span", { class: "text-base" }, "操作", -1)),
235
- a(n, { style: { fontSize: "10px" } })
236
- ])
237
- ]),
238
- _: 2
239
- }, 1024)) : ke("", !0)
240
- ])
241
- ]),
242
- _: 1
243
- }, 8, ["checked-keys", "expanded-keys", "tree-data"])
244
- ])
245
- ]),
246
- c("div", Ae, [
247
- c("div", { class: "w-full h-34px bg-[#F2F3F5] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#1D2129] dark:text-[#F2F3F5]" }, [
248
- e[7] || (e[7] = c("div", { class: "" }, " 已选资源 ", -1)),
249
- c("div", {
250
- class: "cursor-pointer text-[#165DFF]",
251
- onClick: q
252
- }, " 清空 ")
253
- ]),
254
- c("div", Se, [
255
- (r(!0), B(_e, null, xe(u(C), (s) => (r(), B("div", {
256
- key: s.id,
257
- class: "inline-block mb-6px max-w-300px"
258
- }, [
259
- s.name?.length > 20 ? (r(), k(Z, {
260
- key: 0,
261
- title: s.name
262
- }, {
263
- default: i(() => [
264
- a(S, {
265
- class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
266
- closable: "",
267
- onClose: (m) => M(s.id)
268
- }, {
269
- default: i(() => [
270
- g(_(`${s.name?.slice(0, 20)}...`), 1)
271
- ]),
272
- _: 2
273
- }, 1032, ["onClose"])
274
- ]),
275
- _: 2
276
- }, 1032, ["title"])) : (r(), k(S, {
277
- key: 1,
278
- class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
279
- closable: "",
280
- onClose: (m) => M(s.id)
281
- }, {
282
- default: i(() => [
283
- g(_(s.name), 1)
284
- ]),
285
- _: 2
286
- }, 1032, ["onClose"]))
287
- ]))), 128))
288
- ])
289
- ])
290
- ])
291
- ]),
292
- _: 1
293
- }, 8, ["open", "title"]);
294
- };
295
- }
296
- }), Le = /* @__PURE__ */ ge($e, [["__scopeId", "data-v-70b6311e"]]);
297
- export {
298
- Le as _
299
- };