Commit 025c86bf authored by wuhao's avatar wuhao 🎯

asder

parent 92de224c
Pipeline #3326 failed with stages
in 2 minutes and 22 seconds
......@@ -52,6 +52,7 @@ function TreeRender({
style,
submitKey,
disabled,
hidden,
}) {
const [search, setsearch] = useState("");
const [savetitle, setsavetitle] = useState(null);
......@@ -178,7 +179,7 @@ function TreeRender({
>
<span style={{ marginRight: 6 }}>{title}</span>
<div className="center" style={{ gap: 8 }}>
{item.key && item.key != "00000000" && (
{item.key && item.key != "00000000" && !hidden && (
<Tooltip title="编辑">
<div
className="bgs"
......@@ -208,7 +209,7 @@ function TreeRender({
</div>
</Tooltip>
)}
{item.key && item.key != "00000000" && item.children && (
{item.key && item.key != "00000000" && item.children && !hidden && (
<Tooltip title="新增">
<div
className="bgs"
......@@ -240,7 +241,7 @@ function TreeRender({
</Tooltip>
)}
{item.key != "0" && (
{item.key != "0" && !hidden && (
<Popconfirm
placement="top"
title="是否删除该节点?"
......@@ -344,19 +345,21 @@ function TreeRender({
mt={0}
>
<Typography variant="h6">课程目录</Typography>
<IconButton
disabled={disabled}
onClick={() => {
setDrawer({ open: true });
}}
>
<AddIcon
style={{
fontSize: 20,
color: disabled ? colors.grey[600] : colors.blue[600],
{!hidden && (
<IconButton
disabled={disabled}
onClick={() => {
setDrawer({ open: true });
}}
></AddIcon>
</IconButton>
>
<AddIcon
style={{
fontSize: 20,
color: disabled ? colors.grey[600] : colors.blue[600],
}}
></AddIcon>
</IconButton>
)}
<Modal
{...drawer}
......
......@@ -21,9 +21,6 @@ const StyledContent = styled('div')(({ theme }) => ({
export default function Page404() {
return (
<>
<Helmet>
<title> 404 Page Not Found | Minimal UI </title>
</Helmet>
<Container>
<StyledContent sx={{ textAlign: 'center', alignItems: 'center' }}>
......
import AutoTable from "@/components/AutoTable";
import DraggableDialog from "@/components/DraggableDialog";
import InitForm from "@/components/InitForm";
import Limit from "@/components/Limit";
import PremButton from "@/components/PremButton";
import TreeRender from "@/components/TreeRender/sxtree";
import { doFetch } from "@/utils/doFetch";
import editorIsNull from "@/utils/editorIsNull";
import { Box, Container, Grid, Link, Stack, Typography } from "@mui/material";
import { useParams } from "@umijs/max";
import { useRequest } from "ahooks";
......@@ -62,10 +62,6 @@ function Dolessons() {
params: { id: val[0] },
}).then((res) => {
setCourseContent(res?.data?.data);
formRef.current.setFieldValue(
"trainContent",
res?.data?.data?.trainContent
);
});
}
};
......@@ -239,50 +235,18 @@ function Dolessons() {
<TreeRender
onselected={checkCourse}
maxWidth={170}
url="/busTrainCatalogue/queryCatalogueTree"
saveurl="/busTrainCatalogue/saveOrUpdateCatalogue"
deleteurl="/busTrainCatalogue/deleteCatalogue"
url="/studentTrain/queryCatalogueTree"
submitKey="catalogue"
disabled={ifs}
hidden={true}
params={{
trainId: params?.id,
id: params?.id,
}}
/>
</Box>
</Grid>
<Grid item flex={1}>
<Box boxShadow={"0 0 18px #f0f0f0"} borderRadius={2} padding={2}>
<InitForm
formRef={formRef}
fields={[
{
key: "trainContent",
dataIndex: "trainContent",
valueType: "Editor",
colProps: {
span: 24,
},
},
]}
onFinish={(val) => {
const data = { ...val };
if (editorIsNull(data?.trainContent)) {
return message.warning("备课内容不能为空!", 2);
}
doFetch({
url: "/busTrainCatalogue/saveCatalogueContent",
params: {
id: courseContent?.id,
trainContent: data?.trainContent,
},
}).then((res) => {
if (res.code === "0000") {
message.success("操作成功!");
}
});
}}
disabled={ifs}
/>
<Limit content={courseContent?.trainContent ?? '<span style="font-weight:bloder;color:#1890ff">-- 请选择左侧小节 </span>'}></Limit>
</Box>
</Grid>
</Grid>
......@@ -312,9 +276,9 @@ function Dolessons() {
],
},
]}
path="/busTrainExperiment/page"
path="/studentTrain/experimentPage"
extraparams={{
trainId: params?.id,
id: params?.id,
}}
/>
</Box>
......@@ -330,19 +294,10 @@ function Dolessons() {
actionRef={cjwtactionRef}
columns={[
...questionColumns,
{
title: "操作",
valueType: "option",
width: 180,
render: (text, row, _, action) => [
edit(text, row, _, action),
removeq(text, row, _, action),
],
},
]}
path="/busTrainQuestion/page"
path="/studentTrain/questionPage"
extraparams={{
trainId: params?.id,
id: params?.id,
}}
/>
</Box>
......@@ -544,15 +499,6 @@ function Dolessons() {
>
返回
</PremButton>
<PremButton
btn={{
disabled:ifs,
variant: "contained",
onClick: addHandel,
}}
>
{active === "1" ? "预览" : active === "2" ? "添加实验" : "添加问题"}
</PremButton>
</Stack>
</Box>
<Box>
......
......@@ -232,6 +232,11 @@ function Usercenter() {
<IconButton
style={{ boxShadow: " 0 0 12px rgba(0,0,0,0.2)" }}
onClick={async () => {
if(!(isValidChinesePhoneNumber(telephone) &&
isChinaEmail(email))){
return;
}
let res = await doFetch({
url: "/user/updateTelephoneAndEmail",
params: { telephone, email },
......
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