Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cs_vsofpm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
cs_vsofpm
Commits
025c86bf
Commit
025c86bf
authored
May 18, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
92de224c
Pipeline
#3326
failed with stages
in 2 minutes and 22 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
81 deletions
+32
-81
sxtree.jsx
src/components/TreeRender/sxtree.jsx
+18
-15
404.jsx
src/pages/404.jsx
+0
-3
index.jsx
src/pages/domybustrain/index.jsx
+9
-63
index.jsx
src/pages/usercenter/index.jsx
+5
-0
No files found.
src/components/TreeRender/sxtree.jsx
View file @
025c86bf
...
...
@@ -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
}
...
...
src/pages/404.jsx
View file @
025c86bf
...
...
@@ -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'
}
}
>
...
...
src/pages/domybustrain/index.jsx
View file @
025c86bf
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=
{
{
trainI
d
:
params
?.
id
,
i
d
:
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/p
age"
path=
"/
studentTrain/experimentP
age"
extraparams=
{
{
trainI
d
:
params
?.
id
,
i
d
:
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/p
age"
path=
"/
studentTrain/questionP
age"
extraparams=
{
{
trainI
d
:
params
?.
id
,
i
d
:
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
>
...
...
src/pages/usercenter/index.jsx
View file @
025c86bf
...
...
@@ -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
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment