@yuku123/z-team-component 0.2.21 → 0.2.23
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/DebugPlayground-cxffrMgF.js +15 -0
- package/dist/{InvitationManagementPage-cXDD5J1f.js → InvitationManagementPage-BJ0izYip.js} +2 -2
- package/dist/{OnboardingPage-D7W1L7E7.js → OnboardingPage-Cde_2B_A.js} +2 -2
- package/dist/{ProjectApp-DgCJv9Qr.js → ProjectApp-CJfqACjb.js} +3 -3
- package/dist/SmartWorkbench.module-DzQskKT0.js +85 -0
- package/dist/SystemShell-Cm9eErqQ.js +593 -0
- package/dist/{admin-logs-96BMdLm3.js → admin-logs-C2V1ElH9.js} +34 -34
- package/dist/{api-DayyjL1e.js → api--Fg0hL9Y.js} +258 -258
- package/dist/{api-BzonkJ9O.js → api-DlnrjUut.js} +1 -1
- package/dist/{createWorkspaceWsHandler-Dgpag_y3.js → createWorkspaceWsHandler-CqGqcTh_.js} +27 -27
- package/dist/echarts-B1OU1xr4.js +16 -0
- package/dist/{index-BCnzwGPj.js → index-1xwvv2Q7.js} +3 -3
- package/dist/{index-BuGgpiDq.js → index-8V37FP9c.js} +4 -4
- package/dist/{index-gqKmHnTZ.js → index-B3ikipDf.js} +4 -4
- package/dist/{index-Cnw06MGB.js → index-BMRIUhOL.js} +3 -3
- package/dist/index-BaCiSbPR.js +956 -0
- package/dist/index-Bla8z6ok.js +6879 -0
- package/dist/index-Bsh58cwF.js +975 -0
- package/dist/index-C01UUprh.js +41705 -0
- package/dist/index-C0EIMJI2.js +112 -0
- package/dist/{index-BX-3TBsz.js → index-CGDpGIZC.js} +6 -6
- package/dist/index-CUVdeb8y.js +638 -0
- package/dist/{index-D3TdisV7.js → index-CW2B5_8f.js} +1616 -22092
- package/dist/{index-sGtg7MFg.js → index-D5u3BjCZ.js} +2 -2
- package/dist/{index-pJERGpTh.js → index-DK_aR-Vu.js} +5 -4
- package/dist/index-DKpz0o-l.js +1327 -0
- package/dist/index-DUbYCF9y.js +1171 -0
- package/dist/index-DvIHX7lZ.js +1657 -0
- package/dist/{index-BMOS7sE7.js → index-b1BIpgn7.js} +165 -163
- package/dist/{index-DHGvzWWQ.js → index-bbwTcNjB.js} +7 -7
- package/dist/index-hPzswwk2.js +5900 -0
- package/dist/index-pfzY68PH.js +1408 -0
- package/dist/index.js +1 -1
- package/dist/index.module-CAa-2T7m.js +72 -0
- package/dist/index.module-UI0iz8K0.js +42 -0
- package/dist/{instance-CNHJqTd1.js → instance-1QEDBRqA.js} +12 -12
- package/dist/pages.js +1 -1
- package/dist/schedule-C89oiqIR.js +239 -0
- package/dist/{send-default-agent-team-message-CRRwpv0q.js → send-default-agent-team-message-CxkWi3XC.js} +1 -1
- package/dist/{sso-user-D0JzsJeR.js → sso-user-BE1Ell5F.js} +1 -1
- package/dist/training-o-vSBkqP.js +450 -0
- package/dist/{useAppStore-BYXwTjW-.js → useAppStore-wgWaxcyc.js} +24 -24
- package/dist/webide-BxD6cYe-.js +8084 -0
- package/dist/z-team-component.css +2 -2
- package/package.json +1 -1
- package/dist/index-CJD6mLzs.js +0 -51451
|
@@ -0,0 +1,1171 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as de } from "react/jsx-runtime";
|
|
2
|
+
import { useNavigate as K, useParams as ce, useLocation as pe, useRoutes as he } from "react-router-dom";
|
|
3
|
+
import { useState as _, useEffect as M, useMemo as ue } from "react";
|
|
4
|
+
import { RocketOutlined as me, AppstoreOutlined as re, BellOutlined as ae, PlayCircleOutlined as V, CheckCircleOutlined as Q, CloseCircleOutlined as X, BulbOutlined as Y, PlusOutlined as q, EditOutlined as ge, CopyOutlined as ne, DeleteOutlined as ye, ArrowLeftOutlined as fe, SaveOutlined as be, ReloadOutlined as we, ShopOutlined as ie, StarFilled as Ie, CloudDownloadOutlined as _e, DashboardOutlined as ke, InfoCircleOutlined as Ce } from "@ant-design/icons";
|
|
5
|
+
import { Typography as $, Row as B, Col as O, Card as F, Statistic as D, Table as U, Tag as b, Form as h, Input as E, Button as g, Space as N, Popconfirm as se, Drawer as W, Select as P, message as y, Tabs as ve, InputNumber as xe, Switch as Ae, Descriptions as R, Timeline as Te, Spin as Se } from "antd";
|
|
6
|
+
import { r as w } from "./ProjectApp-CJfqACjb.js";
|
|
7
|
+
const { Title: Ee, Paragraph: Ne } = $;
|
|
8
|
+
function G() {
|
|
9
|
+
const [i, A] = _(null), [f, C] = _([]), [l, v] = _(!1), s = async () => {
|
|
10
|
+
v(!0);
|
|
11
|
+
try {
|
|
12
|
+
const [c, u] = await Promise.all([
|
|
13
|
+
w.get("rpa/dashboard/summary"),
|
|
14
|
+
w.get("rpa/dashboard/recent-runs")
|
|
15
|
+
]);
|
|
16
|
+
A((c == null ? void 0 : c.data) ?? c), C(Array.isArray(u == null ? void 0 : u.data) ? u.data : Array.isArray(u) ? u : []);
|
|
17
|
+
} catch (c) {
|
|
18
|
+
console.warn("dashboard load failed", c);
|
|
19
|
+
} finally {
|
|
20
|
+
v(!1);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return M(() => {
|
|
24
|
+
s();
|
|
25
|
+
}, []), /* @__PURE__ */ r("div", { style: { padding: 24, background: "#f5f7fa", minHeight: "100%" }, children: [
|
|
26
|
+
/* @__PURE__ */ r(Ee, { level: 3, style: { marginTop: 0 }, children: [
|
|
27
|
+
/* @__PURE__ */ e(me, {}),
|
|
28
|
+
" RPA 卓越中心"
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ e(Ne, { type: "secondary", children: "影刀 RPA 全量功能映射 v1.0 — 应用管理 / 流程定义 / 触发器 / 运行监控 / 应用市场 / 需求中心" }),
|
|
31
|
+
/* @__PURE__ */ r(B, { gutter: 16, style: { marginBottom: 24 }, children: [
|
|
32
|
+
/* @__PURE__ */ e(O, { span: 6, children: /* @__PURE__ */ e(F, { loading: l, children: /* @__PURE__ */ e(
|
|
33
|
+
D,
|
|
34
|
+
{
|
|
35
|
+
title: "应用数",
|
|
36
|
+
value: (i == null ? void 0 : i.appCount) ?? 0,
|
|
37
|
+
prefix: /* @__PURE__ */ e(re, {})
|
|
38
|
+
}
|
|
39
|
+
) }) }),
|
|
40
|
+
/* @__PURE__ */ e(O, { span: 6, children: /* @__PURE__ */ e(F, { loading: l, children: /* @__PURE__ */ e(
|
|
41
|
+
D,
|
|
42
|
+
{
|
|
43
|
+
title: "触发器数",
|
|
44
|
+
value: (i == null ? void 0 : i.triggerCount) ?? 0,
|
|
45
|
+
prefix: /* @__PURE__ */ e(ae, {})
|
|
46
|
+
}
|
|
47
|
+
) }) }),
|
|
48
|
+
/* @__PURE__ */ e(O, { span: 6, children: /* @__PURE__ */ e(F, { loading: l, children: /* @__PURE__ */ e(
|
|
49
|
+
D,
|
|
50
|
+
{
|
|
51
|
+
title: "今日运行",
|
|
52
|
+
value: (i == null ? void 0 : i.runTotalCount) ?? 0,
|
|
53
|
+
prefix: /* @__PURE__ */ e(V, {})
|
|
54
|
+
}
|
|
55
|
+
) }) }),
|
|
56
|
+
/* @__PURE__ */ e(O, { span: 6, children: /* @__PURE__ */ e(F, { loading: l, children: /* @__PURE__ */ e(
|
|
57
|
+
D,
|
|
58
|
+
{
|
|
59
|
+
title: "运行成功率",
|
|
60
|
+
value: (i == null ? void 0 : i.successRate) ?? "N/A",
|
|
61
|
+
styles: { content: { color: "#2F70F1" } }
|
|
62
|
+
}
|
|
63
|
+
) }) })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ r(B, { gutter: 16, children: [
|
|
66
|
+
/* @__PURE__ */ e(O, { span: 12, children: /* @__PURE__ */ e(F, { title: "最近 5 条运行", loading: l, children: /* @__PURE__ */ e(
|
|
67
|
+
U,
|
|
68
|
+
{
|
|
69
|
+
size: "small",
|
|
70
|
+
rowKey: "id",
|
|
71
|
+
dataSource: f,
|
|
72
|
+
pagination: !1,
|
|
73
|
+
columns: [
|
|
74
|
+
{ title: "应用", dataIndex: "app_name", width: 140 },
|
|
75
|
+
{
|
|
76
|
+
title: "触发器",
|
|
77
|
+
dataIndex: "trigger_type",
|
|
78
|
+
width: 100,
|
|
79
|
+
render: (c) => /* @__PURE__ */ e(b, { color: c === "manual" ? "blue" : c === "cron" ? "purple" : "cyan", children: c })
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
title: "状态",
|
|
83
|
+
dataIndex: "status",
|
|
84
|
+
width: 90,
|
|
85
|
+
render: (c) => c === "success" ? /* @__PURE__ */ e(b, { icon: /* @__PURE__ */ e(Q, {}), color: "success", children: "成功" }) : c === "failed" ? /* @__PURE__ */ e(b, { icon: /* @__PURE__ */ e(X, {}), color: "error", children: "失败" }) : /* @__PURE__ */ e(b, { children: c })
|
|
86
|
+
},
|
|
87
|
+
{ title: "开始时间", dataIndex: "started_at", width: 170 },
|
|
88
|
+
{
|
|
89
|
+
title: "耗时(ms)",
|
|
90
|
+
dataIndex: "duration_ms",
|
|
91
|
+
width: 90,
|
|
92
|
+
render: (c) => c ?? "-"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
) }) }),
|
|
97
|
+
/* @__PURE__ */ e(O, { span: 12, children: /* @__PURE__ */ e(F, { title: "卓越中心统计", children: /* @__PURE__ */ r(B, { gutter: 16, children: [
|
|
98
|
+
/* @__PURE__ */ e(O, { span: 12, children: /* @__PURE__ */ e(
|
|
99
|
+
D,
|
|
100
|
+
{
|
|
101
|
+
title: "成功运行",
|
|
102
|
+
value: (i == null ? void 0 : i.runSuccessCount) ?? 0,
|
|
103
|
+
prefix: /* @__PURE__ */ e(Q, { style: { color: "#52c41a" } })
|
|
104
|
+
}
|
|
105
|
+
) }),
|
|
106
|
+
/* @__PURE__ */ e(O, { span: 12, children: /* @__PURE__ */ e(
|
|
107
|
+
D,
|
|
108
|
+
{
|
|
109
|
+
title: "失败运行",
|
|
110
|
+
value: (i == null ? void 0 : i.runFailedCount) ?? 0,
|
|
111
|
+
prefix: /* @__PURE__ */ e(X, { style: { color: "#ff4d4f" } })
|
|
112
|
+
}
|
|
113
|
+
) }),
|
|
114
|
+
/* @__PURE__ */ e(O, { span: 12, style: { marginTop: 16 }, children: /* @__PURE__ */ e(
|
|
115
|
+
D,
|
|
116
|
+
{
|
|
117
|
+
title: "需求数",
|
|
118
|
+
value: (i == null ? void 0 : i.demandCount) ?? 0,
|
|
119
|
+
prefix: /* @__PURE__ */ e(Y, { style: { color: "#faad14" } })
|
|
120
|
+
}
|
|
121
|
+
) }),
|
|
122
|
+
/* @__PURE__ */ e(O, { span: 12, style: { marginTop: 16 }, children: /* @__PURE__ */ e(D, { title: "覆盖 MVP 功能", value: 7, suffix: "/ 25" }) })
|
|
123
|
+
] }) }) })
|
|
124
|
+
] })
|
|
125
|
+
] });
|
|
126
|
+
}
|
|
127
|
+
const { Title: Oe } = $;
|
|
128
|
+
function Re() {
|
|
129
|
+
const i = K(), [A, f] = _([]), [C, l] = _(!1), [v, s] = _(!1), [c] = h.useForm(), u = async () => {
|
|
130
|
+
l(!0);
|
|
131
|
+
try {
|
|
132
|
+
const o = await w.post("rpa/app/list"), t = Array.isArray(o == null ? void 0 : o.data) ? o.data : Array.isArray(o) ? o : [];
|
|
133
|
+
f(t);
|
|
134
|
+
} catch (o) {
|
|
135
|
+
console.warn(o);
|
|
136
|
+
} finally {
|
|
137
|
+
l(!1);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
M(() => {
|
|
141
|
+
u();
|
|
142
|
+
}, []);
|
|
143
|
+
const T = async () => {
|
|
144
|
+
try {
|
|
145
|
+
const o = await c.validateFields();
|
|
146
|
+
await w.post("rpa/app", o), y.success("创建成功"), s(!1), c.resetFields(), u();
|
|
147
|
+
} catch (o) {
|
|
148
|
+
if (o != null && o.errorFields) return;
|
|
149
|
+
y.error("创建失败: " + ((o == null ? void 0 : o.message) ?? o));
|
|
150
|
+
}
|
|
151
|
+
}, p = async (o) => {
|
|
152
|
+
await w.delete("rpa/app/" + o), y.success("已删除"), u();
|
|
153
|
+
}, a = async (o, t) => {
|
|
154
|
+
const n = "app-copy-" + Date.now(), x = "副本-" + t;
|
|
155
|
+
try {
|
|
156
|
+
await w.post(`rpa/app/${o}/copy`, {
|
|
157
|
+
app_code: n,
|
|
158
|
+
app_name: x
|
|
159
|
+
}), y.success("已复制"), u();
|
|
160
|
+
} catch (z) {
|
|
161
|
+
y.error("复制失败: " + ((z == null ? void 0 : z.message) || z));
|
|
162
|
+
}
|
|
163
|
+
}, m = async (o) => {
|
|
164
|
+
try {
|
|
165
|
+
const t = await w.post("rpa/run", { app_id: o, runner_type: "mock" });
|
|
166
|
+
y.success("已派发, runId=" + t), setTimeout(u, 800);
|
|
167
|
+
} catch (t) {
|
|
168
|
+
y.error("派发失败: " + ((t == null ? void 0 : t.message) || t));
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
return /* @__PURE__ */ r("div", { style: { padding: 24, background: "#fff", minHeight: "100%" }, children: [
|
|
172
|
+
/* @__PURE__ */ e(Oe, { level: 3, style: { marginTop: 0 }, children: "应用管理" }),
|
|
173
|
+
/* @__PURE__ */ r("div", { style: { marginBottom: 16, display: "flex", gap: 8 }, children: [
|
|
174
|
+
/* @__PURE__ */ e(
|
|
175
|
+
E.Search,
|
|
176
|
+
{
|
|
177
|
+
placeholder: "搜索应用名 / 编码",
|
|
178
|
+
allowClear: !0,
|
|
179
|
+
style: { maxWidth: 320 },
|
|
180
|
+
onSearch: (o) => {
|
|
181
|
+
if (!o) return u();
|
|
182
|
+
f((t) => t.filter((n) => {
|
|
183
|
+
var x, z;
|
|
184
|
+
return ((x = n.appName) == null ? void 0 : x.includes(o)) || ((z = n.appCode) == null ? void 0 : z.includes(o));
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
/* @__PURE__ */ e(g, { type: "primary", icon: /* @__PURE__ */ e(q, {}), onClick: () => s(!0), children: "新建应用" })
|
|
190
|
+
] }),
|
|
191
|
+
/* @__PURE__ */ e(
|
|
192
|
+
U,
|
|
193
|
+
{
|
|
194
|
+
size: "small",
|
|
195
|
+
loading: C,
|
|
196
|
+
rowKey: "id",
|
|
197
|
+
dataSource: A,
|
|
198
|
+
pagination: { pageSize: 20, showSizeChanger: !1 },
|
|
199
|
+
columns: [
|
|
200
|
+
{ title: "ID", dataIndex: "id", width: 60 },
|
|
201
|
+
{ title: "应用名", dataIndex: "app_name", width: 160, ellipsis: !0 },
|
|
202
|
+
{ title: "编码", dataIndex: "app_code", width: 160, ellipsis: !0 },
|
|
203
|
+
{
|
|
204
|
+
title: "分类",
|
|
205
|
+
dataIndex: "category",
|
|
206
|
+
width: 100,
|
|
207
|
+
render: (o) => o ? /* @__PURE__ */ e(b, { children: o }) : /* @__PURE__ */ e(b, { color: "default", children: "未分类" })
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
title: "状态",
|
|
211
|
+
dataIndex: "status",
|
|
212
|
+
width: 100,
|
|
213
|
+
render: (o) => o === "PUBLISHED" ? /* @__PURE__ */ e(b, { color: "success", children: o }) : o === "DISABLED" ? /* @__PURE__ */ e(b, { color: "default", children: o }) : /* @__PURE__ */ e(b, { color: "processing", children: o ?? "DRAFT" })
|
|
214
|
+
},
|
|
215
|
+
{ title: "描述", dataIndex: "description", ellipsis: !0 },
|
|
216
|
+
{
|
|
217
|
+
title: "创建时间",
|
|
218
|
+
dataIndex: "created_at",
|
|
219
|
+
width: 170
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
title: "操作",
|
|
223
|
+
width: 280,
|
|
224
|
+
render: (o, t) => /* @__PURE__ */ r(N, { size: 4, children: [
|
|
225
|
+
/* @__PURE__ */ e(
|
|
226
|
+
g,
|
|
227
|
+
{
|
|
228
|
+
size: "small",
|
|
229
|
+
icon: /* @__PURE__ */ e(ge, {}),
|
|
230
|
+
onClick: () => i(`/rpa/app/${t.id}/edit`),
|
|
231
|
+
children: "编辑"
|
|
232
|
+
}
|
|
233
|
+
),
|
|
234
|
+
/* @__PURE__ */ e(
|
|
235
|
+
g,
|
|
236
|
+
{
|
|
237
|
+
size: "small",
|
|
238
|
+
icon: /* @__PURE__ */ e(V, {}),
|
|
239
|
+
onClick: () => m(t.id),
|
|
240
|
+
type: "primary",
|
|
241
|
+
ghost: !0,
|
|
242
|
+
children: "运行"
|
|
243
|
+
}
|
|
244
|
+
),
|
|
245
|
+
/* @__PURE__ */ e(
|
|
246
|
+
g,
|
|
247
|
+
{
|
|
248
|
+
size: "small",
|
|
249
|
+
icon: /* @__PURE__ */ e(ne, {}),
|
|
250
|
+
onClick: () => a(t.id, t.appName),
|
|
251
|
+
children: "复制"
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
/* @__PURE__ */ e(
|
|
255
|
+
se,
|
|
256
|
+
{
|
|
257
|
+
title: "确认删除?",
|
|
258
|
+
onConfirm: () => p(t.id),
|
|
259
|
+
children: /* @__PURE__ */ e(g, { size: "small", danger: !0, icon: /* @__PURE__ */ e(ye, {}), children: "删除" })
|
|
260
|
+
}
|
|
261
|
+
)
|
|
262
|
+
] })
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
),
|
|
267
|
+
/* @__PURE__ */ e(
|
|
268
|
+
W,
|
|
269
|
+
{
|
|
270
|
+
title: "新建应用",
|
|
271
|
+
open: v,
|
|
272
|
+
onClose: () => s(!1),
|
|
273
|
+
extra: /* @__PURE__ */ r(N, { children: [
|
|
274
|
+
/* @__PURE__ */ e(g, { onClick: () => s(!1), children: "取消" }),
|
|
275
|
+
/* @__PURE__ */ e(g, { type: "primary", onClick: T, children: "创建" })
|
|
276
|
+
] }),
|
|
277
|
+
children: /* @__PURE__ */ r(h, { form: c, layout: "vertical", children: [
|
|
278
|
+
/* @__PURE__ */ e(h.Item, { name: "appName", label: "应用名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e(E, { placeholder: "例如: 财务报表自动生成" }) }),
|
|
279
|
+
/* @__PURE__ */ e(h.Item, { name: "category", label: "分类", children: /* @__PURE__ */ e(
|
|
280
|
+
P,
|
|
281
|
+
{
|
|
282
|
+
placeholder: "选择分类",
|
|
283
|
+
options: [
|
|
284
|
+
{ value: "OFFICE", label: "OFFICE 办公" },
|
|
285
|
+
{ value: "WEB", label: "WEB 网页" },
|
|
286
|
+
{ value: "ERP", label: "ERP 系统" },
|
|
287
|
+
{ value: "CUSTOM", label: "CUSTOM 自定义" }
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
) }),
|
|
291
|
+
/* @__PURE__ */ e(h.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e(E.TextArea, { rows: 3, placeholder: "用途说明" }) })
|
|
292
|
+
] })
|
|
293
|
+
}
|
|
294
|
+
)
|
|
295
|
+
] });
|
|
296
|
+
}
|
|
297
|
+
const { Title: ze } = $, Fe = [
|
|
298
|
+
{ value: "start", label: "开始" },
|
|
299
|
+
{ value: "delay", label: "延时" },
|
|
300
|
+
{ value: "http", label: "HTTP 请求" },
|
|
301
|
+
{ value: "sql", label: "SQL 查询" },
|
|
302
|
+
{ value: "shell", label: "Shell 命令" },
|
|
303
|
+
{ value: "if", label: "条件分支" },
|
|
304
|
+
{ value: "loop", label: "循环" },
|
|
305
|
+
{ value: "subflow", label: "子流程" },
|
|
306
|
+
{ value: "setVariable", label: "设置变量" },
|
|
307
|
+
{ value: "end", label: "结束" }
|
|
308
|
+
];
|
|
309
|
+
function De() {
|
|
310
|
+
var j;
|
|
311
|
+
const { id: i } = ce(), A = K(), [f, C] = _(null), [l, v] = _(null), [s, c] = _([]), [u, T] = _(!1), [p, a] = _(null), [m] = h.useForm(), [o] = h.useForm();
|
|
312
|
+
M(() => {
|
|
313
|
+
i && Promise.all([
|
|
314
|
+
w.get("rpa/app/" + i),
|
|
315
|
+
w.get(`rpa/flow/${i}`)
|
|
316
|
+
]).then(([d, k]) => {
|
|
317
|
+
const I = (d == null ? void 0 : d.data) ?? d, S = (k == null ? void 0 : k.data) ?? k;
|
|
318
|
+
console.log("[FEATURE063 AppEdit] loaded:", { appObj: I, flowObj: S }), C(I), v(S), o.setFieldsValue({
|
|
319
|
+
app_name: (I == null ? void 0 : I.app_name) ?? "",
|
|
320
|
+
app_code: (I == null ? void 0 : I.app_code) ?? "",
|
|
321
|
+
category: (I == null ? void 0 : I.category) ?? "",
|
|
322
|
+
description: (I == null ? void 0 : I.description) ?? ""
|
|
323
|
+
});
|
|
324
|
+
try {
|
|
325
|
+
const J = S != null && S.nodes_json ? JSON.parse(S.nodes_json) : [];
|
|
326
|
+
c(Array.isArray(J) ? J : []);
|
|
327
|
+
} catch {
|
|
328
|
+
c([]);
|
|
329
|
+
}
|
|
330
|
+
}).catch((d) => {
|
|
331
|
+
console.error("[FEATURE063 AppEdit] fetch error:", d);
|
|
332
|
+
});
|
|
333
|
+
}, [i]);
|
|
334
|
+
const t = async () => {
|
|
335
|
+
const d = JSON.stringify(s);
|
|
336
|
+
try {
|
|
337
|
+
const k = await w.post("rpa/flow/save", {
|
|
338
|
+
// FEATURE063: 后端全局 Jackson SNAKE_CASE, 请求字段必须 snake_case
|
|
339
|
+
app_id: Number(i),
|
|
340
|
+
flow_name: (l == null ? void 0 : l.flow_name) ?? (f == null ? void 0 : f.app_name) ?? "未命名流程",
|
|
341
|
+
nodes_json: d,
|
|
342
|
+
description: (l == null ? void 0 : l.description) ?? ""
|
|
343
|
+
});
|
|
344
|
+
y.success("流程已保存");
|
|
345
|
+
const I = await w.get(`rpa/flow/${i}`), S = (I == null ? void 0 : I.data) ?? I;
|
|
346
|
+
v(S);
|
|
347
|
+
} catch (k) {
|
|
348
|
+
console.error("[FEATURE063 AppEdit] saveFlow error:", k), y.error("保存失败: " + ((k == null ? void 0 : k.message) || k));
|
|
349
|
+
}
|
|
350
|
+
}, n = () => {
|
|
351
|
+
a({
|
|
352
|
+
id: "node-" + Date.now(),
|
|
353
|
+
type: "delay",
|
|
354
|
+
name: "新节点",
|
|
355
|
+
orderNo: s.length + 1,
|
|
356
|
+
config: { mockDelayMs: 300 }
|
|
357
|
+
}), m.resetFields(), m.setFieldsValue({
|
|
358
|
+
type: "delay",
|
|
359
|
+
name: "新节点",
|
|
360
|
+
orderNo: s.length + 1,
|
|
361
|
+
configJson: JSON.stringify({ mockDelayMs: 300 }, null, 2)
|
|
362
|
+
}), T(!0);
|
|
363
|
+
}, x = (d) => {
|
|
364
|
+
a(d), m.setFieldsValue({
|
|
365
|
+
type: d.type,
|
|
366
|
+
name: d.name,
|
|
367
|
+
orderNo: d.orderNo,
|
|
368
|
+
configJson: JSON.stringify(d.config ?? {}, null, 2)
|
|
369
|
+
}), T(!0);
|
|
370
|
+
}, z = async () => {
|
|
371
|
+
const d = await m.validateFields();
|
|
372
|
+
let k = {};
|
|
373
|
+
try {
|
|
374
|
+
k = d.configJson ? JSON.parse(d.configJson) : {};
|
|
375
|
+
} catch (S) {
|
|
376
|
+
y.error("config 不是合法 JSON: " + S.message);
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
const I = {
|
|
380
|
+
id: p.id,
|
|
381
|
+
type: d.type,
|
|
382
|
+
name: d.name,
|
|
383
|
+
orderNo: d.orderNo,
|
|
384
|
+
config: k
|
|
385
|
+
};
|
|
386
|
+
c((S) => {
|
|
387
|
+
const J = S.findIndex((H) => H.id === I.id);
|
|
388
|
+
if (J >= 0) {
|
|
389
|
+
const H = [...S];
|
|
390
|
+
return H[J] = I, H;
|
|
391
|
+
}
|
|
392
|
+
return [...S, I];
|
|
393
|
+
}), T(!1);
|
|
394
|
+
}, oe = (d) => {
|
|
395
|
+
c((k) => k.filter((I) => I.id !== d.id));
|
|
396
|
+
};
|
|
397
|
+
return /* @__PURE__ */ r("div", { style: { padding: 24, background: "#fff", minHeight: "100%" }, children: [
|
|
398
|
+
/* @__PURE__ */ r(N, { style: { marginBottom: 16 }, children: [
|
|
399
|
+
/* @__PURE__ */ e(g, { icon: /* @__PURE__ */ e(fe, {}), onClick: () => A("/rpa/app"), children: "返回" }),
|
|
400
|
+
/* @__PURE__ */ e(ze, { level: 3, style: { margin: 0 }, children: (f == null ? void 0 : f.app_name) ?? "应用编辑" }),
|
|
401
|
+
/* @__PURE__ */ e(b, { color: "blue", children: (f == null ? void 0 : f.status) ?? "DRAFT" })
|
|
402
|
+
] }),
|
|
403
|
+
/* @__PURE__ */ e(
|
|
404
|
+
ve,
|
|
405
|
+
{
|
|
406
|
+
items: [
|
|
407
|
+
{
|
|
408
|
+
key: "basic",
|
|
409
|
+
label: "基本信息",
|
|
410
|
+
children: /* @__PURE__ */ e("div", { style: { padding: 16 }, children: /* @__PURE__ */ r(
|
|
411
|
+
h,
|
|
412
|
+
{
|
|
413
|
+
form: o,
|
|
414
|
+
layout: "vertical",
|
|
415
|
+
style: { maxWidth: 520 },
|
|
416
|
+
children: [
|
|
417
|
+
/* @__PURE__ */ e(h.Item, { label: "应用名", name: "app_name", children: /* @__PURE__ */ e(E, { disabled: !0 }) }),
|
|
418
|
+
/* @__PURE__ */ e(h.Item, { label: "编码", name: "app_code", children: /* @__PURE__ */ e(E, { disabled: !0 }) }),
|
|
419
|
+
/* @__PURE__ */ e(h.Item, { label: "分类", name: "category", children: /* @__PURE__ */ e(E, { disabled: !0 }) }),
|
|
420
|
+
/* @__PURE__ */ e(h.Item, { label: "描述", name: "description", children: /* @__PURE__ */ e(E.TextArea, { disabled: !0, rows: 3 }) })
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
) })
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
key: "nodes",
|
|
427
|
+
label: `节点列表 (${s.length})`,
|
|
428
|
+
children: /* @__PURE__ */ r("div", { style: { padding: 16 }, children: [
|
|
429
|
+
/* @__PURE__ */ r(N, { style: { marginBottom: 12 }, children: [
|
|
430
|
+
/* @__PURE__ */ e(g, { type: "primary", icon: /* @__PURE__ */ e(q, {}), onClick: n, children: "新增节点" }),
|
|
431
|
+
/* @__PURE__ */ e(g, { icon: /* @__PURE__ */ e(be, {}), onClick: t, children: "保存流程" }),
|
|
432
|
+
/* @__PURE__ */ e(
|
|
433
|
+
g,
|
|
434
|
+
{
|
|
435
|
+
onClick: async () => {
|
|
436
|
+
try {
|
|
437
|
+
const d = await w.post("rpa/run", {
|
|
438
|
+
app_id: Number(i),
|
|
439
|
+
runner_type: "mock"
|
|
440
|
+
});
|
|
441
|
+
y.success(`已派发, runId=${d}`);
|
|
442
|
+
} catch (d) {
|
|
443
|
+
console.error("[FEATURE063 AppEdit] dispatch run error:", d), y.error("派发失败: " + ((d == null ? void 0 : d.message) || d));
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
children: "试运行 (mock)"
|
|
447
|
+
}
|
|
448
|
+
)
|
|
449
|
+
] }),
|
|
450
|
+
/* @__PURE__ */ e(
|
|
451
|
+
U,
|
|
452
|
+
{
|
|
453
|
+
size: "small",
|
|
454
|
+
rowKey: "id",
|
|
455
|
+
dataSource: s.sort((d, k) => (d.orderNo ?? 0) - (k.orderNo ?? 0)),
|
|
456
|
+
pagination: !1,
|
|
457
|
+
columns: [
|
|
458
|
+
{ title: "序号", dataIndex: "orderNo", width: 60 },
|
|
459
|
+
{
|
|
460
|
+
title: "类型",
|
|
461
|
+
dataIndex: "type",
|
|
462
|
+
width: 100,
|
|
463
|
+
render: (d) => /* @__PURE__ */ e(b, { color: "blue", children: d })
|
|
464
|
+
},
|
|
465
|
+
{ title: "名称", dataIndex: "name", width: 200 },
|
|
466
|
+
{
|
|
467
|
+
title: "配置",
|
|
468
|
+
dataIndex: "config",
|
|
469
|
+
ellipsis: !0,
|
|
470
|
+
render: (d) => /* @__PURE__ */ e("code", { children: JSON.stringify(d) })
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
title: "操作",
|
|
474
|
+
width: 160,
|
|
475
|
+
render: (d, k) => /* @__PURE__ */ r(N, { size: 4, children: [
|
|
476
|
+
/* @__PURE__ */ e(g, { size: "small", onClick: () => x(k), children: "编辑" }),
|
|
477
|
+
/* @__PURE__ */ e(
|
|
478
|
+
g,
|
|
479
|
+
{
|
|
480
|
+
size: "small",
|
|
481
|
+
danger: !0,
|
|
482
|
+
onClick: () => oe(k),
|
|
483
|
+
children: "删除"
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
] })
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
)
|
|
491
|
+
] })
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
key: "trigger",
|
|
495
|
+
label: "触发器",
|
|
496
|
+
children: /* @__PURE__ */ e("div", { style: { padding: 16 }, children: /* @__PURE__ */ e(
|
|
497
|
+
g,
|
|
498
|
+
{
|
|
499
|
+
type: "primary",
|
|
500
|
+
onClick: () => A("/rpa/trigger", { state: { appId: Number(i) } }),
|
|
501
|
+
children: "管理触发器"
|
|
502
|
+
}
|
|
503
|
+
) })
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
key: "version",
|
|
507
|
+
label: "版本",
|
|
508
|
+
children: /* @__PURE__ */ e("div", { style: { padding: 16 }, children: /* @__PURE__ */ e(
|
|
509
|
+
g,
|
|
510
|
+
{
|
|
511
|
+
type: "primary",
|
|
512
|
+
onClick: async () => {
|
|
513
|
+
try {
|
|
514
|
+
await w.post(`rpa/app/${i}/publish`, { description: "v1" }), y.success("已发布版本 v1");
|
|
515
|
+
} catch (d) {
|
|
516
|
+
y.error("发布失败: " + ((d == null ? void 0 : d.message) || d));
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
children: "发布当前版本"
|
|
520
|
+
}
|
|
521
|
+
) })
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
),
|
|
526
|
+
/* @__PURE__ */ e(
|
|
527
|
+
W,
|
|
528
|
+
{
|
|
529
|
+
title: (j = p == null ? void 0 : p.id) != null && j.startsWith("node-") ? "新增节点" : "编辑节点",
|
|
530
|
+
open: u,
|
|
531
|
+
onClose: () => T(!1),
|
|
532
|
+
size: "large",
|
|
533
|
+
footer: /* @__PURE__ */ r(N, { style: { float: "right" }, children: [
|
|
534
|
+
/* @__PURE__ */ e(g, { onClick: () => T(!1), children: "取消" }),
|
|
535
|
+
/* @__PURE__ */ e(g, { type: "primary", onClick: z, children: "确定" })
|
|
536
|
+
] }),
|
|
537
|
+
children: /* @__PURE__ */ r(h, { form: m, layout: "vertical", children: [
|
|
538
|
+
/* @__PURE__ */ e(h.Item, { name: "type", label: "节点类型", rules: [{ required: !0 }], children: /* @__PURE__ */ e(P, { options: Fe }) }),
|
|
539
|
+
/* @__PURE__ */ e(h.Item, { name: "name", label: "节点名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e(E, {}) }),
|
|
540
|
+
/* @__PURE__ */ e(h.Item, { name: "orderNo", label: "序号", rules: [{ required: !0 }], children: /* @__PURE__ */ e(xe, { min: 1, style: { width: "100%" } }) }),
|
|
541
|
+
/* @__PURE__ */ e(h.Item, { name: "configJson", label: "配置 JSON", children: /* @__PURE__ */ e(E.TextArea, { rows: 8, placeholder: '{"mockDelayMs": 300}' }) })
|
|
542
|
+
] })
|
|
543
|
+
}
|
|
544
|
+
)
|
|
545
|
+
] });
|
|
546
|
+
}
|
|
547
|
+
const { Title: Pe } = $;
|
|
548
|
+
function Me() {
|
|
549
|
+
const [i, A] = _([]), [f, C] = _([]), [l, v] = _(!1), [s, c] = _(!1), [u] = h.useForm(), T = async () => {
|
|
550
|
+
v(!0);
|
|
551
|
+
try {
|
|
552
|
+
const [t, n] = await Promise.all([
|
|
553
|
+
w.post("rpa/trigger/list", {}),
|
|
554
|
+
w.post("rpa/app/list", {})
|
|
555
|
+
]);
|
|
556
|
+
A(Array.isArray(t == null ? void 0 : t.data) ? t.data : Array.isArray(t) ? t : []), C(Array.isArray(n == null ? void 0 : n.data) ? n.data : Array.isArray(n) ? n : []);
|
|
557
|
+
} catch (t) {
|
|
558
|
+
console.warn(t);
|
|
559
|
+
} finally {
|
|
560
|
+
v(!1);
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
M(() => {
|
|
564
|
+
T();
|
|
565
|
+
}, []);
|
|
566
|
+
const p = async () => {
|
|
567
|
+
try {
|
|
568
|
+
const t = await u.validateFields(), n = {};
|
|
569
|
+
t.appId != null && (n.app_id = t.appId), t.triggerName != null && (n.trigger_name = t.triggerName), t.triggerType != null && (n.trigger_type = t.triggerType), t.cronExpr != null && (n.cron_expr = t.cronExpr), t.webhookCode != null && (n.webhook_code = t.webhookCode), await w.post("rpa/trigger", n), y.success("已创建"), c(!1), u.resetFields(), T();
|
|
570
|
+
} catch (t) {
|
|
571
|
+
if (t != null && t.errorFields) return;
|
|
572
|
+
y.error((t == null ? void 0 : t.message) ?? String(t));
|
|
573
|
+
}
|
|
574
|
+
}, a = async (t, n) => {
|
|
575
|
+
try {
|
|
576
|
+
await w.post(`rpa/trigger/${t}/toggle`, { enabled: n ? 1 : 0 }), y.success(n ? "已启用" : "已禁用"), T();
|
|
577
|
+
} catch (x) {
|
|
578
|
+
y.error("切换失败: " + ((x == null ? void 0 : x.message) || x));
|
|
579
|
+
}
|
|
580
|
+
}, m = async (t) => {
|
|
581
|
+
try {
|
|
582
|
+
await w.delete("rpa/trigger/" + t), y.success("已删除"), T();
|
|
583
|
+
} catch (n) {
|
|
584
|
+
y.error("删除失败: " + ((n == null ? void 0 : n.message) || n));
|
|
585
|
+
}
|
|
586
|
+
}, o = (t) => {
|
|
587
|
+
var x;
|
|
588
|
+
const n = `${window.location.origin}/api/rpa/trigger/webhook/${t}`;
|
|
589
|
+
(x = navigator.clipboard) == null || x.writeText(n), y.success("已复制 webhook URL");
|
|
590
|
+
};
|
|
591
|
+
return /* @__PURE__ */ r("div", { style: { padding: 24, background: "#fff", minHeight: "100%" }, children: [
|
|
592
|
+
/* @__PURE__ */ e(Pe, { level: 3, style: { marginTop: 0 }, children: "触发器" }),
|
|
593
|
+
/* @__PURE__ */ e(N, { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(g, { type: "primary", icon: /* @__PURE__ */ e(q, {}), onClick: () => c(!0), children: "新建触发器" }) }),
|
|
594
|
+
/* @__PURE__ */ e(
|
|
595
|
+
U,
|
|
596
|
+
{
|
|
597
|
+
size: "small",
|
|
598
|
+
loading: l,
|
|
599
|
+
rowKey: "id",
|
|
600
|
+
dataSource: i,
|
|
601
|
+
pagination: { pageSize: 20, showSizeChanger: !1 },
|
|
602
|
+
columns: [
|
|
603
|
+
{ title: "ID", dataIndex: "id", width: 60 },
|
|
604
|
+
{
|
|
605
|
+
title: "应用",
|
|
606
|
+
dataIndex: "app_id",
|
|
607
|
+
width: 160,
|
|
608
|
+
render: (t) => {
|
|
609
|
+
var n;
|
|
610
|
+
return ((n = f.find((x) => x.id === t)) == null ? void 0 : n.app_name) ?? `#${t}`;
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
{ title: "触发器名", dataIndex: "trigger_name", width: 160 },
|
|
614
|
+
{
|
|
615
|
+
title: "类型",
|
|
616
|
+
dataIndex: "trigger_type",
|
|
617
|
+
width: 100,
|
|
618
|
+
render: (t) => /* @__PURE__ */ e(b, { color: t === "manual" ? "blue" : t === "cron" ? "purple" : "cyan", children: t })
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
title: "Cron / Webhook",
|
|
622
|
+
width: 240,
|
|
623
|
+
render: (t, n) => n.trigger_type === "cron" ? /* @__PURE__ */ e("code", { children: n.cron_expr }) : n.trigger_type === "webhook" ? /* @__PURE__ */ r(N, { children: [
|
|
624
|
+
/* @__PURE__ */ r("code", { style: { fontSize: 12 }, children: [
|
|
625
|
+
"/api/rpa/trigger/webhook/",
|
|
626
|
+
n.webhook_code
|
|
627
|
+
] }),
|
|
628
|
+
/* @__PURE__ */ e(
|
|
629
|
+
g,
|
|
630
|
+
{
|
|
631
|
+
size: "small",
|
|
632
|
+
icon: /* @__PURE__ */ e(ne, {}),
|
|
633
|
+
onClick: () => o(n.webhook_code)
|
|
634
|
+
}
|
|
635
|
+
)
|
|
636
|
+
] }) : "-"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
title: "启用",
|
|
640
|
+
dataIndex: "enabled",
|
|
641
|
+
width: 80,
|
|
642
|
+
render: (t, n) => /* @__PURE__ */ e(
|
|
643
|
+
Ae,
|
|
644
|
+
{
|
|
645
|
+
checked: t === 1,
|
|
646
|
+
onChange: (x) => a(n.id, x)
|
|
647
|
+
}
|
|
648
|
+
)
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
title: "最近状态",
|
|
652
|
+
dataIndex: "last_run_status",
|
|
653
|
+
width: 100,
|
|
654
|
+
render: (t) => t === "success" ? /* @__PURE__ */ e(b, { color: "success", children: t }) : t === "failed" ? /* @__PURE__ */ e(b, { color: "error", children: t }) : /* @__PURE__ */ e(b, { children: "-" })
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
title: "操作",
|
|
658
|
+
width: 100,
|
|
659
|
+
render: (t, n) => /* @__PURE__ */ e(se, { title: "确认删除?", onConfirm: () => m(n.id), children: /* @__PURE__ */ e(g, { size: "small", danger: !0, children: "删除" }) })
|
|
660
|
+
}
|
|
661
|
+
]
|
|
662
|
+
}
|
|
663
|
+
),
|
|
664
|
+
/* @__PURE__ */ e(
|
|
665
|
+
W,
|
|
666
|
+
{
|
|
667
|
+
title: "新建触发器",
|
|
668
|
+
open: s,
|
|
669
|
+
onClose: () => c(!1),
|
|
670
|
+
size: "large",
|
|
671
|
+
footer: /* @__PURE__ */ r(N, { style: { float: "right" }, children: [
|
|
672
|
+
/* @__PURE__ */ e(g, { onClick: () => c(!1), children: "取消" }),
|
|
673
|
+
/* @__PURE__ */ e(g, { type: "primary", onClick: p, children: "确定" })
|
|
674
|
+
] }),
|
|
675
|
+
children: /* @__PURE__ */ r(h, { form: u, layout: "vertical", children: [
|
|
676
|
+
/* @__PURE__ */ e(h.Item, { name: "appId", label: "应用", rules: [{ required: !0 }], children: /* @__PURE__ */ e(
|
|
677
|
+
P,
|
|
678
|
+
{
|
|
679
|
+
options: f.map((t) => ({ value: t.id, label: t.appName })),
|
|
680
|
+
placeholder: "选择应用"
|
|
681
|
+
}
|
|
682
|
+
) }),
|
|
683
|
+
/* @__PURE__ */ e(h.Item, { name: "triggerName", label: "触发器名称", children: /* @__PURE__ */ e(E, { placeholder: "例如: 每日9点报表" }) }),
|
|
684
|
+
/* @__PURE__ */ e(h.Item, { name: "triggerType", label: "类型", rules: [{ required: !0 }], children: /* @__PURE__ */ e(
|
|
685
|
+
P,
|
|
686
|
+
{
|
|
687
|
+
options: [
|
|
688
|
+
{ value: "manual", label: "手动" },
|
|
689
|
+
{ value: "cron", label: "Cron 定时" },
|
|
690
|
+
{ value: "webhook", label: "Webhook" }
|
|
691
|
+
]
|
|
692
|
+
}
|
|
693
|
+
) }),
|
|
694
|
+
/* @__PURE__ */ e(
|
|
695
|
+
h.Item,
|
|
696
|
+
{
|
|
697
|
+
noStyle: !0,
|
|
698
|
+
shouldUpdate: (t, n) => t.triggerType !== n.triggerType,
|
|
699
|
+
children: ({ getFieldValue: t }) => t("triggerType") === "cron" ? /* @__PURE__ */ e(
|
|
700
|
+
h.Item,
|
|
701
|
+
{
|
|
702
|
+
name: "cronExpr",
|
|
703
|
+
label: "Cron 表达式 (Quartz 7 段)",
|
|
704
|
+
rules: [{ required: !0 }],
|
|
705
|
+
children: /* @__PURE__ */ e(E, { placeholder: "0 0 9 * * ? (每天 9 点)" })
|
|
706
|
+
}
|
|
707
|
+
) : t("triggerType") === "webhook" ? /* @__PURE__ */ e(
|
|
708
|
+
h.Item,
|
|
709
|
+
{
|
|
710
|
+
name: "webhookCode",
|
|
711
|
+
label: "Webhook 路径 (留空自动生成)",
|
|
712
|
+
children: /* @__PURE__ */ e(E, { placeholder: "可选, 不填自动生成 wh-xxx" })
|
|
713
|
+
}
|
|
714
|
+
) : null
|
|
715
|
+
}
|
|
716
|
+
)
|
|
717
|
+
] })
|
|
718
|
+
}
|
|
719
|
+
)
|
|
720
|
+
] });
|
|
721
|
+
}
|
|
722
|
+
const { Title: Z } = $;
|
|
723
|
+
function ee() {
|
|
724
|
+
const [i, A] = _([]), [f, C] = _(!1), [l, v] = _(null), [s, c] = _([]), u = async () => {
|
|
725
|
+
C(!0);
|
|
726
|
+
try {
|
|
727
|
+
const a = await w.post("rpa/run/page", {
|
|
728
|
+
page: 1,
|
|
729
|
+
size: 50
|
|
730
|
+
}), m = (a == null ? void 0 : a.data) ?? a;
|
|
731
|
+
A(Array.isArray(m == null ? void 0 : m.records) ? m.records : []);
|
|
732
|
+
} catch (a) {
|
|
733
|
+
console.warn(a);
|
|
734
|
+
} finally {
|
|
735
|
+
C(!1);
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
M(() => {
|
|
739
|
+
u();
|
|
740
|
+
}, []);
|
|
741
|
+
const T = async (a) => {
|
|
742
|
+
try {
|
|
743
|
+
const m = await w.get("rpa/run/" + a);
|
|
744
|
+
v(m.run), c(m.steps ?? []);
|
|
745
|
+
} catch (m) {
|
|
746
|
+
y.error((m == null ? void 0 : m.message) ?? String(m));
|
|
747
|
+
}
|
|
748
|
+
}, p = async (a) => {
|
|
749
|
+
await w.post(`rpa/run/${a}/abort`), y.success("已请求中止"), u();
|
|
750
|
+
};
|
|
751
|
+
return /* @__PURE__ */ r("div", { style: { padding: 24, background: "#fff", minHeight: "100%" }, children: [
|
|
752
|
+
/* @__PURE__ */ r(N, { style: { marginBottom: 16 }, children: [
|
|
753
|
+
/* @__PURE__ */ e(Z, { level: 3, style: { margin: 0 }, children: "运行监控" }),
|
|
754
|
+
/* @__PURE__ */ e(g, { icon: /* @__PURE__ */ e(we, {}), onClick: u, children: "刷新" })
|
|
755
|
+
] }),
|
|
756
|
+
/* @__PURE__ */ e(
|
|
757
|
+
U,
|
|
758
|
+
{
|
|
759
|
+
size: "small",
|
|
760
|
+
loading: f,
|
|
761
|
+
rowKey: "id",
|
|
762
|
+
dataSource: i,
|
|
763
|
+
pagination: { pageSize: 20, showSizeChanger: !1 },
|
|
764
|
+
columns: [
|
|
765
|
+
{ title: "Run ID", dataIndex: "id", width: 70 },
|
|
766
|
+
{ title: "执行编号", dataIndex: "run_code", width: 220, ellipsis: !0 },
|
|
767
|
+
{ title: "应用", dataIndex: "app_name", width: 160 },
|
|
768
|
+
{
|
|
769
|
+
title: "触发器",
|
|
770
|
+
dataIndex: "trigger_type",
|
|
771
|
+
width: 100,
|
|
772
|
+
render: (a) => /* @__PURE__ */ e(b, { children: a })
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
title: "触发人",
|
|
776
|
+
dataIndex: "trigger_by",
|
|
777
|
+
width: 140,
|
|
778
|
+
ellipsis: !0
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
title: "状态",
|
|
782
|
+
dataIndex: "status",
|
|
783
|
+
width: 100,
|
|
784
|
+
render: (a) => a === "success" ? /* @__PURE__ */ e(b, { color: "success", children: a }) : a === "failed" ? /* @__PURE__ */ e(b, { color: "error", children: a }) : a === "running" ? /* @__PURE__ */ e(b, { color: "processing", children: a }) : /* @__PURE__ */ e(b, { children: a })
|
|
785
|
+
},
|
|
786
|
+
{ title: "成功节点", dataIndex: "success_nodes", width: 90 },
|
|
787
|
+
{ title: "失败节点", dataIndex: "failed_nodes", width: 90 },
|
|
788
|
+
{
|
|
789
|
+
title: "耗时(ms)",
|
|
790
|
+
dataIndex: "duration_ms",
|
|
791
|
+
width: 100,
|
|
792
|
+
render: (a) => a ?? "-"
|
|
793
|
+
},
|
|
794
|
+
{ title: "开始时间", dataIndex: "started_at", width: 170 },
|
|
795
|
+
{
|
|
796
|
+
title: "操作",
|
|
797
|
+
width: 140,
|
|
798
|
+
render: (a, m) => /* @__PURE__ */ r(N, { size: 4, children: [
|
|
799
|
+
/* @__PURE__ */ e(g, { size: "small", onClick: () => T(m.id), children: "查看" }),
|
|
800
|
+
(m.status === "running" || m.status === "pending") && /* @__PURE__ */ e(g, { size: "small", danger: !0, onClick: () => p(m.id), children: "中止" })
|
|
801
|
+
] })
|
|
802
|
+
}
|
|
803
|
+
]
|
|
804
|
+
}
|
|
805
|
+
),
|
|
806
|
+
/* @__PURE__ */ e(
|
|
807
|
+
W,
|
|
808
|
+
{
|
|
809
|
+
title: l ? `运行详情 - ${l.run_code}` : "运行详情",
|
|
810
|
+
open: !!l,
|
|
811
|
+
onClose: () => v(null),
|
|
812
|
+
size: "large",
|
|
813
|
+
children: l && /* @__PURE__ */ r(de, { children: [
|
|
814
|
+
/* @__PURE__ */ r(R, { size: "small", column: 2, bordered: !0, children: [
|
|
815
|
+
/* @__PURE__ */ e(R.Item, { label: "应用", children: l.app_name }),
|
|
816
|
+
/* @__PURE__ */ e(R.Item, { label: "触发器", children: l.trigger_type }),
|
|
817
|
+
/* @__PURE__ */ e(R.Item, { label: "执行器", children: l.runner_type }),
|
|
818
|
+
/* @__PURE__ */ e(R.Item, { label: "状态", children: /* @__PURE__ */ e(b, { color: l.status === "success" ? "success" : "error", children: l.status }) }),
|
|
819
|
+
/* @__PURE__ */ e(R.Item, { label: "成功节点", children: l.success_nodes }),
|
|
820
|
+
/* @__PURE__ */ e(R.Item, { label: "失败节点", children: l.failed_nodes }),
|
|
821
|
+
/* @__PURE__ */ e(R.Item, { label: "开始时间", children: l.started_at }),
|
|
822
|
+
/* @__PURE__ */ e(R.Item, { label: "完成时间", children: l.finished_at }),
|
|
823
|
+
/* @__PURE__ */ e(R.Item, { label: "耗时(ms)", span: 2, children: l.duration_ms ?? "-" }),
|
|
824
|
+
l.error_message && /* @__PURE__ */ e(R.Item, { label: "错误", span: 2, children: l.error_message })
|
|
825
|
+
] }),
|
|
826
|
+
/* @__PURE__ */ r(Z, { level: 5, style: { marginTop: 24 }, children: [
|
|
827
|
+
"步骤日志 (",
|
|
828
|
+
s.length,
|
|
829
|
+
")"
|
|
830
|
+
] }),
|
|
831
|
+
/* @__PURE__ */ e(
|
|
832
|
+
Te,
|
|
833
|
+
{
|
|
834
|
+
items: s.map((a) => ({
|
|
835
|
+
color: a.status === "success" ? "green" : a.status === "failed" ? "red" : "gray",
|
|
836
|
+
children: /* @__PURE__ */ r("div", { children: [
|
|
837
|
+
/* @__PURE__ */ r(N, { children: [
|
|
838
|
+
/* @__PURE__ */ e(b, { color: "blue", children: a.node_no }),
|
|
839
|
+
/* @__PURE__ */ e("strong", { children: a.node_name }),
|
|
840
|
+
/* @__PURE__ */ e(b, { children: a.node_type }),
|
|
841
|
+
/* @__PURE__ */ e(
|
|
842
|
+
b,
|
|
843
|
+
{
|
|
844
|
+
color: a.status === "success" ? "success" : a.status === "failed" ? "error" : "default",
|
|
845
|
+
children: a.status
|
|
846
|
+
}
|
|
847
|
+
),
|
|
848
|
+
/* @__PURE__ */ r("span", { style: { color: "#999" }, children: [
|
|
849
|
+
a.cost_ms ?? 0,
|
|
850
|
+
"ms"
|
|
851
|
+
] })
|
|
852
|
+
] }),
|
|
853
|
+
/* @__PURE__ */ e("div", { style: { color: "#666", marginTop: 4 }, children: a.message })
|
|
854
|
+
] })
|
|
855
|
+
}))
|
|
856
|
+
}
|
|
857
|
+
)
|
|
858
|
+
] })
|
|
859
|
+
}
|
|
860
|
+
)
|
|
861
|
+
] });
|
|
862
|
+
}
|
|
863
|
+
const { Title: $e, Paragraph: te } = $;
|
|
864
|
+
function Ue() {
|
|
865
|
+
const [i, A] = _([]), [f, C] = _(!1), l = async () => {
|
|
866
|
+
C(!0);
|
|
867
|
+
try {
|
|
868
|
+
const s = await w.post("rpa/market/list", {});
|
|
869
|
+
A(Array.isArray(s == null ? void 0 : s.data) ? s.data : Array.isArray(s) ? s : []);
|
|
870
|
+
} catch (s) {
|
|
871
|
+
console.warn(s);
|
|
872
|
+
} finally {
|
|
873
|
+
C(!1);
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
M(() => {
|
|
877
|
+
l();
|
|
878
|
+
}, []);
|
|
879
|
+
const v = async (s, c) => {
|
|
880
|
+
try {
|
|
881
|
+
await w.post(`rpa/market/${s}/install`, {}), y.success(`已安装: ${c}`);
|
|
882
|
+
} catch (u) {
|
|
883
|
+
y.error((u == null ? void 0 : u.message) ?? "安装失败");
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
return /* @__PURE__ */ r("div", { style: { padding: 24, background: "#f5f7fa", minHeight: "100%" }, children: [
|
|
887
|
+
/* @__PURE__ */ r($e, { level: 3, style: { marginTop: 0 }, children: [
|
|
888
|
+
/* @__PURE__ */ e(ie, {}),
|
|
889
|
+
" 应用市场"
|
|
890
|
+
] }),
|
|
891
|
+
/* @__PURE__ */ e(te, { type: "secondary", children: "影刀 RPA 应用市场 (MVP: 卡片展示 + 一键安装)" }),
|
|
892
|
+
/* @__PURE__ */ e(Se, { spinning: f, children: /* @__PURE__ */ r(B, { gutter: [16, 16], children: [
|
|
893
|
+
i.length === 0 && /* @__PURE__ */ e(O, { span: 24, children: /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e("div", { style: { textAlign: "center", color: "#999", padding: 32 }, children: "暂无市场条目" }) }) }),
|
|
894
|
+
i.map((s) => /* @__PURE__ */ e(O, { xs: 24, sm: 12, md: 8, lg: 6, children: /* @__PURE__ */ e(
|
|
895
|
+
F,
|
|
896
|
+
{
|
|
897
|
+
hoverable: !0,
|
|
898
|
+
actions: [
|
|
899
|
+
/* @__PURE__ */ e(
|
|
900
|
+
g,
|
|
901
|
+
{
|
|
902
|
+
type: "primary",
|
|
903
|
+
icon: /* @__PURE__ */ e(_e, {}),
|
|
904
|
+
onClick: () => v(s.id, s.appName),
|
|
905
|
+
children: "安装"
|
|
906
|
+
},
|
|
907
|
+
"install"
|
|
908
|
+
)
|
|
909
|
+
],
|
|
910
|
+
children: /* @__PURE__ */ e(
|
|
911
|
+
F.Meta,
|
|
912
|
+
{
|
|
913
|
+
avatar: /* @__PURE__ */ e("span", { style: { fontSize: 32 }, children: s.icon || "📦" }),
|
|
914
|
+
title: /* @__PURE__ */ r("span", { children: [
|
|
915
|
+
s.featured === 1 && /* @__PURE__ */ e(Ie, { style: { color: "#faad14", marginRight: 6 } }),
|
|
916
|
+
s.appName
|
|
917
|
+
] }),
|
|
918
|
+
description: /* @__PURE__ */ r("div", { children: [
|
|
919
|
+
/* @__PURE__ */ e(b, { children: s.category ?? "未分类" }),
|
|
920
|
+
/* @__PURE__ */ r(b, { color: "blue", children: [
|
|
921
|
+
s.downloads ?? 0,
|
|
922
|
+
" 次安装"
|
|
923
|
+
] }),
|
|
924
|
+
/* @__PURE__ */ r(
|
|
925
|
+
"div",
|
|
926
|
+
{
|
|
927
|
+
style: {
|
|
928
|
+
marginTop: 8,
|
|
929
|
+
color: "#666",
|
|
930
|
+
fontSize: 12
|
|
931
|
+
},
|
|
932
|
+
children: [
|
|
933
|
+
"作者: ",
|
|
934
|
+
s.author ?? "anonymous"
|
|
935
|
+
]
|
|
936
|
+
}
|
|
937
|
+
),
|
|
938
|
+
/* @__PURE__ */ e(
|
|
939
|
+
te,
|
|
940
|
+
{
|
|
941
|
+
style: { marginTop: 8, marginBottom: 0 },
|
|
942
|
+
ellipsis: { rows: 2 },
|
|
943
|
+
children: s.description
|
|
944
|
+
}
|
|
945
|
+
)
|
|
946
|
+
] })
|
|
947
|
+
}
|
|
948
|
+
)
|
|
949
|
+
}
|
|
950
|
+
) }, s.id))
|
|
951
|
+
] }) })
|
|
952
|
+
] });
|
|
953
|
+
}
|
|
954
|
+
const { Title: Je } = $, We = {
|
|
955
|
+
LOW: "default",
|
|
956
|
+
MEDIUM: "blue",
|
|
957
|
+
HIGH: "orange",
|
|
958
|
+
URGENT: "red"
|
|
959
|
+
};
|
|
960
|
+
function He() {
|
|
961
|
+
const [i, A] = _([]), [f, C] = _(!1), [l, v] = _(!1), [s] = h.useForm(), c = async () => {
|
|
962
|
+
C(!0);
|
|
963
|
+
try {
|
|
964
|
+
const p = await w.post("rpa/demand/list", {});
|
|
965
|
+
A(Array.isArray(p == null ? void 0 : p.data) ? p.data : Array.isArray(p) ? p : []);
|
|
966
|
+
} catch (p) {
|
|
967
|
+
console.warn(p);
|
|
968
|
+
} finally {
|
|
969
|
+
C(!1);
|
|
970
|
+
}
|
|
971
|
+
};
|
|
972
|
+
M(() => {
|
|
973
|
+
c();
|
|
974
|
+
}, []);
|
|
975
|
+
const u = async () => {
|
|
976
|
+
try {
|
|
977
|
+
const p = await s.validateFields();
|
|
978
|
+
await w.post("rpa/demand/submit", p), y.success("需求已提交"), v(!1), s.resetFields(), c();
|
|
979
|
+
} catch (p) {
|
|
980
|
+
if (p != null && p.errorFields) return;
|
|
981
|
+
y.error((p == null ? void 0 : p.message) ?? String(p));
|
|
982
|
+
}
|
|
983
|
+
}, T = async (p, a) => {
|
|
984
|
+
await w.put(`rpa/demand/${p}/status`, { status: a }), y.success("状态已更新"), c();
|
|
985
|
+
};
|
|
986
|
+
return /* @__PURE__ */ r("div", { style: { padding: 24, background: "#fff", minHeight: "100%" }, children: [
|
|
987
|
+
/* @__PURE__ */ r(N, { style: { marginBottom: 16 }, children: [
|
|
988
|
+
/* @__PURE__ */ r(Je, { level: 3, style: { margin: 0 }, children: [
|
|
989
|
+
/* @__PURE__ */ e(Y, {}),
|
|
990
|
+
" 需求中心"
|
|
991
|
+
] }),
|
|
992
|
+
/* @__PURE__ */ e(g, { type: "primary", icon: /* @__PURE__ */ e(q, {}), onClick: () => v(!0), children: "提交需求" })
|
|
993
|
+
] }),
|
|
994
|
+
/* @__PURE__ */ e(
|
|
995
|
+
U,
|
|
996
|
+
{
|
|
997
|
+
size: "small",
|
|
998
|
+
loading: f,
|
|
999
|
+
rowKey: "id",
|
|
1000
|
+
dataSource: i,
|
|
1001
|
+
pagination: { pageSize: 20, showSizeChanger: !1 },
|
|
1002
|
+
columns: [
|
|
1003
|
+
{ title: "编号", dataIndex: "demand_code", width: 200, ellipsis: !0 },
|
|
1004
|
+
{ title: "标题", dataIndex: "title", ellipsis: !0 },
|
|
1005
|
+
{ title: "分类", dataIndex: "category", width: 100 },
|
|
1006
|
+
{
|
|
1007
|
+
title: "优先级",
|
|
1008
|
+
dataIndex: "priority",
|
|
1009
|
+
width: 90,
|
|
1010
|
+
render: (p) => /* @__PURE__ */ e(b, { color: We[p] ?? "default", children: p })
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
title: "状态",
|
|
1014
|
+
dataIndex: "status",
|
|
1015
|
+
width: 110,
|
|
1016
|
+
render: (p, a) => /* @__PURE__ */ e(
|
|
1017
|
+
P,
|
|
1018
|
+
{
|
|
1019
|
+
size: "small",
|
|
1020
|
+
value: p,
|
|
1021
|
+
style: { width: 110 },
|
|
1022
|
+
onChange: (m) => T(a.id, m),
|
|
1023
|
+
options: [
|
|
1024
|
+
{ value: "OPEN", label: "OPEN" },
|
|
1025
|
+
{ value: "IN_PROGRESS", label: "IN_PROGRESS" },
|
|
1026
|
+
{ value: "DONE", label: "DONE" },
|
|
1027
|
+
{ value: "REJECTED", label: "REJECTED" }
|
|
1028
|
+
]
|
|
1029
|
+
}
|
|
1030
|
+
)
|
|
1031
|
+
},
|
|
1032
|
+
{ title: "提交人", dataIndex: "submitter", width: 120 },
|
|
1033
|
+
{ title: "创建时间", dataIndex: "created_at", width: 170 }
|
|
1034
|
+
]
|
|
1035
|
+
}
|
|
1036
|
+
),
|
|
1037
|
+
/* @__PURE__ */ e(
|
|
1038
|
+
W,
|
|
1039
|
+
{
|
|
1040
|
+
title: "提交需求",
|
|
1041
|
+
open: l,
|
|
1042
|
+
onClose: () => v(!1),
|
|
1043
|
+
size: "large",
|
|
1044
|
+
footer: /* @__PURE__ */ r(N, { style: { float: "right" }, children: [
|
|
1045
|
+
/* @__PURE__ */ e(g, { onClick: () => v(!1), children: "取消" }),
|
|
1046
|
+
/* @__PURE__ */ e(g, { type: "primary", onClick: u, children: "提交" })
|
|
1047
|
+
] }),
|
|
1048
|
+
children: /* @__PURE__ */ r(h, { form: s, layout: "vertical", children: [
|
|
1049
|
+
/* @__PURE__ */ e(h.Item, { name: "title", label: "需求标题", rules: [{ required: !0 }], children: /* @__PURE__ */ e(E, { placeholder: "简短描述需求" }) }),
|
|
1050
|
+
/* @__PURE__ */ e(h.Item, { name: "category", label: "分类", children: /* @__PURE__ */ e(
|
|
1051
|
+
P,
|
|
1052
|
+
{
|
|
1053
|
+
options: [
|
|
1054
|
+
{ value: "DESKTOP", label: "桌面自动化" },
|
|
1055
|
+
{ value: "WEB", label: "网页自动化" },
|
|
1056
|
+
{ value: "MOBILE", label: "手机自动化" },
|
|
1057
|
+
{ value: "AI", label: "AI 智能" },
|
|
1058
|
+
{ value: "MARKET", label: "应用市场" },
|
|
1059
|
+
{ value: "OTHER", label: "其他" }
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
) }),
|
|
1063
|
+
/* @__PURE__ */ e(h.Item, { name: "priority", label: "优先级", children: /* @__PURE__ */ e(
|
|
1064
|
+
P,
|
|
1065
|
+
{
|
|
1066
|
+
defaultValue: "MEDIUM",
|
|
1067
|
+
options: [
|
|
1068
|
+
{ value: "LOW", label: "LOW" },
|
|
1069
|
+
{ value: "MEDIUM", label: "MEDIUM" },
|
|
1070
|
+
{ value: "HIGH", label: "HIGH" },
|
|
1071
|
+
{ value: "URGENT", label: "URGENT" }
|
|
1072
|
+
]
|
|
1073
|
+
}
|
|
1074
|
+
) }),
|
|
1075
|
+
/* @__PURE__ */ e(h.Item, { name: "description", label: "详细描述", children: /* @__PURE__ */ e(E.TextArea, { rows: 5, placeholder: "详细描述应用场景/痛点/期望" }) })
|
|
1076
|
+
] })
|
|
1077
|
+
}
|
|
1078
|
+
)
|
|
1079
|
+
] });
|
|
1080
|
+
}
|
|
1081
|
+
const Le = "_shell_ezj0g_6", Be = "_sidebar_ezj0g_14", qe = "_main_ezj0g_25", Ge = "_menuWrap_ezj0g_43", L = {
|
|
1082
|
+
shell: Le,
|
|
1083
|
+
sidebar: Be,
|
|
1084
|
+
main: qe,
|
|
1085
|
+
menuWrap: Ge
|
|
1086
|
+
}, le = [
|
|
1087
|
+
{ key: "/rpa/dashboard", icon: /* @__PURE__ */ e(ke, {}), label: "概览" },
|
|
1088
|
+
{ key: "/rpa/app", icon: /* @__PURE__ */ e(re, {}), label: "应用管理" },
|
|
1089
|
+
{ key: "/rpa/trigger", icon: /* @__PURE__ */ e(ae, {}), label: "触发器" },
|
|
1090
|
+
{ key: "/rpa/run", icon: /* @__PURE__ */ e(V, {}), label: "运行监控" },
|
|
1091
|
+
{ key: "/rpa/market", icon: /* @__PURE__ */ e(ie, {}), label: "应用市场" },
|
|
1092
|
+
{ key: "/rpa/demand", icon: /* @__PURE__ */ e(Y, {}), label: "需求中心" },
|
|
1093
|
+
{ key: "/rpa/about", icon: /* @__PURE__ */ e(Ce, {}), label: "关于影刀参考" }
|
|
1094
|
+
];
|
|
1095
|
+
function Ke() {
|
|
1096
|
+
return /* @__PURE__ */ r("div", { style: { padding: 24 }, children: [
|
|
1097
|
+
/* @__PURE__ */ e("h2", { children: "影刀 RPA 功能全景参考 (FEATURE063)" }),
|
|
1098
|
+
/* @__PURE__ */ e("p", { children: "本工作台为复刻影刀 RPA 的 MVP 实现, 当前阶段 (v1.0) 包含:" }),
|
|
1099
|
+
/* @__PURE__ */ r("ul", { style: { lineHeight: 1.9 }, children: [
|
|
1100
|
+
/* @__PURE__ */ e("li", { children: "✅ 应用管理 (CRUD + 复制 + 版本发布)" }),
|
|
1101
|
+
/* @__PURE__ */ e("li", { children: "✅ 流程定义 (JSON 节点列表编辑器, 10 种节点类型)" }),
|
|
1102
|
+
/* @__PURE__ */ e("li", { children: "✅ 调度计划 (manual + cron + webhook 三种触发器)" }),
|
|
1103
|
+
/* @__PURE__ */ e("li", { children: "✅ 运行监控 (实例列表 + 步骤日志时间线)" }),
|
|
1104
|
+
/* @__PURE__ */ e("li", { children: "✅ 应用市场 (条目展示 + 一键安装为新 App)" }),
|
|
1105
|
+
/* @__PURE__ */ e("li", { children: "✅ 卓越中心 (4 卡片 Dashboard + 最近运行)" }),
|
|
1106
|
+
/* @__PURE__ */ e("li", { children: "✅ 需求中心 (提交 + 列表)" })
|
|
1107
|
+
] }),
|
|
1108
|
+
/* @__PURE__ */ e("h3", { children: "Phase 2 规划" }),
|
|
1109
|
+
/* @__PURE__ */ r("ul", { style: { lineHeight: 1.9 }, children: [
|
|
1110
|
+
/* @__PURE__ */ e("li", { children: "桌面/网页/手机 worker (puppeteer / pywinauto / appium)" }),
|
|
1111
|
+
/* @__PURE__ */ e("li", { children: "Python / JS 脚本节点 (GraalPy / GraalJS)" }),
|
|
1112
|
+
/* @__PURE__ */ e("li", { children: "元素库 + 图像库 + OCR (z-oss 接入)" }),
|
|
1113
|
+
/* @__PURE__ */ e("li", { children: "AI Power (z-agent-llm-gateway)" }),
|
|
1114
|
+
/* @__PURE__ */ e("li", { children: "可视化拖拽画布编辑器" })
|
|
1115
|
+
] })
|
|
1116
|
+
] });
|
|
1117
|
+
}
|
|
1118
|
+
function Ve() {
|
|
1119
|
+
return he([
|
|
1120
|
+
{ path: "", element: /* @__PURE__ */ e(G, {}) },
|
|
1121
|
+
{ path: "dashboard", element: /* @__PURE__ */ e(G, {}) },
|
|
1122
|
+
{ path: "app", element: /* @__PURE__ */ e(Re, {}) },
|
|
1123
|
+
{ path: "app/:id/edit", element: /* @__PURE__ */ e(De, {}) },
|
|
1124
|
+
{ path: "trigger", element: /* @__PURE__ */ e(Me, {}) },
|
|
1125
|
+
{ path: "run", element: /* @__PURE__ */ e(ee, {}) },
|
|
1126
|
+
{ path: "run/:id", element: /* @__PURE__ */ e(ee, {}) },
|
|
1127
|
+
{ path: "market", element: /* @__PURE__ */ e(Ue, {}) },
|
|
1128
|
+
{ path: "demand", element: /* @__PURE__ */ e(He, {}) },
|
|
1129
|
+
{ path: "about", element: /* @__PURE__ */ e(Ke, {}) }
|
|
1130
|
+
]) ?? /* @__PURE__ */ e(G, {});
|
|
1131
|
+
}
|
|
1132
|
+
function tt({ onModeSwitch: i }) {
|
|
1133
|
+
const A = K(), { pathname: f } = pe(), C = ue(() => {
|
|
1134
|
+
for (const l of le)
|
|
1135
|
+
if (f.startsWith(l.key)) return l.key;
|
|
1136
|
+
return f;
|
|
1137
|
+
}, [f]);
|
|
1138
|
+
return /* @__PURE__ */ r("div", { className: L.shell, children: [
|
|
1139
|
+
/* @__PURE__ */ e("aside", { className: L.sidebar, children: /* @__PURE__ */ e("div", { className: L.menuWrap, children: le.map((l) => /* @__PURE__ */ r(
|
|
1140
|
+
"button",
|
|
1141
|
+
{
|
|
1142
|
+
type: "button",
|
|
1143
|
+
onClick: () => A(l.key),
|
|
1144
|
+
style: {
|
|
1145
|
+
display: "flex",
|
|
1146
|
+
alignItems: "center",
|
|
1147
|
+
gap: 10,
|
|
1148
|
+
width: "100%",
|
|
1149
|
+
padding: "10px 16px",
|
|
1150
|
+
border: "none",
|
|
1151
|
+
background: C === l.key ? "var(--color-primary-bg, #e6f4ff)" : "transparent",
|
|
1152
|
+
color: C === l.key ? "var(--color-primary, #2F70F1)" : "var(--text-primary, #333)",
|
|
1153
|
+
fontWeight: C === l.key ? 600 : 400,
|
|
1154
|
+
cursor: "pointer",
|
|
1155
|
+
fontSize: 14,
|
|
1156
|
+
textAlign: "left",
|
|
1157
|
+
borderLeft: C === l.key ? "3px solid var(--color-primary, #2F70F1)" : "3px solid transparent"
|
|
1158
|
+
},
|
|
1159
|
+
children: [
|
|
1160
|
+
l.icon,
|
|
1161
|
+
/* @__PURE__ */ e("span", { children: l.label })
|
|
1162
|
+
]
|
|
1163
|
+
},
|
|
1164
|
+
l.key
|
|
1165
|
+
)) }) }),
|
|
1166
|
+
/* @__PURE__ */ e("main", { className: L.main, children: /* @__PURE__ */ e(Ve, {}) })
|
|
1167
|
+
] });
|
|
1168
|
+
}
|
|
1169
|
+
export {
|
|
1170
|
+
tt as default
|
|
1171
|
+
};
|