@yuku123/z-team-component 0.2.80 → 0.2.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChangeLogView-_bRZ55Yi.js +542 -0
- package/dist/ComponentDoc-BFoF51we.js +3998 -0
- package/dist/InvitationManagementPage-CTPCZXHu.js +495 -0
- package/dist/OnboardingPage-DwtuTL61.js +393 -0
- package/dist/ScheduledTasks-yeTm2bOY.js +9407 -0
- package/dist/SystemShell-D9OzKxL-.js +689 -0
- package/dist/_commonjsHelpers-B52_cu2H.js +26 -0
- package/dist/api-CIhVblfa.js +2155 -0
- package/dist/api-DXLNhtCX.js +20 -0
- package/dist/browser-jb_PFvU3.js +1538 -0
- package/dist/createWorkspaceWsHandler-BWP5S5X3.js +12951 -0
- package/dist/ctc-sso-DtJHC-2M.js +117 -0
- package/dist/echarts-B1OU1xr4.js +16 -0
- package/dist/history-BlrA1eaW.js +41 -0
- package/dist/index-BCp5EtqR.js +914 -0
- package/dist/index-BHrMl3Jq.js +9585 -0
- package/dist/index-BP7WTzVH.js +137 -0
- package/dist/index-B_LJRFsK.js +339 -0
- package/dist/index-BgIheStI.js +133 -0
- package/dist/index-BohoJQPr.js +7631 -0
- package/dist/index-BydWNuk5.js +1229 -0
- package/dist/index-C815hPWS.js +430 -0
- package/dist/index-CBQMS6rx.js +178 -0
- package/dist/index-CESmMALI.js +242 -0
- package/dist/index-CUVdeb8y.js +638 -0
- package/dist/index-CijskN6t.js +316 -0
- package/dist/index-CoBZZQBy.js +112 -0
- package/dist/index-Co_0idJY.js +2936 -0
- package/dist/index-Cvx6rrxD.js +956 -0
- package/dist/index-Cwr5Slv1.js +480 -0
- package/dist/index-CxFAICql.js +42050 -0
- package/dist/index-DK70mOTz.js +143 -0
- package/dist/index-DT80Pwa_.js +5893 -0
- package/dist/index-DWsfQMp8.js +208 -0
- package/dist/index-DhDdFRHC.js +279 -0
- package/dist/index-Dm3wmB0K.js +435 -0
- package/dist/index-DzS6-D3M.js +1640 -0
- package/dist/index-PKkV63Sw.js +1143 -0
- package/dist/index-SbMjh8t4.js +574 -0
- package/dist/index-cdB5K3gx.js +814 -0
- package/dist/index-mnWs_wA3.js +93 -0
- package/dist/index-nU-V276i.js +170 -0
- package/dist/index-nW0ikV2R.js +2700 -0
- package/dist/index-uF04Ucsi.js +8 -0
- package/dist/index-x_7Rmav9.js +118 -0
- package/dist/index.js +10 -0
- package/dist/index.module-CAa-2T7m.js +72 -0
- package/dist/index.module-UI0iz8K0.js +42 -0
- package/dist/{menuPermission-D9NGpBZP.js → menuPermission-DHUqvHfu.js} +1 -1
- package/dist/pages.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { jsx as l, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
const d = typeof window < "u" && window.ZTEAM_DOWNLOAD_BASE || "", S = `${d}/latest-mac.json`, L = `${d}/latest-android.json`;
|
|
3
|
+
function T(a) {
|
|
4
|
+
return !a || a <= 0 ? "" : a < 1024 * 1024 ? `${(a / 1024).toFixed(0)} KB` : `${(a / (1024 * 1024)).toFixed(1)} MB`;
|
|
5
|
+
}
|
|
6
|
+
function A(a) {
|
|
7
|
+
if (!a) return "";
|
|
8
|
+
try {
|
|
9
|
+
const r = new Date(a);
|
|
10
|
+
return Number.isNaN(r.getTime()) ? a : `${r.getFullYear()}-${String(r.getMonth() + 1).padStart(
|
|
11
|
+
2,
|
|
12
|
+
"0"
|
|
13
|
+
)}-${String(r.getDate()).padStart(2, "0")}`;
|
|
14
|
+
} catch {
|
|
15
|
+
return a;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
async function E(a) {
|
|
19
|
+
if (!a) return null;
|
|
20
|
+
try {
|
|
21
|
+
const r = await fetch(a, {
|
|
22
|
+
headers: { Accept: "application/json" }
|
|
23
|
+
});
|
|
24
|
+
if (!r.ok) return null;
|
|
25
|
+
const t = await r.text();
|
|
26
|
+
if (!t.trim().startsWith("{")) return null;
|
|
27
|
+
const e = JSON.parse(t);
|
|
28
|
+
return !e || !e.version || !e.downloadUrl ? null : {
|
|
29
|
+
version: e.version,
|
|
30
|
+
arch: e.arch || "",
|
|
31
|
+
downloadUrl: e.downloadUrl,
|
|
32
|
+
fileName: e.fileName || "",
|
|
33
|
+
fileSize: Number(e.fileSize) || 0,
|
|
34
|
+
changelog: e.changelog || "",
|
|
35
|
+
releaseType: e.releaseType || "stable",
|
|
36
|
+
releaseTime: e.releaseTime || "",
|
|
37
|
+
...e.windows ? {
|
|
38
|
+
windows: w(e.windows)
|
|
39
|
+
} : {}
|
|
40
|
+
};
|
|
41
|
+
} catch {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function w(a) {
|
|
46
|
+
return {
|
|
47
|
+
version: a.version || "",
|
|
48
|
+
arch: a.arch || "",
|
|
49
|
+
downloadUrl: a.downloadUrl || "",
|
|
50
|
+
fileName: a.fileName || "",
|
|
51
|
+
fileSize: Number(a.fileSize) || 0,
|
|
52
|
+
changelog: a.changelog || "",
|
|
53
|
+
releaseType: a.releaseType || "stable",
|
|
54
|
+
releaseTime: a.releaseTime || ""
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function H(a, r) {
|
|
58
|
+
var t;
|
|
59
|
+
return a ? r === "windows" ? (t = a.windows) != null && t.downloadUrl ? a.windows : null : a.downloadUrl ? a : null : null;
|
|
60
|
+
}
|
|
61
|
+
const v = {
|
|
62
|
+
message: [
|
|
63
|
+
"M21 11.5a8.4 8.4 0 0 1-9 8.4 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.2a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 8.5-8.4h.5a8.5 8.5 0 0 1 8 8z"
|
|
64
|
+
],
|
|
65
|
+
network: [
|
|
66
|
+
"M18 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",
|
|
67
|
+
"M6 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",
|
|
68
|
+
"M18 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",
|
|
69
|
+
"M8.6 13.5l6.8 4",
|
|
70
|
+
"M15.4 6.5l-6.8 4"
|
|
71
|
+
],
|
|
72
|
+
branch: [
|
|
73
|
+
"M6 3v12",
|
|
74
|
+
"M18 9a9 9 0 0 1-9 9"
|
|
75
|
+
],
|
|
76
|
+
shield: [
|
|
77
|
+
"M20 13c0 5-3.5 7.5-7.7 9a1 1 0 0 1-.6 0C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.2-2.7a1.2 1.2 0 0 1 1.5 0C14.5 3.8 17 5 19 5a1 1 0 0 1 1 1z",
|
|
78
|
+
"m9 12 2 2 4-4"
|
|
79
|
+
],
|
|
80
|
+
swap: ["M8 3 4 7l4 4", "M4 7h16", "m16 21 4-4-4-4", "M20 17H4"],
|
|
81
|
+
users: [
|
|
82
|
+
"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
83
|
+
"M22 21v-2a4 4 0 0 0-3-3.9",
|
|
84
|
+
"M16 3.1a4 4 0 0 1 0 7.8"
|
|
85
|
+
],
|
|
86
|
+
book: [
|
|
87
|
+
"M12 7v14",
|
|
88
|
+
"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"
|
|
89
|
+
],
|
|
90
|
+
layers: [
|
|
91
|
+
"M12.8 2.2a2 2 0 0 0-1.6 0L2.6 6.1a1 1 0 0 0 0 1.8l8.6 3.9a2 2 0 0 0 1.6 0l8.6-3.9a1 1 0 0 0 0-1.8z",
|
|
92
|
+
"m22 12.5-9.2 4.2a2 2 0 0 1-1.6 0L2 12.5",
|
|
93
|
+
"m22 17.5-9.2 4.2a2 2 0 0 1-1.6 0L2 17.5"
|
|
94
|
+
],
|
|
95
|
+
laptop: [
|
|
96
|
+
"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v9H4z",
|
|
97
|
+
"M2 17h20l-1.5 1.8a1 1 0 0 1-1.3.4H4.8a1 1 0 0 1-1.3-.4z"
|
|
98
|
+
],
|
|
99
|
+
phone: [
|
|
100
|
+
"M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z",
|
|
101
|
+
"M11 18h2"
|
|
102
|
+
],
|
|
103
|
+
globe: [
|
|
104
|
+
"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z",
|
|
105
|
+
"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",
|
|
106
|
+
"M2 12h20"
|
|
107
|
+
],
|
|
108
|
+
terminal: ["m4 17 6-6-6-6", "M12 19h8"],
|
|
109
|
+
bot: [
|
|
110
|
+
"M5 9h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z",
|
|
111
|
+
"M12 9V5.5",
|
|
112
|
+
"M2.5 12v4",
|
|
113
|
+
"M21.5 12v4",
|
|
114
|
+
"M9.5 13h.01",
|
|
115
|
+
"M14.5 13h.01",
|
|
116
|
+
"M10 16.5h4"
|
|
117
|
+
],
|
|
118
|
+
zap: ["M13 2 4 14h7l-1 8 9-12h-7z"],
|
|
119
|
+
server: [
|
|
120
|
+
"M4 4h16a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",
|
|
121
|
+
"M4 14h16a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1z",
|
|
122
|
+
"M7 7h.01",
|
|
123
|
+
"M7 17h.01"
|
|
124
|
+
],
|
|
125
|
+
wrench: ["M14.7 6.3a4 4 0 0 0 5 5l-9 9a2.8 2.8 0 0 1-4-4z"],
|
|
126
|
+
search: ["M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z", "m21 21-4.3-4.3"],
|
|
127
|
+
download: ["M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", "m7 10 5 5 5-5", "M12 15V3"],
|
|
128
|
+
check: ["M20 6 9 17l-5-5"],
|
|
129
|
+
arrow: ["M5 12h14", "m12 5 7 7-7 7"],
|
|
130
|
+
external: ["M15 3h6v6", "M10 14 21 3", "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"],
|
|
131
|
+
sparkle: ["M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z"]
|
|
132
|
+
}, m = {
|
|
133
|
+
windows: [
|
|
134
|
+
"M3 5.6 10 4.3v7.3H3z",
|
|
135
|
+
"M11 4.05 21 2.5v9.1H11z",
|
|
136
|
+
"M3 12.6h7v7.3l-7-1.3z",
|
|
137
|
+
"M11 12.6h10v9.1l-10-1.5z"
|
|
138
|
+
]
|
|
139
|
+
}, z = {
|
|
140
|
+
branch: [
|
|
141
|
+
[18, 6, 3],
|
|
142
|
+
[6, 18, 3]
|
|
143
|
+
]
|
|
144
|
+
}, g = {
|
|
145
|
+
bot: [[12, 3.6, 1.15]]
|
|
146
|
+
};
|
|
147
|
+
function N({
|
|
148
|
+
name: a,
|
|
149
|
+
size: r = 20,
|
|
150
|
+
strokeWidth: t = 1.7,
|
|
151
|
+
className: e,
|
|
152
|
+
style: u
|
|
153
|
+
}) {
|
|
154
|
+
const i = m[a], h = v[a], s = z[a], M = g[a];
|
|
155
|
+
return !i && !h ? /* @__PURE__ */ l(
|
|
156
|
+
"svg",
|
|
157
|
+
{
|
|
158
|
+
viewBox: "0 0 24 24",
|
|
159
|
+
width: r,
|
|
160
|
+
height: r,
|
|
161
|
+
className: e,
|
|
162
|
+
style: u,
|
|
163
|
+
"aria-hidden": "true",
|
|
164
|
+
children: /* @__PURE__ */ l("circle", { cx: "12", cy: "12", r: "3", fill: "currentColor" })
|
|
165
|
+
}
|
|
166
|
+
) : /* @__PURE__ */ f(
|
|
167
|
+
"svg",
|
|
168
|
+
{
|
|
169
|
+
viewBox: "0 0 24 24",
|
|
170
|
+
width: r,
|
|
171
|
+
height: r,
|
|
172
|
+
className: e,
|
|
173
|
+
style: u,
|
|
174
|
+
fill: "none",
|
|
175
|
+
stroke: "currentColor",
|
|
176
|
+
strokeWidth: t,
|
|
177
|
+
strokeLinecap: "round",
|
|
178
|
+
strokeLinejoin: "round",
|
|
179
|
+
"aria-hidden": "true",
|
|
180
|
+
focusable: "false",
|
|
181
|
+
children: [
|
|
182
|
+
i == null ? void 0 : i.map((n) => /* @__PURE__ */ l("path", { d: n, fill: "currentColor", stroke: "none" }, n)),
|
|
183
|
+
h == null ? void 0 : h.map((n) => /* @__PURE__ */ l("path", { d: n }, n)),
|
|
184
|
+
s == null ? void 0 : s.map(([n, o, c]) => /* @__PURE__ */ l("circle", { cx: n, cy: o, r: c }, `${n}-${o}`)),
|
|
185
|
+
M == null ? void 0 : M.map(([n, o, c]) => /* @__PURE__ */ l(
|
|
186
|
+
"circle",
|
|
187
|
+
{
|
|
188
|
+
cx: n,
|
|
189
|
+
cy: o,
|
|
190
|
+
r: c,
|
|
191
|
+
fill: "currentColor",
|
|
192
|
+
stroke: "none"
|
|
193
|
+
},
|
|
194
|
+
`f-${n}-${o}`
|
|
195
|
+
))
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
export {
|
|
201
|
+
L as A,
|
|
202
|
+
N as L,
|
|
203
|
+
S as M,
|
|
204
|
+
T as a,
|
|
205
|
+
A as b,
|
|
206
|
+
E as f,
|
|
207
|
+
H as p
|
|
208
|
+
};
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { FilePptOutlined as P, EditOutlined as O, ScheduleOutlined as A, FileImageOutlined as $, CloseOutlined as F } from "@ant-design/icons";
|
|
3
|
+
import { useState as m, useCallback as x } from "react";
|
|
4
|
+
import { h as w } from "./history-BlrA1eaW.js";
|
|
5
|
+
const R = "_portalRoot_1sa2c_7", q = "_portalHeader_1sa2c_47", B = "_brandRow_1sa2c_53", D = "_brandLogo_1sa2c_59", L = "_brandTitle_1sa2c_63", M = "_brandSubtitle_1sa2c_70", G = "_portalMain_1sa2c_76", H = "_sectionTitle_1sa2c_85", j = "_cardGrid_1sa2c_92", K = "_scenarioCard_1sa2c_98", W = "_cardTop_1sa2c_114", z = "_cardIcon_1sa2c_119", Z = "_cardInfo_1sa2c_123", Q = "_cardTitle_1sa2c_127", J = "_cardTags_1sa2c_134", U = "_tag_1sa2c_139", X = "_cardDesc_1sa2c_148", Y = "_cardAction_1sa2c_154", V = "_btnCreate_1sa2c_159", ee = "_portalFooter_1sa2c_184", ae = "_linkWorkspace_1sa2c_190", oe = "_modalOverlay_1sa2c_206", te = "_modalBox_1sa2c_217", re = "_modalHeader_1sa2c_226", ne = "_modalIcon_1sa2c_239", ce = "_modalClose_1sa2c_242", le = "_modalBody_1sa2c_255", ie = "_modalDesc_1sa2c_258", se = "_fieldGroup_1sa2c_264", de = "_fieldLabel_1sa2c_269", _e = "_required_1sa2c_274", pe = "_fieldInput_1sa2c_278", me = "_fieldInputError_1sa2c_298", ue = "_fieldTextarea_1sa2c_301", fe = "_fieldTextareaError_1sa2c_325", he = "_fieldError_1sa2c_328", ge = "_modalFooter_1sa2c_333", Ce = "_btnCancel_1sa2c_339", be = "_btnConfirm_1sa2c_354", e = {
|
|
6
|
+
portalRoot: R,
|
|
7
|
+
portalHeader: q,
|
|
8
|
+
brandRow: B,
|
|
9
|
+
brandLogo: D,
|
|
10
|
+
brandTitle: L,
|
|
11
|
+
brandSubtitle: M,
|
|
12
|
+
portalMain: G,
|
|
13
|
+
sectionTitle: H,
|
|
14
|
+
cardGrid: j,
|
|
15
|
+
scenarioCard: K,
|
|
16
|
+
cardTop: W,
|
|
17
|
+
cardIcon: z,
|
|
18
|
+
cardInfo: Z,
|
|
19
|
+
cardTitle: Q,
|
|
20
|
+
cardTags: J,
|
|
21
|
+
tag: U,
|
|
22
|
+
cardDesc: X,
|
|
23
|
+
cardAction: Y,
|
|
24
|
+
btnCreate: V,
|
|
25
|
+
portalFooter: ee,
|
|
26
|
+
linkWorkspace: ae,
|
|
27
|
+
modalOverlay: oe,
|
|
28
|
+
modalBox: te,
|
|
29
|
+
modalHeader: re,
|
|
30
|
+
modalIcon: ne,
|
|
31
|
+
modalClose: ce,
|
|
32
|
+
modalBody: le,
|
|
33
|
+
modalDesc: ie,
|
|
34
|
+
fieldGroup: se,
|
|
35
|
+
fieldLabel: de,
|
|
36
|
+
required: _e,
|
|
37
|
+
fieldInput: pe,
|
|
38
|
+
fieldInputError: me,
|
|
39
|
+
fieldTextarea: ue,
|
|
40
|
+
fieldTextareaError: fe,
|
|
41
|
+
fieldError: he,
|
|
42
|
+
modalFooter: ge,
|
|
43
|
+
btnCancel: Ce,
|
|
44
|
+
btnConfirm: be
|
|
45
|
+
}, Ne = window.ZTEAM_USE_KAPI === !0 ? "/kapi/z-team/api" : "/z-team/api", Te = [
|
|
46
|
+
{
|
|
47
|
+
key: "ppt-creation",
|
|
48
|
+
icon: /* @__PURE__ */ a(P, {}),
|
|
49
|
+
title: "PPT 制作",
|
|
50
|
+
description: "PPT 制作:主题/受众/页数 → 大纲生成 → 逐页内容填充 → 风格与可视化建议",
|
|
51
|
+
scenarioCode: "ppt_creation",
|
|
52
|
+
source: "ppt_creation",
|
|
53
|
+
tags: ["大纲生成", "内容填充", "风格建议"],
|
|
54
|
+
inputConfig: {
|
|
55
|
+
label: "PPT 主题与需求",
|
|
56
|
+
placeholder: `请输入 PPT 主题、受众、页数、风格等关键信息,例如:
|
|
57
|
+
主题:2026 Q3 产品回顾
|
|
58
|
+
受众:公司管理层
|
|
59
|
+
页数:15 页
|
|
60
|
+
风格:商务简洁,重点突出数据`,
|
|
61
|
+
required: !0,
|
|
62
|
+
paramKey: "topic",
|
|
63
|
+
multiline: !0
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
key: "longform-writing",
|
|
68
|
+
icon: /* @__PURE__ */ a(O, {}),
|
|
69
|
+
title: "长文写作",
|
|
70
|
+
description: "长文写作:主题/关键词/风格 → 结构化大纲 → Markdown 正文 → 润色与精简",
|
|
71
|
+
scenarioCode: "longform_writing",
|
|
72
|
+
source: "longform_writing",
|
|
73
|
+
tags: ["结构化", "Markdown", "风格可控"],
|
|
74
|
+
inputConfig: {
|
|
75
|
+
label: "写作主题与要求",
|
|
76
|
+
placeholder: `请输入主题、关键词、目标读者、风格等关键信息,例如:
|
|
77
|
+
主题:z-opc 平台 2026 年度回顾
|
|
78
|
+
读者:全体员工
|
|
79
|
+
风格:积极、突出成绩、控制在 2000 字以内`,
|
|
80
|
+
required: !0,
|
|
81
|
+
paramKey: "topic",
|
|
82
|
+
multiline: !0
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
key: "weekly-report",
|
|
87
|
+
icon: /* @__PURE__ */ a(A, {}),
|
|
88
|
+
title: "周报月报",
|
|
89
|
+
description: "周报/月报:碎片记录/时间段 → 自动汇总 → 模板化输出(本周工作/下周计划/风险对齐)",
|
|
90
|
+
scenarioCode: "weekly_report",
|
|
91
|
+
source: "weekly_report",
|
|
92
|
+
tags: ["自动汇总", "模板化", "目标对齐"],
|
|
93
|
+
inputConfig: {
|
|
94
|
+
label: "碎片记录与时间段",
|
|
95
|
+
placeholder: `粘贴或描述一段时间内的碎片工作记录,例如:
|
|
96
|
+
时间段:2026-08-25 ~ 2026-08-31
|
|
97
|
+
记录:
|
|
98
|
+
- 完成 X 功能开发
|
|
99
|
+
- 修复 Y 故障
|
|
100
|
+
- 与 Z 团队对齐方案`,
|
|
101
|
+
required: !0,
|
|
102
|
+
paramKey: "topic",
|
|
103
|
+
multiline: !0
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
key: "image-understanding",
|
|
108
|
+
icon: /* @__PURE__ */ a($, {}),
|
|
109
|
+
title: "图片理解",
|
|
110
|
+
description: "图片理解:图片 + 问题 → OCR 文本提取 → 图表/表格识别 → 智能问答",
|
|
111
|
+
scenarioCode: "image_understanding",
|
|
112
|
+
source: "image_understanding",
|
|
113
|
+
tags: ["OCR", "图表识别", "智能问答"],
|
|
114
|
+
inputConfig: {
|
|
115
|
+
label: "图片描述或问题",
|
|
116
|
+
placeholder: `粘贴图片链接或描述图片内容,并附上你的问题,例如:
|
|
117
|
+
图片:https://example.com/sales-chart.png
|
|
118
|
+
问题:分析 2026 Q3 各区域销售额同比变化及异常原因`,
|
|
119
|
+
required: !0,
|
|
120
|
+
paramKey: "topic",
|
|
121
|
+
multiline: !0
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
];
|
|
125
|
+
function ye({
|
|
126
|
+
scenario: o,
|
|
127
|
+
onClose: c,
|
|
128
|
+
onCreated: d
|
|
129
|
+
}) {
|
|
130
|
+
var g, C, b, N, T;
|
|
131
|
+
const [r, s] = m(""), [u, f] = m(!1), [l, i] = m(""), E = !!((g = o.inputConfig) != null && g.multiline), h = x(async () => {
|
|
132
|
+
var y, k, I;
|
|
133
|
+
const t = r.trim();
|
|
134
|
+
if ((y = o.inputConfig) != null && y.required && !t) {
|
|
135
|
+
i(`请填写${o.inputConfig.label}`);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
i(""), f(!0);
|
|
139
|
+
try {
|
|
140
|
+
const _ = ((k = t.split(`
|
|
141
|
+
`)[0]) == null ? void 0 : k.trim()) ?? "", S = _.length > 0 ? _.length > 32 ? `${_.slice(0, 32)}…` : _ : `${Date.now()}`, v = `${o.title}-${S}`, p = await (await fetch(`${Ne}/scenario-instances/`, {
|
|
142
|
+
method: "POST",
|
|
143
|
+
credentials: "include",
|
|
144
|
+
headers: {
|
|
145
|
+
Accept: "application/json",
|
|
146
|
+
"Content-Type": "application/json"
|
|
147
|
+
},
|
|
148
|
+
body: JSON.stringify({
|
|
149
|
+
name: v,
|
|
150
|
+
description: `${o.title}:${t.length > 120 ? `${t.slice(0, 120)}…` : t}`,
|
|
151
|
+
workspace_path: v,
|
|
152
|
+
scenario_code: o.scenarioCode,
|
|
153
|
+
extend_params: {
|
|
154
|
+
[o.inputConfig.paramKey]: t,
|
|
155
|
+
source: o.source
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
})).json();
|
|
159
|
+
p.success && ((I = p.data) != null && I.id) ? d(p.data.id) : i(p.message || "创建失败,请重试");
|
|
160
|
+
} catch {
|
|
161
|
+
i("网络错误,请检查服务是否可用");
|
|
162
|
+
} finally {
|
|
163
|
+
f(!1);
|
|
164
|
+
}
|
|
165
|
+
}, [r, o, d]);
|
|
166
|
+
return /* @__PURE__ */ a("div", { className: e.modalOverlay, onClick: c, children: /* @__PURE__ */ n("div", { className: e.modalBox, onClick: (t) => t.stopPropagation(), children: [
|
|
167
|
+
/* @__PURE__ */ n("div", { className: e.modalHeader, children: [
|
|
168
|
+
/* @__PURE__ */ a("span", { className: e.modalIcon, children: o.icon }),
|
|
169
|
+
/* @__PURE__ */ a("h3", { children: o.title }),
|
|
170
|
+
/* @__PURE__ */ a("button", { className: e.modalClose, onClick: c, children: /* @__PURE__ */ a(F, {}) })
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ n("div", { className: e.modalBody, children: [
|
|
173
|
+
/* @__PURE__ */ a("p", { className: e.modalDesc, children: o.description }),
|
|
174
|
+
/* @__PURE__ */ n("div", { className: e.fieldGroup, children: [
|
|
175
|
+
/* @__PURE__ */ n("label", { className: e.fieldLabel, children: [
|
|
176
|
+
(C = o.inputConfig) == null ? void 0 : C.label,
|
|
177
|
+
((b = o.inputConfig) == null ? void 0 : b.required) && /* @__PURE__ */ a("span", { className: e.required, children: "*" })
|
|
178
|
+
] }),
|
|
179
|
+
E ? /* @__PURE__ */ a(
|
|
180
|
+
"textarea",
|
|
181
|
+
{
|
|
182
|
+
className: `${e.fieldTextarea} ${l ? e.fieldTextareaError : ""}`,
|
|
183
|
+
value: r,
|
|
184
|
+
placeholder: (N = o.inputConfig) == null ? void 0 : N.placeholder,
|
|
185
|
+
onChange: (t) => {
|
|
186
|
+
s(t.target.value), l && i("");
|
|
187
|
+
},
|
|
188
|
+
rows: 5,
|
|
189
|
+
autoFocus: !0
|
|
190
|
+
}
|
|
191
|
+
) : /* @__PURE__ */ a(
|
|
192
|
+
"input",
|
|
193
|
+
{
|
|
194
|
+
className: `${e.fieldInput} ${l ? e.fieldInputError : ""}`,
|
|
195
|
+
type: "text",
|
|
196
|
+
value: r,
|
|
197
|
+
placeholder: (T = o.inputConfig) == null ? void 0 : T.placeholder,
|
|
198
|
+
onChange: (t) => {
|
|
199
|
+
s(t.target.value), l && i("");
|
|
200
|
+
},
|
|
201
|
+
onKeyDown: (t) => {
|
|
202
|
+
t.key === "Enter" && h();
|
|
203
|
+
},
|
|
204
|
+
autoFocus: !0
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
l && /* @__PURE__ */ a("p", { className: e.fieldError, children: l })
|
|
208
|
+
] })
|
|
209
|
+
] }),
|
|
210
|
+
/* @__PURE__ */ n("div", { className: e.modalFooter, children: [
|
|
211
|
+
/* @__PURE__ */ a("button", { className: e.btnCancel, onClick: c, children: "取消" }),
|
|
212
|
+
/* @__PURE__ */ a(
|
|
213
|
+
"button",
|
|
214
|
+
{
|
|
215
|
+
className: e.btnConfirm,
|
|
216
|
+
onClick: h,
|
|
217
|
+
disabled: u,
|
|
218
|
+
children: u ? "创建中..." : "确认并开始"
|
|
219
|
+
}
|
|
220
|
+
)
|
|
221
|
+
] })
|
|
222
|
+
] }) });
|
|
223
|
+
}
|
|
224
|
+
function Ee() {
|
|
225
|
+
const [o, c] = m(
|
|
226
|
+
null
|
|
227
|
+
), d = x((r) => {
|
|
228
|
+
localStorage.setItem("ft_last_project_id", String(r)), localStorage.removeItem("ft_last_file_path"), w.push("/workspace");
|
|
229
|
+
}, []);
|
|
230
|
+
return /* @__PURE__ */ n("div", { className: e.portalRoot, children: [
|
|
231
|
+
/* @__PURE__ */ n("header", { className: e.portalHeader, children: [
|
|
232
|
+
/* @__PURE__ */ n("div", { className: e.brandRow, children: [
|
|
233
|
+
/* @__PURE__ */ a("img", { src: "/logo.svg", alt: "logo", className: e.brandLogo }),
|
|
234
|
+
/* @__PURE__ */ a("h1", { className: e.brandTitle, children: "Z-OPC 一人公司基建" })
|
|
235
|
+
] }),
|
|
236
|
+
/* @__PURE__ */ a("p", { className: e.brandSubtitle, children: "一人公司的 AI 基建 — 选择场景,即刻启动智能协作" })
|
|
237
|
+
] }),
|
|
238
|
+
/* @__PURE__ */ n("main", { className: e.portalMain, children: [
|
|
239
|
+
/* @__PURE__ */ a("h2", { className: e.sectionTitle, children: "可用场景" }),
|
|
240
|
+
/* @__PURE__ */ a("div", { className: e.cardGrid, children: Te.map((r) => /* @__PURE__ */ n("div", { className: e.scenarioCard, children: [
|
|
241
|
+
/* @__PURE__ */ n("div", { className: e.cardTop, children: [
|
|
242
|
+
/* @__PURE__ */ a("span", { className: e.cardIcon, children: r.icon }),
|
|
243
|
+
/* @__PURE__ */ n("div", { className: e.cardInfo, children: [
|
|
244
|
+
/* @__PURE__ */ a("h3", { className: e.cardTitle, children: r.title }),
|
|
245
|
+
/* @__PURE__ */ a("div", { className: e.cardTags, children: r.tags.map((s) => /* @__PURE__ */ a("span", { className: e.tag, children: s }, s)) })
|
|
246
|
+
] })
|
|
247
|
+
] }),
|
|
248
|
+
/* @__PURE__ */ a("p", { className: e.cardDesc, children: r.description }),
|
|
249
|
+
/* @__PURE__ */ a("div", { className: e.cardAction, children: /* @__PURE__ */ a(
|
|
250
|
+
"button",
|
|
251
|
+
{
|
|
252
|
+
className: e.btnCreate,
|
|
253
|
+
onClick: () => c(r),
|
|
254
|
+
children: "创建"
|
|
255
|
+
}
|
|
256
|
+
) })
|
|
257
|
+
] }, r.key)) })
|
|
258
|
+
] }),
|
|
259
|
+
/* @__PURE__ */ a("footer", { className: e.portalFooter, children: /* @__PURE__ */ a(
|
|
260
|
+
"button",
|
|
261
|
+
{
|
|
262
|
+
className: e.linkWorkspace,
|
|
263
|
+
onClick: () => w.push("/workspace"),
|
|
264
|
+
children: "进入工作台 →"
|
|
265
|
+
}
|
|
266
|
+
) }),
|
|
267
|
+
o && /* @__PURE__ */ a(
|
|
268
|
+
ye,
|
|
269
|
+
{
|
|
270
|
+
scenario: o,
|
|
271
|
+
onClose: () => c(null),
|
|
272
|
+
onCreated: d
|
|
273
|
+
}
|
|
274
|
+
)
|
|
275
|
+
] });
|
|
276
|
+
}
|
|
277
|
+
export {
|
|
278
|
+
Ee as default
|
|
279
|
+
};
|