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