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
10337167
Commit
10337167
authored
May 10, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daer
parent
adbe0ad2
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1245 additions
and
58 deletions
+1245
-58
routes.ts
config/routes.ts
+5
-0
index.jsx
src/components/ImportExcel/index.jsx
+1
-1
index.jsx
src/components/InitForm/EditTable/index.jsx
+1
-0
sxcard.jsx
src/components/ProductCard/sxcard.jsx
+5
-6
index.jsx
src/components/TreeRender/index.jsx
+2
-6
sxtree.jsx
src/components/TreeRender/sxtree.jsx
+523
-0
index.jsx
src/pages/bustrain/index.jsx
+35
-37
index.jsx
src/pages/dobustrain/index.jsx
+558
-0
index.less
src/pages/dobustrain/index.less
+12
-0
index.jsx
src/pages/lessons/index.jsx
+103
-8
No files found.
config/routes.ts
View file @
10337167
...
...
@@ -104,6 +104,11 @@ export default [
path
:
"/work/dolessons/:id"
,
component
:
"./dolessons"
,
},
{
name
:
"备课"
,
path
:
"/work/dobustrain/:id"
,
component
:
"./dobustrain"
,
},
],
},
{
...
...
src/components/ImportExcel/index.jsx
View file @
10337167
...
...
@@ -8,7 +8,7 @@ function ImportExcel() {
return
(
<>
<
Stack
direction=
{
"row"
}
gap=
{
1
}
>
<
Stack
direction=
{
"row"
}
>
<
Button
variant=
"outlined"
onClick=
{
()
=>
{
...
...
src/components/InitForm/EditTable/index.jsx
View file @
10337167
...
...
@@ -155,6 +155,7 @@ const EditTable = (props) => {
}
}
search=
{
{
filterType
:
'light'
,
//轻量模式
placement
:
"bottomLeft"
}
}
/>
);
...
...
src/components/ProductCard/sxcard.jsx
View file @
10337167
...
...
@@ -19,10 +19,10 @@ import AccessTimeFilledIcon from "@mui/icons-material/AccessTimeFilled";
import
CheckIcon
from
"@mui/icons-material/Check"
;
import
DeleteIcon
from
"@mui/icons-material/Delete"
;
import
EditIcon
from
"@mui/icons-material/Edit"
;
import
GroupIcon
from
"@mui/icons-material/Group"
;
import
{
history
}
from
"@umijs/max"
;
import
{
Progress
}
from
"antd"
;
import
dayjs
from
"dayjs"
;
import
GroupIcon
from
'@mui/icons-material/Group'
;
import
{
useState
}
from
"react"
;
// ----------------------------------------------------------------------
...
...
@@ -60,7 +60,6 @@ export default function ShopProductCard({
studentNum
,
totalSubmitExperimentNum
,
totalExperimentNum
,
}
=
product
;
const
[
confirm
,
setconfirm
]
=
useState
(
false
);
...
...
@@ -276,7 +275,7 @@ export default function ShopProductCard({
direction=
{
"row"
}
alignItems=
{
"center"
}
onClick=
{
()
=>
{
history
.
push
(
"/work/do
lessons
/"
+
product
.
id
);
history
.
push
(
"/work/do
bustrain
/"
+
product
.
id
);
}
}
sx=
{
{
cursor
:
"pointer"
}
}
>
...
...
@@ -306,10 +305,10 @@ export default function ShopProductCard({
<
Stack
direction=
{
"row"
}
alignItems=
{
"center"
}
sx=
{
{
cursor
:
"pointer"
}
}
onClick=
{
()
=>
{
history
.
push
(
"/work/dolessons/"
+
product
.
id
);
authorized
(
product
);
}
}
sx=
{
{
cursor
:
"pointer"
}
}
>
<
IconFont
type=
"icon-shouquanguanli"
...
...
src/components/TreeRender/index.jsx
View file @
10337167
...
...
@@ -178,7 +178,7 @@ function TreeRender({
}
}
>
<
span
style=
{
{
marginRight
:
6
}
}
>
{
title
}
</
span
>
<
div
className=
"center"
style=
{
{
gap
:
8
}
}
>
<
div
className=
"center"
style=
{
{
gap
:
8
}
}
>
{
item
.
key
&&
item
.
key
!=
"00000000"
&&
(
<
Tooltip
title=
"编辑"
...
...
@@ -239,7 +239,6 @@ function TreeRender({
okText=
"删除"
cancelText=
"取消"
onConfirm=
{
()
=>
{
console
.
log
(
111
);
doFetch
({
url
:
deleteurl
,
params
:
{
id
:
item
.
key
}
}).
then
(
(
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
...
...
@@ -250,12 +249,9 @@ function TreeRender({
);
}
}
>
<
Tooltip
title=
"删除"
>
<
Tooltip
title=
"删除"
placement=
"bottom"
>
<
div
className=
"bgs"
>
<
HorizontalRuleIcon
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
}
}
style=
{
{
color
:
"red"
,
fontSize
:
16
}
}
/>
</
div
>
...
...
src/components/TreeRender/sxtree.jsx
0 → 100644
View file @
10337167
This diff is collapsed.
Click to expand it.
src/pages/bustrain/index.jsx
View file @
10337167
...
...
@@ -59,25 +59,17 @@ function Lessons() {
});
};
const
copy
=
(
row
)
=>
{
setdialogprops
({
open
:
true
,
defaultFormValue
:
{
...
row
},
title
:
"复制创建"
,
});
};
const
authorized
=
(
row
)
=>
{
doFetch
({
url
:
"/
busTrainTeacher/queryRelationTeacher
"
,
params
:
{
course
Id
:
row
?.
id
},
url
:
"/
trainStudent/queryRelationStudent
"
,
params
:
{
train
Id
:
row
?.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
===
"0000"
)
{
setdialogprops
({
open
:
true
,
maxWidth
:
"xl"
,
defaultFormValue
:
{
...
row
},
teacher
IdList
:
res
?.
data
?.
dataList
,
student
IdList
:
res
?.
data
?.
dataList
,
title
:
"授权"
,
});
}
...
...
@@ -146,9 +138,7 @@ function Lessons() {
dialogprops=
{
dialogprops
}
maxWidth=
{
dialogprops
?.
maxWidth
??
"xs"
}
>
{
dialogprops
?.
title
===
"编辑"
||
dialogprops
?.
title
===
"新增实训"
||
dialogprops
?.
title
===
"复制创建"
?
(
{
dialogprops
?.
title
===
"编辑"
||
dialogprops
?.
title
===
"新增实训"
?
(
<
InitForm
fields=
{
columns
}
defaultFormValue=
{
dialogprops
?.
defaultFormValue
}
...
...
@@ -183,13 +173,6 @@ function Lessons() {
id
:
dialogprops
?.
defaultFormValue
?.
id
,
};
break
;
case
"复制创建"
:
url
=
"/busTrain/copy"
;
postdata
=
{
...
val
,
id
:
dialogprops
?.
defaultFormValue
?.
id
,
};
break
;
default
:
break
;
}
...
...
@@ -202,14 +185,14 @@ function Lessons() {
)
:
(
<
InitForm
defaultFormValue=
{
{
teacherIdList
:
dialogprops
?.
teacher
IdList
,
studentIdList
:
dialogprops
?.
student
IdList
,
}
}
fields=
{
[
{
rowKey
:
"id"
,
rowName
:
"id"
,
valueType
:
"FormSelectList"
,
dataIndex
:
"
teacher
IdList"
,
dataIndex
:
"
student
IdList"
,
colProps
:
{
span
:
24
,
},
...
...
@@ -218,40 +201,48 @@ function Lessons() {
title
:
"账号"
,
key
:
"userAccount"
,
dataIndex
:
"userAccount"
,
readonly
:
tru
e
,
editable
:
fals
e
,
},
{
title
:
"
教师
姓名"
,
title
:
"
学生
姓名"
,
key
:
"name"
,
dataIndex
:
"name"
,
readonly
:
tru
e
,
editable
:
fals
e
,
},
{
title
:
"学校名称"
,
key
:
"school
Name
"
,
key
:
"school
Id
"
,
dataIndex
:
"schoolName"
,
readonly
:
true
,
valueType
:
"select"
,
search
:
false
,
editable
:
false
,
},
{
title
:
"院系名称"
,
key
:
"departmentName"
,
dataIndex
:
"departmentName"
,
readonly
:
true
,
editable
:
false
,
},
{
title
:
"班级名称"
,
key
:
"className"
,
dataIndex
:
"className"
,
editable
:
false
,
},
],
path
:
"/user/
page
"
,
path
:
"/user/
getAllStudentByCurrentTeacherSchool
"
,
params
:
{
type
:
"
2
"
,
type
:
"
3
"
,
},
},
]
}
onFinish=
{
(
val
)
=>
{
const
teacherIdList
=
val
?.
teacher
IdList
?.
map
((
it
)
=>
it
?.
id
);
const
studentIdList
=
val
?.
student
IdList
?.
map
((
it
)
=>
it
?.
id
);
runAsync
({
url
:
"/
busTrainTeacher/relationCourseTeacher
"
,
url
:
"/
trainStudent/relationTrainStudent
"
,
params
:
{
teacher
IdList
,
course
Id
:
dialogprops
?.
defaultFormValue
?.
id
,
student
IdList
,
train
Id
:
dialogprops
?.
defaultFormValue
?.
id
,
},
});
}
}
...
...
@@ -291,7 +282,15 @@ function Lessons() {
{
datalist
?.
loading
&&
!
datalist
?.
data
?
(
PRODUCTS
?.
map
((
product
,
i
)
=>
{
return
(
<
Grid
key=
{
product
.
id
}
item
xs=
{
12
}
sm=
{
6
}
md=
{
4
}
lg=
{
3
}
xl=
{
2.4
}
>
<
Grid
key=
{
product
.
id
}
item
xs=
{
12
}
sm=
{
6
}
md=
{
4
}
lg=
{
3
}
xl=
{
2.4
}
>
<
ShopProductLoadingCard
product=
{
product
}
/>
</
Grid
>
);
...
...
@@ -307,7 +306,6 @@ function Lessons() {
product=
{
product
}
loading=
{
datalist
?.
loading
}
edit=
{
edit
}
copy=
{
copy
}
remove=
{
remove
}
publish=
{
publish
}
authorized=
{
authorized
}
...
...
src/pages/dobustrain/index.jsx
0 → 100644
View file @
10337167
This diff is collapsed.
Click to expand it.
src/pages/dobustrain/index.less
0 → 100644
View file @
10337167
.white {
.ant-pro-card {
background-color: #f6f6f6 !important;
}
.ant-table-tbody,td {
background-color: #f9f9f9 !important;
}
}
.ant-tree{
background-color: transparent !important;
}
\ No newline at end of file
src/pages/lessons/index.jsx
View file @
10337167
...
...
@@ -7,8 +7,11 @@ import ShopProductLoadingCard from "@/components/ProductCard/loading";
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
PRODUCTS
from
"@/_mock/products"
;
import
{
Box
,
Container
,
Grid
,
Stack
,
Typography
}
from
"@mui/material"
;
import
Checkbox
from
"@mui/material/Checkbox"
;
import
FormControlLabel
from
"@mui/material/FormControlLabel"
;
import
FormGroup
from
"@mui/material/FormGroup"
;
import
{
useRequest
}
from
"ahooks"
;
import
{
Empty
,
message
}
from
"antd"
;
import
{
Empty
,
Input
,
message
}
from
"antd"
;
import
{
useMemo
,
useState
}
from
"react"
;
import
"./index.less"
;
...
...
@@ -19,7 +22,7 @@ function Lessons() {
const
[
params
,
setparams
]
=
useState
({
courseName
:
""
,
status
:
null
,
type
:
null
,
type
List
:
[
"1"
,
"2"
,
"3"
]
,
});
const
handleClose
=
()
=>
{
...
...
@@ -47,6 +50,7 @@ function Lessons() {
},
{
debounceWait
:
400
,
refreshDeps
:[
params
]
}
);
...
...
@@ -184,25 +188,25 @@ function Lessons() {
title
:
"账号"
,
key
:
"userAccount"
,
dataIndex
:
"userAccount"
,
readonly
:
tru
e
,
editable
:
fals
e
,
},
{
title
:
"教师姓名"
,
key
:
"name"
,
dataIndex
:
"name"
,
readonly
:
tru
e
,
editable
:
fals
e
,
},
{
title
:
"学校名称"
,
key
:
"schoolName"
,
dataIndex
:
"schoolName"
,
readonly
:
tru
e
,
editable
:
fals
e
,
},
{
title
:
"院系名称"
,
key
:
"departmentName"
,
dataIndex
:
"departmentName"
,
readonly
:
tru
e
,
editable
:
fals
e
,
},
],
path
:
"/user/page"
,
...
...
@@ -232,8 +236,91 @@ function Lessons() {
mt=
{
0
}
>
<
Typography
variant=
"h5"
>
课程管理
</
Typography
>
<
Stack
spacing=
{
2
}
direction=
"row"
>
<
Stack
spacing=
{
2
}
direction=
"row"
flex=
{
1
}
justifyContent=
{
"flex-end"
}
>
<
FormControlLabel
control=
{
<
Checkbox
checked=
{
params
?.
typeList
?.
length
===
3
}
indeterminate=
{
params
?.
typeList
?.
length
>
0
&&
params
?.
typeList
?.
length
<
3
}
/>
}
label=
"全部"
onChange=
{
(
e
)
=>
{
setparams
((
s
)
=>
{
let
news
=
[];
if
(
e
.
target
.
checked
)
{
news
=
[
"1"
,
"2"
,
"3"
];
}
return
{
...
s
,
typeList
:
news
,
};
});
}
}
/>
<
FormGroup
row
value=
{
params
?.
typeList
??
[]
}
onChange=
{
(
e
)
=>
{
let
val
=
e
.
target
.
value
;
setparams
((
s
)
=>
{
let
news
=
[...
s
?.
typeList
];
if
(
news
.
includes
(
val
))
{
news
=
news
.
filter
((
it
)
=>
it
!==
val
);
}
else
{
news
=
[...
news
,
val
];
}
console
.
log
(
news
);
return
{
...
s
,
typeList
:
news
,
};
});
}
}
>
<
FormControlLabel
control=
{
<
Checkbox
checked=
{
params
?.
typeList
?.
includes
(
"1"
)
}
color=
{
"warning"
}
/>
}
label=
"待发布"
value=
{
1
}
/>
<
FormControlLabel
control=
{
<
Checkbox
checked=
{
params
?.
typeList
?.
includes
(
"2"
)
}
color=
{
"info"
}
/>
}
label=
"已发布"
value=
{
2
}
/>
<
FormControlLabel
control=
{
<
Checkbox
checked=
{
params
?.
typeList
?.
includes
(
"3"
)
}
color=
{
"default"
}
/>
}
label=
"已关闭"
value=
{
3
}
/>
</
FormGroup
>
<
Input
placeholder=
"请输入课程名称"
style=
{
{
width
:
200
}
}
value=
{
params
?.
courseName
}
onChange=
{
(
e
)
=>
{
setparams
(
s
=>
({
...
s
,
courseName
:
e
.
target
.
value
}))
}
}
></
Input
>
<
ImportExcel
></
ImportExcel
>
<
PremButton
btn=
{
{
variant
:
"contained"
,
...
...
@@ -257,7 +344,15 @@ function Lessons() {
{
datalist
?.
loading
&&
!
datalist
?.
data
?
(
PRODUCTS
?.
map
((
product
,
i
)
=>
{
return
(
<
Grid
key=
{
product
.
id
}
item
xs=
{
12
}
sm=
{
6
}
md=
{
4
}
lg=
{
3
}
xl=
{
2.4
}
>
<
Grid
key=
{
product
.
id
}
item
xs=
{
12
}
sm=
{
6
}
md=
{
4
}
lg=
{
3
}
xl=
{
2.4
}
>
<
ShopProductLoadingCard
product=
{
product
}
/>
</
Grid
>
);
...
...
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