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

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 (212) hide show
  1. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  2. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  3. package/dist/animation_item.vue_vue_type_script_setup_true_lang-efL_vjfY.js +4864 -0
  4. package/dist/api/modules/assist/gonggaofuwu.d.ts +43 -0
  5. package/dist/api/modules/assist/index.d.ts +3 -0
  6. package/dist/api/modules/assist/qunzujiekou.d.ts +36 -0
  7. package/dist/api/modules/assist/quyujiekou.d.ts +36 -0
  8. package/dist/api/modules/configData/heibaimingdanfuwu.d.ts +36 -0
  9. package/dist/api/modules/configData/index.d.ts +3 -0
  10. package/dist/api/modules/configData/xitongpeizhifuwu.d.ts +99 -0
  11. package/dist/api/modules/configData/zidianfuwu.d.ts +57 -0
  12. package/dist/api/modules/log/caozuorizhifuwu.d.ts +15 -0
  13. package/dist/api/modules/log/denglurizhifuwu.d.ts +15 -0
  14. package/dist/api/modules/log/index.d.ts +2 -0
  15. package/dist/api/modules/rbac/gangweijiekou.d.ts +36 -0
  16. package/dist/api/modules/rbac/index.d.ts +11 -0
  17. package/dist/api/modules/rbac/jiaosejiekou.d.ts +50 -0
  18. package/dist/api/modules/rbac/pubJiaosezukongzhiqi.d.ts +43 -0
  19. package/dist/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.d.ts +64 -0
  20. package/dist/api/modules/rbac/yonghujiekou.d.ts +85 -0
  21. package/dist/api/modules/rbac/yonghushoucangbiaojiekou.d.ts +36 -0
  22. package/dist/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.d.ts +29 -0
  23. package/dist/api/modules/rbac/ziyuanjiekou.d.ts +85 -0
  24. package/dist/api/modules/rbac/zuhuguanlijiekou.d.ts +36 -0
  25. package/dist/api/modules/rbac/zuzhijiaosebiaokongzhiqi.d.ts +29 -0
  26. package/dist/api/modules/rbac/zuzhijiekou.d.ts +64 -0
  27. package/dist/api/request.d.ts +1 -0
  28. package/dist/browserType.vue_vue_type_script_setup_true_lang-Cv8wph6G.js +38 -0
  29. package/dist/cloneDeep-B4Rj61s4.js +8 -0
  30. package/dist/components/GroupSelector/index.vue.d.ts +15 -0
  31. package/dist/components/GroupSelector/interface.d.ts +6 -0
  32. package/dist/components/OrgTree/index.vue.d.ts +5 -0
  33. package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +68 -0
  34. package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +72 -0
  35. package/dist/components/OrgUserSelector/index.d.ts +9 -0
  36. package/dist/components/OrgUserSelector/provider.d.ts +24 -0
  37. package/dist/components/ResourceSelector/enum.d.ts +5 -0
  38. package/dist/components/ResourceSelector/hooks/useAppAndResource.d.ts +29 -0
  39. package/dist/components/ResourceSelector/index.vue.d.ts +24 -0
  40. package/dist/composables/useLottie.d.ts +11 -0
  41. package/dist/enum-BEHz_Q18.js +74 -0
  42. package/dist/enum-C9ihxJe7.js +4 -0
  43. package/dist/enum-CTUzwCYG.js +4 -0
  44. package/dist/enum-DDKThkSw.js +24 -0
  45. package/dist/gangweijiekou-CV7cIo_W.js +46 -0
  46. package/dist/index-B6A3qFeU.js +18585 -0
  47. package/dist/index-BChMrCkZ.js +399 -0
  48. package/dist/index-BIUkDwk2.js +465 -0
  49. package/dist/index-BOEO9CRp.js +7084 -0
  50. package/dist/index-BgdW__IO.js +125 -0
  51. package/dist/index-Bi0fucZj.js +871 -0
  52. package/dist/index-Bj3Ee1l-.js +177 -0
  53. package/dist/index-Bzjxdd-F.js +702 -0
  54. package/dist/index-CF4XGkrK.js +454 -0
  55. package/dist/index-CGAa6YPO.js +273 -0
  56. package/dist/index-CK582XAz.js +317 -0
  57. package/dist/index-Ce9x4LEV.js +633 -0
  58. package/dist/index-CkVgkVvC.js +461 -0
  59. package/dist/index-D4uw6wJ9.js +181 -0
  60. package/dist/index-DFrT08M4.js +388 -0
  61. package/dist/index-Dju21Cnm.js +140 -0
  62. package/dist/index-Dmg39liA.js +168 -0
  63. package/dist/index-DvE43Xkt.js +408 -0
  64. package/dist/index-Dx3ZDeWT.js +684 -0
  65. package/dist/index-MmfEJgmm.js +860 -0
  66. package/dist/index-RBHLCaQ9.js +1626 -0
  67. package/dist/index-Y2jyqjVz.js +303 -0
  68. package/dist/index-b_92Syzh.js +131 -0
  69. package/dist/index-g5Fyla0r.js +164 -0
  70. package/dist/index-qdAiA-PA.js +286 -0
  71. package/dist/index.d.ts +7 -0
  72. package/dist/index.js +9 -0
  73. package/dist/interface.d.ts +49 -0
  74. package/dist/itemlist-Og2t8W5R.js +368 -0
  75. package/dist/jiaosejiekou-0xZkLzL_.js +58 -0
  76. package/dist/login_history-BJWFChQ3.js +430 -0
  77. package/dist/operate_history-C1NKnoB5.js +468 -0
  78. package/dist/pubJiaosezukongzhiqi-BlLcThHi.js +57 -0
  79. package/dist/routes/index.d.ts +14 -0
  80. package/dist/routes/modules/authority.manage.menu.d.ts +3 -0
  81. package/dist/routes/modules/log.manage.menu.d.ts +3 -0
  82. package/dist/routes/modules/safe.manage.menu.d.ts +3 -0
  83. package/dist/routes/modules/stylesetting.manage.menu.d.ts +3 -0
  84. package/dist/routes/modules/system.manage.menu.d.ts +3 -0
  85. package/dist/setItem-BRseSui6.js +152 -0
  86. package/dist/shujuquanxianzhubiaokongzhiqi-3CpYi1Zo.js +65 -0
  87. package/dist/stores/index.d.ts +1 -0
  88. package/dist/style.css +1 -0
  89. package/dist/useAppAndResource-BF7jQTCi.js +55 -0
  90. package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +14 -0
  91. package/dist/views/blackWhiteList/enum.d.ts +7 -0
  92. package/dist/views/blackWhiteList/index.vue.d.ts +1535 -0
  93. package/dist/views/blackWhiteList/types.d.ts +4 -0
  94. package/dist/views/breadcrumb_setting/animationData.d.ts +7 -0
  95. package/dist/views/breadcrumb_setting/index.vue.d.ts +2 -0
  96. package/dist/views/components/HCheckList.vue.d.ts +20 -0
  97. package/dist/views/components/animation_item.vue.d.ts +14 -0
  98. package/dist/views/components/setItem.vue.d.ts +61 -0
  99. package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +172 -0
  100. package/dist/views/data-permission/enum.d.ts +34 -0
  101. package/dist/views/data-permission/index.vue.d.ts +1691 -0
  102. package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +12 -0
  103. package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +12 -0
  104. package/dist/views/dictionary/enum.d.ts +8 -0
  105. package/dist/views/dictionary/index.vue.d.ts +1532 -0
  106. package/dist/views/dictionary/itemlist.vue.d.ts +1532 -0
  107. package/dist/views/group/components/drawerGroup.vue.d.ts +12 -0
  108. package/dist/views/group/enum.d.ts +21 -0
  109. package/dist/views/group/index.vue.d.ts +1532 -0
  110. package/dist/views/layout_setting/index.vue.d.ts +2 -0
  111. package/dist/views/log_center/components/browserType.vue.d.ts +12 -0
  112. package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +14 -0
  113. package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +14 -0
  114. package/dist/views/log_center/login_history.vue.d.ts +1511 -0
  115. package/dist/views/log_center/operate_history.vue.d.ts +1511 -0
  116. package/dist/views/menu_setting/animationData.d.ts +13 -0
  117. package/dist/views/menu_setting/index.vue.d.ts +2 -0
  118. package/dist/views/organization/components/drawerOrganization.vue.d.ts +12 -0
  119. package/dist/views/organization/components/drawerRole.vue.d.ts +36 -0
  120. package/dist/views/organization/components/roleSelect.vue.d.ts +14 -0
  121. package/dist/views/organization/enum.d.ts +25 -0
  122. package/dist/views/organization/index.vue.d.ts +73 -0
  123. package/dist/views/other_setting/animationData.d.ts +7 -0
  124. package/dist/views/other_setting/index.vue.d.ts +2 -0
  125. package/dist/views/other_setting/interface.d.ts +23 -0
  126. package/dist/views/page_animation_setting/animationData.d.ts +11 -0
  127. package/dist/views/page_animation_setting/index.vue.d.ts +2 -0
  128. package/dist/views/page_w_setting/index.vue.d.ts +2 -0
  129. package/dist/views/position/components/drawerPosition.vue.d.ts +12 -0
  130. package/dist/views/position/enum.d.ts +8 -0
  131. package/dist/views/position/index.vue.d.ts +1532 -0
  132. package/dist/views/region/components/drawerRegion.vue.d.ts +12 -0
  133. package/dist/views/region/enum.d.ts +22 -0
  134. package/dist/views/region/index.vue.d.ts +1533 -0
  135. package/dist/views/resource/components/ResourceEdit.vue.d.ts +16 -0
  136. package/dist/views/resource/components/RoleRelation.vue.d.ts +6 -0
  137. package/dist/views/resource/enum.d.ts +30 -0
  138. package/dist/views/resource/index.vue.d.ts +1549 -0
  139. package/dist/views/resource/interface.d.ts +6 -0
  140. package/dist/views/role/components/ResourceRelation.vue.d.ts +1515 -0
  141. package/dist/views/role/components/drawerRole.vue.d.ts +49 -0
  142. package/dist/views/role/enum.d.ts +25 -0
  143. package/dist/views/role/index.vue.d.ts +3090 -0
  144. package/dist/views/role/interface.d.ts +6 -0
  145. package/dist/views/role_group/components/drawerRole.vue.d.ts +37 -0
  146. package/dist/views/role_group/components/roleSelect.vue.d.ts +14 -0
  147. package/dist/views/role_group/enum.d.ts +21 -0
  148. package/dist/views/role_group/index.vue.d.ts +1557 -0
  149. package/dist/views/role_group/interface.d.ts +6 -0
  150. package/dist/views/safe_setting/index.vue.d.ts +4 -0
  151. package/dist/views/tabbar_setting/animationData.d.ts +11 -0
  152. package/dist/views/tabbar_setting/index.vue.d.ts +2 -0
  153. package/dist/views/tenant/components/TenantEdit.vue.d.ts +50 -0
  154. package/dist/views/tenant/enum.d.ts +7 -0
  155. package/dist/views/tenant/index.vue.d.ts +1570 -0
  156. package/dist/views/tenant/interface.d.ts +6 -0
  157. package/dist/views/theme_setting/index.vue.d.ts +2 -0
  158. package/dist/views/toolbar_setting/animationData.d.ts +17 -0
  159. package/dist/views/toolbar_setting/index.vue.d.ts +2 -0
  160. package/dist/views/user/components/OrgAndPosition.vue.d.ts +14 -0
  161. package/dist/views/user/components/UserAuthorization.vue.d.ts +39 -0
  162. package/dist/views/user/components/UserEdit.vue.d.ts +16 -0
  163. package/dist/views/user/components/roleSelect.vue.d.ts +14 -0
  164. package/dist/views/user/enum.d.ts +13 -0
  165. package/dist/views/user/index.vue.d.ts +1586 -0
  166. package/dist/views/user/interface.d.ts +39 -0
  167. package/dist/views/watermark_setting/animationData.d.ts +3 -0
  168. package/dist/views/watermark_setting/index.vue.d.ts +31 -0
  169. package/dist/xitongpeizhifuwu-BIR2CVXp.js +23 -0
  170. package/dist/zidianfuwu-B137v_q7.js +65 -0
  171. package/dist/ziyuanjiekou-j9nd-oaF.js +69 -0
  172. package/dist/zuzhijiaosebiaokongzhiqi-DPbRg7Qd.js +28 -0
  173. package/package.json +18 -20
  174. package/src/components/GroupSelector/index.vue +1 -7
  175. package/src/components/GroupSelector/interface.ts +6 -0
  176. package/src/components/OrgUserSelector/index.ts +5 -0
  177. package/src/components/ResourceSelector/index.vue +1 -2
  178. package/src/index.ts +8 -14
  179. package/src/interface.ts +3 -0
  180. package/src/routes/index.ts +1 -1
  181. package/src/views/tenant/components/TenantEdit.vue +1 -8
  182. package/src/views/tenant/enum.ts +7 -0
  183. package/src/views/tenant/index.vue +1 -8
  184. package/src/views/theme_setting/index.vue +2 -1
  185. package/src/views/user/interface.ts +1 -1
  186. package/src/assets/icons/403.svg +0 -1
  187. package/src/assets/icons/403_dark.svg +0 -1
  188. package/src/assets/icons/404.svg +0 -1
  189. package/src/assets/icons/404_dark.svg +0 -1
  190. package/src/assets/icons/browser-360.svg +0 -1
  191. package/src/assets/icons/browser-chrome.svg +0 -1
  192. package/src/assets/icons/browser-edge.svg +0 -1
  193. package/src/assets/icons/browser-ie.svg +0 -1
  194. package/src/assets/icons/browser-other.svg +0 -1
  195. package/src/assets/icons/browser-qq.svg +0 -1
  196. package/src/assets/icons/browser-safari.svg +0 -1
  197. package/src/assets/icons/browser-uc.svg +0 -1
  198. package/src/assets/icons/change-org.svg +0 -1
  199. package/src/assets/icons/empty-data.svg +0 -1
  200. package/src/assets/icons/favorites.svg +0 -1
  201. package/src/assets/icons/image-load-fail.svg +0 -1
  202. package/src/assets/icons/logo-sig.svg +0 -1
  203. package/src/assets/icons/logo.svg +0 -1
  204. package/src/assets/icons/mima.svg +0 -1
  205. package/src/assets/icons/process-management.svg +0 -1
  206. package/src/assets/icons/project-management.svg +0 -1
  207. package/src/assets/icons/rbac.svg +0 -1
  208. package/src/assets/icons/test.svg +0 -1
  209. package/src/assets/icons/toolbar-collapse.svg +0 -1
  210. package/src/assets/icons/tree_icon.svg +0 -1
  211. package/src/assets/icons/tree_icon_checked.svg +0 -1
  212. package/src/assets/icons/workbench.svg +0 -1
@@ -0,0 +1,1626 @@
1
+ import { Card as ue, Spin as ge, Empty as Re, Tree as Oe, Modal as Pe, Input as ve, Select as de, SelectOption as $e, Tooltip as ce, CheckboxGroup as Se, Checkbox as Ee, Tag as Le, Button as te, Drawer as be, Form as xe, FormItem as pe, Space as me, Switch as he, RadioGroup as Ue, Textarea as Ce, Row as De, Col as Te } from "ant-design-vue/es";
2
+ import { PubinfoIcon as fe, useAuth as Ae } from "pubinfo";
3
+ import { SearchOutlined as Fe, PlusCircleOutlined as Ve } from "@ant-design/icons-vue";
4
+ import { defineComponent as Q, ref as $, onMounted as ye, createBlock as R, openBlock as l, withCtx as n, createVNode as t, unref as a, mergeProps as ze, createElementVNode as w, toDisplayString as U, mergeModels as Me, useModel as ke, watch as se, isRef as ee, createElementBlock as S, createTextVNode as j, Fragment as Z, renderList as K, withDirectives as X, vShow as je, createCommentVNode as H, normalizeStyle as re, nextTick as Ne, reactive as Be, resolveDirective as Ge, isVNode as qe } from "vue";
5
+ import { j as We, k as Ze, l as He, m as Ke, n as Xe, o as Je, q as Qe, r as Ye, u as J, c as et, s as tt, _ as at, t as nt, v as ot, w as lt, x as st, y as rt, z as it } from "./index-BOEO9CRp.js";
6
+ import { _ as _e } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ import { ProTable as ut } from "@pubinfo/pro-components";
8
+ import { theme as we, message as ne, Form as dt, Modal as ie, Popover as ct, Space as pt, Badge as oe } from "ant-design-vue";
9
+ import { g as mt, c as Ie } from "./pubJiaosezukongzhiqi-BlLcThHi.js";
10
+ import { c as ft, e as _t } from "./shujuquanxianzhubiaokongzhiqi-3CpYi1Zo.js";
11
+ import { e as gt } from "./jiaosejiekou-0xZkLzL_.js";
12
+ import { g as vt } from "./gangweijiekou-CV7cIo_W.js";
13
+ import { useRequest as bt } from "alova/client";
14
+ import { c as xt } from "./cloneDeep-B4Rj61s4.js";
15
+ var ht = "[object Map]", yt = "[object Set]", kt = Object.prototype, wt = kt.hasOwnProperty;
16
+ function le(p) {
17
+ if (p == null)
18
+ return !0;
19
+ if (We(p) && (Ze(p) || typeof p == "string" || typeof p.splice == "function" || He(p) || Ke(p) || Xe(p)))
20
+ return !p.length;
21
+ var E = Je(p);
22
+ if (E == ht || E == yt)
23
+ return !p.size;
24
+ if (Qe(p))
25
+ return !Ye(p).length;
26
+ for (var A in p)
27
+ if (wt.call(p, A))
28
+ return !1;
29
+ return !0;
30
+ }
31
+ const It = { class: "flex w-full items-center overflow-hidden" }, Rt = ["title"], Ot = /* @__PURE__ */ Q({
32
+ name: "OrgTree",
33
+ __name: "index",
34
+ props: {
35
+ auth: {}
36
+ },
37
+ setup(p) {
38
+ const E = p, A = $([]), [F, z] = J(!1);
39
+ function O(_) {
40
+ return new Promise((s, v) => {
41
+ var m, y;
42
+ if ((m = _ == null ? void 0 : _.dataRef) != null && m.children) {
43
+ s();
44
+ return;
45
+ }
46
+ z(!0), et(
47
+ {
48
+ parentId: (y = _ == null ? void 0 : _.dataRef) == null ? void 0 : y.id,
49
+ enable: !0
50
+ },
51
+ {
52
+ headers: { "X-ResourceMark": E.auth }
53
+ }
54
+ ).then((x) => {
55
+ var I;
56
+ if (x.success) {
57
+ const b = ((I = x == null ? void 0 : x.data) == null ? void 0 : I.map(D)) ?? [];
58
+ _ != null && _.dataRef ? _.dataRef.children = b : A.value = b;
59
+ }
60
+ A.value = [...A.value], s();
61
+ }).catch(v).finally(() => z(!1));
62
+ });
63
+ }
64
+ function D(_) {
65
+ return {
66
+ key: _.id,
67
+ isLeaf: _.leaf,
68
+ ..._
69
+ };
70
+ }
71
+ return ye(() => {
72
+ O();
73
+ }), (_, s) => {
74
+ const v = Re, m = Oe, y = ge, x = ue;
75
+ return l(), R(x, {
76
+ "body-style": { padding: "16px" },
77
+ class: "w-full h-full overflow-y-auto overflow-x-hidden"
78
+ }, {
79
+ default: n(() => [
80
+ t(y, { spinning: a(F) }, {
81
+ default: n(() => [
82
+ a(A).length === 0 ? (l(), R(v, { key: 0 })) : (l(), R(m, ze({ key: 1 }, _.$attrs, {
83
+ "block-node": "",
84
+ "load-data": O,
85
+ "tree-data": a(A),
86
+ "field-names": { children: "children", title: "name", key: "id" }
87
+ }), {
88
+ title: n((I) => [
89
+ w("div", It, [
90
+ w("span", {
91
+ title: I.name,
92
+ class: "truncate"
93
+ }, U(I.name), 9, Rt)
94
+ ])
95
+ ]),
96
+ _: 1
97
+ /* STABLE */
98
+ }, 16, ["tree-data"]))
99
+ ]),
100
+ _: 1
101
+ /* STABLE */
102
+ }, 8, ["spinning"])
103
+ ]),
104
+ _: 1
105
+ /* STABLE */
106
+ });
107
+ };
108
+ }
109
+ }), Pt = /* @__PURE__ */ _e(Ot, [["__scopeId", "data-v-3f06df7d"]]), $t = { class: "h-340px border-1px border-solid flex flex-row border_color" }, St = { class: "w-360px flex flex-col" }, Et = { class: "flex-1 overflow-hidden py-10px px-10px" }, Lt = { class: "overflow-y-auto overflow-x-hidden h-[calc(100%-30px)] mt-10px" }, Ut = { key: 1 }, Ct = { class: "flex-1 flex flex-col border-solid border-0px border-l-1px border_color" }, Dt = { class: "flex-1 p-10px overflow-auto" }, Tt = /* @__PURE__ */ Q({
110
+ name: "RoleSelect",
111
+ __name: "roleSelect",
112
+ props: {
113
+ open: { type: Boolean },
114
+ openModifiers: {}
115
+ },
116
+ emits: /* @__PURE__ */ Me(["select"], ["update:open"]),
117
+ setup(p, { expose: E, emit: A }) {
118
+ const F = A, z = $(!1), O = $([]), D = $([]), _ = $([]), s = $(""), v = ke(p, "open"), m = $(""), y = $([]), x = $([]), I = J(v);
119
+ se(() => O.value, (r) => {
120
+ D.value = r.reduce((e, d) => {
121
+ const o = _.value.find((c) => c.id === d) || {};
122
+ return e.push(o), e;
123
+ }, []);
124
+ }, { deep: !0 }), se(() => m.value, (r) => {
125
+ h(r);
126
+ });
127
+ async function b(r) {
128
+ const e = await Ie({ name: "" });
129
+ y.value = e.data || [], m.value = "", await h(""), O.value = [...r], I(!0);
130
+ }
131
+ function u() {
132
+ O.value = [];
133
+ }
134
+ function T(r) {
135
+ const e = O.value.findIndex((d) => d === r);
136
+ e >= 0 && O.value.splice(e, 1);
137
+ }
138
+ function N() {
139
+ F("select", D.value), I(!1);
140
+ }
141
+ function B(r) {
142
+ var e;
143
+ return x.value.findIndex((d) => d.id === r.id) > -1 && ((e = r.name) == null ? void 0 : e.includes(s.value));
144
+ }
145
+ async function h(r) {
146
+ var e;
147
+ if (z.value = !0, r) {
148
+ const d = await mt({ id: r });
149
+ z.value = !1, x.value = ((e = d.data) == null ? void 0 : e.roles) || [];
150
+ } else {
151
+ const d = await gt();
152
+ z.value = !1, _.value = d.data || [], x.value = [..._.value].filter((o) => [...d.data || []].some((c) => c.id === o.id));
153
+ }
154
+ }
155
+ return E({
156
+ open: b
157
+ }), (r, e) => {
158
+ const d = $e, o = ce, c = de, f = ve, P = ge, V = Ee, C = Se, G = Le, M = te, g = Pe;
159
+ return l(), R(g, {
160
+ open: v.value,
161
+ "onUpdate:open": e[4] || (e[4] = (i) => v.value = i),
162
+ class: "custom_modal",
163
+ title: "角色选择",
164
+ "mask-closable": !1,
165
+ width: 750
166
+ }, {
167
+ footer: n(() => [
168
+ t(M, {
169
+ onClick: e[3] || (e[3] = (i) => a(I)(!1))
170
+ }, {
171
+ default: n(() => e[7] || (e[7] = [
172
+ j(" 取消 ")
173
+ ])),
174
+ _: 1,
175
+ __: [7]
176
+ }),
177
+ t(M, {
178
+ type: "primary",
179
+ onClick: N
180
+ }, {
181
+ default: n(() => e[8] || (e[8] = [
182
+ j(" 确定 ")
183
+ ])),
184
+ _: 1,
185
+ __: [8]
186
+ })
187
+ ]),
188
+ default: n(() => [
189
+ w("div", $t, [
190
+ w("div", St, [
191
+ w("div", Et, [
192
+ t(f, {
193
+ value: a(s),
194
+ "onUpdate:value": e[1] || (e[1] = (i) => ee(s) ? s.value = i : null),
195
+ placeholder: "请输入",
196
+ "allow-clear": ""
197
+ }, {
198
+ addonBefore: n(() => [
199
+ t(c, {
200
+ value: a(m),
201
+ "onUpdate:value": e[0] || (e[0] = (i) => ee(m) ? m.value = i : null),
202
+ style: { width: "90px" }
203
+ }, {
204
+ default: n(() => [
205
+ t(d, { value: "" }, {
206
+ default: n(() => e[5] || (e[5] = [
207
+ j(" 全部 ")
208
+ ])),
209
+ _: 1,
210
+ __: [5]
211
+ }),
212
+ (l(!0), S(
213
+ Z,
214
+ null,
215
+ K(a(y), (i) => (l(), R(d, {
216
+ key: i.id,
217
+ value: i.id
218
+ }, {
219
+ default: n(() => [
220
+ t(o, {
221
+ title: i.name
222
+ }, {
223
+ default: n(() => [
224
+ j(
225
+ U(i.name),
226
+ 1
227
+ /* TEXT */
228
+ )
229
+ ]),
230
+ _: 2
231
+ /* DYNAMIC */
232
+ }, 1032, ["title"])
233
+ ]),
234
+ _: 2
235
+ /* DYNAMIC */
236
+ }, 1032, ["value"]))),
237
+ 128
238
+ /* KEYED_FRAGMENT */
239
+ ))
240
+ ]),
241
+ _: 1
242
+ /* STABLE */
243
+ }, 8, ["value"])
244
+ ]),
245
+ suffix: n(() => [
246
+ t(a(Fe))
247
+ ]),
248
+ _: 1
249
+ /* STABLE */
250
+ }, 8, ["value"]),
251
+ w("div", Lt, [
252
+ a(z) ? (l(), R(P, {
253
+ key: 0,
254
+ class: "cent"
255
+ })) : (l(), R(C, {
256
+ key: 1,
257
+ value: a(O),
258
+ "onUpdate:value": e[2] || (e[2] = (i) => ee(O) ? O.value = i : null),
259
+ class: "w-full"
260
+ }, {
261
+ default: n(() => [
262
+ (l(!0), S(
263
+ Z,
264
+ null,
265
+ K(a(_), (i) => X((l(), S("div", {
266
+ key: i.id,
267
+ class: "w-full py-10px bodb"
268
+ }, [
269
+ t(V, {
270
+ value: i.id
271
+ }, {
272
+ default: n(() => [
273
+ (i.name || "").length > 22 ? (l(), R(o, {
274
+ key: 0,
275
+ title: i.name
276
+ }, {
277
+ default: n(() => {
278
+ var W;
279
+ return [
280
+ j(
281
+ U(`${(W = i == null ? void 0 : i.name) == null ? void 0 : W.slice(0, 22)}...`),
282
+ 1
283
+ /* TEXT */
284
+ )
285
+ ];
286
+ }),
287
+ _: 2
288
+ /* DYNAMIC */
289
+ }, 1032, ["title"])) : (l(), S(
290
+ "span",
291
+ Ut,
292
+ U(i.name),
293
+ 1
294
+ /* TEXT */
295
+ ))
296
+ ]),
297
+ _: 2
298
+ /* DYNAMIC */
299
+ }, 1032, ["value"])
300
+ ])), [
301
+ [je, B(i)]
302
+ ])),
303
+ 128
304
+ /* KEYED_FRAGMENT */
305
+ ))
306
+ ]),
307
+ _: 1
308
+ /* STABLE */
309
+ }, 8, ["value"]))
310
+ ])
311
+ ])
312
+ ]),
313
+ w("div", Ct, [
314
+ w("div", { class: "w-full h-34px bg-[#F2F3F5] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#1D2129] dark:text-[#F2F3F5]" }, [
315
+ e[6] || (e[6] = w(
316
+ "div",
317
+ { class: "" },
318
+ " 已选角色 ",
319
+ -1
320
+ /* HOISTED */
321
+ )),
322
+ w("div", {
323
+ class: "cursor-pointer text-[#165DFF]",
324
+ onClick: u
325
+ }, " 清空 ")
326
+ ]),
327
+ w("div", Dt, [
328
+ (l(!0), S(
329
+ Z,
330
+ null,
331
+ K(a(D), (i) => (l(), S("div", {
332
+ key: i.id,
333
+ class: "inline-block mb-6px max-w-300px"
334
+ }, [
335
+ (i.name || "").length > 20 ? (l(), R(o, {
336
+ key: 0,
337
+ title: i.name
338
+ }, {
339
+ default: n(() => [
340
+ t(G, {
341
+ class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
342
+ closable: "",
343
+ onClose: (W) => T(i.id || "")
344
+ }, {
345
+ default: n(() => {
346
+ var W;
347
+ return [
348
+ j(
349
+ U(`${(W = i == null ? void 0 : i.name) == null ? void 0 : W.slice(0, 20)}...`),
350
+ 1
351
+ /* TEXT */
352
+ )
353
+ ];
354
+ }),
355
+ _: 2
356
+ /* DYNAMIC */
357
+ }, 1032, ["onClose"])
358
+ ]),
359
+ _: 2
360
+ /* DYNAMIC */
361
+ }, 1032, ["title"])) : (l(), R(G, {
362
+ key: 1,
363
+ class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
364
+ closable: "",
365
+ onClose: (W) => T(i.id || "")
366
+ }, {
367
+ default: n(() => [
368
+ j(
369
+ U(i.name),
370
+ 1
371
+ /* TEXT */
372
+ )
373
+ ]),
374
+ _: 2
375
+ /* DYNAMIC */
376
+ }, 1032, ["onClose"]))
377
+ ]))),
378
+ 128
379
+ /* KEYED_FRAGMENT */
380
+ ))
381
+ ])
382
+ ])
383
+ ])
384
+ ]),
385
+ _: 1
386
+ /* STABLE */
387
+ }, 8, ["open"]);
388
+ };
389
+ }
390
+ }), At = /* @__PURE__ */ _e(Tt, [["__scopeId", "data-v-9c8e1803"]]), Ft = { class: "flex items-center justify-between" }, Vt = {
391
+ flex: "",
392
+ "items-center": ""
393
+ }, zt = { class: "pt-10px max-h-150px overflow-auto" }, Mt = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, jt = {
394
+ key: 1,
395
+ class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
396
+ }, Nt = { class: "max-h-150px overflow-auto" }, Bt = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, Gt = {
397
+ key: 1,
398
+ class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
399
+ }, qt = /* @__PURE__ */ Q({
400
+ name: "UserAuthorization",
401
+ __name: "UserAuthorization",
402
+ props: {
403
+ userId: {}
404
+ },
405
+ emits: ["submit"],
406
+ setup(p, { expose: E, emit: A }) {
407
+ const F = p, z = A, { token: O } = we.useToken(), [D, _] = J(!1), [s, v] = J(!1), m = $(), y = $({
408
+ authList: []
409
+ }), x = $([]), I = $([]);
410
+ function b() {
411
+ ft().then((o) => {
412
+ o.data && o.data.length && (I.value = o.data);
413
+ }), Ie({ name: "" }).then((o) => {
414
+ o.data && o.data.length && (x.value = o.data);
415
+ });
416
+ }
417
+ function u() {
418
+ F.userId && (y.value.authList = [], _t({ userId: F.userId }).then((o) => {
419
+ o.data && o.data.userOrgPermissionBos && o.data.userOrgPermissionBos.length && (y.value.authList = o.data.userOrgPermissionBos.map((c) => {
420
+ const { orgId: f = "", orgName: P = "", main: V = !1, dataPermissionsList: C, roleList: G, orgRoleList: M } = c, g = {
421
+ userId: F.userId,
422
+ orgId: f,
423
+ orgName: P,
424
+ main: V,
425
+ roleList: G,
426
+ orgRoleList: M
427
+ };
428
+ return C && C.length && (g.dataPermissionIds = C.map((i) => ({
429
+ value: i.dataPermissionId,
430
+ label: i.dataPermissionName
431
+ }))), g;
432
+ }));
433
+ }));
434
+ }
435
+ async function T() {
436
+ await Ne(), _(!0), u();
437
+ }
438
+ function N() {
439
+ _(!1);
440
+ }
441
+ function B() {
442
+ var o;
443
+ s && (v(!0), (o = m.value) == null || o.validate().then(() => {
444
+ const c = y.value.authList.map((f) => {
445
+ const { dataPermissionIds: P = [], roleList: V = [], orgId: C, userId: G } = f, M = (V || []).map((i) => typeof i == "object" && i.id ? i.id : i), g = P.map((i) => i.value);
446
+ return {
447
+ orgId: C,
448
+ userId: G,
449
+ roleIds: M,
450
+ dataPermissionIds: g
451
+ };
452
+ });
453
+ tt(c).then((f) => {
454
+ f.success && (ne.success("授权成功"), z("submit"), N());
455
+ }).finally(() => {
456
+ v(!1);
457
+ });
458
+ }));
459
+ }
460
+ ye(() => {
461
+ b();
462
+ });
463
+ const h = $(), r = $(0);
464
+ function e(o) {
465
+ r.value = o, h.value.open((y.value.authList[r.value].roleList || []).map((c) => c.id));
466
+ }
467
+ function d(o) {
468
+ y.value.authList[r.value].roleList = o;
469
+ }
470
+ return E({
471
+ open: T
472
+ }), (o, c) => {
473
+ const f = fe, P = pe, V = de, C = te, G = ce, M = ue, g = xe, i = me, W = be;
474
+ return l(), R(W, {
475
+ open: a(D),
476
+ "onUpdate:open": c[2] || (c[2] = (q) => ee(D) ? D.value = q : null),
477
+ title: "授权",
478
+ placement: "right",
479
+ width: 520,
480
+ "destroy-on-close": "",
481
+ "footer-style": { textAlign: "right" }
482
+ }, {
483
+ footer: n(() => [
484
+ t(i, null, {
485
+ default: n(() => [
486
+ t(C, {
487
+ onClick: c[0] || (c[0] = (q) => a(_)(!1))
488
+ }, {
489
+ default: n(() => c[4] || (c[4] = [
490
+ j(" 取消 ")
491
+ ])),
492
+ _: 1,
493
+ __: [4]
494
+ }),
495
+ t(C, {
496
+ type: "primary",
497
+ loading: a(s),
498
+ onClick: c[1] || (c[1] = (q) => B())
499
+ }, {
500
+ default: n(() => c[5] || (c[5] = [
501
+ j(" 提交 ")
502
+ ])),
503
+ _: 1,
504
+ __: [5]
505
+ }, 8, ["loading"])
506
+ ]),
507
+ _: 1
508
+ /* STABLE */
509
+ })
510
+ ]),
511
+ default: n(() => [
512
+ t(g, {
513
+ ref_key: "formRef",
514
+ ref: m,
515
+ model: a(y),
516
+ "label-col": { span: 4 }
517
+ }, {
518
+ default: n(() => [
519
+ (l(!0), S(
520
+ Z,
521
+ null,
522
+ K(a(y).authList, (q, ae) => (l(), R(
523
+ M,
524
+ {
525
+ key: ae,
526
+ size: "small",
527
+ "body-style": { padding: "16px" },
528
+ class: "auth-card"
529
+ },
530
+ {
531
+ title: n(() => [
532
+ w("div", Ft, [
533
+ w("div", Vt, [
534
+ q.main ? (l(), R(f, {
535
+ key: 0,
536
+ name: "org-main",
537
+ class: "text-2xl"
538
+ })) : (l(), R(f, {
539
+ key: 1,
540
+ name: "org-unmain",
541
+ class: "text-2xl"
542
+ })),
543
+ w(
544
+ "div",
545
+ {
546
+ style: re(q.main ? { color: a(O).colorPrimary, fontWeight: "bold" } : {}),
547
+ class: "font-normal"
548
+ },
549
+ U(`组织${ae + 1}`),
550
+ 5
551
+ /* TEXT, STYLE */
552
+ )
553
+ ]),
554
+ q.main ? (l(), S(
555
+ "div",
556
+ {
557
+ key: 0,
558
+ style: re({ color: a(O).colorPrimary, fontWeight: "bold" })
559
+ },
560
+ " 主组织 ",
561
+ 4
562
+ /* STYLE */
563
+ )) : H("v-if", !0)
564
+ ])
565
+ ]),
566
+ default: n(() => [
567
+ t(
568
+ P,
569
+ {
570
+ label: "组织名称",
571
+ "label-col": { span: 5 }
572
+ },
573
+ {
574
+ default: n(() => [
575
+ w(
576
+ "span",
577
+ null,
578
+ U(q.orgName),
579
+ 1
580
+ /* TEXT */
581
+ )
582
+ ]),
583
+ _: 2
584
+ /* DYNAMIC */
585
+ },
586
+ 1024
587
+ /* DYNAMIC_SLOTS */
588
+ ),
589
+ t(P, {
590
+ label: "数据权限",
591
+ name: ["authList", ae, "dataPermissionIds"],
592
+ "label-col": { span: 5 }
593
+ }, {
594
+ default: n(() => [
595
+ t(V, {
596
+ value: q.dataPermissionIds,
597
+ "onUpdate:value": (L) => q.dataPermissionIds = L,
598
+ "label-in-value": "",
599
+ "field-names": { label: "name", value: "id" },
600
+ options: a(I),
601
+ "allow-clear": "",
602
+ mode: "multiple",
603
+ placeholder: "请选择"
604
+ }, null, 8, ["value", "onUpdate:value", "options"])
605
+ ]),
606
+ _: 2
607
+ /* DYNAMIC */
608
+ }, 1032, ["name"]),
609
+ t(
610
+ P,
611
+ {
612
+ label: "用户自选角色",
613
+ "label-col": { span: 5 },
614
+ name: "roleList"
615
+ },
616
+ {
617
+ default: n(() => [
618
+ t(C, {
619
+ type: "primary",
620
+ onClick: (L) => e(ae)
621
+ }, {
622
+ default: n(() => c[3] || (c[3] = [
623
+ j(" 编辑角色 ")
624
+ ])),
625
+ _: 2,
626
+ __: [3]
627
+ }, 1032, ["onClick"]),
628
+ w("div", zt, [
629
+ (l(!0), S(
630
+ Z,
631
+ null,
632
+ K(q.roleList, (L) => (l(), S(
633
+ Z,
634
+ {
635
+ key: L.id
636
+ },
637
+ [
638
+ ((L == null ? void 0 : L.name) || "").length > 20 ? (l(), R(G, {
639
+ key: 0,
640
+ title: L.name
641
+ }, {
642
+ default: n(() => {
643
+ var Y;
644
+ return [
645
+ w(
646
+ "span",
647
+ Mt,
648
+ U(`${(Y = L == null ? void 0 : L.name) == null ? void 0 : Y.slice(0, 20)}...`),
649
+ 1
650
+ /* TEXT */
651
+ )
652
+ ];
653
+ }),
654
+ _: 2
655
+ /* DYNAMIC */
656
+ }, 1032, ["title"])) : (l(), S(
657
+ "span",
658
+ jt,
659
+ U(L.name),
660
+ 1
661
+ /* TEXT */
662
+ ))
663
+ ],
664
+ 64
665
+ /* STABLE_FRAGMENT */
666
+ ))),
667
+ 128
668
+ /* KEYED_FRAGMENT */
669
+ ))
670
+ ])
671
+ ]),
672
+ _: 2
673
+ /* DYNAMIC */
674
+ },
675
+ 1024
676
+ /* DYNAMIC_SLOTS */
677
+ ),
678
+ t(
679
+ P,
680
+ {
681
+ label: "组织基础角色",
682
+ "label-col": { span: 5 },
683
+ name: "roleList"
684
+ },
685
+ {
686
+ default: n(() => [
687
+ w("div", Nt, [
688
+ (l(!0), S(
689
+ Z,
690
+ null,
691
+ K(q.orgRoleList, (L) => (l(), S(
692
+ Z,
693
+ {
694
+ key: L.id
695
+ },
696
+ [
697
+ ((L == null ? void 0 : L.name) || "").length > 20 ? (l(), R(G, {
698
+ key: 0,
699
+ title: L.name
700
+ }, {
701
+ default: n(() => {
702
+ var Y;
703
+ return [
704
+ w(
705
+ "span",
706
+ Bt,
707
+ U(`${(Y = L == null ? void 0 : L.name) == null ? void 0 : Y.slice(0, 20)}...`),
708
+ 1
709
+ /* TEXT */
710
+ )
711
+ ];
712
+ }),
713
+ _: 2
714
+ /* DYNAMIC */
715
+ }, 1032, ["title"])) : (l(), S(
716
+ "span",
717
+ Gt,
718
+ U(L.name),
719
+ 1
720
+ /* TEXT */
721
+ ))
722
+ ],
723
+ 64
724
+ /* STABLE_FRAGMENT */
725
+ ))),
726
+ 128
727
+ /* KEYED_FRAGMENT */
728
+ ))
729
+ ])
730
+ ]),
731
+ _: 2
732
+ /* DYNAMIC */
733
+ },
734
+ 1024
735
+ /* DYNAMIC_SLOTS */
736
+ )
737
+ ]),
738
+ _: 2
739
+ /* DYNAMIC */
740
+ },
741
+ 1024
742
+ /* DYNAMIC_SLOTS */
743
+ ))),
744
+ 128
745
+ /* KEYED_FRAGMENT */
746
+ ))
747
+ ]),
748
+ _: 1
749
+ /* STABLE */
750
+ }, 8, ["model"]),
751
+ t(
752
+ At,
753
+ {
754
+ ref_key: "roleModelRef",
755
+ ref: h,
756
+ onSelect: d
757
+ },
758
+ null,
759
+ 512
760
+ /* NEED_PATCH */
761
+ )
762
+ ]),
763
+ _: 1
764
+ /* STABLE */
765
+ }, 8, ["open"]);
766
+ };
767
+ }
768
+ }), Wt = /* @__PURE__ */ _e(qt, [["__scopeId", "data-v-b1463d9b"]]);
769
+ var k = /* @__PURE__ */ ((p) => (p.ADD = "新建", p.AUTHORIZE = "授权", p.RESET_PASSWORD = "重置密码", p.EDIT = "修改", p.REMOVE = "删除", p))(k || {});
770
+ const Zt = { class: "space-y-2" }, Ht = { class: "flex items-center space-x-1" }, Kt = { class: "flex items-center overflow-hidden" }, Xt = {
771
+ key: 0,
772
+ class: "mr-2 truncate"
773
+ }, Jt = /* @__PURE__ */ Q({
774
+ name: "OrgAndPosition",
775
+ __name: "OrgAndPosition",
776
+ props: {
777
+ modelValue: { default: [] },
778
+ modelModifiers: {}
779
+ },
780
+ emits: ["update:modelValue"],
781
+ setup(p) {
782
+ const E = ke(p, "modelValue"), { token: A } = we.useToken(), { onFieldChange: F } = dt.useInjectFormItemContext();
783
+ se(() => E.value, () => {
784
+ F();
785
+ }, { deep: !0 });
786
+ const { data: z } = bt(
787
+ (v) => vt(v, {
788
+ transform(m) {
789
+ return m.data ?? [];
790
+ }
791
+ }),
792
+ { initialData: [] }
793
+ );
794
+ function O(v, m) {
795
+ var x, I;
796
+ return (((I = (x = E.value) == null ? void 0 : x.filter((b) => b.orgId === m)) == null ? void 0 : I.length) ?? 0) > 1 ? Promise.reject(new Error("请勿重复选择组织")) : Promise.resolve();
797
+ }
798
+ function D(v) {
799
+ var m;
800
+ E.value = (m = E.value) == null ? void 0 : m.map((y, x) => ({
801
+ ...y,
802
+ main: v === x
803
+ }));
804
+ }
805
+ function _() {
806
+ var v;
807
+ (v = E.value) == null || v.push({
808
+ orgId: null,
809
+ positionList: [],
810
+ main: !1
811
+ });
812
+ }
813
+ function s(v) {
814
+ ie.confirm({
815
+ title: "删除",
816
+ content: "确定要删除吗?",
817
+ zIndex: 4e3,
818
+ onOk() {
819
+ var m;
820
+ (m = E.value) == null || m.splice(v, 1);
821
+ }
822
+ });
823
+ }
824
+ return (v, m) => {
825
+ const y = fe, x = te, I = ce, b = at, u = pe, T = de, N = he, B = ue;
826
+ return l(), S("div", Zt, [
827
+ (l(!0), S(
828
+ Z,
829
+ null,
830
+ K(E.value, (h, r) => (l(), R(
831
+ B,
832
+ {
833
+ key: r,
834
+ size: "small",
835
+ "body-style": { padding: "16px" }
836
+ },
837
+ {
838
+ title: n(() => [
839
+ w("div", Ht, [
840
+ h.main ? (l(), R(y, {
841
+ key: 0,
842
+ name: "org-main",
843
+ class: "text-2xl"
844
+ })) : (l(), R(y, {
845
+ key: 1,
846
+ name: "org-unmain",
847
+ class: "text-2xl"
848
+ })),
849
+ w(
850
+ "div",
851
+ {
852
+ style: re(h.main ? { color: a(A).colorPrimary } : null),
853
+ class: "font-normal"
854
+ },
855
+ U(`组织${r + 1}`),
856
+ 5
857
+ /* TEXT, STYLE */
858
+ )
859
+ ])
860
+ ]),
861
+ extra: n(() => {
862
+ var e;
863
+ return [
864
+ !h.main && E.value && ((e = E.value) == null ? void 0 : e.length) > 1 ? (l(), R(x, {
865
+ key: 0,
866
+ type: "link",
867
+ danger: "",
868
+ onClick: (d) => s(r)
869
+ }, {
870
+ default: n(() => m[0] || (m[0] = [
871
+ j(" 删除 ")
872
+ ])),
873
+ _: 2,
874
+ __: [0]
875
+ }, 1032, ["onClick"])) : H("v-if", !0)
876
+ ];
877
+ }),
878
+ default: n(() => [
879
+ t(u, {
880
+ label: "所属组织",
881
+ name: ["userOrgList", r, "orgId"],
882
+ "label-col": { span: 6 },
883
+ rules: [
884
+ { required: !0, message: "所属组织不能为空" },
885
+ { validator: O, trigger: "change" }
886
+ ]
887
+ }, {
888
+ default: n(() => [
889
+ t(b, {
890
+ "model-value": h.orgId ? [{ orgId: h.orgId, orgName: h.orgName }] : [],
891
+ onSubmit: (e) => {
892
+ const d = e == null ? void 0 : e[0];
893
+ h.orgId = d == null ? void 0 : d.orgId, h.orgName = d == null ? void 0 : d.orgName;
894
+ }
895
+ }, {
896
+ trigger: n(() => [
897
+ w("div", Kt, [
898
+ t(I, {
899
+ title: h.orgName
900
+ }, {
901
+ default: n(() => [
902
+ h.orgName ? (l(), S(
903
+ "span",
904
+ Xt,
905
+ U(h.orgName),
906
+ 1
907
+ /* TEXT */
908
+ )) : H("v-if", !0)
909
+ ]),
910
+ _: 2
911
+ /* DYNAMIC */
912
+ }, 1032, ["title"]),
913
+ t(x, {
914
+ type: "primary",
915
+ size: "small"
916
+ }, {
917
+ default: n(() => m[1] || (m[1] = [
918
+ j(" 选择组织 ")
919
+ ])),
920
+ _: 1,
921
+ __: [1]
922
+ })
923
+ ])
924
+ ]),
925
+ _: 2
926
+ /* DYNAMIC */
927
+ }, 1032, ["model-value", "onSubmit"])
928
+ ]),
929
+ _: 2
930
+ /* DYNAMIC */
931
+ }, 1032, ["name", "rules"]),
932
+ t(u, {
933
+ label: "所属岗位",
934
+ name: ["userOrgList", r, "positionList"],
935
+ "label-col": { span: 6 }
936
+ }, {
937
+ default: n(() => [
938
+ t(T, {
939
+ value: h.positionList,
940
+ "onUpdate:value": (e) => h.positionList = e,
941
+ "label-in-value": "",
942
+ "field-names": { label: "name", value: "id" },
943
+ options: a(z),
944
+ "allow-clear": "",
945
+ mode: "multiple",
946
+ placeholder: "请选择所属岗位"
947
+ }, null, 8, ["value", "onUpdate:value", "options"])
948
+ ]),
949
+ _: 2
950
+ /* DYNAMIC */
951
+ }, 1032, ["name"]),
952
+ t(u, {
953
+ label: "主要组织",
954
+ name: ["userOrgList", r, "main"],
955
+ "label-col": { span: 6 }
956
+ }, {
957
+ default: n(() => [
958
+ t(N, {
959
+ checked: h.main,
960
+ "onUpdate:checked": (e) => h.main = e,
961
+ disabled: h.main,
962
+ onChange: (e) => D(r)
963
+ }, null, 8, ["checked", "onUpdate:checked", "disabled", "onChange"])
964
+ ]),
965
+ _: 2
966
+ /* DYNAMIC */
967
+ }, 1032, ["name"])
968
+ ]),
969
+ _: 2
970
+ /* DYNAMIC */
971
+ },
972
+ 1024
973
+ /* DYNAMIC_SLOTS */
974
+ ))),
975
+ 128
976
+ /* KEYED_FRAGMENT */
977
+ )),
978
+ t(x, {
979
+ type: "primary",
980
+ onClick: _
981
+ }, {
982
+ default: n(() => m[2] || (m[2] = [
983
+ j(" 添加组织 ")
984
+ ])),
985
+ _: 1,
986
+ __: [2]
987
+ })
988
+ ]);
989
+ };
990
+ }
991
+ }), Qt = { key: 0 }, Yt = /* @__PURE__ */ Q({
992
+ name: "UserEdit",
993
+ __name: "UserEdit",
994
+ props: {
995
+ currentOrg: {}
996
+ },
997
+ emits: ["submit"],
998
+ setup(p, { expose: E, emit: A }) {
999
+ const F = p, z = A, [O, D] = J(!1), _ = $(), s = $({}), v = Be({
1000
+ title: "",
1001
+ record: {},
1002
+ initData: {
1003
+ sex: "0",
1004
+ enable: !0,
1005
+ userOrgList: [{ main: !0, positionList: [] }]
1006
+ }
1007
+ });
1008
+ function m(r, e) {
1009
+ return !e || /^[A-Z!@#$%^&*0-9]+$/i.test(e) ? Promise.resolve() : Promise.reject(new Error("只能包含字母、数字和特殊字符!@#$%^&*"));
1010
+ }
1011
+ function y(r, e) {
1012
+ return /^1(3\d|4[014-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(e) || le(e) ? Promise.resolve() : Promise.reject(new Error("请输入正确的手机号"));
1013
+ }
1014
+ function x(r, e) {
1015
+ return /^([a-z0-9])(\w|-)+@[a-z0-9]+\.([a-z]{2,4})$/i.test(e) || le(e) ? Promise.resolve() : Promise.reject(new Error("请输入正确的邮箱地址"));
1016
+ }
1017
+ function I(r, e) {
1018
+ return /(^\d{15}$)|(^\d{18}$)|(^\d{17}([\dX])$)/i.test(e) || le(e) ? Promise.resolve() : Promise.reject(new Error("请输入正确的身份证号码"));
1019
+ }
1020
+ const b = {
1021
+ loginName: [
1022
+ { required: !0, message: "请输入登录账号", trigger: ["blur", "change"] },
1023
+ { min: 4, max: 64, message: "登录账号需要在4位到64位之间", trigger: "change" },
1024
+ { validator: m, trigger: "change" }
1025
+ ],
1026
+ realName: [
1027
+ { required: !0, message: "请输入真实姓名", trigger: "blur" },
1028
+ { min: 2, max: 128, message: "真实姓名需要在2位到128位之间", trigger: "change" }
1029
+ ],
1030
+ userOrgList: [
1031
+ { type: "array", required: !0, message: "请选择所属组织" }
1032
+ ],
1033
+ mobile: [
1034
+ { validator: y, trigger: "change" }
1035
+ ],
1036
+ email: [
1037
+ { validator: x, trigger: "change" },
1038
+ { max: 32, message: "邮箱不能超过32位", trigger: "change" }
1039
+ ],
1040
+ idCard: [
1041
+ { validator: I, trigger: "change" }
1042
+ ]
1043
+ };
1044
+ async function u(r, e) {
1045
+ var d, o;
1046
+ if (v.title = r, s.value = xt(v.initData), s.value.userOrgList[0].orgId = (d = F.currentOrg) == null ? void 0 : d.orgId, s.value.userOrgList[0].orgName = (o = F.currentOrg) == null ? void 0 : o.orgName, D(!0), r === k.EDIT) {
1047
+ const c = await nt({ id: e == null ? void 0 : e.id });
1048
+ if (c.success) {
1049
+ const { userOrgList: f = [], ...P } = (c == null ? void 0 : c.data) ?? {};
1050
+ s.value = {
1051
+ ...P,
1052
+ userOrgList: f == null ? void 0 : f.map((V) => {
1053
+ var C, G;
1054
+ return {
1055
+ ...V,
1056
+ roleList: ((C = V.roles) == null ? void 0 : C.map((M) => ({ value: M.roleId, label: M.roleName }))) ?? [],
1057
+ positionList: ((G = V.posts) == null ? void 0 : G.map((M) => ({ value: M.postId, label: M.postName }))) ?? []
1058
+ };
1059
+ })
1060
+ };
1061
+ }
1062
+ }
1063
+ }
1064
+ const T = [
1065
+ { label: "未知", value: "0" },
1066
+ { label: "男", value: "1" },
1067
+ { label: "女", value: "2" }
1068
+ ], [N, B] = J(!1);
1069
+ function h() {
1070
+ var r;
1071
+ (r = _.value) == null || r.validate().then(() => {
1072
+ const { userOrgList: e = [], ...d } = s.value, o = {
1073
+ ...d,
1074
+ orgRoles: e.map((f) => {
1075
+ const { orgId: P, main: V } = f;
1076
+ return {
1077
+ orgId: P,
1078
+ main: V
1079
+ };
1080
+ }),
1081
+ posts: e.map((f) => {
1082
+ const { orgId: P, positionList: V = [] } = f;
1083
+ return {
1084
+ orgId: P,
1085
+ postIds: V.map((C) => C.value)
1086
+ };
1087
+ })
1088
+ }, c = v.title === k.ADD ? ot(o) : lt(o);
1089
+ B(!0), c.then((f) => {
1090
+ f != null && f.success && (ne.success(`${v.title}成功!`), D(!1), z("submit"));
1091
+ }).finally(() => B(!1));
1092
+ });
1093
+ }
1094
+ return E({
1095
+ open: u
1096
+ }), (r, e) => {
1097
+ const d = ve, o = pe, c = Ue, f = he, P = Ce, V = xe, C = te, G = me, M = be;
1098
+ return l(), R(M, {
1099
+ open: a(O),
1100
+ "onUpdate:open": e[12] || (e[12] = (g) => ee(O) ? O.value = g : null),
1101
+ title: a(v).title,
1102
+ placement: "right",
1103
+ width: 520,
1104
+ "destroy-on-close": "",
1105
+ "footer-style": { textAlign: "right" }
1106
+ }, {
1107
+ footer: n(() => [
1108
+ t(G, null, {
1109
+ default: n(() => [
1110
+ t(C, {
1111
+ onClick: e[10] || (e[10] = (g) => a(D)(!1))
1112
+ }, {
1113
+ default: n(() => e[13] || (e[13] = [
1114
+ j(" 取消 ")
1115
+ ])),
1116
+ _: 1,
1117
+ __: [13]
1118
+ }),
1119
+ t(C, {
1120
+ type: "primary",
1121
+ loading: a(N),
1122
+ onClick: e[11] || (e[11] = (g) => h())
1123
+ }, {
1124
+ default: n(() => e[14] || (e[14] = [
1125
+ j(" 提交 ")
1126
+ ])),
1127
+ _: 1,
1128
+ __: [14]
1129
+ }, 8, ["loading"])
1130
+ ]),
1131
+ _: 1
1132
+ /* STABLE */
1133
+ })
1134
+ ]),
1135
+ default: n(() => [
1136
+ t(V, {
1137
+ ref_key: "formRef",
1138
+ ref: _,
1139
+ model: a(s),
1140
+ rules: b,
1141
+ "label-col": { span: 4 }
1142
+ }, {
1143
+ default: n(() => [
1144
+ t(o, {
1145
+ label: "登录账号",
1146
+ name: "loginName"
1147
+ }, {
1148
+ default: n(() => [
1149
+ a(v).title === a(k).EDIT ? (l(), S(
1150
+ "div",
1151
+ Qt,
1152
+ U(a(s).loginName),
1153
+ 1
1154
+ /* TEXT */
1155
+ )) : (l(), R(d, {
1156
+ key: 1,
1157
+ value: a(s).loginName,
1158
+ "onUpdate:value": e[0] || (e[0] = (g) => a(s).loginName = g),
1159
+ maxlength: 64,
1160
+ placeholder: "请输入登录账号",
1161
+ "allow-clear": ""
1162
+ }, null, 8, ["value"]))
1163
+ ]),
1164
+ _: 1
1165
+ /* STABLE */
1166
+ }),
1167
+ t(o, {
1168
+ label: "真实姓名",
1169
+ name: "realName"
1170
+ }, {
1171
+ default: n(() => [
1172
+ t(d, {
1173
+ value: a(s).realName,
1174
+ "onUpdate:value": e[1] || (e[1] = (g) => a(s).realName = g),
1175
+ maxlength: 128,
1176
+ placeholder: "请输入真实姓名",
1177
+ "allow-clear": ""
1178
+ }, null, 8, ["value"])
1179
+ ]),
1180
+ _: 1
1181
+ /* STABLE */
1182
+ }),
1183
+ t(o, {
1184
+ label: "手机号",
1185
+ name: "mobile"
1186
+ }, {
1187
+ default: n(() => [
1188
+ t(d, {
1189
+ value: a(s).mobile,
1190
+ "onUpdate:value": e[2] || (e[2] = (g) => a(s).mobile = g),
1191
+ maxlength: 14,
1192
+ placeholder: "请输入手机号",
1193
+ "allow-clear": ""
1194
+ }, null, 8, ["value"])
1195
+ ]),
1196
+ _: 1
1197
+ /* STABLE */
1198
+ }),
1199
+ t(o, {
1200
+ label: "性别",
1201
+ name: "sex"
1202
+ }, {
1203
+ default: n(() => [
1204
+ t(c, {
1205
+ value: a(s).sex,
1206
+ "onUpdate:value": e[3] || (e[3] = (g) => a(s).sex = g),
1207
+ options: T
1208
+ }, null, 8, ["value"])
1209
+ ]),
1210
+ _: 1
1211
+ /* STABLE */
1212
+ }),
1213
+ t(o, {
1214
+ label: "邮箱",
1215
+ name: "email"
1216
+ }, {
1217
+ default: n(() => [
1218
+ t(d, {
1219
+ value: a(s).email,
1220
+ "onUpdate:value": e[4] || (e[4] = (g) => a(s).email = g),
1221
+ maxlength: 32,
1222
+ placeholder: "请输入邮箱",
1223
+ "allow-clear": ""
1224
+ }, null, 8, ["value"])
1225
+ ]),
1226
+ _: 1
1227
+ /* STABLE */
1228
+ }),
1229
+ t(o, {
1230
+ label: "身份证",
1231
+ name: "idCard"
1232
+ }, {
1233
+ default: n(() => [
1234
+ t(d, {
1235
+ value: a(s).idCard,
1236
+ "onUpdate:value": e[5] || (e[5] = (g) => a(s).idCard = g),
1237
+ maxlength: 18,
1238
+ placeholder: "请输入身份证",
1239
+ "allow-clear": ""
1240
+ }, null, 8, ["value"])
1241
+ ]),
1242
+ _: 1
1243
+ /* STABLE */
1244
+ }),
1245
+ t(o, {
1246
+ label: "是否启用",
1247
+ name: "enable"
1248
+ }, {
1249
+ default: n(() => [
1250
+ t(f, {
1251
+ checked: a(s).enable,
1252
+ "onUpdate:checked": e[6] || (e[6] = (g) => a(s).enable = g)
1253
+ }, null, 8, ["checked"])
1254
+ ]),
1255
+ _: 1
1256
+ /* STABLE */
1257
+ }),
1258
+ t(o, {
1259
+ label: "地址",
1260
+ name: "address"
1261
+ }, {
1262
+ default: n(() => [
1263
+ t(P, {
1264
+ value: a(s).address,
1265
+ "onUpdate:value": e[7] || (e[7] = (g) => a(s).address = g),
1266
+ maxlength: 200,
1267
+ "auto-size": { minRows: 2 },
1268
+ placeholder: "请输入地址",
1269
+ "allow-clear": "",
1270
+ "show-count": ""
1271
+ }, null, 8, ["value"])
1272
+ ]),
1273
+ _: 1
1274
+ /* STABLE */
1275
+ }),
1276
+ t(o, {
1277
+ label: "描述",
1278
+ name: "description"
1279
+ }, {
1280
+ default: n(() => [
1281
+ t(P, {
1282
+ value: a(s).description,
1283
+ "onUpdate:value": e[8] || (e[8] = (g) => a(s).description = g),
1284
+ maxlength: 255,
1285
+ "auto-size": { minRows: 2 },
1286
+ placeholder: "请输入描述",
1287
+ "allow-clear": "",
1288
+ "show-count": ""
1289
+ }, null, 8, ["value"])
1290
+ ]),
1291
+ _: 1
1292
+ /* STABLE */
1293
+ }),
1294
+ t(o, {
1295
+ label: "所属组织",
1296
+ name: "userOrgList"
1297
+ }, {
1298
+ default: n(() => [
1299
+ t(Jt, {
1300
+ modelValue: a(s).userOrgList,
1301
+ "onUpdate:modelValue": e[9] || (e[9] = (g) => a(s).userOrgList = g)
1302
+ }, null, 8, ["modelValue"])
1303
+ ]),
1304
+ _: 1
1305
+ /* STABLE */
1306
+ })
1307
+ ]),
1308
+ _: 1
1309
+ /* STABLE */
1310
+ }, 8, ["model"])
1311
+ ]),
1312
+ _: 1
1313
+ /* STABLE */
1314
+ }, 8, ["open", "title"]);
1315
+ };
1316
+ }
1317
+ }), ea = {
1318
+ "w-full": "",
1319
+ "h-full": "",
1320
+ "py-10px": "",
1321
+ "px-10px": "",
1322
+ "overflow-hidden": ""
1323
+ }, ta = ["onClick"], aa = ["onClick"], na = ["onClick"], oa = ["onClick"];
1324
+ function la(p) {
1325
+ return typeof p == "function" || Object.prototype.toString.call(p) === "[object Object]" && !qe(p);
1326
+ }
1327
+ const ha = /* @__PURE__ */ Q({
1328
+ name: "User",
1329
+ __name: "index",
1330
+ setup(p) {
1331
+ const {
1332
+ auth: E
1333
+ } = Ae(), A = [{
1334
+ valueType: "a-input",
1335
+ bind: "value",
1336
+ title: "登录账号",
1337
+ dataIndex: "loginName",
1338
+ ellipsis: !0,
1339
+ fieldProps: {
1340
+ placeholder: "请输入",
1341
+ allowClear: !0
1342
+ }
1343
+ }, {
1344
+ valueType: "a-input",
1345
+ bind: "value",
1346
+ title: "真实姓名",
1347
+ dataIndex: "realName",
1348
+ ellipsis: !0,
1349
+ fieldProps: {
1350
+ placeholder: "请输入",
1351
+ allowClear: !0
1352
+ }
1353
+ }, {
1354
+ title: "手机号",
1355
+ dataIndex: "mobile",
1356
+ ellipsis: !0,
1357
+ hideInSearch: !0
1358
+ }, {
1359
+ title: "组织名称",
1360
+ dataIndex: "userOrgList",
1361
+ ellipsis: !0,
1362
+ hideInSearch: !0,
1363
+ customRender({
1364
+ text: b
1365
+ }) {
1366
+ return t(ct, {
1367
+ placement: "topLeft",
1368
+ getPopupContainer: () => document.body
1369
+ }, {
1370
+ default: () => b == null ? void 0 : b.map((u) => u.orgName).join(","),
1371
+ content: () => {
1372
+ let u;
1373
+ return t(pt, {
1374
+ direction: "vertical"
1375
+ }, la(u = b.map((T) => t(oe, {
1376
+ status: T.main ? "processing" : "success",
1377
+ text: T.orgName
1378
+ }, null))) ? u : {
1379
+ default: () => [u]
1380
+ });
1381
+ }
1382
+ });
1383
+ }
1384
+ }, {
1385
+ title: "电子邮箱",
1386
+ dataIndex: "email",
1387
+ ellipsis: !0,
1388
+ hideInSearch: !0
1389
+ }, {
1390
+ title: "是否启用",
1391
+ dataIndex: "enable",
1392
+ width: 100,
1393
+ hideInSearch: !0,
1394
+ customRender({
1395
+ text: b
1396
+ }) {
1397
+ return b ? t(oe, {
1398
+ status: "success",
1399
+ text: "是"
1400
+ }, null) : t(oe, {
1401
+ status: "error",
1402
+ text: "否"
1403
+ }, null);
1404
+ }
1405
+ }, {
1406
+ title: "操作",
1407
+ dataIndex: "action",
1408
+ fixed: "right",
1409
+ width: 280,
1410
+ hideInSearch: !0,
1411
+ hideInTable() {
1412
+ return !E(["user_authorize", "user_reset_password", "user_edit", "user_remove"]);
1413
+ }
1414
+ }], F = $({}), z = $({}), O = $({}), D = $();
1415
+ async function _(b) {
1416
+ var h, r, e;
1417
+ const {
1418
+ current: u,
1419
+ pageSize: T,
1420
+ ...N
1421
+ } = b, B = await st({
1422
+ currentPage: u,
1423
+ pageSize: T,
1424
+ orgId: (h = F.value) == null ? void 0 : h.orgId,
1425
+ ...O.value,
1426
+ ...N
1427
+ });
1428
+ return {
1429
+ success: B.success,
1430
+ data: ((r = B.data) == null ? void 0 : r.records) ?? [],
1431
+ total: ((e = B.data) == null ? void 0 : e.total) ?? 0
1432
+ };
1433
+ }
1434
+ function s() {
1435
+ D.value.reload();
1436
+ }
1437
+ function v(b, {
1438
+ node: u
1439
+ }) {
1440
+ u.selected ? F.value = {} : F.value = {
1441
+ orgId: u.id,
1442
+ orgName: u.name
1443
+ }, s();
1444
+ }
1445
+ const m = $(), y = $();
1446
+ function x(b, u) {
1447
+ var T;
1448
+ switch (b) {
1449
+ case k.ADD:
1450
+ m.value.open(b);
1451
+ break;
1452
+ case k.AUTHORIZE:
1453
+ u && (z.value = u), y.value && y.value.open && y.value.open();
1454
+ break;
1455
+ case k.EDIT:
1456
+ m.value.open(b, u);
1457
+ break;
1458
+ case k.RESET_PASSWORD:
1459
+ ie.confirm({
1460
+ title: "重置密码",
1461
+ content: "确定要重置该用户密码吗?",
1462
+ async onOk() {
1463
+ (await it({
1464
+ userId: u == null ? void 0 : u.id
1465
+ })).success && ne.success("重置密码成功");
1466
+ }
1467
+ });
1468
+ break;
1469
+ case k.REMOVE: {
1470
+ const N = (u == null ? void 0 : u.userOrgList) && ((T = u.userOrgList) == null ? void 0 : T.length) > 1;
1471
+ ie.confirm({
1472
+ title: "删除",
1473
+ content: `确定要删除该用户吗?${N ? "该用户存在多个组织下,若只需移除组织,请在编辑中操作。" : ""}`,
1474
+ async onOk() {
1475
+ (await rt({
1476
+ userId: u == null ? void 0 : u.id
1477
+ })).success && (ne.success("删除成功"), s());
1478
+ }
1479
+ });
1480
+ break;
1481
+ }
1482
+ }
1483
+ }
1484
+ function I(b, u) {
1485
+ return u.userType === "2" ? [k.RESET_PASSWORD].includes(b) : [k.AUTHORIZE, k.RESET_PASSWORD, k.EDIT, k.REMOVE].includes(b);
1486
+ }
1487
+ return (b, u) => {
1488
+ const T = Pt, N = Te, B = Ve, h = te, r = fe, e = me, d = De, o = Ge("auth");
1489
+ return l(), S("div", ea, [t(d, {
1490
+ gutter: [8, 8],
1491
+ wrap: !1,
1492
+ class: "h-full"
1493
+ }, {
1494
+ default: n(() => [t(N, {
1495
+ flex: "320px",
1496
+ class: "h-full overflow-hidden"
1497
+ }, {
1498
+ default: n(() => [t(T, {
1499
+ "select-keys": [a(O).orgId],
1500
+ bordered: !1,
1501
+ auth: "organization",
1502
+ onSelect: v
1503
+ }, null, 8, ["select-keys"])]),
1504
+ _: 1
1505
+ /* STABLE */
1506
+ }), t(N, {
1507
+ flex: "auto",
1508
+ class: "h-full"
1509
+ }, {
1510
+ default: n(() => [t(a(ut), {
1511
+ ref_key: "tableRef",
1512
+ ref: D,
1513
+ "row-key": (c) => `${c.id}-${c.orgId}`,
1514
+ request: _,
1515
+ columns: A,
1516
+ scroll: {
1517
+ x: 800
1518
+ },
1519
+ "auto-height": ""
1520
+ }, {
1521
+ toolbar: n(() => [X((l(), R(h, {
1522
+ type: "primary",
1523
+ onClick: u[0] || (u[0] = (c) => x(a(k).ADD))
1524
+ }, {
1525
+ default: n(() => [t(B), j(
1526
+ " " + U(a(k).ADD),
1527
+ 1
1528
+ /* TEXT */
1529
+ )]),
1530
+ _: 1
1531
+ /* STABLE */
1532
+ })), [[o, "user_add"]])]),
1533
+ bodyCell: n(({
1534
+ column: c,
1535
+ record: f
1536
+ }) => [c.dataIndex === "action" ? (l(), R(
1537
+ e,
1538
+ {
1539
+ key: 0
1540
+ },
1541
+ {
1542
+ default: n(() => [I(a(k).AUTHORIZE, f) ? X((l(), S("a", {
1543
+ key: 0,
1544
+ class: "flex items-center",
1545
+ onClick: (P) => x(a(k).AUTHORIZE, f)
1546
+ }, [t(r, {
1547
+ name: "authorize",
1548
+ "mr-1": "",
1549
+ "text-base": ""
1550
+ }), w(
1551
+ "span",
1552
+ null,
1553
+ U(a(k).AUTHORIZE),
1554
+ 1
1555
+ /* TEXT */
1556
+ )], 8, ta)), [[o, "user_authorize"]]) : H("v-if", !0), I(a(k).RESET_PASSWORD, f) ? X((l(), S("a", {
1557
+ key: 1,
1558
+ class: "flex items-center",
1559
+ onClick: (P) => x(a(k).RESET_PASSWORD, f)
1560
+ }, [t(r, {
1561
+ name: "i-ci-arrows-reload-01",
1562
+ "mr-1": "",
1563
+ "text-base": ""
1564
+ }), w(
1565
+ "span",
1566
+ null,
1567
+ U(a(k).RESET_PASSWORD),
1568
+ 1
1569
+ /* TEXT */
1570
+ )], 8, aa)), [[o, "user_reset_password"]]) : H("v-if", !0), I(a(k).EDIT, f) ? X((l(), S("a", {
1571
+ key: 2,
1572
+ class: "flex items-center",
1573
+ onClick: (P) => x(a(k).EDIT, f)
1574
+ }, [t(r, {
1575
+ name: "edit",
1576
+ class: "mr-1 text-base"
1577
+ }), w(
1578
+ "span",
1579
+ null,
1580
+ U(a(k).EDIT),
1581
+ 1
1582
+ /* TEXT */
1583
+ )], 8, na)), [[o, "user_edit"]]) : H("v-if", !0), I(a(k).REMOVE, f) ? X((l(), S("span", {
1584
+ key: 3,
1585
+ class: "flex items-center text-red-500 hover:cursor-pointer hover:opacity-80",
1586
+ onClick: (P) => x(a(k).REMOVE, f)
1587
+ }, [t(r, {
1588
+ name: "remove",
1589
+ class: "mr-1 text-base"
1590
+ }), w(
1591
+ "span",
1592
+ null,
1593
+ U(a(k).REMOVE),
1594
+ 1
1595
+ /* TEXT */
1596
+ )], 8, oa)), [[o, "user_remove"]]) : H("v-if", !0)]),
1597
+ _: 2
1598
+ /* DYNAMIC */
1599
+ },
1600
+ 1024
1601
+ /* DYNAMIC_SLOTS */
1602
+ )) : H("v-if", !0)]),
1603
+ _: 1
1604
+ /* STABLE */
1605
+ }, 8, ["row-key"])]),
1606
+ _: 1
1607
+ /* STABLE */
1608
+ })]),
1609
+ _: 1
1610
+ /* STABLE */
1611
+ }), t(Yt, {
1612
+ ref_key: "editRef",
1613
+ ref: m,
1614
+ "current-org": a(F),
1615
+ onSubmit: s
1616
+ }, null, 8, ["current-org"]), t(Wt, {
1617
+ ref_key: "authorizationRef",
1618
+ ref: y,
1619
+ "user-id": a(z).id || ""
1620
+ }, null, 8, ["user-id"])]);
1621
+ };
1622
+ }
1623
+ });
1624
+ export {
1625
+ ha as default
1626
+ };