@yuku123/z-team-component 0.2.128 → 0.2.130
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/{ChangeLogView-BWcf9eFT.js → ChangeLogView-AY7dKChQ.js} +1 -1
- package/dist/{ComponentDoc-MAAFSdex.js → ComponentDoc-DTpTBK1V.js} +3 -3
- package/dist/{InvitationManagementPage-DB3CeBs-.js → InvitationManagementPage-YzQVnNWz.js} +1 -1
- package/dist/{OnboardingPage-KwEQlQ9m.js → OnboardingPage-ClH-s7zs.js} +2 -2
- package/dist/{ScheduledTasks-BQnjn17C.js → ScheduledTasks-DhcmGmhu.js} +6 -6
- package/dist/{SystemShell-xfKRXTHa.js → SystemShell-Cz7S4YnT.js} +4 -4
- package/dist/{admin-logs-BBniVCWG.js → admin-logs-2gdJxEwA.js} +1 -1
- package/dist/{api-CErncfky.js → api---aB1ADx.js} +1 -1
- package/dist/{api-CIzOXga5.js → api-BHYf7Uyx.js} +1 -1
- package/dist/{createWorkspaceWsHandler-DZc2EeOE.js → createWorkspaceWsHandler-BC4HmdFu.js} +3 -3
- package/dist/{index-HU-dTCwe.js → index--HSE1tzT.js} +3 -3
- package/dist/{index-BZdTJbw5.js → index--L2wU6OV.js} +1 -1
- package/dist/{index-D7PjZbJz.js → index-4apTfQuo.js} +6 -6
- package/dist/{index-9cmnvhwH.js → index-9coNts0T.js} +6 -6
- package/dist/{index-DMScwqnC.js → index-CROBbbCB.js} +1 -1
- package/dist/{index-DVdVtFor.js → index-CTqU8nrB.js} +2 -2
- package/dist/{index-DmO4sKus.js → index-Ca08VoFz.js} +2 -2
- package/dist/{index-CcsEH7Y7.js → index-Ccvhn50s.js} +3 -3
- package/dist/{index-BsxfUGiv.js → index-Chzml7fB.js} +3 -3
- package/dist/{index-BWlQEPJO.js → index-Ci31buz9.js} +10 -10
- package/dist/{index-vn1AwgKA.js → index-CnIbuXF9.js} +2 -2
- package/dist/{index-DqAba7Rt.js → index-CnRAUDUi.js} +1 -1
- package/dist/{index-BPDcCJys.js → index-CnyMTIyv.js} +5 -5
- package/dist/{index-BNfRZbfa.js → index-CqOsWy6H.js} +2 -2
- package/dist/index-Cui8SX9p.js +1299 -0
- package/dist/{index-BmgJG2c3.js → index-DA0MCrVH.js} +2 -2
- package/dist/{index-BK0TLurx.js → index-DHubhPeT.js} +1 -1
- package/dist/{index-nu3p6CB7.js → index-DfpB0BR9.js} +3 -3
- package/dist/{index-Bchg8LCD.js → index-DqiBrPAv.js} +1 -1
- package/dist/{index-BbmFLkXG.js → index-Opx4qrhX.js} +3 -3
- package/dist/{index-C6uTjD16.js → index-Zr09eAzk.js} +2 -2
- package/dist/{index-Cxz8YOXI.js → index-baUMWaRm.js} +3 -3
- package/dist/{index-Cqzxd3l5.js → index-fJnhCAB9.js} +2 -2
- package/dist/{index-CjKs2OyG.js → index-lucAUJAv.js} +2 -2
- package/dist/{index-DTRR9SFq.js → index-mwKbvNPB.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/{instance-C7K_c-Ic.js → instance-ITIB5e5v.js} +1 -1
- package/dist/{menuPermission-ClR4xmR1.js → menuPermission-Dw1EJWIf.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-BkUCZ7h9.js → send-default-agent-team-message-DzRmAa6S.js} +1 -1
- package/dist/{sso-user-B9VemiQi.js → sso-user-497FBkoQ.js} +1 -1
- package/dist/{training-s01hnxH7.js → training-B4IByvWW.js} +1 -1
- package/dist/{webide-CJ8I_wyf.js → webide-DwQqqS-I.js} +192 -185
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
- package/dist/index-BTnwvvjN.js +0 -1248
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as o, jsxs as y, Fragment as ot } from "react/jsx-runtime";
|
|
2
2
|
import { UserOutlined as Zn, FolderOpenOutlined as Pa, FileTextOutlined as jt, SettingOutlined as Fa, SearchOutlined as Ma, PlusOutlined as $n, FolderAddOutlined as Vt, StarFilled as mt, AppstoreOutlined as Ba, CloseOutlined as Ua, LinkOutlined as xn, UnorderedListOutlined as Ln, StarOutlined as Gt, ShareAltOutlined as An, BarsOutlined as za, EllipsisOutlined as Wa, EditOutlined as Dn, DeleteOutlined as Zt, ClockCircleOutlined as Ha, BoldOutlined as qa, ItalicOutlined as Ka, StrikethroughOutlined as ja, OrderedListOutlined as Va, CheckSquareOutlined as Ga, CodeOutlined as Ja, ConsoleSqlOutlined as Ya, PictureOutlined as Qa, TableOutlined as Xa, FileAddOutlined as Rn, InfoCircleOutlined as Za, DownloadOutlined as er, ApartmentOutlined as tr, SaveOutlined as nr, DownOutlined as ar } from "@ant-design/icons";
|
|
3
|
-
import { message as
|
|
4
|
-
import dr, { useState as I, useCallback as R, useEffect as
|
|
3
|
+
import { message as K, Modal as je, Tooltip as ze, Button as se, Dropdown as $t, Popover as rr, Input as nt, Spin as en, Empty as xt, Tree as or, Segmented as sr, Radio as Jt, Checkbox as ir, TreeSelect as cr, Select as at, DatePicker as lr } from "antd";
|
|
4
|
+
import dr, { useState as I, useCallback as R, useEffect as Y, useMemo as B, useRef as ne } from "react";
|
|
5
5
|
import ur from "react-markdown";
|
|
6
6
|
import mr from "rehype-highlight";
|
|
7
7
|
import fr from "remark-gfm";
|
|
8
8
|
import { h as pr } from "./history-BlrA1eaW.js";
|
|
9
|
-
import { a as w, f as _, B as v, b as C, u as ea, n as yt, aa as hr, t as et, e as yr, ac as gr, ad as On, ae as _r, af as ta } from "./ComponentDoc-
|
|
10
|
-
import { f as br, a as vr, u as En, b as Sr, c as wr, r as Cr, d as Nr, e as Tr, g as kr, h as Ir, m as $r } from "./admin-logs-
|
|
11
|
-
import { a as xr, f as Lr, c as Ar } from "./index-
|
|
9
|
+
import { a as w, f as _, B as v, b as C, u as ea, n as yt, aa as hr, t as et, e as yr, ac as gr, ad as On, ae as _r, af as ta } from "./ComponentDoc-DTpTBK1V.js";
|
|
10
|
+
import { f as br, a as vr, u as En, b as Sr, c as wr, r as Cr, d as Nr, e as Tr, g as kr, h as Ir, m as $r } from "./admin-logs-2gdJxEwA.js";
|
|
11
|
+
import { a as xr, f as Lr, c as Ar } from "./index-CROBbbCB.js";
|
|
12
12
|
import { findTodosLinkedToNote as Dr, buildTodoProjectContext as Rr, linkedTodoChipLabel as Or } from "@yuku123/z-task-component";
|
|
13
13
|
import Ne from "dayjs";
|
|
14
14
|
import "./echarts-B1OU1xr4.js";
|
|
@@ -482,7 +482,7 @@ function Ms(e) {
|
|
|
482
482
|
}
|
|
483
483
|
return t(e), n;
|
|
484
484
|
}
|
|
485
|
-
const
|
|
485
|
+
const Ce = "0";
|
|
486
486
|
function Fn(e) {
|
|
487
487
|
if (!e) return "";
|
|
488
488
|
const n = /^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2})/.exec(e);
|
|
@@ -579,7 +579,7 @@ function Ft(e) {
|
|
|
579
579
|
key: `owner:${n.userId ?? ""}`,
|
|
580
580
|
title: n.title,
|
|
581
581
|
type: "owner",
|
|
582
|
-
id:
|
|
582
|
+
id: Ce,
|
|
583
583
|
userId: n.userId,
|
|
584
584
|
isLeaf: !1,
|
|
585
585
|
virtual: !0,
|
|
@@ -599,7 +599,7 @@ function la(e, n, t) {
|
|
|
599
599
|
key: `owner:${r.userId ?? ""}`,
|
|
600
600
|
title: r.title,
|
|
601
601
|
type: "owner",
|
|
602
|
-
id:
|
|
602
|
+
id: Ce,
|
|
603
603
|
userId: r.userId,
|
|
604
604
|
isLeaf: !1,
|
|
605
605
|
virtual: !0,
|
|
@@ -608,7 +608,7 @@ function la(e, n, t) {
|
|
|
608
608
|
key: `__group__${i}::${r.key}`,
|
|
609
609
|
title: r.label,
|
|
610
610
|
type: "group",
|
|
611
|
-
id:
|
|
611
|
+
id: Ce,
|
|
612
612
|
isLeaf: !1,
|
|
613
613
|
virtual: !0,
|
|
614
614
|
children: Ft(r.nodes)
|
|
@@ -637,34 +637,34 @@ function rd({
|
|
|
637
637
|
}) {
|
|
638
638
|
const r = ea((s) => s.token) || "", [i, l] = I([]), [u, m] = I(!1), [N, g] = I([]), [b, k] = I(null), [x, S] = I(
|
|
639
639
|
null
|
|
640
|
-
), [D, P] = I(!1), [
|
|
640
|
+
), [D, P] = I(!1), [j, Q] = I([]), [M, ae] = I(null), [pe, ee] = I(!1), [de, Se] = I(!1), ue = R(async () => {
|
|
641
641
|
const [s, c] = await Promise.allSettled([
|
|
642
642
|
xr({ view: "all" }, r),
|
|
643
643
|
Lr(r)
|
|
644
644
|
]);
|
|
645
|
-
|
|
645
|
+
Q(
|
|
646
646
|
s.status === "fulfilled" && Array.isArray(s.value) ? s.value : []
|
|
647
647
|
), ae(
|
|
648
648
|
c.status === "fulfilled" ? c.value : null
|
|
649
649
|
);
|
|
650
650
|
}, [r]);
|
|
651
|
-
|
|
651
|
+
Y(() => {
|
|
652
652
|
ue();
|
|
653
653
|
}, [ue]);
|
|
654
|
-
const [me, be] = I(Cs), [A, re] = I(ws), [
|
|
654
|
+
const [me, be] = I(Cs), [A, re] = I(ws), [V, T] = I(Ns), [f, L] = I(Ts), [G, he] = I("tree"), [X, Fe] = I(""), [H, fe] = I(!1), [te, U] = I([]), [ye, xe] = I(/* @__PURE__ */ new Set()), [Le, _t] = I(!1), [We, Ge] = I(-1), [ge, st] = I([]), [q, it] = I(null), [fa, cn] = I(!1), [ke, ln] = I("edit"), [dn, pa] = I(!0), [Mt, ha] = I(264), un = B(() => q ? Dr(j, q) : [], [j, q]), ya = B(
|
|
655
655
|
() => Rr(M),
|
|
656
656
|
[M]
|
|
657
657
|
), He = ne(null), Bt = ne(null), mn = ne(null), Je = ne(null), Me = ne([]), _e = ne(null);
|
|
658
|
-
|
|
658
|
+
Y(() => {
|
|
659
659
|
Me.current = ge;
|
|
660
|
-
}, [ge]),
|
|
660
|
+
}, [ge]), Y(() => {
|
|
661
661
|
_e.current = q;
|
|
662
662
|
}, [q]);
|
|
663
663
|
const [ve, Ae] = I(null), [Ut, Ie] = I(""), zt = ne(!1), [ga, fn] = I(!1), [ct, bt] = I(null), [Wt, lt] = I(""), oe = ge.find((s) => yt(s.id, q)) ?? null, Ht = (oe == null ? void 0 : oe.content) ?? "", Ye = (oe == null ? void 0 : oe.title) ?? "", pn = (oe == null ? void 0 : oe.dirty) ?? !1, qe = (oe == null ? void 0 : oe.saveStatus) ?? "idle", ce = R((s, c) => {
|
|
664
664
|
st(
|
|
665
665
|
(p) => p.map((h) => yt(h.id, s) ? { ...h, ...c } : h)
|
|
666
666
|
);
|
|
667
|
-
}, []),
|
|
667
|
+
}, []), we = R(async () => {
|
|
668
668
|
m(!0);
|
|
669
669
|
try {
|
|
670
670
|
const s = await br(r, n);
|
|
@@ -675,9 +675,9 @@ function rd({
|
|
|
675
675
|
m(!1);
|
|
676
676
|
}
|
|
677
677
|
}, [r, n]);
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
}, [
|
|
678
|
+
Y(() => {
|
|
679
|
+
we();
|
|
680
|
+
}, [we]);
|
|
681
681
|
const vt = R(async () => {
|
|
682
682
|
try {
|
|
683
683
|
const s = await vr(r), c = Array.isArray(s) ? s : [];
|
|
@@ -686,15 +686,15 @@ function rd({
|
|
|
686
686
|
U([]), xe(/* @__PURE__ */ new Set());
|
|
687
687
|
}
|
|
688
688
|
}, [r]);
|
|
689
|
-
|
|
689
|
+
Y(() => {
|
|
690
690
|
vt();
|
|
691
|
-
}, [vt]),
|
|
691
|
+
}, [vt]), Y(() => {
|
|
692
692
|
Is(me);
|
|
693
|
-
}, [me]),
|
|
693
|
+
}, [me]), Y(() => {
|
|
694
694
|
ks(A);
|
|
695
|
-
}, [A]),
|
|
696
|
-
$s(
|
|
697
|
-
}, [
|
|
695
|
+
}, [A]), Y(() => {
|
|
696
|
+
$s(V);
|
|
697
|
+
}, [V]), Y(() => {
|
|
698
698
|
xs(f);
|
|
699
699
|
}, [f]);
|
|
700
700
|
const _a = R((s) => {
|
|
@@ -719,7 +719,7 @@ function rd({
|
|
|
719
719
|
if (!(!c || !c.dirty)) {
|
|
720
720
|
ce(s, { saveStatus: "saving" });
|
|
721
721
|
try {
|
|
722
|
-
await En(s, { title: c.title, content: c.content }, r), ce(s, { dirty: !1, saveStatus: "saved" }),
|
|
722
|
+
await En(s, { title: c.title, content: c.content }, r), ce(s, { dirty: !1, saveStatus: "saved" }), we(), setTimeout(() => {
|
|
723
723
|
st(
|
|
724
724
|
(p) => p.map(
|
|
725
725
|
(h) => h.id === s && h.saveStatus === "saved" ? { ...h, saveStatus: "idle" } : h
|
|
@@ -727,10 +727,10 @@ function rd({
|
|
|
727
727
|
);
|
|
728
728
|
}, Hs);
|
|
729
729
|
} catch {
|
|
730
|
-
ce(s, { saveStatus: "error" }),
|
|
730
|
+
ce(s, { saveStatus: "error" }), K.error("保存失败");
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
}, [r,
|
|
733
|
+
}, [r, we, ce]), Be = R(() => {
|
|
734
734
|
const s = _e.current;
|
|
735
735
|
s && (ce(s, { dirty: !0, saveStatus: "unsaved" }), Je.current && clearTimeout(Je.current), Je.current = setTimeout(() => {
|
|
736
736
|
St();
|
|
@@ -776,7 +776,7 @@ function rd({
|
|
|
776
776
|
},
|
|
777
777
|
[r, Ue]
|
|
778
778
|
), hn = ne(0);
|
|
779
|
-
|
|
779
|
+
Y(() => {
|
|
780
780
|
!a || a.ts === hn.current || (hn.current = a.ts, De(a.id));
|
|
781
781
|
}, [a, De]);
|
|
782
782
|
const va = R(
|
|
@@ -803,7 +803,7 @@ function rd({
|
|
|
803
803
|
r
|
|
804
804
|
);
|
|
805
805
|
} catch {
|
|
806
|
-
|
|
806
|
+
K.error("保存失败");
|
|
807
807
|
}
|
|
808
808
|
p();
|
|
809
809
|
},
|
|
@@ -830,7 +830,7 @@ function rd({
|
|
|
830
830
|
},
|
|
831
831
|
r
|
|
832
832
|
), p = ve.parentId, h = ve.type;
|
|
833
|
-
if (Ae(null), Ie(""), await
|
|
833
|
+
if (Ae(null), Ie(""), await we(), p !== Ce && !N.includes(p) && g(($) => [...$, p]), ve.ownerUserId) {
|
|
834
834
|
const $ = `owner:${ve.ownerUserId}`;
|
|
835
835
|
g(
|
|
836
836
|
(W) => W.includes($) ? W : [...W, $]
|
|
@@ -838,22 +838,22 @@ function rd({
|
|
|
838
838
|
}
|
|
839
839
|
h === "note" && await De(c);
|
|
840
840
|
} catch {
|
|
841
|
-
|
|
841
|
+
K.error("新建失败");
|
|
842
842
|
} finally {
|
|
843
843
|
zt.current = !1, fn(!1);
|
|
844
844
|
}
|
|
845
|
-
}, [ve, Ut, r,
|
|
845
|
+
}, [ve, Ut, r, we, N, De]), gn = R(async () => {
|
|
846
846
|
if (!ct) return;
|
|
847
847
|
const s = Wt.trim();
|
|
848
848
|
if (s)
|
|
849
849
|
try {
|
|
850
850
|
await Cr(ct.id, s, r);
|
|
851
851
|
const c = ct.id;
|
|
852
|
-
bt(null), lt(""), await
|
|
852
|
+
bt(null), lt(""), await we(), ce(c, { title: s });
|
|
853
853
|
} catch {
|
|
854
|
-
|
|
854
|
+
K.error("重命名失败");
|
|
855
855
|
}
|
|
856
|
-
}, [ct, Wt, r,
|
|
856
|
+
}, [ct, Wt, r, we, ce]), qt = R(
|
|
857
857
|
(s, c) => {
|
|
858
858
|
je.confirm({
|
|
859
859
|
title: `删除「${c}」?`,
|
|
@@ -863,14 +863,14 @@ function rd({
|
|
|
863
863
|
cancelText: "取消",
|
|
864
864
|
onOk: async () => {
|
|
865
865
|
try {
|
|
866
|
-
await Nr(s, r), st((p) => p.filter((h) => h.id !== s)), q === s && (it(null), k(null)), await
|
|
866
|
+
await Nr(s, r), st((p) => p.filter((h) => h.id !== s)), q === s && (it(null), k(null)), await we(), K.success("已删除");
|
|
867
867
|
} catch {
|
|
868
|
-
|
|
868
|
+
K.error("删除失败");
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
});
|
|
872
872
|
},
|
|
873
|
-
[r,
|
|
873
|
+
[r, we, q]
|
|
874
874
|
), _n = R(async () => {
|
|
875
875
|
const s = _e.current;
|
|
876
876
|
if (s) {
|
|
@@ -889,11 +889,11 @@ function rd({
|
|
|
889
889
|
}
|
|
890
890
|
document.body.removeChild($);
|
|
891
891
|
}
|
|
892
|
-
|
|
892
|
+
K.success(
|
|
893
893
|
h ? "分享链接已复制到剪贴板" : "复制失败,请手动复制链接"
|
|
894
894
|
);
|
|
895
895
|
} catch {
|
|
896
|
-
|
|
896
|
+
K.error("生成分享链接失败");
|
|
897
897
|
} finally {
|
|
898
898
|
P(!1);
|
|
899
899
|
}
|
|
@@ -908,9 +908,9 @@ function rd({
|
|
|
908
908
|
});
|
|
909
909
|
h(!p);
|
|
910
910
|
try {
|
|
911
|
-
p ? await kr(s, r) : await Ir(s, r), await vt(),
|
|
911
|
+
p ? await kr(s, r) : await Ir(s, r), await vt(), K.success(p ? "已取消收藏" : "已收藏");
|
|
912
912
|
} catch {
|
|
913
|
-
h(p),
|
|
913
|
+
h(p), K.error(p ? "取消收藏失败" : "收藏失败");
|
|
914
914
|
} finally {
|
|
915
915
|
_t(!1);
|
|
916
916
|
}
|
|
@@ -923,7 +923,7 @@ function rd({
|
|
|
923
923
|
const s = _e.current;
|
|
924
924
|
if (!s || de) return;
|
|
925
925
|
const c = Me.current.find((h) => h.id === s), p = ((c == null ? void 0 : c.title) || "未命名笔记").trim();
|
|
926
|
-
|
|
926
|
+
Se(!0);
|
|
927
927
|
try {
|
|
928
928
|
await Ar(
|
|
929
929
|
{
|
|
@@ -931,11 +931,11 @@ function rd({
|
|
|
931
931
|
links: [{ type: "note", id: s, title: p }]
|
|
932
932
|
},
|
|
933
933
|
r
|
|
934
|
-
),
|
|
934
|
+
), K.success("已从笔记创建待办"), await ue(), ee(!0);
|
|
935
935
|
} catch {
|
|
936
|
-
|
|
936
|
+
K.error("从笔记创建待办失败");
|
|
937
937
|
} finally {
|
|
938
|
-
|
|
938
|
+
Se(!1);
|
|
939
939
|
}
|
|
940
940
|
}, [r, de, ue]), dt = R(
|
|
941
941
|
async (s) => {
|
|
@@ -943,23 +943,23 @@ function rd({
|
|
|
943
943
|
if (!p) return;
|
|
944
944
|
const h = Me.current.find((Z) => Z.id === p);
|
|
945
945
|
if (!h) return;
|
|
946
|
-
const $ = (c == null ? void 0 : c.selectionStart) ?? h.content.length, W = (c == null ? void 0 : c.selectionEnd) ?? h.content.length, z =
|
|
946
|
+
const $ = (c == null ? void 0 : c.selectionStart) ?? h.content.length, W = (c == null ? void 0 : c.selectionEnd) ?? h.content.length, z = K.loading("上传图片中...", 0);
|
|
947
947
|
try {
|
|
948
|
-
const
|
|
948
|
+
const J = `
|
|
949
949
|
})
|
|
950
|
-
`, Oe = h.content.slice(0, $) +
|
|
950
|
+
`, Oe = h.content.slice(0, $) + J + h.content.slice(W);
|
|
951
951
|
ce(p, {
|
|
952
952
|
content: Oe,
|
|
953
953
|
dirty: !0,
|
|
954
954
|
saveStatus: "unsaved"
|
|
955
955
|
}), Be(), requestAnimationFrame(() => {
|
|
956
956
|
if (c) {
|
|
957
|
-
const kt = $ +
|
|
957
|
+
const kt = $ + J.length;
|
|
958
958
|
c.focus(), c.setSelectionRange(kt, kt);
|
|
959
959
|
}
|
|
960
960
|
});
|
|
961
961
|
} catch {
|
|
962
|
-
|
|
962
|
+
K.error("图片上传失败");
|
|
963
963
|
} finally {
|
|
964
964
|
z();
|
|
965
965
|
}
|
|
@@ -974,8 +974,8 @@ function rd({
|
|
|
974
974
|
for (let z = 0; z < c.length; z++) {
|
|
975
975
|
const Z = c[z];
|
|
976
976
|
if (Z.kind === "file" && Z.type.startsWith("image/")) {
|
|
977
|
-
const
|
|
978
|
-
|
|
977
|
+
const J = Z.getAsFile();
|
|
978
|
+
J && p.push(J);
|
|
979
979
|
}
|
|
980
980
|
}
|
|
981
981
|
if (p.length > 0) {
|
|
@@ -991,11 +991,11 @@ function rd({
|
|
|
991
991
|
s.preventDefault();
|
|
992
992
|
const z = s.currentTarget, Z = _e.current;
|
|
993
993
|
if (!Z) return;
|
|
994
|
-
const
|
|
995
|
-
if (!
|
|
994
|
+
const J = Me.current.find((It) => It.id === Z);
|
|
995
|
+
if (!J) return;
|
|
996
996
|
const Oe = z.selectionStart, kt = z.selectionEnd, In = `
|
|
997
997
|

|
|
998
|
-
`, Ea =
|
|
998
|
+
`, Ea = J.content.slice(0, Oe) + In + J.content.slice(kt);
|
|
999
999
|
ce(Z, {
|
|
1000
1000
|
content: Ea,
|
|
1001
1001
|
dirty: !0,
|
|
@@ -1086,13 +1086,13 @@ function rd({
|
|
|
1086
1086
|
const { selectionStart: h, selectionEnd: $ } = c;
|
|
1087
1087
|
if (s.shiftKey) {
|
|
1088
1088
|
const z = c.value.slice(0, h).lastIndexOf(`
|
|
1089
|
-
`) + 1,
|
|
1089
|
+
`) + 1, J = c.value.slice(z, $).split(`
|
|
1090
1090
|
`).map((Oe) => Oe.startsWith(" ") ? Oe.slice(2) : Oe.replace(/^ /, "")).join(`
|
|
1091
1091
|
`);
|
|
1092
1092
|
Re({
|
|
1093
|
-
content: c.value.slice(0, z) +
|
|
1093
|
+
content: c.value.slice(0, z) + J + c.value.slice($),
|
|
1094
1094
|
selectFrom: z,
|
|
1095
|
-
selectTo: z +
|
|
1095
|
+
selectTo: z + J.length
|
|
1096
1096
|
});
|
|
1097
1097
|
} else
|
|
1098
1098
|
Re(Mn(c.value, h, $, " "));
|
|
@@ -1138,8 +1138,8 @@ function rd({
|
|
|
1138
1138
|
$.getBoundingClientRect().top <= p && (h = W);
|
|
1139
1139
|
}), Ge(h);
|
|
1140
1140
|
}, []), Sn = B(
|
|
1141
|
-
() => As(i,
|
|
1142
|
-
[i,
|
|
1141
|
+
() => As(i, V, f),
|
|
1142
|
+
[i, V, f]
|
|
1143
1143
|
), Nt = B(
|
|
1144
1144
|
() => Ds(Sn, X),
|
|
1145
1145
|
[Sn, X]
|
|
@@ -1180,33 +1180,40 @@ function rd({
|
|
|
1180
1180
|
if (tt(s.node.key)) {
|
|
1181
1181
|
const z = Bn(s.node.key);
|
|
1182
1182
|
if (h && z && h !== z) {
|
|
1183
|
-
|
|
1183
|
+
K.warning("不能将笔记移动到其他人的目录下");
|
|
1184
1184
|
return;
|
|
1185
1185
|
}
|
|
1186
|
-
W =
|
|
1187
|
-
} else if (Lt(s.node.key))
|
|
1188
|
-
|
|
1189
|
-
|
|
1186
|
+
W = Ce;
|
|
1187
|
+
} else if (Lt(s.node.key)) {
|
|
1188
|
+
K.info("分组标题不是移动目标,请展开分组后拖到具体文件夹/文档上落位");
|
|
1189
|
+
return;
|
|
1190
|
+
} else {
|
|
1190
1191
|
const z = $, Z = nn(Xe, z);
|
|
1191
1192
|
if (h && (Z != null && Z.userId) && h !== Z.userId) {
|
|
1192
|
-
|
|
1193
|
+
K.warning("不能将笔记移动到其他人的目录下");
|
|
1193
1194
|
return;
|
|
1194
1195
|
}
|
|
1195
1196
|
if (!s.dropToGap)
|
|
1196
1197
|
W = z;
|
|
1197
1198
|
else {
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1199
|
+
const J = ia(Xe, z);
|
|
1200
|
+
if (J && J.type === "owner")
|
|
1201
|
+
W = Ce;
|
|
1202
|
+
else if (J && J.type === "group") {
|
|
1203
|
+
K.info("拖到分组内两行之间不会移动,请直接拖到目标文件夹/文档上落位");
|
|
1204
|
+
return;
|
|
1205
|
+
} else
|
|
1206
|
+
W = J ? J.id : Ce;
|
|
1200
1207
|
}
|
|
1201
1208
|
}
|
|
1202
1209
|
if (!yt(W, c))
|
|
1203
1210
|
try {
|
|
1204
|
-
await $r(c, { parentId: W, sortOrder: 0 }, r), await
|
|
1211
|
+
await $r(c, { parentId: W, sortOrder: 0 }, r), await we(), K.success("已移动");
|
|
1205
1212
|
} catch {
|
|
1206
|
-
|
|
1213
|
+
K.error("移动失败");
|
|
1207
1214
|
}
|
|
1208
1215
|
},
|
|
1209
|
-
[r, Xe,
|
|
1216
|
+
[r, Xe, we]
|
|
1210
1217
|
), La = B(
|
|
1211
1218
|
() => Qe.replace(/\s/g, "").length,
|
|
1212
1219
|
[Qe]
|
|
@@ -1214,14 +1221,14 @@ function rd({
|
|
|
1214
1221
|
(s) => {
|
|
1215
1222
|
var Z;
|
|
1216
1223
|
if (Lt(s.key)) {
|
|
1217
|
-
const
|
|
1224
|
+
const J = ((Z = s.children) == null ? void 0 : Z.length) ?? 0;
|
|
1218
1225
|
return /* @__PURE__ */ y("span", { className: d.groupHeader, children: [
|
|
1219
1226
|
/* @__PURE__ */ o("span", { className: d.groupLabel, title: s.title, children: s.title }),
|
|
1220
|
-
/* @__PURE__ */ o("span", { className: d.groupCount, children:
|
|
1227
|
+
/* @__PURE__ */ o("span", { className: d.groupCount, children: J })
|
|
1221
1228
|
] });
|
|
1222
1229
|
}
|
|
1223
1230
|
if (tt(s.key) || s.type === "owner") {
|
|
1224
|
-
const
|
|
1231
|
+
const J = s.userId;
|
|
1225
1232
|
return /* @__PURE__ */ o($t, { menu: {
|
|
1226
1233
|
items: [
|
|
1227
1234
|
{
|
|
@@ -1230,9 +1237,9 @@ function rd({
|
|
|
1230
1237
|
label: "新建文件夹",
|
|
1231
1238
|
onClick: () => {
|
|
1232
1239
|
Ae({
|
|
1233
|
-
parentId:
|
|
1240
|
+
parentId: Ce,
|
|
1234
1241
|
type: "folder",
|
|
1235
|
-
ownerUserId:
|
|
1242
|
+
ownerUserId: J
|
|
1236
1243
|
}), Ie("");
|
|
1237
1244
|
}
|
|
1238
1245
|
},
|
|
@@ -1242,9 +1249,9 @@ function rd({
|
|
|
1242
1249
|
label: "新建文档",
|
|
1243
1250
|
onClick: () => {
|
|
1244
1251
|
Ae({
|
|
1245
|
-
parentId:
|
|
1252
|
+
parentId: Ce,
|
|
1246
1253
|
type: "note",
|
|
1247
|
-
ownerUserId:
|
|
1254
|
+
ownerUserId: J
|
|
1248
1255
|
}), Ie("");
|
|
1249
1256
|
}
|
|
1250
1257
|
}
|
|
@@ -1254,7 +1261,7 @@ function rd({
|
|
|
1254
1261
|
/* @__PURE__ */ o("span", { className: d.treeLabel, children: s.title })
|
|
1255
1262
|
] }) });
|
|
1256
1263
|
}
|
|
1257
|
-
const c = s.id, p = s.type, h = s.title, $ = ge.find((
|
|
1264
|
+
const c = s.id, p = s.type, h = s.title, $ = ge.find((J) => J.id === c), W = ye.has(String(c));
|
|
1258
1265
|
return /* @__PURE__ */ o($t, { menu: {
|
|
1259
1266
|
items: [
|
|
1260
1267
|
{
|
|
@@ -1452,7 +1459,7 @@ function rd({
|
|
|
1452
1459
|
title: "新建文档",
|
|
1453
1460
|
onClick: () => {
|
|
1454
1461
|
Ae({
|
|
1455
|
-
parentId: b ??
|
|
1462
|
+
parentId: b ?? Ce,
|
|
1456
1463
|
type: "note",
|
|
1457
1464
|
ownerUserId: b == null ? x ?? void 0 : void 0
|
|
1458
1465
|
}), Ie("");
|
|
@@ -1469,7 +1476,7 @@ function rd({
|
|
|
1469
1476
|
title: "新建文件夹",
|
|
1470
1477
|
onClick: () => {
|
|
1471
1478
|
Ae({
|
|
1472
|
-
parentId: b ??
|
|
1479
|
+
parentId: b ?? Ce,
|
|
1473
1480
|
type: "folder",
|
|
1474
1481
|
ownerUserId: b == null ? x ?? void 0 : void 0
|
|
1475
1482
|
}), Ie("");
|
|
@@ -1486,13 +1493,13 @@ function rd({
|
|
|
1486
1493
|
].map((s) => /* @__PURE__ */ o(
|
|
1487
1494
|
"button",
|
|
1488
1495
|
{
|
|
1489
|
-
className: `${d.tagChip} ${
|
|
1490
|
-
onClick: () => T(
|
|
1496
|
+
className: `${d.tagChip} ${V === s.key ? d.tagChipActive : ""}`,
|
|
1497
|
+
onClick: () => T(V === s.key ? "all" : s.key),
|
|
1491
1498
|
children: s.label
|
|
1492
1499
|
},
|
|
1493
1500
|
s.key
|
|
1494
1501
|
)) }) }),
|
|
1495
|
-
/* @__PURE__ */ o("div", { className: d.treeWrap, children:
|
|
1502
|
+
/* @__PURE__ */ o("div", { className: d.treeWrap, children: G === "all" ? (
|
|
1496
1503
|
/* ── 全部文档(语雀的「全部文档」清单视图)── */
|
|
1497
1504
|
Cn.length === 0 ? /* @__PURE__ */ o("div", { className: d.emptyHint, children: X ? "没有匹配的文档" : "还没有文档" }) : /* @__PURE__ */ o("div", { className: d.docList, children: Cn.map((s) => /* @__PURE__ */ y(
|
|
1498
1505
|
"div",
|
|
@@ -1514,7 +1521,7 @@ function rd({
|
|
|
1514
1521
|
},
|
|
1515
1522
|
s.node.id
|
|
1516
1523
|
)) })
|
|
1517
|
-
) :
|
|
1524
|
+
) : G === "fav" ? (
|
|
1518
1525
|
/* ── 收藏夹 ── */
|
|
1519
1526
|
Nn.length === 0 ? /* @__PURE__ */ o("div", { className: d.emptyHint, children: X ? "没有匹配的收藏" : "还没有收藏" }) : /* @__PURE__ */ o("div", { className: d.docList, children: Nn.map((s) => /* @__PURE__ */ y(
|
|
1520
1527
|
"div",
|
|
@@ -1575,7 +1582,7 @@ function rd({
|
|
|
1575
1582
|
"button",
|
|
1576
1583
|
{
|
|
1577
1584
|
type: "button",
|
|
1578
|
-
className: `${d.railFootBtn} ${
|
|
1585
|
+
className: `${d.railFootBtn} ${G === "all" ? d.railFootBtnActive : ""}`,
|
|
1579
1586
|
title: "全部文档",
|
|
1580
1587
|
onClick: () => he((s) => s === "all" ? "tree" : "all"),
|
|
1581
1588
|
children: [
|
|
@@ -1589,7 +1596,7 @@ function rd({
|
|
|
1589
1596
|
"button",
|
|
1590
1597
|
{
|
|
1591
1598
|
type: "button",
|
|
1592
|
-
className: `${d.railFootBtn} ${
|
|
1599
|
+
className: `${d.railFootBtn} ${G === "fav" ? d.railFootBtnActive : ""}`,
|
|
1593
1600
|
title: "收藏夹",
|
|
1594
1601
|
onClick: () => he((s) => s === "fav" ? "tree" : "fav"),
|
|
1595
1602
|
children: [
|
|
@@ -2024,7 +2031,7 @@ function rd({
|
|
|
2024
2031
|
title: "新建文档",
|
|
2025
2032
|
onClick: () => {
|
|
2026
2033
|
Ae({
|
|
2027
|
-
parentId: b ??
|
|
2034
|
+
parentId: b ?? Ce,
|
|
2028
2035
|
type: "note",
|
|
2029
2036
|
ownerUserId: b == null ? x ?? void 0 : void 0
|
|
2030
2037
|
}), Ie("");
|
|
@@ -2686,7 +2693,7 @@ function Ee({
|
|
|
2686
2693
|
const t = ne(null), a = ne(null), r = ne(e);
|
|
2687
2694
|
r.current = e;
|
|
2688
2695
|
const i = ne(null);
|
|
2689
|
-
return
|
|
2696
|
+
return Y(() => {
|
|
2690
2697
|
const l = t.current;
|
|
2691
2698
|
if (!l) return;
|
|
2692
2699
|
let u = !1, m = 0;
|
|
@@ -2722,7 +2729,7 @@ function Ee({
|
|
|
2722
2729
|
}), b.observe(l)), () => {
|
|
2723
2730
|
u = !0, cancelAnimationFrame(m), window.removeEventListener("resize", g), b == null || b.disconnect();
|
|
2724
2731
|
};
|
|
2725
|
-
}, [e]),
|
|
2732
|
+
}, [e]), Y(
|
|
2726
2733
|
() => () => {
|
|
2727
2734
|
var l;
|
|
2728
2735
|
(l = a.current) == null || l.dispose(), a.current = null;
|
|
@@ -3063,8 +3070,8 @@ function lu({
|
|
|
3063
3070
|
var D;
|
|
3064
3071
|
return Number(((D = u.get(S)) == null ? void 0 : D.doneCount) || 0);
|
|
3065
3072
|
}), k = i.map((S) => {
|
|
3066
|
-
var
|
|
3067
|
-
const D = Number(((
|
|
3073
|
+
var j, Q;
|
|
3074
|
+
const D = Number(((j = u.get(S)) == null ? void 0 : j.createdCount) || 0), P = Number(((Q = u.get(S)) == null ? void 0 : Q.doneCount) || 0);
|
|
3068
3075
|
return Math.max(0, D - P);
|
|
3069
3076
|
}), x = {
|
|
3070
3077
|
tooltip: {
|
|
@@ -3604,13 +3611,13 @@ function sc({
|
|
|
3604
3611
|
}) {
|
|
3605
3612
|
const [g, b] = I(
|
|
3606
3613
|
jn[n]
|
|
3607
|
-
), [k, x] = I([]), [S, D] = I(""), [P,
|
|
3614
|
+
), [k, x] = I([]), [S, D] = I(""), [P, j] = I(!1), [Q, M] = I(null), ae = B(() => {
|
|
3608
3615
|
var T;
|
|
3609
3616
|
const A = oc[n], re = (m == null ? void 0 : m.total) ?? 0;
|
|
3610
|
-
let
|
|
3617
|
+
let V = [];
|
|
3611
3618
|
if (n === "kpi") {
|
|
3612
3619
|
const f = (T = m == null ? void 0 : m.ranking) == null ? void 0 : T[0], L = m == null ? void 0 : m.tagCoverage;
|
|
3613
|
-
|
|
3620
|
+
V = [
|
|
3614
3621
|
{ label: "工单总量", value: re },
|
|
3615
3622
|
{
|
|
3616
3623
|
label: "日均工单量",
|
|
@@ -3624,32 +3631,32 @@ function sc({
|
|
|
3624
3631
|
{ label: "活跃创建人", value: (m == null ? void 0 : m.activeCreators) ?? 0 }
|
|
3625
3632
|
];
|
|
3626
3633
|
} else if (n === "trend")
|
|
3627
|
-
|
|
3634
|
+
V = ((m == null ? void 0 : m.trend) ?? []).map((f) => ({
|
|
3628
3635
|
date: f.date,
|
|
3629
3636
|
count: f.count
|
|
3630
3637
|
}));
|
|
3631
3638
|
else if (n === "ranking")
|
|
3632
|
-
|
|
3639
|
+
V = ((m == null ? void 0 : m.ranking) ?? []).map((f) => ({
|
|
3633
3640
|
key: f.key || "未设置",
|
|
3634
3641
|
count: f.count,
|
|
3635
3642
|
ratio: Gn(Number(f.count || 0), re)
|
|
3636
3643
|
}));
|
|
3637
3644
|
else {
|
|
3638
|
-
const f = (m == null ? void 0 : m.creatorDistribution) ?? [], L = f.reduce((
|
|
3639
|
-
|
|
3640
|
-
key:
|
|
3641
|
-
count:
|
|
3642
|
-
ratio: Gn(Number(
|
|
3645
|
+
const f = (m == null ? void 0 : m.creatorDistribution) ?? [], L = f.reduce((G, he) => G + Number(he.count || 0), 0);
|
|
3646
|
+
V = f.map((G) => ({
|
|
3647
|
+
key: G.key || "未设置",
|
|
3648
|
+
count: G.count,
|
|
3649
|
+
ratio: Gn(Number(G.count || 0), L)
|
|
3643
3650
|
}));
|
|
3644
3651
|
}
|
|
3645
|
-
return { columns: A, rows:
|
|
3652
|
+
return { columns: A, rows: V };
|
|
3646
3653
|
}, [n, m]), pe = B(
|
|
3647
3654
|
() => g === "detail" ? Vn : ae.columns,
|
|
3648
3655
|
[g, ae.columns]
|
|
3649
3656
|
);
|
|
3650
|
-
|
|
3657
|
+
Y(() => {
|
|
3651
3658
|
e && (x(pe.map((A) => A.key)), M(null));
|
|
3652
|
-
}, [e, n, g, pe]),
|
|
3659
|
+
}, [e, n, g, pe]), Y(() => {
|
|
3653
3660
|
if (!e) return;
|
|
3654
3661
|
const A = g === "detail" ? "工单明细" : rc[n], re = N.startDate && N.endDate ? `_${Jn(N.startDate)}-${Jn(
|
|
3655
3662
|
N.endDate
|
|
@@ -3662,31 +3669,31 @@ function sc({
|
|
|
3662
3669
|
a,
|
|
3663
3670
|
N.startDate,
|
|
3664
3671
|
N.endDate
|
|
3665
|
-
]),
|
|
3672
|
+
]), Y(() => {
|
|
3666
3673
|
e && b(jn[n]);
|
|
3667
3674
|
}, [e, n]);
|
|
3668
|
-
const ee = pe.map((A) => A.key), de = k.length === ee.length && ee.length > 0,
|
|
3675
|
+
const ee = pe.map((A) => A.key), de = k.length === ee.length && ee.length > 0, Se = () => {
|
|
3669
3676
|
x(de ? ee.slice(0, 1) : ee);
|
|
3670
|
-
}, ue = ae.rows.length, me = g === "aggregate" ? `预计导出 ${ue} 行` :
|
|
3677
|
+
}, ue = ae.rows.length, me = g === "aggregate" ? `预计导出 ${ue} 行` : Q ? `共 ${Q.total} 行${Q.truncated ? "(受安全上限,最多 10000 行)" : ""}` : "点击导出后拉取全量数据", be = async () => {
|
|
3671
3678
|
if (k.length === 0) {
|
|
3672
|
-
|
|
3679
|
+
K.warning("请至少选择一列导出字段");
|
|
3673
3680
|
return;
|
|
3674
3681
|
}
|
|
3675
|
-
|
|
3682
|
+
j(!0);
|
|
3676
3683
|
try {
|
|
3677
3684
|
if (g === "aggregate") {
|
|
3678
3685
|
const A = ae.columns.filter((re) => k.includes(re.key));
|
|
3679
|
-
qn(S, Hn(Kn(A), ae.rows)),
|
|
3686
|
+
qn(S, Hn(Kn(A), ae.rows)), K.success("导出成功"), t();
|
|
3680
3687
|
} else {
|
|
3681
3688
|
const A = await Vs(N);
|
|
3682
3689
|
M({ total: A.total, truncated: A.truncated });
|
|
3683
|
-
const re = A.headers.length ? A.headers : Vn,
|
|
3684
|
-
qn(S, Hn(Kn(T), A.rows)),
|
|
3690
|
+
const re = A.headers.length ? A.headers : Vn, V = re.filter((f) => k.includes(f.key)).map((f) => ({ key: f.key, label: f.label })), T = V.length ? V : re.map((f) => ({ key: f.key, label: f.label }));
|
|
3691
|
+
qn(S, Hn(Kn(T), A.rows)), K.success("导出成功"), A.truncated ? K.warning("导出结果已达安全上限,仅包含前 10000 行") : t();
|
|
3685
3692
|
}
|
|
3686
3693
|
} catch (A) {
|
|
3687
|
-
|
|
3694
|
+
K.error((A == null ? void 0 : A.userMessage) ?? (A == null ? void 0 : A.message) ?? "导出失败");
|
|
3688
3695
|
} finally {
|
|
3689
|
-
|
|
3696
|
+
j(!1);
|
|
3690
3697
|
}
|
|
3691
3698
|
};
|
|
3692
3699
|
return /* @__PURE__ */ y(
|
|
@@ -3758,7 +3765,7 @@ function sc({
|
|
|
3758
3765
|
/* @__PURE__ */ y("div", { className: F.section, children: [
|
|
3759
3766
|
/* @__PURE__ */ y("div", { className: F.fieldHeader, children: [
|
|
3760
3767
|
/* @__PURE__ */ o("span", { className: F.sectionTitle, style: { marginBottom: 0 }, children: "导出字段" }),
|
|
3761
|
-
/* @__PURE__ */ o("span", { className: F.fieldLink, onClick:
|
|
3768
|
+
/* @__PURE__ */ o("span", { className: F.fieldLink, onClick: Se, children: de ? "取消" : "全选" })
|
|
3762
3769
|
] }),
|
|
3763
3770
|
/* @__PURE__ */ o("div", { className: F.fieldGroup, children: /* @__PURE__ */ o(
|
|
3764
3771
|
ir.Group,
|
|
@@ -3846,8 +3853,8 @@ function zc({
|
|
|
3846
3853
|
}) {
|
|
3847
3854
|
const N = (e == null ? void 0 : e.trend) ?? [], g = (e == null ? void 0 : e.ranking) ?? [], b = (e == null ? void 0 : e.creatorDistribution) ?? [], k = B(() => {
|
|
3848
3855
|
const D = N.map((P) => {
|
|
3849
|
-
var
|
|
3850
|
-
return ((
|
|
3856
|
+
var j;
|
|
3857
|
+
return ((j = P.date) == null ? void 0 : j.slice(5)) || "";
|
|
3851
3858
|
});
|
|
3852
3859
|
return {
|
|
3853
3860
|
tooltip: { ...Qt, axisPointer: { type: "line" } },
|
|
@@ -3897,7 +3904,7 @@ function zc({
|
|
|
3897
3904
|
]
|
|
3898
3905
|
};
|
|
3899
3906
|
}, [N]), x = B(() => {
|
|
3900
|
-
const P = [...g.slice(0, Bc)].reverse(),
|
|
3907
|
+
const P = [...g.slice(0, Bc)].reverse(), j = Math.max(P.length - 1, 1);
|
|
3901
3908
|
return {
|
|
3902
3909
|
tooltip: { ...Qt, axisPointer: { type: "shadow" } },
|
|
3903
3910
|
grid: { left: 8, right: 44, top: 8, bottom: 8, containLabel: !0 },
|
|
@@ -3908,7 +3915,7 @@ function zc({
|
|
|
3908
3915
|
},
|
|
3909
3916
|
yAxis: {
|
|
3910
3917
|
type: "category",
|
|
3911
|
-
data: P.map((
|
|
3918
|
+
data: P.map((Q) => Q.key || "未设置"),
|
|
3912
3919
|
axisLabel: {
|
|
3913
3920
|
...At,
|
|
3914
3921
|
fontSize: 11,
|
|
@@ -3923,11 +3930,11 @@ function zc({
|
|
|
3923
3930
|
name: "工单数",
|
|
3924
3931
|
type: "bar",
|
|
3925
3932
|
barMaxWidth: 14,
|
|
3926
|
-
data: P.map((
|
|
3927
|
-
value: Number(
|
|
3933
|
+
data: P.map((Q, M) => ({
|
|
3934
|
+
value: Number(Q.count || 0),
|
|
3928
3935
|
// 倒序后 idx 越大名次越高,故用 idx/size 反推渐变位置
|
|
3929
3936
|
itemStyle: {
|
|
3930
|
-
color: Uc(pt[2], pt[0], M /
|
|
3937
|
+
color: Uc(pt[2], pt[0], M / j)
|
|
3931
3938
|
}
|
|
3932
3939
|
})),
|
|
3933
3940
|
label: {
|
|
@@ -3945,9 +3952,9 @@ function zc({
|
|
|
3945
3952
|
), P = D.slice(0, Dt).map((M) => ({
|
|
3946
3953
|
name: M.key || "未设置",
|
|
3947
3954
|
value: Number(M.count || 0)
|
|
3948
|
-
})),
|
|
3949
|
-
|
|
3950
|
-
const
|
|
3955
|
+
})), j = D.slice(Dt).reduce((M, ae) => M + Number(ae.count || 0), 0);
|
|
3956
|
+
j > 0 && P.push({ name: "其他", value: j });
|
|
3957
|
+
const Q = (e == null ? void 0 : e.total) ?? 0;
|
|
3951
3958
|
return {
|
|
3952
3959
|
color: pt,
|
|
3953
3960
|
tooltip: {
|
|
@@ -3966,7 +3973,7 @@ function zc({
|
|
|
3966
3973
|
},
|
|
3967
3974
|
// 环心回显总量,让分布图同时承担「总量锚点」的读数作用
|
|
3968
3975
|
title: {
|
|
3969
|
-
text: Ve(
|
|
3976
|
+
text: Ve(Q),
|
|
3970
3977
|
subtext: "工单总量",
|
|
3971
3978
|
left: "34%",
|
|
3972
3979
|
top: "42%",
|
|
@@ -4114,12 +4121,12 @@ function ul({
|
|
|
4114
4121
|
);
|
|
4115
4122
|
},
|
|
4116
4123
|
[t]
|
|
4117
|
-
),
|
|
4124
|
+
), j = R(
|
|
4118
4125
|
(M) => {
|
|
4119
4126
|
l(""), n == null || n(M || void 0);
|
|
4120
4127
|
},
|
|
4121
4128
|
[n]
|
|
4122
|
-
),
|
|
4129
|
+
), Q = R((M) => {
|
|
4123
4130
|
m(M);
|
|
4124
4131
|
}, []);
|
|
4125
4132
|
return /* @__PURE__ */ o(
|
|
@@ -4132,7 +4139,7 @@ function ul({
|
|
|
4132
4139
|
style: r,
|
|
4133
4140
|
loading: a,
|
|
4134
4141
|
value: e,
|
|
4135
|
-
onChange:
|
|
4142
|
+
onChange: j,
|
|
4136
4143
|
treeData: k,
|
|
4137
4144
|
className: Te.deptSelect,
|
|
4138
4145
|
dropdownClassName: Te.deptDropdown,
|
|
@@ -4142,7 +4149,7 @@ function ul({
|
|
|
4142
4149
|
onSearch: P,
|
|
4143
4150
|
onDropdownVisibleChange: D,
|
|
4144
4151
|
treeExpandedKeys: S,
|
|
4145
|
-
onTreeExpand:
|
|
4152
|
+
onTreeExpand: Q,
|
|
4146
4153
|
switcherIcon: il,
|
|
4147
4154
|
virtual: !1,
|
|
4148
4155
|
listHeight: 320,
|
|
@@ -4221,12 +4228,12 @@ function _l({
|
|
|
4221
4228
|
tagDefs: S,
|
|
4222
4229
|
selectedTags: D,
|
|
4223
4230
|
setTag: P,
|
|
4224
|
-
savedFilters:
|
|
4225
|
-
onSaveFilter:
|
|
4231
|
+
savedFilters: j,
|
|
4232
|
+
onSaveFilter: Q,
|
|
4226
4233
|
onDeleteFilter: M,
|
|
4227
4234
|
onLoadFilter: ae
|
|
4228
4235
|
}) {
|
|
4229
|
-
const [pe, ee] = I(), [de,
|
|
4236
|
+
const [pe, ee] = I(), [de, Se] = I(!1), [ue, me] = I(""), be = {
|
|
4230
4237
|
今日: [Ne().startOf("day"), Ne().endOf("day")],
|
|
4231
4238
|
近三天: [Ne().subtract(2, "day").startOf("day"), Ne().endOf("day")],
|
|
4232
4239
|
本周: [Ne().startOf("week"), Ne().endOf("day")],
|
|
@@ -4234,9 +4241,9 @@ function _l({
|
|
|
4234
4241
|
}, A = S.filter((f) => f.values.length > 0), re = R(
|
|
4235
4242
|
(f) => l(f || void 0),
|
|
4236
4243
|
[l]
|
|
4237
|
-
),
|
|
4244
|
+
), V = () => {
|
|
4238
4245
|
const f = ue.trim();
|
|
4239
|
-
f && (
|
|
4246
|
+
f && (Q(f), Se(!1), me(""));
|
|
4240
4247
|
}, T = (f) => {
|
|
4241
4248
|
je.confirm({
|
|
4242
4249
|
title: "确认删除",
|
|
@@ -4330,7 +4337,7 @@ function _l({
|
|
|
4330
4337
|
onChange: (f) => {
|
|
4331
4338
|
ee(f || void 0), f && ae(f);
|
|
4332
4339
|
},
|
|
4333
|
-
children:
|
|
4340
|
+
children: j.map((f) => /* @__PURE__ */ o(at.Option, { value: f.id, label: f.name, children: /* @__PURE__ */ y("div", { className: O.savedOption, children: [
|
|
4334
4341
|
/* @__PURE__ */ o("span", { className: O.savedOptionName, children: f.name }),
|
|
4335
4342
|
/* @__PURE__ */ o(
|
|
4336
4343
|
Zt,
|
|
@@ -4353,7 +4360,7 @@ function _l({
|
|
|
4353
4360
|
size: "small",
|
|
4354
4361
|
icon: /* @__PURE__ */ o(nr, {}),
|
|
4355
4362
|
disabled: !e,
|
|
4356
|
-
onClick: () =>
|
|
4363
|
+
onClick: () => Se(!0),
|
|
4357
4364
|
children: "保存当前"
|
|
4358
4365
|
}
|
|
4359
4366
|
) }),
|
|
@@ -4379,8 +4386,8 @@ function _l({
|
|
|
4379
4386
|
cancelText: "取消",
|
|
4380
4387
|
okButtonProps: { disabled: !ue.trim(), size: "small" },
|
|
4381
4388
|
cancelButtonProps: { size: "small" },
|
|
4382
|
-
onOk:
|
|
4383
|
-
onCancel: () =>
|
|
4389
|
+
onOk: V,
|
|
4390
|
+
onCancel: () => Se(!1),
|
|
4384
4391
|
destroyOnClose: !0,
|
|
4385
4392
|
width: 360,
|
|
4386
4393
|
className: O.saveModal,
|
|
@@ -4393,7 +4400,7 @@ function _l({
|
|
|
4393
4400
|
placeholder: "条件名称,如「核心团队近 30 天」",
|
|
4394
4401
|
value: ue,
|
|
4395
4402
|
onChange: (f) => me(f.target.value),
|
|
4396
|
-
onPressEnter:
|
|
4403
|
+
onPressEnter: V
|
|
4397
4404
|
}
|
|
4398
4405
|
)
|
|
4399
4406
|
}
|
|
@@ -4469,8 +4476,8 @@ const ht = "creator", Yn = "day", vl = "department", Qn = () => [
|
|
|
4469
4476
|
];
|
|
4470
4477
|
function Sl(e = "", n = "admin") {
|
|
4471
4478
|
var Fe;
|
|
4472
|
-
const [t, a] = I(), [r, i] = I(), [l, u] = I(Qn), [m, N] = I(ht), [g, b] = I(), [k, x] = I([]), [S, D] = I([]), [P,
|
|
4473
|
-
|
|
4479
|
+
const [t, a] = I(), [r, i] = I(), [l, u] = I(Qn), [m, N] = I(ht), [g, b] = I(), [k, x] = I([]), [S, D] = I([]), [P, j] = I(!1), [Q, M] = I([]), [ae, pe] = I(!1), [ee, de] = I(null), [Se, ue] = I(!1), me = ne({});
|
|
4480
|
+
Y(() => {
|
|
4474
4481
|
let H = !1;
|
|
4475
4482
|
return gr(e).then((fe) => {
|
|
4476
4483
|
if (H) return;
|
|
@@ -4484,18 +4491,18 @@ function Sl(e = "", n = "admin") {
|
|
|
4484
4491
|
}), () => {
|
|
4485
4492
|
H = !0;
|
|
4486
4493
|
};
|
|
4487
|
-
}, [e, n]),
|
|
4494
|
+
}, [e, n]), Y(() => {
|
|
4488
4495
|
let H = !1;
|
|
4489
|
-
return
|
|
4496
|
+
return j(!0), qs(void 0, e).then((fe) => {
|
|
4490
4497
|
H || D(Array.isArray(fe) ? fe : []);
|
|
4491
4498
|
}).catch(() => {
|
|
4492
4499
|
H || D([]);
|
|
4493
4500
|
}).finally(() => {
|
|
4494
|
-
H ||
|
|
4501
|
+
H || j(!1);
|
|
4495
4502
|
}), () => {
|
|
4496
4503
|
H = !0;
|
|
4497
4504
|
};
|
|
4498
|
-
}, [e]),
|
|
4505
|
+
}, [e]), Y(() => {
|
|
4499
4506
|
let H = !1;
|
|
4500
4507
|
return pe(!0), (async () => {
|
|
4501
4508
|
const te = await Gs(e), U = Array.isArray(te) ? te : [];
|
|
@@ -4513,7 +4520,7 @@ function Sl(e = "", n = "admin") {
|
|
|
4513
4520
|
}), () => {
|
|
4514
4521
|
H = !0;
|
|
4515
4522
|
};
|
|
4516
|
-
}, [e, n]),
|
|
4523
|
+
}, [e, n]), Y(() => {
|
|
4517
4524
|
i(void 0);
|
|
4518
4525
|
}, [g]);
|
|
4519
4526
|
const be = B(
|
|
@@ -4523,13 +4530,13 @@ function Sl(e = "", n = "admin") {
|
|
|
4523
4530
|
})),
|
|
4524
4531
|
[S]
|
|
4525
4532
|
), A = B(
|
|
4526
|
-
() => wl(
|
|
4527
|
-
[
|
|
4533
|
+
() => wl(Q),
|
|
4534
|
+
[Q]
|
|
4528
4535
|
), re = B(() => {
|
|
4529
4536
|
if (!g || !A.hasStaff) return be;
|
|
4530
4537
|
const H = A.byDept.get(g);
|
|
4531
4538
|
return H ? be.filter((fe) => H.has(fe.value)) : be;
|
|
4532
|
-
}, [be, A, g]),
|
|
4539
|
+
}, [be, A, g]), V = l ? l[0].format("YYYY-MM-DD") : void 0, T = l ? l[1].format("YYYY-MM-DD") : void 0, f = ne(0), L = R(
|
|
4533
4540
|
async (H) => {
|
|
4534
4541
|
if (!t) {
|
|
4535
4542
|
de(null);
|
|
@@ -4540,7 +4547,7 @@ function Sl(e = "", n = "admin") {
|
|
|
4540
4547
|
try {
|
|
4541
4548
|
const U = await On({
|
|
4542
4549
|
scenarioCode: t,
|
|
4543
|
-
startDate:
|
|
4550
|
+
startDate: V,
|
|
4544
4551
|
endDate: T,
|
|
4545
4552
|
creatorId: r,
|
|
4546
4553
|
tagFilters: te,
|
|
@@ -4556,7 +4563,7 @@ function Sl(e = "", n = "admin") {
|
|
|
4556
4563
|
try {
|
|
4557
4564
|
const ge = await On({
|
|
4558
4565
|
scenarioCode: t,
|
|
4559
|
-
startDate:
|
|
4566
|
+
startDate: V,
|
|
4560
4567
|
endDate: T,
|
|
4561
4568
|
creatorId: r,
|
|
4562
4569
|
tagFilters: te,
|
|
@@ -4581,14 +4588,14 @@ function Sl(e = "", n = "admin") {
|
|
|
4581
4588
|
});
|
|
4582
4589
|
} catch (U) {
|
|
4583
4590
|
if (fe !== f.current) return;
|
|
4584
|
-
de(null),
|
|
4591
|
+
de(null), K.warning((U == null ? void 0 : U.userMessage) ?? (U == null ? void 0 : U.message) ?? "业务指标查询失败");
|
|
4585
4592
|
} finally {
|
|
4586
4593
|
fe === f.current && ue(!1);
|
|
4587
4594
|
}
|
|
4588
4595
|
},
|
|
4589
4596
|
[
|
|
4590
4597
|
t,
|
|
4591
|
-
|
|
4598
|
+
V,
|
|
4592
4599
|
T,
|
|
4593
4600
|
r,
|
|
4594
4601
|
m,
|
|
@@ -4596,8 +4603,8 @@ function Sl(e = "", n = "admin") {
|
|
|
4596
4603
|
n,
|
|
4597
4604
|
e
|
|
4598
4605
|
]
|
|
4599
|
-
),
|
|
4600
|
-
|
|
4606
|
+
), G = ne(L);
|
|
4607
|
+
G.current = L;
|
|
4601
4608
|
const he = R(() => {
|
|
4602
4609
|
i(void 0), u(Qn()), N(ht);
|
|
4603
4610
|
}, []), X = ((Fe = ee == null ? void 0 : ee.trend) == null ? void 0 : Fe.length) ?? 0;
|
|
@@ -4613,21 +4620,21 @@ function Sl(e = "", n = "admin") {
|
|
|
4613
4620
|
setGroupBy: N,
|
|
4614
4621
|
deptId: g,
|
|
4615
4622
|
setDeptId: b,
|
|
4616
|
-
startDate:
|
|
4623
|
+
startDate: V,
|
|
4617
4624
|
endDate: T,
|
|
4618
4625
|
/* 下拉数据源 */
|
|
4619
4626
|
scenarioOptions: k,
|
|
4620
4627
|
memberOptions: re,
|
|
4621
4628
|
memberLoading: P,
|
|
4622
|
-
deptTreeData:
|
|
4629
|
+
deptTreeData: Q,
|
|
4623
4630
|
deptTreeLoading: ae,
|
|
4624
4631
|
/* 查询结果 */
|
|
4625
4632
|
data: ee,
|
|
4626
|
-
loading:
|
|
4633
|
+
loading: Se,
|
|
4627
4634
|
days: X,
|
|
4628
4635
|
/* 行为 */
|
|
4629
4636
|
load: L,
|
|
4630
|
-
loadRef:
|
|
4637
|
+
loadRef: G,
|
|
4631
4638
|
reset: he,
|
|
4632
4639
|
tagFiltersRef: me
|
|
4633
4640
|
};
|
|
@@ -4680,7 +4687,7 @@ function Xn(e) {
|
|
|
4680
4687
|
}
|
|
4681
4688
|
function kl() {
|
|
4682
4689
|
const [e, n] = I([]);
|
|
4683
|
-
|
|
4690
|
+
Y(() => {
|
|
4684
4691
|
n(Tl());
|
|
4685
4692
|
}, []);
|
|
4686
4693
|
const t = R((i, l) => {
|
|
@@ -4724,7 +4731,7 @@ function xl(e, n = "", t = "admin") {
|
|
|
4724
4731
|
tagDefs: Rt,
|
|
4725
4732
|
selectedTags: Ot
|
|
4726
4733
|
}), [i, l] = I(!1);
|
|
4727
|
-
|
|
4734
|
+
Y(() => {
|
|
4728
4735
|
if (!e) {
|
|
4729
4736
|
r({ tagDefs: Rt, selectedTags: Ot });
|
|
4730
4737
|
return;
|
|
@@ -4782,7 +4789,7 @@ const Xt = (e) => e.replace(/\s*\(.*?\)\s*$/, "");
|
|
|
4782
4789
|
function gu({
|
|
4783
4790
|
source: e = "admin"
|
|
4784
4791
|
} = {}) {
|
|
4785
|
-
var
|
|
4792
|
+
var V;
|
|
4786
4793
|
const n = ea((T) => T.token) || "", t = Sl(n, e), {
|
|
4787
4794
|
tagDefs: a,
|
|
4788
4795
|
selectedTags: r,
|
|
@@ -4803,15 +4810,15 @@ function gu({
|
|
|
4803
4810
|
() => b.some((T) => T.value === t.groupBy),
|
|
4804
4811
|
[b, t.groupBy]
|
|
4805
4812
|
);
|
|
4806
|
-
|
|
4813
|
+
Y(() => {
|
|
4807
4814
|
k || t.setGroupBy(Yn);
|
|
4808
4815
|
}, [k, t.setGroupBy]);
|
|
4809
4816
|
const x = ne(null), S = ne(!1);
|
|
4810
|
-
|
|
4817
|
+
Y(() => {
|
|
4811
4818
|
l && (S.current = !0);
|
|
4812
4819
|
}, [l]);
|
|
4813
4820
|
const D = ne(null);
|
|
4814
|
-
|
|
4821
|
+
Y(() => {
|
|
4815
4822
|
D.current && clearTimeout(D.current), D.current = setTimeout(() => {
|
|
4816
4823
|
const T = x.current;
|
|
4817
4824
|
T && Object.keys(T).length > 0 || t.loadRef.current();
|
|
@@ -4824,16 +4831,16 @@ function gu({
|
|
|
4824
4831
|
t.deptId,
|
|
4825
4832
|
r,
|
|
4826
4833
|
t.loadRef
|
|
4827
|
-
]),
|
|
4834
|
+
]), Y(() => {
|
|
4828
4835
|
t.loadRef.current();
|
|
4829
|
-
}, [t.groupBy, t.loadRef]),
|
|
4836
|
+
}, [t.groupBy, t.loadRef]), Y(() => {
|
|
4830
4837
|
const T = x.current;
|
|
4831
4838
|
!T || l || !S.current || (x.current = null, S.current = !1, Object.entries(T).forEach(([f, L]) => i(f, L)));
|
|
4832
4839
|
}, [l, a, i]);
|
|
4833
|
-
const P = ((
|
|
4834
|
-
|
|
4840
|
+
const P = ((V = b.find((T) => T.value === t.groupBy)) == null ? void 0 : V.label) ?? "按日期", [j, Q] = I({ open: !1, source: "kpi" }), M = R((T) => {
|
|
4841
|
+
Q({ open: !0, source: T });
|
|
4835
4842
|
}, []), ae = R(() => {
|
|
4836
|
-
|
|
4843
|
+
Q((T) => ({ ...T, open: !1 }));
|
|
4837
4844
|
}, []), pe = B(
|
|
4838
4845
|
() => {
|
|
4839
4846
|
var T;
|
|
@@ -4849,8 +4856,8 @@ function gu({
|
|
|
4849
4856
|
if (!t.deptId) return;
|
|
4850
4857
|
const T = (f) => {
|
|
4851
4858
|
for (const L of f) {
|
|
4852
|
-
const
|
|
4853
|
-
if (
|
|
4859
|
+
const G = String((L == null ? void 0 : L.id) ?? (L == null ? void 0 : L.deptId) ?? "");
|
|
4860
|
+
if (G === t.deptId) return (L == null ? void 0 : L.name) ?? (L == null ? void 0 : L.deptName) ?? G;
|
|
4854
4861
|
const he = (L == null ? void 0 : L.childrenList) || (L == null ? void 0 : L.children);
|
|
4855
4862
|
if (Array.isArray(he)) {
|
|
4856
4863
|
const X = T(he);
|
|
@@ -4859,7 +4866,7 @@ function gu({
|
|
|
4859
4866
|
}
|
|
4860
4867
|
};
|
|
4861
4868
|
return T(t.deptTreeData);
|
|
4862
|
-
}, [t.deptId, t.deptTreeData]),
|
|
4869
|
+
}, [t.deptId, t.deptTreeData]), Se = B(
|
|
4863
4870
|
() => {
|
|
4864
4871
|
var T;
|
|
4865
4872
|
return t.creatorId ? (T = t.memberOptions.find((f) => f.value === t.creatorId)) == null ? void 0 : T.label : void 0;
|
|
@@ -4872,8 +4879,8 @@ function gu({
|
|
|
4872
4879
|
if (T.length !== 0)
|
|
4873
4880
|
return T.map(([f, L]) => {
|
|
4874
4881
|
var X;
|
|
4875
|
-
const
|
|
4876
|
-
return `${(
|
|
4882
|
+
const G = a.find((Fe) => Fe.tagKey === f), he = ((X = G == null ? void 0 : G.values.find((Fe) => Fe.value === L)) == null ? void 0 : X.valueDesc) ?? L;
|
|
4883
|
+
return `${(G == null ? void 0 : G.tagName) ?? f}: ${he}`;
|
|
4877
4884
|
}).join(";");
|
|
4878
4885
|
}, [r, a]), me = B(
|
|
4879
4886
|
() => ({
|
|
@@ -4905,7 +4912,7 @@ function gu({
|
|
|
4905
4912
|
range: t.startDate && t.endDate ? [t.startDate, t.endDate] : null,
|
|
4906
4913
|
creatorId: t.creatorId,
|
|
4907
4914
|
tags: r
|
|
4908
|
-
}),
|
|
4915
|
+
}), K.success(`已保存条件「${T}」`));
|
|
4909
4916
|
},
|
|
4910
4917
|
[
|
|
4911
4918
|
m,
|
|
@@ -4927,8 +4934,8 @@ function gu({
|
|
|
4927
4934
|
}
|
|
4928
4935
|
a.forEach((L) => {
|
|
4929
4936
|
var he;
|
|
4930
|
-
const
|
|
4931
|
-
r[L.tagKey] !==
|
|
4937
|
+
const G = (he = f.tags) == null ? void 0 : he[L.tagKey];
|
|
4938
|
+
r[L.tagKey] !== G && i(L.tagKey, G);
|
|
4932
4939
|
});
|
|
4933
4940
|
}
|
|
4934
4941
|
},
|
|
@@ -5032,13 +5039,13 @@ function gu({
|
|
|
5032
5039
|
/* @__PURE__ */ o(
|
|
5033
5040
|
sc,
|
|
5034
5041
|
{
|
|
5035
|
-
open:
|
|
5036
|
-
source:
|
|
5042
|
+
open: j.open,
|
|
5043
|
+
source: j.source,
|
|
5037
5044
|
onClose: ae,
|
|
5038
5045
|
scenarioName: pe,
|
|
5039
5046
|
dateRangeText: ee,
|
|
5040
5047
|
deptName: de,
|
|
5041
|
-
creatorName:
|
|
5048
|
+
creatorName: Se,
|
|
5042
5049
|
tagSummary: ue,
|
|
5043
5050
|
data: t.data,
|
|
5044
5051
|
groupLabel: P,
|