@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
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { jsxs as y, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { g as M } from "../vendors/services/data/member.service.js";
|
|
3
|
-
import { useRequest as R } from "ahooks";
|
|
4
|
-
import { Spin as H } from "antd";
|
|
5
|
-
import { c as v } from "../vendors/clsx.js";
|
|
6
|
-
import { useState as E, useMemo as C, useCallback as w } from "react";
|
|
7
|
-
import { u as I } from "./useDeptsMemberSelector-D3rvDuVf.js";
|
|
8
|
-
import { E as S, c as L, a as P } from "./TabGroup-DZC7i-Yr.js";
|
|
9
|
-
import { buildDeptTree as j, buildTree as B, findNodeInTree as G } from "./utils/index.js";
|
|
10
|
-
import { u as T } from "../vendors/useLocale.js";
|
|
11
|
-
import { S as A } from "../vendors/simplebar-react.js";
|
|
12
|
-
import { Tree as O, Icon as k } from "@baishuyun/ui-base";
|
|
13
|
-
const q = (a) => {
|
|
14
|
-
const { type: c, containerHeight: u, value: f } = I(), { t } = T(), z = f?.map((s) => s._id) || [], i = a.data?.map((s) => s._id);
|
|
15
|
-
return /* @__PURE__ */ y(
|
|
16
|
-
A,
|
|
17
|
-
{
|
|
18
|
-
style: { height: u - 8, padding: "4px" },
|
|
19
|
-
className: "internal-container",
|
|
20
|
-
classNames: {
|
|
21
|
-
contentEl: "internal-container-content-el"
|
|
22
|
-
},
|
|
23
|
-
children: [
|
|
24
|
-
a.data.length > 0 && /* @__PURE__ */ n(
|
|
25
|
-
O,
|
|
26
|
-
{
|
|
27
|
-
parentCheckable: !0,
|
|
28
|
-
checkType: c === S.DEPARMENT ? "radio" : "checkbox",
|
|
29
|
-
data: a.data,
|
|
30
|
-
fieldNames: {
|
|
31
|
-
title: "name",
|
|
32
|
-
value: "_id",
|
|
33
|
-
children: "children"
|
|
34
|
-
},
|
|
35
|
-
selectedKeys: z,
|
|
36
|
-
onSelect: a.onSelect,
|
|
37
|
-
onDeSelect: a.onDeselect,
|
|
38
|
-
defaultExpandedKeys: i,
|
|
39
|
-
icon: () => /* @__PURE__ */ n(k, { name: "dept-one", className: "internal-container__icon" }),
|
|
40
|
-
switcherIcon: (s) => /* @__PURE__ */ n(
|
|
41
|
-
k,
|
|
42
|
-
{
|
|
43
|
-
name: "xiangxiazhankai-11",
|
|
44
|
-
className: v("internal-container__arrow-icon", {
|
|
45
|
-
"rotate-90": s
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
),
|
|
51
|
-
a.data.length === 0 && !a.loading && /* @__PURE__ */ n("div", { className: "internal-container__empty", children: /* @__PURE__ */ n("span", { children: t("department.noAvailable") }) })
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
}, h = {
|
|
56
|
-
"external-organization": "_external-organization_cz9md_1",
|
|
57
|
-
"external-organization__content": "_external-organization__content_cz9md_5",
|
|
58
|
-
"external-organization__scroll-content": "_external-organization__scroll-content_cz9md_8",
|
|
59
|
-
"external-organization__tree-icon": "_external-organization__tree-icon_cz9md_11",
|
|
60
|
-
"external-organization__switcher-icon": "_external-organization__switcher-icon_cz9md_14",
|
|
61
|
-
"external-organization__switcher-icon--expanded": "_external-organization__switcher-icon--expanded_cz9md_19",
|
|
62
|
-
"external-organization__empty": "_external-organization__empty_cz9md_22"
|
|
63
|
-
}, F = (a) => {
|
|
64
|
-
const { type: c, containerHeight: u, value: f } = I(), { t } = T(), [z, i] = E(
|
|
65
|
-
"dockcorp"
|
|
66
|
-
/* DOCK_PERSON_GROUP */
|
|
67
|
-
), s = f?.map((d) => d._id) || [], D = [
|
|
68
|
-
{
|
|
69
|
-
label: t("department.externalContactGroup"),
|
|
70
|
-
value: "dockcorp"
|
|
71
|
-
/* DOCK_PERSON_GROUP */
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
label: t("department.externalContactDepartment"),
|
|
75
|
-
value: "dockcorpdept"
|
|
76
|
-
/* DOCK_DEPARTMENT */
|
|
77
|
-
}
|
|
78
|
-
], x = (d, p) => {
|
|
79
|
-
const m = [];
|
|
80
|
-
for (const o of d)
|
|
81
|
-
if (o.type === p)
|
|
82
|
-
if (p === "dockcorpdept")
|
|
83
|
-
m.push({
|
|
84
|
-
...o,
|
|
85
|
-
children: o.children
|
|
86
|
-
});
|
|
87
|
-
else {
|
|
88
|
-
const e = o.children ? x(o.children, p) : [];
|
|
89
|
-
m.push({
|
|
90
|
-
...o,
|
|
91
|
-
children: e.length > 0 ? e : void 0
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
const e = o.children ? x(o.children, p) : [];
|
|
96
|
-
e.length > 0 && m.push({
|
|
97
|
-
...o,
|
|
98
|
-
children: e
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
return m;
|
|
102
|
-
}, _ = x(a.data, z), N = _?.map((d) => d._id);
|
|
103
|
-
return /* @__PURE__ */ y("div", { className: h["external-organization"], children: [
|
|
104
|
-
/* @__PURE__ */ n(L, { tabs: D, value: z, onChange: i }),
|
|
105
|
-
/* @__PURE__ */ n("div", { className: h["external-organization__content"], children: /* @__PURE__ */ y(
|
|
106
|
-
A,
|
|
107
|
-
{
|
|
108
|
-
style: { height: u - 42, padding: "4px" },
|
|
109
|
-
classNames: {
|
|
110
|
-
contentEl: h["external-organization__scroll-content"]
|
|
111
|
-
},
|
|
112
|
-
children: [
|
|
113
|
-
_.length > 0 && /* @__PURE__ */ n(
|
|
114
|
-
O,
|
|
115
|
-
{
|
|
116
|
-
parentCheckable: !0,
|
|
117
|
-
checkType: c === S.DEPARMENT ? "radio" : "checkbox",
|
|
118
|
-
data: _,
|
|
119
|
-
fieldNames: {
|
|
120
|
-
title: "name",
|
|
121
|
-
value: "_id",
|
|
122
|
-
children: "children"
|
|
123
|
-
},
|
|
124
|
-
selectedKeys: s,
|
|
125
|
-
onSelect: a.onSelect,
|
|
126
|
-
onDeSelect: a.onDeselect,
|
|
127
|
-
defaultExpandedKeys: N,
|
|
128
|
-
icon: () => /* @__PURE__ */ n(
|
|
129
|
-
k,
|
|
130
|
-
{
|
|
131
|
-
name: "dept-one",
|
|
132
|
-
className: h["external-organization__tree-icon"],
|
|
133
|
-
size: 16
|
|
134
|
-
}
|
|
135
|
-
),
|
|
136
|
-
switcherIcon: (d) => /* @__PURE__ */ n(
|
|
137
|
-
k,
|
|
138
|
-
{
|
|
139
|
-
name: "xiangxiazhankai-11",
|
|
140
|
-
className: v(h["external-organization__switcher-icon"], {
|
|
141
|
-
[h["external-organization__switcher-icon--expanded"]]: d
|
|
142
|
-
})
|
|
143
|
-
}
|
|
144
|
-
)
|
|
145
|
-
}
|
|
146
|
-
),
|
|
147
|
-
_.length === 0 && !a.loading && /* @__PURE__ */ n("div", { className: h["external-organization__empty"], children: /* @__PURE__ */ n("span", { children: t("department.noAvailable") }) })
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
) })
|
|
151
|
-
] });
|
|
152
|
-
}, g = {
|
|
153
|
-
"organization-panel": "_organization-panel_1dfed_1",
|
|
154
|
-
"organization-panel__menu": "_organization-panel__menu_1dfed_6",
|
|
155
|
-
"organization-panel__menu-list": "_organization-panel__menu-list_1dfed_10",
|
|
156
|
-
"organization-panel__menu-item": "_organization-panel__menu-item_1dfed_14",
|
|
157
|
-
"organization-panel__menu-item--active": "_organization-panel__menu-item--active_1dfed_25",
|
|
158
|
-
"organization-panel__content": "_organization-panel__content_1dfed_32",
|
|
159
|
-
"organization-panel__content--borderless": "_organization-panel__content--borderless_1dfed_37"
|
|
160
|
-
}, ae = () => {
|
|
161
|
-
const { type: a, dispatch: c } = I(), { t: u } = T(), [f] = E([
|
|
162
|
-
{ key: 0, label: u("department.internal"), visible: !0 },
|
|
163
|
-
{ key: 1, label: u("department.external"), visible: !0 }
|
|
164
|
-
]), [t, z] = E(
|
|
165
|
-
0
|
|
166
|
-
/* INTERNAL */
|
|
167
|
-
), { data: i, loading: s } = R(
|
|
168
|
-
() => M({
|
|
169
|
-
departmentLimit: [],
|
|
170
|
-
hasDeptDock: t === 1
|
|
171
|
-
/* EXTERNAL */
|
|
172
|
-
}),
|
|
173
|
-
{
|
|
174
|
-
refreshDeps: [t]
|
|
175
|
-
}
|
|
176
|
-
), D = C(() => {
|
|
177
|
-
const e = i?.departments || [];
|
|
178
|
-
return e.length > 0 ? j(e) : [];
|
|
179
|
-
}, [i]), x = C(() => {
|
|
180
|
-
const e = i?.label_corp_list || [];
|
|
181
|
-
if (!e.length)
|
|
182
|
-
return [];
|
|
183
|
-
const l = e.filter((r) => r.type === "dockcorp" || r.type === "dockdept" ? !0 : r.parentId === 0 ? !1 : e.some((K) => K.parentId === r.departmentId)), b = l.map((r) => ({
|
|
184
|
-
...r,
|
|
185
|
-
checkable: r.type !== "dockcorpdept" && r.type !== "label",
|
|
186
|
-
icon: /* @__PURE__ */ n(P, { type: r.type, size: 16 })
|
|
187
|
-
}));
|
|
188
|
-
return l.length > 0 ? B(b, {
|
|
189
|
-
parentId: "parentId",
|
|
190
|
-
children: "children",
|
|
191
|
-
value: "_id",
|
|
192
|
-
title: "name"
|
|
193
|
-
}) : [];
|
|
194
|
-
}, [i]), _ = {
|
|
195
|
-
0: D,
|
|
196
|
-
1: x
|
|
197
|
-
}, N = w(
|
|
198
|
-
(e) => {
|
|
199
|
-
const l = t === 1 ? i?.label_corp_list : i?.departments;
|
|
200
|
-
if (!l)
|
|
201
|
-
return;
|
|
202
|
-
const b = l.find((r) => r._id === e);
|
|
203
|
-
b && c({
|
|
204
|
-
type: "insertOnly",
|
|
205
|
-
payload: {
|
|
206
|
-
...b
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
},
|
|
210
|
-
[c, i, t]
|
|
211
|
-
), d = w(
|
|
212
|
-
(e, l) => {
|
|
213
|
-
c({
|
|
214
|
-
type: "addOne",
|
|
215
|
-
payload: {
|
|
216
|
-
...l
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
},
|
|
220
|
-
[c]
|
|
221
|
-
), p = (e) => {
|
|
222
|
-
const l = G(e, _[t], {
|
|
223
|
-
children: "children",
|
|
224
|
-
value: "_id"
|
|
225
|
-
});
|
|
226
|
-
l && c({
|
|
227
|
-
type: "deleteOne",
|
|
228
|
-
payload: l._id
|
|
229
|
-
});
|
|
230
|
-
}, m = S.DEPARMENT === a ? N : d, o = i?.label_corp_count || 0;
|
|
231
|
-
return /* @__PURE__ */ y("div", { className: g["organization-panel"], children: [
|
|
232
|
-
o > 0 && /* @__PURE__ */ n("aside", { className: g["organization-panel__menu"], children: /* @__PURE__ */ n("ul", { className: g["organization-panel__menu-list"], children: f.filter((e) => e.visible).map((e) => /* @__PURE__ */ n(
|
|
233
|
-
"li",
|
|
234
|
-
{
|
|
235
|
-
onClick: () => z(e.key),
|
|
236
|
-
className: v(g["organization-panel__menu-item"], {
|
|
237
|
-
[g["organization-panel__menu-item--active"]]: t === e.key
|
|
238
|
-
}),
|
|
239
|
-
children: e.label
|
|
240
|
-
},
|
|
241
|
-
e.key
|
|
242
|
-
)) }) }),
|
|
243
|
-
/* @__PURE__ */ n(
|
|
244
|
-
"section",
|
|
245
|
-
{
|
|
246
|
-
className: v(g["organization-panel__content"], {
|
|
247
|
-
[g["organization-panel__content--borderless"]]: o === 0
|
|
248
|
-
}),
|
|
249
|
-
children: /* @__PURE__ */ y(H, { spinning: s, children: [
|
|
250
|
-
t === 0 && /* @__PURE__ */ n(
|
|
251
|
-
q,
|
|
252
|
-
{
|
|
253
|
-
onSelect: m,
|
|
254
|
-
onDeselect: p,
|
|
255
|
-
loading: !0,
|
|
256
|
-
data: _[t]
|
|
257
|
-
}
|
|
258
|
-
),
|
|
259
|
-
t === 1 && /* @__PURE__ */ n(
|
|
260
|
-
F,
|
|
261
|
-
{
|
|
262
|
-
data: _[t],
|
|
263
|
-
onSelect: m,
|
|
264
|
-
onDeselect: p,
|
|
265
|
-
loading: !0
|
|
266
|
-
}
|
|
267
|
-
)
|
|
268
|
-
] })
|
|
269
|
-
}
|
|
270
|
-
)
|
|
271
|
-
] });
|
|
272
|
-
};
|
|
273
|
-
export {
|
|
274
|
-
ae as O
|
|
275
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as E } from "react/jsx-runtime";
|
|
2
|
-
import { Icon as c } from "@baishuyun/ui-base";
|
|
3
|
-
import { useRef as f, useState as v, useEffect as y } from "react";
|
|
4
|
-
import { c as N } from "../vendors/clsx.js";
|
|
5
|
-
const H = {
|
|
6
|
-
/**
|
|
7
|
-
* @description 成员单选类型
|
|
8
|
-
*/
|
|
9
|
-
USER: "user",
|
|
10
|
-
/**
|
|
11
|
-
* @description 成员多选类型
|
|
12
|
-
*/
|
|
13
|
-
USER_GROUP: "usergroup",
|
|
14
|
-
/**
|
|
15
|
-
* @description 部门单选类型
|
|
16
|
-
*/
|
|
17
|
-
DEPARMENT: "dept",
|
|
18
|
-
/**
|
|
19
|
-
* @description 部门多选类型
|
|
20
|
-
*/
|
|
21
|
-
DEPARMENT_GROUP: "deptgroup",
|
|
22
|
-
/**
|
|
23
|
-
* @description 部门成员类型
|
|
24
|
-
*/
|
|
25
|
-
DEPT_USERS: "deptusers"
|
|
26
|
-
}, P = 110, G = 68, D = 30, L = 8, O = 90, n = {
|
|
27
|
-
"tag-icon--primary": "_tag-icon--primary_1jzei_1",
|
|
28
|
-
"tag-icon--success": "_tag-icon--success_1jzei_4",
|
|
29
|
-
"tag-icon--relation": "_tag-icon--relation_1jzei_7",
|
|
30
|
-
"tag-icon--public": "_tag-icon--public_1jzei_10"
|
|
31
|
-
}, j = ({ type: o, size: a }) => {
|
|
32
|
-
switch (o) {
|
|
33
|
-
case "label":
|
|
34
|
-
return /* @__PURE__ */ t(c, { name: "Enterpriselabel", className: n["tag-icon--primary"], size: a });
|
|
35
|
-
case "dockcorp":
|
|
36
|
-
case "dockcorpdept":
|
|
37
|
-
return /* @__PURE__ */ t(c, { name: "company", className: n["tag-icon--primary"], size: a });
|
|
38
|
-
case "dockdept":
|
|
39
|
-
case "member":
|
|
40
|
-
return /* @__PURE__ */ t(c, { name: "dept-one", className: n["tag-icon--primary"], size: a });
|
|
41
|
-
case "group":
|
|
42
|
-
return /* @__PURE__ */ t(c, { name: "Outreach", className: n["tag-icon--success"], size: a });
|
|
43
|
-
case "public":
|
|
44
|
-
return /* @__PURE__ */ t(c, { name: "publicaccess", className: n["tag-icon--public"], size: a });
|
|
45
|
-
case "relation":
|
|
46
|
-
return /* @__PURE__ */ t(c, { name: "membership", className: n["tag-icon--relation"], size: a });
|
|
47
|
-
default:
|
|
48
|
-
return /* @__PURE__ */ t(c, { name: "dept-one", className: n["tag-icon--primary"], size: a });
|
|
49
|
-
}
|
|
50
|
-
}, I = "_active_1vd3c_15", r = {
|
|
51
|
-
"tabgroup-container": "_tabgroup-container_1vd3c_1",
|
|
52
|
-
"tabgroup-container__tab-item": "_tabgroup-container__tab-item_1vd3c_7",
|
|
53
|
-
active: I,
|
|
54
|
-
"tabgroup-container__indicator": "_tabgroup-container__indicator_1vd3c_18"
|
|
55
|
-
}, k = (o) => {
|
|
56
|
-
const { tabs: a, value: s, onChange: u } = o, l = f(null), [p, _] = v({
|
|
57
|
-
width: 0,
|
|
58
|
-
transform: "translateX(0)"
|
|
59
|
-
}), m = (e) => {
|
|
60
|
-
const i = l.current?.querySelector(`[data-key="${e}"]`);
|
|
61
|
-
if (i) {
|
|
62
|
-
const { width: d, left: g } = i.getBoundingClientRect(), b = i.parentElement?.parentElement?.getBoundingClientRect().left || 0;
|
|
63
|
-
_({
|
|
64
|
-
width: d,
|
|
65
|
-
transform: `translateX(${g - b}px)`
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
return y(() => {
|
|
70
|
-
m(s);
|
|
71
|
-
}, [s]), /* @__PURE__ */ E("div", { className: r["tabgroup-container"], ref: l, children: [
|
|
72
|
-
/* @__PURE__ */ t(
|
|
73
|
-
"div",
|
|
74
|
-
{
|
|
75
|
-
className: r["tabgroup-container__indicator"],
|
|
76
|
-
style: {
|
|
77
|
-
width: `${p.width}px`,
|
|
78
|
-
transform: p.transform
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
a.map((e) => /* @__PURE__ */ t(
|
|
83
|
-
"div",
|
|
84
|
-
{
|
|
85
|
-
className: N(r["tabgroup-container__tab-item"], {
|
|
86
|
-
[r.active]: s === e.value
|
|
87
|
-
}),
|
|
88
|
-
onClick: () => u(e.value),
|
|
89
|
-
children: /* @__PURE__ */ t("span", { "data-key": e.value, children: e.label })
|
|
90
|
-
},
|
|
91
|
-
e.value
|
|
92
|
-
))
|
|
93
|
-
] });
|
|
94
|
-
};
|
|
95
|
-
export {
|
|
96
|
-
H as E,
|
|
97
|
-
L as G,
|
|
98
|
-
D as M,
|
|
99
|
-
O as P,
|
|
100
|
-
G as T,
|
|
101
|
-
j as a,
|
|
102
|
-
P as b,
|
|
103
|
-
k as c
|
|
104
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as h } from "react/jsx-runtime";
|
|
2
|
-
import { S as f } from "../vendors/simplebar-react.js";
|
|
3
|
-
import { Tree as u, Icon as d } from "@baishuyun/ui-base";
|
|
4
|
-
import { u as S } from "./useDeptsMemberSelector-D3rvDuVf.js";
|
|
5
|
-
import { c as g } from "../vendors/clsx.js";
|
|
6
|
-
import { u as y } from "../vendors/useLocale.js";
|
|
7
|
-
import { a as N } from "../vendors/services/ncorp/department.service.js";
|
|
8
|
-
import { useRequest as b } from "ahooks";
|
|
9
|
-
import { useMemo as x } from "react";
|
|
10
|
-
import { buildDeptTree as D } from "./utils/index.js";
|
|
11
|
-
import { Spin as w } from "antd";
|
|
12
|
-
function v(o, c) {
|
|
13
|
-
const l = "bsy_dept_member";
|
|
14
|
-
try {
|
|
15
|
-
const t = sessionStorage.getItem(l), r = t ? JSON.parse(t) : [];
|
|
16
|
-
if (r.some((i) => i._id === o))
|
|
17
|
-
return;
|
|
18
|
-
const s = c.find((i) => i._id === o);
|
|
19
|
-
if (!s) {
|
|
20
|
-
console.warn(`未找到 id 为 ${o} 的节点信息`);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
r.push(s), sessionStorage.setItem(l, JSON.stringify(r));
|
|
24
|
-
} catch (t) {
|
|
25
|
-
console.error("记录选中节点时发生错误:", t);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const a = {
|
|
29
|
-
"relation-ship-depts__icon": "_relation-ship-depts__icon_b3fo8_1",
|
|
30
|
-
"relation-ship-depts__arrow-icon": "_relation-ship-depts__arrow-icon_b3fo8_5",
|
|
31
|
-
"rotate-90": "_rotate-90_b3fo8_10",
|
|
32
|
-
"relation-ship-depts__empty": "_relation-ship-depts__empty_b3fo8_13"
|
|
33
|
-
}, M = (o) => {
|
|
34
|
-
const { containerHeight: c } = S(), { t: l } = y(), { data: t, loading: r } = b(() => N({ hasDock: !0 }), {
|
|
35
|
-
onSuccess: (e) => {
|
|
36
|
-
e.departments && o.onSelect(e.departments[0]._id, e.departments[0]);
|
|
37
|
-
}
|
|
38
|
-
}), p = t?.departments || [], s = x(() => t?.departments?.length ? D(t.departments) : [], [t?.departments]), i = s?.map((e) => e._id), m = (e, _) => {
|
|
39
|
-
v(e, p), o.onSelect(e, _);
|
|
40
|
-
};
|
|
41
|
-
return /* @__PURE__ */ n(w, { spinning: r, children: /* @__PURE__ */ h(
|
|
42
|
-
f,
|
|
43
|
-
{
|
|
44
|
-
className: a["relation-ship-depts"],
|
|
45
|
-
style: { height: c - 8 },
|
|
46
|
-
scrollableNodeProps: { style: { overflowX: "auto", overflowY: "auto" } },
|
|
47
|
-
children: [
|
|
48
|
-
s.length > 0 && /* @__PURE__ */ n(
|
|
49
|
-
u,
|
|
50
|
-
{
|
|
51
|
-
parentCheckable: !0,
|
|
52
|
-
data: s,
|
|
53
|
-
fieldNames: {
|
|
54
|
-
title: "name",
|
|
55
|
-
value: "_id",
|
|
56
|
-
children: "children"
|
|
57
|
-
},
|
|
58
|
-
selectedKeys: o.value ? [o.value] : [],
|
|
59
|
-
onSelect: m,
|
|
60
|
-
defaultExpandedKeys: i,
|
|
61
|
-
icon: () => /* @__PURE__ */ n(d, { name: "dept-one", className: a["relation-ship-depts__icon"] }),
|
|
62
|
-
switcherIcon: (e) => /* @__PURE__ */ n(
|
|
63
|
-
d,
|
|
64
|
-
{
|
|
65
|
-
name: "xiangxiazhankai-11",
|
|
66
|
-
className: g(a["relation-ship-depts__arrow-icon"], {
|
|
67
|
-
[a["rotate-90"]]: e
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
),
|
|
73
|
-
p.length === 0 && !r && /* @__PURE__ */ n(
|
|
74
|
-
"div",
|
|
75
|
-
{
|
|
76
|
-
className: a["relation-ship-depts__empty"],
|
|
77
|
-
style: { height: c - 8 + "px" },
|
|
78
|
-
children: /* @__PURE__ */ n("span", { children: l("department.noAvailable") })
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
) });
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
M as R,
|
|
87
|
-
v as r
|
|
88
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createContext as t, useContext as s } from "react";
|
|
2
|
-
import { n as e } from "../vendors/lodash-es.js";
|
|
3
|
-
const o = t({
|
|
4
|
-
type: "user",
|
|
5
|
-
setValue: e,
|
|
6
|
-
dispatch: e,
|
|
7
|
-
containerHeight: 0,
|
|
8
|
-
auth: { publicPermissionEnable: !1, managerPermissionEnable: !1 }
|
|
9
|
-
}), r = () => s(o);
|
|
10
|
-
export {
|
|
11
|
-
o as D,
|
|
12
|
-
r as u
|
|
13
|
-
};
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as b, useRef as v, useImperativeHandle as m } from "react";
|
|
3
|
-
import { A } from "../BubbleChart/AutoGridEChart-BlLcIZ_T.js";
|
|
4
|
-
const S = (t, c) => {
|
|
5
|
-
const d = v(null), f = (i) => {
|
|
6
|
-
const n = {
|
|
7
|
-
index0: [],
|
|
8
|
-
// 所有系列的第一个数据(data[0])
|
|
9
|
-
index1: []
|
|
10
|
-
// 所有系列的第二个数据(data[1])
|
|
11
|
-
};
|
|
12
|
-
return i.forEach((e) => {
|
|
13
|
-
n.index0.push(e.data[0]), n.index1.push(e.data[1]);
|
|
14
|
-
}), n;
|
|
15
|
-
}, r = (i) => {
|
|
16
|
-
const n = Math.max(...i), e = Math.min(...i), o = (i.reduce((a, h) => a + h, 0) / i.length).toFixed(2);
|
|
17
|
-
return { max: n, min: e, avg: Number(o) };
|
|
18
|
-
}, x = f(t.dataList), l = r(x.index0), s = r(x.index1), g = t.options.xFields[t.options.xFields.length - 1].colors || [], u = {
|
|
19
|
-
xAxis: {
|
|
20
|
-
axisLabel: {
|
|
21
|
-
color: "#666666",
|
|
22
|
-
fontSize: 10,
|
|
23
|
-
show: !0,
|
|
24
|
-
rotate: t.options.xAxis?.label?.rotation?.toString() || "45"
|
|
25
|
-
// 文字顺时针旋转 90°(完全竖向)
|
|
26
|
-
},
|
|
27
|
-
min: t.options.xAxis?.min || void 0,
|
|
28
|
-
// 固定X轴最小值
|
|
29
|
-
max: t.options.xAxis?.max || void 0,
|
|
30
|
-
// 固定X轴最大值
|
|
31
|
-
title: t.options.xAxis?.title?.text || "",
|
|
32
|
-
position: t.options.xAxis?.position
|
|
33
|
-
},
|
|
34
|
-
yAxis: {
|
|
35
|
-
axisLabel: {
|
|
36
|
-
color: "#666666",
|
|
37
|
-
fontSize: 10,
|
|
38
|
-
show: !0,
|
|
39
|
-
rotate: t.options.yAxis?.label?.rotation?.toString() || "45"
|
|
40
|
-
// 文字顺时针旋转 90°(完全竖向)
|
|
41
|
-
},
|
|
42
|
-
min: t.options.yAxis?.min || void 0,
|
|
43
|
-
// 固定X轴最小值
|
|
44
|
-
max: t.options.yAxis?.max || void 0,
|
|
45
|
-
// 固定X轴最大值
|
|
46
|
-
title: t.options.yAxis?.title?.text,
|
|
47
|
-
position: t.options.yAxis?.position
|
|
48
|
-
},
|
|
49
|
-
tooltip: {
|
|
50
|
-
trigger: "item",
|
|
51
|
-
// 触发方式:axis(坐标轴触发)/ item(数据项触发)/ none(不触发)
|
|
52
|
-
axisPointer: {
|
|
53
|
-
// 坐标轴指示器(仅 trigger: 'axis' 时生效)
|
|
54
|
-
type: "shadow"
|
|
55
|
-
// 指示器类型:line(直线)/ shadow(阴影)/ cross(十字线)
|
|
56
|
-
},
|
|
57
|
-
textStyle: {
|
|
58
|
-
// 提示框文本样式
|
|
59
|
-
fontSize: 14,
|
|
60
|
-
color: "#333"
|
|
61
|
-
},
|
|
62
|
-
backgroundColor: "#fff",
|
|
63
|
-
// 背景色(支持透明)
|
|
64
|
-
borderColor: "#fff",
|
|
65
|
-
// 边框颜色
|
|
66
|
-
borderWidth: 1,
|
|
67
|
-
// 边框宽度
|
|
68
|
-
padding: 10,
|
|
69
|
-
// 内边距(上下左右)
|
|
70
|
-
borderRadius: 4,
|
|
71
|
-
// 圆角半径
|
|
72
|
-
formatter: (i) => {
|
|
73
|
-
let n = `<div>${i.seriesName}</div>`;
|
|
74
|
-
return n += `<div><span>${t.options.xFields[0].title}:</span><span>${i.value[0]}</span></div>`, n += `<div><span>${t.options.yFields[0].title}:</span><span>${i.value[1]}</span></div>`, i.componentType === "series" ? n : "";
|
|
75
|
-
},
|
|
76
|
-
triggerOn: "mousemove",
|
|
77
|
-
// 触发时机:mousemove(鼠标移动)/ click(点击)/ mousemove|click(两者)
|
|
78
|
-
showDelay: 0,
|
|
79
|
-
// 显示延迟(ms),默认0
|
|
80
|
-
hideDelay: 100,
|
|
81
|
-
// 隐藏延迟(ms),默认100
|
|
82
|
-
enterable: !1
|
|
83
|
-
// 是否允许鼠标进入提示框(默认false,防止触发其他交互)
|
|
84
|
-
},
|
|
85
|
-
legend: {
|
|
86
|
-
show: t.options.legend.enable,
|
|
87
|
-
orient: ["left", "right"].includes(t.options.legend.position) ? "vertical" : "horizontal",
|
|
88
|
-
// 纵向布局
|
|
89
|
-
left: ["left", "right"].includes(t.options.legend.position) && t.options.legend.position || "center",
|
|
90
|
-
// 居右
|
|
91
|
-
top: ["top", "bottom"].includes(t.options.legend.position) && t.options.legend.position || "middle",
|
|
92
|
-
// 垂直居中
|
|
93
|
-
itemGap: 10,
|
|
94
|
-
// 图例项间距 20px
|
|
95
|
-
bottom: 0,
|
|
96
|
-
padding: 10,
|
|
97
|
-
itemWidth: 12,
|
|
98
|
-
itemHeight: 14,
|
|
99
|
-
textStyle: {
|
|
100
|
-
fontStyle: "normal"
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
graphic: t.options.guideline?.map((i) => ({
|
|
104
|
-
type: "line",
|
|
105
|
-
// 类型:线
|
|
106
|
-
shape: {
|
|
107
|
-
x1: 1,
|
|
108
|
-
y1: 8,
|
|
109
|
-
// 起点(X=0,Y=50)
|
|
110
|
-
x2: 2,
|
|
111
|
-
y2: 8
|
|
112
|
-
// 终点(X=100,Y=50)→ 水平
|
|
113
|
-
},
|
|
114
|
-
style: {
|
|
115
|
-
stroke: i.color,
|
|
116
|
-
// 线条颜色
|
|
117
|
-
lineWidth: 2
|
|
118
|
-
// 线条宽度
|
|
119
|
-
}
|
|
120
|
-
})),
|
|
121
|
-
series: t.dataList.map((i, n) => ({
|
|
122
|
-
symbolSize: 10,
|
|
123
|
-
//散点大小
|
|
124
|
-
data: [i.data],
|
|
125
|
-
name: i.name,
|
|
126
|
-
markLine: {
|
|
127
|
-
// 1. 标记线整体样式
|
|
128
|
-
symbol: ["none", "none"],
|
|
129
|
-
// 起点/终点标记图形(默认有箭头,none 隐藏)
|
|
130
|
-
lineStyle: {
|
|
131
|
-
// 线的样式
|
|
132
|
-
width: 1,
|
|
133
|
-
type: "dashed"
|
|
134
|
-
// solid/dashed/dotted
|
|
135
|
-
},
|
|
136
|
-
// 2. 标记线的数据(关键)
|
|
137
|
-
data: n === 0 && t.options.guideline?.map((e) => {
|
|
138
|
-
const o = {
|
|
139
|
-
lineStyle: {
|
|
140
|
-
// 线的样式
|
|
141
|
-
color: e.color,
|
|
142
|
-
width: 1,
|
|
143
|
-
type: "dashed"
|
|
144
|
-
// solid/dashed/dotted
|
|
145
|
-
},
|
|
146
|
-
label: {
|
|
147
|
-
show: !0,
|
|
148
|
-
position: "insideEndTop",
|
|
149
|
-
// 标签位置:insideStartTop/insideEndTop/insideStartBottom/insideEndBottom
|
|
150
|
-
formatter: (a) => {
|
|
151
|
-
if (e.is_label_visible && e.is_value_visible)
|
|
152
|
-
return e.label + ":" + a.value;
|
|
153
|
-
if (e.is_label_visible)
|
|
154
|
-
return e.label;
|
|
155
|
-
if (e.is_value_visible)
|
|
156
|
-
return a.value;
|
|
157
|
-
},
|
|
158
|
-
// 格式化文本({b}名称,{c}数值)
|
|
159
|
-
fontSize: 12,
|
|
160
|
-
color: e.color
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
return e.type === "fixed" && (e.field === t.options.xFields[0].tag && (o.xAxis = e.value || 0), e.field === t.options.yFields[0].tag && (o.yAxis = e.value || 0)), e.type === "dynamic" && (e.field === t.options.xFields[0].tag && (e.aggregate === "max" && (o.xAxis = l.max), e.aggregate === "min" && (o.xAxis = l.min), e.aggregate === "avg" && (o.xAxis = l.avg)), e.field === t.options.yFields[0].tag && (e.aggregate === "max" && (o.yAxis = s.max), e.aggregate === "min" && (o.yAxis = s.min), e.aggregate === "avg" && (o.yAxis = s.avg)), o.type = e.aggregate), o;
|
|
164
|
-
})
|
|
165
|
-
},
|
|
166
|
-
color: g.find((e) => e.title === i.name) ? g.find((e) => e.title === i.name).color : "",
|
|
167
|
-
label: {
|
|
168
|
-
show: t.options.chart_label.enable,
|
|
169
|
-
position: "top",
|
|
170
|
-
// 文本在散点上方
|
|
171
|
-
distance: 5,
|
|
172
|
-
// 与散点的距离(避免紧贴)
|
|
173
|
-
formatter: () => `${t.options.chart_label.dimension?.enable ? i.name : ""} ${t.options.chart_label.value?.enable ? "(" + i.data[0] + "," + i.data[1] + ")" : ""}`,
|
|
174
|
-
textStyle: {
|
|
175
|
-
fontSize: 11,
|
|
176
|
-
color: "#666",
|
|
177
|
-
fontWeight: 500
|
|
178
|
-
// 加粗
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
type: "scatter"
|
|
182
|
-
}))
|
|
183
|
-
};
|
|
184
|
-
return m(c, () => ({
|
|
185
|
-
resizeEchart: () => {
|
|
186
|
-
d.current.resizeEchart();
|
|
187
|
-
}
|
|
188
|
-
})), /* @__PURE__ */ y(
|
|
189
|
-
A,
|
|
190
|
-
{
|
|
191
|
-
ref: d,
|
|
192
|
-
option: u,
|
|
193
|
-
options: t.options,
|
|
194
|
-
dataList: t.dataList,
|
|
195
|
-
onChartReady: t.onChartReady,
|
|
196
|
-
onChartClick: t.onChartClick
|
|
197
|
-
}
|
|
198
|
-
);
|
|
199
|
-
}, z = b(S);
|
|
200
|
-
export {
|
|
201
|
-
z as S
|
|
202
|
-
};
|