@yuku123/z-team-component 0.2.59 → 0.2.60
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-Cstbioyw.js → ChangeLogView-VRWVzP0r.js} +1 -1
- package/dist/{ComponentDoc-Bx6NAJlK.js → ComponentDoc-DjfucAFW.js} +1497 -1387
- package/dist/{InvitationManagementPage-Gkqisq4C.js → InvitationManagementPage-BQ_4HcPk.js} +1 -1
- package/dist/{OnboardingPage-C7C4PEjn.js → OnboardingPage-DM8emo6P.js} +2 -2
- package/dist/{ScheduledTasks-BQRcjBOd.js → ScheduledTasks-BYxdbsSa.js} +8 -8
- package/dist/SystemShell-BEdMWZ8d.js +670 -0
- package/dist/{admin-logs-B9KS6VJz.js → admin-logs-DCYof_u5.js} +2 -2
- package/dist/{api-Y-52Ejhz.js → api-Bz4pq8m7.js} +1 -1
- package/dist/{api-CALqShkO.js → api-DWt94BcM.js} +584 -572
- package/dist/{createWorkspaceWsHandler-DP30xvug.js → createWorkspaceWsHandler-3aHkBZE9.js} +4 -4
- package/dist/{index-4YxdJwFm.js → index-4LNRkvy6.js} +3 -3
- package/dist/{index-DfQCaS0z.js → index-BHUK6MwQ.js} +248 -244
- package/dist/{index-C2Wkg1b5.js → index-BIdcTXZW.js} +3 -3
- package/dist/index-BVEvns4M.js +2858 -0
- package/dist/{index-m8V5TniT.js → index-BVh0W8ck.js} +15861 -15586
- package/dist/{index-Bpn6x1So.js → index-C0rbeCoZ.js} +12 -12
- package/dist/{index-8gCovDDT.js → index-C6jp_1-U.js} +6 -6
- package/dist/index-CQSTQAPg.js +112 -0
- package/dist/{index-lftFkqfI.js → index-CTKf6h2u.js} +4 -4
- package/dist/{index-BvTYVEEv.js → index-Cf7WJqfM.js} +20 -16
- package/dist/{index-CO6WYRIS.js → index-Cip94Q-G.js} +3 -3
- package/dist/{index-DKeYG0Fu.js → index-CrIIInfs.js} +4 -4
- package/dist/{index-DJ0FV74Y.js → index-DbEvwIck.js} +3 -3
- package/dist/{index-CLWgeKwr.js → index-DtVBFjaJ.js} +2 -2
- package/dist/{index-CGWttFLb.js → index-Dvhocfyo.js} +4 -4
- package/dist/index-DyE5noq6.js +118 -0
- package/dist/{index-Gt21FARO.js → index-KqKj9E7y.js} +3 -3
- package/dist/{index-aw72ID7y.js → index-NPxrK-81.js} +1 -1
- package/dist/{index-CinRd7Nz.js → index-VY-pgcyl.js} +1 -1
- package/dist/{index-DJOyOVn_.js → index-VxO9i5r6.js} +1 -1
- package/dist/{index-63ovR-_x.js → index-_gGu4e-w.js} +1 -1
- package/dist/{index-C3B7CbHo.js → index-bsGAZKaU.js} +624 -613
- package/dist/{index-CN9NsUQ6.js → index-eGX5rkV8.js} +5 -5
- package/dist/{index-DET70T3j.js → index-i6Ejgpao.js} +1 -1
- package/dist/index-ncjLe3A0.js +93 -0
- package/dist/index.js +1 -1
- package/dist/{instance-f3C-1qYl.js → instance-CbkHlDr4.js} +1 -1
- package/dist/menuPermission-BWqugXIc.js +60 -0
- package/dist/pages.js +1 -1
- package/dist/schedule-BRvmKoDG.js +587 -0
- package/dist/{send-default-agent-team-message-d_ECdczr.js → send-default-agent-team-message-8wnVWO7H.js} +1 -1
- package/dist/{sso-user-HcsSzg8P.js → sso-user-QZNVhjpR.js} +1 -1
- package/dist/{training-DnNQN0An.js → training-DYo1pvX7.js} +1 -1
- package/dist/{useAppStore-kRZEA5WZ.js → useAppStore-BGOxWep2.js} +6 -2
- package/dist/{webide-BcRzJX-h.js → webide-CWTbQs4I.js} +4 -4
- package/dist/z-team-component.css +2 -2
- package/package.json +1 -1
- package/dist/SystemShell-Df9PZzLO.js +0 -907
- package/dist/index-Bw9yypc4.js +0 -2841
- package/dist/index-C0EIMJI2.js +0 -112
- package/dist/index-DRrBkbr_.js +0 -100
- package/dist/schedule-DfkgwPdE.js +0 -497
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
import { a as i, f as c, B as d, n as u, u as h, t as N, g as R } from "./api-DWt94BcM.js";
|
|
2
|
+
import { jsx as g, jsxs as O } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as b, useState as L, useEffect as D, Component as M } from "react";
|
|
4
|
+
const T = [
|
|
5
|
+
{ status: "TODO", label: "待办" },
|
|
6
|
+
{ status: "DOING", label: "进行中" },
|
|
7
|
+
{ status: "DONE", label: "已完成" }
|
|
8
|
+
];
|
|
9
|
+
function se(t) {
|
|
10
|
+
if (!t || !t.trim()) return [...T];
|
|
11
|
+
try {
|
|
12
|
+
const e = JSON.parse(t), n = Array.isArray(e == null ? void 0 : e.statusColumns) ? e.statusColumns : null;
|
|
13
|
+
if (!n) return [...T];
|
|
14
|
+
const o = n.map((r) => {
|
|
15
|
+
const a = r ?? {}, s = String(a.status ?? "").trim().toUpperCase(), l = String(a.label ?? "").trim();
|
|
16
|
+
return s && l ? { status: s, label: l } : null;
|
|
17
|
+
}).filter((r) => r != null);
|
|
18
|
+
return o.length > 0 ? o : [...T];
|
|
19
|
+
} catch {
|
|
20
|
+
return [...T];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function B(t) {
|
|
24
|
+
if (t == null) return !0;
|
|
25
|
+
const e = String(t).trim();
|
|
26
|
+
return e === "" || e === "0";
|
|
27
|
+
}
|
|
28
|
+
function S(t) {
|
|
29
|
+
const e = (s) => {
|
|
30
|
+
if (typeof s != "string" || !s.trim()) return [];
|
|
31
|
+
try {
|
|
32
|
+
const l = JSON.parse(s);
|
|
33
|
+
return Array.isArray(l) ? l.filter((p) => typeof p == "string") : [];
|
|
34
|
+
} catch {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
}, n = (s) => {
|
|
38
|
+
if (typeof s != "string" || !s.trim()) return [];
|
|
39
|
+
try {
|
|
40
|
+
const l = JSON.parse(s);
|
|
41
|
+
return Array.isArray(l) ? l.filter(
|
|
42
|
+
(p) => !!p && typeof p == "object" && typeof p.type == "string"
|
|
43
|
+
) : [];
|
|
44
|
+
} catch {
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
}, o = () => {
|
|
48
|
+
const s = t.assigneeUserIds;
|
|
49
|
+
let l = null;
|
|
50
|
+
if (Array.isArray(s))
|
|
51
|
+
l = s;
|
|
52
|
+
else if (typeof s == "string" && s.trim())
|
|
53
|
+
try {
|
|
54
|
+
const m = JSON.parse(s);
|
|
55
|
+
l = Array.isArray(m) ? m : null;
|
|
56
|
+
} catch {
|
|
57
|
+
l = s.split(",");
|
|
58
|
+
}
|
|
59
|
+
if (l) {
|
|
60
|
+
const m = l.map((f) => String(f ?? "").trim()).filter(Boolean);
|
|
61
|
+
if (m.length > 0) return Array.from(new Set(m));
|
|
62
|
+
}
|
|
63
|
+
const p = t.assigneeUserId == null ? "" : String(t.assigneeUserId);
|
|
64
|
+
return p.trim() ? [p.trim()] : [];
|
|
65
|
+
}, r = (s) => {
|
|
66
|
+
const l = t.assignees, p = Array.isArray(l) ? l.map((m) => {
|
|
67
|
+
const f = m ?? {}, $ = String(f.userId ?? "").trim();
|
|
68
|
+
return $ ? { userId: $, name: String(f.name ?? "").trim() || $ } : null;
|
|
69
|
+
}).filter((m) => m != null) : [];
|
|
70
|
+
return p.length > 0 ? p : s.map((m) => ({ userId: m, name: m }));
|
|
71
|
+
}, a = o();
|
|
72
|
+
return {
|
|
73
|
+
id: N(t.id),
|
|
74
|
+
projectId: t.projectId == null ? null : N(t.projectId),
|
|
75
|
+
userId: String(t.userId ?? ""),
|
|
76
|
+
title: String(t.title ?? ""),
|
|
77
|
+
detail: t.detail == null ? null : String(t.detail),
|
|
78
|
+
status: t.status ?? "TODO",
|
|
79
|
+
priority: t.priority ?? "MEDIUM",
|
|
80
|
+
dueDate: t.dueDate == null ? null : String(t.dueDate).slice(0, 10),
|
|
81
|
+
assigneeUserId: a[0] ?? null,
|
|
82
|
+
assigneeUserIds: a,
|
|
83
|
+
assignees: r(a),
|
|
84
|
+
projectTitle: t.projectTitle == null || !String(t.projectTitle).trim() ? null : String(t.projectTitle),
|
|
85
|
+
tags: e(t.tags),
|
|
86
|
+
links: n(t.links),
|
|
87
|
+
parentId: B(t.parentId) ? "" : N(t.parentId),
|
|
88
|
+
sortOrder: t.sortOrder == null ? 0 : Number(t.sortOrder),
|
|
89
|
+
completedAt: t.completedAt == null ? null : String(t.completedAt),
|
|
90
|
+
completedBy: t.completedBy == null ? null : String(t.completedBy),
|
|
91
|
+
createByName: t.createByName == null ? null : String(t.createByName),
|
|
92
|
+
updateTime: t.updateTime == null ? null : String(t.updateTime)
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function I(t) {
|
|
96
|
+
const e = t ?? {};
|
|
97
|
+
return {
|
|
98
|
+
id: N(e.id),
|
|
99
|
+
userId: String(e.userId ?? ""),
|
|
100
|
+
title: String(e.title ?? ""),
|
|
101
|
+
icon: e.icon == null ? null : String(e.icon),
|
|
102
|
+
description: e.description == null ? null : String(e.description),
|
|
103
|
+
visibility: e.visibility === "shared" ? "shared" : "private",
|
|
104
|
+
sortOrder: e.sortOrder == null ? 0 : Number(e.sortOrder),
|
|
105
|
+
extraInfo: e.extraInfo == null ? null : String(e.extraInfo),
|
|
106
|
+
createByName: e.createByName == null ? null : String(e.createByName)
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function C(t) {
|
|
110
|
+
const e = t ?? {}, n = Array.isArray(e.memberDetails) ? e.memberDetails : [];
|
|
111
|
+
return {
|
|
112
|
+
...I(e),
|
|
113
|
+
openCount: e.openCount == null ? 0 : Number(e.openCount),
|
|
114
|
+
memberDetails: n.map((o) => {
|
|
115
|
+
const r = o ?? {}, a = String(r.userId ?? "").trim();
|
|
116
|
+
return a ? { userId: a, userName: String(r.userName ?? "").trim() || a } : null;
|
|
117
|
+
}).filter((o) => o != null)
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
async function ae(t = "") {
|
|
121
|
+
const e = t ? `?token=${encodeURIComponent(t)}` : "", n = await i(`${d}/todo/projects${e}`, c), o = await u(n, "获取待办项目失败");
|
|
122
|
+
return {
|
|
123
|
+
owned: ((o == null ? void 0 : o.owned) ?? []).map(C),
|
|
124
|
+
joined: ((o == null ? void 0 : o.joined) ?? []).map(C)
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
async function ie(t, e = "") {
|
|
128
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/projects${n}`, {
|
|
129
|
+
...c,
|
|
130
|
+
method: "POST",
|
|
131
|
+
headers: { "Content-Type": "application/json" },
|
|
132
|
+
body: JSON.stringify(t)
|
|
133
|
+
}), r = await u(o, "新建项目失败");
|
|
134
|
+
return I(r);
|
|
135
|
+
}
|
|
136
|
+
async function ce(t, e, n = "") {
|
|
137
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${t}${o}`, {
|
|
138
|
+
...c,
|
|
139
|
+
method: "PUT",
|
|
140
|
+
headers: { "Content-Type": "application/json" },
|
|
141
|
+
body: JSON.stringify(e)
|
|
142
|
+
}), a = await u(r, "更新项目失败");
|
|
143
|
+
return I(a);
|
|
144
|
+
}
|
|
145
|
+
async function de(t, e = "") {
|
|
146
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/projects/${t}${n}`, {
|
|
147
|
+
...c,
|
|
148
|
+
method: "DELETE"
|
|
149
|
+
});
|
|
150
|
+
return h(o, "删除项目失败");
|
|
151
|
+
}
|
|
152
|
+
async function le(t, e, n = "") {
|
|
153
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${t}/members${o}`, {
|
|
154
|
+
...c,
|
|
155
|
+
method: "POST",
|
|
156
|
+
headers: { "Content-Type": "application/json" },
|
|
157
|
+
body: JSON.stringify(e)
|
|
158
|
+
}), a = await u(r, "添加成员失败");
|
|
159
|
+
return I(a);
|
|
160
|
+
}
|
|
161
|
+
async function ue(t, e, n = "") {
|
|
162
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
|
|
163
|
+
`${d}/todo/projects/${t}/members/${encodeURIComponent(e)}${o}`,
|
|
164
|
+
{ ...c, method: "DELETE" }
|
|
165
|
+
), a = await u(r, "移除成员失败");
|
|
166
|
+
return I(a);
|
|
167
|
+
}
|
|
168
|
+
async function pe(t = {}, e = "") {
|
|
169
|
+
const n = new URLSearchParams();
|
|
170
|
+
e && n.set("token", e), t.view && n.set("view", t.view), t.projectId != null && n.set("projectId", String(t.projectId)), t.status && n.set("status", t.status), t.keyword && n.set("keyword", t.keyword);
|
|
171
|
+
const o = n.toString() ? `?${n.toString()}` : "", r = await i(`${d}/todo/items${o}`, c);
|
|
172
|
+
return (await u(
|
|
173
|
+
r,
|
|
174
|
+
"获取事项失败"
|
|
175
|
+
) ?? []).map(S);
|
|
176
|
+
}
|
|
177
|
+
async function me(t, e = "") {
|
|
178
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/items${n}`, {
|
|
179
|
+
...c,
|
|
180
|
+
method: "POST",
|
|
181
|
+
headers: { "Content-Type": "application/json" },
|
|
182
|
+
body: JSON.stringify(t)
|
|
183
|
+
}), r = await u(o, "新建事项失败");
|
|
184
|
+
return S(r);
|
|
185
|
+
}
|
|
186
|
+
async function ye(t, e, n = "") {
|
|
187
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${t}${o}`, {
|
|
188
|
+
...c,
|
|
189
|
+
method: "PUT",
|
|
190
|
+
headers: { "Content-Type": "application/json" },
|
|
191
|
+
body: JSON.stringify(e)
|
|
192
|
+
}), a = await u(r, "更新事项失败");
|
|
193
|
+
return S(a);
|
|
194
|
+
}
|
|
195
|
+
async function fe(t, e = "", n = "") {
|
|
196
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${t}/complete${o}`, {
|
|
197
|
+
...c,
|
|
198
|
+
method: "POST",
|
|
199
|
+
headers: { "Content-Type": "application/json" },
|
|
200
|
+
body: JSON.stringify({ result: e })
|
|
201
|
+
}), a = await u(r, "完成事项失败");
|
|
202
|
+
return S(a);
|
|
203
|
+
}
|
|
204
|
+
async function ge(t, e = "") {
|
|
205
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/items/${t}/reopen${n}`, {
|
|
206
|
+
...c,
|
|
207
|
+
method: "POST"
|
|
208
|
+
}), r = await u(o, "重开事项失败");
|
|
209
|
+
return S(r);
|
|
210
|
+
}
|
|
211
|
+
async function he(t, e, n = "") {
|
|
212
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${t}/reorder${o}`, {
|
|
213
|
+
...c,
|
|
214
|
+
method: "POST",
|
|
215
|
+
headers: { "Content-Type": "application/json" },
|
|
216
|
+
body: JSON.stringify(e)
|
|
217
|
+
}), a = await u(r, "调整排序失败");
|
|
218
|
+
return S(a);
|
|
219
|
+
}
|
|
220
|
+
async function $e(t, e = "") {
|
|
221
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/items/reorder-batch${n}`, {
|
|
222
|
+
...c,
|
|
223
|
+
method: "POST",
|
|
224
|
+
headers: { "Content-Type": "application/json" },
|
|
225
|
+
body: JSON.stringify({ updates: t })
|
|
226
|
+
});
|
|
227
|
+
return h(o, "调整排序失败");
|
|
228
|
+
}
|
|
229
|
+
async function Se(t, e = "") {
|
|
230
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/projects/reorder-batch${n}`, {
|
|
231
|
+
...c,
|
|
232
|
+
method: "POST",
|
|
233
|
+
headers: { "Content-Type": "application/json" },
|
|
234
|
+
body: JSON.stringify({ updates: t })
|
|
235
|
+
});
|
|
236
|
+
return h(o, "调整项目排序失败");
|
|
237
|
+
}
|
|
238
|
+
async function Ie(t, e = "") {
|
|
239
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/items/${t}${n}`, {
|
|
240
|
+
...c,
|
|
241
|
+
method: "DELETE"
|
|
242
|
+
});
|
|
243
|
+
return h(o, "删除事项失败");
|
|
244
|
+
}
|
|
245
|
+
const G = {
|
|
246
|
+
RUNTIME_MONITOR_VIEW: ["RUNTIME_MONITOR_MANAGE"],
|
|
247
|
+
EVALUATION_VIEW: ["EVALUATION_MANAGE"],
|
|
248
|
+
COLLABORATION_VIEW: [
|
|
249
|
+
"AGENT_MANAGE",
|
|
250
|
+
"SKILL_MANAGE",
|
|
251
|
+
"SCENARIO_MANAGE",
|
|
252
|
+
"PROFILE_MANAGE",
|
|
253
|
+
"TAG_MANAGE",
|
|
254
|
+
"TOOL_MANAGE"
|
|
255
|
+
],
|
|
256
|
+
EVOLUTION_VIEW: ["EVOLUTION_MANAGE"],
|
|
257
|
+
OPS_CONFIG_VIEW: [
|
|
258
|
+
"OPS_CONFIG_MANAGE",
|
|
259
|
+
"ONCALL_MANAGE",
|
|
260
|
+
"ANNOUNCEMENT_MANAGE",
|
|
261
|
+
"OPS_REPORT_MANAGE"
|
|
262
|
+
],
|
|
263
|
+
KNOWLEDGE_VIEW: ["KNOWLEDGE_MANAGE"],
|
|
264
|
+
WEBIDE_VIEW: ["WEBIDE_MANAGE"]
|
|
265
|
+
};
|
|
266
|
+
function Te(t, e) {
|
|
267
|
+
var o;
|
|
268
|
+
if (!t) return !1;
|
|
269
|
+
if (t.is_global_admin || (o = t.permissions) != null && o.includes(e)) return !0;
|
|
270
|
+
const n = G[e];
|
|
271
|
+
return !!(n != null && n.some((r) => {
|
|
272
|
+
var a;
|
|
273
|
+
return (a = t.permissions) == null ? void 0 : a.includes(r);
|
|
274
|
+
}));
|
|
275
|
+
}
|
|
276
|
+
const q = "_wrap_2gcw5_1", J = "_card_2gcw5_9", V = "_badge_2gcw5_19", W = "_title_2gcw5_41", v = "_desc_2gcw5_48", x = "_actions_2gcw5_55", z = "_primary_2gcw5_63", F = "_secondary_2gcw5_75", K = "_details_2gcw5_90", H = "_pre_2gcw5_102", Y = "_copy_2gcw5_117", Q = "_compact_2gcw5_127", y = {
|
|
277
|
+
wrap: q,
|
|
278
|
+
card: J,
|
|
279
|
+
badge: V,
|
|
280
|
+
title: W,
|
|
281
|
+
desc: v,
|
|
282
|
+
actions: x,
|
|
283
|
+
primary: z,
|
|
284
|
+
secondary: F,
|
|
285
|
+
details: K,
|
|
286
|
+
pre: H,
|
|
287
|
+
copy: Y,
|
|
288
|
+
compact: Q
|
|
289
|
+
};
|
|
290
|
+
function X(t) {
|
|
291
|
+
const e = t, n = `${(e == null ? void 0 : e.name) ?? ""} ${(e == null ? void 0 : e.message) ?? ""} ${typeof t == "string" ? t : ""}`;
|
|
292
|
+
return /ChunkLoadError|Loading chunk|Failed to fetch dynamically imported module|Importing a module script failed|error loading dynamically imported module/i.test(n);
|
|
293
|
+
}
|
|
294
|
+
function Z(t) {
|
|
295
|
+
const { status: e, error: n } = t;
|
|
296
|
+
return e === 401 ? {
|
|
297
|
+
kind: "unauthorized",
|
|
298
|
+
status: e,
|
|
299
|
+
badge: "401",
|
|
300
|
+
title: "登录已失效",
|
|
301
|
+
description: "当前会话已过期或未建立,请重新登录后继续。重登后会回到这个页面。"
|
|
302
|
+
} : e === 403 ? {
|
|
303
|
+
kind: "forbidden",
|
|
304
|
+
status: e,
|
|
305
|
+
badge: "403",
|
|
306
|
+
title: "没有访问权限",
|
|
307
|
+
description: "当前账号无权访问该功能。如需开通,请联系管理员分配权限。"
|
|
308
|
+
} : e === 404 ? {
|
|
309
|
+
kind: "not-found",
|
|
310
|
+
status: e,
|
|
311
|
+
badge: "404",
|
|
312
|
+
title: "功能接口未就绪",
|
|
313
|
+
description: "这个页面要用的后端接口还没有部署,或前后端路径对不上。可以重试;若持续如此,请把技术详情发给运维确认版本。"
|
|
314
|
+
} : e && e >= 500 ? {
|
|
315
|
+
kind: "server",
|
|
316
|
+
status: e,
|
|
317
|
+
badge: String(e),
|
|
318
|
+
title: "服务暂时不可用",
|
|
319
|
+
description: "后端返回了错误。稍后重试;如果反复出现,请把技术详情发给运维。"
|
|
320
|
+
} : e === 0 ? {
|
|
321
|
+
kind: "network",
|
|
322
|
+
status: e,
|
|
323
|
+
badge: "!",
|
|
324
|
+
title: "网络不可用",
|
|
325
|
+
description: "请求没有到达后端。请检查网络,或确认本地后端服务是否已启动。"
|
|
326
|
+
} : X(n) ? {
|
|
327
|
+
kind: "chunk",
|
|
328
|
+
badge: "⟳",
|
|
329
|
+
title: "页面资源加载失败",
|
|
330
|
+
description: "可能刚发布了新版本,旧页面资源已被替换。刷新页面即可拿到新资源。"
|
|
331
|
+
} : n != null ? {
|
|
332
|
+
kind: "render",
|
|
333
|
+
badge: "!",
|
|
334
|
+
title: "页面渲染出错",
|
|
335
|
+
description: "这个页面遇到了未预期的错误,已被拦截,不影响其他页面。可以重试;仍然失败请把技术详情发给研发。"
|
|
336
|
+
} : {
|
|
337
|
+
kind: "unknown",
|
|
338
|
+
badge: "!",
|
|
339
|
+
title: "页面加载失败",
|
|
340
|
+
description: "发生了未知错误。请重试,或返回首页换个入口再试。"
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
function ee(t, e) {
|
|
344
|
+
const n = [];
|
|
345
|
+
if (n.push(`页面:${typeof location < "u" ? location.pathname + location.search : "-"}`), n.push(`时间:${(/* @__PURE__ */ new Date()).toISOString()}`), t != null && n.push(`HTTP:${t}`), e != null) {
|
|
346
|
+
const o = e;
|
|
347
|
+
o != null && o.name && n.push(`错误名:${String(o.name)}`), o != null && o.message && n.push(`消息:${String(o.message)}`), o != null && o.stack ? n.push(`堆栈:
|
|
348
|
+
${String(o.stack)}`) : typeof e != "object" && n.push(`原文:${String(e)}`);
|
|
349
|
+
}
|
|
350
|
+
return n.join(`
|
|
351
|
+
`).slice(0, 4e3);
|
|
352
|
+
}
|
|
353
|
+
const te = ({
|
|
354
|
+
status: t,
|
|
355
|
+
error: e,
|
|
356
|
+
title: n,
|
|
357
|
+
description: o,
|
|
358
|
+
retry: r,
|
|
359
|
+
retryText: a,
|
|
360
|
+
extra: s,
|
|
361
|
+
showHome: l = !0,
|
|
362
|
+
compact: p = !1,
|
|
363
|
+
className: m
|
|
364
|
+
}) => {
|
|
365
|
+
const f = b(() => Z({ status: t, error: e }), [t, e]), [$, _] = L(!1), A = b(() => ee(t, e), [t, e]);
|
|
366
|
+
D(() => {
|
|
367
|
+
if (!$) return;
|
|
368
|
+
const E = setTimeout(() => _(!1), 2e3);
|
|
369
|
+
return () => clearTimeout(E);
|
|
370
|
+
}, [$]);
|
|
371
|
+
const j = async () => {
|
|
372
|
+
try {
|
|
373
|
+
await navigator.clipboard.writeText(A), _(!0);
|
|
374
|
+
} catch {
|
|
375
|
+
_(!1);
|
|
376
|
+
}
|
|
377
|
+
}, U = () => {
|
|
378
|
+
const E = encodeURIComponent(location.pathname + location.search);
|
|
379
|
+
location.assign(`/login?redirect=${E}`);
|
|
380
|
+
}, k = () => r ? /* @__PURE__ */ g("button", { type: "button", className: y.primary, onClick: r, children: a || "重试" }) : f.kind === "chunk" ? /* @__PURE__ */ g("button", { type: "button", className: y.primary, onClick: () => location.reload(), children: "刷新页面" }) : f.kind === "unauthorized" ? /* @__PURE__ */ g("button", { type: "button", className: y.primary, onClick: U, children: "重新登录" }) : null, P = e != null || t != null;
|
|
381
|
+
return /* @__PURE__ */ g(
|
|
382
|
+
"div",
|
|
383
|
+
{
|
|
384
|
+
className: [y.wrap, p ? y.compact : "", m || ""].filter(Boolean).join(" "),
|
|
385
|
+
role: "alert",
|
|
386
|
+
"data-error-kind": f.kind,
|
|
387
|
+
children: /* @__PURE__ */ O("div", { className: y.card, children: [
|
|
388
|
+
/* @__PURE__ */ g("div", { className: y.badge, "data-kind": f.kind, children: f.badge }),
|
|
389
|
+
/* @__PURE__ */ g("h2", { className: y.title, children: n || f.title }),
|
|
390
|
+
/* @__PURE__ */ g("p", { className: y.desc, children: o || f.description }),
|
|
391
|
+
/* @__PURE__ */ O("div", { className: y.actions, children: [
|
|
392
|
+
k(),
|
|
393
|
+
s,
|
|
394
|
+
l && f.kind !== "unauthorized" && /* @__PURE__ */ g("a", { className: y.secondary, href: "/", children: "返回首页" })
|
|
395
|
+
] }),
|
|
396
|
+
P && /* @__PURE__ */ O("details", { className: y.details, children: [
|
|
397
|
+
/* @__PURE__ */ g("summary", { children: "技术详情" }),
|
|
398
|
+
/* @__PURE__ */ g("pre", { className: y.pre, children: A }),
|
|
399
|
+
/* @__PURE__ */ g("button", { type: "button", className: y.copy, onClick: j, children: $ ? "已复制" : "复制详情" })
|
|
400
|
+
] })
|
|
401
|
+
] })
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
};
|
|
405
|
+
class Ne extends M {
|
|
406
|
+
constructor(e) {
|
|
407
|
+
super(e), this.state = { hasError: !1, error: null };
|
|
408
|
+
}
|
|
409
|
+
static getDerivedStateFromError(e) {
|
|
410
|
+
return { hasError: !0, error: e };
|
|
411
|
+
}
|
|
412
|
+
componentDidCatch(e, n) {
|
|
413
|
+
console.error("[ErrorBoundary]", e, n.componentStack);
|
|
414
|
+
}
|
|
415
|
+
render() {
|
|
416
|
+
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ g(
|
|
417
|
+
te,
|
|
418
|
+
{
|
|
419
|
+
error: this.state.error,
|
|
420
|
+
retry: () => this.setState({ hasError: !1, error: null })
|
|
421
|
+
}
|
|
422
|
+
) : this.props.children;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
function w(t) {
|
|
426
|
+
const e = t && typeof t == "object" ? t : {}, n = Array.isArray(e.items) ? R(e.items) : [];
|
|
427
|
+
return { ...e, items: n };
|
|
428
|
+
}
|
|
429
|
+
async function _e(t, e = "") {
|
|
430
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(
|
|
431
|
+
`${d}/personal-agents/${t}/schedules${n}`,
|
|
432
|
+
c
|
|
433
|
+
);
|
|
434
|
+
return u(o, "获取定时任务列表失败");
|
|
435
|
+
}
|
|
436
|
+
async function Ee(t, e, n, o, r = "", a = "", s = "") {
|
|
437
|
+
const l = s ? `?token=${encodeURIComponent(s)}` : "", p = await i(
|
|
438
|
+
`${d}/personal-agents/${t}/schedules${l}`,
|
|
439
|
+
{
|
|
440
|
+
...c,
|
|
441
|
+
method: "POST",
|
|
442
|
+
headers: { "Content-Type": "application/json" },
|
|
443
|
+
body: JSON.stringify({
|
|
444
|
+
name: e,
|
|
445
|
+
prompt: n,
|
|
446
|
+
cron_expression: o,
|
|
447
|
+
notify_user_id: r,
|
|
448
|
+
notify_user_name: a
|
|
449
|
+
})
|
|
450
|
+
}
|
|
451
|
+
);
|
|
452
|
+
return u(p, "创建定时任务失败");
|
|
453
|
+
}
|
|
454
|
+
async function Oe(t, e, n, o = "") {
|
|
455
|
+
const r = o ? `?token=${encodeURIComponent(o)}` : "", a = await i(
|
|
456
|
+
`${d}/personal-agents/${t}/schedules/${e}${r}`,
|
|
457
|
+
{
|
|
458
|
+
...c,
|
|
459
|
+
method: "PUT",
|
|
460
|
+
headers: { "Content-Type": "application/json" },
|
|
461
|
+
body: JSON.stringify(n)
|
|
462
|
+
}
|
|
463
|
+
);
|
|
464
|
+
return u(a, "更新定时任务失败");
|
|
465
|
+
}
|
|
466
|
+
async function Ae(t, e, n = "") {
|
|
467
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
|
|
468
|
+
`${d}/personal-agents/${t}/schedules/${e}${o}`,
|
|
469
|
+
{
|
|
470
|
+
...c,
|
|
471
|
+
method: "DELETE"
|
|
472
|
+
}
|
|
473
|
+
);
|
|
474
|
+
return h(r, "删除定时任务失败");
|
|
475
|
+
}
|
|
476
|
+
async function be(t, e, n, o = "") {
|
|
477
|
+
const r = o ? `?token=${encodeURIComponent(o)}` : "", a = await i(
|
|
478
|
+
`${d}/personal-agents/${t}/schedules/${e}/toggle${r}`,
|
|
479
|
+
{
|
|
480
|
+
...c,
|
|
481
|
+
method: "POST",
|
|
482
|
+
headers: { "Content-Type": "application/json" },
|
|
483
|
+
body: JSON.stringify({ enable: n })
|
|
484
|
+
}
|
|
485
|
+
);
|
|
486
|
+
return u(a, "切换定时任务状态失败");
|
|
487
|
+
}
|
|
488
|
+
async function Ce(t, e, n = 1, o = 20, r = "") {
|
|
489
|
+
const a = new URLSearchParams();
|
|
490
|
+
a.set("page", String(n)), a.set("size", String(o)), r && a.set("token", r);
|
|
491
|
+
const s = await i(
|
|
492
|
+
`${d}/personal-agents/${t}/schedules/${e}/logs?${a.toString()}`,
|
|
493
|
+
c
|
|
494
|
+
), l = await h(s, "获取执行历史失败");
|
|
495
|
+
return w(l);
|
|
496
|
+
}
|
|
497
|
+
async function we(t, e, n = "") {
|
|
498
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
|
|
499
|
+
`${d}/personal-agents/${t}/schedules/${e}/run${o}`,
|
|
500
|
+
{
|
|
501
|
+
...c,
|
|
502
|
+
method: "POST"
|
|
503
|
+
}
|
|
504
|
+
);
|
|
505
|
+
return u(r, "手动触发任务失败");
|
|
506
|
+
}
|
|
507
|
+
async function je(t, e = "", n = "") {
|
|
508
|
+
const o = new URLSearchParams();
|
|
509
|
+
e && o.set("keyword", e), n && o.set("token", n);
|
|
510
|
+
const r = await i(
|
|
511
|
+
`${d}/personal-agents/${t}/schedules/staff-search?${o.toString()}`,
|
|
512
|
+
c
|
|
513
|
+
);
|
|
514
|
+
return (await h(r, "搜索员工失败") ?? []).map((s) => {
|
|
515
|
+
const l = (s == null ? void 0 : s.extend) ?? {};
|
|
516
|
+
return {
|
|
517
|
+
userId: String((s == null ? void 0 : s.userId) ?? (s == null ? void 0 : s.id) ?? ""),
|
|
518
|
+
name: String((s == null ? void 0 : s.name) ?? ""),
|
|
519
|
+
accountNo: String((s == null ? void 0 : s.accountNo) ?? ""),
|
|
520
|
+
jobNumber: String((s == null ? void 0 : s.jobNumber) ?? ""),
|
|
521
|
+
flowerName: String((s == null ? void 0 : s.flowerName) ?? l.flowerName ?? "")
|
|
522
|
+
};
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
async function Ue(t = "", e = 50) {
|
|
526
|
+
const n = new URLSearchParams();
|
|
527
|
+
n.set("limit", String(e)), t && n.set("token", t);
|
|
528
|
+
const o = await i(
|
|
529
|
+
`${d}/personal-agents/schedules/notifications?${n.toString()}`,
|
|
530
|
+
c
|
|
531
|
+
), r = await h(o, "获取通知失败");
|
|
532
|
+
return w(r);
|
|
533
|
+
}
|
|
534
|
+
async function ke(t, e = "") {
|
|
535
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(
|
|
536
|
+
`${d}/personal-agents/schedules/notifications/${t}/read${n}`,
|
|
537
|
+
{
|
|
538
|
+
...c,
|
|
539
|
+
method: "POST"
|
|
540
|
+
}
|
|
541
|
+
);
|
|
542
|
+
return h(o, "标记已读失败");
|
|
543
|
+
}
|
|
544
|
+
async function Pe(t = "") {
|
|
545
|
+
const e = t ? `?token=${encodeURIComponent(t)}` : "", n = await i(
|
|
546
|
+
`${d}/personal-agents/schedules/notifications/read-all${e}`,
|
|
547
|
+
{
|
|
548
|
+
...c,
|
|
549
|
+
method: "POST"
|
|
550
|
+
}
|
|
551
|
+
);
|
|
552
|
+
return h(n, "标记已读失败");
|
|
553
|
+
}
|
|
554
|
+
export {
|
|
555
|
+
$e as A,
|
|
556
|
+
he as B,
|
|
557
|
+
Se as C,
|
|
558
|
+
T as D,
|
|
559
|
+
Ne as E,
|
|
560
|
+
te as P,
|
|
561
|
+
_e as a,
|
|
562
|
+
Ue as b,
|
|
563
|
+
Ce as c,
|
|
564
|
+
Ee as d,
|
|
565
|
+
Ae as e,
|
|
566
|
+
ae as f,
|
|
567
|
+
Pe as g,
|
|
568
|
+
Te as h,
|
|
569
|
+
X as i,
|
|
570
|
+
le as j,
|
|
571
|
+
me as k,
|
|
572
|
+
ye as l,
|
|
573
|
+
ke as m,
|
|
574
|
+
ge as n,
|
|
575
|
+
fe as o,
|
|
576
|
+
se as p,
|
|
577
|
+
Ie as q,
|
|
578
|
+
we as r,
|
|
579
|
+
je as s,
|
|
580
|
+
be as t,
|
|
581
|
+
Oe as u,
|
|
582
|
+
ue as v,
|
|
583
|
+
ie as w,
|
|
584
|
+
ce as x,
|
|
585
|
+
de as y,
|
|
586
|
+
pe as z
|
|
587
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { create as je } from "zustand";
|
|
2
|
-
import { Q as Ce, H as M, i as j, I as ne, k as A, t as _, J as se, K as Pe, L as Ne, M as we, N as Ee, O as xe, P as Fe, R as ae, S as Re, U as Oe, V as B, W as Ue, X as He, w as ie, Y as Le, Z as $e, _ as Ge, $ as De, a0 as Ve, a1 as Be, a2 as qe, a3 as ze, a4 as Ke, a5 as We, a6 as Je, a7 as Ye, a8 as Ze, a9 as Qe, aa as Xe, s as x, ab as et, ac as oe, ad as tt, ae as nt, af as rt, ag as st, ah as at, ai as it, aj as ot, ak as ct, c as lt, al as ut, am as dt, m as ft, an as mt } from "./api-
|
|
2
|
+
import { Q as Ce, H as M, i as j, I as ne, k as A, t as _, J as se, K as Pe, L as Ne, M as we, N as Ee, O as xe, P as Fe, R as ae, S as Re, U as Oe, V as B, W as Ue, X as He, w as ie, Y as Le, Z as $e, _ as Ge, $ as De, a0 as Ve, a1 as Be, a2 as qe, a3 as ze, a4 as Ke, a5 as We, a6 as Je, a7 as Ye, a8 as Ze, a9 as Qe, aa as Xe, s as x, ab as et, ac as oe, ad as tt, ae as nt, af as rt, ag as st, ah as at, ai as it, aj as ot, ak as ct, c as lt, al as ut, am as dt, m as ft, an as mt } from "./api-DWt94BcM.js";
|
|
3
3
|
import { message as F } from "antd";
|
|
4
4
|
const _e = `[[REASONING:正在分析…]]
|
|
5
5
|
正在分析…
|
|
@@ -654,6 +654,7 @@ function $() {
|
|
|
654
654
|
}
|
|
655
655
|
const Xt = 3, en = 4, tn = 5, nn = je((n, t) => ({
|
|
656
656
|
currentUser: null,
|
|
657
|
+
permissionState: "unknown",
|
|
657
658
|
// FEATURE-ZTEAM-MERGE: 优先 z-opc 的 token, 其次 z-team 原生的 z_team_token
|
|
658
659
|
token: localStorage.getItem("token") || localStorage.getItem("z_team_token") || "",
|
|
659
660
|
projects: [],
|
|
@@ -780,11 +781,14 @@ const Xt = 3, en = 4, tn = 5, nn = je((n, t) => ({
|
|
|
780
781
|
logout: async () => {
|
|
781
782
|
const { token: e } = t();
|
|
782
783
|
e && await ft().catch(() => {
|
|
783
|
-
}), localStorage.removeItem("token"), localStorage.removeItem("z_team_token"), localStorage.removeItem("userInfo"), n({ currentUser: null, token: "" });
|
|
784
|
+
}), localStorage.removeItem("token"), localStorage.removeItem("z_team_token"), localStorage.removeItem("userInfo"), n({ currentUser: null, token: "", permissionState: "unknown" });
|
|
784
785
|
},
|
|
785
786
|
updateCurrentUser: (e) => {
|
|
786
787
|
n({ currentUser: e });
|
|
787
788
|
},
|
|
789
|
+
setPermissionState: (e) => {
|
|
790
|
+
n({ permissionState: e });
|
|
791
|
+
},
|
|
788
792
|
/* ──── 项目 ──── */
|
|
789
793
|
loadProjects: async (e) => {
|
|
790
794
|
n({ loading: !0 });
|
|
@@ -6,11 +6,11 @@ import dr from "react-markdown";
|
|
|
6
6
|
import ur from "rehype-highlight";
|
|
7
7
|
import mr from "remark-gfm";
|
|
8
8
|
import { h as pr } from "./history-BlrA1eaW.js";
|
|
9
|
-
import { a as z, f as F, B as H, u as W, i as lt, k as Ce, t as He, c as hr, ap as qn, al as fr, aC as yr, aD as ga, aE as _r, aF as Ha } from "./api-
|
|
10
|
-
import { u as Bn, f as za, a as Wa, b as Ga, c as Ka, d as qa, e as Va, g as gr, r as br, h as vr, m as Cr } from "./admin-logs-
|
|
11
|
-
import { s as Ya,
|
|
9
|
+
import { a as z, f as F, B as H, u as W, i as lt, k as Ce, t as He, c as hr, ap as qn, al as fr, aC as yr, aD as ga, aE as _r, aF as Ha } from "./api-DWt94BcM.js";
|
|
10
|
+
import { u as Bn, f as za, a as Wa, b as Ga, c as Ka, d as qa, e as Va, g as gr, r as br, h as vr, m as Cr } from "./admin-logs-DCYof_u5.js";
|
|
11
|
+
import { s as Ya, j as Ja, k as Vn, l as _n, p as gn, n as Qa, o as Un, q as Xa, v as Nr, w as Sr, x as Za, y as wr, z as pn, f as eo, D as to, A as Ir, B as Tr, C as kr } from "./schedule-BRvmKoDG.js";
|
|
12
12
|
import Me from "dayjs";
|
|
13
|
-
import { u as Wt } from "./useAppStore-
|
|
13
|
+
import { u as Wt } from "./useAppStore-BGOxWep2.js";
|
|
14
14
|
import { M as no } from "./index-CUVdeb8y.js";
|
|
15
15
|
import "./echarts-B1OU1xr4.js";
|
|
16
16
|
import * as Dr from "echarts/core";
|