@yuku123/z-team-component 0.2.75 → 0.2.77
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-BJxIhIPc.js → ChangeLogView-DwuIBDL5.js} +1 -1
- package/dist/{ComponentDoc-CMfr27b7.js → ComponentDoc-B83ray2w.js} +5 -5
- package/dist/{InvitationManagementPage-SMhrq5dN.js → InvitationManagementPage-CIzCRWPq.js} +1 -1
- package/dist/{OnboardingPage-CjLgp-jE.js → OnboardingPage-BpjNlxUb.js} +2 -2
- package/dist/{ScheduledTasks-C2wsuoa9.js → ScheduledTasks-B87VNnoB.js} +5 -5
- package/dist/{SystemShell-y3kvbENk.js → SystemShell-B0kCPBz3.js} +4 -4
- package/dist/{api-CVKSSNXw.js → api-CpE2blgj.js} +1 -1
- package/dist/{createWorkspaceWsHandler-25JfnMML.js → createWorkspaceWsHandler-CzfcRs0V.js} +3801 -3890
- package/dist/index-B2rRYGQK.js +9567 -0
- package/dist/{index-B_oOPFoQ.js → index-BBu4pWAN.js} +2 -2
- package/dist/{index-DWd0Y6qP.js → index-BHDrnEnt.js} +2 -2
- package/dist/{index-CeCBja5s.js → index-BO5y0Gwn.js} +3 -3
- package/dist/{index-WIsi8fln.js → index-B_LJRFsK.js} +73 -73
- package/dist/{index-CbTwXfER.js → index-BoJxTQwX.js} +68 -68
- package/dist/{index-BADGOdUu.js → index-BydWNuk5.js} +392 -392
- package/dist/{index-CfW9kGYJ.js → index-CW-JDoj9.js} +3 -3
- package/dist/{index-D54nAoGP.js → index-CpAUbzCH.js} +5 -5
- package/dist/{index-CchpPnBl.js → index-D1KPGWN9.js} +1 -1
- package/dist/{index-DfecivMN.js → index-D6yh1Kok.js} +13 -13
- package/dist/{index-C9YhDxMT.js → index-DCwvhwes.js} +1 -1
- package/dist/{index-BA3lZUmW.js → index-DF2jRLkS.js} +1 -1
- package/dist/{index-rPNKkWaw.js → index-DK6-iytM.js} +1 -1
- package/dist/{index-fW1JBhEB.js → index-DTBIyd4I.js} +2 -2
- package/dist/{index-3c6HvG__.js → index-DahQUH9c.js} +1 -1
- package/dist/{index-B_O9mXF6.js → index-DeT_z9Dg.js} +1 -1
- package/dist/{index-C6S3MIu4.js → index-DhDdFRHC.js} +2 -2
- package/dist/index-LA0c93lD.js +2908 -0
- package/dist/{index-_53KTMhL.js → index-Sk6xoy0n.js} +1 -1
- package/dist/{index-Pq3n7-vE.js → index-cDBJpBAd.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{instance-B9aQMplq.js → instance-CDGmSyID.js} +13 -13
- package/dist/{menuPermission-CtJddtOO.js → menuPermission-Cn3TADR1.js} +2 -2
- package/dist/pages.js +3 -3
- package/dist/personal-VG7XVvW-.js +294 -0
- package/dist/{schedule-iMEGim0L.js → schedule-Dt_ZRuce.js} +268 -230
- package/dist/webide-BM1A4eJr.js +8399 -0
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
- package/dist/admin-logs-asBlA9MU.js +0 -199
- package/dist/index-Cd_xAvmO.js +0 -9419
- package/dist/index-e9H9wjYU.js +0 -2882
- package/dist/webide-BlpH-J-H.js +0 -8255
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { a as i, f as c, B as d, n as u, u as
|
|
2
|
-
import { jsx as g, jsxs as
|
|
1
|
+
import { a as i, f as c, B as d, n as u, u as S, t as h, g as P } from "./api-DPkUB1DA.js";
|
|
2
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo as b, useState as L, useEffect as D, Component as M } from "react";
|
|
4
|
-
const
|
|
4
|
+
const N = [
|
|
5
5
|
{ status: "TODO", label: "待办" },
|
|
6
6
|
{ status: "DOING", label: "进行中" },
|
|
7
7
|
{ status: "DONE", label: "已完成" }
|
|
8
8
|
];
|
|
9
|
-
function
|
|
10
|
-
if (!
|
|
9
|
+
function at(e) {
|
|
10
|
+
if (!e || !e.trim()) return [...N];
|
|
11
11
|
try {
|
|
12
|
-
const
|
|
13
|
-
if (!n) return [...
|
|
12
|
+
const t = JSON.parse(e), n = Array.isArray(t == null ? void 0 : t.statusColumns) ? t.statusColumns : null;
|
|
13
|
+
if (!n) return [...N];
|
|
14
14
|
const o = n.map((r) => {
|
|
15
15
|
const a = r ?? {}, s = String(a.status ?? "").trim().toUpperCase(), l = String(a.label ?? "").trim();
|
|
16
16
|
return s && l ? { status: s, label: l } : null;
|
|
17
17
|
}).filter((r) => r != null);
|
|
18
|
-
return o.length > 0 ? o : [...
|
|
18
|
+
return o.length > 0 ? o : [...N];
|
|
19
19
|
} catch {
|
|
20
|
-
return [...
|
|
20
|
+
return [...N];
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
function B(
|
|
24
|
-
if (
|
|
25
|
-
const
|
|
26
|
-
return
|
|
23
|
+
function B(e) {
|
|
24
|
+
if (e == null) return !0;
|
|
25
|
+
const t = String(e).trim();
|
|
26
|
+
return t === "" || t === "0";
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
28
|
+
function I(e) {
|
|
29
|
+
const t = (s) => {
|
|
30
30
|
if (typeof s != "string" || !s.trim()) return [];
|
|
31
31
|
try {
|
|
32
32
|
const l = JSON.parse(s);
|
|
@@ -45,7 +45,7 @@ function S(t) {
|
|
|
45
45
|
return [];
|
|
46
46
|
}
|
|
47
47
|
}, o = () => {
|
|
48
|
-
const s =
|
|
48
|
+
const s = e.assigneeUserIds;
|
|
49
49
|
let l = null;
|
|
50
50
|
if (Array.isArray(s))
|
|
51
51
|
l = s;
|
|
@@ -60,189 +60,225 @@ function S(t) {
|
|
|
60
60
|
const m = l.map((f) => String(f ?? "").trim()).filter(Boolean);
|
|
61
61
|
if (m.length > 0) return Array.from(new Set(m));
|
|
62
62
|
}
|
|
63
|
-
const p =
|
|
63
|
+
const p = e.assigneeUserId == null ? "" : String(e.assigneeUserId);
|
|
64
64
|
return p.trim() ? [p.trim()] : [];
|
|
65
65
|
}, r = (s) => {
|
|
66
|
-
const l =
|
|
66
|
+
const l = e.assignees, p = Array.isArray(l) ? l.map((m) => {
|
|
67
67
|
const f = m ?? {}, $ = String(f.userId ?? "").trim();
|
|
68
68
|
return $ ? { userId: $, name: String(f.name ?? "").trim() || $ } : null;
|
|
69
69
|
}).filter((m) => m != null) : [];
|
|
70
70
|
return p.length > 0 ? p : s.map((m) => ({ userId: m, name: m }));
|
|
71
71
|
}, a = o();
|
|
72
72
|
return {
|
|
73
|
-
id:
|
|
74
|
-
projectId:
|
|
75
|
-
userId: String(
|
|
76
|
-
title: String(
|
|
77
|
-
detail:
|
|
78
|
-
status:
|
|
79
|
-
priority:
|
|
80
|
-
dueDate:
|
|
73
|
+
id: h(e.id),
|
|
74
|
+
projectId: e.projectId == null ? null : h(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
81
|
assigneeUserId: a[0] ?? null,
|
|
82
82
|
assigneeUserIds: a,
|
|
83
83
|
assignees: r(a),
|
|
84
|
-
projectTitle:
|
|
85
|
-
tags: e
|
|
86
|
-
links: n(
|
|
87
|
-
parentId: B(
|
|
88
|
-
sortOrder:
|
|
89
|
-
completedAt:
|
|
90
|
-
completedBy:
|
|
91
|
-
createByName:
|
|
92
|
-
updateTime:
|
|
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) ? "" : h(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
|
+
agentId: e.agentId == null ? null : h(e.agentId),
|
|
94
|
+
agentSessionId: e.agentSessionId == null ? null : h(e.agentSessionId)
|
|
93
95
|
};
|
|
94
96
|
}
|
|
95
|
-
function
|
|
96
|
-
const
|
|
97
|
+
function T(e) {
|
|
98
|
+
const t = e ?? {};
|
|
97
99
|
return {
|
|
98
|
-
id:
|
|
99
|
-
userId: String(
|
|
100
|
-
title: String(
|
|
101
|
-
icon:
|
|
102
|
-
description:
|
|
103
|
-
visibility:
|
|
104
|
-
sortOrder:
|
|
105
|
-
extraInfo:
|
|
106
|
-
createByName:
|
|
100
|
+
id: h(t.id),
|
|
101
|
+
userId: String(t.userId ?? ""),
|
|
102
|
+
title: String(t.title ?? ""),
|
|
103
|
+
icon: t.icon == null ? null : String(t.icon),
|
|
104
|
+
description: t.description == null ? null : String(t.description),
|
|
105
|
+
visibility: t.visibility === "shared" ? "shared" : "private",
|
|
106
|
+
sortOrder: t.sortOrder == null ? 0 : Number(t.sortOrder),
|
|
107
|
+
extraInfo: t.extraInfo == null ? null : String(t.extraInfo),
|
|
108
|
+
createByName: t.createByName == null ? null : String(t.createByName)
|
|
107
109
|
};
|
|
108
110
|
}
|
|
109
|
-
function C(
|
|
110
|
-
const
|
|
111
|
+
function C(e) {
|
|
112
|
+
const t = e ?? {}, n = Array.isArray(t.memberDetails) ? t.memberDetails : [];
|
|
111
113
|
return {
|
|
112
|
-
...
|
|
113
|
-
openCount:
|
|
114
|
+
...T(t),
|
|
115
|
+
openCount: t.openCount == null ? 0 : Number(t.openCount),
|
|
114
116
|
memberDetails: n.map((o) => {
|
|
115
117
|
const r = o ?? {}, a = String(r.userId ?? "").trim();
|
|
116
118
|
return a ? { userId: a, userName: String(r.userName ?? "").trim() || a } : null;
|
|
117
119
|
}).filter((o) => o != null)
|
|
118
120
|
};
|
|
119
121
|
}
|
|
120
|
-
async function
|
|
121
|
-
const
|
|
122
|
+
async function it(e = "") {
|
|
123
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await i(`${d}/todo/projects${t}`, c), o = await u(n, "获取待办项目失败");
|
|
122
124
|
return {
|
|
123
125
|
owned: ((o == null ? void 0 : o.owned) ?? []).map(C),
|
|
124
126
|
joined: ((o == null ? void 0 : o.joined) ?? []).map(C)
|
|
125
127
|
};
|
|
126
128
|
}
|
|
127
|
-
async function
|
|
128
|
-
const n =
|
|
129
|
+
async function ct(e, t = "") {
|
|
130
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects${n}`, {
|
|
129
131
|
...c,
|
|
130
132
|
method: "POST",
|
|
131
133
|
headers: { "Content-Type": "application/json" },
|
|
132
|
-
body: JSON.stringify(
|
|
134
|
+
body: JSON.stringify(e)
|
|
133
135
|
}), r = await u(o, "新建项目失败");
|
|
134
|
-
return
|
|
136
|
+
return T(r);
|
|
135
137
|
}
|
|
136
|
-
async function
|
|
137
|
-
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${
|
|
138
|
+
async function dt(e, t, n = "") {
|
|
139
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${e}${o}`, {
|
|
138
140
|
...c,
|
|
139
141
|
method: "PUT",
|
|
140
142
|
headers: { "Content-Type": "application/json" },
|
|
141
|
-
body: JSON.stringify(
|
|
143
|
+
body: JSON.stringify(t)
|
|
142
144
|
}), a = await u(r, "更新项目失败");
|
|
143
|
-
return
|
|
145
|
+
return T(a);
|
|
144
146
|
}
|
|
145
|
-
async function
|
|
146
|
-
const n =
|
|
147
|
+
async function lt(e, t = "") {
|
|
148
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects/${e}${n}`, {
|
|
147
149
|
...c,
|
|
148
150
|
method: "DELETE"
|
|
149
151
|
});
|
|
150
|
-
return
|
|
152
|
+
return S(o, "删除项目失败");
|
|
151
153
|
}
|
|
152
|
-
async function
|
|
153
|
-
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${
|
|
154
|
+
async function ut(e, t, n = "") {
|
|
155
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${e}/members${o}`, {
|
|
154
156
|
...c,
|
|
155
157
|
method: "POST",
|
|
156
158
|
headers: { "Content-Type": "application/json" },
|
|
157
|
-
body: JSON.stringify(
|
|
159
|
+
body: JSON.stringify(t)
|
|
158
160
|
}), a = await u(r, "添加成员失败");
|
|
159
|
-
return
|
|
161
|
+
return T(a);
|
|
160
162
|
}
|
|
161
|
-
async function
|
|
163
|
+
async function pt(e, t, n = "") {
|
|
162
164
|
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
|
|
163
|
-
`${d}/todo/projects/${
|
|
165
|
+
`${d}/todo/projects/${e}/members/${encodeURIComponent(t)}${o}`,
|
|
164
166
|
{ ...c, method: "DELETE" }
|
|
165
167
|
), a = await u(r, "移除成员失败");
|
|
166
|
-
return
|
|
168
|
+
return T(a);
|
|
167
169
|
}
|
|
168
|
-
async function
|
|
170
|
+
async function mt(e = {}, t = "") {
|
|
169
171
|
const n = new URLSearchParams();
|
|
170
|
-
|
|
172
|
+
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
173
|
const o = n.toString() ? `?${n.toString()}` : "", r = await i(`${d}/todo/items${o}`, c);
|
|
172
174
|
return (await u(
|
|
173
175
|
r,
|
|
174
176
|
"获取事项失败"
|
|
175
|
-
) ?? []).map(
|
|
177
|
+
) ?? []).map(I);
|
|
176
178
|
}
|
|
177
|
-
async function
|
|
178
|
-
const n =
|
|
179
|
+
async function yt(e, t = "") {
|
|
180
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items${n}`, {
|
|
179
181
|
...c,
|
|
180
182
|
method: "POST",
|
|
181
183
|
headers: { "Content-Type": "application/json" },
|
|
182
|
-
body: JSON.stringify(
|
|
184
|
+
body: JSON.stringify(e)
|
|
183
185
|
}), r = await u(o, "新建事项失败");
|
|
184
|
-
return
|
|
186
|
+
return I(r);
|
|
185
187
|
}
|
|
186
|
-
async function
|
|
187
|
-
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${
|
|
188
|
+
async function ft(e, t, n = "") {
|
|
189
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}${o}`, {
|
|
188
190
|
...c,
|
|
189
191
|
method: "PUT",
|
|
190
192
|
headers: { "Content-Type": "application/json" },
|
|
191
|
-
body: JSON.stringify(
|
|
193
|
+
body: JSON.stringify(t)
|
|
192
194
|
}), a = await u(r, "更新事项失败");
|
|
193
|
-
return
|
|
195
|
+
return I(a);
|
|
194
196
|
}
|
|
195
|
-
async function
|
|
196
|
-
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${
|
|
197
|
+
async function gt(e, t = "", n = "") {
|
|
198
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}/complete${o}`, {
|
|
197
199
|
...c,
|
|
198
200
|
method: "POST",
|
|
199
201
|
headers: { "Content-Type": "application/json" },
|
|
200
|
-
body: JSON.stringify({ result:
|
|
202
|
+
body: JSON.stringify({ result: t })
|
|
201
203
|
}), a = await u(r, "完成事项失败");
|
|
202
|
-
return
|
|
204
|
+
return I(a);
|
|
203
205
|
}
|
|
204
|
-
async function
|
|
205
|
-
const n =
|
|
206
|
+
async function ht(e, t = "") {
|
|
207
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/${e}/reopen${n}`, {
|
|
206
208
|
...c,
|
|
207
209
|
method: "POST"
|
|
208
210
|
}), r = await u(o, "重开事项失败");
|
|
209
|
-
return
|
|
211
|
+
return I(r);
|
|
210
212
|
}
|
|
211
|
-
async function
|
|
212
|
-
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${
|
|
213
|
+
async function St(e, t, n = "") {
|
|
214
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}/reorder${o}`, {
|
|
213
215
|
...c,
|
|
214
216
|
method: "POST",
|
|
215
217
|
headers: { "Content-Type": "application/json" },
|
|
216
|
-
body: JSON.stringify(
|
|
218
|
+
body: JSON.stringify(t)
|
|
217
219
|
}), a = await u(r, "调整排序失败");
|
|
218
|
-
return
|
|
220
|
+
return I(a);
|
|
219
221
|
}
|
|
220
|
-
async function $e
|
|
221
|
-
const n =
|
|
222
|
+
async function $t(e, t = "") {
|
|
223
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/reorder-batch${n}`, {
|
|
222
224
|
...c,
|
|
223
225
|
method: "POST",
|
|
224
226
|
headers: { "Content-Type": "application/json" },
|
|
225
|
-
body: JSON.stringify({ updates:
|
|
227
|
+
body: JSON.stringify({ updates: e })
|
|
226
228
|
});
|
|
227
|
-
return
|
|
229
|
+
return S(o, "调整排序失败");
|
|
228
230
|
}
|
|
229
|
-
async function
|
|
230
|
-
const n =
|
|
231
|
+
async function It(e, t = "") {
|
|
232
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects/reorder-batch${n}`, {
|
|
231
233
|
...c,
|
|
232
234
|
method: "POST",
|
|
233
235
|
headers: { "Content-Type": "application/json" },
|
|
234
|
-
body: JSON.stringify({ updates:
|
|
236
|
+
body: JSON.stringify({ updates: e })
|
|
235
237
|
});
|
|
236
|
-
return
|
|
238
|
+
return S(o, "调整项目排序失败");
|
|
237
239
|
}
|
|
238
|
-
async function
|
|
239
|
-
const n =
|
|
240
|
+
async function Tt(e, t = "") {
|
|
241
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/${e}${n}`, {
|
|
240
242
|
...c,
|
|
241
243
|
method: "DELETE"
|
|
242
244
|
});
|
|
243
|
-
return
|
|
245
|
+
return S(o, "删除事项失败");
|
|
246
|
+
}
|
|
247
|
+
function G(e) {
|
|
248
|
+
const t = e ?? {};
|
|
249
|
+
return {
|
|
250
|
+
todoId: h(t.todoId),
|
|
251
|
+
sessionId: t.sessionId == null ? null : h(t.sessionId),
|
|
252
|
+
agentId: t.agentId == null ? null : h(t.agentId),
|
|
253
|
+
projectSpaceId: t.projectSpaceId == null ? 0 : h(t.projectSpaceId),
|
|
254
|
+
projectSpaceTitle: String(t.projectSpaceTitle ?? ""),
|
|
255
|
+
status: String(t.status ?? ""),
|
|
256
|
+
kickoff: String(t.kickoff ?? ""),
|
|
257
|
+
spaceEntries: Array.isArray(t.spaceEntries) ? t.spaceEntries.map((n) => ({
|
|
258
|
+
path: String(n.path ?? ""),
|
|
259
|
+
name: String(n.name ?? ""),
|
|
260
|
+
dir: !!n.dir,
|
|
261
|
+
size: n.size == null ? 0 : Number(n.size)
|
|
262
|
+
})) : []
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
async function Nt(e, t, n = "") {
|
|
266
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}/dispatch${o}`, {
|
|
267
|
+
...c,
|
|
268
|
+
method: "POST",
|
|
269
|
+
headers: { "Content-Type": "application/json" },
|
|
270
|
+
body: JSON.stringify({ agentId: t })
|
|
271
|
+
}), a = await u(r, "派发给 Agent 失败");
|
|
272
|
+
return G(a);
|
|
273
|
+
}
|
|
274
|
+
async function Et(e, t = "") {
|
|
275
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/${e}/undispatch${n}`, {
|
|
276
|
+
...c,
|
|
277
|
+
method: "POST"
|
|
278
|
+
}), r = await u(o, "取消派发失败");
|
|
279
|
+
return I(r);
|
|
244
280
|
}
|
|
245
|
-
const
|
|
281
|
+
const q = {
|
|
246
282
|
RUNTIME_MONITOR_VIEW: ["RUNTIME_MONITOR_MANAGE"],
|
|
247
283
|
EVALUATION_VIEW: ["EVALUATION_MANAGE"],
|
|
248
284
|
COLLABORATION_VIEW: [
|
|
@@ -263,67 +299,67 @@ const G = {
|
|
|
263
299
|
KNOWLEDGE_VIEW: ["KNOWLEDGE_MANAGE"],
|
|
264
300
|
WEBIDE_VIEW: ["WEBIDE_MANAGE"]
|
|
265
301
|
};
|
|
266
|
-
function
|
|
302
|
+
function Ot(e, t) {
|
|
267
303
|
var o;
|
|
268
|
-
if (!
|
|
269
|
-
if (
|
|
270
|
-
const n =
|
|
304
|
+
if (!e) return !1;
|
|
305
|
+
if (e.is_global_admin || (o = e.permissions) != null && o.includes(t)) return !0;
|
|
306
|
+
const n = q[t];
|
|
271
307
|
return !!(n != null && n.some((r) => {
|
|
272
308
|
var a;
|
|
273
|
-
return (a =
|
|
309
|
+
return (a = e.permissions) == null ? void 0 : a.includes(r);
|
|
274
310
|
}));
|
|
275
311
|
}
|
|
276
|
-
const
|
|
277
|
-
wrap:
|
|
278
|
-
card:
|
|
312
|
+
const J = "_wrap_2gcw5_1", z = "_card_2gcw5_9", V = "_badge_2gcw5_19", W = "_title_2gcw5_41", v = "_desc_2gcw5_48", x = "_actions_2gcw5_55", F = "_primary_2gcw5_63", K = "_secondary_2gcw5_75", H = "_details_2gcw5_90", Y = "_pre_2gcw5_102", Q = "_copy_2gcw5_117", X = "_compact_2gcw5_127", y = {
|
|
313
|
+
wrap: J,
|
|
314
|
+
card: z,
|
|
279
315
|
badge: V,
|
|
280
316
|
title: W,
|
|
281
317
|
desc: v,
|
|
282
318
|
actions: x,
|
|
283
|
-
primary:
|
|
284
|
-
secondary:
|
|
285
|
-
details:
|
|
286
|
-
pre:
|
|
287
|
-
copy:
|
|
288
|
-
compact:
|
|
319
|
+
primary: F,
|
|
320
|
+
secondary: K,
|
|
321
|
+
details: H,
|
|
322
|
+
pre: Y,
|
|
323
|
+
copy: Q,
|
|
324
|
+
compact: X
|
|
289
325
|
};
|
|
290
|
-
function
|
|
291
|
-
const
|
|
326
|
+
function Z(e) {
|
|
327
|
+
const t = e, n = `${(t == null ? void 0 : t.name) ?? ""} ${(t == null ? void 0 : t.message) ?? ""} ${typeof e == "string" ? e : ""}`;
|
|
292
328
|
return /ChunkLoadError|Loading chunk|Failed to fetch dynamically imported module|Importing a module script failed|error loading dynamically imported module/i.test(n);
|
|
293
329
|
}
|
|
294
|
-
function
|
|
295
|
-
const { status:
|
|
296
|
-
return
|
|
330
|
+
function tt(e) {
|
|
331
|
+
const { status: t, error: n } = e;
|
|
332
|
+
return t === 401 ? {
|
|
297
333
|
kind: "unauthorized",
|
|
298
|
-
status:
|
|
334
|
+
status: t,
|
|
299
335
|
badge: "401",
|
|
300
336
|
title: "登录已失效",
|
|
301
337
|
description: "当前会话已过期或未建立,请重新登录后继续。重登后会回到这个页面。"
|
|
302
|
-
} :
|
|
338
|
+
} : t === 403 ? {
|
|
303
339
|
kind: "forbidden",
|
|
304
|
-
status:
|
|
340
|
+
status: t,
|
|
305
341
|
badge: "403",
|
|
306
342
|
title: "没有访问权限",
|
|
307
343
|
description: "当前账号无权访问该功能。如需开通,请联系管理员分配权限。"
|
|
308
|
-
} :
|
|
344
|
+
} : t === 404 ? {
|
|
309
345
|
kind: "not-found",
|
|
310
|
-
status:
|
|
346
|
+
status: t,
|
|
311
347
|
badge: "404",
|
|
312
348
|
title: "功能接口未就绪",
|
|
313
349
|
description: "这个页面要用的后端接口还没有部署,或前后端路径对不上。可以重试;若持续如此,请把技术详情发给运维确认版本。"
|
|
314
|
-
} :
|
|
350
|
+
} : t && t >= 500 ? {
|
|
315
351
|
kind: "server",
|
|
316
|
-
status:
|
|
317
|
-
badge: String(
|
|
352
|
+
status: t,
|
|
353
|
+
badge: String(t),
|
|
318
354
|
title: "服务暂时不可用",
|
|
319
355
|
description: "后端返回了错误。稍后重试;如果反复出现,请把技术详情发给运维。"
|
|
320
|
-
} :
|
|
356
|
+
} : t === 0 ? {
|
|
321
357
|
kind: "network",
|
|
322
|
-
status:
|
|
358
|
+
status: t,
|
|
323
359
|
badge: "!",
|
|
324
360
|
title: "网络不可用",
|
|
325
361
|
description: "请求没有到达后端。请检查网络,或确认本地后端服务是否已启动。"
|
|
326
|
-
} :
|
|
362
|
+
} : Z(n) ? {
|
|
327
363
|
kind: "chunk",
|
|
328
364
|
badge: "⟳",
|
|
329
365
|
title: "页面资源加载失败",
|
|
@@ -340,19 +376,19 @@ function Z(t) {
|
|
|
340
376
|
description: "发生了未知错误。请重试,或返回首页换个入口再试。"
|
|
341
377
|
};
|
|
342
378
|
}
|
|
343
|
-
function
|
|
379
|
+
function et(e, t) {
|
|
344
380
|
const n = [];
|
|
345
|
-
if (n.push(`页面:${typeof location < "u" ? location.pathname + location.search : "-"}`), n.push(`时间:${(/* @__PURE__ */ new Date()).toISOString()}`),
|
|
346
|
-
const o =
|
|
381
|
+
if (n.push(`页面:${typeof location < "u" ? location.pathname + location.search : "-"}`), n.push(`时间:${(/* @__PURE__ */ new Date()).toISOString()}`), e != null && n.push(`HTTP:${e}`), t != null) {
|
|
382
|
+
const o = t;
|
|
347
383
|
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
|
|
384
|
+
${String(o.stack)}`) : typeof t != "object" && n.push(`原文:${String(t)}`);
|
|
349
385
|
}
|
|
350
386
|
return n.join(`
|
|
351
387
|
`).slice(0, 4e3);
|
|
352
388
|
}
|
|
353
|
-
const
|
|
354
|
-
status:
|
|
355
|
-
error:
|
|
389
|
+
const nt = ({
|
|
390
|
+
status: e,
|
|
391
|
+
error: t,
|
|
356
392
|
title: n,
|
|
357
393
|
description: o,
|
|
358
394
|
retry: r,
|
|
@@ -362,38 +398,38 @@ const te = ({
|
|
|
362
398
|
compact: p = !1,
|
|
363
399
|
className: m
|
|
364
400
|
}) => {
|
|
365
|
-
const f = b(() =>
|
|
401
|
+
const f = b(() => tt({ status: e, error: t }), [e, t]), [$, E] = L(!1), A = b(() => et(e, t), [e, t]);
|
|
366
402
|
D(() => {
|
|
367
403
|
if (!$) return;
|
|
368
|
-
const
|
|
369
|
-
return () => clearTimeout(
|
|
404
|
+
const O = setTimeout(() => E(!1), 2e3);
|
|
405
|
+
return () => clearTimeout(O);
|
|
370
406
|
}, [$]);
|
|
371
407
|
const j = async () => {
|
|
372
408
|
try {
|
|
373
|
-
await navigator.clipboard.writeText(A),
|
|
409
|
+
await navigator.clipboard.writeText(A), E(!0);
|
|
374
410
|
} catch {
|
|
375
|
-
|
|
411
|
+
E(!1);
|
|
376
412
|
}
|
|
377
|
-
},
|
|
378
|
-
const
|
|
379
|
-
location.assign(`/login?redirect=${
|
|
380
|
-
},
|
|
413
|
+
}, k = () => {
|
|
414
|
+
const O = encodeURIComponent(location.pathname + location.search);
|
|
415
|
+
location.assign(`/login?redirect=${O}`);
|
|
416
|
+
}, U = () => 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: k, children: "重新登录" }) : null, R = t != null || e != null;
|
|
381
417
|
return /* @__PURE__ */ g(
|
|
382
418
|
"div",
|
|
383
419
|
{
|
|
384
420
|
className: [y.wrap, p ? y.compact : "", m || ""].filter(Boolean).join(" "),
|
|
385
421
|
role: "alert",
|
|
386
422
|
"data-error-kind": f.kind,
|
|
387
|
-
children: /* @__PURE__ */
|
|
423
|
+
children: /* @__PURE__ */ _("div", { className: y.card, children: [
|
|
388
424
|
/* @__PURE__ */ g("div", { className: y.badge, "data-kind": f.kind, children: f.badge }),
|
|
389
425
|
/* @__PURE__ */ g("h2", { className: y.title, children: n || f.title }),
|
|
390
426
|
/* @__PURE__ */ g("p", { className: y.desc, children: o || f.description }),
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
|
|
427
|
+
/* @__PURE__ */ _("div", { className: y.actions, children: [
|
|
428
|
+
U(),
|
|
393
429
|
s,
|
|
394
430
|
l && f.kind !== "unauthorized" && /* @__PURE__ */ g("a", { className: y.secondary, href: "/", children: "返回首页" })
|
|
395
431
|
] }),
|
|
396
|
-
|
|
432
|
+
R && /* @__PURE__ */ _("details", { className: y.details, children: [
|
|
397
433
|
/* @__PURE__ */ g("summary", { children: "技术详情" }),
|
|
398
434
|
/* @__PURE__ */ g("pre", { className: y.pre, children: A }),
|
|
399
435
|
/* @__PURE__ */ g("button", { type: "button", className: y.copy, onClick: j, children: $ ? "已复制" : "复制详情" })
|
|
@@ -402,19 +438,19 @@ const te = ({
|
|
|
402
438
|
}
|
|
403
439
|
);
|
|
404
440
|
};
|
|
405
|
-
class
|
|
406
|
-
constructor(
|
|
407
|
-
super(
|
|
441
|
+
class _t extends M {
|
|
442
|
+
constructor(t) {
|
|
443
|
+
super(t), this.state = { hasError: !1, error: null };
|
|
408
444
|
}
|
|
409
|
-
static getDerivedStateFromError(
|
|
410
|
-
return { hasError: !0, error:
|
|
445
|
+
static getDerivedStateFromError(t) {
|
|
446
|
+
return { hasError: !0, error: t };
|
|
411
447
|
}
|
|
412
|
-
componentDidCatch(
|
|
413
|
-
console.error("[ErrorBoundary]",
|
|
448
|
+
componentDidCatch(t, n) {
|
|
449
|
+
console.error("[ErrorBoundary]", t, n.componentStack);
|
|
414
450
|
}
|
|
415
451
|
render() {
|
|
416
452
|
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ g(
|
|
417
|
-
|
|
453
|
+
nt,
|
|
418
454
|
{
|
|
419
455
|
error: this.state.error,
|
|
420
456
|
retry: () => this.setState({ hasError: !1, error: null })
|
|
@@ -422,26 +458,26 @@ class Ne extends M {
|
|
|
422
458
|
) : this.props.children;
|
|
423
459
|
}
|
|
424
460
|
}
|
|
425
|
-
function w(
|
|
426
|
-
const
|
|
427
|
-
return { ...
|
|
461
|
+
function w(e) {
|
|
462
|
+
const t = e && typeof e == "object" ? e : {}, n = Array.isArray(t.items) ? P(t.items) : [];
|
|
463
|
+
return { ...t, items: n };
|
|
428
464
|
}
|
|
429
|
-
async function
|
|
430
|
-
const n =
|
|
431
|
-
`${d}/personal-agents/${
|
|
465
|
+
async function At(e, t = "") {
|
|
466
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
467
|
+
`${d}/personal-agents/${e}/schedules${n}`,
|
|
432
468
|
c
|
|
433
469
|
);
|
|
434
470
|
return u(o, "获取定时任务列表失败");
|
|
435
471
|
}
|
|
436
|
-
async function
|
|
472
|
+
async function bt(e, t, n, o, r = "", a = "", s = "") {
|
|
437
473
|
const l = s ? `?token=${encodeURIComponent(s)}` : "", p = await i(
|
|
438
|
-
`${d}/personal-agents/${
|
|
474
|
+
`${d}/personal-agents/${e}/schedules${l}`,
|
|
439
475
|
{
|
|
440
476
|
...c,
|
|
441
477
|
method: "POST",
|
|
442
478
|
headers: { "Content-Type": "application/json" },
|
|
443
479
|
body: JSON.stringify({
|
|
444
|
-
name:
|
|
480
|
+
name: t,
|
|
445
481
|
prompt: n,
|
|
446
482
|
cron_expression: o,
|
|
447
483
|
notify_user_id: r,
|
|
@@ -451,9 +487,9 @@ async function Ee(t, e, n, o, r = "", a = "", s = "") {
|
|
|
451
487
|
);
|
|
452
488
|
return u(p, "创建定时任务失败");
|
|
453
489
|
}
|
|
454
|
-
async function
|
|
490
|
+
async function Ct(e, t, n, o = "") {
|
|
455
491
|
const r = o ? `?token=${encodeURIComponent(o)}` : "", a = await i(
|
|
456
|
-
`${d}/personal-agents/${
|
|
492
|
+
`${d}/personal-agents/${e}/schedules/${t}${r}`,
|
|
457
493
|
{
|
|
458
494
|
...c,
|
|
459
495
|
method: "PUT",
|
|
@@ -463,19 +499,19 @@ async function Oe(t, e, n, o = "") {
|
|
|
463
499
|
);
|
|
464
500
|
return u(a, "更新定时任务失败");
|
|
465
501
|
}
|
|
466
|
-
async function
|
|
502
|
+
async function wt(e, t, n = "") {
|
|
467
503
|
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
|
|
468
|
-
`${d}/personal-agents/${
|
|
504
|
+
`${d}/personal-agents/${e}/schedules/${t}${o}`,
|
|
469
505
|
{
|
|
470
506
|
...c,
|
|
471
507
|
method: "DELETE"
|
|
472
508
|
}
|
|
473
509
|
);
|
|
474
|
-
return
|
|
510
|
+
return S(r, "删除定时任务失败");
|
|
475
511
|
}
|
|
476
|
-
async function
|
|
512
|
+
async function jt(e, t, n, o = "") {
|
|
477
513
|
const r = o ? `?token=${encodeURIComponent(o)}` : "", a = await i(
|
|
478
|
-
`${d}/personal-agents/${
|
|
514
|
+
`${d}/personal-agents/${e}/schedules/${t}/toggle${r}`,
|
|
479
515
|
{
|
|
480
516
|
...c,
|
|
481
517
|
method: "POST",
|
|
@@ -485,18 +521,18 @@ async function be(t, e, n, o = "") {
|
|
|
485
521
|
);
|
|
486
522
|
return u(a, "切换定时任务状态失败");
|
|
487
523
|
}
|
|
488
|
-
async function
|
|
524
|
+
async function kt(e, t, n = 1, o = 20, r = "") {
|
|
489
525
|
const a = new URLSearchParams();
|
|
490
526
|
a.set("page", String(n)), a.set("size", String(o)), r && a.set("token", r);
|
|
491
527
|
const s = await i(
|
|
492
|
-
`${d}/personal-agents/${
|
|
528
|
+
`${d}/personal-agents/${e}/schedules/${t}/logs?${a.toString()}`,
|
|
493
529
|
c
|
|
494
|
-
), l = await
|
|
530
|
+
), l = await S(s, "获取执行历史失败");
|
|
495
531
|
return w(l);
|
|
496
532
|
}
|
|
497
|
-
async function
|
|
533
|
+
async function Ut(e, t, n = "") {
|
|
498
534
|
const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
|
|
499
|
-
`${d}/personal-agents/${
|
|
535
|
+
`${d}/personal-agents/${e}/schedules/${t}/run${o}`,
|
|
500
536
|
{
|
|
501
537
|
...c,
|
|
502
538
|
method: "POST"
|
|
@@ -504,14 +540,14 @@ async function we(t, e, n = "") {
|
|
|
504
540
|
);
|
|
505
541
|
return u(r, "手动触发任务失败");
|
|
506
542
|
}
|
|
507
|
-
async function
|
|
543
|
+
async function Rt(e, t = "", n = "") {
|
|
508
544
|
const o = new URLSearchParams();
|
|
509
|
-
|
|
545
|
+
t && o.set("keyword", t), n && o.set("token", n);
|
|
510
546
|
const r = await i(
|
|
511
|
-
`${d}/personal-agents/${
|
|
547
|
+
`${d}/personal-agents/${e}/schedules/staff-search?${o.toString()}`,
|
|
512
548
|
c
|
|
513
549
|
);
|
|
514
|
-
return (await
|
|
550
|
+
return (await S(r, "搜索员工失败") ?? []).map((s) => {
|
|
515
551
|
const l = (s == null ? void 0 : s.extend) ?? {};
|
|
516
552
|
return {
|
|
517
553
|
userId: String((s == null ? void 0 : s.userId) ?? (s == null ? void 0 : s.id) ?? ""),
|
|
@@ -522,66 +558,68 @@ async function je(t, e = "", n = "") {
|
|
|
522
558
|
};
|
|
523
559
|
});
|
|
524
560
|
}
|
|
525
|
-
async function
|
|
561
|
+
async function Pt(e = "", t = 50) {
|
|
526
562
|
const n = new URLSearchParams();
|
|
527
|
-
n.set("limit", String(
|
|
563
|
+
n.set("limit", String(t)), e && n.set("token", e);
|
|
528
564
|
const o = await i(
|
|
529
565
|
`${d}/personal-agents/schedules/notifications?${n.toString()}`,
|
|
530
566
|
c
|
|
531
|
-
), r = await
|
|
567
|
+
), r = await S(o, "获取通知失败");
|
|
532
568
|
return w(r);
|
|
533
569
|
}
|
|
534
|
-
async function
|
|
535
|
-
const n =
|
|
536
|
-
`${d}/personal-agents/schedules/notifications/${
|
|
570
|
+
async function Lt(e, t = "") {
|
|
571
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
572
|
+
`${d}/personal-agents/schedules/notifications/${e}/read${n}`,
|
|
537
573
|
{
|
|
538
574
|
...c,
|
|
539
575
|
method: "POST"
|
|
540
576
|
}
|
|
541
577
|
);
|
|
542
|
-
return
|
|
578
|
+
return S(o, "标记已读失败");
|
|
543
579
|
}
|
|
544
|
-
async function
|
|
545
|
-
const
|
|
546
|
-
`${d}/personal-agents/schedules/notifications/read-all${
|
|
580
|
+
async function Dt(e = "") {
|
|
581
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await i(
|
|
582
|
+
`${d}/personal-agents/schedules/notifications/read-all${t}`,
|
|
547
583
|
{
|
|
548
584
|
...c,
|
|
549
585
|
method: "POST"
|
|
550
586
|
}
|
|
551
587
|
);
|
|
552
|
-
return
|
|
588
|
+
return S(n, "标记已读失败");
|
|
553
589
|
}
|
|
554
590
|
export {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
591
|
+
lt as A,
|
|
592
|
+
mt as B,
|
|
593
|
+
$t as C,
|
|
594
|
+
N as D,
|
|
595
|
+
St as E,
|
|
596
|
+
It as F,
|
|
597
|
+
_t as G,
|
|
598
|
+
nt as P,
|
|
599
|
+
At as a,
|
|
600
|
+
Pt as b,
|
|
601
|
+
kt as c,
|
|
602
|
+
bt as d,
|
|
603
|
+
wt as e,
|
|
604
|
+
it as f,
|
|
605
|
+
Dt as g,
|
|
606
|
+
Ot as h,
|
|
607
|
+
Z as i,
|
|
608
|
+
ut as j,
|
|
609
|
+
yt as k,
|
|
610
|
+
ft as l,
|
|
611
|
+
Lt as m,
|
|
612
|
+
Nt as n,
|
|
613
|
+
Et as o,
|
|
614
|
+
at as p,
|
|
615
|
+
ht as q,
|
|
616
|
+
Ut as r,
|
|
617
|
+
Rt as s,
|
|
618
|
+
jt as t,
|
|
619
|
+
Ct as u,
|
|
620
|
+
gt as v,
|
|
621
|
+
Tt as w,
|
|
622
|
+
pt as x,
|
|
623
|
+
ct as y,
|
|
624
|
+
dt as z
|
|
587
625
|
};
|