Commit e09e893d authored by krysent's avatar krysent

5.6

parent d146a050
......@@ -8,7 +8,7 @@ import editorIsNull from "@/utils/editorIsNull";
import { Box, Container, Grid, Link, Stack, Typography } from "@mui/material";
import { useParams } from "@umijs/max";
import { useRequest } from "ahooks";
import { message, Tabs } from "antd";
import { message, Tabs ,Badge} from "antd";
import { useEffect, useMemo, useRef, useState } from "react";
import { history } from "umi";
import "./index.less";
......@@ -65,11 +65,7 @@ function Dolessons() {
}
};
useEffect(() => {
if (courseContent?.id) {
alert(0)
}
}, [courseContent?.id]);
const edit = (text, row, _, action) => {
return (
......@@ -144,7 +140,7 @@ function Dolessons() {
title: "问题内容",
dataIndex: "question",
key: "question",
width:400,
width: 400,
formItemProps: { rules: [{ required: true, message: "此项为必填项" }] },
},
{
......@@ -260,7 +256,6 @@ function Dolessons() {
},
},
]}
onFinish={(val) => {
const data = { ...val };
if (editorIsNull(data?.trainContent)) {
......@@ -286,7 +281,11 @@ function Dolessons() {
},
{
key: "2",
label: "查看实验",
label: (
<Badge count={lessonDetail?.experimentNum} size="small" offset={[6, 0]}>
查看实验
</Badge>
),
children: (
<Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2}>
<AutoTable
......
......@@ -64,7 +64,6 @@ function Lessons() {
params: { courseId: row?.id },
}).then((res) => {
if (res.code === "0000") {
console.log(res?.data?.dataList);
setdialogprops({
open: true,
maxWidth: "xl",
......@@ -126,7 +125,7 @@ function Lessons() {
dialogprops={dialogprops}
maxWidth={dialogprops?.maxWidth ?? "xs"}
>
{dialogprops?.title === "编辑" ? (
{dialogprops?.title === "编辑" || dialogprops?.title === "新增课程" ? (
<InitForm
fields={columns}
defaultFormValue={dialogprops?.defaultFormValue}
......@@ -195,7 +194,6 @@ function Lessons() {
},
]}
onFinish={(val) => {
console.log(val);
const teacherIdList = val?.teacherIdList?.map((it) => it?.id);
runAsync({
url: "/sysCourseTeacher/relationCourseTeacher",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment