@yuku123/z-team-component 0.2.28 → 0.2.30

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