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.
- package/dist/api/index.d.ts +13 -1
- package/dist/api/index.js +25 -13
- package/dist/api/index.js.map +1 -1
- package/dist/api/schema.d.ts +360 -3
- package/dist/assets/icons/ph-subset.json.js +1 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/locales/en-US.d.ts +13 -1
- package/dist/locales/en-US.js +15 -3
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/zh-CN.d.ts +13 -1
- package/dist/locales/zh-CN.js +15 -3
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/router/index.js +18 -13
- package/dist/router/index.js.map +1 -1
- package/dist/router/viewRegistry.js +1 -1
- package/dist/router/viewRegistry.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api.d.ts +26 -0
- package/dist/types/api.js.map +1 -1
- package/dist/views/dashboard/ShortcutPicker.vue.d.ts +16 -0
- package/dist/views/dashboard/ShortcutPicker.vue.js +8 -0
- package/dist/views/dashboard/ShortcutPicker.vue.js.map +1 -0
- package/dist/views/dashboard/ShortcutPicker2.vue.js +86 -0
- package/dist/views/dashboard/ShortcutPicker2.vue.js.map +1 -0
- package/dist/views/dashboard/biz.vue.js +2 -2
- package/dist/views/dashboard/biz2.vue.js +265 -93
- package/dist/views/dashboard/biz2.vue.js.map +1 -1
- package/dist/views/dashboard/onlineDuration.d.ts +5 -0
- package/dist/views/dashboard/onlineDuration.js +8 -0
- package/dist/views/dashboard/onlineDuration.js.map +1 -0
- package/dist/views/dashboard/shortcutGroups.d.ts +18 -0
- package/dist/views/dashboard/shortcutGroups.js +19 -0
- package/dist/views/dashboard/shortcutGroups.js.map +1 -0
- package/dist/views/system/user/index.vue.js +2 -2
- package/dist/views/system/user/index2.vue.js +281 -211
- package/dist/views/system/user/index2.vue.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,88 +1,111 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { useMessage as
|
|
4
|
-
import { useI18n as
|
|
5
|
-
import { SmartTable as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useConfirm as
|
|
14
|
-
import { useBatchDelete as
|
|
15
|
-
import { userApi as u, positionApi as
|
|
16
|
-
import { useAuthStore as
|
|
17
|
-
import { translateError as
|
|
18
|
-
import { triggerBlobDownload as
|
|
19
|
-
import { buildTree as
|
|
20
|
-
const
|
|
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(
|
|
23
|
-
const { t } =
|
|
24
|
-
checkedKeys:
|
|
25
|
-
hasSelection:
|
|
26
|
-
run:
|
|
27
|
-
} =
|
|
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
|
|
31
|
-
return (
|
|
30
|
+
var r;
|
|
31
|
+
return (r = p.value) == null ? void 0 : r.refresh();
|
|
32
32
|
},
|
|
33
33
|
successMsg: t("user.deleted")
|
|
34
|
-
}),
|
|
35
|
-
async function
|
|
36
|
-
var
|
|
37
|
-
|
|
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:
|
|
41
|
-
action: () =>
|
|
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
|
-
}) && ((
|
|
43
|
+
}) && ((e = p.value) == null || e.refresh());
|
|
44
44
|
} finally {
|
|
45
|
-
|
|
45
|
+
N.value = !1;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
() =>
|
|
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
|
|
52
|
-
|
|
51
|
+
function Y(r) {
|
|
52
|
+
m.value = r.length ? Number(r[0]) : null;
|
|
53
53
|
}
|
|
54
|
-
|
|
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:
|
|
57
|
-
|
|
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:
|
|
62
|
-
|
|
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:
|
|
67
|
-
|
|
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
|
-
|
|
92
|
+
_.value = await Ue.list();
|
|
72
93
|
} catch {
|
|
94
|
+
} finally {
|
|
95
|
+
F.value = !1;
|
|
73
96
|
}
|
|
74
97
|
});
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
[
|
|
78
|
-
([
|
|
79
|
-
if (!
|
|
80
|
-
const
|
|
81
|
-
|
|
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
|
|
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
|
-
],
|
|
121
|
+
], oe = {
|
|
99
122
|
downloadTemplate: () => u.importTemplate(),
|
|
100
|
-
preview: (
|
|
101
|
-
validate: (
|
|
102
|
-
commit: (
|
|
103
|
-
errorReport: (
|
|
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
|
|
106
|
-
var
|
|
107
|
-
const
|
|
108
|
-
|
|
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:
|
|
112
|
-
name:
|
|
113
|
-
orgId:
|
|
114
|
-
roleId:
|
|
115
|
-
sortField:
|
|
116
|
-
sortOrder:
|
|
117
|
-
columns:
|
|
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
|
-
|
|
142
|
+
qe(o, t("userExport.fileName")), S.value = !1, T.success(t("export.done"));
|
|
120
143
|
} catch (o) {
|
|
121
|
-
|
|
144
|
+
T.error(G(o));
|
|
122
145
|
} finally {
|
|
123
|
-
|
|
146
|
+
U.value = !1;
|
|
124
147
|
}
|
|
125
148
|
}
|
|
126
|
-
const
|
|
149
|
+
const le = [
|
|
127
150
|
{ type: "index", title: () => t("common.rowNo"), width: 64, align: "center" },
|
|
128
151
|
// 超管行禁勾:批量删除同样不可含超管(后端也会整体拒绝)
|
|
129
|
-
{ type: "selection", disabled: (
|
|
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: (
|
|
137
|
-
|
|
138
|
-
{ round: !0, size: "small", src:
|
|
139
|
-
|
|
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: (
|
|
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: (
|
|
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:
|
|
182
|
+
options: z,
|
|
160
183
|
search: { props: { clearable: !0 } }
|
|
161
184
|
},
|
|
162
|
-
{ key: "orgName", title: () => t("user.org"), render: (
|
|
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: (
|
|
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: (
|
|
174
|
-
value:
|
|
196
|
+
render: (r) => d(Ce, {
|
|
197
|
+
value: r.enabled,
|
|
175
198
|
// 超管不可停用(防自锁 —— 停了就没法从 UI 恢复;后端也保护);无启停权限亦置灰。
|
|
176
|
-
disabled:
|
|
177
|
-
confirm: (
|
|
178
|
-
request: (
|
|
179
|
-
"onUpdate:value": (
|
|
180
|
-
|
|
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: (
|
|
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: (
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
|
|
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
|
|
206
|
-
|
|
207
|
-
|
|
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
|
|
214
|
-
return (
|
|
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
|
-
|
|
220
|
-
|
|
242
|
+
r.isSuperAdmin || !w.hasPerm("DELETE:/api/v1/sys/user/{id}") ? null : d(
|
|
243
|
+
xe,
|
|
221
244
|
{
|
|
222
|
-
onPositiveClick: () =>
|
|
245
|
+
onPositiveClick: () => j(() => u.remove(r.id), t("user.deleted")).then((a) => {
|
|
223
246
|
var o;
|
|
224
|
-
|
|
247
|
+
a && ((o = p.value) == null || o.refresh());
|
|
225
248
|
})
|
|
226
249
|
},
|
|
227
250
|
{
|
|
228
|
-
trigger: () =>
|
|
229
|
-
|
|
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:
|
|
256
|
+
default: () => t("user.deleteConfirm", { name: r.name })
|
|
234
257
|
}
|
|
235
258
|
),
|
|
236
|
-
|
|
237
|
-
|
|
259
|
+
e.length ? d(
|
|
260
|
+
Ee,
|
|
238
261
|
{
|
|
239
262
|
trigger: "click",
|
|
240
|
-
options:
|
|
241
|
-
onSelect: (
|
|
263
|
+
options: e,
|
|
264
|
+
onSelect: (a) => {
|
|
242
265
|
var o;
|
|
243
|
-
|
|
266
|
+
a === "resetPassword" ? (o = A.value) == null || o.openReset(r) : a === "clearMfa" && Q(r);
|
|
244
267
|
}
|
|
245
268
|
},
|
|
246
|
-
() =>
|
|
247
|
-
|
|
248
|
-
{ size: "small", quaternary: !0, loading:
|
|
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 (
|
|
257
|
-
const
|
|
258
|
-
return
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
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(
|
|
304
|
+
E(" " + k(M.value ? l(t)("common.collapseAll") : l(t)("common.expandAll")), 1)
|
|
277
305
|
]),
|
|
278
306
|
_: 1
|
|
279
|
-
})) :
|
|
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
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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:
|
|
298
|
-
columns:
|
|
299
|
-
fetcher:
|
|
300
|
-
params:
|
|
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":
|
|
305
|
-
"onUpdate:checkedRowKeys":
|
|
306
|
-
onError:
|
|
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
|
-
|
|
379
|
+
I((h(), x(l(f), {
|
|
310
380
|
type: "primary",
|
|
311
|
-
onClick:
|
|
312
|
-
var
|
|
313
|
-
return (
|
|
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
|
-
|
|
387
|
+
s(y, {
|
|
318
388
|
icon: "ph:plus",
|
|
319
389
|
size: 16
|
|
320
390
|
})
|
|
321
391
|
]),
|
|
322
392
|
default: n(() => [
|
|
323
|
-
|
|
393
|
+
E(" " + k(l(t)("common.add")), 1)
|
|
324
394
|
]),
|
|
325
395
|
_: 1
|
|
326
396
|
})), [
|
|
327
|
-
[
|
|
397
|
+
[a, "POST:/api/v1/sys/user"]
|
|
328
398
|
]),
|
|
329
|
-
|
|
399
|
+
I((h(), x(l(f), {
|
|
330
400
|
type: "error",
|
|
331
|
-
disabled: !
|
|
332
|
-
onClick:
|
|
401
|
+
disabled: !l(H),
|
|
402
|
+
onClick: l(J)
|
|
333
403
|
}, {
|
|
334
404
|
icon: n(() => [
|
|
335
|
-
|
|
405
|
+
s(y, {
|
|
336
406
|
icon: "ph:trash",
|
|
337
407
|
size: 16
|
|
338
408
|
})
|
|
339
409
|
]),
|
|
340
410
|
default: n(() => [
|
|
341
|
-
|
|
411
|
+
E(" " + k(l(t)("common.batchDelete")), 1)
|
|
342
412
|
]),
|
|
343
413
|
_: 1
|
|
344
414
|
}, 8, ["disabled", "onClick"])), [
|
|
345
|
-
[
|
|
415
|
+
[a, "POST:/api/v1/sys/user/batch-delete"]
|
|
346
416
|
]),
|
|
347
|
-
|
|
348
|
-
onClick:
|
|
417
|
+
I((h(), x(l(f), {
|
|
418
|
+
onClick: e[4] || (e[4] = (o) => R.value = !0)
|
|
349
419
|
}, {
|
|
350
420
|
icon: n(() => [
|
|
351
|
-
|
|
421
|
+
s(y, {
|
|
352
422
|
icon: "ph:upload-simple",
|
|
353
423
|
size: 16
|
|
354
424
|
})
|
|
355
425
|
]),
|
|
356
426
|
default: n(() => [
|
|
357
|
-
|
|
427
|
+
E(" " + k(l(t)("import.button")), 1)
|
|
358
428
|
]),
|
|
359
429
|
_: 1
|
|
360
430
|
})), [
|
|
361
|
-
[
|
|
431
|
+
[a, "POST:/api/v1/sys/user/import/preview"]
|
|
362
432
|
]),
|
|
363
|
-
|
|
364
|
-
onClick:
|
|
433
|
+
I((h(), x(l(f), {
|
|
434
|
+
onClick: e[5] || (e[5] = (o) => S.value = !0)
|
|
365
435
|
}, {
|
|
366
436
|
icon: n(() => [
|
|
367
|
-
|
|
437
|
+
s(y, {
|
|
368
438
|
icon: "ph:download-simple",
|
|
369
439
|
size: 16
|
|
370
440
|
})
|
|
371
441
|
]),
|
|
372
442
|
default: n(() => [
|
|
373
|
-
|
|
443
|
+
E(" " + k(l(t)("export.button")), 1)
|
|
374
444
|
]),
|
|
375
445
|
_: 1
|
|
376
446
|
})), [
|
|
377
|
-
[
|
|
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
|
-
|
|
453
|
+
s(Ae, {
|
|
384
454
|
ref_key: "userFormRef",
|
|
385
|
-
ref:
|
|
386
|
-
"position-options":
|
|
387
|
-
"role-options":
|
|
388
|
-
"director-options":
|
|
389
|
-
onSaved:
|
|
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 =
|
|
461
|
+
return (o = p.value) == null ? void 0 : o.refresh();
|
|
392
462
|
}),
|
|
393
|
-
onPasswordGenerated:
|
|
394
|
-
var
|
|
395
|
-
return (
|
|
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
|
-
|
|
468
|
+
s(ze, {
|
|
399
469
|
ref_key: "resetModalRef",
|
|
400
|
-
ref:
|
|
470
|
+
ref: A
|
|
401
471
|
}, null, 512),
|
|
402
|
-
|
|
403
|
-
show:
|
|
404
|
-
"onUpdate:show":
|
|
405
|
-
api:
|
|
406
|
-
"template-file-name":
|
|
407
|
-
"error-report-file-name":
|
|
408
|
-
onDone:
|
|
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 =
|
|
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
|
-
|
|
414
|
-
show:
|
|
415
|
-
"onUpdate:show":
|
|
416
|
-
columns:
|
|
417
|
-
loading:
|
|
418
|
-
onConfirm:
|
|
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
|
-
|
|
495
|
+
cr as default
|
|
426
496
|
};
|
|
427
497
|
//# sourceMappingURL=index2.vue.js.map
|