@yuku123/z-team-component 0.2.54 → 0.2.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChangeLogView-Cstbioyw.js → ChangeLogView-R6boINWk.js} +137 -137
- package/dist/{ComponentDoc-yvIrAz9-.js → ComponentDoc-DTJyJAy-.js} +121 -121
- package/dist/{InvitationManagementPage-CIouC3Fn.js → InvitationManagementPage-BZOxuoM5.js} +1 -1
- package/dist/{OnboardingPage-DScwVCi-.js → OnboardingPage-Be3MXW9i.js} +2 -2
- package/dist/{ScheduledTasks-Dd2lJrBF.js → ScheduledTasks-CxDbixJe.js} +2957 -2992
- package/dist/{SystemShell-DtvyWy0u.js → SystemShell-BEKwj3WF.js} +1 -1
- package/dist/{admin-logs-B9KS6VJz.js → admin-logs-DMF0dtG1.js} +2 -2
- package/dist/{api-CALqShkO.js → api-DhuqONeb.js} +210 -228
- package/dist/{api-CdVRdA0g.js → api-DqNgdbLm.js} +1 -1
- package/dist/createWorkspaceWsHandler-BKcAIc4B.js +13034 -0
- package/dist/{index-DEx5rtXv.js → index-8Qtz0IKN.js} +2 -2
- package/dist/{index-Pk7OkJrk.js → index-B30K72xQ.js} +517 -320
- package/dist/{index-7Pe_xBrh.js → index-B7cZdoRq.js} +1 -1
- package/dist/{index-C2Wkg1b5.js → index-B8eiFO_f.js} +3 -3
- package/dist/{index-DET70T3j.js → index-BKVWW3ba.js} +1 -1
- package/dist/{index-aw72ID7y.js → index-BM6XpIcw.js} +1 -1
- package/dist/{index-C3B7CbHo.js → index-BOcKPM37.js} +1 -1
- package/dist/{index-lftFkqfI.js → index-BP97Ev-W.js} +4 -4
- package/dist/{index-C6S3MIu4.js → index-BkX0I2aB.js} +56 -56
- package/dist/{index-DC5lxCN8.js → index-C5O0cK8A.js} +6 -6
- package/dist/index-C8Wkx3H_.js +8960 -0
- package/dist/{index-4YxdJwFm.js → index-CZ9xxAL0.js} +3 -3
- package/dist/{index-DLyAy3cr.js → index-CZxihNo5.js} +7 -7
- package/dist/{index-DKeYG0Fu.js → index-CbUsvCMy.js} +4 -4
- package/dist/{index-CLWgeKwr.js → index-Ct9MzvZV.js} +2 -2
- package/dist/{index-CGWttFLb.js → index-CzePRAbT.js} +4 -4
- package/dist/{index-CgQH7-9F.js → index-DQk6Pt6U.js} +3 -3
- package/dist/{index-DOygBsXO.js → index-DQmgOqd1.js} +1123 -1121
- package/dist/{index-D6V-4vNa.js → index-DV8rmjvN.js} +5 -5
- package/dist/{index-CKS65_Dw.js → index-DpNZTqcn.js} +3 -3
- package/dist/{index-usrA11ZG.js → index-JMzBzwiO.js} +617 -618
- package/dist/{index-DJOyOVn_.js → index-Otx98G8z.js} +74 -87
- package/dist/{index-C_2o9qgM.js → index-TPTesErt.js} +2 -2
- package/dist/index-mXMdvUYD.js +1182 -0
- package/dist/index.js +1 -1
- package/dist/{instance-f3C-1qYl.js → instance-Cr4_XM2r.js} +1 -1
- package/dist/pages.js +1 -1
- package/dist/{schedule-DfkgwPdE.js → schedule-BNLns-p4.js} +1 -1
- package/dist/{send-default-agent-team-message-d_ECdczr.js → send-default-agent-team-message-C9VWSWKJ.js} +1 -1
- package/dist/{sso-user-HcsSzg8P.js → sso-user-Cme2tmGq.js} +1 -1
- package/dist/{training-DnNQN0An.js → training-SjRAdtNQ.js} +1 -1
- package/dist/{useAppStore-kRZEA5WZ.js → useAppStore-C63xiq3-.js} +1 -1
- package/dist/{webide-DPjFYxLl.js → webide-DDFxSedU.js} +1526 -1526
- package/dist/z-team-component.css +2 -2
- package/package.json +1 -1
- package/dist/createWorkspaceWsHandler-CL5-4wFp.js +0 -13037
- package/dist/index-DLQoecEe.js +0 -1143
- package/dist/index-DWsfQMp8.js +0 -208
- package/dist/index-TDZM-Zv3.js +0 -9287
- package/dist/index-WIsi8fln.js +0 -339
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i, Fragment as
|
|
2
|
-
import { ThunderboltOutlined as
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
import { Empty as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
PageHeader: ({ title: a, subtitle: r }) => /* @__PURE__ */ i("div", { style: { marginBottom: 12 }, children: [
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as be } from "react/jsx-runtime";
|
|
2
|
+
import { ThunderboltOutlined as se, UpOutlined as Ie, DownOutlined as Se, LinkOutlined as $e, CopyOutlined as Te, EditOutlined as we, DeleteOutlined as ge, BranchesOutlined as Ae, HistoryOutlined as Ee, ReloadOutlined as xe, PlusOutlined as j, FileImageOutlined as De } from "@ant-design/icons";
|
|
3
|
+
import { useState as p, useEffect as F, useCallback as re, useMemo as ne, useRef as fe } from "react";
|
|
4
|
+
import _e from "axios";
|
|
5
|
+
import { Empty as le, Modal as X, Select as q, Input as ee, Form as D, Col as Z, Row as pe, Space as oe, Dropdown as ke, Popconfirm as ye, Tag as H, Descriptions as Re, Card as Le, Table as He, Tree as Oe, Button as O, Tooltip as Be, Spin as Ue } from "antd";
|
|
6
|
+
const Me = {
|
|
7
|
+
PageHeader: ({ title: a, subtitle: c }) => /* @__PURE__ */ i("div", { style: { marginBottom: 12 }, children: [
|
|
9
8
|
/* @__PURE__ */ e("h2", { style: { margin: 0 }, children: a }),
|
|
10
|
-
|
|
9
|
+
c && /* @__PURE__ */ e("p", { style: { color: "#666", margin: "4px 0 0", fontSize: 13 }, children: c })
|
|
11
10
|
] }),
|
|
12
11
|
TenantDomainSelector: ({
|
|
13
12
|
tenants: a = [],
|
|
14
|
-
domains:
|
|
13
|
+
domains: c = [],
|
|
15
14
|
selectedTenant: n,
|
|
16
15
|
selectedDomain: h,
|
|
17
|
-
onTenantChange:
|
|
16
|
+
onTenantChange: b,
|
|
18
17
|
onDomainChange: d
|
|
19
|
-
}) => /* @__PURE__ */ i(
|
|
18
|
+
}) => /* @__PURE__ */ i(oe, { style: { marginBottom: 12 }, children: [
|
|
20
19
|
/* @__PURE__ */ e("span", { style: { color: "#666" }, children: "租户" }),
|
|
21
20
|
/* @__PURE__ */ e(
|
|
22
21
|
q,
|
|
23
22
|
{
|
|
24
23
|
value: n,
|
|
25
|
-
onChange:
|
|
24
|
+
onChange: b,
|
|
26
25
|
style: { minWidth: 160 },
|
|
27
26
|
options: a,
|
|
28
27
|
placeholder: "请选择租户"
|
|
@@ -36,102 +35,102 @@ const je = {
|
|
|
36
35
|
onChange: d,
|
|
37
36
|
disabled: !n,
|
|
38
37
|
style: { minWidth: 160 },
|
|
39
|
-
options:
|
|
38
|
+
options: c,
|
|
40
39
|
placeholder: "请选择域"
|
|
41
40
|
}
|
|
42
41
|
)
|
|
43
42
|
] }),
|
|
44
|
-
Button: (a) => /* @__PURE__ */ e(
|
|
43
|
+
Button: (a) => /* @__PURE__ */ e(O, { ...a }),
|
|
45
44
|
Tree: (a) => /* @__PURE__ */ e(Oe, { ...a }),
|
|
46
|
-
Table: (a) => /* @__PURE__ */ e(
|
|
47
|
-
Card: (a) => /* @__PURE__ */ e(
|
|
48
|
-
Descriptions: ({ items: a = [], ...
|
|
45
|
+
Table: (a) => /* @__PURE__ */ e(He, { ...a }),
|
|
46
|
+
Card: (a) => /* @__PURE__ */ e(Le, { ...a }),
|
|
47
|
+
Descriptions: ({ items: a = [], ...c }) => /* @__PURE__ */ e(Re, { ...c, bordered: !0, size: "small", items: a }),
|
|
49
48
|
Tag: (a) => /* @__PURE__ */ e(H, { ...a }),
|
|
50
|
-
Popconfirm: (a) => /* @__PURE__ */ e(
|
|
51
|
-
Dropdown: (a) => /* @__PURE__ */ e(
|
|
52
|
-
Empty: (a) => /* @__PURE__ */ e(
|
|
53
|
-
Space: (a) => /* @__PURE__ */ e(
|
|
54
|
-
Row: (a) => /* @__PURE__ */ e(
|
|
55
|
-
Col: (a) => /* @__PURE__ */ e(
|
|
56
|
-
FormItem: ({ label: a, children:
|
|
57
|
-
Input: (a) => /* @__PURE__ */ e(
|
|
58
|
-
InputTextArea: (a) => /* @__PURE__ */ e(
|
|
49
|
+
Popconfirm: (a) => /* @__PURE__ */ e(ye, { ...a }),
|
|
50
|
+
Dropdown: (a) => /* @__PURE__ */ e(ke, { ...a }),
|
|
51
|
+
Empty: (a) => /* @__PURE__ */ e(le, { ...a }),
|
|
52
|
+
Space: (a) => /* @__PURE__ */ e(oe, { ...a }),
|
|
53
|
+
Row: (a) => /* @__PURE__ */ e(pe, { ...a }),
|
|
54
|
+
Col: (a) => /* @__PURE__ */ e(Z, { ...a }),
|
|
55
|
+
FormItem: ({ label: a, children: c, ...n }) => /* @__PURE__ */ e(D.Item, { label: a, ...n, children: c }),
|
|
56
|
+
Input: (a) => /* @__PURE__ */ e(ee, { ...a }),
|
|
57
|
+
InputTextArea: (a) => /* @__PURE__ */ e(ee.TextArea, { ...a }),
|
|
59
58
|
Select: (a) => /* @__PURE__ */ e(q, { ...a }),
|
|
60
|
-
Modal: (a) => /* @__PURE__ */ e(
|
|
59
|
+
Modal: (a) => /* @__PURE__ */ e(X, { ...a })
|
|
61
60
|
};
|
|
62
|
-
function
|
|
61
|
+
function ze({ node: a, highlightId: c, onElementClick: n }) {
|
|
63
62
|
var d;
|
|
64
|
-
const h =
|
|
63
|
+
const h = Me[a.type] || (() => null), b = c === a.id;
|
|
65
64
|
return /* @__PURE__ */ e(
|
|
66
65
|
"div",
|
|
67
66
|
{
|
|
68
67
|
"data-node-id": a.id,
|
|
69
68
|
"data-node-type": a.type,
|
|
70
|
-
className: `manuscript-node ${
|
|
71
|
-
onClick: (
|
|
72
|
-
|
|
69
|
+
className: `manuscript-node ${b ? "manuscript-node-highlight" : ""}`,
|
|
70
|
+
onClick: (l) => {
|
|
71
|
+
l.stopPropagation(), n == null || n(a);
|
|
73
72
|
},
|
|
74
|
-
children: /* @__PURE__ */ e(h, { ...a.props || {}, children: (d = a.children) == null ? void 0 : d.map((
|
|
75
|
-
|
|
73
|
+
children: /* @__PURE__ */ e(h, { ...a.props || {}, children: (d = a.children) == null ? void 0 : d.map((l) => /* @__PURE__ */ e(
|
|
74
|
+
ze,
|
|
76
75
|
{
|
|
77
|
-
node:
|
|
78
|
-
highlightId:
|
|
76
|
+
node: l,
|
|
77
|
+
highlightId: c,
|
|
79
78
|
onElementClick: n
|
|
80
79
|
},
|
|
81
|
-
|
|
80
|
+
l.id
|
|
82
81
|
)) })
|
|
83
82
|
}
|
|
84
83
|
);
|
|
85
84
|
}
|
|
86
|
-
function
|
|
87
|
-
return !a || a.length === 0 ? /* @__PURE__ */ e(
|
|
88
|
-
|
|
85
|
+
function qe({ tree: a, highlightId: c, onElementClick: n }) {
|
|
86
|
+
return !a || a.length === 0 ? /* @__PURE__ */ e(le, { description: "暂无设计稿内容" }) : /* @__PURE__ */ e("div", { className: "manuscript-renderer", children: a.map((h) => /* @__PURE__ */ e(
|
|
87
|
+
ze,
|
|
89
88
|
{
|
|
90
89
|
node: h,
|
|
91
|
-
highlightId:
|
|
90
|
+
highlightId: c,
|
|
92
91
|
onElementClick: n
|
|
93
92
|
},
|
|
94
93
|
h.id
|
|
95
94
|
)) });
|
|
96
95
|
}
|
|
97
|
-
const
|
|
96
|
+
const Fe = {
|
|
98
97
|
P0: "red",
|
|
99
98
|
P1: "orange",
|
|
100
99
|
P2: "blue"
|
|
101
100
|
};
|
|
102
|
-
function
|
|
101
|
+
function je({
|
|
103
102
|
caseData: a,
|
|
104
|
-
isHighlighted:
|
|
103
|
+
isHighlighted: c,
|
|
105
104
|
chainData: n,
|
|
106
105
|
onEdit: h,
|
|
107
|
-
onDelete:
|
|
106
|
+
onDelete: b,
|
|
108
107
|
onClick: d,
|
|
109
|
-
onEffectClick:
|
|
108
|
+
onEffectClick: l
|
|
110
109
|
}) {
|
|
111
|
-
const [_,
|
|
110
|
+
const [_, r] = p(!1), f = n != null && n.triggerInfo ? Ne(n.triggerInfo, {}) : null, N = n != null && n.crossPageEffects ? Ne(n.crossPageEffects, []) : [];
|
|
112
111
|
return /* @__PURE__ */ i(
|
|
113
112
|
"div",
|
|
114
113
|
{
|
|
115
|
-
className: `manuscript-case-card ${
|
|
114
|
+
className: `manuscript-case-card ${c ? "highlight" : ""}`,
|
|
116
115
|
onClick: () => d == null ? void 0 : d(a),
|
|
117
116
|
children: [
|
|
118
117
|
/* @__PURE__ */ i("div", { className: "case-card-header", onClick: (v) => {
|
|
119
|
-
v.stopPropagation(),
|
|
118
|
+
v.stopPropagation(), r(!_);
|
|
120
119
|
}, children: [
|
|
121
|
-
/* @__PURE__ */ i(
|
|
120
|
+
/* @__PURE__ */ i(oe, { children: [
|
|
122
121
|
/* @__PURE__ */ e("span", { className: "case-id", children: a.caseId }),
|
|
123
122
|
/* @__PURE__ */ e("span", { className: "case-title", children: a.title }),
|
|
124
|
-
/* @__PURE__ */ e(H, { color:
|
|
125
|
-
a.bizCode && /* @__PURE__ */ e(Be, { title: `因果链路: ${a.bizCode}`, children: /* @__PURE__ */ e(
|
|
123
|
+
/* @__PURE__ */ e(H, { color: Fe[a.priority] || "default", children: a.priority || "P1" }),
|
|
124
|
+
a.bizCode && /* @__PURE__ */ e(Be, { title: `因果链路: ${a.bizCode}`, children: /* @__PURE__ */ e(se, { style: { color: "#fa8c16" } }) })
|
|
126
125
|
] }),
|
|
127
126
|
/* @__PURE__ */ e(
|
|
128
|
-
|
|
127
|
+
O,
|
|
129
128
|
{
|
|
130
129
|
type: "text",
|
|
131
130
|
size: "small",
|
|
132
131
|
icon: _ ? /* @__PURE__ */ e(Ie, {}) : /* @__PURE__ */ e(Se, {}),
|
|
133
132
|
onClick: (v) => {
|
|
134
|
-
v.stopPropagation(),
|
|
133
|
+
v.stopPropagation(), r(!_);
|
|
135
134
|
}
|
|
136
135
|
}
|
|
137
136
|
)
|
|
@@ -139,7 +138,7 @@ function Je({
|
|
|
139
138
|
_ && /* @__PURE__ */ i("div", { className: "case-card-body", children: [
|
|
140
139
|
a.bizCode && /* @__PURE__ */ i("div", { className: "case-section", children: [
|
|
141
140
|
/* @__PURE__ */ i("div", { className: "case-section-title", children: [
|
|
142
|
-
/* @__PURE__ */ e(
|
|
141
|
+
/* @__PURE__ */ e(se, { style: { color: "#fa8c16" } }),
|
|
143
142
|
" 因果链路"
|
|
144
143
|
] }),
|
|
145
144
|
/* @__PURE__ */ i("div", { className: "causal-chain", children: [
|
|
@@ -150,12 +149,12 @@ function Je({
|
|
|
150
149
|
f.action
|
|
151
150
|
] })
|
|
152
151
|
] }),
|
|
153
|
-
/* @__PURE__ */ e("div", { className: "chain-effects", children: N.map((v,
|
|
152
|
+
/* @__PURE__ */ e("div", { className: "chain-effects", children: N.map((v, P) => /* @__PURE__ */ i(
|
|
154
153
|
"div",
|
|
155
154
|
{
|
|
156
155
|
className: "chain-effect-row",
|
|
157
|
-
onClick: (
|
|
158
|
-
|
|
156
|
+
onClick: ($) => {
|
|
157
|
+
$.stopPropagation(), l == null || l(v);
|
|
159
158
|
},
|
|
160
159
|
children: [
|
|
161
160
|
/* @__PURE__ */ e("span", { className: "chain-arrow", children: "→" }),
|
|
@@ -169,13 +168,13 @@ function Je({
|
|
|
169
168
|
/* @__PURE__ */ e(H, { style: { marginLeft: 8 }, children: v.delay })
|
|
170
169
|
]
|
|
171
170
|
},
|
|
172
|
-
|
|
171
|
+
P
|
|
173
172
|
)) })
|
|
174
173
|
] })
|
|
175
174
|
] }),
|
|
176
175
|
a.learningPath && a.learningPath.length > 0 && /* @__PURE__ */ i("div", { className: "case-section", children: [
|
|
177
176
|
/* @__PURE__ */ e("div", { className: "case-section-title", children: "📋 学习路径" }),
|
|
178
|
-
/* @__PURE__ */ e("ol", { className: "case-learning-path", children: a.learningPath.map((v,
|
|
177
|
+
/* @__PURE__ */ e("ol", { className: "case-learning-path", children: a.learningPath.map((v, P) => /* @__PURE__ */ e("li", { children: v }, P)) })
|
|
179
178
|
] }),
|
|
180
179
|
a.scene && /* @__PURE__ */ i("div", { className: "case-section", children: [
|
|
181
180
|
/* @__PURE__ */ e("div", { className: "case-section-title", children: "📍 起点场景" }),
|
|
@@ -187,7 +186,7 @@ function Je({
|
|
|
187
186
|
] }),
|
|
188
187
|
/* @__PURE__ */ i("div", { className: "case-card-actions", onClick: (v) => v.stopPropagation(), children: [
|
|
189
188
|
/* @__PURE__ */ e(
|
|
190
|
-
|
|
189
|
+
O,
|
|
191
190
|
{
|
|
192
191
|
size: "small",
|
|
193
192
|
icon: /* @__PURE__ */ e(Te, {}),
|
|
@@ -196,7 +195,7 @@ function Je({
|
|
|
196
195
|
}
|
|
197
196
|
),
|
|
198
197
|
/* @__PURE__ */ e(
|
|
199
|
-
|
|
198
|
+
O,
|
|
200
199
|
{
|
|
201
200
|
size: "small",
|
|
202
201
|
icon: /* @__PURE__ */ e(we, {}),
|
|
@@ -204,44 +203,44 @@ function Je({
|
|
|
204
203
|
children: "编辑"
|
|
205
204
|
}
|
|
206
205
|
),
|
|
207
|
-
/* @__PURE__ */ e(
|
|
206
|
+
/* @__PURE__ */ e(ye, { title: "确认删除此 case?", onConfirm: () => b == null ? void 0 : b(a), children: /* @__PURE__ */ e(O, { size: "small", danger: !0, icon: /* @__PURE__ */ e(ge, {}), children: "删除" }) })
|
|
208
207
|
] })
|
|
209
208
|
] })
|
|
210
209
|
]
|
|
211
210
|
}
|
|
212
211
|
);
|
|
213
212
|
}
|
|
214
|
-
function
|
|
215
|
-
if (!a) return
|
|
213
|
+
function Ne(a, c) {
|
|
214
|
+
if (!a) return c;
|
|
216
215
|
try {
|
|
217
216
|
return JSON.parse(a);
|
|
218
217
|
} catch {
|
|
219
|
-
return
|
|
218
|
+
return c;
|
|
220
219
|
}
|
|
221
220
|
}
|
|
222
|
-
function
|
|
221
|
+
function Ge({
|
|
223
222
|
open: a,
|
|
224
|
-
initialCase:
|
|
223
|
+
initialCase: c,
|
|
225
224
|
bizOptions: n = [],
|
|
226
225
|
designNodes: h = [],
|
|
227
|
-
onCancel:
|
|
226
|
+
onCancel: b,
|
|
228
227
|
onSubmit: d
|
|
229
228
|
}) {
|
|
230
|
-
const [
|
|
229
|
+
const [l] = D.useForm();
|
|
231
230
|
F(() => {
|
|
232
|
-
var
|
|
233
|
-
a && (
|
|
234
|
-
...
|
|
235
|
-
learningPathText: (
|
|
231
|
+
var r;
|
|
232
|
+
a && (c ? l.setFieldsValue({
|
|
233
|
+
...c,
|
|
234
|
+
learningPathText: (r = c.learningPath) == null ? void 0 : r.join(`
|
|
236
235
|
`)
|
|
237
|
-
}) :
|
|
238
|
-
}, [a,
|
|
236
|
+
}) : l.resetFields());
|
|
237
|
+
}, [a, c, l]);
|
|
239
238
|
const _ = async () => {
|
|
240
|
-
var
|
|
239
|
+
var r;
|
|
241
240
|
try {
|
|
242
|
-
const f = await
|
|
241
|
+
const f = await l.validateFields(), N = {
|
|
243
242
|
...f,
|
|
244
|
-
learningPath: ((
|
|
243
|
+
learningPath: ((r = f.learningPathText) == null ? void 0 : r.split(`
|
|
245
244
|
`).filter((v) => v.trim())) || []
|
|
246
245
|
};
|
|
247
246
|
delete N.learningPathText, d(N);
|
|
@@ -249,26 +248,26 @@ function We({
|
|
|
249
248
|
}
|
|
250
249
|
};
|
|
251
250
|
return /* @__PURE__ */ e(
|
|
252
|
-
|
|
251
|
+
X,
|
|
253
252
|
{
|
|
254
253
|
open: a,
|
|
255
|
-
title:
|
|
256
|
-
onCancel:
|
|
254
|
+
title: c ? `编辑 case: ${c.caseId}` : "新增 case",
|
|
255
|
+
onCancel: b,
|
|
257
256
|
onOk: _,
|
|
258
257
|
okText: "保存 (commit)",
|
|
259
258
|
destroyOnHidden: !0,
|
|
260
|
-
children: /* @__PURE__ */ i(D, { form:
|
|
261
|
-
/* @__PURE__ */ i(
|
|
262
|
-
/* @__PURE__ */ e(
|
|
259
|
+
children: /* @__PURE__ */ i(D, { form: l, layout: "vertical", children: [
|
|
260
|
+
/* @__PURE__ */ i(pe, { gutter: 16, children: [
|
|
261
|
+
/* @__PURE__ */ e(Z, { span: 12, children: /* @__PURE__ */ e(
|
|
263
262
|
D.Item,
|
|
264
263
|
{
|
|
265
264
|
name: "caseId",
|
|
266
265
|
label: "Case 编码",
|
|
267
266
|
rules: [{ required: !0, pattern: /^case\.\d+$/, message: "格式: case.NNN" }],
|
|
268
|
-
children: /* @__PURE__ */ e(
|
|
267
|
+
children: /* @__PURE__ */ e(ee, { placeholder: "case.001", disabled: !!c && !c._action })
|
|
269
268
|
}
|
|
270
269
|
) }),
|
|
271
|
-
/* @__PURE__ */ e(
|
|
270
|
+
/* @__PURE__ */ e(Z, { span: 12, children: /* @__PURE__ */ e(D.Item, { name: "title", label: "标题", rules: [{ required: !0 }], children: /* @__PURE__ */ e(ee, { placeholder: "新增组织 A" }) }) })
|
|
272
271
|
] }),
|
|
273
272
|
/* @__PURE__ */ e(
|
|
274
273
|
D.Item,
|
|
@@ -288,9 +287,9 @@ function We({
|
|
|
288
287
|
)
|
|
289
288
|
}
|
|
290
289
|
),
|
|
291
|
-
/* @__PURE__ */ e(D.Item, { name: "scene", label: "起点场景", children: /* @__PURE__ */ e(
|
|
290
|
+
/* @__PURE__ */ e(D.Item, { name: "scene", label: "起点场景", children: /* @__PURE__ */ e(ee.TextArea, { rows: 2, placeholder: "管理员进入 4A 中心 → 组织管理 → ..." }) }),
|
|
292
291
|
/* @__PURE__ */ e(D.Item, { name: "learningPathText", label: "学习路径 (每行一步)", children: /* @__PURE__ */ e(
|
|
293
|
-
|
|
292
|
+
ee.TextArea,
|
|
294
293
|
{
|
|
295
294
|
rows: 5,
|
|
296
295
|
placeholder: `1. 进入组织管理页
|
|
@@ -300,28 +299,28 @@ function We({
|
|
|
300
299
|
5. 观察 5 个页面联动`
|
|
301
300
|
}
|
|
302
301
|
) }),
|
|
303
|
-
/* @__PURE__ */ i(
|
|
304
|
-
/* @__PURE__ */ e(
|
|
302
|
+
/* @__PURE__ */ i(pe, { gutter: 16, children: [
|
|
303
|
+
/* @__PURE__ */ e(Z, { span: 8, children: /* @__PURE__ */ e(D.Item, { name: "priority", label: "优先级", initialValue: "P1", children: /* @__PURE__ */ e(q, { options: [
|
|
305
304
|
{ value: "P0", label: "P0 紧急" },
|
|
306
305
|
{ value: "P1", label: "P1 重要" },
|
|
307
306
|
{ value: "P2", label: "P2 一般" }
|
|
308
307
|
] }) }) }),
|
|
309
|
-
/* @__PURE__ */ e(
|
|
308
|
+
/* @__PURE__ */ e(Z, { span: 8, children: /* @__PURE__ */ e(D.Item, { name: "status", label: "状态", initialValue: "OPEN", children: /* @__PURE__ */ e(q, { options: [
|
|
310
309
|
{ value: "OPEN", label: "OPEN" },
|
|
311
310
|
{ value: "IN_PROGRESS", label: "IN_PROGRESS" },
|
|
312
311
|
{ value: "DONE", label: "DONE" },
|
|
313
312
|
{ value: "ARCHIVED", label: "ARCHIVED" }
|
|
314
313
|
] }) }) }),
|
|
315
|
-
/* @__PURE__ */ e(
|
|
314
|
+
/* @__PURE__ */ e(Z, { span: 8, children: /* @__PURE__ */ e(D.Item, { name: "hotspotSelector", label: "关联设计稿元素", children: /* @__PURE__ */ e(
|
|
316
315
|
q,
|
|
317
316
|
{
|
|
318
317
|
allowClear: !0,
|
|
319
318
|
placeholder: "选择 design node",
|
|
320
319
|
showSearch: !0,
|
|
321
320
|
optionFilterProp: "label",
|
|
322
|
-
options: h.map((
|
|
323
|
-
value:
|
|
324
|
-
label: `${
|
|
321
|
+
options: h.map((r) => ({
|
|
322
|
+
value: r.id,
|
|
323
|
+
label: `${r.type} #${r.id}`
|
|
325
324
|
}))
|
|
326
325
|
}
|
|
327
326
|
) }) })
|
|
@@ -330,197 +329,197 @@ function We({
|
|
|
330
329
|
}
|
|
331
330
|
);
|
|
332
331
|
}
|
|
333
|
-
const
|
|
334
|
-
|
|
332
|
+
const k = _e.create({ baseURL: "/api", timeout: 15e3 });
|
|
333
|
+
k.interceptors.response.use(
|
|
335
334
|
(a) => a.data,
|
|
336
335
|
(a) => (console.error("[ManuscriptView]", a), Promise.reject(a))
|
|
337
336
|
);
|
|
338
|
-
function
|
|
339
|
-
const [n, h] =
|
|
340
|
-
|
|
337
|
+
function Ve({ productCode: a, pageCode: c }) {
|
|
338
|
+
const [n, h] = p(null), [b, d] = p(null), [l, _] = p([]), [r, f] = p([]), [N, v] = p([]), [P, $] = p("main"), [K, w] = p(null), [G, A] = p(null), [R, E] = p(!1), [S, T] = p(null), [x, V] = p(!1), [te, B] = p(!1), [U, Y] = p(""), [u, o] = p(!1), s = re(async () => {
|
|
339
|
+
o(!0);
|
|
341
340
|
try {
|
|
342
|
-
const [m, g,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
341
|
+
const [m, g, z, I, ue] = await Promise.all([
|
|
342
|
+
k.get("/product/manuscript/product", { params: { productCode: a, pageCode: c } }),
|
|
343
|
+
k.get("/product/manuscript/design", { params: { productCode: a, pageCode: c } }),
|
|
344
|
+
k.get("/product/biz-understanding/list", { params: { productCode: a } }),
|
|
345
|
+
k.get("/product/manuscript/history", {
|
|
347
346
|
params: {
|
|
348
347
|
productCode: a,
|
|
349
|
-
pageCode:
|
|
350
|
-
branch:
|
|
348
|
+
pageCode: c,
|
|
349
|
+
branch: P,
|
|
351
350
|
limit: 20
|
|
352
351
|
}
|
|
353
352
|
}),
|
|
354
|
-
|
|
353
|
+
k.get("/product/manuscript/branches", { params: { productCode: a, pageCode: c } })
|
|
355
354
|
]);
|
|
356
|
-
h(m == null ? void 0 : m.data), d(g == null ? void 0 : g.data), _((
|
|
355
|
+
h(m == null ? void 0 : m.data), d(g == null ? void 0 : g.data), _((z == null ? void 0 : z.data) || []), f((I == null ? void 0 : I.data) || []), v((ue == null ? void 0 : ue.data) || []);
|
|
357
356
|
} catch (m) {
|
|
358
357
|
console.error("loadAll 失败:", m);
|
|
359
358
|
} finally {
|
|
360
|
-
|
|
359
|
+
o(!1);
|
|
361
360
|
}
|
|
362
|
-
}, [a,
|
|
361
|
+
}, [a, c, P]);
|
|
363
362
|
F(() => {
|
|
364
|
-
|
|
365
|
-
}, [
|
|
366
|
-
const
|
|
363
|
+
s();
|
|
364
|
+
}, [s]);
|
|
365
|
+
const y = ne(() => {
|
|
367
366
|
if (!(n != null && n.cases)) return [];
|
|
368
367
|
try {
|
|
369
368
|
return JSON.parse(n.cases);
|
|
370
369
|
} catch {
|
|
371
370
|
return [];
|
|
372
371
|
}
|
|
373
|
-
}, [n]),
|
|
374
|
-
if (!(
|
|
372
|
+
}, [n]), J = ne(() => {
|
|
373
|
+
if (!(b != null && b.renderTree)) return [];
|
|
375
374
|
try {
|
|
376
|
-
return JSON.parse(
|
|
375
|
+
return JSON.parse(b.renderTree);
|
|
377
376
|
} catch {
|
|
378
377
|
return [];
|
|
379
378
|
}
|
|
380
|
-
}, [
|
|
379
|
+
}, [b]), L = ne(() => {
|
|
381
380
|
const m = [];
|
|
382
|
-
function g(
|
|
383
|
-
for (const I of
|
|
381
|
+
function g(z) {
|
|
382
|
+
for (const I of z || [])
|
|
384
383
|
I.id && m.push({ id: I.id, type: I.type }), I.children && g(I.children);
|
|
385
384
|
}
|
|
386
|
-
return g(
|
|
387
|
-
}, [
|
|
385
|
+
return g(J), m;
|
|
386
|
+
}, [J]), Q = ne(() => {
|
|
388
387
|
const m = {};
|
|
389
|
-
for (const g of
|
|
388
|
+
for (const g of l) m[g.bizCode] = g;
|
|
390
389
|
return m;
|
|
391
|
-
}, [
|
|
392
|
-
() =>
|
|
393
|
-
[
|
|
394
|
-
),
|
|
395
|
-
w(m.caseId),
|
|
396
|
-
w(null),
|
|
390
|
+
}, [l]), ae = ne(
|
|
391
|
+
() => l.map((m) => ({ value: m.bizCode, label: `${m.bizCode} — ${m.title}` })),
|
|
392
|
+
[l]
|
|
393
|
+
), de = (m) => {
|
|
394
|
+
w(m.caseId), A(m.hotspotSelector || null), setTimeout(() => {
|
|
395
|
+
w(null), A(null);
|
|
397
396
|
}, 3e3);
|
|
398
|
-
},
|
|
397
|
+
}, ce = (m) => {
|
|
399
398
|
if (!m.id) return;
|
|
400
|
-
|
|
401
|
-
const g =
|
|
399
|
+
A(m.id);
|
|
400
|
+
const g = y.find((z) => z.hotspotSelector === m.id);
|
|
402
401
|
g && w(g.caseId), setTimeout(() => {
|
|
403
|
-
w(null),
|
|
402
|
+
w(null), A(null);
|
|
404
403
|
}, 3e3);
|
|
405
|
-
},
|
|
406
|
-
const g =
|
|
404
|
+
}, me = (m) => {
|
|
405
|
+
const g = y.find((z) => z.bizCode);
|
|
407
406
|
g && (w(g.caseId), setTimeout(() => w(null), 3e3));
|
|
408
|
-
},
|
|
409
|
-
const g = (
|
|
407
|
+
}, M = async (m) => {
|
|
408
|
+
const g = (S == null ? void 0 : S._action) === "duplicate" || !S, z = (S == null ? void 0 : S._action) === "duplicate";
|
|
410
409
|
try {
|
|
411
|
-
if (g ||
|
|
412
|
-
const I =
|
|
413
|
-
await
|
|
410
|
+
if (g || z) {
|
|
411
|
+
const I = z ? { ...m, caseId: he(), title: m.title + " (副本)" } : m;
|
|
412
|
+
await k.post("/product/manuscript/case", {
|
|
414
413
|
productCode: a,
|
|
415
|
-
pageCode:
|
|
414
|
+
pageCode: c,
|
|
416
415
|
author: "admin",
|
|
417
416
|
caseData: I
|
|
418
417
|
});
|
|
419
418
|
} else
|
|
420
|
-
await
|
|
419
|
+
await k.put("/product/manuscript/case", {
|
|
421
420
|
productCode: a,
|
|
422
|
-
pageCode:
|
|
421
|
+
pageCode: c,
|
|
423
422
|
author: "admin",
|
|
424
|
-
originalCaseId:
|
|
423
|
+
originalCaseId: S.caseId,
|
|
425
424
|
caseData: m
|
|
426
425
|
});
|
|
427
|
-
|
|
426
|
+
E(!1), T(null), await s();
|
|
428
427
|
} catch (I) {
|
|
429
|
-
|
|
428
|
+
X.error({ title: "保存失败", content: I == null ? void 0 : I.message });
|
|
430
429
|
}
|
|
431
|
-
},
|
|
430
|
+
}, ie = async (m) => {
|
|
432
431
|
try {
|
|
433
|
-
await
|
|
434
|
-
params: { productCode: a, pageCode:
|
|
435
|
-
}), await
|
|
432
|
+
await k.delete("/product/manuscript/case", {
|
|
433
|
+
params: { productCode: a, pageCode: c, caseId: m.caseId, author: "admin" }
|
|
434
|
+
}), await s();
|
|
436
435
|
} catch (g) {
|
|
437
|
-
|
|
436
|
+
X.error({ title: "删除失败", content: g == null ? void 0 : g.message });
|
|
438
437
|
}
|
|
439
|
-
},
|
|
440
|
-
const m =
|
|
438
|
+
}, he = () => {
|
|
439
|
+
const m = y.map((z) => parseInt((z.caseId || "case.0").split(".")[1] || "0")).filter((z) => !isNaN(z)), g = m.length > 0 ? Math.max(...m) : 0;
|
|
441
440
|
return `case.${String(g + 1).padStart(3, "0")}`;
|
|
442
|
-
},
|
|
443
|
-
|
|
441
|
+
}, Ce = async (m) => {
|
|
442
|
+
$(m);
|
|
444
443
|
}, Pe = async () => {
|
|
445
444
|
var m;
|
|
446
|
-
if (
|
|
445
|
+
if (U.trim())
|
|
447
446
|
try {
|
|
448
|
-
const g = (m = N.find((
|
|
449
|
-
await
|
|
447
|
+
const g = (m = N.find((z) => z.branch === P)) == null ? void 0 : m.headSha;
|
|
448
|
+
await k.post("/product/manuscript/branch", {
|
|
450
449
|
productCode: a,
|
|
451
|
-
pageCode:
|
|
452
|
-
branch:
|
|
450
|
+
pageCode: c,
|
|
451
|
+
branch: U,
|
|
453
452
|
fromSha: g
|
|
454
|
-
}),
|
|
453
|
+
}), B(!1), Y(""), await s(), $(U);
|
|
455
454
|
} catch (g) {
|
|
456
|
-
|
|
455
|
+
X.error({ title: "创建分支失败", content: g == null ? void 0 : g.message });
|
|
457
456
|
}
|
|
458
457
|
};
|
|
459
|
-
return
|
|
458
|
+
return u && !n && !b ? /* @__PURE__ */ i("div", { style: { textAlign: "center", padding: 40 }, children: [
|
|
460
459
|
/* @__PURE__ */ e(Ue, {}),
|
|
461
460
|
" 加载中..."
|
|
462
461
|
] }) : /* @__PURE__ */ i("div", { className: "manuscript-view", children: [
|
|
463
|
-
/* @__PURE__ */ e("div", { className: "manuscript-toolbar", children: /* @__PURE__ */ i(
|
|
462
|
+
/* @__PURE__ */ e("div", { className: "manuscript-toolbar", children: /* @__PURE__ */ i(oe, { children: [
|
|
464
463
|
/* @__PURE__ */ e(Ae, {}),
|
|
465
464
|
/* @__PURE__ */ e("span", { children: "分支:" }),
|
|
466
465
|
/* @__PURE__ */ e(
|
|
467
466
|
q,
|
|
468
467
|
{
|
|
469
|
-
value:
|
|
470
|
-
onChange:
|
|
468
|
+
value: P,
|
|
469
|
+
onChange: Ce,
|
|
471
470
|
style: { minWidth: 120 },
|
|
472
471
|
options: N.map((m) => ({ value: m.branch, label: m.branch }))
|
|
473
472
|
}
|
|
474
473
|
),
|
|
475
|
-
/* @__PURE__ */ e(
|
|
474
|
+
/* @__PURE__ */ e(O, { size: "small", onClick: () => B(!0), children: "新分支" }),
|
|
476
475
|
/* @__PURE__ */ i(
|
|
477
|
-
|
|
476
|
+
O,
|
|
478
477
|
{
|
|
479
478
|
size: "small",
|
|
480
479
|
icon: /* @__PURE__ */ e(Ee, {}),
|
|
481
|
-
onClick: () =>
|
|
480
|
+
onClick: () => V(!0),
|
|
482
481
|
children: [
|
|
483
482
|
"历史 (",
|
|
484
|
-
|
|
483
|
+
r.length,
|
|
485
484
|
")"
|
|
486
485
|
]
|
|
487
486
|
}
|
|
488
487
|
),
|
|
489
|
-
/* @__PURE__ */ e(
|
|
488
|
+
/* @__PURE__ */ e(O, { size: "small", icon: /* @__PURE__ */ e(xe, {}), onClick: s, children: "刷新" })
|
|
490
489
|
] }) }),
|
|
491
490
|
/* @__PURE__ */ i("div", { className: "manuscript-layout", children: [
|
|
492
491
|
/* @__PURE__ */ i("div", { className: "manuscript-left", children: [
|
|
493
492
|
/* @__PURE__ */ i("div", { className: "case-list-header", children: [
|
|
494
493
|
/* @__PURE__ */ i("h3", { children: [
|
|
495
494
|
"📋 产品稿件 / ",
|
|
496
|
-
|
|
495
|
+
y.length,
|
|
497
496
|
" 条 case",
|
|
498
497
|
(n == null ? void 0 : n.title) && /* @__PURE__ */ e("small", { style: { marginLeft: 8, color: "#888" }, children: n.title })
|
|
499
498
|
] }),
|
|
500
499
|
/* @__PURE__ */ e(
|
|
501
|
-
|
|
500
|
+
O,
|
|
502
501
|
{
|
|
503
502
|
type: "primary",
|
|
504
503
|
icon: /* @__PURE__ */ e(j, {}),
|
|
505
504
|
onClick: () => {
|
|
506
|
-
|
|
505
|
+
T(null), E(!0);
|
|
507
506
|
},
|
|
508
507
|
children: "新增 case"
|
|
509
508
|
}
|
|
510
509
|
)
|
|
511
510
|
] }),
|
|
512
|
-
/* @__PURE__ */ e("div", { className: "case-list", children:
|
|
513
|
-
|
|
511
|
+
/* @__PURE__ */ e("div", { className: "case-list", children: y.length === 0 ? /* @__PURE__ */ e(le, { description: "暂无 case, 点击 [新增 case] 开始" }) : y.map((m) => /* @__PURE__ */ e(
|
|
512
|
+
je,
|
|
514
513
|
{
|
|
515
514
|
caseData: m,
|
|
516
|
-
isHighlighted:
|
|
517
|
-
chainData: m.bizCode ?
|
|
515
|
+
isHighlighted: K === m.caseId,
|
|
516
|
+
chainData: m.bizCode ? Q[m.bizCode] : null,
|
|
518
517
|
onEdit: (g) => {
|
|
519
|
-
|
|
518
|
+
T(g), E(!0);
|
|
520
519
|
},
|
|
521
|
-
onDelete:
|
|
522
|
-
onClick:
|
|
523
|
-
onEffectClick:
|
|
520
|
+
onDelete: ie,
|
|
521
|
+
onClick: de,
|
|
522
|
+
onEffectClick: me
|
|
524
523
|
},
|
|
525
524
|
m.caseId
|
|
526
525
|
)) })
|
|
@@ -529,44 +528,44 @@ function Ke({ productCode: a, pageCode: r }) {
|
|
|
529
528
|
/* @__PURE__ */ i("div", { className: "design-header", children: [
|
|
530
529
|
/* @__PURE__ */ i("h3", { children: [
|
|
531
530
|
"🎨 设计稿件",
|
|
532
|
-
(
|
|
531
|
+
(b == null ? void 0 : b.title) && /* @__PURE__ */ e("small", { style: { marginLeft: 8, color: "#888" }, children: b.title })
|
|
533
532
|
] }),
|
|
534
533
|
/* @__PURE__ */ i("span", { style: { color: "#888", fontSize: 12 }, children: [
|
|
535
|
-
|
|
534
|
+
L.length,
|
|
536
535
|
" 个节点"
|
|
537
536
|
] })
|
|
538
537
|
] }),
|
|
539
538
|
/* @__PURE__ */ e("div", { className: "design-canvas", children: /* @__PURE__ */ e(
|
|
540
|
-
|
|
539
|
+
qe,
|
|
541
540
|
{
|
|
542
|
-
tree:
|
|
543
|
-
highlightId:
|
|
544
|
-
onElementClick:
|
|
541
|
+
tree: J,
|
|
542
|
+
highlightId: G,
|
|
543
|
+
onElementClick: ce
|
|
545
544
|
}
|
|
546
545
|
) })
|
|
547
546
|
] })
|
|
548
547
|
] }),
|
|
549
548
|
/* @__PURE__ */ e(
|
|
550
|
-
|
|
549
|
+
Ge,
|
|
551
550
|
{
|
|
552
|
-
open:
|
|
553
|
-
initialCase:
|
|
554
|
-
bizOptions:
|
|
555
|
-
designNodes:
|
|
551
|
+
open: R,
|
|
552
|
+
initialCase: S,
|
|
553
|
+
bizOptions: ae,
|
|
554
|
+
designNodes: L,
|
|
556
555
|
onCancel: () => {
|
|
557
|
-
|
|
556
|
+
E(!1), T(null);
|
|
558
557
|
},
|
|
559
|
-
onSubmit:
|
|
558
|
+
onSubmit: M
|
|
560
559
|
}
|
|
561
560
|
),
|
|
562
561
|
/* @__PURE__ */ e(
|
|
563
|
-
|
|
562
|
+
X,
|
|
564
563
|
{
|
|
565
|
-
open:
|
|
566
|
-
title: `commit 历史 (${
|
|
567
|
-
onCancel: () =>
|
|
564
|
+
open: x,
|
|
565
|
+
title: `commit 历史 (${P} 分支)`,
|
|
566
|
+
onCancel: () => V(!1),
|
|
568
567
|
footer: null,
|
|
569
|
-
children: /* @__PURE__ */ e("div", { className: "commit-history", children:
|
|
568
|
+
children: /* @__PURE__ */ e("div", { className: "commit-history", children: r.length === 0 ? /* @__PURE__ */ e(le, { description: "暂无 commit 记录" }) : r.map((m) => /* @__PURE__ */ i("div", { className: "commit-row", children: [
|
|
570
569
|
/* @__PURE__ */ e("div", { className: "commit-sha", children: /* @__PURE__ */ e(H, { color: "purple", children: m.sha.substring(0, 8) }) }),
|
|
571
570
|
/* @__PURE__ */ i("div", { className: "commit-msg", children: [
|
|
572
571
|
/* @__PURE__ */ i("div", { children: [
|
|
@@ -584,11 +583,11 @@ function Ke({ productCode: a, pageCode: r }) {
|
|
|
584
583
|
}
|
|
585
584
|
),
|
|
586
585
|
/* @__PURE__ */ e(
|
|
587
|
-
|
|
586
|
+
X,
|
|
588
587
|
{
|
|
589
|
-
open:
|
|
588
|
+
open: te,
|
|
590
589
|
title: "新建分支",
|
|
591
|
-
onCancel: () =>
|
|
590
|
+
onCancel: () => B(!1),
|
|
592
591
|
onOk: Pe,
|
|
593
592
|
okText: "创建",
|
|
594
593
|
children: /* @__PURE__ */ i("div", { style: { padding: "12px 0" }, children: [
|
|
@@ -596,7 +595,7 @@ function Ke({ productCode: a, pageCode: r }) {
|
|
|
596
595
|
/* @__PURE__ */ e(
|
|
597
596
|
"input",
|
|
598
597
|
{
|
|
599
|
-
value:
|
|
598
|
+
value: U,
|
|
600
599
|
onChange: (m) => Y(m.target.value),
|
|
601
600
|
placeholder: "feature-xxx",
|
|
602
601
|
style: { padding: "4px 8px", border: "1px solid #d9d9d9", borderRadius: 4, width: 200 }
|
|
@@ -604,7 +603,7 @@ function Ke({ productCode: a, pageCode: r }) {
|
|
|
604
603
|
),
|
|
605
604
|
/* @__PURE__ */ i("div", { style: { marginTop: 8, color: "#888", fontSize: 12 }, children: [
|
|
606
605
|
"从当前分支 (",
|
|
607
|
-
/* @__PURE__ */ e("code", { children:
|
|
606
|
+
/* @__PURE__ */ e("code", { children: P }),
|
|
608
607
|
") 的 HEAD fork"
|
|
609
608
|
] })
|
|
610
609
|
] })
|
|
@@ -612,115 +611,115 @@ function Ke({ productCode: a, pageCode: r }) {
|
|
|
612
611
|
)
|
|
613
612
|
] });
|
|
614
613
|
}
|
|
615
|
-
const
|
|
616
|
-
container:
|
|
617
|
-
sidebar:
|
|
618
|
-
sidebarHeader:
|
|
619
|
-
productList:
|
|
620
|
-
productItem:
|
|
621
|
-
productItemActive:
|
|
622
|
-
productItemName:
|
|
623
|
-
productItemCode:
|
|
624
|
-
productItemStatus:
|
|
625
|
-
emptyHint:
|
|
626
|
-
main:
|
|
627
|
-
productHeader:
|
|
628
|
-
productTitle:
|
|
629
|
-
productCode:
|
|
630
|
-
tabBar:
|
|
631
|
-
tab:
|
|
632
|
-
tabActive:
|
|
633
|
-
tabContent:
|
|
634
|
-
formGroup:
|
|
635
|
-
formLabel:
|
|
636
|
-
formInput:
|
|
637
|
-
formTextarea:
|
|
638
|
-
designGrid:
|
|
639
|
-
designCard:
|
|
640
|
-
designImage:
|
|
641
|
-
designInfo:
|
|
642
|
-
designName:
|
|
643
|
-
designDesc:
|
|
644
|
-
designActions:
|
|
645
|
-
designLink:
|
|
646
|
-
table:
|
|
647
|
-
empty:
|
|
648
|
-
btn:
|
|
649
|
-
btnPrimary:
|
|
650
|
-
btnDanger:
|
|
651
|
-
toolbar:
|
|
652
|
-
priority:
|
|
653
|
-
priorityP0:
|
|
654
|
-
priorityP1:
|
|
655
|
-
priorityP2:
|
|
656
|
-
priorityP3:
|
|
657
|
-
status:
|
|
658
|
-
statusActive:
|
|
659
|
-
statusDone:
|
|
660
|
-
featureNo:
|
|
661
|
-
spinner:
|
|
662
|
-
modal:
|
|
663
|
-
modalBody:
|
|
664
|
-
modalTitle:
|
|
665
|
-
modalActions:
|
|
666
|
-
bizLayout:
|
|
667
|
-
bizList:
|
|
668
|
-
bizFilter:
|
|
669
|
-
bizFilterHint:
|
|
670
|
-
bizListHeader:
|
|
671
|
-
bizItem:
|
|
672
|
-
bizItemActive:
|
|
673
|
-
bizItemHeader:
|
|
674
|
-
bizItemTitle:
|
|
675
|
-
bizItemStatus:
|
|
676
|
-
bizItemSummary:
|
|
677
|
-
bizItemMeta:
|
|
678
|
-
bizItemDot:
|
|
679
|
-
bizDetail:
|
|
680
|
-
bizDetailHeader:
|
|
681
|
-
bizDetailTitle:
|
|
682
|
-
bizDetailCode:
|
|
683
|
-
bizSection:
|
|
684
|
-
bizSectionTitle:
|
|
685
|
-
bizTriggerCard:
|
|
686
|
-
bizEffects:
|
|
687
|
-
bizEffectCard:
|
|
688
|
-
bizEffectPage:
|
|
689
|
-
bizEffectArrow:
|
|
690
|
-
bizEffectPageCode:
|
|
691
|
-
bizEffectDelay:
|
|
692
|
-
bizEffectType:
|
|
693
|
-
bizEffectDesc:
|
|
694
|
-
bizStory:
|
|
695
|
-
chatLayout:
|
|
696
|
-
chatHeader:
|
|
697
|
-
chatSessionSelect:
|
|
698
|
-
chatHint:
|
|
699
|
-
chatBody:
|
|
700
|
-
chatEmpty:
|
|
701
|
-
msgRow:
|
|
702
|
-
msgRowUser:
|
|
703
|
-
bubble:
|
|
704
|
-
bubbleUser:
|
|
705
|
-
bubbleAssistant:
|
|
706
|
-
streamingCursor:
|
|
707
|
-
proposalCard:
|
|
708
|
-
proposalHead:
|
|
709
|
-
proposalBadge:
|
|
710
|
-
proposalType:
|
|
711
|
-
proposalActions:
|
|
712
|
-
proposalAccepted:
|
|
713
|
-
proposalRejected:
|
|
714
|
-
proposalPreview:
|
|
715
|
-
chatError:
|
|
716
|
-
chatInputRow:
|
|
717
|
-
chatTextarea:
|
|
718
|
-
},
|
|
719
|
-
|
|
614
|
+
const Je = "_container_1c2b1_6", We = "_sidebar_1c2b1_15", Xe = "_sidebarHeader_1c2b1_25", Ke = "_productList_1c2b1_37", Ye = "_productItem_1c2b1_43", Qe = "_productItemActive_1c2b1_57", Ze = "_productItemName_1c2b1_62", et = "_productItemCode_1c2b1_68", tt = "_productItemStatus_1c2b1_73", at = "_emptyHint_1c2b1_84", it = "_main_1c2b1_92", nt = "_productHeader_1c2b1_100", st = "_productTitle_1c2b1_109", ct = "_productCode_1c2b1_115", rt = "_tabBar_1c2b1_122", lt = "_tab_1c2b1_122", ot = "_tabActive_1c2b1_142", dt = "_tabContent_1c2b1_148", mt = "_formGroup_1c2b1_155", ht = "_formLabel_1c2b1_163", ut = "_formInput_1c2b1_171", pt = "_formTextarea_1c2b1_172", bt = "_designGrid_1c2b1_189", gt = "_designCard_1c2b1_195", _t = "_designImage_1c2b1_202", ft = "_designInfo_1c2b1_209", Nt = "_designName_1c2b1_213", vt = "_designDesc_1c2b1_220", yt = "_designActions_1c2b1_225", zt = "_designLink_1c2b1_233", Ct = "_table_1c2b1_244", Pt = "_empty_1c2b1_84", It = "_btn_1c2b1_284", St = "_btnPrimary_1c2b1_300", $t = "_btnDanger_1c2b1_311", Tt = "_toolbar_1c2b1_321", wt = "_priority_1c2b1_329", At = "_priorityP0_1c2b1_337", Et = "_priorityP1_1c2b1_342", xt = "_priorityP2_1c2b1_347", Dt = "_priorityP3_1c2b1_352", kt = "_status_1c2b1_357", Rt = "_statusActive_1c2b1_367", Lt = "_statusDone_1c2b1_372", Ht = "_featureNo_1c2b1_377", Ot = "_spinner_1c2b1_386", Bt = "_modal_1c2b1_394", Ut = "_modalBody_1c2b1_404", Mt = "_modalTitle_1c2b1_413", qt = "_modalActions_1c2b1_420", Ft = "_bizLayout_1c2b1_430", jt = "_bizList_1c2b1_437", Gt = "_bizFilter_1c2b1_448", Vt = "_bizFilterHint_1c2b1_454", Jt = "_bizListHeader_1c2b1_459", Wt = "_bizItem_1c2b1_467", Xt = "_bizItemActive_1c2b1_481", Kt = "_bizItemHeader_1c2b1_487", Yt = "_bizItemTitle_1c2b1_494", Qt = "_bizItemStatus_1c2b1_504", Zt = "_bizItemSummary_1c2b1_512", ea = "_bizItemMeta_1c2b1_522", ta = "_bizItemDot_1c2b1_527", aa = "_bizDetail_1c2b1_531", ia = "_bizDetailHeader_1c2b1_537", na = "_bizDetailTitle_1c2b1_543", sa = "_bizDetailCode_1c2b1_550", ca = "_bizSection_1c2b1_556", ra = "_bizSectionTitle_1c2b1_560", la = "_bizTriggerCard_1c2b1_570", oa = "_bizEffects_1c2b1_580", da = "_bizEffectCard_1c2b1_586", ma = "_bizEffectPage_1c2b1_595", ha = "_bizEffectArrow_1c2b1_602", ua = "_bizEffectPageCode_1c2b1_608", pa = "_bizEffectDelay_1c2b1_618", ba = "_bizEffectType_1c2b1_626", ga = "_bizEffectDesc_1c2b1_633", _a = "_bizStory_1c2b1_638", fa = "_chatLayout_1c2b1_657", Na = "_chatHeader_1c2b1_666", va = "_chatSessionSelect_1c2b1_673", ya = "_chatHint_1c2b1_683", za = "_chatBody_1c2b1_689", Ca = "_chatEmpty_1c2b1_699", Pa = "_msgRow_1c2b1_707", Ia = "_msgRowUser_1c2b1_714", Sa = "_bubble_1c2b1_718", $a = "_bubbleUser_1c2b1_728", Ta = "_bubbleAssistant_1c2b1_734", wa = "_streamingCursor_1c2b1_741", Aa = "_proposalCard_1c2b1_752", Ea = "_proposalHead_1c2b1_764", xa = "_proposalBadge_1c2b1_771", Da = "_proposalType_1c2b1_779", ka = "_proposalActions_1c2b1_785", Ra = "_proposalAccepted_1c2b1_791", La = "_proposalRejected_1c2b1_797", Ha = "_proposalPreview_1c2b1_803", Oa = "_chatError_1c2b1_813", Ba = "_chatInputRow_1c2b1_822", Ua = "_chatTextarea_1c2b1_828", t = {
|
|
615
|
+
container: Je,
|
|
616
|
+
sidebar: We,
|
|
617
|
+
sidebarHeader: Xe,
|
|
618
|
+
productList: Ke,
|
|
619
|
+
productItem: Ye,
|
|
620
|
+
productItemActive: Qe,
|
|
621
|
+
productItemName: Ze,
|
|
622
|
+
productItemCode: et,
|
|
623
|
+
productItemStatus: tt,
|
|
624
|
+
emptyHint: at,
|
|
625
|
+
main: it,
|
|
626
|
+
productHeader: nt,
|
|
627
|
+
productTitle: st,
|
|
628
|
+
productCode: ct,
|
|
629
|
+
tabBar: rt,
|
|
630
|
+
tab: lt,
|
|
631
|
+
tabActive: ot,
|
|
632
|
+
tabContent: dt,
|
|
633
|
+
formGroup: mt,
|
|
634
|
+
formLabel: ht,
|
|
635
|
+
formInput: ut,
|
|
636
|
+
formTextarea: pt,
|
|
637
|
+
designGrid: bt,
|
|
638
|
+
designCard: gt,
|
|
639
|
+
designImage: _t,
|
|
640
|
+
designInfo: ft,
|
|
641
|
+
designName: Nt,
|
|
642
|
+
designDesc: vt,
|
|
643
|
+
designActions: yt,
|
|
644
|
+
designLink: zt,
|
|
645
|
+
table: Ct,
|
|
646
|
+
empty: Pt,
|
|
647
|
+
btn: It,
|
|
648
|
+
btnPrimary: St,
|
|
649
|
+
btnDanger: $t,
|
|
650
|
+
toolbar: Tt,
|
|
651
|
+
priority: wt,
|
|
652
|
+
priorityP0: At,
|
|
653
|
+
priorityP1: Et,
|
|
654
|
+
priorityP2: xt,
|
|
655
|
+
priorityP3: Dt,
|
|
656
|
+
status: kt,
|
|
657
|
+
statusActive: Rt,
|
|
658
|
+
statusDone: Lt,
|
|
659
|
+
featureNo: Ht,
|
|
660
|
+
spinner: Ot,
|
|
661
|
+
modal: Bt,
|
|
662
|
+
modalBody: Ut,
|
|
663
|
+
modalTitle: Mt,
|
|
664
|
+
modalActions: qt,
|
|
665
|
+
bizLayout: Ft,
|
|
666
|
+
bizList: jt,
|
|
667
|
+
bizFilter: Gt,
|
|
668
|
+
bizFilterHint: Vt,
|
|
669
|
+
bizListHeader: Jt,
|
|
670
|
+
bizItem: Wt,
|
|
671
|
+
bizItemActive: Xt,
|
|
672
|
+
bizItemHeader: Kt,
|
|
673
|
+
bizItemTitle: Yt,
|
|
674
|
+
bizItemStatus: Qt,
|
|
675
|
+
bizItemSummary: Zt,
|
|
676
|
+
bizItemMeta: ea,
|
|
677
|
+
bizItemDot: ta,
|
|
678
|
+
bizDetail: aa,
|
|
679
|
+
bizDetailHeader: ia,
|
|
680
|
+
bizDetailTitle: na,
|
|
681
|
+
bizDetailCode: sa,
|
|
682
|
+
bizSection: ca,
|
|
683
|
+
bizSectionTitle: ra,
|
|
684
|
+
bizTriggerCard: la,
|
|
685
|
+
bizEffects: oa,
|
|
686
|
+
bizEffectCard: da,
|
|
687
|
+
bizEffectPage: ma,
|
|
688
|
+
bizEffectArrow: ha,
|
|
689
|
+
bizEffectPageCode: ua,
|
|
690
|
+
bizEffectDelay: pa,
|
|
691
|
+
bizEffectType: ba,
|
|
692
|
+
bizEffectDesc: ga,
|
|
693
|
+
bizStory: _a,
|
|
694
|
+
chatLayout: fa,
|
|
695
|
+
chatHeader: Na,
|
|
696
|
+
chatSessionSelect: va,
|
|
697
|
+
chatHint: ya,
|
|
698
|
+
chatBody: za,
|
|
699
|
+
chatEmpty: Ca,
|
|
700
|
+
msgRow: Pa,
|
|
701
|
+
msgRowUser: Ia,
|
|
702
|
+
bubble: Sa,
|
|
703
|
+
bubbleUser: $a,
|
|
704
|
+
bubbleAssistant: Ta,
|
|
705
|
+
streamingCursor: wa,
|
|
706
|
+
proposalCard: Aa,
|
|
707
|
+
proposalHead: Ea,
|
|
708
|
+
proposalBadge: xa,
|
|
709
|
+
proposalType: Da,
|
|
710
|
+
proposalActions: ka,
|
|
711
|
+
proposalAccepted: Ra,
|
|
712
|
+
proposalRejected: La,
|
|
713
|
+
proposalPreview: Ha,
|
|
714
|
+
chatError: Oa,
|
|
715
|
+
chatInputRow: Ba,
|
|
716
|
+
chatTextarea: Ua
|
|
717
|
+
}, W = _e.create({ baseURL: "/api", timeout: 3e4 });
|
|
718
|
+
W.interceptors.response.use(
|
|
720
719
|
(a) => a.data,
|
|
721
720
|
(a) => (console.error("[ProductChat] request failed", a), Promise.reject(a))
|
|
722
721
|
);
|
|
723
|
-
const
|
|
722
|
+
const Ma = {
|
|
724
723
|
name: "产品名称",
|
|
725
724
|
vision: "产品愿景",
|
|
726
725
|
target_users: "目标用户",
|
|
@@ -732,162 +731,162 @@ const ja = {
|
|
|
732
731
|
concept: "领域概念",
|
|
733
732
|
scenario: "用户链路场景"
|
|
734
733
|
};
|
|
735
|
-
function
|
|
734
|
+
function ve(a) {
|
|
736
735
|
return a.replace(/<proposal[\s\S]*?<\/proposal>/g, "").trim();
|
|
737
736
|
}
|
|
738
|
-
function
|
|
737
|
+
function qa(a) {
|
|
739
738
|
try {
|
|
740
739
|
return JSON.parse(a);
|
|
741
740
|
} catch {
|
|
742
741
|
return {};
|
|
743
742
|
}
|
|
744
743
|
}
|
|
745
|
-
function
|
|
744
|
+
function Fa(a, c) {
|
|
746
745
|
switch (a) {
|
|
747
746
|
case "name":
|
|
748
|
-
return String(
|
|
747
|
+
return String(c.name || "");
|
|
749
748
|
case "vision":
|
|
750
|
-
return String(
|
|
749
|
+
return String(c.vision || "");
|
|
751
750
|
case "target_users":
|
|
752
|
-
return String(
|
|
751
|
+
return String(c.targetUsers || "");
|
|
753
752
|
case "description":
|
|
754
|
-
return String(
|
|
753
|
+
return String(c.description || "");
|
|
755
754
|
case "requirement":
|
|
756
|
-
return `[${
|
|
755
|
+
return `[${c.priority || "P1"}] ${c.title || ""}`;
|
|
757
756
|
case "design":
|
|
758
|
-
return String(
|
|
757
|
+
return String(c.name || "");
|
|
759
758
|
case "biz_understanding":
|
|
760
|
-
return String(
|
|
759
|
+
return String(c.title || "");
|
|
761
760
|
default:
|
|
762
|
-
return JSON.stringify(
|
|
761
|
+
return JSON.stringify(c);
|
|
763
762
|
}
|
|
764
763
|
}
|
|
765
|
-
function
|
|
764
|
+
function ja({
|
|
766
765
|
productCode: a,
|
|
767
|
-
productName:
|
|
766
|
+
productName: c,
|
|
768
767
|
onArtifactChanged: n
|
|
769
768
|
}) {
|
|
770
|
-
const [h,
|
|
769
|
+
const [h, b] = p([]), [d, l] = p(null), [_, r] = p([]), [f, N] = p([]), [v, P] = p(""), [$, K] = p(!1), [w, G] = p(""), [A, R] = p(""), E = fe(null), S = fe(null), T = re(async () => {
|
|
771
770
|
try {
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
(
|
|
771
|
+
const u = await W.get(`/product/${a}/chat/sessions`), o = (u == null ? void 0 : u.data) || [];
|
|
772
|
+
b(o), l(
|
|
773
|
+
(s) => s && o.some((y) => y.id === s) ? s : o.length > 0 ? o[0].id : null
|
|
775
774
|
);
|
|
776
|
-
} catch (
|
|
777
|
-
console.error(
|
|
775
|
+
} catch (u) {
|
|
776
|
+
console.error(u);
|
|
778
777
|
}
|
|
779
|
-
}, [a]),
|
|
778
|
+
}, [a]), x = re(async (u) => {
|
|
780
779
|
try {
|
|
781
|
-
const [
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
params: { sessionId:
|
|
780
|
+
const [o, s] = await Promise.all([
|
|
781
|
+
W.get(`/product/${a}/chat/sessions/${u}/messages`),
|
|
782
|
+
W.get(`/product/${a}/chat/proposals`, {
|
|
783
|
+
params: { sessionId: u }
|
|
785
784
|
})
|
|
786
785
|
]);
|
|
787
|
-
|
|
788
|
-
} catch (
|
|
789
|
-
console.error(
|
|
786
|
+
r((o == null ? void 0 : o.data) || []), N((s == null ? void 0 : s.data) || []);
|
|
787
|
+
} catch (o) {
|
|
788
|
+
console.error(o);
|
|
790
789
|
}
|
|
791
790
|
}, [a]);
|
|
792
791
|
F(() => {
|
|
793
|
-
|
|
794
|
-
}, [
|
|
795
|
-
d != null &&
|
|
796
|
-
}, [d,
|
|
797
|
-
var
|
|
798
|
-
(
|
|
799
|
-
}, [_,
|
|
800
|
-
const
|
|
792
|
+
l(null), r([]), N([]), T();
|
|
793
|
+
}, [T]), F(() => {
|
|
794
|
+
d != null && x(d);
|
|
795
|
+
}, [d, x]), F(() => {
|
|
796
|
+
var u;
|
|
797
|
+
(u = S.current) == null || u.scrollIntoView({ behavior: "smooth" });
|
|
798
|
+
}, [_, w]);
|
|
799
|
+
const V = async () => {
|
|
801
800
|
try {
|
|
802
|
-
const
|
|
803
|
-
title: `${
|
|
804
|
-
}),
|
|
805
|
-
await
|
|
806
|
-
} catch (
|
|
807
|
-
console.error(
|
|
801
|
+
const u = await W.post(`/product/${a}/chat/sessions`, {
|
|
802
|
+
title: `${c} · 产品对话`
|
|
803
|
+
}), o = u == null ? void 0 : u.data;
|
|
804
|
+
await T(), o != null && o.id && l(o.id);
|
|
805
|
+
} catch (u) {
|
|
806
|
+
console.error(u);
|
|
808
807
|
}
|
|
809
|
-
},
|
|
808
|
+
}, te = async () => {
|
|
810
809
|
if (d != null && confirm("确认删除该会话(连同消息与提案记录)?"))
|
|
811
810
|
try {
|
|
812
|
-
await
|
|
813
|
-
} catch (
|
|
814
|
-
console.error(
|
|
811
|
+
await W.delete(`/product/${a}/chat/sessions/${d}`), l(null), r([]), N([]), await T();
|
|
812
|
+
} catch (u) {
|
|
813
|
+
console.error(u);
|
|
815
814
|
}
|
|
816
|
-
},
|
|
817
|
-
const
|
|
818
|
-
if (!
|
|
819
|
-
|
|
820
|
-
...
|
|
821
|
-
{ id: -Date.now(), sessionId: d, role: "user", content:
|
|
815
|
+
}, B = async () => {
|
|
816
|
+
const u = v.trim();
|
|
817
|
+
if (!u || $ || d == null) return;
|
|
818
|
+
P(""), R(""), K(!0), G(""), r((s) => [
|
|
819
|
+
...s,
|
|
820
|
+
{ id: -Date.now(), sessionId: d, role: "user", content: u }
|
|
822
821
|
]);
|
|
823
|
-
const
|
|
824
|
-
|
|
822
|
+
const o = new AbortController();
|
|
823
|
+
E.current = o;
|
|
825
824
|
try {
|
|
826
|
-
const
|
|
825
|
+
const s = await fetch(
|
|
827
826
|
`/api/product/${a}/chat/sessions/${d}/chat/stream`,
|
|
828
827
|
{
|
|
829
828
|
method: "POST",
|
|
830
829
|
headers: { Accept: "text/event-stream", "Content-Type": "application/json" },
|
|
831
|
-
body: JSON.stringify({ message:
|
|
832
|
-
signal:
|
|
830
|
+
body: JSON.stringify({ message: u }),
|
|
831
|
+
signal: o.signal
|
|
833
832
|
}
|
|
834
833
|
);
|
|
835
|
-
if (!
|
|
836
|
-
const
|
|
837
|
-
|
|
834
|
+
if (!s.ok || !s.body) {
|
|
835
|
+
const ae = await s.text().catch(() => "");
|
|
836
|
+
R(ae || `HTTP ${s.status}`);
|
|
838
837
|
return;
|
|
839
838
|
}
|
|
840
|
-
const
|
|
841
|
-
let
|
|
839
|
+
const y = s.body.getReader(), J = new TextDecoder();
|
|
840
|
+
let L = "", Q = "";
|
|
842
841
|
for (; ; ) {
|
|
843
|
-
const { done:
|
|
844
|
-
if (
|
|
845
|
-
|
|
846
|
-
const
|
|
842
|
+
const { done: ae, value: de } = await y.read();
|
|
843
|
+
if (ae) break;
|
|
844
|
+
L += J.decode(de, { stream: !0 });
|
|
845
|
+
const ce = L.split(`
|
|
847
846
|
`);
|
|
848
|
-
|
|
849
|
-
for (const
|
|
850
|
-
const M =
|
|
847
|
+
L = ce.pop() || "";
|
|
848
|
+
for (const me of ce) {
|
|
849
|
+
const M = me.trim();
|
|
851
850
|
if (!M) {
|
|
852
|
-
|
|
851
|
+
Q = "";
|
|
853
852
|
continue;
|
|
854
853
|
}
|
|
855
854
|
if (!M.startsWith(":")) {
|
|
856
855
|
if (M.startsWith("event:")) {
|
|
857
|
-
|
|
856
|
+
Q = M.slice(6).trim();
|
|
858
857
|
continue;
|
|
859
858
|
}
|
|
860
859
|
if (M.startsWith("data:")) {
|
|
861
|
-
const
|
|
862
|
-
if (
|
|
863
|
-
|
|
860
|
+
const ie = M.slice(5).trim();
|
|
861
|
+
if (Q === "done") {
|
|
862
|
+
Q = "";
|
|
864
863
|
continue;
|
|
865
864
|
}
|
|
866
|
-
if (
|
|
867
|
-
|
|
865
|
+
if (ie.startsWith("[error]")) {
|
|
866
|
+
R(ie.slice(7).trim());
|
|
868
867
|
return;
|
|
869
868
|
}
|
|
870
|
-
|
|
869
|
+
G((he) => he + ie);
|
|
871
870
|
}
|
|
872
871
|
}
|
|
873
872
|
}
|
|
874
873
|
}
|
|
875
|
-
} catch (
|
|
876
|
-
(
|
|
874
|
+
} catch (s) {
|
|
875
|
+
(s == null ? void 0 : s.name) !== "AbortError" && R(String((s == null ? void 0 : s.message) || s));
|
|
877
876
|
} finally {
|
|
878
|
-
|
|
877
|
+
E.current = null, K(!1), G(""), d != null && await x(d);
|
|
879
878
|
}
|
|
880
|
-
},
|
|
879
|
+
}, U = async (u, o) => {
|
|
881
880
|
try {
|
|
882
|
-
const
|
|
883
|
-
`/product/${a}/chat/proposals/${
|
|
881
|
+
const s = await W.post(
|
|
882
|
+
`/product/${a}/chat/proposals/${u}/${o}`,
|
|
884
883
|
{}
|
|
885
|
-
),
|
|
886
|
-
|
|
887
|
-
} catch (
|
|
888
|
-
console.error(
|
|
884
|
+
), y = s == null ? void 0 : s.data;
|
|
885
|
+
y != null && y.id && N((J) => J.map((L) => L.id === y.id ? y : L)), o === "accept" && n();
|
|
886
|
+
} catch (s) {
|
|
887
|
+
console.error(s), R("裁定失败,请重试");
|
|
889
888
|
}
|
|
890
|
-
},
|
|
889
|
+
}, Y = (u) => f.filter((o) => o.messageId === u);
|
|
891
890
|
return /* @__PURE__ */ i("div", { className: t.chatLayout, children: [
|
|
892
891
|
/* @__PURE__ */ i("div", { className: t.chatHeader, children: [
|
|
893
892
|
/* @__PURE__ */ i(
|
|
@@ -895,19 +894,19 @@ function Ja({
|
|
|
895
894
|
{
|
|
896
895
|
className: t.chatSessionSelect,
|
|
897
896
|
value: d ?? "",
|
|
898
|
-
onChange: (
|
|
897
|
+
onChange: (u) => l(u.target.value ? Number(u.target.value) : null),
|
|
899
898
|
children: [
|
|
900
899
|
h.length === 0 && /* @__PURE__ */ e("option", { value: "", children: "(暂无会话)" }),
|
|
901
|
-
h.map((
|
|
900
|
+
h.map((u) => /* @__PURE__ */ e("option", { value: u.id, children: u.title }, u.id))
|
|
902
901
|
]
|
|
903
902
|
}
|
|
904
903
|
),
|
|
905
|
-
/* @__PURE__ */ e("button", { className: t.btn, onClick:
|
|
904
|
+
/* @__PURE__ */ e("button", { className: t.btn, onClick: V, children: "新会话" }),
|
|
906
905
|
/* @__PURE__ */ e(
|
|
907
906
|
"button",
|
|
908
907
|
{
|
|
909
908
|
className: t.btn,
|
|
910
|
-
onClick:
|
|
909
|
+
onClick: te,
|
|
911
910
|
disabled: d == null,
|
|
912
911
|
children: "删除会话"
|
|
913
912
|
}
|
|
@@ -917,49 +916,49 @@ function Ja({
|
|
|
917
916
|
/* @__PURE__ */ e("div", { className: t.chatBody, children: d == null ? /* @__PURE__ */ i("div", { className: t.chatEmpty, children: [
|
|
918
917
|
/* @__PURE__ */ e("p", { children: "新建产品后就可以开聊了。" }),
|
|
919
918
|
/* @__PURE__ */ e("p", { children: "把产品想成什么聊什么:愿景、用户、需求、设计,聊清楚的会沉淀下来。" }),
|
|
920
|
-
/* @__PURE__ */ e("button", { className: `${t.btn} ${t.btnPrimary}`, onClick:
|
|
921
|
-
] }) : /* @__PURE__ */ i(
|
|
919
|
+
/* @__PURE__ */ e("button", { className: `${t.btn} ${t.btnPrimary}`, onClick: V, children: "开聊" })
|
|
920
|
+
] }) : /* @__PURE__ */ i(be, { children: [
|
|
922
921
|
_.map(
|
|
923
|
-
(
|
|
924
|
-
/* @__PURE__ */ e("div", { className: `${t.bubble} ${t.bubbleAssistant}`, children:
|
|
925
|
-
|
|
926
|
-
|
|
922
|
+
(u) => u.role === "user" ? /* @__PURE__ */ e("div", { className: `${t.msgRow} ${t.msgRowUser}`, children: /* @__PURE__ */ e("div", { className: `${t.bubble} ${t.bubbleUser}`, children: u.content }) }, u.id) : /* @__PURE__ */ i("div", { className: t.msgRow, children: [
|
|
923
|
+
/* @__PURE__ */ e("div", { className: `${t.bubble} ${t.bubbleAssistant}`, children: ve(u.content) || "(本条为提案输出)" }),
|
|
924
|
+
Y(u.id).map((o) => /* @__PURE__ */ e(
|
|
925
|
+
Ga,
|
|
927
926
|
{
|
|
928
|
-
proposal:
|
|
929
|
-
onDecide:
|
|
927
|
+
proposal: o,
|
|
928
|
+
onDecide: U
|
|
930
929
|
},
|
|
931
|
-
|
|
930
|
+
o.id
|
|
932
931
|
))
|
|
933
|
-
] },
|
|
932
|
+
] }, u.id)
|
|
934
933
|
),
|
|
935
|
-
|
|
936
|
-
|
|
934
|
+
$ && /* @__PURE__ */ e("div", { className: t.msgRow, children: /* @__PURE__ */ i("div", { className: `${t.bubble} ${t.bubbleAssistant}`, children: [
|
|
935
|
+
ve(w) || "…",
|
|
937
936
|
/* @__PURE__ */ e("span", { className: t.streamingCursor, children: "▍" })
|
|
938
937
|
] }) }),
|
|
939
|
-
/* @__PURE__ */ e("div", { ref:
|
|
938
|
+
/* @__PURE__ */ e("div", { ref: S })
|
|
940
939
|
] }) }),
|
|
941
|
-
|
|
940
|
+
A && /* @__PURE__ */ e("div", { className: t.chatError, children: A }),
|
|
942
941
|
/* @__PURE__ */ i("div", { className: t.chatInputRow, children: [
|
|
943
942
|
/* @__PURE__ */ e(
|
|
944
943
|
"textarea",
|
|
945
944
|
{
|
|
946
945
|
className: t.chatTextarea,
|
|
947
|
-
placeholder: d == null ? "先点「开聊」创建会话…" :
|
|
948
|
-
value:
|
|
949
|
-
disabled: d == null ||
|
|
950
|
-
onChange: (
|
|
951
|
-
onKeyDown: (
|
|
952
|
-
|
|
946
|
+
placeholder: d == null ? "先点「开聊」创建会话…" : "和 AI 聊这个产品…(Enter 发送,Shift+Enter 换行)",
|
|
947
|
+
value: v,
|
|
948
|
+
disabled: d == null || $,
|
|
949
|
+
onChange: (u) => P(u.target.value),
|
|
950
|
+
onKeyDown: (u) => {
|
|
951
|
+
u.key === "Enter" && !u.shiftKey && (u.preventDefault(), B());
|
|
953
952
|
}
|
|
954
953
|
}
|
|
955
954
|
),
|
|
956
|
-
|
|
955
|
+
$ ? /* @__PURE__ */ e(
|
|
957
956
|
"button",
|
|
958
957
|
{
|
|
959
958
|
className: `${t.btn} ${t.btnDanger}`,
|
|
960
959
|
onClick: () => {
|
|
961
|
-
var
|
|
962
|
-
return (
|
|
960
|
+
var u;
|
|
961
|
+
return (u = E.current) == null ? void 0 : u.abort();
|
|
963
962
|
},
|
|
964
963
|
children: "停止"
|
|
965
964
|
}
|
|
@@ -967,29 +966,29 @@ function Ja({
|
|
|
967
966
|
"button",
|
|
968
967
|
{
|
|
969
968
|
className: `${t.btn} ${t.btnPrimary}`,
|
|
970
|
-
onClick:
|
|
971
|
-
disabled: !
|
|
969
|
+
onClick: B,
|
|
970
|
+
disabled: !v.trim() || d == null,
|
|
972
971
|
children: "发送"
|
|
973
972
|
}
|
|
974
973
|
)
|
|
975
974
|
] })
|
|
976
975
|
] });
|
|
977
976
|
}
|
|
978
|
-
function
|
|
977
|
+
function Ga({
|
|
979
978
|
proposal: a,
|
|
980
|
-
onDecide:
|
|
979
|
+
onDecide: c
|
|
981
980
|
}) {
|
|
982
|
-
const n =
|
|
981
|
+
const n = qa(a.payload), h = Ma[a.proposalType] || a.proposalType, b = a.action === "CREATE";
|
|
983
982
|
return /* @__PURE__ */ i("div", { className: t.proposalCard, children: [
|
|
984
983
|
/* @__PURE__ */ i("div", { className: t.proposalHead, children: [
|
|
985
|
-
/* @__PURE__ */ e("span", { className: t.proposalBadge, children:
|
|
984
|
+
/* @__PURE__ */ e("span", { className: t.proposalBadge, children: b ? "新增" : "更新" }),
|
|
986
985
|
/* @__PURE__ */ e("span", { className: t.proposalType, children: h }),
|
|
987
986
|
a.status === "PENDING" && /* @__PURE__ */ i("span", { className: t.proposalActions, children: [
|
|
988
987
|
/* @__PURE__ */ e(
|
|
989
988
|
"button",
|
|
990
989
|
{
|
|
991
990
|
className: `${t.btn} ${t.btnPrimary}`,
|
|
992
|
-
onClick: () =>
|
|
991
|
+
onClick: () => c(a.id, "accept"),
|
|
993
992
|
children: "采纳"
|
|
994
993
|
}
|
|
995
994
|
),
|
|
@@ -997,7 +996,7 @@ function Wa({
|
|
|
997
996
|
"button",
|
|
998
997
|
{
|
|
999
998
|
className: t.btn,
|
|
1000
|
-
onClick: () =>
|
|
999
|
+
onClick: () => c(a.id, "reject"),
|
|
1001
1000
|
children: "驳回"
|
|
1002
1001
|
}
|
|
1003
1002
|
)
|
|
@@ -1008,91 +1007,91 @@ function Wa({
|
|
|
1008
1007
|
] }),
|
|
1009
1008
|
a.status === "REJECTED" && /* @__PURE__ */ e("span", { className: t.proposalRejected, children: "已驳回" })
|
|
1010
1009
|
] }),
|
|
1011
|
-
/* @__PURE__ */ e("div", { className: t.proposalPreview, children:
|
|
1010
|
+
/* @__PURE__ */ e("div", { className: t.proposalPreview, children: Fa(a.proposalType, n) || "(空提案)" })
|
|
1012
1011
|
] });
|
|
1013
1012
|
}
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1013
|
+
const C = _e.create({ baseURL: "/api", timeout: 15e3 });
|
|
1014
|
+
C.interceptors.response.use(
|
|
1016
1015
|
(a) => a.data,
|
|
1017
1016
|
(a) => (console.error("[ProductWorkbench] request failed", a), Promise.reject(a))
|
|
1018
1017
|
);
|
|
1019
|
-
function
|
|
1020
|
-
const [a,
|
|
1018
|
+
function si() {
|
|
1019
|
+
const [a, c] = p([]), [n, h] = p(null), [b, d] = p(!1), [l, _] = p("chat"), [r, f] = p([]), [N, v] = p([]), [P, $] = p([]), [K, w] = p([]), [G, A] = p(!1), [R, E] = p(!1), [S, T] = p(!1), x = re(async () => {
|
|
1021
1020
|
d(!0);
|
|
1022
1021
|
try {
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1025
|
-
} catch (
|
|
1026
|
-
console.error(
|
|
1022
|
+
const o = await C.get("/product/list"), s = (o == null ? void 0 : o.data) || [];
|
|
1023
|
+
c(s), s.length > 0 && !n && h(s[0]);
|
|
1024
|
+
} catch (o) {
|
|
1025
|
+
console.error(o);
|
|
1027
1026
|
} finally {
|
|
1028
1027
|
d(!1);
|
|
1029
1028
|
}
|
|
1030
1029
|
}, [n]);
|
|
1031
1030
|
F(() => {
|
|
1032
|
-
|
|
1033
|
-
}, [
|
|
1031
|
+
x();
|
|
1032
|
+
}, [x]), F(() => {
|
|
1034
1033
|
if (!n) return;
|
|
1035
|
-
const
|
|
1036
|
-
|
|
1037
|
-
}, [n,
|
|
1038
|
-
const
|
|
1034
|
+
const o = n.productCode;
|
|
1035
|
+
l === "design" ? C.get(`/product/${o}/design/list`).then((s) => f((s == null ? void 0 : s.data) || [])).catch(() => f([])) : l === "requirement" ? C.get(`/product/${o}/requirement/list`).then((s) => v((s == null ? void 0 : s.data) || [])).catch(() => v([])) : l === "feature" ? C.get(`/product/${o}/feature/list`).then((s) => $((s == null ? void 0 : s.data) || [])).catch(() => $([])) : l === "biz-understanding" && C.get("/product/biz-understanding/list", { params: { productCode: o } }).then((s) => w((s == null ? void 0 : s.data) || [])).catch(() => w([]));
|
|
1036
|
+
}, [n, l]);
|
|
1037
|
+
const V = async (o) => {
|
|
1039
1038
|
try {
|
|
1040
|
-
const
|
|
1041
|
-
await
|
|
1042
|
-
} catch (
|
|
1043
|
-
console.error(
|
|
1039
|
+
const s = await C.post("/product", o), y = s == null ? void 0 : s.data;
|
|
1040
|
+
await x(), h(y), A(!1);
|
|
1041
|
+
} catch (s) {
|
|
1042
|
+
console.error(s);
|
|
1044
1043
|
}
|
|
1045
|
-
},
|
|
1044
|
+
}, te = async (o) => {
|
|
1046
1045
|
if (n)
|
|
1047
1046
|
try {
|
|
1048
|
-
await
|
|
1049
|
-
} catch (
|
|
1050
|
-
console.error(
|
|
1047
|
+
await C.put(`/product/${n.productCode}`, o), await x();
|
|
1048
|
+
} catch (s) {
|
|
1049
|
+
console.error(s);
|
|
1051
1050
|
}
|
|
1052
|
-
},
|
|
1051
|
+
}, B = async (o) => {
|
|
1053
1052
|
if (n)
|
|
1054
1053
|
try {
|
|
1055
|
-
await
|
|
1056
|
-
const
|
|
1057
|
-
f((
|
|
1058
|
-
} catch (
|
|
1059
|
-
console.error(
|
|
1054
|
+
await C.post(`/product/${n.productCode}/design`, o), E(!1);
|
|
1055
|
+
const s = await C.get(`/product/${n.productCode}/design/list`);
|
|
1056
|
+
f((s == null ? void 0 : s.data) || []);
|
|
1057
|
+
} catch (s) {
|
|
1058
|
+
console.error(s);
|
|
1060
1059
|
}
|
|
1061
|
-
},
|
|
1060
|
+
}, U = async (o) => {
|
|
1062
1061
|
if (n)
|
|
1063
1062
|
try {
|
|
1064
|
-
await
|
|
1065
|
-
const
|
|
1066
|
-
v((
|
|
1067
|
-
} catch (
|
|
1068
|
-
console.error(
|
|
1063
|
+
await C.post(`/product/${n.productCode}/requirement`, o), T(!1);
|
|
1064
|
+
const s = await C.get(`/product/${n.productCode}/requirement/list`);
|
|
1065
|
+
v((s == null ? void 0 : s.data) || []);
|
|
1066
|
+
} catch (s) {
|
|
1067
|
+
console.error(s);
|
|
1069
1068
|
}
|
|
1070
|
-
}, Y = async (
|
|
1069
|
+
}, Y = async (o) => {
|
|
1071
1070
|
if (n && confirm("确认删除该需求?"))
|
|
1072
1071
|
try {
|
|
1073
|
-
await
|
|
1074
|
-
const
|
|
1075
|
-
v((
|
|
1076
|
-
} catch (
|
|
1077
|
-
console.error(
|
|
1072
|
+
await C.delete(`/product/${n.productCode}/requirement/${o}`);
|
|
1073
|
+
const s = await C.get(`/product/${n.productCode}/requirement/list`);
|
|
1074
|
+
v((s == null ? void 0 : s.data) || []);
|
|
1075
|
+
} catch (s) {
|
|
1076
|
+
console.error(s);
|
|
1078
1077
|
}
|
|
1079
|
-
},
|
|
1078
|
+
}, u = async () => {
|
|
1080
1079
|
if (n)
|
|
1081
1080
|
try {
|
|
1082
|
-
await
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1085
|
-
} catch (
|
|
1086
|
-
console.error(
|
|
1081
|
+
await C.post(`/product/${n.productCode}/feature/decompose`);
|
|
1082
|
+
const o = await C.get(`/product/${n.productCode}/feature/list`);
|
|
1083
|
+
$((o == null ? void 0 : o.data) || []), alert("功能拆分完成");
|
|
1084
|
+
} catch (o) {
|
|
1085
|
+
console.error(o);
|
|
1087
1086
|
}
|
|
1088
1087
|
};
|
|
1089
|
-
return
|
|
1088
|
+
return b ? /* @__PURE__ */ e("div", { className: t.spinner, children: "加载中..." }) : /* @__PURE__ */ i("div", { className: t.container, children: [
|
|
1090
1089
|
/* @__PURE__ */ i("aside", { className: t.sidebar, children: [
|
|
1091
1090
|
/* @__PURE__ */ e("div", { className: t.sidebarHeader, children: /* @__PURE__ */ i(
|
|
1092
1091
|
"button",
|
|
1093
1092
|
{
|
|
1094
1093
|
className: `${t.btn} ${t.btnPrimary}`,
|
|
1095
|
-
onClick: () =>
|
|
1094
|
+
onClick: () => A(!0),
|
|
1096
1095
|
title: "新建产品",
|
|
1097
1096
|
children: [
|
|
1098
1097
|
/* @__PURE__ */ e(j, {}),
|
|
@@ -1100,21 +1099,21 @@ function oi() {
|
|
|
1100
1099
|
]
|
|
1101
1100
|
}
|
|
1102
1101
|
) }),
|
|
1103
|
-
/* @__PURE__ */ e("div", { className: t.productList, children: a.length === 0 ? /* @__PURE__ */ e("div", { className: t.emptyHint, children: '暂无产品,点击"新建"开始' }) : a.map((
|
|
1102
|
+
/* @__PURE__ */ e("div", { className: t.productList, children: a.length === 0 ? /* @__PURE__ */ e("div", { className: t.emptyHint, children: '暂无产品,点击"新建"开始' }) : a.map((o) => /* @__PURE__ */ i(
|
|
1104
1103
|
"div",
|
|
1105
1104
|
{
|
|
1106
|
-
className: `${t.productItem} ${(n == null ? void 0 : n.productCode) ===
|
|
1107
|
-
onClick: () => h(
|
|
1105
|
+
className: `${t.productItem} ${(n == null ? void 0 : n.productCode) === o.productCode ? t.productItemActive : ""}`,
|
|
1106
|
+
onClick: () => h(o),
|
|
1108
1107
|
children: [
|
|
1109
|
-
/* @__PURE__ */ e("div", { className: t.productItemName, children:
|
|
1110
|
-
/* @__PURE__ */ e("div", { className: t.productItemCode, children:
|
|
1111
|
-
/* @__PURE__ */ e("span", { className: t.productItemStatus, children:
|
|
1108
|
+
/* @__PURE__ */ e("div", { className: t.productItemName, children: o.name }),
|
|
1109
|
+
/* @__PURE__ */ e("div", { className: t.productItemCode, children: o.productCode }),
|
|
1110
|
+
/* @__PURE__ */ e("span", { className: t.productItemStatus, children: o.status })
|
|
1112
1111
|
]
|
|
1113
1112
|
},
|
|
1114
|
-
|
|
1113
|
+
o.productCode
|
|
1115
1114
|
)) })
|
|
1116
1115
|
] }),
|
|
1117
|
-
/* @__PURE__ */ e("main", { className: t.main, children: n ? /* @__PURE__ */ i(
|
|
1116
|
+
/* @__PURE__ */ e("main", { className: t.main, children: n ? /* @__PURE__ */ i(be, { children: [
|
|
1118
1117
|
/* @__PURE__ */ i("div", { className: t.productHeader, children: [
|
|
1119
1118
|
/* @__PURE__ */ i("div", { children: [
|
|
1120
1119
|
/* @__PURE__ */ e("span", { className: t.productTitle, children: n.name }),
|
|
@@ -1126,7 +1125,7 @@ function oi() {
|
|
|
1126
1125
|
/* @__PURE__ */ e(
|
|
1127
1126
|
"div",
|
|
1128
1127
|
{
|
|
1129
|
-
className: `${t.tab} ${
|
|
1128
|
+
className: `${t.tab} ${l === "chat" ? t.tabActive : ""}`,
|
|
1130
1129
|
onClick: () => _("chat"),
|
|
1131
1130
|
title: "产品在对话中生长:聊出的结论经你裁定后落为正式产物",
|
|
1132
1131
|
children: "对话"
|
|
@@ -1135,7 +1134,7 @@ function oi() {
|
|
|
1135
1134
|
/* @__PURE__ */ e(
|
|
1136
1135
|
"div",
|
|
1137
1136
|
{
|
|
1138
|
-
className: `${t.tab} ${
|
|
1137
|
+
className: `${t.tab} ${l === "description" ? t.tabActive : ""}`,
|
|
1139
1138
|
onClick: () => _("description"),
|
|
1140
1139
|
children: "产品描述"
|
|
1141
1140
|
}
|
|
@@ -1143,7 +1142,7 @@ function oi() {
|
|
|
1143
1142
|
/* @__PURE__ */ e(
|
|
1144
1143
|
"div",
|
|
1145
1144
|
{
|
|
1146
|
-
className: `${t.tab} ${
|
|
1145
|
+
className: `${t.tab} ${l === "design" ? t.tabActive : ""}`,
|
|
1147
1146
|
onClick: () => _("design"),
|
|
1148
1147
|
children: "设计稿"
|
|
1149
1148
|
}
|
|
@@ -1151,7 +1150,7 @@ function oi() {
|
|
|
1151
1150
|
/* @__PURE__ */ e(
|
|
1152
1151
|
"div",
|
|
1153
1152
|
{
|
|
1154
|
-
className: `${t.tab} ${
|
|
1153
|
+
className: `${t.tab} ${l === "requirement" ? t.tabActive : ""}`,
|
|
1155
1154
|
onClick: () => _("requirement"),
|
|
1156
1155
|
children: "业务需求"
|
|
1157
1156
|
}
|
|
@@ -1159,7 +1158,7 @@ function oi() {
|
|
|
1159
1158
|
/* @__PURE__ */ e(
|
|
1160
1159
|
"div",
|
|
1161
1160
|
{
|
|
1162
|
-
className: `${t.tab} ${
|
|
1161
|
+
className: `${t.tab} ${l === "feature" ? t.tabActive : ""}`,
|
|
1163
1162
|
onClick: () => _("feature"),
|
|
1164
1163
|
children: "功能拆分"
|
|
1165
1164
|
}
|
|
@@ -1167,19 +1166,19 @@ function oi() {
|
|
|
1167
1166
|
/* @__PURE__ */ i(
|
|
1168
1167
|
"div",
|
|
1169
1168
|
{
|
|
1170
|
-
className: `${t.tab} ${
|
|
1169
|
+
className: `${t.tab} ${l === "biz-understanding" ? t.tabActive : ""}`,
|
|
1171
1170
|
onClick: () => _("biz-understanding"),
|
|
1172
1171
|
title: "跨页面因果链稿件库 — 一份稿件 = 一个跨页面动作的连锁变化",
|
|
1173
1172
|
children: [
|
|
1174
1173
|
"业务理解 ",
|
|
1175
|
-
/* @__PURE__ */ e(
|
|
1174
|
+
/* @__PURE__ */ e(se, { style: { marginLeft: 4, fontSize: 12 } })
|
|
1176
1175
|
]
|
|
1177
1176
|
}
|
|
1178
1177
|
),
|
|
1179
1178
|
/* @__PURE__ */ e(
|
|
1180
1179
|
"div",
|
|
1181
1180
|
{
|
|
1182
|
-
className: `${t.tab} ${
|
|
1181
|
+
className: `${t.tab} ${l === "manuscript" ? t.tabActive : ""}`,
|
|
1183
1182
|
onClick: () => _("manuscript"),
|
|
1184
1183
|
title: "产品稿件 (case) × 设计稿件 (UI) 双向高亮",
|
|
1185
1184
|
children: "稿件编辑器"
|
|
@@ -1187,46 +1186,46 @@ function oi() {
|
|
|
1187
1186
|
)
|
|
1188
1187
|
] }),
|
|
1189
1188
|
/* @__PURE__ */ i("div", { className: t.tabContent, children: [
|
|
1190
|
-
|
|
1191
|
-
|
|
1189
|
+
l === "chat" && /* @__PURE__ */ e(
|
|
1190
|
+
ja,
|
|
1192
1191
|
{
|
|
1193
1192
|
productCode: n.productCode,
|
|
1194
1193
|
productName: n.name,
|
|
1195
1194
|
onArtifactChanged: () => {
|
|
1196
|
-
|
|
1195
|
+
x();
|
|
1197
1196
|
}
|
|
1198
1197
|
}
|
|
1199
1198
|
),
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1199
|
+
l === "description" && /* @__PURE__ */ e(Va, { product: n, onSave: te }),
|
|
1200
|
+
l === "design" && /* @__PURE__ */ e(
|
|
1201
|
+
Ja,
|
|
1203
1202
|
{
|
|
1204
|
-
designs:
|
|
1205
|
-
onAdd: () =>
|
|
1206
|
-
onDelete: async (
|
|
1203
|
+
designs: r,
|
|
1204
|
+
onAdd: () => E(!0),
|
|
1205
|
+
onDelete: async (o) => {
|
|
1207
1206
|
if (!confirm("确认删除该设计稿?")) return;
|
|
1208
|
-
await
|
|
1209
|
-
`/product/${n.productCode}/design/${
|
|
1207
|
+
await C.delete(
|
|
1208
|
+
`/product/${n.productCode}/design/${o}`
|
|
1210
1209
|
);
|
|
1211
|
-
const
|
|
1210
|
+
const s = await C.get(
|
|
1212
1211
|
`/product/${n.productCode}/design/list`
|
|
1213
1212
|
);
|
|
1214
|
-
f((
|
|
1213
|
+
f((s == null ? void 0 : s.data) || []);
|
|
1215
1214
|
}
|
|
1216
1215
|
}
|
|
1217
1216
|
),
|
|
1218
|
-
|
|
1219
|
-
|
|
1217
|
+
l === "requirement" && /* @__PURE__ */ e(
|
|
1218
|
+
Wa,
|
|
1220
1219
|
{
|
|
1221
1220
|
requirements: N,
|
|
1222
|
-
onAdd: () =>
|
|
1221
|
+
onAdd: () => T(!0),
|
|
1223
1222
|
onDelete: Y
|
|
1224
1223
|
}
|
|
1225
1224
|
),
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1225
|
+
l === "feature" && /* @__PURE__ */ e(Xa, { features: P, onDecompose: u }),
|
|
1226
|
+
l === "biz-understanding" && /* @__PURE__ */ e(Za, { items: K }),
|
|
1227
|
+
l === "manuscript" && n && /* @__PURE__ */ e(
|
|
1228
|
+
Ve,
|
|
1230
1229
|
{
|
|
1231
1230
|
productCode: n.productCode,
|
|
1232
1231
|
pageCode: "ctc.4a.org"
|
|
@@ -1239,7 +1238,7 @@ function oi() {
|
|
|
1239
1238
|
"button",
|
|
1240
1239
|
{
|
|
1241
1240
|
className: `${t.btn} ${t.btnPrimary}`,
|
|
1242
|
-
onClick: () =>
|
|
1241
|
+
onClick: () => A(!0),
|
|
1243
1242
|
children: [
|
|
1244
1243
|
/* @__PURE__ */ e(j, {}),
|
|
1245
1244
|
" 创建第一个产品"
|
|
@@ -1247,34 +1246,34 @@ function oi() {
|
|
|
1247
1246
|
}
|
|
1248
1247
|
)
|
|
1249
1248
|
] }) }) }),
|
|
1250
|
-
|
|
1251
|
-
|
|
1249
|
+
G && /* @__PURE__ */ e(
|
|
1250
|
+
Ka,
|
|
1252
1251
|
{
|
|
1253
|
-
onCancel: () =>
|
|
1254
|
-
onSubmit:
|
|
1252
|
+
onCancel: () => A(!1),
|
|
1253
|
+
onSubmit: V
|
|
1255
1254
|
}
|
|
1256
1255
|
),
|
|
1257
|
-
|
|
1258
|
-
|
|
1256
|
+
R && /* @__PURE__ */ e(
|
|
1257
|
+
Ya,
|
|
1259
1258
|
{
|
|
1260
|
-
onCancel: () =>
|
|
1261
|
-
onSubmit:
|
|
1259
|
+
onCancel: () => E(!1),
|
|
1260
|
+
onSubmit: B
|
|
1262
1261
|
}
|
|
1263
1262
|
),
|
|
1264
|
-
|
|
1265
|
-
|
|
1263
|
+
S && /* @__PURE__ */ e(
|
|
1264
|
+
Qa,
|
|
1266
1265
|
{
|
|
1267
|
-
onCancel: () =>
|
|
1268
|
-
onSubmit:
|
|
1266
|
+
onCancel: () => T(!1),
|
|
1267
|
+
onSubmit: U
|
|
1269
1268
|
}
|
|
1270
1269
|
)
|
|
1271
1270
|
] });
|
|
1272
1271
|
}
|
|
1273
|
-
function
|
|
1272
|
+
function Va({
|
|
1274
1273
|
product: a,
|
|
1275
|
-
onSave:
|
|
1274
|
+
onSave: c
|
|
1276
1275
|
}) {
|
|
1277
|
-
const [n, h] =
|
|
1276
|
+
const [n, h] = p(a.name), [b, d] = p(a.vision || ""), [l, _] = p(a.targetUsers || ""), [r, f] = p(a.description || "");
|
|
1278
1277
|
return F(() => {
|
|
1279
1278
|
h(a.name), d(a.vision || ""), _(a.targetUsers || ""), f(a.description || "");
|
|
1280
1279
|
}, [a]), /* @__PURE__ */ i("div", { className: t.formGroup, children: [
|
|
@@ -1292,7 +1291,7 @@ function Ka({
|
|
|
1292
1291
|
"textarea",
|
|
1293
1292
|
{
|
|
1294
1293
|
className: t.formTextarea,
|
|
1295
|
-
value:
|
|
1294
|
+
value: b,
|
|
1296
1295
|
onChange: (N) => d(N.target.value),
|
|
1297
1296
|
placeholder: "描述这个产品要解决什么问题..."
|
|
1298
1297
|
}
|
|
@@ -1302,7 +1301,7 @@ function Ka({
|
|
|
1302
1301
|
"textarea",
|
|
1303
1302
|
{
|
|
1304
1303
|
className: t.formTextarea,
|
|
1305
|
-
value:
|
|
1304
|
+
value: l,
|
|
1306
1305
|
onChange: (N) => _(N.target.value),
|
|
1307
1306
|
placeholder: "谁会用这个产品..."
|
|
1308
1307
|
}
|
|
@@ -1313,7 +1312,7 @@ function Ka({
|
|
|
1313
1312
|
{
|
|
1314
1313
|
className: t.formTextarea,
|
|
1315
1314
|
style: { minHeight: 200 },
|
|
1316
|
-
value:
|
|
1315
|
+
value: r,
|
|
1317
1316
|
onChange: (N) => f(N.target.value),
|
|
1318
1317
|
placeholder: `## 核心场景
|
|
1319
1318
|
## 用户故事
|
|
@@ -1324,15 +1323,15 @@ function Ka({
|
|
|
1324
1323
|
"button",
|
|
1325
1324
|
{
|
|
1326
1325
|
className: `${t.btn} ${t.btnPrimary}`,
|
|
1327
|
-
onClick: () =>
|
|
1326
|
+
onClick: () => c({ name: n, vision: b, targetUsers: l, description: r }),
|
|
1328
1327
|
children: "保存"
|
|
1329
1328
|
}
|
|
1330
1329
|
)
|
|
1331
1330
|
] });
|
|
1332
1331
|
}
|
|
1333
|
-
function
|
|
1332
|
+
function Ja({
|
|
1334
1333
|
designs: a,
|
|
1335
|
-
onAdd:
|
|
1334
|
+
onAdd: c,
|
|
1336
1335
|
onDelete: n
|
|
1337
1336
|
}) {
|
|
1338
1337
|
return /* @__PURE__ */ i("div", { children: [
|
|
@@ -1342,7 +1341,7 @@ function Xa({
|
|
|
1342
1341
|
a.length,
|
|
1343
1342
|
")"
|
|
1344
1343
|
] }),
|
|
1345
|
-
/* @__PURE__ */ i("button", { className: `${t.btn} ${t.btnPrimary}`, onClick:
|
|
1344
|
+
/* @__PURE__ */ i("button", { className: `${t.btn} ${t.btnPrimary}`, onClick: c, children: [
|
|
1346
1345
|
/* @__PURE__ */ e(j, {}),
|
|
1347
1346
|
" 添加设计稿"
|
|
1348
1347
|
] })
|
|
@@ -1371,7 +1370,7 @@ function Xa({
|
|
|
1371
1370
|
className: `${t.btn} ${t.btnDanger}`,
|
|
1372
1371
|
onClick: () => n(h.id),
|
|
1373
1372
|
children: [
|
|
1374
|
-
/* @__PURE__ */ e(
|
|
1373
|
+
/* @__PURE__ */ e(ge, {}),
|
|
1375
1374
|
" 删除"
|
|
1376
1375
|
]
|
|
1377
1376
|
}
|
|
@@ -1379,12 +1378,12 @@ function Xa({
|
|
|
1379
1378
|
] }, h.id)) })
|
|
1380
1379
|
] });
|
|
1381
1380
|
}
|
|
1382
|
-
function
|
|
1381
|
+
function Wa({
|
|
1383
1382
|
requirements: a,
|
|
1384
|
-
onAdd:
|
|
1383
|
+
onAdd: c,
|
|
1385
1384
|
onDelete: n
|
|
1386
1385
|
}) {
|
|
1387
|
-
const h = (d) => d === "P0" ? t.priorityP0 : d === "P1" ? t.priorityP1 : d === "P2" ? t.priorityP2 : t.priorityP3,
|
|
1386
|
+
const h = (d) => d === "P0" ? t.priorityP0 : d === "P1" ? t.priorityP1 : d === "P2" ? t.priorityP2 : t.priorityP3, b = (d) => d === "IN_PROGRESS" ? t.statusActive : d === "DONE" ? t.statusDone : "";
|
|
1388
1387
|
return /* @__PURE__ */ i("div", { children: [
|
|
1389
1388
|
/* @__PURE__ */ i("div", { className: t.toolbar, children: [
|
|
1390
1389
|
/* @__PURE__ */ i("h3", { style: { margin: 0, fontSize: 14 }, children: [
|
|
@@ -1392,7 +1391,7 @@ function Ya({
|
|
|
1392
1391
|
a.length,
|
|
1393
1392
|
")"
|
|
1394
1393
|
] }),
|
|
1395
|
-
/* @__PURE__ */ i("button", { className: `${t.btn} ${t.btnPrimary}`, onClick:
|
|
1394
|
+
/* @__PURE__ */ i("button", { className: `${t.btn} ${t.btnPrimary}`, onClick: c, children: [
|
|
1396
1395
|
/* @__PURE__ */ e(j, {}),
|
|
1397
1396
|
" 新增需求"
|
|
1398
1397
|
] })
|
|
@@ -1409,22 +1408,22 @@ function Ya({
|
|
|
1409
1408
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("span", { className: `${t.priority} ${h(d.priority)}`, children: d.priority }) }),
|
|
1410
1409
|
/* @__PURE__ */ e("td", { children: d.title }),
|
|
1411
1410
|
/* @__PURE__ */ e("td", { style: { color: "var(--text-tertiary, #999)" }, children: d.description }),
|
|
1412
|
-
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("span", { className: `${t.status} ${
|
|
1411
|
+
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("span", { className: `${t.status} ${b(d.status)}`, children: d.status }) }),
|
|
1413
1412
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
|
|
1414
1413
|
"button",
|
|
1415
1414
|
{
|
|
1416
1415
|
className: `${t.btn} ${t.btnDanger}`,
|
|
1417
1416
|
onClick: () => n(d.id),
|
|
1418
|
-
children: /* @__PURE__ */ e(
|
|
1417
|
+
children: /* @__PURE__ */ e(ge, {})
|
|
1419
1418
|
}
|
|
1420
1419
|
) })
|
|
1421
1420
|
] }, d.id)) })
|
|
1422
1421
|
] })
|
|
1423
1422
|
] });
|
|
1424
1423
|
}
|
|
1425
|
-
function
|
|
1424
|
+
function Xa({
|
|
1426
1425
|
features: a,
|
|
1427
|
-
onDecompose:
|
|
1426
|
+
onDecompose: c
|
|
1428
1427
|
}) {
|
|
1429
1428
|
return /* @__PURE__ */ i("div", { children: [
|
|
1430
1429
|
/* @__PURE__ */ i("div", { className: t.toolbar, children: [
|
|
@@ -1437,10 +1436,10 @@ function Qa({
|
|
|
1437
1436
|
"button",
|
|
1438
1437
|
{
|
|
1439
1438
|
className: `${t.btn} ${t.btnPrimary}`,
|
|
1440
|
-
onClick:
|
|
1439
|
+
onClick: c,
|
|
1441
1440
|
title: "根据业务需求自动生成 FEATURE-XXX",
|
|
1442
1441
|
children: [
|
|
1443
|
-
/* @__PURE__ */ e(
|
|
1442
|
+
/* @__PURE__ */ e(se, {}),
|
|
1444
1443
|
" 一键拆分"
|
|
1445
1444
|
]
|
|
1446
1445
|
}
|
|
@@ -1464,11 +1463,11 @@ function Qa({
|
|
|
1464
1463
|
] })
|
|
1465
1464
|
] });
|
|
1466
1465
|
}
|
|
1467
|
-
function
|
|
1466
|
+
function Ka({
|
|
1468
1467
|
onCancel: a,
|
|
1469
|
-
onSubmit:
|
|
1468
|
+
onSubmit: c
|
|
1470
1469
|
}) {
|
|
1471
|
-
const [n, h] =
|
|
1470
|
+
const [n, h] = p(""), [b, d] = p("");
|
|
1472
1471
|
return /* @__PURE__ */ e("div", { className: t.modal, children: /* @__PURE__ */ i("div", { className: t.modalBody, children: [
|
|
1473
1472
|
/* @__PURE__ */ e("div", { className: t.modalTitle, children: "新建产品" }),
|
|
1474
1473
|
/* @__PURE__ */ e("label", { className: t.formLabel, children: "产品名称 *" }),
|
|
@@ -1477,7 +1476,7 @@ function Za({
|
|
|
1477
1476
|
{
|
|
1478
1477
|
className: t.formInput,
|
|
1479
1478
|
value: n,
|
|
1480
|
-
onChange: (
|
|
1479
|
+
onChange: (l) => h(l.target.value),
|
|
1481
1480
|
placeholder: "例如:智能客服平台"
|
|
1482
1481
|
}
|
|
1483
1482
|
),
|
|
@@ -1486,8 +1485,8 @@ function Za({
|
|
|
1486
1485
|
"textarea",
|
|
1487
1486
|
{
|
|
1488
1487
|
className: t.formTextarea,
|
|
1489
|
-
value:
|
|
1490
|
-
onChange: (
|
|
1488
|
+
value: b,
|
|
1489
|
+
onChange: (l) => d(l.target.value),
|
|
1491
1490
|
placeholder: "简要描述愿景..."
|
|
1492
1491
|
}
|
|
1493
1492
|
),
|
|
@@ -1497,7 +1496,7 @@ function Za({
|
|
|
1497
1496
|
"button",
|
|
1498
1497
|
{
|
|
1499
1498
|
className: `${t.btn} ${t.btnPrimary}`,
|
|
1500
|
-
onClick: () => n &&
|
|
1499
|
+
onClick: () => n && c({ name: n, vision: b, status: "DRAFT" }),
|
|
1501
1500
|
disabled: !n,
|
|
1502
1501
|
children: [
|
|
1503
1502
|
/* @__PURE__ */ e(j, {}),
|
|
@@ -1508,11 +1507,11 @@ function Za({
|
|
|
1508
1507
|
] })
|
|
1509
1508
|
] }) });
|
|
1510
1509
|
}
|
|
1511
|
-
function
|
|
1510
|
+
function Ya({
|
|
1512
1511
|
onCancel: a,
|
|
1513
|
-
onSubmit:
|
|
1512
|
+
onSubmit: c
|
|
1514
1513
|
}) {
|
|
1515
|
-
const [n, h] =
|
|
1514
|
+
const [n, h] = p(""), [b, d] = p(""), [l, _] = p("");
|
|
1516
1515
|
return /* @__PURE__ */ e("div", { className: t.modal, children: /* @__PURE__ */ i("div", { className: t.modalBody, children: [
|
|
1517
1516
|
/* @__PURE__ */ e("div", { className: t.modalTitle, children: "添加设计稿" }),
|
|
1518
1517
|
/* @__PURE__ */ e("label", { className: t.formLabel, children: "名称" }),
|
|
@@ -1521,7 +1520,7 @@ function ei({
|
|
|
1521
1520
|
{
|
|
1522
1521
|
className: t.formInput,
|
|
1523
1522
|
value: n,
|
|
1524
|
-
onChange: (
|
|
1523
|
+
onChange: (r) => h(r.target.value),
|
|
1525
1524
|
placeholder: "首页 / 登录页 / 后台..."
|
|
1526
1525
|
}
|
|
1527
1526
|
),
|
|
@@ -1530,8 +1529,8 @@ function ei({
|
|
|
1530
1529
|
"input",
|
|
1531
1530
|
{
|
|
1532
1531
|
className: t.formInput,
|
|
1533
|
-
value:
|
|
1534
|
-
onChange: (
|
|
1532
|
+
value: b,
|
|
1533
|
+
onChange: (r) => d(r.target.value),
|
|
1535
1534
|
placeholder: "https://... 或 Figma link"
|
|
1536
1535
|
}
|
|
1537
1536
|
),
|
|
@@ -1540,8 +1539,8 @@ function ei({
|
|
|
1540
1539
|
"textarea",
|
|
1541
1540
|
{
|
|
1542
1541
|
className: t.formTextarea,
|
|
1543
|
-
value:
|
|
1544
|
-
onChange: (
|
|
1542
|
+
value: l,
|
|
1543
|
+
onChange: (r) => _(r.target.value)
|
|
1545
1544
|
}
|
|
1546
1545
|
),
|
|
1547
1546
|
/* @__PURE__ */ i("div", { className: t.modalActions, children: [
|
|
@@ -1550,8 +1549,8 @@ function ei({
|
|
|
1550
1549
|
"button",
|
|
1551
1550
|
{
|
|
1552
1551
|
className: `${t.btn} ${t.btnPrimary}`,
|
|
1553
|
-
onClick: () =>
|
|
1554
|
-
disabled: !
|
|
1552
|
+
onClick: () => b && c({ name: n, fileUrl: b, description: l, assetType: "IMAGE" }),
|
|
1553
|
+
disabled: !b,
|
|
1555
1554
|
children: [
|
|
1556
1555
|
/* @__PURE__ */ e(j, {}),
|
|
1557
1556
|
" 添加"
|
|
@@ -1561,11 +1560,11 @@ function ei({
|
|
|
1561
1560
|
] })
|
|
1562
1561
|
] }) });
|
|
1563
1562
|
}
|
|
1564
|
-
function
|
|
1563
|
+
function Qa({
|
|
1565
1564
|
onCancel: a,
|
|
1566
|
-
onSubmit:
|
|
1565
|
+
onSubmit: c
|
|
1567
1566
|
}) {
|
|
1568
|
-
const [n, h] =
|
|
1567
|
+
const [n, h] = p(""), [b, d] = p(""), [l, _] = p("P1");
|
|
1569
1568
|
return /* @__PURE__ */ e("div", { className: t.modal, children: /* @__PURE__ */ i("div", { className: t.modalBody, children: [
|
|
1570
1569
|
/* @__PURE__ */ e("div", { className: t.modalTitle, children: "新增业务需求" }),
|
|
1571
1570
|
/* @__PURE__ */ e("label", { className: t.formLabel, children: "标题 *" }),
|
|
@@ -1574,7 +1573,7 @@ function ti({
|
|
|
1574
1573
|
{
|
|
1575
1574
|
className: t.formInput,
|
|
1576
1575
|
value: n,
|
|
1577
|
-
onChange: (
|
|
1576
|
+
onChange: (r) => h(r.target.value),
|
|
1578
1577
|
placeholder: "例如:支持用户拖拽上传设计稿"
|
|
1579
1578
|
}
|
|
1580
1579
|
),
|
|
@@ -1583,8 +1582,8 @@ function ti({
|
|
|
1583
1582
|
"textarea",
|
|
1584
1583
|
{
|
|
1585
1584
|
className: t.formTextarea,
|
|
1586
|
-
value:
|
|
1587
|
-
onChange: (
|
|
1585
|
+
value: b,
|
|
1586
|
+
onChange: (r) => d(r.target.value)
|
|
1588
1587
|
}
|
|
1589
1588
|
),
|
|
1590
1589
|
/* @__PURE__ */ e("label", { className: t.formLabel, children: "优先级" }),
|
|
@@ -1592,8 +1591,8 @@ function ti({
|
|
|
1592
1591
|
"select",
|
|
1593
1592
|
{
|
|
1594
1593
|
className: t.formInput,
|
|
1595
|
-
value:
|
|
1596
|
-
onChange: (
|
|
1594
|
+
value: l,
|
|
1595
|
+
onChange: (r) => _(r.target.value),
|
|
1597
1596
|
children: [
|
|
1598
1597
|
/* @__PURE__ */ e("option", { value: "P0", children: "P0 - 紧急" }),
|
|
1599
1598
|
/* @__PURE__ */ e("option", { value: "P1", children: "P1 - 重要" }),
|
|
@@ -1608,7 +1607,7 @@ function ti({
|
|
|
1608
1607
|
"button",
|
|
1609
1608
|
{
|
|
1610
1609
|
className: `${t.btn} ${t.btnPrimary}`,
|
|
1611
|
-
onClick: () => n &&
|
|
1610
|
+
onClick: () => n && c({ title: n, description: b, priority: l }),
|
|
1612
1611
|
disabled: !n,
|
|
1613
1612
|
children: [
|
|
1614
1613
|
/* @__PURE__ */ e(j, {}),
|
|
@@ -1619,16 +1618,16 @@ function ti({
|
|
|
1619
1618
|
] })
|
|
1620
1619
|
] }) });
|
|
1621
1620
|
}
|
|
1622
|
-
function
|
|
1623
|
-
const [
|
|
1624
|
-
if (!
|
|
1621
|
+
function Za({ items: a }) {
|
|
1622
|
+
const [c, n] = p(null), [h, b] = p(""), d = (r, f) => {
|
|
1623
|
+
if (!r) return f;
|
|
1625
1624
|
try {
|
|
1626
|
-
return JSON.parse(
|
|
1625
|
+
return JSON.parse(r);
|
|
1627
1626
|
} catch {
|
|
1628
1627
|
return f;
|
|
1629
1628
|
}
|
|
1630
|
-
},
|
|
1631
|
-
return
|
|
1629
|
+
}, l = h.trim() ? a.filter((r) => d(r.impactedPages, []).some((N) => N.includes(h.trim()))) : a, _ = (r) => r === "P0" ? t.priorityP0 : r === "P1" ? t.priorityP1 : t.priorityP2;
|
|
1630
|
+
return l.length > 0 && (!c || !l.find((r) => r.id === c.id)) && n(l[0]), /* @__PURE__ */ i("div", { className: t.bizLayout, children: [
|
|
1632
1631
|
/* @__PURE__ */ i("div", { className: t.bizList, children: [
|
|
1633
1632
|
/* @__PURE__ */ i("div", { className: t.bizFilter, children: [
|
|
1634
1633
|
/* @__PURE__ */ e(
|
|
@@ -1637,37 +1636,37 @@ function ai({ items: a }) {
|
|
|
1637
1636
|
className: t.formInput,
|
|
1638
1637
|
placeholder: "反向追溯: 输入页面编码 (如 ctc.4a.account)",
|
|
1639
1638
|
value: h,
|
|
1640
|
-
onChange: (
|
|
1639
|
+
onChange: (r) => b(r.target.value)
|
|
1641
1640
|
}
|
|
1642
1641
|
),
|
|
1643
1642
|
h && /* @__PURE__ */ i("span", { className: t.bizFilterHint, children: [
|
|
1644
|
-
|
|
1643
|
+
l.length,
|
|
1645
1644
|
" 篇稿件涉及该页面"
|
|
1646
1645
|
] })
|
|
1647
1646
|
] }),
|
|
1648
1647
|
/* @__PURE__ */ i("div", { className: t.bizListHeader, children: [
|
|
1649
1648
|
"业务理解 / 跨页面因果链 (",
|
|
1650
|
-
|
|
1649
|
+
l.length,
|
|
1651
1650
|
")"
|
|
1652
1651
|
] }),
|
|
1653
|
-
|
|
1652
|
+
l.length === 0 ? /* @__PURE__ */ e("div", { className: t.empty, children: h ? `没有稿件涉及「${h}」` : "暂无稿件, 请先在 DBA 层跑建表 SQL + 种子数据" }) : l.map((r) => {
|
|
1654
1653
|
var N;
|
|
1655
|
-
const f = d(
|
|
1654
|
+
const f = d(r.impactedPages, []);
|
|
1656
1655
|
return /* @__PURE__ */ i(
|
|
1657
1656
|
"div",
|
|
1658
1657
|
{
|
|
1659
|
-
className: `${t.bizItem} ${(
|
|
1660
|
-
onClick: () => n(
|
|
1658
|
+
className: `${t.bizItem} ${(c == null ? void 0 : c.id) === r.id ? t.bizItemActive : ""}`,
|
|
1659
|
+
onClick: () => n(r),
|
|
1661
1660
|
children: [
|
|
1662
1661
|
/* @__PURE__ */ i("div", { className: t.bizItemHeader, children: [
|
|
1663
|
-
/* @__PURE__ */ e("span", { className: `${t.priority} ${_(
|
|
1664
|
-
/* @__PURE__ */ e("span", { className: t.bizItemTitle, children:
|
|
1665
|
-
/* @__PURE__ */ e("span", { className: t.bizItemStatus, children:
|
|
1662
|
+
/* @__PURE__ */ e("span", { className: `${t.priority} ${_(r.priority)}`, children: r.priority }),
|
|
1663
|
+
/* @__PURE__ */ e("span", { className: t.bizItemTitle, children: r.title }),
|
|
1664
|
+
/* @__PURE__ */ e("span", { className: t.bizItemStatus, children: r.status })
|
|
1666
1665
|
] }),
|
|
1667
|
-
/* @__PURE__ */ e("div", { className: t.bizItemSummary, children:
|
|
1666
|
+
/* @__PURE__ */ e("div", { className: t.bizItemSummary, children: r.summary }),
|
|
1668
1667
|
/* @__PURE__ */ i("div", { className: t.bizItemMeta, children: [
|
|
1669
1668
|
"触发: ",
|
|
1670
|
-
((N = d(
|
|
1669
|
+
((N = d(r.triggerInfo, {})) == null ? void 0 : N.page) || "-",
|
|
1671
1670
|
/* @__PURE__ */ e("span", { className: t.bizItemDot, children: "•" }),
|
|
1672
1671
|
"影响 ",
|
|
1673
1672
|
f.length,
|
|
@@ -1675,42 +1674,42 @@ function ai({ items: a }) {
|
|
|
1675
1674
|
] })
|
|
1676
1675
|
]
|
|
1677
1676
|
},
|
|
1678
|
-
|
|
1677
|
+
r.id
|
|
1679
1678
|
);
|
|
1680
1679
|
})
|
|
1681
1680
|
] }),
|
|
1682
|
-
/* @__PURE__ */ e("div", { className: t.bizDetail, children:
|
|
1681
|
+
/* @__PURE__ */ e("div", { className: t.bizDetail, children: c ? /* @__PURE__ */ i(be, { children: [
|
|
1683
1682
|
/* @__PURE__ */ i("div", { className: t.bizDetailHeader, children: [
|
|
1684
|
-
/* @__PURE__ */ e("div", { className: t.bizDetailTitle, children:
|
|
1685
|
-
/* @__PURE__ */ e("div", { className: t.bizDetailCode, children:
|
|
1683
|
+
/* @__PURE__ */ e("div", { className: t.bizDetailTitle, children: c.title }),
|
|
1684
|
+
/* @__PURE__ */ e("div", { className: t.bizDetailCode, children: c.bizCode })
|
|
1686
1685
|
] }),
|
|
1687
1686
|
/* @__PURE__ */ i("div", { className: t.bizSection, children: [
|
|
1688
1687
|
/* @__PURE__ */ i("div", { className: t.bizSectionTitle, children: [
|
|
1689
|
-
/* @__PURE__ */ e(
|
|
1688
|
+
/* @__PURE__ */ e(se, {}),
|
|
1690
1689
|
" 触发信息"
|
|
1691
1690
|
] }),
|
|
1692
1691
|
(() => {
|
|
1693
|
-
const
|
|
1692
|
+
const r = d(c.triggerInfo, {});
|
|
1694
1693
|
return /* @__PURE__ */ i("div", { className: t.bizTriggerCard, children: [
|
|
1695
1694
|
/* @__PURE__ */ i("div", { children: [
|
|
1696
1695
|
/* @__PURE__ */ e("b", { children: "页面:" }),
|
|
1697
1696
|
" ",
|
|
1698
|
-
|
|
1697
|
+
r.page || "-"
|
|
1699
1698
|
] }),
|
|
1700
1699
|
/* @__PURE__ */ i("div", { children: [
|
|
1701
1700
|
/* @__PURE__ */ e("b", { children: "动作:" }),
|
|
1702
1701
|
" ",
|
|
1703
|
-
|
|
1702
|
+
r.action || "-"
|
|
1704
1703
|
] }),
|
|
1705
1704
|
/* @__PURE__ */ i("div", { children: [
|
|
1706
1705
|
/* @__PURE__ */ e("b", { children: "元素:" }),
|
|
1707
1706
|
" ",
|
|
1708
|
-
|
|
1707
|
+
r.element || "-"
|
|
1709
1708
|
] }),
|
|
1710
|
-
|
|
1709
|
+
r.preStates && r.preStates.length > 0 && /* @__PURE__ */ i("div", { children: [
|
|
1711
1710
|
/* @__PURE__ */ e("b", { children: "前置:" }),
|
|
1712
1711
|
" ",
|
|
1713
|
-
|
|
1712
|
+
r.preStates.join(" / ")
|
|
1714
1713
|
] })
|
|
1715
1714
|
] });
|
|
1716
1715
|
})()
|
|
@@ -1718,30 +1717,30 @@ function ai({ items: a }) {
|
|
|
1718
1717
|
/* @__PURE__ */ i("div", { className: t.bizSection, children: [
|
|
1719
1718
|
/* @__PURE__ */ i("div", { className: t.bizSectionTitle, children: [
|
|
1720
1719
|
"⚡ 跨页面连带效应 (",
|
|
1721
|
-
d(
|
|
1720
|
+
d(c.crossPageEffects, []).length,
|
|
1722
1721
|
")"
|
|
1723
1722
|
] }),
|
|
1724
|
-
/* @__PURE__ */ e("div", { className: t.bizEffects, children: d(
|
|
1723
|
+
/* @__PURE__ */ e("div", { className: t.bizEffects, children: d(c.crossPageEffects, []).map((r, f) => /* @__PURE__ */ i("div", { className: t.bizEffectCard, children: [
|
|
1725
1724
|
/* @__PURE__ */ i("div", { className: t.bizEffectPage, children: [
|
|
1726
1725
|
/* @__PURE__ */ e("span", { className: t.bizEffectArrow, children: "→" }),
|
|
1727
|
-
/* @__PURE__ */ e("span", { className: t.bizEffectPageCode, children:
|
|
1728
|
-
/* @__PURE__ */ e("span", { className: t.bizEffectDelay, children:
|
|
1726
|
+
/* @__PURE__ */ e("span", { className: t.bizEffectPageCode, children: r.page }),
|
|
1727
|
+
/* @__PURE__ */ e("span", { className: t.bizEffectDelay, children: r.delay })
|
|
1729
1728
|
] }),
|
|
1730
1729
|
/* @__PURE__ */ i("div", { className: t.bizEffectType, children: [
|
|
1731
1730
|
"[",
|
|
1732
|
-
|
|
1731
|
+
r.effectType,
|
|
1733
1732
|
"]"
|
|
1734
1733
|
] }),
|
|
1735
|
-
/* @__PURE__ */ e("div", { className: t.bizEffectDesc, children:
|
|
1734
|
+
/* @__PURE__ */ e("div", { className: t.bizEffectDesc, children: r.description })
|
|
1736
1735
|
] }, f)) })
|
|
1737
1736
|
] }),
|
|
1738
|
-
|
|
1737
|
+
c.story && /* @__PURE__ */ i("div", { className: t.bizSection, children: [
|
|
1739
1738
|
/* @__PURE__ */ e("div", { className: t.bizSectionTitle, children: "📖 故事正文" }),
|
|
1740
|
-
/* @__PURE__ */ e("pre", { className: t.bizStory, children:
|
|
1739
|
+
/* @__PURE__ */ e("pre", { className: t.bizStory, children: c.story })
|
|
1741
1740
|
] })
|
|
1742
1741
|
] }) : /* @__PURE__ */ e("div", { className: t.empty, children: "从左侧选择一份稿件查看因果链详情" }) })
|
|
1743
1742
|
] });
|
|
1744
1743
|
}
|
|
1745
1744
|
export {
|
|
1746
|
-
|
|
1745
|
+
si as default
|
|
1747
1746
|
};
|