smart-admin-web 10.20.1 → 10.22.0

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 (165) hide show
  1. package/dist/api/index.d.ts +19 -1
  2. package/dist/api/index.js +85 -66
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/api/schema.d.ts +448 -1
  5. package/dist/assets/icons/ph-subset.json.js +1 -1
  6. package/dist/components/FormContainer/index.vue.js +87 -75
  7. package/dist/components/FormContainer/index.vue.js.map +1 -1
  8. package/dist/components/UserPicker/UserAvatar.vue.d.ts +8 -0
  9. package/dist/components/UserPicker/UserAvatar.vue.js +8 -0
  10. package/dist/components/UserPicker/UserAvatar.vue.js.map +1 -0
  11. package/dist/components/UserPicker/UserAvatar2.vue.js +38 -0
  12. package/dist/components/UserPicker/UserAvatar2.vue.js.map +1 -0
  13. package/dist/components/UserPicker/index.vue.js +1 -1
  14. package/dist/components/UserPicker/index2.vue.js +328 -186
  15. package/dist/components/UserPicker/index2.vue.js.map +1 -1
  16. package/dist/composables/authMenuRoute.d.ts +10 -0
  17. package/dist/composables/authMenuRoute.js +39 -23
  18. package/dist/composables/authMenuRoute.js.map +1 -1
  19. package/dist/composables/useModule.d.ts +3 -1
  20. package/dist/composables/useModule.js +44 -32
  21. package/dist/composables/useModule.js.map +1 -1
  22. package/dist/index.js +246 -242
  23. package/dist/layouts/components/SideNav.vue.js +2 -2
  24. package/dist/layouts/components/SideNav2.vue.js.map +1 -1
  25. package/dist/lib/runtime.js +1 -1
  26. package/dist/lib/watermark.d.ts +1 -1
  27. package/dist/locales/en-US.d.ts +68 -3
  28. package/dist/locales/en-US.js +74 -8
  29. package/dist/locales/en-US.js.map +1 -1
  30. package/dist/locales/kernelMenuTitles.js +1 -0
  31. package/dist/locales/kernelMenuTitles.js.map +1 -1
  32. package/dist/locales/zh-CN.d.ts +68 -3
  33. package/dist/locales/zh-CN.js +74 -8
  34. package/dist/locales/zh-CN.js.map +1 -1
  35. package/dist/router/viewRegistry.js +6 -6
  36. package/dist/router/viewRegistry.js.map +1 -1
  37. package/dist/style.css +1 -1
  38. package/dist/theme/naive-theme.js +80 -77
  39. package/dist/theme/naive-theme.js.map +1 -1
  40. package/dist/types/api.d.ts +91 -0
  41. package/dist/types/api.js +17 -15
  42. package/dist/types/api.js.map +1 -1
  43. package/dist/utils/shake.d.ts +1 -0
  44. package/dist/utils/shake.js +30 -0
  45. package/dist/utils/shake.js.map +1 -0
  46. package/dist/utils/tree.d.ts +15 -0
  47. package/dist/utils/tree.js +43 -29
  48. package/dist/utils/tree.js.map +1 -1
  49. package/dist/utils/treeCard.d.ts +6 -0
  50. package/dist/utils/treeCard.js +9 -0
  51. package/dist/utils/treeCard.js.map +1 -0
  52. package/dist/views/error/404.vue.js +2 -2
  53. package/dist/views/error/4042.vue.js +81 -24
  54. package/dist/views/error/4042.vue.js.map +1 -1
  55. package/dist/views/login/LoginForm.vue.js +2 -2
  56. package/dist/views/login/LoginForm2.vue.js +135 -135
  57. package/dist/views/login/LoginForm2.vue.js.map +1 -1
  58. package/dist/views/login/components/LoginDesk.vue.js +2 -2
  59. package/dist/views/login/components/LoginDesk2.vue.js +59 -47
  60. package/dist/views/login/components/LoginDesk2.vue.js.map +1 -1
  61. package/dist/views/login/components/LoginHeroPanel.vue.js +2 -2
  62. package/dist/views/login/components/LoginHeroPanel2.vue.js.map +1 -1
  63. package/dist/views/personal/notice2.vue.js +1 -1
  64. package/dist/views/personal/notice2.vue.js.map +1 -1
  65. package/dist/views/personal/sessions.vue.js +2 -2
  66. package/dist/views/personal/sessions2.vue.js +41 -40
  67. package/dist/views/personal/sessions2.vue.js.map +1 -1
  68. package/dist/views/system/ai-usage/index.vue.js +3 -3
  69. package/dist/views/system/ai-usage/index2.vue.js +13 -12
  70. package/dist/views/system/ai-usage/index2.vue.js.map +1 -1
  71. package/dist/views/system/config/components/AdvancedSection.vue.js +3 -3
  72. package/dist/views/system/config/components/AdvancedSection2.vue.js +2 -1
  73. package/dist/views/system/config/components/AdvancedSection2.vue.js.map +1 -1
  74. package/dist/views/system/dict/index.vue.js +2 -2
  75. package/dist/views/system/dict/index2.vue.js +12 -1
  76. package/dist/views/system/dict/index2.vue.js.map +1 -1
  77. package/dist/views/system/file/index2.vue.js +1 -0
  78. package/dist/views/system/file/index2.vue.js.map +1 -1
  79. package/dist/views/system/job/index.vue.js +3 -3
  80. package/dist/views/system/job/index2.vue.js +182 -181
  81. package/dist/views/system/job/index2.vue.js.map +1 -1
  82. package/dist/views/system/job-log/components/AttemptTable2.vue.js +8 -3
  83. package/dist/views/system/job-log/components/AttemptTable2.vue.js.map +1 -1
  84. package/dist/views/system/job-log/index.vue.js +1 -1
  85. package/dist/views/system/job-log/index2.vue.js +5 -5
  86. package/dist/views/system/job-log/index2.vue.js.map +1 -1
  87. package/dist/views/system/job-monitor/index.vue.js +2 -2
  88. package/dist/views/system/job-monitor/index2.vue.js +46 -46
  89. package/dist/views/system/job-monitor/index2.vue.js.map +1 -1
  90. package/dist/views/system/log/exception/index.vue.js +2 -2
  91. package/dist/views/system/log/exception/index2.vue.js +8 -5
  92. package/dist/views/system/log/exception/index2.vue.js.map +1 -1
  93. package/dist/views/system/log/login/index2.vue.js +21 -12
  94. package/dist/views/system/log/login/index2.vue.js.map +1 -1
  95. package/dist/views/system/log/op/index.vue.js +2 -2
  96. package/dist/views/system/log/op/index2.vue.js +50 -40
  97. package/dist/views/system/log/op/index2.vue.js.map +1 -1
  98. package/dist/views/system/menu/components/ButtonManager.vue.js +2 -2
  99. package/dist/views/system/menu/components/ButtonManager2.vue.js +45 -36
  100. package/dist/views/system/menu/components/ButtonManager2.vue.js.map +1 -1
  101. package/dist/views/system/menu/index.vue.js +1 -1
  102. package/dist/views/system/menu/index2.vue.js +162 -151
  103. package/dist/views/system/menu/index2.vue.js.map +1 -1
  104. package/dist/views/system/module/index.vue.js +1 -1
  105. package/dist/views/system/module/index2.vue.js +171 -117
  106. package/dist/views/system/module/index2.vue.js.map +1 -1
  107. package/dist/views/system/notice/index.vue.js +3 -3
  108. package/dist/views/system/notice/index2.vue.js +1 -0
  109. package/dist/views/system/notice/index2.vue.js.map +1 -1
  110. package/dist/views/system/org/index.vue.js +2 -2
  111. package/dist/views/system/org/index2.vue.js +204 -195
  112. package/dist/views/system/org/index2.vue.js.map +1 -1
  113. package/dist/views/system/position/index.vue.js +2 -2
  114. package/dist/views/system/position/index2.vue.js +57 -48
  115. package/dist/views/system/position/index2.vue.js.map +1 -1
  116. package/dist/views/system/recycle/index.vue.js +1 -1
  117. package/dist/views/system/recycle/index2.vue.js +3 -1
  118. package/dist/views/system/recycle/index2.vue.js.map +1 -1
  119. package/dist/views/system/role/components/GrantMenuSheet.vue.d.ts +2 -0
  120. package/dist/views/system/role/components/GrantMenuSheet.vue.js +2 -2
  121. package/dist/views/system/role/components/GrantMenuSheet2.vue.js +54 -49
  122. package/dist/views/system/role/components/GrantMenuSheet2.vue.js.map +1 -1
  123. package/dist/views/system/role/components/GrantMenuTable.vue.js +1 -1
  124. package/dist/views/system/role/components/GrantMenuTable2.vue.js +159 -195
  125. package/dist/views/system/role/components/GrantMenuTable2.vue.js.map +1 -1
  126. package/dist/views/system/role/components/grantMenuGroups.d.ts +54 -0
  127. package/dist/views/system/role/components/grantMenuGroups.js +116 -76
  128. package/dist/views/system/role/components/grantMenuGroups.js.map +1 -1
  129. package/dist/views/system/role/index.vue.js +2 -2
  130. package/dist/views/system/role/index2.vue.js +152 -145
  131. package/dist/views/system/role/index2.vue.js.map +1 -1
  132. package/dist/views/system/session/index2.vue.js +39 -35
  133. package/dist/views/system/session/index2.vue.js.map +1 -1
  134. package/dist/views/system/user/components/UserGrantEffectiveTable.vue.d.ts +10 -0
  135. package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js +5 -0
  136. package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js.map +1 -0
  137. package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js +96 -0
  138. package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js.map +1 -0
  139. package/dist/views/system/user/components/UserGrantMenuSheet.vue.d.ts +13 -0
  140. package/dist/views/system/user/components/UserGrantMenuSheet.vue.js +8 -0
  141. package/dist/views/system/user/components/UserGrantMenuSheet.vue.js.map +1 -0
  142. package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js +216 -0
  143. package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js.map +1 -0
  144. package/dist/views/system/user/components/UserGrantMenuTable.vue.d.ts +13 -0
  145. package/dist/views/system/user/components/UserGrantMenuTable.vue.js +8 -0
  146. package/dist/views/system/user/components/UserGrantMenuTable.vue.js.map +1 -0
  147. package/dist/views/system/user/components/UserGrantMenuTable2.vue.js +186 -0
  148. package/dist/views/system/user/components/UserGrantMenuTable2.vue.js.map +1 -0
  149. package/dist/views/system/user/components/UserGrantNodeRow.vue.d.ts +31 -0
  150. package/dist/views/system/user/components/UserGrantNodeRow.vue.js +8 -0
  151. package/dist/views/system/user/components/UserGrantNodeRow.vue.js.map +1 -0
  152. package/dist/views/system/user/components/UserGrantNodeRow2.vue.js +171 -0
  153. package/dist/views/system/user/components/UserGrantNodeRow2.vue.js.map +1 -0
  154. package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.d.ts +21 -0
  155. package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js +5 -0
  156. package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js.map +1 -0
  157. package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js +178 -0
  158. package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js.map +1 -0
  159. package/dist/views/system/user/components/userGrantState.d.ts +64 -0
  160. package/dist/views/system/user/components/userGrantState.js +117 -0
  161. package/dist/views/system/user/components/userGrantState.js.map +1 -0
  162. package/dist/views/system/user/index.vue.js +2 -2
  163. package/dist/views/system/user/index2.vue.js +369 -295
  164. package/dist/views/system/user/index2.vue.js.map +1 -1
  165. package/package.json +3 -3
@@ -1,330 +1,365 @@
1
- import { defineComponent as Ee, ref as n, computed as f, watch as F, onMounted as Ne, h as d, resolveDirective as Se, openBlock as x, createElementBlock as oe, Fragment as Te, createVNode as l, unref as a, withCtx as i, createElementVNode as h, createBlock as B, createTextVNode as P, toDisplayString as E, createCommentVNode as ae, normalizeClass as Ae, createSlots as Ce, withDirectives as le } from "vue";
2
- import { useElementSize as Pe, createReusableTemplate as Ie } from "@vueuse/core";
3
- import { useRoute as Oe } from "vue-router";
4
- import { useMessage as _e, NAvatar as ze, NTag as Me, NSpace as Re, NButton as w, NPopconfirm as De, NDropdown as Ue, NTooltip as Fe, NInput as Be, NSpin as Le, NTree as qe, NDrawer as $e, NDrawerContent as Ke } from "naive-ui";
5
- import { useI18n as He } from "vue-i18n";
6
- import { SmartTable as Ve } from "smart-naive-table";
7
- import v from "../../../components/AppIcon.vue.js";
8
- import Ge from "../../../components/StatusSwitch/index.vue.js";
9
- import We from "../../../components/DictTag/index.vue.js";
10
- import je from "../../../components/ImportWizard/index.vue.js";
11
- import Je from "../../../components/ExportColumnsModal/index.vue.js";
12
- import Qe from "./components/UserFormModal.vue.js";
13
- import Xe from "./components/ResetPasswordModal.vue.js";
14
- import { useConfirm as Ye } from "../../../composables/useConfirm.js";
15
- import { useBatchDelete as Ze } from "../../../composables/useBatchDelete.js";
16
- import { userApi as m, positionApi as er, roleApi as rr, orgApi as tr, mfaApi as or } from "../../../api/index.js";
17
- import { useAuthStore as ar } from "../../../stores/auth.js";
18
- import { translateError as se } from "../../../utils/error.js";
19
- import { presetEqualFilter as lr, SEARCH_ACTIONS as L, deriveHeaderFilters as sr, flatSearchOf as nr } from "../../../utils/tableFilter.js";
20
- import { TABLE_TOOLBAR as ir, TABLE_MIN_ROW_HEIGHT as ur } from "../../../utils/tableToolbar.js";
21
- import dr from "../../../components/TableTotal/index.vue.js";
22
- import { triggerBlobDownload as mr } from "../../../utils/download.js";
23
- import { buildTree as pr, expandableIds as cr } from "../../../utils/tree.js";
24
- const fr = { class: "side-filter__head" }, vr = { class: "side-filter__actions" }, yr = { class: "side-row__label" }, gr = {
1
+ import { defineComponent as Fe, ref as n, computed as p, watch as pe, onMounted as Le, h as d, resolveDirective as Ge, openBlock as y, createElementBlock as j, Fragment as Be, createVNode as s, unref as a, withCtx as i, createElementVNode as g, toDisplayString as b, createCommentVNode as T, createBlock as N, createTextVNode as P, normalizeClass as J, createSlots as $e, withDirectives as ce } from "vue";
2
+ import { useElementSize as Ke, useStorage as qe, createReusableTemplate as He } from "@vueuse/core";
3
+ import { useRoute as Ve } from "vue-router";
4
+ import { useMessage as We, NAvatar as je, NTag as Je, NSpace as Qe, NButton as k, NPopconfirm as Xe, NDropdown as Ye, NTooltip as me, NInput as Ze, NSpin as et, NTree as tt, NDrawer as rt, NDrawerContent as ot } from "naive-ui";
5
+ import { useI18n as at } from "vue-i18n";
6
+ import { SmartTable as lt } from "smart-naive-table";
7
+ import m from "../../../components/AppIcon.vue.js";
8
+ import st from "../../../components/StatusSwitch/index.vue.js";
9
+ import nt from "../../../components/DictTag/index.vue.js";
10
+ import it from "../../../components/ImportWizard/index.vue.js";
11
+ import ut from "../../../components/ExportColumnsModal/index.vue.js";
12
+ import dt from "./components/UserFormModal.vue.js";
13
+ import pt from "./components/ResetPasswordModal.vue.js";
14
+ import ct from "./components/UserGrantMenuSheet.vue.js";
15
+ import mt from "./components/UserGrantOverviewDrawer2.vue.js";
16
+ import { useConfirm as ft } from "../../../composables/useConfirm.js";
17
+ import { useBatchDelete as vt } from "../../../composables/useBatchDelete.js";
18
+ import { userApi as c, positionApi as gt, roleApi as ht, orgApi as yt, mfaApi as wt } from "../../../api/index.js";
19
+ import { useAuthStore as bt } from "../../../stores/auth.js";
20
+ import { useUserStore as kt } from "../../../stores/user.js";
21
+ import { translateError as fe } from "../../../utils/error.js";
22
+ import { presetEqualFilter as St, SEARCH_ACTIONS as Q, deriveHeaderFilters as xt, flatSearchOf as _t } from "../../../utils/tableFilter.js";
23
+ import { TABLE_TOOLBAR as Et, TABLE_MIN_ROW_HEIGHT as Ot } from "../../../utils/tableToolbar.js";
24
+ import Tt from "../../../components/TableTotal/index.vue.js";
25
+ import { triggerBlobDownload as Nt } from "../../../utils/download.js";
26
+ import { buildTree as Pt, expandableIds as It, rootExpandableIds as Ct } from "../../../utils/tree.js";
27
+ const At = { class: "side-filter__head" }, Rt = {
25
28
  key: 0,
26
- class: "side-filter"
27
- }, hr = { class: "org-drawer-body" }, wr = 1e3, Hr = /* @__PURE__ */ Ee({
29
+ class: "side-filter__title"
30
+ }, zt = { class: "side-filter__actions" }, Mt = ["aria-label"], Ut = ["aria-label"], Dt = { class: "side-row__label" }, Ft = ["inert"], Lt = { class: "org-drawer-body" }, Gt = 1e3, Bt = 15, vr = /* @__PURE__ */ Fe({
28
31
  __name: "index",
29
- setup(br) {
30
- const { t } = He(), I = _e(), { run: ne, confirm: ie } = Ye(), y = ar(), p = n(), { checkedKeys: q, run: ue } = Ze({
31
- remove: m.batchRemove,
32
+ setup($t) {
33
+ const { t: r } = at(), M = We(), { run: ve, confirm: ge } = ft(), f = bt(), v = n(), { checkedKeys: X, run: he } = vt({
34
+ remove: c.batchRemove,
32
35
  refresh: () => {
33
36
  var e;
34
- return (e = p.value) == null ? void 0 : e.refresh();
37
+ return (e = v.value) == null ? void 0 : e.refresh();
35
38
  },
36
- successMsg: t("user.deleted")
37
- }), O = n(null), _ = n(null), N = n(!1);
38
- async function de(e) {
39
- var r;
40
- N.value = !0;
39
+ successMsg: r("user.deleted")
40
+ }), U = n(null), D = n(null), F = n(null), ye = kt(), we = p(() => {
41
+ var e;
42
+ return (e = ye.userInfo) == null ? void 0 : e.userId;
43
+ }), I = n(!1);
44
+ async function be(e) {
45
+ var t;
46
+ I.value = !0;
41
47
  try {
42
- await ie({
43
- content: t("user.clearMfaConfirm", { name: e.name }),
44
- action: () => or.clear({ userId: e.id }),
45
- successMsg: t("user.mfaCleared")
46
- }) && ((r = p.value) == null || r.refresh());
48
+ await ge({
49
+ content: r("user.clearMfaConfirm", { name: e.name }),
50
+ action: () => wt.clear({ userId: e.id }),
51
+ successMsg: r("user.mfaCleared")
52
+ }) && ((t = v.value) == null || t.refresh());
47
53
  } finally {
48
- N.value = !1;
54
+ I.value = !1;
49
55
  }
50
56
  }
51
- const $ = n([]), z = n([]), K = n([]), S = n([]), H = n(!0), V = f(() => pr(S.value)), c = n(null), G = f(
52
- () => c.value == null ? {} : { orgId: c.value }
57
+ const Y = n([]), L = n([]), Z = n([]), S = n([]), ee = n(!0), G = p(() => Pt(S.value)), h = n(null), te = p(
58
+ () => h.value == null ? {} : { orgId: h.value }
53
59
  );
54
- function me(e) {
55
- Q(e.length ? Number(e[0]) : null);
60
+ function ke(e) {
61
+ ae(e.length ? Number(e[0]) : null);
62
+ }
63
+ const re = n(), { width: oe } = Ke(re), x = p(() => oe.value > 0 && oe.value < Gt), C = n(!1), _ = qe("sa-user-org-panel-hidden", !1);
64
+ function ae(e) {
65
+ h.value = e, C.value = !1;
56
66
  }
57
- const W = n(), { width: j } = Pe(W), J = f(() => j.value > 0 && j.value < wr), T = n(!1);
58
- function Q(e) {
59
- c.value = e, T.value = !1;
67
+ function Se() {
68
+ x.value ? C.value = !0 : _.value = !1;
60
69
  }
61
- const [pe, X] = Ie(), ce = f(
70
+ const [xe, le] = He(), _e = p(
62
71
  () => {
63
72
  var e;
64
- return ((e = S.value.find((r) => r.id === c.value)) == null ? void 0 : e.name) ?? t("user.orgFilter");
73
+ return ((e = S.value.find((t) => t.id === h.value)) == null ? void 0 : e.name) ?? r("user.orgFilter");
65
74
  }
66
- ), M = n("");
67
- function fe(e, r) {
75
+ ), Ee = p(() => S.value.length > Bt), B = n(""), Oe = () => d(m, { icon: "ph:caret-right", size: 12 });
76
+ function Te(e, t) {
68
77
  const u = e.trim().toLowerCase();
69
78
  if (!u) return !0;
70
- const o = r;
79
+ const o = t;
71
80
  return o.name.toLowerCase().includes(u) || (o.code ?? "").toLowerCase().includes(u);
72
81
  }
73
- const g = n([]), b = f(() => cr(V.value)), A = f(
74
- () => b.value.length > 0 && g.value.length >= b.value.length
82
+ const w = n([]), A = p(() => It(G.value)), $ = p(() => Ct(G.value)), K = p(
83
+ () => A.value.length > 0 && w.value.length >= A.value.length
84
+ ), Ne = p(
85
+ () => A.value.length > $.value.length
86
+ ), se = p(
87
+ () => K.value ? r("user.collapseToFirstLevel") : r("common.expandAll")
75
88
  );
76
- function ve() {
77
- g.value = A.value ? [] : [...b.value];
89
+ function Pe() {
90
+ w.value = K.value ? [...$.value] : [...A.value];
78
91
  }
79
- F(b, (e) => g.value = e, { immediate: !0 }), F(c, (e) => {
80
- var s;
92
+ pe(h, (e) => {
93
+ var l;
81
94
  if (e == null) return;
82
- const r = new Map(S.value.map((te) => [te.id, te])), u = new Set(g.value);
83
- let o = ((s = r.get(e)) == null ? void 0 : s.parentId) ?? 0;
84
- for (; o && r.has(o); )
85
- u.add(o), o = r.get(o).parentId;
86
- g.value = [...u];
87
- }), Ne(async () => {
95
+ const t = new Map(S.value.map((O) => [O.id, O])), u = new Set(w.value);
96
+ let o = ((l = t.get(e)) == null ? void 0 : l.parentId) ?? 0;
97
+ for (; o && t.has(o); )
98
+ u.add(o), o = t.get(o).parentId;
99
+ w.value = [...u];
100
+ }), Le(async () => {
88
101
  try {
89
- const { items: e } = await er.page({ page: 1, pageSize: 200 });
90
- $.value = e.map((r) => ({ label: r.name, value: r.id }));
102
+ const { items: e } = await gt.page({ page: 1, pageSize: 200 });
103
+ Y.value = e.map((t) => ({ label: t.name, value: t.id }));
91
104
  } catch {
92
105
  }
93
106
  try {
94
- const { items: e } = await rr.page({ page: 1, pageSize: 200 });
95
- z.value = e.map((r) => ({ label: r.name, value: r.id }));
107
+ const { items: e } = await ht.page({ page: 1, pageSize: 200 });
108
+ L.value = e.map((t) => ({ label: t.name, value: t.id }));
96
109
  } catch {
97
110
  }
98
111
  try {
99
- const { items: e } = await m.page({ page: 1, pageSize: 200 });
100
- K.value = e.map((r) => ({ label: `${r.name}(${r.account})`, value: r.id }));
112
+ const { items: e } = await c.page({ page: 1, pageSize: 200 });
113
+ Z.value = e.map((t) => ({ label: `${t.name}(${t.account})`, value: t.id }));
101
114
  } catch {
102
115
  }
103
116
  try {
104
- S.value = await tr.list();
117
+ S.value = await yt.list(), w.value = [...$.value];
105
118
  } catch {
106
119
  } finally {
107
- H.value = !1;
120
+ ee.value = !1;
108
121
  }
109
122
  });
110
- const Y = Oe();
111
- F(
112
- [p, () => Y.query.roleId],
113
- ([e, r]) => {
114
- e && Y.path === "/system/user" && lr(e, "roleId", r == null ? void 0 : Number(r));
123
+ const ne = Ve();
124
+ pe(
125
+ [v, () => ne.query.roleId],
126
+ ([e, t]) => {
127
+ e && ne.path === "/system/user" && St(e, "roleId", t == null ? void 0 : Number(t));
115
128
  },
116
129
  { immediate: !0 }
117
130
  );
118
- const Z = (e) => (e || "?").slice(0, 1), R = n(!1), C = n(!1), D = n(!1), ye = f(
131
+ const ie = (e) => (e || "?").slice(0, 1), q = n(!1), R = n(!1), H = n(!1), z = n(!1), ue = n(null);
132
+ function Ie() {
133
+ var e, t;
134
+ (e = v.value) == null || e.refresh(), z.value && ((t = ue.value) == null || t.refresh());
135
+ }
136
+ const Ce = p(
119
137
  () => [
120
- y.hasPerm("POST:/api/v1/sys/user/import/preview") ? { label: t("import.button"), key: "import" } : null,
121
- y.hasPerm("GET:/api/v1/sys/user/export") ? { label: t("export.button"), key: "export" } : null
138
+ f.hasPerm("POST:/api/v1/sys/user/import/preview") ? { label: r("import.button"), key: "import" } : null,
139
+ f.hasPerm("GET:/api/v1/sys/user/export") ? { label: r("export.button"), key: "export" } : null,
140
+ f.hasPerm("GET:/api/v1/sys/user/menu-grants/page") ? { label: r("userGrant.overview"), key: "grantOverview" } : null
122
141
  ].filter((e) => e !== null)
123
- ), ge = f(() => ({ ...ir, more: ye.value }));
124
- function he(e) {
125
- e === "import" ? R.value = !0 : e === "export" && (C.value = !0);
142
+ ), Ae = p(() => ({ ...Et, more: Ce.value }));
143
+ function Re(e) {
144
+ e === "import" ? q.value = !0 : e === "export" ? R.value = !0 : e === "grantOverview" && (z.value = !0);
126
145
  }
127
- const we = [
128
- { key: "Account", title: t("userExport.account") },
129
- { key: "Name", title: t("userExport.name") },
130
- { key: "Nickname", title: t("userExport.nickname") },
131
- { key: "Phone", title: t("userExport.phone") },
132
- { key: "Email", title: t("userExport.email") },
133
- { key: "Gender", title: t("userExport.gender") },
134
- { key: "OrgName", title: t("userExport.orgName") },
135
- { key: "PositionName", title: t("userExport.positionName") },
136
- { key: "DirectorName", title: t("userExport.directorName") },
137
- { key: "Enabled", title: t("userExport.enabled") },
138
- { key: "IsSuperAdmin", title: t("userExport.superAdmin"), defaultSelected: !1 },
139
- { key: "CreateTime", title: t("userExport.createTime") }
140
- ], be = {
141
- downloadTemplate: () => m.importTemplate(),
142
- preview: (e, r) => m.importPreview(e, r),
143
- validate: (e) => m.importValidate(e),
144
- commit: (e, r) => m.importCommit(e, r),
145
- errorReport: (e) => m.importErrorReport(e)
146
- }, U = n(null);
147
- function ke(e) {
148
- const r = Array.isArray(e) ? e[0] : e;
149
- U.value = r && r.order ? { field: String(r.columnKey), order: r.order === "ascend" ? "asc" : "desc" } : null;
146
+ const ze = [
147
+ { key: "Account", title: r("userExport.account") },
148
+ { key: "Name", title: r("userExport.name") },
149
+ { key: "Nickname", title: r("userExport.nickname") },
150
+ { key: "Phone", title: r("userExport.phone") },
151
+ { key: "Email", title: r("userExport.email") },
152
+ { key: "Gender", title: r("userExport.gender") },
153
+ { key: "OrgName", title: r("userExport.orgName") },
154
+ { key: "PositionName", title: r("userExport.positionName") },
155
+ { key: "DirectorName", title: r("userExport.directorName") },
156
+ { key: "Enabled", title: r("userExport.enabled") },
157
+ { key: "IsSuperAdmin", title: r("userExport.superAdmin"), defaultSelected: !1 },
158
+ { key: "CreateTime", title: r("userExport.createTime") }
159
+ ], Me = {
160
+ downloadTemplate: () => c.importTemplate(),
161
+ preview: (e, t) => c.importPreview(e, t),
162
+ validate: (e) => c.importValidate(e),
163
+ commit: (e, t) => c.importCommit(e, t),
164
+ errorReport: (e) => c.importErrorReport(e)
165
+ }, V = n(null);
166
+ function Ue(e) {
167
+ const t = Array.isArray(e) ? e[0] : e;
168
+ V.value = t && t.order ? { field: String(t.columnKey), order: t.order === "ascend" ? "asc" : "desc" } : null;
150
169
  }
151
- async function xe(e) {
170
+ async function De(e) {
152
171
  var u, o;
153
- const r = nr(p.value);
154
- D.value = !0;
172
+ const t = _t(v.value);
173
+ H.value = !0;
155
174
  try {
156
- const s = await m.export({
157
- account: r.account || void 0,
158
- name: r.name || void 0,
159
- orgId: G.value.orgId,
160
- roleId: r.roleId != null ? Number(r.roleId) : void 0,
161
- sortField: (u = U.value) == null ? void 0 : u.field,
162
- sortOrder: (o = U.value) == null ? void 0 : o.order,
175
+ const l = await c.export({
176
+ account: t.account || void 0,
177
+ name: t.name || void 0,
178
+ orgId: te.value.orgId,
179
+ roleId: t.roleId != null ? Number(t.roleId) : void 0,
180
+ sortField: (u = V.value) == null ? void 0 : u.field,
181
+ sortOrder: (o = V.value) == null ? void 0 : o.order,
163
182
  columns: e.join(",")
164
183
  });
165
- mr(s, t("userExport.fileName")), C.value = !1, I.success(t("export.done"));
166
- } catch (s) {
167
- I.error(se(s));
184
+ Nt(l, r("userExport.fileName")), R.value = !1, M.success(r("export.done"));
185
+ } catch (l) {
186
+ M.error(fe(l));
168
187
  } finally {
169
- D.value = !1;
188
+ H.value = !1;
170
189
  }
171
190
  }
172
- const k = () => d("span", { class: "faint" }, "—"), ee = (e) => () => d(v, { icon: e, size: 16 }), re = [
173
- { type: "index", title: () => t("common.rowNo"), width: 64, align: "center" },
191
+ const E = () => d("span", { class: "faint" }, "—"), W = (e) => () => d(m, { icon: e, size: 16 }), de = [
192
+ { type: "index", title: () => r("common.rowNo"), width: 64, align: "center" },
174
193
  // 超管行禁勾:批量删除同样不可含超管(后端也会整体拒绝)
175
194
  { type: "selection", disabled: (e) => e.isSuperAdmin },
176
195
  {
177
196
  key: "avatar",
178
- title: () => t("user.avatar"),
197
+ title: () => r("user.avatar"),
179
198
  width: 64,
180
199
  align: "center",
181
200
  hideInSetting: !1,
182
201
  card: !1,
183
202
  // 窄档卡片的标题是姓名,头像不进卡片
184
203
  render: (e) => d(
185
- ze,
204
+ je,
186
205
  { round: !0, size: "small", src: e.avatar || void 0 },
187
- e.avatar ? { fallback: () => Z(e.name) } : { default: () => Z(e.name) }
206
+ e.avatar ? { fallback: () => ie(e.name) } : { default: () => ie(e.name) }
188
207
  )
189
208
  },
190
209
  {
191
210
  key: "account",
192
- title: () => t("user.account"),
193
- search: { actions: L.fuzzy },
211
+ ellipsis: { tooltip: !0 },
212
+ title: () => r("user.account"),
213
+ search: { actions: Q.fuzzy },
194
214
  sorter: !0
195
215
  },
196
216
  {
197
217
  key: "name",
198
- title: () => t("user.name"),
218
+ ellipsis: { tooltip: !0 },
219
+ title: () => r("user.name"),
199
220
  card: "title",
200
- search: { actions: L.fuzzy },
221
+ search: { actions: Q.fuzzy },
201
222
  sorter: !0
202
223
  },
203
224
  {
204
225
  key: "phone",
205
- title: () => t("user.phone"),
226
+ width: 130,
227
+ ellipsis: { tooltip: !0 },
228
+ title: () => r("user.phone"),
206
229
  sorter: !0,
207
- render: (e) => e.phone ? d("span", { class: "num" }, e.phone) : k()
230
+ render: (e) => e.phone ? d("span", { class: "num" }, e.phone) : E()
208
231
  },
209
232
  {
210
233
  key: "gender",
211
- title: () => t("user.gender"),
234
+ title: () => r("user.gender"),
212
235
  width: 80,
213
236
  hideInTable: !0,
214
237
  // 次要列:默认隐藏收窄整表,列设置抽屉可打开
215
- render: (e) => e.gender ? d(We, { typeCode: "gender", value: e.gender }) : k()
238
+ render: (e) => e.gender ? d(nt, { typeCode: "gender", value: e.gender }) : E()
216
239
  },
217
240
  // 只作搜索项,不进表格也不进列设置。options 直接吃编辑表单已拉好的 roleOptions(SmartTable 支持 Ref 选项源),不额外发请求;
218
241
  // 列上有 options,搜索控件自动是 select。
219
242
  {
220
243
  key: "roleId",
221
- title: () => t("user.roles"),
244
+ title: () => r("user.roles"),
222
245
  hideInTable: !0,
223
- options: z,
224
- search: { actions: L.exact, props: { clearable: !0 } }
246
+ options: L,
247
+ search: { actions: Q.exact, props: { clearable: !0 } }
248
+ },
249
+ {
250
+ key: "orgName",
251
+ ellipsis: { tooltip: !0 },
252
+ title: () => r("user.org"),
253
+ render: (e) => e.orgName || E()
225
254
  },
226
- { key: "orgName", title: () => t("user.org"), render: (e) => e.orgName || k() },
227
255
  {
228
256
  key: "positionName",
229
- title: () => t("user.position"),
257
+ title: () => r("user.position"),
230
258
  hideInTable: !0,
231
- render: (e) => e.positionName || k()
259
+ render: (e) => e.positionName || E()
232
260
  },
233
261
  {
234
262
  key: "enabled",
235
- title: () => t("user.status"),
263
+ title: () => r("user.status"),
236
264
  width: 90,
237
265
  sorter: !0,
238
- render: (e) => d(Ge, {
266
+ render: (e) => d(st, {
239
267
  value: e.enabled,
240
268
  // 超管不可停用(防自锁 —— 停了就没法从 UI 恢复;后端也保护);无启停权限亦置灰。
241
- disabled: e.isSuperAdmin || !y.hasPerm("PUT:/api/v1/sys/user/{id}/enabled"),
242
- confirm: (r) => r ? null : t("user.disableConfirm", { name: e.name }),
243
- request: (r) => m.setEnabled(e.id, r),
244
- "onUpdate:value": (r) => {
245
- e.enabled = r;
269
+ disabled: e.isSuperAdmin || !f.hasPerm("PUT:/api/v1/sys/user/{id}/enabled"),
270
+ confirm: (t) => t ? null : r("user.disableConfirm", { name: e.name }),
271
+ request: (t) => c.setEnabled(e.id, t),
272
+ "onUpdate:value": (t) => {
273
+ e.enabled = t;
246
274
  }
247
275
  })
248
276
  },
249
277
  {
250
278
  key: "isSuperAdmin",
251
- title: () => t("user.superAdmin"),
279
+ title: () => r("user.superAdmin"),
252
280
  width: 90,
253
- render: (e) => e.isSuperAdmin ? d(Me, { type: "warning", size: "small", bordered: !1 }, () => t("user.superAdmin")) : k()
281
+ render: (e) => e.isSuperAdmin ? d(Je, { type: "warning", size: "small", bordered: !1 }, () => r("user.superAdmin")) : E()
282
+ },
283
+ {
284
+ key: "createTime",
285
+ width: 170,
286
+ title: () => r("user.createTime"),
287
+ format: "datetime",
288
+ sorter: !0
254
289
  },
255
- { key: "createTime", title: () => t("user.createTime"), format: "datetime", sorter: !0 },
256
290
  // 操作:编辑/删除外露;重置密码、解绑验证器进「更多」(放操作列末尾)。
257
291
  // width 须够「编辑+删除+更多」单行;wrap:false 禁止 NSpace 默认换行(否则「更多」掉到删除下一行)。
258
292
  {
259
293
  key: "op",
260
- title: () => t("common.operation"),
294
+ title: () => r("common.operation"),
261
295
  width: 200,
262
296
  fixed: "right",
263
297
  // 钉右:横向滚动时操作列始终可见
264
298
  hideInSetting: !0,
265
299
  render: (e) => {
266
300
  const u = [
267
- y.hasPerm("PUT:/api/v1/sys/user/{id}/password") ? { key: "resetPassword", label: t("user.resetPassword"), icon: ee("ph:key") } : null,
268
- e.totpEnabled && y.hasPerm("POST:/api/v1/sys/mfa/clear") ? {
301
+ f.hasPerm("PUT:/api/v1/sys/user/menu") && !e.isSuperAdmin && e.id !== we.value ? { key: "grantMenus", label: r("userGrant.action"), icon: W("ph:list-checks") } : null,
302
+ f.hasPerm("PUT:/api/v1/sys/user/{id}/password") ? { key: "resetPassword", label: r("user.resetPassword"), icon: W("ph:key") } : null,
303
+ e.totpEnabled && f.hasPerm("POST:/api/v1/sys/mfa/clear") ? {
269
304
  key: "clearMfa",
270
- label: t("user.clearMfa"),
271
- icon: ee("ph:link-break"),
272
- disabled: N.value
305
+ label: r("user.clearMfa"),
306
+ icon: W("ph:link-break"),
307
+ disabled: I.value
273
308
  } : null
274
309
  ].filter((o) => o !== null);
275
- return d(Re, { size: 4, wrap: !1, wrapItem: !1 }, () => [
276
- y.hasPerm("PUT:/api/v1/sys/user/{id}") ? d(
277
- w,
310
+ return d(Qe, { size: 4, wrap: !1, wrapItem: !1 }, () => [
311
+ f.hasPerm("PUT:/api/v1/sys/user/{id}") ? d(
312
+ k,
278
313
  {
279
314
  size: "small",
280
315
  quaternary: !0,
281
316
  type: "primary",
282
317
  onClick: () => {
283
318
  var o;
284
- return (o = O.value) == null ? void 0 : o.openEdit(e);
319
+ return (o = U.value) == null ? void 0 : o.openEdit(e);
285
320
  }
286
321
  },
287
- () => t("common.edit")
322
+ () => r("common.edit")
288
323
  ) : null,
289
- e.isSuperAdmin || !y.hasPerm("DELETE:/api/v1/sys/user/{id}") ? null : d(
290
- De,
324
+ e.isSuperAdmin || !f.hasPerm("DELETE:/api/v1/sys/user/{id}") ? null : d(
325
+ Xe,
291
326
  {
292
- onPositiveClick: () => ne(() => m.remove(e.id), t("user.deleted")).then((o) => {
293
- var s;
294
- o && ((s = p.value) == null || s.refresh());
327
+ onPositiveClick: () => ve(() => c.remove(e.id), r("user.deleted")).then((o) => {
328
+ var l;
329
+ o && ((l = v.value) == null || l.refresh());
295
330
  })
296
331
  },
297
332
  {
298
333
  trigger: () => d(
299
- w,
334
+ k,
300
335
  { size: "small", quaternary: !0, type: "error" },
301
- () => t("common.delete")
336
+ () => r("common.delete")
302
337
  ),
303
- default: () => t("user.deleteConfirm", { name: e.name })
338
+ default: () => r("user.deleteConfirm", { name: e.name })
304
339
  }
305
340
  ),
306
341
  u.length ? d(
307
- Ue,
342
+ Ye,
308
343
  {
309
344
  trigger: "click",
310
345
  options: u,
311
346
  onSelect: (o) => {
312
- var s;
313
- o === "resetPassword" ? (s = _.value) == null || s.openReset(e) : o === "clearMfa" && de(e);
347
+ var l, O;
348
+ o === "resetPassword" ? (l = D.value) == null || l.openReset(e) : o === "clearMfa" ? be(e) : o === "grantMenus" && ((O = F.value) == null || O.open({ id: e.id, name: e.name }));
314
349
  }
315
350
  },
316
351
  () => d(
317
- w,
352
+ k,
318
353
  {
319
354
  size: "small",
320
355
  quaternary: !0,
321
356
  type: "primary",
322
357
  iconPlacement: "right",
323
- loading: N.value
358
+ loading: I.value
324
359
  },
325
360
  {
326
- default: () => t("common.more"),
327
- icon: () => d(v, { icon: "ph:caret-down", size: 12 })
361
+ default: () => r("common.more"),
362
+ icon: () => d(m, { icon: "ph:caret-down", size: 12 })
328
363
  }
329
364
  )
330
365
  ) : null
@@ -332,87 +367,105 @@ const fr = { class: "side-filter__head" }, vr = { class: "side-filter__actions"
332
367
  }
333
368
  }
334
369
  ];
335
- return sr(re), (e, r) => {
336
- const u = Se("auth");
337
- return x(), oe(Te, null, [
338
- l(a(pe), null, {
339
- default: i(() => [
340
- h("div", fr, [
341
- h("div", vr, [
342
- b.value.length ? (x(), B(a(Fe), { key: 0 }, {
370
+ return xt(de), (e, t) => {
371
+ const u = Ge("auth");
372
+ return y(), j(Be, null, [
373
+ s(a(xe), null, {
374
+ default: i(({ drawer: o }) => [
375
+ g("div", At, [
376
+ o ? T("", !0) : (y(), j("span", Rt, b(a(r)("user.orgFilter")), 1)),
377
+ g("div", zt, [
378
+ Ne.value ? (y(), N(a(me), { key: 0 }, {
343
379
  trigger: i(() => [
344
- l(a(w), {
345
- quaternary: "",
346
- circle: "",
347
- size: "small",
348
- "aria-label": A.value ? a(t)("common.collapseAll") : a(t)("common.expandAll"),
349
- onClick: ve
350
- }, {
351
- icon: i(() => [
352
- l(v, {
353
- icon: A.value ? "ph:arrows-in-line-vertical" : "ph:arrows-out-line-vertical",
354
- size: 18
355
- }, null, 8, ["icon"])
356
- ]),
357
- _: 1
358
- }, 8, ["aria-label"])
380
+ g("button", {
381
+ type: "button",
382
+ class: J(["side-filter__btn side-filter__toggle", { "is-flipped": K.value }]),
383
+ "aria-label": se.value,
384
+ onClick: Pe
385
+ }, [
386
+ s(m, {
387
+ icon: "ph:caret-double-down",
388
+ size: 14
389
+ })
390
+ ], 10, Mt)
359
391
  ]),
360
392
  default: i(() => [
361
- P(" " + E(A.value ? a(t)("common.collapseAll") : a(t)("common.expandAll")), 1)
393
+ P(" " + b(se.value), 1)
362
394
  ]),
363
395
  _: 1
364
- })) : ae("", !0)
396
+ })) : T("", !0),
397
+ o ? T("", !0) : (y(), N(a(me), { key: 1 }, {
398
+ trigger: i(() => [
399
+ g("button", {
400
+ type: "button",
401
+ class: "side-filter__btn side-filter__hide",
402
+ "aria-label": a(r)("user.hideOrgPanel"),
403
+ onClick: t[0] || (t[0] = (l) => _.value = !0)
404
+ }, [
405
+ s(m, {
406
+ icon: "ph:sidebar-simple",
407
+ size: 16
408
+ })
409
+ ], 8, Ut)
410
+ ]),
411
+ default: i(() => [
412
+ P(" " + b(a(r)("user.hideOrgPanel")), 1)
413
+ ]),
414
+ _: 1
415
+ }))
365
416
  ])
366
417
  ]),
367
- l(a(Be), {
368
- value: M.value,
369
- "onUpdate:value": r[0] || (r[0] = (o) => M.value = o),
418
+ Ee.value ? (y(), N(a(Ze), {
419
+ key: 0,
420
+ value: B.value,
421
+ "onUpdate:value": t[1] || (t[1] = (l) => B.value = l),
370
422
  size: "small",
371
423
  clearable: "",
372
- placeholder: a(t)("org.searchPlaceholder")
424
+ placeholder: a(r)("org.searchPlaceholder")
373
425
  }, {
374
426
  prefix: i(() => [
375
- l(v, {
427
+ s(m, {
376
428
  icon: "ph:magnifying-glass",
377
429
  size: 14
378
430
  })
379
431
  ]),
380
432
  _: 1
381
- }, 8, ["value", "placeholder"]),
382
- h("button", {
433
+ }, 8, ["value", "placeholder"])) : T("", !0),
434
+ g("button", {
383
435
  type: "button",
384
- class: Ae(["side-row", { "is-active": c.value === null }]),
385
- onClick: r[1] || (r[1] = (o) => Q(null))
436
+ class: J(["side-row", { "is-active": h.value === null }]),
437
+ onClick: t[2] || (t[2] = (l) => ae(null))
386
438
  }, [
387
- l(v, {
439
+ s(m, {
388
440
  class: "side-row__icon",
389
441
  icon: "ph:squares-four",
390
442
  size: 15
391
443
  }),
392
- h("span", yr, E(a(t)("user.allOrgs")), 1)
444
+ g("span", Dt, b(a(r)("user.allOrgs")), 1)
393
445
  ], 2),
394
- r[13] || (r[13] = h("div", { class: "side-filter__divider" }, null, -1)),
395
- l(a(Le), {
396
- show: H.value,
446
+ t[15] || (t[15] = g("div", { class: "side-filter__divider" }, null, -1)),
447
+ s(a(et), {
448
+ show: ee.value,
397
449
  class: "fill-pass"
398
450
  }, {
399
451
  default: i(() => [
400
- l(a(qe), {
452
+ s(a(tt), {
401
453
  class: "side-tree",
402
454
  "block-line": "",
403
455
  selectable: "",
404
- "show-line": "",
456
+ indent: 16,
405
457
  "key-field": "id",
406
458
  "label-field": "name",
407
459
  "children-field": "children",
408
- data: V.value,
409
- pattern: M.value,
410
- filter: fe,
460
+ data: G.value,
461
+ pattern: B.value,
462
+ filter: Te,
411
463
  "show-irrelevant-nodes": !1,
412
- "selected-keys": c.value == null ? [] : [c.value],
413
- "expanded-keys": g.value,
414
- "onUpdate:selectedKeys": me,
415
- "onUpdate:expandedKeys": r[2] || (r[2] = (o) => g.value = o)
464
+ "selected-keys": h.value == null ? [] : [h.value],
465
+ "expanded-keys": w.value,
466
+ "render-switcher-icon": Oe,
467
+ "onUpdate:selectedKeys": ke,
468
+ "onUpdate:expandedKeys": t[3] || (t[3] = (l) => w.value = l)
416
469
  }, null, 8, ["data", "pattern", "selected-keys", "expanded-keys"])
417
470
  ]),
418
471
  _: 1
@@ -420,51 +473,55 @@ const fr = { class: "side-filter__head" }, vr = { class: "side-filter__actions"
420
473
  ]),
421
474
  _: 1
422
475
  }),
423
- h("div", {
476
+ g("div", {
424
477
  ref_key: "layoutRef",
425
- ref: W,
478
+ ref: re,
426
479
  class: "user-layout side-page"
427
480
  }, [
428
- J.value ? ae("", !0) : (x(), oe("aside", gr, [
429
- l(a(X))
430
- ])),
431
- l(a(Ve), {
481
+ x.value ? T("", !0) : (y(), j("aside", {
482
+ key: 0,
483
+ class: J(["side-filter", { "is-hidden": a(_) }]),
484
+ inert: a(_) || void 0
485
+ }, [
486
+ s(a(le))
487
+ ], 10, Ft)),
488
+ s(a(lt), {
432
489
  ref_key: "tableRef",
433
- ref: p,
434
- columns: re,
435
- fetcher: a(m).page,
436
- params: G.value,
490
+ ref: v,
491
+ columns: de,
492
+ fetcher: a(c).page,
493
+ params: te.value,
437
494
  search: { container: "table" },
438
- toolbar: ge.value,
495
+ toolbar: Ae.value,
439
496
  "fill-height": "",
440
- "min-row-height": a(ur),
497
+ "min-row-height": a(Ot),
441
498
  "card-on-narrow": "",
442
499
  "storage-key": "sys-user",
443
- "checked-row-keys": a(q),
444
- "onUpdate:sorter": ke,
445
- "onUpdate:checkedRowKeys": r[5] || (r[5] = (o) => q.value = o),
446
- onMoreSelect: he,
447
- onError: r[6] || (r[6] = (o) => a(I).error(a(se)(o)))
448
- }, Ce({
500
+ "checked-row-keys": a(X),
501
+ "onUpdate:sorter": Ue,
502
+ "onUpdate:checkedRowKeys": t[5] || (t[5] = (o) => X.value = o),
503
+ onMoreSelect: Re,
504
+ onError: t[6] || (t[6] = (o) => a(M).error(a(fe)(o)))
505
+ }, $e({
449
506
  "pagination-prefix": i(({ itemCount: o }) => [
450
- l(dr, { count: o }, null, 8, ["count"])
507
+ s(Tt, { count: o }, null, 8, ["count"])
451
508
  ]),
452
509
  "toolbar-right": i(() => [
453
- le((x(), B(a(w), {
510
+ ce((y(), N(a(k), {
454
511
  type: "primary",
455
- onClick: r[4] || (r[4] = (o) => {
456
- var s;
457
- return (s = O.value) == null ? void 0 : s.openAdd();
512
+ onClick: t[4] || (t[4] = (o) => {
513
+ var l;
514
+ return (l = U.value) == null ? void 0 : l.openAdd();
458
515
  })
459
516
  }, {
460
517
  icon: i(() => [
461
- l(v, {
518
+ s(m, {
462
519
  icon: "ph:plus",
463
520
  size: 16
464
521
  })
465
522
  ]),
466
523
  default: i(() => [
467
- P(" " + E(a(t)("common.add")), 1)
524
+ P(" " + b(a(r)("common.add")), 1)
468
525
  ]),
469
526
  _: 1
470
527
  })), [
@@ -472,19 +529,19 @@ const fr = { class: "side-filter__head" }, vr = { class: "side-filter__actions"
472
529
  ])
473
530
  ]),
474
531
  batch: i(() => [
475
- le((x(), B(a(w), {
532
+ ce((y(), N(a(k), {
476
533
  secondary: "",
477
534
  type: "error",
478
- onClick: a(ue)
535
+ onClick: a(he)
479
536
  }, {
480
537
  icon: i(() => [
481
- l(v, {
538
+ s(m, {
482
539
  icon: "ph:trash",
483
540
  size: 16
484
541
  })
485
542
  ]),
486
543
  default: i(() => [
487
- P(" " + E(a(t)("common.batchDelete")), 1)
544
+ P(" " + b(a(r)("common.batchDelete")), 1)
488
545
  ]),
489
546
  _: 1
490
547
  }, 8, ["onClick"])), [
@@ -493,43 +550,45 @@ const fr = { class: "side-filter__head" }, vr = { class: "side-filter__actions"
493
550
  ]),
494
551
  _: 2
495
552
  }, [
496
- J.value ? {
553
+ x.value || a(_) ? {
497
554
  name: "toolbar",
498
555
  fn: i(() => [
499
- l(a(w), {
556
+ s(a(k), {
557
+ class: "org-trigger",
500
558
  secondary: "",
501
- onClick: r[3] || (r[3] = (o) => T.value = !0)
559
+ title: x.value ? void 0 : a(r)("user.showOrgPanel"),
560
+ onClick: Se
502
561
  }, {
503
562
  icon: i(() => [
504
- l(v, {
505
- icon: "ph:tree-structure",
563
+ s(m, {
564
+ icon: x.value ? "ph:tree-structure" : "ph:sidebar-simple",
506
565
  size: 16
507
- })
566
+ }, null, 8, ["icon"])
508
567
  ]),
509
568
  default: i(() => [
510
- P(" " + E(ce.value), 1)
569
+ P(" " + b(_e.value), 1)
511
570
  ]),
512
571
  _: 1
513
- })
572
+ }, 8, ["title"])
514
573
  ]),
515
574
  key: "0"
516
575
  } : void 0
517
576
  ]), 1032, ["fetcher", "params", "toolbar", "min-row-height", "checked-row-keys"])
518
577
  ], 512),
519
- l(a($e), {
520
- show: T.value,
521
- "onUpdate:show": r[7] || (r[7] = (o) => T.value = o),
578
+ s(a(rt), {
579
+ show: C.value,
580
+ "onUpdate:show": t[7] || (t[7] = (o) => C.value = o),
522
581
  placement: "left",
523
582
  width: "min(300px, 88vw)"
524
583
  }, {
525
584
  default: i(() => [
526
- l(a(Ke), {
527
- title: a(t)("user.orgFilter"),
585
+ s(a(ot), {
586
+ title: a(r)("user.orgFilter"),
528
587
  closable: ""
529
588
  }, {
530
589
  default: i(() => [
531
- h("div", hr, [
532
- l(a(X))
590
+ g("div", Lt, [
591
+ s(a(le), { drawer: !0 })
533
592
  ])
534
593
  ]),
535
594
  _: 1
@@ -537,48 +596,63 @@ const fr = { class: "side-filter__head" }, vr = { class: "side-filter__actions"
537
596
  ]),
538
597
  _: 1
539
598
  }, 8, ["show"]),
540
- l(Qe, {
599
+ s(dt, {
541
600
  ref_key: "userFormRef",
542
- ref: O,
543
- "position-options": $.value,
544
- "role-options": z.value,
545
- "director-options": K.value,
546
- onSaved: r[8] || (r[8] = () => {
601
+ ref: U,
602
+ "position-options": Y.value,
603
+ "role-options": L.value,
604
+ "director-options": Z.value,
605
+ onSaved: t[8] || (t[8] = () => {
547
606
  var o;
548
- return (o = p.value) == null ? void 0 : o.refresh();
607
+ return (o = v.value) == null ? void 0 : o.refresh();
549
608
  }),
550
- onPasswordGenerated: r[9] || (r[9] = (o) => {
551
- var s;
552
- return (s = _.value) == null ? void 0 : s.showResult(o, !0);
609
+ onPasswordGenerated: t[9] || (t[9] = (o) => {
610
+ var l;
611
+ return (l = D.value) == null ? void 0 : l.showResult(o, !0);
553
612
  })
554
613
  }, null, 8, ["position-options", "role-options", "director-options"]),
555
- l(Xe, {
614
+ s(pt, {
556
615
  ref_key: "resetModalRef",
557
- ref: _
616
+ ref: D
558
617
  }, null, 512),
559
- l(je, {
560
- show: R.value,
561
- "onUpdate:show": r[10] || (r[10] = (o) => R.value = o),
562
- api: be,
563
- "template-file-name": a(t)("userExport.importTemplateName"),
564
- "error-report-file-name": a(t)("userExport.errorReportName"),
565
- onDone: r[11] || (r[11] = () => {
618
+ s(ct, {
619
+ ref_key: "grantSheetRef",
620
+ ref: F,
621
+ onSaved: Ie
622
+ }, null, 512),
623
+ s(mt, {
624
+ ref_key: "grantOverviewRef",
625
+ ref: ue,
626
+ show: z.value,
627
+ "onUpdate:show": t[10] || (t[10] = (o) => z.value = o),
628
+ onAdjust: t[11] || (t[11] = (o) => {
629
+ var l;
630
+ return (l = F.value) == null ? void 0 : l.open(o);
631
+ })
632
+ }, null, 8, ["show"]),
633
+ s(it, {
634
+ show: q.value,
635
+ "onUpdate:show": t[12] || (t[12] = (o) => q.value = o),
636
+ api: Me,
637
+ "template-file-name": a(r)("userExport.importTemplateName"),
638
+ "error-report-file-name": a(r)("userExport.errorReportName"),
639
+ onDone: t[13] || (t[13] = () => {
566
640
  var o;
567
- return (o = p.value) == null ? void 0 : o.refresh();
641
+ return (o = v.value) == null ? void 0 : o.refresh();
568
642
  })
569
643
  }, null, 8, ["show", "template-file-name", "error-report-file-name"]),
570
- l(Je, {
571
- show: C.value,
572
- "onUpdate:show": r[12] || (r[12] = (o) => C.value = o),
573
- columns: we,
574
- loading: D.value,
575
- onConfirm: xe
644
+ s(ut, {
645
+ show: R.value,
646
+ "onUpdate:show": t[14] || (t[14] = (o) => R.value = o),
647
+ columns: ze,
648
+ loading: H.value,
649
+ onConfirm: De
576
650
  }, null, 8, ["show", "loading"])
577
651
  ], 64);
578
652
  };
579
653
  }
580
654
  });
581
655
  export {
582
- Hr as default
656
+ vr as default
583
657
  };
584
658
  //# sourceMappingURL=index2.vue.js.map