smart-admin-web 10.12.0 → 10.12.2

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 (37) hide show
  1. package/dist/api/index.d.ts +13 -1
  2. package/dist/api/index.js +25 -13
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/api/schema.d.ts +360 -3
  5. package/dist/assets/icons/ph-subset.json.js +1 -1
  6. package/dist/lib/runtime.js +1 -1
  7. package/dist/locales/en-US.d.ts +13 -1
  8. package/dist/locales/en-US.js +15 -3
  9. package/dist/locales/en-US.js.map +1 -1
  10. package/dist/locales/zh-CN.d.ts +13 -1
  11. package/dist/locales/zh-CN.js +15 -3
  12. package/dist/locales/zh-CN.js.map +1 -1
  13. package/dist/router/index.js +18 -13
  14. package/dist/router/index.js.map +1 -1
  15. package/dist/router/viewRegistry.js +1 -1
  16. package/dist/router/viewRegistry.js.map +1 -1
  17. package/dist/style.css +1 -1
  18. package/dist/types/api.d.ts +26 -0
  19. package/dist/types/api.js.map +1 -1
  20. package/dist/views/dashboard/ShortcutPicker.vue.d.ts +16 -0
  21. package/dist/views/dashboard/ShortcutPicker.vue.js +8 -0
  22. package/dist/views/dashboard/ShortcutPicker.vue.js.map +1 -0
  23. package/dist/views/dashboard/ShortcutPicker2.vue.js +86 -0
  24. package/dist/views/dashboard/ShortcutPicker2.vue.js.map +1 -0
  25. package/dist/views/dashboard/biz.vue.js +2 -2
  26. package/dist/views/dashboard/biz2.vue.js +265 -93
  27. package/dist/views/dashboard/biz2.vue.js.map +1 -1
  28. package/dist/views/dashboard/onlineDuration.d.ts +5 -0
  29. package/dist/views/dashboard/onlineDuration.js +8 -0
  30. package/dist/views/dashboard/onlineDuration.js.map +1 -0
  31. package/dist/views/dashboard/shortcutGroups.d.ts +18 -0
  32. package/dist/views/dashboard/shortcutGroups.js +19 -0
  33. package/dist/views/dashboard/shortcutGroups.js.map +1 -0
  34. package/dist/views/system/user/index.vue.js +2 -2
  35. package/dist/views/system/user/index2.vue.js +281 -211
  36. package/dist/views/system/user/index2.vue.js.map +1 -1
  37. package/package.json +1 -1
@@ -1,88 +1,111 @@
1
- import { defineComponent as J, ref as s, computed as Q, onMounted as X, watch as Y, resolveDirective as Z, openBlock as f, createElementBlock as ee, Fragment as re, createElementVNode as A, createVNode as i, unref as a, withCtx as n, toDisplayString as v, createBlock as h, createTextVNode as k, createCommentVNode as te, withDirectives as x, h as m } from "vue";
2
- import { useRoute as oe } from "vue-router";
3
- import { useMessage as ae, NCard as le, NButton as p, NTree as se, NAvatar as ie, NTag as ne, NSpace as ue, NPopconfirm as me, NDropdown as de } from "naive-ui";
4
- import { useI18n as pe } from "vue-i18n";
5
- import { SmartTable as ce } from "smart-naive-table";
6
- import E from "../../../components/AppIcon.vue.js";
7
- import fe from "../../../components/StatusSwitch/index.vue.js";
8
- import ve from "../../../components/DictTag/index.vue.js";
9
- import ye from "../../../components/ImportWizard/index.vue.js";
10
- import ge from "../../../components/ExportColumnsModal/index.vue.js";
11
- import he from "./components/UserFormModal.vue.js";
12
- import ke from "./components/ResetPasswordModal.vue.js";
13
- import { useConfirm as be } from "../../../composables/useConfirm.js";
14
- import { useBatchDelete as we } from "../../../composables/useBatchDelete.js";
15
- import { userApi as u, positionApi as xe, roleApi as Ee, orgApi as Ne, mfaApi as Se } from "../../../api/index.js";
16
- import { useAuthStore as Te } from "../../../stores/auth.js";
17
- import { translateError as U } from "../../../utils/error.js";
18
- import { triggerBlobDownload as Ce } from "../../../utils/download.js";
19
- import { buildTree as Pe } from "../../../utils/tree.js";
20
- const Ie = { class: "user-layout side-page" }, Ae = { class: "org-filter-head" }, ze = { class: "org-filter-title" }, Ye = /* @__PURE__ */ J({
1
+ import { defineComponent as se, ref as i, computed as C, watch as D, onMounted as ie, resolveDirective as ne, openBlock as h, createElementBlock as ue, Fragment as de, createElementVNode as g, createBlock as x, unref as l, withCtx as n, createTextVNode as E, toDisplayString as k, createVNode as s, createCommentVNode as pe, normalizeClass as me, withDirectives as I, h as d } from "vue";
2
+ import { useRoute as ce } from "vue-router";
3
+ import { useMessage as fe, NTooltip as ve, NButton as f, NInput as ge, NSpin as ye, NTree as he, NAvatar as ke, NTag as we, NSpace as be, NPopconfirm as xe, NDropdown as Ee } from "naive-ui";
4
+ import { useI18n as Ne } from "vue-i18n";
5
+ import { SmartTable as Se } from "smart-naive-table";
6
+ import y from "../../../components/AppIcon.vue.js";
7
+ import Ce from "../../../components/StatusSwitch/index.vue.js";
8
+ import Ie from "../../../components/DictTag/index.vue.js";
9
+ import Te from "../../../components/ImportWizard/index.vue.js";
10
+ import Pe from "../../../components/ExportColumnsModal/index.vue.js";
11
+ import Ae from "./components/UserFormModal.vue.js";
12
+ import ze from "./components/ResetPasswordModal.vue.js";
13
+ import { useConfirm as _e } from "../../../composables/useConfirm.js";
14
+ import { useBatchDelete as Oe } from "../../../composables/useBatchDelete.js";
15
+ import { userApi as u, positionApi as Me, roleApi as Re, orgApi as Ue, mfaApi as De } from "../../../api/index.js";
16
+ import { useAuthStore as $e } from "../../../stores/auth.js";
17
+ import { translateError as G } from "../../../utils/error.js";
18
+ import { triggerBlobDownload as qe } from "../../../utils/download.js";
19
+ import { buildTree as Be, expandableIds as Fe } from "../../../utils/tree.js";
20
+ const Ke = { class: "user-layout side-page" }, Le = { class: "side-filter" }, Ve = { class: "side-filter__head" }, Ge = { class: "side-filter__actions" }, je = { class: "side-row__label" }, cr = /* @__PURE__ */ se({
21
21
  __name: "index",
22
- setup(Me) {
23
- const { t } = pe(), N = ae(), { run: _, confirm: $ } = be(), y = Te(), d = s(), {
24
- checkedKeys: z,
25
- hasSelection: B,
26
- run: F
27
- } = we({
22
+ setup(We) {
23
+ const { t } = Ne(), T = fe(), { run: j, confirm: W } = _e(), w = $e(), p = i(), {
24
+ checkedKeys: $,
25
+ hasSelection: H,
26
+ run: J
27
+ } = Oe({
28
28
  remove: u.batchRemove,
29
29
  refresh: () => {
30
- var e;
31
- return (e = d.value) == null ? void 0 : e.refresh();
30
+ var r;
31
+ return (r = p.value) == null ? void 0 : r.refresh();
32
32
  },
33
33
  successMsg: t("user.deleted")
34
- }), S = s(null), T = s(null), b = s(!1);
35
- async function q(e) {
36
- var r;
37
- b.value = !0;
34
+ }), P = i(null), A = i(null), N = i(!1);
35
+ async function Q(r) {
36
+ var e;
37
+ N.value = !0;
38
38
  try {
39
- await $({
40
- content: t("user.clearMfaConfirm", { name: e.name }),
41
- action: () => Se.clear({ userId: e.id }),
39
+ await W({
40
+ content: t("user.clearMfaConfirm", { name: r.name }),
41
+ action: () => De.clear({ userId: r.id }),
42
42
  successMsg: t("user.mfaCleared")
43
- }) && ((r = d.value) == null || r.refresh());
43
+ }) && ((e = p.value) == null || e.refresh());
44
44
  } finally {
45
- b.value = !1;
45
+ N.value = !1;
46
46
  }
47
47
  }
48
- const M = s([]), C = s([]), R = s([]), O = s([]), c = s(null), V = Q(
49
- () => c.value == null ? {} : { orgId: c.value }
48
+ const q = i([]), z = i([]), B = i([]), _ = i([]), F = i(!0), K = C(() => Be(_.value)), m = i(null), X = C(
49
+ () => m.value == null ? {} : { orgId: m.value }
50
50
  );
51
- function G(e) {
52
- c.value = e.length ? Number(e[0]) : null;
51
+ function Y(r) {
52
+ m.value = r.length ? Number(r[0]) : null;
53
53
  }
54
- X(async () => {
54
+ const O = i("");
55
+ function Z(r, e) {
56
+ const a = r.trim().toLowerCase();
57
+ if (!a) return !0;
58
+ const o = e;
59
+ return o.name.toLowerCase().includes(a) || (o.code ?? "").toLowerCase().includes(a);
60
+ }
61
+ const v = i([]), b = C(() => Fe(K.value)), M = C(
62
+ () => b.value.length > 0 && v.value.length >= b.value.length
63
+ );
64
+ function ee() {
65
+ v.value = M.value ? [] : [...b.value];
66
+ }
67
+ D(b, (r) => v.value = r, { immediate: !0 }), D(m, (r) => {
68
+ var c;
69
+ if (r == null) return;
70
+ const e = new Map(_.value.map((V) => [V.id, V])), a = new Set(v.value);
71
+ let o = ((c = e.get(r)) == null ? void 0 : c.parentId) ?? 0;
72
+ for (; o && e.has(o); )
73
+ a.add(o), o = e.get(o).parentId;
74
+ v.value = [...a];
75
+ }), ie(async () => {
55
76
  try {
56
- const { items: e } = await xe.page({ page: 1, pageSize: 200 });
57
- M.value = e.map((r) => ({ label: r.name, value: r.id }));
77
+ const { items: r } = await Me.page({ page: 1, pageSize: 200 });
78
+ q.value = r.map((e) => ({ label: e.name, value: e.id }));
58
79
  } catch {
59
80
  }
60
81
  try {
61
- const { items: e } = await Ee.page({ page: 1, pageSize: 200 });
62
- C.value = e.map((r) => ({ label: r.name, value: r.id }));
82
+ const { items: r } = await Re.page({ page: 1, pageSize: 200 });
83
+ z.value = r.map((e) => ({ label: e.name, value: e.id }));
63
84
  } catch {
64
85
  }
65
86
  try {
66
- const { items: e } = await u.page({ page: 1, pageSize: 200 });
67
- R.value = e.map((r) => ({ label: `${r.name}(${r.account})`, value: r.id }));
87
+ const { items: r } = await u.page({ page: 1, pageSize: 200 });
88
+ B.value = r.map((e) => ({ label: `${e.name}(${e.account})`, value: e.id }));
68
89
  } catch {
69
90
  }
70
91
  try {
71
- O.value = Pe(await Ne.list());
92
+ _.value = await Ue.list();
72
93
  } catch {
94
+ } finally {
95
+ F.value = !1;
73
96
  }
74
97
  });
75
- const K = oe();
76
- Y(
77
- [d, () => K.query.roleId],
78
- ([e, r]) => {
79
- if (!e) return;
80
- const l = r == null ? void 0 : Number(r);
81
- e.params.roleId !== l && (e.params.roleId = l, e.search());
98
+ const re = ce();
99
+ D(
100
+ [p, () => re.query.roleId],
101
+ ([r, e]) => {
102
+ if (!r) return;
103
+ const a = e == null ? void 0 : Number(e);
104
+ r.params.roleId !== a && (r.params.roleId = a, r.search());
82
105
  },
83
106
  { immediate: !0 }
84
107
  );
85
- const D = (e) => (e || "?").slice(0, 1), P = s(!1), w = s(!1), I = s(!1), L = [
108
+ const L = (r) => (r || "?").slice(0, 1), R = i(!1), S = i(!1), U = i(!1), te = [
86
109
  { key: "Account", title: t("userExport.account") },
87
110
  { key: "Name", title: t("userExport.name") },
88
111
  { key: "Nickname", title: t("userExport.nickname") },
@@ -95,60 +118,60 @@ const Ie = { class: "user-layout side-page" }, Ae = { class: "org-filter-head" }
95
118
  { key: "Enabled", title: t("userExport.enabled") },
96
119
  { key: "IsSuperAdmin", title: t("userExport.superAdmin"), defaultSelected: !1 },
97
120
  { key: "CreateTime", title: t("userExport.createTime") }
98
- ], j = {
121
+ ], oe = {
99
122
  downloadTemplate: () => u.importTemplate(),
100
- preview: (e, r) => u.importPreview(e, r),
101
- validate: (e) => u.importValidate(e),
102
- commit: (e, r) => u.importCommit(e, r),
103
- errorReport: (e) => u.importErrorReport(e)
123
+ preview: (r, e) => u.importPreview(r, e),
124
+ validate: (r) => u.importValidate(r),
125
+ commit: (r, e) => u.importCommit(r, e),
126
+ errorReport: (r) => u.importErrorReport(r)
104
127
  };
105
- async function W(e) {
106
- var l;
107
- const r = ((l = d.value) == null ? void 0 : l.params) ?? {};
108
- I.value = !0;
128
+ async function ae(r) {
129
+ var a;
130
+ const e = ((a = p.value) == null ? void 0 : a.params) ?? {};
131
+ U.value = !0;
109
132
  try {
110
133
  const o = await u.export({
111
- account: r.account || void 0,
112
- name: r.name || void 0,
113
- orgId: r.orgId != null ? Number(r.orgId) : void 0,
114
- roleId: r.roleId != null ? Number(r.roleId) : void 0,
115
- sortField: r.sortField || void 0,
116
- sortOrder: r.sortOrder || void 0,
117
- columns: e.join(",")
134
+ account: e.account || void 0,
135
+ name: e.name || void 0,
136
+ orgId: e.orgId != null ? Number(e.orgId) : void 0,
137
+ roleId: e.roleId != null ? Number(e.roleId) : void 0,
138
+ sortField: e.sortField || void 0,
139
+ sortOrder: e.sortOrder || void 0,
140
+ columns: r.join(",")
118
141
  });
119
- Ce(o, t("userExport.fileName")), w.value = !1, N.success(t("export.done"));
142
+ qe(o, t("userExport.fileName")), S.value = !1, T.success(t("export.done"));
120
143
  } catch (o) {
121
- N.error(U(o));
144
+ T.error(G(o));
122
145
  } finally {
123
- I.value = !1;
146
+ U.value = !1;
124
147
  }
125
148
  }
126
- const H = [
149
+ const le = [
127
150
  { type: "index", title: () => t("common.rowNo"), width: 64, align: "center" },
128
151
  // 超管行禁勾:批量删除同样不可含超管(后端也会整体拒绝)
129
- { type: "selection", disabled: (e) => e.isSuperAdmin },
152
+ { type: "selection", disabled: (r) => r.isSuperAdmin },
130
153
  {
131
154
  key: "avatar",
132
155
  title: () => t("user.avatar"),
133
156
  width: 64,
134
157
  align: "center",
135
158
  hideInSetting: !1,
136
- render: (e) => m(
137
- ie,
138
- { round: !0, size: "small", src: e.avatar || void 0 },
139
- e.avatar ? { fallback: () => D(e.name) } : { default: () => D(e.name) }
159
+ render: (r) => d(
160
+ ke,
161
+ { round: !0, size: "small", src: r.avatar || void 0 },
162
+ r.avatar ? { fallback: () => L(r.name) } : { default: () => L(r.name) }
140
163
  )
141
164
  },
142
165
  { key: "account", title: () => t("user.account"), search: !0, sorter: !0 },
143
166
  { key: "name", title: () => t("user.name"), search: !0 },
144
- { key: "phone", title: () => t("user.phone"), render: (e) => e.phone || "—" },
167
+ { key: "phone", title: () => t("user.phone"), render: (r) => r.phone || "—" },
145
168
  {
146
169
  key: "gender",
147
170
  title: () => t("user.gender"),
148
171
  width: 80,
149
172
  hideInTable: !0,
150
173
  // 次要列:默认隐藏收窄整表,列设置抽屉可打开
151
- render: (e) => e.gender ? m(ve, { typeCode: "gender", value: e.gender }) : "—"
174
+ render: (r) => r.gender ? d(Ie, { typeCode: "gender", value: r.gender }) : "—"
152
175
  },
153
176
  // 只作搜索项,不进表格也不进列设置。options 直接吃编辑表单已拉好的 roleOptions(SmartTable 支持 Ref 选项源),不额外发请求;
154
177
  // 列上有 options,搜索控件自动是 select。
@@ -156,28 +179,28 @@ const Ie = { class: "user-layout side-page" }, Ae = { class: "org-filter-head" }
156
179
  key: "roleId",
157
180
  title: () => t("user.roles"),
158
181
  hideInTable: !0,
159
- options: C,
182
+ options: z,
160
183
  search: { props: { clearable: !0 } }
161
184
  },
162
- { key: "orgName", title: () => t("user.org"), render: (e) => e.orgName || "—" },
185
+ { key: "orgName", title: () => t("user.org"), render: (r) => r.orgName || "—" },
163
186
  {
164
187
  key: "positionName",
165
188
  title: () => t("user.position"),
166
189
  hideInTable: !0,
167
- render: (e) => e.positionName || "—"
190
+ render: (r) => r.positionName || "—"
168
191
  },
169
192
  {
170
193
  key: "enabled",
171
194
  title: () => t("user.status"),
172
195
  width: 90,
173
- render: (e) => m(fe, {
174
- value: e.enabled,
196
+ render: (r) => d(Ce, {
197
+ value: r.enabled,
175
198
  // 超管不可停用(防自锁 —— 停了就没法从 UI 恢复;后端也保护);无启停权限亦置灰。
176
- disabled: e.isSuperAdmin || !y.hasPerm("PUT:/api/v1/sys/user/{id}/enabled"),
177
- confirm: (r) => r ? null : t("user.disableConfirm", { name: e.name }),
178
- request: (r) => u.setEnabled(e.id, r),
179
- "onUpdate:value": (r) => {
180
- e.enabled = r;
199
+ disabled: r.isSuperAdmin || !w.hasPerm("PUT:/api/v1/sys/user/{id}/enabled"),
200
+ confirm: (e) => e ? null : t("user.disableConfirm", { name: r.name }),
201
+ request: (e) => u.setEnabled(r.id, e),
202
+ "onUpdate:value": (e) => {
203
+ r.enabled = e;
181
204
  }
182
205
  })
183
206
  },
@@ -185,7 +208,7 @@ const Ie = { class: "user-layout side-page" }, Ae = { class: "org-filter-head" }
185
208
  key: "isSuperAdmin",
186
209
  title: () => t("user.superAdmin"),
187
210
  width: 90,
188
- render: (e) => e.isSuperAdmin ? m(ne, { type: "warning", size: "small", bordered: !1 }, () => t("user.superAdmin")) : "—"
211
+ render: (r) => r.isSuperAdmin ? d(we, { type: "warning", size: "small", bordered: !1 }, () => t("user.superAdmin")) : "—"
189
212
  },
190
213
  { key: "createTime", title: () => t("user.createTime"), format: "datetime", sorter: !0 },
191
214
  // 操作:编辑/删除外露;重置密码、解绑验证器进「更多」(放操作列末尾)。
@@ -197,55 +220,55 @@ const Ie = { class: "user-layout side-page" }, Ae = { class: "org-filter-head" }
197
220
  fixed: "right",
198
221
  // 钉右:横向滚动时操作列始终可见
199
222
  hideInSetting: !0,
200
- render: (e) => {
201
- const r = [
202
- y.hasPerm("PUT:/api/v1/sys/user/{id}/password") ? { key: "resetPassword", label: t("user.resetPassword") } : null,
203
- e.totpEnabled && y.hasPerm("POST:/api/v1/sys/mfa/clear") ? { key: "clearMfa", label: t("user.clearMfa"), disabled: b.value } : null
223
+ render: (r) => {
224
+ const e = [
225
+ w.hasPerm("PUT:/api/v1/sys/user/{id}/password") ? { key: "resetPassword", label: t("user.resetPassword") } : null,
226
+ r.totpEnabled && w.hasPerm("POST:/api/v1/sys/mfa/clear") ? { key: "clearMfa", label: t("user.clearMfa"), disabled: N.value } : null
204
227
  ].filter(Boolean);
205
- return m(ue, { size: 4, wrap: !1, wrapItem: !1 }, () => [
206
- y.hasPerm("PUT:/api/v1/sys/user/{id}") ? m(
207
- p,
228
+ return d(be, { size: 4, wrap: !1, wrapItem: !1 }, () => [
229
+ w.hasPerm("PUT:/api/v1/sys/user/{id}") ? d(
230
+ f,
208
231
  {
209
232
  size: "small",
210
233
  quaternary: !0,
211
234
  type: "primary",
212
235
  onClick: () => {
213
- var l;
214
- return (l = S.value) == null ? void 0 : l.openEdit(e);
236
+ var a;
237
+ return (a = P.value) == null ? void 0 : a.openEdit(r);
215
238
  }
216
239
  },
217
240
  () => t("common.edit")
218
241
  ) : null,
219
- e.isSuperAdmin || !y.hasPerm("DELETE:/api/v1/sys/user/{id}") ? null : m(
220
- me,
242
+ r.isSuperAdmin || !w.hasPerm("DELETE:/api/v1/sys/user/{id}") ? null : d(
243
+ xe,
221
244
  {
222
- onPositiveClick: () => _(() => u.remove(e.id), t("user.deleted")).then((l) => {
245
+ onPositiveClick: () => j(() => u.remove(r.id), t("user.deleted")).then((a) => {
223
246
  var o;
224
- l && ((o = d.value) == null || o.refresh());
247
+ a && ((o = p.value) == null || o.refresh());
225
248
  })
226
249
  },
227
250
  {
228
- trigger: () => m(
229
- p,
251
+ trigger: () => d(
252
+ f,
230
253
  { size: "small", quaternary: !0, type: "error" },
231
254
  () => t("common.delete")
232
255
  ),
233
- default: () => t("user.deleteConfirm", { name: e.name })
256
+ default: () => t("user.deleteConfirm", { name: r.name })
234
257
  }
235
258
  ),
236
- r.length ? m(
237
- de,
259
+ e.length ? d(
260
+ Ee,
238
261
  {
239
262
  trigger: "click",
240
- options: r,
241
- onSelect: (l) => {
263
+ options: e,
264
+ onSelect: (a) => {
242
265
  var o;
243
- l === "resetPassword" ? (o = T.value) == null || o.openReset(e) : l === "clearMfa" && q(e);
266
+ a === "resetPassword" ? (o = A.value) == null || o.openReset(r) : a === "clearMfa" && Q(r);
244
267
  }
245
268
  },
246
- () => m(
247
- p,
248
- { size: "small", quaternary: !0, loading: b.value },
269
+ () => d(
270
+ f,
271
+ { size: "small", quaternary: !0, loading: N.value },
249
272
  () => t("common.more")
250
273
  )
251
274
  ) : null
@@ -253,175 +276,222 @@ const Ie = { class: "user-layout side-page" }, Ae = { class: "org-filter-head" }
253
276
  }
254
277
  }
255
278
  ];
256
- return (e, r) => {
257
- const l = Z("auth");
258
- return f(), ee(re, null, [
259
- A("div", Ie, [
260
- i(a(le), {
261
- class: "org-filter fill-card",
262
- bordered: !1,
263
- size: "small"
264
- }, {
265
- default: n(() => [
266
- A("div", Ae, [
267
- A("span", ze, v(a(t)("user.org")), 1),
268
- c.value != null ? (f(), h(a(p), {
269
- key: 0,
270
- text: "",
271
- size: "tiny",
272
- type: "primary",
273
- onClick: r[0] || (r[0] = (o) => c.value = null)
274
- }, {
279
+ return (r, e) => {
280
+ const a = ne("auth");
281
+ return h(), ue(de, null, [
282
+ g("div", Ke, [
283
+ g("aside", Le, [
284
+ g("div", Ve, [
285
+ g("div", Ge, [
286
+ b.value.length ? (h(), x(l(ve), { key: 0 }, {
287
+ trigger: n(() => [
288
+ s(l(f), {
289
+ quaternary: "",
290
+ circle: "",
291
+ size: "small",
292
+ onClick: ee
293
+ }, {
294
+ icon: n(() => [
295
+ s(y, {
296
+ icon: M.value ? "ph:arrows-in-line-vertical" : "ph:arrows-out-line-vertical",
297
+ size: 18
298
+ }, null, 8, ["icon"])
299
+ ]),
300
+ _: 1
301
+ })
302
+ ]),
275
303
  default: n(() => [
276
- k(v(a(t)("user.allOrgs")), 1)
304
+ E(" " + k(M.value ? l(t)("common.collapseAll") : l(t)("common.expandAll")), 1)
277
305
  ]),
278
306
  _: 1
279
- })) : te("", !0)
280
- ]),
281
- i(a(se), {
282
- "block-line": "",
283
- selectable: "",
284
- data: O.value,
285
- "key-field": "id",
286
- "label-field": "name",
287
- "children-field": "children",
288
- "selected-keys": c.value == null ? [] : [c.value],
289
- "onUpdate:selectedKeys": G
290
- }, null, 8, ["data", "selected-keys"])
307
+ })) : pe("", !0)
308
+ ])
291
309
  ]),
292
- _: 1
293
- }),
294
- i(a(ce), {
310
+ s(l(ge), {
311
+ value: O.value,
312
+ "onUpdate:value": e[0] || (e[0] = (o) => O.value = o),
313
+ size: "small",
314
+ clearable: "",
315
+ placeholder: l(t)("org.searchPlaceholder")
316
+ }, {
317
+ prefix: n(() => [
318
+ s(y, {
319
+ icon: "ph:magnifying-glass",
320
+ size: 14
321
+ })
322
+ ]),
323
+ _: 1
324
+ }, 8, ["value", "placeholder"]),
325
+ g("button", {
326
+ type: "button",
327
+ class: me(["side-row", { "is-active": m.value === null }]),
328
+ onClick: e[1] || (e[1] = (o) => m.value = null)
329
+ }, [
330
+ s(y, {
331
+ class: "side-row__icon",
332
+ icon: "ph:squares-four",
333
+ size: 15
334
+ }),
335
+ g("span", je, k(l(t)("user.allOrgs")), 1)
336
+ ], 2),
337
+ e[13] || (e[13] = g("div", { class: "side-filter__divider" }, null, -1)),
338
+ s(l(ye), {
339
+ show: F.value,
340
+ class: "fill-pass"
341
+ }, {
342
+ default: n(() => [
343
+ s(l(he), {
344
+ class: "side-tree",
345
+ "block-line": "",
346
+ selectable: "",
347
+ "show-line": "",
348
+ "key-field": "id",
349
+ "label-field": "name",
350
+ "children-field": "children",
351
+ data: K.value,
352
+ pattern: O.value,
353
+ filter: Z,
354
+ "show-irrelevant-nodes": !1,
355
+ "selected-keys": m.value == null ? [] : [m.value],
356
+ "expanded-keys": v.value,
357
+ "onUpdate:selectedKeys": Y,
358
+ "onUpdate:expandedKeys": e[2] || (e[2] = (o) => v.value = o)
359
+ }, null, 8, ["data", "pattern", "selected-keys", "expanded-keys"])
360
+ ]),
361
+ _: 1
362
+ }, 8, ["show"])
363
+ ]),
364
+ s(l(Se), {
295
365
  "default-page-size": 100,
296
366
  ref_key: "tableRef",
297
- ref: d,
298
- columns: H,
299
- fetcher: a(u).page,
300
- params: V.value,
367
+ ref: p,
368
+ columns: le,
369
+ fetcher: l(u).page,
370
+ params: X.value,
301
371
  "flex-height": "",
302
372
  "virtual-scroll": "",
303
373
  "storage-key": "sys-user",
304
- "checked-row-keys": a(z),
305
- "onUpdate:checkedRowKeys": r[4] || (r[4] = (o) => z.value = o),
306
- onError: r[5] || (r[5] = (o) => a(N).error(a(U)(o)))
374
+ "checked-row-keys": l($),
375
+ "onUpdate:checkedRowKeys": e[6] || (e[6] = (o) => $.value = o),
376
+ onError: e[7] || (e[7] = (o) => l(T).error(l(G)(o)))
307
377
  }, {
308
378
  toolbar: n(() => [
309
- x((f(), h(a(p), {
379
+ I((h(), x(l(f), {
310
380
  type: "primary",
311
- onClick: r[1] || (r[1] = (o) => {
312
- var g;
313
- return (g = S.value) == null ? void 0 : g.openAdd();
381
+ onClick: e[3] || (e[3] = (o) => {
382
+ var c;
383
+ return (c = P.value) == null ? void 0 : c.openAdd();
314
384
  })
315
385
  }, {
316
386
  icon: n(() => [
317
- i(E, {
387
+ s(y, {
318
388
  icon: "ph:plus",
319
389
  size: 16
320
390
  })
321
391
  ]),
322
392
  default: n(() => [
323
- k(" " + v(a(t)("common.add")), 1)
393
+ E(" " + k(l(t)("common.add")), 1)
324
394
  ]),
325
395
  _: 1
326
396
  })), [
327
- [l, "POST:/api/v1/sys/user"]
397
+ [a, "POST:/api/v1/sys/user"]
328
398
  ]),
329
- x((f(), h(a(p), {
399
+ I((h(), x(l(f), {
330
400
  type: "error",
331
- disabled: !a(B),
332
- onClick: a(F)
401
+ disabled: !l(H),
402
+ onClick: l(J)
333
403
  }, {
334
404
  icon: n(() => [
335
- i(E, {
405
+ s(y, {
336
406
  icon: "ph:trash",
337
407
  size: 16
338
408
  })
339
409
  ]),
340
410
  default: n(() => [
341
- k(" " + v(a(t)("common.batchDelete")), 1)
411
+ E(" " + k(l(t)("common.batchDelete")), 1)
342
412
  ]),
343
413
  _: 1
344
414
  }, 8, ["disabled", "onClick"])), [
345
- [l, "POST:/api/v1/sys/user/batch-delete"]
415
+ [a, "POST:/api/v1/sys/user/batch-delete"]
346
416
  ]),
347
- x((f(), h(a(p), {
348
- onClick: r[2] || (r[2] = (o) => P.value = !0)
417
+ I((h(), x(l(f), {
418
+ onClick: e[4] || (e[4] = (o) => R.value = !0)
349
419
  }, {
350
420
  icon: n(() => [
351
- i(E, {
421
+ s(y, {
352
422
  icon: "ph:upload-simple",
353
423
  size: 16
354
424
  })
355
425
  ]),
356
426
  default: n(() => [
357
- k(" " + v(a(t)("import.button")), 1)
427
+ E(" " + k(l(t)("import.button")), 1)
358
428
  ]),
359
429
  _: 1
360
430
  })), [
361
- [l, "POST:/api/v1/sys/user/import/preview"]
431
+ [a, "POST:/api/v1/sys/user/import/preview"]
362
432
  ]),
363
- x((f(), h(a(p), {
364
- onClick: r[3] || (r[3] = (o) => w.value = !0)
433
+ I((h(), x(l(f), {
434
+ onClick: e[5] || (e[5] = (o) => S.value = !0)
365
435
  }, {
366
436
  icon: n(() => [
367
- i(E, {
437
+ s(y, {
368
438
  icon: "ph:download-simple",
369
439
  size: 16
370
440
  })
371
441
  ]),
372
442
  default: n(() => [
373
- k(" " + v(a(t)("export.button")), 1)
443
+ E(" " + k(l(t)("export.button")), 1)
374
444
  ]),
375
445
  _: 1
376
446
  })), [
377
- [l, "GET:/api/v1/sys/user/export"]
447
+ [a, "GET:/api/v1/sys/user/export"]
378
448
  ])
379
449
  ]),
380
450
  _: 1
381
451
  }, 8, ["fetcher", "params", "checked-row-keys"])
382
452
  ]),
383
- i(he, {
453
+ s(Ae, {
384
454
  ref_key: "userFormRef",
385
- ref: S,
386
- "position-options": M.value,
387
- "role-options": C.value,
388
- "director-options": R.value,
389
- onSaved: r[6] || (r[6] = () => {
455
+ ref: P,
456
+ "position-options": q.value,
457
+ "role-options": z.value,
458
+ "director-options": B.value,
459
+ onSaved: e[8] || (e[8] = () => {
390
460
  var o;
391
- return (o = d.value) == null ? void 0 : o.refresh();
461
+ return (o = p.value) == null ? void 0 : o.refresh();
392
462
  }),
393
- onPasswordGenerated: r[7] || (r[7] = (o) => {
394
- var g;
395
- return (g = T.value) == null ? void 0 : g.showResult(o, !0);
463
+ onPasswordGenerated: e[9] || (e[9] = (o) => {
464
+ var c;
465
+ return (c = A.value) == null ? void 0 : c.showResult(o, !0);
396
466
  })
397
467
  }, null, 8, ["position-options", "role-options", "director-options"]),
398
- i(ke, {
468
+ s(ze, {
399
469
  ref_key: "resetModalRef",
400
- ref: T
470
+ ref: A
401
471
  }, null, 512),
402
- i(ye, {
403
- show: P.value,
404
- "onUpdate:show": r[8] || (r[8] = (o) => P.value = o),
405
- api: j,
406
- "template-file-name": a(t)("userExport.importTemplateName"),
407
- "error-report-file-name": a(t)("userExport.errorReportName"),
408
- onDone: r[9] || (r[9] = () => {
472
+ s(Te, {
473
+ show: R.value,
474
+ "onUpdate:show": e[10] || (e[10] = (o) => R.value = o),
475
+ api: oe,
476
+ "template-file-name": l(t)("userExport.importTemplateName"),
477
+ "error-report-file-name": l(t)("userExport.errorReportName"),
478
+ onDone: e[11] || (e[11] = () => {
409
479
  var o;
410
- return (o = d.value) == null ? void 0 : o.refresh();
480
+ return (o = p.value) == null ? void 0 : o.refresh();
411
481
  })
412
482
  }, null, 8, ["show", "template-file-name", "error-report-file-name"]),
413
- i(ge, {
414
- show: w.value,
415
- "onUpdate:show": r[10] || (r[10] = (o) => w.value = o),
416
- columns: L,
417
- loading: I.value,
418
- onConfirm: W
483
+ s(Pe, {
484
+ show: S.value,
485
+ "onUpdate:show": e[12] || (e[12] = (o) => S.value = o),
486
+ columns: te,
487
+ loading: U.value,
488
+ onConfirm: ae
419
489
  }, null, 8, ["show", "loading"])
420
490
  ], 64);
421
491
  };
422
492
  }
423
493
  });
424
494
  export {
425
- Ye as default
495
+ cr as default
426
496
  };
427
497
  //# sourceMappingURL=index2.vue.js.map