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