@pubinfo/module-rbac 2.0.0-beta.30 → 2.0.0-beta.32

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 (228) hide show
  1. package/dist/OrgSelector-DWT1w1h-.js +27 -0
  2. package/dist/OrgUserSelector-VjiKyUET.js +1 -0
  3. package/dist/ResourceSelector-D1mJz7F1.js +1 -0
  4. package/dist/_baseClone-CBD6n26E.js +1 -0
  5. package/dist/_initCloneObject-CzZMvAGd.js +1 -0
  6. package/dist/_plugin-vue_export-helper-BP6J6hmQ.js +1 -0
  7. package/dist/animation_item-D4pH5y91.js +2 -0
  8. package/dist/assist-D6hXeP0y.js +1 -0
  9. package/dist/blackWhiteList-C0vzrSes.js +1 -0
  10. package/dist/breadcrumb_setting-105xA0or.js +1 -0
  11. package/dist/browserType-WCrQysPD.js +1 -0
  12. package/dist/chunk-oLkGOndT.js +1 -0
  13. package/dist/cloneDeep-B4mZx_tg.js +1 -0
  14. package/dist/components/GroupSelector/index.vue.d.ts +4 -4
  15. package/dist/components/OrgTree/index.vue.d.ts +1 -1
  16. package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +4 -4
  17. package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +4 -4
  18. package/dist/components/ResourceSelector/index.vue.d.ts +5 -5
  19. package/dist/composables/useLottie.d.ts +1 -1
  20. package/dist/configData-C-XgieQd.js +1 -0
  21. package/dist/data-permission-DcXUZZ1G.js +1 -0
  22. package/dist/dictionary-BafvPpvf.js +1 -0
  23. package/dist/enum-C0pwhwh3.js +1 -0
  24. package/dist/enum-CEWFYwLa.js +1 -0
  25. package/dist/enum-CFY_YSvf.js +1 -0
  26. package/dist/enum-G-OAfo9d.js +1 -0
  27. package/dist/group-C1e_vupc.js +1 -0
  28. package/dist/index.js +1 -9
  29. package/dist/interface.d.ts +1 -1
  30. package/dist/itemlist-Dy9O9k6h.js +1 -0
  31. package/dist/layout_setting-BzYjnHvF.js +1 -0
  32. package/dist/login_history-DXixU5An.js +1 -0
  33. package/dist/menu_setting-DWM1r6js.js +1 -0
  34. package/dist/not-data-D8CCqeCi.js +1 -0
  35. package/dist/operate_history-DaDVex6q.js +1 -0
  36. package/dist/organization-CsSd1lr2.js +10 -0
  37. package/dist/other_setting-Dq67iG6v.js +1 -0
  38. package/dist/page_animation_setting-Cj6N5TJq.js +1 -0
  39. package/dist/page_w_setting-Dmik-Xi7.js +1 -0
  40. package/dist/position-CzxbbVOL.js +1 -0
  41. package/dist/rbac-DJC95w7l.js +1 -0
  42. package/dist/region-DGxnlpyo.js +1 -0
  43. package/dist/request-C2x7wP-H.js +1 -0
  44. package/dist/resource-BFe47BKW.js +1 -0
  45. package/dist/role-Bo47PnSD.js +1 -0
  46. package/dist/role_group-BVPoRr1q.js +1 -0
  47. package/dist/routes/index.d.ts +1 -1
  48. package/dist/routes/modules/authority.manage.menu.d.ts +1 -1
  49. package/dist/routes/modules/log.manage.menu.d.ts +1 -1
  50. package/dist/routes/modules/safe.manage.menu.d.ts +1 -1
  51. package/dist/routes/modules/stylesetting.manage.menu.d.ts +1 -1
  52. package/dist/routes/modules/system.manage.menu.d.ts +1 -1
  53. package/dist/safe_setting-kBJgSjzd.js +1 -0
  54. package/dist/setItem-DXsVoKM_.js +1 -0
  55. package/dist/shared-DcMP4Woj.js +1 -0
  56. package/dist/stores-pP-UCq1z.js +1 -0
  57. package/dist/style.css +2 -1
  58. package/dist/tabbar_setting-C9uHCbA0.js +1 -0
  59. package/dist/tenant-BA6IO7wP.js +1 -0
  60. package/dist/theme_setting-CxoaGtjk.js +1 -0
  61. package/dist/toolbar_setting-DyiZvqwf.js +1 -0
  62. package/dist/useAppAndResource-D5u0TDHS.js +1 -0
  63. package/dist/user-B5W5JRXl.js +1 -0
  64. package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +4 -4
  65. package/dist/views/blackWhiteList/index.vue.d.ts +319 -319
  66. package/dist/views/breadcrumb_setting/index.vue.d.ts +1 -1
  67. package/dist/views/components/HCheckList.vue.d.ts +3 -3
  68. package/dist/views/components/animation_item.vue.d.ts +5 -5
  69. package/dist/views/components/setItem.vue.d.ts +17 -17
  70. package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +28 -28
  71. package/dist/views/data-permission/index.vue.d.ts +343 -343
  72. package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +4 -4
  73. package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +4 -4
  74. package/dist/views/dictionary/index.vue.d.ts +319 -319
  75. package/dist/views/dictionary/itemlist.vue.d.ts +319 -319
  76. package/dist/views/group/components/drawerGroup.vue.d.ts +4 -4
  77. package/dist/views/group/index.vue.d.ts +319 -319
  78. package/dist/views/layout_setting/index.vue.d.ts +1 -1
  79. package/dist/views/log_center/components/browserType.vue.d.ts +3 -3
  80. package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +4 -4
  81. package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +4 -4
  82. package/dist/views/log_center/login_history.vue.d.ts +315 -315
  83. package/dist/views/log_center/operate_history.vue.d.ts +315 -315
  84. package/dist/views/menu_setting/index.vue.d.ts +1 -1
  85. package/dist/views/organization/components/drawerOrganization.vue.d.ts +4 -4
  86. package/dist/views/organization/components/drawerRole.vue.d.ts +7 -7
  87. package/dist/views/organization/components/roleSelect.vue.d.ts +4 -4
  88. package/dist/views/organization/index.vue.d.ts +14 -14
  89. package/dist/views/other_setting/index.vue.d.ts +1 -1
  90. package/dist/views/page_animation_setting/index.vue.d.ts +1 -1
  91. package/dist/views/page_w_setting/index.vue.d.ts +1 -1
  92. package/dist/views/position/components/drawerPosition.vue.d.ts +4 -4
  93. package/dist/views/position/index.vue.d.ts +319 -319
  94. package/dist/views/region/components/drawerRegion.vue.d.ts +4 -4
  95. package/dist/views/region/index.vue.d.ts +319 -319
  96. package/dist/views/resource/components/ResourceEdit.vue.d.ts +4 -4
  97. package/dist/views/resource/components/RoleRelation.vue.d.ts +2 -2
  98. package/dist/views/resource/index.vue.d.ts +321 -321
  99. package/dist/views/role/components/ResourceRelation.vue.d.ts +316 -316
  100. package/dist/views/role/components/drawerRole.vue.d.ts +10 -10
  101. package/dist/views/role/index.vue.d.ts +642 -642
  102. package/dist/views/role_group/components/drawerRole.vue.d.ts +7 -7
  103. package/dist/views/role_group/components/roleSelect.vue.d.ts +4 -4
  104. package/dist/views/role_group/index.vue.d.ts +322 -322
  105. package/dist/views/safe_setting/index.vue.d.ts +1 -1
  106. package/dist/views/tabbar_setting/index.vue.d.ts +1 -1
  107. package/dist/views/tenant/components/TenantEdit.vue.d.ts +10 -10
  108. package/dist/views/tenant/index.vue.d.ts +325 -325
  109. package/dist/views/theme_setting/index.vue.d.ts +1 -1
  110. package/dist/views/toolbar_setting/index.vue.d.ts +1 -1
  111. package/dist/views/user/components/OrgAndPosition.vue.d.ts +3 -3
  112. package/dist/views/user/components/UserAuthorization.vue.d.ts +7 -7
  113. package/dist/views/user/components/UserEdit.vue.d.ts +4 -4
  114. package/dist/views/user/components/roleSelect.vue.d.ts +4 -4
  115. package/dist/views/user/index.vue.d.ts +326 -326
  116. package/dist/views/watermark_setting/index.vue.d.ts +9 -9
  117. package/dist/watermark_setting-ChDfJ5of.js +1 -0
  118. package/package.json +7 -7
  119. package/src/assets/icons/browser-chrome.svg +1 -0
  120. package/src/assets/icons/browser-edge.svg +1 -0
  121. package/src/assets/icons/browser-ie.svg +1 -0
  122. package/src/assets/icons/browser-other.svg +1 -0
  123. package/src/assets/icons/browser-safari.svg +1 -0
  124. package/src/components/GroupSelector/index.vue +64 -89
  125. package/src/components/OrgTree/index.vue +2 -2
  126. package/src/components/OrgUserSelector/provider.ts +1 -1
  127. package/src/components/ResourceSelector/index.vue +33 -50
  128. package/src/routes/index.ts +1 -1
  129. package/src/views/blackWhiteList/components/drawerBlackWhiteList.vue +1 -1
  130. package/src/views/blackWhiteList/index.vue +10 -18
  131. package/src/views/breadcrumb_setting/index.vue +3 -3
  132. package/src/views/components/animation_item.vue +2 -2
  133. package/src/views/components/setItem.vue +13 -20
  134. package/src/views/data-permission/components/createAndEditDataPermission.vue +4 -4
  135. package/src/views/data-permission/enum.ts +7 -7
  136. package/src/views/data-permission/index.vue +7 -10
  137. package/src/views/dictionary/components/drawerDictionary.vue +1 -1
  138. package/src/views/dictionary/components/drawerDictionaryItem.vue +1 -1
  139. package/src/views/dictionary/index.vue +3 -3
  140. package/src/views/dictionary/itemlist.vue +1 -1
  141. package/src/views/group/components/drawerGroup.vue +2 -2
  142. package/src/views/group/index.vue +10 -16
  143. package/src/views/layout_setting/index.vue +154 -164
  144. package/src/views/log_center/components/loginHistoryDetail.vue +6 -8
  145. package/src/views/log_center/components/operateHistoryDetail.vue +6 -8
  146. package/src/views/log_center/login_history.vue +6 -11
  147. package/src/views/log_center/operate_history.vue +6 -11
  148. package/src/views/menu_setting/index.vue +3 -3
  149. package/src/views/organization/components/drawerOrganization.vue +3 -3
  150. package/src/views/organization/components/drawerRole.vue +2 -2
  151. package/src/views/organization/components/roleSelect.vue +37 -58
  152. package/src/views/organization/index.vue +23 -49
  153. package/src/views/other_setting/index.vue +2 -2
  154. package/src/views/page_animation_setting/index.vue +10 -18
  155. package/src/views/page_w_setting/index.vue +133 -116
  156. package/src/views/position/components/drawerPosition.vue +2 -2
  157. package/src/views/position/index.vue +1 -1
  158. package/src/views/region/components/drawerRegion.vue +2 -2
  159. package/src/views/region/index.vue +1 -1
  160. package/src/views/resource/components/ResourceEdit.vue +2 -2
  161. package/src/views/resource/components/RoleRelation.vue +1 -1
  162. package/src/views/resource/index.vue +1 -1
  163. package/src/views/role/components/ResourceRelation.vue +3 -4
  164. package/src/views/role/components/drawerRole.vue +3 -3
  165. package/src/views/role/index.vue +1 -1
  166. package/src/views/role_group/components/ResourceRelation.vue +3 -4
  167. package/src/views/role_group/components/drawerRole.vue +1 -1
  168. package/src/views/role_group/components/roleSelect.vue +36 -60
  169. package/src/views/role_group/index.vue +1 -1
  170. package/src/views/safe_setting/index.vue +5 -7
  171. package/src/views/tabbar_setting/index.vue +2 -2
  172. package/src/views/tenant/components/TenantEdit.vue +1 -1
  173. package/src/views/tenant/index.vue +1 -1
  174. package/src/views/theme_setting/index.vue +200 -230
  175. package/src/views/toolbar_setting/index.vue +3 -3
  176. package/src/views/user/components/OrgAndPosition.vue +1 -1
  177. package/src/views/user/components/UserAuthorization.vue +6 -6
  178. package/src/views/user/components/UserEdit.vue +1 -1
  179. package/src/views/user/components/roleSelect.vue +36 -68
  180. package/src/views/user/index.vue +1 -1
  181. package/src/views/watermark_setting/index.vue +8 -15
  182. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  183. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  184. package/dist/animation_item.vue_vue_type_script_setup_true_lang-efL_vjfY.js +0 -4864
  185. package/dist/browserType.vue_vue_type_script_setup_true_lang-Cv8wph6G.js +0 -38
  186. package/dist/cloneDeep-B4Rj61s4.js +0 -8
  187. package/dist/enum-BEHz_Q18.js +0 -74
  188. package/dist/enum-C9ihxJe7.js +0 -4
  189. package/dist/enum-CTUzwCYG.js +0 -4
  190. package/dist/enum-DDKThkSw.js +0 -24
  191. package/dist/gangweijiekou-CV7cIo_W.js +0 -46
  192. package/dist/index-B6A3qFeU.js +0 -18585
  193. package/dist/index-BChMrCkZ.js +0 -399
  194. package/dist/index-BIUkDwk2.js +0 -465
  195. package/dist/index-BOEO9CRp.js +0 -7084
  196. package/dist/index-BgdW__IO.js +0 -125
  197. package/dist/index-Bi0fucZj.js +0 -871
  198. package/dist/index-Bj3Ee1l-.js +0 -177
  199. package/dist/index-Bzjxdd-F.js +0 -702
  200. package/dist/index-CF4XGkrK.js +0 -454
  201. package/dist/index-CGAa6YPO.js +0 -273
  202. package/dist/index-CK582XAz.js +0 -317
  203. package/dist/index-Ce9x4LEV.js +0 -633
  204. package/dist/index-CkVgkVvC.js +0 -461
  205. package/dist/index-D4uw6wJ9.js +0 -181
  206. package/dist/index-DFrT08M4.js +0 -388
  207. package/dist/index-Dju21Cnm.js +0 -140
  208. package/dist/index-Dmg39liA.js +0 -168
  209. package/dist/index-DvE43Xkt.js +0 -408
  210. package/dist/index-Dx3ZDeWT.js +0 -684
  211. package/dist/index-MmfEJgmm.js +0 -860
  212. package/dist/index-RBHLCaQ9.js +0 -1626
  213. package/dist/index-Y2jyqjVz.js +0 -303
  214. package/dist/index-b_92Syzh.js +0 -131
  215. package/dist/index-g5Fyla0r.js +0 -164
  216. package/dist/index-qdAiA-PA.js +0 -286
  217. package/dist/itemlist-Og2t8W5R.js +0 -368
  218. package/dist/jiaosejiekou-0xZkLzL_.js +0 -58
  219. package/dist/login_history-BJWFChQ3.js +0 -430
  220. package/dist/operate_history-C1NKnoB5.js +0 -468
  221. package/dist/pubJiaosezukongzhiqi-BlLcThHi.js +0 -57
  222. package/dist/setItem-BRseSui6.js +0 -152
  223. package/dist/shujuquanxianzhubiaokongzhiqi-3CpYi1Zo.js +0 -65
  224. package/dist/useAppAndResource-BF7jQTCi.js +0 -55
  225. package/dist/xitongpeizhifuwu-BIR2CVXp.js +0 -23
  226. package/dist/zidianfuwu-B137v_q7.js +0 -65
  227. package/dist/ziyuanjiekou-j9nd-oaF.js +0 -69
  228. package/dist/zuzhijiaosebiaokongzhiqi-DPbRg7Qd.js +0 -28
@@ -1,860 +0,0 @@
1
- import { Modal as De, Tabs as Ce, TabPane as Oe, CheckboxGroup as Pe, Tooltip as fe, Tag as Se, Button as pe, Drawer as Ee, Form as Fe, FormItem as Te, Input as $e, Select as Ge, Space as _e } from "ant-design-vue/es";
2
- import { PubinfoIcon as Ae } from "pubinfo";
3
- import { PlusCircleOutlined as Me } from "@ant-design/icons-vue";
4
- import { defineComponent as de, mergeModels as Ue, ref as v, computed as te, useModel as Ne, createBlock as R, openBlock as r, withCtx as n, createElementVNode as g, createVNode as l, unref as a, isRef as Z, createElementBlock as _, Fragment as B, renderList as ee, createTextVNode as P, toDisplayString as I, createCommentVNode as ae, resolveDirective as Le, withDirectives as re } from "vue";
5
- import { u as oe, p as Ve, _ as qe } from "./index-BOEO9CRp.js";
6
- import { g as Be, p as Ke, a as Ye, b as je, d as ze } from "./shujuquanxianzhubiaokongzhiqi-3CpYi1Zo.js";
7
- import { ProTable as Qe } from "@pubinfo/pro-components";
8
- import { message as ve, Modal as He } from "ant-design-vue";
9
- import { G as ue } from "./enum-DDKThkSw.js";
10
- import { _ as Je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- import { R as We } from "./enum-CTUzwCYG.js";
12
- import { u as Xe } from "./useAppAndResource-BF7jQTCi.js";
13
- import { _ as Ze } from "./index-BChMrCkZ.js";
14
- import { D as ie, a as ge, b as et, A as G } from "./enum-BEHz_Q18.js";
15
- const tt = { class: "h-340px border-1px border-solid flex flex-row border_color" }, at = { class: "w-360px" }, ot = { class: "flex-1 flex flex-col border-solid border-0px border-l-1px border_color" }, nt = { class: "flex-1 p-10px overflow-auto" }, st = /* @__PURE__ */ de({
16
- name: "GroupSelector",
17
- __name: "index",
18
- props: {
19
- open: { type: Boolean },
20
- openModifiers: {}
21
- },
22
- emits: /* @__PURE__ */ Ue(["select"], ["update:open"]),
23
- setup(ne, { expose: K, emit: L }) {
24
- const Y = L, S = v("OrgGroup"), w = te(() => S.value === "OrgGroup"), V = v([]), E = v([]), b = v([]), p = v([]), x = te(() => {
25
- const d = w.value ? V : E, o = w.value ? b : p;
26
- return d.value.filter((c) => o.value.includes(c.value));
27
- }), h = Ne(ne, "open"), F = oe(h);
28
- A();
29
- function A() {
30
- T(ue.ORG), T(ue.PER);
31
- }
32
- function T(d) {
33
- Ve({ type: d }).then((o) => {
34
- if (o && o.data && o.data.length) {
35
- const c = o.data.map((C) => {
36
- const { name: k = "", id: $ = "" } = C;
37
- return {
38
- label: k.length > 20 ? `${k.substring(0, 20)}...` : k,
39
- value: $,
40
- name: k,
41
- id: $
42
- };
43
- });
44
- d === ue.ORG ? V.value = c : E.value = c;
45
- }
46
- });
47
- }
48
- function y(d) {
49
- if (d && d.length) {
50
- const o = d.map((c) => c.value);
51
- w.value ? b.value = o : p.value = o;
52
- } else
53
- b.value = [], p.value = [];
54
- F(!0);
55
- }
56
- function m() {
57
- w.value ? D() : s();
58
- }
59
- function D() {
60
- b.value = [];
61
- }
62
- function s() {
63
- p.value = [];
64
- }
65
- function j(d) {
66
- const o = w.value ? b : p, c = o.value.findIndex((C) => C === d);
67
- c !== -1 && o.value.splice(c, 1);
68
- }
69
- function J() {
70
- Y("select", x.value), F(!1);
71
- }
72
- return K({
73
- open: y
74
- }), (d, o) => {
75
- const c = Pe, C = Oe, k = Ce, $ = Se, M = fe, W = pe, se = De;
76
- return r(), R(se, {
77
- open: h.value,
78
- "onUpdate:open": o[4] || (o[4] = (i) => h.value = i),
79
- class: "group-modal",
80
- title: "编辑群组",
81
- "mask-closable": !1,
82
- width: 750
83
- }, {
84
- footer: n(() => [
85
- l(W, {
86
- onClick: o[3] || (o[3] = (i) => a(F)(!1))
87
- }, {
88
- default: n(() => o[6] || (o[6] = [
89
- P(" 取消 ")
90
- ])),
91
- _: 1,
92
- __: [6]
93
- }),
94
- l(W, {
95
- type: "primary",
96
- onClick: J
97
- }, {
98
- default: n(() => o[7] || (o[7] = [
99
- P(" 确定 ")
100
- ])),
101
- _: 1,
102
- __: [7]
103
- })
104
- ]),
105
- default: n(() => [
106
- g("div", tt, [
107
- g("div", at, [
108
- l(k, {
109
- "active-key": a(S),
110
- "onUpdate:activeKey": o[2] || (o[2] = (i) => Z(S) ? S.value = i : null),
111
- class: "h-full overflow-hidden"
112
- }, {
113
- default: n(() => [
114
- l(C, {
115
- key: "OrgGroup",
116
- tab: "组织群组"
117
- }, {
118
- default: n(() => [
119
- l(c, {
120
- value: a(b),
121
- "onUpdate:value": o[0] || (o[0] = (i) => Z(b) ? b.value = i : null),
122
- options: a(V)
123
- }, null, 8, ["value", "options"])
124
- ]),
125
- _: 1
126
- /* STABLE */
127
- }),
128
- l(C, {
129
- key: "UserGroup",
130
- tab: "用户群组",
131
- "force-render": ""
132
- }, {
133
- default: n(() => [
134
- l(c, {
135
- value: a(p),
136
- "onUpdate:value": o[1] || (o[1] = (i) => Z(p) ? p.value = i : null),
137
- options: a(E)
138
- }, null, 8, ["value", "options"])
139
- ]),
140
- _: 1
141
- /* STABLE */
142
- })
143
- ]),
144
- _: 1
145
- /* STABLE */
146
- }, 8, ["active-key"])
147
- ]),
148
- g("div", ot, [
149
- g("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]" }, [
150
- o[5] || (o[5] = g(
151
- "div",
152
- { class: "" },
153
- " 已选群组 ",
154
- -1
155
- /* HOISTED */
156
- )),
157
- g("div", {
158
- class: "cursor-pointer text-[#165DFF]",
159
- onClick: m
160
- }, " 清空 ")
161
- ]),
162
- g("div", nt, [
163
- (r(!0), _(
164
- B,
165
- null,
166
- ee(a(x), (i) => (r(), _("div", {
167
- key: i.value,
168
- class: "inline-block mb-6px max-w-300px"
169
- }, [
170
- i.name && i.name.length > 20 ? (r(), R(M, {
171
- key: 0,
172
- title: i.name
173
- }, {
174
- default: n(() => [
175
- l($, {
176
- class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
177
- closable: "",
178
- onClose: (le) => j(i.value)
179
- }, {
180
- default: n(() => [
181
- P(
182
- I(i.label),
183
- 1
184
- /* TEXT */
185
- )
186
- ]),
187
- _: 2
188
- /* DYNAMIC */
189
- }, 1032, ["onClose"])
190
- ]),
191
- _: 2
192
- /* DYNAMIC */
193
- }, 1032, ["title"])) : (r(), R($, {
194
- key: 1,
195
- class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
196
- closable: "",
197
- onClose: (le) => j(i.value)
198
- }, {
199
- default: n(() => [
200
- P(
201
- I(i.label),
202
- 1
203
- /* TEXT */
204
- )
205
- ]),
206
- _: 2
207
- /* DYNAMIC */
208
- }, 1032, ["onClose"]))
209
- ]))),
210
- 128
211
- /* KEYED_FRAGMENT */
212
- ))
213
- ])
214
- ])
215
- ])
216
- ]),
217
- _: 1
218
- /* STABLE */
219
- }, 8, ["open"]);
220
- };
221
- }
222
- }), lt = /* @__PURE__ */ Je(st, [["__scopeId", "data-v-a9b7a52b"]]), rt = { class: "pt-10px" }, ut = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, it = {
223
- key: 1,
224
- class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
225
- }, pt = { class: "pt-10px" }, dt = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, ct = {
226
- key: 1,
227
- class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
228
- }, mt = { class: "pt-10px" }, ft = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, _t = {
229
- key: 1,
230
- class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
231
- }, vt = /* @__PURE__ */ de({
232
- name: "CreateAndEditDataPermission",
233
- __name: "createAndEditDataPermission",
234
- emits: ["submit"],
235
- setup(ne, { expose: K, emit: L }) {
236
- const Y = L, S = We.DATA_PERMISSION, {
237
- appList: w,
238
- resourceModelRef: V,
239
- selectedResources: E,
240
- getAppList: b,
241
- updateTreeDataAndResourceMap: p,
242
- setSelectedResources: x,
243
- updateSelectedResources: h,
244
- clearSelectedResources: F,
245
- openResourceModel: A
246
- } = Xe(S), T = v(""), y = {
247
- name: "",
248
- type: "",
249
- appId: "",
250
- orgIds: [],
251
- resourceIds: []
252
- }, m = v(), D = {
253
- name: [
254
- {
255
- required: !0,
256
- message: "请输入数据权限名称",
257
- trigger: ["blur", "change"]
258
- }
259
- ],
260
- type: [
261
- {
262
- required: !0,
263
- message: "请选择数据权限规则",
264
- trigger: ["blur", "change"]
265
- }
266
- ],
267
- appId: [{ required: !0, message: "请选择所属应用", trigger: ["blur", "change"] }],
268
- resourceIds: [{ type: "array", required: !0, message: "请选择资源", trigger: ["blur", "change"] }],
269
- orgIds: [{ type: "array", required: !0, message: "请选择部门", trigger: ["blur", "change"] }],
270
- groupIds: [{ type: "array", required: !0, message: "请选择群组", trigger: ["blur", "change"] }]
271
- }, s = v({
272
- ...y
273
- }), j = te(() => s.value.type === ie.CUSTOM_DEPT_AND_SUB || s.value.type === ie.CUSTOM_DEPT_ONLY), J = te(() => s.value.type === ie.CUSTOM_GROUP), d = v(!1), [o, c] = oe(!1), C = v(), k = v([]), $ = v(), M = v([]);
274
- b();
275
- async function W(u, t) {
276
- if (T.value = u, d.value = !1, s.value = { ...y }, F(), ye(), ke(), t) {
277
- d.value = !0;
278
- const f = await Be({ id: t == null ? void 0 : t.id });
279
- if (f.success && f.data) {
280
- const { id: O, type: X, name: q, appId: z, orgs: U, resources: Q, groups: N } = f.data;
281
- s.value = {
282
- id: O,
283
- type: X,
284
- appId: z,
285
- name: q || "",
286
- orgIds: U == null ? void 0 : U.map((e) => e.id || ""),
287
- resourceIds: Q == null ? void 0 : Q.map((e) => e.id || ""),
288
- groupIds: N == null ? void 0 : N.map((e) => e.id || "")
289
- }, U && U.length && (k.value = U.map((e) => ({
290
- orgId: e.id,
291
- orgName: e.name
292
- }))), N && N.length && (M.value = N.map((e) => ({
293
- id: e.id,
294
- name: e.name,
295
- value: e.id,
296
- label: e.name && e.name.length > 20 ? e.name.slice(0, 20) : e.name
297
- }))), await p(s.value.appId), s.value.resourceIds && h(s.value.resourceIds);
298
- }
299
- }
300
- c(!0);
301
- }
302
- function se(u) {
303
- s.value.resourceIds = [], E.value = [], u && p(u);
304
- }
305
- function i() {
306
- var u;
307
- (u = m.value) == null || u.validateFields(["appId"]).then(() => {
308
- s.value.appId && s.value.resourceIds && A(s.value.resourceIds);
309
- }).catch(() => {
310
- });
311
- }
312
- function le(u) {
313
- var t;
314
- x(u), u && u.length ? (s.value.resourceIds = u.map((f) => f.id), (t = m.value) == null || t.clearValidate(["resourceIds"])) : s.value.resourceIds = [];
315
- }
316
- function be() {
317
- C.value && C.value.open();
318
- }
319
- function xe() {
320
- $.value && $.value.open(M.value);
321
- }
322
- function ye() {
323
- k.value = [];
324
- }
325
- function ke() {
326
- M.value = [];
327
- }
328
- function Ie(u) {
329
- var t;
330
- k.value = u, u.length ? (s.value.orgIds = u.map((f) => f.orgId || ""), (t = m.value) == null || t.clearValidate(["orgIds"])) : s.value.orgIds = [];
331
- }
332
- function he(u) {
333
- var t;
334
- M.value = u, u.length ? (s.value.groupIds = u.map((f) => f.id || ""), (t = m.value) == null || t.clearValidate(["groupIds"])) : s.value.groupIds = [];
335
- }
336
- const [Re, ce] = oe(!1);
337
- function we() {
338
- var u;
339
- (u = m.value) == null || u.validate().then(() => {
340
- ce(!0);
341
- const t = d.value ? Ke : Ye, f = {
342
- ...s.value
343
- };
344
- j.value || delete f.orgIds, J.value || delete f.groupIds, t(f).then((O) => {
345
- O.success && (ve.success(`${T.value}成功!`), c(!1), Y("submit"));
346
- }).finally(() => ce(!1));
347
- });
348
- }
349
- function me() {
350
- c(!1);
351
- }
352
- return K({
353
- open: W
354
- }), (u, t) => {
355
- const f = $e, O = Te, X = Ge, q = pe, z = fe, U = Fe, Q = _e, N = Ee;
356
- return r(), R(N, {
357
- open: a(o),
358
- "onUpdate:open": t[4] || (t[4] = (e) => Z(o) ? o.value = e : null),
359
- title: `${a(T)}数据权限`,
360
- placement: "right",
361
- width: 600,
362
- "destroy-on-close": "",
363
- "footer-style": { textAlign: "right" },
364
- onClose: me
365
- }, {
366
- footer: n(() => [
367
- l(Q, null, {
368
- default: n(() => [
369
- l(q, { onClick: me }, {
370
- default: n(() => t[8] || (t[8] = [
371
- P(" 取消 ")
372
- ])),
373
- _: 1,
374
- __: [8]
375
- }),
376
- l(q, {
377
- type: "primary",
378
- loading: a(Re),
379
- onClick: t[3] || (t[3] = (e) => we())
380
- }, {
381
- default: n(() => t[9] || (t[9] = [
382
- P(" 提交 ")
383
- ])),
384
- _: 1,
385
- __: [9]
386
- }, 8, ["loading"])
387
- ]),
388
- _: 1
389
- /* STABLE */
390
- })
391
- ]),
392
- default: n(() => [
393
- l(U, {
394
- ref_key: "formRef",
395
- ref: m,
396
- model: a(s),
397
- rules: D,
398
- "label-col": { span: 6 }
399
- }, {
400
- default: n(() => [
401
- l(O, {
402
- label: "数据权限名称",
403
- name: "name"
404
- }, {
405
- default: n(() => [
406
- l(f, {
407
- value: a(s).name,
408
- "onUpdate:value": t[0] || (t[0] = (e) => a(s).name = e),
409
- maxlength: 20
410
- }, null, 8, ["value"])
411
- ]),
412
- _: 1
413
- /* STABLE */
414
- }),
415
- l(O, {
416
- label: "数据权限规则",
417
- name: "type"
418
- }, {
419
- default: n(() => [
420
- l(X, {
421
- value: a(s).type,
422
- "onUpdate:value": t[1] || (t[1] = (e) => a(s).type = e),
423
- options: a(ge),
424
- placeholder: "请选择"
425
- }, null, 8, ["value", "options"])
426
- ]),
427
- _: 1
428
- /* STABLE */
429
- }),
430
- l(O, {
431
- label: "所属应用",
432
- name: "appId"
433
- }, {
434
- default: n(() => [
435
- l(X, {
436
- value: a(s).appId,
437
- "onUpdate:value": t[2] || (t[2] = (e) => a(s).appId = e),
438
- disabled: a(d),
439
- options: a(w),
440
- onChange: se
441
- }, null, 8, ["value", "disabled", "options"])
442
- ]),
443
- _: 1
444
- /* STABLE */
445
- }),
446
- l(O, {
447
- label: "所属资源",
448
- name: "resourceIds"
449
- }, {
450
- default: n(() => [
451
- l(q, {
452
- type: "primary",
453
- onClick: i
454
- }, {
455
- default: n(() => t[5] || (t[5] = [
456
- P(" 编辑资源 ")
457
- ])),
458
- _: 1,
459
- __: [5]
460
- }),
461
- g("div", rt, [
462
- (r(!0), _(
463
- B,
464
- null,
465
- ee(a(E), (e) => (r(), _(
466
- B,
467
- { key: e },
468
- [
469
- e.name.length > 20 ? (r(), R(z, {
470
- key: 0,
471
- title: e.name
472
- }, {
473
- default: n(() => [
474
- g(
475
- "span",
476
- ut,
477
- I(`${e.name.slice(0, 20)}...`),
478
- 1
479
- /* TEXT */
480
- )
481
- ]),
482
- _: 2
483
- /* DYNAMIC */
484
- }, 1032, ["title"])) : (r(), _(
485
- "span",
486
- it,
487
- I(e.name),
488
- 1
489
- /* TEXT */
490
- ))
491
- ],
492
- 64
493
- /* STABLE_FRAGMENT */
494
- ))),
495
- 128
496
- /* KEYED_FRAGMENT */
497
- ))
498
- ])
499
- ]),
500
- _: 1
501
- /* STABLE */
502
- }),
503
- a(j) ? (r(), R(O, {
504
- key: 0,
505
- label: "所属部门",
506
- name: "orgIds"
507
- }, {
508
- default: n(() => [
509
- l(q, {
510
- type: "primary",
511
- onClick: be
512
- }, {
513
- default: n(() => t[6] || (t[6] = [
514
- P(" 编辑部门 ")
515
- ])),
516
- _: 1,
517
- __: [6]
518
- }),
519
- g("div", pt, [
520
- (r(!0), _(
521
- B,
522
- null,
523
- ee(a(k), (e) => (r(), _(
524
- B,
525
- { key: e },
526
- [
527
- e.orgName && e.orgName.length > 20 ? (r(), R(z, {
528
- key: 0,
529
- title: e.orgName
530
- }, {
531
- default: n(() => {
532
- var H;
533
- return [
534
- g(
535
- "span",
536
- dt,
537
- I(`${(H = e.orgName) == null ? void 0 : H.slice(0, 20)}...`),
538
- 1
539
- /* TEXT */
540
- )
541
- ];
542
- }),
543
- _: 2
544
- /* DYNAMIC */
545
- }, 1032, ["title"])) : (r(), _(
546
- "span",
547
- ct,
548
- I(e.orgName),
549
- 1
550
- /* TEXT */
551
- ))
552
- ],
553
- 64
554
- /* STABLE_FRAGMENT */
555
- ))),
556
- 128
557
- /* KEYED_FRAGMENT */
558
- ))
559
- ])
560
- ]),
561
- _: 1
562
- /* STABLE */
563
- })) : ae("v-if", !0),
564
- a(J) ? (r(), R(O, {
565
- key: 1,
566
- label: "所属群组",
567
- name: "groupIds"
568
- }, {
569
- default: n(() => [
570
- l(q, {
571
- type: "primary",
572
- onClick: xe
573
- }, {
574
- default: n(() => t[7] || (t[7] = [
575
- P(" 编辑群组 ")
576
- ])),
577
- _: 1,
578
- __: [7]
579
- }),
580
- g("div", mt, [
581
- (r(!0), _(
582
- B,
583
- null,
584
- ee(a(M), (e) => (r(), _(
585
- B,
586
- { key: e },
587
- [
588
- e.name && e.name.length > 20 ? (r(), R(z, {
589
- key: 0,
590
- title: e.name
591
- }, {
592
- default: n(() => {
593
- var H;
594
- return [
595
- g(
596
- "span",
597
- ft,
598
- I(`${(H = e.name) == null ? void 0 : H.slice(0, 20)}...`),
599
- 1
600
- /* TEXT */
601
- )
602
- ];
603
- }),
604
- _: 2
605
- /* DYNAMIC */
606
- }, 1032, ["title"])) : (r(), _(
607
- "span",
608
- _t,
609
- I(e.name),
610
- 1
611
- /* TEXT */
612
- ))
613
- ],
614
- 64
615
- /* STABLE_FRAGMENT */
616
- ))),
617
- 128
618
- /* KEYED_FRAGMENT */
619
- ))
620
- ])
621
- ]),
622
- _: 1
623
- /* STABLE */
624
- })) : ae("v-if", !0)
625
- ]),
626
- _: 1
627
- /* STABLE */
628
- }, 8, ["model"]),
629
- l(qe, {
630
- ref_key: "orgRef",
631
- ref: C,
632
- "model-value": a(k),
633
- multiple: "",
634
- onSubmit: Ie
635
- }, null, 8, ["model-value"]),
636
- l(Ze, {
637
- ref_key: "resourceModelRef",
638
- ref: V,
639
- mode: a(S),
640
- onSelect: le
641
- }, null, 8, ["mode"]),
642
- l(
643
- lt,
644
- {
645
- ref_key: "groupRef",
646
- ref: $,
647
- onSelect: he
648
- },
649
- null,
650
- 512
651
- /* NEED_PATCH */
652
- )
653
- ]),
654
- _: 1
655
- /* STABLE */
656
- }, 8, ["open", "title"]);
657
- };
658
- }
659
- }), gt = {
660
- "w-full": "",
661
- "h-full": "",
662
- "py-10px": "",
663
- "px-10px": "",
664
- flex: "",
665
- "flex-col": "",
666
- class: "page-data-permission"
667
- }, bt = {
668
- key: 0
669
- }, xt = ["onClick"], yt = {
670
- class: "ml-4px"
671
- }, kt = ["onClick"], It = {
672
- class: "ml-4px"
673
- }, Mt = /* @__PURE__ */ de({
674
- name: "DataPermission",
675
- __name: "index",
676
- setup(ne) {
677
- const K = v(), L = v(), Y = [{
678
- valueType: "a-input",
679
- title: "数据权限名称",
680
- dataIndex: "name",
681
- fieldProps: {
682
- placeholder: "请输入",
683
- allowClear: !0
684
- }
685
- }, {
686
- valueType: "a-select",
687
- title: "数据权限规则",
688
- dataIndex: "type",
689
- fieldProps: {
690
- placeholder: "请选择",
691
- allowClear: !0,
692
- options: ge
693
- },
694
- ellipsis: !0
695
- }, {
696
- hideInSearch: !0,
697
- title: "创建时间",
698
- dataIndex: "createTime",
699
- ellipsis: !0
700
- }, {
701
- hideInSearch: !0,
702
- title: "更新时间",
703
- dataIndex: "updateTime",
704
- ellipsis: !0
705
- }, {
706
- hideInSearch: !0,
707
- title: "操作",
708
- dataIndex: "action",
709
- width: 200,
710
- fixed: "right"
711
- }];
712
- async function S(p) {
713
- var m, D;
714
- const {
715
- current: x,
716
- pageSize: h,
717
- type: F,
718
- name: A
719
- } = p, y = await je({
720
- pageSize: h,
721
- currentPage: x,
722
- doSearchTotal: !0,
723
- type: F,
724
- name: A
725
- });
726
- return {
727
- success: y.success,
728
- data: ((m = y.data) == null ? void 0 : m.records) ?? [],
729
- total: ((D = y.data) == null ? void 0 : D.total) ?? 0
730
- };
731
- }
732
- function w() {
733
- K.value.reload();
734
- }
735
- const [V, E] = oe(!1);
736
- function b(p, x) {
737
- if (!V.value)
738
- switch (p) {
739
- case G.ADD:
740
- L.value.open(p);
741
- break;
742
- case G.EDIT:
743
- L.value.open(p, x);
744
- break;
745
- case G.REMOVE:
746
- He.confirm({
747
- title: "删除",
748
- content: "确定要删除该权限吗?",
749
- async onOk() {
750
- E(!0), ze({
751
- id: x == null ? void 0 : x.id
752
- }).then((h) => {
753
- h.success && (ve.success("删除成功"), w());
754
- }).finally(() => E(!1));
755
- }
756
- });
757
- break;
758
- }
759
- }
760
- return (p, x) => {
761
- const h = Me, F = pe, A = Ae, T = _e, y = Le("auth");
762
- return r(), _("div", gt, [l(
763
- a(Qe),
764
- {
765
- ref_key: "tableRef",
766
- ref: K,
767
- "row-key": "id",
768
- request: S,
769
- columns: Y,
770
- "auto-height": "",
771
- scroll: {
772
- x: 1e3
773
- }
774
- },
775
- {
776
- toolbar: n(() => [re((r(), R(F, {
777
- type: "primary",
778
- onClick: x[0] || (x[0] = (m) => b(a(G).ADD))
779
- }, {
780
- default: n(() => [l(h), P(
781
- " " + I(a(G).ADD),
782
- 1
783
- /* TEXT */
784
- )]),
785
- _: 1
786
- /* STABLE */
787
- })), [[y, "data_permission_create"]])]),
788
- bodyCell: n(({
789
- column: m,
790
- record: D
791
- }) => [m.dataIndex === "type" ? (r(), _(
792
- "span",
793
- bt,
794
- I(a(et)[D.type]),
795
- 1
796
- /* TEXT */
797
- )) : ae("v-if", !0), m.dataIndex === "action" ? (r(), R(
798
- T,
799
- {
800
- key: 1
801
- },
802
- {
803
- default: n(() => [re((r(), _("a", {
804
- class: "flex items-center hover:opacity-80",
805
- onClick: (s) => b(a(G).EDIT, D)
806
- }, [l(A, {
807
- name: "edit",
808
- class: "text-base"
809
- }), g(
810
- "span",
811
- yt,
812
- I(a(G).EDIT),
813
- 1
814
- /* TEXT */
815
- )], 8, xt)), [[y, "data_permission_edit"]]), re((r(), _("a", {
816
- flex: "",
817
- "items-center": "",
818
- "text-red-500": "",
819
- "hover:cursor-pointer": "",
820
- "hover:text-red-500": "",
821
- "hover:opacity-80": "",
822
- onClick: (s) => b(a(G).REMOVE, D)
823
- }, [l(A, {
824
- name: "remove",
825
- class: "text-base"
826
- }), g(
827
- "span",
828
- It,
829
- I(a(G).REMOVE),
830
- 1
831
- /* TEXT */
832
- )], 8, kt)), [[y, "data_permission_delete"]])]),
833
- _: 2
834
- /* DYNAMIC */
835
- },
836
- 1024
837
- /* DYNAMIC_SLOTS */
838
- )) : ae("v-if", !0)]),
839
- _: 1
840
- /* STABLE */
841
- },
842
- 512
843
- /* NEED_PATCH */
844
- ), l(
845
- vt,
846
- {
847
- ref_key: "drawerRef",
848
- ref: L,
849
- onSubmit: w
850
- },
851
- null,
852
- 512
853
- /* NEED_PATCH */
854
- )]);
855
- };
856
- }
857
- });
858
- export {
859
- Mt as default
860
- };