@pubinfo/module-rbac 2.0.15 → 2.1.1

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 (49) hide show
  1. package/dist/{HoverCard-DASfDgI1.js → HoverCard-7agF2aDO.js} +1 -1
  2. package/dist/{HoverCard.vue_vue_type_script_setup_true_lang-BqEarhzP.js → HoverCard.vue_vue_type_script_setup_true_lang-DEScDCo1.js} +1 -1
  3. package/dist/{LayoutForm-C-vNwp3q.js → LayoutForm-Pv6UyKl3.js} +1 -1
  4. package/dist/MetaForm-BMPtZc0g.js +42413 -0
  5. package/dist/MetaForm.css +1 -1
  6. package/dist/{OrgAndPosition-DjF_gcp6.js → OrgAndPosition-R-YixdXG.js} +1 -1
  7. package/dist/{OrgAndPosition.vue_vue_type_script_setup_true_lang-CFSDHn40.js → OrgAndPosition.vue_vue_type_script_setup_true_lang-jEjTok4n.js} +1 -1
  8. package/dist/{ResourceEdit-D2YFu-Gk.js → ResourceEdit-D59JUDvG.js} +1 -1
  9. package/dist/{ResourceEdit.vue_vue_type_script_setup_true_lang-Cb0mKIlJ.js → ResourceEdit.vue_vue_type_script_setup_true_lang-IWn27Vz1.js} +2 -2
  10. package/dist/{UserAuthorization-rqttVub5.js → UserAuthorization-Ch_iKzms.js} +1 -1
  11. package/dist/{UserEdit-DkNVPVA4.js → UserEdit-B1fnFcSC.js} +1 -1
  12. package/dist/UserEdit.vue_vue_type_script_setup_true_lang-SIR1ZO_N.js +315 -0
  13. package/dist/{drawerBlackWhiteList-Cr16yNs8.js → drawerBlackWhiteList-eWyKScZN.js} +1 -1
  14. package/dist/{drawerBlackWhiteList.vue_vue_type_script_setup_true_lang-BR6Yeiie.js → drawerBlackWhiteList.vue_vue_type_script_setup_true_lang-CNBKo3Jg.js} +17 -16
  15. package/dist/{drawerPosition-BYypSGoF.js → drawerPosition-BA_gLotd.js} +1 -1
  16. package/dist/{drawerPosition.vue_vue_type_script_setup_true_lang-DcZ48XJV.js → drawerPosition.vue_vue_type_script_setup_true_lang-ZqfbI05C.js} +1 -1
  17. package/dist/{drawerRegion-BiIlYQ0Z.js → drawerRegion-CauOP4lh.js} +1 -1
  18. package/dist/{drawerRegion.vue_vue_type_script_setup_true_lang-BwAj_RKw.js → drawerRegion.vue_vue_type_script_setup_true_lang-DeL9jV-P.js} +50 -48
  19. package/dist/gangweijiekou-CUGlx4Ni.js +48 -0
  20. package/dist/{index-C2G4xRrJ.js → index-BH3LYln0.js} +1 -1
  21. package/dist/{index-Cqkr8Rvk.js → index-BhZNbJp6.js} +1 -1
  22. package/dist/{index-nAPHtTM7.js → index-Bm3WQuJD.js} +1 -1
  23. package/dist/{index-qn7U9T51.js → index-CGLg7J6G.js} +25 -25
  24. package/dist/{index-BPkJOFXE.js → index-DQhQqT_Z.js} +1 -1
  25. package/dist/{index-DoFuRlsc.js → index-iBmBJd50.js} +2 -2
  26. package/dist/index.js +67 -42
  27. package/dist/index14.css +1 -1
  28. package/dist/index15.css +1 -1
  29. package/dist/index17.css +1 -1
  30. package/dist/isEmpty-BgDIb4aS.js +20 -0
  31. package/dist/utils/validateObjectStructure.d.ts +11 -0
  32. package/dist/vanilla-picker-BAEwS4Fy.js +536 -0
  33. package/dist/views/resource/model.d.ts +1 -0
  34. package/package.json +4 -3
  35. package/src/api/modules/assist/qunzujiekou.ts +3 -0
  36. package/src/api/modules/assist/quyujiekou.ts +2 -0
  37. package/src/api/modules/configData/heibaimingdanfuwu.ts +2 -0
  38. package/src/api/modules/configData/zidifuwu.ts +4 -0
  39. package/src/api/modules/rbac/gangweijiekou.ts +3 -0
  40. package/src/api/modules/rbac/yonghushoucangbiaojiekou.ts +2 -0
  41. package/src/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +1 -0
  42. package/src/components/JsonEditorModal/index.vue +59 -0
  43. package/src/utils/validateObjectStructure.ts +47 -0
  44. package/src/views/resource/components/HoverCard.vue +1 -1
  45. package/src/views/resource/components/MetaForm.vue +24 -0
  46. package/src/views/resource/model.ts +2 -0
  47. package/dist/MetaForm-13JASu7v.js +0 -401
  48. package/dist/UserEdit.vue_vue_type_script_setup_true_lang-CFs0SxVJ.js +0 -330
  49. package/dist/gangweijiekou-Cs016LjQ.js +0 -46
@@ -1,330 +0,0 @@
1
- import { Drawer as q, Form as F, FormItem as G, Input as H, RadioGroup as K, Switch as M, Textarea as Z, Space as J, Button as W } from "ant-design-vue/es";
2
- import { defineComponent as X, ref as D, reactive as Q, createBlock as P, openBlock as x, unref as t, isRef as Y, withCtx as n, createVNode as l, createElementBlock as ee, toDisplayString as te, createTextVNode as R } from "vue";
3
- import { message as re } from "ant-design-vue";
4
- import { B as ae, C as oe, D as le, E as ne, F as se, G as ie, H as ue, I as me, u as h, J as de, K as pe, L as ge } from "./index.js";
5
- import { _ as fe } from "./OrgAndPosition.vue_vue_type_script_setup_true_lang-CFSDHn40.js";
6
- import { c as ce } from "./cloneDeep-BOLZdR62.js";
7
- var be = "[object Map]", ve = "[object Set]", _e = Object.prototype, we = _e.hasOwnProperty;
8
- function y(a) {
9
- if (a == null)
10
- return !0;
11
- if (ae(a) && (oe(a) || typeof a == "string" || typeof a.splice == "function" || le(a) || ne(a) || se(a)))
12
- return !a.length;
13
- var f = ie(a);
14
- if (f == be || f == ve)
15
- return !a.size;
16
- if (ue(a))
17
- return !me(a).length;
18
- for (var b in a)
19
- if (we.call(a, b))
20
- return !1;
21
- return !0;
22
- }
23
- var c = /* @__PURE__ */ ((a) => (a.ADD = "新建", a.AUTHORIZE = "授权", a.RESET_PASSWORD = "重置密码", a.EDIT = "修改", a.REMOVE = "删除", a))(c || {});
24
- const xe = { key: 0 }, Pe = /* @__PURE__ */ X({
25
- name: "UserEdit",
26
- __name: "UserEdit",
27
- props: {
28
- currentOrg: {}
29
- },
30
- emits: ["submit"],
31
- setup(a, { expose: f, emit: b }) {
32
- const U = a, N = b, [v, _] = h(!1), O = D(), r = D({}), g = Q({
33
- title: "",
34
- record: {},
35
- initData: {
36
- sex: "0",
37
- enable: !0,
38
- userOrgList: [{ main: !0, positionList: [] }]
39
- }
40
- });
41
- function $(m, e) {
42
- return !e || /^[A-Z!@#$%^&*0-9]+$/i.test(e) ? Promise.resolve() : Promise.reject(new Error("只能包含字母、数字和特殊字符!@#$%^&*"));
43
- }
44
- function k(m, e) {
45
- return /^1(3\d|4[014-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(e) || y(e) ? Promise.resolve() : Promise.reject(new Error("请输入正确的手机号"));
46
- }
47
- function I(m, e) {
48
- return /^([a-z0-9])(\w|-)+@[a-z0-9]+\.([a-z]{2,4})$/i.test(e) || y(e) ? Promise.resolve() : Promise.reject(new Error("请输入正确的邮箱地址"));
49
- }
50
- function V(m, e) {
51
- return /(^\d{15}$)|(^\d{18}$)|(^\d{17}([\dX])$)/i.test(e) || y(e) ? Promise.resolve() : Promise.reject(new Error("请输入正确的身份证号码"));
52
- }
53
- const j = {
54
- loginName: [
55
- { required: !0, message: "请输入登录账号", trigger: ["blur", "change"] },
56
- { min: 4, max: 64, message: "登录账号需要在4位到64位之间", trigger: "change" },
57
- { validator: $, trigger: "change" }
58
- ],
59
- realName: [
60
- { required: !0, message: "请输入真实姓名", trigger: "blur" },
61
- { min: 2, max: 128, message: "真实姓名需要在2位到128位之间", trigger: "change" }
62
- ],
63
- userOrgList: [
64
- { type: "array", required: !0, message: "请选择所属组织" }
65
- ],
66
- mobile: [
67
- { validator: k, trigger: "change" }
68
- ],
69
- email: [
70
- { validator: I, trigger: "change" },
71
- { max: 32, message: "邮箱不能超过32位", trigger: "change" }
72
- ],
73
- idCard: [
74
- { validator: V, trigger: "change" }
75
- ]
76
- };
77
- async function A(m, e) {
78
- if (g.title = m, r.value = ce(g.initData), r.value.userOrgList[0].orgId = U.currentOrg?.orgId, r.value.userOrgList[0].orgName = U.currentOrg?.orgName, _(!0), m === c.EDIT) {
79
- const s = await de({ id: e?.id });
80
- if (s.success) {
81
- const { userOrgList: i = [], ...d } = s?.data ?? {};
82
- r.value = {
83
- ...d,
84
- userOrgList: i?.map((p) => ({
85
- ...p,
86
- roleList: p.roles?.map((u) => ({ value: u.roleId, label: u.roleName })) ?? [],
87
- positionList: p.posts?.map((u) => ({ value: u.postId, label: u.postName })) ?? []
88
- }))
89
- };
90
- }
91
- }
92
- }
93
- const S = [
94
- { label: "未知", value: "0" },
95
- { label: "男", value: "1" },
96
- { label: "女", value: "2" }
97
- ], [T, E] = h(!1);
98
- function z() {
99
- O.value?.validate().then(() => {
100
- const { userOrgList: m = [], ...e } = r.value, s = {
101
- ...e,
102
- orgRoles: m.map((d) => {
103
- const { orgId: p, main: u } = d;
104
- return {
105
- orgId: p,
106
- main: u
107
- };
108
- }),
109
- posts: m.map((d) => {
110
- const { orgId: p, positionList: u = [] } = d;
111
- return {
112
- orgId: p,
113
- postIds: u.map((w) => w.value)
114
- };
115
- })
116
- }, i = g.title === c.ADD ? pe(s) : ge(s);
117
- E(!0), i.then((d) => {
118
- d?.success && (re.success(`${g.title}成功!`), _(!1), N("submit"));
119
- }).finally(() => E(!1));
120
- });
121
- }
122
- return f({
123
- open: A
124
- }), (m, e) => {
125
- const s = H, i = G, d = K, p = M, u = Z, w = F, L = W, B = J, C = q;
126
- return x(), P(C, {
127
- open: t(v),
128
- "onUpdate:open": e[12] || (e[12] = (o) => Y(v) ? v.value = o : null),
129
- title: t(g).title,
130
- placement: "right",
131
- width: 520,
132
- "destroy-on-close": "",
133
- "footer-style": { textAlign: "right" }
134
- }, {
135
- footer: n(() => [
136
- l(B, null, {
137
- default: n(() => [
138
- l(L, {
139
- onClick: e[10] || (e[10] = (o) => t(_)(!1))
140
- }, {
141
- default: n(() => e[13] || (e[13] = [
142
- R(" 取消 ")
143
- ])),
144
- _: 1,
145
- __: [13]
146
- }),
147
- l(L, {
148
- type: "primary",
149
- loading: t(T),
150
- onClick: e[11] || (e[11] = (o) => z())
151
- }, {
152
- default: n(() => e[14] || (e[14] = [
153
- R(" 提交 ")
154
- ])),
155
- _: 1,
156
- __: [14]
157
- }, 8, ["loading"])
158
- ]),
159
- _: 1
160
- })
161
- ]),
162
- default: n(() => [
163
- l(w, {
164
- ref_key: "formRef",
165
- ref: O,
166
- model: t(r),
167
- rules: j,
168
- "label-col": { span: 4 }
169
- }, {
170
- default: n(() => [
171
- l(i, {
172
- label: "登录账号",
173
- name: "loginName"
174
- }, {
175
- default: n(() => [
176
- t(g).title === t(c).EDIT ? (x(), ee("div", xe, te(t(r).loginName), 1)) : (x(), P(s, {
177
- key: 1,
178
- value: t(r).loginName,
179
- "onUpdate:value": e[0] || (e[0] = (o) => t(r).loginName = o),
180
- maxlength: 64,
181
- placeholder: "请输入登录账号",
182
- "allow-clear": ""
183
- }, null, 8, ["value"]))
184
- ]),
185
- _: 1
186
- }),
187
- l(i, {
188
- label: "真实姓名",
189
- name: "realName"
190
- }, {
191
- default: n(() => [
192
- l(s, {
193
- value: t(r).realName,
194
- "onUpdate:value": e[1] || (e[1] = (o) => t(r).realName = o),
195
- maxlength: 128,
196
- placeholder: "请输入真实姓名",
197
- "allow-clear": ""
198
- }, null, 8, ["value"])
199
- ]),
200
- _: 1
201
- }),
202
- l(i, {
203
- label: "手机号",
204
- name: "mobile"
205
- }, {
206
- default: n(() => [
207
- l(s, {
208
- value: t(r).mobile,
209
- "onUpdate:value": e[2] || (e[2] = (o) => t(r).mobile = o),
210
- maxlength: 14,
211
- placeholder: "请输入手机号",
212
- "allow-clear": ""
213
- }, null, 8, ["value"])
214
- ]),
215
- _: 1
216
- }),
217
- l(i, {
218
- label: "性别",
219
- name: "sex"
220
- }, {
221
- default: n(() => [
222
- l(d, {
223
- value: t(r).sex,
224
- "onUpdate:value": e[3] || (e[3] = (o) => t(r).sex = o),
225
- options: S
226
- }, null, 8, ["value"])
227
- ]),
228
- _: 1
229
- }),
230
- l(i, {
231
- label: "邮箱",
232
- name: "email"
233
- }, {
234
- default: n(() => [
235
- l(s, {
236
- value: t(r).email,
237
- "onUpdate:value": e[4] || (e[4] = (o) => t(r).email = o),
238
- maxlength: 32,
239
- placeholder: "请输入邮箱",
240
- "allow-clear": ""
241
- }, null, 8, ["value"])
242
- ]),
243
- _: 1
244
- }),
245
- l(i, {
246
- label: "身份证",
247
- name: "idCard"
248
- }, {
249
- default: n(() => [
250
- l(s, {
251
- value: t(r).idCard,
252
- "onUpdate:value": e[5] || (e[5] = (o) => t(r).idCard = o),
253
- maxlength: 18,
254
- placeholder: "请输入身份证",
255
- "allow-clear": ""
256
- }, null, 8, ["value"])
257
- ]),
258
- _: 1
259
- }),
260
- l(i, {
261
- label: "是否启用",
262
- name: "enable"
263
- }, {
264
- default: n(() => [
265
- l(p, {
266
- checked: t(r).enable,
267
- "onUpdate:checked": e[6] || (e[6] = (o) => t(r).enable = o)
268
- }, null, 8, ["checked"])
269
- ]),
270
- _: 1
271
- }),
272
- l(i, {
273
- label: "地址",
274
- name: "address"
275
- }, {
276
- default: n(() => [
277
- l(u, {
278
- value: t(r).address,
279
- "onUpdate:value": e[7] || (e[7] = (o) => t(r).address = o),
280
- maxlength: 200,
281
- "auto-size": { minRows: 2 },
282
- placeholder: "请输入地址",
283
- "allow-clear": "",
284
- "show-count": ""
285
- }, null, 8, ["value"])
286
- ]),
287
- _: 1
288
- }),
289
- l(i, {
290
- label: "描述",
291
- name: "description"
292
- }, {
293
- default: n(() => [
294
- l(u, {
295
- value: t(r).description,
296
- "onUpdate:value": e[8] || (e[8] = (o) => t(r).description = o),
297
- maxlength: 255,
298
- "auto-size": { minRows: 2 },
299
- placeholder: "请输入描述",
300
- "allow-clear": "",
301
- "show-count": ""
302
- }, null, 8, ["value"])
303
- ]),
304
- _: 1
305
- }),
306
- l(i, {
307
- label: "所属组织",
308
- name: "userOrgList"
309
- }, {
310
- default: n(() => [
311
- l(fe, {
312
- modelValue: t(r).userOrgList,
313
- "onUpdate:modelValue": e[9] || (e[9] = (o) => t(r).userOrgList = o)
314
- }, null, 8, ["modelValue"])
315
- ]),
316
- _: 1
317
- })
318
- ]),
319
- _: 1
320
- }, 8, ["model"])
321
- ]),
322
- _: 1
323
- }, 8, ["open", "title"]);
324
- };
325
- }
326
- });
327
- export {
328
- c as A,
329
- Pe as _
330
- };
@@ -1,46 +0,0 @@
1
- import { b as s } from "./index.js";
2
- function r(t, a) {
3
- const { id: e, ...o } = t;
4
- return s.Delete(
5
- `/rbac/post/delete/${e}`,
6
- {},
7
- {
8
- params: { ...o }
9
- }
10
- );
11
- }
12
- function p(t, a) {
13
- const { id: e, ...o } = t;
14
- return s.Get(`/rbac/post/detail/${e}`, {
15
- params: { ...o }
16
- });
17
- }
18
- function i(t, a) {
19
- return s.Post("/rbac/post/findPage", t, {
20
- headers: {
21
- "Content-Type": "application/json"
22
- }
23
- });
24
- }
25
- function c(t, a) {
26
- return s.Get("/rbac/post/list", {
27
- params: {
28
- ...t
29
- },
30
- ...a || {}
31
- });
32
- }
33
- function b(t, a) {
34
- return s.Post("/rbac/post/save", t, {
35
- headers: {
36
- "Content-Type": "application/json"
37
- }
38
- });
39
- }
40
- export {
41
- b as a,
42
- c as b,
43
- r as d,
44
- p as g,
45
- i as p
46
- };