Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
34887728
Commit
34887728
authored
May 25, 2021
by
guomingpang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:外部课程相关模块提交
parent
8d29826f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
48 deletions
+24
-48
src/modules/course-manage/video-course/components/VideoCourseList.jsx
+24
-48
No files found.
src/modules/course-manage/video-course/components/VideoCourseList.jsx
View file @
34887728
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
<<<<<<< HEAD
* @LastEditors: wufan
* @LastEditTime: 2021-05-13 16:34:11
=======
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-05-23 02:14:30
>>>>>>> 4ed93ca (feat:新增视频课外部视频模块相关功能,准备开始冒烟测试)
* @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import
React
from
'react'
import
React
from
'react'
import
{
Table
,
Modal
,
message
,
Tooltip
,
Switch
,
Dropdown
}
from
'antd'
import
{
Table
,
Modal
,
message
,
Tooltip
,
Switch
,
Dropdown
}
from
'antd'
...
@@ -32,7 +19,7 @@ class VideoCourseList extends React.Component {
...
@@ -32,7 +19,7 @@ class VideoCourseList extends React.Component {
id
:
''
,
// 视频课ID
id
:
''
,
// 视频课ID
studentIds
:
[],
studentIds
:
[],
RelatedPlanModalVisible
:
false
,
RelatedPlanModalVisible
:
false
,
selectPlanList
:
{}
selectPlanList
:
{}
,
}
}
}
}
...
@@ -54,7 +41,7 @@ class VideoCourseList extends React.Component {
...
@@ -54,7 +41,7 @@ class VideoCourseList extends React.Component {
data=
{
record
}
data=
{
record
}
close=
{
()
=>
{
close=
{
()
=>
{
this
.
setState
({
this
.
setState
({
watchDataModal
:
null
watchDataModal
:
null
,
})
})
}
}
}
}
/>
/>
...
@@ -90,7 +77,7 @@ class VideoCourseList extends React.Component {
...
@@ -90,7 +77,7 @@ class VideoCourseList extends React.Component {
</
Choose
>
</
Choose
>
</
div
>
</
div
>
)
)
}
}
,
},
},
{
{
title
:
'课程分类'
,
title
:
'课程分类'
,
...
@@ -111,7 +98,7 @@ class VideoCourseList extends React.Component {
...
@@ -111,7 +98,7 @@ class VideoCourseList extends React.Component {
</
Otherwise
>
</
Otherwise
>
</
Choose
>
</
Choose
>
)
)
}
}
,
},
},
{
{
title
:
'创建人'
,
title
:
'创建人'
,
...
@@ -128,15 +115,9 @@ class VideoCourseList extends React.Component {
...
@@ -128,15 +115,9 @@ class VideoCourseList extends React.Component {
)
}
)
}
</
div
>
</
div
>
)
)
}
}
,
},
},
{
{
<<
<
<<<<
HEAD
title
:
<
span
>
<
span
>
学院展示
</
span
>
<
Tooltip
title=
{
<
div
>
开启后,学员可在学院内查看到此课程。
<
br
/>
关闭后,学院内不再展示此课程,但学员仍可通过分享的海报/链接查看此课程。
</
div
>
}
><
i
className=
"icon iconfont"
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
}
}
>

</
i
></
Tooltip
>
</
span
>,
=======
title
:
(
title
:
(
<
span
>
<
span
>
<
span
>
学院展示
</
span
>
<
span
>
学院展示
</
span
>
...
@@ -154,25 +135,20 @@ class VideoCourseList extends React.Component {
...
@@ -154,25 +135,20 @@ class VideoCourseList extends React.Component {
</
Tooltip
>
</
Tooltip
>
</
span
>
</
span
>
),
),
>>>>>>>
4
ed93ca
(
feat
:
新增视频课外部视频模块相关功能
,
准备开始冒烟测试
)
width
:
120
,
width
:
120
,
dataIndex
:
'courseware'
,
dataIndex
:
'courseware'
,
render
:
(
val
,
item
,
index
)
=>
{
render
:
(
val
,
item
,
index
)
=>
{
return
<
Switch
defaultChecked=
{
item
.
shelfState
===
'YES'
?
true
:
false
}
onChange=
{
()
=>
this
.
changeShelfState
(
item
)
}
/>
return
<
Switch
defaultChecked=
{
item
.
shelfState
===
'YES'
?
true
:
false
}
onChange=
{
()
=>
this
.
changeShelfState
(
item
)
}
/>
}
}
,
},
},
{
{
<<
<
<<<<
HEAD
title
:
'观看学员数'
,
title
:
"观看学员数",
=======
title
:
'观看用户数',
>
>>>>>>
4ed93ca (feat:新增视频课外部视频模块相关功能,准备开始冒烟测试)
width
:
110
,
width
:
110
,
key
:
'watchUserCount'
,
key
:
'watchUserCount'
,
dataIndex
:
'watchUserCount'
,
dataIndex
:
'watchUserCount'
,
render
:
(
val
,
item
)
=>
{
render
:
(
val
,
item
)
=>
{
return
<
div
className=
'watchUserCount'
>
{
val
}
</
div
>
return
<
div
className=
'watchUserCount'
>
{
val
}
</
div
>
}
}
,
},
},
{
{
title
:
'创建时间'
,
title
:
'创建时间'
,
...
@@ -182,7 +158,7 @@ class VideoCourseList extends React.Component {
...
@@ -182,7 +158,7 @@ class VideoCourseList extends React.Component {
sorter
:
true
,
sorter
:
true
,
render
:
(
val
)
=>
{
render
:
(
val
)
=>
{
return
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
return
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
}
}
,
},
},
{
{
title
:
'更新时间'
,
title
:
'更新时间'
,
...
@@ -192,7 +168,7 @@ class VideoCourseList extends React.Component {
...
@@ -192,7 +168,7 @@ class VideoCourseList extends React.Component {
sorter
:
true
,
sorter
:
true
,
render
:
(
val
)
=>
{
render
:
(
val
)
=>
{
return
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
return
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
}
}
,
},
},
{
{
title
:
'关联项'
,
title
:
'关联项'
,
...
@@ -220,7 +196,7 @@ class VideoCourseList extends React.Component {
...
@@ -220,7 +196,7 @@ class VideoCourseList extends React.Component {
</
Choose
>
</
Choose
>
</
div
>
</
div
>
)
)
}
}
,
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
...
@@ -249,8 +225,8 @@ class VideoCourseList extends React.Component {
...
@@ -249,8 +225,8 @@ class VideoCourseList extends React.Component {
</
Dropdown
>
</
Dropdown
>
</
div
>
</
div
>
)
)
}
}
,
}
}
,
]
]
type
!==
'internal'
&&
columns
.
splice
(
2
,
1
)
type
!==
'internal'
&&
columns
.
splice
(
2
,
1
)
...
@@ -270,7 +246,7 @@ class VideoCourseList extends React.Component {
...
@@ -270,7 +246,7 @@ class VideoCourseList extends React.Component {
<
div
<
div
className=
'operate__item'
className=
'operate__item'
onClick=
{
()
=>
{
onClick=
{
()
=>
{
W
indow
.
RCHistory
.
push
(
`/create-video-course?type=edit&id=${item.id}`
)
w
indow
.
RCHistory
.
push
(
`/create-video-course?type=edit&id=${item.id}`
)
}
}
>
}
}
>
编辑
编辑
</
div
>
</
div
>
...
@@ -305,7 +281,7 @@ class VideoCourseList extends React.Component {
...
@@ -305,7 +281,7 @@ class VideoCourseList extends React.Component {
}
}
const
params
=
{
const
params
=
{
courseId
:
item
.
id
,
courseId
:
item
.
id
,
shelfState
:
_shelfState
shelfState
:
_shelfState
,
}
}
CourseService
.
changeVideoShelfState
(
params
).
then
((
res
)
=>
{
CourseService
.
changeVideoShelfState
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
...
@@ -330,13 +306,13 @@ class VideoCourseList extends React.Component {
...
@@ -330,13 +306,13 @@ class VideoCourseList extends React.Component {
onOk
:
()
=>
{
onOk
:
()
=>
{
const
param
=
{
const
param
=
{
courseId
:
scheduleId
,
courseId
:
scheduleId
,
storeId
:
User
.
getStoreId
()
storeId
:
User
.
getStoreId
()
,
}
}
CourseService
.
delVideoSchedule
(
param
).
then
(()
=>
{
CourseService
.
delVideoSchedule
(
param
).
then
(()
=>
{
message
.
success
(
'删除成功'
)
message
.
success
(
'删除成功'
)
this
.
props
.
onChange
()
this
.
props
.
onChange
()
})
})
}
}
,
})
})
}
}
...
@@ -350,7 +326,7 @@ class VideoCourseList extends React.Component {
...
@@ -350,7 +326,7 @@ class VideoCourseList extends React.Component {
longUrl
,
longUrl
,
coverUrl
,
coverUrl
,
scheduleVideoUrl
,
scheduleVideoUrl
,
courseName
courseName
,
}
}
const
shareLiveModal
=
(
const
shareLiveModal
=
(
...
@@ -361,7 +337,7 @@ class VideoCourseList extends React.Component {
...
@@ -361,7 +337,7 @@ class VideoCourseList extends React.Component {
title=
'视频课'
title=
'视频课'
close=
{
()
=>
{
close=
{
()
=>
{
this
.
setState
({
this
.
setState
({
shareLiveModal
:
null
shareLiveModal
:
null
,
})
})
localStorage
.
setItem
(
'videoCourseItem'
,
''
)
localStorage
.
setItem
(
'videoCourseItem'
,
''
)
}
}
}
}
...
@@ -394,7 +370,7 @@ class VideoCourseList extends React.Component {
...
@@ -394,7 +370,7 @@ class VideoCourseList extends React.Component {
const
_query
=
{
const
_query
=
{
...
query
,
...
query
,
orderEnum
:
_order
orderEnum
:
_order
,
}
}
this
.
props
.
onChange
(
_query
)
this
.
props
.
onChange
(
_query
)
}
}
...
@@ -411,23 +387,23 @@ class VideoCourseList extends React.Component {
...
@@ -411,23 +387,23 @@ class VideoCourseList extends React.Component {
this
.
setState
({
this
.
setState
({
RelatedPlanModalVisible
:
true
,
RelatedPlanModalVisible
:
true
,
selectCourseId
:
item
.
id
,
selectCourseId
:
item
.
id
,
selectPlanList
:
selectPlanList
selectPlanList
:
selectPlanList
,
})
})
}
}
closeRelatedPlanModalVisible
=
()
=>
{
closeRelatedPlanModalVisible
=
()
=>
{
this
.
setState
({
this
.
setState
({
RelatedPlanModalVisible
:
false
RelatedPlanModalVisible
:
false
,
})
})
}
}
onChangeSelectPlanList
=
(
selectPlanList
)
=>
{
onChangeSelectPlanList
=
(
selectPlanList
)
=>
{
this
.
setState
({
this
.
setState
({
selectPlanList
:
selectPlanList
selectPlanList
:
selectPlanList
,
})
})
}
}
onConfirmSelectPlanList
=
()
=>
{
onConfirmSelectPlanList
=
()
=>
{
this
.
setState
(
this
.
setState
(
{
{
RelatedPlanModalVisible
:
false
RelatedPlanModalVisible
:
false
,
},
},
()
=>
{
()
=>
{
this
.
props
.
onChange
()
this
.
props
.
onChange
()
...
...
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