@yuku123/z-team-component 0.2.171 → 0.2.173

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 (49) hide show
  1. package/dist/{AdminModuleContent-B_ckh_Z8.js → AdminModuleContent-Da2tDWNI.js} +6 -6
  2. package/dist/{ChangeLogView-Ctv1qx7L.js → ChangeLogView-BHywiSUR.js} +1 -1
  3. package/dist/{ComponentDoc-gqq0sscL.js → ComponentDoc-CaV1hSNj.js} +3 -3
  4. package/dist/{InvitationManagementPage-D8tfNdQ-.js → InvitationManagementPage-7OuInBOY.js} +1 -1
  5. package/dist/{OnboardingPage-CVBsaWwo.js → OnboardingPage-Dl-vQvU7.js} +2 -2
  6. package/dist/{ScheduledTasks-Q_uXWIkv.js → ScheduledTasks-veBUyW8c.js} +9 -9
  7. package/dist/{SettingsModal-C7nHfX0n.js → SettingsModal-BCd-NWTT.js} +4 -4
  8. package/dist/{SystemShell-TINJfhUf.js → SystemShell-loZ7_gk5.js} +7 -7
  9. package/dist/{admin-logs-D6bPMpMd.js → admin-logs-K7GGNXGX.js} +1 -1
  10. package/dist/{api-D8e7ei5e.js → api-CdlPdxUE.js} +1 -1
  11. package/dist/{api-BtTKba9I.js → api-DyAzM11K.js} +1 -1
  12. package/dist/{browser-D2GbGDtM.js → browser-DY26-BH2.js} +1 -1
  13. package/dist/{createWorkspaceWsHandler-nWmIYOqA.js → createWorkspaceWsHandler-6m1aBJJG.js} +3 -3
  14. package/dist/{index-54TlOlq1.js → index-2jc9p1Hr.js} +2 -2
  15. package/dist/{index-DNfLiozD.js → index-B3hDwkY-.js} +4 -4
  16. package/dist/{index-CVndM4zo.js → index-BNcorZxd.js} +1 -1
  17. package/dist/{index-C6cXsTT-.js → index-BgfAJzUH.js} +1 -1
  18. package/dist/{index-gcVZY6kv.js → index-Bk1s-5MT.js} +3 -3
  19. package/dist/{index-C62TCmQ7.js → index-BopmCHHI.js} +3 -3
  20. package/dist/{index-BfCprDHl.js → index-CDQyzjGe.js} +3 -3
  21. package/dist/{index-42rrV-aC.js → index-CY6FQwR8.js} +1 -1
  22. package/dist/{index-BqwAzGQG.js → index-CcuoK0vC.js} +6 -6
  23. package/dist/{index-Dvs7jc_L.js → index-CjlIlaFl.js} +2 -2
  24. package/dist/{index-DvnFnWJE.js → index-ClMvcwCk.js} +4 -4
  25. package/dist/{index-C9wMjswf.js → index-Cr6-YgHV.js} +2 -2
  26. package/dist/{index-C9wY19TU.js → index-D2Te8UII.js} +2 -2
  27. package/dist/{index-k7neaq6k.js → index-D9OnIkzR.js} +2 -2
  28. package/dist/{index-Dj2jRzkr.js → index-DF0epnxY.js} +1 -1
  29. package/dist/{index-Cfvx07Vq.js → index-DOAk8Vja.js} +1 -1
  30. package/dist/{index-DtL6L-aQ.js → index-DXDzqMjj.js} +1 -1
  31. package/dist/{index-BXgdYQNT.js → index-DXEhKn9K.js} +2 -2
  32. package/dist/{index-kpFxxVST.js → index-D_XjRsr_.js} +2 -2
  33. package/dist/{index-DVdBWg4k.js → index-DhibgcEo.js} +4 -4
  34. package/dist/{index-DSO6KW9z.js → index-FsDrtOSP.js} +1 -1
  35. package/dist/{index-XpbYuskO.js → index-HZgybOSA.js} +2 -2
  36. package/dist/{index-CA3nOLtV.js → index-OKdjYyQ5.js} +2 -2
  37. package/dist/{index-DBGHg1Kh.js → index-Y7u701I4.js} +8 -8
  38. package/dist/index-bNPwW-J_.js +32081 -0
  39. package/dist/index.js +1 -1
  40. package/dist/{instance-BHosPCYr.js → instance-BewDWcxc.js} +1 -1
  41. package/dist/{menuPermission-K5SQFU6r.js → menuPermission-CBLv-o6O.js} +3 -3
  42. package/dist/pages.js +1 -1
  43. package/dist/{send-default-agent-team-message-CCqyYF4K.js → send-default-agent-team-message-3sVRjenq.js} +1 -1
  44. package/dist/{spark-md5-B48gbBys.js → spark-md5-CR6_6hy1.js} +1 -1
  45. package/dist/{training-D8KAgxQP.js → training-tZgjw_sH.js} +1 -1
  46. package/dist/{webide-D0fYv4mw.js → webide-DXmYmCzz.js} +3 -3
  47. package/dist/z-team-component.css +1 -1
  48. package/package.json +3 -1
  49. package/dist/index-BzQVqCEO.js +0 -1361
@@ -1,1361 +0,0 @@
1
- import { jsxs as s, jsx as t, Fragment as Ct } from "react/jsx-runtime";
2
- import { ReloadOutlined as St, SearchOutlined as Pt, RightOutlined as At, TeamOutlined as Rt, MessageOutlined as kt, AppstoreOutlined as Ke, DeploymentUnitOutlined as It, BugOutlined as We, CodeOutlined as Ve } from "@ant-design/icons";
3
- import { Button as te, Select as Ee, Spin as ee, Empty as b, Tag as k, Input as D, Modal as Et } from "antd";
4
- import { useState as p, useCallback as v, useEffect as ye, useMemo as O, useRef as Lt, Suspense as Bt, lazy as $t } from "react";
5
- import { useLocation as Gt } from "react-router-dom";
6
- import { u as F } from "./ComponentDoc-gqq0sscL.js";
7
- import { h as U } from "./history-BlrA1eaW.js";
8
- import { menuItems as Je, ProductApp as Ft } from "@yuku123/z-product-component";
9
- import { C as Ot } from "./createWorkspaceWsHandler-nWmIYOqA.js";
10
- import { l as qt, c as jt } from "./api-BtTKba9I.js";
11
- import { SidebarShell as Ht, MenuTree as zt } from "@yuku123/z-frontend-common/ui";
12
- const Dt = "product-workspace", Qe = "productCode";
13
- function w(n) {
14
- if (!n.ok) throw new Error(`产品接口失败 (${n.status})`);
15
- return n.json();
16
- }
17
- async function Ut() {
18
- const n = F.getState().token, c = await fetch(`/api/product/list${n ? `?token=${encodeURIComponent(n)}` : ""}`, {
19
- credentials: "include",
20
- headers: { Accept: "application/json" }
21
- }), i = await w(c), o = Array.isArray(i) ? i : i == null ? void 0 : i.data;
22
- return Array.isArray(o) ? o.map((N) => ({
23
- ...N,
24
- productCode: String(N.productCode ?? N.code ?? ""),
25
- name: String(N.name ?? N.productCode ?? N.code ?? "未命名")
26
- })) : [];
27
- }
28
- async function Mt(n) {
29
- try {
30
- const c = await fetch(`/api/product/${encodeURIComponent(n)}`, {
31
- credentials: "include",
32
- headers: { Accept: "application/json" }
33
- }), i = await w(c), o = (i == null ? void 0 : i.data) ?? i;
34
- return o && typeof o == "object" ? { ...o, productCode: n } : null;
35
- } catch {
36
- return null;
37
- }
38
- }
39
- async function xt(n) {
40
- try {
41
- const c = await fetch(`/api/product/${encodeURIComponent(n)}/atelier/workspace`, {
42
- credentials: "include",
43
- headers: { Accept: "application/json" }
44
- }), i = await w(c), o = (i == null ? void 0 : i.data) ?? i;
45
- return o && typeof o == "object" && Array.isArray(o.files) ? o.files : Array.isArray(o) ? o : [];
46
- } catch {
47
- return [];
48
- }
49
- }
50
- async function Kt(n, c) {
51
- try {
52
- const i = await fetch(
53
- `/api/product/${encodeURIComponent(n)}/atelier/files/raw?path=${encodeURIComponent(c)}`,
54
- { credentials: "include", headers: { Accept: "text/html, application/json" } }
55
- );
56
- return i.ok ? await i.text() : null;
57
- } catch {
58
- return null;
59
- }
60
- }
61
- function Wt(n) {
62
- var o;
63
- const c = (o = n.ext) == null ? void 0 : o.params;
64
- if (!c || typeof c != "object") return null;
65
- const i = c[Qe];
66
- return i == null ? null : String(i);
67
- }
68
- async function Vt(n, c) {
69
- try {
70
- return (await qt(c)).filter((o) => Wt(o) === n);
71
- } catch {
72
- return [];
73
- }
74
- }
75
- async function Jt(n, c, i) {
76
- return jt(
77
- { scenario_code: Dt, name: c || `产品 ${n} 讨论组` },
78
- i,
79
- { [Qe]: n }
80
- );
81
- }
82
- function T(n) {
83
- return n && typeof n == "object" && "data" in n ? n.data : n;
84
- }
85
- async function Qt() {
86
- try {
87
- const n = await fetch("/api/product/group/list", {
88
- credentials: "include",
89
- headers: { Accept: "application/json" }
90
- }), c = await w(n), i = T(c);
91
- return Array.isArray(i) ? i : [];
92
- } catch {
93
- return [];
94
- }
95
- }
96
- async function Zt(n) {
97
- try {
98
- const c = await fetch("/api/product/group", {
99
- method: "POST",
100
- credentials: "include",
101
- headers: { Accept: "application/json", "Content-Type": "application/json" },
102
- body: JSON.stringify(n)
103
- }), i = await w(c);
104
- return T(i);
105
- } catch {
106
- return null;
107
- }
108
- }
109
- async function Yt(n) {
110
- try {
111
- const c = await fetch(`/api/product/${encodeURIComponent(n)}/app-binding/list`, {
112
- credentials: "include",
113
- headers: { Accept: "application/json" }
114
- }), i = await w(c), o = T(i);
115
- return Array.isArray(o) ? o : [];
116
- } catch {
117
- return [];
118
- }
119
- }
120
- async function Xt(n, c) {
121
- try {
122
- const i = await fetch(`/api/product/${encodeURIComponent(n)}/app-binding`, {
123
- method: "POST",
124
- credentials: "include",
125
- headers: { Accept: "application/json", "Content-Type": "application/json" },
126
- body: JSON.stringify(c)
127
- }), o = await w(i);
128
- return T(o);
129
- } catch {
130
- return null;
131
- }
132
- }
133
- async function ea(n) {
134
- try {
135
- const c = await fetch(`/api/product/${encodeURIComponent(n)}/requirement/list`, {
136
- credentials: "include",
137
- headers: { Accept: "application/json" }
138
- }), i = await w(c), o = T(i);
139
- return Array.isArray(o) ? o : [];
140
- } catch {
141
- return [];
142
- }
143
- }
144
- async function ta(n, c) {
145
- try {
146
- const i = await fetch(`/api/product/${encodeURIComponent(n)}/requirement`, {
147
- method: "POST",
148
- credentials: "include",
149
- headers: { Accept: "application/json", "Content-Type": "application/json" },
150
- body: JSON.stringify(c)
151
- }), o = await w(i);
152
- return T(o);
153
- } catch {
154
- return null;
155
- }
156
- }
157
- async function M(n, c) {
158
- try {
159
- const i = await fetch(
160
- `/api/product/${encodeURIComponent(n)}/${c}`,
161
- { credentials: "include", headers: { Accept: "application/json" } }
162
- ), o = await w(i), N = T(o);
163
- return Array.isArray(N) ? N : [];
164
- } catch {
165
- return [];
166
- }
167
- }
168
- async function aa(n) {
169
- return M(n, "glossary/list");
170
- }
171
- async function na(n) {
172
- return M(n, "concept/list");
173
- }
174
- async function sa(n) {
175
- return M(n, "scenario/list");
176
- }
177
- async function ia(n) {
178
- return M(n, "design/list");
179
- }
180
- async function ra(n) {
181
- return M(n, "chat/sessions");
182
- }
183
- async function ca(n) {
184
- return M(n, "chat/proposals");
185
- }
186
- async function oa() {
187
- try {
188
- const n = await fetch("/api/product/relation/types", {
189
- credentials: "include",
190
- headers: { Accept: "application/json" }
191
- }), c = await w(n), i = T(c);
192
- return i && typeof i == "object" ? i : {};
193
- } catch {
194
- return {};
195
- }
196
- }
197
- async function la() {
198
- try {
199
- const n = await fetch("/api/product/architecture", {
200
- credentials: "include",
201
- headers: { Accept: "application/json" }
202
- }), c = await w(n), i = T(c);
203
- return i && typeof i == "object" ? {
204
- products: Array.isArray(i.products) ? i.products : [],
205
- groups: Array.isArray(i.groups) ? i.groups : [],
206
- relations: Array.isArray(i.relations) ? i.relations : [],
207
- appBindings: Array.isArray(i.appBindings) ? i.appBindings : []
208
- } : { products: [], groups: [], relations: [], appBindings: [] };
209
- } catch {
210
- return { products: [], groups: [], relations: [], appBindings: [] };
211
- }
212
- }
213
- async function da(n) {
214
- try {
215
- const c = await fetch("/api/product/relation", {
216
- method: "POST",
217
- credentials: "include",
218
- headers: { Accept: "application/json", "Content-Type": "application/json" },
219
- body: JSON.stringify(n)
220
- }), i = await w(c);
221
- return T(i);
222
- } catch {
223
- return null;
224
- }
225
- }
226
- async function pa(n) {
227
- try {
228
- return await fetch(`/api/product/relation/${n}`, {
229
- method: "DELETE",
230
- credentials: "include",
231
- headers: { Accept: "application/json" }
232
- }), !0;
233
- } catch {
234
- return !1;
235
- }
236
- }
237
- async function ha(n, c) {
238
- try {
239
- const i = await fetch(`/api/product/${encodeURIComponent(n)}/requirement/${c.id}`, {
240
- method: "PUT",
241
- credentials: "include",
242
- headers: { Accept: "application/json", "Content-Type": "application/json" },
243
- body: JSON.stringify(c)
244
- }), o = await w(i);
245
- return T(o);
246
- } catch {
247
- return null;
248
- }
249
- }
250
- const ma = "_container_v1vhg_3", ua = "_header_v1vhg_11", _a = "_title_v1vhg_23", va = "_subtitle_v1vhg_30", ga = "_actions_v1vhg_36", Na = "_stats_v1vhg_42", ya = "_relForm_v1vhg_55", fa = "_relFormLabel_v1vhg_66", ba = "_centerFill_v1vhg_72", wa = "_groups_v1vhg_79", Ta = "_groupBlock_v1vhg_89", Ca = "_groupHeader_v1vhg_95", Sa = "_groupName_v1vhg_101", Pa = "_groupCount_v1vhg_107", Aa = "_productGrid_v1vhg_112", Ra = "_productCard_v1vhg_118", ka = "_cardHead_v1vhg_134", Ia = "_cardName_v1vhg_141", Ea = "_cardTag_v1vhg_150", La = "_cardCode_v1vhg_156", Ba = "_cardDesc_v1vhg_161", $a = "_cardSection_v1vhg_171", Ga = "_sectionLabel_v1vhg_180", Fa = "_bindList_v1vhg_185", Oa = "_bindTag_v1vhg_191", qa = "_relList_v1vhg_196", ja = "_relRow_v1vhg_202", Ha = "_relTag_v1vhg_209", za = "_relTarget_v1vhg_215", Da = "_relDel_v1vhg_225", m = {
251
- container: ma,
252
- header: ua,
253
- title: _a,
254
- subtitle: va,
255
- actions: ga,
256
- stats: Na,
257
- relForm: ya,
258
- relFormLabel: fa,
259
- centerFill: ba,
260
- groups: wa,
261
- groupBlock: Ta,
262
- groupHeader: Ca,
263
- groupName: Sa,
264
- groupCount: Pa,
265
- productGrid: Aa,
266
- productCard: Ra,
267
- cardHead: ka,
268
- cardName: Ia,
269
- cardTag: Ea,
270
- cardCode: La,
271
- cardDesc: Ba,
272
- cardSection: $a,
273
- sectionLabel: Ga,
274
- bindList: Fa,
275
- bindTag: Oa,
276
- relList: qa,
277
- relRow: ja,
278
- relTag: Ha,
279
- relTarget: za,
280
- relDel: Da
281
- };
282
- function Ua() {
283
- const [n, c] = p({ products: [], groups: [], relations: [], appBindings: [] }), [i, o] = p({}), [N, B] = p(!0), [d, x] = p(null), [l, K] = p(null), [f, ae] = p("DEPENDS_ON"), q = v(async () => {
284
- B(!0);
285
- try {
286
- const [h, _] = await Promise.all([la(), oa()]);
287
- c(h), o(_);
288
- } finally {
289
- B(!1);
290
- }
291
- }, []);
292
- ye(() => {
293
- q();
294
- }, [q]);
295
- const I = v(
296
- (h) => {
297
- if (!h) return null;
298
- const _ = n.groups.find((u) => u.groupCode === h);
299
- return _ ? _.name : h;
300
- },
301
- [n.groups]
302
- ), fe = O(() => {
303
- const h = /* @__PURE__ */ new Map();
304
- for (const _ of n.products) {
305
- const u = _.groupCode ?? null;
306
- h.has(u) || h.set(u, []), h.get(u).push(_);
307
- }
308
- return [...h.entries()].sort((_, u) => _[0] === null ? 1 : u[0] === null ? -1 : String(I(_[0])).localeCompare(String(I(u[0])), "zh"));
309
- }, [n.products, I]), ne = v(
310
- (h) => n.appBindings.filter((_) => _.productCode === h),
311
- [n.appBindings]
312
- ), W = v(
313
- (h) => n.relations.filter((_) => _.productCode === h),
314
- [n.relations]
315
- ), C = v(
316
- (h) => {
317
- const _ = n.products.find((u) => u.productCode === h);
318
- return _ ? _.name : h;
319
- },
320
- [n.products]
321
- ), V = v(async () => {
322
- if (!d || !l || d === l) return;
323
- const h = await da({
324
- productCode: d,
325
- relatedCode: l,
326
- relationType: f,
327
- description: `${C(d)} ${i[f] ?? f} ${C(l)}`
328
- });
329
- h && (c((_) => ({ ..._, relations: [..._.relations, h] })), x(null), K(null));
330
- }, [d, l, f, i, C]), E = O(
331
- () => n.products.map((h) => ({
332
- value: h.productCode,
333
- label: `${h.name}(${h.productCode})`
334
- })),
335
- [n.products]
336
- );
337
- return /* @__PURE__ */ s("div", { className: m.container, children: [
338
- /* @__PURE__ */ s("div", { className: m.header, children: [
339
- /* @__PURE__ */ s("div", { children: [
340
- /* @__PURE__ */ t("h2", { className: m.title, children: "产品架构" }),
341
- /* @__PURE__ */ t("p", { className: m.subtitle, children: "租户下所有产品整顿成一张架构图:产品群 · 产品↔产品关系 · 挂接的中间件/应用" })
342
- ] }),
343
- /* @__PURE__ */ s("div", { className: m.actions, children: [
344
- /* @__PURE__ */ s("span", { className: m.stats, children: [
345
- /* @__PURE__ */ t("b", { children: n.products.length }),
346
- " 产品",
347
- /* @__PURE__ */ t("b", { children: n.groups.length }),
348
- " 群",
349
- /* @__PURE__ */ t("b", { children: n.relations.length }),
350
- " 关系",
351
- /* @__PURE__ */ t("b", { children: n.appBindings.filter((h) => h.appType === "INFRA").length }),
352
- " 基建"
353
- ] }),
354
- /* @__PURE__ */ t(te, { size: "small", icon: /* @__PURE__ */ t(St, {}), onClick: () => void q(), children: "刷新" })
355
- ] })
356
- ] }),
357
- /* @__PURE__ */ s("div", { className: m.relForm, children: [
358
- /* @__PURE__ */ t("span", { className: m.relFormLabel, children: "新建产品关系:" }),
359
- /* @__PURE__ */ t(
360
- Ee,
361
- {
362
- size: "small",
363
- placeholder: "起点产品",
364
- value: d,
365
- onChange: x,
366
- options: E,
367
- style: { width: 200 },
368
- showSearch: !0,
369
- optionFilterProp: "label"
370
- }
371
- ),
372
- /* @__PURE__ */ t(
373
- Ee,
374
- {
375
- size: "small",
376
- placeholder: "关系类型",
377
- value: f,
378
- onChange: (h) => ae(h),
379
- style: { width: 130 },
380
- options: Object.entries(i).map(([h, _]) => ({ value: h, label: _ }))
381
- }
382
- ),
383
- /* @__PURE__ */ t(
384
- Ee,
385
- {
386
- size: "small",
387
- placeholder: "终点产品",
388
- value: l,
389
- onChange: K,
390
- options: E,
391
- style: { width: 200 },
392
- showSearch: !0,
393
- optionFilterProp: "label"
394
- }
395
- ),
396
- /* @__PURE__ */ t(
397
- te,
398
- {
399
- size: "small",
400
- type: "primary",
401
- onClick: () => void V(),
402
- disabled: !d || !l || d === l,
403
- children: "建立关系"
404
- }
405
- )
406
- ] }),
407
- N ? /* @__PURE__ */ t("div", { className: m.centerFill, children: /* @__PURE__ */ t(ee, {}) }) : n.products.length === 0 ? /* @__PURE__ */ t("div", { className: m.centerFill, children: /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "暂无产品,先在产品库创建" }) }) : /* @__PURE__ */ t("div", { className: m.groups, children: fe.map(([h, _]) => /* @__PURE__ */ s("div", { className: m.groupBlock, children: [
408
- /* @__PURE__ */ s("div", { className: m.groupHeader, children: [
409
- /* @__PURE__ */ t("span", { className: m.groupName, children: I(h) ? `📦 ${I(h)}` : "🗂 未分组" }),
410
- /* @__PURE__ */ s("span", { className: m.groupCount, children: [
411
- _.length,
412
- " 个产品"
413
- ] })
414
- ] }),
415
- /* @__PURE__ */ t("div", { className: m.productGrid, children: _.map((u) => {
416
- const se = ne(u.productCode ?? ""), j = W(u.productCode ?? "");
417
- return /* @__PURE__ */ s("div", { className: m.productCard, children: [
418
- /* @__PURE__ */ s("div", { className: m.cardHead, children: [
419
- /* @__PURE__ */ t("span", { className: m.cardName, title: u.name, children: u.name }),
420
- u.status && /* @__PURE__ */ t(k, { className: m.cardTag, children: u.status })
421
- ] }),
422
- /* @__PURE__ */ t("div", { className: m.cardCode, children: u.productCode }),
423
- u.description && /* @__PURE__ */ t("div", { className: m.cardDesc, title: u.description, children: u.description }),
424
- se.length > 0 && /* @__PURE__ */ s("div", { className: m.cardSection, children: [
425
- /* @__PURE__ */ t("div", { className: m.sectionLabel, children: "挂接" }),
426
- /* @__PURE__ */ t("div", { className: m.bindList, children: se.map((y) => /* @__PURE__ */ s(
427
- k,
428
- {
429
- className: m.bindTag,
430
- color: y.appType === "INFRA" ? "purple" : "geekblue",
431
- children: [
432
- y.appType === "INFRA" ? "🏗" : "🧩",
433
- " ",
434
- y.appName
435
- ]
436
- },
437
- y.id
438
- )) })
439
- ] }),
440
- j.length > 0 && /* @__PURE__ */ s("div", { className: m.cardSection, children: [
441
- /* @__PURE__ */ t("div", { className: m.sectionLabel, children: "关系" }),
442
- /* @__PURE__ */ t("div", { className: m.relList, children: j.map((y) => /* @__PURE__ */ s("div", { className: m.relRow, children: [
443
- /* @__PURE__ */ t(
444
- k,
445
- {
446
- className: m.relTag,
447
- color: y.relationType === "DEPENDS_ON" ? "orange" : y.relationType === "BUILT_ON" ? "cyan" : "blue",
448
- children: i[y.relationType] ?? y.relationType
449
- }
450
- ),
451
- /* @__PURE__ */ t("span", { className: m.relTarget, title: C(y.relatedCode), children: C(y.relatedCode) }),
452
- /* @__PURE__ */ t(
453
- "button",
454
- {
455
- type: "button",
456
- className: m.relDel,
457
- onClick: async () => {
458
- await pa(y.id), c(($) => ({
459
- ...$,
460
- relations: $.relations.filter((J) => J.id !== y.id)
461
- }));
462
- },
463
- title: "删除关系",
464
- children: "✕"
465
- }
466
- )
467
- ] }, y.id)) })
468
- ] })
469
- ] }, u.productCode);
470
- }) })
471
- ] }, h ?? "__none__")) })
472
- ] });
473
- }
474
- const Ma = "_container_dm5sh_5", xa = "_libraryView_dm5sh_14", Ka = "_libraryHeader_dm5sh_22", Wa = "_libraryHeadRow_dm5sh_32", Va = "_libraryTitle_dm5sh_40", Ja = "_librarySubtitle_dm5sh_47", Qa = "_librarySearch_dm5sh_53", Za = "_libraryBody_dm5sh_58", Ya = "_productGrid_dm5sh_65", Xa = "_productCard_dm5sh_71", en = "_cardCode_dm5sh_91", tn = "_cardName_dm5sh_104", an = "_cardDesc_dm5sh_113", nn = "_cardFoot_dm5sh_124", sn = "_cardEnter_dm5sh_132", rn = "_cardTag_dm5sh_140", cn = "_left_dm5sh_146", on = "_leftHeader_dm5sh_156", ln = "_leftTitleRow_dm5sh_162", dn = "_leftTitle_dm5sh_162", pn = "_backBtn_dm5sh_179", hn = "_sectionBar_dm5sh_209", mn = "_sectionTab_dm5sh_219", un = "_sectionTabActive_dm5sh_241", _n = "_sectionIcon_dm5sh_248", vn = "_leftBody_dm5sh_253", gn = "_fileList_dm5sh_264", Nn = "_fileTreeHint_dm5sh_303", yn = "_fileRow_dm5sh_309", fn = "_fileRowActive_dm5sh_323", bn = "_fileRowIcon_dm5sh_327", wn = "_fileRowName_dm5sh_332", Tn = "_fileKindTag_dm5sh_341", Cn = "_center_dm5sh_349", Sn = "_centerFill_dm5sh_358", Pn = "_renderArea_dm5sh_413", An = "_renderIframe_dm5sh_423", Rn = "_renderCode_dm5sh_429", kn = "_right_dm5sh_442", In = "_chatSide_dm5sh_453", En = "_chatSideHeader_dm5sh_459", Ln = "_chatSideTitle_dm5sh_468", Bn = "_chatGroupList_dm5sh_477", $n = "_chatGroupRow_dm5sh_486", Gn = "_chatGroupRowActive_dm5sh_500", Fn = "_chatGroupName_dm5sh_504", On = "_chatGroupTime_dm5sh_513", qn = "_chatPane_dm5sh_520", jn = "_chatPaneHeader_dm5sh_526", Hn = "_chatPaneTitle_dm5sh_535", zn = "_chatPaneBody_dm5sh_544", Dn = "_groupChips_dm5sh_555", Un = "_groupChip_dm5sh_555", Mn = "_groupChipActive_dm5sh_578", xn = "_groupNewBtn_dm5sh_589", Kn = "_cardGroup_dm5sh_604", Wn = "_overviewArea_dm5sh_614", Vn = "_overviewHeader_dm5sh_619", Jn = "_overviewTitle_dm5sh_623", Qn = "_overviewSubtitle_dm5sh_630", Zn = "_overviewTabs_dm5sh_636", Yn = "_overviewTab_dm5sh_636", Xn = "_overviewTabActive_dm5sh_659", es = "_overviewPanel_dm5sh_669", ts = "_zoneWrap_dm5sh_677", as = "_zoneTabs_dm5sh_685", ns = "_zoneTab_dm5sh_685", ss = "_zoneTabActive_dm5sh_714", is = "_zonePage_dm5sh_721", rs = "_reqForm_dm5sh_729", cs = "_reqList_dm5sh_735", os = "_reqRow_dm5sh_741", ls = "_reqTitle_dm5sh_750", ds = "_reqTag_dm5sh_759", ps = "_reqStatusTag_dm5sh_765", hs = "_reqTime_dm5sh_778", ms = "_appForm_dm5sh_785", us = "_appTypeSelect_dm5sh_792", _s = "_appList_dm5sh_803", vs = "_appRow_dm5sh_809", gs = "_appIcon_dm5sh_818", Ns = "_appName_dm5sh_823", ys = "_appCode_dm5sh_833", fs = "_appTag_dm5sh_839", bs = "_appGo_dm5sh_845", ws = "_appInfraNote_dm5sh_860", Ts = "_appUnbind_dm5sh_866", Cs = "_statsRow_dm5sh_883", Ss = "_statItem_dm5sh_894", Ps = "_domainBlock_dm5sh_908", As = "_domainBlockTitle_dm5sh_916", Rs = "_domainEmpty_dm5sh_923", ks = "_domainList_dm5sh_931", Is = "_domainRow_dm5sh_937", Es = "_domainName_dm5sh_946", Ls = "_domainDesc_dm5sh_960", Bs = "_designHint_dm5sh_971", $s = "_designList_dm5sh_980", Gs = "_designRow_dm5sh_986", Fs = "_designIcon_dm5sh_995", Os = "_designName_dm5sh_1000", qs = "_designTime_dm5sh_1010", js = "_overviewEntryBtn_dm5sh_1017", a = {
475
- container: Ma,
476
- libraryView: xa,
477
- libraryHeader: Ka,
478
- libraryHeadRow: Wa,
479
- libraryTitle: Va,
480
- librarySubtitle: Ja,
481
- librarySearch: Qa,
482
- libraryBody: Za,
483
- productGrid: Ya,
484
- productCard: Xa,
485
- cardCode: en,
486
- cardName: tn,
487
- cardDesc: an,
488
- cardFoot: nn,
489
- cardEnter: sn,
490
- cardTag: rn,
491
- left: cn,
492
- leftHeader: on,
493
- leftTitleRow: ln,
494
- leftTitle: dn,
495
- backBtn: pn,
496
- sectionBar: hn,
497
- sectionTab: mn,
498
- sectionTabActive: un,
499
- sectionIcon: _n,
500
- leftBody: vn,
501
- fileList: gn,
502
- fileTreeHint: Nn,
503
- fileRow: yn,
504
- fileRowActive: fn,
505
- fileRowIcon: bn,
506
- fileRowName: wn,
507
- fileKindTag: Tn,
508
- center: Cn,
509
- centerFill: Sn,
510
- renderArea: Pn,
511
- renderIframe: An,
512
- renderCode: Rn,
513
- right: kn,
514
- chatSide: In,
515
- chatSideHeader: En,
516
- chatSideTitle: Ln,
517
- chatGroupList: Bn,
518
- chatGroupRow: $n,
519
- chatGroupRowActive: Gn,
520
- chatGroupName: Fn,
521
- chatGroupTime: On,
522
- chatPane: qn,
523
- chatPaneHeader: jn,
524
- chatPaneTitle: Hn,
525
- chatPaneBody: zn,
526
- groupChips: Dn,
527
- groupChip: Un,
528
- groupChipActive: Mn,
529
- groupNewBtn: xn,
530
- cardGroup: Kn,
531
- overviewArea: Wn,
532
- overviewHeader: Vn,
533
- overviewTitle: Jn,
534
- overviewSubtitle: Qn,
535
- overviewTabs: Zn,
536
- overviewTab: Yn,
537
- overviewTabActive: Xn,
538
- overviewPanel: es,
539
- zoneWrap: ts,
540
- zoneTabs: as,
541
- zoneTab: ns,
542
- zoneTabActive: ss,
543
- zonePage: is,
544
- reqForm: rs,
545
- reqList: cs,
546
- reqRow: os,
547
- reqTitle: ls,
548
- reqTag: ds,
549
- reqStatusTag: ps,
550
- reqTime: hs,
551
- appForm: ms,
552
- appTypeSelect: us,
553
- appList: _s,
554
- appRow: vs,
555
- appIcon: gs,
556
- appName: Ns,
557
- appCode: ys,
558
- appTag: fs,
559
- appGo: bs,
560
- appInfraNote: ws,
561
- appUnbind: Ts,
562
- statsRow: Cs,
563
- statItem: Ss,
564
- domainBlock: Ps,
565
- domainBlockTitle: As,
566
- domainEmpty: Rs,
567
- domainList: ks,
568
- domainRow: Is,
569
- domainName: Es,
570
- domainDesc: Ls,
571
- designHint: Bs,
572
- designList: $s,
573
- designRow: Gs,
574
- designIcon: Fs,
575
- designName: Os,
576
- designTime: qs,
577
- overviewEntryBtn: js
578
- }, Hs = $t(() => import("@yuku123/z-qa-component"));
579
- function zs(n) {
580
- return {
581
- id: String(n.id),
582
- name: n.name,
583
- description: n.description ?? "",
584
- workspace_path: n.workspacePath || n.name,
585
- status: n.status,
586
- created_at: n.createTime ?? "",
587
- scenario_id: String(n.id),
588
- scenario_code: n.scenarioCode,
589
- scenario_name: n.scenarioName ?? n.name
590
- };
591
- }
592
- const Ds = [
593
- {
594
- title: "产品",
595
- icon: /* @__PURE__ */ t(Ke, {}),
596
- items: [
597
- { key: "prod-list", label: "产品列表", icon: /* @__PURE__ */ t(Ke, {}) },
598
- {
599
- key: "prod-architecture",
600
- label: "产品架构",
601
- icon: /* @__PURE__ */ t(It, {}),
602
- title: "租户下所有产品的架构关系(产品↔产品、产品↔中间件)"
603
- }
604
- ]
605
- },
606
- {
607
- title: "测试",
608
- icon: /* @__PURE__ */ t(We, {}),
609
- items: [
610
- {
611
- key: "qa-dashboard",
612
- label: "QA 总览",
613
- icon: /* @__PURE__ */ t(We, {}),
614
- // 2026-11-26:QA 总览内嵌在产研面(/product/qa/*),点了不换面;
615
- // 系统面自己的 /test/qa/* 测试中心不受影响。
616
- path: "/product/qa/dashboard"
617
- }
618
- ]
619
- },
620
- {
621
- title: "研发",
622
- icon: /* @__PURE__ */ t(Ve, {}),
623
- items: [
624
- {
625
- key: "lc-apps",
626
- label: "应用研发",
627
- icon: /* @__PURE__ */ t(Ve, {}),
628
- path: "/lc/apps"
629
- }
630
- ]
631
- }
632
- ], Us = [
633
- { key: "prod-list", label: "产品列表" },
634
- ...Je.map((n) => ({ key: n.key, label: n.label }))
635
- ];
636
- function Ze(n) {
637
- const c = n.toLowerCase();
638
- return /\.(html?|png|jpe?g|webp|svg|pdf)$/.test(c) ? "design" : /\.(md|markdown|txt|docx?)$/.test(c) ? "doc" : /\.(js|ts|tsx|jsx|java|py|json|yml|yaml|sql|css|vue|go|rs)$/.test(c) ? "code" : "other";
639
- }
640
- function Ye(n, c = "") {
641
- const i = [];
642
- for (const o of n ?? []) {
643
- const N = o.path || `${c}${o.name ?? ""}`, B = o.name || N.split("/").pop() || N, d = o.type === "dir" || Array.isArray(o.children);
644
- i.push({ path: N, name: B, dir: d, kind: Ze(N), depth: c.split("/").filter(Boolean).length }), d && Array.isArray(o.children) && i.push(...Ye(o.children, `${N}/`));
645
- }
646
- return i;
647
- }
648
- function ti() {
649
- const n = F((e) => e.token), c = F((e) => e.selectProject), [i, o] = p([]), [N, B] = p(!0), [d, x] = p(null), [l, K] = p(null), [f, ae] = p(!1), [q, I] = p([]), [fe, ne] = p(!1), [W, C] = p(null), [V, E] = p(null), [h, _] = p("other"), [u, se] = p(""), [j, y] = p("library"), [$, J] = p([]), [Le, be] = p(null), [ie, Be] = p(!1), [Xe, re] = p("list"), P = Lt(null), [we, $e] = p([]), [Q, Ge] = p(null), [ce, Te] = p([]), [oe, Ce] = p([]), [A, H] = p("req"), [Z, Fe] = p(""), [le, et] = p([]), [de, tt] = p([]), [pe, at] = p([]), [he, nt] = p([]), [me, st] = p([]), [Oe, it] = p([]), Se = v(
650
- async (e) => {
651
- x(e), ae(!0), C(null), E(null), re("list"), be(null), H("req");
652
- const r = await Mt(e);
653
- K(r);
654
- const g = await Vt(e, n);
655
- J(g);
656
- const S = await Yt(e);
657
- Te(S);
658
- const Ne = await ea(e);
659
- Ce(Ne);
660
- const [Ie, X, yt, ft, bt, wt] = await Promise.all([
661
- aa(e),
662
- na(e),
663
- sa(e),
664
- ia(e),
665
- ra(e),
666
- ca(e)
667
- ]);
668
- et(Ie), tt(X), at(yt), nt(ft), st(bt), it(wt), ne(!0);
669
- const Tt = await xt(e);
670
- I(Tt), ne(!1);
671
- },
672
- [n]
673
- ), qe = v(async () => {
674
- B(!0);
675
- try {
676
- const e = await Ut();
677
- o(e);
678
- const r = await Qt();
679
- $e(r);
680
- try {
681
- const g = new URLSearchParams(window.location.search).get("product");
682
- if (g) {
683
- const S = e.find((Ne) => Ne.productCode === g);
684
- if (S) {
685
- Se(S.productCode);
686
- return;
687
- }
688
- }
689
- } catch {
690
- }
691
- } catch {
692
- o([]);
693
- } finally {
694
- B(!1);
695
- }
696
- }, [Se]);
697
- ye(() => {
698
- qe();
699
- }, [qe]);
700
- const rt = v(() => {
701
- if (!d) return;
702
- const e = new URLSearchParams();
703
- e.set("product", d), l != null && l.name && e.set("productName", l.name), U.push(`/lc/apps?${e.toString()}`);
704
- }, [d, l == null ? void 0 : l.name]), ct = v(() => {
705
- if (!d) return;
706
- const e = new URLSearchParams();
707
- e.set("product", d), l != null && l.name && e.set("productName", l.name), U.push(`/product/qa/dashboard?${e.toString()}`);
708
- }, [d, l == null ? void 0 : l.name]), Y = v(() => {
709
- x(null), ae(!1), K(null), I([]), J([]), C(null), E(null), be(null), re("list"), P.current !== void 0 && F.setState({ currentProject: P.current }), P.current = void 0;
710
- }, []);
711
- ye(() => {
712
- new URLSearchParams(window.location.search).get("view") === "architecture" && y("architecture");
713
- }, []);
714
- const ue = v(
715
- (e) => {
716
- f && Y(), y(e), U.push(e === "architecture" ? "/product?view=architecture" : "/product");
717
- },
718
- [f, Y]
719
- ), ot = v(
720
- (e) => {
721
- if (e === "prod-list") {
722
- ue("library");
723
- return;
724
- }
725
- f && Y(), U.push(e);
726
- },
727
- [f, Y, ue]
728
- ), je = v((e) => {
729
- U.push(e);
730
- }, []), { pathname: L } = Gt(), _e = L.startsWith("/product/qa"), G = !_e && (L.startsWith("/z-product/") || /^\/product\/.+/.test(L)), lt = O(() => {
731
- var r;
732
- if (!G) return null;
733
- const e = (g) => `/product${g.slice(10)}`;
734
- return ((r = Je.find(
735
- (g) => L === g.key || L.startsWith(`${g.key}/`) || L === e(g.key) || L.startsWith(`${e(g.key)}/`)
736
- )) == null ? void 0 : r.key) ?? null;
737
- }, [G, L]), He = O(() => _e ? "qa-dashboard" : G ? "prod-list" : f ? null : j === "architecture" ? "prod-architecture" : "prod-list", [_e, G, f, j]), ze = v(
738
- (e, r) => {
739
- if (e === "产品") {
740
- ue(r.key === "prod-architecture" ? "architecture" : "library");
741
- return;
742
- }
743
- r.path && je(r.path);
744
- },
745
- [ue, je]
746
- ), dt = O(
747
- () => Ds.map((e) => ({
748
- key: e.title,
749
- title: e.title,
750
- items: e.items.map((r) => ({
751
- key: r.key,
752
- label: r.label,
753
- icon: r.icon,
754
- title: r.title,
755
- active: He === r.key,
756
- onClick: () => ze(e.title, r)
757
- }))
758
- })),
759
- [He, ze]
760
- ), De = v(async () => {
761
- if (!d || !Z.trim()) return;
762
- const e = await ta(d, {
763
- title: Z.trim(),
764
- priority: "P2"
765
- });
766
- e && (Ce((r) => [...r, e]), Fe(""));
767
- }, [d, Z]), pt = ["OPEN", "IN_PROGRESS", "DONE", "CLOSED"], [ve] = p(pt), ht = v(
768
- async (e) => {
769
- if (!d || e.id == null) return;
770
- const r = String(e.status ?? "OPEN"), g = ve.indexOf(r), S = ve[(g + 1) % ve.length];
771
- await ha(d, { id: e.id, status: S }) && Ce((Ie) => Ie.map((X) => X.id === e.id ? { ...X, status: S } : X));
772
- },
773
- [d, ve]
774
- ), [R, ge] = p({
775
- appCode: "",
776
- appName: "",
777
- appType: "APP"
778
- }), mt = v(async () => {
779
- if (!d || !R.appCode.trim() || !R.appName.trim()) return;
780
- const e = await Xt(d, R);
781
- e && (Te((r) => [...r, e]), ge({ appCode: "", appName: "", appType: "APP" }));
782
- }, [d, R]), ut = v(
783
- async (e) => {
784
- d && (await unbindProductApp(d, e), Te((r) => r.filter((g) => g.id !== e)));
785
- },
786
- [d]
787
- ), [z, Pe] = p({ groupCode: "", name: "" }), [_t, Ae] = p(!1), Ue = v(async () => {
788
- if (!z.groupCode.trim() || !z.name.trim()) return !1;
789
- const e = await Zt(z);
790
- return e ? ($e((r) => [...r, e]), Pe({ groupCode: "", name: "" }), !0) : !1;
791
- }, [z]), vt = v(async () => {
792
- await Ue() && Ae(!1);
793
- }, [Ue]), gt = v(
794
- async (e) => {
795
- if (!d) return;
796
- C(e), E(null);
797
- const r = Ze(e);
798
- _(r);
799
- const g = await Kt(d, e);
800
- E(g ?? "");
801
- },
802
- [d]
803
- ), Re = v(
804
- async (e) => {
805
- if (!e) return;
806
- const r = zs(e);
807
- P.current = F.getState().currentProject, be(e.id), re("chat"), c(r);
808
- },
809
- [c]
810
- ), Nt = v(async () => {
811
- if (!(!d || ie)) {
812
- Be(!0);
813
- try {
814
- const e = await Jt(
815
- d,
816
- `${(l == null ? void 0 : l.name) || d} · 讨论组 ${$.length + 1}`,
817
- n
818
- );
819
- J((r) => [...r, e]), await Re(e);
820
- } finally {
821
- Be(!1);
822
- }
823
- }
824
- }, [d, ie, $.length, l == null ? void 0 : l.name, n, Re]);
825
- ye(() => () => {
826
- P.current !== void 0 && F.setState({ currentProject: P.current });
827
- }, [Le]);
828
- const ke = O(() => Ye(q), [q]), Me = O(
829
- () => i.filter((e) => !(u && !e.name.includes(u) && !e.productCode.includes(u) || Q && e.groupCode !== Q)),
830
- [i, u, Q]
831
- ), xe = v(
832
- (e) => {
833
- if (!e) return null;
834
- const r = we.find((g) => g.groupCode === e);
835
- return r ? r.name : e;
836
- },
837
- [we]
838
- );
839
- return /* @__PURE__ */ s("div", { className: a.container, children: [
840
- /* @__PURE__ */ t(Ht, { title: "产研", width: 220, storageKey: "ft_product_sidebar_collapsed", children: /* @__PURE__ */ t(zt, { groups: dt, defaultCollapsed: !0 }) }),
841
- _e ? (
842
- /* ═══ 测试组内嵌:QA 总览(/product/qa/*,QAApp 按 mountPath 出链接,点了不换面) ═══ */
843
- /* @__PURE__ */ t(Bt, { fallback: /* @__PURE__ */ t("div", { className: a.centerFill, children: /* @__PURE__ */ t(ee, {}) }), children: /* @__PURE__ */ t(Hs, { mountPath: "/product/qa" }) })
844
- ) : G || !f && j === "library" ? (
845
- /* ═══ 产品列表页(CEO 2026-11-28):点开才是真正的各种 tab——
846
- 首格 = 产品列表卡片网格,其余 = z-product manifest 全套原位内嵌
847
- (basePath=/product 双口径对表,页内跳转落回本组件继续渲染)。 ═══ */
848
- /* @__PURE__ */ s("div", { className: a.zoneWrap, children: [
849
- /* @__PURE__ */ t("div", { className: a.zoneTabs, children: Us.map((e) => /* @__PURE__ */ t(
850
- "button",
851
- {
852
- type: "button",
853
- className: `${a.zoneTab} ${(G ? lt : "prod-list") === e.key ? a.zoneTabActive : ""}`,
854
- onClick: () => ot(e.key),
855
- children: e.label
856
- },
857
- e.key
858
- )) }),
859
- G ? /* @__PURE__ */ t("div", { className: a.zonePage, children: /* @__PURE__ */ t(Ft, { basePath: "/product" }) }) : (
860
- /* ═══ 产品列表视图:全宽产品卡片网格,点卡片直接进入 ═══ */
861
- /* @__PURE__ */ s("div", { className: a.libraryView, children: [
862
- /* @__PURE__ */ s("div", { className: a.libraryHeader, children: [
863
- /* @__PURE__ */ s("div", { className: a.libraryHeadRow, children: [
864
- /* @__PURE__ */ s("div", { children: [
865
- /* @__PURE__ */ t("h2", { className: a.libraryTitle, children: "产品列表" }),
866
- /* @__PURE__ */ t("p", { className: a.librarySubtitle, children: "选择产品进入工作区:文件 · 设计稿 · 群聊 · 应用群" })
867
- ] }),
868
- /* @__PURE__ */ t(
869
- D,
870
- {
871
- prefix: /* @__PURE__ */ t(Pt, {}),
872
- placeholder: "搜索产品",
873
- value: u,
874
- onChange: (e) => se(e.target.value),
875
- allowClear: !0,
876
- className: a.librarySearch
877
- }
878
- )
879
- ] }),
880
- /* @__PURE__ */ s("div", { className: a.groupChips, children: [
881
- /* @__PURE__ */ t(
882
- "button",
883
- {
884
- type: "button",
885
- className: `${a.groupChip} ${Q === null ? a.groupChipActive : ""}`,
886
- onClick: () => Ge(null),
887
- children: "全部"
888
- }
889
- ),
890
- we.map((e) => /* @__PURE__ */ t(
891
- "button",
892
- {
893
- type: "button",
894
- className: `${a.groupChip} ${Q === e.groupCode ? a.groupChipActive : ""}`,
895
- onClick: () => Ge(e.groupCode),
896
- title: e.description || e.name,
897
- children: e.name
898
- },
899
- e.groupCode
900
- )),
901
- /* @__PURE__ */ t(
902
- "button",
903
- {
904
- type: "button",
905
- className: a.groupNewBtn,
906
- onClick: () => Ae(!0),
907
- title: "新建产品群",
908
- children: "+ 新建产品群"
909
- }
910
- )
911
- ] })
912
- ] }),
913
- /* @__PURE__ */ t("div", { className: a.libraryBody, children: N ? /* @__PURE__ */ t("div", { className: a.centerFill, children: /* @__PURE__ */ t(ee, {}) }) : Me.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "暂无产品" }) : /* @__PURE__ */ t("div", { className: a.productGrid, children: Me.map((e) => /* @__PURE__ */ s(
914
- "button",
915
- {
916
- type: "button",
917
- className: a.productCard,
918
- onClick: () => void Se(e.productCode),
919
- children: [
920
- /* @__PURE__ */ t("span", { className: a.cardCode, children: e.productCode }),
921
- /* @__PURE__ */ t("span", { className: a.cardName, title: e.name, children: e.name }),
922
- /* @__PURE__ */ t("span", { className: a.cardDesc, children: e.description || "暂无产品描述" }),
923
- /* @__PURE__ */ s("span", { className: a.cardFoot, children: [
924
- /* @__PURE__ */ s("span", { className: a.cardEnter, children: [
925
- "进入产品 ",
926
- /* @__PURE__ */ t(At, {})
927
- ] }),
928
- xe(e.groupCode) && /* @__PURE__ */ t("span", { className: a.cardGroup, children: xe(e.groupCode) }),
929
- e.status && /* @__PURE__ */ t(k, { className: a.cardTag, children: e.status })
930
- ] })
931
- ]
932
- },
933
- e.productCode
934
- )) }) }),
935
- /* @__PURE__ */ t(
936
- Et,
937
- {
938
- title: "新建产品群",
939
- open: _t,
940
- onOk: () => void vt(),
941
- onCancel: () => Ae(!1),
942
- okText: "创建",
943
- cancelText: "取消",
944
- destroyOnClose: !0,
945
- children: /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12, paddingTop: 8 }, children: [
946
- /* @__PURE__ */ t(
947
- D,
948
- {
949
- placeholder: "群码(唯一标识,如 ppt-studio)",
950
- value: z.groupCode,
951
- onChange: (e) => Pe((r) => ({ ...r, groupCode: e.target.value }))
952
- }
953
- ),
954
- /* @__PURE__ */ t(
955
- D,
956
- {
957
- placeholder: "群名(如 PPT 智造群)",
958
- value: z.name,
959
- onChange: (e) => Pe((r) => ({ ...r, name: e.target.value }))
960
- }
961
- )
962
- ] })
963
- }
964
- )
965
- ] })
966
- )
967
- ] })
968
- ) : f ? /* @__PURE__ */ s(Ct, { children: [
969
- /* @__PURE__ */ s("aside", { className: a.left, children: [
970
- /* @__PURE__ */ s("div", { className: a.leftHeader, children: [
971
- /* @__PURE__ */ s("div", { className: a.leftTitleRow, children: [
972
- /* @__PURE__ */ t("button", { type: "button", className: a.backBtn, onClick: Y, title: "返回产品库", children: "←" }),
973
- /* @__PURE__ */ t("span", { className: a.leftTitle, title: (l == null ? void 0 : l.name) || d || "", children: (l == null ? void 0 : l.name) || d })
974
- ] }),
975
- /* @__PURE__ */ s("div", { className: a.sectionBar, children: [
976
- /* @__PURE__ */ s("span", { className: `${a.sectionTab} ${a.sectionTabActive}`, children: [
977
- /* @__PURE__ */ t("span", { className: a.sectionIcon, children: "📦" }),
978
- " 产品"
979
- ] }),
980
- /* @__PURE__ */ s("button", { type: "button", className: a.sectionTab, onClick: rt, title: "进入研发工作台(z-lc)", children: [
981
- /* @__PURE__ */ t("span", { className: a.sectionIcon, children: "💻" }),
982
- " 研发"
983
- ] }),
984
- /* @__PURE__ */ s("button", { type: "button", className: a.sectionTab, onClick: ct, title: "进入测试工作台(QA)", children: [
985
- /* @__PURE__ */ t("span", { className: a.sectionIcon, children: "🧪" }),
986
- " 测试"
987
- ] })
988
- ] })
989
- ] }),
990
- /* @__PURE__ */ s("div", { className: a.leftBody, children: [
991
- /* @__PURE__ */ t(
992
- "button",
993
- {
994
- type: "button",
995
- className: a.overviewEntryBtn,
996
- onClick: () => {
997
- C(null), E(null);
998
- },
999
- title: "回到产品总览(沉淀台)",
1000
- children: "📋 产品总览 · 返回沉淀台"
1001
- }
1002
- ),
1003
- /* @__PURE__ */ t("div", { className: a.fileTreeHint, children: "文件(设计稿 · 文档 · 产物)" }),
1004
- fe ? /* @__PURE__ */ t("div", { className: a.centerFill, children: /* @__PURE__ */ t(ee, { size: "small" }) }) : ke.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "产品下暂无文件" }) : /* @__PURE__ */ t("div", { className: a.fileList, children: ke.map((e) => /* @__PURE__ */ s(
1005
- "div",
1006
- {
1007
- className: `${a.fileRow} ${W === e.path ? a.fileRowActive : ""}`,
1008
- style: { paddingLeft: 12 + e.depth * 16 },
1009
- onClick: () => !e.dir && gt(e.path),
1010
- children: [
1011
- /* @__PURE__ */ t("span", { className: a.fileRowIcon, children: e.dir ? "📁" : e.kind === "design" ? "🖼" : e.kind === "doc" ? "📄" : e.kind === "code" ? "{" : "◦" }),
1012
- /* @__PURE__ */ t("span", { className: a.fileRowName, children: e.name }),
1013
- e.kind === "design" && /* @__PURE__ */ t(k, { className: a.fileKindTag, color: "blue", children: "设计稿" })
1014
- ]
1015
- },
1016
- e.path
1017
- )) })
1018
- ] })
1019
- ] }),
1020
- /* @__PURE__ */ t("main", { className: a.center, children: W == null ? /* @__PURE__ */ s("div", { className: a.overviewArea, children: [
1021
- /* @__PURE__ */ s("div", { className: a.overviewHeader, children: [
1022
- /* @__PURE__ */ t("h2", { className: a.overviewTitle, children: "产品总览" }),
1023
- /* @__PURE__ */ t("p", { className: a.overviewSubtitle, children: "「关于这个产品的一切」沉淀在这里:需求 · 应用群 · 领域资产 · 设计稿 · 聊天蒸馏" })
1024
- ] }),
1025
- /* @__PURE__ */ s("div", { className: a.statsRow, children: [
1026
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
1027
- /* @__PURE__ */ t("b", { children: oe.length }),
1028
- " 需求"
1029
- ] }),
1030
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
1031
- /* @__PURE__ */ t("b", { children: ce.length }),
1032
- " 应用"
1033
- ] }),
1034
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
1035
- /* @__PURE__ */ t("b", { children: le.length }),
1036
- " 术语"
1037
- ] }),
1038
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
1039
- /* @__PURE__ */ t("b", { children: de.length }),
1040
- " 概念"
1041
- ] }),
1042
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
1043
- /* @__PURE__ */ t("b", { children: pe.length }),
1044
- " 专家团"
1045
- ] }),
1046
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
1047
- /* @__PURE__ */ t("b", { children: he.length }),
1048
- " 设计稿"
1049
- ] }),
1050
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
1051
- /* @__PURE__ */ t("b", { children: me.length }),
1052
- " 会话"
1053
- ] }),
1054
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
1055
- /* @__PURE__ */ t("b", { children: ke.filter((e) => !e.dir).length }),
1056
- " 文件"
1057
- ] })
1058
- ] }),
1059
- /* @__PURE__ */ s("div", { className: a.overviewTabs, children: [
1060
- /* @__PURE__ */ s(
1061
- "button",
1062
- {
1063
- type: "button",
1064
- className: `${a.overviewTab} ${A === "req" ? a.overviewTabActive : ""}`,
1065
- onClick: () => H("req"),
1066
- children: [
1067
- "需求(",
1068
- oe.length,
1069
- ")"
1070
- ]
1071
- }
1072
- ),
1073
- /* @__PURE__ */ s(
1074
- "button",
1075
- {
1076
- type: "button",
1077
- className: `${a.overviewTab} ${A === "apps" ? a.overviewTabActive : ""}`,
1078
- onClick: () => H("apps"),
1079
- children: [
1080
- "应用群(",
1081
- ce.length,
1082
- ")"
1083
- ]
1084
- }
1085
- ),
1086
- /* @__PURE__ */ s(
1087
- "button",
1088
- {
1089
- type: "button",
1090
- className: `${a.overviewTab} ${A === "domain" ? a.overviewTabActive : ""}`,
1091
- onClick: () => H("domain"),
1092
- children: [
1093
- "领域资产(",
1094
- le.length + de.length + pe.length,
1095
- ")"
1096
- ]
1097
- }
1098
- ),
1099
- /* @__PURE__ */ s(
1100
- "button",
1101
- {
1102
- type: "button",
1103
- className: `${a.overviewTab} ${A === "design" ? a.overviewTabActive : ""}`,
1104
- onClick: () => H("design"),
1105
- children: [
1106
- "设计稿(",
1107
- he.length,
1108
- ")"
1109
- ]
1110
- }
1111
- ),
1112
- /* @__PURE__ */ s(
1113
- "button",
1114
- {
1115
- type: "button",
1116
- className: `${a.overviewTab} ${A === "chat" ? a.overviewTabActive : ""}`,
1117
- onClick: () => H("chat"),
1118
- children: [
1119
- "聊天蒸馏(",
1120
- me.length,
1121
- ")"
1122
- ]
1123
- }
1124
- )
1125
- ] }),
1126
- A === "req" ? /* @__PURE__ */ s("div", { className: a.overviewPanel, children: [
1127
- /* @__PURE__ */ s("div", { className: a.reqForm, children: [
1128
- /* @__PURE__ */ t(
1129
- D,
1130
- {
1131
- placeholder: "新增需求标题(针对本产品)",
1132
- value: Z,
1133
- onChange: (e) => Fe(e.target.value),
1134
- onPressEnter: () => void De(),
1135
- style: { flex: 1 }
1136
- }
1137
- ),
1138
- /* @__PURE__ */ t(te, { type: "primary", onClick: () => void De(), disabled: !Z.trim(), children: "添加需求" })
1139
- ] }),
1140
- oe.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "还没有需求,先落一条" }) : /* @__PURE__ */ t("div", { className: a.reqList, children: oe.map((e) => /* @__PURE__ */ s("div", { className: a.reqRow, children: [
1141
- /* @__PURE__ */ t("span", { className: a.reqTitle, title: e.title, children: e.title }),
1142
- /* @__PURE__ */ t(k, { className: a.reqTag, color: e.priority === "P0" ? "red" : e.priority === "P1" ? "orange" : "blue", children: e.priority || "P2" }),
1143
- /* @__PURE__ */ t(
1144
- k,
1145
- {
1146
- className: a.reqStatusTag,
1147
- onClick: () => void ht(e),
1148
- title: "点击流转状态(OPEN → IN_PROGRESS → DONE → CLOSED)",
1149
- children: e.status || "OPEN"
1150
- }
1151
- ),
1152
- /* @__PURE__ */ t("span", { className: a.reqTime, children: String(e.createdAt ?? "").slice(0, 10) })
1153
- ] }, e.id)) })
1154
- ] }) : A === "apps" ? /* @__PURE__ */ s("div", { className: a.overviewPanel, children: [
1155
- /* @__PURE__ */ s("div", { className: a.appForm, children: [
1156
- /* @__PURE__ */ t(
1157
- D,
1158
- {
1159
- placeholder: "应用编码(如 z-lc 应用 code)",
1160
- value: R.appCode,
1161
- onChange: (e) => ge((r) => ({ ...r, appCode: e.target.value })),
1162
- style: { flex: 1 }
1163
- }
1164
- ),
1165
- /* @__PURE__ */ t(
1166
- D,
1167
- {
1168
- placeholder: "应用名称",
1169
- value: R.appName,
1170
- onChange: (e) => ge((r) => ({ ...r, appName: e.target.value })),
1171
- style: { width: 150 }
1172
- }
1173
- ),
1174
- /* @__PURE__ */ s(
1175
- "select",
1176
- {
1177
- className: a.appTypeSelect,
1178
- value: R.appType,
1179
- onChange: (e) => ge((r) => ({ ...r, appType: e.target.value })),
1180
- children: [
1181
- /* @__PURE__ */ t("option", { value: "APP", children: "应用" }),
1182
- /* @__PURE__ */ t("option", { value: "INFRA", children: "基建" })
1183
- ]
1184
- }
1185
- ),
1186
- /* @__PURE__ */ t(
1187
- te,
1188
- {
1189
- type: "primary",
1190
- onClick: () => void mt(),
1191
- disabled: !R.appCode.trim() || !R.appName.trim(),
1192
- children: "绑定"
1193
- }
1194
- )
1195
- ] }),
1196
- ce.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "还没有应用群,绑定支撑这个产品的应用/基建" }) : /* @__PURE__ */ t("div", { className: a.appList, children: ce.map((e) => /* @__PURE__ */ s("div", { className: a.appRow, children: [
1197
- /* @__PURE__ */ t("span", { className: a.appIcon, children: e.appType === "INFRA" ? "🏗" : "🧩" }),
1198
- /* @__PURE__ */ t("span", { className: a.appName, title: e.appName, children: e.appName }),
1199
- /* @__PURE__ */ t("span", { className: a.appCode, children: e.appCode }),
1200
- /* @__PURE__ */ t(
1201
- k,
1202
- {
1203
- className: a.appTag,
1204
- color: e.appType === "INFRA" ? "purple" : "geekblue",
1205
- children: e.appType === "INFRA" ? "基建" : "应用"
1206
- }
1207
- ),
1208
- e.appType === "APP" ? /* @__PURE__ */ t(
1209
- "button",
1210
- {
1211
- type: "button",
1212
- className: a.appGo,
1213
- onClick: () => {
1214
- const r = new URLSearchParams();
1215
- r.set("product", d || ""), l != null && l.name && r.set("productName", l.name), r.set("app", e.appCode), U.push(`/lc/apps?${r.toString()}`);
1216
- },
1217
- children: "去研发"
1218
- }
1219
- ) : /* @__PURE__ */ t("span", { className: a.appInfraNote, children: "横切多产品" }),
1220
- /* @__PURE__ */ t(
1221
- "button",
1222
- {
1223
- type: "button",
1224
- className: a.appUnbind,
1225
- onClick: () => void ut(e.id),
1226
- title: "解绑",
1227
- children: "✕"
1228
- }
1229
- )
1230
- ] }, e.id)) })
1231
- ] }) : A === "domain" ? /* @__PURE__ */ s("div", { className: a.overviewPanel, children: [
1232
- /* @__PURE__ */ s("div", { className: a.domainBlock, children: [
1233
- /* @__PURE__ */ t("div", { className: a.domainBlockTitle, children: "📖 统一语言 · 术语" }),
1234
- le.length === 0 ? /* @__PURE__ */ t("div", { className: a.domainEmpty, children: "还没有术语,先在对话里对齐统一语言" }) : /* @__PURE__ */ t("div", { className: a.domainList, children: le.map((e, r) => /* @__PURE__ */ s("div", { className: a.domainRow, children: [
1235
- /* @__PURE__ */ t("span", { className: a.domainName, children: String(e.term ?? e.term_code ?? "") }),
1236
- /* @__PURE__ */ t("span", { className: a.domainDesc, children: String(e.definition ?? "") })
1237
- ] }, String(e.id ?? r))) })
1238
- ] }),
1239
- /* @__PURE__ */ s("div", { className: a.domainBlock, children: [
1240
- /* @__PURE__ */ t("div", { className: a.domainBlockTitle, children: "🧬 领域概念" }),
1241
- de.length === 0 ? /* @__PURE__ */ t("div", { className: a.domainEmpty, children: "还没有概念模型" }) : /* @__PURE__ */ t("div", { className: a.domainList, children: de.map((e, r) => /* @__PURE__ */ s("div", { className: a.domainRow, children: [
1242
- /* @__PURE__ */ t("span", { className: a.domainName, children: String(e.name ?? e.code ?? "") }),
1243
- /* @__PURE__ */ t("span", { className: a.domainDesc, children: String(e.description ?? "") })
1244
- ] }, String(e.id ?? r))) })
1245
- ] }),
1246
- /* @__PURE__ */ s("div", { className: a.domainBlock, children: [
1247
- /* @__PURE__ */ t("div", { className: a.domainBlockTitle, children: "🎬 用户专家团" }),
1248
- pe.length === 0 ? /* @__PURE__ */ t("div", { className: a.domainEmpty, children: "还没有专家团,描述目标用户的典型操作链路" }) : /* @__PURE__ */ t("div", { className: a.domainList, children: pe.map((e, r) => /* @__PURE__ */ s("div", { className: a.domainRow, children: [
1249
- /* @__PURE__ */ t("span", { className: a.domainName, children: String(e.title ?? e.name ?? "") }),
1250
- /* @__PURE__ */ t("span", { className: a.domainDesc, children: String(e.description ?? "") })
1251
- ] }, String(e.id ?? r))) })
1252
- ] })
1253
- ] }) : A === "design" ? /* @__PURE__ */ s("div", { className: a.overviewPanel, children: [
1254
- /* @__PURE__ */ t("div", { className: a.designHint, children: "设计稿在左侧文件树(标注「设计稿」标签);点选后在中间渲染区直渲 raw HTML" }),
1255
- he.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "还没有设计稿记录" }) : /* @__PURE__ */ t("div", { className: a.designList, children: he.map((e, r) => /* @__PURE__ */ s("div", { className: a.designRow, children: [
1256
- /* @__PURE__ */ t("span", { className: a.designIcon, children: "🖼" }),
1257
- /* @__PURE__ */ t("span", { className: a.designName, children: String(e.title ?? e.name ?? "") }),
1258
- /* @__PURE__ */ t("span", { className: a.designTime, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 10) })
1259
- ] }, String(e.id ?? r))) })
1260
- ] }) : /* @__PURE__ */ s("div", { className: a.overviewPanel, children: [
1261
- /* @__PURE__ */ s("div", { className: a.domainBlock, children: [
1262
- /* @__PURE__ */ t("div", { className: a.domainBlockTitle, children: "💬 群聊会话" }),
1263
- me.length === 0 ? /* @__PURE__ */ t("div", { className: a.domainEmpty, children: "还没有群聊会话,右侧「发起聊天」开始" }) : /* @__PURE__ */ t("div", { className: a.domainList, children: me.map((e, r) => /* @__PURE__ */ s("div", { className: a.domainRow, children: [
1264
- /* @__PURE__ */ t("span", { className: a.domainName, children: String(e.title ?? e.session_code ?? "") }),
1265
- /* @__PURE__ */ t("span", { className: a.domainDesc, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 16).replace("T", " ") })
1266
- ] }, String(e.id ?? r))) })
1267
- ] }),
1268
- /* @__PURE__ */ s("div", { className: a.domainBlock, children: [
1269
- /* @__PURE__ */ t("div", { className: a.domainBlockTitle, children: "📌 蒸馏提案" }),
1270
- Oe.length === 0 ? /* @__PURE__ */ t("div", { className: a.domainEmpty, children: "还没有提案(聊天中沉淀的需求/设计提案会出现在这里)" }) : /* @__PURE__ */ t("div", { className: a.domainList, children: Oe.map((e, r) => {
1271
- let g = {};
1272
- try {
1273
- g = JSON.parse(String(e.payload ?? "{}"));
1274
- } catch {
1275
- }
1276
- const S = String(e.proposal_type ?? "requirement");
1277
- return /* @__PURE__ */ s("div", { className: a.domainRow, children: [
1278
- /* @__PURE__ */ s("span", { className: a.domainName, children: [
1279
- /* @__PURE__ */ t(k, { className: a.reqTag, color: S === "design" ? "geekblue" : "blue", children: S }),
1280
- String(g.title ?? "")
1281
- ] }),
1282
- /* @__PURE__ */ t("span", { className: a.domainDesc, children: String(g.description ?? "") })
1283
- ] }, String(e.id ?? r));
1284
- }) })
1285
- ] })
1286
- ] })
1287
- ] }) : V == null ? /* @__PURE__ */ t("div", { className: a.centerFill, children: /* @__PURE__ */ t(ee, {}) }) : /* @__PURE__ */ t("div", { className: a.renderArea, children: h === "design" ? (
1288
- /* 设计稿:raw 通常为 HTML → iframe srcdoc 渲染 */
1289
- /* @__PURE__ */ t(
1290
- "iframe",
1291
- {
1292
- className: a.renderIframe,
1293
- srcDoc: V,
1294
- title: W,
1295
- sandbox: "allow-scripts allow-same-origin"
1296
- }
1297
- )
1298
- ) : /* @__PURE__ */ t("pre", { className: a.renderCode, children: V || "(空文件)" }) }) }),
1299
- /* @__PURE__ */ t("aside", { className: a.right, children: Xe === "list" ? /* @__PURE__ */ s("div", { className: a.chatSide, children: [
1300
- /* @__PURE__ */ s("div", { className: a.chatSideHeader, children: [
1301
- /* @__PURE__ */ s("span", { className: a.chatSideTitle, children: [
1302
- /* @__PURE__ */ t(Rt, {}),
1303
- " 聊天组"
1304
- ] }),
1305
- /* @__PURE__ */ s(
1306
- te,
1307
- {
1308
- size: "small",
1309
- type: "primary",
1310
- ghost: !0,
1311
- loading: ie,
1312
- onClick: Nt,
1313
- children: [
1314
- /* @__PURE__ */ t(kt, {}),
1315
- " 发起聊天"
1316
- ]
1317
- }
1318
- )
1319
- ] }),
1320
- /* @__PURE__ */ t("div", { className: a.chatGroupList, children: $.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "还没有聊天组,点「发起聊天」开始" }) : $.map((e) => /* @__PURE__ */ s(
1321
- "div",
1322
- {
1323
- className: `${a.chatGroupRow} ${Le === e.id ? a.chatGroupRowActive : ""}`,
1324
- onClick: () => !ie && Re(e),
1325
- children: [
1326
- /* @__PURE__ */ t("span", { className: a.chatGroupName, title: e.name, children: e.name }),
1327
- /* @__PURE__ */ t("span", { className: a.chatGroupTime, children: String(e.createTime ?? "").slice(5, 16).replace("T", " ") })
1328
- ]
1329
- },
1330
- e.id
1331
- )) })
1332
- ] }) : /* @__PURE__ */ s("div", { className: a.chatPane, children: [
1333
- /* @__PURE__ */ s("div", { className: a.chatPaneHeader, children: [
1334
- /* @__PURE__ */ t(
1335
- "button",
1336
- {
1337
- type: "button",
1338
- className: a.backBtn,
1339
- onClick: () => {
1340
- re("list"), P.current !== void 0 && F.setState({ currentProject: P.current }), P.current = void 0;
1341
- },
1342
- title: "返回聊天组列表",
1343
- children: "←"
1344
- }
1345
- ),
1346
- /* @__PURE__ */ s("span", { className: a.chatPaneTitle, children: [
1347
- "群聊 · ",
1348
- (l == null ? void 0 : l.name) || d
1349
- ] })
1350
- ] }),
1351
- /* @__PURE__ */ t("div", { className: a.chatPaneBody, children: /* @__PURE__ */ t(Ot, { hideTabs: !0 }) })
1352
- ] }) })
1353
- ] }) : (
1354
- /* ═══ 产品架构:架构语言的表达面(产品组第二项,页内无 tab 条) ═══ */
1355
- /* @__PURE__ */ t(Ua, {})
1356
- )
1357
- ] });
1358
- }
1359
- export {
1360
- ti as default
1361
- };