smart-admin-web 10.20.0 → 10.21.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.
- package/dist/api/index.d.ts +19 -1
- package/dist/api/index.js +85 -66
- package/dist/api/index.js.map +1 -1
- package/dist/api/schema.d.ts +448 -1
- package/dist/assets/icons/ph-subset.json.js +1 -1
- package/dist/components/FormContainer/index.vue.js +87 -75
- package/dist/components/FormContainer/index.vue.js.map +1 -1
- package/dist/components/UserPicker/UserAvatar.vue.d.ts +8 -0
- package/dist/components/UserPicker/UserAvatar.vue.js +8 -0
- package/dist/components/UserPicker/UserAvatar.vue.js.map +1 -0
- package/dist/components/UserPicker/UserAvatar2.vue.js +38 -0
- package/dist/components/UserPicker/UserAvatar2.vue.js.map +1 -0
- package/dist/components/UserPicker/index.vue.js +1 -1
- package/dist/components/UserPicker/index2.vue.js +328 -186
- package/dist/components/UserPicker/index2.vue.js.map +1 -1
- package/dist/index.js +248 -246
- package/dist/layouts/NoticeBell.vue.js +2 -2
- package/dist/layouts/NoticeBell2.vue.js +18 -17
- package/dist/layouts/NoticeBell2.vue.js.map +1 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/watermark.d.ts +1 -1
- package/dist/locales/en-US.d.ts +62 -3
- package/dist/locales/en-US.js +66 -7
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/kernelMenuTitles.js +2 -1
- package/dist/locales/kernelMenuTitles.js.map +1 -1
- package/dist/locales/zh-CN.d.ts +62 -3
- package/dist/locales/zh-CN.js +66 -7
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/router/viewRegistry.js +6 -6
- package/dist/router/viewRegistry.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/naive-theme.js +72 -67
- package/dist/theme/naive-theme.js.map +1 -1
- package/dist/types/api.d.ts +91 -0
- package/dist/types/api.js +17 -15
- package/dist/types/api.js.map +1 -1
- package/dist/utils/shake.d.ts +1 -0
- package/dist/utils/shake.js +30 -0
- package/dist/utils/shake.js.map +1 -0
- package/dist/views/login/LoginForm.vue.js +2 -2
- package/dist/views/login/LoginForm2.vue.js +135 -135
- package/dist/views/login/LoginForm2.vue.js.map +1 -1
- package/dist/views/login/components/LoginDesk.vue.js +1 -1
- package/dist/views/login/components/LoginDesk2.vue.js +59 -47
- package/dist/views/login/components/LoginDesk2.vue.js.map +1 -1
- package/dist/views/personal/notice2.vue.js +1 -1
- package/dist/views/personal/notice2.vue.js.map +1 -1
- package/dist/views/personal/sessions.vue.js +2 -2
- package/dist/views/personal/sessions2.vue.js +41 -40
- package/dist/views/personal/sessions2.vue.js.map +1 -1
- package/dist/views/system/ai-usage/index.vue.js +3 -3
- package/dist/views/system/ai-usage/index2.vue.js +13 -12
- package/dist/views/system/ai-usage/index2.vue.js.map +1 -1
- package/dist/views/system/config/components/AdvancedSection.vue.js +3 -3
- package/dist/views/system/config/components/AdvancedSection2.vue.js +2 -1
- package/dist/views/system/config/components/AdvancedSection2.vue.js.map +1 -1
- package/dist/views/system/dict/index.vue.js +2 -2
- package/dist/views/system/dict/index2.vue.js +12 -1
- package/dist/views/system/dict/index2.vue.js.map +1 -1
- package/dist/views/system/file/index2.vue.js +1 -0
- package/dist/views/system/file/index2.vue.js.map +1 -1
- package/dist/views/system/job/index.vue.js +3 -3
- package/dist/views/system/job/index2.vue.js +182 -181
- package/dist/views/system/job/index2.vue.js.map +1 -1
- package/dist/views/system/job-log/components/AttemptTable2.vue.js +8 -3
- package/dist/views/system/job-log/components/AttemptTable2.vue.js.map +1 -1
- package/dist/views/system/job-log/index.vue.js +1 -1
- package/dist/views/system/job-log/index2.vue.js +5 -5
- package/dist/views/system/job-log/index2.vue.js.map +1 -1
- package/dist/views/system/log/exception/index.vue.js +2 -2
- package/dist/views/system/log/exception/index2.vue.js +8 -5
- package/dist/views/system/log/exception/index2.vue.js.map +1 -1
- package/dist/views/system/log/login/index2.vue.js +21 -12
- package/dist/views/system/log/login/index2.vue.js.map +1 -1
- package/dist/views/system/log/op/index.vue.js +2 -2
- package/dist/views/system/log/op/index2.vue.js +50 -40
- package/dist/views/system/log/op/index2.vue.js.map +1 -1
- package/dist/views/system/menu/components/ButtonManager.vue.js +2 -2
- package/dist/views/system/menu/components/ButtonManager2.vue.js +45 -36
- package/dist/views/system/menu/components/ButtonManager2.vue.js.map +1 -1
- package/dist/views/system/menu/index.vue.js +2 -2
- package/dist/views/system/menu/index2.vue.js +11 -11
- package/dist/views/system/menu/index2.vue.js.map +1 -1
- package/dist/views/system/module/index.vue.js +1 -1
- package/dist/views/system/module/index2.vue.js +171 -117
- package/dist/views/system/module/index2.vue.js.map +1 -1
- package/dist/views/system/notice/index.vue.js +3 -3
- package/dist/views/system/notice/index2.vue.js +1 -0
- package/dist/views/system/notice/index2.vue.js.map +1 -1
- package/dist/views/system/org/index.vue.js +2 -2
- package/dist/views/system/org/index2.vue.js +70 -67
- package/dist/views/system/org/index2.vue.js.map +1 -1
- package/dist/views/system/position/index.vue.js +2 -2
- package/dist/views/system/position/index2.vue.js +57 -48
- package/dist/views/system/position/index2.vue.js.map +1 -1
- package/dist/views/system/recycle/index.vue.js +1 -1
- package/dist/views/system/recycle/index2.vue.js +3 -1
- package/dist/views/system/recycle/index2.vue.js.map +1 -1
- package/dist/views/system/role/components/GrantMenuSheet.vue.d.ts +2 -0
- package/dist/views/system/role/components/GrantMenuSheet.vue.js +2 -2
- package/dist/views/system/role/components/GrantMenuSheet2.vue.js +54 -49
- package/dist/views/system/role/components/GrantMenuSheet2.vue.js.map +1 -1
- package/dist/views/system/role/components/GrantMenuTable.vue.js +1 -1
- package/dist/views/system/role/components/GrantMenuTable2.vue.js +159 -195
- package/dist/views/system/role/components/GrantMenuTable2.vue.js.map +1 -1
- package/dist/views/system/role/components/grantMenuGroups.d.ts +54 -0
- package/dist/views/system/role/components/grantMenuGroups.js +116 -76
- package/dist/views/system/role/components/grantMenuGroups.js.map +1 -1
- package/dist/views/system/role/index.vue.js +2 -2
- package/dist/views/system/role/index2.vue.js +152 -145
- package/dist/views/system/role/index2.vue.js.map +1 -1
- package/dist/views/system/session/index2.vue.js +39 -35
- package/dist/views/system/session/index2.vue.js.map +1 -1
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.d.ts +10 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js +5 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js +96 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.d.ts +13 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js +216 -0
- package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.d.ts +13 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuTable2.vue.js +186 -0
- package/dist/views/system/user/components/UserGrantMenuTable2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.d.ts +31 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantNodeRow2.vue.js +171 -0
- package/dist/views/system/user/components/UserGrantNodeRow2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.d.ts +21 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js +5 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js +178 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js.map +1 -0
- package/dist/views/system/user/components/userGrantState.d.ts +64 -0
- package/dist/views/system/user/components/userGrantState.js +117 -0
- package/dist/views/system/user/components/userGrantState.js.map +1 -0
- package/dist/views/system/user/index.vue.js +2 -2
- package/dist/views/system/user/index2.vue.js +250 -207
- package/dist/views/system/user/index2.vue.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,265 +1,407 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useMessage as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import we from "../FormContainer/index.vue.js";
|
|
1
|
+
import { defineComponent as Ne, ref as d, computed as u, onMounted as Ie, reactive as Ee, openBlock as i, createBlock as w, unref as s, withCtx as f, createVNode as c, createTextVNode as E, toDisplayString as r, createCommentVNode as h, createElementVNode as n, normalizeClass as H, createElementBlock as m, withDirectives as R, Fragment as Z, renderList as J, withKeys as Q, withModifiers as X, vShow as Y } from "vue";
|
|
2
|
+
import { useMessage as Ue, NTabs as Te, NTab as ee, NTree as $e, NTreeSelect as Ae, NInput as ae, NDropdown as De, NButton as te, NSpin as Be, NEmpty as se } from "naive-ui";
|
|
3
|
+
import { useI18n as Me } from "vue-i18n";
|
|
4
|
+
import { useWindowSize as Ke, useDebounceFn as Le } from "@vueuse/core";
|
|
5
|
+
import S from "../AppIcon.vue.js";
|
|
6
|
+
import Oe from "../FormContainer/index.vue.js";
|
|
8
7
|
/* empty css */
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
const
|
|
8
|
+
import le from "./UserAvatar.vue.js";
|
|
9
|
+
import { useShellBreakpoint as Ve } from "../../composables/useShellBreakpoint.js";
|
|
10
|
+
import { orgApi as Fe, userApi as ne } from "../../api/index.js";
|
|
11
|
+
import { buildTree as qe } from "../../utils/tree.js";
|
|
12
|
+
import { translateError as We } from "../../utils/error.js";
|
|
13
|
+
const je = {
|
|
15
14
|
key: 0,
|
|
16
|
-
class: "picker-
|
|
17
|
-
},
|
|
15
|
+
class: "picker-org"
|
|
16
|
+
}, Ge = { class: "side-title" }, He = { class: "picker-main" }, Re = { class: "picker-toolbar" }, Ze = {
|
|
17
|
+
class: "scope-trigger",
|
|
18
|
+
role: "button",
|
|
19
|
+
tabindex: "0"
|
|
20
|
+
}, Je = {
|
|
21
|
+
class: "user-list",
|
|
22
|
+
role: "group"
|
|
23
|
+
}, Qe = ["aria-checked", "aria-disabled", "tabindex", "onClick", "onKeydown"], Xe = { class: "user-main" }, Ye = { class: "user-name" }, ea = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "user-sub"
|
|
26
|
+
}, aa = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "user-tag"
|
|
29
|
+
}, ta = {
|
|
30
|
+
key: 1,
|
|
31
|
+
class: "user-check"
|
|
32
|
+
}, sa = { class: "picker-foot" }, la = { class: "picker-total" }, na = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "pager"
|
|
35
|
+
}, oa = ["disabled", "aria-label"], ia = { class: "pager-num" }, ca = ["disabled", "aria-label"], ra = { class: "picker-selected" }, ua = { class: "side-head" }, da = { class: "side-title" }, va = { class: "side-count" }, pa = { class: "selected-list" }, ma = { class: "user-main" }, fa = { class: "user-name" }, ha = {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "user-sub"
|
|
38
|
+
}, ga = ["aria-label", "onClick"], oe = 20, ka = 8, Ua = /* @__PURE__ */ Ne({
|
|
18
39
|
__name: "index",
|
|
19
40
|
props: {
|
|
20
41
|
excludeIds: {}
|
|
21
42
|
},
|
|
22
43
|
emits: ["confirm"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
() =>
|
|
44
|
+
setup(ie, { expose: ce, emit: re }) {
|
|
45
|
+
const ue = ie, de = re, { t: l } = Me(), ve = Ue(), M = d(!1), { bp: V } = Ve(), { width: pe } = Ke(), g = u(() => V.value === "narrow" || pe.value < 900), me = u(() => V.value === "narrow" ? "drawer" : "modal"), x = d("users"), F = d([]), q = u(() => [{ id: 0, parentId: -1, name: l("common.all"), children: qe(F.value) }]), k = d(null), fe = u(
|
|
46
|
+
() => k.value && k.value !== 0 ? k.value : void 0
|
|
26
47
|
);
|
|
27
|
-
|
|
48
|
+
Ie(async () => {
|
|
28
49
|
try {
|
|
29
|
-
|
|
50
|
+
F.value = await Fe.list();
|
|
30
51
|
} catch {
|
|
31
52
|
}
|
|
32
53
|
});
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
c.value = t[0] ?? null, (e = y.value) == null || e.refresh();
|
|
54
|
+
function he(e) {
|
|
55
|
+
k.value = e[0] ?? null, A();
|
|
36
56
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
c.value = t ?? null, (e = y.value) == null || e.refresh();
|
|
57
|
+
function ge(e) {
|
|
58
|
+
k.value = e ?? null, A();
|
|
40
59
|
}
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
disabled: e,
|
|
68
|
-
onClick: () => B([t])
|
|
69
|
-
},
|
|
70
|
-
() => n(e ? "userPicker.added" : "userPicker.add")
|
|
71
|
-
);
|
|
72
|
-
}
|
|
60
|
+
const b = d("name"), P = d(""), v = d(1), C = d(0), y = d([]), U = d(!1);
|
|
61
|
+
let T = 0;
|
|
62
|
+
const $ = u(() => Math.max(1, Math.ceil(C.value / oe))), ke = u(
|
|
63
|
+
() => b.value === "name" ? l("userPicker.searchName") : l("userPicker.searchAccount")
|
|
64
|
+
), _e = u(() => [
|
|
65
|
+
{ key: "name", label: l("user.name") },
|
|
66
|
+
{ key: "account", label: l("user.account") }
|
|
67
|
+
]);
|
|
68
|
+
async function K() {
|
|
69
|
+
const e = ++T;
|
|
70
|
+
U.value = !0;
|
|
71
|
+
try {
|
|
72
|
+
const t = P.value.trim() || void 0, a = await ne.page({
|
|
73
|
+
page: v.value,
|
|
74
|
+
pageSize: oe,
|
|
75
|
+
name: b.value === "name" ? t : void 0,
|
|
76
|
+
account: b.value === "account" ? t : void 0,
|
|
77
|
+
orgId: fe.value
|
|
78
|
+
});
|
|
79
|
+
if (e !== T) return;
|
|
80
|
+
y.value = a.items, C.value = a.total;
|
|
81
|
+
} catch (t) {
|
|
82
|
+
if (e !== T) return;
|
|
83
|
+
y.value = [], C.value = 0, ve.error(We(t));
|
|
84
|
+
} finally {
|
|
85
|
+
e === T && (U.value = !1);
|
|
73
86
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
87
|
+
}
|
|
88
|
+
function A() {
|
|
89
|
+
v.value = 1, K();
|
|
90
|
+
}
|
|
91
|
+
const be = Le(A, 300);
|
|
92
|
+
function ye(e) {
|
|
93
|
+
P.value = e, be();
|
|
94
|
+
}
|
|
95
|
+
function we(e) {
|
|
96
|
+
b.value = e, P.value.trim() && A();
|
|
97
|
+
}
|
|
98
|
+
function W(e) {
|
|
99
|
+
e < 1 || e > $.value || e === v.value || (v.value = e, K());
|
|
100
|
+
}
|
|
101
|
+
const o = Ee([]), z = u(() => new Set(o.map((e) => e.id))), _ = u(() => new Set(ue.excludeIds ?? [])), D = d(""), Se = u(() => {
|
|
102
|
+
const e = D.value.trim().toLowerCase();
|
|
103
|
+
return e ? o.filter(
|
|
104
|
+
(t) => t.name.toLowerCase().includes(e) || t.account.toLowerCase().includes(e)
|
|
105
|
+
) : o;
|
|
79
106
|
});
|
|
80
|
-
function
|
|
81
|
-
for (const
|
|
82
|
-
!
|
|
107
|
+
function j(e) {
|
|
108
|
+
for (const t of e)
|
|
109
|
+
!z.value.has(t.id) && !_.value.has(t.id) && o.push(t);
|
|
83
110
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
B(t), m.value = [];
|
|
111
|
+
function L(e) {
|
|
112
|
+
const t = o.findIndex((a) => a.id === e);
|
|
113
|
+
t >= 0 && o.splice(t, 1);
|
|
88
114
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
91
|
-
e >= 0 && s.splice(e, 1);
|
|
115
|
+
function O(e) {
|
|
116
|
+
_.value.has(e.id) || (z.value.has(e.id) ? L(e.id) : j([e]));
|
|
92
117
|
}
|
|
93
|
-
function
|
|
94
|
-
|
|
118
|
+
function xe() {
|
|
119
|
+
o.splice(0, o.length);
|
|
95
120
|
}
|
|
96
|
-
|
|
97
|
-
|
|
121
|
+
const N = u(() => y.value.filter((e) => !_.value.has(e.id))), G = u(
|
|
122
|
+
() => N.value.length > 0 && N.value.every((e) => z.value.has(e.id))
|
|
123
|
+
);
|
|
124
|
+
function Pe() {
|
|
125
|
+
if (G.value)
|
|
126
|
+
for (const e of N.value) L(e.id);
|
|
127
|
+
else
|
|
128
|
+
j(N.value);
|
|
129
|
+
}
|
|
130
|
+
function B(e) {
|
|
131
|
+
return [e.account !== e.name ? e.account : "", e.orgName].filter(Boolean).join(" · ");
|
|
132
|
+
}
|
|
133
|
+
async function Ce(e) {
|
|
134
|
+
if (o.splice(0, o.length), D.value = "", k.value = null, P.value = "", b.value = "name", v.value = 1, y.value = [], C.value = 0, x.value = "users", M.value = !0, K(), !!(e != null && e.length))
|
|
98
135
|
try {
|
|
99
|
-
const { items:
|
|
100
|
-
for (const
|
|
101
|
-
for (const
|
|
102
|
-
|
|
136
|
+
const { items: t } = await ne.page({ page: 1, pageSize: 200 }), a = t.filter((p) => e.includes(p.id)), I = new Set(a.map((p) => p.id));
|
|
137
|
+
for (const p of a) o.push(p);
|
|
138
|
+
for (const p of e)
|
|
139
|
+
I.has(p) || o.push({ id: p, account: String(p), name: String(p) });
|
|
103
140
|
} catch {
|
|
104
|
-
for (const
|
|
141
|
+
for (const t of e) o.push({ id: t, account: String(t), name: String(t) });
|
|
105
142
|
}
|
|
106
143
|
}
|
|
107
|
-
async function
|
|
108
|
-
|
|
109
|
-
|
|
144
|
+
async function ze() {
|
|
145
|
+
de(
|
|
146
|
+
"confirm",
|
|
147
|
+
o.map((e) => e.id)
|
|
148
|
+
);
|
|
110
149
|
}
|
|
111
|
-
return
|
|
112
|
-
show:
|
|
113
|
-
"onUpdate:show":
|
|
114
|
-
variant:
|
|
115
|
-
title: l
|
|
116
|
-
width:
|
|
117
|
-
"on-confirm":
|
|
118
|
-
"confirm-text": l
|
|
150
|
+
return ce({ open: Ce }), (e, t) => (i(), w(Oe, {
|
|
151
|
+
show: M.value,
|
|
152
|
+
"onUpdate:show": t[4] || (t[4] = (a) => M.value = a),
|
|
153
|
+
variant: me.value,
|
|
154
|
+
title: s(l)("userPicker.title"),
|
|
155
|
+
width: 920,
|
|
156
|
+
"on-confirm": ze,
|
|
157
|
+
"confirm-text": s(l)("common.confirm")
|
|
119
158
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
159
|
+
default: f(() => [
|
|
160
|
+
g.value ? (i(), w(s(Te), {
|
|
122
161
|
key: 0,
|
|
123
|
-
value:
|
|
124
|
-
"onUpdate:value":
|
|
162
|
+
value: x.value,
|
|
163
|
+
"onUpdate:value": t[0] || (t[0] = (a) => x.value = a),
|
|
125
164
|
type: "segment",
|
|
126
165
|
animated: "",
|
|
127
166
|
class: "picker-tabs"
|
|
128
167
|
}, {
|
|
129
|
-
default:
|
|
130
|
-
|
|
131
|
-
default:
|
|
132
|
-
|
|
168
|
+
default: f(() => [
|
|
169
|
+
c(s(ee), { name: "users" }, {
|
|
170
|
+
default: f(() => [
|
|
171
|
+
E(r(s(l)("userPicker.available")), 1)
|
|
133
172
|
]),
|
|
134
173
|
_: 1
|
|
135
174
|
}),
|
|
136
|
-
|
|
137
|
-
default:
|
|
138
|
-
|
|
175
|
+
c(s(ee), { name: "selected" }, {
|
|
176
|
+
default: f(() => [
|
|
177
|
+
E(r(s(l)("userPicker.selected")) + " " + r(o.length), 1)
|
|
139
178
|
]),
|
|
140
179
|
_: 1
|
|
141
180
|
})
|
|
142
181
|
]),
|
|
143
182
|
_: 1
|
|
144
|
-
}, 8, ["value"])) :
|
|
145
|
-
|
|
146
|
-
class:
|
|
183
|
+
}, 8, ["value"])) : h("", !0),
|
|
184
|
+
n("div", {
|
|
185
|
+
class: H(["user-picker", { "is-compact": g.value }])
|
|
147
186
|
}, [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
data:
|
|
187
|
+
g.value ? h("", !0) : (i(), m("div", je, [
|
|
188
|
+
n("div", Ge, r(s(l)("userPicker.org")), 1),
|
|
189
|
+
c(s($e), {
|
|
190
|
+
data: q.value,
|
|
152
191
|
"key-field": "id",
|
|
153
192
|
"label-field": "name",
|
|
154
193
|
"children-field": "children",
|
|
155
194
|
selectable: "",
|
|
156
195
|
"block-line": "",
|
|
157
196
|
"default-expand-all": "",
|
|
158
|
-
"selected-keys":
|
|
159
|
-
"onUpdate:selectedKeys":
|
|
197
|
+
"selected-keys": [k.value ?? 0],
|
|
198
|
+
"onUpdate:selectedKeys": he
|
|
160
199
|
}, null, 8, ["data", "selected-keys"])
|
|
161
200
|
])),
|
|
162
|
-
|
|
163
|
-
|
|
201
|
+
R(n("div", He, [
|
|
202
|
+
g.value ? (i(), w(s(Ae), {
|
|
164
203
|
key: 0,
|
|
165
|
-
value:
|
|
166
|
-
options:
|
|
204
|
+
value: k.value ?? 0,
|
|
205
|
+
options: q.value,
|
|
167
206
|
"key-field": "id",
|
|
168
207
|
"label-field": "name",
|
|
169
208
|
"children-field": "children",
|
|
170
209
|
"default-expand-all": "",
|
|
171
210
|
size: "large",
|
|
172
211
|
class: "picker-org-select",
|
|
173
|
-
"onUpdate:value":
|
|
174
|
-
}, null, 8, ["value", "options"])) :
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
212
|
+
"onUpdate:value": ge
|
|
213
|
+
}, null, 8, ["value", "options"])) : h("", !0),
|
|
214
|
+
n("div", Re, [
|
|
215
|
+
c(s(ae), {
|
|
216
|
+
value: P.value,
|
|
217
|
+
round: "",
|
|
218
|
+
clearable: "",
|
|
219
|
+
size: g.value ? "large" : "medium",
|
|
220
|
+
placeholder: ke.value,
|
|
221
|
+
class: "picker-search",
|
|
222
|
+
"onUpdate:value": ye
|
|
223
|
+
}, {
|
|
224
|
+
prefix: f(() => [
|
|
225
|
+
c(s(De), {
|
|
226
|
+
trigger: "click",
|
|
227
|
+
options: _e.value,
|
|
228
|
+
value: b.value,
|
|
229
|
+
onSelect: we
|
|
230
|
+
}, {
|
|
231
|
+
default: f(() => [
|
|
232
|
+
n("span", Ze, [
|
|
233
|
+
c(S, {
|
|
234
|
+
icon: "ph:magnifying-glass",
|
|
235
|
+
size: 15
|
|
236
|
+
}),
|
|
237
|
+
c(S, {
|
|
238
|
+
icon: "ph:caret-down",
|
|
239
|
+
size: 10
|
|
240
|
+
})
|
|
241
|
+
])
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
}, 8, ["options", "value"])
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
}, 8, ["value", "size", "placeholder"]),
|
|
248
|
+
c(s(te), {
|
|
249
|
+
text: "",
|
|
179
250
|
type: "primary",
|
|
180
|
-
|
|
181
|
-
|
|
251
|
+
class: "page-toggle",
|
|
252
|
+
disabled: N.value.length === 0,
|
|
253
|
+
onClick: Pe
|
|
182
254
|
}, {
|
|
183
|
-
default:
|
|
184
|
-
|
|
255
|
+
default: f(() => [
|
|
256
|
+
E(r(G.value ? s(l)("userPicker.unselectPage") : s(l)("userPicker.selectPage")), 1)
|
|
185
257
|
]),
|
|
186
258
|
_: 1
|
|
187
|
-
}, 8, ["
|
|
259
|
+
}, 8, ["disabled"])
|
|
188
260
|
]),
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
ref_key: "tableRef",
|
|
192
|
-
ref: y,
|
|
193
|
-
columns: X,
|
|
194
|
-
fetcher: Q,
|
|
195
|
-
search: { container: "table" },
|
|
196
|
-
pagination: { pageSize: 10 },
|
|
261
|
+
c(s(Be), {
|
|
262
|
+
show: U.value,
|
|
197
263
|
size: "small",
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
264
|
+
class: "picker-spin"
|
|
265
|
+
}, {
|
|
266
|
+
default: f(() => [
|
|
267
|
+
n("div", Je, [
|
|
268
|
+
(i(!0), m(Z, null, J(y.value, (a) => (i(), m("div", {
|
|
269
|
+
key: a.id,
|
|
270
|
+
class: H(["user-row", {
|
|
271
|
+
"is-selected": z.value.has(a.id),
|
|
272
|
+
"is-disabled": _.value.has(a.id)
|
|
273
|
+
}]),
|
|
274
|
+
role: "checkbox",
|
|
275
|
+
"aria-checked": z.value.has(a.id) ? "true" : "false",
|
|
276
|
+
"aria-disabled": _.value.has(a.id) ? "true" : void 0,
|
|
277
|
+
tabindex: _.value.has(a.id) ? -1 : 0,
|
|
278
|
+
onClick: (I) => O(a),
|
|
279
|
+
onKeydown: [
|
|
280
|
+
Q(X((I) => O(a), ["prevent"]), ["enter"]),
|
|
281
|
+
Q(X((I) => O(a), ["prevent"]), ["space"])
|
|
282
|
+
]
|
|
283
|
+
}, [
|
|
284
|
+
c(le, {
|
|
285
|
+
name: a.name,
|
|
286
|
+
src: a.avatar,
|
|
287
|
+
size: 32
|
|
288
|
+
}, null, 8, ["name", "src"]),
|
|
289
|
+
n("span", Xe, [
|
|
290
|
+
n("span", Ye, r(a.name), 1),
|
|
291
|
+
B(a) ? (i(), m("span", ea, r(B(a)), 1)) : h("", !0)
|
|
292
|
+
]),
|
|
293
|
+
_.value.has(a.id) ? (i(), m("span", aa, r(s(l)("userPicker.existing")), 1)) : (i(), m("span", ta, [
|
|
294
|
+
c(S, {
|
|
295
|
+
icon: "ph:check-bold",
|
|
296
|
+
size: 12
|
|
297
|
+
})
|
|
298
|
+
]))
|
|
299
|
+
], 42, Qe))), 128)),
|
|
300
|
+
!U.value && y.value.length === 0 ? (i(), w(s(se), {
|
|
301
|
+
key: 0,
|
|
302
|
+
description: s(l)("common.noData"),
|
|
303
|
+
class: "user-empty"
|
|
304
|
+
}, null, 8, ["description"])) : h("", !0)
|
|
305
|
+
])
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
}, 8, ["show"]),
|
|
309
|
+
n("div", sa, [
|
|
310
|
+
n("span", la, r(s(l)("userPicker.total", { n: C.value })), 1),
|
|
311
|
+
$.value > 1 ? (i(), m("div", na, [
|
|
312
|
+
n("button", {
|
|
313
|
+
type: "button",
|
|
314
|
+
class: "pager-btn pager-prev",
|
|
315
|
+
disabled: v.value <= 1,
|
|
316
|
+
"aria-label": s(l)("userPicker.prevPage"),
|
|
317
|
+
onClick: t[1] || (t[1] = (a) => W(v.value - 1))
|
|
318
|
+
}, [
|
|
319
|
+
c(S, {
|
|
320
|
+
icon: "ph:caret-left",
|
|
321
|
+
size: 14
|
|
322
|
+
})
|
|
323
|
+
], 8, oa),
|
|
324
|
+
n("span", ia, r(v.value) + " / " + r($.value), 1),
|
|
325
|
+
n("button", {
|
|
326
|
+
type: "button",
|
|
327
|
+
class: "pager-btn pager-next",
|
|
328
|
+
disabled: v.value >= $.value,
|
|
329
|
+
"aria-label": s(l)("userPicker.nextPage"),
|
|
330
|
+
onClick: t[2] || (t[2] = (a) => W(v.value + 1))
|
|
331
|
+
}, [
|
|
332
|
+
c(S, {
|
|
333
|
+
icon: "ph:caret-right",
|
|
334
|
+
size: 14
|
|
335
|
+
})
|
|
336
|
+
], 8, ca)
|
|
337
|
+
])) : h("", !0)
|
|
338
|
+
])
|
|
204
339
|
], 512), [
|
|
205
|
-
[
|
|
340
|
+
[Y, !g.value || x.value === "users"]
|
|
206
341
|
]),
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
342
|
+
R(n("div", ra, [
|
|
343
|
+
n("div", ua, [
|
|
344
|
+
n("span", da, [
|
|
345
|
+
E(r(s(l)("userPicker.selected")) + " ", 1),
|
|
346
|
+
n("span", va, r(o.length), 1)
|
|
347
|
+
]),
|
|
348
|
+
c(s(te), {
|
|
349
|
+
text: "",
|
|
213
350
|
type: "error",
|
|
214
|
-
|
|
215
|
-
|
|
351
|
+
class: "selected-clear",
|
|
352
|
+
disabled: o.length === 0,
|
|
353
|
+
onClick: xe
|
|
216
354
|
}, {
|
|
217
|
-
default:
|
|
218
|
-
|
|
355
|
+
default: f(() => [
|
|
356
|
+
E(r(s(l)("userPicker.clear")), 1)
|
|
219
357
|
]),
|
|
220
358
|
_: 1
|
|
221
|
-
}, 8, ["
|
|
359
|
+
}, 8, ["disabled"])
|
|
222
360
|
]),
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
361
|
+
o.length > ka ? (i(), w(s(ae), {
|
|
362
|
+
key: 0,
|
|
363
|
+
value: D.value,
|
|
364
|
+
"onUpdate:value": t[3] || (t[3] = (a) => D.value = a),
|
|
365
|
+
round: "",
|
|
227
366
|
clearable: "",
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
367
|
+
size: g.value ? "large" : "small",
|
|
368
|
+
placeholder: s(l)("common.search"),
|
|
369
|
+
class: "selected-search"
|
|
370
|
+
}, null, 8, ["value", "size", "placeholder"])) : h("", !0),
|
|
371
|
+
n("div", pa, [
|
|
372
|
+
(i(!0), m(Z, null, J(Se.value, (a) => (i(), m("div", {
|
|
233
373
|
key: a.id,
|
|
234
374
|
class: "selected-item"
|
|
235
375
|
}, [
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
376
|
+
c(le, {
|
|
377
|
+
name: a.name,
|
|
378
|
+
src: a.avatar,
|
|
379
|
+
size: 28
|
|
380
|
+
}, null, 8, ["name", "src"]),
|
|
381
|
+
n("span", ma, [
|
|
382
|
+
n("span", fa, r(a.name), 1),
|
|
383
|
+
B(a) ? (i(), m("span", ha, r(B(a)), 1)) : h("", !0)
|
|
239
384
|
]),
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
onClick: (
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
]),
|
|
252
|
-
_: 1
|
|
253
|
-
}, 8, ["size", "onClick"])
|
|
385
|
+
n("button", {
|
|
386
|
+
type: "button",
|
|
387
|
+
class: "item-remove",
|
|
388
|
+
"aria-label": s(l)("userPicker.remove"),
|
|
389
|
+
onClick: (I) => L(a.id)
|
|
390
|
+
}, [
|
|
391
|
+
c(S, {
|
|
392
|
+
icon: "ph:x",
|
|
393
|
+
size: 12
|
|
394
|
+
})
|
|
395
|
+
], 8, ga)
|
|
254
396
|
]))), 128)),
|
|
255
|
-
|
|
397
|
+
o.length === 0 ? (i(), w(s(se), {
|
|
256
398
|
key: 0,
|
|
257
|
-
description: l
|
|
258
|
-
|
|
259
|
-
}, null, 8, ["description"])) :
|
|
399
|
+
description: s(l)("userPicker.emptySelected"),
|
|
400
|
+
class: "user-empty"
|
|
401
|
+
}, null, 8, ["description"])) : h("", !0)
|
|
260
402
|
])
|
|
261
403
|
], 512), [
|
|
262
|
-
[
|
|
404
|
+
[Y, !g.value || x.value === "selected"]
|
|
263
405
|
])
|
|
264
406
|
], 2)
|
|
265
407
|
]),
|
|
@@ -268,6 +410,6 @@ const Ce = {
|
|
|
268
410
|
}
|
|
269
411
|
});
|
|
270
412
|
export {
|
|
271
|
-
|
|
413
|
+
Ua as default
|
|
272
414
|
};
|
|
273
415
|
//# sourceMappingURL=index2.vue.js.map
|