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