@pubinfo/module-rbac 2.0.0-beta.31 → 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,684 +0,0 @@
1
- import { Modal as ne, Input as H, Spin as le, CheckboxGroup as ae, Checkbox as se, Tooltip as J, Tag as re, Button as L, Drawer as ue, Form as ie, FormItem as ce, Switch as de, Textarea as pe, Space as X } from "ant-design-vue/es";
2
- import { useAuth as fe, PubinfoIcon as _e } from "pubinfo";
3
- import { SearchOutlined as me, PlusCircleOutlined as ve } from "@ant-design/icons-vue";
4
- import { defineComponent as z, mergeModels as xe, ref as k, useModel as be, watch as ge, createBlock as E, openBlock as r, withCtx as l, createElementVNode as p, toDisplayString as h, unref as a, createVNode as n, isRef as q, createCommentVNode as Y, createElementBlock as y, Fragment as G, renderList as N, createTextVNode as $, reactive as he, resolveDirective as ke, withDirectives as W } from "vue";
5
- import { u as j } from "./index-BOEO9CRp.js";
6
- import { g as ye, p as we, a as Re, b as Ie, d as Ce } from "./pubJiaosezukongzhiqi-BlLcThHi.js";
7
- import { ProTable as De } from "@pubinfo/pro-components";
8
- import { message as Z, Badge as Q, Modal as Ee } from "ant-design-vue";
9
- import { e as $e } from "./jiaosejiekou-0xZkLzL_.js";
10
- import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- var x = /* @__PURE__ */ ((I) => (I.ADD = "新增", I.EDIT = "修改", I.REMOVE = "删除", I.RESOURCE_RELATION = "分配查看", I))(x || {});
12
- const Se = { class: "h-340px border-1px border-solid flex flex-row border_color" }, Pe = { class: "w-360px flex flex-col" }, Te = { class: "w-full h-34px bg-[#F2F3F5] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#1D2129] dark:text-[#F2F3F5]" }, Me = { class: "flex-1 overflow-hidden py-10px px-10px" }, Oe = { class: "overflow-y-auto overflow-x-hidden h-[calc(100%-30px)] mt-10px" }, Ue = { key: 1 }, Ve = { class: "flex-1 flex flex-col border-solid border-0px border-l-1px border_color" }, Be = { class: "flex-1 p-10px overflow-auto" }, Ge = /* @__PURE__ */ z({
13
- name: "RoleSelect",
14
- __name: "roleSelect",
15
- props: {
16
- open: { type: Boolean },
17
- openModifiers: {}
18
- },
19
- emits: /* @__PURE__ */ xe(["select"], ["update:open"]),
20
- setup(I, { expose: U, emit: O }) {
21
- const T = O, F = k(!1), _ = k([]), w = k([]), v = k([]), c = k(""), u = be(I, "open"), s = j(u);
22
- ge(() => _.value, (f) => {
23
- w.value = f.reduce((e, M) => {
24
- const V = v.value.find((d) => d.id === M) || {};
25
- return e.push(V), e;
26
- }, []);
27
- }, { deep: !0 });
28
- async function b(f) {
29
- F.value = !0;
30
- const e = await $e();
31
- F.value = !1, v.value = e.data || [], _.value = [...f], s(!0);
32
- }
33
- function R() {
34
- _.value = [];
35
- }
36
- function C(f) {
37
- const e = _.value.findIndex((M) => M === f);
38
- e >= 0 && _.value.splice(e, 1);
39
- }
40
- function g() {
41
- T("select", w.value), s(!1);
42
- }
43
- function S() {
44
- return v.value.filter((f) => {
45
- var e;
46
- return (e = f.name) == null ? void 0 : e.includes(c.value);
47
- });
48
- }
49
- return U({
50
- open: b
51
- }), (f, e) => {
52
- const M = H, V = le, d = J, t = se, P = ae, m = re, B = L, A = ne;
53
- return r(), E(A, {
54
- open: u.value,
55
- "onUpdate:open": e[3] || (e[3] = (o) => u.value = o),
56
- class: "custom_modal",
57
- title: "角色选择",
58
- "mask-closable": !1,
59
- width: 750
60
- }, {
61
- footer: l(() => [
62
- n(B, {
63
- onClick: e[2] || (e[2] = (o) => a(s)(!1))
64
- }, {
65
- default: l(() => e[6] || (e[6] = [
66
- $(" 取消 ")
67
- ])),
68
- _: 1,
69
- __: [6]
70
- }),
71
- n(B, {
72
- type: "primary",
73
- onClick: g
74
- }, {
75
- default: l(() => e[7] || (e[7] = [
76
- $(" 确定 ")
77
- ])),
78
- _: 1,
79
- __: [7]
80
- })
81
- ]),
82
- default: l(() => [
83
- p("div", Se, [
84
- p("div", Pe, [
85
- p("div", Te, [
86
- e[4] || (e[4] = p(
87
- "div",
88
- { class: "" },
89
- " 全部角色 ",
90
- -1
91
- /* HOISTED */
92
- )),
93
- p(
94
- "div",
95
- null,
96
- h(a(_).length) + "/" + h(a(v).length),
97
- 1
98
- /* TEXT */
99
- )
100
- ]),
101
- p("div", Me, [
102
- n(M, {
103
- value: a(c),
104
- "onUpdate:value": e[0] || (e[0] = (o) => q(c) ? c.value = o : null),
105
- placeholder: "请输入",
106
- "allow-clear": "",
107
- onChange: S
108
- }, {
109
- prefix: l(() => [
110
- n(a(me))
111
- ]),
112
- _: 1
113
- /* STABLE */
114
- }, 8, ["value"]),
115
- p("div", Oe, [
116
- a(F) ? (r(), E(V, { key: 0 })) : Y("v-if", !0),
117
- n(P, {
118
- value: a(_),
119
- "onUpdate:value": e[1] || (e[1] = (o) => q(_) ? _.value = o : null)
120
- }, {
121
- default: l(() => [
122
- (r(!0), y(
123
- G,
124
- null,
125
- N(S(), (o) => (r(), y("div", {
126
- key: o.id,
127
- class: "w-full py-10px bodb"
128
- }, [
129
- n(t, {
130
- value: o.id
131
- }, {
132
- default: l(() => [
133
- (o.name || "").length > 22 ? (r(), E(d, {
134
- key: 0,
135
- title: o.name
136
- }, {
137
- default: l(() => {
138
- var D;
139
- return [
140
- $(
141
- h(`${(D = o == null ? void 0 : o.name) == null ? void 0 : D.slice(0, 22)}...`),
142
- 1
143
- /* TEXT */
144
- )
145
- ];
146
- }),
147
- _: 2
148
- /* DYNAMIC */
149
- }, 1032, ["title"])) : (r(), y(
150
- "span",
151
- Ue,
152
- h(o.name),
153
- 1
154
- /* TEXT */
155
- ))
156
- ]),
157
- _: 2
158
- /* DYNAMIC */
159
- }, 1032, ["value"])
160
- ]))),
161
- 128
162
- /* KEYED_FRAGMENT */
163
- ))
164
- ]),
165
- _: 1
166
- /* STABLE */
167
- }, 8, ["value"])
168
- ])
169
- ])
170
- ]),
171
- p("div", Ve, [
172
- p("div", { class: "w-full h-34px bg-[#F2F3F5] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#1D2129] dark:text-[#F2F3F5]" }, [
173
- e[5] || (e[5] = p(
174
- "div",
175
- { class: "" },
176
- " 已选角色 ",
177
- -1
178
- /* HOISTED */
179
- )),
180
- p("div", {
181
- class: "cursor-pointer text-[#165DFF]",
182
- onClick: R
183
- }, " 清空 ")
184
- ]),
185
- p("div", Be, [
186
- (r(!0), y(
187
- G,
188
- null,
189
- N(a(w), (o) => (r(), y("div", {
190
- key: o.id,
191
- class: "inline-block mb-6px max-w-300px"
192
- }, [
193
- (o.name || "").length > 20 ? (r(), E(d, {
194
- key: 0,
195
- title: o.name
196
- }, {
197
- default: l(() => [
198
- n(m, {
199
- class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
200
- closable: "",
201
- onClose: (D) => C(o.id || "")
202
- }, {
203
- default: l(() => {
204
- var D;
205
- return [
206
- $(
207
- h(`${(D = o == null ? void 0 : o.name) == null ? void 0 : D.slice(0, 20)}...`),
208
- 1
209
- /* TEXT */
210
- )
211
- ];
212
- }),
213
- _: 2
214
- /* DYNAMIC */
215
- }, 1032, ["onClose"])
216
- ]),
217
- _: 2
218
- /* DYNAMIC */
219
- }, 1032, ["title"])) : (r(), E(m, {
220
- key: 1,
221
- class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
222
- closable: "",
223
- onClose: (D) => C(o.id || "")
224
- }, {
225
- default: l(() => [
226
- $(
227
- h(o.name),
228
- 1
229
- /* TEXT */
230
- )
231
- ]),
232
- _: 2
233
- /* DYNAMIC */
234
- }, 1032, ["onClose"]))
235
- ]))),
236
- 128
237
- /* KEYED_FRAGMENT */
238
- ))
239
- ])
240
- ])
241
- ])
242
- ]),
243
- _: 1
244
- /* STABLE */
245
- }, 8, ["open"]);
246
- };
247
- }
248
- }), Ae = /* @__PURE__ */ Fe(Ge, [["__scopeId", "data-v-3273a107"]]), We = { class: "pt-10px" }, qe = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, Ne = {
249
- key: 1,
250
- class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
251
- }, je = /* @__PURE__ */ z({
252
- name: "DrawerRoleGroup",
253
- __name: "drawerRole",
254
- emits: ["submit"],
255
- setup(I, { expose: U, emit: O }) {
256
- const T = O, F = {
257
- name: [
258
- { required: !0, message: "请输入名称", trigger: "blur" },
259
- { min: 2, max: 32, message: "角色组名称长度不能少于2位,不能超过32位", trigger: "change" }
260
- ],
261
- roleIds: [{ required: !0, validator: _, trigger: ["blur", "change"] }]
262
- };
263
- function _(d, t) {
264
- return t && t.length > 0 ? Promise.resolve() : Promise.reject(new Error("请选择角色"));
265
- }
266
- const w = he({
267
- title: ""
268
- }), [v, c] = j(!1), u = k(), s = k({ enable: !0 }), b = k([]);
269
- async function R(d, t) {
270
- var P;
271
- if (w.title = d, d === x.EDIT) {
272
- const m = await ye({ id: t == null ? void 0 : t.id });
273
- m.success && (s.value = m.data ?? {}, b.value = ((P = m.data) == null ? void 0 : P.roles) || []);
274
- } else
275
- s.value = {
276
- enable: !0
277
- }, b.value = [];
278
- c(!0);
279
- }
280
- const [C, g] = j(!1);
281
- function S() {
282
- var t;
283
- const d = w.title === x.EDIT ? we : Re;
284
- (t = u.value) == null || t.validate().then(() => {
285
- g(!0);
286
- const P = { ...s.value };
287
- d(P).then((m) => {
288
- m.success && (Z.success(`${w.title}成功!`), c(!1), T("submit"));
289
- }).finally(() => g(!1));
290
- });
291
- }
292
- function f() {
293
- s.value = {
294
- enable: !0
295
- }, c(!1);
296
- }
297
- const e = k();
298
- function M() {
299
- e.value.open(b.value.map((d) => d.id));
300
- }
301
- function V(d) {
302
- s.value.roleIds = d.map((t) => t.id).join(","), b.value = d;
303
- }
304
- return U({
305
- open: R
306
- }), (d, t) => {
307
- const P = H, m = ce, B = de, A = pe, o = L, D = J, ee = ie, te = X, oe = ue;
308
- return r(), E(oe, {
309
- open: a(v),
310
- "onUpdate:open": t[4] || (t[4] = (i) => q(v) ? v.value = i : null),
311
- title: `${a(w).title}角色组`,
312
- placement: "right",
313
- width: 600,
314
- "destroy-on-close": "",
315
- "footer-style": { textAlign: "right" },
316
- onClose: f
317
- }, {
318
- footer: l(() => [
319
- n(te, null, {
320
- default: l(() => [
321
- n(o, { onClick: f }, {
322
- default: l(() => t[6] || (t[6] = [
323
- $(" 取消 ")
324
- ])),
325
- _: 1,
326
- __: [6]
327
- }),
328
- n(o, {
329
- type: "primary",
330
- loading: a(C),
331
- onClick: t[3] || (t[3] = (i) => S())
332
- }, {
333
- default: l(() => t[7] || (t[7] = [
334
- $(" 提交 ")
335
- ])),
336
- _: 1,
337
- __: [7]
338
- }, 8, ["loading"])
339
- ]),
340
- _: 1
341
- /* STABLE */
342
- })
343
- ]),
344
- default: l(() => [
345
- n(ee, {
346
- ref_key: "formRef",
347
- ref: u,
348
- model: a(s),
349
- rules: F,
350
- "label-col": { span: 4 }
351
- }, {
352
- default: l(() => [
353
- n(m, {
354
- label: "角色组名称",
355
- name: "name"
356
- }, {
357
- default: l(() => [
358
- n(P, {
359
- value: a(s).name,
360
- "onUpdate:value": t[0] || (t[0] = (i) => a(s).name = i),
361
- maxlength: 32
362
- }, null, 8, ["value"])
363
- ]),
364
- _: 1
365
- /* STABLE */
366
- }),
367
- n(m, { label: "是否启用" }, {
368
- default: l(() => [
369
- n(B, {
370
- checked: a(s).enable,
371
- "onUpdate:checked": t[1] || (t[1] = (i) => a(s).enable = i)
372
- }, null, 8, ["checked"])
373
- ]),
374
- _: 1
375
- /* STABLE */
376
- }),
377
- n(m, { label: "角色组描述" }, {
378
- default: l(() => [
379
- n(A, {
380
- value: a(s).description,
381
- "onUpdate:value": t[2] || (t[2] = (i) => a(s).description = i),
382
- maxlength: 250,
383
- "show-count": ""
384
- }, null, 8, ["value"])
385
- ]),
386
- _: 1
387
- /* STABLE */
388
- }),
389
- n(m, {
390
- label: "所属角色",
391
- name: "roleIds"
392
- }, {
393
- default: l(() => [
394
- n(o, {
395
- type: "primary",
396
- onClick: M
397
- }, {
398
- default: l(() => t[5] || (t[5] = [
399
- $(" 编辑角色 ")
400
- ])),
401
- _: 1,
402
- __: [5]
403
- }),
404
- p("div", We, [
405
- (r(!0), y(
406
- G,
407
- null,
408
- N(a(b), (i) => (r(), y(
409
- G,
410
- { key: i },
411
- [
412
- ((i == null ? void 0 : i.name) || "").length > 20 ? (r(), E(D, {
413
- key: 0,
414
- title: i.name
415
- }, {
416
- default: l(() => {
417
- var K;
418
- return [
419
- p(
420
- "span",
421
- qe,
422
- h(`${(K = i == null ? void 0 : i.name) == null ? void 0 : K.slice(0, 20)}...`),
423
- 1
424
- /* TEXT */
425
- )
426
- ];
427
- }),
428
- _: 2
429
- /* DYNAMIC */
430
- }, 1032, ["title"])) : (r(), y(
431
- "span",
432
- Ne,
433
- h(i.name),
434
- 1
435
- /* TEXT */
436
- ))
437
- ],
438
- 64
439
- /* STABLE_FRAGMENT */
440
- ))),
441
- 128
442
- /* KEYED_FRAGMENT */
443
- ))
444
- ])
445
- ]),
446
- _: 1
447
- /* STABLE */
448
- })
449
- ]),
450
- _: 1
451
- /* STABLE */
452
- }, 8, ["model"]),
453
- n(
454
- Ae,
455
- {
456
- ref_key: "roleModelRef",
457
- ref: e,
458
- onSelect: V
459
- },
460
- null,
461
- 512
462
- /* NEED_PATCH */
463
- )
464
- ]),
465
- _: 1
466
- /* STABLE */
467
- }, 8, ["open", "title"]);
468
- };
469
- }
470
- }), Le = {
471
- "py-10px": "",
472
- "px-10px": "",
473
- "w-full": "",
474
- "h-full": ""
475
- }, ze = ["onClick"], Ke = {
476
- class: "ml-4px"
477
- }, Qe = ["onClick"], He = {
478
- class: "ml-4px"
479
- }, st = /* @__PURE__ */ z({
480
- name: "Role",
481
- __name: "index",
482
- setup(I) {
483
- const {
484
- auth: U
485
- } = fe(), O = k(), T = k();
486
- function F() {
487
- O.value.reload();
488
- }
489
- async function _(c) {
490
- var C, g;
491
- const {
492
- current: u,
493
- pageSize: s,
494
- ...b
495
- } = c, R = await Ie({
496
- currentPage: u,
497
- pageSize: s,
498
- ...b
499
- });
500
- return {
501
- success: R.success,
502
- data: ((C = R.data) == null ? void 0 : C.records) ?? [],
503
- total: ((g = R.data) == null ? void 0 : g.total) ?? 0
504
- };
505
- }
506
- const w = [{
507
- valueType: "a-input",
508
- bind: "value",
509
- minWidth: 200,
510
- title: "角色组名称",
511
- dataIndex: "name",
512
- ellipsis: !0,
513
- fieldProps: {
514
- placeholder: "请输入角色组名称",
515
- allowClear: !0
516
- }
517
- }, {
518
- hideInSearch: !0,
519
- minWidth: 80,
520
- title: "创建人",
521
- dataIndex: "createUserName"
522
- }, {
523
- hideInSearch: !0,
524
- minWidth: 100,
525
- title: "创建部门",
526
- dataIndex: "createOrgName"
527
- }, {
528
- hideInSearch: !0,
529
- minWidth: 100,
530
- title: "创建时间",
531
- dataIndex: "createTime"
532
- }, {
533
- hideInSearch: !0,
534
- minWidth: 100,
535
- title: "修改时间",
536
- dataIndex: "updateTime"
537
- }, {
538
- valueType: "a-select",
539
- minWidth: 80,
540
- title: "角色组状态",
541
- dataIndex: "enable",
542
- customRender: ({
543
- text: c
544
- }) => c ? n(Q, {
545
- status: "success",
546
- text: "正常"
547
- }, null) : n(Q, {
548
- status: "error",
549
- text: "关闭"
550
- }, null),
551
- fieldProps: {
552
- placeholder: "请选择是否启用",
553
- allowClear: !0,
554
- options: [{
555
- value: 1,
556
- label: "正常"
557
- }, {
558
- value: 0,
559
- label: "关闭"
560
- }]
561
- }
562
- }, {
563
- hideInSearch: !0,
564
- width: 140,
565
- title: "操作",
566
- dataIndex: "action",
567
- fixed: "right",
568
- hideInTable() {
569
- return !U(["role_group_edit", "role_group_remove"]);
570
- }
571
- }];
572
- function v(c, u) {
573
- switch (c) {
574
- case x.EDIT:
575
- T.value.open(c, u);
576
- break;
577
- case x.ADD:
578
- T.value.open(c);
579
- break;
580
- case x.REMOVE:
581
- Ee.confirm({
582
- title: "删除",
583
- content: "确定要删除该角色组吗?",
584
- onOk() {
585
- Ce({
586
- id: u == null ? void 0 : u.id
587
- }).then((s) => {
588
- s.success && (Z.success("删除成功"), F());
589
- });
590
- }
591
- });
592
- break;
593
- }
594
- }
595
- return (c, u) => {
596
- const s = ve, b = L, R = _e, C = X, g = ke("auth");
597
- return r(), y("div", Le, [n(
598
- a(De),
599
- {
600
- ref_key: "tableRef",
601
- ref: O,
602
- "row-key": "id",
603
- request: _,
604
- columns: w,
605
- "auto-height": "",
606
- scroll: {
607
- x: 1100
608
- }
609
- },
610
- {
611
- toolbar: l(() => [W((r(), E(b, {
612
- type: "primary",
613
- onClick: u[0] || (u[0] = (S) => v(a(x).ADD))
614
- }, {
615
- default: l(() => [n(s), $(
616
- " " + h(a(x).ADD),
617
- 1
618
- /* TEXT */
619
- )]),
620
- _: 1
621
- /* STABLE */
622
- })), [[g, "role_group_add"]])]),
623
- bodyCell: l(({
624
- column: S,
625
- record: f
626
- }) => [S.dataIndex === "action" ? (r(), E(
627
- C,
628
- {
629
- key: 0
630
- },
631
- {
632
- default: l(() => [W((r(), y("a", {
633
- class: "flex items-center",
634
- onClick: (e) => v(a(x).EDIT, f)
635
- }, [n(R, {
636
- name: "edit",
637
- class: "text-base"
638
- }), p(
639
- "span",
640
- Ke,
641
- h(a(x).EDIT),
642
- 1
643
- /* TEXT */
644
- )], 8, ze)), [[g, "role_edit"]]), W((r(), y("span", {
645
- class: "flex items-center text-red-500 hover:cursor-pointer hover:opacity-80",
646
- onClick: (e) => v(a(x).REMOVE, f)
647
- }, [n(R, {
648
- name: "remove",
649
- class: "text-base"
650
- }), p(
651
- "span",
652
- He,
653
- h(a(x).REMOVE),
654
- 1
655
- /* TEXT */
656
- )], 8, Qe)), [[g, "role_remove"]])]),
657
- _: 2
658
- /* DYNAMIC */
659
- },
660
- 1024
661
- /* DYNAMIC_SLOTS */
662
- )) : Y("v-if", !0)]),
663
- _: 1
664
- /* STABLE */
665
- },
666
- 512
667
- /* NEED_PATCH */
668
- ), n(
669
- je,
670
- {
671
- ref_key: "drawerRoleRef",
672
- ref: T,
673
- onSubmit: u[1] || (u[1] = (S) => F())
674
- },
675
- null,
676
- 512
677
- /* NEED_PATCH */
678
- )]);
679
- };
680
- }
681
- });
682
- export {
683
- st as default
684
- };