@yuku123/z-team-component 0.2.135 → 0.2.137
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/{AdminModuleContent-DHCn4OpR.js → AdminModuleContent-B1YxyaNI.js} +6202 -6211
- package/dist/{ChangeLogView-Cc5cYmcz.js → ChangeLogView-BKQfeeag.js} +1 -1
- package/dist/{ComponentDoc-BAUII4UZ.js → ComponentDoc-DHTIWtcE.js} +994 -1006
- package/dist/{InvitationManagementPage-BgY1jxQB.js → InvitationManagementPage-DgVqNUvK.js} +63 -73
- package/dist/{OnboardingPage-CckzpaI0.js → OnboardingPage-DiBVtw23.js} +2 -2
- package/dist/{ScheduledTasks-DZSEnuIF.js → ScheduledTasks-DuR4sg4k.js} +6 -6
- package/dist/{SystemShell-DCRIL4Rh.js → SystemShell-DoMowhBn.js} +265 -262
- package/dist/{admin-logs-DEawvNOd.js → admin-logs-BZasxvF5.js} +1 -1
- package/dist/{api-B-nnjGsa.js → api-BhdcdwWj.js} +1 -1
- package/dist/{api--xHkMnrY.js → api-CELjpxxS.js} +1 -1
- package/dist/{createWorkspaceWsHandler-y6pRWLoa.js → createWorkspaceWsHandler-SY-wVjjh.js} +3 -3
- package/dist/{index-CMLlvrEW.js → index-B0xiWAhM.js} +3688 -3664
- package/dist/{index-LnUf9Vil.js → index-B2iHgJnx.js} +6 -6
- package/dist/{index-BIffImVM.js → index-B3K7b3Bf.js} +146 -146
- package/dist/{index-DxXcTAH4.js → index-B6Nj2_Zo.js} +1 -1
- package/dist/{index-C7ng_cdZ.js → index-BB7G9ZN4.js} +1 -1
- package/dist/{index-C09THX8u.js → index-BDZOz1cm.js} +2 -2
- package/dist/{index-DtgTLML8.js → index-BHBuOhK5.js} +3 -3
- package/dist/{index-XWWknPNw.js → index-Btpel9AF.js} +2 -2
- package/dist/{index-Do3pyigD.js → index-Bwe4EN63.js} +1 -1
- package/dist/{index-DePIQVt9.js → index-CV3kkXgP.js} +3 -3
- package/dist/{index-COn912sj.js → index-C_OjaGAs.js} +3 -3
- package/dist/{index-4R_QcR8P.js → index-Cd3a7nol.js} +2 -2
- package/dist/{index-C4cx5Qxu.js → index-CtFdsOsR.js} +2 -2
- package/dist/{index-H7hP7Fmj.js → index-Cxvua23F.js} +2 -2
- package/dist/{index-DlBN-ou4.js → index-D3YkA5j4.js} +5 -5
- package/dist/{index-B2ztJXV3.js → index-D9NoVz2x.js} +2 -2
- package/dist/{index-frmk-zNf.js → index-DOdAlZfA.js} +5 -5
- package/dist/{index-C9LqX4Lg.js → index-DSH-wcoD.js} +1 -1
- package/dist/{index-CcHrWE4P.js → index-DkF5EnSi.js} +2 -2
- package/dist/{index-ztXjGIJk.js → index-DlxfYOdw.js} +1 -1
- package/dist/{index-BDUHHaoY.js → index-DpiQW5SO.js} +130 -128
- package/dist/index-DrDFy5jN.js +139 -0
- package/dist/{index-DWrEAa8-.js → index-NfGgVmob.js} +507 -509
- package/dist/{index-CzS_q6Tn.js → index-X-n1B8fi.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/{instance-DL4u5k9c.js → instance-BOFjc82M.js} +1 -1
- package/dist/{menuPermission-CA_atlfk.js → menuPermission-Dfwf-EJP.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-BfBVm9AO.js → send-default-agent-team-message-CvPaOp3a.js} +1 -1
- package/dist/{sso-user-Dr8_-Sxd.js → sso-user-CAWQupk5.js} +1 -1
- package/dist/{training-CcGUA5KC.js → training-BYjqU8sn.js} +1 -1
- package/dist/{webide-C2JfQ-Je.js → webide-CDZpzRfx.js} +3 -3
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
- package/dist/index-Cxoup7V8.js +0 -139
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e, Fragment as we } from "react/jsx-runtime";
|
|
2
|
-
import { SearchOutlined as Ie, ReloadOutlined as
|
|
3
|
-
import { Input as K, Select as ae, Button as M, Modal as ve, Space as qe, Tooltip as oe, message as P, Tag as H, Popconfirm as
|
|
4
|
-
import { ListTable as
|
|
5
|
-
import { useState as o, useCallback as de, useEffect as ce, useMemo as pe, useRef as
|
|
6
|
-
import { f as
|
|
7
|
-
import { u as Ce, a4 as Wl } from "./ComponentDoc-
|
|
2
|
+
import { SearchOutlined as Ie, ReloadOutlined as Te, PlusOutlined as xe, ArrowUpOutlined as _t, ArrowDownOutlined as At, DeleteOutlined as Ke, PlayCircleOutlined as Kt, FolderOutlined as We, CaretRightOutlined as it, VideoCameraOutlined as Et, EditOutlined as ot, CopyOutlined as qt, CheckCircleOutlined as Dt, ClockCircleOutlined as Rt, SendOutlined as Vt, UserAddOutlined as Qt, TeamOutlined as Jt, AuditOutlined as Lt, EyeOutlined as Yt, AppstoreOutlined as Zt, CloudUploadOutlined as Xt, LinkOutlined as el, InfoCircleOutlined as tl, FileProtectOutlined as ll, BookOutlined as nl, GiftOutlined as al, AppstoreAddOutlined as il, NodeIndexOutlined as rl, FileDoneOutlined as ol, SolutionOutlined as sl, BarChartOutlined as dl } from "@ant-design/icons";
|
|
3
|
+
import { Input as K, Select as ae, Button as M, Modal as ve, Space as qe, Tooltip as oe, message as P, Tag as H, Popconfirm as Ne, Spin as Ze, Empty as He, AutoComplete as rt, Segmented as $t, TreeSelect as Xe, Descriptions as ne, InputNumber as ze, Drawer as cl, Tabs as Pt, Switch as Ot, Radio as pt, Tree as ul, Table as Pe } from "antd";
|
|
4
|
+
import { ListTable as _e, DEFAULT_PAGINATION as hl } from "@yuku123/z-frontend-common/ui";
|
|
5
|
+
import { useState as o, useCallback as de, useEffect as ce, useMemo as pe, useRef as Bt } from "react";
|
|
6
|
+
import { f as Mt, a as zt, b as st, c as dt, s as gt, d as ml, e as pl, g as et, h as gl, i as yl, j as vl, k as Ft, l as yt, m as fl, n as wl, o as Cl, r as Gt, p as Ut, q as bl, t as vt, u as Il, v as ct, w as ut, x as xl, y as Tl, z as Nl, A as kl, B as ft, C as Sl, D as _l, E as Al, F as El, G as Dl, H as wt, I as Rl, J as Ll, K as $l, L as Pl, M as Ol, N as Bl, O as Ml, P as Ct, Q as zl, R as Fl, S as Gl, T as Ul, U as jl } from "./training-BYjqU8sn.js";
|
|
7
|
+
import { u as Ce, a4 as Wl } from "./ComponentDoc-DHTIWtcE.js";
|
|
8
8
|
import { s as r } from "./index.module-UI0iz8K0.js";
|
|
9
9
|
import Hl from "dayjs";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import bt from "react-markdown";
|
|
11
|
+
import It from "remark-gfm";
|
|
12
12
|
import { h as be } from "./index.module-CAa-2T7m.js";
|
|
13
13
|
import { MarkdownLiveEditor as Kl } from "@yuku123/z-markdown-component";
|
|
14
|
-
import { h as ql } from "./index-
|
|
14
|
+
import { h as ql } from "./index-Bwe4EN63.js";
|
|
15
15
|
function Vl() {
|
|
16
|
-
const l = Ce((i) => i.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E,
|
|
16
|
+
const l = Ce((i) => i.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E, z] = o(null), [c, A] = o(!1), [C, T] = o(!1), [I, G] = o(null), [u, v] = o([]), [_, y] = o([]), [j, J] = o([]), [Z, O] = o([]), [w, F] = o([]), h = de(async () => {
|
|
17
17
|
L(!0);
|
|
18
18
|
try {
|
|
19
|
-
D(await
|
|
19
|
+
D(await Mt(x, E, l));
|
|
20
20
|
} catch {
|
|
21
21
|
} finally {
|
|
22
22
|
L(!1);
|
|
@@ -29,8 +29,8 @@ function Vl() {
|
|
|
29
29
|
let a = i ? { ...i } : { title: "", description: "", status: 0 }, p = [], R = [];
|
|
30
30
|
if (i != null && i.id)
|
|
31
31
|
try {
|
|
32
|
-
const
|
|
33
|
-
a =
|
|
32
|
+
const U = await pl(i.id, l);
|
|
33
|
+
a = U, p = (U.materials ?? []).map((Y) => ({
|
|
34
34
|
...Y,
|
|
35
35
|
_key: `m-${Y.materialId}`
|
|
36
36
|
}));
|
|
@@ -42,18 +42,18 @@ function Vl() {
|
|
|
42
42
|
} catch {
|
|
43
43
|
R = [];
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
]).then(([
|
|
50
|
-
J(
|
|
45
|
+
G(a), v(p), y(R), A(!0), Promise.all([
|
|
46
|
+
zt("", l),
|
|
47
|
+
st("", 1, l),
|
|
48
|
+
dt("", l)
|
|
49
|
+
]).then(([U, Y, te]) => {
|
|
50
|
+
J(U), O(Y), F(te);
|
|
51
51
|
}).catch(() => {
|
|
52
52
|
});
|
|
53
53
|
}, ee = (i, a) => {
|
|
54
54
|
v((p) => {
|
|
55
|
-
const R = [...p],
|
|
56
|
-
return
|
|
55
|
+
const R = [...p], U = i + a;
|
|
56
|
+
return U < 0 || U >= R.length ? p : ([R[i], R[U]] = [R[U], R[i]], R.map((Y, te) => ({ ...Y, sortOrder: te })));
|
|
57
57
|
});
|
|
58
58
|
}, Q = () => {
|
|
59
59
|
v((i) => [
|
|
@@ -78,7 +78,7 @@ function Vl() {
|
|
|
78
78
|
}
|
|
79
79
|
T(!0);
|
|
80
80
|
try {
|
|
81
|
-
await
|
|
81
|
+
await gt(
|
|
82
82
|
{
|
|
83
83
|
...I,
|
|
84
84
|
title: I.title.trim(),
|
|
@@ -91,7 +91,7 @@ function Vl() {
|
|
|
91
91
|
}))
|
|
92
92
|
},
|
|
93
93
|
l
|
|
94
|
-
), P.success("保存成功"), A(!1),
|
|
94
|
+
), P.success("保存成功"), A(!1), G(null), h();
|
|
95
95
|
} catch {
|
|
96
96
|
} finally {
|
|
97
97
|
T(!1);
|
|
@@ -154,7 +154,7 @@ function Vl() {
|
|
|
154
154
|
size: "small",
|
|
155
155
|
onClick: async () => {
|
|
156
156
|
try {
|
|
157
|
-
await
|
|
157
|
+
await gt(
|
|
158
158
|
// 后端 saveCourse 要求 title 非空,状态切换需携全量字段
|
|
159
159
|
{ ...a, status: a.status === 1 ? 2 : 1 },
|
|
160
160
|
l
|
|
@@ -166,7 +166,7 @@ function Vl() {
|
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
168
|
/* @__PURE__ */ e(
|
|
169
|
-
|
|
169
|
+
Ne,
|
|
170
170
|
{
|
|
171
171
|
title: (a.enrollCount ?? 0) > 0 ? `已有 ${a.enrollCount} 名学员报名,无法删除(可下线)` : "确认删除该课程?",
|
|
172
172
|
okText: "删除",
|
|
@@ -185,8 +185,8 @@ function Vl() {
|
|
|
185
185
|
type: "link",
|
|
186
186
|
size: "small",
|
|
187
187
|
danger: !0,
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
disabled: (a.enrollCount ?? 0) > 0,
|
|
189
|
+
children: "删除"
|
|
190
190
|
}
|
|
191
191
|
)
|
|
192
192
|
}
|
|
@@ -223,7 +223,7 @@ function Vl() {
|
|
|
223
223
|
placeholder: "状态",
|
|
224
224
|
style: { width: 110 },
|
|
225
225
|
value: E ?? void 0,
|
|
226
|
-
onChange: (i) =>
|
|
226
|
+
onChange: (i) => z(i ?? null),
|
|
227
227
|
options: [
|
|
228
228
|
{ value: 0, label: "草稿" },
|
|
229
229
|
{ value: 1, label: "上线" },
|
|
@@ -231,7 +231,7 @@ function Vl() {
|
|
|
231
231
|
]
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
234
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void h(), children: "刷新" }),
|
|
235
235
|
/* @__PURE__ */ e(
|
|
236
236
|
M,
|
|
237
237
|
{
|
|
@@ -244,7 +244,7 @@ function Vl() {
|
|
|
244
244
|
] })
|
|
245
245
|
] }),
|
|
246
246
|
/* @__PURE__ */ e("div", { className: r.tableCard, children: /* @__PURE__ */ e("div", { className: r.tableWrap, children: /* @__PURE__ */ e(
|
|
247
|
-
|
|
247
|
+
_e,
|
|
248
248
|
{
|
|
249
249
|
rows: n,
|
|
250
250
|
rowKey: "id",
|
|
@@ -267,7 +267,7 @@ function Vl() {
|
|
|
267
267
|
cancelText: "取消",
|
|
268
268
|
onOk: () => void N(),
|
|
269
269
|
onCancel: () => {
|
|
270
|
-
A(!1),
|
|
270
|
+
A(!1), G(null);
|
|
271
271
|
},
|
|
272
272
|
children: I ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
273
273
|
/* @__PURE__ */ t("div", { style: { display: "flex", gap: 12 }, children: [
|
|
@@ -278,7 +278,7 @@ function Vl() {
|
|
|
278
278
|
{
|
|
279
279
|
value: I.title,
|
|
280
280
|
placeholder: "如:新人研发安全培训",
|
|
281
|
-
onChange: (i) =>
|
|
281
|
+
onChange: (i) => G((a) => a && { ...a, title: i.target.value })
|
|
282
282
|
}
|
|
283
283
|
)
|
|
284
284
|
] }),
|
|
@@ -289,7 +289,7 @@ function Vl() {
|
|
|
289
289
|
{
|
|
290
290
|
style: { width: "100%" },
|
|
291
291
|
value: I.status ?? 0,
|
|
292
|
-
onChange: (i) =>
|
|
292
|
+
onChange: (i) => G((a) => a && { ...a, status: i }),
|
|
293
293
|
options: [
|
|
294
294
|
{ value: 0, label: "草稿" },
|
|
295
295
|
{ value: 1, label: "上线" },
|
|
@@ -306,7 +306,7 @@ function Vl() {
|
|
|
306
306
|
{
|
|
307
307
|
rows: 2,
|
|
308
308
|
value: I.description ?? "",
|
|
309
|
-
onChange: (i) =>
|
|
309
|
+
onChange: (i) => G(
|
|
310
310
|
(a) => a && { ...a, description: i.target.value }
|
|
311
311
|
)
|
|
312
312
|
}
|
|
@@ -322,7 +322,7 @@ function Vl() {
|
|
|
322
322
|
style: { width: "100%" },
|
|
323
323
|
placeholder: "选择已发布试卷",
|
|
324
324
|
value: I.finalPaperId ?? void 0,
|
|
325
|
-
onChange: (i) =>
|
|
325
|
+
onChange: (i) => G(
|
|
326
326
|
(a) => a && { ...a, finalPaperId: i ?? null }
|
|
327
327
|
),
|
|
328
328
|
options: Z.map((i) => ({
|
|
@@ -399,7 +399,7 @@ function Vl() {
|
|
|
399
399
|
value: i.materialId || void 0,
|
|
400
400
|
onChange: (p) => v(
|
|
401
401
|
(R) => R.map(
|
|
402
|
-
(
|
|
402
|
+
(U, Y) => Y === a ? { ...U, materialId: p } : U
|
|
403
403
|
)
|
|
404
404
|
),
|
|
405
405
|
options: j.map((p) => ({
|
|
@@ -419,7 +419,7 @@ function Vl() {
|
|
|
419
419
|
value: i.paperId ?? void 0,
|
|
420
420
|
onChange: (p) => v(
|
|
421
421
|
(R) => R.map(
|
|
422
|
-
(
|
|
422
|
+
(U, Y) => Y === a ? { ...U, paperId: p ?? null } : U
|
|
423
423
|
)
|
|
424
424
|
),
|
|
425
425
|
options: Z.map((p) => ({
|
|
@@ -432,7 +432,7 @@ function Vl() {
|
|
|
432
432
|
M,
|
|
433
433
|
{
|
|
434
434
|
size: "small",
|
|
435
|
-
icon: /* @__PURE__ */ e(
|
|
435
|
+
icon: /* @__PURE__ */ e(_t, {}),
|
|
436
436
|
disabled: a === 0,
|
|
437
437
|
onClick: () => ee(a, -1)
|
|
438
438
|
}
|
|
@@ -441,7 +441,7 @@ function Vl() {
|
|
|
441
441
|
M,
|
|
442
442
|
{
|
|
443
443
|
size: "small",
|
|
444
|
-
icon: /* @__PURE__ */ e(
|
|
444
|
+
icon: /* @__PURE__ */ e(At, {}),
|
|
445
445
|
disabled: a === u.length - 1,
|
|
446
446
|
onClick: () => ee(a, 1)
|
|
447
447
|
}
|
|
@@ -451,9 +451,9 @@ function Vl() {
|
|
|
451
451
|
{
|
|
452
452
|
size: "small",
|
|
453
453
|
danger: !0,
|
|
454
|
-
icon: /* @__PURE__ */ e(
|
|
454
|
+
icon: /* @__PURE__ */ e(Ke, {}),
|
|
455
455
|
onClick: () => v(
|
|
456
|
-
(p) => p.filter((R,
|
|
456
|
+
(p) => p.filter((R, U) => U !== a).map((R, U) => ({ ...R, sortOrder: U }))
|
|
457
457
|
)
|
|
458
458
|
}
|
|
459
459
|
)
|
|
@@ -519,8 +519,8 @@ function _n(l) {
|
|
|
519
519
|
if (k) continue;
|
|
520
520
|
const B = /^(#{2,3})\s+(.+)$/.exec(x);
|
|
521
521
|
if (!B) continue;
|
|
522
|
-
const E = B[1].length,
|
|
523
|
-
|
|
522
|
+
const E = B[1].length, z = B[2].replace(/[`*_[]]/g, "").trim();
|
|
523
|
+
z && n.push({ id: Sn(z, D), text: z, level: E });
|
|
524
524
|
}
|
|
525
525
|
return n;
|
|
526
526
|
}
|
|
@@ -538,7 +538,7 @@ function En(l) {
|
|
|
538
538
|
const n = Math.floor(l / 3600), D = Math.floor(l % 3600 / 60), k = Math.floor(l % 60), L = String(D).padStart(2, "0"), x = String(k).padStart(2, "0");
|
|
539
539
|
return n > 0 ? `${n}:${L}:${x}` : `${L}:${x}`;
|
|
540
540
|
}
|
|
541
|
-
const
|
|
541
|
+
const jt = /videoId:\s*(\d+)/, Dn = /title:\s*(.+)/;
|
|
542
542
|
async function Rn(l) {
|
|
543
543
|
if (!l) return;
|
|
544
544
|
if (navigator.clipboard && navigator.clipboard.writeText)
|
|
@@ -554,13 +554,13 @@ function Ln({
|
|
|
554
554
|
block: l,
|
|
555
555
|
videos: n
|
|
556
556
|
}) {
|
|
557
|
-
const D =
|
|
557
|
+
const D = jt.exec(l), k = D ? Number(D[1]) : null, L = Dn.exec(l), x = k != null ? n.get(String(k)) : void 0;
|
|
558
558
|
return /* @__PURE__ */ t("div", { className: q.videoCard, children: [
|
|
559
559
|
/* @__PURE__ */ t("div", { className: q.videoCardTitle, children: [
|
|
560
560
|
"🎬 ",
|
|
561
561
|
L ? L[1].trim() : `培训视频 #${k}`,
|
|
562
562
|
x != null && x.ossUrl ? /* @__PURE__ */ e(oe, { title: "复制链接(可贴入技术社区正文内嵌播放)", children: /* @__PURE__ */ e(
|
|
563
|
-
|
|
563
|
+
qt,
|
|
564
564
|
{
|
|
565
565
|
className: q.videoCopyBtn,
|
|
566
566
|
onClick: (B) => {
|
|
@@ -589,18 +589,18 @@ function $n({
|
|
|
589
589
|
videos: n,
|
|
590
590
|
onEdit: D
|
|
591
591
|
}) {
|
|
592
|
-
const k =
|
|
592
|
+
const k = Bt(null), [L, x] = o(""), B = pe(
|
|
593
593
|
() => l.content ? _n(l.content) : [],
|
|
594
594
|
[l.content]
|
|
595
595
|
), E = pe(
|
|
596
596
|
() => new Map(n.map((C) => [String(C.id), C])),
|
|
597
597
|
[n]
|
|
598
|
-
),
|
|
598
|
+
), z = pe(() => (l.content ?? "").split(/```/), [l.content]);
|
|
599
599
|
ce(() => {
|
|
600
600
|
const C = k.current;
|
|
601
601
|
if (!C || B.length === 0) return;
|
|
602
|
-
C.querySelectorAll("h2, h3").forEach((I,
|
|
603
|
-
|
|
602
|
+
C.querySelectorAll("h2, h3").forEach((I, G) => {
|
|
603
|
+
G < B.length && (I.id = B[G].id);
|
|
604
604
|
});
|
|
605
605
|
}, [B, l]), ce(() => {
|
|
606
606
|
const C = k.current;
|
|
@@ -611,12 +611,12 @@ function $n({
|
|
|
611
611
|
if (!C || B.length === 0) return;
|
|
612
612
|
const T = C.getBoundingClientRect().top;
|
|
613
613
|
let I = "";
|
|
614
|
-
for (const
|
|
615
|
-
const u = C.querySelector(`[id="${
|
|
616
|
-
if (u && u.getBoundingClientRect().top - T < 120) I =
|
|
614
|
+
for (const G of B) {
|
|
615
|
+
const u = C.querySelector(`[id="${G.id}"]`);
|
|
616
|
+
if (u && u.getBoundingClientRect().top - T < 120) I = G.id;
|
|
617
617
|
else break;
|
|
618
618
|
}
|
|
619
|
-
x((
|
|
619
|
+
x((G) => G === I ? G : I);
|
|
620
620
|
}, [B]);
|
|
621
621
|
ce(() => {
|
|
622
622
|
const C = k.current;
|
|
@@ -632,7 +632,7 @@ function $n({
|
|
|
632
632
|
const A = (C) => {
|
|
633
633
|
const T = k.current, I = T == null ? void 0 : T.querySelector(`[id="${C}"]`);
|
|
634
634
|
if (!T || !I) return;
|
|
635
|
-
const
|
|
635
|
+
const G = I.getBoundingClientRect().top - T.getBoundingClientRect().top, u = Math.max(0, T.scrollTop + G - 16), v = T.scrollTop;
|
|
636
636
|
T.scrollTo({ top: u, behavior: "smooth" }), window.setTimeout(() => {
|
|
637
637
|
T.scrollTop === v && (T.scrollTop = u, c());
|
|
638
638
|
}, 400);
|
|
@@ -662,7 +662,7 @@ function $n({
|
|
|
662
662
|
children: l.summary
|
|
663
663
|
}
|
|
664
664
|
) : null,
|
|
665
|
-
/* @__PURE__ */ e("div", { className: be.markdown, children:
|
|
665
|
+
/* @__PURE__ */ e("div", { className: be.markdown, children: z.map((C, T) => T % 2 === 1 ? jt.test(C) ? /* @__PURE__ */ e(Ln, { block: C, videos: E }, T) : /* @__PURE__ */ e(bt, { remarkPlugins: [It], children: "```" + C + "```" }, T) : /* @__PURE__ */ e(bt, { remarkPlugins: [It], children: C }, T)) })
|
|
666
666
|
] }),
|
|
667
667
|
/* @__PURE__ */ t("aside", { className: be.tocAside, children: [
|
|
668
668
|
/* @__PURE__ */ e("div", { className: be.tocTitle, children: "资料操作" }),
|
|
@@ -670,7 +670,7 @@ function $n({
|
|
|
670
670
|
M,
|
|
671
671
|
{
|
|
672
672
|
size: "small",
|
|
673
|
-
icon: /* @__PURE__ */ e(
|
|
673
|
+
icon: /* @__PURE__ */ e(ot, {}),
|
|
674
674
|
onClick: D,
|
|
675
675
|
block: !0,
|
|
676
676
|
children: "编辑正文"
|
|
@@ -697,16 +697,16 @@ function $n({
|
|
|
697
697
|
] });
|
|
698
698
|
}
|
|
699
699
|
function Pn() {
|
|
700
|
-
const l = Ce((s) => s.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E,
|
|
700
|
+
const l = Ce((s) => s.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E, z] = o(!1), [c, A] = o(null), [C, T] = o(!1), [I, G] = o([]), [u, v] = o([]), [_, y] = o(!1), [j, J] = o(""), [Z, O] = o(!1), [w, F] = o(
|
|
701
701
|
null
|
|
702
|
-
), [h, m] = o(null), [ee, Q] = o(null), [N, S] = o(null), [i, a] = o([]), [p, R] = o(!1), [
|
|
702
|
+
), [h, m] = o(null), [ee, Q] = o(null), [N, S] = o(null), [i, a] = o([]), [p, R] = o(!1), [U, Y] = o(/* @__PURE__ */ new Set()), [te, se] = o(
|
|
703
703
|
null
|
|
704
|
-
), [
|
|
704
|
+
), [Oe, Ee] = o("live"), ye = de(async () => {
|
|
705
705
|
L(!0);
|
|
706
706
|
try {
|
|
707
707
|
const [s, g] = await Promise.all([
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
zt(x, l),
|
|
709
|
+
et(l)
|
|
710
710
|
]);
|
|
711
711
|
D(s), v(g);
|
|
712
712
|
} catch {
|
|
@@ -717,7 +717,7 @@ function Pn() {
|
|
|
717
717
|
ce(() => {
|
|
718
718
|
ye();
|
|
719
719
|
}, [ye]);
|
|
720
|
-
const
|
|
720
|
+
const De = pe(() => {
|
|
721
721
|
var g;
|
|
722
722
|
const s = /* @__PURE__ */ new Map();
|
|
723
723
|
for (const ie of n) {
|
|
@@ -727,10 +727,10 @@ function Pn() {
|
|
|
727
727
|
W ? W.push(ie) : s.set(re, [ie]);
|
|
728
728
|
}
|
|
729
729
|
return s;
|
|
730
|
-
}, [n]),
|
|
730
|
+
}, [n]), Fe = pe(() => {
|
|
731
731
|
const s = (W) => ({
|
|
732
732
|
name: W.name,
|
|
733
|
-
items:
|
|
733
|
+
items: De.get(W.name) ?? [],
|
|
734
734
|
cat: W,
|
|
735
735
|
children: []
|
|
736
736
|
}), g = /* @__PURE__ */ new Map(), ie = [];
|
|
@@ -738,8 +738,8 @@ function Pn() {
|
|
|
738
738
|
W.id != null && g.set(W.id, s(W));
|
|
739
739
|
for (const W of u) {
|
|
740
740
|
if (W.id == null) continue;
|
|
741
|
-
const ge = g.get(W.id),
|
|
742
|
-
|
|
741
|
+
const ge = g.get(W.id), Ae = W.parentId != null ? g.get(W.parentId) : void 0;
|
|
742
|
+
Ae && Ae !== ge ? Ae.children.push(ge) : ie.push(ge);
|
|
743
743
|
}
|
|
744
744
|
const re = new Set(
|
|
745
745
|
u.filter((W) => W.id != null).map((W) => W.name)
|
|
@@ -747,19 +747,19 @@ function Pn() {
|
|
|
747
747
|
for (const W of u)
|
|
748
748
|
W.id == null && !re.has(W.name) && (re.add(W.name), ie.push({
|
|
749
749
|
name: W.name,
|
|
750
|
-
items:
|
|
750
|
+
items: De.get(W.name) ?? [],
|
|
751
751
|
children: []
|
|
752
752
|
}));
|
|
753
|
-
for (const [W, ge] of
|
|
753
|
+
for (const [W, ge] of De)
|
|
754
754
|
re.has(W) || (ie.push({ name: W, items: ge, children: [] }), re.add(W));
|
|
755
755
|
return ie;
|
|
756
|
-
}, [u,
|
|
756
|
+
}, [u, De]), Re = pe(
|
|
757
757
|
() => n.filter((s) => {
|
|
758
758
|
var g;
|
|
759
759
|
return !((g = s.category) != null && g.trim());
|
|
760
760
|
}),
|
|
761
761
|
[n]
|
|
762
|
-
),
|
|
762
|
+
), Be = pe(
|
|
763
763
|
() => [
|
|
764
764
|
.../* @__PURE__ */ new Set([
|
|
765
765
|
...u.map((s) => s.name),
|
|
@@ -770,15 +770,15 @@ function Pn() {
|
|
|
770
770
|
])
|
|
771
771
|
],
|
|
772
772
|
[n, u]
|
|
773
|
-
),
|
|
773
|
+
), ke = (s) => {
|
|
774
774
|
Y((g) => {
|
|
775
775
|
const ie = new Set(g);
|
|
776
776
|
return ie.has(s) ? ie.delete(s) : ie.add(s), ie;
|
|
777
777
|
});
|
|
778
778
|
}, Ge = () => {
|
|
779
779
|
const s = h && h !== "未分类" ? u.find((g) => g.name === h && g.id != null) ?? null : null;
|
|
780
|
-
|
|
781
|
-
},
|
|
780
|
+
F(s), J(""), y(!0);
|
|
781
|
+
}, Ue = async () => {
|
|
782
782
|
const s = j.trim();
|
|
783
783
|
if (!s) {
|
|
784
784
|
P.warning("请填写文件夹名称");
|
|
@@ -788,21 +788,21 @@ function Pn() {
|
|
|
788
788
|
try {
|
|
789
789
|
await vl(s, (w == null ? void 0 : w.id) ?? null, l), P.success(
|
|
790
790
|
w ? `已在「${w.name}」下创建子文件夹「${s}」` : `文件夹「${s}」已创建`
|
|
791
|
-
), y(!1), J(""),
|
|
792
|
-
const g = await
|
|
791
|
+
), y(!1), J(""), F(null);
|
|
792
|
+
const g = await et(l);
|
|
793
793
|
v(g), m(s);
|
|
794
794
|
} catch {
|
|
795
795
|
} finally {
|
|
796
796
|
O(!1);
|
|
797
797
|
}
|
|
798
|
-
},
|
|
798
|
+
}, je = async (s) => {
|
|
799
799
|
try {
|
|
800
800
|
await wl(s.id, l), P.success("已删除文件夹"), h === s.name && m(null);
|
|
801
|
-
const g = await
|
|
801
|
+
const g = await et(l);
|
|
802
802
|
v(g);
|
|
803
803
|
} catch {
|
|
804
804
|
}
|
|
805
|
-
},
|
|
805
|
+
}, Le = de(
|
|
806
806
|
async (s) => {
|
|
807
807
|
Q(s), R(!0), a([]);
|
|
808
808
|
try {
|
|
@@ -829,15 +829,15 @@ function Pn() {
|
|
|
829
829
|
category: h && h !== "未分类" ? h : "",
|
|
830
830
|
summary: "",
|
|
831
831
|
status: 0
|
|
832
|
-
}),
|
|
832
|
+
}), z(!0);
|
|
833
833
|
}, b = async (s) => {
|
|
834
|
-
se({ ...s }),
|
|
834
|
+
se({ ...s }), Ee("live");
|
|
835
835
|
try {
|
|
836
|
-
|
|
836
|
+
G(await Ft("", "", l));
|
|
837
837
|
} catch {
|
|
838
838
|
}
|
|
839
839
|
}, f = async (s) => {
|
|
840
|
-
const g = await
|
|
840
|
+
const g = await Le(s);
|
|
841
841
|
g && b(g);
|
|
842
842
|
}, $ = (s) => {
|
|
843
843
|
se(
|
|
@@ -857,8 +857,8 @@ ${An(s)}
|
|
|
857
857
|
continue;
|
|
858
858
|
}
|
|
859
859
|
for (const ge of W) {
|
|
860
|
-
const
|
|
861
|
-
|
|
860
|
+
const Ae = s.get(ge);
|
|
861
|
+
Ae ? Ae.push(re) : s.set(ge, [re]);
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
864
|
const ie = [...s.entries()].sort(
|
|
@@ -868,7 +868,7 @@ ${An(s)}
|
|
|
868
868
|
value: `tag:${re}`,
|
|
869
869
|
selectable: !1,
|
|
870
870
|
title: /* @__PURE__ */ t("span", { children: [
|
|
871
|
-
/* @__PURE__ */ e(
|
|
871
|
+
/* @__PURE__ */ e(We, { style: { marginRight: 6, color: "#4d7cfe" } }),
|
|
872
872
|
re,
|
|
873
873
|
/* @__PURE__ */ t("span", { style: { color: "#8c8c8c", marginLeft: 6 }, children: [
|
|
874
874
|
"(",
|
|
@@ -880,7 +880,7 @@ ${An(s)}
|
|
|
880
880
|
value: `video:${ge.id}`,
|
|
881
881
|
isLeaf: !0,
|
|
882
882
|
title: /* @__PURE__ */ t("span", { children: [
|
|
883
|
-
/* @__PURE__ */ e(
|
|
883
|
+
/* @__PURE__ */ e(Kt, { style: { marginRight: 6 } }),
|
|
884
884
|
ge.title,
|
|
885
885
|
ge.durationSec ? /* @__PURE__ */ e("span", { style: { color: "#8c8c8c", marginLeft: 8 }, children: En(ge.durationSec) }) : null
|
|
886
886
|
] })
|
|
@@ -894,7 +894,7 @@ ${An(s)}
|
|
|
894
894
|
}
|
|
895
895
|
T(!0);
|
|
896
896
|
try {
|
|
897
|
-
const { id: s } = await
|
|
897
|
+
const { id: s } = await yt(
|
|
898
898
|
{
|
|
899
899
|
...c,
|
|
900
900
|
title: c.title.trim(),
|
|
@@ -905,7 +905,7 @@ ${An(s)}
|
|
|
905
905
|
},
|
|
906
906
|
l
|
|
907
907
|
);
|
|
908
|
-
P.success("已创建,点击右侧「编辑正文」补充正文"),
|
|
908
|
+
P.success("已创建,点击右侧「编辑正文」补充正文"), z(!1), A(null), await ye(), s && Le(s);
|
|
909
909
|
} catch {
|
|
910
910
|
} finally {
|
|
911
911
|
T(!1);
|
|
@@ -919,13 +919,13 @@ ${An(s)}
|
|
|
919
919
|
}
|
|
920
920
|
T(!0);
|
|
921
921
|
try {
|
|
922
|
-
const { id: s } = await
|
|
922
|
+
const { id: s } = await yt(
|
|
923
923
|
{ ...te, title: te.title.trim() },
|
|
924
924
|
l
|
|
925
925
|
);
|
|
926
926
|
P.success("保存成功"), se(null), await ye();
|
|
927
927
|
const g = s ?? te.id;
|
|
928
|
-
g &&
|
|
928
|
+
g && Le(g);
|
|
929
929
|
} catch {
|
|
930
930
|
} finally {
|
|
931
931
|
T(!1);
|
|
@@ -936,26 +936,26 @@ ${An(s)}
|
|
|
936
936
|
await fl(s.id, l), P.success("已删除"), ee === s.id && (Q(null), S(null)), ye();
|
|
937
937
|
} catch {
|
|
938
938
|
}
|
|
939
|
-
},
|
|
939
|
+
}, $e = (s) => /* @__PURE__ */ t(
|
|
940
940
|
"div",
|
|
941
941
|
{
|
|
942
942
|
className: [
|
|
943
943
|
q.treeItem,
|
|
944
944
|
String(ee) === String(s.id) ? q.treeItemActive : ""
|
|
945
945
|
].join(" "),
|
|
946
|
-
onClick: () => void
|
|
946
|
+
onClick: () => void Le(s.id),
|
|
947
947
|
title: s.title,
|
|
948
948
|
children: [
|
|
949
949
|
/* @__PURE__ */ e("span", { className: q.treeItemTitle, children: s.title }),
|
|
950
950
|
/* @__PURE__ */ t("span", { className: q.treeItemBadges, children: [
|
|
951
|
-
(s.videoIds ?? []).length > 0 ? /* @__PURE__ */ e(oe, { title: `内嵌视频 ${(s.videoIds ?? []).length} 个`, children: /* @__PURE__ */ e(
|
|
951
|
+
(s.videoIds ?? []).length > 0 ? /* @__PURE__ */ e(oe, { title: `内嵌视频 ${(s.videoIds ?? []).length} 个`, children: /* @__PURE__ */ e(Et, {}) }) : null,
|
|
952
952
|
s.status !== 1 ? /* @__PURE__ */ e("span", { style: { color: "#d48806" }, children: "草" }) : null,
|
|
953
953
|
/* @__PURE__ */ e(
|
|
954
954
|
oe,
|
|
955
955
|
{
|
|
956
956
|
title: (s.refCount ?? 0) > 0 ? `编辑(被 ${s.refCount} 门课程引用)` : "编辑",
|
|
957
957
|
children: /* @__PURE__ */ e(
|
|
958
|
-
|
|
958
|
+
ot,
|
|
959
959
|
{
|
|
960
960
|
onClick: (g) => {
|
|
961
961
|
g.stopPropagation(), f(s.id);
|
|
@@ -965,7 +965,7 @@ ${An(s)}
|
|
|
965
965
|
}
|
|
966
966
|
),
|
|
967
967
|
(s.refCount ?? 0) > 0 ? null : /* @__PURE__ */ e(
|
|
968
|
-
|
|
968
|
+
Ne,
|
|
969
969
|
{
|
|
970
970
|
title: "确认删除该资料?",
|
|
971
971
|
okText: "删除",
|
|
@@ -973,7 +973,7 @@ ${An(s)}
|
|
|
973
973
|
cancelText: "取消",
|
|
974
974
|
onConfirm: () => void fe(s),
|
|
975
975
|
children: /* @__PURE__ */ e(oe, { title: "删除", children: /* @__PURE__ */ e(
|
|
976
|
-
|
|
976
|
+
Ke,
|
|
977
977
|
{
|
|
978
978
|
style: { color: "#ff4d4f" },
|
|
979
979
|
onClick: (g) => g.stopPropagation()
|
|
@@ -985,9 +985,9 @@ ${An(s)}
|
|
|
985
985
|
]
|
|
986
986
|
},
|
|
987
987
|
s.id
|
|
988
|
-
),
|
|
989
|
-
var
|
|
990
|
-
const ie =
|
|
988
|
+
), mt = (s, g) => {
|
|
989
|
+
var Ae;
|
|
990
|
+
const ie = U.has(s.name), re = h === s.name, W = s.children.length > 0, ge = s.items.length > 0 || W;
|
|
991
991
|
return /* @__PURE__ */ t("div", { children: [
|
|
992
992
|
/* @__PURE__ */ t(
|
|
993
993
|
"button",
|
|
@@ -1005,11 +1005,11 @@ ${An(s)}
|
|
|
1005
1005
|
"span",
|
|
1006
1006
|
{
|
|
1007
1007
|
className: q.groupArrowWrap,
|
|
1008
|
-
onClick: (
|
|
1009
|
-
|
|
1008
|
+
onClick: (Ve) => {
|
|
1009
|
+
Ve.stopPropagation(), ke(s.name);
|
|
1010
1010
|
},
|
|
1011
1011
|
children: /* @__PURE__ */ e(
|
|
1012
|
-
|
|
1012
|
+
it,
|
|
1013
1013
|
{
|
|
1014
1014
|
className: [
|
|
1015
1015
|
q.groupArrow,
|
|
@@ -1019,27 +1019,27 @@ ${An(s)}
|
|
|
1019
1019
|
)
|
|
1020
1020
|
}
|
|
1021
1021
|
),
|
|
1022
|
-
/* @__PURE__ */ e(
|
|
1022
|
+
/* @__PURE__ */ e(We, { className: q.groupIcon }),
|
|
1023
1023
|
/* @__PURE__ */ e("span", { className: q.treeItemTitle, children: s.name }),
|
|
1024
1024
|
/* @__PURE__ */ e("span", { className: q.groupCount, children: s.items.length }),
|
|
1025
|
-
((
|
|
1026
|
-
|
|
1025
|
+
((Ae = s.cat) == null ? void 0 : Ae.id) != null ? /* @__PURE__ */ e(
|
|
1026
|
+
Ne,
|
|
1027
1027
|
{
|
|
1028
1028
|
title: s.items.length > 0 ? `文件夹内有 ${s.items.length} 篇资料,无法删除` : W ? `文件夹下有 ${s.children.length} 个子文件夹,无法删除` : "确认删除该文件夹?",
|
|
1029
1029
|
okText: "删除",
|
|
1030
1030
|
okButtonProps: { danger: !0 },
|
|
1031
1031
|
cancelText: "取消",
|
|
1032
1032
|
disabled: ge,
|
|
1033
|
-
onConfirm: () => void
|
|
1033
|
+
onConfirm: () => void je(s.cat),
|
|
1034
1034
|
children: /* @__PURE__ */ e(
|
|
1035
1035
|
M,
|
|
1036
1036
|
{
|
|
1037
1037
|
type: "text",
|
|
1038
1038
|
size: "small",
|
|
1039
1039
|
className: q.folderDel,
|
|
1040
|
-
icon: /* @__PURE__ */ e(
|
|
1040
|
+
icon: /* @__PURE__ */ e(Ke, {}),
|
|
1041
1041
|
disabled: ge,
|
|
1042
|
-
onClick: (
|
|
1042
|
+
onClick: (Ve) => Ve.stopPropagation()
|
|
1043
1043
|
}
|
|
1044
1044
|
)
|
|
1045
1045
|
}
|
|
@@ -1048,8 +1048,8 @@ ${An(s)}
|
|
|
1048
1048
|
}
|
|
1049
1049
|
),
|
|
1050
1050
|
ie ? null : /* @__PURE__ */ t(we, { children: [
|
|
1051
|
-
s.items.map(
|
|
1052
|
-
s.children.map((
|
|
1051
|
+
s.items.map($e),
|
|
1052
|
+
s.children.map((Ve) => mt(Ve, g + 1))
|
|
1053
1053
|
] })
|
|
1054
1054
|
] }, s.name);
|
|
1055
1055
|
};
|
|
@@ -1062,7 +1062,7 @@ ${An(s)}
|
|
|
1062
1062
|
/* @__PURE__ */ e("strong", { children: n.length }),
|
|
1063
1063
|
" 篇 ·",
|
|
1064
1064
|
" ",
|
|
1065
|
-
|
|
1065
|
+
Fe.length + (Re.length ? 1 : 0),
|
|
1066
1066
|
" 个分类",
|
|
1067
1067
|
h ? ` · 选中「${h}」` : ""
|
|
1068
1068
|
] })
|
|
@@ -1079,7 +1079,7 @@ ${An(s)}
|
|
|
1079
1079
|
onChange: (s) => B(s.target.value)
|
|
1080
1080
|
}
|
|
1081
1081
|
),
|
|
1082
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
1082
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void ye(), children: "刷新" }),
|
|
1083
1083
|
/* @__PURE__ */ e(M, { type: "primary", icon: /* @__PURE__ */ e(xe, {}), onClick: d, children: "新建资料" })
|
|
1084
1084
|
] })
|
|
1085
1085
|
] }),
|
|
@@ -1119,16 +1119,16 @@ ${An(s)}
|
|
|
1119
1119
|
}
|
|
1120
1120
|
)
|
|
1121
1121
|
] }),
|
|
1122
|
-
/* @__PURE__ */ e("div", { className: q.treeScroll, children: k ? /* @__PURE__ */ e("div", { style: { padding: 24, textAlign: "center" }, children: /* @__PURE__ */ e(
|
|
1123
|
-
|
|
1122
|
+
/* @__PURE__ */ e("div", { className: q.treeScroll, children: k ? /* @__PURE__ */ e("div", { style: { padding: 24, textAlign: "center" }, children: /* @__PURE__ */ e(Ze, {}) }) : n.length === 0 ? /* @__PURE__ */ e(
|
|
1123
|
+
He,
|
|
1124
1124
|
{
|
|
1125
1125
|
className: q.treeEmpty,
|
|
1126
|
-
image:
|
|
1126
|
+
image: He.PRESENTED_IMAGE_SIMPLE,
|
|
1127
1127
|
description: "暂无资料"
|
|
1128
1128
|
}
|
|
1129
1129
|
) : /* @__PURE__ */ t(we, { children: [
|
|
1130
|
-
|
|
1131
|
-
|
|
1130
|
+
Fe.map((s) => mt(s, 0)),
|
|
1131
|
+
Re.length > 0 ? /* @__PURE__ */ t("div", { children: [
|
|
1132
1132
|
/* @__PURE__ */ t(
|
|
1133
1133
|
"button",
|
|
1134
1134
|
{
|
|
@@ -1144,32 +1144,32 @@ ${An(s)}
|
|
|
1144
1144
|
{
|
|
1145
1145
|
className: q.groupArrowWrap,
|
|
1146
1146
|
onClick: (s) => {
|
|
1147
|
-
s.stopPropagation(),
|
|
1147
|
+
s.stopPropagation(), ke("未分类");
|
|
1148
1148
|
},
|
|
1149
1149
|
children: /* @__PURE__ */ e(
|
|
1150
|
-
|
|
1150
|
+
it,
|
|
1151
1151
|
{
|
|
1152
1152
|
className: [
|
|
1153
1153
|
q.groupArrow,
|
|
1154
|
-
|
|
1154
|
+
U.has("未分类") ? "" : q.groupArrowOpen
|
|
1155
1155
|
].join(" ")
|
|
1156
1156
|
}
|
|
1157
1157
|
)
|
|
1158
1158
|
}
|
|
1159
1159
|
),
|
|
1160
|
-
/* @__PURE__ */ e(
|
|
1160
|
+
/* @__PURE__ */ e(We, { className: q.groupIcon }),
|
|
1161
1161
|
/* @__PURE__ */ e("span", { className: q.treeItemTitle, children: "未分类" }),
|
|
1162
|
-
/* @__PURE__ */ e("span", { className: q.groupCount, children:
|
|
1162
|
+
/* @__PURE__ */ e("span", { className: q.groupCount, children: Re.length })
|
|
1163
1163
|
]
|
|
1164
1164
|
}
|
|
1165
1165
|
),
|
|
1166
|
-
|
|
1166
|
+
U.has("未分类") ? null : Re.map($e)
|
|
1167
1167
|
] }) : null
|
|
1168
1168
|
] }) })
|
|
1169
1169
|
]
|
|
1170
1170
|
}
|
|
1171
1171
|
),
|
|
1172
|
-
p || te || N ? /* @__PURE__ */ e("div", { className: q.readerWrap, children: p ? /* @__PURE__ */ e("div", { className: q.readerEmpty, children: /* @__PURE__ */ e(
|
|
1172
|
+
p || te || N ? /* @__PURE__ */ e("div", { className: q.readerWrap, children: p ? /* @__PURE__ */ e("div", { className: q.readerEmpty, children: /* @__PURE__ */ e(Ze, {}) }) : te ? /* @__PURE__ */ t("div", { className: q.editPane, children: [
|
|
1173
1173
|
/* @__PURE__ */ t("div", { className: q.editMeta, children: [
|
|
1174
1174
|
/* @__PURE__ */ e(
|
|
1175
1175
|
K,
|
|
@@ -1183,10 +1183,10 @@ ${An(s)}
|
|
|
1183
1183
|
}
|
|
1184
1184
|
),
|
|
1185
1185
|
/* @__PURE__ */ e(
|
|
1186
|
-
|
|
1186
|
+
rt,
|
|
1187
1187
|
{
|
|
1188
1188
|
value: te.category ?? "",
|
|
1189
|
-
options:
|
|
1189
|
+
options: Be.map((s) => ({ value: s })),
|
|
1190
1190
|
placeholder: "分类",
|
|
1191
1191
|
filterOption: (s, g) => ((g == null ? void 0 : g.value) ?? "").toLowerCase().includes(s.toLowerCase()),
|
|
1192
1192
|
onChange: (s) => se((g) => g && { ...g, category: s }),
|
|
@@ -1218,11 +1218,11 @@ ${An(s)}
|
|
|
1218
1218
|
),
|
|
1219
1219
|
/* @__PURE__ */ t("div", { className: q.editToolbar, children: [
|
|
1220
1220
|
/* @__PURE__ */ e(
|
|
1221
|
-
|
|
1221
|
+
$t,
|
|
1222
1222
|
{
|
|
1223
1223
|
size: "small",
|
|
1224
|
-
value:
|
|
1225
|
-
onChange: (s) =>
|
|
1224
|
+
value: Oe,
|
|
1225
|
+
onChange: (s) => Ee(s),
|
|
1226
1226
|
options: [
|
|
1227
1227
|
{ label: "渲染", value: "live" },
|
|
1228
1228
|
{ label: "源码", value: "source" }
|
|
@@ -1230,7 +1230,7 @@ ${An(s)}
|
|
|
1230
1230
|
}
|
|
1231
1231
|
),
|
|
1232
1232
|
/* @__PURE__ */ e(
|
|
1233
|
-
|
|
1233
|
+
Xe,
|
|
1234
1234
|
{
|
|
1235
1235
|
size: "small",
|
|
1236
1236
|
placeholder: "插入视频:点分类展开选择",
|
|
@@ -1265,7 +1265,7 @@ ${An(s)}
|
|
|
1265
1265
|
/* @__PURE__ */ e("div", { className: q.editEditor, children: /* @__PURE__ */ e(
|
|
1266
1266
|
Kl,
|
|
1267
1267
|
{
|
|
1268
|
-
mode:
|
|
1268
|
+
mode: Oe,
|
|
1269
1269
|
value: te.content ?? "",
|
|
1270
1270
|
onChange: (s) => se((g) => g && { ...g, content: s }),
|
|
1271
1271
|
placeholder: "正文支持 Markdown;插入视频用 ```video 块(videoId + title)"
|
|
@@ -1291,7 +1291,7 @@ ${An(s)}
|
|
|
1291
1291
|
cancelText: "取消",
|
|
1292
1292
|
onOk: () => void X(),
|
|
1293
1293
|
onCancel: () => {
|
|
1294
|
-
|
|
1294
|
+
z(!1), A(null);
|
|
1295
1295
|
},
|
|
1296
1296
|
children: c ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
1297
1297
|
/* @__PURE__ */ t("div", { style: { display: "flex", gap: 12 }, children: [
|
|
@@ -1309,10 +1309,10 @@ ${An(s)}
|
|
|
1309
1309
|
/* @__PURE__ */ t("div", { style: { width: 200 }, children: [
|
|
1310
1310
|
/* @__PURE__ */ e("div", { style: { marginBottom: 4 }, children: "分类(左侧资料树目录)" }),
|
|
1311
1311
|
/* @__PURE__ */ e(
|
|
1312
|
-
|
|
1312
|
+
rt,
|
|
1313
1313
|
{
|
|
1314
1314
|
value: c.category ?? "",
|
|
1315
|
-
options:
|
|
1315
|
+
options: Be.map((s) => ({ value: s })),
|
|
1316
1316
|
placeholder: "如:信息安全(可选已有/输入新分类)",
|
|
1317
1317
|
filterOption: (s, g) => ((g == null ? void 0 : g.value) ?? "").toLowerCase().includes(s.toLowerCase()),
|
|
1318
1318
|
onChange: (s) => A((g) => g && { ...g, category: s }),
|
|
@@ -1360,9 +1360,9 @@ ${An(s)}
|
|
|
1360
1360
|
confirmLoading: Z,
|
|
1361
1361
|
okText: "创 建",
|
|
1362
1362
|
cancelText: "取 消",
|
|
1363
|
-
onOk: () => void
|
|
1363
|
+
onOk: () => void Ue(),
|
|
1364
1364
|
onCancel: () => {
|
|
1365
|
-
y(!1), J(""),
|
|
1365
|
+
y(!1), J(""), F(null);
|
|
1366
1366
|
},
|
|
1367
1367
|
children: /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
1368
1368
|
/* @__PURE__ */ t("div", { children: [
|
|
@@ -1374,7 +1374,7 @@ ${An(s)}
|
|
|
1374
1374
|
maxLength: 64,
|
|
1375
1375
|
placeholder: "如:信息安全、新员工入职",
|
|
1376
1376
|
onChange: (s) => J(s.target.value),
|
|
1377
|
-
onPressEnter: () => void
|
|
1377
|
+
onPressEnter: () => void Ue()
|
|
1378
1378
|
}
|
|
1379
1379
|
)
|
|
1380
1380
|
] }),
|
|
@@ -1384,7 +1384,7 @@ ${An(s)}
|
|
|
1384
1384
|
)
|
|
1385
1385
|
] });
|
|
1386
1386
|
}
|
|
1387
|
-
const
|
|
1387
|
+
const xt = {
|
|
1388
1388
|
SINGLE: { label: "单选", color: "blue" },
|
|
1389
1389
|
MULTI: { label: "多选", color: "geekblue" },
|
|
1390
1390
|
FREE: { label: "自由题", color: "purple" }
|
|
@@ -1406,7 +1406,7 @@ function Bn(l) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
1408
|
function Mn() {
|
|
1409
|
-
const l = Ce((w) => w.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o("SUBMITTED"), [E,
|
|
1409
|
+
const l = Ce((w) => w.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o("SUBMITTED"), [E, z] = o(""), [c, A] = o(null), [C, T] = o(!1), [I, G] = o(!1), [u, v] = o({}), [_, y] = o(
|
|
1410
1410
|
{}
|
|
1411
1411
|
), j = de(async () => {
|
|
1412
1412
|
L(!0);
|
|
@@ -1424,8 +1424,8 @@ function Mn() {
|
|
|
1424
1424
|
}, [j]);
|
|
1425
1425
|
const J = async (w) => {
|
|
1426
1426
|
try {
|
|
1427
|
-
const
|
|
1428
|
-
A(
|
|
1427
|
+
const F = await Ut(w.examId, l);
|
|
1428
|
+
A(F), v({}), y({}), T(!0);
|
|
1429
1429
|
} catch {
|
|
1430
1430
|
}
|
|
1431
1431
|
}, Z = async () => {
|
|
@@ -1436,7 +1436,7 @@ function Mn() {
|
|
|
1436
1436
|
P.info("该卷无自由题,无需人工复核");
|
|
1437
1437
|
return;
|
|
1438
1438
|
}
|
|
1439
|
-
const
|
|
1439
|
+
const F = [];
|
|
1440
1440
|
for (const m of w) {
|
|
1441
1441
|
const ee = u[m.answerId] ?? m.score ?? null;
|
|
1442
1442
|
if (ee == null) {
|
|
@@ -1446,13 +1446,13 @@ function Mn() {
|
|
|
1446
1446
|
return;
|
|
1447
1447
|
}
|
|
1448
1448
|
const Q = _[m.answerId] ?? m.manualComment ?? void 0;
|
|
1449
|
-
|
|
1449
|
+
F.push({ answerId: m.answerId, score: ee, comment: Q });
|
|
1450
1450
|
}
|
|
1451
|
-
|
|
1451
|
+
G(!0);
|
|
1452
1452
|
try {
|
|
1453
|
-
const m = await
|
|
1453
|
+
const m = await Gt(
|
|
1454
1454
|
c.examId,
|
|
1455
|
-
{ examId: c.examId, reviews:
|
|
1455
|
+
{ examId: c.examId, reviews: F },
|
|
1456
1456
|
l
|
|
1457
1457
|
);
|
|
1458
1458
|
P.success(
|
|
@@ -1460,7 +1460,7 @@ function Mn() {
|
|
|
1460
1460
|
), T(!1), A(null), j();
|
|
1461
1461
|
} catch {
|
|
1462
1462
|
} finally {
|
|
1463
|
-
|
|
1463
|
+
G(!1);
|
|
1464
1464
|
}
|
|
1465
1465
|
}, O = [
|
|
1466
1466
|
{ title: "ID", dataIndex: "examId", width: 84, ellipsis: !0 },
|
|
@@ -1468,11 +1468,11 @@ function Mn() {
|
|
|
1468
1468
|
title: "学员",
|
|
1469
1469
|
dataIndex: "userName",
|
|
1470
1470
|
width: 96,
|
|
1471
|
-
render: (w,
|
|
1472
|
-
/* @__PURE__ */ e("div", { children: w ||
|
|
1471
|
+
render: (w, F) => /* @__PURE__ */ t("div", { className: r.nameCell, children: [
|
|
1472
|
+
/* @__PURE__ */ e("div", { children: w || F.userId }),
|
|
1473
1473
|
/* @__PURE__ */ t("div", { className: r.descCell, children: [
|
|
1474
1474
|
"第 ",
|
|
1475
|
-
|
|
1475
|
+
F.retryNo ?? 1,
|
|
1476
1476
|
" 次考试"
|
|
1477
1477
|
] })
|
|
1478
1478
|
] })
|
|
@@ -1488,25 +1488,25 @@ function Mn() {
|
|
|
1488
1488
|
title: "状态",
|
|
1489
1489
|
dataIndex: "status",
|
|
1490
1490
|
width: 88,
|
|
1491
|
-
render: (w) => w === "GRADED" ? /* @__PURE__ */ e(H, { icon: /* @__PURE__ */ e(
|
|
1491
|
+
render: (w) => w === "GRADED" ? /* @__PURE__ */ e(H, { icon: /* @__PURE__ */ e(Dt, {}), color: "success", children: "已出分" }) : /* @__PURE__ */ e(H, { icon: /* @__PURE__ */ e(Rt, {}), color: "processing", children: "批改中" })
|
|
1492
1492
|
},
|
|
1493
1493
|
{
|
|
1494
1494
|
title: "得分",
|
|
1495
1495
|
key: "score",
|
|
1496
1496
|
width: 110,
|
|
1497
|
-
render: (w,
|
|
1498
|
-
|
|
1499
|
-
/* @__PURE__ */ e("strong", { children:
|
|
1497
|
+
render: (w, F) => /* @__PURE__ */ t("span", { children: [
|
|
1498
|
+
F.status === "GRADED" ? /* @__PURE__ */ t(we, { children: [
|
|
1499
|
+
/* @__PURE__ */ e("strong", { children: F.totalScore ?? "-" }),
|
|
1500
1500
|
/* @__PURE__ */ t("span", { className: r.mutedCell, children: [
|
|
1501
1501
|
"/",
|
|
1502
|
-
|
|
1502
|
+
F.totalScoreFull ?? "-"
|
|
1503
1503
|
] })
|
|
1504
1504
|
] }) : /* @__PURE__ */ t("span", { className: r.mutedCell, children: [
|
|
1505
1505
|
"客观 ",
|
|
1506
|
-
|
|
1506
|
+
F.objectiveScore ?? "-",
|
|
1507
1507
|
" 分"
|
|
1508
1508
|
] }),
|
|
1509
|
-
|
|
1509
|
+
F.status === "GRADED" ? F.passed ? /* @__PURE__ */ e(H, { color: "green", style: { marginLeft: 6 }, children: "及格" }) : /* @__PURE__ */ e(H, { color: "red", style: { marginLeft: 6 }, children: "未及格" }) : null
|
|
1510
1510
|
] })
|
|
1511
1511
|
},
|
|
1512
1512
|
{
|
|
@@ -1519,14 +1519,13 @@ function Mn() {
|
|
|
1519
1519
|
title: "操作",
|
|
1520
1520
|
key: "actions",
|
|
1521
1521
|
width: 88,
|
|
1522
|
-
render: (w,
|
|
1522
|
+
render: (w, F) => /* @__PURE__ */ e(
|
|
1523
1523
|
M,
|
|
1524
1524
|
{
|
|
1525
1525
|
type: "link",
|
|
1526
1526
|
size: "small",
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
children: z.status === "SUBMITTED" ? "批改" : "查看"
|
|
1527
|
+
onClick: () => void J(F),
|
|
1528
|
+
children: F.status === "SUBMITTED" ? "批改" : "查看"
|
|
1530
1529
|
}
|
|
1531
1530
|
)
|
|
1532
1531
|
}
|
|
@@ -1550,7 +1549,7 @@ function Mn() {
|
|
|
1550
1549
|
placeholder: "搜学员 / 试卷",
|
|
1551
1550
|
style: { width: 180 },
|
|
1552
1551
|
value: E,
|
|
1553
|
-
onChange: (w) =>
|
|
1552
|
+
onChange: (w) => z(w.target.value)
|
|
1554
1553
|
}
|
|
1555
1554
|
),
|
|
1556
1555
|
/* @__PURE__ */ e(
|
|
@@ -1566,11 +1565,11 @@ function Mn() {
|
|
|
1566
1565
|
]
|
|
1567
1566
|
}
|
|
1568
1567
|
),
|
|
1569
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
1568
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void j(), children: "刷新" })
|
|
1570
1569
|
] })
|
|
1571
1570
|
] }),
|
|
1572
1571
|
/* @__PURE__ */ e("div", { className: r.tableCard, children: /* @__PURE__ */ e("div", { className: r.tableWrap, children: /* @__PURE__ */ e(
|
|
1573
|
-
|
|
1572
|
+
_e,
|
|
1574
1573
|
{
|
|
1575
1574
|
rows: n,
|
|
1576
1575
|
columns: O,
|
|
@@ -1609,11 +1608,11 @@ function Mn() {
|
|
|
1609
1608
|
] }),
|
|
1610
1609
|
/* @__PURE__ */ e(ne.Item, { label: "状态", children: c.status === "GRADED" ? "已出分(不可重复复核)" : "批改中" })
|
|
1611
1610
|
] }),
|
|
1612
|
-
(c.answers ?? []).map((w,
|
|
1613
|
-
|
|
1611
|
+
(c.answers ?? []).map((w, F) => /* @__PURE__ */ e(
|
|
1612
|
+
Wt,
|
|
1614
1613
|
{
|
|
1615
1614
|
item: w,
|
|
1616
|
-
index:
|
|
1615
|
+
index: F,
|
|
1617
1616
|
readonly: c.status === "GRADED",
|
|
1618
1617
|
scoreInput: u[w.answerId] ?? w.score ?? null,
|
|
1619
1618
|
commentInput: _[w.answerId] ?? w.manualComment ?? "",
|
|
@@ -1628,7 +1627,7 @@ function Mn() {
|
|
|
1628
1627
|
)
|
|
1629
1628
|
] });
|
|
1630
1629
|
}
|
|
1631
|
-
function
|
|
1630
|
+
function Wt({
|
|
1632
1631
|
item: l,
|
|
1633
1632
|
index: n,
|
|
1634
1633
|
readonly: D,
|
|
@@ -1637,7 +1636,7 @@ function qt({
|
|
|
1637
1636
|
onScoreChange: x,
|
|
1638
1637
|
onCommentChange: B
|
|
1639
1638
|
}) {
|
|
1640
|
-
const E =
|
|
1639
|
+
const E = xt[l.type ?? ""] ?? xt.FREE, z = Bn(l.options), c = l.type === "FREE";
|
|
1641
1640
|
return /* @__PURE__ */ t(
|
|
1642
1641
|
"div",
|
|
1643
1642
|
{
|
|
@@ -1678,7 +1677,7 @@ function qt({
|
|
|
1678
1677
|
}
|
|
1679
1678
|
),
|
|
1680
1679
|
/* @__PURE__ */ e("div", { style: { marginBottom: 6 }, children: l.title }),
|
|
1681
|
-
|
|
1680
|
+
z.length > 0 ? /* @__PURE__ */ e("div", { style: { marginBottom: 6, fontSize: 12, color: "#555" }, children: z.map((A) => /* @__PURE__ */ t("div", { children: [
|
|
1682
1681
|
A.key,
|
|
1683
1682
|
". ",
|
|
1684
1683
|
A.text
|
|
@@ -1724,7 +1723,7 @@ function qt({
|
|
|
1724
1723
|
},
|
|
1725
1724
|
children: [
|
|
1726
1725
|
/* @__PURE__ */ e(oe, { title: `终分 0 - ${l.scoreFull ?? 0}`, children: /* @__PURE__ */ e(
|
|
1727
|
-
|
|
1726
|
+
ze,
|
|
1728
1727
|
{
|
|
1729
1728
|
min: 0,
|
|
1730
1729
|
max: l.scoreFull ?? 100,
|
|
@@ -1749,16 +1748,16 @@ function qt({
|
|
|
1749
1748
|
}
|
|
1750
1749
|
);
|
|
1751
1750
|
}
|
|
1752
|
-
const
|
|
1753
|
-
ASSIGNED: { label: "待考", color: "warning", icon: /* @__PURE__ */ e(
|
|
1754
|
-
SUBMITTED: { label: "待批改", color: "processing", icon: /* @__PURE__ */ e(
|
|
1755
|
-
GRADED: { label: "已出分", color: "success", icon: /* @__PURE__ */ e(
|
|
1756
|
-
},
|
|
1751
|
+
const Tt = {
|
|
1752
|
+
ASSIGNED: { label: "待考", color: "warning", icon: /* @__PURE__ */ e(Rt, {}) },
|
|
1753
|
+
SUBMITTED: { label: "待批改", color: "processing", icon: /* @__PURE__ */ e(Lt, {}) },
|
|
1754
|
+
GRADED: { label: "已出分", color: "success", icon: /* @__PURE__ */ e(Dt, {}) }
|
|
1755
|
+
}, Je = (l) => l ? l.replace("T", " ").slice(0, 19) : "-";
|
|
1757
1756
|
function zn() {
|
|
1758
1757
|
var b;
|
|
1759
|
-
const l = Ce((f) => f.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E,
|
|
1758
|
+
const l = Ce((f) => f.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E, z] = o(""), [c, A] = o(!1), [C, T] = o([]), [I, G] = o(null), [u, v] = o([]), [_, y] = o(!1), [j, J] = o([]), [Z, O] = o(!1), [w, F] = o(!1), [h, m] = o(
|
|
1760
1759
|
null
|
|
1761
|
-
), [ee, Q] = o([]), [N, S] = o(!1), [i, a] = o(null), [p, R] = o(!1), [
|
|
1760
|
+
), [ee, Q] = o([]), [N, S] = o(!1), [i, a] = o(null), [p, R] = o(!1), [U, Y] = o(!1), [te, se] = o({}), [Oe, Ee] = o(
|
|
1762
1761
|
{}
|
|
1763
1762
|
), ye = de(async () => {
|
|
1764
1763
|
L(!0);
|
|
@@ -1772,32 +1771,32 @@ function zn() {
|
|
|
1772
1771
|
ce(() => {
|
|
1773
1772
|
ye();
|
|
1774
1773
|
}, [ye]);
|
|
1775
|
-
const
|
|
1776
|
-
m(f),
|
|
1774
|
+
const De = async (f) => {
|
|
1775
|
+
m(f), F(!0), S(!0);
|
|
1777
1776
|
try {
|
|
1778
1777
|
Q(
|
|
1779
|
-
await
|
|
1778
|
+
await vt(f.batchKey, l)
|
|
1780
1779
|
);
|
|
1781
1780
|
} catch {
|
|
1782
1781
|
} finally {
|
|
1783
1782
|
S(!1);
|
|
1784
1783
|
}
|
|
1785
|
-
},
|
|
1784
|
+
}, Fe = de(async () => {
|
|
1786
1785
|
if (h)
|
|
1787
1786
|
try {
|
|
1788
1787
|
Q(
|
|
1789
|
-
await
|
|
1788
|
+
await vt(h.batchKey, l)
|
|
1790
1789
|
);
|
|
1791
1790
|
} catch {
|
|
1792
1791
|
}
|
|
1793
|
-
}, [h, l]),
|
|
1794
|
-
A(!0),
|
|
1792
|
+
}, [h, l]), Re = async () => {
|
|
1793
|
+
A(!0), G(null), J([]);
|
|
1795
1794
|
try {
|
|
1796
|
-
T(await
|
|
1795
|
+
T(await st("", 1, l));
|
|
1797
1796
|
} catch {
|
|
1798
1797
|
}
|
|
1799
|
-
|
|
1800
|
-
},
|
|
1798
|
+
Be("");
|
|
1799
|
+
}, Be = de(
|
|
1801
1800
|
async (f) => {
|
|
1802
1801
|
y(!0);
|
|
1803
1802
|
try {
|
|
@@ -1808,7 +1807,7 @@ function zn() {
|
|
|
1808
1807
|
}
|
|
1809
1808
|
},
|
|
1810
1809
|
[l]
|
|
1811
|
-
),
|
|
1810
|
+
), ke = pe(
|
|
1812
1811
|
() => C.find((f) => f.id === I) ?? null,
|
|
1813
1812
|
[C, I]
|
|
1814
1813
|
), Ge = async () => {
|
|
@@ -1837,13 +1836,13 @@ function zn() {
|
|
|
1837
1836
|
} finally {
|
|
1838
1837
|
O(!1);
|
|
1839
1838
|
}
|
|
1840
|
-
},
|
|
1839
|
+
}, Ue = async (f) => {
|
|
1841
1840
|
try {
|
|
1842
|
-
const $ = await
|
|
1843
|
-
a($), se({}),
|
|
1841
|
+
const $ = await Ut(f.examId, l);
|
|
1842
|
+
a($), se({}), Ee({}), R(!0);
|
|
1844
1843
|
} catch {
|
|
1845
1844
|
}
|
|
1846
|
-
},
|
|
1845
|
+
}, je = async () => {
|
|
1847
1846
|
var V;
|
|
1848
1847
|
if (!(i != null && i.answers)) return;
|
|
1849
1848
|
const f = i.answers.filter((X) => X.type === "FREE");
|
|
@@ -1860,24 +1859,24 @@ function zn() {
|
|
|
1860
1859
|
);
|
|
1861
1860
|
return;
|
|
1862
1861
|
}
|
|
1863
|
-
const fe =
|
|
1862
|
+
const fe = Oe[X.answerId] ?? X.manualComment ?? void 0;
|
|
1864
1863
|
$.push({ answerId: X.answerId, score: ue, comment: fe });
|
|
1865
1864
|
}
|
|
1866
1865
|
Y(!0);
|
|
1867
1866
|
try {
|
|
1868
|
-
const X = await
|
|
1867
|
+
const X = await Gt(
|
|
1869
1868
|
i.examId,
|
|
1870
1869
|
{ examId: i.examId, reviews: $ },
|
|
1871
1870
|
l
|
|
1872
1871
|
);
|
|
1873
1872
|
P.success(
|
|
1874
1873
|
`复核完成,总分 ${X.totalScore ?? "-"}/${X.totalScoreFull ?? "-"}${X.passed ? "(及格)" : "(未及格)"}`
|
|
1875
|
-
), R(!1), a(null), ye(),
|
|
1874
|
+
), R(!1), a(null), ye(), Fe();
|
|
1876
1875
|
} catch {
|
|
1877
1876
|
} finally {
|
|
1878
1877
|
Y(!1);
|
|
1879
1878
|
}
|
|
1880
|
-
},
|
|
1879
|
+
}, Le = [
|
|
1881
1880
|
{
|
|
1882
1881
|
title: "试卷",
|
|
1883
1882
|
dataIndex: "paperTitle",
|
|
@@ -1897,14 +1896,14 @@ function zn() {
|
|
|
1897
1896
|
title: "发起时间",
|
|
1898
1897
|
dataIndex: "assignTime",
|
|
1899
1898
|
width: 150,
|
|
1900
|
-
render:
|
|
1899
|
+
render: Je
|
|
1901
1900
|
},
|
|
1902
1901
|
{
|
|
1903
1902
|
title: "参与",
|
|
1904
1903
|
dataIndex: "totalCount",
|
|
1905
1904
|
width: 76,
|
|
1906
1905
|
render: (f) => /* @__PURE__ */ t("span", { children: [
|
|
1907
|
-
/* @__PURE__ */ e(
|
|
1906
|
+
/* @__PURE__ */ e(Jt, {}),
|
|
1908
1907
|
" ",
|
|
1909
1908
|
f ?? 0,
|
|
1910
1909
|
" 人"
|
|
@@ -1954,8 +1953,7 @@ function zn() {
|
|
|
1954
1953
|
{
|
|
1955
1954
|
type: "link",
|
|
1956
1955
|
size: "small",
|
|
1957
|
-
|
|
1958
|
-
onClick: () => void Re($),
|
|
1956
|
+
onClick: () => void De($),
|
|
1959
1957
|
children: "详情"
|
|
1960
1958
|
}
|
|
1961
1959
|
)
|
|
@@ -1980,7 +1978,7 @@ function zn() {
|
|
|
1980
1978
|
dataIndex: "status",
|
|
1981
1979
|
width: 96,
|
|
1982
1980
|
render: (f) => {
|
|
1983
|
-
const $ =
|
|
1981
|
+
const $ = Tt[f] ?? {
|
|
1984
1982
|
label: f,
|
|
1985
1983
|
color: "default",
|
|
1986
1984
|
icon: null
|
|
@@ -2007,7 +2005,7 @@ function zn() {
|
|
|
2007
2005
|
title: "交卷时间",
|
|
2008
2006
|
dataIndex: "submitTime",
|
|
2009
2007
|
width: 150,
|
|
2010
|
-
render:
|
|
2008
|
+
render: Je
|
|
2011
2009
|
},
|
|
2012
2010
|
{
|
|
2013
2011
|
title: "答卷",
|
|
@@ -2018,8 +2016,8 @@ function zn() {
|
|
|
2018
2016
|
{
|
|
2019
2017
|
type: "link",
|
|
2020
2018
|
size: "small",
|
|
2021
|
-
icon: $.status === "SUBMITTED" ? /* @__PURE__ */ e(
|
|
2022
|
-
onClick: () => void
|
|
2019
|
+
icon: $.status === "SUBMITTED" ? /* @__PURE__ */ e(Lt, {}) : /* @__PURE__ */ e(Yt, {}),
|
|
2020
|
+
onClick: () => void Ue($),
|
|
2023
2021
|
children: $.status === "SUBMITTED" ? "批改" : "查看"
|
|
2024
2022
|
}
|
|
2025
2023
|
)
|
|
@@ -2047,7 +2045,7 @@ function zn() {
|
|
|
2047
2045
|
placeholder: "搜学员 / 试卷",
|
|
2048
2046
|
style: { width: 180 },
|
|
2049
2047
|
value: E,
|
|
2050
|
-
onChange: (f) =>
|
|
2048
|
+
onChange: (f) => z(f.target.value)
|
|
2051
2049
|
}
|
|
2052
2050
|
),
|
|
2053
2051
|
/* @__PURE__ */ e(
|
|
@@ -2064,26 +2062,26 @@ function zn() {
|
|
|
2064
2062
|
]
|
|
2065
2063
|
}
|
|
2066
2064
|
),
|
|
2067
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
2065
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void ye(), children: "刷新" }),
|
|
2068
2066
|
/* @__PURE__ */ e(
|
|
2069
2067
|
M,
|
|
2070
2068
|
{
|
|
2071
2069
|
type: "primary",
|
|
2072
|
-
icon: /* @__PURE__ */ e(
|
|
2073
|
-
onClick: () => void
|
|
2070
|
+
icon: /* @__PURE__ */ e(Vt, {}),
|
|
2071
|
+
onClick: () => void Re(),
|
|
2074
2072
|
children: "发起考试"
|
|
2075
2073
|
}
|
|
2076
2074
|
)
|
|
2077
2075
|
] })
|
|
2078
2076
|
] }),
|
|
2079
2077
|
/* @__PURE__ */ e("div", { className: r.tableCard, children: /* @__PURE__ */ e("div", { className: r.tableWrap, children: /* @__PURE__ */ e(
|
|
2080
|
-
|
|
2078
|
+
_e,
|
|
2081
2079
|
{
|
|
2082
2080
|
rows: n,
|
|
2083
2081
|
rowKey: "batchKey",
|
|
2084
2082
|
tableLayout: "fixed",
|
|
2085
2083
|
loading: k,
|
|
2086
|
-
columns:
|
|
2084
|
+
columns: Le,
|
|
2087
2085
|
emptyTitle: "暂无考试",
|
|
2088
2086
|
emptyDescription: "点右上「发起考试」选择试卷圈选人员发放。",
|
|
2089
2087
|
cardProps: { variant: "borderless", styles: { body: { padding: 0 } } }
|
|
@@ -2112,7 +2110,7 @@ function zn() {
|
|
|
2112
2110
|
showSearch: !0,
|
|
2113
2111
|
optionFilterProp: "label",
|
|
2114
2112
|
value: I,
|
|
2115
|
-
onChange:
|
|
2113
|
+
onChange: G,
|
|
2116
2114
|
options: C.map((f) => ({
|
|
2117
2115
|
value: f.id,
|
|
2118
2116
|
label: `${f.title}(满分 ${f.totalScore ?? "-"} · 及格 ${f.passScore ?? "-"}${f.durationLimitMin ? ` · 限时 ${f.durationLimitMin} 分钟` : ""})`
|
|
@@ -2129,7 +2127,7 @@ function zn() {
|
|
|
2129
2127
|
style: { width: "100%" },
|
|
2130
2128
|
placeholder: "输入姓名/账号搜索并勾选(支持多选)",
|
|
2131
2129
|
filterOption: !1,
|
|
2132
|
-
onSearch: (f) => void
|
|
2130
|
+
onSearch: (f) => void Be(f),
|
|
2133
2131
|
value: j.map(
|
|
2134
2132
|
(f) => String(f.accountNo ?? f.staffId ?? "")
|
|
2135
2133
|
),
|
|
@@ -2139,12 +2137,12 @@ function zn() {
|
|
|
2139
2137
|
(fe) => !f.includes(String(fe.accountNo ?? fe.staffId ?? ""))
|
|
2140
2138
|
), X = f.map(
|
|
2141
2139
|
(fe) => u.find(
|
|
2142
|
-
(
|
|
2140
|
+
($e) => String($e.accountNo ?? $e.staffId ?? "") === fe
|
|
2143
2141
|
)
|
|
2144
2142
|
).filter((fe) => !!fe), ue = /* @__PURE__ */ new Set();
|
|
2145
2143
|
return [...V, ...X].filter((fe) => {
|
|
2146
|
-
const
|
|
2147
|
-
return ue.has(
|
|
2144
|
+
const $e = String(fe.accountNo ?? fe.staffId ?? "");
|
|
2145
|
+
return ue.has($e) ? !1 : (ue.add($e), !0);
|
|
2148
2146
|
});
|
|
2149
2147
|
});
|
|
2150
2148
|
},
|
|
@@ -2156,7 +2154,7 @@ function zn() {
|
|
|
2156
2154
|
}
|
|
2157
2155
|
),
|
|
2158
2156
|
/* @__PURE__ */ t("div", { style: { color: "#888", fontSize: 12, marginTop: 6 }, children: [
|
|
2159
|
-
/* @__PURE__ */ e(
|
|
2157
|
+
/* @__PURE__ */ e(Qt, {}),
|
|
2160
2158
|
" 已圈选 ",
|
|
2161
2159
|
j.length,
|
|
2162
2160
|
" 人",
|
|
@@ -2164,11 +2162,11 @@ function zn() {
|
|
|
2164
2162
|
";已处于待考状态的人员会自动跳过。"
|
|
2165
2163
|
] })
|
|
2166
2164
|
] }),
|
|
2167
|
-
|
|
2168
|
-
/* @__PURE__ */ e(ne.Item, { label: "试卷", children:
|
|
2169
|
-
/* @__PURE__ */ e(ne.Item, { label: "批改模式", children:
|
|
2170
|
-
/* @__PURE__ */ e(ne.Item, { label: "重考上限", children:
|
|
2171
|
-
/* @__PURE__ */ e(ne.Item, { label: "记分策略", children:
|
|
2165
|
+
ke ? /* @__PURE__ */ t(ne, { size: "small", column: 2, bordered: !0, children: [
|
|
2166
|
+
/* @__PURE__ */ e(ne.Item, { label: "试卷", children: ke.title }),
|
|
2167
|
+
/* @__PURE__ */ e(ne.Item, { label: "批改模式", children: ke.judgeMode ?? "-" }),
|
|
2168
|
+
/* @__PURE__ */ e(ne.Item, { label: "重考上限", children: ke.retryLimit ?? "不限" }),
|
|
2169
|
+
/* @__PURE__ */ e(ne.Item, { label: "记分策略", children: ke.scorePolicy ?? "-" })
|
|
2172
2170
|
] }) : /* @__PURE__ */ e("div", { style: { color: "#888", fontSize: 12 }, children: "发放后学员在个人「培训中心 → 我的考试」收到待考任务,交卷后自动进入批改/出分流程。" })
|
|
2173
2171
|
] })
|
|
2174
2172
|
}
|
|
@@ -2181,12 +2179,12 @@ function zn() {
|
|
|
2181
2179
|
open: w,
|
|
2182
2180
|
destroyOnClose: !0,
|
|
2183
2181
|
onClose: () => {
|
|
2184
|
-
|
|
2182
|
+
F(!1), m(null), Q([]);
|
|
2185
2183
|
},
|
|
2186
2184
|
children: h ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 14 }, children: [
|
|
2187
2185
|
/* @__PURE__ */ t(ne, { size: "small", column: 2, bordered: !0, children: [
|
|
2188
2186
|
/* @__PURE__ */ e(ne.Item, { label: "来源", children: h.courseId ? /* @__PURE__ */ e(oe, { title: `课程 #${h.courseId}`, children: /* @__PURE__ */ e(H, { children: "课程" }) }) : /* @__PURE__ */ e(H, { color: "blue", children: "独立发放" }) }),
|
|
2189
|
-
/* @__PURE__ */ e(ne.Item, { label: "发起时间", children:
|
|
2187
|
+
/* @__PURE__ */ e(ne.Item, { label: "发起时间", children: Je(h.assignTime) }),
|
|
2190
2188
|
/* @__PURE__ */ t(ne.Item, { label: "参与人数", children: [
|
|
2191
2189
|
h.totalCount ?? 0,
|
|
2192
2190
|
" 人"
|
|
@@ -2210,7 +2208,7 @@ function zn() {
|
|
|
2210
2208
|
" 人 · 点「批改/查看」看逐题答卷)"
|
|
2211
2209
|
] }),
|
|
2212
2210
|
/* @__PURE__ */ e(
|
|
2213
|
-
|
|
2211
|
+
_e,
|
|
2214
2212
|
{
|
|
2215
2213
|
rows: ee,
|
|
2216
2214
|
rowKey: "examId",
|
|
@@ -2230,18 +2228,18 @@ function zn() {
|
|
|
2230
2228
|
title: i ? `答卷详情 #${i.examId} · ${i.userName ?? i.userId ?? ""}` : "答卷详情",
|
|
2231
2229
|
open: p,
|
|
2232
2230
|
width: 880,
|
|
2233
|
-
confirmLoading:
|
|
2231
|
+
confirmLoading: U,
|
|
2234
2232
|
okText: "完成复核并出分",
|
|
2235
2233
|
cancelText: "关闭",
|
|
2236
2234
|
okButtonProps: { disabled: (i == null ? void 0 : i.status) === "GRADED" },
|
|
2237
|
-
onOk: () => void
|
|
2235
|
+
onOk: () => void je(),
|
|
2238
2236
|
onCancel: () => {
|
|
2239
2237
|
R(!1), a(null);
|
|
2240
2238
|
},
|
|
2241
2239
|
children: i ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
2242
2240
|
/* @__PURE__ */ t(ne, { size: "small", column: 3, bordered: !0, children: [
|
|
2243
2241
|
/* @__PURE__ */ e(ne.Item, { label: "试卷", children: i.paperTitle ?? "-" }),
|
|
2244
|
-
/* @__PURE__ */ e(ne.Item, { label: "提交时间", children:
|
|
2242
|
+
/* @__PURE__ */ e(ne.Item, { label: "提交时间", children: Je(i.submitTime) }),
|
|
2245
2243
|
/* @__PURE__ */ e(ne.Item, { label: "批改模式", children: i.judgeMode ?? "-" }),
|
|
2246
2244
|
/* @__PURE__ */ e(ne.Item, { label: "客观题得分", children: i.objectiveScore ?? "-" }),
|
|
2247
2245
|
/* @__PURE__ */ t(ne.Item, { label: "总分", children: [
|
|
@@ -2249,18 +2247,18 @@ function zn() {
|
|
|
2249
2247
|
" / ",
|
|
2250
2248
|
i.totalScoreFull ?? "-"
|
|
2251
2249
|
] }),
|
|
2252
|
-
/* @__PURE__ */ e(ne.Item, { label: "状态", children: ((b =
|
|
2250
|
+
/* @__PURE__ */ e(ne.Item, { label: "状态", children: ((b = Tt[i.status ?? ""]) == null ? void 0 : b.label) ?? i.status })
|
|
2253
2251
|
] }),
|
|
2254
2252
|
(i.answers ?? []).map((f, $) => /* @__PURE__ */ e(
|
|
2255
|
-
|
|
2253
|
+
Wt,
|
|
2256
2254
|
{
|
|
2257
2255
|
item: f,
|
|
2258
2256
|
index: $,
|
|
2259
2257
|
readonly: i.status === "GRADED",
|
|
2260
2258
|
scoreInput: te[f.answerId] ?? f.score ?? null,
|
|
2261
|
-
commentInput:
|
|
2259
|
+
commentInput: Oe[f.answerId] ?? f.manualComment ?? "",
|
|
2262
2260
|
onScoreChange: (V) => se((X) => ({ ...X, [f.answerId]: V })),
|
|
2263
|
-
onCommentChange: (V) =>
|
|
2261
|
+
onCommentChange: (V) => Ee((X) => ({ ...X, [f.answerId]: V }))
|
|
2264
2262
|
},
|
|
2265
2263
|
f.answerId
|
|
2266
2264
|
)),
|
|
@@ -2270,10 +2268,10 @@ function zn() {
|
|
|
2270
2268
|
)
|
|
2271
2269
|
] });
|
|
2272
2270
|
}
|
|
2273
|
-
const Fn = "_gBody_96jeg_4",
|
|
2271
|
+
const Fn = "_gBody_96jeg_4", Gn = "_gTree_96jeg_14", Un = "_gTreeHead_96jeg_26", jn = "_gTreeTip_96jeg_34", Wn = "_gTreeScroll_96jeg_42", Hn = "_gListSide_96jeg_50", Kn = "_gListHead_96jeg_56", qn = "_gListTitle_96jeg_64", Vn = "_gListMeta_96jeg_69", Qn = "_groupRow_96jeg_75", Jn = "_groupRowName_96jeg_75", Yn = "_groupRowMeta_96jeg_106", Zn = "_groupRowActions_96jeg_115", Xn = "_actIcon_96jeg_127", ea = "_actIconDisabled_96jeg_135", ta = "_groupEmpty_96jeg_140", he = {
|
|
2274
2272
|
gBody: Fn,
|
|
2275
|
-
gTree:
|
|
2276
|
-
gTreeHead:
|
|
2273
|
+
gTree: Gn,
|
|
2274
|
+
gTreeHead: Un,
|
|
2277
2275
|
gTreeTip: jn,
|
|
2278
2276
|
gTreeScroll: Wn,
|
|
2279
2277
|
gListSide: Hn,
|
|
@@ -2287,22 +2285,22 @@ const Fn = "_gBody_96jeg_4", Un = "_gTree_96jeg_14", Gn = "_gTreeHead_96jeg_26",
|
|
|
2287
2285
|
actIcon: Xn,
|
|
2288
2286
|
actIconDisabled: ea,
|
|
2289
2287
|
groupEmpty: ta
|
|
2290
|
-
},
|
|
2288
|
+
}, Me = {
|
|
2291
2289
|
SINGLE: { label: "单选", color: "blue" },
|
|
2292
2290
|
MULTI: { label: "多选", color: "purple" },
|
|
2293
2291
|
FREE: { label: "自由", color: "orange" }
|
|
2294
2292
|
};
|
|
2295
|
-
function
|
|
2293
|
+
function ht(l) {
|
|
2296
2294
|
return l.map((n) => {
|
|
2297
2295
|
var D;
|
|
2298
2296
|
return {
|
|
2299
2297
|
value: n.id,
|
|
2300
2298
|
title: n.name,
|
|
2301
|
-
children: (D = n.children) != null && D.length ?
|
|
2299
|
+
children: (D = n.children) != null && D.length ? ht(n.children) : void 0
|
|
2302
2300
|
};
|
|
2303
2301
|
});
|
|
2304
2302
|
}
|
|
2305
|
-
function
|
|
2303
|
+
function Ht(l) {
|
|
2306
2304
|
const n = /* @__PURE__ */ new Map();
|
|
2307
2305
|
l.forEach((L) => n.set(L.id, { ...L }));
|
|
2308
2306
|
const D = [];
|
|
@@ -2317,7 +2315,7 @@ function Vt(l) {
|
|
|
2317
2315
|
};
|
|
2318
2316
|
return k(D), D;
|
|
2319
2317
|
}
|
|
2320
|
-
const
|
|
2318
|
+
const Nt = [
|
|
2321
2319
|
{ value: "AI_REVIEW", label: "AI初评+人工复核" },
|
|
2322
2320
|
{ value: "AUTO_AI", label: "AI全自动出分" },
|
|
2323
2321
|
{ value: "MANUAL", label: "全人工批改" }
|
|
@@ -2326,7 +2324,7 @@ function la() {
|
|
|
2326
2324
|
const [l, n] = o("papers");
|
|
2327
2325
|
return /* @__PURE__ */ t("div", { className: r.scenarioPage, children: [
|
|
2328
2326
|
/* @__PURE__ */ e(
|
|
2329
|
-
|
|
2327
|
+
Pt,
|
|
2330
2328
|
{
|
|
2331
2329
|
activeKey: l,
|
|
2332
2330
|
onChange: n,
|
|
@@ -2344,10 +2342,10 @@ function la() {
|
|
|
2344
2342
|
] });
|
|
2345
2343
|
}
|
|
2346
2344
|
function na() {
|
|
2347
|
-
const l = Ce((h) => h.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E,
|
|
2345
|
+
const l = Ce((h) => h.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E, z] = o(!1), [c, A] = o(null), [C, T] = o(!1), [I, G] = o(null), [u, v] = o(!1), [_, y] = o(!1), j = de(async () => {
|
|
2348
2346
|
L(!0);
|
|
2349
2347
|
try {
|
|
2350
|
-
D(await
|
|
2348
|
+
D(await st(x, null, l));
|
|
2351
2349
|
} catch {
|
|
2352
2350
|
} finally {
|
|
2353
2351
|
L(!1);
|
|
@@ -2366,7 +2364,7 @@ function na() {
|
|
|
2366
2364
|
scorePolicy: "BEST",
|
|
2367
2365
|
judgeMode: "AI_REVIEW",
|
|
2368
2366
|
shuffle: 0
|
|
2369
|
-
}),
|
|
2367
|
+
}), z(!0);
|
|
2370
2368
|
}, Z = async () => {
|
|
2371
2369
|
if (c) {
|
|
2372
2370
|
if (!c.title.trim()) {
|
|
@@ -2375,7 +2373,7 @@ function na() {
|
|
|
2375
2373
|
}
|
|
2376
2374
|
T(!0);
|
|
2377
2375
|
try {
|
|
2378
|
-
await Tl(c, l), P.success("保存成功"),
|
|
2376
|
+
await Tl(c, l), P.success("保存成功"), z(!1), A(null), j();
|
|
2379
2377
|
} catch {
|
|
2380
2378
|
} finally {
|
|
2381
2379
|
T(!1);
|
|
@@ -2393,10 +2391,10 @@ function na() {
|
|
|
2393
2391
|
}, w = async (h) => {
|
|
2394
2392
|
try {
|
|
2395
2393
|
const m = await Sl(h.id, l);
|
|
2396
|
-
|
|
2394
|
+
G(m), v(!0);
|
|
2397
2395
|
} catch {
|
|
2398
2396
|
}
|
|
2399
|
-
},
|
|
2397
|
+
}, F = [
|
|
2400
2398
|
{ title: "ID", dataIndex: "id", width: 84, ellipsis: !0 },
|
|
2401
2399
|
{
|
|
2402
2400
|
title: "试卷标题",
|
|
@@ -2422,7 +2420,7 @@ function na() {
|
|
|
2422
2420
|
width: 110,
|
|
2423
2421
|
render: (h) => {
|
|
2424
2422
|
var m;
|
|
2425
|
-
return ((m =
|
|
2423
|
+
return ((m = Nt.find((ee) => ee.value === h)) == null ? void 0 : m.label) ?? "-";
|
|
2426
2424
|
}
|
|
2427
2425
|
},
|
|
2428
2426
|
{
|
|
@@ -2468,7 +2466,7 @@ function na() {
|
|
|
2468
2466
|
type: "link",
|
|
2469
2467
|
size: "small",
|
|
2470
2468
|
onClick: () => {
|
|
2471
|
-
A({ ...m }),
|
|
2469
|
+
A({ ...m }), z(!0);
|
|
2472
2470
|
},
|
|
2473
2471
|
children: "编辑"
|
|
2474
2472
|
}
|
|
@@ -2483,7 +2481,7 @@ function na() {
|
|
|
2483
2481
|
}
|
|
2484
2482
|
),
|
|
2485
2483
|
/* @__PURE__ */ e(
|
|
2486
|
-
|
|
2484
|
+
Ne,
|
|
2487
2485
|
{
|
|
2488
2486
|
title: (m.refCount ?? 0) > 0 ? `该试卷被 ${m.refCount} 处课程引用,无法删除(可撤回)` : "确认删除该试卷?",
|
|
2489
2487
|
okText: "删除",
|
|
@@ -2502,8 +2500,8 @@ function na() {
|
|
|
2502
2500
|
type: "link",
|
|
2503
2501
|
size: "small",
|
|
2504
2502
|
danger: !0,
|
|
2505
|
-
|
|
2506
|
-
|
|
2503
|
+
disabled: (m.refCount ?? 0) > 0,
|
|
2504
|
+
children: "删除"
|
|
2507
2505
|
}
|
|
2508
2506
|
)
|
|
2509
2507
|
}
|
|
@@ -2533,18 +2531,18 @@ function na() {
|
|
|
2533
2531
|
onChange: (h) => B(h.target.value)
|
|
2534
2532
|
}
|
|
2535
2533
|
),
|
|
2536
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
2534
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void j(), children: "刷新" }),
|
|
2537
2535
|
/* @__PURE__ */ e(M, { type: "primary", icon: /* @__PURE__ */ e(xe, {}), onClick: J, children: "新建试卷" })
|
|
2538
2536
|
] })
|
|
2539
2537
|
] }),
|
|
2540
2538
|
/* @__PURE__ */ e("div", { className: r.tableCard, children: /* @__PURE__ */ e("div", { className: r.tableWrap, children: /* @__PURE__ */ e(
|
|
2541
|
-
|
|
2539
|
+
_e,
|
|
2542
2540
|
{
|
|
2543
2541
|
rows: n,
|
|
2544
2542
|
rowKey: "id",
|
|
2545
2543
|
tableLayout: "fixed",
|
|
2546
2544
|
loading: k,
|
|
2547
|
-
columns:
|
|
2545
|
+
columns: F,
|
|
2548
2546
|
emptyTitle: "暂无试卷",
|
|
2549
2547
|
emptyDescription: "点右上「新建试卷」创建第一份。",
|
|
2550
2548
|
cardProps: { variant: "borderless", styles: { body: { padding: 0 } } }
|
|
@@ -2561,7 +2559,7 @@ function na() {
|
|
|
2561
2559
|
cancelText: "取消",
|
|
2562
2560
|
onOk: () => void Z(),
|
|
2563
2561
|
onCancel: () => {
|
|
2564
|
-
|
|
2562
|
+
z(!1), A(null);
|
|
2565
2563
|
},
|
|
2566
2564
|
children: c ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
2567
2565
|
/* @__PURE__ */ t("div", { children: [
|
|
@@ -2591,7 +2589,7 @@ function na() {
|
|
|
2591
2589
|
/* @__PURE__ */ t("div", { style: { flex: 1 }, children: [
|
|
2592
2590
|
/* @__PURE__ */ e("div", { style: { marginBottom: 4 }, children: "及格分" }),
|
|
2593
2591
|
/* @__PURE__ */ e(
|
|
2594
|
-
|
|
2592
|
+
ze,
|
|
2595
2593
|
{
|
|
2596
2594
|
min: 1,
|
|
2597
2595
|
style: { width: "100%" },
|
|
@@ -2603,7 +2601,7 @@ function na() {
|
|
|
2603
2601
|
/* @__PURE__ */ t("div", { style: { flex: 1 }, children: [
|
|
2604
2602
|
/* @__PURE__ */ e("div", { style: { marginBottom: 4 }, children: "时长(分钟)" }),
|
|
2605
2603
|
/* @__PURE__ */ e(
|
|
2606
|
-
|
|
2604
|
+
ze,
|
|
2607
2605
|
{
|
|
2608
2606
|
min: 1,
|
|
2609
2607
|
style: { width: "100%" },
|
|
@@ -2617,7 +2615,7 @@ function na() {
|
|
|
2617
2615
|
/* @__PURE__ */ t("div", { style: { flex: 1 }, children: [
|
|
2618
2616
|
/* @__PURE__ */ e("div", { style: { marginBottom: 4 }, children: "可重考次数" }),
|
|
2619
2617
|
/* @__PURE__ */ e(
|
|
2620
|
-
|
|
2618
|
+
ze,
|
|
2621
2619
|
{
|
|
2622
2620
|
min: 0,
|
|
2623
2621
|
style: { width: "100%" },
|
|
@@ -2651,13 +2649,13 @@ function na() {
|
|
|
2651
2649
|
style: { width: "100%" },
|
|
2652
2650
|
value: c.judgeMode ?? "AI_REVIEW",
|
|
2653
2651
|
onChange: (h) => A((m) => m && { ...m, judgeMode: h }),
|
|
2654
|
-
options:
|
|
2652
|
+
options: Nt
|
|
2655
2653
|
}
|
|
2656
2654
|
)
|
|
2657
2655
|
] }),
|
|
2658
2656
|
/* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
2659
2657
|
/* @__PURE__ */ e(
|
|
2660
|
-
|
|
2658
|
+
Ot,
|
|
2661
2659
|
{
|
|
2662
2660
|
checked: c.shuffle === 1,
|
|
2663
2661
|
onChange: (h) => A((m) => m && { ...m, shuffle: h ? 1 : 0 })
|
|
@@ -2695,15 +2693,15 @@ function aa({
|
|
|
2695
2693
|
setLoading: x,
|
|
2696
2694
|
onSaved: B
|
|
2697
2695
|
}) {
|
|
2698
|
-
const [E,
|
|
2696
|
+
const [E, z] = o([]), [c, A] = o([]), [C, T] = o(/* @__PURE__ */ new Map()), [I, G] = o(""), [u, v] = o(null);
|
|
2699
2697
|
ce(() => {
|
|
2700
2698
|
n && (T(
|
|
2701
2699
|
new Map((l.questions ?? []).map((O) => [O.questionId, O.score ?? 0]))
|
|
2702
2700
|
), Promise.all([
|
|
2703
|
-
|
|
2704
|
-
|
|
2701
|
+
ct("", null, "", k),
|
|
2702
|
+
ut(k)
|
|
2705
2703
|
]).then(([O, w]) => {
|
|
2706
|
-
|
|
2704
|
+
z(O), A(w);
|
|
2707
2705
|
}).catch(() => {
|
|
2708
2706
|
}));
|
|
2709
2707
|
}, [n, l, k]);
|
|
@@ -2712,14 +2710,14 @@ function aa({
|
|
|
2712
2710
|
if (u != null && (O = O.filter((w) => w.groupId === u)), I.trim()) {
|
|
2713
2711
|
const w = I.trim();
|
|
2714
2712
|
O = O.filter(
|
|
2715
|
-
(
|
|
2713
|
+
(F) => F.title.includes(w) || (F.groupName ?? "").includes(w)
|
|
2716
2714
|
);
|
|
2717
2715
|
}
|
|
2718
2716
|
return O;
|
|
2719
2717
|
}, [E, I, u]), y = Array.from(C.values()).reduce((O, w) => O + w, 0), j = (O) => {
|
|
2720
2718
|
T((w) => {
|
|
2721
|
-
const
|
|
2722
|
-
return
|
|
2719
|
+
const F = new Map(w);
|
|
2720
|
+
return F.has(O.id) ? F.delete(O.id) : F.set(O.id, 10), F;
|
|
2723
2721
|
});
|
|
2724
2722
|
}, J = async () => {
|
|
2725
2723
|
if (C.size === 0) {
|
|
@@ -2732,10 +2730,10 @@ function aa({
|
|
|
2732
2730
|
{
|
|
2733
2731
|
paperId: l.id,
|
|
2734
2732
|
items: Array.from(C.entries()).map(
|
|
2735
|
-
([O, w],
|
|
2733
|
+
([O, w], F) => ({
|
|
2736
2734
|
questionId: O,
|
|
2737
2735
|
score: w,
|
|
2738
|
-
sortOrder:
|
|
2736
|
+
sortOrder: F
|
|
2739
2737
|
})
|
|
2740
2738
|
)
|
|
2741
2739
|
},
|
|
@@ -2758,7 +2756,7 @@ function aa({
|
|
|
2758
2756
|
dataIndex: "type",
|
|
2759
2757
|
width: 76,
|
|
2760
2758
|
render: (O) => {
|
|
2761
|
-
const w =
|
|
2759
|
+
const w = Me[O] ?? Me.SINGLE;
|
|
2762
2760
|
return /* @__PURE__ */ e(H, { color: w.color, children: w.label });
|
|
2763
2761
|
}
|
|
2764
2762
|
},
|
|
@@ -2773,15 +2771,15 @@ function aa({
|
|
|
2773
2771
|
key: "score",
|
|
2774
2772
|
width: 100,
|
|
2775
2773
|
render: (O, w) => C.has(w.id) ? /* @__PURE__ */ e(
|
|
2776
|
-
|
|
2774
|
+
ze,
|
|
2777
2775
|
{
|
|
2778
2776
|
min: 1,
|
|
2779
2777
|
max: 100,
|
|
2780
2778
|
size: "small",
|
|
2781
2779
|
value: C.get(w.id),
|
|
2782
|
-
onChange: (
|
|
2780
|
+
onChange: (F) => T((h) => {
|
|
2783
2781
|
const m = new Map(h);
|
|
2784
|
-
return m.set(w.id,
|
|
2782
|
+
return m.set(w.id, F ?? 1), m;
|
|
2785
2783
|
})
|
|
2786
2784
|
}
|
|
2787
2785
|
) : /* @__PURE__ */ e("span", { className: r.mutedCell, children: "-" })
|
|
@@ -2808,7 +2806,7 @@ function aa({
|
|
|
2808
2806
|
placeholder: "搜索题干/组别",
|
|
2809
2807
|
style: { width: 240 },
|
|
2810
2808
|
value: I,
|
|
2811
|
-
onChange: (O) =>
|
|
2809
|
+
onChange: (O) => G(O.target.value)
|
|
2812
2810
|
}
|
|
2813
2811
|
),
|
|
2814
2812
|
/* @__PURE__ */ e(
|
|
@@ -2824,7 +2822,7 @@ function aa({
|
|
|
2824
2822
|
)
|
|
2825
2823
|
] }),
|
|
2826
2824
|
/* @__PURE__ */ e(
|
|
2827
|
-
|
|
2825
|
+
_e,
|
|
2828
2826
|
{
|
|
2829
2827
|
rows: _,
|
|
2830
2828
|
rowKey: "id",
|
|
@@ -2833,15 +2831,15 @@ function aa({
|
|
|
2833
2831
|
rowSelection: {
|
|
2834
2832
|
selectedRowKeys: Array.from(C.keys()),
|
|
2835
2833
|
onSelect: (O, w) => {
|
|
2836
|
-
w ? j(O) : T((
|
|
2837
|
-
const h = new Map(
|
|
2834
|
+
w ? j(O) : T((F) => {
|
|
2835
|
+
const h = new Map(F);
|
|
2838
2836
|
return h.delete(O.id), h;
|
|
2839
2837
|
});
|
|
2840
2838
|
},
|
|
2841
|
-
onSelectAll: (O, w,
|
|
2839
|
+
onSelectAll: (O, w, F) => {
|
|
2842
2840
|
T((h) => {
|
|
2843
2841
|
const m = new Map(h);
|
|
2844
|
-
return
|
|
2842
|
+
return F.forEach((ee) => {
|
|
2845
2843
|
O ? m.set(ee.id, 10) : m.delete(ee.id);
|
|
2846
2844
|
}), m;
|
|
2847
2845
|
});
|
|
@@ -2857,12 +2855,12 @@ function aa({
|
|
|
2857
2855
|
);
|
|
2858
2856
|
}
|
|
2859
2857
|
function ia() {
|
|
2860
|
-
const l = Ce((i) => i.token), [n, D] = o([]), [k, L] = o([]), [x, B] = o(!1), [E,
|
|
2858
|
+
const l = Ce((i) => i.token), [n, D] = o([]), [k, L] = o([]), [x, B] = o(!1), [E, z] = o(""), [c, A] = o(""), [C, T] = o(null), [I, G] = o(!1), [u, v] = o(null), [_, y] = o([]), [j, J] = o([]), [Z, O] = o(!1), w = de(async () => {
|
|
2861
2859
|
B(!0);
|
|
2862
2860
|
try {
|
|
2863
2861
|
const [i, a] = await Promise.all([
|
|
2864
|
-
|
|
2865
|
-
|
|
2862
|
+
ct(E, C, c, l),
|
|
2863
|
+
ut(l)
|
|
2866
2864
|
]);
|
|
2867
2865
|
D(i), L(a);
|
|
2868
2866
|
} catch {
|
|
@@ -2873,8 +2871,8 @@ function ia() {
|
|
|
2873
2871
|
ce(() => {
|
|
2874
2872
|
w();
|
|
2875
2873
|
}, [w]);
|
|
2876
|
-
const
|
|
2877
|
-
() =>
|
|
2874
|
+
const F = pe(
|
|
2875
|
+
() => ht(Ht(k)),
|
|
2878
2876
|
[k]
|
|
2879
2877
|
), h = (i) => {
|
|
2880
2878
|
if (!i) return [];
|
|
@@ -2896,13 +2894,13 @@ function ia() {
|
|
|
2896
2894
|
{ key: "B", label: "" },
|
|
2897
2895
|
{ key: "C", label: "" },
|
|
2898
2896
|
{ key: "D", label: "" }
|
|
2899
|
-
]), J([]),
|
|
2897
|
+
]), J([]), G(!0);
|
|
2900
2898
|
}, ee = (i) => {
|
|
2901
2899
|
v({ ...i }), y(h(i.options));
|
|
2902
2900
|
const a = i.type;
|
|
2903
2901
|
J(
|
|
2904
2902
|
a === "SINGLE" ? i.answer ? [i.answer] : [] : a === "MULTI" ? (i.answer ?? "").split(",").filter(Boolean) : []
|
|
2905
|
-
),
|
|
2903
|
+
), G(!0);
|
|
2906
2904
|
}, Q = () => (u == null ? void 0 : u.type) === "FREE" ? null : JSON.stringify(
|
|
2907
2905
|
_.filter((i) => i.label.trim()).map((i) => ({ key: i.key, label: i.label.trim() }))
|
|
2908
2906
|
), N = async () => {
|
|
@@ -2937,7 +2935,7 @@ function ia() {
|
|
|
2937
2935
|
referenceAnswer: u.type === "FREE" ? u.referenceAnswer ?? null : null
|
|
2938
2936
|
},
|
|
2939
2937
|
l
|
|
2940
|
-
), P.success("保存成功"),
|
|
2938
|
+
), P.success("保存成功"), G(!1), v(null), w();
|
|
2941
2939
|
} catch {
|
|
2942
2940
|
} finally {
|
|
2943
2941
|
O(!1);
|
|
@@ -2961,7 +2959,7 @@ function ia() {
|
|
|
2961
2959
|
dataIndex: "type",
|
|
2962
2960
|
width: 76,
|
|
2963
2961
|
render: (i) => {
|
|
2964
|
-
const a =
|
|
2962
|
+
const a = Me[i] ?? Me.SINGLE;
|
|
2965
2963
|
return /* @__PURE__ */ e(H, { color: a.color, children: a.label });
|
|
2966
2964
|
}
|
|
2967
2965
|
},
|
|
@@ -2976,19 +2974,19 @@ function ia() {
|
|
|
2976
2974
|
key: "actions",
|
|
2977
2975
|
width: 120,
|
|
2978
2976
|
render: (i, a) => {
|
|
2979
|
-
var p, R,
|
|
2977
|
+
var p, R, U;
|
|
2980
2978
|
return /* @__PURE__ */ t("div", { className: r.actionGroup, children: [
|
|
2981
2979
|
/* @__PURE__ */ e(
|
|
2982
2980
|
M,
|
|
2983
2981
|
{
|
|
2984
2982
|
type: "link",
|
|
2985
2983
|
size: "small",
|
|
2986
|
-
|
|
2987
|
-
|
|
2984
|
+
onClick: () => ee(a),
|
|
2985
|
+
children: "编辑"
|
|
2988
2986
|
}
|
|
2989
2987
|
),
|
|
2990
2988
|
/* @__PURE__ */ e(
|
|
2991
|
-
|
|
2989
|
+
Ne,
|
|
2992
2990
|
{
|
|
2993
2991
|
title: (p = a.paperRefs) != null && p.length ? `该题被 ${a.paperRefs.length} 份试卷引用,无法删除` : "确认删除该题目?",
|
|
2994
2992
|
okText: "删除",
|
|
@@ -3007,8 +3005,8 @@ function ia() {
|
|
|
3007
3005
|
type: "link",
|
|
3008
3006
|
size: "small",
|
|
3009
3007
|
danger: !0,
|
|
3010
|
-
|
|
3011
|
-
|
|
3008
|
+
disabled: !!((U = a.paperRefs) != null && U.length),
|
|
3009
|
+
children: "删除"
|
|
3012
3010
|
}
|
|
3013
3011
|
)
|
|
3014
3012
|
}
|
|
@@ -3036,7 +3034,7 @@ function ia() {
|
|
|
3036
3034
|
placeholder: "搜索题干",
|
|
3037
3035
|
style: { width: 180 },
|
|
3038
3036
|
value: E,
|
|
3039
|
-
onChange: (i) =>
|
|
3037
|
+
onChange: (i) => z(i.target.value)
|
|
3040
3038
|
}
|
|
3041
3039
|
),
|
|
3042
3040
|
/* @__PURE__ */ e(
|
|
@@ -3047,30 +3045,30 @@ function ia() {
|
|
|
3047
3045
|
style: { width: 110 },
|
|
3048
3046
|
value: c || void 0,
|
|
3049
3047
|
onChange: (i) => A(i ?? ""),
|
|
3050
|
-
options: Object.entries(
|
|
3048
|
+
options: Object.entries(Me).map(([i, a]) => ({
|
|
3051
3049
|
value: i,
|
|
3052
3050
|
label: a.label
|
|
3053
3051
|
}))
|
|
3054
3052
|
}
|
|
3055
3053
|
),
|
|
3056
3054
|
/* @__PURE__ */ e(
|
|
3057
|
-
|
|
3055
|
+
Xe,
|
|
3058
3056
|
{
|
|
3059
3057
|
allowClear: !0,
|
|
3060
3058
|
placeholder: "组别",
|
|
3061
3059
|
style: { width: 150 },
|
|
3062
3060
|
value: C ?? void 0,
|
|
3063
3061
|
onChange: (i) => T(i ?? null),
|
|
3064
|
-
treeData:
|
|
3062
|
+
treeData: F,
|
|
3065
3063
|
treeDefaultExpandAll: !0
|
|
3066
3064
|
}
|
|
3067
3065
|
),
|
|
3068
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
3066
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void w(), children: "刷新" }),
|
|
3069
3067
|
/* @__PURE__ */ e(M, { type: "primary", icon: /* @__PURE__ */ e(xe, {}), onClick: m, children: "新建题目" })
|
|
3070
3068
|
] })
|
|
3071
3069
|
] }),
|
|
3072
3070
|
/* @__PURE__ */ e("div", { className: r.tableCard, children: /* @__PURE__ */ e("div", { className: r.tableWrap, children: /* @__PURE__ */ e(
|
|
3073
|
-
|
|
3071
|
+
_e,
|
|
3074
3072
|
{
|
|
3075
3073
|
rows: n,
|
|
3076
3074
|
rowKey: "id",
|
|
@@ -3093,18 +3091,18 @@ function ia() {
|
|
|
3093
3091
|
cancelText: "取消",
|
|
3094
3092
|
onOk: () => void N(),
|
|
3095
3093
|
onCancel: () => {
|
|
3096
|
-
|
|
3094
|
+
G(!1), v(null);
|
|
3097
3095
|
},
|
|
3098
3096
|
children: u ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
3099
3097
|
/* @__PURE__ */ t("div", { style: { display: "flex", gap: 12 }, children: [
|
|
3100
3098
|
/* @__PURE__ */ t("div", { style: { flex: 1 }, children: [
|
|
3101
3099
|
/* @__PURE__ */ e("div", { style: { marginBottom: 4 }, children: "题型 *" }),
|
|
3102
3100
|
/* @__PURE__ */ e(
|
|
3103
|
-
|
|
3101
|
+
pt.Group,
|
|
3104
3102
|
{
|
|
3105
3103
|
value: u.type,
|
|
3106
3104
|
onChange: (i) => v((a) => a && { ...a, type: i.target.value }),
|
|
3107
|
-
options: Object.entries(
|
|
3105
|
+
options: Object.entries(Me).map(([i, a]) => ({
|
|
3108
3106
|
value: i,
|
|
3109
3107
|
label: a.label
|
|
3110
3108
|
}))
|
|
@@ -3114,13 +3112,13 @@ function ia() {
|
|
|
3114
3112
|
/* @__PURE__ */ t("div", { style: { width: 200 }, children: [
|
|
3115
3113
|
/* @__PURE__ */ e("div", { style: { marginBottom: 4 }, children: "题目组别" }),
|
|
3116
3114
|
/* @__PURE__ */ e(
|
|
3117
|
-
|
|
3115
|
+
Xe,
|
|
3118
3116
|
{
|
|
3119
3117
|
allowClear: !0,
|
|
3120
3118
|
style: { width: "100%" },
|
|
3121
3119
|
value: u.groupId ?? void 0,
|
|
3122
3120
|
onChange: (i) => v((a) => a && { ...a, groupId: i ?? null }),
|
|
3123
|
-
treeData:
|
|
3121
|
+
treeData: F,
|
|
3124
3122
|
treeDefaultExpandAll: !0,
|
|
3125
3123
|
placeholder: "不选=未分组"
|
|
3126
3124
|
}
|
|
@@ -3148,7 +3146,7 @@ function ia() {
|
|
|
3148
3146
|
children: [
|
|
3149
3147
|
_.map((i, a) => /* @__PURE__ */ t(qe, { align: "center", children: [
|
|
3150
3148
|
u.type === "SINGLE" ? /* @__PURE__ */ e(
|
|
3151
|
-
|
|
3149
|
+
pt,
|
|
3152
3150
|
{
|
|
3153
3151
|
checked: j[0] === i.key,
|
|
3154
3152
|
onChange: () => J([i.key]),
|
|
@@ -3159,7 +3157,7 @@ function ia() {
|
|
|
3159
3157
|
{
|
|
3160
3158
|
checked: j.includes(i.key),
|
|
3161
3159
|
onChange: (p) => J(
|
|
3162
|
-
(R) => p ? [...R, i.key] : R.filter((
|
|
3160
|
+
(R) => p ? [...R, i.key] : R.filter((U) => U !== i.key)
|
|
3163
3161
|
),
|
|
3164
3162
|
label: i.key
|
|
3165
3163
|
}
|
|
@@ -3172,7 +3170,7 @@ function ia() {
|
|
|
3172
3170
|
value: i.label,
|
|
3173
3171
|
onChange: (p) => y(
|
|
3174
3172
|
(R) => R.map(
|
|
3175
|
-
(
|
|
3173
|
+
(U, Y) => Y === a ? { ...U, label: p.target.value } : U
|
|
3176
3174
|
)
|
|
3177
3175
|
)
|
|
3178
3176
|
}
|
|
@@ -3266,10 +3264,10 @@ function ra({
|
|
|
3266
3264
|
);
|
|
3267
3265
|
}
|
|
3268
3266
|
function oa() {
|
|
3269
|
-
const l = Ce((a) => a.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(!1), [E,
|
|
3267
|
+
const l = Ce((a) => a.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(!1), [E, z] = o(null), [c, A] = o(!1), [C, T] = o([]), [I, G] = o(null), [u, v] = o([]), [_, y] = o(!1), j = de(async () => {
|
|
3270
3268
|
L(!0);
|
|
3271
3269
|
try {
|
|
3272
|
-
const a = await
|
|
3270
|
+
const a = await ut(l);
|
|
3273
3271
|
D(a), T(a.map((p) => p.id));
|
|
3274
3272
|
} catch {
|
|
3275
3273
|
} finally {
|
|
@@ -3284,7 +3282,7 @@ function oa() {
|
|
|
3284
3282
|
return;
|
|
3285
3283
|
}
|
|
3286
3284
|
let a = !1;
|
|
3287
|
-
return y(!0),
|
|
3285
|
+
return y(!0), ct("", Number(I), "", l).then((p) => {
|
|
3288
3286
|
a || v(p);
|
|
3289
3287
|
}).catch(() => {
|
|
3290
3288
|
}).finally(() => {
|
|
@@ -3293,14 +3291,14 @@ function oa() {
|
|
|
3293
3291
|
a = !0;
|
|
3294
3292
|
};
|
|
3295
3293
|
}, [I, l]);
|
|
3296
|
-
const J = pe(() =>
|
|
3294
|
+
const J = pe(() => Ht(n), [n]), Z = n.find((a) => String(a.id) === String(I)) ?? null, O = de(
|
|
3297
3295
|
(a) => {
|
|
3298
3296
|
const p = /* @__PURE__ */ new Set([a]);
|
|
3299
3297
|
let R = !0;
|
|
3300
3298
|
for (; R; ) {
|
|
3301
3299
|
R = !1;
|
|
3302
|
-
for (const
|
|
3303
|
-
|
|
3300
|
+
for (const U of n)
|
|
3301
|
+
U.parentId != null && p.has(U.parentId) && !p.has(U.id) && (p.add(U.id), R = !0);
|
|
3304
3302
|
}
|
|
3305
3303
|
return p;
|
|
3306
3304
|
},
|
|
@@ -3309,37 +3307,37 @@ function oa() {
|
|
|
3309
3307
|
var te;
|
|
3310
3308
|
const p = Number(a.dragNode.key), R = n.find((se) => se.id === p);
|
|
3311
3309
|
if (!(R != null && R.id)) return;
|
|
3312
|
-
const
|
|
3310
|
+
const U = Number(a.node.key), Y = a.dropToGap ? ((te = n.find((se) => se.id === U)) == null ? void 0 : te.parentId) ?? null : U;
|
|
3313
3311
|
if (Y === p || Y != null && O(p).has(Y)) {
|
|
3314
3312
|
P.warning("不能把节点移动到自身或其子孙节点下");
|
|
3315
3313
|
return;
|
|
3316
3314
|
}
|
|
3317
3315
|
if ((R.parentId ?? null) !== Y)
|
|
3318
3316
|
try {
|
|
3319
|
-
await
|
|
3317
|
+
await ft(
|
|
3320
3318
|
{ ...R, parentId: Y },
|
|
3321
3319
|
l
|
|
3322
3320
|
), P.success("已调整层级"), j();
|
|
3323
3321
|
} catch {
|
|
3324
3322
|
}
|
|
3325
|
-
},
|
|
3326
|
-
|
|
3323
|
+
}, F = (a) => {
|
|
3324
|
+
z({ name: "", parentId: a, description: "" }), B(!0);
|
|
3327
3325
|
}, h = (a) => {
|
|
3328
|
-
|
|
3326
|
+
z({ ...a }), B(!0);
|
|
3329
3327
|
}, m = pe(() => {
|
|
3330
|
-
if (!(E != null && E.id)) return
|
|
3331
|
-
const a = O(E.id), p = (R) => R.filter((
|
|
3328
|
+
if (!(E != null && E.id)) return ht(J);
|
|
3329
|
+
const a = O(E.id), p = (R) => R.filter((U) => !a.has(U.id)).map((U) => {
|
|
3332
3330
|
var Y;
|
|
3333
3331
|
return {
|
|
3334
|
-
value:
|
|
3335
|
-
title:
|
|
3336
|
-
children: (Y =
|
|
3332
|
+
value: U.id,
|
|
3333
|
+
title: U.name,
|
|
3334
|
+
children: (Y = U.children) != null && Y.length ? p(U.children) : void 0
|
|
3337
3335
|
};
|
|
3338
3336
|
});
|
|
3339
3337
|
return p(J);
|
|
3340
3338
|
}, [J, E, O]), ee = (a) => {
|
|
3341
|
-
var
|
|
3342
|
-
const p = ((
|
|
3339
|
+
var U;
|
|
3340
|
+
const p = ((U = a.children) == null ? void 0 : U.length) ?? 0, R = (a.questionCount ?? 0) > 0 || p > 0;
|
|
3343
3341
|
return /* @__PURE__ */ t("div", { className: he.groupRow, children: [
|
|
3344
3342
|
/* @__PURE__ */ e(
|
|
3345
3343
|
"span",
|
|
@@ -3360,14 +3358,14 @@ function oa() {
|
|
|
3360
3358
|
onClick: (Y) => Y.stopPropagation(),
|
|
3361
3359
|
children: [
|
|
3362
3360
|
/* @__PURE__ */ e(oe, { title: "编辑", children: /* @__PURE__ */ e(
|
|
3363
|
-
|
|
3361
|
+
ot,
|
|
3364
3362
|
{
|
|
3365
3363
|
className: he.actIcon,
|
|
3366
3364
|
onClick: () => h(a)
|
|
3367
3365
|
}
|
|
3368
3366
|
) }),
|
|
3369
3367
|
/* @__PURE__ */ e(
|
|
3370
|
-
|
|
3368
|
+
Ne,
|
|
3371
3369
|
{
|
|
3372
3370
|
title: (a.questionCount ?? 0) > 0 ? `节点内有 ${a.questionCount} 道题,无法删除` : p > 0 ? `该分类下有 ${p} 个子节点,无法删除` : "确认删除该节点?",
|
|
3373
3371
|
okText: "删除",
|
|
@@ -3381,7 +3379,7 @@ function oa() {
|
|
|
3381
3379
|
}
|
|
3382
3380
|
},
|
|
3383
3381
|
children: /* @__PURE__ */ e(
|
|
3384
|
-
|
|
3382
|
+
Ke,
|
|
3385
3383
|
{
|
|
3386
3384
|
className: R ? he.actIconDisabled : he.actIcon
|
|
3387
3385
|
}
|
|
@@ -3407,10 +3405,10 @@ function oa() {
|
|
|
3407
3405
|
}
|
|
3408
3406
|
A(!0);
|
|
3409
3407
|
try {
|
|
3410
|
-
await
|
|
3408
|
+
await ft(
|
|
3411
3409
|
{ ...E, name: E.name.trim() },
|
|
3412
3410
|
l
|
|
3413
|
-
), P.success("保存成功"), B(!1),
|
|
3411
|
+
), P.success("保存成功"), B(!1), z(null), j();
|
|
3414
3412
|
} catch {
|
|
3415
3413
|
} finally {
|
|
3416
3414
|
A(!1);
|
|
@@ -3428,7 +3426,7 @@ function oa() {
|
|
|
3428
3426
|
dataIndex: "type",
|
|
3429
3427
|
width: 72,
|
|
3430
3428
|
render: (a) => {
|
|
3431
|
-
const p =
|
|
3429
|
+
const p = Me[a] ?? { label: a, color: "default" };
|
|
3432
3430
|
return /* @__PURE__ */ e(H, { color: p.color, children: p.label });
|
|
3433
3431
|
}
|
|
3434
3432
|
},
|
|
@@ -3465,7 +3463,7 @@ function oa() {
|
|
|
3465
3463
|
Z ? ` · 选中「${Z.name}」 ${u.length} 题` : " · 点击左侧节点查看题目"
|
|
3466
3464
|
] })
|
|
3467
3465
|
] }),
|
|
3468
|
-
/* @__PURE__ */ e("div", { className: r.pageActions, children: /* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
3466
|
+
/* @__PURE__ */ e("div", { className: r.pageActions, children: /* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void j(), children: "刷新" }) })
|
|
3469
3467
|
] }),
|
|
3470
3468
|
/* @__PURE__ */ t("div", { className: he.gBody, children: [
|
|
3471
3469
|
/* @__PURE__ */ t("div", { className: he.gTree, children: [
|
|
@@ -3481,14 +3479,14 @@ function oa() {
|
|
|
3481
3479
|
type: "text",
|
|
3482
3480
|
size: "small",
|
|
3483
3481
|
icon: /* @__PURE__ */ e(xe, {}),
|
|
3484
|
-
onClick: () =>
|
|
3482
|
+
onClick: () => F((Z == null ? void 0 : Z.id) ?? null)
|
|
3485
3483
|
}
|
|
3486
3484
|
)
|
|
3487
3485
|
}
|
|
3488
3486
|
)
|
|
3489
3487
|
] }),
|
|
3490
|
-
/* @__PURE__ */ e("div", { className: he.gTreeScroll, children: k ? /* @__PURE__ */ e("div", { style: { padding: 48, textAlign: "center" }, children: /* @__PURE__ */ e(
|
|
3491
|
-
|
|
3488
|
+
/* @__PURE__ */ e("div", { className: he.gTreeScroll, children: k ? /* @__PURE__ */ e("div", { style: { padding: 48, textAlign: "center" }, children: /* @__PURE__ */ e(Ze, {}) }) : J.length === 0 ? /* @__PURE__ */ e(
|
|
3489
|
+
He,
|
|
3492
3490
|
{
|
|
3493
3491
|
className: he.groupEmpty,
|
|
3494
3492
|
description: "暂无组别,点击上方「+」创建"
|
|
@@ -3500,11 +3498,11 @@ function oa() {
|
|
|
3500
3498
|
draggable: !0,
|
|
3501
3499
|
showLine: { showLeafIcon: !1 },
|
|
3502
3500
|
showIcon: !0,
|
|
3503
|
-
icon: /* @__PURE__ */ e(
|
|
3501
|
+
icon: /* @__PURE__ */ e(We, {}),
|
|
3504
3502
|
expandedKeys: C,
|
|
3505
3503
|
onExpand: (a) => T(a),
|
|
3506
3504
|
selectedKeys: I != null ? [I] : [],
|
|
3507
|
-
onSelect: (a) =>
|
|
3505
|
+
onSelect: (a) => G(a.length ? a[0] : null),
|
|
3508
3506
|
treeData: N,
|
|
3509
3507
|
onDrop: w
|
|
3510
3508
|
}
|
|
@@ -3520,7 +3518,7 @@ function oa() {
|
|
|
3520
3518
|
] })
|
|
3521
3519
|
] }),
|
|
3522
3520
|
/* @__PURE__ */ e(
|
|
3523
|
-
|
|
3521
|
+
_e,
|
|
3524
3522
|
{
|
|
3525
3523
|
rows: u,
|
|
3526
3524
|
rowKey: "id",
|
|
@@ -3532,10 +3530,10 @@ function oa() {
|
|
|
3532
3530
|
}
|
|
3533
3531
|
)
|
|
3534
3532
|
] }) : /* @__PURE__ */ e(
|
|
3535
|
-
|
|
3533
|
+
He,
|
|
3536
3534
|
{
|
|
3537
3535
|
style: { marginTop: 96 },
|
|
3538
|
-
image:
|
|
3536
|
+
image: He.PRESENTED_IMAGE_SIMPLE,
|
|
3539
3537
|
description: "点击左侧组别节点,查看该组别下的题目"
|
|
3540
3538
|
}
|
|
3541
3539
|
) }) })
|
|
@@ -3551,7 +3549,7 @@ function oa() {
|
|
|
3551
3549
|
cancelText: "取消",
|
|
3552
3550
|
onOk: () => void S(),
|
|
3553
3551
|
onCancel: () => {
|
|
3554
|
-
B(!1),
|
|
3552
|
+
B(!1), z(null);
|
|
3555
3553
|
},
|
|
3556
3554
|
children: E ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
3557
3555
|
/* @__PURE__ */ t("div", { children: [
|
|
@@ -3561,19 +3559,19 @@ function oa() {
|
|
|
3561
3559
|
{
|
|
3562
3560
|
value: E.name,
|
|
3563
3561
|
placeholder: "如:安全合规 / 研发规范 / 新人培训",
|
|
3564
|
-
onChange: (a) =>
|
|
3562
|
+
onChange: (a) => z((p) => p && { ...p, name: a.target.value })
|
|
3565
3563
|
}
|
|
3566
3564
|
)
|
|
3567
3565
|
] }),
|
|
3568
3566
|
/* @__PURE__ */ t("div", { children: [
|
|
3569
3567
|
/* @__PURE__ */ e("div", { style: { marginBottom: 4 }, children: "父节点" }),
|
|
3570
3568
|
/* @__PURE__ */ e(
|
|
3571
|
-
|
|
3569
|
+
Xe,
|
|
3572
3570
|
{
|
|
3573
3571
|
allowClear: !0,
|
|
3574
3572
|
style: { width: "100%" },
|
|
3575
3573
|
value: E.parentId ?? void 0,
|
|
3576
|
-
onChange: (a) =>
|
|
3574
|
+
onChange: (a) => z((p) => p && { ...p, parentId: a ?? null }),
|
|
3577
3575
|
treeData: m,
|
|
3578
3576
|
treeDefaultExpandAll: !0,
|
|
3579
3577
|
placeholder: "不选=根节点"
|
|
@@ -3587,7 +3585,7 @@ function oa() {
|
|
|
3587
3585
|
{
|
|
3588
3586
|
rows: 2,
|
|
3589
3587
|
value: E.description ?? "",
|
|
3590
|
-
onChange: (a) =>
|
|
3588
|
+
onChange: (a) => z(
|
|
3591
3589
|
(p) => p && { ...p, description: a.target.value }
|
|
3592
3590
|
)
|
|
3593
3591
|
}
|
|
@@ -3598,15 +3596,15 @@ function oa() {
|
|
|
3598
3596
|
)
|
|
3599
3597
|
] });
|
|
3600
3598
|
}
|
|
3601
|
-
const
|
|
3599
|
+
const tt = {
|
|
3602
3600
|
STAIRS: { label: "爬楼梯", color: "blue" },
|
|
3603
3601
|
MAP: { label: "地图", color: "purple" }
|
|
3604
|
-
},
|
|
3602
|
+
}, lt = {
|
|
3605
3603
|
SEQUENTIAL: { label: "顺序解锁", color: "geekblue" },
|
|
3606
3604
|
STAGE: { label: "阶段解锁", color: "cyan" },
|
|
3607
3605
|
FREE: { label: "自由解锁", color: "green" }
|
|
3608
3606
|
};
|
|
3609
|
-
function
|
|
3607
|
+
function kt(l) {
|
|
3610
3608
|
if (!l) return 0;
|
|
3611
3609
|
try {
|
|
3612
3610
|
const n = JSON.parse(l);
|
|
@@ -3616,7 +3614,7 @@ function _t(l) {
|
|
|
3616
3614
|
}
|
|
3617
3615
|
}
|
|
3618
3616
|
function sa() {
|
|
3619
|
-
const l = Ce((N) => N.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E,
|
|
3617
|
+
const l = Ce((N) => N.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E, z] = o(null), [c, A] = o(!1), [C, T] = o(!1), [I, G] = o(null), [u, v] = o([]), [_, y] = o([]), [j, J] = o([]), [Z, O] = o([]), w = de(async () => {
|
|
3620
3618
|
L(!0);
|
|
3621
3619
|
try {
|
|
3622
3620
|
D(await Dl(x, E, l));
|
|
@@ -3628,7 +3626,7 @@ function sa() {
|
|
|
3628
3626
|
ce(() => {
|
|
3629
3627
|
w();
|
|
3630
3628
|
}, [w]);
|
|
3631
|
-
const
|
|
3629
|
+
const F = async (N) => {
|
|
3632
3630
|
let S = N ? { ...N } : {
|
|
3633
3631
|
title: "",
|
|
3634
3632
|
renderTemplate: "STAIRS",
|
|
@@ -3650,9 +3648,9 @@ function sa() {
|
|
|
3650
3648
|
} catch {
|
|
3651
3649
|
a = [];
|
|
3652
3650
|
}
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3651
|
+
G(S), v(i), y(a), A(!0), Promise.all([
|
|
3652
|
+
Mt("", 1, l),
|
|
3653
|
+
dt("", l)
|
|
3656
3654
|
]).then(([p, R]) => {
|
|
3657
3655
|
J(p), O(R);
|
|
3658
3656
|
}).catch(() => {
|
|
@@ -3660,7 +3658,7 @@ function sa() {
|
|
|
3660
3658
|
}, h = (N, S) => {
|
|
3661
3659
|
v((i) => {
|
|
3662
3660
|
const a = [...i], p = N + S;
|
|
3663
|
-
return p < 0 || p >= a.length ? i : ([a[N], a[p]] = [a[p], a[N]], a.map((R,
|
|
3661
|
+
return p < 0 || p >= a.length ? i : ([a[N], a[p]] = [a[p], a[N]], a.map((R, U) => ({ ...R, sortOrder: U })));
|
|
3664
3662
|
});
|
|
3665
3663
|
}, m = () => {
|
|
3666
3664
|
v((N) => [
|
|
@@ -3688,7 +3686,7 @@ function sa() {
|
|
|
3688
3686
|
}
|
|
3689
3687
|
T(!0);
|
|
3690
3688
|
try {
|
|
3691
|
-
await
|
|
3689
|
+
await wt(
|
|
3692
3690
|
{
|
|
3693
3691
|
...I,
|
|
3694
3692
|
title: I.title.trim(),
|
|
@@ -3700,7 +3698,7 @@ function sa() {
|
|
|
3700
3698
|
}))
|
|
3701
3699
|
},
|
|
3702
3700
|
l
|
|
3703
|
-
), P.success("保存成功"), A(!1),
|
|
3701
|
+
), P.success("保存成功"), A(!1), G(null), w();
|
|
3704
3702
|
} catch {
|
|
3705
3703
|
} finally {
|
|
3706
3704
|
T(!1);
|
|
@@ -3713,7 +3711,7 @@ function sa() {
|
|
|
3713
3711
|
dataIndex: "title",
|
|
3714
3712
|
width: 260,
|
|
3715
3713
|
render: (N, S) => {
|
|
3716
|
-
const i =
|
|
3714
|
+
const i = tt[S.renderTemplate] ?? tt.STAIRS, a = lt[S.unlockRule ?? ""] ?? lt.SEQUENTIAL;
|
|
3717
3715
|
return /* @__PURE__ */ t("div", { className: r.nameCell, children: [
|
|
3718
3716
|
/* @__PURE__ */ t("div", { children: [
|
|
3719
3717
|
N,
|
|
@@ -3725,7 +3723,7 @@ function sa() {
|
|
|
3725
3723
|
/* @__PURE__ */ t("div", { className: r.descCell, children: [
|
|
3726
3724
|
S.courseCount ?? 0,
|
|
3727
3725
|
" 门课程",
|
|
3728
|
-
|
|
3726
|
+
kt(S.rewardIds) > 0 ? ` · 完成发奖 ${kt(S.rewardIds)} 项` : ""
|
|
3729
3727
|
] })
|
|
3730
3728
|
] });
|
|
3731
3729
|
}
|
|
@@ -3752,7 +3750,7 @@ function sa() {
|
|
|
3752
3750
|
{
|
|
3753
3751
|
type: "link",
|
|
3754
3752
|
size: "small",
|
|
3755
|
-
onClick: () => void
|
|
3753
|
+
onClick: () => void F(S),
|
|
3756
3754
|
children: "编辑"
|
|
3757
3755
|
}
|
|
3758
3756
|
),
|
|
@@ -3763,7 +3761,7 @@ function sa() {
|
|
|
3763
3761
|
size: "small",
|
|
3764
3762
|
onClick: async () => {
|
|
3765
3763
|
try {
|
|
3766
|
-
await
|
|
3764
|
+
await wt(
|
|
3767
3765
|
// 后端 savePath 要求 title/renderTemplate 非空,状态切换需携全量字段
|
|
3768
3766
|
{ ...S, status: S.status === 1 ? 2 : 1 },
|
|
3769
3767
|
l
|
|
@@ -3775,7 +3773,7 @@ function sa() {
|
|
|
3775
3773
|
}
|
|
3776
3774
|
),
|
|
3777
3775
|
/* @__PURE__ */ e(
|
|
3778
|
-
|
|
3776
|
+
Ne,
|
|
3779
3777
|
{
|
|
3780
3778
|
title: (S.joinCount ?? 0) > 0 ? `已有 ${S.joinCount} 名学员加入该路径,无法删除(可下线)` : "确认删除该路径?",
|
|
3781
3779
|
okText: "删除",
|
|
@@ -3794,8 +3792,8 @@ function sa() {
|
|
|
3794
3792
|
type: "link",
|
|
3795
3793
|
size: "small",
|
|
3796
3794
|
danger: !0,
|
|
3797
|
-
|
|
3798
|
-
|
|
3795
|
+
disabled: (S.joinCount ?? 0) > 0,
|
|
3796
|
+
children: "删除"
|
|
3799
3797
|
}
|
|
3800
3798
|
)
|
|
3801
3799
|
}
|
|
@@ -3832,7 +3830,7 @@ function sa() {
|
|
|
3832
3830
|
placeholder: "状态",
|
|
3833
3831
|
style: { width: 110 },
|
|
3834
3832
|
value: E ?? void 0,
|
|
3835
|
-
onChange: (N) =>
|
|
3833
|
+
onChange: (N) => z(N ?? null),
|
|
3836
3834
|
options: [
|
|
3837
3835
|
{ value: 0, label: "草稿" },
|
|
3838
3836
|
{ value: 1, label: "上线" },
|
|
@@ -3840,20 +3838,20 @@ function sa() {
|
|
|
3840
3838
|
]
|
|
3841
3839
|
}
|
|
3842
3840
|
),
|
|
3843
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
3841
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void w(), children: "刷新" }),
|
|
3844
3842
|
/* @__PURE__ */ e(
|
|
3845
3843
|
M,
|
|
3846
3844
|
{
|
|
3847
3845
|
type: "primary",
|
|
3848
3846
|
icon: /* @__PURE__ */ e(xe, {}),
|
|
3849
|
-
onClick: () => void
|
|
3847
|
+
onClick: () => void F(),
|
|
3850
3848
|
children: "新建路径"
|
|
3851
3849
|
}
|
|
3852
3850
|
)
|
|
3853
3851
|
] })
|
|
3854
3852
|
] }),
|
|
3855
3853
|
/* @__PURE__ */ e("div", { className: r.tableCard, children: /* @__PURE__ */ e("div", { className: r.tableWrap, children: /* @__PURE__ */ e(
|
|
3856
|
-
|
|
3854
|
+
_e,
|
|
3857
3855
|
{
|
|
3858
3856
|
rows: n,
|
|
3859
3857
|
rowKey: "id",
|
|
@@ -3876,7 +3874,7 @@ function sa() {
|
|
|
3876
3874
|
cancelText: "取消",
|
|
3877
3875
|
onOk: () => void ee(),
|
|
3878
3876
|
onCancel: () => {
|
|
3879
|
-
A(!1),
|
|
3877
|
+
A(!1), G(null);
|
|
3880
3878
|
},
|
|
3881
3879
|
children: I ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
3882
3880
|
/* @__PURE__ */ t("div", { style: { display: "flex", gap: 12 }, children: [
|
|
@@ -3887,7 +3885,7 @@ function sa() {
|
|
|
3887
3885
|
{
|
|
3888
3886
|
value: I.title,
|
|
3889
3887
|
placeholder: "如:新员工 90 天成长计划",
|
|
3890
|
-
onChange: (N) =>
|
|
3888
|
+
onChange: (N) => G((S) => S && { ...S, title: N.target.value })
|
|
3891
3889
|
}
|
|
3892
3890
|
)
|
|
3893
3891
|
] }),
|
|
@@ -3898,7 +3896,7 @@ function sa() {
|
|
|
3898
3896
|
{
|
|
3899
3897
|
style: { width: "100%" },
|
|
3900
3898
|
value: I.status ?? 0,
|
|
3901
|
-
onChange: (N) =>
|
|
3899
|
+
onChange: (N) => G((S) => S && { ...S, status: N }),
|
|
3902
3900
|
options: [
|
|
3903
3901
|
{ value: 0, label: "草稿" },
|
|
3904
3902
|
{ value: 1, label: "上线" },
|
|
@@ -3916,8 +3914,8 @@ function sa() {
|
|
|
3916
3914
|
{
|
|
3917
3915
|
style: { width: "100%" },
|
|
3918
3916
|
value: I.renderTemplate,
|
|
3919
|
-
onChange: (N) =>
|
|
3920
|
-
options: Object.entries(
|
|
3917
|
+
onChange: (N) => G((S) => S && { ...S, renderTemplate: N }),
|
|
3918
|
+
options: Object.entries(tt).map(([N, S]) => ({
|
|
3921
3919
|
value: N,
|
|
3922
3920
|
label: S.label
|
|
3923
3921
|
}))
|
|
@@ -3931,8 +3929,8 @@ function sa() {
|
|
|
3931
3929
|
{
|
|
3932
3930
|
style: { width: "100%" },
|
|
3933
3931
|
value: I.unlockRule ?? "SEQUENTIAL",
|
|
3934
|
-
onChange: (N) =>
|
|
3935
|
-
options: Object.entries(
|
|
3932
|
+
onChange: (N) => G((S) => S && { ...S, unlockRule: N }),
|
|
3933
|
+
options: Object.entries(lt).map(([N, S]) => ({
|
|
3936
3934
|
value: N,
|
|
3937
3935
|
label: S.label
|
|
3938
3936
|
}))
|
|
@@ -3945,7 +3943,7 @@ function sa() {
|
|
|
3945
3943
|
K,
|
|
3946
3944
|
{
|
|
3947
3945
|
value: I.coverUrl ?? "",
|
|
3948
|
-
onChange: (N) =>
|
|
3946
|
+
onChange: (N) => G(
|
|
3949
3947
|
(S) => S && { ...S, coverUrl: N.target.value }
|
|
3950
3948
|
)
|
|
3951
3949
|
}
|
|
@@ -3961,7 +3959,7 @@ function sa() {
|
|
|
3961
3959
|
rows: 2,
|
|
3962
3960
|
value: I.description ?? "",
|
|
3963
3961
|
placeholder: "学员在路径总览看到的介绍",
|
|
3964
|
-
onChange: (N) =>
|
|
3962
|
+
onChange: (N) => G(
|
|
3965
3963
|
(S) => S && { ...S, description: N.target.value }
|
|
3966
3964
|
)
|
|
3967
3965
|
}
|
|
@@ -4013,7 +4011,7 @@ function sa() {
|
|
|
4013
4011
|
}
|
|
4014
4012
|
),
|
|
4015
4013
|
/* @__PURE__ */ e(oe, { title: "阶段号(阶段解锁模式用,从 1 开始)", children: /* @__PURE__ */ e(
|
|
4016
|
-
|
|
4014
|
+
ze,
|
|
4017
4015
|
{
|
|
4018
4016
|
min: 1,
|
|
4019
4017
|
max: 9,
|
|
@@ -4030,7 +4028,7 @@ function sa() {
|
|
|
4030
4028
|
M,
|
|
4031
4029
|
{
|
|
4032
4030
|
size: "small",
|
|
4033
|
-
icon: /* @__PURE__ */ e(
|
|
4031
|
+
icon: /* @__PURE__ */ e(_t, {}),
|
|
4034
4032
|
disabled: S === 0,
|
|
4035
4033
|
onClick: () => h(S, -1)
|
|
4036
4034
|
}
|
|
@@ -4039,7 +4037,7 @@ function sa() {
|
|
|
4039
4037
|
M,
|
|
4040
4038
|
{
|
|
4041
4039
|
size: "small",
|
|
4042
|
-
icon: /* @__PURE__ */ e(
|
|
4040
|
+
icon: /* @__PURE__ */ e(At, {}),
|
|
4043
4041
|
disabled: S === u.length - 1,
|
|
4044
4042
|
onClick: () => h(S, 1)
|
|
4045
4043
|
}
|
|
@@ -4049,7 +4047,7 @@ function sa() {
|
|
|
4049
4047
|
{
|
|
4050
4048
|
size: "small",
|
|
4051
4049
|
danger: !0,
|
|
4052
|
-
icon: /* @__PURE__ */ e(
|
|
4050
|
+
icon: /* @__PURE__ */ e(Ke, {}),
|
|
4053
4051
|
onClick: () => v(
|
|
4054
4052
|
(i) => i.filter((a) => a._key !== N._key)
|
|
4055
4053
|
)
|
|
@@ -4077,10 +4075,10 @@ function sa() {
|
|
|
4077
4075
|
)
|
|
4078
4076
|
] });
|
|
4079
4077
|
}
|
|
4080
|
-
const
|
|
4078
|
+
const Qe = {
|
|
4081
4079
|
BADGE: { label: "徽章", color: "gold" },
|
|
4082
4080
|
RESOURCE_PACK: { label: "资源包", color: "cyan" }
|
|
4083
|
-
},
|
|
4081
|
+
}, nt = {
|
|
4084
4082
|
0: { label: "未兑换", color: "default" },
|
|
4085
4083
|
1: { label: "申请中", color: "processing" },
|
|
4086
4084
|
2: { label: "已兑换", color: "success" }
|
|
@@ -4092,7 +4090,7 @@ function ca() {
|
|
|
4092
4090
|
const [l, n] = o("rewards");
|
|
4093
4091
|
return /* @__PURE__ */ t("div", { className: r.scenarioPage, children: [
|
|
4094
4092
|
/* @__PURE__ */ e(
|
|
4095
|
-
|
|
4093
|
+
Pt,
|
|
4096
4094
|
{
|
|
4097
4095
|
activeKey: l,
|
|
4098
4096
|
onChange: n,
|
|
@@ -4108,10 +4106,10 @@ function ca() {
|
|
|
4108
4106
|
] });
|
|
4109
4107
|
}
|
|
4110
4108
|
function ua() {
|
|
4111
|
-
const l = Ce((v) => v.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E,
|
|
4109
|
+
const l = Ce((v) => v.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E, z] = o(!1), [c, A] = o(null), [C, T] = o(!1), I = de(async () => {
|
|
4112
4110
|
L(!0);
|
|
4113
4111
|
try {
|
|
4114
|
-
D(await
|
|
4112
|
+
D(await dt(x, l));
|
|
4115
4113
|
} catch {
|
|
4116
4114
|
} finally {
|
|
4117
4115
|
L(!1);
|
|
@@ -4120,7 +4118,7 @@ function ua() {
|
|
|
4120
4118
|
ce(() => {
|
|
4121
4119
|
I();
|
|
4122
4120
|
}, [I]);
|
|
4123
|
-
const
|
|
4121
|
+
const G = async () => {
|
|
4124
4122
|
if (c) {
|
|
4125
4123
|
if (!c.name.trim()) {
|
|
4126
4124
|
P.warning("请填写奖励名称");
|
|
@@ -4128,7 +4126,7 @@ function ua() {
|
|
|
4128
4126
|
}
|
|
4129
4127
|
T(!0);
|
|
4130
4128
|
try {
|
|
4131
|
-
await Ol(c, l), P.success("保存成功"),
|
|
4129
|
+
await Ol(c, l), P.success("保存成功"), z(!1), A(null), I();
|
|
4132
4130
|
} catch {
|
|
4133
4131
|
} finally {
|
|
4134
4132
|
T(!1);
|
|
@@ -4165,7 +4163,7 @@ function ua() {
|
|
|
4165
4163
|
dataIndex: "type",
|
|
4166
4164
|
width: 76,
|
|
4167
4165
|
render: (v) => {
|
|
4168
|
-
const _ =
|
|
4166
|
+
const _ = Qe[v] ?? Qe.BADGE;
|
|
4169
4167
|
return /* @__PURE__ */ e(H, { color: _.color, children: _.label });
|
|
4170
4168
|
}
|
|
4171
4169
|
},
|
|
@@ -4197,14 +4195,14 @@ function ua() {
|
|
|
4197
4195
|
{
|
|
4198
4196
|
type: "link",
|
|
4199
4197
|
size: "small",
|
|
4200
|
-
icon: /* @__PURE__ */ e(Ve, {}),
|
|
4201
4198
|
onClick: () => {
|
|
4202
|
-
A({ ..._ }),
|
|
4203
|
-
}
|
|
4199
|
+
A({ ..._ }), z(!0);
|
|
4200
|
+
},
|
|
4201
|
+
children: "编辑"
|
|
4204
4202
|
}
|
|
4205
4203
|
) }),
|
|
4206
4204
|
/* @__PURE__ */ e(
|
|
4207
|
-
|
|
4205
|
+
Ne,
|
|
4208
4206
|
{
|
|
4209
4207
|
title: (_.grantedCount ?? 0) > 0 ? `该奖励已发放 ${_.grantedCount} 次,无法删除(可停用)` : "确认删除该奖励?",
|
|
4210
4208
|
okText: "删除",
|
|
@@ -4223,8 +4221,8 @@ function ua() {
|
|
|
4223
4221
|
type: "link",
|
|
4224
4222
|
size: "small",
|
|
4225
4223
|
danger: !0,
|
|
4226
|
-
|
|
4227
|
-
|
|
4224
|
+
disabled: (_.grantedCount ?? 0) > 0,
|
|
4225
|
+
children: "删除"
|
|
4228
4226
|
}
|
|
4229
4227
|
)
|
|
4230
4228
|
}
|
|
@@ -4254,14 +4252,14 @@ function ua() {
|
|
|
4254
4252
|
onChange: (v) => B(v.target.value)
|
|
4255
4253
|
}
|
|
4256
4254
|
),
|
|
4257
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
4255
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void I(), children: "刷新" }),
|
|
4258
4256
|
/* @__PURE__ */ e(
|
|
4259
4257
|
M,
|
|
4260
4258
|
{
|
|
4261
4259
|
type: "primary",
|
|
4262
4260
|
icon: /* @__PURE__ */ e(xe, {}),
|
|
4263
4261
|
onClick: () => {
|
|
4264
|
-
A({ name: "", type: "BADGE", status: 1, stock: null }),
|
|
4262
|
+
A({ name: "", type: "BADGE", status: 1, stock: null }), z(!0);
|
|
4265
4263
|
},
|
|
4266
4264
|
children: "新建奖励"
|
|
4267
4265
|
}
|
|
@@ -4269,7 +4267,7 @@ function ua() {
|
|
|
4269
4267
|
] })
|
|
4270
4268
|
] }),
|
|
4271
4269
|
/* @__PURE__ */ e("div", { className: r.tableCard, children: /* @__PURE__ */ e("div", { className: r.tableWrap, children: /* @__PURE__ */ e(
|
|
4272
|
-
|
|
4270
|
+
Pe,
|
|
4273
4271
|
{
|
|
4274
4272
|
rowKey: "id",
|
|
4275
4273
|
tableLayout: "fixed",
|
|
@@ -4290,9 +4288,9 @@ function ua() {
|
|
|
4290
4288
|
confirmLoading: C,
|
|
4291
4289
|
okText: "保存",
|
|
4292
4290
|
cancelText: "取消",
|
|
4293
|
-
onOk: () => void
|
|
4291
|
+
onOk: () => void G(),
|
|
4294
4292
|
onCancel: () => {
|
|
4295
|
-
|
|
4293
|
+
z(!1), A(null);
|
|
4296
4294
|
},
|
|
4297
4295
|
children: c ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
4298
4296
|
/* @__PURE__ */ t("div", { style: { display: "flex", gap: 12 }, children: [
|
|
@@ -4315,7 +4313,7 @@ function ua() {
|
|
|
4315
4313
|
style: { width: "100%" },
|
|
4316
4314
|
value: c.type,
|
|
4317
4315
|
onChange: (v) => A((_) => _ && { ..._, type: v }),
|
|
4318
|
-
options: Object.entries(
|
|
4316
|
+
options: Object.entries(Qe).map(
|
|
4319
4317
|
([v, _]) => ({
|
|
4320
4318
|
value: v,
|
|
4321
4319
|
label: _.label
|
|
@@ -4366,7 +4364,7 @@ function ua() {
|
|
|
4366
4364
|
/* @__PURE__ */ t("div", { children: [
|
|
4367
4365
|
/* @__PURE__ */ e("div", { style: { marginBottom: 4 }, children: "库存(空=不限)" }),
|
|
4368
4366
|
/* @__PURE__ */ e(
|
|
4369
|
-
|
|
4367
|
+
ze,
|
|
4370
4368
|
{
|
|
4371
4369
|
min: 0,
|
|
4372
4370
|
value: c.stock ?? void 0,
|
|
@@ -4385,7 +4383,7 @@ function ua() {
|
|
|
4385
4383
|
},
|
|
4386
4384
|
children: [
|
|
4387
4385
|
/* @__PURE__ */ e(
|
|
4388
|
-
|
|
4386
|
+
Ot,
|
|
4389
4387
|
{
|
|
4390
4388
|
checked: c.status === 1,
|
|
4391
4389
|
onChange: (v) => A((_) => _ && { ..._, status: v ? 1 : 0 })
|
|
@@ -4402,7 +4400,7 @@ function ua() {
|
|
|
4402
4400
|
] });
|
|
4403
4401
|
}
|
|
4404
4402
|
function ha() {
|
|
4405
|
-
const l = Ce((C) => C.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E,
|
|
4403
|
+
const l = Ce((C) => C.token), [n, D] = o([]), [k, L] = o(!1), [x, B] = o(""), [E, z] = o(null), c = de(async () => {
|
|
4406
4404
|
L(!0);
|
|
4407
4405
|
try {
|
|
4408
4406
|
D(await $l(E, x, l));
|
|
@@ -4430,7 +4428,7 @@ function ha() {
|
|
|
4430
4428
|
dataIndex: "rewardName",
|
|
4431
4429
|
width: 220,
|
|
4432
4430
|
render: (C, T) => {
|
|
4433
|
-
var I,
|
|
4431
|
+
var I, G;
|
|
4434
4432
|
return /* @__PURE__ */ e("div", { className: r.nameCell, children: /* @__PURE__ */ t("div", { children: [
|
|
4435
4433
|
T.rewardIcon ? /* @__PURE__ */ e(
|
|
4436
4434
|
"img",
|
|
@@ -4447,7 +4445,7 @@ function ha() {
|
|
|
4447
4445
|
) : null,
|
|
4448
4446
|
C ?? "-",
|
|
4449
4447
|
" ",
|
|
4450
|
-
/* @__PURE__ */ e(H, { color: (I =
|
|
4448
|
+
/* @__PURE__ */ e(H, { color: (I = Qe[T.rewardType ?? "BADGE"]) == null ? void 0 : I.color, children: (G = Qe[T.rewardType ?? "BADGE"]) == null ? void 0 : G.label })
|
|
4451
4449
|
] }) });
|
|
4452
4450
|
}
|
|
4453
4451
|
},
|
|
@@ -4472,7 +4470,7 @@ function ha() {
|
|
|
4472
4470
|
dataIndex: "redeemStatus",
|
|
4473
4471
|
width: 88,
|
|
4474
4472
|
render: (C) => {
|
|
4475
|
-
const T =
|
|
4473
|
+
const T = nt[C ?? 0] ?? nt[0];
|
|
4476
4474
|
return /* @__PURE__ */ e(H, { color: T.color, children: T.label });
|
|
4477
4475
|
}
|
|
4478
4476
|
},
|
|
@@ -4487,7 +4485,7 @@ function ha() {
|
|
|
4487
4485
|
key: "actions",
|
|
4488
4486
|
width: 96,
|
|
4489
4487
|
render: (C, T) => /* @__PURE__ */ e(
|
|
4490
|
-
|
|
4488
|
+
Ne,
|
|
4491
4489
|
{
|
|
4492
4490
|
title: "确认已完成兑换发放?",
|
|
4493
4491
|
okText: "确认兑换",
|
|
@@ -4533,18 +4531,18 @@ function ha() {
|
|
|
4533
4531
|
placeholder: "兑换状态",
|
|
4534
4532
|
style: { width: 130 },
|
|
4535
4533
|
value: E ?? void 0,
|
|
4536
|
-
onChange: (C) =>
|
|
4537
|
-
options: Object.entries(
|
|
4534
|
+
onChange: (C) => z(C ?? null),
|
|
4535
|
+
options: Object.entries(nt).map(([C, T]) => ({
|
|
4538
4536
|
value: Number(C),
|
|
4539
4537
|
label: T.label
|
|
4540
4538
|
}))
|
|
4541
4539
|
}
|
|
4542
4540
|
),
|
|
4543
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
4541
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void c(), children: "刷新" })
|
|
4544
4542
|
] })
|
|
4545
4543
|
] }),
|
|
4546
4544
|
/* @__PURE__ */ e("div", { className: r.tableCard, children: /* @__PURE__ */ e("div", { className: r.tableWrap, children: /* @__PURE__ */ e(
|
|
4547
|
-
|
|
4545
|
+
Pe,
|
|
4548
4546
|
{
|
|
4549
4547
|
rowKey: "id",
|
|
4550
4548
|
tableLayout: "fixed",
|
|
@@ -4602,7 +4600,7 @@ function me({
|
|
|
4602
4600
|
}
|
|
4603
4601
|
);
|
|
4604
4602
|
}
|
|
4605
|
-
function
|
|
4603
|
+
function at({ text: l, hint: n }) {
|
|
4606
4604
|
return /* @__PURE__ */ t(
|
|
4607
4605
|
"div",
|
|
4608
4606
|
{
|
|
@@ -4647,7 +4645,7 @@ function fa() {
|
|
|
4647
4645
|
ce(() => {
|
|
4648
4646
|
E(k);
|
|
4649
4647
|
}, [E, k]);
|
|
4650
|
-
const
|
|
4648
|
+
const z = `近 ${(n == null ? void 0 : n.days) ?? k} 天`, c = (y) => y && y > 0 ? `+${y} ${z}新增` : `无新增(${z})`, A = [
|
|
4651
4649
|
{ title: "课程", dataIndex: "courseTitle", width: 240, ellipsis: !0 },
|
|
4652
4650
|
{ title: "报名", dataIndex: "enrollCount", width: 64 },
|
|
4653
4651
|
{ title: "进行中", dataIndex: "doingCount", width: 64 },
|
|
@@ -4668,7 +4666,7 @@ function fa() {
|
|
|
4668
4666
|
title: "考试人次",
|
|
4669
4667
|
dataIndex: "examCount",
|
|
4670
4668
|
width: 88,
|
|
4671
|
-
render: (y) => /* @__PURE__ */ e("span", { title: `${
|
|
4669
|
+
render: (y) => /* @__PURE__ */ e("span", { title: `${z}内交卷`, children: y ?? 0 })
|
|
4672
4670
|
},
|
|
4673
4671
|
{
|
|
4674
4672
|
title: "及格率",
|
|
@@ -4726,7 +4724,7 @@ function fa() {
|
|
|
4726
4724
|
width: 100,
|
|
4727
4725
|
render: (y) => va(y ?? void 0)
|
|
4728
4726
|
}
|
|
4729
|
-
],
|
|
4727
|
+
], G = [
|
|
4730
4728
|
{ title: "分类", dataIndex: "category", width: 160, ellipsis: !0 },
|
|
4731
4729
|
{ title: "资料数", dataIndex: "materialCount", width: 80 }
|
|
4732
4730
|
], u = [
|
|
@@ -4766,17 +4764,17 @@ function fa() {
|
|
|
4766
4764
|
] }),
|
|
4767
4765
|
/* @__PURE__ */ t("div", { className: r.pageActions, children: [
|
|
4768
4766
|
/* @__PURE__ */ e(
|
|
4769
|
-
|
|
4767
|
+
$t,
|
|
4770
4768
|
{
|
|
4771
4769
|
options: ya,
|
|
4772
4770
|
value: k,
|
|
4773
4771
|
onChange: (y) => L(y)
|
|
4774
4772
|
}
|
|
4775
4773
|
),
|
|
4776
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
4774
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void E(k), children: "刷新" })
|
|
4777
4775
|
] })
|
|
4778
4776
|
] }),
|
|
4779
|
-
/* @__PURE__ */ e(
|
|
4777
|
+
/* @__PURE__ */ e(at, { text: "素材阶段", hint: "内容生产存量与新增" }),
|
|
4780
4778
|
/* @__PURE__ */ t("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: [
|
|
4781
4779
|
/* @__PURE__ */ e(
|
|
4782
4780
|
me,
|
|
@@ -4811,7 +4809,7 @@ function fa() {
|
|
|
4811
4809
|
}
|
|
4812
4810
|
)
|
|
4813
4811
|
] }),
|
|
4814
|
-
/* @__PURE__ */ e(
|
|
4812
|
+
/* @__PURE__ */ e(at, { text: "学习阶段", hint: "课程上线与学员参与" }),
|
|
4815
4813
|
/* @__PURE__ */ t("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: [
|
|
4816
4814
|
/* @__PURE__ */ e(
|
|
4817
4815
|
me,
|
|
@@ -4835,7 +4833,7 @@ function fa() {
|
|
|
4835
4833
|
{
|
|
4836
4834
|
label: "课程报名",
|
|
4837
4835
|
value: (n == null ? void 0 : n.enrollInRange) ?? 0,
|
|
4838
|
-
hint:
|
|
4836
|
+
hint: z
|
|
4839
4837
|
}
|
|
4840
4838
|
),
|
|
4841
4839
|
/* @__PURE__ */ e(
|
|
@@ -4843,7 +4841,7 @@ function fa() {
|
|
|
4843
4841
|
{
|
|
4844
4842
|
label: "课程完成",
|
|
4845
4843
|
value: (n == null ? void 0 : n.completeInRange) ?? 0,
|
|
4846
|
-
hint:
|
|
4844
|
+
hint: z
|
|
4847
4845
|
}
|
|
4848
4846
|
),
|
|
4849
4847
|
/* @__PURE__ */ e(
|
|
@@ -4851,11 +4849,11 @@ function fa() {
|
|
|
4851
4849
|
{
|
|
4852
4850
|
label: "活跃学员",
|
|
4853
4851
|
value: (n == null ? void 0 : n.activeLearnerCount) ?? 0,
|
|
4854
|
-
hint: `${
|
|
4852
|
+
hint: `${z}有学习行为`
|
|
4855
4853
|
}
|
|
4856
4854
|
)
|
|
4857
4855
|
] }),
|
|
4858
|
-
/* @__PURE__ */ e(
|
|
4856
|
+
/* @__PURE__ */ e(at, { text: "考试与激励阶段", hint: "检验效果与正向反馈" }),
|
|
4859
4857
|
/* @__PURE__ */ t("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: [
|
|
4860
4858
|
/* @__PURE__ */ e(me, { label: "累计考试人次", value: (n == null ? void 0 : n.examCount) ?? 0 }),
|
|
4861
4859
|
/* @__PURE__ */ e(
|
|
@@ -4863,7 +4861,7 @@ function fa() {
|
|
|
4863
4861
|
{
|
|
4864
4862
|
label: "考试人次",
|
|
4865
4863
|
value: (n == null ? void 0 : n.examInRange) ?? 0,
|
|
4866
|
-
hint: `${
|
|
4864
|
+
hint: `${z}交卷`
|
|
4867
4865
|
}
|
|
4868
4866
|
),
|
|
4869
4867
|
/* @__PURE__ */ e(
|
|
@@ -4871,7 +4869,7 @@ function fa() {
|
|
|
4871
4869
|
{
|
|
4872
4870
|
label: "考试通过",
|
|
4873
4871
|
value: (n == null ? void 0 : n.passInRange) ?? 0,
|
|
4874
|
-
hint:
|
|
4872
|
+
hint: z
|
|
4875
4873
|
}
|
|
4876
4874
|
),
|
|
4877
4875
|
/* @__PURE__ */ e(
|
|
@@ -4896,13 +4894,13 @@ function fa() {
|
|
|
4896
4894
|
{
|
|
4897
4895
|
label: "奖励发放",
|
|
4898
4896
|
value: (n == null ? void 0 : n.rewardGrantInRange) ?? 0,
|
|
4899
|
-
hint:
|
|
4897
|
+
hint: z
|
|
4900
4898
|
}
|
|
4901
4899
|
)
|
|
4902
4900
|
] }),
|
|
4903
4901
|
/* @__PURE__ */ e("div", { className: r.tableCard, style: { marginTop: 16 }, children: /* @__PURE__ */ t("div", { className: r.tableWrap, children: [
|
|
4904
4902
|
/* @__PURE__ */ t("div", { style: { fontWeight: 600, padding: "10px 0 4px" }, children: [
|
|
4905
|
-
|
|
4903
|
+
z,
|
|
4906
4904
|
"活跃趋势(报名 / 课程完成 / 考试)"
|
|
4907
4905
|
] }),
|
|
4908
4906
|
v.length === 0 ? /* @__PURE__ */ e("div", { className: r.mutedCell, style: { padding: "12px 0" }, children: "暂无趋势数据" }) : /* @__PURE__ */ e(
|
|
@@ -5015,11 +5013,11 @@ function fa() {
|
|
|
5015
5013
|
/* @__PURE__ */ e("div", { className: r.tableCard, style: { marginBottom: 12 }, children: /* @__PURE__ */ t("div", { className: r.tableWrap, children: [
|
|
5016
5014
|
/* @__PURE__ */ t("div", { style: { fontWeight: 600, padding: "10px 0 4px" }, children: [
|
|
5017
5015
|
"课程维度(完成率 / 及格率 / 平均分;考试人次为",
|
|
5018
|
-
|
|
5016
|
+
z,
|
|
5019
5017
|
"口径)"
|
|
5020
5018
|
] }),
|
|
5021
5019
|
/* @__PURE__ */ e(
|
|
5022
|
-
|
|
5020
|
+
Pe,
|
|
5023
5021
|
{
|
|
5024
5022
|
rowKey: "courseId",
|
|
5025
5023
|
tableLayout: "fixed",
|
|
@@ -5045,7 +5043,7 @@ function fa() {
|
|
|
5045
5043
|
/* @__PURE__ */ e("div", { className: r.tableCard, style: { flex: 1 }, children: /* @__PURE__ */ t("div", { className: r.tableWrap, children: [
|
|
5046
5044
|
/* @__PURE__ */ e("div", { style: { fontWeight: 600, padding: "10px 0 4px" }, children: "路径维度" }),
|
|
5047
5045
|
/* @__PURE__ */ e(
|
|
5048
|
-
|
|
5046
|
+
Pe,
|
|
5049
5047
|
{
|
|
5050
5048
|
rowKey: "pathId",
|
|
5051
5049
|
tableLayout: "fixed",
|
|
@@ -5061,7 +5059,7 @@ function fa() {
|
|
|
5061
5059
|
/* @__PURE__ */ e("div", { className: r.tableCard, style: { flex: 1.4 }, children: /* @__PURE__ */ t("div", { className: r.tableWrap, children: [
|
|
5062
5060
|
/* @__PURE__ */ e("div", { style: { fontWeight: 600, padding: "10px 0 4px" }, children: "题目错误率 Top(指导题库优化)" }),
|
|
5063
5061
|
/* @__PURE__ */ e(
|
|
5064
|
-
|
|
5062
|
+
Pe,
|
|
5065
5063
|
{
|
|
5066
5064
|
rowKey: "questionId",
|
|
5067
5065
|
tableLayout: "fixed",
|
|
@@ -5090,7 +5088,7 @@ function fa() {
|
|
|
5090
5088
|
/* @__PURE__ */ e("div", { className: r.tableCard, style: { flex: 1, minWidth: 320 }, children: /* @__PURE__ */ t("div", { className: r.tableWrap, children: [
|
|
5091
5089
|
/* @__PURE__ */ e("div", { style: { fontWeight: 600, padding: "10px 0 4px" }, children: "素材分布:视频标签" }),
|
|
5092
5090
|
/* @__PURE__ */ e(
|
|
5093
|
-
|
|
5091
|
+
Pe,
|
|
5094
5092
|
{
|
|
5095
5093
|
rowKey: "tag",
|
|
5096
5094
|
tableLayout: "fixed",
|
|
@@ -5106,13 +5104,13 @@ function fa() {
|
|
|
5106
5104
|
/* @__PURE__ */ e("div", { className: r.tableCard, style: { flex: 1, minWidth: 260 }, children: /* @__PURE__ */ t("div", { className: r.tableWrap, children: [
|
|
5107
5105
|
/* @__PURE__ */ e("div", { style: { fontWeight: 600, padding: "10px 0 4px" }, children: "素材分布:资料分类" }),
|
|
5108
5106
|
/* @__PURE__ */ e(
|
|
5109
|
-
|
|
5107
|
+
Pe,
|
|
5110
5108
|
{
|
|
5111
5109
|
rowKey: "category",
|
|
5112
5110
|
tableLayout: "fixed",
|
|
5113
5111
|
size: "small",
|
|
5114
5112
|
loading: x,
|
|
5115
|
-
columns:
|
|
5113
|
+
columns: G,
|
|
5116
5114
|
dataSource: (n == null ? void 0 : n.materialCategoryRows) ?? [],
|
|
5117
5115
|
pagination: !1,
|
|
5118
5116
|
locale: { emptyText: "暂无资料数据" }
|
|
@@ -5122,7 +5120,7 @@ function fa() {
|
|
|
5122
5120
|
/* @__PURE__ */ e("div", { className: r.tableCard, style: { flex: 1.2, minWidth: 360 }, children: /* @__PURE__ */ t("div", { className: r.tableWrap, children: [
|
|
5123
5121
|
/* @__PURE__ */ e("div", { style: { fontWeight: 600, padding: "10px 0 4px" }, children: "激励维度:奖励发放统计" }),
|
|
5124
5122
|
/* @__PURE__ */ e(
|
|
5125
|
-
|
|
5123
|
+
Pe,
|
|
5126
5124
|
{
|
|
5127
5125
|
rowKey: "rewardId",
|
|
5128
5126
|
tableLayout: "fixed",
|
|
@@ -5158,10 +5156,10 @@ const wa = "_vBody_p7fqp_3", Ca = "_vTree_p7fqp_12", ba = "_treeScroll_p7fqp_23"
|
|
|
5158
5156
|
groupIcon: La,
|
|
5159
5157
|
treeItemTitle: $a,
|
|
5160
5158
|
tableSide: Pa
|
|
5161
|
-
},
|
|
5159
|
+
}, St = {
|
|
5162
5160
|
UPLOAD: { label: "OSS直传", color: "blue" },
|
|
5163
5161
|
LINK: { label: "外链登记", color: "geekblue" }
|
|
5164
|
-
},
|
|
5162
|
+
}, Ye = "uncategorized";
|
|
5165
5163
|
function Oa(l) {
|
|
5166
5164
|
if (!l || l <= 0) return "-";
|
|
5167
5165
|
const n = Math.floor(l / 3600), D = Math.floor(l % 3600 / 60), k = Math.floor(l % 60), L = String(D).padStart(2, "0"), x = String(k).padStart(2, "0");
|
|
@@ -5182,12 +5180,12 @@ async function Ba(l) {
|
|
|
5182
5180
|
n.value = l, n.style.cssText = "position:fixed;opacity:0;", document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n), P.success("视频链接已复制,可贴入技术社区正文");
|
|
5183
5181
|
}
|
|
5184
5182
|
function Ma() {
|
|
5185
|
-
const l = Ce((d) => d.token), [n, D] = o([]), [k, L] = o([]), [x, B] = o(!1), [E,
|
|
5183
|
+
const l = Ce((d) => d.token), [n, D] = o([]), [k, L] = o([]), [x, B] = o(!1), [E, z] = o(""), [c, A] = o(!1), [C, T] = o(!1), [I, G] = o(!1), [u, v] = o(null), [_, y] = o(!1), [j, J] = o(""), [Z, O] = o(!1), [w, F] = o(null), [h, m] = o(/* @__PURE__ */ new Set()), ee = Bt(null), [Q, N] = o("all"), [S, i] = o(1), a = de(async () => {
|
|
5186
5184
|
B(!0);
|
|
5187
5185
|
try {
|
|
5188
5186
|
const [d, b] = await Promise.all([
|
|
5189
|
-
|
|
5190
|
-
|
|
5187
|
+
Ft("", "", l),
|
|
5188
|
+
Ct(l)
|
|
5191
5189
|
]);
|
|
5192
5190
|
D(d), L(b);
|
|
5193
5191
|
} catch {
|
|
@@ -5196,7 +5194,7 @@ function Ma() {
|
|
|
5196
5194
|
}
|
|
5197
5195
|
}, [l]), p = de(async () => {
|
|
5198
5196
|
try {
|
|
5199
|
-
L(await
|
|
5197
|
+
L(await Ct(l));
|
|
5200
5198
|
} catch {
|
|
5201
5199
|
}
|
|
5202
5200
|
}, [l]);
|
|
@@ -5206,8 +5204,8 @@ function Ma() {
|
|
|
5206
5204
|
const R = pe(() => {
|
|
5207
5205
|
const d = E.trim().toLowerCase();
|
|
5208
5206
|
return d ? n.filter((b) => b.title.toLowerCase().includes(d)) : n;
|
|
5209
|
-
}, [n, E]),
|
|
5210
|
-
if (Q ===
|
|
5207
|
+
}, [n, E]), U = pe(() => {
|
|
5208
|
+
if (Q === Ye)
|
|
5211
5209
|
return R.filter((d) => !(d.category ?? "").trim());
|
|
5212
5210
|
if (Q.startsWith("cat:")) {
|
|
5213
5211
|
const d = Q.slice(4);
|
|
@@ -5240,12 +5238,12 @@ function Ma() {
|
|
|
5240
5238
|
for (const V of k)
|
|
5241
5239
|
V.id == null && !$.has(V.name) && ($.add(V.name), f.push({ name: V.name, count: Y(V.name), children: [] }));
|
|
5242
5240
|
return f;
|
|
5243
|
-
}, [k, Y]),
|
|
5241
|
+
}, [k, Y]), Oe = (d) => {
|
|
5244
5242
|
m((b) => {
|
|
5245
5243
|
const f = new Set(b);
|
|
5246
5244
|
return f.has(d) ? f.delete(d) : f.add(d), f;
|
|
5247
5245
|
});
|
|
5248
|
-
},
|
|
5246
|
+
}, Ee = Q === "all" ? "" : Q === Ye ? "未分类" : `文件夹「${Q.slice(4)}」`;
|
|
5249
5247
|
ce(() => {
|
|
5250
5248
|
i(1);
|
|
5251
5249
|
}, [Q, E]);
|
|
@@ -5257,10 +5255,10 @@ function Ma() {
|
|
|
5257
5255
|
tags: [],
|
|
5258
5256
|
category: null
|
|
5259
5257
|
}), A(!0);
|
|
5260
|
-
},
|
|
5258
|
+
}, De = (d) => {
|
|
5261
5259
|
v({ ...d, tags: d.tags ?? [] }), A(!0);
|
|
5262
|
-
},
|
|
5263
|
-
|
|
5260
|
+
}, Fe = async (d) => {
|
|
5261
|
+
G(!0);
|
|
5264
5262
|
try {
|
|
5265
5263
|
const b = await zl(d, l);
|
|
5266
5264
|
v(
|
|
@@ -5273,9 +5271,9 @@ function Ma() {
|
|
|
5273
5271
|
), P.success("上传成功");
|
|
5274
5272
|
} catch {
|
|
5275
5273
|
} finally {
|
|
5276
|
-
|
|
5274
|
+
G(!1);
|
|
5277
5275
|
}
|
|
5278
|
-
},
|
|
5276
|
+
}, Re = async () => {
|
|
5279
5277
|
if (u) {
|
|
5280
5278
|
if (!u.title.trim()) {
|
|
5281
5279
|
P.warning("请填写视频标题");
|
|
@@ -5306,14 +5304,14 @@ function Ma() {
|
|
|
5306
5304
|
T(!1);
|
|
5307
5305
|
}
|
|
5308
5306
|
}
|
|
5309
|
-
},
|
|
5307
|
+
}, Be = async (d) => {
|
|
5310
5308
|
try {
|
|
5311
5309
|
await jl(d, l), P.success("已删除"), a();
|
|
5312
5310
|
} catch {
|
|
5313
5311
|
}
|
|
5314
|
-
},
|
|
5312
|
+
}, ke = () => {
|
|
5315
5313
|
const d = Q.startsWith("cat:") ? k.find((b) => b.name === Q.slice(4) && b.id != null) ?? null : null;
|
|
5316
|
-
|
|
5314
|
+
F(d), J(""), y(!0);
|
|
5317
5315
|
}, Ge = async () => {
|
|
5318
5316
|
const d = j.trim();
|
|
5319
5317
|
if (!d) {
|
|
@@ -5322,20 +5320,20 @@ function Ma() {
|
|
|
5322
5320
|
}
|
|
5323
5321
|
O(!0);
|
|
5324
5322
|
try {
|
|
5325
|
-
await
|
|
5323
|
+
await Gl(d, (w == null ? void 0 : w.id) ?? null, l), P.success(
|
|
5326
5324
|
w ? `已在「${w.name}」下创建子文件夹「${d}」` : `文件夹「${d}」已创建`
|
|
5327
|
-
), y(!1), J(""),
|
|
5325
|
+
), y(!1), J(""), F(null), await p(), N(`cat:${d}`);
|
|
5328
5326
|
} catch {
|
|
5329
5327
|
} finally {
|
|
5330
5328
|
O(!1);
|
|
5331
5329
|
}
|
|
5332
|
-
},
|
|
5330
|
+
}, Ue = async (d) => {
|
|
5333
5331
|
if (d.id)
|
|
5334
5332
|
try {
|
|
5335
|
-
await
|
|
5333
|
+
await Ul(d.id, l), P.success(`文件夹「${d.name}」已删除`), Q === `cat:${d.name}` && N("all"), await p();
|
|
5336
5334
|
} catch {
|
|
5337
5335
|
}
|
|
5338
|
-
},
|
|
5336
|
+
}, je = (d, b) => {
|
|
5339
5337
|
var X;
|
|
5340
5338
|
const f = h.has(d.name), $ = d.children.length > 0, V = d.count > 0 || $;
|
|
5341
5339
|
return /* @__PURE__ */ t("div", { children: [
|
|
@@ -5357,10 +5355,10 @@ function Ma() {
|
|
|
5357
5355
|
{
|
|
5358
5356
|
className: le.groupArrowWrap,
|
|
5359
5357
|
onClick: (ue) => {
|
|
5360
|
-
ue.stopPropagation(),
|
|
5358
|
+
ue.stopPropagation(), Oe(d.name);
|
|
5361
5359
|
},
|
|
5362
5360
|
children: /* @__PURE__ */ e(
|
|
5363
|
-
|
|
5361
|
+
it,
|
|
5364
5362
|
{
|
|
5365
5363
|
className: [
|
|
5366
5364
|
le.groupArrow,
|
|
@@ -5370,18 +5368,18 @@ function Ma() {
|
|
|
5370
5368
|
)
|
|
5371
5369
|
}
|
|
5372
5370
|
),
|
|
5373
|
-
/* @__PURE__ */ e(
|
|
5371
|
+
/* @__PURE__ */ e(We, { className: le.groupIcon }),
|
|
5374
5372
|
/* @__PURE__ */ e("span", { className: le.treeItemTitle, children: d.name }),
|
|
5375
5373
|
/* @__PURE__ */ e("span", { className: le.groupCount, children: d.count }),
|
|
5376
5374
|
((X = d.cat) == null ? void 0 : X.id) != null ? /* @__PURE__ */ e(
|
|
5377
|
-
|
|
5375
|
+
Ne,
|
|
5378
5376
|
{
|
|
5379
5377
|
title: d.count > 0 ? `文件夹下还有 ${d.count} 个视频,无法删除` : $ ? `文件夹下有 ${d.children.length} 个子文件夹,无法删除` : `删除空文件夹「${d.name}」?`,
|
|
5380
5378
|
okText: "删除",
|
|
5381
5379
|
okButtonProps: { danger: !0 },
|
|
5382
5380
|
cancelText: "取消",
|
|
5383
5381
|
disabled: V,
|
|
5384
|
-
onConfirm: () => void
|
|
5382
|
+
onConfirm: () => void Ue(d.cat),
|
|
5385
5383
|
children: /* @__PURE__ */ e(
|
|
5386
5384
|
oe,
|
|
5387
5385
|
{
|
|
@@ -5393,7 +5391,7 @@ function Ma() {
|
|
|
5393
5391
|
size: "small",
|
|
5394
5392
|
danger: !0,
|
|
5395
5393
|
className: le.folderDel,
|
|
5396
|
-
icon: /* @__PURE__ */ e(
|
|
5394
|
+
icon: /* @__PURE__ */ e(Ke, {}),
|
|
5397
5395
|
disabled: V,
|
|
5398
5396
|
onClick: (ue) => ue.stopPropagation()
|
|
5399
5397
|
}
|
|
@@ -5405,9 +5403,9 @@ function Ma() {
|
|
|
5405
5403
|
]
|
|
5406
5404
|
}
|
|
5407
5405
|
),
|
|
5408
|
-
f ? null : d.children.map((ue) =>
|
|
5406
|
+
f ? null : d.children.map((ue) => je(ue, b + 1))
|
|
5409
5407
|
] }, d.name);
|
|
5410
|
-
},
|
|
5408
|
+
}, Le = [
|
|
5411
5409
|
{
|
|
5412
5410
|
title: "ID",
|
|
5413
5411
|
dataIndex: "id",
|
|
@@ -5428,7 +5426,7 @@ function Ma() {
|
|
|
5428
5426
|
dataIndex: "sourceType",
|
|
5429
5427
|
width: 84,
|
|
5430
5428
|
render: (d) => {
|
|
5431
|
-
const b =
|
|
5429
|
+
const b = St[d] ?? St.UPLOAD;
|
|
5432
5430
|
return /* @__PURE__ */ e(H, { color: b.color, children: b.label });
|
|
5433
5431
|
}
|
|
5434
5432
|
},
|
|
@@ -5469,8 +5467,8 @@ function Ma() {
|
|
|
5469
5467
|
{
|
|
5470
5468
|
type: "link",
|
|
5471
5469
|
size: "small",
|
|
5472
|
-
|
|
5473
|
-
|
|
5470
|
+
onClick: () => void Ba(b.ossUrl),
|
|
5471
|
+
children: "复制"
|
|
5474
5472
|
}
|
|
5475
5473
|
) }),
|
|
5476
5474
|
/* @__PURE__ */ e(oe, { title: "观看", children: /* @__PURE__ */ e(
|
|
@@ -5478,8 +5476,8 @@ function Ma() {
|
|
|
5478
5476
|
{
|
|
5479
5477
|
type: "link",
|
|
5480
5478
|
size: "small",
|
|
5481
|
-
|
|
5482
|
-
|
|
5479
|
+
onClick: () => window.open(b.ossUrl, "_blank"),
|
|
5480
|
+
children: "执行"
|
|
5483
5481
|
}
|
|
5484
5482
|
) }),
|
|
5485
5483
|
/* @__PURE__ */ e(oe, { title: "编辑", children: /* @__PURE__ */ e(
|
|
@@ -5487,27 +5485,27 @@ function Ma() {
|
|
|
5487
5485
|
{
|
|
5488
5486
|
type: "link",
|
|
5489
5487
|
size: "small",
|
|
5490
|
-
|
|
5491
|
-
|
|
5488
|
+
onClick: () => De(b),
|
|
5489
|
+
children: "编辑"
|
|
5492
5490
|
}
|
|
5493
5491
|
) }),
|
|
5494
5492
|
/* @__PURE__ */ e(
|
|
5495
|
-
|
|
5493
|
+
Ne,
|
|
5496
5494
|
{
|
|
5497
5495
|
title: (b.refCount ?? 0) > 0 ? `该视频被 ${b.refCount} 处资料引用,无法删除` : "确认删除该视频?",
|
|
5498
5496
|
okText: "删除",
|
|
5499
5497
|
okButtonProps: { danger: !0 },
|
|
5500
5498
|
cancelText: "取消",
|
|
5501
5499
|
disabled: (b.refCount ?? 0) > 0,
|
|
5502
|
-
onConfirm: () => b.id && void
|
|
5500
|
+
onConfirm: () => b.id && void Be(b.id),
|
|
5503
5501
|
children: /* @__PURE__ */ e(
|
|
5504
5502
|
M,
|
|
5505
5503
|
{
|
|
5506
5504
|
type: "link",
|
|
5507
5505
|
size: "small",
|
|
5508
5506
|
danger: !0,
|
|
5509
|
-
|
|
5510
|
-
|
|
5507
|
+
disabled: (b.refCount ?? 0) > 0,
|
|
5508
|
+
children: "删除"
|
|
5511
5509
|
}
|
|
5512
5510
|
)
|
|
5513
5511
|
}
|
|
@@ -5526,7 +5524,7 @@ function Ma() {
|
|
|
5526
5524
|
k.length,
|
|
5527
5525
|
" ",
|
|
5528
5526
|
"个文件夹",
|
|
5529
|
-
|
|
5527
|
+
Ee ? ` · ${Ee} ${U.length} 条` : ""
|
|
5530
5528
|
] })
|
|
5531
5529
|
] }),
|
|
5532
5530
|
/* @__PURE__ */ t("div", { className: r.pageActions, children: [
|
|
@@ -5538,10 +5536,10 @@ function Ma() {
|
|
|
5538
5536
|
placeholder: "搜索标题",
|
|
5539
5537
|
style: { width: 180 },
|
|
5540
5538
|
value: E,
|
|
5541
|
-
onChange: (d) =>
|
|
5539
|
+
onChange: (d) => z(d.target.value)
|
|
5542
5540
|
}
|
|
5543
5541
|
),
|
|
5544
|
-
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(
|
|
5542
|
+
/* @__PURE__ */ e(M, { icon: /* @__PURE__ */ e(Te, {}), onClick: () => void a(), children: "刷新" }),
|
|
5545
5543
|
/* @__PURE__ */ e(M, { type: "primary", icon: /* @__PURE__ */ e(xe, {}), onClick: ye, children: "新建视频" })
|
|
5546
5544
|
] })
|
|
5547
5545
|
] }),
|
|
@@ -5559,13 +5557,13 @@ function Ma() {
|
|
|
5559
5557
|
type: "text",
|
|
5560
5558
|
size: "small",
|
|
5561
5559
|
icon: /* @__PURE__ */ e(xe, {}),
|
|
5562
|
-
onClick:
|
|
5560
|
+
onClick: ke
|
|
5563
5561
|
}
|
|
5564
5562
|
)
|
|
5565
5563
|
}
|
|
5566
5564
|
)
|
|
5567
5565
|
] }),
|
|
5568
|
-
/* @__PURE__ */ e("div", { className: le.treeScroll, children: x ? /* @__PURE__ */ e("div", { style: { padding: 24, textAlign: "center" }, children: /* @__PURE__ */ e(
|
|
5566
|
+
/* @__PURE__ */ e("div", { className: le.treeScroll, children: x ? /* @__PURE__ */ e("div", { style: { padding: 24, textAlign: "center" }, children: /* @__PURE__ */ e(Ze, {}) }) : /* @__PURE__ */ t(we, { children: [
|
|
5569
5567
|
/* @__PURE__ */ t(
|
|
5570
5568
|
"div",
|
|
5571
5569
|
{
|
|
@@ -5581,7 +5579,7 @@ function Ma() {
|
|
|
5581
5579
|
]
|
|
5582
5580
|
}
|
|
5583
5581
|
),
|
|
5584
|
-
se.map((d) =>
|
|
5582
|
+
se.map((d) => je(d, 0)),
|
|
5585
5583
|
te > 0 ? /* @__PURE__ */ t(
|
|
5586
5584
|
"div",
|
|
5587
5585
|
{
|
|
@@ -5589,12 +5587,12 @@ function Ma() {
|
|
|
5589
5587
|
tabIndex: 0,
|
|
5590
5588
|
className: [
|
|
5591
5589
|
le.groupHead,
|
|
5592
|
-
Q ===
|
|
5590
|
+
Q === Ye ? le.groupHeadActive : ""
|
|
5593
5591
|
].join(" "),
|
|
5594
|
-
onClick: () => N(
|
|
5592
|
+
onClick: () => N(Ye),
|
|
5595
5593
|
title: "查看未归类视频",
|
|
5596
5594
|
children: [
|
|
5597
|
-
/* @__PURE__ */ e(
|
|
5595
|
+
/* @__PURE__ */ e(We, { className: le.groupIcon }),
|
|
5598
5596
|
/* @__PURE__ */ e("span", { className: le.treeItemTitle, children: "未分类" }),
|
|
5599
5597
|
/* @__PURE__ */ e("span", { className: le.groupCount, children: te })
|
|
5600
5598
|
]
|
|
@@ -5603,13 +5601,13 @@ function Ma() {
|
|
|
5603
5601
|
] }) })
|
|
5604
5602
|
] }),
|
|
5605
5603
|
/* @__PURE__ */ e("div", { className: [r.tableCard, le.tableSide].join(" "), children: /* @__PURE__ */ e("div", { className: r.tableWrap, children: /* @__PURE__ */ e(
|
|
5606
|
-
|
|
5604
|
+
_e,
|
|
5607
5605
|
{
|
|
5608
|
-
rows:
|
|
5606
|
+
rows: U,
|
|
5609
5607
|
rowKey: "id",
|
|
5610
5608
|
tableLayout: "fixed",
|
|
5611
5609
|
loading: x,
|
|
5612
|
-
columns:
|
|
5610
|
+
columns: Le,
|
|
5613
5611
|
pagination: {
|
|
5614
5612
|
...hl,
|
|
5615
5613
|
pageSize: 20,
|
|
@@ -5631,7 +5629,7 @@ function Ma() {
|
|
|
5631
5629
|
confirmLoading: C,
|
|
5632
5630
|
okText: "保存",
|
|
5633
5631
|
cancelText: "取消",
|
|
5634
|
-
onOk: () => void
|
|
5632
|
+
onOk: () => void Re(),
|
|
5635
5633
|
onCancel: () => {
|
|
5636
5634
|
A(!1), v(null);
|
|
5637
5635
|
},
|
|
@@ -5650,7 +5648,7 @@ function Ma() {
|
|
|
5650
5648
|
/* @__PURE__ */ t("div", { children: [
|
|
5651
5649
|
/* @__PURE__ */ e("div", { style: { marginBottom: 4 }, children: "分类(左侧树文件夹)" }),
|
|
5652
5650
|
/* @__PURE__ */ e(
|
|
5653
|
-
|
|
5651
|
+
rt,
|
|
5654
5652
|
{
|
|
5655
5653
|
value: u.category ?? "",
|
|
5656
5654
|
options: k.map((d) => ({ value: d.name })),
|
|
@@ -5699,7 +5697,7 @@ function Ma() {
|
|
|
5699
5697
|
onChange: (d) => {
|
|
5700
5698
|
var f;
|
|
5701
5699
|
const b = (f = d.target.files) == null ? void 0 : f[0];
|
|
5702
|
-
d.target.value = "", b &&
|
|
5700
|
+
d.target.value = "", b && Fe(b);
|
|
5703
5701
|
}
|
|
5704
5702
|
}
|
|
5705
5703
|
)
|
|
@@ -5799,7 +5797,7 @@ function Ma() {
|
|
|
5799
5797
|
cancelText: "取消",
|
|
5800
5798
|
onOk: () => void Ge(),
|
|
5801
5799
|
onCancel: () => {
|
|
5802
|
-
y(!1), J(""),
|
|
5800
|
+
y(!1), J(""), F(null);
|
|
5803
5801
|
},
|
|
5804
5802
|
children: [
|
|
5805
5803
|
/* @__PURE__ */ e("div", { style: { marginBottom: 4 }, children: "文件夹名称 *" }),
|
|
@@ -5819,11 +5817,11 @@ function Ma() {
|
|
|
5819
5817
|
)
|
|
5820
5818
|
] });
|
|
5821
5819
|
}
|
|
5822
|
-
const za = "_container_nfu8c_5", Fa = "_sidebar_nfu8c_14",
|
|
5820
|
+
const za = "_container_nfu8c_5", Fa = "_sidebar_nfu8c_14", Ga = "_menuList_nfu8c_24", Ua = "_menuItem_nfu8c_29", ja = "_menuItemActive_nfu8c_47", Wa = "_menuIcon_nfu8c_54", Ha = "_panelArea_nfu8c_61", Ka = "_groupLabel_nfu8c_70", Se = {
|
|
5823
5821
|
container: za,
|
|
5824
5822
|
sidebar: Fa,
|
|
5825
|
-
menuList:
|
|
5826
|
-
menuItem:
|
|
5823
|
+
menuList: Ga,
|
|
5824
|
+
menuItem: Ua,
|
|
5827
5825
|
menuItemActive: ja,
|
|
5828
5826
|
menuIcon: Wa,
|
|
5829
5827
|
panelArea: Ha,
|
|
@@ -5832,7 +5830,7 @@ const za = "_container_nfu8c_5", Fa = "_sidebar_nfu8c_14", Ua = "_menuList_nfu8c
|
|
|
5832
5830
|
{
|
|
5833
5831
|
label: "素材管理",
|
|
5834
5832
|
items: [
|
|
5835
|
-
{ key: "video", label: "培训视频", icon: /* @__PURE__ */ e(
|
|
5833
|
+
{ key: "video", label: "培训视频", icon: /* @__PURE__ */ e(Et, {}) },
|
|
5836
5834
|
{ key: "paper", label: "试卷管理", icon: /* @__PURE__ */ e(ll, {}) },
|
|
5837
5835
|
{ key: "doc", label: "培训资料", icon: /* @__PURE__ */ e(nl, {}) },
|
|
5838
5836
|
{ key: "reward", label: "奖励物料", icon: /* @__PURE__ */ e(al, {}) }
|
|
@@ -5851,23 +5849,23 @@ const za = "_container_nfu8c_5", Fa = "_sidebar_nfu8c_14", Ua = "_menuList_nfu8c
|
|
|
5851
5849
|
];
|
|
5852
5850
|
function si() {
|
|
5853
5851
|
const [l, n] = o("video");
|
|
5854
|
-
return Ce((k) => ql(k.currentUser, "TRAINING")) ? /* @__PURE__ */ t("div", { className:
|
|
5855
|
-
/* @__PURE__ */ e("aside", { className:
|
|
5856
|
-
/* @__PURE__ */ e("div", { className:
|
|
5852
|
+
return Ce((k) => ql(k.currentUser, "TRAINING")) ? /* @__PURE__ */ t("div", { className: Se.container, children: [
|
|
5853
|
+
/* @__PURE__ */ e("aside", { className: Se.sidebar, children: /* @__PURE__ */ e("nav", { className: Se.menuList, children: qa.map((k) => /* @__PURE__ */ t("div", { children: [
|
|
5854
|
+
/* @__PURE__ */ e("div", { className: Se.groupLabel, children: k.label }),
|
|
5857
5855
|
k.items.map((L) => /* @__PURE__ */ t(
|
|
5858
5856
|
"div",
|
|
5859
5857
|
{
|
|
5860
|
-
className: `${
|
|
5858
|
+
className: `${Se.menuItem} ${l === L.key ? Se.menuItemActive : ""}`,
|
|
5861
5859
|
onClick: () => n(L.key),
|
|
5862
5860
|
children: [
|
|
5863
|
-
/* @__PURE__ */ e("span", { className:
|
|
5861
|
+
/* @__PURE__ */ e("span", { className: Se.menuIcon, children: L.icon }),
|
|
5864
5862
|
/* @__PURE__ */ e("span", { children: L.label })
|
|
5865
5863
|
]
|
|
5866
5864
|
},
|
|
5867
5865
|
L.key
|
|
5868
5866
|
))
|
|
5869
5867
|
] }, k.label)) }) }),
|
|
5870
|
-
/* @__PURE__ */ t("main", { className:
|
|
5868
|
+
/* @__PURE__ */ t("main", { className: Se.panelArea, children: [
|
|
5871
5869
|
l === "video" && /* @__PURE__ */ e(Ma, {}),
|
|
5872
5870
|
l === "paper" && /* @__PURE__ */ e(la, {}),
|
|
5873
5871
|
l === "doc" && /* @__PURE__ */ e(Pn, {}),
|
|
@@ -5878,12 +5876,12 @@ function si() {
|
|
|
5878
5876
|
l === "ops" && /* @__PURE__ */ e(Mn, {}),
|
|
5879
5877
|
l === "stats" && /* @__PURE__ */ e(fa, {})
|
|
5880
5878
|
] })
|
|
5881
|
-
] }) : /* @__PURE__ */ e("div", { className:
|
|
5879
|
+
] }) : /* @__PURE__ */ e("div", { className: Se.container, children: /* @__PURE__ */ e(
|
|
5882
5880
|
"div",
|
|
5883
5881
|
{
|
|
5884
|
-
className:
|
|
5882
|
+
className: Se.panelArea,
|
|
5885
5883
|
style: { alignItems: "center", justifyContent: "center" },
|
|
5886
|
-
children: /* @__PURE__ */ e(
|
|
5884
|
+
children: /* @__PURE__ */ e(He, { description: "无培训管理权限(需要权限点:TRAINING)" })
|
|
5887
5885
|
}
|
|
5888
5886
|
) });
|
|
5889
5887
|
}
|