@pubinfo/module-rbac 2.1.11 → 2.1.12

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 (246) hide show
  1. package/dist/{ComponentSelect-A7uGTuHW.js → ComponentSelect-CYmAgdm3.js} +998 -963
  2. package/dist/DynamicRoutesForm-CMF3oh8h.js +171 -0
  3. package/dist/HCheckList-CAhQwX7m.js +39 -0
  4. package/dist/HoverCard-B-uU48hF.js +46 -0
  5. package/dist/IconSelect-CvxGRN_O.js +719 -0
  6. package/dist/ImportExport-CzZssb7_.js +345 -0
  7. package/dist/ImportExport-b1SnWRLj.js +6 -0
  8. package/dist/LayoutForm-Bpdyi_2o.js +129 -0
  9. package/dist/MetaForm-ZLzLz68d.js +39037 -0
  10. package/dist/OrgAndPosition-B0RE1Vc_.js +187 -0
  11. package/dist/OrgSelector-C2rPIonI.js +4877 -0
  12. package/dist/OrgSelector.css +1 -0
  13. package/dist/ResourceEdit-9fvxbd0K.js +383 -0
  14. package/dist/ResourceEdit-BMqfJ3aQ.js +13 -0
  15. package/dist/ResourceRelation-BrluMHdX.js +81 -0
  16. package/dist/ResourceRelation-IJvXnlpo.js +95 -0
  17. package/dist/RoleRelation-DuRuQG08.js +82 -0
  18. package/dist/RoleSelector-BTNYbcC6.js +282 -0
  19. package/dist/TenantEdit-Df3gZKLA.js +249 -0
  20. package/dist/UserAuthorization-DX7jNDDe.js +237 -0
  21. package/dist/UserEdit-BLb0n7WM.js +322 -0
  22. package/dist/_baseClone-C7vkGgsW.js +138 -0
  23. package/dist/_initCloneObject-r-eWKqzl.js +531 -0
  24. package/dist/add-child-DPb_m2by.js +4 -0
  25. package/dist/{animation_item-DBOz2rcX.js → animation_item-Coe-B0jQ.js} +24 -19
  26. package/dist/assist-BRMYD-oT.js +89 -0
  27. package/dist/authority-B9wtmsQd.js +4 -0
  28. package/dist/authorize-DxrutyIG.js +4 -0
  29. package/dist/blackWhiteList-d6TVsK48.js +214 -0
  30. package/dist/blacklist-disable-BKSw91qq.js +4 -0
  31. package/dist/blacklist-enable-CIB1fOHT.js +4 -0
  32. package/dist/breadcrumb_setting-DMbvWP5t.js +111 -0
  33. package/dist/browser-chrome-CM60RcrG.js +4 -0
  34. package/dist/browser-edge-4LBRzooM.js +4 -0
  35. package/dist/browser-ie-BF-wqbf6.js +4 -0
  36. package/dist/browser-other-iXJH-9iL.js +4 -0
  37. package/dist/browser-safari-CIpt0yPc.js +4 -0
  38. package/dist/browserType-Bik20-72.js +28 -0
  39. package/dist/chunk-WQLz0Won.js +20 -0
  40. package/dist/cloneDeep-REaxTPsZ.js +8 -0
  41. package/dist/createAndEditDataPermission-OunqmBu_.js +438 -0
  42. package/dist/data-permission-2pzeFLxP.js +159 -0
  43. package/dist/{dayjs.min-Cb7gQFd4.js → dayjs.min-CJunOGCc.js} +5 -3
  44. package/dist/dictionary-DGqlAhRk.js +182 -0
  45. package/dist/dist-DxAYQq3U.js +21 -0
  46. package/dist/drawerBlackWhiteList-VxyjaBkA.js +123 -0
  47. package/dist/drawerDictionary-DhAB-LV9.js +129 -0
  48. package/dist/drawerDictionaryItem-DYsJzZ2f.js +141 -0
  49. package/dist/drawerGroup-CTO8Lmbb.js +189 -0
  50. package/dist/drawerOrganization-DWhTc1fB.js +253 -0
  51. package/dist/drawerPosition-BmM9mLlP.js +169 -0
  52. package/dist/drawerRegion-BD-xc1x2.js +189 -0
  53. package/dist/drawerRole-B348x40k.js +214 -0
  54. package/dist/drawerRole-CgAPM-0g.js +172 -0
  55. package/dist/drawerRole-Cjp9iDsa.js +157 -0
  56. package/dist/edit-Drp8yjRe.js +4 -0
  57. package/dist/enum-CG0P82pn.js +6 -0
  58. package/dist/{enum-3E_sUqRF.js → enum-CR5ztb5v2.js} +15 -14
  59. package/dist/enum-CYCebJeC.js +62 -0
  60. package/dist/enum-DS4SGhiF.js +6 -0
  61. package/dist/enum-zdKA3Jy-.js +23 -0
  62. package/dist/group-C6Rj3K5I.js +178 -0
  63. package/dist/icard-BULUUV5m.js +4 -0
  64. package/dist/icon_animation-DuEY1FMm.js +4 -0
  65. package/dist/icon_breadcrumb-Y788iP_T.js +4 -0
  66. package/dist/icon_copyright-C1BER6kq.js +4 -0
  67. package/dist/icon_jt-ICOdrIF6.js +4 -0
  68. package/dist/icon_layout-D_wV9rX3.js +4 -0
  69. package/dist/icon_mainpage-Cz6_cxpJ.js +4 -0
  70. package/dist/icon_menu-y7SblUoR.js +4 -0
  71. package/dist/icon_page_size-BjwT656E.js +4 -0
  72. package/dist/icon_position_type-CPxcDgmM.js +4 -0
  73. package/dist/icon_safe_manage-CoqVRBLl.js +4 -0
  74. package/dist/icon_screen_scale-DURlkq3C.js +4 -0
  75. package/dist/icon_system_manage-BLXs2CQg.js +4 -0
  76. package/dist/icon_tabbar-_0QWhSBV.js +4 -0
  77. package/dist/icon_toolbar-BXpfu0iq.js +4 -0
  78. package/dist/icon_topbar-DrwvB8Jw.js +4 -0
  79. package/dist/icon_watermark-DwNqjAiA.js +4 -0
  80. package/dist/index.css +1 -1
  81. package/dist/index.js +587 -6775
  82. package/dist/isEmpty-2rx9iUQv.js +14 -0
  83. package/dist/isEqual-CNeQLaCM.js +474 -0
  84. package/dist/itemlist-BGe-z1IR.js +159 -0
  85. package/dist/layout_setting-Cds3TCHc.js +71 -0
  86. package/dist/log-DOMU9MyH.js +18 -0
  87. package/dist/log-center-BrGlNhMd.js +4 -0
  88. package/dist/loginHistoryDetail-Coba_ajy.js +80 -0
  89. package/dist/{login_history-BiwaLpxA.js → login_history-CrXkEsHb.js} +38 -35
  90. package/dist/menu_setting-Br5dOEUk.js +158 -0
  91. package/dist/not-data-C-MacYF3.js +5 -0
  92. package/dist/operateHistoryDetail-DfDQL5BF.js +92 -0
  93. package/dist/{operate_history-sPd9IHMV.js → operate_history-BtHgPhmF.js} +38 -35
  94. package/dist/org-main-BRMBumDm.js +4 -0
  95. package/dist/org-unmain-0BHnrNdD.js +4 -0
  96. package/dist/organization-BbFERZ1l.js +15411 -0
  97. package/dist/other_setting-D92SlFvl.js +216 -0
  98. package/dist/page_animation_setting-Cy2R0vZy.js +111 -0
  99. package/dist/page_w_setting-DryWrqcx.js +66 -0
  100. package/dist/position-B1bqGly6.js +169 -0
  101. package/dist/rbac-B59CVHDt.js +460 -0
  102. package/dist/region-B_n1KXMG.js +182 -0
  103. package/dist/remove-BTME2Fhs.js +4 -0
  104. package/dist/request-7X2hpUru.js +5 -0
  105. package/dist/resource-CPNNd1l0.js +275 -0
  106. package/dist/resource-app-D8to3Lkn.js +4 -0
  107. package/dist/resource-btn-Cz-A_EQF.js +4 -0
  108. package/dist/resource-dynamic-BUqWxUiU.js +4 -0
  109. package/dist/resource-index-D2roT002.js +4 -0
  110. package/dist/resource-menu-BRER68rK.js +4 -0
  111. package/dist/resource-micro-Hyucl9de.js +4 -0
  112. package/dist/resource-nonmenu-7FcPEpHv.js +4 -0
  113. package/dist/role-CMd7WDRC.js +195 -0
  114. package/dist/role_group-DHh2s911.js +174 -0
  115. package/dist/safe_setting-CuTBmUve.js +225 -0
  116. package/dist/setItem-BwXZ5Uqx.js +4 -0
  117. package/dist/setItem-DlhIkIgh.js +78 -0
  118. package/dist/setting-manage-UHelpLrr.js +4 -0
  119. package/dist/stores-C-zbXsms.js +2 -0
  120. package/dist/tabbar_setting-CjW9LGPp.js +142 -0
  121. package/dist/tenant-B_vgufMG.js +180 -0
  122. package/dist/theme-check-mark-DRzx4sTs.js +4 -0
  123. package/dist/theme-title-BRvQ_qPg.js +4 -0
  124. package/dist/theme_setting-DMP0_nZ1.js +114 -0
  125. package/dist/toolbar_setting-ClxxvA7R.js +143 -0
  126. package/dist/useAppAndResource-D6WnpUPR.js +55 -0
  127. package/dist/user-BhytPqnx.js +348 -0
  128. package/dist/{vanilla-picker-Byb6q187.js → vanilla-picker-2HFham9c.js} +61 -59
  129. package/dist/view-Cridj7u2.js +4 -0
  130. package/dist/view-lBxqXfPW.js +114 -0
  131. package/dist/watermark_setting-b3vBYWwY.js +194 -0
  132. package/dist/zddata-CnvPWtIW.js +4 -0
  133. package/dist/zy_checked-C25HQlnr.js +4 -0
  134. package/dist/zy_default-B7RKtyqy.js +4 -0
  135. package/package.json +3 -3
  136. package/dist/DynamicRoutesForm-DSzy_bh5.js +0 -169
  137. package/dist/HCheckList-ODQHidN8.js +0 -37
  138. package/dist/HoverCard-CmJCoa2b.js +0 -44
  139. package/dist/IconSelect-DouEg3xY.js +0 -717
  140. package/dist/ImportExport-DisdLoY8.js +0 -342
  141. package/dist/LayoutForm-Bdfs5WeK.js +0 -125
  142. package/dist/MetaForm-CcDwS8vh.js +0 -38902
  143. package/dist/OrgAndPosition-jDX7m0HD.js +0 -184
  144. package/dist/ResourceEdit-0BYZRye_.js +0 -381
  145. package/dist/ResourceRelation-CU-QpUhP.js +0 -76
  146. package/dist/ResourceRelation-roz0a8Td.js +0 -91
  147. package/dist/RoleRelation-BQQFaum0.js +0 -79
  148. package/dist/RoleSelector-gkar_UGG.js +0 -275
  149. package/dist/TenantEdit-BsahDUlf.js +0 -246
  150. package/dist/UserAuthorization-2Fl4IGw7.js +0 -233
  151. package/dist/UserEdit-CX3Qau8T.js +0 -320
  152. package/dist/add-child-CFHHkjfg.js +0 -2
  153. package/dist/authority-L7SfiMdP.js +0 -2
  154. package/dist/authorize-qMpV_BXT.js +0 -2
  155. package/dist/blackWhiteList-DbG7JH8n.js +0 -211
  156. package/dist/blacklist-disable-BT6Xx-JG.js +0 -2
  157. package/dist/blacklist-enable-CJ6DK_V2.js +0 -2
  158. package/dist/breadcrumb_setting-DTR6CPZQ.js +0 -108
  159. package/dist/browser-chrome-DuAegVCe.js +0 -2
  160. package/dist/browser-edge-DzkWdXRd.js +0 -2
  161. package/dist/browser-ie-DZ9g_MXr.js +0 -2
  162. package/dist/browser-other-BmkifoYq.js +0 -2
  163. package/dist/browser-safari-CXrCuF2a.js +0 -2
  164. package/dist/browserType-B8A1Osvk.js +0 -26
  165. package/dist/chunk-DiMWNkAf.js +0 -18
  166. package/dist/cloneDeep-CSOSavu3.js +0 -6
  167. package/dist/createAndEditDataPermission-8_KNLzJT.js +0 -431
  168. package/dist/data-permission-LpuDLDm0.js +0 -152
  169. package/dist/dictionary-CEaxjqZe.js +0 -179
  170. package/dist/drawerBlackWhiteList-DXLdWurZ.js +0 -120
  171. package/dist/drawerDictionary-DYJTAZr6.js +0 -126
  172. package/dist/drawerDictionaryItem-BChXD2-q.js +0 -138
  173. package/dist/drawerGroup-CdnZkZxi.js +0 -185
  174. package/dist/drawerOrganization-CwtSFUj0.js +0 -247
  175. package/dist/drawerPosition-CfyfeQCN.js +0 -166
  176. package/dist/drawerRegion-DAwY_29K.js +0 -183
  177. package/dist/drawerRole-B7uCfHk-.js +0 -154
  178. package/dist/drawerRole-DK6DrinO.js +0 -209
  179. package/dist/drawerRole-DrzMHL0O.js +0 -167
  180. package/dist/edit-fZ7h_z_Z.js +0 -2
  181. package/dist/enum-3mYayxff.js +0 -61
  182. package/dist/enum-Cr7uWnB2.js +0 -23
  183. package/dist/enum-D2UEJsrC.js +0 -4
  184. package/dist/group-CaOhkh72.js +0 -172
  185. package/dist/icard-H-d9Pip-.js +0 -2
  186. package/dist/icon_animation-BCdRKkE5.js +0 -2
  187. package/dist/icon_breadcrumb-BR6LK8hP.js +0 -2
  188. package/dist/icon_copyright-BfWn1s6t.js +0 -2
  189. package/dist/icon_jt-DOMTq9De.js +0 -2
  190. package/dist/icon_layout-DKqAThpM.js +0 -2
  191. package/dist/icon_mainpage-CXB9JMGv.js +0 -2
  192. package/dist/icon_menu-BYQtWV-Q.js +0 -2
  193. package/dist/icon_page_size-r-z4oHWp.js +0 -2
  194. package/dist/icon_position_type-JDFdklRh.js +0 -2
  195. package/dist/icon_safe_manage-BDTIOduB.js +0 -2
  196. package/dist/icon_screen_scale-vEaAdr9S.js +0 -2
  197. package/dist/icon_system_manage-CkhQtieE.js +0 -2
  198. package/dist/icon_tabbar-DZNj-h-p.js +0 -2
  199. package/dist/icon_toolbar-BBYhGmEf.js +0 -2
  200. package/dist/icon_topbar-Bc379eaS.js +0 -2
  201. package/dist/icon_watermark-CTP8r-e2.js +0 -2
  202. package/dist/isEmpty-BjEzPyCa.js +0 -12
  203. package/dist/itemlist-CFwRUV2Y.js +0 -156
  204. package/dist/layout_setting-79srmFgJ.js +0 -68
  205. package/dist/log-BYris9iT.js +0 -14
  206. package/dist/log-center-CGT-BGAN.js +0 -2
  207. package/dist/loginHistoryDetail-CZnfmbbM.js +0 -78
  208. package/dist/menu_setting-C2GciMXz.js +0 -155
  209. package/dist/not-data-Bml86wdH.js +0 -3
  210. package/dist/operateHistoryDetail-HId-EZzy.js +0 -90
  211. package/dist/org-main-DnftBa38.js +0 -2
  212. package/dist/org-unmain-ByMarqFw.js +0 -2
  213. package/dist/organization-Dv3FbKke.js +0 -15316
  214. package/dist/other_setting-oVuhA70c.js +0 -213
  215. package/dist/page_animation_setting-D0CtzyOZ.js +0 -108
  216. package/dist/page_w_setting-Q--ct16C.js +0 -63
  217. package/dist/position-CCZ2MSMP.js +0 -166
  218. package/dist/region-D3mjqB8H.js +0 -179
  219. package/dist/remove-DfZZBE2T.js +0 -2
  220. package/dist/resource-DaQ7CvM_.js +0 -271
  221. package/dist/resource-app-QSLZ7Hts.js +0 -2
  222. package/dist/resource-btn-BcB4xMgR.js +0 -2
  223. package/dist/resource-dynamic-D69oEbaO.js +0 -2
  224. package/dist/resource-index-BIHr3PZY.js +0 -2
  225. package/dist/resource-menu-0JSNn7S7.js +0 -2
  226. package/dist/resource-micro-CcX_pmaJ.js +0 -2
  227. package/dist/resource-nonmenu-DFItasMT.js +0 -2
  228. package/dist/role-4UgEw3nH.js +0 -192
  229. package/dist/role_group-hkRlCnyl.js +0 -171
  230. package/dist/safe_setting-4fv3qNRZ.js +0 -221
  231. package/dist/setItem-Vkcwkj-O.js +0 -77
  232. package/dist/setting-manage-C9whamLP.js +0 -2
  233. package/dist/stores-DPQF8JRt.js +0 -2
  234. package/dist/tabbar_setting-DhrW4Jj5.js +0 -139
  235. package/dist/tenant-lWfGw2u1.js +0 -177
  236. package/dist/theme-check-mark-DG4oWCQN.js +0 -2
  237. package/dist/theme-title-BCYnl2jK.js +0 -2
  238. package/dist/theme_setting-CEb7UYQO.js +0 -111
  239. package/dist/toolbar_setting-znESrYgi.js +0 -140
  240. package/dist/useAppAndResource-B7FmNfKG.js +0 -52
  241. package/dist/user-BkUpcQC8.js +0 -339
  242. package/dist/view-Bnu34EJT.js +0 -2
  243. package/dist/watermark_setting-DYirSIAn.js +0 -191
  244. package/dist/zddata-Ceyga3_2.js +0 -2
  245. package/dist/zy_checked-DvD7k9F8.js +0 -2
  246. package/dist/zy_default-DJ2tB3Fo.js +0 -2
@@ -0,0 +1,438 @@
1
+ import { r as e } from "./chunk-WQLz0Won.js";
2
+ import { t } from "./OrgSelector-C2rPIonI.js";
3
+ import { n } from "./dist-DxAYQq3U.js";
4
+ import { l as r } from "./assist-BRMYD-oT.js";
5
+ import { $ as i, Q as a, Y as o } from "./rbac-B59CVHDt.js";
6
+ import { t as s } from "./enum-CG0P82pn.js";
7
+ import { ResourceSelector as c, h as l } from "./index.js";
8
+ import { n as u } from "./enum-zdKA3Jy-.js";
9
+ import { t as d } from "./useAppAndResource-D6WnpUPR.js";
10
+ import { i as f, n as p } from "./enum-CYCebJeC.js";
11
+ import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, isRef as C, mergeModels as w, openBlock as T, ref as E, renderList as D, toDisplayString as O, unref as k, useModel as ee, withCtx as A } from "vue";
12
+ import { message as j } from "ant-design-vue";
13
+ import { Button as te, CheckboxGroup as M, Drawer as ne, Form as N, FormItem as P, Input as F, Modal as I, Select as L, Space as re, TabPane as R, Tabs as ie, Tag as ae, Tooltip as oe } from "ant-design-vue/es";
14
+ import './createAndEditDataPermission.css';//#region src/components/GroupSelector/index.vue?vue&type=script&setup=true&lang.ts
15
+ var se = { class: "h-340px border-1px border-solid flex flex-row border_color" }, z = { class: "w-360px" }, B = { class: "flex-1 flex flex-col border-solid border-0px border-l-1px border_color" }, V = { class: "flex-1 p-10px overflow-auto" }, ce = /* @__PURE__ */ l(/* @__PURE__ */ S({
16
+ name: "GroupSelector",
17
+ __name: "index",
18
+ props: {
19
+ open: { type: Boolean },
20
+ openModifiers: {}
21
+ },
22
+ emits: /* @__PURE__ */ w(["select"], ["update:open"]),
23
+ setup(e, { expose: t, emit: i }) {
24
+ let a = i, o = E("OrgGroup"), s = h(() => o.value === "OrgGroup"), c = E([]), l = E([]), d = E([]), f = E([]), p = h(() => {
25
+ let e = s.value ? c : l, t = s.value ? d : f;
26
+ return e.value.filter((e) => t.value.includes(e.value));
27
+ }), _ = ee(e, "open"), S = n(_);
28
+ w();
29
+ function w() {
30
+ j(u.ORG), j(u.PER);
31
+ }
32
+ function j(e) {
33
+ r({ type: e }).then((t) => {
34
+ if (t && t.data && t.data.length) {
35
+ let n = t.data.map((e) => {
36
+ let { name: t = "", id: n = "" } = e;
37
+ return {
38
+ label: t.length > 20 ? `${t.substring(0, 20)}...` : t,
39
+ value: n,
40
+ name: t,
41
+ id: n
42
+ };
43
+ });
44
+ e === u.ORG ? c.value = n : l.value = n;
45
+ }
46
+ });
47
+ }
48
+ function ne(e) {
49
+ if (e && e.length) {
50
+ let t = e.map((e) => e.value);
51
+ s.value ? d.value = t : f.value = t;
52
+ } else d.value = [], f.value = [];
53
+ S(!0);
54
+ }
55
+ function N() {
56
+ s.value ? P() : F();
57
+ }
58
+ function P() {
59
+ d.value = [];
60
+ }
61
+ function F() {
62
+ f.value = [];
63
+ }
64
+ function L(e) {
65
+ let t = s.value ? d : f, n = t.value.findIndex((t) => t === e);
66
+ n !== -1 && t.value.splice(n, 1);
67
+ }
68
+ function re() {
69
+ a("select", p.value), S(!1);
70
+ }
71
+ return t({ open: ne }), (e, t) => {
72
+ let n = M, r = R, i = ie, a = ae, s = oe, u = te, h = I;
73
+ return T(), g(h, {
74
+ open: _.value,
75
+ "onUpdate:open": t[4] ||= (e) => _.value = e,
76
+ class: "group-modal",
77
+ title: "编辑群组",
78
+ "mask-closable": !1,
79
+ width: 750
80
+ }, {
81
+ footer: A(() => [x(u, { onClick: t[3] ||= (e) => k(S)(!1) }, {
82
+ default: A(() => [...t[6] ||= [b(" 取消 ", -1)]]),
83
+ _: 1
84
+ }), x(u, {
85
+ type: "primary",
86
+ onClick: re
87
+ }, {
88
+ default: A(() => [...t[7] ||= [b(" 确定 ", -1)]]),
89
+ _: 1
90
+ })]),
91
+ default: A(() => [y("div", se, [y("div", z, [x(i, {
92
+ "active-key": k(o),
93
+ "onUpdate:activeKey": t[2] ||= (e) => C(o) ? o.value = e : null,
94
+ class: "h-full overflow-hidden"
95
+ }, {
96
+ default: A(() => [x(r, {
97
+ key: "OrgGroup",
98
+ tab: "组织群组"
99
+ }, {
100
+ default: A(() => [x(n, {
101
+ value: k(d),
102
+ "onUpdate:value": t[0] ||= (e) => C(d) ? d.value = e : null,
103
+ options: k(c)
104
+ }, null, 8, ["value", "options"])]),
105
+ _: 1
106
+ }), x(r, {
107
+ key: "UserGroup",
108
+ tab: "用户群组",
109
+ "force-render": ""
110
+ }, {
111
+ default: A(() => [x(n, {
112
+ value: k(f),
113
+ "onUpdate:value": t[1] ||= (e) => C(f) ? f.value = e : null,
114
+ options: k(l)
115
+ }, null, 8, ["value", "options"])]),
116
+ _: 1
117
+ })]),
118
+ _: 1
119
+ }, 8, ["active-key"])]), y("div", B, [y("div", { class: "w-full h-38px bg-[rgb(245,245,245)] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#000] dark:text-[#F2F3F5]" }, [t[5] ||= y("div", { class: "" }, " 已选群组 ", -1), y("div", {
120
+ class: "cursor-pointer text-[#165DFF]",
121
+ onClick: N
122
+ }, " 清空 ")]), y("div", V, [(T(!0), v(m, null, D(k(p), (e) => (T(), v("div", {
123
+ key: e.value,
124
+ class: "inline-block mb-6px max-w-300px"
125
+ }, [e.name && e.name.length > 20 ? (T(), g(s, {
126
+ key: 0,
127
+ title: e.name
128
+ }, {
129
+ default: A(() => [x(a, {
130
+ class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
131
+ closable: "",
132
+ onClose: (t) => L(e.value)
133
+ }, {
134
+ default: A(() => [b(O(e.label), 1)]),
135
+ _: 2
136
+ }, 1032, ["onClose"])]),
137
+ _: 2
138
+ }, 1032, ["title"])) : (T(), g(a, {
139
+ key: 1,
140
+ class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
141
+ closable: "",
142
+ onClose: (t) => L(e.value)
143
+ }, {
144
+ default: A(() => [b(O(e.label), 1)]),
145
+ _: 2
146
+ }, 1032, ["onClose"]))]))), 128))])])])]),
147
+ _: 1
148
+ }, 8, ["open"]);
149
+ };
150
+ }
151
+ }), [["__scopeId", "data-v-2ec81ba8"]]), le = { class: "pt-10px" }, ue = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, de = {
152
+ key: 1,
153
+ class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
154
+ }, fe = { class: "pt-10px" }, pe = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, me = {
155
+ key: 1,
156
+ class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
157
+ }, he = { class: "pt-10px" }, ge = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, _e = {
158
+ key: 1,
159
+ class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
160
+ }, H = /* @__PURE__ */ S({
161
+ name: "CreateAndEditDataPermission",
162
+ __name: "createAndEditDataPermission",
163
+ emits: ["submit"],
164
+ setup(e, { expose: r, emit: l }) {
165
+ let u = l, S = s.DATA_PERMISSION, { appList: w, resourceModelRef: ee, selectedResources: M, getAppList: I, updateTreeDataAndResourceMap: R, setSelectedResources: ie, updateSelectedResources: ae, clearSelectedResources: se, openResourceModel: z } = d(S), B = E(""), V = {
166
+ name: "",
167
+ type: "",
168
+ appId: "",
169
+ orgIds: [],
170
+ resourceIds: []
171
+ }, H = E(), U = {
172
+ name: [{
173
+ required: !0,
174
+ message: "请输入数据权限名称",
175
+ trigger: ["blur", "change"]
176
+ }],
177
+ type: [{
178
+ required: !0,
179
+ message: "请选择数据权限规则",
180
+ trigger: ["blur", "change"]
181
+ }],
182
+ appId: [{
183
+ required: !0,
184
+ message: "请选择所属应用",
185
+ trigger: ["blur", "change"]
186
+ }],
187
+ resourceIds: [{
188
+ type: "array",
189
+ required: !0,
190
+ message: "请选择资源",
191
+ trigger: ["blur", "change"]
192
+ }],
193
+ orgIds: [{
194
+ type: "array",
195
+ required: !0,
196
+ message: "请选择部门",
197
+ trigger: ["blur", "change"]
198
+ }],
199
+ groupIds: [{
200
+ type: "array",
201
+ required: !0,
202
+ message: "请选择群组",
203
+ trigger: ["blur", "change"]
204
+ }]
205
+ }, W = E({ ...V }), G = h(() => W.value.type === p.CUSTOM_DEPT_AND_SUB || W.value.type === p.CUSTOM_DEPT_ONLY), K = h(() => W.value.type === p.CUSTOM_GROUP), q = E(!1), [J, Y] = n(!1), X = E(), Z = E([]), Q = E(), $ = E([]);
206
+ I();
207
+ async function ve(e, t) {
208
+ if (B.value = e, q.value = !1, W.value = { ...V }, se(), we(), Te(), t) {
209
+ q.value = !0;
210
+ let e = await o({ id: t?.id });
211
+ if (e.success && e.data) {
212
+ let { id: t, type: n, name: r, appId: i, orgs: a, resources: o, groups: s } = e.data;
213
+ W.value = {
214
+ id: t,
215
+ type: n,
216
+ appId: i,
217
+ name: r || "",
218
+ orgIds: a?.map((e) => e.id || ""),
219
+ resourceIds: o?.map((e) => e.id || ""),
220
+ groupIds: s?.map((e) => e.id || "")
221
+ }, a && a.length && (Z.value = a.map((e) => ({
222
+ orgId: e.id,
223
+ orgName: e.name
224
+ }))), s && s.length && ($.value = s.map((e) => ({
225
+ id: e.id,
226
+ name: e.name,
227
+ value: e.id,
228
+ label: e.name && e.name.length > 20 ? e.name.slice(0, 20) : e.name
229
+ }))), await R(W.value.appId), W.value.resourceIds && ae(W.value.resourceIds);
230
+ }
231
+ }
232
+ Y(!0);
233
+ }
234
+ function ye(e) {
235
+ W.value.resourceIds = [], M.value = [], e && R(e);
236
+ }
237
+ function be() {
238
+ H.value?.validateFields(["appId"]).then(() => {
239
+ W.value.appId && W.value.resourceIds && z(W.value.resourceIds);
240
+ }).catch(() => {});
241
+ }
242
+ function xe(e) {
243
+ ie(e), e && e.length ? (W.value.resourceIds = e.map((e) => e.id), H.value?.clearValidate(["resourceIds"])) : W.value.resourceIds = [];
244
+ }
245
+ function Se() {
246
+ X.value && X.value.open();
247
+ }
248
+ function Ce() {
249
+ Q.value && Q.value.open($.value);
250
+ }
251
+ function we() {
252
+ Z.value = [];
253
+ }
254
+ function Te() {
255
+ $.value = [];
256
+ }
257
+ function Ee(e) {
258
+ Z.value = e, e.length ? (W.value.orgIds = e.map((e) => e.orgId || ""), H.value?.clearValidate(["orgIds"])) : W.value.orgIds = [];
259
+ }
260
+ function De(e) {
261
+ $.value = e, e.length ? (W.value.groupIds = e.map((e) => e.id || ""), H.value?.clearValidate(["groupIds"])) : W.value.groupIds = [];
262
+ }
263
+ let [Oe, ke] = n(!1);
264
+ function Ae() {
265
+ H.value?.validate().then(() => {
266
+ ke(!0);
267
+ let e = q.value ? i : a, t = { ...W.value };
268
+ G.value || delete t.orgIds, K.value || delete t.groupIds, e(t).then((e) => {
269
+ e.success && (j.success(`${B.value}成功!`), Y(!1), u("submit"));
270
+ }).finally(() => ke(!1));
271
+ });
272
+ }
273
+ function je() {
274
+ Y(!1);
275
+ }
276
+ return r({ open: ve }), (e, n) => {
277
+ let r = F, i = P, a = L, o = te, s = oe, l = N, u = re, d = ne;
278
+ return T(), g(d, {
279
+ open: k(J),
280
+ "onUpdate:open": n[4] ||= (e) => C(J) ? J.value = e : null,
281
+ title: `${k(B)}数据权限`,
282
+ placement: "right",
283
+ width: 600,
284
+ "destroy-on-close": "",
285
+ "footer-style": { textAlign: "right" },
286
+ onClose: je
287
+ }, {
288
+ footer: A(() => [x(u, null, {
289
+ default: A(() => [x(o, { onClick: je }, {
290
+ default: A(() => [...n[8] ||= [b(" 取消 ", -1)]]),
291
+ _: 1
292
+ }), x(o, {
293
+ type: "primary",
294
+ loading: k(Oe),
295
+ onClick: n[3] ||= (e) => Ae()
296
+ }, {
297
+ default: A(() => [...n[9] ||= [b(" 提交 ", -1)]]),
298
+ _: 1
299
+ }, 8, ["loading"])]),
300
+ _: 1
301
+ })]),
302
+ default: A(() => [
303
+ x(l, {
304
+ ref_key: "formRef",
305
+ ref: H,
306
+ model: k(W),
307
+ rules: U,
308
+ "label-col": { span: 6 }
309
+ }, {
310
+ default: A(() => [
311
+ x(i, {
312
+ label: "数据权限名称",
313
+ name: "name"
314
+ }, {
315
+ default: A(() => [x(r, {
316
+ value: k(W).name,
317
+ "onUpdate:value": n[0] ||= (e) => k(W).name = e,
318
+ maxlength: 20
319
+ }, null, 8, ["value"])]),
320
+ _: 1
321
+ }),
322
+ x(i, {
323
+ label: "数据权限规则",
324
+ name: "type"
325
+ }, {
326
+ default: A(() => [x(a, {
327
+ value: k(W).type,
328
+ "onUpdate:value": n[1] ||= (e) => k(W).type = e,
329
+ options: k(f),
330
+ placeholder: "请选择"
331
+ }, null, 8, ["value", "options"])]),
332
+ _: 1
333
+ }),
334
+ x(i, {
335
+ label: "所属应用",
336
+ name: "appId"
337
+ }, {
338
+ default: A(() => [x(a, {
339
+ value: k(W).appId,
340
+ "onUpdate:value": n[2] ||= (e) => k(W).appId = e,
341
+ disabled: k(q),
342
+ options: k(w),
343
+ onChange: ye
344
+ }, null, 8, [
345
+ "value",
346
+ "disabled",
347
+ "options"
348
+ ])]),
349
+ _: 1
350
+ }),
351
+ x(i, {
352
+ label: "所属资源",
353
+ name: "resourceIds"
354
+ }, {
355
+ default: A(() => [x(o, {
356
+ type: "primary",
357
+ onClick: be
358
+ }, {
359
+ default: A(() => [...n[5] ||= [b(" 编辑资源 ", -1)]]),
360
+ _: 1
361
+ }), y("div", le, [(T(!0), v(m, null, D(k(M), (e) => (T(), v(m, { key: e }, [e.name.length > 20 ? (T(), g(s, {
362
+ key: 0,
363
+ title: e.name
364
+ }, {
365
+ default: A(() => [y("span", ue, O(`${e.name.slice(0, 20)}...`), 1)]),
366
+ _: 2
367
+ }, 1032, ["title"])) : (T(), v("span", de, O(e.name), 1))], 64))), 128))])]),
368
+ _: 1
369
+ }),
370
+ k(G) ? (T(), g(i, {
371
+ key: 0,
372
+ label: "所属部门",
373
+ name: "orgIds"
374
+ }, {
375
+ default: A(() => [x(o, {
376
+ type: "primary",
377
+ onClick: Se
378
+ }, {
379
+ default: A(() => [...n[6] ||= [b(" 编辑部门 ", -1)]]),
380
+ _: 1
381
+ }), y("div", fe, [(T(!0), v(m, null, D(k(Z), (e) => (T(), v(m, { key: e }, [e.orgName && e.orgName.length > 20 ? (T(), g(s, {
382
+ key: 0,
383
+ title: e.orgName
384
+ }, {
385
+ default: A(() => [y("span", pe, O(`${e.orgName?.slice(0, 20)}...`), 1)]),
386
+ _: 2
387
+ }, 1032, ["title"])) : (T(), v("span", me, O(e.orgName), 1))], 64))), 128))])]),
388
+ _: 1
389
+ })) : _("", !0),
390
+ k(K) ? (T(), g(i, {
391
+ key: 1,
392
+ label: "所属群组",
393
+ name: "groupIds"
394
+ }, {
395
+ default: A(() => [x(o, {
396
+ type: "primary",
397
+ onClick: Ce
398
+ }, {
399
+ default: A(() => [...n[7] ||= [b(" 编辑群组 ", -1)]]),
400
+ _: 1
401
+ }), y("div", he, [(T(!0), v(m, null, D(k($), (e) => (T(), v(m, { key: e }, [e.name && e.name.length > 20 ? (T(), g(s, {
402
+ key: 0,
403
+ title: e.name
404
+ }, {
405
+ default: A(() => [y("span", ge, O(`${e.name?.slice(0, 20)}...`), 1)]),
406
+ _: 2
407
+ }, 1032, ["title"])) : (T(), v("span", _e, O(e.name), 1))], 64))), 128))])]),
408
+ _: 1
409
+ })) : _("", !0)
410
+ ]),
411
+ _: 1
412
+ }, 8, ["model"]),
413
+ x(t, {
414
+ ref_key: "orgRef",
415
+ ref: X,
416
+ "model-value": k(Z),
417
+ multiple: "",
418
+ onSubmit: Ee
419
+ }, null, 8, ["model-value"]),
420
+ x(c, {
421
+ ref_key: "resourceModelRef",
422
+ ref: ee,
423
+ mode: k(S),
424
+ onSelect: xe
425
+ }, null, 8, ["mode"]),
426
+ x(ce, {
427
+ ref_key: "groupRef",
428
+ ref: Q,
429
+ onSelect: De
430
+ }, null, 512)
431
+ ]),
432
+ _: 1
433
+ }, 8, ["open", "title"]);
434
+ };
435
+ }
436
+ }), U = /* @__PURE__ */ e({ default: () => W }), W = H;
437
+ //#endregion
438
+ export { U as n, W as t };
@@ -0,0 +1,159 @@
1
+ import "./request-7X2hpUru.js";
2
+ import "./OrgSelector-C2rPIonI.js";
3
+ import { n as e } from "./dist-DxAYQq3U.js";
4
+ import "./assist-BRMYD-oT.js";
5
+ import { Z as t, q as n } from "./rbac-B59CVHDt.js";
6
+ import { h as r } from "./index.js";
7
+ import "./enum-zdKA3Jy-.js";
8
+ import { t as i } from "./createAndEditDataPermission-OunqmBu_.js";
9
+ import "./useAppAndResource-D6WnpUPR.js";
10
+ import { a, i as o, t as s } from "./enum-CYCebJeC.js";
11
+ import { PubinfoIcon as c } from "pubinfo";
12
+ import { createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, openBlock as g, ref as _, resolveDirective as v, toDisplayString as y, unref as b, withCtx as x, withDirectives as S } from "vue";
13
+ import { PlusCircleOutlined as C } from "@ant-design/icons-vue";
14
+ import { Modal as w, message as T } from "ant-design-vue";
15
+ import { Button as E, Space as D } from "ant-design-vue/es";
16
+ import { ProTable as O } from "@pubinfo/pro-components";
17
+ import './data-permission.css';//#region src/views/data-permission/index.vue?vue&type=script&setup=true&lang.tsx
18
+ var k = {
19
+ "w-full": "",
20
+ "h-full": "",
21
+ "py-10px": "",
22
+ "px-10px": "",
23
+ flex: "",
24
+ "flex-col": "",
25
+ class: "page-data-permission"
26
+ }, A = { key: 0 }, j = ["onClick"], M = { class: "ml-4px" }, N = ["onClick"], P = { class: "ml-4px" }, F = /* @__PURE__ */ r(/* @__PURE__ */ h({
27
+ name: "DataPermission",
28
+ __name: "index",
29
+ setup(r) {
30
+ let h = _(), F = _(), I = [
31
+ {
32
+ valueType: "a-input",
33
+ title: "数据权限名称",
34
+ dataIndex: "name",
35
+ fieldProps: {
36
+ placeholder: "请输入",
37
+ allowClear: !0
38
+ }
39
+ },
40
+ {
41
+ valueType: "a-select",
42
+ title: "数据权限规则",
43
+ dataIndex: "type",
44
+ fieldProps: {
45
+ placeholder: "请选择",
46
+ allowClear: !0,
47
+ options: o
48
+ },
49
+ ellipsis: !0
50
+ },
51
+ {
52
+ hideInSearch: !0,
53
+ title: "创建时间",
54
+ dataIndex: "createTime",
55
+ ellipsis: !0
56
+ },
57
+ {
58
+ hideInSearch: !0,
59
+ title: "更新时间",
60
+ dataIndex: "updateTime",
61
+ ellipsis: !0
62
+ },
63
+ {
64
+ hideInSearch: !0,
65
+ title: "操作",
66
+ dataIndex: "action",
67
+ width: 200,
68
+ fixed: "right"
69
+ }
70
+ ];
71
+ async function L(e) {
72
+ let { current: n, pageSize: r, type: i, name: a } = e, o = await t({
73
+ pageSize: r,
74
+ currentPage: n,
75
+ doSearchTotal: !0,
76
+ type: i,
77
+ name: a
78
+ });
79
+ return {
80
+ success: o.success,
81
+ data: o.data?.records ?? [],
82
+ total: o.data?.total ?? 0
83
+ };
84
+ }
85
+ function R() {
86
+ h.value.reload();
87
+ }
88
+ let [z, B] = e(!1);
89
+ function V(e, t) {
90
+ if (!z.value) switch (e) {
91
+ case s.ADD:
92
+ F.value.open(e);
93
+ break;
94
+ case s.EDIT:
95
+ F.value.open(e, t);
96
+ break;
97
+ case s.REMOVE:
98
+ w.confirm({
99
+ title: "删除",
100
+ content: "确定要删除该权限吗?",
101
+ async onOk() {
102
+ B(!0), n({ id: t?.id }).then((e) => {
103
+ e.success && (T.success("删除成功"), R());
104
+ }).finally(() => B(!1));
105
+ }
106
+ });
107
+ break;
108
+ }
109
+ }
110
+ return (e, t) => {
111
+ let n = C, r = E, o = c, _ = D, w = v("auth");
112
+ return g(), d("div", k, [m(b(O), {
113
+ ref_key: "tableRef",
114
+ ref: h,
115
+ "row-key": "id",
116
+ request: L,
117
+ columns: I,
118
+ "auto-height": "",
119
+ scroll: { x: 1e3 }
120
+ }, {
121
+ toolbar: x(() => [S((g(), l(r, {
122
+ type: "primary",
123
+ onClick: t[0] ||= (e) => V(b(s).ADD)
124
+ }, {
125
+ default: x(() => [m(n), p(" " + y(b(s).ADD), 1)]),
126
+ _: 1
127
+ })), [[w, "data_permission_create"]])]),
128
+ bodyCell: x(({ column: e, record: t }) => [e.dataIndex === "type" ? (g(), d("span", A, y(b(a)[t.type]), 1)) : u("", !0), e.dataIndex === "action" ? (g(), l(_, { key: 1 }, {
129
+ default: x(() => [S((g(), d("a", {
130
+ class: "flex items-center hover:opacity-80",
131
+ onClick: (e) => V(b(s).EDIT, t)
132
+ }, [m(o, {
133
+ name: "edit",
134
+ class: "text-base"
135
+ }), f("span", M, y(b(s).EDIT), 1)], 8, j)), [[w, "data_permission_edit"]]), S((g(), d("span", {
136
+ flex: "",
137
+ "items-center": "",
138
+ "text-red-500": "",
139
+ "hover:cursor-pointer": "",
140
+ "hover:text-red-500": "",
141
+ "hover:opacity-80": "",
142
+ onClick: (e) => V(b(s).REMOVE, t)
143
+ }, [m(o, {
144
+ name: "remove",
145
+ class: "text-base"
146
+ }), f("span", P, y(b(s).REMOVE), 1)], 8, N)), [[w, "data_permission_delete"]])]),
147
+ _: 2
148
+ }, 1024)) : u("", !0)]),
149
+ _: 1
150
+ }, 512), m(i, {
151
+ ref_key: "drawerRef",
152
+ ref: F,
153
+ onSubmit: R
154
+ }, null, 512)]);
155
+ };
156
+ }
157
+ }), [["__scopeId", "data-v-b32ad41d"]]);
158
+ //#endregion
159
+ export { F as default };
@@ -1,5 +1,6 @@
1
- import { t as __commonJSMin } from "./chunk-DiMWNkAf.js";
2
- var require_dayjs_min = /* @__PURE__ */ __commonJSMin(((e, t) => {
1
+ import { t as e } from "./chunk-WQLz0Won.js";
2
+ //#region ../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/dayjs.min.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
3
4
  (function(n, r) {
4
5
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs = r();
5
6
  })(e, (function() {
@@ -294,4 +295,5 @@ var require_dayjs_min = /* @__PURE__ */ __commonJSMin(((e, t) => {
294
295
  }, w.en = b[y], w.Ls = b, w.p = {}, w;
295
296
  }));
296
297
  }));
297
- export { require_dayjs_min as t };
298
+ //#endregion
299
+ export { t };