@yuku123/z-team-component 0.2.155 → 0.2.157

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/{AdminModuleContent-BAShnAIR.js → AdminModuleContent-grqyiKb-.js} +6 -6
  2. package/dist/{ChangeLogView-CiWiTbaY.js → ChangeLogView-Go1H4cuB.js} +1 -1
  3. package/dist/{ComponentDoc-QtTYg0c4.js → ComponentDoc-i9x-jOqz.js} +3 -3
  4. package/dist/{InvitationManagementPage-Qul1ge__.js → InvitationManagementPage-BxFsccem.js} +1 -1
  5. package/dist/{OnboardingPage-DMRxUJo8.js → OnboardingPage-BYe-nO_8.js} +2 -2
  6. package/dist/{ScheduledTasks-CdkqVShe.js → ScheduledTasks-B86cq9BY.js} +9 -9
  7. package/dist/{SettingsModal-DudMt3BW.js → SettingsModal-BON9-t2g.js} +4 -4
  8. package/dist/{SystemShell-Ct-HNYSW.js → SystemShell-QG78CsZd.js} +7 -7
  9. package/dist/{admin-logs-CS1IbE03.js → admin-logs-DmkaW3TZ.js} +1 -1
  10. package/dist/{api-DdmMQ_0V.js → api-9xoGga7y.js} +1 -1
  11. package/dist/{api-D3uSsjOp.js → api-DsEZtDFC.js} +1 -1
  12. package/dist/{browser-ClU-u5ti.js → browser-BeVUYeUx.js} +1 -1
  13. package/dist/{createWorkspaceWsHandler-Uc9YF8Mh.js → createWorkspaceWsHandler-CLe1OCxg.js} +3 -3
  14. package/dist/{index-DeErjEn5.js → index-3EUcTELv.js} +2 -2
  15. package/dist/{index-DceAcEH8.js → index-AclHTK6X.js} +2 -2
  16. package/dist/{index-Z1jdxFKZ.js → index-B4s_Uz1i.js} +1 -1
  17. package/dist/{index-BGZ7I2nL.js → index-BCERgdGK.js} +3 -3
  18. package/dist/{index-D7pSn4Om.js → index-BWl9Agi1.js} +4 -4
  19. package/dist/{index-CfJ5P8S5.js → index-BZybJvqm.js} +2 -2
  20. package/dist/{index-BWUO377f.js → index-CBts0SyD.js} +2 -2
  21. package/dist/index-CTZxAP07.js +15 -0
  22. package/dist/index-CXl6O_EN.js +1346 -0
  23. package/dist/{index-B6_9C0yv.js → index-CiQW31H4.js} +4 -4
  24. package/dist/{index-DqvuIq26.js → index-CmQRyM2U.js} +1 -1
  25. package/dist/{index-EjT6XbT2.js → index-CugNjtGV.js} +4 -4
  26. package/dist/{index-BlwxPep3.js → index-CunnZXCp.js} +2 -2
  27. package/dist/{index-BR6D-uNC.js → index-D-ARPfA-.js} +2 -2
  28. package/dist/{index-DUfEqHX6.js → index-DAZnxQer.js} +3 -3
  29. package/dist/{index-CaQfsGC3.js → index-DRuXJBQJ.js} +1 -1
  30. package/dist/{index-Umea7jlI.js → index-DWazIgd8.js} +2 -2
  31. package/dist/{index-UY34Cph2.js → index-DmzlPhxA.js} +1 -1
  32. package/dist/{index-Ce9jReBl.js → index-DpK7wNn_.js} +3 -3
  33. package/dist/{index-BZYORaJn.js → index-Dv1iUHG-.js} +1 -1
  34. package/dist/{index-de3sqMYy.js → index-DwBNOmc4.js} +1 -1
  35. package/dist/{index-CyjOAuK6.js → index-HWUekAOG.js} +9 -9
  36. package/dist/{index-CFFQ1lh2.js → index-bufcg1Pp.js} +6 -6
  37. package/dist/{index-BvvarR-g.js → index-l_xtNeQT.js} +2 -2
  38. package/dist/{index-BIXaLaXB.js → index-owhTZEbg.js} +1 -1
  39. package/dist/{index-DNYL1maa.js → index-yBOJdMpf.js} +2 -2
  40. package/dist/index.js +1 -1
  41. package/dist/{instance-dAC2gZcg.js → instance-CXDIS3YR.js} +1 -1
  42. package/dist/{menuPermission-BoOeVlFP.js → menuPermission-CjErhwel.js} +3 -3
  43. package/dist/pages.js +1 -1
  44. package/dist/{send-default-agent-team-message-jeKGeBkb.js → send-default-agent-team-message-fjPpgP1u.js} +1 -1
  45. package/dist/{spark-md5-v09FreUw.js → spark-md5-CnLvqvIp.js} +1 -1
  46. package/dist/{training-CEOQ9bTj.js → training-yttJPQ6q.js} +1 -1
  47. package/dist/{webide-DgTBj3re.js → webide-DOGmKDqG.js} +3 -3
  48. package/dist/z-team-component.css +1 -1
  49. package/package.json +3 -2
  50. package/dist/index-CKHbBiow.js +0 -1318
  51. package/dist/index-CPOQkuGS.js +0 -20
@@ -1,1318 +0,0 @@
1
- import { jsxs as i, jsx as n, Fragment as Nt } from "react/jsx-runtime";
2
- import { ReloadOutlined as yt, SearchOutlined as ft, RightOutlined as wt, TeamOutlined as bt, MessageOutlined as Tt, AppstoreOutlined as Me, DeploymentUnitOutlined as Ct, BugOutlined as xe, CodeOutlined as ze } from "@ant-design/icons";
3
- import { Button as W, Select as Pe, Spin as he, Empty as f, Tag as k, Input as q, Modal as St } from "antd";
4
- import { useState as p, useCallback as _, useEffect as me, useMemo as Y, useRef as Rt } from "react";
5
- import { u as G } from "./ComponentDoc-QtTYg0c4.js";
6
- import { h as Q } from "./history-BlrA1eaW.js";
7
- import { menuItems as Pt } from "@yuku123/z-product-component";
8
- import { C as At } from "./createWorkspaceWsHandler-Uc9YF8Mh.js";
9
- import { l as kt, c as It } from "./api-DdmMQ_0V.js";
10
- import { SidebarShell as Et, MenuTree as Lt } from "@yuku123/z-frontend-common/ui";
11
- const Bt = "product-workspace", Ke = "productCode";
12
- function w(a) {
13
- if (!a.ok) throw new Error(`产品接口失败 (${a.status})`);
14
- return a.json();
15
- }
16
- async function Gt() {
17
- const a = G.getState().token, s = await fetch(`/api/product/list${a ? `?token=${encodeURIComponent(a)}` : ""}`, {
18
- credentials: "include",
19
- headers: { Accept: "application/json" }
20
- }), c = await w(s), o = Array.isArray(c) ? c : c == null ? void 0 : c.data;
21
- return Array.isArray(o) ? o.map((g) => ({
22
- ...g,
23
- productCode: String(g.productCode ?? g.code ?? ""),
24
- name: String(g.name ?? g.productCode ?? g.code ?? "未命名")
25
- })) : [];
26
- }
27
- async function $t(a) {
28
- try {
29
- const s = await fetch(`/api/product/${encodeURIComponent(a)}`, {
30
- credentials: "include",
31
- headers: { Accept: "application/json" }
32
- }), c = await w(s), o = (c == null ? void 0 : c.data) ?? c;
33
- return o && typeof o == "object" ? { ...o, productCode: a } : null;
34
- } catch {
35
- return null;
36
- }
37
- }
38
- async function Ft(a) {
39
- try {
40
- const s = await fetch(`/api/product/${encodeURIComponent(a)}/atelier/workspace`, {
41
- credentials: "include",
42
- headers: { Accept: "application/json" }
43
- }), c = await w(s), o = (c == null ? void 0 : c.data) ?? c;
44
- return o && typeof o == "object" && Array.isArray(o.files) ? o.files : Array.isArray(o) ? o : [];
45
- } catch {
46
- return [];
47
- }
48
- }
49
- async function Ot(a, s) {
50
- try {
51
- const c = await fetch(
52
- `/api/product/${encodeURIComponent(a)}/atelier/files/raw?path=${encodeURIComponent(s)}`,
53
- { credentials: "include", headers: { Accept: "text/html, application/json" } }
54
- );
55
- return c.ok ? await c.text() : null;
56
- } catch {
57
- return null;
58
- }
59
- }
60
- function qt(a) {
61
- var o;
62
- const s = (o = a.ext) == null ? void 0 : o.params;
63
- if (!s || typeof s != "object") return null;
64
- const c = s[Ke];
65
- return c == null ? null : String(c);
66
- }
67
- async function jt(a, s) {
68
- try {
69
- return (await kt(s)).filter((o) => qt(o) === a);
70
- } catch {
71
- return [];
72
- }
73
- }
74
- async function Ht(a, s, c) {
75
- return It(
76
- { scenario_code: Bt, name: s || `产品 ${a} 讨论组` },
77
- c,
78
- { [Ke]: a }
79
- );
80
- }
81
- function b(a) {
82
- return a && typeof a == "object" && "data" in a ? a.data : a;
83
- }
84
- async function Dt() {
85
- try {
86
- const a = await fetch("/api/product/group/list", {
87
- credentials: "include",
88
- headers: { Accept: "application/json" }
89
- }), s = await w(a), c = b(s);
90
- return Array.isArray(c) ? c : [];
91
- } catch {
92
- return [];
93
- }
94
- }
95
- async function Ut(a) {
96
- try {
97
- const s = await fetch("/api/product/group", {
98
- method: "POST",
99
- credentials: "include",
100
- headers: { Accept: "application/json", "Content-Type": "application/json" },
101
- body: JSON.stringify(a)
102
- }), c = await w(s);
103
- return b(c);
104
- } catch {
105
- return null;
106
- }
107
- }
108
- async function Mt(a) {
109
- try {
110
- const s = await fetch(`/api/product/${encodeURIComponent(a)}/app-binding/list`, {
111
- credentials: "include",
112
- headers: { Accept: "application/json" }
113
- }), c = await w(s), o = b(c);
114
- return Array.isArray(o) ? o : [];
115
- } catch {
116
- return [];
117
- }
118
- }
119
- async function xt(a, s) {
120
- try {
121
- const c = await fetch(`/api/product/${encodeURIComponent(a)}/app-binding`, {
122
- method: "POST",
123
- credentials: "include",
124
- headers: { Accept: "application/json", "Content-Type": "application/json" },
125
- body: JSON.stringify(s)
126
- }), o = await w(c);
127
- return b(o);
128
- } catch {
129
- return null;
130
- }
131
- }
132
- async function zt(a) {
133
- try {
134
- const s = await fetch(`/api/product/${encodeURIComponent(a)}/requirement/list`, {
135
- credentials: "include",
136
- headers: { Accept: "application/json" }
137
- }), c = await w(s), o = b(c);
138
- return Array.isArray(o) ? o : [];
139
- } catch {
140
- return [];
141
- }
142
- }
143
- async function Kt(a, s) {
144
- try {
145
- const c = await fetch(`/api/product/${encodeURIComponent(a)}/requirement`, {
146
- method: "POST",
147
- credentials: "include",
148
- headers: { Accept: "application/json", "Content-Type": "application/json" },
149
- body: JSON.stringify(s)
150
- }), o = await w(c);
151
- return b(o);
152
- } catch {
153
- return null;
154
- }
155
- }
156
- async function j(a, s) {
157
- try {
158
- const c = await fetch(
159
- `/api/product/${encodeURIComponent(a)}/${s}`,
160
- { credentials: "include", headers: { Accept: "application/json" } }
161
- ), o = await w(c), g = b(o);
162
- return Array.isArray(g) ? g : [];
163
- } catch {
164
- return [];
165
- }
166
- }
167
- async function Vt(a) {
168
- return j(a, "glossary/list");
169
- }
170
- async function Jt(a) {
171
- return j(a, "concept/list");
172
- }
173
- async function Qt(a) {
174
- return j(a, "scenario/list");
175
- }
176
- async function Wt(a) {
177
- return j(a, "design/list");
178
- }
179
- async function Yt(a) {
180
- return j(a, "chat/sessions");
181
- }
182
- async function Zt(a) {
183
- return j(a, "chat/proposals");
184
- }
185
- async function Xt() {
186
- try {
187
- const a = await fetch("/api/product/relation/types", {
188
- credentials: "include",
189
- headers: { Accept: "application/json" }
190
- }), s = await w(a), c = b(s);
191
- return c && typeof c == "object" ? c : {};
192
- } catch {
193
- return {};
194
- }
195
- }
196
- async function en() {
197
- try {
198
- const a = await fetch("/api/product/architecture", {
199
- credentials: "include",
200
- headers: { Accept: "application/json" }
201
- }), s = await w(a), c = b(s);
202
- return c && typeof c == "object" ? {
203
- products: Array.isArray(c.products) ? c.products : [],
204
- groups: Array.isArray(c.groups) ? c.groups : [],
205
- relations: Array.isArray(c.relations) ? c.relations : [],
206
- appBindings: Array.isArray(c.appBindings) ? c.appBindings : []
207
- } : { products: [], groups: [], relations: [], appBindings: [] };
208
- } catch {
209
- return { products: [], groups: [], relations: [], appBindings: [] };
210
- }
211
- }
212
- async function tn(a) {
213
- try {
214
- const s = await fetch("/api/product/relation", {
215
- method: "POST",
216
- credentials: "include",
217
- headers: { Accept: "application/json", "Content-Type": "application/json" },
218
- body: JSON.stringify(a)
219
- }), c = await w(s);
220
- return b(c);
221
- } catch {
222
- return null;
223
- }
224
- }
225
- async function nn(a) {
226
- try {
227
- return await fetch(`/api/product/relation/${a}`, {
228
- method: "DELETE",
229
- credentials: "include",
230
- headers: { Accept: "application/json" }
231
- }), !0;
232
- } catch {
233
- return !1;
234
- }
235
- }
236
- async function an(a, s) {
237
- try {
238
- const c = await fetch(`/api/product/${encodeURIComponent(a)}/requirement/${s.id}`, {
239
- method: "PUT",
240
- credentials: "include",
241
- headers: { Accept: "application/json", "Content-Type": "application/json" },
242
- body: JSON.stringify(s)
243
- }), o = await w(c);
244
- return b(o);
245
- } catch {
246
- return null;
247
- }
248
- }
249
- const cn = "_container_v1vhg_3", rn = "_header_v1vhg_11", sn = "_title_v1vhg_23", on = "_subtitle_v1vhg_30", ln = "_actions_v1vhg_36", dn = "_stats_v1vhg_42", pn = "_relForm_v1vhg_55", un = "_relFormLabel_v1vhg_66", hn = "_centerFill_v1vhg_72", mn = "_groups_v1vhg_79", vn = "_groupBlock_v1vhg_89", _n = "_groupHeader_v1vhg_95", gn = "_groupName_v1vhg_101", Nn = "_groupCount_v1vhg_107", yn = "_productGrid_v1vhg_112", fn = "_productCard_v1vhg_118", wn = "_cardHead_v1vhg_134", bn = "_cardName_v1vhg_141", Tn = "_cardTag_v1vhg_150", Cn = "_cardCode_v1vhg_156", Sn = "_cardDesc_v1vhg_161", Rn = "_cardSection_v1vhg_171", Pn = "_sectionLabel_v1vhg_180", An = "_bindList_v1vhg_185", kn = "_bindTag_v1vhg_191", In = "_relList_v1vhg_196", En = "_relRow_v1vhg_202", Ln = "_relTag_v1vhg_209", Bn = "_relTarget_v1vhg_215", Gn = "_relDel_v1vhg_225", h = {
250
- container: cn,
251
- header: rn,
252
- title: sn,
253
- subtitle: on,
254
- actions: ln,
255
- stats: dn,
256
- relForm: pn,
257
- relFormLabel: un,
258
- centerFill: hn,
259
- groups: mn,
260
- groupBlock: vn,
261
- groupHeader: _n,
262
- groupName: gn,
263
- groupCount: Nn,
264
- productGrid: yn,
265
- productCard: fn,
266
- cardHead: wn,
267
- cardName: bn,
268
- cardTag: Tn,
269
- cardCode: Cn,
270
- cardDesc: Sn,
271
- cardSection: Rn,
272
- sectionLabel: Pn,
273
- bindList: An,
274
- bindTag: kn,
275
- relList: In,
276
- relRow: En,
277
- relTag: Ln,
278
- relTarget: Bn,
279
- relDel: Gn
280
- };
281
- function $n() {
282
- const [a, s] = p({ products: [], groups: [], relations: [], appBindings: [] }), [c, o] = p({}), [g, L] = p(!0), [d, H] = p(null), [l, D] = p(null), [T, Z] = p("DEPENDS_ON"), $ = _(async () => {
283
- L(!0);
284
- try {
285
- const [u, v] = await Promise.all([en(), Xt()]);
286
- s(u), o(v);
287
- } finally {
288
- L(!1);
289
- }
290
- }, []);
291
- me(() => {
292
- $();
293
- }, [$]);
294
- const I = _(
295
- (u) => {
296
- if (!u) return null;
297
- const v = a.groups.find((m) => m.groupCode === u);
298
- return v ? v.name : u;
299
- },
300
- [a.groups]
301
- ), ve = Y(() => {
302
- const u = /* @__PURE__ */ new Map();
303
- for (const v of a.products) {
304
- const m = v.groupCode ?? null;
305
- u.has(m) || u.set(m, []), u.get(m).push(v);
306
- }
307
- return [...u.entries()].sort((v, m) => v[0] === null ? 1 : m[0] === null ? -1 : String(I(v[0])).localeCompare(String(I(m[0])), "zh"));
308
- }, [a.products, I]), X = _(
309
- (u) => a.appBindings.filter((v) => v.productCode === u),
310
- [a.appBindings]
311
- ), U = _(
312
- (u) => a.relations.filter((v) => v.productCode === u),
313
- [a.relations]
314
- ), C = _(
315
- (u) => {
316
- const v = a.products.find((m) => m.productCode === u);
317
- return v ? v.name : u;
318
- },
319
- [a.products]
320
- ), M = _(async () => {
321
- if (!d || !l || d === l) return;
322
- const u = await tn({
323
- productCode: d,
324
- relatedCode: l,
325
- relationType: T,
326
- description: `${C(d)} ${c[T] ?? T} ${C(l)}`
327
- });
328
- u && (s((v) => ({ ...v, relations: [...v.relations, u] })), H(null), D(null));
329
- }, [d, l, T, c, C]), E = Y(
330
- () => a.products.map((u) => ({
331
- value: u.productCode,
332
- label: `${u.name}(${u.productCode})`
333
- })),
334
- [a.products]
335
- );
336
- return /* @__PURE__ */ i("div", { className: h.container, children: [
337
- /* @__PURE__ */ i("div", { className: h.header, children: [
338
- /* @__PURE__ */ i("div", { children: [
339
- /* @__PURE__ */ n("h2", { className: h.title, children: "架构全景" }),
340
- /* @__PURE__ */ n("p", { className: h.subtitle, children: "租户下所有产品整顿成一张架构图:产品群 · 产品↔产品关系 · 挂接的中间件/应用" })
341
- ] }),
342
- /* @__PURE__ */ i("div", { className: h.actions, children: [
343
- /* @__PURE__ */ i("span", { className: h.stats, children: [
344
- /* @__PURE__ */ n("b", { children: a.products.length }),
345
- " 产品",
346
- /* @__PURE__ */ n("b", { children: a.groups.length }),
347
- " 群",
348
- /* @__PURE__ */ n("b", { children: a.relations.length }),
349
- " 关系",
350
- /* @__PURE__ */ n("b", { children: a.appBindings.filter((u) => u.appType === "INFRA").length }),
351
- " 基建"
352
- ] }),
353
- /* @__PURE__ */ n(W, { size: "small", icon: /* @__PURE__ */ n(yt, {}), onClick: () => void $(), children: "刷新" })
354
- ] })
355
- ] }),
356
- /* @__PURE__ */ i("div", { className: h.relForm, children: [
357
- /* @__PURE__ */ n("span", { className: h.relFormLabel, children: "新建产品关系:" }),
358
- /* @__PURE__ */ n(
359
- Pe,
360
- {
361
- size: "small",
362
- placeholder: "起点产品",
363
- value: d,
364
- onChange: H,
365
- options: E,
366
- style: { width: 200 },
367
- showSearch: !0,
368
- optionFilterProp: "label"
369
- }
370
- ),
371
- /* @__PURE__ */ n(
372
- Pe,
373
- {
374
- size: "small",
375
- placeholder: "关系类型",
376
- value: T,
377
- onChange: (u) => Z(u),
378
- style: { width: 130 },
379
- options: Object.entries(c).map(([u, v]) => ({ value: u, label: v }))
380
- }
381
- ),
382
- /* @__PURE__ */ n(
383
- Pe,
384
- {
385
- size: "small",
386
- placeholder: "终点产品",
387
- value: l,
388
- onChange: D,
389
- options: E,
390
- style: { width: 200 },
391
- showSearch: !0,
392
- optionFilterProp: "label"
393
- }
394
- ),
395
- /* @__PURE__ */ n(
396
- W,
397
- {
398
- size: "small",
399
- type: "primary",
400
- onClick: () => void M(),
401
- disabled: !d || !l || d === l,
402
- children: "建立关系"
403
- }
404
- )
405
- ] }),
406
- g ? /* @__PURE__ */ n("div", { className: h.centerFill, children: /* @__PURE__ */ n(he, {}) }) : a.products.length === 0 ? /* @__PURE__ */ n("div", { className: h.centerFill, children: /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "暂无产品,先在产品库创建" }) }) : /* @__PURE__ */ n("div", { className: h.groups, children: ve.map(([u, v]) => /* @__PURE__ */ i("div", { className: h.groupBlock, children: [
407
- /* @__PURE__ */ i("div", { className: h.groupHeader, children: [
408
- /* @__PURE__ */ n("span", { className: h.groupName, children: I(u) ? `📦 ${I(u)}` : "🗂 未分组" }),
409
- /* @__PURE__ */ i("span", { className: h.groupCount, children: [
410
- v.length,
411
- " 个产品"
412
- ] })
413
- ] }),
414
- /* @__PURE__ */ n("div", { className: h.productGrid, children: v.map((m) => {
415
- const ee = X(m.productCode ?? ""), x = U(m.productCode ?? "");
416
- return /* @__PURE__ */ i("div", { className: h.productCard, children: [
417
- /* @__PURE__ */ i("div", { className: h.cardHead, children: [
418
- /* @__PURE__ */ n("span", { className: h.cardName, title: m.name, children: m.name }),
419
- m.status && /* @__PURE__ */ n(k, { className: h.cardTag, children: m.status })
420
- ] }),
421
- /* @__PURE__ */ n("div", { className: h.cardCode, children: m.productCode }),
422
- m.description && /* @__PURE__ */ n("div", { className: h.cardDesc, title: m.description, children: m.description }),
423
- ee.length > 0 && /* @__PURE__ */ i("div", { className: h.cardSection, children: [
424
- /* @__PURE__ */ n("div", { className: h.sectionLabel, children: "挂接" }),
425
- /* @__PURE__ */ n("div", { className: h.bindList, children: ee.map((N) => /* @__PURE__ */ i(
426
- k,
427
- {
428
- className: h.bindTag,
429
- color: N.appType === "INFRA" ? "purple" : "geekblue",
430
- children: [
431
- N.appType === "INFRA" ? "🏗" : "🧩",
432
- " ",
433
- N.appName
434
- ]
435
- },
436
- N.id
437
- )) })
438
- ] }),
439
- x.length > 0 && /* @__PURE__ */ i("div", { className: h.cardSection, children: [
440
- /* @__PURE__ */ n("div", { className: h.sectionLabel, children: "关系" }),
441
- /* @__PURE__ */ n("div", { className: h.relList, children: x.map((N) => /* @__PURE__ */ i("div", { className: h.relRow, children: [
442
- /* @__PURE__ */ n(
443
- k,
444
- {
445
- className: h.relTag,
446
- color: N.relationType === "DEPENDS_ON" ? "orange" : N.relationType === "BUILT_ON" ? "cyan" : "blue",
447
- children: c[N.relationType] ?? N.relationType
448
- }
449
- ),
450
- /* @__PURE__ */ n("span", { className: h.relTarget, title: C(N.relatedCode), children: C(N.relatedCode) }),
451
- /* @__PURE__ */ n(
452
- "button",
453
- {
454
- type: "button",
455
- className: h.relDel,
456
- onClick: async () => {
457
- await nn(N.id), s((B) => ({
458
- ...B,
459
- relations: B.relations.filter((z) => z.id !== N.id)
460
- }));
461
- },
462
- title: "删除关系",
463
- children: "✕"
464
- }
465
- )
466
- ] }, N.id)) })
467
- ] })
468
- ] }, m.productCode);
469
- }) })
470
- ] }, u ?? "__none__")) })
471
- ] });
472
- }
473
- const Fn = "_container_1n33v_5", On = "_libraryView_1n33v_14", qn = "_libraryHeader_1n33v_22", jn = "_libraryHeadRow_1n33v_32", Hn = "_libraryTitle_1n33v_40", Dn = "_librarySubtitle_1n33v_47", Un = "_librarySearch_1n33v_53", Mn = "_libraryBody_1n33v_58", xn = "_productGrid_1n33v_65", zn = "_productCard_1n33v_71", Kn = "_cardCode_1n33v_91", Vn = "_cardName_1n33v_104", Jn = "_cardDesc_1n33v_113", Qn = "_cardFoot_1n33v_124", Wn = "_cardEnter_1n33v_132", Yn = "_cardTag_1n33v_140", Zn = "_left_1n33v_146", Xn = "_leftHeader_1n33v_156", ea = "_leftTitleRow_1n33v_162", ta = "_leftTitle_1n33v_162", na = "_backBtn_1n33v_179", aa = "_sectionBar_1n33v_209", ia = "_sectionTab_1n33v_219", ca = "_sectionTabActive_1n33v_241", ra = "_sectionIcon_1n33v_248", sa = "_leftBody_1n33v_253", oa = "_fileList_1n33v_264", la = "_fileTreeHint_1n33v_303", da = "_fileRow_1n33v_309", pa = "_fileRowActive_1n33v_323", ua = "_fileRowIcon_1n33v_327", ha = "_fileRowName_1n33v_332", ma = "_fileKindTag_1n33v_341", va = "_center_1n33v_349", _a = "_centerFill_1n33v_358", ga = "_renderArea_1n33v_413", Na = "_renderIframe_1n33v_423", ya = "_renderCode_1n33v_429", fa = "_right_1n33v_442", wa = "_chatSide_1n33v_453", ba = "_chatSideHeader_1n33v_459", Ta = "_chatSideTitle_1n33v_468", Ca = "_chatGroupList_1n33v_477", Sa = "_chatGroupRow_1n33v_486", Ra = "_chatGroupRowActive_1n33v_500", Pa = "_chatGroupName_1n33v_504", Aa = "_chatGroupTime_1n33v_513", ka = "_chatPane_1n33v_520", Ia = "_chatPaneHeader_1n33v_526", Ea = "_chatPaneTitle_1n33v_535", La = "_chatPaneBody_1n33v_544", Ba = "_groupChips_1n33v_555", Ga = "_groupChip_1n33v_555", $a = "_groupChipActive_1n33v_578", Fa = "_groupNewBtn_1n33v_589", Oa = "_cardGroup_1n33v_604", qa = "_overviewArea_1n33v_614", ja = "_overviewHeader_1n33v_619", Ha = "_overviewTitle_1n33v_623", Da = "_overviewSubtitle_1n33v_630", Ua = "_overviewTabs_1n33v_636", Ma = "_overviewTab_1n33v_636", xa = "_overviewTabActive_1n33v_659", za = "_overviewPanel_1n33v_669", Ka = "_reqForm_1n33v_677", Va = "_reqList_1n33v_683", Ja = "_reqRow_1n33v_689", Qa = "_reqTitle_1n33v_698", Wa = "_reqTag_1n33v_707", Ya = "_reqStatusTag_1n33v_713", Za = "_reqTime_1n33v_726", Xa = "_appForm_1n33v_733", ei = "_appTypeSelect_1n33v_740", ti = "_appList_1n33v_751", ni = "_appRow_1n33v_757", ai = "_appIcon_1n33v_766", ii = "_appName_1n33v_771", ci = "_appCode_1n33v_781", ri = "_appTag_1n33v_787", si = "_appGo_1n33v_793", oi = "_appInfraNote_1n33v_808", li = "_appUnbind_1n33v_814", di = "_statsRow_1n33v_831", pi = "_statItem_1n33v_842", ui = "_domainBlock_1n33v_856", hi = "_domainBlockTitle_1n33v_864", mi = "_domainEmpty_1n33v_871", vi = "_domainList_1n33v_879", _i = "_domainRow_1n33v_885", gi = "_domainName_1n33v_894", Ni = "_domainDesc_1n33v_908", yi = "_designHint_1n33v_919", fi = "_designList_1n33v_928", wi = "_designRow_1n33v_934", bi = "_designIcon_1n33v_943", Ti = "_designName_1n33v_948", Ci = "_designTime_1n33v_958", Si = "_overviewEntryBtn_1n33v_965", t = {
474
- container: Fn,
475
- libraryView: On,
476
- libraryHeader: qn,
477
- libraryHeadRow: jn,
478
- libraryTitle: Hn,
479
- librarySubtitle: Dn,
480
- librarySearch: Un,
481
- libraryBody: Mn,
482
- productGrid: xn,
483
- productCard: zn,
484
- cardCode: Kn,
485
- cardName: Vn,
486
- cardDesc: Jn,
487
- cardFoot: Qn,
488
- cardEnter: Wn,
489
- cardTag: Yn,
490
- left: Zn,
491
- leftHeader: Xn,
492
- leftTitleRow: ea,
493
- leftTitle: ta,
494
- backBtn: na,
495
- sectionBar: aa,
496
- sectionTab: ia,
497
- sectionTabActive: ca,
498
- sectionIcon: ra,
499
- leftBody: sa,
500
- fileList: oa,
501
- fileTreeHint: la,
502
- fileRow: da,
503
- fileRowActive: pa,
504
- fileRowIcon: ua,
505
- fileRowName: ha,
506
- fileKindTag: ma,
507
- center: va,
508
- centerFill: _a,
509
- renderArea: ga,
510
- renderIframe: Na,
511
- renderCode: ya,
512
- right: fa,
513
- chatSide: wa,
514
- chatSideHeader: ba,
515
- chatSideTitle: Ta,
516
- chatGroupList: Ca,
517
- chatGroupRow: Sa,
518
- chatGroupRowActive: Ra,
519
- chatGroupName: Pa,
520
- chatGroupTime: Aa,
521
- chatPane: ka,
522
- chatPaneHeader: Ia,
523
- chatPaneTitle: Ea,
524
- chatPaneBody: La,
525
- groupChips: Ba,
526
- groupChip: Ga,
527
- groupChipActive: $a,
528
- groupNewBtn: Fa,
529
- cardGroup: Oa,
530
- overviewArea: qa,
531
- overviewHeader: ja,
532
- overviewTitle: Ha,
533
- overviewSubtitle: Da,
534
- overviewTabs: Ua,
535
- overviewTab: Ma,
536
- overviewTabActive: xa,
537
- overviewPanel: za,
538
- reqForm: Ka,
539
- reqList: Va,
540
- reqRow: Ja,
541
- reqTitle: Qa,
542
- reqTag: Wa,
543
- reqStatusTag: Ya,
544
- reqTime: Za,
545
- appForm: Xa,
546
- appTypeSelect: ei,
547
- appList: ti,
548
- appRow: ni,
549
- appIcon: ai,
550
- appName: ii,
551
- appCode: ci,
552
- appTag: ri,
553
- appGo: si,
554
- appInfraNote: oi,
555
- appUnbind: li,
556
- statsRow: di,
557
- statItem: pi,
558
- domainBlock: ui,
559
- domainBlockTitle: hi,
560
- domainEmpty: mi,
561
- domainList: vi,
562
- domainRow: _i,
563
- domainName: gi,
564
- domainDesc: Ni,
565
- designHint: yi,
566
- designList: fi,
567
- designRow: wi,
568
- designIcon: bi,
569
- designName: Ti,
570
- designTime: Ci,
571
- overviewEntryBtn: Si
572
- };
573
- function Ri(a) {
574
- return {
575
- id: String(a.id),
576
- name: a.name,
577
- description: a.description ?? "",
578
- workspace_path: a.workspacePath || a.name,
579
- status: a.status,
580
- created_at: a.createTime ?? "",
581
- scenario_id: String(a.id),
582
- scenario_code: a.scenarioCode,
583
- scenario_name: a.scenarioName ?? a.name
584
- };
585
- }
586
- const Pi = [
587
- {
588
- title: "产品",
589
- icon: /* @__PURE__ */ n(Me, {}),
590
- items: [
591
- { key: "prod-library", label: "产品库", icon: /* @__PURE__ */ n(Me, {}) },
592
- {
593
- key: "prod-architecture",
594
- label: "架构全景",
595
- icon: /* @__PURE__ */ n(Ct, {}),
596
- title: "租户下所有产品的架构关系(产品↔产品、产品↔中间件)"
597
- },
598
- ...Pt.map((a) => ({
599
- key: a.key,
600
- label: a.label,
601
- icon: a.icon,
602
- path: a.key
603
- }))
604
- ]
605
- },
606
- {
607
- title: "测试",
608
- icon: /* @__PURE__ */ n(xe, {}),
609
- items: [
610
- {
611
- key: "qa-dashboard",
612
- label: "QA 总览",
613
- icon: /* @__PURE__ */ n(xe, {}),
614
- path: "/test/qa/dashboard"
615
- }
616
- ]
617
- },
618
- {
619
- title: "研发",
620
- icon: /* @__PURE__ */ n(ze, {}),
621
- items: [
622
- {
623
- key: "lc-apps",
624
- label: "应用研发",
625
- icon: /* @__PURE__ */ n(ze, {}),
626
- path: "/lc/apps"
627
- }
628
- ]
629
- }
630
- ];
631
- function Ve(a) {
632
- const s = a.toLowerCase();
633
- return /\.(html?|png|jpe?g|webp|svg|pdf)$/.test(s) ? "design" : /\.(md|markdown|txt|docx?)$/.test(s) ? "doc" : /\.(js|ts|tsx|jsx|java|py|json|yml|yaml|sql|css|vue|go|rs)$/.test(s) ? "code" : "other";
634
- }
635
- function Je(a, s = "") {
636
- const c = [];
637
- for (const o of a ?? []) {
638
- const g = o.path || `${s}${o.name ?? ""}`, L = o.name || g.split("/").pop() || g, d = o.type === "dir" || Array.isArray(o.children);
639
- c.push({ path: g, name: L, dir: d, kind: Ve(g), depth: s.split("/").filter(Boolean).length }), d && Array.isArray(o.children) && c.push(...Je(o.children, `${g}/`));
640
- }
641
- return c;
642
- }
643
- function qi() {
644
- const a = G((e) => e.token), s = G((e) => e.selectProject), [c, o] = p([]), [g, L] = p(!0), [d, H] = p(null), [l, D] = p(null), [T, Z] = p(!1), [$, I] = p([]), [ve, X] = p(!1), [U, C] = p(null), [M, E] = p(null), [u, v] = p("other"), [m, ee] = p(""), [x, N] = p("library"), [B, z] = p([]), [Ae, _e] = p(null), [te, ke] = p(!1), [Qe, ne] = p("list"), R = Rt(null), [ge, Ie] = p([]), [K, Ee] = p(null), [ae, Ne] = p([]), [ie, ye] = p([]), [P, F] = p("req"), [V, Le] = p(""), [ce, We] = p([]), [re, Ye] = p([]), [se, Ze] = p([]), [oe, Xe] = p([]), [le, et] = p([]), [Be, tt] = p([]), fe = _(
645
- async (e) => {
646
- H(e), Z(!0), C(null), E(null), ne("list"), _e(null), F("req");
647
- const r = await $t(e);
648
- D(r);
649
- const y = await jt(e, a);
650
- z(y);
651
- const S = await Mt(e);
652
- Ne(S);
653
- const ue = await zt(e);
654
- ye(ue);
655
- const [Re, J, ht, mt, vt, _t] = await Promise.all([
656
- Vt(e),
657
- Jt(e),
658
- Qt(e),
659
- Wt(e),
660
- Yt(e),
661
- Zt(e)
662
- ]);
663
- We(Re), Ye(J), Ze(ht), Xe(mt), et(vt), tt(_t), X(!0);
664
- const gt = await Ft(e);
665
- I(gt), X(!1);
666
- },
667
- [a]
668
- ), Ge = _(async () => {
669
- L(!0);
670
- try {
671
- const e = await Gt();
672
- o(e);
673
- const r = await Dt();
674
- Ie(r);
675
- try {
676
- const y = new URLSearchParams(window.location.search).get("product");
677
- if (y) {
678
- const S = e.find((ue) => ue.productCode === y);
679
- if (S) {
680
- fe(S.productCode);
681
- return;
682
- }
683
- }
684
- } catch {
685
- }
686
- } catch {
687
- o([]);
688
- } finally {
689
- L(!1);
690
- }
691
- }, [fe]);
692
- me(() => {
693
- Ge();
694
- }, [Ge]);
695
- const nt = _(() => {
696
- if (!d) return;
697
- const e = new URLSearchParams();
698
- e.set("product", d), l != null && l.name && e.set("productName", l.name), Q.push(`/lc/apps?${e.toString()}`);
699
- }, [d, l == null ? void 0 : l.name]), at = _(() => {
700
- if (!d) return;
701
- const e = new URLSearchParams();
702
- e.set("product", d), l != null && l.name && e.set("productName", l.name), Q.push(`/test/qa/dashboard?${e.toString()}`);
703
- }, [d, l == null ? void 0 : l.name]), we = _(() => {
704
- H(null), Z(!1), D(null), I([]), z([]), C(null), E(null), _e(null), ne("list"), R.current !== void 0 && G.setState({ currentProject: R.current }), R.current = void 0;
705
- }, []);
706
- me(() => {
707
- new URLSearchParams(window.location.search).get("view") === "architecture" && N("architecture");
708
- }, []);
709
- const $e = _(
710
- (e) => {
711
- T && we(), N(e);
712
- const r = new URL(window.location.href);
713
- r.searchParams.set("view", e), Q.replace(`${r.pathname}${r.search}${r.hash}`);
714
- },
715
- [T, we]
716
- ), Fe = _((e) => {
717
- Q.push(e);
718
- }, []), Oe = T ? null : x === "architecture" ? "prod-architecture" : "prod-library", qe = _(
719
- (e, r) => {
720
- e === "产品" ? $e(r.key === "prod-architecture" ? "architecture" : "library") : r.path && Fe(r.path);
721
- },
722
- [$e, Fe]
723
- ), it = Y(
724
- () => Pi.map((e) => ({
725
- key: e.title,
726
- title: e.title,
727
- items: e.items.map((r) => ({
728
- key: r.key,
729
- label: r.label,
730
- icon: r.icon,
731
- title: r.title,
732
- active: Oe === r.key,
733
- onClick: () => qe(e.title, r)
734
- }))
735
- })),
736
- [Oe, qe]
737
- ), je = _(async () => {
738
- if (!d || !V.trim()) return;
739
- const e = await Kt(d, {
740
- title: V.trim(),
741
- priority: "P2"
742
- });
743
- e && (ye((r) => [...r, e]), Le(""));
744
- }, [d, V]), ct = ["OPEN", "IN_PROGRESS", "DONE", "CLOSED"], [de] = p(ct), rt = _(
745
- async (e) => {
746
- if (!d || e.id == null) return;
747
- const r = String(e.status ?? "OPEN"), y = de.indexOf(r), S = de[(y + 1) % de.length];
748
- await an(d, { id: e.id, status: S }) && ye((Re) => Re.map((J) => J.id === e.id ? { ...J, status: S } : J));
749
- },
750
- [d, de]
751
- ), [A, pe] = p({
752
- appCode: "",
753
- appName: "",
754
- appType: "APP"
755
- }), st = _(async () => {
756
- if (!d || !A.appCode.trim() || !A.appName.trim()) return;
757
- const e = await xt(d, A);
758
- e && (Ne((r) => [...r, e]), pe({ appCode: "", appName: "", appType: "APP" }));
759
- }, [d, A]), ot = _(
760
- async (e) => {
761
- d && (await unbindProductApp(d, e), Ne((r) => r.filter((y) => y.id !== e)));
762
- },
763
- [d]
764
- ), [O, be] = p({ groupCode: "", name: "" }), [lt, Te] = p(!1), He = _(async () => {
765
- if (!O.groupCode.trim() || !O.name.trim()) return !1;
766
- const e = await Ut(O);
767
- return e ? (Ie((r) => [...r, e]), be({ groupCode: "", name: "" }), !0) : !1;
768
- }, [O]), dt = _(async () => {
769
- await He() && Te(!1);
770
- }, [He]), pt = _(
771
- async (e) => {
772
- if (!d) return;
773
- C(e), E(null);
774
- const r = Ve(e);
775
- v(r);
776
- const y = await Ot(d, e);
777
- E(y ?? "");
778
- },
779
- [d]
780
- ), Ce = _(
781
- async (e) => {
782
- if (!e) return;
783
- const r = Ri(e);
784
- R.current = G.getState().currentProject, _e(e.id), ne("chat"), s(r);
785
- },
786
- [s]
787
- ), ut = _(async () => {
788
- if (!(!d || te)) {
789
- ke(!0);
790
- try {
791
- const e = await Ht(
792
- d,
793
- `${(l == null ? void 0 : l.name) || d} · 讨论组 ${B.length + 1}`,
794
- a
795
- );
796
- z((r) => [...r, e]), await Ce(e);
797
- } finally {
798
- ke(!1);
799
- }
800
- }
801
- }, [d, te, B.length, l == null ? void 0 : l.name, a, Ce]);
802
- me(() => () => {
803
- R.current !== void 0 && G.setState({ currentProject: R.current });
804
- }, [Ae]);
805
- const Se = Y(() => Je($), [$]), De = Y(
806
- () => c.filter((e) => !(m && !e.name.includes(m) && !e.productCode.includes(m) || K && e.groupCode !== K)),
807
- [c, m, K]
808
- ), Ue = _(
809
- (e) => {
810
- if (!e) return null;
811
- const r = ge.find((y) => y.groupCode === e);
812
- return r ? r.name : e;
813
- },
814
- [ge]
815
- );
816
- return /* @__PURE__ */ i("div", { className: t.container, children: [
817
- /* @__PURE__ */ n(Et, { title: "产研", width: 220, storageKey: "ft_product_sidebar_collapsed", children: /* @__PURE__ */ n(Lt, { groups: it, defaultCollapsed: !0 }) }),
818
- T ? /* @__PURE__ */ i(Nt, { children: [
819
- /* @__PURE__ */ i("aside", { className: t.left, children: [
820
- /* @__PURE__ */ i("div", { className: t.leftHeader, children: [
821
- /* @__PURE__ */ i("div", { className: t.leftTitleRow, children: [
822
- /* @__PURE__ */ n("button", { type: "button", className: t.backBtn, onClick: we, title: "返回产品库", children: "←" }),
823
- /* @__PURE__ */ n("span", { className: t.leftTitle, title: (l == null ? void 0 : l.name) || d || "", children: (l == null ? void 0 : l.name) || d })
824
- ] }),
825
- /* @__PURE__ */ i("div", { className: t.sectionBar, children: [
826
- /* @__PURE__ */ i("span", { className: `${t.sectionTab} ${t.sectionTabActive}`, children: [
827
- /* @__PURE__ */ n("span", { className: t.sectionIcon, children: "📦" }),
828
- " 产品"
829
- ] }),
830
- /* @__PURE__ */ i("button", { type: "button", className: t.sectionTab, onClick: nt, title: "进入研发工作台(z-lc)", children: [
831
- /* @__PURE__ */ n("span", { className: t.sectionIcon, children: "💻" }),
832
- " 研发"
833
- ] }),
834
- /* @__PURE__ */ i("button", { type: "button", className: t.sectionTab, onClick: at, title: "进入测试工作台(QA)", children: [
835
- /* @__PURE__ */ n("span", { className: t.sectionIcon, children: "🧪" }),
836
- " 测试"
837
- ] })
838
- ] })
839
- ] }),
840
- /* @__PURE__ */ i("div", { className: t.leftBody, children: [
841
- /* @__PURE__ */ n(
842
- "button",
843
- {
844
- type: "button",
845
- className: t.overviewEntryBtn,
846
- onClick: () => {
847
- C(null), E(null);
848
- },
849
- title: "回到产品总览(沉淀台)",
850
- children: "📋 产品总览 · 返回沉淀台"
851
- }
852
- ),
853
- /* @__PURE__ */ n("div", { className: t.fileTreeHint, children: "文件(设计稿 · 文档 · 产物)" }),
854
- ve ? /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(he, { size: "small" }) }) : Se.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "产品下暂无文件" }) : /* @__PURE__ */ n("div", { className: t.fileList, children: Se.map((e) => /* @__PURE__ */ i(
855
- "div",
856
- {
857
- className: `${t.fileRow} ${U === e.path ? t.fileRowActive : ""}`,
858
- style: { paddingLeft: 12 + e.depth * 16 },
859
- onClick: () => !e.dir && pt(e.path),
860
- children: [
861
- /* @__PURE__ */ n("span", { className: t.fileRowIcon, children: e.dir ? "📁" : e.kind === "design" ? "🖼" : e.kind === "doc" ? "📄" : e.kind === "code" ? "{" : "◦" }),
862
- /* @__PURE__ */ n("span", { className: t.fileRowName, children: e.name }),
863
- e.kind === "design" && /* @__PURE__ */ n(k, { className: t.fileKindTag, color: "blue", children: "设计稿" })
864
- ]
865
- },
866
- e.path
867
- )) })
868
- ] })
869
- ] }),
870
- /* @__PURE__ */ n("main", { className: t.center, children: U == null ? /* @__PURE__ */ i("div", { className: t.overviewArea, children: [
871
- /* @__PURE__ */ i("div", { className: t.overviewHeader, children: [
872
- /* @__PURE__ */ n("h2", { className: t.overviewTitle, children: "产品总览" }),
873
- /* @__PURE__ */ n("p", { className: t.overviewSubtitle, children: "「关于这个产品的一切」沉淀在这里:需求 · 应用群 · 领域资产 · 设计稿 · 聊天蒸馏" })
874
- ] }),
875
- /* @__PURE__ */ i("div", { className: t.statsRow, children: [
876
- /* @__PURE__ */ i("span", { className: t.statItem, children: [
877
- /* @__PURE__ */ n("b", { children: ie.length }),
878
- " 需求"
879
- ] }),
880
- /* @__PURE__ */ i("span", { className: t.statItem, children: [
881
- /* @__PURE__ */ n("b", { children: ae.length }),
882
- " 应用"
883
- ] }),
884
- /* @__PURE__ */ i("span", { className: t.statItem, children: [
885
- /* @__PURE__ */ n("b", { children: ce.length }),
886
- " 术语"
887
- ] }),
888
- /* @__PURE__ */ i("span", { className: t.statItem, children: [
889
- /* @__PURE__ */ n("b", { children: re.length }),
890
- " 概念"
891
- ] }),
892
- /* @__PURE__ */ i("span", { className: t.statItem, children: [
893
- /* @__PURE__ */ n("b", { children: se.length }),
894
- " 专家团"
895
- ] }),
896
- /* @__PURE__ */ i("span", { className: t.statItem, children: [
897
- /* @__PURE__ */ n("b", { children: oe.length }),
898
- " 设计稿"
899
- ] }),
900
- /* @__PURE__ */ i("span", { className: t.statItem, children: [
901
- /* @__PURE__ */ n("b", { children: le.length }),
902
- " 会话"
903
- ] }),
904
- /* @__PURE__ */ i("span", { className: t.statItem, children: [
905
- /* @__PURE__ */ n("b", { children: Se.filter((e) => !e.dir).length }),
906
- " 文件"
907
- ] })
908
- ] }),
909
- /* @__PURE__ */ i("div", { className: t.overviewTabs, children: [
910
- /* @__PURE__ */ i(
911
- "button",
912
- {
913
- type: "button",
914
- className: `${t.overviewTab} ${P === "req" ? t.overviewTabActive : ""}`,
915
- onClick: () => F("req"),
916
- children: [
917
- "需求(",
918
- ie.length,
919
- ")"
920
- ]
921
- }
922
- ),
923
- /* @__PURE__ */ i(
924
- "button",
925
- {
926
- type: "button",
927
- className: `${t.overviewTab} ${P === "apps" ? t.overviewTabActive : ""}`,
928
- onClick: () => F("apps"),
929
- children: [
930
- "应用群(",
931
- ae.length,
932
- ")"
933
- ]
934
- }
935
- ),
936
- /* @__PURE__ */ i(
937
- "button",
938
- {
939
- type: "button",
940
- className: `${t.overviewTab} ${P === "domain" ? t.overviewTabActive : ""}`,
941
- onClick: () => F("domain"),
942
- children: [
943
- "领域资产(",
944
- ce.length + re.length + se.length,
945
- ")"
946
- ]
947
- }
948
- ),
949
- /* @__PURE__ */ i(
950
- "button",
951
- {
952
- type: "button",
953
- className: `${t.overviewTab} ${P === "design" ? t.overviewTabActive : ""}`,
954
- onClick: () => F("design"),
955
- children: [
956
- "设计稿(",
957
- oe.length,
958
- ")"
959
- ]
960
- }
961
- ),
962
- /* @__PURE__ */ i(
963
- "button",
964
- {
965
- type: "button",
966
- className: `${t.overviewTab} ${P === "chat" ? t.overviewTabActive : ""}`,
967
- onClick: () => F("chat"),
968
- children: [
969
- "聊天蒸馏(",
970
- le.length,
971
- ")"
972
- ]
973
- }
974
- )
975
- ] }),
976
- P === "req" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
977
- /* @__PURE__ */ i("div", { className: t.reqForm, children: [
978
- /* @__PURE__ */ n(
979
- q,
980
- {
981
- placeholder: "新增需求标题(针对本产品)",
982
- value: V,
983
- onChange: (e) => Le(e.target.value),
984
- onPressEnter: () => void je(),
985
- style: { flex: 1 }
986
- }
987
- ),
988
- /* @__PURE__ */ n(W, { type: "primary", onClick: () => void je(), disabled: !V.trim(), children: "添加需求" })
989
- ] }),
990
- ie.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有需求,先落一条" }) : /* @__PURE__ */ n("div", { className: t.reqList, children: ie.map((e) => /* @__PURE__ */ i("div", { className: t.reqRow, children: [
991
- /* @__PURE__ */ n("span", { className: t.reqTitle, title: e.title, children: e.title }),
992
- /* @__PURE__ */ n(k, { className: t.reqTag, color: e.priority === "P0" ? "red" : e.priority === "P1" ? "orange" : "blue", children: e.priority || "P2" }),
993
- /* @__PURE__ */ n(
994
- k,
995
- {
996
- className: t.reqStatusTag,
997
- onClick: () => void rt(e),
998
- title: "点击流转状态(OPEN → IN_PROGRESS → DONE → CLOSED)",
999
- children: e.status || "OPEN"
1000
- }
1001
- ),
1002
- /* @__PURE__ */ n("span", { className: t.reqTime, children: String(e.createdAt ?? "").slice(0, 10) })
1003
- ] }, e.id)) })
1004
- ] }) : P === "apps" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
1005
- /* @__PURE__ */ i("div", { className: t.appForm, children: [
1006
- /* @__PURE__ */ n(
1007
- q,
1008
- {
1009
- placeholder: "应用编码(如 z-lc 应用 code)",
1010
- value: A.appCode,
1011
- onChange: (e) => pe((r) => ({ ...r, appCode: e.target.value })),
1012
- style: { flex: 1 }
1013
- }
1014
- ),
1015
- /* @__PURE__ */ n(
1016
- q,
1017
- {
1018
- placeholder: "应用名称",
1019
- value: A.appName,
1020
- onChange: (e) => pe((r) => ({ ...r, appName: e.target.value })),
1021
- style: { width: 150 }
1022
- }
1023
- ),
1024
- /* @__PURE__ */ i(
1025
- "select",
1026
- {
1027
- className: t.appTypeSelect,
1028
- value: A.appType,
1029
- onChange: (e) => pe((r) => ({ ...r, appType: e.target.value })),
1030
- children: [
1031
- /* @__PURE__ */ n("option", { value: "APP", children: "应用" }),
1032
- /* @__PURE__ */ n("option", { value: "INFRA", children: "基建" })
1033
- ]
1034
- }
1035
- ),
1036
- /* @__PURE__ */ n(
1037
- W,
1038
- {
1039
- type: "primary",
1040
- onClick: () => void st(),
1041
- disabled: !A.appCode.trim() || !A.appName.trim(),
1042
- children: "绑定"
1043
- }
1044
- )
1045
- ] }),
1046
- ae.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有应用群,绑定支撑这个产品的应用/基建" }) : /* @__PURE__ */ n("div", { className: t.appList, children: ae.map((e) => /* @__PURE__ */ i("div", { className: t.appRow, children: [
1047
- /* @__PURE__ */ n("span", { className: t.appIcon, children: e.appType === "INFRA" ? "🏗" : "🧩" }),
1048
- /* @__PURE__ */ n("span", { className: t.appName, title: e.appName, children: e.appName }),
1049
- /* @__PURE__ */ n("span", { className: t.appCode, children: e.appCode }),
1050
- /* @__PURE__ */ n(
1051
- k,
1052
- {
1053
- className: t.appTag,
1054
- color: e.appType === "INFRA" ? "purple" : "geekblue",
1055
- children: e.appType === "INFRA" ? "基建" : "应用"
1056
- }
1057
- ),
1058
- e.appType === "APP" ? /* @__PURE__ */ n(
1059
- "button",
1060
- {
1061
- type: "button",
1062
- className: t.appGo,
1063
- onClick: () => {
1064
- const r = new URLSearchParams();
1065
- r.set("product", d || ""), l != null && l.name && r.set("productName", l.name), r.set("app", e.appCode), Q.push(`/lc/apps?${r.toString()}`);
1066
- },
1067
- children: "去研发"
1068
- }
1069
- ) : /* @__PURE__ */ n("span", { className: t.appInfraNote, children: "横切多产品" }),
1070
- /* @__PURE__ */ n(
1071
- "button",
1072
- {
1073
- type: "button",
1074
- className: t.appUnbind,
1075
- onClick: () => void ot(e.id),
1076
- title: "解绑",
1077
- children: "✕"
1078
- }
1079
- )
1080
- ] }, e.id)) })
1081
- ] }) : P === "domain" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
1082
- /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1083
- /* @__PURE__ */ n("div", { className: t.domainBlockTitle, children: "📖 统一语言 · 术语" }),
1084
- ce.length === 0 ? /* @__PURE__ */ n("div", { className: t.domainEmpty, children: "还没有术语,先在对话里对齐统一语言" }) : /* @__PURE__ */ n("div", { className: t.domainList, children: ce.map((e, r) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1085
- /* @__PURE__ */ n("span", { className: t.domainName, children: String(e.term ?? e.term_code ?? "") }),
1086
- /* @__PURE__ */ n("span", { className: t.domainDesc, children: String(e.definition ?? "") })
1087
- ] }, String(e.id ?? r))) })
1088
- ] }),
1089
- /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1090
- /* @__PURE__ */ n("div", { className: t.domainBlockTitle, children: "🧬 领域概念" }),
1091
- re.length === 0 ? /* @__PURE__ */ n("div", { className: t.domainEmpty, children: "还没有概念模型" }) : /* @__PURE__ */ n("div", { className: t.domainList, children: re.map((e, r) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1092
- /* @__PURE__ */ n("span", { className: t.domainName, children: String(e.name ?? e.code ?? "") }),
1093
- /* @__PURE__ */ n("span", { className: t.domainDesc, children: String(e.description ?? "") })
1094
- ] }, String(e.id ?? r))) })
1095
- ] }),
1096
- /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1097
- /* @__PURE__ */ n("div", { className: t.domainBlockTitle, children: "🎬 用户专家团" }),
1098
- se.length === 0 ? /* @__PURE__ */ n("div", { className: t.domainEmpty, children: "还没有专家团,描述目标用户的典型操作链路" }) : /* @__PURE__ */ n("div", { className: t.domainList, children: se.map((e, r) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1099
- /* @__PURE__ */ n("span", { className: t.domainName, children: String(e.title ?? e.name ?? "") }),
1100
- /* @__PURE__ */ n("span", { className: t.domainDesc, children: String(e.description ?? "") })
1101
- ] }, String(e.id ?? r))) })
1102
- ] })
1103
- ] }) : P === "design" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
1104
- /* @__PURE__ */ n("div", { className: t.designHint, children: "设计稿在左侧文件树(标注「设计稿」标签);点选后在中间渲染区直渲 raw HTML" }),
1105
- oe.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有设计稿记录" }) : /* @__PURE__ */ n("div", { className: t.designList, children: oe.map((e, r) => /* @__PURE__ */ i("div", { className: t.designRow, children: [
1106
- /* @__PURE__ */ n("span", { className: t.designIcon, children: "🖼" }),
1107
- /* @__PURE__ */ n("span", { className: t.designName, children: String(e.title ?? e.name ?? "") }),
1108
- /* @__PURE__ */ n("span", { className: t.designTime, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 10) })
1109
- ] }, String(e.id ?? r))) })
1110
- ] }) : /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
1111
- /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1112
- /* @__PURE__ */ n("div", { className: t.domainBlockTitle, children: "💬 群聊会话" }),
1113
- le.length === 0 ? /* @__PURE__ */ n("div", { className: t.domainEmpty, children: "还没有群聊会话,右侧「发起聊天」开始" }) : /* @__PURE__ */ n("div", { className: t.domainList, children: le.map((e, r) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1114
- /* @__PURE__ */ n("span", { className: t.domainName, children: String(e.title ?? e.session_code ?? "") }),
1115
- /* @__PURE__ */ n("span", { className: t.domainDesc, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 16).replace("T", " ") })
1116
- ] }, String(e.id ?? r))) })
1117
- ] }),
1118
- /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1119
- /* @__PURE__ */ n("div", { className: t.domainBlockTitle, children: "📌 蒸馏提案" }),
1120
- Be.length === 0 ? /* @__PURE__ */ n("div", { className: t.domainEmpty, children: "还没有提案(聊天中沉淀的需求/设计提案会出现在这里)" }) : /* @__PURE__ */ n("div", { className: t.domainList, children: Be.map((e, r) => {
1121
- let y = {};
1122
- try {
1123
- y = JSON.parse(String(e.payload ?? "{}"));
1124
- } catch {
1125
- }
1126
- const S = String(e.proposal_type ?? "requirement");
1127
- return /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1128
- /* @__PURE__ */ i("span", { className: t.domainName, children: [
1129
- /* @__PURE__ */ n(k, { className: t.reqTag, color: S === "design" ? "geekblue" : "blue", children: S }),
1130
- String(y.title ?? "")
1131
- ] }),
1132
- /* @__PURE__ */ n("span", { className: t.domainDesc, children: String(y.description ?? "") })
1133
- ] }, String(e.id ?? r));
1134
- }) })
1135
- ] })
1136
- ] })
1137
- ] }) : M == null ? /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(he, {}) }) : /* @__PURE__ */ n("div", { className: t.renderArea, children: u === "design" ? (
1138
- /* 设计稿:raw 通常为 HTML → iframe srcdoc 渲染 */
1139
- /* @__PURE__ */ n(
1140
- "iframe",
1141
- {
1142
- className: t.renderIframe,
1143
- srcDoc: M,
1144
- title: U,
1145
- sandbox: "allow-scripts allow-same-origin"
1146
- }
1147
- )
1148
- ) : /* @__PURE__ */ n("pre", { className: t.renderCode, children: M || "(空文件)" }) }) }),
1149
- /* @__PURE__ */ n("aside", { className: t.right, children: Qe === "list" ? /* @__PURE__ */ i("div", { className: t.chatSide, children: [
1150
- /* @__PURE__ */ i("div", { className: t.chatSideHeader, children: [
1151
- /* @__PURE__ */ i("span", { className: t.chatSideTitle, children: [
1152
- /* @__PURE__ */ n(bt, {}),
1153
- " 聊天组"
1154
- ] }),
1155
- /* @__PURE__ */ i(
1156
- W,
1157
- {
1158
- size: "small",
1159
- type: "primary",
1160
- ghost: !0,
1161
- loading: te,
1162
- onClick: ut,
1163
- children: [
1164
- /* @__PURE__ */ n(Tt, {}),
1165
- " 发起聊天"
1166
- ]
1167
- }
1168
- )
1169
- ] }),
1170
- /* @__PURE__ */ n("div", { className: t.chatGroupList, children: B.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有聊天组,点「发起聊天」开始" }) : B.map((e) => /* @__PURE__ */ i(
1171
- "div",
1172
- {
1173
- className: `${t.chatGroupRow} ${Ae === e.id ? t.chatGroupRowActive : ""}`,
1174
- onClick: () => !te && Ce(e),
1175
- children: [
1176
- /* @__PURE__ */ n("span", { className: t.chatGroupName, title: e.name, children: e.name }),
1177
- /* @__PURE__ */ n("span", { className: t.chatGroupTime, children: String(e.createTime ?? "").slice(5, 16).replace("T", " ") })
1178
- ]
1179
- },
1180
- e.id
1181
- )) })
1182
- ] }) : /* @__PURE__ */ i("div", { className: t.chatPane, children: [
1183
- /* @__PURE__ */ i("div", { className: t.chatPaneHeader, children: [
1184
- /* @__PURE__ */ n(
1185
- "button",
1186
- {
1187
- type: "button",
1188
- className: t.backBtn,
1189
- onClick: () => {
1190
- ne("list"), R.current !== void 0 && G.setState({ currentProject: R.current }), R.current = void 0;
1191
- },
1192
- title: "返回聊天组列表",
1193
- children: "←"
1194
- }
1195
- ),
1196
- /* @__PURE__ */ i("span", { className: t.chatPaneTitle, children: [
1197
- "群聊 · ",
1198
- (l == null ? void 0 : l.name) || d
1199
- ] })
1200
- ] }),
1201
- /* @__PURE__ */ n("div", { className: t.chatPaneBody, children: /* @__PURE__ */ n(At, { hideTabs: !0 }) })
1202
- ] }) })
1203
- ] }) : x === "architecture" ? (
1204
- /* ═══ 架构全景:架构语言的表达面 ═══ */
1205
- /* @__PURE__ */ n($n, {})
1206
- ) : (
1207
- /* ═══ 产品库视图:全宽产品卡片网格,点卡片直接进入 ═══ */
1208
- /* @__PURE__ */ i("div", { className: t.libraryView, children: [
1209
- /* @__PURE__ */ i("div", { className: t.libraryHeader, children: [
1210
- /* @__PURE__ */ i("div", { className: t.libraryHeadRow, children: [
1211
- /* @__PURE__ */ i("div", { children: [
1212
- /* @__PURE__ */ n("h2", { className: t.libraryTitle, children: "产品库" }),
1213
- /* @__PURE__ */ n("p", { className: t.librarySubtitle, children: "选择产品进入工作区:文件 · 设计稿 · 群聊 · 应用群" })
1214
- ] }),
1215
- /* @__PURE__ */ n(
1216
- q,
1217
- {
1218
- prefix: /* @__PURE__ */ n(ft, {}),
1219
- placeholder: "搜索产品",
1220
- value: m,
1221
- onChange: (e) => ee(e.target.value),
1222
- allowClear: !0,
1223
- className: t.librarySearch
1224
- }
1225
- )
1226
- ] }),
1227
- /* @__PURE__ */ i("div", { className: t.groupChips, children: [
1228
- /* @__PURE__ */ n(
1229
- "button",
1230
- {
1231
- type: "button",
1232
- className: `${t.groupChip} ${K === null ? t.groupChipActive : ""}`,
1233
- onClick: () => Ee(null),
1234
- children: "全部"
1235
- }
1236
- ),
1237
- ge.map((e) => /* @__PURE__ */ n(
1238
- "button",
1239
- {
1240
- type: "button",
1241
- className: `${t.groupChip} ${K === e.groupCode ? t.groupChipActive : ""}`,
1242
- onClick: () => Ee(e.groupCode),
1243
- title: e.description || e.name,
1244
- children: e.name
1245
- },
1246
- e.groupCode
1247
- )),
1248
- /* @__PURE__ */ n(
1249
- "button",
1250
- {
1251
- type: "button",
1252
- className: t.groupNewBtn,
1253
- onClick: () => Te(!0),
1254
- title: "新建产品群",
1255
- children: "+ 新建产品群"
1256
- }
1257
- )
1258
- ] })
1259
- ] }),
1260
- /* @__PURE__ */ n("div", { className: t.libraryBody, children: g ? /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(he, {}) }) : De.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "暂无产品" }) : /* @__PURE__ */ n("div", { className: t.productGrid, children: De.map((e) => /* @__PURE__ */ i(
1261
- "button",
1262
- {
1263
- type: "button",
1264
- className: t.productCard,
1265
- onClick: () => void fe(e.productCode),
1266
- children: [
1267
- /* @__PURE__ */ n("span", { className: t.cardCode, children: e.productCode }),
1268
- /* @__PURE__ */ n("span", { className: t.cardName, title: e.name, children: e.name }),
1269
- /* @__PURE__ */ n("span", { className: t.cardDesc, children: e.description || "暂无产品描述" }),
1270
- /* @__PURE__ */ i("span", { className: t.cardFoot, children: [
1271
- /* @__PURE__ */ i("span", { className: t.cardEnter, children: [
1272
- "进入产品 ",
1273
- /* @__PURE__ */ n(wt, {})
1274
- ] }),
1275
- Ue(e.groupCode) && /* @__PURE__ */ n("span", { className: t.cardGroup, children: Ue(e.groupCode) }),
1276
- e.status && /* @__PURE__ */ n(k, { className: t.cardTag, children: e.status })
1277
- ] })
1278
- ]
1279
- },
1280
- e.productCode
1281
- )) }) }),
1282
- /* @__PURE__ */ n(
1283
- St,
1284
- {
1285
- title: "新建产品群",
1286
- open: lt,
1287
- onOk: () => void dt(),
1288
- onCancel: () => Te(!1),
1289
- okText: "创建",
1290
- cancelText: "取消",
1291
- destroyOnClose: !0,
1292
- children: /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 12, paddingTop: 8 }, children: [
1293
- /* @__PURE__ */ n(
1294
- q,
1295
- {
1296
- placeholder: "群码(唯一标识,如 ppt-studio)",
1297
- value: O.groupCode,
1298
- onChange: (e) => be((r) => ({ ...r, groupCode: e.target.value }))
1299
- }
1300
- ),
1301
- /* @__PURE__ */ n(
1302
- q,
1303
- {
1304
- placeholder: "群名(如 PPT 智造群)",
1305
- value: O.name,
1306
- onChange: (e) => be((r) => ({ ...r, name: e.target.value }))
1307
- }
1308
- )
1309
- ] })
1310
- }
1311
- )
1312
- ] })
1313
- )
1314
- ] });
1315
- }
1316
- export {
1317
- qi as default
1318
- };