@baishuyun/ui-business 5.0.3 → 5.0.4
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/BubbleChart/AutoGridEChart-uinZMdOR.js +185 -0
- package/dist/BubbleChart/BubbleChart-CPhXmstL.js +174 -0
- package/dist/BubbleChart/index.js +7 -4
- package/dist/ConfigProvider/ConfigProvider-CISBH3A8.js +22 -0
- package/dist/ConfigProvider/configContext-B0kvcW4s.js +9 -0
- package/dist/ConfigProvider/index.js +6 -4
- package/dist/DeptsMember/Department-BYVAaPYd.js +186 -0
- package/dist/DeptsMember/DeptsMember-D_xv-Zy7.js +801 -0
- package/dist/DeptsMember/DeptsUser-CQrRRJxk.js +277 -0
- package/dist/DeptsMember/ExtraConcactPanel-Cioew3V3.js +736 -0
- package/dist/DeptsMember/Member-BIBX5jKD.js +47 -0
- package/dist/DeptsMember/OrganizationPanel-BLIXOm6z.js +235 -0
- package/dist/DeptsMember/RelationShipDepts-wcYjFbhx.js +78 -0
- package/dist/DeptsMember/RelationShipList-CRdCr4NL.js +73 -0
- package/dist/DeptsMember/TabGroup-B_VIf1lS.js +98 -0
- package/dist/DeptsMember/index.js +18 -8
- package/dist/DeptsMember/subcomponents/Entity/Department/index.js +8 -166
- package/dist/DeptsMember/subcomponents/Entity/DeptsUser/index.js +11 -267
- package/dist/DeptsMember/subcomponents/Entity/Member/index.js +8 -46
- package/dist/DeptsMember/subcomponents/Panels/MemberRelationShipPanel/RelationShipDepts/index.js +4 -13
- package/dist/DeptsMember/subcomponents/Panels/MemberRelationShipPanel/RelationShipList/index.js +4 -67
- package/dist/DeptsMember/useDeptsMemberSelector-DP5L8bhi.js +15 -0
- package/dist/DeptsMember/utils/index.js +65 -77
- package/dist/Scatterplot/Scatterplot-DTKhmdTE.js +150 -0
- package/dist/Scatterplot/index.js +7 -4
- package/dist/index.css +2 -1
- package/dist/index.js +164 -200
- package/dist/vendors/clsx.js +14 -14
- package/dist/vendors/echarts.js +41454 -44148
- package/dist/vendors/lodash-es.js +127 -117
- package/dist/vendors/rolldown-runtime.js +11 -0
- package/dist/vendors/services/apiService.js +15 -19
- package/dist/vendors/services/corp/outsider.service.js +5 -6
- package/dist/vendors/services/data/department.service.js +5 -6
- package/dist/vendors/services/data/member.service.js +5 -9
- package/dist/vendors/services/data/member_limit.service.js +5 -5
- package/dist/vendors/services/data/outsider.service.js +5 -6
- package/dist/vendors/services/ncorp/department.service.js +5 -6
- package/dist/vendors/services/ncorp/relation.service.js +5 -5
- package/dist/vendors/simplebar-react.js +358 -396
- package/dist/vendors/useLocale.js +132 -41
- package/package.json +5 -5
- package/dist/BubbleChart/AutoGridEChart-BlLcIZ_T.js +0 -209
- package/dist/BubbleChart/BubbleChart-BPGhlxCM.js +0 -237
- package/dist/ConfigProvider/ConfigProvider-CAq3dN6-.js +0 -15
- package/dist/ConfigProvider/configContext-_BAslzM-.js +0 -9
- package/dist/DeptsMember/DeptsMember-BNuoQ8y4.js +0 -865
- package/dist/DeptsMember/ExtraConcactPanel-BoSCI3s5.js +0 -738
- package/dist/DeptsMember/OrganizationPanel-ByWU1PWX.js +0 -275
- package/dist/DeptsMember/TabGroup-DZC7i-Yr.js +0 -104
- package/dist/DeptsMember/index-BRIA1uOQ.js +0 -88
- package/dist/DeptsMember/useDeptsMemberSelector-D3rvDuVf.js +0 -13
- package/dist/Scatterplot/Scatterplot-BL66B_Zm.js +0 -202
|
@@ -0,0 +1,801 @@
|
|
|
1
|
+
import { t as e } from "../vendors/simplebar-react.js";
|
|
2
|
+
import { t } from "../vendors/clsx.js";
|
|
3
|
+
import { i as n, r } from "../vendors/lodash-es.js";
|
|
4
|
+
import { n as i, t as a } from "./useDeptsMemberSelector-DP5L8bhi.js";
|
|
5
|
+
import { n as o, r as s } from "./TabGroup-B_VIf1lS.js";
|
|
6
|
+
import { t as c } from "../vendors/useLocale.js";
|
|
7
|
+
import { findNodeInTree as l, getColorByName as u } from "./utils/index.js";
|
|
8
|
+
import { t as d } from "../vendors/services/data/member.service.js";
|
|
9
|
+
import { t as f } from "./DeptsUser-CQrRRJxk.js";
|
|
10
|
+
import { t as p } from "./Member-BIBX5jKD.js";
|
|
11
|
+
import { t as m } from "./Department-BYVAaPYd.js";
|
|
12
|
+
import { n as h, t as g } from "../vendors/services/data/outsider.service.js";
|
|
13
|
+
import { t as _ } from "../vendors/services/data/member_limit.service.js";
|
|
14
|
+
import { forwardRef as v, useCallback as y, useEffect as b, useImperativeHandle as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
15
|
+
import { Avatar as T, Button as E, Spin as D } from "antd";
|
|
16
|
+
import { Icon as O, Tree as k } from "@baishuyun/ui-base";
|
|
17
|
+
import { createPortal as ee } from "react-dom";
|
|
18
|
+
import { AnimatePresence as A, motion as j } from "motion/react";
|
|
19
|
+
import { useControllableValue as M, useRequest as N, useToggle as P } from "ahooks";
|
|
20
|
+
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
21
|
+
import { produce as te } from "immer";
|
|
22
|
+
//#region src/components/DeptsMember/subcomponents/SelectionArea/SelectionArea.module.scss
|
|
23
|
+
var L = {
|
|
24
|
+
"selection-area": "_selection-area_7ti3u_1",
|
|
25
|
+
"selection-area__container": "_selection-area__container_7ti3u_4",
|
|
26
|
+
"selection-area__container--expanded": "_selection-area__container--expanded_7ti3u_11",
|
|
27
|
+
"selection-area__container--animating": "_selection-area__container--animating_7ti3u_14",
|
|
28
|
+
"selection-area__body": "_selection-area__body_7ti3u_19",
|
|
29
|
+
"selection-area__body--expanded": "_selection-area__body--expanded_7ti3u_26",
|
|
30
|
+
"selection-area__scroll-gutter": "_selection-area__scroll-gutter_7ti3u_34",
|
|
31
|
+
"selection-area__scroll": "_selection-area__scroll_7ti3u_34",
|
|
32
|
+
"selection-area__button": "_selection-area__button_7ti3u_41",
|
|
33
|
+
"selection-area__measure-group": "_selection-area__measure-group_7ti3u_53",
|
|
34
|
+
"selection-area__mask": "_selection-area__mask_7ti3u_61",
|
|
35
|
+
"selection-area__measure-wrapper": "_selection-area__measure-wrapper_7ti3u_67"
|
|
36
|
+
}, ne = "bsy_dept_member", R = "preset_bsy_dept_member";
|
|
37
|
+
function z(e, t) {
|
|
38
|
+
try {
|
|
39
|
+
let n = e.includes("-relationSub-") ? "relationSub" : e.includes("-relationUser-") ? "relationUser" : e.includes("-relation-") ? "relation" : null;
|
|
40
|
+
if (!n) return t;
|
|
41
|
+
let r = e.split("-")[0], i, a = sessionStorage.getItem(R);
|
|
42
|
+
if (a && (i = JSON.parse(a).find((e) => String(e._id) === r)), !i) {
|
|
43
|
+
let e = sessionStorage.getItem(ne);
|
|
44
|
+
e && (i = JSON.parse(e).find((e) => String(e._id) === r));
|
|
45
|
+
}
|
|
46
|
+
if (!i) return t;
|
|
47
|
+
switch (n) {
|
|
48
|
+
case "relationSub": return `${i.name}及子部门 - ${t}`;
|
|
49
|
+
case "relation": return `${i.name} - ${t}`;
|
|
50
|
+
case "relationUser": return `${i.nickname} - ${t}`;
|
|
51
|
+
default: return t;
|
|
52
|
+
}
|
|
53
|
+
} catch (e) {
|
|
54
|
+
return console.error("获取关联节点名称时发生错误:", e), t;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/components/DeptsMember/subcomponents/SelectionArea/PreviewSelectedItems/PreviewSelectedItems.module.scss
|
|
59
|
+
var B = "_anticon_184kl_76", V = {
|
|
60
|
+
"preview-selected-items": "_preview-selected-items_184kl_1",
|
|
61
|
+
"preview-selected-items--measure": "_preview-selected-items--measure_184kl_4",
|
|
62
|
+
"preview-selected-items__wrapper": "_preview-selected-items__wrapper_184kl_13",
|
|
63
|
+
"preview-selected-items__list": "_preview-selected-items__list_184kl_16",
|
|
64
|
+
"preview-selected-items__item": "_preview-selected-items__item_184kl_23",
|
|
65
|
+
"preview-selected-items__item--user": "_preview-selected-items__item--user_184kl_34",
|
|
66
|
+
"preview-selected-items__item--department": "_preview-selected-items__item--department_184kl_37",
|
|
67
|
+
"preview-selected-items__item--relation": "_preview-selected-items__item--relation_184kl_40",
|
|
68
|
+
"preview-selected-items__item--public": "_preview-selected-items__item--public_184kl_43",
|
|
69
|
+
"preview-selected-items__content": "_preview-selected-items__content_184kl_46",
|
|
70
|
+
"preview-selected-items__text": "_preview-selected-items__text_184kl_52",
|
|
71
|
+
"preview-selected-items__name": "_preview-selected-items__name_184kl_57",
|
|
72
|
+
"preview-selected-items__badge": "_preview-selected-items__badge_184kl_64",
|
|
73
|
+
"preview-selected-items__close": "_preview-selected-items__close_184kl_69",
|
|
74
|
+
anticon: B,
|
|
75
|
+
"preview-selected-items__more": "_preview-selected-items__more_184kl_83",
|
|
76
|
+
"preview-selected-items__more-button": "_preview-selected-items__more-button_184kl_89"
|
|
77
|
+
}, H = v((e, r) => {
|
|
78
|
+
let { isMeasure: i = !1, showEllipsisButton: l = !1, onToggle: d, hiddenCount: f = 0, previewCount: p = 0 } = e, { t: m } = c(), { value: h = [], setValue: g, type: _ } = a(), v = C(null), y = C(null), b = {
|
|
79
|
+
dockcorp: m("department.externalContactGroup"),
|
|
80
|
+
dockcorpdept: m("department.contact")
|
|
81
|
+
}, S = (e) => g?.(h.filter((t) => t._id !== e));
|
|
82
|
+
return x(r, () => ({
|
|
83
|
+
measureRef: v.current,
|
|
84
|
+
ellipsisButtonRef: y.current
|
|
85
|
+
})), /* @__PURE__ */ F("div", {
|
|
86
|
+
className: t(V["preview-selected-items"], { [V["preview-selected-items--measure"]]: i }),
|
|
87
|
+
children: /* @__PURE__ */ I("ul", {
|
|
88
|
+
className: V["preview-selected-items__list"],
|
|
89
|
+
ref: i ? v : void 0,
|
|
90
|
+
"data-role": i ? "measure-list" : "preview-list",
|
|
91
|
+
children: [h.slice(0, p)?.map((e, r) => {
|
|
92
|
+
let a = e.name || e.nickname, c = e.type ? e.type : Object.prototype.hasOwnProperty.call(e, "departmentId") ? null : "group", l = [
|
|
93
|
+
"relation",
|
|
94
|
+
"relationSub",
|
|
95
|
+
"relationUser"
|
|
96
|
+
].some((t) => e._id.includes(t)), d = l ? z(e._id, a) : a, f = l ? "relation" : c, p = !!e.nickname;
|
|
97
|
+
return /* @__PURE__ */ I("li", {
|
|
98
|
+
className: t(V["preview-selected-items__item"], {
|
|
99
|
+
[V["preview-selected-items__item--user"]]: [s.USER, s.USER_GROUP].includes(_),
|
|
100
|
+
[V["preview-selected-items__item--department"]]: [s.DEPARMENT, s.DEPARMENT_GROUP].includes(_),
|
|
101
|
+
[V["preview-selected-items__item--relation"]]: l,
|
|
102
|
+
[V["preview-selected-items__item--public"]]: e.type === "public"
|
|
103
|
+
}),
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ F("div", {
|
|
106
|
+
className: V["preview-selected-items__content"],
|
|
107
|
+
children: p ? e.avatarurl ? /* @__PURE__ */ F(T, {
|
|
108
|
+
src: e.avatarurl,
|
|
109
|
+
size: 20
|
|
110
|
+
}) : /* @__PURE__ */ F(T, {
|
|
111
|
+
style: {
|
|
112
|
+
backgroundColor: u(d),
|
|
113
|
+
fontSize: "12px",
|
|
114
|
+
lineHeight: "13px",
|
|
115
|
+
width: "20px",
|
|
116
|
+
height: "20px"
|
|
117
|
+
},
|
|
118
|
+
children: d?.charAt(0) || "?"
|
|
119
|
+
}) : /* @__PURE__ */ F(o, { type: f })
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ I("div", {
|
|
122
|
+
className: V["preview-selected-items__text"],
|
|
123
|
+
"data-type": e.type,
|
|
124
|
+
children: [/* @__PURE__ */ F("span", {
|
|
125
|
+
className: V["preview-selected-items__name"],
|
|
126
|
+
title: d,
|
|
127
|
+
children: d
|
|
128
|
+
}), e.type === "dockcorpdept" || e.type === "dockcorp" ? /* @__PURE__ */ I("span", {
|
|
129
|
+
className: V["preview-selected-items__badge"],
|
|
130
|
+
children: [
|
|
131
|
+
"(",
|
|
132
|
+
b[e.type],
|
|
133
|
+
")"
|
|
134
|
+
]
|
|
135
|
+
}) : null]
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ F("div", {
|
|
138
|
+
role: "button",
|
|
139
|
+
className: V["preview-selected-items__close"],
|
|
140
|
+
onClick: i ? n : () => S(e._id),
|
|
141
|
+
children: /* @__PURE__ */ F(O, {
|
|
142
|
+
name: "close",
|
|
143
|
+
color: "#666"
|
|
144
|
+
})
|
|
145
|
+
})
|
|
146
|
+
]
|
|
147
|
+
}, r);
|
|
148
|
+
}), l && !i && /* @__PURE__ */ F("li", {
|
|
149
|
+
ref: y,
|
|
150
|
+
className: V["preview-selected-items__more"],
|
|
151
|
+
"data-button": "ellipsis-button",
|
|
152
|
+
children: /* @__PURE__ */ I("div", {
|
|
153
|
+
role: "button",
|
|
154
|
+
className: V["preview-selected-items__more-button"],
|
|
155
|
+
onClick: () => {
|
|
156
|
+
d?.();
|
|
157
|
+
},
|
|
158
|
+
children: [/* @__PURE__ */ F("span", { children: m("common.viewAll", { count: f }) }), /* @__PURE__ */ F(O, { name: "arrow-down" })]
|
|
159
|
+
})
|
|
160
|
+
})]
|
|
161
|
+
})
|
|
162
|
+
});
|
|
163
|
+
}), U = () => {
|
|
164
|
+
let { value: n = [], type: r } = a(), { t: i } = c(), [o, l] = w(0), [u, { toggle: d }] = P(!1), [f, p] = w(!1), [m, h] = w(null), g = C(null), _ = C(null), v = [s.DEPARMENT, s.USER].includes(r) ? 30 : 68;
|
|
165
|
+
b(() => {
|
|
166
|
+
u && p(!0);
|
|
167
|
+
}, [u]);
|
|
168
|
+
let y = () => {
|
|
169
|
+
u || p(!1);
|
|
170
|
+
}, [x, T] = w(!1);
|
|
171
|
+
b(() => {
|
|
172
|
+
if (!g.current || !_.current) return;
|
|
173
|
+
let e = () => {
|
|
174
|
+
requestAnimationFrame(() => {
|
|
175
|
+
if (T(!1), !g.current || !_.current) return;
|
|
176
|
+
let t = g.current.clientWidth, r = _.current.querySelector("[data-role=\"measure-list\"]"), i = r ? r.querySelectorAll("li") : [], a = _.current.querySelector("[data-button=\"ellipsis-button\"]");
|
|
177
|
+
if (i.length === 0) {
|
|
178
|
+
l(n.length);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if (i.length !== n.length) {
|
|
182
|
+
console.warn("DOM not fully updated, retrying..."), requestAnimationFrame(() => e());
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
let s = 0, c = 0, u = 0, d = 0;
|
|
186
|
+
for (; d < i.length;) {
|
|
187
|
+
let e = i[d].clientWidth + 8;
|
|
188
|
+
if (u + e <= t) u += e, s = d + 1, d++;
|
|
189
|
+
else break;
|
|
190
|
+
}
|
|
191
|
+
c = d, u = 0;
|
|
192
|
+
let f = a?.offsetWidth || 110;
|
|
193
|
+
for (let e = c; e < i.length; e++) {
|
|
194
|
+
let n = i[e].clientWidth + 8, r = f;
|
|
195
|
+
if (u + n + r < t) u += n, s = e + 1;
|
|
196
|
+
else {
|
|
197
|
+
T(!0);
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
o !== s && l(s);
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
e();
|
|
205
|
+
}, [n]);
|
|
206
|
+
let D = n.length - o, k = x && !u, M = S(() => u && _?.current?.querySelector("[data-role=\"measure-list\"]")?.clientHeight || v, [v, u]);
|
|
207
|
+
return /* @__PURE__ */ F("div", {
|
|
208
|
+
className: L["selection-area"],
|
|
209
|
+
style: { height: f ? "90px" : "auto" },
|
|
210
|
+
children: /* @__PURE__ */ I("div", {
|
|
211
|
+
className: t(L["selection-area__container"], {
|
|
212
|
+
[L["selection-area__container--expanded"]]: u,
|
|
213
|
+
[L["selection-area__container--animating"]]: f
|
|
214
|
+
}),
|
|
215
|
+
children: [
|
|
216
|
+
/* @__PURE__ */ I("div", {
|
|
217
|
+
className: t(L["selection-area__body"], { [L["selection-area__body--expanded"]]: u }),
|
|
218
|
+
ref: _,
|
|
219
|
+
children: [/* @__PURE__ */ F(H, {
|
|
220
|
+
isMeasure: !0,
|
|
221
|
+
previewCount: n.length
|
|
222
|
+
}), /* @__PURE__ */ F(e, {
|
|
223
|
+
style: { maxHeight: "400px" },
|
|
224
|
+
children: /* @__PURE__ */ F("div", {
|
|
225
|
+
className: L["selection-area__scroll-gutter"],
|
|
226
|
+
children: /* @__PURE__ */ F("div", {
|
|
227
|
+
className: L["selection-area__scroll"],
|
|
228
|
+
ref: g,
|
|
229
|
+
style: { height: M + "px" },
|
|
230
|
+
children: /* @__PURE__ */ F(H, {
|
|
231
|
+
previewCount: u ? n.length : o,
|
|
232
|
+
showEllipsisButton: k,
|
|
233
|
+
hiddenCount: D,
|
|
234
|
+
onToggle: () => {
|
|
235
|
+
h(document.querySelector("[data-teleport=\"DeptsMember\"]")), d();
|
|
236
|
+
}
|
|
237
|
+
})
|
|
238
|
+
})
|
|
239
|
+
})
|
|
240
|
+
})]
|
|
241
|
+
}),
|
|
242
|
+
m && ee(/* @__PURE__ */ F(A, { children: u && /* @__PURE__ */ F(j.div, {
|
|
243
|
+
className: L["selection-area__mask"],
|
|
244
|
+
initial: {
|
|
245
|
+
opacity: 0,
|
|
246
|
+
backdropFilter: "blur(0px)"
|
|
247
|
+
},
|
|
248
|
+
animate: {
|
|
249
|
+
opacity: 1,
|
|
250
|
+
backdropFilter: "blur(.5px)"
|
|
251
|
+
},
|
|
252
|
+
exit: {
|
|
253
|
+
opacity: 0,
|
|
254
|
+
backdropFilter: "blur(0px)"
|
|
255
|
+
},
|
|
256
|
+
transition: {
|
|
257
|
+
duration: .3,
|
|
258
|
+
ease: "easeIn"
|
|
259
|
+
},
|
|
260
|
+
onAnimationComplete: y
|
|
261
|
+
}) }), m),
|
|
262
|
+
/* @__PURE__ */ F(A, {
|
|
263
|
+
mode: "wait",
|
|
264
|
+
children: u && /* @__PURE__ */ F(j.div, {
|
|
265
|
+
className: L["selection-area__button"],
|
|
266
|
+
initial: { opacity: 1 },
|
|
267
|
+
exit: { opacity: 0 },
|
|
268
|
+
transition: { duration: .3 },
|
|
269
|
+
onAnimationComplete: y,
|
|
270
|
+
children: /* @__PURE__ */ I(E, {
|
|
271
|
+
type: "link",
|
|
272
|
+
onClick: () => d(),
|
|
273
|
+
children: [i("common.collapseAll"), /* @__PURE__ */ F(O, { name: "arrow-up" })]
|
|
274
|
+
})
|
|
275
|
+
})
|
|
276
|
+
})
|
|
277
|
+
]
|
|
278
|
+
})
|
|
279
|
+
});
|
|
280
|
+
}, W = {
|
|
281
|
+
"selection-tab-list": "_selection-tab-list_ujxba_1",
|
|
282
|
+
"selection-tab-list__tabs-wrapper": "_selection-tab-list__tabs-wrapper_ujxba_8",
|
|
283
|
+
"selection-tab-list__tabs": "_selection-tab-list__tabs_ujxba_8",
|
|
284
|
+
"selection-tab-list__indicator": "_selection-tab-list__indicator_ujxba_18",
|
|
285
|
+
"selection-tab-list__item": "_selection-tab-list__item_ujxba_25",
|
|
286
|
+
"selection-tab-list__item--active": "_selection-tab-list__item--active_ujxba_35",
|
|
287
|
+
"selection-tab-list__search": "_selection-tab-list__search_ujxba_38",
|
|
288
|
+
"selection-tab-list__search-field": "_selection-tab-list__search-field_ujxba_43",
|
|
289
|
+
"selection-tab-list__input": "_selection-tab-list__input_ujxba_47",
|
|
290
|
+
"selection-tab-list__search-icon": "_selection-tab-list__search-icon_ujxba_64"
|
|
291
|
+
}, G = (e) => {
|
|
292
|
+
let [n, i] = M(e, { defaultValue: e.tabs.length ? e.tabs[0].key : void 0 }), [a, o] = w(""), s = C(/* @__PURE__ */ new Map()), [c, l] = w({
|
|
293
|
+
width: 0,
|
|
294
|
+
transform: "translateX(0)"
|
|
295
|
+
}), u = C(r((t) => e.onSearch?.(t), 250)).current;
|
|
296
|
+
b(() => () => {
|
|
297
|
+
u.cancel();
|
|
298
|
+
}, [u]);
|
|
299
|
+
let d = (e) => {
|
|
300
|
+
let t = s.current.get(e);
|
|
301
|
+
if (t) {
|
|
302
|
+
let { width: e, left: n } = t.getBoundingClientRect();
|
|
303
|
+
l({
|
|
304
|
+
width: e,
|
|
305
|
+
transform: `translateX(${n - (t.parentElement?.getBoundingClientRect().left || 0)}px)`
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
return b(() => {
|
|
310
|
+
n && d(n);
|
|
311
|
+
}, [n]), b(() => {
|
|
312
|
+
let t = e.tabs.length ? e.tabs[0].key : void 0;
|
|
313
|
+
t && d(t);
|
|
314
|
+
}, [e.tabs]), /* @__PURE__ */ I("div", {
|
|
315
|
+
className: W["selection-tab-list"],
|
|
316
|
+
children: [/* @__PURE__ */ I("div", {
|
|
317
|
+
className: W["selection-tab-list__tabs-wrapper"],
|
|
318
|
+
children: [/* @__PURE__ */ F("div", {
|
|
319
|
+
className: W["selection-tab-list__indicator"],
|
|
320
|
+
style: {
|
|
321
|
+
width: `${c.width}px`,
|
|
322
|
+
transform: c.transform
|
|
323
|
+
}
|
|
324
|
+
}), /* @__PURE__ */ F("ul", {
|
|
325
|
+
className: W["selection-tab-list__tabs"],
|
|
326
|
+
children: e.tabs.map((e) => /* @__PURE__ */ F("li", {
|
|
327
|
+
ref: (t) => {
|
|
328
|
+
t && s.current.set(e.key, t);
|
|
329
|
+
},
|
|
330
|
+
onClick: () => i(e.key),
|
|
331
|
+
className: t(W["selection-tab-list__item"], { [W["selection-tab-list__item--active"]]: n === e.key }),
|
|
332
|
+
children: e.label
|
|
333
|
+
}, e.key))
|
|
334
|
+
})]
|
|
335
|
+
}), /* @__PURE__ */ F("div", {
|
|
336
|
+
className: W["selection-tab-list__search"],
|
|
337
|
+
children: /* @__PURE__ */ I("div", {
|
|
338
|
+
className: W["selection-tab-list__search-field"],
|
|
339
|
+
children: [/* @__PURE__ */ F("input", {
|
|
340
|
+
type: "text",
|
|
341
|
+
value: a,
|
|
342
|
+
onChange: (e) => {
|
|
343
|
+
o(e.target.value), u(e.target.value);
|
|
344
|
+
},
|
|
345
|
+
placeholder: e.searchPlaceholder,
|
|
346
|
+
className: W["selection-tab-list__input"]
|
|
347
|
+
}), /* @__PURE__ */ F(O, {
|
|
348
|
+
name: "search",
|
|
349
|
+
className: W["selection-tab-list__search-icon"]
|
|
350
|
+
})]
|
|
351
|
+
})
|
|
352
|
+
})]
|
|
353
|
+
});
|
|
354
|
+
}, K = { "selection-tab-panel": "_selection-tab-panel_f6iav_1" }, re = (e) => {
|
|
355
|
+
let { containerHeight: n } = a();
|
|
356
|
+
return /* @__PURE__ */ F("div", {
|
|
357
|
+
className: t(K["selection-tab-panel"]),
|
|
358
|
+
style: { height: n + "px" },
|
|
359
|
+
children: e.children
|
|
360
|
+
});
|
|
361
|
+
}, ie = { "selection-tabs": "_selection-tabs_88491_1" }, q = {
|
|
362
|
+
"member-search": "_member-search_162pf_1",
|
|
363
|
+
"member-search__tree-wrapper": "_member-search__tree-wrapper_162pf_6",
|
|
364
|
+
"member-search__tree-content": "_member-search__tree-content_162pf_9",
|
|
365
|
+
"member-search__tree-title": "_member-search__tree-title_162pf_12",
|
|
366
|
+
"member-search__tree-name": "_member-search__tree-name_162pf_20",
|
|
367
|
+
"member-search__tree-extra": "_member-search__tree-extra_162pf_27",
|
|
368
|
+
"member-search__switch-icon": "_member-search__switch-icon_162pf_36",
|
|
369
|
+
"member-search__switch-icon--expanded": "_member-search__switch-icon--expanded_162pf_41",
|
|
370
|
+
"member-search__empty": "_member-search__empty_162pf_44",
|
|
371
|
+
"member-search__empty-text": "_member-search__empty-text_162pf_51"
|
|
372
|
+
}, J = ({ avatarurl: e, randomColor: t, name: n, extra: r }) => /* @__PURE__ */ I("div", {
|
|
373
|
+
className: q["member-search__tree-title"],
|
|
374
|
+
children: [
|
|
375
|
+
e ? /* @__PURE__ */ F(T, {
|
|
376
|
+
src: e,
|
|
377
|
+
size: 20,
|
|
378
|
+
style: { flexShrink: 0 }
|
|
379
|
+
}) : /* @__PURE__ */ F(T, {
|
|
380
|
+
style: {
|
|
381
|
+
backgroundColor: t,
|
|
382
|
+
fontSize: "12px",
|
|
383
|
+
lineHeight: "13px",
|
|
384
|
+
width: "20px",
|
|
385
|
+
height: "20px",
|
|
386
|
+
flexShrink: 0
|
|
387
|
+
},
|
|
388
|
+
children: n.charAt(0)
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ F("span", {
|
|
391
|
+
className: q["member-search__tree-name"],
|
|
392
|
+
children: n
|
|
393
|
+
}),
|
|
394
|
+
r
|
|
395
|
+
]
|
|
396
|
+
}), ae = (n) => {
|
|
397
|
+
let { type: r, dispatch: i, value: o, containerHeight: d } = a(), { t: f } = c(), { data: p, loading: m } = N(() => g({
|
|
398
|
+
groupLimit: [],
|
|
399
|
+
memberLimit: [],
|
|
400
|
+
limit: 100,
|
|
401
|
+
skip: 0,
|
|
402
|
+
key: n.wd
|
|
403
|
+
}), { refreshDeps: [n.wd] }), { data: h, loading: v } = N(() => _({
|
|
404
|
+
key: n.wd,
|
|
405
|
+
limit: 100,
|
|
406
|
+
skip: 0,
|
|
407
|
+
hasLimit: !1
|
|
408
|
+
}), { refreshDeps: [n.wd] }), y = p?.list || [], b = h?.dock_user_list || [], x = h?.users || [], S = [{
|
|
409
|
+
title: f("externalContact.title"),
|
|
410
|
+
value: "waibulianxiren",
|
|
411
|
+
children: y.map((e) => {
|
|
412
|
+
let t = e.nickname || e.name, n = u(t);
|
|
413
|
+
return {
|
|
414
|
+
...e,
|
|
415
|
+
title: /* @__PURE__ */ F(J, {
|
|
416
|
+
avatarurl: e.avatarurl,
|
|
417
|
+
randomColor: n,
|
|
418
|
+
name: t,
|
|
419
|
+
extra: /* @__PURE__ */ I("span", {
|
|
420
|
+
className: q["member-search__tree-extra"],
|
|
421
|
+
children: [
|
|
422
|
+
"(",
|
|
423
|
+
f("externalContact.title"),
|
|
424
|
+
":",
|
|
425
|
+
e.groupname,
|
|
426
|
+
")"
|
|
427
|
+
]
|
|
428
|
+
})
|
|
429
|
+
}),
|
|
430
|
+
value: e._id
|
|
431
|
+
};
|
|
432
|
+
})
|
|
433
|
+
}, {
|
|
434
|
+
title: f("member.title"),
|
|
435
|
+
value: "chengyuan",
|
|
436
|
+
children: [...x, ...b].map((e) => {
|
|
437
|
+
let t = e.nickname || e.name, n = u(t);
|
|
438
|
+
return {
|
|
439
|
+
...e,
|
|
440
|
+
title: /* @__PURE__ */ F(J, {
|
|
441
|
+
avatarurl: e.avatarurl,
|
|
442
|
+
randomColor: n,
|
|
443
|
+
name: t,
|
|
444
|
+
extra: /* @__PURE__ */ F("span", {
|
|
445
|
+
className: q["member-search__tree-extra"],
|
|
446
|
+
children: e.user_type === "dock_user" ? `(${f("department.external")}:${e.dock_corpname})` : e.deptnames
|
|
447
|
+
})
|
|
448
|
+
}),
|
|
449
|
+
value: e._id
|
|
450
|
+
};
|
|
451
|
+
})
|
|
452
|
+
}].filter((e) => e.children.length), C = S.map((e) => e.value), w = v || m;
|
|
453
|
+
return /* @__PURE__ */ I("div", {
|
|
454
|
+
className: q["member-search"],
|
|
455
|
+
children: [/* @__PURE__ */ F(D, {
|
|
456
|
+
spinning: w,
|
|
457
|
+
children: /* @__PURE__ */ F(e, {
|
|
458
|
+
style: { height: d - 8 },
|
|
459
|
+
className: q["member-search__tree-wrapper"],
|
|
460
|
+
children: S.length && !w ? /* @__PURE__ */ F("div", {
|
|
461
|
+
className: q["member-search__tree-content"],
|
|
462
|
+
children: /* @__PURE__ */ F(k, {
|
|
463
|
+
data: S,
|
|
464
|
+
checkType: r === s.USER ? "radio" : "checkbox",
|
|
465
|
+
defaultSelectedKeys: o?.map((e) => e._id),
|
|
466
|
+
defaultExpandedKeys: C,
|
|
467
|
+
switcherIcon: (e) => /* @__PURE__ */ F(O, {
|
|
468
|
+
name: "xiangxiazhankai-11",
|
|
469
|
+
className: t(q["member-search__switch-icon"], { [q["member-search__switch-icon--expanded"]]: e })
|
|
470
|
+
}),
|
|
471
|
+
onSelect: (e) => {
|
|
472
|
+
if (s.USER === r) {
|
|
473
|
+
let t = l(e, S);
|
|
474
|
+
t && i({
|
|
475
|
+
type: "insertOnly",
|
|
476
|
+
payload: { ...t }
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
s.USER_GROUP === r && i({
|
|
480
|
+
type: "addOne",
|
|
481
|
+
payload: { ...l(e, S) }
|
|
482
|
+
});
|
|
483
|
+
},
|
|
484
|
+
onDeSelect: (e) => {
|
|
485
|
+
s.USER !== r && i({
|
|
486
|
+
type: "deleteOne",
|
|
487
|
+
payload: e
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
})
|
|
491
|
+
}) : null
|
|
492
|
+
})
|
|
493
|
+
}), !S.length && !w && /* @__PURE__ */ F("div", {
|
|
494
|
+
className: q["member-search__empty"],
|
|
495
|
+
children: /* @__PURE__ */ F("span", {
|
|
496
|
+
className: q["member-search__empty-text"],
|
|
497
|
+
children: f("member.noAvailable")
|
|
498
|
+
})
|
|
499
|
+
})]
|
|
500
|
+
});
|
|
501
|
+
}, Y = {
|
|
502
|
+
"department-search": "_department-search_i1rya_1",
|
|
503
|
+
"department-search__scroll": "_department-search__scroll_i1rya_5",
|
|
504
|
+
"department-search__tree-content": "_department-search__tree-content_i1rya_8",
|
|
505
|
+
"department-search__title": "_department-search__title_i1rya_11",
|
|
506
|
+
"department-search__name": "_department-search__name_i1rya_16",
|
|
507
|
+
"department-search__extra": "_department-search__extra_i1rya_23",
|
|
508
|
+
"department-search__icon": "_department-search__icon_i1rya_31",
|
|
509
|
+
"department-search__switch-icon": "_department-search__switch-icon_i1rya_34",
|
|
510
|
+
"department-search__switch-icon--expanded": "_department-search__switch-icon--expanded_i1rya_39",
|
|
511
|
+
"department-search__empty": "_department-search__empty_i1rya_42",
|
|
512
|
+
"department-search__empty-text": "_department-search__empty-text_i1rya_49"
|
|
513
|
+
}, X = (n) => {
|
|
514
|
+
let { type: r, value: i, dispatch: l, containerHeight: u } = a(), { t: f } = c(), { data: p, loading: m } = N(() => d({
|
|
515
|
+
departmentLimit: [],
|
|
516
|
+
key: n.wd
|
|
517
|
+
}), { refreshDeps: [n.wd] }), { data: g, loading: _ } = N(() => h()), v = g?.list || [], y = p?.departments || [], b = (p?.label_corp_list || []).filter((e) => e.type !== "dockcorpdept"), x = [...y, ...b].filter((e) => e.type !== "label"), S = [{
|
|
518
|
+
title: f("externalContact.group"),
|
|
519
|
+
_id: "waibulianxiren",
|
|
520
|
+
children: v.filter((e) => e.status === 1 && e.name?.includes(n.wd)).map((e) => ({
|
|
521
|
+
...e,
|
|
522
|
+
title: /* @__PURE__ */ I("span", {
|
|
523
|
+
className: Y["department-search__title"],
|
|
524
|
+
children: [/* @__PURE__ */ F(o, {
|
|
525
|
+
type: "group",
|
|
526
|
+
size: 16
|
|
527
|
+
}), /* @__PURE__ */ F("span", {
|
|
528
|
+
className: Y["department-search__name"],
|
|
529
|
+
children: e.name
|
|
530
|
+
})]
|
|
531
|
+
})
|
|
532
|
+
}))
|
|
533
|
+
}, {
|
|
534
|
+
title: f("department.title"),
|
|
535
|
+
_id: "bumen",
|
|
536
|
+
children: x.map((e) => ({
|
|
537
|
+
...e,
|
|
538
|
+
title: /* @__PURE__ */ I("span", {
|
|
539
|
+
className: Y["department-search__title"],
|
|
540
|
+
children: [
|
|
541
|
+
/* @__PURE__ */ F(O, {
|
|
542
|
+
name: "dept-one",
|
|
543
|
+
className: Y["department-search__icon"],
|
|
544
|
+
size: 16
|
|
545
|
+
}),
|
|
546
|
+
/* @__PURE__ */ F("span", {
|
|
547
|
+
className: Y["department-search__name"],
|
|
548
|
+
children: e.name
|
|
549
|
+
}),
|
|
550
|
+
[
|
|
551
|
+
"dockdept",
|
|
552
|
+
"dockcorp",
|
|
553
|
+
"dockcorpdept"
|
|
554
|
+
].includes(e.type) && /* @__PURE__ */ I("span", {
|
|
555
|
+
className: Y["department-search__extra"],
|
|
556
|
+
children: [
|
|
557
|
+
"(",
|
|
558
|
+
f("department.external"),
|
|
559
|
+
")"
|
|
560
|
+
]
|
|
561
|
+
})
|
|
562
|
+
]
|
|
563
|
+
})
|
|
564
|
+
}))
|
|
565
|
+
}].filter((e) => e.children.length), C = S.map((e) => e._id), w = (e, t) => {
|
|
566
|
+
if (!t) return;
|
|
567
|
+
if (r === s.DEPARMENT) {
|
|
568
|
+
l({
|
|
569
|
+
type: "insertOnly",
|
|
570
|
+
payload: {
|
|
571
|
+
...t,
|
|
572
|
+
type: t.departmentId ? "dockdept" : "group"
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
let n = v.some((e) => e._id === t._id);
|
|
578
|
+
l({
|
|
579
|
+
type: "addOne",
|
|
580
|
+
payload: {
|
|
581
|
+
...t,
|
|
582
|
+
_id: t._id,
|
|
583
|
+
type: n ? "group" : "dockdept"
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
}, T = (e) => {
|
|
587
|
+
l({
|
|
588
|
+
type: "deleteOne",
|
|
589
|
+
payload: e
|
|
590
|
+
});
|
|
591
|
+
}, E = m || _;
|
|
592
|
+
return /* @__PURE__ */ I("div", {
|
|
593
|
+
className: Y["department-search"],
|
|
594
|
+
children: [/* @__PURE__ */ F(D, {
|
|
595
|
+
spinning: E,
|
|
596
|
+
children: /* @__PURE__ */ F(e, {
|
|
597
|
+
style: { height: u - 8 },
|
|
598
|
+
className: Y["department-search__scroll"],
|
|
599
|
+
children: S.length && !E ? /* @__PURE__ */ F("div", {
|
|
600
|
+
className: Y["department-search__tree-content"],
|
|
601
|
+
children: /* @__PURE__ */ F(k, {
|
|
602
|
+
data: S,
|
|
603
|
+
checkType: r === s.DEPARMENT ? "radio" : "checkbox",
|
|
604
|
+
selectedKeys: i?.map((e) => e._id),
|
|
605
|
+
fieldNames: {
|
|
606
|
+
title: "title",
|
|
607
|
+
children: "children",
|
|
608
|
+
value: "_id"
|
|
609
|
+
},
|
|
610
|
+
defaultExpandedKeys: C,
|
|
611
|
+
switcherIcon: (e) => /* @__PURE__ */ F(O, {
|
|
612
|
+
name: "xiangxiazhankai-11",
|
|
613
|
+
className: t(Y["department-search__switch-icon"], { [Y["department-search__switch-icon--expanded"]]: e })
|
|
614
|
+
}),
|
|
615
|
+
onSelect: w,
|
|
616
|
+
onDeSelect: T
|
|
617
|
+
})
|
|
618
|
+
}) : null
|
|
619
|
+
})
|
|
620
|
+
}), !S.length && !E && /* @__PURE__ */ F("div", {
|
|
621
|
+
className: Y["department-search__empty"],
|
|
622
|
+
children: /* @__PURE__ */ F("span", {
|
|
623
|
+
className: Y["department-search__empty-text"],
|
|
624
|
+
children: f("department.noAvailable")
|
|
625
|
+
})
|
|
626
|
+
})]
|
|
627
|
+
});
|
|
628
|
+
}, Z = ({ wd: e, t, memberTabItems: n }) => ({
|
|
629
|
+
raw: /* @__PURE__ */ F(ae, { wd: e }),
|
|
630
|
+
placeholder: t("tabs.searchMember"),
|
|
631
|
+
tabItems: n
|
|
632
|
+
}), Q = ({ wd: e, t, departmentTabItems: n }) => ({
|
|
633
|
+
raw: /* @__PURE__ */ F(X, { wd: e }),
|
|
634
|
+
placeholder: t("tabs.searchDepartment"),
|
|
635
|
+
tabItems: n
|
|
636
|
+
}), oe = {
|
|
637
|
+
user: Z,
|
|
638
|
+
usergroup: Z,
|
|
639
|
+
dept: Q,
|
|
640
|
+
deptgroup: Q,
|
|
641
|
+
deptusers: ({ wd: e, t, deptUserTabItems: n }) => ({
|
|
642
|
+
raw: /* @__PURE__ */ F(X, { wd: e }),
|
|
643
|
+
placeholder: t("common.searchPlaceholder"),
|
|
644
|
+
tabItems: n
|
|
645
|
+
})
|
|
646
|
+
}, se = (e, t) => {
|
|
647
|
+
let n = p(), r = m(), i = f(), { t: a } = c(), o = oe[e];
|
|
648
|
+
if (!o) throw Error(`No search strategy found for type: ${e}`);
|
|
649
|
+
return { config: o({
|
|
650
|
+
wd: t,
|
|
651
|
+
t: a,
|
|
652
|
+
memberTabItems: n,
|
|
653
|
+
departmentTabItems: r,
|
|
654
|
+
deptUserTabItems: i
|
|
655
|
+
}) };
|
|
656
|
+
}, ce = () => {
|
|
657
|
+
let { type: e } = a(), [n, r] = w(), { config: i } = se(e, n), { tabItems: o } = i, [s, c] = w(o[0].key), l = (e) => {
|
|
658
|
+
c(e), r(void 0);
|
|
659
|
+
}, u = o.find((e) => e.key === s)?.view, d = (e) => {
|
|
660
|
+
if (!e.trim().length) {
|
|
661
|
+
r(void 0);
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
r(e);
|
|
665
|
+
}, f = n ? i.raw : u, p = i.placeholder;
|
|
666
|
+
return /* @__PURE__ */ I("div", {
|
|
667
|
+
className: t(ie["selection-tabs"]),
|
|
668
|
+
children: [/* @__PURE__ */ F(G, {
|
|
669
|
+
value: s,
|
|
670
|
+
onChange: l,
|
|
671
|
+
onSearch: d,
|
|
672
|
+
tabs: o,
|
|
673
|
+
searchPlaceholder: p
|
|
674
|
+
}), /* @__PURE__ */ F(re, { children: f })]
|
|
675
|
+
});
|
|
676
|
+
}, le = (e, t) => te(e, (e) => {
|
|
677
|
+
switch (t.type) {
|
|
678
|
+
case "addOne": {
|
|
679
|
+
let n = t.payload;
|
|
680
|
+
~e.findIndex((e) => e._id === n._id) || e.push(n);
|
|
681
|
+
break;
|
|
682
|
+
}
|
|
683
|
+
case "addMany":
|
|
684
|
+
t.payload.forEach((t) => {
|
|
685
|
+
~e.findIndex((e) => e._id === t._id) || e.push(t);
|
|
686
|
+
});
|
|
687
|
+
break;
|
|
688
|
+
case "removeMany": {
|
|
689
|
+
let n = t.payload;
|
|
690
|
+
e.filter((e) => n.includes(e._id)).forEach((t) => {
|
|
691
|
+
let n = e.findIndex((e) => e._id === t._id);
|
|
692
|
+
~n && e.splice(n, 1);
|
|
693
|
+
});
|
|
694
|
+
break;
|
|
695
|
+
}
|
|
696
|
+
case "removeAll":
|
|
697
|
+
e.splice(0, e.length);
|
|
698
|
+
break;
|
|
699
|
+
case "insertOnly": {
|
|
700
|
+
let n = t.payload;
|
|
701
|
+
e.length &&= 0, e.push(n);
|
|
702
|
+
break;
|
|
703
|
+
}
|
|
704
|
+
case "deleteOne": {
|
|
705
|
+
let n = t.payload, r = e.findIndex((e) => e._id === n);
|
|
706
|
+
~r && e.splice(r, 1);
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
case "deleteAndInsert": {
|
|
710
|
+
let { newItems: n, oldIds: r } = t.payload;
|
|
711
|
+
r.forEach((t) => {
|
|
712
|
+
let n = e.findIndex((e) => e._id === t);
|
|
713
|
+
~n && e.splice(n, 1);
|
|
714
|
+
}), n.forEach((t) => {
|
|
715
|
+
~e.findIndex((e) => e._id === t._id) || e.push(t);
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}), $ = {
|
|
720
|
+
"depts-member": "_depts-member_1yeqk_1",
|
|
721
|
+
"depts-member__body": "_depts-member__body_1yeqk_6",
|
|
722
|
+
"depts-member__content": "_depts-member__content_1yeqk_9",
|
|
723
|
+
"depts-member__footer": "_depts-member__footer_1yeqk_15",
|
|
724
|
+
"depts-member__clear-area": "_depts-member__clear-area_1yeqk_20",
|
|
725
|
+
"depts-member__clear-button": "_depts-member__clear-button_1yeqk_24",
|
|
726
|
+
"depts-member__actions": "_depts-member__actions_1yeqk_35",
|
|
727
|
+
"depts-member__cancel-button": "_depts-member__cancel-button_1yeqk_42",
|
|
728
|
+
"depts-member__confirm-button": "_depts-member__confirm-button_1yeqk_45"
|
|
729
|
+
}, ue = (e) => {
|
|
730
|
+
let { onCancel: t, onConfirm: n, onChange: r, defaultValue: a, type: o = "user", currentUser: l } = e, { t: u } = c(), [d, f] = M(e, { defaultValue: a || [] }), p = y((e) => {
|
|
731
|
+
let t = le(d, e);
|
|
732
|
+
f(t), r?.(t);
|
|
733
|
+
}, [
|
|
734
|
+
f,
|
|
735
|
+
d,
|
|
736
|
+
r
|
|
737
|
+
]), m = S(() => ({
|
|
738
|
+
type: o,
|
|
739
|
+
value: d,
|
|
740
|
+
setValue: f,
|
|
741
|
+
dispatch: p,
|
|
742
|
+
currentUser: l,
|
|
743
|
+
auth: {
|
|
744
|
+
publicPermissionEnable: e.auth?.publicPermissionEnable || !1,
|
|
745
|
+
managerPermissionEnable: e.auth?.managerPermissionEnable || !1
|
|
746
|
+
},
|
|
747
|
+
containerHeight: [s.USER_GROUP, s.DEPARMENT_GROUP].includes(o) ? 355 : 395
|
|
748
|
+
}), [
|
|
749
|
+
o,
|
|
750
|
+
d,
|
|
751
|
+
f,
|
|
752
|
+
p,
|
|
753
|
+
l,
|
|
754
|
+
e.auth?.publicPermissionEnable,
|
|
755
|
+
e.auth?.managerPermissionEnable
|
|
756
|
+
]);
|
|
757
|
+
return /* @__PURE__ */ I("div", {
|
|
758
|
+
className: $["depts-member"],
|
|
759
|
+
children: [/* @__PURE__ */ F("div", {
|
|
760
|
+
className: $["depts-member__body"],
|
|
761
|
+
children: /* @__PURE__ */ F("div", {
|
|
762
|
+
className: $["depts-member__content"],
|
|
763
|
+
"data-teleport": "DeptsMember",
|
|
764
|
+
children: /* @__PURE__ */ I(i.Provider, {
|
|
765
|
+
value: m,
|
|
766
|
+
children: [/* @__PURE__ */ F(U, {}), /* @__PURE__ */ F(ce, {})]
|
|
767
|
+
})
|
|
768
|
+
})
|
|
769
|
+
}), /* @__PURE__ */ I("div", {
|
|
770
|
+
className: $["depts-member__footer"],
|
|
771
|
+
children: [[s.DEPARMENT_GROUP, s.USER_GROUP].includes(o) && /* @__PURE__ */ F("div", {
|
|
772
|
+
className: $["depts-member__clear-area"],
|
|
773
|
+
children: /* @__PURE__ */ I("div", {
|
|
774
|
+
className: $["depts-member__clear-button"],
|
|
775
|
+
onClick: () => {
|
|
776
|
+
f([]);
|
|
777
|
+
},
|
|
778
|
+
children: [/* @__PURE__ */ F(O, {
|
|
779
|
+
name: "clearTree",
|
|
780
|
+
size: 20,
|
|
781
|
+
style: { verticalAlign: "sub" }
|
|
782
|
+
}), /* @__PURE__ */ F("span", { children: u("common.clearAll") })]
|
|
783
|
+
})
|
|
784
|
+
}), /* @__PURE__ */ I("div", {
|
|
785
|
+
className: $["depts-member__actions"],
|
|
786
|
+
children: [/* @__PURE__ */ F(E, {
|
|
787
|
+
onClick: t,
|
|
788
|
+
className: $["depts-member__cancel-button"],
|
|
789
|
+
children: u("common.cancel")
|
|
790
|
+
}), /* @__PURE__ */ F(E, {
|
|
791
|
+
type: "primary",
|
|
792
|
+
className: $["depts-member__confirm-button"],
|
|
793
|
+
onClick: () => n?.(d),
|
|
794
|
+
children: u("common.confirm")
|
|
795
|
+
})]
|
|
796
|
+
})]
|
|
797
|
+
})]
|
|
798
|
+
});
|
|
799
|
+
};
|
|
800
|
+
//#endregion
|
|
801
|
+
export { z as n, ue as t };
|