@yuku123/z-team-component 0.2.52 → 0.2.54
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-nPAmM1X0.js → ChangeLogView-Cstbioyw.js} +137 -137
- package/dist/{ComponentDoc-Cky9jCGu.js → ComponentDoc-yvIrAz9-.js} +506 -461
- package/dist/{InvitationManagementPage-BsbaIGvB.js → InvitationManagementPage-CIouC3Fn.js} +1 -1
- package/dist/{OnboardingPage-CHVgeBiO.js → OnboardingPage-DScwVCi-.js} +2 -2
- package/dist/ScheduledTasks-Dd2lJrBF.js +9449 -0
- package/dist/{SystemShell-4OiqvM11.js → SystemShell-DtvyWy0u.js} +1 -1
- package/dist/{admin-logs-D6HtRcK6.js → admin-logs-B9KS6VJz.js} +2 -2
- package/dist/{api-C78tCfne.js → api-CALqShkO.js} +288 -270
- package/dist/{api-BT968Uwc.js → api-CdVRdA0g.js} +1 -1
- package/dist/createWorkspaceWsHandler-CL5-4wFp.js +13037 -0
- package/dist/{index-BX1Wd9x9.js → index-4YxdJwFm.js} +3 -3
- package/dist/index-7Pe_xBrh.js +582 -0
- package/dist/{index-DFY3lzq0.js → index-C2Wkg1b5.js} +3 -3
- package/dist/{index-CdlfWFvS.js → index-C3B7CbHo.js} +610 -529
- package/dist/{index-BkX0I2aB.js → index-C6S3MIu4.js} +56 -56
- package/dist/{index-BAY37t4f.js → index-CGWttFLb.js} +41 -35
- package/dist/{index-LwKUkzKI.js → index-CKS65_Dw.js} +3 -3
- package/dist/{index-Bdu31aRV.js → index-CLWgeKwr.js} +2 -2
- package/dist/{index-DxFZKDq-.js → index-C_2o9qgM.js} +6 -6
- package/dist/index-CgQH7-9F.js +130 -0
- package/dist/{index-B_C7H9WL.js → index-D6V-4vNa.js} +5 -5
- package/dist/index-DC5lxCN8.js +474 -0
- package/dist/{index-D9AqC2O-.js → index-DET70T3j.js} +1 -1
- package/dist/index-DEx5rtXv.js +242 -0
- package/dist/{index-DpcrvKsK.js → index-DJOyOVn_.js} +87 -74
- package/dist/{index-qK6pyAGy.js → index-DKeYG0Fu.js} +4 -4
- package/dist/index-DLQoecEe.js +1143 -0
- package/dist/{index-CR3sbzOU.js → index-DLyAy3cr.js} +7 -7
- package/dist/index-DOygBsXO.js +2826 -0
- package/dist/index-DRrBkbr_.js +100 -0
- package/dist/index-DWsfQMp8.js +208 -0
- package/dist/index-Pk7OkJrk.js +1133 -0
- package/dist/index-TDZM-Zv3.js +9287 -0
- package/dist/index-WIsi8fln.js +339 -0
- package/dist/{index-BAK7UDvY.js → index-aw72ID7y.js} +1 -1
- package/dist/{index-ClA0896K.js → index-lftFkqfI.js} +4 -4
- package/dist/{index-JMzBzwiO.js → index-usrA11ZG.js} +618 -617
- package/dist/index.js +1 -1
- package/dist/{instance-D5dhjbgg.js → instance-f3C-1qYl.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/schedule-DfkgwPdE.js +497 -0
- package/dist/{send-default-agent-team-message-C882sJLV.js → send-default-agent-team-message-d_ECdczr.js} +1 -1
- package/dist/{sso-user-Bi9_l9yi.js → sso-user-HcsSzg8P.js} +1 -1
- package/dist/{training-Ba09KItE.js → training-DnNQN0An.js} +1 -1
- package/dist/{useAppStore-ibJyVIAX.js → useAppStore-kRZEA5WZ.js} +19 -19
- package/dist/webide-DPjFYxLl.js +7845 -0
- package/dist/z-team-component.css +2 -2
- package/package.json +1 -1
- package/dist/SmartWorkbench.module-xRRmpTTw.js +0 -85
- package/dist/createWorkspaceWsHandler-mq-UTF2O.js +0 -13028
- package/dist/index-7nSly-MA.js +0 -405
- package/dist/index-B11_fFjX.js +0 -1182
- package/dist/index-B3-0eXYQ.js +0 -844
- package/dist/index-Cp3DAwNx.js +0 -13862
- package/dist/index-NaBR2aQE.js +0 -6685
- package/dist/index-UsGqMo11.js +0 -848
- package/dist/schedule-C-4ksDPw.js +0 -239
- package/dist/webide-RsFP9pHM.js +0 -8087
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as o, f as d, B as r, u as c } from "./api-
|
|
1
|
+
import { a as o, f as d, B as r, u as c } from "./api-CALqShkO.js";
|
|
2
2
|
async function h(e, n = "") {
|
|
3
3
|
const t = new URLSearchParams();
|
|
4
4
|
n && t.set("token", n), e.scenario_code && t.set("scenario_code", e.scenario_code), e.status && t.set("status", e.status), e.name && t.set("name", e.name), e.role && t.set("role", e.role), e.create_time_start && t.set("create_time_start", e.create_time_start), e.create_time_end && t.set("create_time_end", e.create_time_end), t.set("page", String(e.page ?? 1)), t.set("size", String(e.size ?? 20));
|
|
@@ -198,9 +198,9 @@ async function F(e = "", n = 8) {
|
|
|
198
198
|
}));
|
|
199
199
|
}
|
|
200
200
|
export {
|
|
201
|
-
|
|
201
|
+
h as a,
|
|
202
202
|
v as b,
|
|
203
|
-
|
|
203
|
+
F as c,
|
|
204
204
|
I as d,
|
|
205
205
|
b as e,
|
|
206
206
|
C as f,
|
package/dist/pages.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElement as e } from "react";
|
|
2
2
|
import { ReadOutlined as t } from "@ant-design/icons";
|
|
3
|
-
import { S as o, P as a, C as r, Z as m } from "./ComponentDoc-
|
|
3
|
+
import { S as o, P as a, C as r, Z as m } from "./ComponentDoc-yvIrAz9-.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react-router-dom";
|
|
6
6
|
import "antd";
|
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
import { a as i, f as c, B as d, n as u, u as y, t as $, g as A } from "./api-CALqShkO.js";
|
|
2
|
+
import { jsxs as E, jsx as T } from "react/jsx-runtime";
|
|
3
|
+
import { Component as C } from "react";
|
|
4
|
+
const S = [
|
|
5
|
+
{ status: "TODO", label: "待办" },
|
|
6
|
+
{ status: "DOING", label: "进行中" },
|
|
7
|
+
{ status: "DONE", label: "已完成" }
|
|
8
|
+
];
|
|
9
|
+
function _(e) {
|
|
10
|
+
if (!e || !e.trim()) return [...S];
|
|
11
|
+
try {
|
|
12
|
+
const t = JSON.parse(e), n = Array.isArray(t == null ? void 0 : t.statusColumns) ? t.statusColumns : null;
|
|
13
|
+
if (!n) return [...S];
|
|
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 : [...S];
|
|
19
|
+
} catch {
|
|
20
|
+
return [...S];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function b(e) {
|
|
24
|
+
if (e == null) return !0;
|
|
25
|
+
const t = String(e).trim();
|
|
26
|
+
return t === "" || t === "0";
|
|
27
|
+
}
|
|
28
|
+
function f(e) {
|
|
29
|
+
const t = (s) => {
|
|
30
|
+
if (typeof s != "string" || !s.trim()) return [];
|
|
31
|
+
try {
|
|
32
|
+
const l = JSON.parse(s);
|
|
33
|
+
return Array.isArray(l) ? l.filter((m) => typeof m == "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
|
+
(m) => !!m && typeof m == "object" && typeof m.type == "string"
|
|
43
|
+
) : [];
|
|
44
|
+
} catch {
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
}, o = () => {
|
|
48
|
+
const s = e.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 p = JSON.parse(s);
|
|
55
|
+
l = Array.isArray(p) ? p : null;
|
|
56
|
+
} catch {
|
|
57
|
+
l = s.split(",");
|
|
58
|
+
}
|
|
59
|
+
if (l) {
|
|
60
|
+
const p = l.map((h) => String(h ?? "").trim()).filter(Boolean);
|
|
61
|
+
if (p.length > 0) return Array.from(new Set(p));
|
|
62
|
+
}
|
|
63
|
+
const m = e.assigneeUserId == null ? "" : String(e.assigneeUserId);
|
|
64
|
+
return m.trim() ? [m.trim()] : [];
|
|
65
|
+
}, r = (s) => {
|
|
66
|
+
const l = e.assignees, m = Array.isArray(l) ? l.map((p) => {
|
|
67
|
+
const h = p ?? {}, I = String(h.userId ?? "").trim();
|
|
68
|
+
return I ? { userId: I, name: String(h.name ?? "").trim() || I } : null;
|
|
69
|
+
}).filter((p) => p != null) : [];
|
|
70
|
+
return m.length > 0 ? m : s.map((p) => ({ userId: p, name: p }));
|
|
71
|
+
}, a = o();
|
|
72
|
+
return {
|
|
73
|
+
id: $(e.id),
|
|
74
|
+
projectId: e.projectId == null ? null : $(e.projectId),
|
|
75
|
+
userId: String(e.userId ?? ""),
|
|
76
|
+
title: String(e.title ?? ""),
|
|
77
|
+
detail: e.detail == null ? null : String(e.detail),
|
|
78
|
+
status: e.status ?? "TODO",
|
|
79
|
+
priority: e.priority ?? "MEDIUM",
|
|
80
|
+
dueDate: e.dueDate == null ? null : String(e.dueDate).slice(0, 10),
|
|
81
|
+
assigneeUserId: a[0] ?? null,
|
|
82
|
+
assigneeUserIds: a,
|
|
83
|
+
assignees: r(a),
|
|
84
|
+
projectTitle: e.projectTitle == null || !String(e.projectTitle).trim() ? null : String(e.projectTitle),
|
|
85
|
+
tags: t(e.tags),
|
|
86
|
+
links: n(e.links),
|
|
87
|
+
parentId: b(e.parentId) ? "" : $(e.parentId),
|
|
88
|
+
sortOrder: e.sortOrder == null ? 0 : Number(e.sortOrder),
|
|
89
|
+
completedAt: e.completedAt == null ? null : String(e.completedAt),
|
|
90
|
+
completedBy: e.completedBy == null ? null : String(e.completedBy),
|
|
91
|
+
createByName: e.createByName == null ? null : String(e.createByName),
|
|
92
|
+
updateTime: e.updateTime == null ? null : String(e.updateTime)
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function g(e) {
|
|
96
|
+
const t = e ?? {};
|
|
97
|
+
return {
|
|
98
|
+
id: $(t.id),
|
|
99
|
+
userId: String(t.userId ?? ""),
|
|
100
|
+
title: String(t.title ?? ""),
|
|
101
|
+
icon: t.icon == null ? null : String(t.icon),
|
|
102
|
+
description: t.description == null ? null : String(t.description),
|
|
103
|
+
visibility: t.visibility === "shared" ? "shared" : "private",
|
|
104
|
+
sortOrder: t.sortOrder == null ? 0 : Number(t.sortOrder),
|
|
105
|
+
extraInfo: t.extraInfo == null ? null : String(t.extraInfo),
|
|
106
|
+
createByName: t.createByName == null ? null : String(t.createByName)
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function N(e) {
|
|
110
|
+
const t = e ?? {}, n = Array.isArray(t.memberDetails) ? t.memberDetails : [];
|
|
111
|
+
return {
|
|
112
|
+
...g(t),
|
|
113
|
+
openCount: t.openCount == null ? 0 : Number(t.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 P(e = "") {
|
|
121
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await i(`${d}/todo/projects${t}`, c), o = await u(n, "获取待办项目失败");
|
|
122
|
+
return {
|
|
123
|
+
owned: ((o == null ? void 0 : o.owned) ?? []).map(N),
|
|
124
|
+
joined: ((o == null ? void 0 : o.joined) ?? []).map(N)
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
async function L(e, t = "") {
|
|
128
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects${n}`, {
|
|
129
|
+
...c,
|
|
130
|
+
method: "POST",
|
|
131
|
+
headers: { "Content-Type": "application/json" },
|
|
132
|
+
body: JSON.stringify(e)
|
|
133
|
+
}), r = await u(o, "新建项目失败");
|
|
134
|
+
return g(r);
|
|
135
|
+
}
|
|
136
|
+
async function M(e, t, n = "") {
|
|
137
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${e}${o}`, {
|
|
138
|
+
...c,
|
|
139
|
+
method: "PUT",
|
|
140
|
+
headers: { "Content-Type": "application/json" },
|
|
141
|
+
body: JSON.stringify(t)
|
|
142
|
+
}), a = await u(r, "更新项目失败");
|
|
143
|
+
return g(a);
|
|
144
|
+
}
|
|
145
|
+
async function D(e, t = "") {
|
|
146
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects/${e}${n}`, {
|
|
147
|
+
...c,
|
|
148
|
+
method: "DELETE"
|
|
149
|
+
});
|
|
150
|
+
return y(o, "删除项目失败");
|
|
151
|
+
}
|
|
152
|
+
async function k(e, t, n = "") {
|
|
153
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${e}/members${o}`, {
|
|
154
|
+
...c,
|
|
155
|
+
method: "POST",
|
|
156
|
+
headers: { "Content-Type": "application/json" },
|
|
157
|
+
body: JSON.stringify(t)
|
|
158
|
+
}), a = await u(r, "添加成员失败");
|
|
159
|
+
return g(a);
|
|
160
|
+
}
|
|
161
|
+
async function B(e, t, n = "") {
|
|
162
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
|
|
163
|
+
`${d}/todo/projects/${e}/members/${encodeURIComponent(t)}${o}`,
|
|
164
|
+
{ ...c, method: "DELETE" }
|
|
165
|
+
), a = await u(r, "移除成员失败");
|
|
166
|
+
return g(a);
|
|
167
|
+
}
|
|
168
|
+
async function G(e = {}, t = "") {
|
|
169
|
+
const n = new URLSearchParams();
|
|
170
|
+
t && n.set("token", t), e.view && n.set("view", e.view), e.projectId != null && n.set("projectId", String(e.projectId)), e.status && n.set("status", e.status), e.keyword && n.set("keyword", e.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(f);
|
|
176
|
+
}
|
|
177
|
+
async function q(e, t = "") {
|
|
178
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items${n}`, {
|
|
179
|
+
...c,
|
|
180
|
+
method: "POST",
|
|
181
|
+
headers: { "Content-Type": "application/json" },
|
|
182
|
+
body: JSON.stringify(e)
|
|
183
|
+
}), r = await u(o, "新建事项失败");
|
|
184
|
+
return f(r);
|
|
185
|
+
}
|
|
186
|
+
async function J(e, t, n = "") {
|
|
187
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}${o}`, {
|
|
188
|
+
...c,
|
|
189
|
+
method: "PUT",
|
|
190
|
+
headers: { "Content-Type": "application/json" },
|
|
191
|
+
body: JSON.stringify(t)
|
|
192
|
+
}), a = await u(r, "更新事项失败");
|
|
193
|
+
return f(a);
|
|
194
|
+
}
|
|
195
|
+
async function x(e, t = "", n = "") {
|
|
196
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}/complete${o}`, {
|
|
197
|
+
...c,
|
|
198
|
+
method: "POST",
|
|
199
|
+
headers: { "Content-Type": "application/json" },
|
|
200
|
+
body: JSON.stringify({ result: t })
|
|
201
|
+
}), a = await u(r, "完成事项失败");
|
|
202
|
+
return f(a);
|
|
203
|
+
}
|
|
204
|
+
async function W(e, t = "") {
|
|
205
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/${e}/reopen${n}`, {
|
|
206
|
+
...c,
|
|
207
|
+
method: "POST"
|
|
208
|
+
}), r = await u(o, "重开事项失败");
|
|
209
|
+
return f(r);
|
|
210
|
+
}
|
|
211
|
+
async function V(e, t, n = "") {
|
|
212
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}/reorder${o}`, {
|
|
213
|
+
...c,
|
|
214
|
+
method: "POST",
|
|
215
|
+
headers: { "Content-Type": "application/json" },
|
|
216
|
+
body: JSON.stringify(t)
|
|
217
|
+
}), a = await u(r, "调整排序失败");
|
|
218
|
+
return f(a);
|
|
219
|
+
}
|
|
220
|
+
async function z(e, t = "") {
|
|
221
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", 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: e })
|
|
226
|
+
});
|
|
227
|
+
return y(o, "调整排序失败");
|
|
228
|
+
}
|
|
229
|
+
async function v(e, t = "") {
|
|
230
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", 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: e })
|
|
235
|
+
});
|
|
236
|
+
return y(o, "调整项目排序失败");
|
|
237
|
+
}
|
|
238
|
+
async function F(e, t = "") {
|
|
239
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/${e}${n}`, {
|
|
240
|
+
...c,
|
|
241
|
+
method: "DELETE"
|
|
242
|
+
});
|
|
243
|
+
return y(o, "删除事项失败");
|
|
244
|
+
}
|
|
245
|
+
const j = {
|
|
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 K(e, t) {
|
|
267
|
+
var o;
|
|
268
|
+
if (!e) return !1;
|
|
269
|
+
if (e.is_global_admin || (o = e.permissions) != null && o.includes(t)) return !0;
|
|
270
|
+
const n = j[t];
|
|
271
|
+
return !!(n != null && n.some((r) => {
|
|
272
|
+
var a;
|
|
273
|
+
return (a = e.permissions) == null ? void 0 : a.includes(r);
|
|
274
|
+
}));
|
|
275
|
+
}
|
|
276
|
+
class Y extends C {
|
|
277
|
+
constructor(t) {
|
|
278
|
+
super(t), this.state = { hasError: !1, error: null };
|
|
279
|
+
}
|
|
280
|
+
static getDerivedStateFromError(t) {
|
|
281
|
+
return { hasError: !0, error: t };
|
|
282
|
+
}
|
|
283
|
+
componentDidCatch(t, n) {
|
|
284
|
+
console.error("[ErrorBoundary]", t, n.componentStack);
|
|
285
|
+
}
|
|
286
|
+
render() {
|
|
287
|
+
var t;
|
|
288
|
+
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ E(
|
|
289
|
+
"div",
|
|
290
|
+
{
|
|
291
|
+
style: {
|
|
292
|
+
display: "flex",
|
|
293
|
+
flexDirection: "column",
|
|
294
|
+
alignItems: "center",
|
|
295
|
+
justifyContent: "center",
|
|
296
|
+
height: "100%",
|
|
297
|
+
padding: 24,
|
|
298
|
+
color: "#999",
|
|
299
|
+
fontSize: 14,
|
|
300
|
+
gap: 8
|
|
301
|
+
},
|
|
302
|
+
children: [
|
|
303
|
+
/* @__PURE__ */ T("div", { style: { fontSize: 16, fontWeight: 600, color: "#ff4d4f" }, children: "渲染异常" }),
|
|
304
|
+
/* @__PURE__ */ T(
|
|
305
|
+
"div",
|
|
306
|
+
{
|
|
307
|
+
style: {
|
|
308
|
+
maxWidth: 400,
|
|
309
|
+
textAlign: "center",
|
|
310
|
+
wordBreak: "break-word"
|
|
311
|
+
},
|
|
312
|
+
children: ((t = this.state.error) == null ? void 0 : t.message) || "未知错误"
|
|
313
|
+
}
|
|
314
|
+
),
|
|
315
|
+
/* @__PURE__ */ T(
|
|
316
|
+
"button",
|
|
317
|
+
{
|
|
318
|
+
type: "button",
|
|
319
|
+
onClick: () => this.setState({ hasError: !1, error: null }),
|
|
320
|
+
style: {
|
|
321
|
+
marginTop: 8,
|
|
322
|
+
padding: "4px 16px",
|
|
323
|
+
borderRadius: 4,
|
|
324
|
+
border: "1px solid #d9d9d9",
|
|
325
|
+
background: "#fff",
|
|
326
|
+
cursor: "pointer",
|
|
327
|
+
fontSize: 13
|
|
328
|
+
},
|
|
329
|
+
children: "重试"
|
|
330
|
+
}
|
|
331
|
+
)
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
) : this.props.children;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
function O(e) {
|
|
338
|
+
const t = e && typeof e == "object" ? e : {}, n = Array.isArray(t.items) ? A(t.items) : [];
|
|
339
|
+
return { ...t, items: n };
|
|
340
|
+
}
|
|
341
|
+
async function H(e, t = "") {
|
|
342
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
343
|
+
`${d}/personal-agents/${e}/schedules${n}`,
|
|
344
|
+
c
|
|
345
|
+
);
|
|
346
|
+
return u(o, "获取定时任务列表失败");
|
|
347
|
+
}
|
|
348
|
+
async function Q(e, t, n, o, r = "", a = "", s = "") {
|
|
349
|
+
const l = s ? `?token=${encodeURIComponent(s)}` : "", m = await i(
|
|
350
|
+
`${d}/personal-agents/${e}/schedules${l}`,
|
|
351
|
+
{
|
|
352
|
+
...c,
|
|
353
|
+
method: "POST",
|
|
354
|
+
headers: { "Content-Type": "application/json" },
|
|
355
|
+
body: JSON.stringify({
|
|
356
|
+
name: t,
|
|
357
|
+
prompt: n,
|
|
358
|
+
cron_expression: o,
|
|
359
|
+
notify_user_id: r,
|
|
360
|
+
notify_user_name: a
|
|
361
|
+
})
|
|
362
|
+
}
|
|
363
|
+
);
|
|
364
|
+
return u(m, "创建定时任务失败");
|
|
365
|
+
}
|
|
366
|
+
async function X(e, t, n, o = "") {
|
|
367
|
+
const r = o ? `?token=${encodeURIComponent(o)}` : "", a = await i(
|
|
368
|
+
`${d}/personal-agents/${e}/schedules/${t}${r}`,
|
|
369
|
+
{
|
|
370
|
+
...c,
|
|
371
|
+
method: "PUT",
|
|
372
|
+
headers: { "Content-Type": "application/json" },
|
|
373
|
+
body: JSON.stringify(n)
|
|
374
|
+
}
|
|
375
|
+
);
|
|
376
|
+
return u(a, "更新定时任务失败");
|
|
377
|
+
}
|
|
378
|
+
async function Z(e, t, n = "") {
|
|
379
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
|
|
380
|
+
`${d}/personal-agents/${e}/schedules/${t}${o}`,
|
|
381
|
+
{
|
|
382
|
+
...c,
|
|
383
|
+
method: "DELETE"
|
|
384
|
+
}
|
|
385
|
+
);
|
|
386
|
+
return y(r, "删除定时任务失败");
|
|
387
|
+
}
|
|
388
|
+
async function ee(e, t, n, o = "") {
|
|
389
|
+
const r = o ? `?token=${encodeURIComponent(o)}` : "", a = await i(
|
|
390
|
+
`${d}/personal-agents/${e}/schedules/${t}/toggle${r}`,
|
|
391
|
+
{
|
|
392
|
+
...c,
|
|
393
|
+
method: "POST",
|
|
394
|
+
headers: { "Content-Type": "application/json" },
|
|
395
|
+
body: JSON.stringify({ enable: n })
|
|
396
|
+
}
|
|
397
|
+
);
|
|
398
|
+
return u(a, "切换定时任务状态失败");
|
|
399
|
+
}
|
|
400
|
+
async function te(e, t, n = 1, o = 20, r = "") {
|
|
401
|
+
const a = new URLSearchParams();
|
|
402
|
+
a.set("page", String(n)), a.set("size", String(o)), r && a.set("token", r);
|
|
403
|
+
const s = await i(
|
|
404
|
+
`${d}/personal-agents/${e}/schedules/${t}/logs?${a.toString()}`,
|
|
405
|
+
c
|
|
406
|
+
), l = await y(s, "获取执行历史失败");
|
|
407
|
+
return O(l);
|
|
408
|
+
}
|
|
409
|
+
async function ne(e, t, n = "") {
|
|
410
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
|
|
411
|
+
`${d}/personal-agents/${e}/schedules/${t}/run${o}`,
|
|
412
|
+
{
|
|
413
|
+
...c,
|
|
414
|
+
method: "POST"
|
|
415
|
+
}
|
|
416
|
+
);
|
|
417
|
+
return u(r, "手动触发任务失败");
|
|
418
|
+
}
|
|
419
|
+
async function oe(e, t = "", n = "") {
|
|
420
|
+
const o = new URLSearchParams();
|
|
421
|
+
t && o.set("keyword", t), n && o.set("token", n);
|
|
422
|
+
const r = await i(
|
|
423
|
+
`${d}/personal-agents/${e}/schedules/staff-search?${o.toString()}`,
|
|
424
|
+
c
|
|
425
|
+
);
|
|
426
|
+
return (await y(r, "搜索员工失败") ?? []).map((s) => {
|
|
427
|
+
const l = (s == null ? void 0 : s.extend) ?? {};
|
|
428
|
+
return {
|
|
429
|
+
userId: String((s == null ? void 0 : s.userId) ?? (s == null ? void 0 : s.id) ?? ""),
|
|
430
|
+
name: String((s == null ? void 0 : s.name) ?? ""),
|
|
431
|
+
accountNo: String((s == null ? void 0 : s.accountNo) ?? ""),
|
|
432
|
+
jobNumber: String((s == null ? void 0 : s.jobNumber) ?? ""),
|
|
433
|
+
flowerName: String((s == null ? void 0 : s.flowerName) ?? l.flowerName ?? "")
|
|
434
|
+
};
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
async function re(e = "", t = 50) {
|
|
438
|
+
const n = new URLSearchParams();
|
|
439
|
+
n.set("limit", String(t)), e && n.set("token", e);
|
|
440
|
+
const o = await i(
|
|
441
|
+
`${d}/personal-agents/schedules/notifications?${n.toString()}`,
|
|
442
|
+
c
|
|
443
|
+
), r = await y(o, "获取通知失败");
|
|
444
|
+
return O(r);
|
|
445
|
+
}
|
|
446
|
+
async function se(e, t = "") {
|
|
447
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
448
|
+
`${d}/personal-agents/schedules/notifications/${e}/read${n}`,
|
|
449
|
+
{
|
|
450
|
+
...c,
|
|
451
|
+
method: "POST"
|
|
452
|
+
}
|
|
453
|
+
);
|
|
454
|
+
return y(o, "标记已读失败");
|
|
455
|
+
}
|
|
456
|
+
async function ae(e = "") {
|
|
457
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await i(
|
|
458
|
+
`${d}/personal-agents/schedules/notifications/read-all${t}`,
|
|
459
|
+
{
|
|
460
|
+
...c,
|
|
461
|
+
method: "POST"
|
|
462
|
+
}
|
|
463
|
+
);
|
|
464
|
+
return y(n, "标记已读失败");
|
|
465
|
+
}
|
|
466
|
+
export {
|
|
467
|
+
V as A,
|
|
468
|
+
v as B,
|
|
469
|
+
S as D,
|
|
470
|
+
Y as E,
|
|
471
|
+
H as a,
|
|
472
|
+
re as b,
|
|
473
|
+
te as c,
|
|
474
|
+
Q as d,
|
|
475
|
+
Z as e,
|
|
476
|
+
P as f,
|
|
477
|
+
ae as g,
|
|
478
|
+
K as h,
|
|
479
|
+
k as i,
|
|
480
|
+
q as j,
|
|
481
|
+
J as k,
|
|
482
|
+
W as l,
|
|
483
|
+
se as m,
|
|
484
|
+
x as n,
|
|
485
|
+
F as o,
|
|
486
|
+
_ as p,
|
|
487
|
+
B as q,
|
|
488
|
+
ne as r,
|
|
489
|
+
oe as s,
|
|
490
|
+
ee as t,
|
|
491
|
+
X as u,
|
|
492
|
+
L as v,
|
|
493
|
+
M as w,
|
|
494
|
+
D as x,
|
|
495
|
+
G as y,
|
|
496
|
+
z
|
|
497
|
+
};
|