@yuku123/z-team-component 0.2.41 → 0.2.44
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/{ComponentDoc-BztX6VlY.js → ComponentDoc-DWnW6JUe.js} +2 -2
- package/dist/{InvitationManagementPage-Bs9EVx4Z.js → InvitationManagementPage-B0b0PQD2.js} +1 -1
- package/dist/{OnboardingPage-b3GCxnH7.js → OnboardingPage-Ddb_NzR_.js} +2 -2
- package/dist/{SystemShell-j8IxtHjS.js → SystemShell-BUcxfXI4.js} +1 -1
- package/dist/{api-CBB4Fa8N.js → api-C0GU_eBD.js} +1 -1
- package/dist/{index-ClibxgPN.js → index-B_BXiKYP.js} +2 -2
- package/dist/{index-DyJp2kSb.js → index-BfRlRsfj.js} +1 -1
- package/dist/{index-D-xqQriS.js → index-CN68mjC6.js} +2 -2
- package/dist/{index-BapG4vu3.js → index-CmzNxi0H.js} +1 -1
- package/dist/{index-D-wT2z-O.js → index-Co4c3HUe.js} +2 -2
- package/dist/{index-ClJQ9FRS.js → index-DXyOudOi.js} +2 -2
- package/dist/{index-Cx9Yfc6I.js → index-QX_VEngE.js} +472 -466
- package/dist/{index-t109_mPP.js → index-c0IQjzQE.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/pages.js +1 -1
- package/dist/{webide-CTvdgMFE.js → webide-qCE8lM1s.js} +199 -197
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, jsxs as m, Fragment as ct } from "react/jsx-runtime";
|
|
2
2
|
import { MessageOutlined as Rt, CloseOutlined as dn, FileTextOutlined as tn, BarsOutlined as ga, ShareAltOutlined as _a, StarFilled as ir, StarOutlined as lr, PlusOutlined as ft, DeleteOutlined as Ut, LinkOutlined as Cn, InboxOutlined as kn, MoreOutlined as cr, CalendarOutlined as Gn, FolderOutlined as Sn, UserOutlined as Mt, HolderOutlined as dr, TeamOutlined as nn, ClockCircleOutlined as qn, CheckSquareOutlined as Nn, EditOutlined as ba, FolderAddOutlined as fn, FileAddOutlined as hn, UnorderedListOutlined as Kn, BoldOutlined as ur, ItalicOutlined as mr, StrikethroughOutlined as pr, OrderedListOutlined as fr, CodeOutlined as hr, ConsoleSqlOutlined as yr, PictureOutlined as gr, TableOutlined as _r, InfoCircleOutlined as br, DownloadOutlined as vr, ApartmentOutlined as Cr, SaveOutlined as Sr, DownOutlined as Nr } from "@ant-design/icons";
|
|
3
3
|
import { Modal as Ge, Input as Pe, Select as Ue, DatePicker as $n, message as H, Button as ke, Spin as Et, Segmented as Dn, Tooltip as rt, Drawer as Ir, Tag as Vn, Checkbox as an, Dropdown as Ot, Popconfirm as wr, Empty as ot, Tree as Tr, Radio as yn, TreeSelect as xr } from "antd";
|
|
4
|
-
import kr, { useState as
|
|
4
|
+
import kr, { useState as v, useEffect as he, useMemo as ue, useRef as Ie, useCallback as V, Fragment as gn } from "react";
|
|
5
5
|
import $r from "react-markdown";
|
|
6
6
|
import Dr from "rehype-highlight";
|
|
7
7
|
import Lr from "remark-gfm";
|
|
@@ -198,15 +198,15 @@ function wt(e) {
|
|
|
198
198
|
c = d.split(",");
|
|
199
199
|
}
|
|
200
200
|
if (c) {
|
|
201
|
-
const g = c.map((
|
|
201
|
+
const g = c.map((_) => String(_ ?? "").trim()).filter(Boolean);
|
|
202
202
|
if (g.length > 0) return Array.from(new Set(g));
|
|
203
203
|
}
|
|
204
204
|
const u = e.assigneeUserId == null ? "" : String(e.assigneeUserId);
|
|
205
205
|
return u.trim() ? [u.trim()] : [];
|
|
206
206
|
}, s = (d) => {
|
|
207
207
|
const c = e.assignees, u = Array.isArray(c) ? c.map((g) => {
|
|
208
|
-
const
|
|
209
|
-
return h ? { userId: h, name: String(
|
|
208
|
+
const _ = g ?? {}, h = String(_.userId ?? "").trim();
|
|
209
|
+
return h ? { userId: h, name: String(_.name ?? "").trim() || h } : null;
|
|
210
210
|
}).filter((g) => g != null) : [];
|
|
211
211
|
return u.length > 0 ? u : d.map((g) => ({ userId: g, name: g }));
|
|
212
212
|
}, i = r();
|
|
@@ -593,7 +593,7 @@ function El({
|
|
|
593
593
|
onCancel: d,
|
|
594
594
|
onCreated: c
|
|
595
595
|
}) {
|
|
596
|
-
const [u, g] =
|
|
596
|
+
const [u, g] = v(""), [_, h] = v(""), [C, x] = v(Ke), [b, O] = v("MEDIUM"), [F, G] = v(null), [k, P] = v([]), [Y, ce] = v([]), [de, fe] = v(!1);
|
|
597
597
|
he(() => {
|
|
598
598
|
e && (g(""), h(""), x(i.projectId ?? (r == null ? void 0 : r.id) ?? Ke), O(i.priority ?? "MEDIUM"), G(null), P(i.assigneeUserIds ?? []), ce([]));
|
|
599
599
|
}, [e]);
|
|
@@ -659,8 +659,8 @@ function El({
|
|
|
659
659
|
const I = await On(
|
|
660
660
|
{
|
|
661
661
|
title: q,
|
|
662
|
-
detail:
|
|
663
|
-
priority:
|
|
662
|
+
detail: _.trim() || void 0,
|
|
663
|
+
priority: b,
|
|
664
664
|
dueDate: F ? F.format("YYYY-MM-DD") : void 0,
|
|
665
665
|
projectId: it(C) ? C : void 0,
|
|
666
666
|
assigneeUserIds: k,
|
|
@@ -706,7 +706,7 @@ function El({
|
|
|
706
706
|
{
|
|
707
707
|
rows: 3,
|
|
708
708
|
placeholder: "补充描述(可选)",
|
|
709
|
-
value:
|
|
709
|
+
value: _,
|
|
710
710
|
onChange: (q) => h(q.target.value)
|
|
711
711
|
}
|
|
712
712
|
),
|
|
@@ -734,7 +734,7 @@ function El({
|
|
|
734
734
|
{
|
|
735
735
|
className: o.addModalPriority,
|
|
736
736
|
dropdownClassName: o.addModalDropdown,
|
|
737
|
-
value:
|
|
737
|
+
value: b,
|
|
738
738
|
onChange: (q) => O(q),
|
|
739
739
|
options: [
|
|
740
740
|
{ value: "HIGH", label: "高优先级" },
|
|
@@ -796,11 +796,11 @@ function zl({
|
|
|
796
796
|
onCancel: n,
|
|
797
797
|
onSubmit: r
|
|
798
798
|
}) {
|
|
799
|
-
const [s, i] =
|
|
799
|
+
const [s, i] = v(Ct), [d, c] = v(""), [u, g] = v(""), [_, h] = v(!1);
|
|
800
800
|
if (he(() => {
|
|
801
801
|
e && (e.mode === "rename" ? g(e.label) : (i(Ct), c(""), g("")));
|
|
802
802
|
}, [e]), !e) return null;
|
|
803
|
-
const C = e.mode === "rename", x = new Set(t.map((k) => String(k.status))),
|
|
803
|
+
const C = e.mode === "rename", x = new Set(t.map((k) => String(k.status))), b = Pl.filter(
|
|
804
804
|
(k) => !x.has(k.status)
|
|
805
805
|
).map((k) => ({ value: k.status, label: `内置状态:${k.label}` })), O = u.trim() || d.trim(), F = async () => {
|
|
806
806
|
if (e.mode === "rename") {
|
|
@@ -836,7 +836,7 @@ function zl({
|
|
|
836
836
|
title: C ? "重命名列" : "新增看板列",
|
|
837
837
|
okText: C ? "保存" : "新增",
|
|
838
838
|
cancelText: "取消",
|
|
839
|
-
okButtonProps: { disabled: G, loading:
|
|
839
|
+
okButtonProps: { disabled: G, loading: _ },
|
|
840
840
|
onOk: () => {
|
|
841
841
|
F();
|
|
842
842
|
},
|
|
@@ -853,7 +853,7 @@ function zl({
|
|
|
853
853
|
onChange: (k) => i(k),
|
|
854
854
|
options: [
|
|
855
855
|
{ value: Ct, label: "+ 新建自定义状态" },
|
|
856
|
-
...
|
|
856
|
+
...b
|
|
857
857
|
]
|
|
858
858
|
}
|
|
859
859
|
)
|
|
@@ -906,9 +906,9 @@ function jl({
|
|
|
906
906
|
token: r,
|
|
907
907
|
onPatchLinks: s
|
|
908
908
|
}) {
|
|
909
|
-
const [i, d] =
|
|
909
|
+
const [i, d] = v(!1), [c, u] = v(e.title), [g, _] = v(!1), h = async () => {
|
|
910
910
|
const C = c.trim() || e.title;
|
|
911
|
-
|
|
911
|
+
_(!0);
|
|
912
912
|
try {
|
|
913
913
|
const x = await Or(
|
|
914
914
|
{
|
|
@@ -933,7 +933,7 @@ function jl({
|
|
|
933
933
|
(x == null ? void 0 : x.userMessage) ?? "创建群聊失败"
|
|
934
934
|
);
|
|
935
935
|
} finally {
|
|
936
|
-
|
|
936
|
+
_(!1);
|
|
937
937
|
}
|
|
938
938
|
};
|
|
939
939
|
return /* @__PURE__ */ m(ct, { children: [
|
|
@@ -950,10 +950,10 @@ function jl({
|
|
|
950
950
|
options: n,
|
|
951
951
|
value: null,
|
|
952
952
|
onChange: (C) => {
|
|
953
|
-
const x = n.find((
|
|
953
|
+
const x = n.find((b) => b.value === C);
|
|
954
954
|
if (x) {
|
|
955
955
|
if (e.links.some(
|
|
956
|
-
(
|
|
956
|
+
(b) => b.type === "project" && be(b.id, C)
|
|
957
957
|
)) {
|
|
958
958
|
H.info("该群聊已关联");
|
|
959
959
|
return;
|
|
@@ -1000,8 +1000,8 @@ function jl({
|
|
|
1000
1000
|
dn,
|
|
1001
1001
|
{
|
|
1002
1002
|
className: o.detailChatListItemRemove,
|
|
1003
|
-
onClick: (
|
|
1004
|
-
|
|
1003
|
+
onClick: (b) => {
|
|
1004
|
+
b.stopPropagation(), s(cc(e.links, x));
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
)
|
|
@@ -1060,7 +1060,7 @@ function Hl({
|
|
|
1060
1060
|
onRemoveNote: s,
|
|
1061
1061
|
onEditorOpenChange: i
|
|
1062
1062
|
}) {
|
|
1063
|
-
const [d, c] =
|
|
1063
|
+
const [d, c] = v(null), [u, g] = v(!1), [_, h] = v(""), [C, x] = v(""), [b, O] = v(!1), [F, G] = v(!1), [k, P] = v("idle"), [Y, ce] = v("live"), [de, fe] = v(!1), [le, J] = v(!1), [ee, ie] = v(!1), [z, q] = v(!1), [te, I] = v(!1), f = Ie(null), U = Ie(null), ne = Ie(null), ye = Ie(""), L = Ie("");
|
|
1064
1064
|
he(() => {
|
|
1065
1065
|
ne.current = d;
|
|
1066
1066
|
}, [d]), he(() => {
|
|
@@ -1069,7 +1069,7 @@ function Hl({
|
|
|
1069
1069
|
const Q = V(
|
|
1070
1070
|
async (W = !1) => {
|
|
1071
1071
|
const _e = ne.current;
|
|
1072
|
-
if (!(!_e ||
|
|
1072
|
+
if (!(!_e || b || !F && !W)) {
|
|
1073
1073
|
P("saving");
|
|
1074
1074
|
try {
|
|
1075
1075
|
await In(
|
|
@@ -1084,12 +1084,12 @@ function Hl({
|
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
1086
1086
|
},
|
|
1087
|
-
[
|
|
1087
|
+
[b, F, n]
|
|
1088
1088
|
), S = V(() => {
|
|
1089
|
-
|
|
1089
|
+
b || (G(!0), P("unsaved"), U.current && clearTimeout(U.current), U.current = setTimeout(() => {
|
|
1090
1090
|
Q();
|
|
1091
1091
|
}, 2e3));
|
|
1092
|
-
}, [
|
|
1092
|
+
}, [b, Q]), p = V(async () => {
|
|
1093
1093
|
U.current && (clearTimeout(U.current), U.current = null), await Q(!0);
|
|
1094
1094
|
}, [Q]), R = V(
|
|
1095
1095
|
async (W) => {
|
|
@@ -1111,21 +1111,21 @@ function Hl({
|
|
|
1111
1111
|
},
|
|
1112
1112
|
[n]
|
|
1113
1113
|
), w = V(async () => {
|
|
1114
|
-
F && !
|
|
1115
|
-
}, [F,
|
|
1114
|
+
F && !b && await p(), c(null), ne.current = null, I(!1), g(!1), G(!1), P("idle");
|
|
1115
|
+
}, [F, b, p]), se = V(
|
|
1116
1116
|
async (W) => {
|
|
1117
1117
|
if (be(d, W) && (te || u)) {
|
|
1118
1118
|
await w();
|
|
1119
1119
|
return;
|
|
1120
1120
|
}
|
|
1121
|
-
d && !be(d, W) && F && !
|
|
1121
|
+
d && !be(d, W) && F && !b && await p(), await R(W);
|
|
1122
1122
|
},
|
|
1123
1123
|
[
|
|
1124
1124
|
d,
|
|
1125
1125
|
te,
|
|
1126
1126
|
u,
|
|
1127
1127
|
F,
|
|
1128
|
-
|
|
1128
|
+
b,
|
|
1129
1129
|
p,
|
|
1130
1130
|
R,
|
|
1131
1131
|
w
|
|
@@ -1254,8 +1254,8 @@ function Hl({
|
|
|
1254
1254
|
"input",
|
|
1255
1255
|
{
|
|
1256
1256
|
className: o.detailNoteTitleInput,
|
|
1257
|
-
value:
|
|
1258
|
-
disabled:
|
|
1257
|
+
value: _,
|
|
1258
|
+
disabled: b,
|
|
1259
1259
|
placeholder: "文档标题",
|
|
1260
1260
|
onChange: (W) => {
|
|
1261
1261
|
const _e = W.target.value;
|
|
@@ -1263,7 +1263,7 @@ function Hl({
|
|
|
1263
1263
|
}
|
|
1264
1264
|
}
|
|
1265
1265
|
),
|
|
1266
|
-
!
|
|
1266
|
+
!b && /* @__PURE__ */ a(
|
|
1267
1267
|
Dn,
|
|
1268
1268
|
{
|
|
1269
1269
|
size: "small",
|
|
@@ -1294,7 +1294,7 @@ function Hl({
|
|
|
1294
1294
|
onClick: () => void Se()
|
|
1295
1295
|
}
|
|
1296
1296
|
) }),
|
|
1297
|
-
!
|
|
1297
|
+
!b && /* @__PURE__ */ a(
|
|
1298
1298
|
ke,
|
|
1299
1299
|
{
|
|
1300
1300
|
size: "small",
|
|
@@ -1304,7 +1304,7 @@ function Hl({
|
|
|
1304
1304
|
children: ee ? "已收藏" : "收藏"
|
|
1305
1305
|
}
|
|
1306
1306
|
),
|
|
1307
|
-
!
|
|
1307
|
+
!b && /* @__PURE__ */ a(
|
|
1308
1308
|
ke,
|
|
1309
1309
|
{
|
|
1310
1310
|
size: "small",
|
|
@@ -1314,7 +1314,7 @@ function Hl({
|
|
|
1314
1314
|
children: "保存"
|
|
1315
1315
|
}
|
|
1316
1316
|
),
|
|
1317
|
-
|
|
1317
|
+
b && /* @__PURE__ */ a("span", { className: o.detailNoteReadOnlyTag, children: "只读" })
|
|
1318
1318
|
] }),
|
|
1319
1319
|
/* @__PURE__ */ m("div", { className: o.detailNoteEditorBody, children: [
|
|
1320
1320
|
/* @__PURE__ */ a(
|
|
@@ -1323,7 +1323,7 @@ function Hl({
|
|
|
1323
1323
|
ref: f,
|
|
1324
1324
|
mode: Y,
|
|
1325
1325
|
value: C,
|
|
1326
|
-
readOnly:
|
|
1326
|
+
readOnly: b,
|
|
1327
1327
|
onChange: (W) => {
|
|
1328
1328
|
x(W), L.current = W, S();
|
|
1329
1329
|
},
|
|
@@ -1364,7 +1364,7 @@ function Gl({
|
|
|
1364
1364
|
onClose: d,
|
|
1365
1365
|
onChanged: c
|
|
1366
1366
|
}) {
|
|
1367
|
-
const [u, g] =
|
|
1367
|
+
const [u, g] = v(e.title), [_, h] = v(e.detail ?? ""), [C, x] = v(!1), [b, O] = v(""), [F, G] = v([]), [k, P] = v([]), [Y, ce] = v([]), [de, fe] = v(!1), [le, J] = v(!1), ee = e.projectId != null ? n.byId.get(e.projectId) : void 0;
|
|
1368
1368
|
he(() => {
|
|
1369
1369
|
fe(!1), J(!1);
|
|
1370
1370
|
}, [e.id]), he(() => {
|
|
@@ -1399,8 +1399,8 @@ function Gl({
|
|
|
1399
1399
|
(N) => ie({ links: N }),
|
|
1400
1400
|
[ie]
|
|
1401
1401
|
), q = V(async () => {
|
|
1402
|
-
x(!0), await ie({ detail:
|
|
1403
|
-
}, [ie,
|
|
1402
|
+
x(!0), await ie({ detail: _ }), x(!1);
|
|
1403
|
+
}, [ie, _]), te = async (N) => {
|
|
1404
1404
|
try {
|
|
1405
1405
|
N === "DONE" && e.status !== "DONE" ? await wn(e.id, "", s) : await sn(
|
|
1406
1406
|
e.id,
|
|
@@ -1416,7 +1416,7 @@ function Gl({
|
|
|
1416
1416
|
() => t.filter((N) => be(N.parentId, e.id)),
|
|
1417
1417
|
[t, e.id]
|
|
1418
1418
|
), f = async () => {
|
|
1419
|
-
const N =
|
|
1419
|
+
const N = b.trim();
|
|
1420
1420
|
if (N)
|
|
1421
1421
|
try {
|
|
1422
1422
|
await On(
|
|
@@ -1691,7 +1691,7 @@ function Gl({
|
|
|
1691
1691
|
className: o.detailFullWidth,
|
|
1692
1692
|
placeholder: "子事项 回车",
|
|
1693
1693
|
prefix: /* @__PURE__ */ a(ft, { className: o.detailInputPrefix }),
|
|
1694
|
-
value:
|
|
1694
|
+
value: b,
|
|
1695
1695
|
onChange: (N) => O(N.target.value),
|
|
1696
1696
|
onPressEnter: f
|
|
1697
1697
|
}
|
|
@@ -1758,7 +1758,7 @@ function Gl({
|
|
|
1758
1758
|
wa,
|
|
1759
1759
|
{
|
|
1760
1760
|
mode: "live",
|
|
1761
|
-
value:
|
|
1761
|
+
value: _,
|
|
1762
1762
|
onChange: h,
|
|
1763
1763
|
onUploadImage: Ln,
|
|
1764
1764
|
onSave: q,
|
|
@@ -1766,7 +1766,7 @@ function Gl({
|
|
|
1766
1766
|
},
|
|
1767
1767
|
e.id
|
|
1768
1768
|
) }),
|
|
1769
|
-
|
|
1769
|
+
_ !== (e.detail ?? "") && /* @__PURE__ */ a(
|
|
1770
1770
|
ke,
|
|
1771
1771
|
{
|
|
1772
1772
|
size: "small",
|
|
@@ -1848,14 +1848,14 @@ function Kl({
|
|
|
1848
1848
|
onToggle: c,
|
|
1849
1849
|
onOpenDetail: u,
|
|
1850
1850
|
onDeleted: g,
|
|
1851
|
-
onItemDropped:
|
|
1851
|
+
onItemDropped: _,
|
|
1852
1852
|
onAddInGroup: h,
|
|
1853
1853
|
onAddColumn: C,
|
|
1854
1854
|
onRenameColumn: x,
|
|
1855
|
-
onDeleteColumn:
|
|
1855
|
+
onDeleteColumn: b,
|
|
1856
1856
|
onMoveColumn: O
|
|
1857
1857
|
}) {
|
|
1858
|
-
const [F, G] =
|
|
1858
|
+
const [F, G] = v(null), [k, P] = v(null), [Y, ce] = v(null), [de, fe] = v(null), le = ue(
|
|
1859
1859
|
() => r ? e : e.filter((L) => !L.parentId),
|
|
1860
1860
|
[e, r]
|
|
1861
1861
|
), J = ue(
|
|
@@ -1894,7 +1894,7 @@ function Kl({
|
|
|
1894
1894
|
const R = Re(p.dataTransfer.getData(gt));
|
|
1895
1895
|
if (R !== "") {
|
|
1896
1896
|
const w = p.currentTarget.getBoundingClientRect(), se = p.clientY < w.top + w.height / 2;
|
|
1897
|
-
|
|
1897
|
+
_(R, Q, se ? S : S + 1);
|
|
1898
1898
|
}
|
|
1899
1899
|
te();
|
|
1900
1900
|
}
|
|
@@ -1906,7 +1906,7 @@ function Kl({
|
|
|
1906
1906
|
if (!z(S)) return;
|
|
1907
1907
|
S.preventDefault();
|
|
1908
1908
|
const p = Re(S.dataTransfer.getData(gt));
|
|
1909
|
-
p !== "" &&
|
|
1909
|
+
p !== "" && _(p, L, (k == null ? void 0 : k.index) ?? Q), te();
|
|
1910
1910
|
}
|
|
1911
1911
|
}), ne = (L, Q, S) => {
|
|
1912
1912
|
const p = ee.map(([se]) => se), R = p.indexOf(L);
|
|
@@ -1941,7 +1941,7 @@ function Kl({
|
|
|
1941
1941
|
if (!z(S)) return;
|
|
1942
1942
|
S.preventDefault();
|
|
1943
1943
|
const p = Re(S.dataTransfer.getData(gt));
|
|
1944
|
-
p !== "" &&
|
|
1944
|
+
p !== "" && _(p, L, (k == null ? void 0 : k.index) ?? Q), te();
|
|
1945
1945
|
}
|
|
1946
1946
|
});
|
|
1947
1947
|
if (r || t === "none") {
|
|
@@ -2065,7 +2065,7 @@ function Kl({
|
|
|
2065
2065
|
{ key: "delete", label: "删除列", danger: !0 }
|
|
2066
2066
|
],
|
|
2067
2067
|
onClick: ({ key: w, domEvent: se }) => {
|
|
2068
|
-
se.stopPropagation(), w === "rename" ? x == null || x(L, R) : w === "delete" && (
|
|
2068
|
+
se.stopPropagation(), w === "rename" ? x == null || x(L, R) : w === "delete" && (b == null || b(L));
|
|
2069
2069
|
}
|
|
2070
2070
|
},
|
|
2071
2071
|
children: /* @__PURE__ */ a(
|
|
@@ -2156,15 +2156,15 @@ function _n({
|
|
|
2156
2156
|
onOpenDetail: c,
|
|
2157
2157
|
onDeleted: u,
|
|
2158
2158
|
onDragStart: g,
|
|
2159
|
-
onDragEnd:
|
|
2159
|
+
onDragEnd: _,
|
|
2160
2160
|
onDragOver: h,
|
|
2161
2161
|
onDrop: C
|
|
2162
2162
|
}) {
|
|
2163
2163
|
var le;
|
|
2164
|
-
const x = t === "card",
|
|
2164
|
+
const x = t === "card", b = e.status === "DONE", O = !b && nc(e.dueDate), F = !b && ac(e.dueDate), G = e.projectId != null ? (le = r.byId.get(e.projectId)) == null ? void 0 : le.title : null, k = e.links.find((J) => J.type === "note"), P = e.links.filter((J) => J.type === "project"), Y = Oa(e, r), ce = Y.length ? `指派给:${Y.map((J) => J.name).join("、")}` : "未指派", de = {
|
|
2165
2165
|
draggable: i,
|
|
2166
2166
|
onDragStart: i ? g : void 0,
|
|
2167
|
-
onDragEnd:
|
|
2167
|
+
onDragEnd: _,
|
|
2168
2168
|
onDragOver: h,
|
|
2169
2169
|
onDrop: C
|
|
2170
2170
|
}, fe = (J) => /* @__PURE__ */ a(
|
|
@@ -2200,7 +2200,7 @@ function _n({
|
|
|
2200
2200
|
return x ? /* @__PURE__ */ m(
|
|
2201
2201
|
"div",
|
|
2202
2202
|
{
|
|
2203
|
-
className: `${o.itemCard} ${
|
|
2203
|
+
className: `${o.itemCard} ${b ? o.itemCardDone : ""} ${s ? o.itemRowDragging : ""}`,
|
|
2204
2204
|
...de,
|
|
2205
2205
|
onClick: () => c(e.id),
|
|
2206
2206
|
role: "presentation",
|
|
@@ -2221,13 +2221,13 @@ function _n({
|
|
|
2221
2221
|
onClick: (J) => {
|
|
2222
2222
|
J.stopPropagation(), d(e);
|
|
2223
2223
|
},
|
|
2224
|
-
children: /* @__PURE__ */ a(an, { checked:
|
|
2224
|
+
children: /* @__PURE__ */ a(an, { checked: b })
|
|
2225
2225
|
}
|
|
2226
2226
|
),
|
|
2227
2227
|
/* @__PURE__ */ a(
|
|
2228
2228
|
"span",
|
|
2229
2229
|
{
|
|
2230
|
-
className: `${o.cardTitle} ${
|
|
2230
|
+
className: `${o.cardTitle} ${b ? o.cardTitleDone : ""}`,
|
|
2231
2231
|
title: e.title,
|
|
2232
2232
|
children: e.title
|
|
2233
2233
|
}
|
|
@@ -2345,7 +2345,7 @@ function _n({
|
|
|
2345
2345
|
onClick: (J) => {
|
|
2346
2346
|
J.stopPropagation(), d(e);
|
|
2347
2347
|
},
|
|
2348
|
-
children: /* @__PURE__ */ a(an, { checked:
|
|
2348
|
+
children: /* @__PURE__ */ a(an, { checked: b })
|
|
2349
2349
|
}
|
|
2350
2350
|
),
|
|
2351
2351
|
/* @__PURE__ */ a(
|
|
@@ -2359,7 +2359,7 @@ function _n({
|
|
|
2359
2359
|
/* @__PURE__ */ a(
|
|
2360
2360
|
"span",
|
|
2361
2361
|
{
|
|
2362
|
-
className: `${o.itemTitle} ${
|
|
2362
|
+
className: `${o.itemTitle} ${b ? o.itemTitleDone : ""}`,
|
|
2363
2363
|
title: e.title,
|
|
2364
2364
|
children: e.title
|
|
2365
2365
|
}
|
|
@@ -2432,7 +2432,7 @@ function Vl({
|
|
|
2432
2432
|
onClose: s,
|
|
2433
2433
|
onChanged: i
|
|
2434
2434
|
}) {
|
|
2435
|
-
const [d, c] =
|
|
2435
|
+
const [d, c] = v(""), [u, g] = v([]), [_, h] = v(!1), C = !!n && n.userId === r, x = async (k) => {
|
|
2436
2436
|
if (c(k), !k.trim()) {
|
|
2437
2437
|
g([]);
|
|
2438
2438
|
return;
|
|
@@ -2448,7 +2448,7 @@ function Vl({
|
|
|
2448
2448
|
} catch {
|
|
2449
2449
|
g([]);
|
|
2450
2450
|
}
|
|
2451
|
-
},
|
|
2451
|
+
}, b = async (k) => {
|
|
2452
2452
|
if (!n) return;
|
|
2453
2453
|
const P = u.find((Y) => Y.userId === k);
|
|
2454
2454
|
h(!0);
|
|
@@ -2522,7 +2522,7 @@ function Vl({
|
|
|
2522
2522
|
{
|
|
2523
2523
|
type: "button",
|
|
2524
2524
|
className: o.membersRemove,
|
|
2525
|
-
disabled:
|
|
2525
|
+
disabled: _,
|
|
2526
2526
|
onClick: () => O(k.userId),
|
|
2527
2527
|
children: "移除"
|
|
2528
2528
|
}
|
|
@@ -2540,8 +2540,8 @@ function Vl({
|
|
|
2540
2540
|
filterOption: !1,
|
|
2541
2541
|
value: d || void 0,
|
|
2542
2542
|
onSearch: x,
|
|
2543
|
-
onChange:
|
|
2544
|
-
disabled:
|
|
2543
|
+
onChange: b,
|
|
2544
|
+
disabled: _,
|
|
2545
2545
|
options: u.map((k) => ({
|
|
2546
2546
|
value: k.userId,
|
|
2547
2547
|
label: k.name
|
|
@@ -2572,8 +2572,8 @@ function Yl({
|
|
|
2572
2572
|
onProjectsReordered: d,
|
|
2573
2573
|
onManageMembers: c
|
|
2574
2574
|
}) {
|
|
2575
|
-
const [u, g] =
|
|
2576
|
-
const p =
|
|
2575
|
+
const [u, g] = v(!1), [_, h] = v(""), [C, x] = v(!1), [b, O] = v(null), [F, G] = v(""), [k, P] = v(!1), Y = Pt((p) => p.token), [ce, de] = v(null), [fe, le] = v(null), [J, ee] = v(null), ie = (e == null ? void 0 : e.owned) ?? [], z = (e == null ? void 0 : e.joined) ?? [], q = async () => {
|
|
2576
|
+
const p = _.trim();
|
|
2577
2577
|
if (!p) {
|
|
2578
2578
|
H.warning("请输入项目名");
|
|
2579
2579
|
return;
|
|
@@ -2616,19 +2616,19 @@ function Yl({
|
|
|
2616
2616
|
}, ye = () => {
|
|
2617
2617
|
de(null), le(null);
|
|
2618
2618
|
}, L = async () => {
|
|
2619
|
-
if (!
|
|
2619
|
+
if (!b) return;
|
|
2620
2620
|
const p = F.trim();
|
|
2621
2621
|
if (!p) {
|
|
2622
2622
|
H.warning("请输入项目名");
|
|
2623
2623
|
return;
|
|
2624
2624
|
}
|
|
2625
|
-
if (p ===
|
|
2625
|
+
if (p === b.title) {
|
|
2626
2626
|
O(null);
|
|
2627
2627
|
return;
|
|
2628
2628
|
}
|
|
2629
2629
|
P(!0);
|
|
2630
2630
|
try {
|
|
2631
|
-
await xa(
|
|
2631
|
+
await xa(b.id, { title: p }, Y), H.success("已重命名"), O(null), r();
|
|
2632
2632
|
} catch (R) {
|
|
2633
2633
|
H.error(
|
|
2634
2634
|
(R == null ? void 0 : R.userMessage) ?? "重命名失败"
|
|
@@ -2793,7 +2793,7 @@ function Yl({
|
|
|
2793
2793
|
Pe,
|
|
2794
2794
|
{
|
|
2795
2795
|
placeholder: "项目名称,如:XX版本发布跟进",
|
|
2796
|
-
value:
|
|
2796
|
+
value: _,
|
|
2797
2797
|
onChange: (p) => h(p.target.value),
|
|
2798
2798
|
onPressEnter: q,
|
|
2799
2799
|
maxLength: 128,
|
|
@@ -2808,7 +2808,7 @@ function Yl({
|
|
|
2808
2808
|
Ge,
|
|
2809
2809
|
{
|
|
2810
2810
|
title: "重命名项目",
|
|
2811
|
-
open: !!
|
|
2811
|
+
open: !!b,
|
|
2812
2812
|
width: 400,
|
|
2813
2813
|
className: o.addModal,
|
|
2814
2814
|
onCancel: () => O(null),
|
|
@@ -2884,8 +2884,8 @@ function Ma(e, t, n, r) {
|
|
|
2884
2884
|
(c) => String(c.status)
|
|
2885
2885
|
);
|
|
2886
2886
|
i.sort((c, u) => {
|
|
2887
|
-
const g = d.indexOf(c[0]),
|
|
2888
|
-
return (g < 0 ? d.length : g) - (
|
|
2887
|
+
const g = d.indexOf(c[0]), _ = d.indexOf(u[0]);
|
|
2888
|
+
return (g < 0 ? d.length : g) - (_ < 0 ? d.length : _);
|
|
2889
2889
|
});
|
|
2890
2890
|
} else if (t === "priority")
|
|
2891
2891
|
i.sort(
|
|
@@ -2929,9 +2929,9 @@ function Kp({
|
|
|
2929
2929
|
openTodoId: n
|
|
2930
2930
|
}) {
|
|
2931
2931
|
var xt;
|
|
2932
|
-
const r = Pt((T) => T.token), s = Pt((T) => T.currentUser), [i, d] =
|
|
2932
|
+
const r = Pt((T) => T.token), s = Pt((T) => T.currentUser), [i, d] = v(null), [c, u] = v([]), [g, _] = v(!0), [h, C] = v({ type: "view", key: "today" }), [x, b] = v(""), [O, F] = v(""), [G, k] = v("status"), [P, Y] = v(null), [ce, de] = v(
|
|
2933
2933
|
null
|
|
2934
|
-
), [fe, le] =
|
|
2934
|
+
), [fe, le] = v(!1), [J, ee] = v({}), [ie, z] = v(!1), [q, te] = v(0), I = Ie(!1), f = 600, U = Ie(/* @__PURE__ */ new Set()), ne = Ie(/* @__PURE__ */ new Map()), ye = V(
|
|
2935
2935
|
async (T, K) => {
|
|
2936
2936
|
const Z = { view: "all" };
|
|
2937
2937
|
T.type === "view" && (Z.view = T.key), T.type === "inbox" && (Z.projectId = Ke), T.type === "project" && (Z.projectId = T.id), K.trim() && (Z.keyword = K.trim());
|
|
@@ -2959,7 +2959,7 @@ function Kp({
|
|
|
2959
2959
|
}
|
|
2960
2960
|
}, [L, ye, Q, h, O]), p = V(
|
|
2961
2961
|
async (T = h, K = O) => {
|
|
2962
|
-
|
|
2962
|
+
_(!0);
|
|
2963
2963
|
try {
|
|
2964
2964
|
await Promise.all([
|
|
2965
2965
|
L(),
|
|
@@ -2969,7 +2969,7 @@ function Kp({
|
|
|
2969
2969
|
} catch {
|
|
2970
2970
|
H.error("加载工作待办失败");
|
|
2971
2971
|
} finally {
|
|
2972
|
-
|
|
2972
|
+
_(!1);
|
|
2973
2973
|
}
|
|
2974
2974
|
},
|
|
2975
2975
|
[h, O, L, ye, Q]
|
|
@@ -3028,7 +3028,7 @@ function Kp({
|
|
|
3028
3028
|
}
|
|
3029
3029
|
},
|
|
3030
3030
|
[w, L]
|
|
3031
|
-
), [X, Ne] =
|
|
3031
|
+
), [X, Ne] = v(null), W = async (T) => {
|
|
3032
3032
|
const K = [...Se], Z = K.findIndex((ve) => ve.status === "DONE");
|
|
3033
3033
|
Z >= 0 ? K.splice(Z, 0, T) : K.push(T), await ae(K);
|
|
3034
3034
|
}, _e = async (T, K) => {
|
|
@@ -3230,7 +3230,7 @@ function Kp({
|
|
|
3230
3230
|
allowClear: !0,
|
|
3231
3231
|
placeholder: "搜索事项标题",
|
|
3232
3232
|
value: x,
|
|
3233
|
-
onChange: (T) =>
|
|
3233
|
+
onChange: (T) => b(T.target.value)
|
|
3234
3234
|
}
|
|
3235
3235
|
)
|
|
3236
3236
|
] }),
|
|
@@ -3566,8 +3566,8 @@ function Nd(e, t, n) {
|
|
|
3566
3566
|
for (const u of d) {
|
|
3567
3567
|
const g = Sd(u, t, s);
|
|
3568
3568
|
if (u.type === "folder" || u.type === "owner") {
|
|
3569
|
-
const
|
|
3570
|
-
(g ||
|
|
3569
|
+
const _ = u.children && u.children.length > 0 ? i(u.children) : [];
|
|
3570
|
+
(g || _.length > 0) && c.push({ ...u, children: _ });
|
|
3571
3571
|
} else
|
|
3572
3572
|
g && c.push({ ...u });
|
|
3573
3573
|
}
|
|
@@ -3626,28 +3626,28 @@ function xd(e, t, n) {
|
|
|
3626
3626
|
const r = ((i = n.find((d) => d.dim === "update_time")) == null ? void 0 : i.order) === "asc";
|
|
3627
3627
|
function s(d, c, u) {
|
|
3628
3628
|
if (c.length === 0) return [];
|
|
3629
|
-
const [g, ...
|
|
3629
|
+
const [g, ..._] = c, h = /* @__PURE__ */ new Map();
|
|
3630
3630
|
for (const x of d) {
|
|
3631
|
-
const [
|
|
3632
|
-
h.has(
|
|
3631
|
+
const [b, O] = Td(x, g);
|
|
3632
|
+
h.has(b) || h.set(b, { label: O, items: [] }), h.get(b).items.push(x);
|
|
3633
3633
|
}
|
|
3634
3634
|
const C = [];
|
|
3635
|
-
for (const [x, { label:
|
|
3635
|
+
for (const [x, { label: b, items: O }] of h) {
|
|
3636
3636
|
const F = `${u}::${g}=${x}`;
|
|
3637
|
-
|
|
3637
|
+
_.length === 0 ? C.push({ key: F, label: b, nodes: O, rawKey: x }) : C.push({
|
|
3638
3638
|
key: F,
|
|
3639
|
-
label:
|
|
3639
|
+
label: b,
|
|
3640
3640
|
nodes: O,
|
|
3641
|
-
children: s(O,
|
|
3641
|
+
children: s(O, _, F),
|
|
3642
3642
|
rawKey: x
|
|
3643
3643
|
});
|
|
3644
3644
|
}
|
|
3645
|
-
return C.sort((x,
|
|
3645
|
+
return C.sort((x, b) => {
|
|
3646
3646
|
if (g === "time") {
|
|
3647
|
-
const O = x.rawKey === "(未知时间)" ? "" : x.rawKey || "", F =
|
|
3647
|
+
const O = x.rawKey === "(未知时间)" ? "" : x.rawKey || "", F = b.rawKey === "(未知时间)" ? "" : b.rawKey || "";
|
|
3648
3648
|
return !O && !F ? 0 : O ? F ? r ? O.localeCompare(F) : F.localeCompare(O) : -1 : 1;
|
|
3649
3649
|
}
|
|
3650
|
-
return
|
|
3650
|
+
return b.nodes.length - x.nodes.length;
|
|
3651
3651
|
}), C;
|
|
3652
3652
|
}
|
|
3653
3653
|
return s(e, t, "");
|
|
@@ -3787,9 +3787,9 @@ function Vp({
|
|
|
3787
3787
|
onOpenTodo: n,
|
|
3788
3788
|
openNoteId: r
|
|
3789
3789
|
}) {
|
|
3790
|
-
const s = Pt((l) => l.token) || "", [i, d] =
|
|
3790
|
+
const s = Pt((l) => l.token) || "", [i, d] = v([]), [c, u] = v(!1), [g, _] = v([]), [h, C] = v(null), [x, b] = v(
|
|
3791
3791
|
null
|
|
3792
|
-
), [O, F] =
|
|
3792
|
+
), [O, F] = v(!1), [G, k] = v([]), [P, Y] = v(null), [ce, de] = v(!1), [fe, le] = v(!1), J = V(async () => {
|
|
3793
3793
|
const [l, y] = await Promise.allSettled([
|
|
3794
3794
|
Zt({ view: "all" }, s),
|
|
3795
3795
|
Ta(s)
|
|
@@ -3803,7 +3803,7 @@ function Vp({
|
|
|
3803
3803
|
he(() => {
|
|
3804
3804
|
J();
|
|
3805
3805
|
}, [J]);
|
|
3806
|
-
const [ee, ie] =
|
|
3806
|
+
const [ee, ie] = v(hd), [z, q] = v(fd), [te, I] = v(yd), [f, U] = v(gd), [ne, ye] = v(!1), [L, Q] = v([]), [S, p] = v(null), [R, w] = v(!1), [se, Se] = v("edit"), [N, ae] = v(!1), [X, Ne] = v(280), W = ue(() => S ? oc(G, S) : [], [G, S]), _e = ue(
|
|
3807
3807
|
() => rc(P),
|
|
3808
3808
|
[P]
|
|
3809
3809
|
), we = Ie(null), Me = Ie(null), Ae = Ie(null), qe = Ie(null), Ze = Ie([]), je = Ie(null);
|
|
@@ -3812,7 +3812,7 @@ function Vp({
|
|
|
3812
3812
|
}, [L]), he(() => {
|
|
3813
3813
|
je.current = S;
|
|
3814
3814
|
}, [S]);
|
|
3815
|
-
const [Fe, et] =
|
|
3815
|
+
const [Fe, et] = v(null), [Tt, Ve] = v(""), tt = Ie(!1), [jt, xt] = v(!1), [T, K] = v(null), [Z, ve] = v(""), me = L.find((l) => be(l.id, S)) ?? null, $e = (me == null ? void 0 : me.content) ?? "", Ft = (me == null ? void 0 : me.title) ?? "", bt = (me == null ? void 0 : me.dirty) ?? !1, Je = (me == null ? void 0 : me.saveStatus) ?? "idle", De = V((l, y) => {
|
|
3816
3816
|
Q(
|
|
3817
3817
|
($) => $.map((D) => be(D.id, l) ? { ...D, ...y } : D)
|
|
3818
3818
|
);
|
|
@@ -3887,7 +3887,7 @@ function Vp({
|
|
|
3887
3887
|
);
|
|
3888
3888
|
$ != null && $.dirty && await nt();
|
|
3889
3889
|
}
|
|
3890
|
-
p(l), C(l),
|
|
3890
|
+
p(l), C(l), b(null);
|
|
3891
3891
|
return;
|
|
3892
3892
|
}
|
|
3893
3893
|
if (je.current) {
|
|
@@ -3909,7 +3909,7 @@ function Vp({
|
|
|
3909
3909
|
saveStatus: "idle",
|
|
3910
3910
|
extraInfo: $.extraInfo
|
|
3911
3911
|
}
|
|
3912
|
-
]), p(l), C(l),
|
|
3912
|
+
]), p(l), C(l), b(null), Se("edit");
|
|
3913
3913
|
} catch {
|
|
3914
3914
|
} finally {
|
|
3915
3915
|
w(!1);
|
|
@@ -3971,9 +3971,9 @@ function Vp({
|
|
|
3971
3971
|
},
|
|
3972
3972
|
s
|
|
3973
3973
|
), $ = Fe.parentId, D = Fe.type;
|
|
3974
|
-
if (et(null), Ve(""), await Le(), $ !== Ye && !g.includes($) &&
|
|
3974
|
+
if (et(null), Ve(""), await Le(), $ !== Ye && !g.includes($) && _((oe) => [...oe, $]), Fe.ownerUserId) {
|
|
3975
3975
|
const oe = `owner:${Fe.ownerUserId}`;
|
|
3976
|
-
|
|
3976
|
+
_(
|
|
3977
3977
|
(Te) => Te.includes(oe) ? Te : [...Te, oe]
|
|
3978
3978
|
);
|
|
3979
3979
|
}
|
|
@@ -4538,22 +4538,22 @@ function Vp({
|
|
|
4538
4538
|
{
|
|
4539
4539
|
treeData: vt,
|
|
4540
4540
|
expandedKeys: g,
|
|
4541
|
-
onExpand: (l) =>
|
|
4541
|
+
onExpand: (l) => _(l),
|
|
4542
4542
|
selectedKeys: h ? [h] : x ? [`owner:${x}`] : [],
|
|
4543
4543
|
onSelect: (l) => {
|
|
4544
4544
|
if (l.length === 0) return;
|
|
4545
4545
|
const y = l[0];
|
|
4546
4546
|
if (Vt(y) || St(y)) {
|
|
4547
|
-
St(y) && (
|
|
4547
|
+
St(y) && (b(aa(y) ?? null), C(null)), g.includes(y) ? _((oe) => oe.filter((Te) => Te !== y)) : _((oe) => [...oe, y]);
|
|
4548
4548
|
return;
|
|
4549
4549
|
}
|
|
4550
4550
|
const $ = Fa(vt, Re(y));
|
|
4551
4551
|
if ($ && $.type === "folder") {
|
|
4552
|
-
g.includes(y) ?
|
|
4552
|
+
g.includes(y) ? _((oe) => oe.filter((Te) => Te !== y)) : _((oe) => [...oe, y]), C(null), b(null);
|
|
4553
4553
|
return;
|
|
4554
4554
|
}
|
|
4555
4555
|
const D = Re(y);
|
|
4556
|
-
|
|
4556
|
+
b(null), D !== "" && D !== "0" && ht(D);
|
|
4557
4557
|
},
|
|
4558
4558
|
titleRender: ar,
|
|
4559
4559
|
draggable: !0,
|
|
@@ -4569,7 +4569,7 @@ function Vp({
|
|
|
4569
4569
|
{
|
|
4570
4570
|
className: `${B.tabItem} ${l.id === S ? B.tabItemActive : ""}`,
|
|
4571
4571
|
onClick: () => {
|
|
4572
|
-
p(l.id), C(l.id),
|
|
4572
|
+
p(l.id), C(l.id), b(null);
|
|
4573
4573
|
},
|
|
4574
4574
|
children: [
|
|
4575
4575
|
/* @__PURE__ */ a(
|
|
@@ -5544,24 +5544,24 @@ function lt({
|
|
|
5544
5544
|
let c = !1, u = 0;
|
|
5545
5545
|
const g = () => {
|
|
5546
5546
|
if (c || !n.current || n.current.clientWidth === 0) return;
|
|
5547
|
-
r.current || (r.current = Wr.init(n.current), r.current.on("legendselectchanged", (
|
|
5548
|
-
i.current =
|
|
5547
|
+
r.current || (r.current = Wr.init(n.current), r.current.on("legendselectchanged", (b) => {
|
|
5548
|
+
i.current = b.selected;
|
|
5549
5549
|
}));
|
|
5550
5550
|
const C = s.current, x = i.current && C && C.legend ? {
|
|
5551
5551
|
...C,
|
|
5552
5552
|
legend: { ...C.legend, selected: i.current }
|
|
5553
5553
|
} : C;
|
|
5554
5554
|
r.current.setOption(x, !0), u = requestAnimationFrame(() => {
|
|
5555
|
-
var
|
|
5556
|
-
c || (
|
|
5555
|
+
var b;
|
|
5556
|
+
c || (b = r.current) == null || b.resize();
|
|
5557
5557
|
});
|
|
5558
5558
|
};
|
|
5559
5559
|
g();
|
|
5560
|
-
const
|
|
5560
|
+
const _ = () => {
|
|
5561
5561
|
var C;
|
|
5562
5562
|
return (C = r.current) == null ? void 0 : C.resize();
|
|
5563
5563
|
};
|
|
5564
|
-
window.addEventListener("resize",
|
|
5564
|
+
window.addEventListener("resize", _);
|
|
5565
5565
|
let h;
|
|
5566
5566
|
return typeof ResizeObserver < "u" && (h = new ResizeObserver(() => {
|
|
5567
5567
|
if (!c) {
|
|
@@ -5572,7 +5572,7 @@ function lt({
|
|
|
5572
5572
|
r.current.resize();
|
|
5573
5573
|
}
|
|
5574
5574
|
}), h.observe(d)), () => {
|
|
5575
|
-
c = !0, cancelAnimationFrame(u), window.removeEventListener("resize",
|
|
5575
|
+
c = !0, cancelAnimationFrame(u), window.removeEventListener("resize", _), h == null || h.disconnect();
|
|
5576
5576
|
};
|
|
5577
5577
|
}, [e]), he(
|
|
5578
5578
|
() => () => {
|
|
@@ -5604,9 +5604,9 @@ function Qf({
|
|
|
5604
5604
|
}, c = e.map((C) => {
|
|
5605
5605
|
var x;
|
|
5606
5606
|
return ((x = C.date) == null ? void 0 : x.slice(5)) || "";
|
|
5607
|
-
}), u = [], g = [],
|
|
5608
|
-
if (g.push(
|
|
5609
|
-
name:
|
|
5607
|
+
}), u = [], g = [], _ = s || d[String(t)] || String(t);
|
|
5608
|
+
if (g.push(_), u.push({
|
|
5609
|
+
name: _,
|
|
5610
5610
|
type: "bar",
|
|
5611
5611
|
stack: "total",
|
|
5612
5612
|
data: e.map((C) => Number(C[t] || 0)),
|
|
@@ -5808,13 +5808,13 @@ function Zf({ data: e }) {
|
|
|
5808
5808
|
if (!c || c.length === 0) return "";
|
|
5809
5809
|
const u = i.get(c[0].axisValue);
|
|
5810
5810
|
let g = `<div style="font-weight:600;margin-bottom:4px">${c[0].axisValue}</div>`;
|
|
5811
|
-
for (const
|
|
5812
|
-
let h =
|
|
5813
|
-
u &&
|
|
5811
|
+
for (const _ of c) {
|
|
5812
|
+
let h = _.value == null ? "—" : `${_.value}%`;
|
|
5813
|
+
u && _.value != null && (_.seriesName === "关单率" ? h += `(${Number(u.closedCount || 0)}/${Number(
|
|
5814
5814
|
u.newCount || 0
|
|
5815
|
-
)})` :
|
|
5815
|
+
)})` : _.seriesName === "AI有效率" && (h += `(${Number(u.aiEffectiveCount || 0)}/${Number(
|
|
5816
5816
|
u.closedCount || 0
|
|
5817
|
-
)})`)), g += `${
|
|
5817
|
+
)})`)), g += `${_.marker} ${_.seriesName}: <b>${h}</b><br/>`;
|
|
5818
5818
|
}
|
|
5819
5819
|
return g;
|
|
5820
5820
|
}
|
|
@@ -5901,22 +5901,22 @@ function eh({
|
|
|
5901
5901
|
if (n.length === 0 && r.length === 0)
|
|
5902
5902
|
return /* @__PURE__ */ a("div", { className: pe.trendEmpty, children: "暂无数据" });
|
|
5903
5903
|
const s = /* @__PURE__ */ new Set();
|
|
5904
|
-
for (const
|
|
5905
|
-
|
|
5906
|
-
for (const
|
|
5907
|
-
|
|
5908
|
-
const i = Array.from(s).sort(), d = new Map(n.map((
|
|
5904
|
+
for (const b of n)
|
|
5905
|
+
b != null && b.date && s.add(b.date);
|
|
5906
|
+
for (const b of r)
|
|
5907
|
+
b != null && b.date && s.add(b.date);
|
|
5908
|
+
const i = Array.from(s).sort(), d = new Map(n.map((b) => [b.date, b])), c = new Map(r.map((b) => [b.date, b])), u = i.map((b) => b.slice(5)), g = i.map((b) => {
|
|
5909
5909
|
var O;
|
|
5910
|
-
return Number(((O = d.get(
|
|
5911
|
-
}),
|
|
5910
|
+
return Number(((O = d.get(b)) == null ? void 0 : O.humanCount) || 0);
|
|
5911
|
+
}), _ = i.map((b) => {
|
|
5912
5912
|
var O;
|
|
5913
|
-
return Number(((O = d.get(
|
|
5914
|
-
}), h = i.map((
|
|
5913
|
+
return Number(((O = d.get(b)) == null ? void 0 : O.agentCount) || 0);
|
|
5914
|
+
}), h = i.map((b) => {
|
|
5915
5915
|
var O;
|
|
5916
|
-
return Number(((O = c.get(
|
|
5917
|
-
}), C = i.map((
|
|
5916
|
+
return Number(((O = c.get(b)) == null ? void 0 : O.doneCount) || 0);
|
|
5917
|
+
}), C = i.map((b) => {
|
|
5918
5918
|
var G, k;
|
|
5919
|
-
const O = Number(((G = c.get(
|
|
5919
|
+
const O = Number(((G = c.get(b)) == null ? void 0 : G.createdCount) || 0), F = Number(((k = c.get(b)) == null ? void 0 : k.doneCount) || 0);
|
|
5920
5920
|
return Math.max(0, O - F);
|
|
5921
5921
|
}), x = {
|
|
5922
5922
|
tooltip: {
|
|
@@ -5962,7 +5962,7 @@ function eh({
|
|
|
5962
5962
|
name: "Agent消息",
|
|
5963
5963
|
type: "bar",
|
|
5964
5964
|
stack: "msg",
|
|
5965
|
-
data:
|
|
5965
|
+
data: _,
|
|
5966
5966
|
itemStyle: { color: "#52c41a", borderRadius: [3, 3, 0, 0] },
|
|
5967
5967
|
barMaxWidth: 20
|
|
5968
5968
|
},
|
|
@@ -6236,7 +6236,7 @@ function ah({
|
|
|
6236
6236
|
}
|
|
6237
6237
|
];
|
|
6238
6238
|
return /* @__PURE__ */ a("div", { className: pe.distList, children: c.map((u, g) => {
|
|
6239
|
-
const
|
|
6239
|
+
const _ = u.prompt + u.completion, h = d > 0 ? u.prompt * 100 / d : 0, C = d > 0 ? u.completion * 100 / d : 0;
|
|
6240
6240
|
return /* @__PURE__ */ m("div", { className: pe.distItem, children: [
|
|
6241
6241
|
/* @__PURE__ */ m("div", { className: pe.distHeader, children: [
|
|
6242
6242
|
/* @__PURE__ */ a("span", { className: pe.distLabel, children: u.label }),
|
|
@@ -6246,7 +6246,7 @@ function ah({
|
|
|
6246
6246
|
" · 输出 ",
|
|
6247
6247
|
_t(u.completion),
|
|
6248
6248
|
/* @__PURE__ */ m("span", { className: pe.distPct, children: [
|
|
6249
|
-
|
|
6249
|
+
_ > 0 ? (_ * 100 / d).toFixed(1) : "0.0",
|
|
6250
6250
|
"%"
|
|
6251
6251
|
] })
|
|
6252
6252
|
] })
|
|
@@ -6454,9 +6454,9 @@ function Ju({
|
|
|
6454
6454
|
data: u,
|
|
6455
6455
|
exportParams: g
|
|
6456
6456
|
}) {
|
|
6457
|
-
const [
|
|
6457
|
+
const [_, h] = v(
|
|
6458
6458
|
da[t]
|
|
6459
|
-
), [C, x] =
|
|
6459
|
+
), [C, x] = v([]), [b, O] = v(""), [F, G] = v(!1), [k, P] = v(null), Y = ue(() => {
|
|
6460
6460
|
var I;
|
|
6461
6461
|
const z = Vu[t], q = (u == null ? void 0 : u.total) ?? 0;
|
|
6462
6462
|
let te = [];
|
|
@@ -6496,21 +6496,21 @@ function Ju({
|
|
|
6496
6496
|
}
|
|
6497
6497
|
return { columns: z, rows: te };
|
|
6498
6498
|
}, [t, u]), ce = ue(
|
|
6499
|
-
() =>
|
|
6500
|
-
[
|
|
6499
|
+
() => _ === "detail" ? ua : Y.columns,
|
|
6500
|
+
[_, Y.columns]
|
|
6501
6501
|
);
|
|
6502
6502
|
he(() => {
|
|
6503
6503
|
e && (x(ce.map((z) => z.key)), P(null));
|
|
6504
|
-
}, [e, t,
|
|
6504
|
+
}, [e, t, _, ce]), he(() => {
|
|
6505
6505
|
if (!e) return;
|
|
6506
|
-
const z =
|
|
6506
|
+
const z = _ === "detail" ? "工单明细" : Ku[t], q = g.startDate && g.endDate ? `_${pa(g.startDate)}-${pa(
|
|
6507
6507
|
g.endDate
|
|
6508
6508
|
)}` : "";
|
|
6509
6509
|
O(`业务指标_${r || "全部"}_${z}${q}.csv`);
|
|
6510
6510
|
}, [
|
|
6511
6511
|
e,
|
|
6512
6512
|
t,
|
|
6513
|
-
|
|
6513
|
+
_,
|
|
6514
6514
|
r,
|
|
6515
6515
|
g.startDate,
|
|
6516
6516
|
g.endDate
|
|
@@ -6519,21 +6519,21 @@ function Ju({
|
|
|
6519
6519
|
}, [e, t]);
|
|
6520
6520
|
const de = ce.map((z) => z.key), fe = C.length === de.length && de.length > 0, le = () => {
|
|
6521
6521
|
x(fe ? de.slice(0, 1) : de);
|
|
6522
|
-
}, J = Y.rows.length, ee =
|
|
6522
|
+
}, J = Y.rows.length, ee = _ === "aggregate" ? `预计导出 ${J} 行` : k ? `共 ${k.total} 行${k.truncated ? "(受安全上限,最多 10000 行)" : ""}` : "点击导出后拉取全量数据", ie = async () => {
|
|
6523
6523
|
if (C.length === 0) {
|
|
6524
6524
|
H.warning("请至少选择一列导出字段");
|
|
6525
6525
|
return;
|
|
6526
6526
|
}
|
|
6527
6527
|
G(!0);
|
|
6528
6528
|
try {
|
|
6529
|
-
if (
|
|
6529
|
+
if (_ === "aggregate") {
|
|
6530
6530
|
const z = Y.columns.filter((q) => C.includes(q.key));
|
|
6531
|
-
la(
|
|
6531
|
+
la(b, ia(ca(z), Y.rows)), H.success("导出成功"), n();
|
|
6532
6532
|
} else {
|
|
6533
6533
|
const z = await Ed(g);
|
|
6534
6534
|
P({ total: z.total, truncated: z.truncated });
|
|
6535
6535
|
const q = z.headers.length ? z.headers : ua, te = q.filter((f) => C.includes(f.key)).map((f) => ({ key: f.key, label: f.label })), I = te.length ? te : q.map((f) => ({ key: f.key, label: f.label }));
|
|
6536
|
-
la(
|
|
6536
|
+
la(b, ia(ca(I), z.rows)), H.success("导出成功"), z.truncated ? H.warning("导出结果已达安全上限,仅包含前 10000 行") : n();
|
|
6537
6537
|
}
|
|
6538
6538
|
} catch (z) {
|
|
6539
6539
|
H.error((z == null ? void 0 : z.userMessage) ?? (z == null ? void 0 : z.message) ?? "导出失败");
|
|
@@ -6598,7 +6598,7 @@ function Ju({
|
|
|
6598
6598
|
yn.Group,
|
|
6599
6599
|
{
|
|
6600
6600
|
className: ge.radioRow,
|
|
6601
|
-
value:
|
|
6601
|
+
value: _,
|
|
6602
6602
|
onChange: (z) => h(z.target.value),
|
|
6603
6603
|
children: [
|
|
6604
6604
|
/* @__PURE__ */ a(yn, { value: "aggregate", children: "聚合数据" }),
|
|
@@ -6633,7 +6633,7 @@ function Ju({
|
|
|
6633
6633
|
{
|
|
6634
6634
|
className: ge.fileInput,
|
|
6635
6635
|
size: "small",
|
|
6636
|
-
value:
|
|
6636
|
+
value: b,
|
|
6637
6637
|
onChange: (z) => O(z.target.value),
|
|
6638
6638
|
placeholder: "导出文件名"
|
|
6639
6639
|
}
|
|
@@ -6682,8 +6682,8 @@ function $m(e, t, n) {
|
|
|
6682
6682
|
parseInt(h.slice(1, 3), 16),
|
|
6683
6683
|
parseInt(h.slice(3, 5), 16),
|
|
6684
6684
|
parseInt(h.slice(5, 7), 16)
|
|
6685
|
-
], [s, i, d] = r(e), [c, u, g] = r(t),
|
|
6686
|
-
return `rgb(${
|
|
6685
|
+
], [s, i, d] = r(e), [c, u, g] = r(t), _ = (h, C) => Math.round(h + (C - h) * n);
|
|
6686
|
+
return `rgb(${_(s, c)},${_(i, u)},${_(d, g)})`;
|
|
6687
6687
|
}
|
|
6688
6688
|
function Dm({
|
|
6689
6689
|
data: e,
|
|
@@ -6696,7 +6696,7 @@ function Dm({
|
|
|
6696
6696
|
onExportRanking: c,
|
|
6697
6697
|
onExportDistribution: u
|
|
6698
6698
|
}) {
|
|
6699
|
-
const g = (e == null ? void 0 : e.trend) ?? [],
|
|
6699
|
+
const g = (e == null ? void 0 : e.trend) ?? [], _ = (e == null ? void 0 : e.ranking) ?? [], h = (e == null ? void 0 : e.creatorDistribution) ?? [], C = ue(() => {
|
|
6700
6700
|
const O = g.map((F) => {
|
|
6701
6701
|
var G;
|
|
6702
6702
|
return ((G = F.date) == null ? void 0 : G.slice(5)) || "";
|
|
@@ -6749,7 +6749,7 @@ function Dm({
|
|
|
6749
6749
|
]
|
|
6750
6750
|
};
|
|
6751
6751
|
}, [g]), x = ue(() => {
|
|
6752
|
-
const F = [...
|
|
6752
|
+
const F = [..._.slice(0, km)].reverse(), G = Math.max(F.length - 1, 1);
|
|
6753
6753
|
return {
|
|
6754
6754
|
tooltip: { ...bn, axisPointer: { type: "shadow" } },
|
|
6755
6755
|
grid: { left: 8, right: 44, top: 8, bottom: 8, containLabel: !0 },
|
|
@@ -6791,7 +6791,7 @@ function Dm({
|
|
|
6791
6791
|
}
|
|
6792
6792
|
]
|
|
6793
6793
|
};
|
|
6794
|
-
}, [
|
|
6794
|
+
}, [_]), b = ue(() => {
|
|
6795
6795
|
const O = [...h].sort(
|
|
6796
6796
|
(P, Y) => Number(Y.count || 0) - Number(P.count || 0)
|
|
6797
6797
|
), F = O.slice(0, Yt).map((P) => ({
|
|
@@ -6872,7 +6872,7 @@ function Dm({
|
|
|
6872
6872
|
c && /* @__PURE__ */ a(en, { onClick: c })
|
|
6873
6873
|
] }),
|
|
6874
6874
|
/* @__PURE__ */ a("div", { className: re.chartDesc, children: "按当前选择的聚合维度分组统计工单数量,展示 Top 15" }),
|
|
6875
|
-
|
|
6875
|
+
_.length > 0 ? /* @__PURE__ */ a(lt, { option: x, height: 280 }) : /* @__PURE__ */ a("div", { className: re.emptyState, children: "暂无数据" })
|
|
6876
6876
|
] }),
|
|
6877
6877
|
/* @__PURE__ */ m("div", { className: re.chartCard, children: [
|
|
6878
6878
|
/* @__PURE__ */ m("div", { className: re.chartTitle, children: [
|
|
@@ -6882,7 +6882,7 @@ function Dm({
|
|
|
6882
6882
|
u && /* @__PURE__ */ a(en, { onClick: u })
|
|
6883
6883
|
] }),
|
|
6884
6884
|
/* @__PURE__ */ a("div", { className: re.chartDesc, children: "按工单创建人分组统计数量占比,展示 Top 8 创建人的工单分布" }),
|
|
6885
|
-
h.length > 0 ? /* @__PURE__ */ a(lt, { option:
|
|
6885
|
+
h.length > 0 ? /* @__PURE__ */ a(lt, { option: b, height: 280 }) : /* @__PURE__ */ a("div", { className: re.emptyState, children: "暂无数据" })
|
|
6886
6886
|
] })
|
|
6887
6887
|
] })
|
|
6888
6888
|
] });
|
|
@@ -6950,12 +6950,12 @@ function ep({
|
|
|
6950
6950
|
loading: r,
|
|
6951
6951
|
style: s
|
|
6952
6952
|
}) {
|
|
6953
|
-
const [i, d] =
|
|
6953
|
+
const [i, d] = v(""), [c, u] = v(null), [g, _] = v(!1), h = g || !!e, C = ue(
|
|
6954
6954
|
() => h ? Wa(n, 0) : Zm,
|
|
6955
6955
|
[n, h]
|
|
6956
|
-
), x = ue(() => ap(n), [n]),
|
|
6956
|
+
), x = ue(() => ap(n), [n]), b = c ?? x, O = V((P) => {
|
|
6957
6957
|
if (P) {
|
|
6958
|
-
|
|
6958
|
+
_(!0);
|
|
6959
6959
|
return;
|
|
6960
6960
|
}
|
|
6961
6961
|
d(""), u(null);
|
|
@@ -6993,7 +6993,7 @@ function ep({
|
|
|
6993
6993
|
searchValue: i,
|
|
6994
6994
|
onSearch: F,
|
|
6995
6995
|
onDropdownVisibleChange: O,
|
|
6996
|
-
treeExpandedKeys:
|
|
6996
|
+
treeExpandedKeys: b,
|
|
6997
6997
|
onTreeExpand: k,
|
|
6998
6998
|
switcherIcon: Ym,
|
|
6999
6999
|
virtual: !1,
|
|
@@ -7044,12 +7044,12 @@ function rp(e, t) {
|
|
|
7044
7044
|
if (!Array.isArray(i)) return !1;
|
|
7045
7045
|
let d = !1;
|
|
7046
7046
|
return i.forEach((c) => {
|
|
7047
|
-
const g = String((c == null ? void 0 : c.name) ?? (c == null ? void 0 : c.deptName) ?? "").toUpperCase().includes(n),
|
|
7048
|
-
if (
|
|
7047
|
+
const g = String((c == null ? void 0 : c.name) ?? (c == null ? void 0 : c.deptName) ?? "").toUpperCase().includes(n), _ = s((c == null ? void 0 : c.childrenList) || (c == null ? void 0 : c.children) || []);
|
|
7048
|
+
if (_) {
|
|
7049
7049
|
const h = String((c == null ? void 0 : c.id) ?? (c == null ? void 0 : c.deptId) ?? "");
|
|
7050
7050
|
h && r.push(h);
|
|
7051
7051
|
}
|
|
7052
|
-
d = d || g ||
|
|
7052
|
+
d = d || g || _;
|
|
7053
7053
|
}), d;
|
|
7054
7054
|
};
|
|
7055
7055
|
return s(e), r;
|
|
@@ -7066,11 +7066,11 @@ function ip({
|
|
|
7066
7066
|
deptTreeData: c,
|
|
7067
7067
|
deptTreeLoading: u,
|
|
7068
7068
|
range: g,
|
|
7069
|
-
setRange:
|
|
7069
|
+
setRange: _,
|
|
7070
7070
|
loading: h,
|
|
7071
7071
|
onSearch: C,
|
|
7072
7072
|
onReset: x,
|
|
7073
|
-
tagDefs:
|
|
7073
|
+
tagDefs: b,
|
|
7074
7074
|
selectedTags: O,
|
|
7075
7075
|
setTag: F,
|
|
7076
7076
|
savedFilters: G,
|
|
@@ -7078,12 +7078,12 @@ function ip({
|
|
|
7078
7078
|
onDeleteFilter: P,
|
|
7079
7079
|
onLoadFilter: Y
|
|
7080
7080
|
}) {
|
|
7081
|
-
const [ce, de] =
|
|
7081
|
+
const [ce, de] = v(), [fe, le] = v(!1), [J, ee] = v(""), ie = {
|
|
7082
7082
|
今日: [Ee().startOf("day"), Ee().endOf("day")],
|
|
7083
7083
|
近三天: [Ee().subtract(2, "day").startOf("day"), Ee().endOf("day")],
|
|
7084
7084
|
本周: [Ee().startOf("week"), Ee().endOf("day")],
|
|
7085
7085
|
本月: [Ee().startOf("month"), Ee().endOf("day")]
|
|
7086
|
-
}, z =
|
|
7086
|
+
}, z = b.filter((f) => f.values.length > 0), q = V(
|
|
7087
7087
|
(f) => d(f || void 0),
|
|
7088
7088
|
[d]
|
|
7089
7089
|
), te = () => {
|
|
@@ -7141,7 +7141,7 @@ function ip({
|
|
|
7141
7141
|
dropdownClassName: re.smallCalendar,
|
|
7142
7142
|
value: g,
|
|
7143
7143
|
onChange: (f) => {
|
|
7144
|
-
f && f[0] && f[1] ?
|
|
7144
|
+
f && f[0] && f[1] ? _([f[0], f[1]]) : f || _(null);
|
|
7145
7145
|
}
|
|
7146
7146
|
}
|
|
7147
7147
|
),
|
|
@@ -7321,7 +7321,7 @@ const At = "creator", fa = "day", cp = "department", ha = () => [
|
|
|
7321
7321
|
];
|
|
7322
7322
|
function dp(e = "", t = "admin") {
|
|
7323
7323
|
var Q;
|
|
7324
|
-
const [n, r] =
|
|
7324
|
+
const [n, r] = v(), [s, i] = v(), [d, c] = v(ha), [u, g] = v(At), [_, h] = v(), [C, x] = v([]), [b, O] = v([]), [F, G] = v(!1), [k, P] = v([]), [Y, ce] = v(!1), [de, fe] = v(null), [le, J] = v(!1), ee = Ie({});
|
|
7325
7325
|
he(() => {
|
|
7326
7326
|
let S = !1;
|
|
7327
7327
|
return Mr(e).then((p) => {
|
|
@@ -7367,21 +7367,21 @@ function dp(e = "", t = "admin") {
|
|
|
7367
7367
|
};
|
|
7368
7368
|
}, [e, t]), he(() => {
|
|
7369
7369
|
i(void 0);
|
|
7370
|
-
}, [
|
|
7370
|
+
}, [_]);
|
|
7371
7371
|
const ie = ue(
|
|
7372
|
-
() =>
|
|
7372
|
+
() => b.filter((S) => S.staffId != null).map((S) => ({
|
|
7373
7373
|
value: String(S.staffId),
|
|
7374
7374
|
label: S.name ? `${S.name} (${S.accountNo})` : S.accountNo
|
|
7375
7375
|
})),
|
|
7376
|
-
[
|
|
7376
|
+
[b]
|
|
7377
7377
|
), z = ue(
|
|
7378
7378
|
() => up(k),
|
|
7379
7379
|
[k]
|
|
7380
7380
|
), q = ue(() => {
|
|
7381
|
-
if (!
|
|
7382
|
-
const S = z.byDept.get(
|
|
7381
|
+
if (!_ || !z.hasStaff) return ie;
|
|
7382
|
+
const S = z.byDept.get(_);
|
|
7383
7383
|
return S ? ie.filter((p) => S.has(p.value)) : ie;
|
|
7384
|
-
}, [ie, z,
|
|
7384
|
+
}, [ie, z, _]), te = d ? d[0].format("YYYY-MM-DD") : void 0, I = d ? d[1].format("YYYY-MM-DD") : void 0, f = Ie(0), U = V(
|
|
7385
7385
|
async (S) => {
|
|
7386
7386
|
if (!n) {
|
|
7387
7387
|
fe(null);
|
|
@@ -7397,7 +7397,7 @@ function dp(e = "", t = "admin") {
|
|
|
7397
7397
|
creatorId: s,
|
|
7398
7398
|
tagFilters: R,
|
|
7399
7399
|
groupBy: u,
|
|
7400
|
-
deptId:
|
|
7400
|
+
deptId: _,
|
|
7401
7401
|
source: t,
|
|
7402
7402
|
token: e
|
|
7403
7403
|
});
|
|
@@ -7413,7 +7413,7 @@ function dp(e = "", t = "admin") {
|
|
|
7413
7413
|
creatorId: s,
|
|
7414
7414
|
tagFilters: R,
|
|
7415
7415
|
groupBy: At,
|
|
7416
|
-
deptId:
|
|
7416
|
+
deptId: _,
|
|
7417
7417
|
source: t,
|
|
7418
7418
|
token: e
|
|
7419
7419
|
});
|
|
@@ -7444,7 +7444,7 @@ function dp(e = "", t = "admin") {
|
|
|
7444
7444
|
I,
|
|
7445
7445
|
s,
|
|
7446
7446
|
u,
|
|
7447
|
-
|
|
7447
|
+
_,
|
|
7448
7448
|
t,
|
|
7449
7449
|
e
|
|
7450
7450
|
]
|
|
@@ -7463,7 +7463,7 @@ function dp(e = "", t = "admin") {
|
|
|
7463
7463
|
setRange: c,
|
|
7464
7464
|
groupBy: u,
|
|
7465
7465
|
setGroupBy: g,
|
|
7466
|
-
deptId:
|
|
7466
|
+
deptId: _,
|
|
7467
7467
|
setDeptId: h,
|
|
7468
7468
|
startDate: te,
|
|
7469
7469
|
endDate: I,
|
|
@@ -7531,7 +7531,7 @@ function ya(e) {
|
|
|
7531
7531
|
}
|
|
7532
7532
|
}
|
|
7533
7533
|
function hp() {
|
|
7534
|
-
const [e, t] =
|
|
7534
|
+
const [e, t] = v([]);
|
|
7535
7535
|
he(() => {
|
|
7536
7536
|
t(fp());
|
|
7537
7537
|
}, []);
|
|
@@ -7546,8 +7546,8 @@ function hp() {
|
|
|
7546
7546
|
creatorId: d.creatorId,
|
|
7547
7547
|
tags: d.tags ?? {},
|
|
7548
7548
|
createdAt: Date.now()
|
|
7549
|
-
},
|
|
7550
|
-
return ya(
|
|
7549
|
+
}, _ = [...u.filter((h) => h.name !== c), g];
|
|
7550
|
+
return ya(_), _;
|
|
7551
7551
|
});
|
|
7552
7552
|
}, []), r = V((i) => {
|
|
7553
7553
|
t((d) => {
|
|
@@ -7572,29 +7572,29 @@ function gp(e) {
|
|
|
7572
7572
|
}));
|
|
7573
7573
|
}
|
|
7574
7574
|
function _p(e, t = "", n = "admin") {
|
|
7575
|
-
const [r, s] =
|
|
7575
|
+
const [r, s] = v({
|
|
7576
7576
|
tagDefs: Qt,
|
|
7577
7577
|
selectedTags: Xt
|
|
7578
|
-
}), [i, d] =
|
|
7578
|
+
}), [i, d] = v(!1);
|
|
7579
7579
|
he(() => {
|
|
7580
7580
|
if (!e) {
|
|
7581
7581
|
s({ tagDefs: Qt, selectedTags: Xt });
|
|
7582
7582
|
return;
|
|
7583
7583
|
}
|
|
7584
7584
|
let g = !1;
|
|
7585
|
-
return d(!0), Rd(e, t, n).then(async (
|
|
7585
|
+
return d(!0), Rd(e, t, n).then(async (_) => {
|
|
7586
7586
|
if (g) return;
|
|
7587
|
-
const h = (Array.isArray(
|
|
7587
|
+
const h = (Array.isArray(_) ? _ : []).map(yp).filter(
|
|
7588
7588
|
(x) => !!x
|
|
7589
7589
|
), C = await Promise.all(
|
|
7590
7590
|
h.map(async (x) => {
|
|
7591
7591
|
try {
|
|
7592
|
-
const
|
|
7592
|
+
const b = await Md(
|
|
7593
7593
|
x.id,
|
|
7594
7594
|
t,
|
|
7595
7595
|
n
|
|
7596
7596
|
);
|
|
7597
|
-
return { ...x, values: gp(
|
|
7597
|
+
return { ...x, values: gp(b) };
|
|
7598
7598
|
} catch {
|
|
7599
7599
|
return { ...x, values: [] };
|
|
7600
7600
|
}
|
|
@@ -7617,10 +7617,10 @@ function _p(e, t = "", n = "admin") {
|
|
|
7617
7617
|
g = !0;
|
|
7618
7618
|
};
|
|
7619
7619
|
}, [e, t, n]);
|
|
7620
|
-
const c = V((g,
|
|
7620
|
+
const c = V((g, _) => {
|
|
7621
7621
|
s((h) => {
|
|
7622
7622
|
const C = { ...h.selectedTags };
|
|
7623
|
-
return
|
|
7623
|
+
return _ === void 0 || _ === "" ? delete C[g] : C[g] = _, { ...h, selectedTags: C };
|
|
7624
7624
|
});
|
|
7625
7625
|
}, []), u = !!e && r.ownerCode === e;
|
|
7626
7626
|
return {
|
|
@@ -7640,7 +7640,7 @@ function lh({
|
|
|
7640
7640
|
selectedTags: s,
|
|
7641
7641
|
setTag: i,
|
|
7642
7642
|
loading: d
|
|
7643
|
-
} = _p(n.scenarioCode, t, e), { savedFilters: c, saveFilter: u, deleteFilter: g, getFilter:
|
|
7643
|
+
} = _p(n.scenarioCode, t, e), { savedFilters: c, saveFilter: u, deleteFilter: g, getFilter: _ } = hp();
|
|
7644
7644
|
n.tagFiltersRef.current = s;
|
|
7645
7645
|
const h = ue(() => {
|
|
7646
7646
|
const I = [
|
|
@@ -7658,9 +7658,9 @@ function lh({
|
|
|
7658
7658
|
he(() => {
|
|
7659
7659
|
C || n.setGroupBy(fa);
|
|
7660
7660
|
}, [C, n.setGroupBy]);
|
|
7661
|
-
const x = Ie(null),
|
|
7661
|
+
const x = Ie(null), b = Ie(!1);
|
|
7662
7662
|
he(() => {
|
|
7663
|
-
d && (
|
|
7663
|
+
d && (b.current = !0);
|
|
7664
7664
|
}, [d]);
|
|
7665
7665
|
const O = Ie(null);
|
|
7666
7666
|
he(() => {
|
|
@@ -7680,9 +7680,9 @@ function lh({
|
|
|
7680
7680
|
n.loadRef.current();
|
|
7681
7681
|
}, [n.groupBy, n.loadRef]), he(() => {
|
|
7682
7682
|
const I = x.current;
|
|
7683
|
-
!I || d || !
|
|
7683
|
+
!I || d || !b.current || (x.current = null, b.current = !1, Object.entries(I).forEach(([f, U]) => i(f, U)));
|
|
7684
7684
|
}, [d, r, i]);
|
|
7685
|
-
const F = ((te = h.find((I) => I.value === n.groupBy)) == null ? void 0 : te.label) ?? "按日期", [G, k] =
|
|
7685
|
+
const F = ((te = h.find((I) => I.value === n.groupBy)) == null ? void 0 : te.label) ?? "按日期", [G, k] = v({ open: !1, source: "kpi" }), P = V((I) => {
|
|
7686
7686
|
k({ open: !0, source: I });
|
|
7687
7687
|
}, []), Y = V(() => {
|
|
7688
7688
|
k((I) => ({ ...I, open: !1 }));
|
|
@@ -7769,12 +7769,12 @@ function lh({
|
|
|
7769
7769
|
]
|
|
7770
7770
|
), q = V(
|
|
7771
7771
|
(I) => {
|
|
7772
|
-
const f =
|
|
7772
|
+
const f = _(I);
|
|
7773
7773
|
if (f) {
|
|
7774
7774
|
if (n.setCreatorId(f.creatorId), n.setRange(
|
|
7775
7775
|
f.range ? [Ee(f.range[0]), Ee(f.range[1])] : null
|
|
7776
7776
|
), f.scenarioCode !== n.scenarioCode) {
|
|
7777
|
-
x.current = f.tags ?? {},
|
|
7777
|
+
x.current = f.tags ?? {}, b.current = !1, n.setScenarioCode(f.scenarioCode);
|
|
7778
7778
|
return;
|
|
7779
7779
|
}
|
|
7780
7780
|
r.forEach((U) => {
|
|
@@ -7785,7 +7785,7 @@ function lh({
|
|
|
7785
7785
|
}
|
|
7786
7786
|
},
|
|
7787
7787
|
[
|
|
7788
|
-
|
|
7788
|
+
_,
|
|
7789
7789
|
n.setCreatorId,
|
|
7790
7790
|
n.setRange,
|
|
7791
7791
|
n.setScenarioCode,
|
|
@@ -7903,8 +7903,10 @@ function bp(e) {
|
|
|
7903
7903
|
if (!e) return e;
|
|
7904
7904
|
const t = e.trim(), n = t.indexOf("://");
|
|
7905
7905
|
if (n < 0 || t.substring(n + 3).includes("@")) return t;
|
|
7906
|
-
const s =
|
|
7907
|
-
|
|
7906
|
+
const s = globalThis, i = s.__ZWEBIDE_GIT_USER__, d = s.__ZWEBIDE_GIT_PASS__;
|
|
7907
|
+
if (!i || !d) return t;
|
|
7908
|
+
const c = "gitlab.zteam.local", u = encodeURIComponent(d), g = `https://${c}`, _ = `http://${c}`, h = `https://${i}:${u}@${c}`;
|
|
7909
|
+
return t.startsWith(g) ? h + t.substring(g.length) : t.startsWith(_) ? h + t.substring(_.length) : t;
|
|
7908
7910
|
}
|
|
7909
7911
|
function ch(e) {
|
|
7910
7912
|
const t = new URLSearchParams();
|