diff --git a/jjb.config.js b/jjb.config.js
index b974c27..509411b 100644
--- a/jjb.config.js
+++ b/jjb.config.js
@@ -13,8 +13,8 @@ module.exports = {
//API_HOST: "http://localhost:80",
// API_HOST: "http://192.168.0.134",
- // API_HOST: "http://192.168.0.150", //太浅
- API_HOST: "https://gbs-gateway.qhdsafety.com",
+ API_HOST: "http://192.168.0.150", //太浅
+ // API_HOST: "https://gbs-gateway.qhdsafety.com",
// API_HOST: "http://192.168.0.103", //huwei
},
production: {
diff --git a/src/api/courseware/index.js b/src/api/courseware/index.js
index 11ecbee..d3bcb22 100644
--- a/src/api/courseware/index.js
+++ b/src/api/courseware/index.js
@@ -1,6 +1,6 @@
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
-/** 教育培训 — 培训课件管理 / 培训课程管理 */
+/** 教育培训 — 培训课件管理 / 培训课程管理 / 班级管理 */
/** 分页查询课件 */
export const coursewarePage = declareRequest(
@@ -39,3 +39,28 @@ export const coursePage = declareRequest(
"Get > /safetyEval/courseManagement/page",
"courseList: [] | res.data || [] & courseTotal: 0 | res.total || 0",
);
+
+/** 新增课程 */
+export const courseAdd = declareRequest(
+ "courseConfirmLoading",
+ "Post > @/safetyEval/courseManagement/save",
+);
+
+/** 课程详情 */
+export const courseDetail = declareRequest(
+ "courseDetailLoading",
+ "Get > /safetyEval/courseManagement/get",
+);
+
+/** 修改课程 */
+export const courseModify = declareRequest(
+ "courseConfirmLoading",
+ "Post > @/safetyEval/courseManagement/modify",
+);
+
+/** 分页查询班级 */
+export const classPage = declareRequest(
+ "classLoading",
+ "Get > /safetyEval/classManagement/page",
+ "classList: [] | res.data || [] & classTotal: 0 | res.total || 0",
+);
diff --git a/src/enumerate/constant/index.js b/src/enumerate/constant/index.js
index e707c43..0d0def3 100644
--- a/src/enumerate/constant/index.js
+++ b/src/enumerate/constant/index.js
@@ -662,6 +662,21 @@ export const COURSEWARE_TYPE_MAP = COURSEWARE_TYPE_OPTIONS.reduce(
{},
);
+/** 班级状态(0未申请/1待开班/2培训中/3培训结束) */
+export const CLASS_STATUS_OPTIONS = [
+ { label: "未申请", value: 0 },
+ { label: "待开班", value: 1 },
+ { label: "培训中", value: 2 },
+ { label: "培训结束", value: 3 },
+];
+
+export const CLASS_STATUS_MAP = {
+ 0: { label: "未申请", status: "default" },
+ 1: { label: "待开班", status: "warning" },
+ 2: { label: "培训中", status: "processing" },
+ 3: { label: "培训结束", status: "success" },
+};
+
/** 试卷类型(fixed平台试卷/config_rule规则试卷) */
export const PAPER_TYPE_OPTIONS = [
{ label: "平台试卷", value: "fixed" },
diff --git a/src/pages/Container/EduTraining/ClassManage/index.js b/src/pages/Container/EduTraining/ClassManage/index.js
new file mode 100644
index 0000000..67955b9
--- /dev/null
+++ b/src/pages/Container/EduTraining/ClassManage/index.js
@@ -0,0 +1,278 @@
+import { useEffect } from "react";
+import { Badge, Button, Form, Input, Modal, Table, message } from "antd";
+import dayjs from "dayjs";
+import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
+import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
+import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
+import SearchForm from "~/components/SearchForm";
+import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
+import { Connect } from "@cqsjjb/jjb-dva-runtime";
+import { tools } from "@cqsjjb/jjb-common-lib";
+import { NS_COURSEWARE } from "~/enumerate/namespace";
+import {
+ CLASS_STATUS_MAP,
+ CLASS_STATUS_OPTIONS,
+ COURSEWARE_TRAINING_TYPE_MAP,
+ COURSEWARE_TRAINING_TYPE_OPTIONS,
+} from "~/enumerate/constant";
+
+const { router } = tools;
+
+/** 涉及学员人员数 / 完成人员数:学员统计接口未接入,暂用假数据 */
+const MOCK_STUDENT_COUNT = 10;
+const MOCK_COMPLETED_COUNT = 5;
+/** 班级总人次:同上,暂用假数据 */
+const MOCK_TOTAL_PERSON_TIMES = 93;
+
+/** 搜索表单值 → 查询参数:培训时间范围拆为后端字段(yyyy-MM-dd) */
+const buildQuery = (value) => {
+ const { trainingDateRange, ...rest } = value || {};
+ return {
+ ...rest,
+ ...(trainingDateRange?.[0]
+ ? { startDateBegin: trainingDateRange[0].format("YYYY-MM-DD") }
+ : {}),
+ ...(trainingDateRange?.[1]
+ ? { endDateEnd: trainingDateRange[1].format("YYYY-MM-DD") }
+ : {}),
+ current: 1,
+ size: 10,
+ };
+};
+
+/** 教育培训 — 班级管理 */
+function ClassManagePage(props) {
+ const [searchForm] = Form.useForm();
+ const { courseware } = props;
+ const { classList, classTotal: total, classLoading: loading } =
+ courseware || {};
+
+ const handleSearch = () => {
+ props.classPage(router.query);
+ };
+
+ useEffect(() => {
+ const { startDateBegin, endDateEnd, ...rest } = router.query;
+ searchForm.setFieldsValue({
+ ...rest,
+ ...(startDateBegin && endDateEnd
+ ? { trainingDateRange: [dayjs(startDateBegin), dayjs(endDateEnd)] }
+ : {}),
+ });
+ handleSearch();
+ }, []);
+
+ const onDelete = (record) => {
+ Modal.confirm({
+ title: "提示",
+ content: "数据将会删除,您是否确认删除?",
+ okText: "是",
+ cancelText: "否",
+ onOk: () => {
+ message.info(`班级「${record.className}」删除接口待接入`);
+ },
+ });
+ };
+
+ const columns = [
+ {
+ title: "序号",
+ width: 70,
+ fixed: "left",
+ render: (_, __, index) => {
+ const current = Number(router.query.current) || 1;
+ const size = Number(router.query.size) || 10;
+ return (current - 1) * size + index + 1;
+ },
+ },
+ {
+ title: "参训单位",
+ dataIndex: "unitName",
+ width: 180,
+ ellipsis: true,
+ render: (v) => v || "-",
+ },
+ {
+ title: "班级名称",
+ dataIndex: "className",
+ width: 180,
+ ellipsis: true,
+ },
+ {
+ title: "班级编码",
+ dataIndex: "classCode",
+ width: 180,
+ },
+ {
+ title: "培训类型",
+ dataIndex: "trainingType",
+ width: 160,
+ ellipsis: true,
+ render: (v) => COURSEWARE_TRAINING_TYPE_MAP[v] ?? (v || "-"),
+ },
+ {
+ title: "培训开始时间",
+ dataIndex: "startDate",
+ width: 120,
+ render: (v) => v || "-",
+ },
+ {
+ title: "结束时间",
+ dataIndex: "endDate",
+ width: 120,
+ render: (v) => v || "-",
+ },
+ {
+ title: "涉及学员人员数",
+ dataIndex: "studentCount",
+ width: 120,
+ render: () => MOCK_STUDENT_COUNT,
+ },
+ {
+ title: "完成人员数",
+ dataIndex: "completedCount",
+ width: 100,
+ render: () => MOCK_COMPLETED_COUNT,
+ },
+ {
+ title: "班级状态",
+ dataIndex: "status",
+ width: 100,
+ render: (v) => {
+ const item = CLASS_STATUS_MAP[v];
+ return item ? : "-";
+ },
+ },
+ {
+ title: "操作",
+ width: 240,
+ fixed: "right",
+ render: (_, record) => (
+
+
+
+
+ {record.status === 2 && (
+
+ )}
+
+
+ ),
+ },
+ ];
+
+ return (
+
+
+
+ ,
+
+
+ ,
+
+
+ ,
+
+
+ ,
+
+
+ ,
+ ]}
+ onReset={(value) => {
+ router.query = buildQuery(value);
+ handleSearch();
+ }}
+ onFinish={(value) => {
+ router.query = buildQuery(value);
+ handleSearch();
+ }}
+ />
+
+
+
+ `共 ${t} 条`,
+ current: Number(router.query.current) || 1,
+ pageSize: Number(router.query.size) || 10,
+ onChange: (page, pageSize) => {
+ router.query = { ...router.query, current: page, size: pageSize };
+ handleSearch();
+ },
+ }}
+ />
+
+ );
+}
+
+export default Connect(
+ [NS_COURSEWARE],
+ true,
+)(AntdTableFuncControl(ClassManagePage));
diff --git a/src/pages/Container/EduTraining/CourseManage/Add/index.js b/src/pages/Container/EduTraining/CourseManage/Add/index.js
new file mode 100644
index 0000000..d135918
--- /dev/null
+++ b/src/pages/Container/EduTraining/CourseManage/Add/index.js
@@ -0,0 +1,414 @@
+import { useEffect, useState } from "react";
+import {
+ Button,
+ Form,
+ Input,
+ Modal,
+ Select,
+ Space,
+ Spin,
+ Table,
+ message,
+} from "antd";
+import { DeleteOutlined, PlusOutlined } from "@ant-design/icons";
+import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
+import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
+import { Connect } from "@cqsjjb/jjb-dva-runtime";
+import PreviewUrlButton from "~/components/PreviewUrlButton";
+import { tools } from "@cqsjjb/jjb-common-lib";
+import AttachmentUpload from "~/components/AttachmentUpload";
+import { NS_COURSEWARE } from "~/enumerate/namespace";
+import {
+ COURSEWARE_TRAINING_TYPE_MAP,
+ COURSEWARE_TRAINING_TYPE_OPTIONS,
+} from "~/enumerate/constant";
+
+const { TextArea } = Input;
+const { router } = tools;
+
+/** 教育培训 — 新增/编辑课程 */
+function CourseAddPage(props) {
+ const [form] = Form.useForm();
+ const [selectOpen, setSelectOpen] = useState(false);
+ const courseId = router.query.courseId;
+ const isEdit = !!courseId;
+ // 查看模式:仅展示不可编辑
+ const isView = router.query.mode === "view";
+ // 编辑模式:详情就绪后再挂载表单,通过 initialValues 回显;新增模式直接挂载
+
+ const confirmLoading = props.courseware?.courseConfirmLoading;
+ const { courseDetailLoading } = props.courseware;
+
+ useEffect(() => {
+ if (!isEdit) return;
+ (async () => {
+ const res = await props.courseDetail({ id: courseId });
+ if (res?.success !== false && res?.data) {
+ form.setFieldsValue({
+ courseName: res.data.courseName,
+ trainingType: res.data.trainingType,
+ courseDescription: res.data.courseDescription,
+ courseCover: JSON.parse(res.data.courseCover || "[]"),
+ courseRelCoursewareDTOList: (res.data.courseRelCoursewareVOList || []).map(
+ ({
+ coursewareId,
+ coursewareName,
+ coursewareDocument,
+ classHourDuration,
+ creditHours,
+ sort,
+ }) => ({
+ coursewareId,
+ coursewareName,
+ coursewareDocument,
+ classHourDuration,
+ creditHours,
+ sort,
+ }),
+ ),
+ })
+ } else {
+ props.history.goBack();
+ }
+ })();
+ }, []);
+
+ const handleSubmit = async () => {
+ try {
+ const values = await form.validateFields();
+ // 封面组件值为 fileList 数组,提交时序列化为 JSON 数组字符串
+ values.courseCover = values.courseCover?.length
+ ? JSON.stringify(values.courseCover)
+ : undefined;
+ // 归属课件:Form.List 未注册字段(coursewareId 等)不在 validateFields 结果中,从表单 store 取完整数据并附带排序
+ const relList = form.getFieldValue("courseRelCoursewareDTOList") || [];
+ values.courseRelCoursewareDTOList = relList.length
+ ? relList.map((item, index) => ({ ...item, sort: index + 1 }))
+ : undefined;
+ const res = await (isEdit
+ ? props.courseModify({ id: courseId, ...values })
+ : props.courseAdd(values));
+ if (res?.success !== false) {
+ message.success("保存成功");
+ props.history.goBack();
+ }
+ } catch {
+ // 表单校验失败或请求异常,由 antd / http 层提示
+ }
+ };
+
+
+
+ return (
+
+
+
+
+ )
+ }
+ >
+
+ {(
+ <>
+ 课程基本信息
+
+
+
+
+
+
+
+
+
+
+ 课程目录
+
+ {(_, { add, remove }) => {
+ // Form.List 重渲染时从 store 读取最新完整数据(含未注册字段)
+ const list = form.getFieldValue("courseRelCoursewareDTOList") || [];
+ return (
+ <>
+ {!isView && (
+ }
+ style={{ marginBottom: 12 }}
+ onClick={() => setSelectOpen(true)}
+ >
+ 添加课件
+
+ )}
+ i + 1 },
+ {
+ title: "课件名称",
+ render: (_, record) => (
+
+
+
+ ),
+ },
+ {
+ title: "课时时长(小时)",
+ dataIndex: "classHourDuration",
+ width: 130,
+ render: (v) => (v == null ? "-" : v),
+ },
+ {
+ title: "学时",
+ dataIndex: "creditHours",
+ width: 90,
+ render: (v) => (v == null ? "-" : v),
+ },
+ {
+ title: "操作",
+ width: 80,
+ render: (_, record) => {
+ const data = JSON.parse(record.coursewareDocument || "[]")?.[0] || {};
+ return (
+
+ 预览
+ {!isView && (
+ }
+ onClick={() => remove(record.fieldKey)}
+ >
+ 删除
+
+ )}
+
+ );
+ }
+ ,
+ },
+ ]}
+ dataSource={list.map((item, fieldKey) => ({
+ ...item,
+ fieldKey,
+ }))}
+ pagination={false}
+ locale={{
+ emptyText: list.length
+ ? undefined
+ : "暂无课件,请点击添加课件",
+ }}
+ />
+ item.coursewareId)}
+ onOk={(rows) => {
+ // 课件列表记录映射为课程关联课件 DTO 字段,通过 Form.List 原生 add 逐条追加
+ rows.forEach(
+ ({
+ id,
+ coursewareName,
+ coursewareDocument,
+ classHourDuration,
+ creditHours,
+ }) =>
+ add({
+ coursewareId: id,
+ coursewareName,
+ coursewareDocument,
+ classHourDuration,
+ creditHours,
+ }),
+ );
+ setSelectOpen(false);
+ }}
+ onCancel={() => setSelectOpen(false)}
+ />
+ >
+ );
+ }}
+
+
+ >
+ )}
+
+
+ );
+}
+
+/** 选择课件弹窗:数据源同培训课件管理列表 */
+function CoursewareSelectModal({
+ open,
+ loading,
+ dataSource,
+ total,
+ requestPage,
+ selectedIds,
+ onOk,
+ onCancel,
+}) {
+ const [query, setQuery] = useState({ current: 1, size: 10 });
+ const [keyword, setKeyword] = useState("");
+ const [selectedRows, setSelectedRows] = useState([]);
+
+ const handleSearch = (params) => {
+ setQuery(params);
+ requestPage(params);
+ };
+
+ return (
+ onOk(selectedRows)}
+ onCancel={onCancel}
+ afterOpenChange={(visible) => {
+ if (visible) {
+ setKeyword("");
+ setSelectedRows([]);
+ handleSearch({ current: 1, size: 10 });
+ }
+ }}
+ >
+ setKeyword(e.target.value)}
+ onSearch={(value) =>
+ handleSearch({ current: 1, size: query.size, coursewareName: value })
+ }
+ />
+ COURSEWARE_TRAINING_TYPE_MAP[v] ?? (v || "-"),
+ },
+ {
+ title: "课时时长(小时)",
+ dataIndex: "classHourDuration",
+ width: 130,
+ render: (v) => (v == null ? "-" : v),
+ },
+ {
+ title: "学时",
+ dataIndex: "creditHours",
+ width: 80,
+ render: (v) => (v == null ? "-" : v),
+ },
+ {
+ title: "操作",
+ width: 80,
+ render: (_, record) => {
+ const data = JSON.parse(record.coursewareDocument || "[]")?.[0] || {};
+ return
+ 预览
+
+ }
+ },
+ ]}
+ dataSource={Array.isArray(dataSource) ? dataSource : []}
+ rowSelection={{
+ preserveSelectedRowKeys: true,
+ selectedRowKeys: selectedRows.map((r) => r.id),
+ getCheckboxProps: (record) => ({
+ disabled: selectedIds.includes(record.id),
+ }),
+ onChange: (_, rows) => setSelectedRows(rows),
+ }}
+ pagination={{
+ total,
+ size: "small",
+ showTotal: (t) => `共 ${t} 条`,
+ current: Number(query.current) || 1,
+ pageSize: Number(query.size) || 10,
+ onChange: (page, pageSize) =>
+ handleSearch({
+ current: page,
+ size: pageSize,
+ coursewareName: query.coursewareName,
+ }),
+ }}
+ />
+
+ );
+}
+
+export default Connect([NS_COURSEWARE], true)(CourseAddPage);
diff --git a/src/pages/Container/EduTraining/CourseManage/List/index.js b/src/pages/Container/EduTraining/CourseManage/List/index.js
new file mode 100644
index 0000000..e948384
--- /dev/null
+++ b/src/pages/Container/EduTraining/CourseManage/List/index.js
@@ -0,0 +1,202 @@
+import { useEffect } from "react";
+import { Badge, Button, Form, Table, message } from "antd";
+import { PlusOutlined } from "@ant-design/icons";
+import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
+import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
+import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
+import SearchForm from "~/components/SearchForm";
+import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
+import { Connect } from "@cqsjjb/jjb-dva-runtime";
+import { tools } from "@cqsjjb/jjb-common-lib";
+import { NS_COURSEWARE } from "~/enumerate/namespace";
+import {
+ COURSEWARE_STATUS_MAP,
+ COURSEWARE_STATUS_OPTIONS,
+ COURSEWARE_TRAINING_TYPE_OPTIONS,
+} from "~/enumerate/constant";
+
+const { router } = tools;
+
+/** 培训课程管理 */
+function CourseManagePage(props) {
+ const [searchForm] = Form.useForm();
+ const { courseware } = props;
+ const { courseList: dataSource, courseTotal: total, courseLoading: loading } =
+ courseware || {};
+
+ const handleSearch = () => {
+ props.coursePage(router.query);
+ };
+
+ useEffect(() => {
+ searchForm.setFieldsValue(router.query);
+ handleSearch();
+ }, []);
+
+ const columns = [
+ {
+ title: "序号",
+ width: 70,
+ fixed: "left",
+ render: (_, __, index) => {
+ const current = Number(router.query.current) || 1;
+ const size = Number(router.query.size) || 10;
+ return (current - 1) * size + index + 1;
+ },
+ },
+ {
+ title: "课程名称",
+ dataIndex: "courseName",
+ width: 260,
+ ellipsis: true,
+ },
+ {
+ title: "课程描述",
+ dataIndex: "courseDescription",
+ width: 320,
+ ellipsis: true,
+ },
+ {
+ title: "课程状态",
+ dataIndex: "status",
+ width: 90,
+ render: (v) => {
+ const item = COURSEWARE_STATUS_MAP[v];
+ return item ? : "-";
+ },
+ },
+ {
+ title: "总课时",
+ dataIndex: "classHourDuration",
+ width: 90,
+ render: (v) => (v == null ? "-" : v),
+ },
+ {
+ title: "上传单位",
+ dataIndex: "uploadUnit",
+ width: 200,
+ ellipsis: true,
+ },
+ {
+ title: "是否已使用",
+ dataIndex: "used",
+ width: 100,
+ render: (v) => (v === 1 ? "已使用" : "未使用"),
+ },
+ {
+ title: "操作",
+ width: 180,
+ fixed: "right",
+ render: (_, record) => (
+
+
+
+
+
+ ),
+ },
+ ];
+
+ return (
+ }
+ onClick={() => props.history.push("Add")}
+ >
+ 新增
+
+ }
+ >
+
+
+ ,
+
+
+ ,
+
+
+ ,
+ ]}
+ onReset={(value) => {
+ router.query = { ...value, current: 1, size: 10 };
+ handleSearch();
+ }}
+ onFinish={(value) => {
+ router.query = { ...value, current: 1, size: 10 };
+ handleSearch();
+ }}
+ />
+
+ `共 ${t} 条`,
+ current: Number(router.query.current) || 1,
+ pageSize: Number(router.query.size) || 10,
+ onChange: (page, pageSize) => {
+ router.query = { ...router.query, current: page, size: pageSize };
+ handleSearch();
+ },
+ }}
+ />
+
+ );
+}
+
+export default Connect(
+ [NS_COURSEWARE],
+ true,
+)(AntdTableFuncControl(CourseManagePage));
diff --git a/src/pages/Container/EduTraining/CourseManage/index.js b/src/pages/Container/EduTraining/CourseManage/index.js
index acd0200..bf147a7 100644
--- a/src/pages/Container/EduTraining/CourseManage/index.js
+++ b/src/pages/Container/EduTraining/CourseManage/index.js
@@ -1,299 +1,6 @@
-import { useEffect, useState } from "react";
-import {
- Badge,
- Button,
- Descriptions,
- Form,
- Modal,
- Table,
- message,
-} from "antd";
-import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
-import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
-import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
-import SearchForm from "~/components/SearchForm";
-import PreviewUrlButton from "~/components/PreviewUrlButton";
-import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
-import { Connect } from "@cqsjjb/jjb-dva-runtime";
-import { tools } from "@cqsjjb/jjb-common-lib";
-import { NS_COURSEWARE } from "~/enumerate/namespace";
-import {
- COURSEWARE_STATUS_MAP,
- COURSEWARE_STATUS_OPTIONS,
- COURSEWARE_TRAINING_TYPE_MAP,
- COURSEWARE_TRAINING_TYPE_OPTIONS,
-} from "~/enumerate/constant";
+import React from "react";
-const { router } = tools;
-
-/** 解析课件文档字段:JSON 数组字符串,容错非法格式 */
-const parseCoursewareDocument = (raw) => {
- if (!raw) return [];
- try {
- const parsed = JSON.parse(raw);
- return Array.isArray(parsed) ? parsed : [];
- } catch {
- return [];
- }
-};
-
-/** 培训课程管理 */
-function CourseManagePage(props) {
- const [searchForm] = Form.useForm();
- const [viewRecord, setViewRecord] = useState(null);
- const { courseware } = props;
- const { courseList: dataSource, courseTotal: total, courseLoading: loading } =
- courseware || {};
-
- const handleSearch = () => {
- props.coursePage(router.query);
- };
-
- useEffect(() => {
- searchForm.setFieldsValue(router.query);
- handleSearch();
- }, []);
-
- const columns = [
- {
- title: "序号",
- width: 70,
- fixed: "left",
- render: (_, __, index) => {
- const current = Number(router.query.current) || 1;
- const size = Number(router.query.size) || 10;
- return (current - 1) * size + index + 1;
- },
- },
- {
- title: "课程名称",
- dataIndex: "courseName",
- width: 260,
- ellipsis: true,
- },
- {
- title: "课程描述",
- dataIndex: "courseDescription",
- width: 320,
- ellipsis: true,
- },
- {
- title: "课程状态",
- dataIndex: "status",
- width: 90,
- render: (v) => {
- const item = COURSEWARE_STATUS_MAP[v];
- return item ? : "-";
- },
- },
- {
- title: "总课时",
- dataIndex: "classHourDuration",
- width: 90,
- render: (v) => (v == null ? "-" : v),
- },
- {
- title: "上传单位",
- dataIndex: "uploadUnit",
- width: 200,
- ellipsis: true,
- },
- {
- title: "是否已使用",
- dataIndex: "used",
- width: 100,
- render: (v) => (v === 1 ? "已使用" : "未使用"),
- },
- {
- title: "操作",
- width: 200,
- fixed: "right",
- render: (_, record) => (
-
-
-
-
-
-
- ),
- },
- ];
-
- const relatedCourseware = viewRecord?.courseRelCoursewareVOList || [];
-
- return (
-
-
-
- ,
-
-
- ,
-
-
- ,
- ]}
- onReset={(value) => {
- router.query = { ...value, current: 1, size: 10 };
- handleSearch();
- }}
- onFinish={(value) => {
- router.query = { ...value, current: 1, size: 10 };
- handleSearch();
- }}
- />
-
- `共 ${t} 条`,
- current: Number(router.query.current) || 1,
- pageSize: Number(router.query.size) || 10,
- onChange: (page, pageSize) => {
- router.query = { ...router.query, current: page, size: pageSize };
- handleSearch();
- },
- }}
- />
-
- setViewRecord(null)}
- >
-
-
- {viewRecord?.courseName || "-"}
-
-
- {COURSEWARE_TRAINING_TYPE_MAP[viewRecord?.trainingType]
- ?? (viewRecord?.trainingType || "-")}
-
-
- {COURSEWARE_STATUS_MAP[viewRecord?.status]?.label || "-"}
-
-
- {viewRecord?.classHourDuration ?? "-"}
-
-
- {viewRecord?.used === 1 ? "已使用" : "未使用"}
-
-
- {viewRecord?.uploadUnit || "-"}
-
-
- {viewRecord?.courseDescription || "-"}
-
-
-
-
- 关联课件
-
- row.coursewareId}
- size="small"
- columns={[
- { title: "序号", width: 60, render: (_, __, i) => i + 1 },
- {
- title: "课件名称",
- dataIndex: "coursewareName",
- ellipsis: true,
- },
- {
- title: "课时时长(小时)",
- dataIndex: "classHourDuration",
- width: 130,
- render: (v) => (v == null ? "-" : v),
- },
- {
- title: "学时",
- dataIndex: "creditHours",
- width: 90,
- render: (v) => (v == null ? "-" : v),
- },
- {
- title: "课件文档",
- dataIndex: "coursewareDocument",
- width: 160,
- render: (raw) => {
- const files = parseCoursewareDocument(raw);
- return files.length ? (
- files.map((f, i) => (
-
- {f.name || f.url}
-
- ))
- ) : (
- "-"
- );
- },
- },
- ]}
- dataSource={relatedCourseware}
- pagination={false}
- />
-
-
- );
+/** 课程管理路由出口(List 课程列表 / Add 新增课程) */
+export default function CourseManage(props) {
+ return props.children;
}
-
-export default Connect(
- [NS_COURSEWARE],
- true,
-)(AntdTableFuncControl(CourseManagePage));
diff --git a/src/pages/Container/Layout/menuConfig.js b/src/pages/Container/Layout/menuConfig.js
index c3b3340..7cd51a9 100644
--- a/src/pages/Container/Layout/menuConfig.js
+++ b/src/pages/Container/Layout/menuConfig.js
@@ -295,10 +295,15 @@ const menuItems = [
icon: ,
},
{
- key: "/safetyEval/container/EduTraining/CourseManage",
+ key: "/safetyEval/container/EduTraining/CourseManage/List",
label: "培训课程管理",
icon: ,
},
+ {
+ key: "/safetyEval/container/EduTraining/ClassManage",
+ label: "班级管理",
+ icon: ,
+ },
{
key: "/safetyEval/container/EduTraining/PaperManage/List",
label: "试卷管理",