@yuku123/z-team-component 0.2.59 → 0.2.61
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-CZGpQekc.js} +1497 -1387
- package/dist/{InvitationManagementPage-Gkqisq4C.js → InvitationManagementPage-Dvhu6OWP.js} +1 -1
- package/dist/{OnboardingPage-C7C4PEjn.js → OnboardingPage-CF_ECLv7.js} +2 -2
- package/dist/{ScheduledTasks-BQRcjBOd.js → ScheduledTasks-Cec22jf4.js} +8 -8
- package/dist/SystemShell-D8uLAhd8.js +670 -0
- package/dist/{admin-logs-B9KS6VJz.js → admin-logs-DCYof_u5.js} +2 -2
- package/dist/{api-CALqShkO.js → api-DWt94BcM.js} +584 -572
- package/dist/{api-Y-52Ejhz.js → api-Dxw9Ajfn.js} +1 -1
- package/dist/{createWorkspaceWsHandler-DP30xvug.js → createWorkspaceWsHandler-3aHkBZE9.js} +4 -4
- package/dist/{index-4YxdJwFm.js → index-4LNRkvy6.js} +3 -3
- package/dist/index-B5dPYPuA.js +93 -0
- package/dist/{index-C2Wkg1b5.js → index-BIdcTXZW.js} +3 -3
- package/dist/{index-m8V5TniT.js → index-BVh0W8ck.js} +15861 -15586
- package/dist/{index-Gt21FARO.js → index-BdGXRcf4.js} +3 -3
- package/dist/index-BgR7NlYr.js +118 -0
- package/dist/{index-8gCovDDT.js → index-C6jp_1-U.js} +6 -6
- package/dist/{index-DJ0FV74Y.js → index-CKtjapcc.js} +3 -3
- package/dist/{index-lftFkqfI.js → index-CTKf6h2u.js} +4 -4
- package/dist/{index-DKeYG0Fu.js → index-CrIIInfs.js} +4 -4
- package/dist/{index-63ovR-_x.js → index-DF4ZWJfp.js} +1 -1
- package/dist/index-DepaHnKP.js +2858 -0
- package/dist/{index-CO6WYRIS.js → index-Dfce6-jv.js} +3 -3
- package/dist/{index-Bpn6x1So.js → index-Dr8elYjm.js} +12 -12
- package/dist/{index-CLWgeKwr.js → index-DtVBFjaJ.js} +2 -2
- package/dist/{index-CGWttFLb.js → index-Dvhocfyo.js} +4 -4
- 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-C3B7CbHo.js → index-bsGAZKaU.js} +624 -613
- package/dist/index-gMeWspFX.js +112 -0
- package/dist/{index-DET70T3j.js → index-i6Ejgpao.js} +1 -1
- package/dist/{index-BvTYVEEv.js → index-nxjdN-Fp.js} +20 -16
- package/dist/{index-DfQCaS0z.js → index-tipx38MZ.js} +248 -244
- package/dist/{index-CN9NsUQ6.js → index-yRDgpDx1.js} +5 -5
- package/dist/index.js +1 -1
- package/dist/{instance-f3C-1qYl.js → instance-CbkHlDr4.js} +1 -1
- package/dist/menuPermission-BvgoOn21.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
|
@@ -1,497 +0,0 @@
|
|
|
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
|
-
};
|