@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
@@ -1,431 +0,0 @@
1
- import { r as __exportAll } from "./chunk-DiMWNkAf.js";
2
- import { Lt as useToggle, Nt as postGroupList, OrgSelector as OrgSelector_default, ResourceSelector as ResourceSelector_default, at as postRbacPubDataPermissionsSave, g as RESOURCE_MODE, h as _plugin_vue_export_helper_default, nt as getRbacPubDataPermissionsGetById, ot as postRbacPubDataPermissionsUpdate } from "./index.js";
3
- import { n as GROUP_TYPE } from "./enum-Cr7uWnB2.js";
4
- import { t as useAppAndResource } from "./useAppAndResource-B7FmNfKG.js";
5
- import { i as dataPermissionOptionsAll, n as DATA_PERMISSION_TYPE } from "./enum-3mYayxff.js";
6
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, mergeModels, openBlock, ref, renderList, resolveComponent, toDisplayString, unref, useModel, withCtx } from "vue";
7
- import { message } from "ant-design-vue";
8
- import { Button, CheckboxGroup as CheckboxGroup$1, Drawer, Form as Form$1, FormItem, Input as Input$1, Modal as Modal$1, Select, Space as Space$1, TabPane, Tabs, Tag as Tag$1, Tooltip as Tooltip$1 } from "ant-design-vue/es";
9
- import './createAndEditDataPermission.css';var _hoisted_1$1 = { class: "h-340px border-1px border-solid flex flex-row border_color" }, _hoisted_2$1 = { class: "w-360px" }, _hoisted_3$1 = { class: "flex-1 flex flex-col border-solid border-0px border-l-1px border_color" }, _hoisted_4$1 = { class: "flex-1 p-10px overflow-auto" }, GroupSelector_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
10
- name: "GroupSelector",
11
- __name: "index",
12
- props: {
13
- open: { type: Boolean },
14
- openModifiers: {}
15
- },
16
- emits: /* @__PURE__ */ mergeModels(["select"], ["update:open"]),
17
- setup(e, { expose: r, emit: i }) {
18
- let a = i, o = ref("OrgGroup"), s = computed(() => o.value === "OrgGroup"), c = ref([]), l = ref([]), d = ref([]), f = ref([]), p = computed(() => {
19
- let e = s.value ? c : l, t = s.value ? d : f;
20
- return e.value.filter((e) => t.value.includes(e.value));
21
- }), h = useModel(e, "open"), g = useToggle(h);
22
- _();
23
- function _() {
24
- v(GROUP_TYPE.ORG), v(GROUP_TYPE.PER);
25
- }
26
- function v(e) {
27
- postGroupList({ type: e }).then((t) => {
28
- if (t && t.data && t.data.length) {
29
- let n = t.data.map((e) => {
30
- let { name: t = "", id: n = "" } = e;
31
- return {
32
- label: t.length > 20 ? `${t.substring(0, 20)}...` : t,
33
- value: n,
34
- name: t,
35
- id: n
36
- };
37
- });
38
- e === GROUP_TYPE.ORG ? c.value = n : l.value = n;
39
- }
40
- });
41
- }
42
- function b(e) {
43
- if (e && e.length) {
44
- let t = e.map((e) => e.value);
45
- s.value ? d.value = t : f.value = t;
46
- } else d.value = [], f.value = [];
47
- g(!0);
48
- }
49
- function S() {
50
- s.value ? C() : ee();
51
- }
52
- function C() {
53
- d.value = [];
54
- }
55
- function ee() {
56
- f.value = [];
57
- }
58
- function w(e) {
59
- let t = s.value ? d : f, n = t.value.findIndex((t) => t === e);
60
- n !== -1 && t.value.splice(n, 1);
61
- }
62
- function E() {
63
- a("select", p.value), g(!1);
64
- }
65
- return r({ open: b }), (e, t) => {
66
- let n = CheckboxGroup$1, r = TabPane, i = Tabs, a = Tag$1, s = Tooltip$1, u = Button, m = Modal$1;
67
- return openBlock(), createBlock(m, {
68
- open: h.value,
69
- "onUpdate:open": t[4] ||= (e) => h.value = e,
70
- class: "group-modal",
71
- title: "编辑群组",
72
- "mask-closable": !1,
73
- width: 750
74
- }, {
75
- footer: withCtx(() => [createVNode(u, { onClick: t[3] ||= (e) => unref(g)(!1) }, {
76
- default: withCtx(() => [...t[6] ||= [createTextVNode(" 取消 ", -1)]]),
77
- _: 1
78
- }), createVNode(u, {
79
- type: "primary",
80
- onClick: E
81
- }, {
82
- default: withCtx(() => [...t[7] ||= [createTextVNode(" 确定 ", -1)]]),
83
- _: 1
84
- })]),
85
- default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [createElementVNode("div", _hoisted_2$1, [createVNode(i, {
86
- "active-key": unref(o),
87
- "onUpdate:activeKey": t[2] ||= (e) => isRef(o) ? o.value = e : null,
88
- class: "h-full overflow-hidden"
89
- }, {
90
- default: withCtx(() => [createVNode(r, {
91
- key: "OrgGroup",
92
- tab: "组织群组"
93
- }, {
94
- default: withCtx(() => [createVNode(n, {
95
- value: unref(d),
96
- "onUpdate:value": t[0] ||= (e) => isRef(d) ? d.value = e : null,
97
- options: unref(c)
98
- }, null, 8, ["value", "options"])]),
99
- _: 1
100
- }), createVNode(r, {
101
- key: "UserGroup",
102
- tab: "用户群组",
103
- "force-render": ""
104
- }, {
105
- default: withCtx(() => [createVNode(n, {
106
- value: unref(f),
107
- "onUpdate:value": t[1] ||= (e) => isRef(f) ? f.value = e : null,
108
- options: unref(l)
109
- }, null, 8, ["value", "options"])]),
110
- _: 1
111
- })]),
112
- _: 1
113
- }, 8, ["active-key"])]), createElementVNode("div", _hoisted_3$1, [createElementVNode("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] ||= createElementVNode("div", { class: "" }, " 已选群组 ", -1), createElementVNode("div", {
114
- class: "cursor-pointer text-[#165DFF]",
115
- onClick: S
116
- }, " 清空 ")]), createElementVNode("div", _hoisted_4$1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(p), (e) => (openBlock(), createElementBlock("div", {
117
- key: e.value,
118
- class: "inline-block mb-6px max-w-300px"
119
- }, [e.name && e.name.length > 20 ? (openBlock(), createBlock(s, {
120
- key: 0,
121
- title: e.name
122
- }, {
123
- default: withCtx(() => [createVNode(a, {
124
- class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
125
- closable: "",
126
- onClose: (t) => w(e.value)
127
- }, {
128
- default: withCtx(() => [createTextVNode(toDisplayString(e.label), 1)]),
129
- _: 2
130
- }, 1032, ["onClose"])]),
131
- _: 2
132
- }, 1032, ["title"])) : (openBlock(), createBlock(a, {
133
- key: 1,
134
- class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
135
- closable: "",
136
- onClose: (t) => w(e.value)
137
- }, {
138
- default: withCtx(() => [createTextVNode(toDisplayString(e.label), 1)]),
139
- _: 2
140
- }, 1032, ["onClose"]))]))), 128))])])])]),
141
- _: 1
142
- }, 8, ["open"]);
143
- };
144
- }
145
- }), [["__scopeId", "data-v-2ec81ba8"]]), _hoisted_1 = { class: "pt-10px" }, _hoisted_2 = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, _hoisted_3 = {
146
- key: 1,
147
- class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
148
- }, _hoisted_4 = { class: "pt-10px" }, _hoisted_5 = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, _hoisted_6 = {
149
- key: 1,
150
- class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
151
- }, _hoisted_7 = { class: "pt-10px" }, _hoisted_8 = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, _hoisted_9 = {
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
- }, createAndEditDataPermission_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
155
- name: "CreateAndEditDataPermission",
156
- __name: "createAndEditDataPermission",
157
- emits: ["submit"],
158
- setup(e, { expose: n, emit: s }) {
159
- let u = s, g = RESOURCE_MODE.DATA_PERMISSION, { appList: _, resourceModelRef: v, selectedResources: y, getAppList: x, updateTreeDataAndResourceMap: T, setSelectedResources: D, updateSelectedResources: O, clearSelectedResources: k, openResourceModel: A } = useAppAndResource(g), j = ref(""), M = {
160
- name: "",
161
- type: "",
162
- appId: "",
163
- orgIds: [],
164
- resourceIds: []
165
- }, N = ref(), te = {
166
- name: [{
167
- required: !0,
168
- message: "请输入数据权限名称",
169
- trigger: ["blur", "change"]
170
- }],
171
- type: [{
172
- required: !0,
173
- message: "请选择数据权限规则",
174
- trigger: ["blur", "change"]
175
- }],
176
- appId: [{
177
- required: !0,
178
- message: "请选择所属应用",
179
- trigger: ["blur", "change"]
180
- }],
181
- resourceIds: [{
182
- type: "array",
183
- required: !0,
184
- message: "请选择资源",
185
- trigger: ["blur", "change"]
186
- }],
187
- orgIds: [{
188
- type: "array",
189
- required: !0,
190
- message: "请选择部门",
191
- trigger: ["blur", "change"]
192
- }],
193
- groupIds: [{
194
- type: "array",
195
- required: !0,
196
- message: "请选择群组",
197
- trigger: ["blur", "change"]
198
- }]
199
- }, P = ref({ ...M }), F = computed(() => P.value.type === DATA_PERMISSION_TYPE.CUSTOM_DEPT_AND_SUB || P.value.type === DATA_PERMISSION_TYPE.CUSTOM_DEPT_ONLY), I = computed(() => P.value.type === DATA_PERMISSION_TYPE.CUSTOM_GROUP), L = ref(!1), [R, z] = useToggle(!1), B = ref(), V = ref([]), H = ref(), U = ref([]);
200
- x();
201
- async function W(e, t) {
202
- if (j.value = e, L.value = !1, P.value = { ...M }, k(), X(), Z(), t) {
203
- L.value = !0;
204
- let e = await getRbacPubDataPermissionsGetById({ id: t?.id });
205
- if (e.success && e.data) {
206
- let { id: t, type: n, name: r, appId: i, orgs: a, resources: o, groups: s } = e.data;
207
- P.value = {
208
- id: t,
209
- type: n,
210
- appId: i,
211
- name: r || "",
212
- orgIds: a?.map((e) => e.id || ""),
213
- resourceIds: o?.map((e) => e.id || ""),
214
- groupIds: s?.map((e) => e.id || "")
215
- }, a && a.length && (V.value = a.map((e) => ({
216
- orgId: e.id,
217
- orgName: e.name
218
- }))), s && s.length && (U.value = s.map((e) => ({
219
- id: e.id,
220
- name: e.name,
221
- value: e.id,
222
- label: e.name && e.name.length > 20 ? e.name.slice(0, 20) : e.name
223
- }))), await T(P.value.appId), P.value.resourceIds && O(P.value.resourceIds);
224
- }
225
- }
226
- z(!0);
227
- }
228
- function G(e) {
229
- P.value.resourceIds = [], y.value = [], e && T(e);
230
- }
231
- function K() {
232
- N.value?.validateFields(["appId"]).then(() => {
233
- P.value.appId && P.value.resourceIds && A(P.value.resourceIds);
234
- }).catch(() => {});
235
- }
236
- function q(e) {
237
- D(e), e && e.length ? (P.value.resourceIds = e.map((e) => e.id), N.value?.clearValidate(["resourceIds"])) : P.value.resourceIds = [];
238
- }
239
- function J() {
240
- B.value && B.value.open();
241
- }
242
- function Y() {
243
- H.value && H.value.open(U.value);
244
- }
245
- function X() {
246
- V.value = [];
247
- }
248
- function Z() {
249
- U.value = [];
250
- }
251
- function ne(e) {
252
- V.value = e, e.length ? (P.value.orgIds = e.map((e) => e.orgId || ""), N.value?.clearValidate(["orgIds"])) : P.value.orgIds = [];
253
- }
254
- function re(e) {
255
- U.value = e, e.length ? (P.value.groupIds = e.map((e) => e.id || ""), N.value?.clearValidate(["groupIds"])) : P.value.groupIds = [];
256
- }
257
- let [ie, Q] = useToggle(!1);
258
- function ae() {
259
- N.value?.validate().then(() => {
260
- Q(!0);
261
- let e = L.value ? postRbacPubDataPermissionsUpdate : postRbacPubDataPermissionsSave, t = { ...P.value };
262
- F.value || delete t.orgIds, I.value || delete t.groupIds, e(t).then((e) => {
263
- e.success && (message.success(`${j.value}成功!`), z(!1), u("submit"));
264
- }).finally(() => Q(!1));
265
- });
266
- }
267
- function $() {
268
- z(!1);
269
- }
270
- return n({ open: W }), (e, t) => {
271
- let n = Input$1, a = FormItem, o = Select, s = Button, c = Tooltip$1, l = Form$1, u = Space$1, d = Drawer;
272
- return openBlock(), createBlock(d, {
273
- open: unref(R),
274
- "onUpdate:open": t[4] ||= (e) => isRef(R) ? R.value = e : null,
275
- title: `${unref(j)}数据权限`,
276
- placement: "right",
277
- width: 600,
278
- "destroy-on-close": "",
279
- "footer-style": { textAlign: "right" },
280
- onClose: $
281
- }, {
282
- footer: withCtx(() => [createVNode(u, null, {
283
- default: withCtx(() => [createVNode(s, { onClick: $ }, {
284
- default: withCtx(() => [...t[8] ||= [createTextVNode(" 取消 ", -1)]]),
285
- _: 1
286
- }), createVNode(s, {
287
- type: "primary",
288
- loading: unref(ie),
289
- onClick: t[3] ||= (e) => ae()
290
- }, {
291
- default: withCtx(() => [...t[9] ||= [createTextVNode(" 提交 ", -1)]]),
292
- _: 1
293
- }, 8, ["loading"])]),
294
- _: 1
295
- })]),
296
- default: withCtx(() => [
297
- createVNode(l, {
298
- ref_key: "formRef",
299
- ref: N,
300
- model: unref(P),
301
- rules: te,
302
- "label-col": { span: 6 }
303
- }, {
304
- default: withCtx(() => [
305
- createVNode(a, {
306
- label: "数据权限名称",
307
- name: "name"
308
- }, {
309
- default: withCtx(() => [createVNode(n, {
310
- value: unref(P).name,
311
- "onUpdate:value": t[0] ||= (e) => unref(P).name = e,
312
- maxlength: 20
313
- }, null, 8, ["value"])]),
314
- _: 1
315
- }),
316
- createVNode(a, {
317
- label: "数据权限规则",
318
- name: "type"
319
- }, {
320
- default: withCtx(() => [createVNode(o, {
321
- value: unref(P).type,
322
- "onUpdate:value": t[1] ||= (e) => unref(P).type = e,
323
- options: unref(dataPermissionOptionsAll),
324
- placeholder: "请选择"
325
- }, null, 8, ["value", "options"])]),
326
- _: 1
327
- }),
328
- createVNode(a, {
329
- label: "所属应用",
330
- name: "appId"
331
- }, {
332
- default: withCtx(() => [createVNode(o, {
333
- value: unref(P).appId,
334
- "onUpdate:value": t[2] ||= (e) => unref(P).appId = e,
335
- disabled: unref(L),
336
- options: unref(_),
337
- onChange: G
338
- }, null, 8, [
339
- "value",
340
- "disabled",
341
- "options"
342
- ])]),
343
- _: 1
344
- }),
345
- createVNode(a, {
346
- label: "所属资源",
347
- name: "resourceIds"
348
- }, {
349
- default: withCtx(() => [createVNode(s, {
350
- type: "primary",
351
- onClick: K
352
- }, {
353
- default: withCtx(() => [...t[5] ||= [createTextVNode(" 编辑资源 ", -1)]]),
354
- _: 1
355
- }), createElementVNode("div", _hoisted_1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(y), (e) => (openBlock(), createElementBlock(Fragment, { key: e }, [e.name.length > 20 ? (openBlock(), createBlock(c, {
356
- key: 0,
357
- title: e.name
358
- }, {
359
- default: withCtx(() => [createElementVNode("span", _hoisted_2, toDisplayString(`${e.name.slice(0, 20)}...`), 1)]),
360
- _: 2
361
- }, 1032, ["title"])) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(e.name), 1))], 64))), 128))])]),
362
- _: 1
363
- }),
364
- unref(F) ? (openBlock(), createBlock(a, {
365
- key: 0,
366
- label: "所属部门",
367
- name: "orgIds"
368
- }, {
369
- default: withCtx(() => [createVNode(s, {
370
- type: "primary",
371
- onClick: J
372
- }, {
373
- default: withCtx(() => [...t[6] ||= [createTextVNode(" 编辑部门 ", -1)]]),
374
- _: 1
375
- }), createElementVNode("div", _hoisted_4, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(V), (e) => (openBlock(), createElementBlock(Fragment, { key: e }, [e.orgName && e.orgName.length > 20 ? (openBlock(), createBlock(c, {
376
- key: 0,
377
- title: e.orgName
378
- }, {
379
- default: withCtx(() => [createElementVNode("span", _hoisted_5, toDisplayString(`${e.orgName?.slice(0, 20)}...`), 1)]),
380
- _: 2
381
- }, 1032, ["title"])) : (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(e.orgName), 1))], 64))), 128))])]),
382
- _: 1
383
- })) : createCommentVNode("", !0),
384
- unref(I) ? (openBlock(), createBlock(a, {
385
- key: 1,
386
- label: "所属群组",
387
- name: "groupIds"
388
- }, {
389
- default: withCtx(() => [createVNode(s, {
390
- type: "primary",
391
- onClick: Y
392
- }, {
393
- default: withCtx(() => [...t[7] ||= [createTextVNode(" 编辑群组 ", -1)]]),
394
- _: 1
395
- }), createElementVNode("div", _hoisted_7, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(U), (e) => (openBlock(), createElementBlock(Fragment, { key: e }, [e.name && e.name.length > 20 ? (openBlock(), createBlock(c, {
396
- key: 0,
397
- title: e.name
398
- }, {
399
- default: withCtx(() => [createElementVNode("span", _hoisted_8, toDisplayString(`${e.name?.slice(0, 20)}...`), 1)]),
400
- _: 2
401
- }, 1032, ["title"])) : (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(e.name), 1))], 64))), 128))])]),
402
- _: 1
403
- })) : createCommentVNode("", !0)
404
- ]),
405
- _: 1
406
- }, 8, ["model"]),
407
- createVNode(OrgSelector_default, {
408
- ref_key: "orgRef",
409
- ref: B,
410
- "model-value": unref(V),
411
- multiple: "",
412
- onSubmit: ne
413
- }, null, 8, ["model-value"]),
414
- createVNode(ResourceSelector_default, {
415
- ref_key: "resourceModelRef",
416
- ref: v,
417
- mode: unref(g),
418
- onSelect: q
419
- }, null, 8, ["mode"]),
420
- createVNode(GroupSelector_default, {
421
- ref_key: "groupRef",
422
- ref: H,
423
- onSelect: re
424
- }, null, 512)
425
- ]),
426
- _: 1
427
- }, 8, ["open", "title"]);
428
- };
429
- }
430
- }), createAndEditDataPermission_exports = /* @__PURE__ */ __exportAll({ default: () => createAndEditDataPermission_default }), createAndEditDataPermission_default = createAndEditDataPermission_vue_vue_type_script_setup_true_lang_default;
431
- export { createAndEditDataPermission_exports as n, createAndEditDataPermission_default as t };
@@ -1,152 +0,0 @@
1
- import { Lt as useToggle, et as deleteRbacPubDataPermissionsDelete, h as _plugin_vue_export_helper_default, it as postRbacPubDataPermissionsPageQuery } from "./index.js";
2
- import "./enum-Cr7uWnB2.js";
3
- import { t as createAndEditDataPermission_default } from "./createAndEditDataPermission-8_KNLzJT.js";
4
- import "./useAppAndResource-B7FmNfKG.js";
5
- import { a as dataPermissionTypeLabel, i as dataPermissionOptionsAll, t as ACTION } from "./enum-3mYayxff.js";
6
- import { PubinfoIcon } from "pubinfo";
7
- import { createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, ref, resolveDirective, toDisplayString, unref, withCtx, withDirectives } from "vue";
8
- import { PlusCircleOutlined } from "@ant-design/icons-vue";
9
- import { Modal, message } from "ant-design-vue";
10
- import { Button, Space as Space$1 } from "ant-design-vue/es";
11
- import { ProTable } from "@pubinfo/pro-components";
12
- import './data-permission.css';var _hoisted_1 = {
13
- "w-full": "",
14
- "h-full": "",
15
- "py-10px": "",
16
- "px-10px": "",
17
- flex: "",
18
- "flex-col": "",
19
- class: "page-data-permission"
20
- }, _hoisted_2 = { key: 0 }, _hoisted_3 = ["onClick"], _hoisted_4 = { class: "ml-4px" }, _hoisted_5 = ["onClick"], _hoisted_6 = { class: "ml-4px" }, data_permission_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
21
- name: "DataPermission",
22
- __name: "index",
23
- setup(n) {
24
- let s = ref(), u = ref(), d = [
25
- {
26
- valueType: "a-input",
27
- title: "数据权限名称",
28
- dataIndex: "name",
29
- fieldProps: {
30
- placeholder: "请输入",
31
- allowClear: !0
32
- }
33
- },
34
- {
35
- valueType: "a-select",
36
- title: "数据权限规则",
37
- dataIndex: "type",
38
- fieldProps: {
39
- placeholder: "请选择",
40
- allowClear: !0,
41
- options: dataPermissionOptionsAll
42
- },
43
- ellipsis: !0
44
- },
45
- {
46
- hideInSearch: !0,
47
- title: "创建时间",
48
- dataIndex: "createTime",
49
- ellipsis: !0
50
- },
51
- {
52
- hideInSearch: !0,
53
- title: "更新时间",
54
- dataIndex: "updateTime",
55
- ellipsis: !0
56
- },
57
- {
58
- hideInSearch: !0,
59
- title: "操作",
60
- dataIndex: "action",
61
- width: 200,
62
- fixed: "right"
63
- }
64
- ];
65
- async function f(e) {
66
- let { current: t, pageSize: n, type: i, name: a } = e, o = await postRbacPubDataPermissionsPageQuery({
67
- pageSize: n,
68
- currentPage: t,
69
- doSearchTotal: !0,
70
- type: i,
71
- name: a
72
- });
73
- return {
74
- success: o.success,
75
- data: o.data?.records ?? [],
76
- total: o.data?.total ?? 0
77
- };
78
- }
79
- function p() {
80
- s.value.reload();
81
- }
82
- let [m, h] = useToggle(!1);
83
- function g(e, n) {
84
- if (!m.value) switch (e) {
85
- case ACTION.ADD:
86
- u.value.open(e);
87
- break;
88
- case ACTION.EDIT:
89
- u.value.open(e, n);
90
- break;
91
- case ACTION.REMOVE:
92
- Modal.confirm({
93
- title: "删除",
94
- content: "确定要删除该权限吗?",
95
- async onOk() {
96
- h(!0), deleteRbacPubDataPermissionsDelete({ id: n?.id }).then((e) => {
97
- e.success && (message.success("删除成功"), p());
98
- }).finally(() => h(!1));
99
- }
100
- });
101
- break;
102
- }
103
- }
104
- return (e, t) => {
105
- let n = PlusCircleOutlined, r = Button, o = PubinfoIcon, c = Space$1, l = resolveDirective("auth");
106
- return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(ProTable), {
107
- ref_key: "tableRef",
108
- ref: s,
109
- "row-key": "id",
110
- request: f,
111
- columns: d,
112
- "auto-height": "",
113
- scroll: { x: 1e3 }
114
- }, {
115
- toolbar: withCtx(() => [withDirectives((openBlock(), createBlock(r, {
116
- type: "primary",
117
- onClick: t[0] ||= (e) => g(unref(ACTION).ADD)
118
- }, {
119
- default: withCtx(() => [createVNode(n), createTextVNode(" " + toDisplayString(unref(ACTION).ADD), 1)]),
120
- _: 1
121
- })), [[l, "data_permission_create"]])]),
122
- bodyCell: withCtx(({ column: e, record: t }) => [e.dataIndex === "type" ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(unref(dataPermissionTypeLabel)[t.type]), 1)) : createCommentVNode("", !0), e.dataIndex === "action" ? (openBlock(), createBlock(c, { key: 1 }, {
123
- default: withCtx(() => [withDirectives((openBlock(), createElementBlock("a", {
124
- class: "flex items-center hover:opacity-80",
125
- onClick: (e) => g(unref(ACTION).EDIT, t)
126
- }, [createVNode(o, {
127
- name: "edit",
128
- class: "text-base"
129
- }), createElementVNode("span", _hoisted_4, toDisplayString(unref(ACTION).EDIT), 1)], 8, _hoisted_3)), [[l, "data_permission_edit"]]), withDirectives((openBlock(), createElementBlock("span", {
130
- flex: "",
131
- "items-center": "",
132
- "text-red-500": "",
133
- "hover:cursor-pointer": "",
134
- "hover:text-red-500": "",
135
- "hover:opacity-80": "",
136
- onClick: (e) => g(unref(ACTION).REMOVE, t)
137
- }, [createVNode(o, {
138
- name: "remove",
139
- class: "text-base"
140
- }), createElementVNode("span", _hoisted_6, toDisplayString(unref(ACTION).REMOVE), 1)], 8, _hoisted_5)), [[l, "data_permission_delete"]])]),
141
- _: 2
142
- }, 1024)) : createCommentVNode("", !0)]),
143
- _: 1
144
- }, 512), createVNode(createAndEditDataPermission_default, {
145
- ref_key: "drawerRef",
146
- ref: u,
147
- onSubmit: p
148
- }, null, 512)]);
149
- };
150
- }
151
- }), [["__scopeId", "data-v-b32ad41d"]]);
152
- export { data_permission_default as default };