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