Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
Details
Activity
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
wangxuelai
biz.qingxiao.com
Commits
0fab8d00
Commit
0fab8d00
authored
Nov 27, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
15393118
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
5 deletions
+104
-5
index.html
index.html
+1
-1
coursegatherdetail.js
src/models/coursegatherdetail.js
+12
-0
CourseBox.js
src/pages/coursegather/detail/CourseBox.js
+22
-2
index.js
src/pages/coursegather/detail/index.js
+67
-1
ChangePsdModal.js
src/pages/onlineclasses/ChangePsdModal.js
+2
-1
No files found.
index.html
View file @
0fab8d00
...
...
@@ -17,6 +17,6 @@
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"dist/main.js?157477
1021223
"
charset=
"utf-8"
></script>
<script
src=
"dist/main.js?157477
9111827
"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
src/models/coursegatherdetail.js
View file @
0fab8d00
...
...
@@ -1665,6 +1665,12 @@ export default {
info
:
{},
},
});
yield
put
({
type
:
'selectCourseList'
,
payload
:
{
params
:
{},
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
...
...
@@ -1780,6 +1786,12 @@ export default {
info
:
{},
},
});
yield
put
({
type
:
'selectCourseList'
,
payload
:
{
params
:
{},
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
...
...
src/pages/coursegather/detail/CourseBox.js
View file @
0fab8d00
import
React
from
'react'
;
import
{
List
,
Icon
,
DatePicker
,
Form
,
Card
,
Button
,
Menu
,
Dropdown
,
Input
}
from
'antd'
;
import
{
List
,
Icon
,
DatePicker
,
Form
,
Card
,
Button
,
Menu
,
Dropdown
,
Input
,
Pagination
}
from
'antd'
;
import
moment
from
'moment'
;
import
pageStyle
from
'./CourseBox.less'
;
import
{
imagify
}
from
'../../../utils'
;
...
...
@@ -85,6 +85,11 @@ class CourseBoxForm extends React.Component {
toCreateSingleCourse
,
toEditSingleCourse
,
cancelEditSingleCourse
,
toAddCourseWare2
,
courseListTotal
,
courseQueryParams
,
sizeChange
,
onChangeCourseList
,
}
=
this
.
props
;
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
formItemModalLineLayout
=
{
...
...
@@ -128,6 +133,20 @@ class CourseBoxForm extends React.Component {
xxl
:
4
,
}}
dataSource
=
{
list
}
footer
=
{
<
div
className
=
{
pageStyle
.
tablefooterbox
}
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
Pagination
showSizeChanger
showQuickJumper
onShowSizeChange
=
{
sizeChange
}
total
=
{
Number
(
total
)}
onChange
=
{
onChangeCourseList
}
current
=
{
Number
(
courseQueryParams
.
page
)
||
1
}
pageSize
=
{
courseQueryParams
.
perPage
}
pageSizeOptions
=
{[
'12'
,
'24'
,
'36'
,
'48'
,
'60'
]}
/
>
<
/div
>
}
renderItem
=
{
item
=>
(
<
List
.
Item
style
=
{{
minWidth
:
'320px'
}}
className
=
{
pageStyle
.
listitem
}
>
<
Card
bodyStyle
=
{{
padding
:
20
,
minWidth
:
'320px'
}}
>
...
...
@@ -148,8 +167,9 @@ class CourseBoxForm extends React.Component {
style
=
{{
marginRight
:
'16px'
,
color
:
'#2194FF'
,
lineHeight
:
1
,
whiteSpace
:
'nowrap'
,
}}
onClick
=
{()
=>
toAddCourseWare2
(
item
)}
>
编辑课件
{
item
.
content
&&
JSON
.
parse
(
item
.
content
)
&&
JSON
.
parse
(
item
.
content
).
src
?
'编辑课件'
:
'上传课件'
}
<
/span
>
<
span
className
=
"hreflink"
...
...
src/pages/coursegather/detail/index.js
View file @
0fab8d00
...
...
@@ -65,6 +65,15 @@ class StaticCenter extends React.Component {
callback
();
}
}
closePsd
=
(
value
,
callback
)
=>
{
const
{
dispatch
,
addCourseObj
}
=
this
.
props
;
this
.
setState
({
psdChangeShow
:
false
,
});
if
(
callback
&&
(
typeof
callback
==
'function'
))
{
callback
();
}
}
tabShift
=
(
tab
)
=>
{
const
{
dispatch
,
gatherDetail
}
=
this
.
props
;
dispatch
({
...
...
@@ -385,7 +394,6 @@ class StaticCenter extends React.Component {
}
materialSave
=
(
values
)
=>
{
const
{
dispatch
,
materiaSaveTo
,
editSingleCourseInfo
}
=
this
.
props
;
console
.
log
(
materiaSaveTo
,
'materiaSaveTomateriaSaveTo'
);
if
(
materiaSaveTo
==
1
)
{
dispatch
({
type
:
'coursegatherdetail/updateCover'
,
...
...
@@ -656,6 +664,32 @@ class StaticCenter extends React.Component {
},
});
}
toAddCourseWare2
=
(
item
)
=>
{
const
{
dispatch
,
editSingleCourseInfo
}
=
this
.
props
;
this
.
setState
({
addWareType
:
2
,
});
dispatch
({
type
:
'coursegatherdetail/updateState'
,
payload
:
{
editSingleCourseId
:
item
.
id
,
editSingleCourseInfo
:
{
id
:
item
.
id
,
title
:
item
.
title
,
start_time
:
item
.
start_time
,
cover
:
item
.
cover
,
content
:
JSON
.
parse
(
item
.
content
),
},
},
});
dispatch
({
type
:
'uploadcourseware/updateState'
,
payload
:
{
visible
:
true
,
info
:
(
JSON
.
parse
(
item
.
content
))
||
{},
},
});
}
toCreateSingleCourse
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
...
...
@@ -732,6 +766,30 @@ class StaticCenter extends React.Component {
choosedPoster
:
''
,
});
}
courseListSizeChange
=
(
page
,
perPage
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'coursegatherdetail/selectCourseList'
,
payload
:
{
params
:
{
page
:
1
,
perPage
,
},
},
});
}
onChangeCourseList
=
(
page
,
perPage
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'coursegatherdetail/selectCourseList'
,
payload
:
{
params
:
{
page
,
perPage
,
},
},
});
}
render
()
{
const
that
=
this
;
const
{
...
...
@@ -764,6 +822,7 @@ class StaticCenter extends React.Component {
editSingleCourseInfo
,
saveSingleCourseSubmitting
,
addCourseObj
,
courseQueryParams
,
}
=
this
.
props
;
const
menu
=
(
<
Menu
>
...
...
@@ -822,6 +881,10 @@ class StaticCenter extends React.Component {
toCreateSingleCourse
=
{
this
.
toCreateSingleCourse
}
toEditSingleCourse
=
{
this
.
toEditSingleCourse
}
cancelEditSingleCourse
=
{
this
.
cancelEditSingleCourse
}
toAddCourseWare2
=
{
this
.
toAddCourseWare2
}
courseQueryParams
=
{
courseQueryParams
}
sizeChange
=
{
this
.
courseListSizeChange
}
onChangeCourseList
=
{
this
.
onChangeCourseList
}
/>
}
{
tabIndex
==
2
&&
<
StaticBox
staticTotalInfo
=
{
staticTotalInfo
}
...
...
@@ -879,6 +942,7 @@ class StaticCenter extends React.Component {
/
>
<
ChangePsdModal
visible
=
{
this
.
state
.
psdChangeShow
}
close
=
{
this
.
closePsd
}
info
=
{
addCourseObj
}
save
=
{
this
.
savePsd
}
/
>
...
...
@@ -955,6 +1019,7 @@ function mapStateToProps(state) {
editSingleCourseInfo
,
saveSingleCourseSubmitting
,
addCourseObj
,
courseQueryParams
,
}
=
state
.
coursegatherdetail
;
return
{
tabIndex
,
...
...
@@ -988,6 +1053,7 @@ function mapStateToProps(state) {
editSingleCourseInfo
,
saveSingleCourseSubmitting
,
addCourseObj
,
courseQueryParams
,
};
}
export
default
connect
(
mapStateToProps
)(
StaticCenter
);
...
...
src/pages/onlineclasses/ChangePsdModal.js
View file @
0fab8d00
...
...
@@ -23,8 +23,9 @@ class ChangePsdModal extends React.Component {
componentWillUnmount
()
{
// 卸载
}
close
=
()
=>
{
const
{
close
}
=
this
.
props
;
const
{
close
,
form
}
=
this
.
props
;
close
();
form
.
resetFields
();
}
save
=
(
e
)
=>
{
const
{
save
,
form
}
=
this
.
props
;
...
...
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