@baishuyun/ui-business 3.0.2 → 3.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/DeptsMember/DeptsMember-CzJqr_LX.js +721 -0
- package/dist/DeptsMember/ExtraConcactPanel-BI9emYpp.js +674 -0
- package/dist/DeptsMember/OrganizationPanel-DcwvZ6X4.js +254 -0
- package/dist/DeptsMember/TabGroup-wNM86-Zq.js +141 -0
- package/dist/DeptsMember/index.js +2 -2
- package/dist/DeptsMember/subcomponents/Entity/Department/index.js +75 -315
- package/dist/DeptsMember/subcomponents/Entity/DeptsUser/index.d.ts +2 -0
- package/dist/DeptsMember/subcomponents/Entity/DeptsUser/index.js +38 -0
- package/dist/DeptsMember/subcomponents/Entity/Member/index.js +27 -690
- package/dist/components/DeptsMember/DeptsMember.type.d.ts +5 -1
- package/dist/components/DeptsMember/hooks/useDeptsMemberSelector.d.ts +1 -0
- package/dist/components/DeptsMember/subcomponents/Entity/Department/index.d.ts +1 -1
- package/dist/components/DeptsMember/subcomponents/Entity/DeptsUser/index.d.ts +6 -0
- package/dist/components/DeptsMember/subcomponents/Entity/Member/index.d.ts +1 -1
- package/dist/components/DeptsMember/subcomponents/SelectionTabs/SelectionTabList/SelectionTabList.d.ts +2 -2
- package/dist/components/DeptsMember/subcomponents/SelectionTabs/useSelectorType.d.ts +16 -0
- package/dist/components/DeptsMember/utils/constants.d.ts +8 -4
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/lang/en-US.json.d.ts +2 -1
- package/dist/lang/zh-CN.json.d.ts +2 -1
- package/package.json +1 -1
- package/dist/DeptsMember/DeptsMember-pFjdAocd.js +0 -702
- package/dist/DeptsMember/TabGroup-CznMwTOD.js +0 -137
- package/dist/vendors/services/team/team.services.js +0 -5
- /package/dist/components/DeptsMember/subcomponents/Entity/Member/{MemberEntity/MemerList → MemerList}/MemberList.d.ts +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Department/CurrentDepartmentEntity/CurrentDepartmentEntity.d.ts → Panels/CurrentUserDeptsPanel/CurrentUserDeptsPanel.d.ts} +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Member/CurrentEntity/CurrentEntity.d.ts → Panels/CurrentUserPanel/CurrentUserPanel.d.ts} +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Department/ExternalContactEntity/ExternalContactEntity.d.ts → Panels/ExtraConcactPanel/ExtraConcactPanel.d.ts} +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Member/ExternalContactEntity/ExternalContactEntity.d.ts → Panels/ExtraContactGroupPanel/ExtraContactGroupPanel.d.ts} +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Member/MemberEntity → Panels/MemberPanel}/AllMemeberCheck/AllMemeberCheck.d.ts +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Member/MemberEntity → Panels/MemberPanel}/ExternalMember/ExternalMember.d.ts +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Member/MemberEntity → Panels/MemberPanel}/InternalMemeber/InternalMemeber.d.ts +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Member/MemberEntity/MemberEntity.d.ts → Panels/MemberPanel/MemberPanel.d.ts} +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Department/OrganizationalEntity → Panels/OrganizationPanel}/ExternalOrganization/ExternalOrganization.d.ts +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Department/OrganizationalEntity → Panels/OrganizationPanel}/InternalOrganization/InternalOrganization.d.ts +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Department/OrganizationalEntity/OrganizationalEntity.d.ts → Panels/OrganizationPanel/OrganizationPanel.d.ts} +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Member/MajorEntity/MajorEntity.d.ts → Panels/PositionPanel/PositionPanel.d.ts} +0 -0
- /package/dist/components/DeptsMember/subcomponents/{Entity/Member/RoleEntity/RoleEntity.d.ts → Panels/RolePanel/RolePanel.d.ts} +0 -0
|
@@ -1,367 +1,127 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { useRequest as
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import {
|
|
9
|
-
import { S } from "../../../../vendors/simplebar-react.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
const
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
style: { height: p - 8, padding: "4px" },
|
|
18
|
-
className: "internal-container",
|
|
19
|
-
classNames: {
|
|
20
|
-
contentEl: "internal-container-content-el"
|
|
21
|
-
},
|
|
22
|
-
children: [
|
|
23
|
-
t.data.length > 0 && /* @__PURE__ */ e(
|
|
24
|
-
w,
|
|
25
|
-
{
|
|
26
|
-
parentCheckable: !0,
|
|
27
|
-
checkType: r === E.DEPARMENT ? "radio" : "checkbox",
|
|
28
|
-
data: t.data,
|
|
29
|
-
fieldNames: {
|
|
30
|
-
title: "name",
|
|
31
|
-
value: "_id",
|
|
32
|
-
children: "children"
|
|
33
|
-
},
|
|
34
|
-
selectedKeys: f,
|
|
35
|
-
onSelect: t.onSelect,
|
|
36
|
-
onDeSelect: t.onDeselect,
|
|
37
|
-
defaultExpandedKeys: s,
|
|
38
|
-
icon: () => /* @__PURE__ */ e(C, { name: "dept-one", className: "internal-container__icon" }),
|
|
39
|
-
switcherIcon: (d) => /* @__PURE__ */ e(
|
|
40
|
-
C,
|
|
41
|
-
{
|
|
42
|
-
name: "xiangxiazhankai-11",
|
|
43
|
-
className: v("internal-container__arrow-icon", {
|
|
44
|
-
"rotate-90": d
|
|
45
|
-
})
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
t.data.length === 0 && !t.loading && /* @__PURE__ */ e("div", { className: "internal-container__empty", children: /* @__PURE__ */ e("span", { children: a("department.noAvailable") }) })
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
}, V = (t) => {
|
|
55
|
-
const { type: r, containerHeight: p, value: o } = N(), { t: a } = k(), [f, s] = D(
|
|
56
|
-
"dockcorp"
|
|
57
|
-
/* DOCK_PERSON_GROUP */
|
|
58
|
-
), d = o?.map((n) => n._id) || [], b = [
|
|
59
|
-
{
|
|
60
|
-
label: a("department.externalContactGroup"),
|
|
61
|
-
value: "dockcorp"
|
|
62
|
-
/* DOCK_PERSON_GROUP */
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: a("department.externalContactDepartment"),
|
|
66
|
-
value: "dockcorpdept"
|
|
67
|
-
/* DOCK_DEPARTMENT */
|
|
68
|
-
}
|
|
69
|
-
], i = (n, u) => {
|
|
70
|
-
const m = [];
|
|
71
|
-
for (const c of n)
|
|
72
|
-
if (c.type === u)
|
|
73
|
-
if (u === "dockcorpdept")
|
|
74
|
-
m.push({
|
|
75
|
-
...c,
|
|
76
|
-
children: c.children
|
|
77
|
-
});
|
|
78
|
-
else {
|
|
79
|
-
const l = c.children ? i(c.children, u) : [];
|
|
80
|
-
m.push({
|
|
81
|
-
...c,
|
|
82
|
-
children: l.length > 0 ? l : void 0
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
const l = c.children ? i(c.children, u) : [];
|
|
87
|
-
l.length > 0 && m.push({
|
|
88
|
-
...c,
|
|
89
|
-
children: l
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
return m;
|
|
93
|
-
}, x = i(t.data, f), _ = x?.map((n) => n._id);
|
|
94
|
-
return /* @__PURE__ */ g("div", { className: "external-container", children: [
|
|
95
|
-
/* @__PURE__ */ e(L, { tabs: b, value: f, onChange: s }),
|
|
96
|
-
/* @__PURE__ */ e("div", { className: "external-container__content", children: /* @__PURE__ */ g(
|
|
97
|
-
S,
|
|
98
|
-
{
|
|
99
|
-
style: { height: p - 42, padding: "4px" },
|
|
100
|
-
classNames: {
|
|
101
|
-
contentEl: "external-container-content-el"
|
|
102
|
-
},
|
|
103
|
-
children: [
|
|
104
|
-
x.length > 0 && /* @__PURE__ */ e(
|
|
105
|
-
w,
|
|
106
|
-
{
|
|
107
|
-
parentCheckable: !0,
|
|
108
|
-
checkType: r === E.DEPARMENT ? "radio" : "checkbox",
|
|
109
|
-
data: x,
|
|
110
|
-
fieldNames: {
|
|
111
|
-
title: "name",
|
|
112
|
-
value: "_id",
|
|
113
|
-
children: "children"
|
|
114
|
-
},
|
|
115
|
-
selectedKeys: d,
|
|
116
|
-
onSelect: t.onSelect,
|
|
117
|
-
onDeSelect: t.onDeselect,
|
|
118
|
-
defaultExpandedKeys: _,
|
|
119
|
-
icon: () => /* @__PURE__ */ e(C, { name: "dept-one", className: "text-[#0265ff]", size: 16 }),
|
|
120
|
-
switcherIcon: (n) => /* @__PURE__ */ e(
|
|
121
|
-
C,
|
|
122
|
-
{
|
|
123
|
-
name: "xiangxiazhankai-11",
|
|
124
|
-
className: v(
|
|
125
|
-
"transition-transform text-base duration-300 ease-in-out text-[#666]",
|
|
126
|
-
{
|
|
127
|
-
"rotate-90": n
|
|
128
|
-
}
|
|
129
|
-
)
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
),
|
|
134
|
-
x.length === 0 && !t.loading && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-[#999]", children: a("department.noAvailable") }) })
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
) })
|
|
138
|
-
] });
|
|
139
|
-
}, W = () => {
|
|
140
|
-
const { type: t, dispatch: r } = N(), { t: p } = k(), [o] = D([
|
|
141
|
-
{ key: 0, label: p("department.internal"), visible: !0 },
|
|
142
|
-
{ key: 1, label: p("department.external"), visible: !0 }
|
|
143
|
-
]), [a, f] = D(
|
|
144
|
-
0
|
|
145
|
-
/* INTERNAL */
|
|
146
|
-
), { data: s, loading: d } = T(
|
|
147
|
-
() => j({
|
|
148
|
-
departmentLimit: [],
|
|
149
|
-
hasDeptDock: a === 1
|
|
150
|
-
/* EXTERNAL */
|
|
151
|
-
}),
|
|
152
|
-
{
|
|
153
|
-
refreshDeps: [a]
|
|
154
|
-
}
|
|
155
|
-
), b = G(() => {
|
|
156
|
-
const l = s?.departments || [];
|
|
157
|
-
return l.length > 0 ? B(l) : [];
|
|
158
|
-
}, [s]), i = G(() => {
|
|
159
|
-
const l = s?.label_corp_list || [];
|
|
160
|
-
if (!l.length)
|
|
161
|
-
return [];
|
|
162
|
-
const y = l.filter((h) => h.type === "dockcorp" || h.type === "dockdept" ? !0 : h.parentId === 0 ? !1 : l.some((z) => z.parentId === h.departmentId)), I = y.map((h) => ({
|
|
163
|
-
...h,
|
|
164
|
-
checkable: h.type !== "dockcorpdept" && h.type !== "label",
|
|
165
|
-
icon: /* @__PURE__ */ e(H, { type: h.type, size: 16 })
|
|
166
|
-
}));
|
|
167
|
-
return y.length > 0 ? U(I, {
|
|
168
|
-
parentId: "parentId",
|
|
169
|
-
children: "children",
|
|
170
|
-
value: "_id",
|
|
171
|
-
title: "name"
|
|
172
|
-
}) : [];
|
|
173
|
-
}, [s]), x = {
|
|
174
|
-
0: b,
|
|
175
|
-
1: i
|
|
176
|
-
}, _ = M(
|
|
177
|
-
(l) => {
|
|
178
|
-
const y = a === 1 ? s?.label_corp_list : s?.departments;
|
|
179
|
-
if (!y)
|
|
180
|
-
return;
|
|
181
|
-
const I = y.find((h) => h._id === l);
|
|
182
|
-
I && r({
|
|
183
|
-
type: "insertOnly",
|
|
184
|
-
payload: {
|
|
185
|
-
...I
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
},
|
|
189
|
-
[r, s, a]
|
|
190
|
-
), n = M(
|
|
191
|
-
(l, y) => {
|
|
192
|
-
r({
|
|
193
|
-
type: "addOne",
|
|
194
|
-
payload: {
|
|
195
|
-
...y
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
},
|
|
199
|
-
[r]
|
|
200
|
-
), u = (l) => {
|
|
201
|
-
const y = q(l, x[a], {
|
|
202
|
-
children: "children",
|
|
203
|
-
value: "_id"
|
|
204
|
-
});
|
|
205
|
-
y && r({
|
|
206
|
-
type: "deleteOne",
|
|
207
|
-
payload: y._id
|
|
208
|
-
});
|
|
209
|
-
}, m = E.DEPARMENT === t ? _ : n, c = s?.label_corp_count || 0;
|
|
210
|
-
return /* @__PURE__ */ g("div", { className: "flex line-height-normal h-full", children: [
|
|
211
|
-
c > 0 && /* @__PURE__ */ e("aside", { className: "basis-[200px] p-1 shrink-0", children: /* @__PURE__ */ e("ul", { className: "flex flex-col", children: o.filter((l) => l.visible).map((l) => /* @__PURE__ */ e(
|
|
212
|
-
"li",
|
|
213
|
-
{
|
|
214
|
-
onClick: () => f(l.key),
|
|
215
|
-
className: v("px-[10px] py-[7px] rounded cursor-pointer text-sm", {
|
|
216
|
-
"bg-[#F0F6FF] text-[#0265ff]": a === l.key,
|
|
217
|
-
"text-black hover:bg-[#f3f3f3]": a !== l.key
|
|
218
|
-
}),
|
|
219
|
-
children: l.label
|
|
220
|
-
},
|
|
221
|
-
l.key
|
|
222
|
-
)) }) }),
|
|
223
|
-
/* @__PURE__ */ e(
|
|
224
|
-
"section",
|
|
225
|
-
{
|
|
226
|
-
className: v("flex-1 border-[#E0E0E0] overflow-hidden", {
|
|
227
|
-
"border-l": c > 0
|
|
228
|
-
}),
|
|
229
|
-
children: /* @__PURE__ */ g(A, { spinning: d, children: [
|
|
230
|
-
a === 0 && /* @__PURE__ */ e(
|
|
231
|
-
Q,
|
|
232
|
-
{
|
|
233
|
-
onSelect: m,
|
|
234
|
-
onDeselect: u,
|
|
235
|
-
loading: !0,
|
|
236
|
-
data: x[a]
|
|
237
|
-
}
|
|
238
|
-
),
|
|
239
|
-
a === 1 && /* @__PURE__ */ e(
|
|
240
|
-
V,
|
|
241
|
-
{
|
|
242
|
-
data: x[a],
|
|
243
|
-
onSelect: m,
|
|
244
|
-
onDeselect: u,
|
|
245
|
-
loading: !0
|
|
246
|
-
}
|
|
247
|
-
)
|
|
248
|
-
] })
|
|
249
|
-
}
|
|
250
|
-
)
|
|
251
|
-
] });
|
|
252
|
-
}, F = (t) => {
|
|
253
|
-
const { list: r } = t, { value: p, type: o, dispatch: a } = N(), f = o === E.DEPARMENT, s = o === E.DEPARMENT_GROUP, d = p?.[0]?._id, b = (n) => {
|
|
254
|
-
const u = r?.find((m) => m._id === n.target.value);
|
|
255
|
-
u && a({
|
|
1
|
+
import { jsx as e, jsxs as u, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { O as M } from "../../../OrganizationPanel-DcwvZ6X4.js";
|
|
3
|
+
import { useRequest as k } from "ahooks";
|
|
4
|
+
import { d as R } from "../../../../vendors/services/data/member.service.js";
|
|
5
|
+
import { c as x } from "../../../../vendors/clsx.js";
|
|
6
|
+
import { Radio as b, Spin as E } from "antd";
|
|
7
|
+
import { a as y, E as v, u as g } from "../../../TabGroup-wNM86-Zq.js";
|
|
8
|
+
import { Checkbox as N } from "bsy-react-ui";
|
|
9
|
+
import { S as C } from "../../../../vendors/simplebar-react.js";
|
|
10
|
+
import { g as O } from "../../../../vendors/services/corp/outsider.service.js";
|
|
11
|
+
import { useState as G, useMemo as j } from "react";
|
|
12
|
+
const _ = (a) => {
|
|
13
|
+
const { list: n } = a, { value: o, type: r, dispatch: s } = y(), h = r === v.DEPARMENT, d = r === v.DEPARMENT_GROUP, m = o?.[0]?._id, c = (t) => {
|
|
14
|
+
const p = n?.find((f) => f._id === t.target.value);
|
|
15
|
+
p && s({
|
|
256
16
|
type: "insertOnly",
|
|
257
|
-
payload: Object.assign({},
|
|
258
|
-
type:
|
|
17
|
+
payload: Object.assign({}, p, {
|
|
18
|
+
type: a.type || p.type
|
|
259
19
|
})
|
|
260
20
|
});
|
|
261
|
-
},
|
|
262
|
-
|
|
21
|
+
}, l = (t) => {
|
|
22
|
+
s({
|
|
263
23
|
type: "deleteOne",
|
|
264
|
-
payload:
|
|
24
|
+
payload: t
|
|
265
25
|
});
|
|
266
|
-
},
|
|
267
|
-
const
|
|
268
|
-
|
|
26
|
+
}, I = o?.map((t) => t._id) || [], D = (t) => {
|
|
27
|
+
const p = n.filter((i) => !t.includes(i._id)), f = n.filter((i) => t.includes(i._id));
|
|
28
|
+
s({
|
|
269
29
|
type: "deleteAndInsert",
|
|
270
30
|
payload: {
|
|
271
|
-
oldIds:
|
|
272
|
-
newItems:
|
|
273
|
-
type:
|
|
31
|
+
oldIds: p.map((i) => i._id),
|
|
32
|
+
newItems: f.map((i) => Object.assign({}, i, {
|
|
33
|
+
type: a.type || i.type
|
|
274
34
|
}))
|
|
275
35
|
}
|
|
276
36
|
});
|
|
277
37
|
};
|
|
278
|
-
return /* @__PURE__ */ e("div", { className: "entity-group-list", children: /* @__PURE__ */
|
|
279
|
-
|
|
38
|
+
return /* @__PURE__ */ e("div", { className: "entity-group-list", children: /* @__PURE__ */ u("ul", { className: "font-0", children: [
|
|
39
|
+
h && /* @__PURE__ */ e(b.Group, { value: m, onChange: c, className: "w-full", children: n.map((t) => /* @__PURE__ */ e(
|
|
280
40
|
"li",
|
|
281
41
|
{
|
|
282
|
-
className:
|
|
42
|
+
className: x("rounded-[4px] cursor-pointer font-0", {
|
|
283
43
|
"hover:bg-[#f3f3f3]": !0
|
|
284
44
|
}),
|
|
285
45
|
children: /* @__PURE__ */ e(
|
|
286
|
-
|
|
46
|
+
b,
|
|
287
47
|
{
|
|
288
|
-
value:
|
|
48
|
+
value: t._id,
|
|
289
49
|
className: "px-[10px] py-[6px]",
|
|
290
50
|
onClick: () => {
|
|
291
|
-
|
|
51
|
+
l(t._id);
|
|
292
52
|
},
|
|
293
|
-
children: /* @__PURE__ */ e("div", { className: "flex gap-[6px] items-center", children: /* @__PURE__ */ e("span", { className: "text-sm select-none", children:
|
|
53
|
+
children: /* @__PURE__ */ e("div", { className: "flex gap-[6px] items-center", children: /* @__PURE__ */ e("span", { className: "text-sm select-none", children: t.name }) })
|
|
294
54
|
}
|
|
295
55
|
)
|
|
296
56
|
},
|
|
297
|
-
|
|
57
|
+
t._id
|
|
298
58
|
)) }),
|
|
299
|
-
|
|
59
|
+
d && /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(N.Group, { value: I, onChange: D, children: n.map((t) => /* @__PURE__ */ e(
|
|
300
60
|
"li",
|
|
301
61
|
{
|
|
302
|
-
className:
|
|
62
|
+
className: x("rounded-[4px] cursor-pointer font-0 px-[10px]", {
|
|
303
63
|
"hover:bg-[#f3f3f3]": !0
|
|
304
64
|
}),
|
|
305
|
-
children: /* @__PURE__ */ e(
|
|
65
|
+
children: /* @__PURE__ */ e(N, { labelPosition: "left", value: t._id, children: /* @__PURE__ */ e("div", { className: "flex flex-1 gap-[6px] items-center py-[7px]", children: /* @__PURE__ */ e("span", { className: "text-sm select-none", children: t.name }) }) })
|
|
306
66
|
},
|
|
307
|
-
|
|
67
|
+
t._id
|
|
308
68
|
)) }) })
|
|
309
69
|
] }) });
|
|
310
|
-
},
|
|
311
|
-
const { containerHeight:
|
|
312
|
-
() =>
|
|
70
|
+
}, A = () => {
|
|
71
|
+
const { containerHeight: a } = y(), { t: n } = g(), { data: o, loading: r } = k(
|
|
72
|
+
() => R({
|
|
313
73
|
departmentLimit: []
|
|
314
74
|
})
|
|
315
|
-
),
|
|
316
|
-
return /* @__PURE__ */ e("div", { className: "p-1 external-contact-entit relative", children: /* @__PURE__ */ e(
|
|
317
|
-
/* @__PURE__ */ e(
|
|
318
|
-
|
|
75
|
+
), s = o?.departmentList || [];
|
|
76
|
+
return /* @__PURE__ */ e("div", { className: "p-1 external-contact-entit relative", children: /* @__PURE__ */ e(E, { spinning: r, tip: n("common.loading"), children: /* @__PURE__ */ u(C, { style: { height: a - 8 }, children: [
|
|
77
|
+
/* @__PURE__ */ e(_, { list: s }),
|
|
78
|
+
s.length === 0 && !r && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-[#999]", children: n("department.noAvailable") }) })
|
|
319
79
|
] }) }) });
|
|
320
|
-
},
|
|
321
|
-
const { containerHeight:
|
|
322
|
-
{ key: "default", label:
|
|
323
|
-
{ key: "custom", label:
|
|
324
|
-
]), [
|
|
325
|
-
return /* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */ e("aside", { className: "basis-[192px] p-1", children: /* @__PURE__ */ e("ul", { className: "flex flex-col", children:
|
|
80
|
+
}, w = () => {
|
|
81
|
+
const { containerHeight: a } = y(), { t: n } = g(), [o] = G([
|
|
82
|
+
{ key: "default", label: n("externalContact.defaultGroup") },
|
|
83
|
+
{ key: "custom", label: n("externalContact.customGroup") }
|
|
84
|
+
]), [r, s] = G("default"), { data: h, loading: d } = k(() => O()), m = h?.list || [], c = r === "default" ? m.filter((l) => l.type === "1") : m.filter((l) => l.type !== "1");
|
|
85
|
+
return /* @__PURE__ */ u("div", { className: "external-contact-entity relative flex", children: [
|
|
86
|
+
/* @__PURE__ */ e("aside", { className: "basis-[192px] p-1", children: /* @__PURE__ */ e("ul", { className: "flex flex-col", children: o.map((l) => /* @__PURE__ */ e(
|
|
327
87
|
"li",
|
|
328
88
|
{
|
|
329
89
|
onClick: () => {
|
|
330
|
-
|
|
90
|
+
s(l.key);
|
|
331
91
|
},
|
|
332
|
-
className:
|
|
333
|
-
"bg-[#F0F6FF] text-[#0265ff]":
|
|
334
|
-
"text-black hover:bg-[#f3f3f3]":
|
|
92
|
+
className: x("px-[10px] py-[7px] rounded cursor-pointer text-sm", {
|
|
93
|
+
"bg-[#F0F6FF] text-[#0265ff]": r === l.key,
|
|
94
|
+
"text-black hover:bg-[#f3f3f3]": r !== l.key
|
|
335
95
|
}),
|
|
336
|
-
children:
|
|
96
|
+
children: l.label
|
|
337
97
|
},
|
|
338
|
-
|
|
98
|
+
l.key
|
|
339
99
|
)) }) }),
|
|
340
|
-
/* @__PURE__ */ e("div", { className: "flex-1 border-l border-[#E0E0E0]", children: /* @__PURE__ */ e(
|
|
341
|
-
|
|
342
|
-
|
|
100
|
+
/* @__PURE__ */ e("div", { className: "flex-1 border-l border-[#E0E0E0]", children: /* @__PURE__ */ e(E, { spinning: d, tip: n("common.loading"), children: /* @__PURE__ */ u(C, { style: { height: a - 8, padding: "4px" }, children: [
|
|
101
|
+
c.length > 0 && /* @__PURE__ */ e(_, { list: c, type: "group" }),
|
|
102
|
+
c.length === 0 && !d && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-[#999]", children: n("externalContact.noAvailableGroup") }) })
|
|
343
103
|
] }) }) })
|
|
344
104
|
] });
|
|
345
|
-
},
|
|
346
|
-
const { t } =
|
|
347
|
-
return
|
|
105
|
+
}, Q = () => {
|
|
106
|
+
const { t: a } = g();
|
|
107
|
+
return j(() => [
|
|
348
108
|
{
|
|
349
|
-
label:
|
|
350
|
-
|
|
351
|
-
view: /* @__PURE__ */ e(
|
|
109
|
+
label: a("department.organizationalStructure"),
|
|
110
|
+
key: "organizational",
|
|
111
|
+
view: /* @__PURE__ */ e(M, {})
|
|
352
112
|
},
|
|
353
113
|
{
|
|
354
|
-
label:
|
|
355
|
-
|
|
356
|
-
view: /* @__PURE__ */ e(
|
|
114
|
+
label: a("externalContact.group"),
|
|
115
|
+
key: "externalContactGroup",
|
|
116
|
+
view: /* @__PURE__ */ e(w, {})
|
|
357
117
|
},
|
|
358
118
|
{
|
|
359
|
-
label:
|
|
360
|
-
|
|
361
|
-
view: /* @__PURE__ */ e(
|
|
119
|
+
label: a("department.currentUserDepartment"),
|
|
120
|
+
key: "currentDepartment",
|
|
121
|
+
view: /* @__PURE__ */ e(A, {})
|
|
362
122
|
}
|
|
363
|
-
], [
|
|
123
|
+
], [a]);
|
|
364
124
|
};
|
|
365
125
|
export {
|
|
366
|
-
|
|
126
|
+
Q as useDepartmentTabItems
|
|
367
127
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { O as a } from "../../../OrganizationPanel-DcwvZ6X4.js";
|
|
3
|
+
import { a as o, b as r, R as i, E as n } from "../../../ExtraConcactPanel-BI9emYpp.js";
|
|
4
|
+
import { u as l } from "../../../TabGroup-wNM86-Zq.js";
|
|
5
|
+
import { useMemo as m } from "react";
|
|
6
|
+
const E = () => {
|
|
7
|
+
const { t } = l();
|
|
8
|
+
return m(() => [
|
|
9
|
+
{
|
|
10
|
+
label: t("department.organizationalStructure"),
|
|
11
|
+
key: "organizational",
|
|
12
|
+
view: /* @__PURE__ */ e(a, {})
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: t("member.title"),
|
|
16
|
+
key: "member",
|
|
17
|
+
view: /* @__PURE__ */ e(o, {})
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: t("position.title"),
|
|
21
|
+
key: "position",
|
|
22
|
+
view: /* @__PURE__ */ e(r, {})
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: t("role.title"),
|
|
26
|
+
key: "role",
|
|
27
|
+
view: /* @__PURE__ */ e(i, {})
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: t("externalContact.title"),
|
|
31
|
+
key: "extraContact",
|
|
32
|
+
view: /* @__PURE__ */ e(n, {})
|
|
33
|
+
}
|
|
34
|
+
], [t]);
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
E as useDeptUserTabItems
|
|
38
|
+
};
|