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
a0a455ba
Commit
a0a455ba
authored
Jul 28, 2021
by
guomingpang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: l l l ll l l lcategorySonName
parent
c0226200
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
175 additions
and
175 deletions
+175
-175
src/modules/course-manage/components/LiveCourseList.jsx
+172
-172
src/modules/course-manage/graphics-course/components/GraphicsCourseList.jsx
+1
-1
src/modules/course-manage/offline-course/components/OfflineCourseList.jsx
+1
-1
src/modules/course-manage/video-course/components/VideoCourseList.jsx
+1
-1
No files found.
src/modules/course-manage/components/LiveCourseList.jsx
View file @
a0a455ba
...
@@ -6,25 +6,25 @@
...
@@ -6,25 +6,25 @@
* @Description: 大班直播、互动班课的直播课列表
* @Description: 大班直播、互动班课的直播课列表
*/
*/
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
import
college
from
'@/common/lottie/college'
;
import
college
from
'@/common/lottie/college'
import
{
PageControl
,
XMTable
}
from
'@/components'
;
import
{
PageControl
,
XMTable
}
from
'@/components'
import
DownloadLiveModal
from
'@/components/DownloadLiveModal'
;
import
DownloadLiveModal
from
'@/components/DownloadLiveModal'
import
BaseService
from
'@/domains/basic-domain/baseService'
;
import
BaseService
from
'@/domains/basic-domain/baseService'
import
{
LIVE_SHARE
}
from
'@/domains/course-domain/constants'
;
import
{
LIVE_SHARE
}
from
'@/domains/course-domain/constants'
import
CourseService
from
'@/domains/course-domain/CourseService'
;
import
CourseService
from
'@/domains/course-domain/CourseService'
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
import
{
Dropdown
,
message
,
Modal
,
Switch
,
Tooltip
}
from
'antd'
;
import
{
Dropdown
,
message
,
Modal
,
Switch
,
Tooltip
}
from
'antd'
import
React
from
'react'
;
import
React
from
'react'
import
{
Route
,
withRouter
}
from
'react-router-dom'
;
import
{
Route
,
withRouter
}
from
'react-router-dom'
import
_
from
'underscore'
;
import
_
from
'underscore'
import
DataList
from
'../DataList/DataList'
;
import
DataList
from
'../DataList/DataList'
import
ManageCoursewareModal
from
'../modal/ManageCoursewareModal'
;
import
ManageCoursewareModal
from
'../modal/ManageCoursewareModal'
import
RelatedPlanModal
from
'../modal/RelatedPlanModal'
;
import
RelatedPlanModal
from
'../modal/RelatedPlanModal'
import
ShareLiveModal
from
'../modal/ShareLiveModal'
;
import
ShareLiveModal
from
'../modal/ShareLiveModal'
import
'./LiveCourseList.less'
;
import
'./LiveCourseList.less'
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
const
courseStateShow
=
{
const
courseStateShow
=
{
UN_START
:
{
UN_START
:
{
code
:
1
,
code
:
1
,
...
@@ -46,33 +46,33 @@ const courseStateShow = {
...
@@ -46,33 +46,33 @@ const courseStateShow = {
title
:
'未成功开课'
,
title
:
'未成功开课'
,
color
:
'#999'
,
color
:
'#999'
,
},
},
}
;
}
class
LiveCourseList
extends
React
.
Component
{
class
LiveCourseList
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
;
super
(
props
)
this
.
state
=
{
this
.
state
=
{
columns
:
[],
columns
:
[],
openDownloadModal
:
false
,
openDownloadModal
:
false
,
url
:
''
,
url
:
''
,
RelatedPlanModalVisible
:
false
,
RelatedPlanModalVisible
:
false
,
selectPlanList
:
{},
selectPlanList
:
{},
}
;
}
}
}
componentWillMount
()
{
componentWillMount
()
{
this
.
parseColumns
()
;
this
.
parseColumns
()
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getDownloadVersion
()
;
this
.
getDownloadVersion
()
}
}
// 显示分享弹窗
// 显示分享弹窗
handleShowShareModal
=
(
item
,
needStr
=
false
)
=>
{
handleShowShareModal
=
(
item
,
needStr
=
false
)
=>
{
const
{
liveCourseId
}
=
item
;
const
{
liveCourseId
}
=
item
const
htmlUrl
=
`
${
LIVE_SHARE
}
live_detail/
${
liveCourseId
}
?id=
${
User
.
getStoreId
()}
`
;
const
htmlUrl
=
`
${
LIVE_SHARE
}
live_detail/
${
liveCourseId
}
?id=
${
User
.
getStoreId
()}
`
const
longUrl
=
htmlUrl
;
const
longUrl
=
htmlUrl
console
.
log
(
'htmlUrl'
,
htmlUrl
,
longUrl
)
;
console
.
log
(
'htmlUrl'
,
htmlUrl
,
longUrl
)
const
shareData
=
{
...
item
,
longUrl
}
;
const
shareData
=
{
...
item
,
longUrl
}
const
shareLiveModal
=
(
const
shareLiveModal
=
(
<
ShareLiveModal
<
ShareLiveModal
needStr=
{
needStr
}
needStr=
{
needStr
}
...
@@ -82,45 +82,45 @@ class LiveCourseList extends React.Component {
...
@@ -82,45 +82,45 @@ class LiveCourseList extends React.Component {
close=
{
()
=>
{
close=
{
()
=>
{
this
.
setState
({
this
.
setState
({
shareLiveModal
:
null
,
shareLiveModal
:
null
,
})
;
})
localStorage
.
setItem
(
'largeLiveCourseItem'
,
''
)
;
localStorage
.
setItem
(
'largeLiveCourseItem'
,
''
)
}
}
}
}
/>
/>
)
;
)
this
.
setState
({
shareLiveModal
})
;
this
.
setState
({
shareLiveModal
})
}
;
}
//改变上架状态
//改变上架状态
changeShelfState
=
(
index
,
item
,
checked
)
=>
{
changeShelfState
=
(
index
,
item
,
checked
)
=>
{
let
_shelfState
=
checked
?
'YES'
:
'NO'
;
let
_shelfState
=
checked
?
'YES'
:
'NO'
const
params
=
{
const
params
=
{
liveCourseId
:
item
.
liveCourseId
,
liveCourseId
:
item
.
liveCourseId
,
shelfState
:
_shelfState
,
shelfState
:
_shelfState
,
}
;
}
CourseService
.
turnOnOrOffLiveCloudCourse
(
params
).
then
((
res
)
=>
{
CourseService
.
turnOnOrOffLiveCloudCourse
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
if
(
_shelfState
===
'YES'
)
{
if
(
_shelfState
===
'YES'
)
{
message
.
success
(
'已开启展示'
)
;
message
.
success
(
'已开启展示'
)
}
else
{
}
else
{
message
.
success
(
'已取消展示'
);
message
.
success
(
'已取消展示'
)
}
this
.
props
.
changeShelfState
(
index
,
_shelfState
)
}
}
this
.
props
.
changeShelfState
(
index
,
_shelfState
);
})
}
}
});
};
// 前往上课数据页面
// 前往上课数据页面
handleLinkToClassData
=
(
item
)
=>
{
handleLinkToClassData
=
(
item
)
=>
{
const
{
match
}
=
this
.
props
;
const
{
match
}
=
this
.
props
window
.
RCHistory
.
push
({
window
.
RCHistory
.
push
({
pathname
:
`
${
match
.
url
}
/live-course-data?type=large&id=
${
item
.
liveCourseId
}
`
,
pathname
:
`
${
match
.
url
}
/live-course-data?type=large&id=
${
item
.
liveCourseId
}
`
,
})
;
})
}
;
}
parseColumns
=
()
=>
{
parseColumns
=
()
=>
{
let
columns
;
let
columns
const
userRole
=
User
.
getUserRole
()
;
const
userRole
=
User
.
getUserRole
()
if
(
userRole
!==
'CloudLecturer'
)
{
if
(
userRole
!==
'CloudLecturer'
)
{
columns
=
[
columns
=
[
{
{
...
@@ -130,15 +130,15 @@ class LiveCourseList extends React.Component {
...
@@ -130,15 +130,15 @@ class LiveCourseList extends React.Component {
fixed
:
'left'
,
fixed
:
'left'
,
dataIndex
:
'courseName'
,
dataIndex
:
'courseName'
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
let
hasCover
=
false
;
let
hasCover
=
false
return
(
return
(
<
div
className=
'record__item'
>
<
div
className=
'record__item'
>
{
record
.
courseMediaVOS
.
map
((
item
,
index
)
=>
{
{
record
.
courseMediaVOS
.
map
((
item
,
index
)
=>
{
if
(
item
.
contentType
===
'COVER'
)
{
if
(
item
.
contentType
===
'COVER'
)
{
hasCover
=
true
;
hasCover
=
true
return
<
img
key=
{
item
.
mediaContent
+
index
}
className=
'course-cover'
src=
{
item
.
mediaUrl
}
alt=
''
/>
;
return
<
img
key=
{
item
.
mediaContent
+
index
}
className=
'course-cover'
src=
{
item
.
mediaUrl
}
alt=
''
/>
}
else
{
}
else
{
return
null
;
return
null
}
}
})
}
})
}
{
!
hasCover
&&
<
img
className=
'course-cover'
src=
{
'https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png'
}
alt=
''
/>
}
{
!
hasCover
&&
<
img
className=
'course-cover'
src=
{
'https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png'
}
alt=
''
/>
}
...
@@ -189,7 +189,7 @@ class LiveCourseList extends React.Component {
...
@@ -189,7 +189,7 @@ class LiveCourseList extends React.Component {
<
span
key=
{
item
.
adminId
+
index
}
>
<
span
key=
{
item
.
adminId
+
index
}
>
{
item
.
adminName
}
{
index
<
record
.
admins
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
{
item
.
adminName
}
{
index
<
record
.
admins
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
</
span
>
</
span
>
)
;
)
})
}
})
}
</
span
>
</
span
>
</
Tooltip
>
</
Tooltip
>
...
@@ -202,7 +202,7 @@ class LiveCourseList extends React.Component {
...
@@ -202,7 +202,7 @@ class LiveCourseList extends React.Component {
<
span
>
<
span
>
{
item
.
adminName
}
{
index
<
record
.
admins
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
{
item
.
adminName
}
{
index
<
record
.
admins
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
</
span
>
</
span
>
)
;
)
})
}
})
}
</
span
>
</
span
>
</
Otherwise
>
</
Otherwise
>
...
@@ -211,7 +211,7 @@ class LiveCourseList extends React.Component {
...
@@ -211,7 +211,7 @@ class LiveCourseList extends React.Component {
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
)
;
)
},
},
},
},
{
{
...
@@ -220,7 +220,7 @@ class LiveCourseList extends React.Component {
...
@@ -220,7 +220,7 @@ class LiveCourseList extends React.Component {
key
:
'couseCatalog'
,
key
:
'couseCatalog'
,
dataIndex
:
'couseCatalog'
,
dataIndex
:
'couseCatalog'
,
render
:
(
val
,
item
)
=>
{
render
:
(
val
,
item
)
=>
{
return
<
div
className=
'categoryName'
>
{
item
.
category
Name
}
</
div
>;
return
<
div
className=
'categoryName'
>
{
item
.
category
SonName
}
</
div
>
},
},
},
},
{
{
...
@@ -236,11 +236,11 @@ class LiveCourseList extends React.Component {
...
@@ -236,11 +236,11 @@ class LiveCourseList extends React.Component {
this
.
setState
({
this
.
setState
({
editData
:
item
,
editData
:
item
,
openCoursewareModal
:
true
,
openCoursewareModal
:
true
,
})
;
})
}
}
>
}
}
>
{
item
.
courseDocumentCount
}
个
{
item
.
courseDocumentCount
}
个
</
span
>
</
span
>
)
;
)
},
},
},
},
{
{
...
@@ -253,11 +253,11 @@ class LiveCourseList extends React.Component {
...
@@ -253,11 +253,11 @@ class LiveCourseList extends React.Component {
<
span
<
span
className=
'iconfont icon quota-icon'
className=
'iconfont icon quota-icon'
onClick=
{
()
=>
{
onClick=
{
()
=>
{
this
.
handleLinkToClassData
(
item
)
;
this
.
handleLinkToClassData
(
item
)
}
}
>
}
}
>


</
span
>
</
span
>
)
;
)
},
},
},
},
{
{
...
@@ -289,7 +289,7 @@ class LiveCourseList extends React.Component {
...
@@ -289,7 +289,7 @@ class LiveCourseList extends React.Component {
defaultChecked=
{
item
.
shelfState
===
'YES'
?
true
:
false
}
defaultChecked=
{
item
.
shelfState
===
'YES'
?
true
:
false
}
onChange=
{
(
checked
)
=>
this
.
changeShelfState
(
index
,
item
,
checked
)
}
onChange=
{
(
checked
)
=>
this
.
changeShelfState
(
index
,
item
,
checked
)
}
/>
/>
)
;
)
},
},
},
},
{
{
...
@@ -300,7 +300,7 @@ class LiveCourseList extends React.Component {
...
@@ -300,7 +300,7 @@ class LiveCourseList extends React.Component {
sorter
:
true
,
sorter
:
true
,
render
:
(
val
,
item
)
=>
{
render
:
(
val
,
item
)
=>
{
// -29000:与后端约定 在初始化学院时,创建时间(标志位-29000)默认展示为'-'
// -29000:与后端约定 在初始化学院时,创建时间(标志位-29000)默认展示为'-'
return
<
span
style=
{
{
whiteSpace
:
'nowrap'
}
}
>
{
val
===
-
29000
?
'-'
:
window
.
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
}
</
span
>
;
return
<
span
style=
{
{
whiteSpace
:
'nowrap'
}
}
>
{
val
===
-
29000
?
'-'
:
window
.
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
}
</
span
>
},
},
},
},
{
{
...
@@ -319,7 +319,7 @@ class LiveCourseList extends React.Component {
...
@@ -319,7 +319,7 @@ class LiveCourseList extends React.Component {
<
span
>
<
span
>
{
item
.
planName
}
{
index
<
record
.
relatedPlanList
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
{
item
.
planName
}
{
index
<
record
.
relatedPlanList
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
</
span
>
</
span
>
)
;
)
})
}
})
}
</
Tooltip
>
</
Tooltip
>
</
When
>
</
When
>
...
@@ -328,7 +328,7 @@ class LiveCourseList extends React.Component {
...
@@ -328,7 +328,7 @@ class LiveCourseList extends React.Component {
</
Otherwise
>
</
Otherwise
>
</
Choose
>
</
Choose
>
</
div
>
</
div
>
)
;
)
},
},
},
},
{
{
...
@@ -347,7 +347,7 @@ class LiveCourseList extends React.Component {
...
@@ -347,7 +347,7 @@ class LiveCourseList extends React.Component {
key=
'enter_live_room1'
key=
'enter_live_room1'
className=
'operate__item'
className=
'operate__item'
onClick=
{
()
=>
{
onClick=
{
()
=>
{
this
.
handleEnterLiveRoom
(
item
)
;
this
.
handleEnterLiveRoom
(
item
)
}
}
>
}
}
>
进入直播间
进入直播间
</
div
>
</
div
>
...
@@ -363,7 +363,7 @@ class LiveCourseList extends React.Component {
...
@@ -363,7 +363,7 @@ class LiveCourseList extends React.Component {
key=
'view_play_back'
key=
'view_play_back'
className=
'operate__item'
className=
'operate__item'
onClick=
{
()
=>
{
onClick=
{
()
=>
{
this
.
handleViewPlayBack
(
item
)
;
this
.
handleViewPlayBack
(
item
)
}
}
>
}
}
>
查看回放
查看回放
</
div
>
</
div
>
...
@@ -379,7 +379,7 @@ class LiveCourseList extends React.Component {
...
@@ -379,7 +379,7 @@ class LiveCourseList extends React.Component {
key=
'share'
key=
'share'
className=
'operate__item'
className=
'operate__item'
onClick=
{
()
=>
{
onClick=
{
()
=>
{
this
.
handleShowShareModal
(
item
)
;
this
.
handleShowShareModal
(
item
)
}
}
>
}
}
>
分享
分享
</
div
>
</
div
>
...
@@ -409,10 +409,10 @@ class LiveCourseList extends React.Component {
...
@@ -409,10 +409,10 @@ class LiveCourseList extends React.Component {
</
div
>
</
div
>
)
}
)
}
</
div
>
</
div
>
)
;
)
},
},
},
},
]
;
]
}
else
{
}
else
{
columns
=
[
columns
=
[
{
{
...
@@ -421,13 +421,13 @@ class LiveCourseList extends React.Component {
...
@@ -421,13 +421,13 @@ class LiveCourseList extends React.Component {
key
:
'course'
,
key
:
'course'
,
dataIndex
:
'courseName'
,
dataIndex
:
'courseName'
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
let
hasCover
=
false
;
let
hasCover
=
false
return
(
return
(
<
div
className=
'record__item'
>
<
div
className=
'record__item'
>
{
record
.
courseMediaVOS
.
map
((
item
,
index
)
=>
{
{
record
.
courseMediaVOS
.
map
((
item
,
index
)
=>
{
if
(
item
.
contentType
===
'COVER'
)
{
if
(
item
.
contentType
===
'COVER'
)
{
hasCover
=
true
;
hasCover
=
true
return
<
img
className=
'course-cover'
src=
{
item
.
mediaUrl
}
alt=
''
/>
;
return
<
img
className=
'course-cover'
src=
{
item
.
mediaUrl
}
alt=
''
/>
}
}
})
}
})
}
{
!
hasCover
&&
<
img
className=
'course-cover'
src=
{
'https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png'
}
alt=
''
/>
}
{
!
hasCover
&&
<
img
className=
'course-cover'
src=
{
'https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png'
}
alt=
''
/>
}
...
@@ -477,7 +477,7 @@ class LiveCourseList extends React.Component {
...
@@ -477,7 +477,7 @@ class LiveCourseList extends React.Component {
<
span
>
<
span
>
{
item
.
adminName
}
{
index
<
record
.
admins
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
{
item
.
adminName
}
{
index
<
record
.
admins
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
</
span
>
</
span
>
)
;
)
})
}
})
}
</
span
>
</
span
>
</
Tooltip
>
</
Tooltip
>
...
@@ -490,7 +490,7 @@ class LiveCourseList extends React.Component {
...
@@ -490,7 +490,7 @@ class LiveCourseList extends React.Component {
<
span
>
<
span
>
{
item
.
adminName
}
{
index
<
record
.
admins
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
{
item
.
adminName
}
{
index
<
record
.
admins
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
</
span
>
</
span
>
)
;
)
})
}
})
}
</
span
>
</
span
>
</
Otherwise
>
</
Otherwise
>
...
@@ -499,7 +499,7 @@ class LiveCourseList extends React.Component {
...
@@ -499,7 +499,7 @@ class LiveCourseList extends React.Component {
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
)
;
)
},
},
},
},
{
{
...
@@ -508,7 +508,7 @@ class LiveCourseList extends React.Component {
...
@@ -508,7 +508,7 @@ class LiveCourseList extends React.Component {
key
:
'couseCatalog'
,
key
:
'couseCatalog'
,
dataIndex
:
'couseCatalog'
,
dataIndex
:
'couseCatalog'
,
render
:
(
val
,
item
)
=>
{
render
:
(
val
,
item
)
=>
{
return
<
div
className=
'categoryName'
>
{
item
.
category
Name
}
</
div
>;
return
<
div
className=
'categoryName'
>
{
item
.
category
SonName
}
</
div
>
},
},
},
},
{
{
...
@@ -524,11 +524,11 @@ class LiveCourseList extends React.Component {
...
@@ -524,11 +524,11 @@ class LiveCourseList extends React.Component {
this
.
setState
({
this
.
setState
({
editData
:
item
,
editData
:
item
,
openCoursewareModal
:
true
,
openCoursewareModal
:
true
,
})
;
})
}
}
>
}
}
>
{
item
.
courseDocumentCount
}
个
{
item
.
courseDocumentCount
}
个
</
span
>
</
span
>
)
;
)
},
},
},
},
{
{
...
@@ -541,11 +541,11 @@ class LiveCourseList extends React.Component {
...
@@ -541,11 +541,11 @@ class LiveCourseList extends React.Component {
<
span
<
span
className=
'iconfont icon quota-icon'
className=
'iconfont icon quota-icon'
onClick=
{
()
=>
{
onClick=
{
()
=>
{
this
.
handleLinkToClassData
(
item
)
;
this
.
handleLinkToClassData
(
item
)
}
}
>
}
}
>


</
span
>
</
span
>
)
;
)
},
},
},
},
{
{
...
@@ -555,7 +555,7 @@ class LiveCourseList extends React.Component {
...
@@ -555,7 +555,7 @@ class LiveCourseList extends React.Component {
dataIndex
:
'created'
,
dataIndex
:
'created'
,
sorter
:
true
,
sorter
:
true
,
render
:
(
val
,
item
)
=>
{
render
:
(
val
,
item
)
=>
{
return
<
span
>
{
window
.
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
}
</
span
>
;
return
<
span
>
{
window
.
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
}
</
span
>
},
},
},
},
{
{
...
@@ -574,7 +574,7 @@ class LiveCourseList extends React.Component {
...
@@ -574,7 +574,7 @@ class LiveCourseList extends React.Component {
<
span
>
<
span
>
{
item
.
planName
}
{
index
<
record
.
relatedPlanList
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
{
item
.
planName
}
{
index
<
record
.
relatedPlanList
.
length
-
1
&&
<
span
>
、
</
span
>
}{
' '
}
</
span
>
</
span
>
)
;
)
})
}
})
}
</
Tooltip
>
</
Tooltip
>
</
When
>
</
When
>
...
@@ -583,36 +583,36 @@ class LiveCourseList extends React.Component {
...
@@ -583,36 +583,36 @@ class LiveCourseList extends React.Component {
</
Otherwise
>
</
Otherwise
>
</
Choose
>
</
Choose
>
</
div
>
</
div
>
)
;
)
},
},
},
},
];
]
}
this
.
setState
({
columns
})
}
}
this
.
setState
({
columns
});
};
handleAdminName
=
(
adminArray
)
=>
{
handleAdminName
=
(
adminArray
)
=>
{
let
adminStr
=
''
;
let
adminStr
=
''
adminArray
.
forEach
((
item
,
index
)
=>
{
adminArray
.
forEach
((
item
,
index
)
=>
{
if
(
index
<
adminArray
.
length
-
1
)
{
if
(
index
<
adminArray
.
length
-
1
)
{
adminStr
=
adminStr
+
item
.
adminName
+
'、'
;
adminStr
=
adminStr
+
item
.
adminName
+
'、'
}
else
{
}
else
{
adminStr
=
adminStr
+
item
.
adminName
;
adminStr
=
adminStr
+
item
.
adminName
}
})
return
adminStr
}
}
});
return
adminStr
;
};
handlePlanName
=
(
planArray
)
=>
{
handlePlanName
=
(
planArray
)
=>
{
let
planStr
=
''
;
let
planStr
=
''
planArray
.
forEach
((
item
,
index
)
=>
{
planArray
.
forEach
((
item
,
index
)
=>
{
if
(
index
<
planArray
.
length
-
1
)
{
if
(
index
<
planArray
.
length
-
1
)
{
planStr
=
planStr
+
item
.
planName
+
'、'
;
planStr
=
planStr
+
item
.
planName
+
'、'
}
else
{
}
else
{
planStr
=
planStr
+
item
.
planName
;
planStr
=
planStr
+
item
.
planName
}
})
return
planStr
}
}
});
return
planStr
;
};
renderMoreOperate
=
(
item
)
=>
{
renderMoreOperate
=
(
item
)
=>
{
return
(
return
(
...
@@ -631,8 +631,8 @@ class LiveCourseList extends React.Component {
...
@@ -631,8 +631,8 @@ class LiveCourseList extends React.Component {
</
div
>
</
div
>
)
}
)
}
</
div
>
</
div
>
)
;
)
}
;
}
handleDelete
=
(
record
)
=>
{
handleDelete
=
(
record
)
=>
{
return
confirm
({
return
confirm
({
title
:
'你确定要删除直播课?'
,
title
:
'你确定要删除直播课?'
,
...
@@ -644,29 +644,29 @@ class LiveCourseList extends React.Component {
...
@@ -644,29 +644,29 @@ class LiveCourseList extends React.Component {
width
:
440
,
width
:
440
,
height
:
188
,
height
:
188
,
onOk
:
()
=>
{
onOk
:
()
=>
{
this
.
deleteConfirm
(
record
)
;
this
.
deleteConfirm
(
record
)
},
},
})
;
})
}
;
}
deleteConfirm
=
(
item
)
=>
{
deleteConfirm
=
(
item
)
=>
{
const
params
=
{
const
params
=
{
liveCourseId
:
item
.
liveCourseId
,
liveCourseId
:
item
.
liveCourseId
,
}
;
}
CourseService
.
delLiveCloudCourse
(
params
).
then
((
res
)
=>
{
CourseService
.
delLiveCloudCourse
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
message
.
success
(
'已删除'
);
message
.
success
(
'已删除'
)
this
.
props
.
onChange
();
this
.
props
.
onChange
()
}
})
}
}
});
};
toEditCoursePage
=
(
item
)
=>
{
toEditCoursePage
=
(
item
)
=>
{
window
.
RCHistory
.
push
({
window
.
RCHistory
.
push
({
pathname
:
`/create-live-course?type=edit&id=
${
item
.
liveCourseId
}
`
,
pathname
:
`/create-live-course?type=edit&id=
${
item
.
liveCourseId
}
`
,
})
;
})
}
;
}
refreshCourseList
=
()
=>
{
refreshCourseList
=
()
=>
{
this
.
props
.
onChange
(
this
.
props
.
query
)
;
this
.
props
.
onChange
(
this
.
props
.
query
)
}
;
}
//进入直播间
//进入直播间
handleEnterLiveRoom
=
(
item
)
=>
{
handleEnterLiveRoom
=
(
item
)
=>
{
if
(
item
.
startTime
-
Date
.
now
()
>
1800000
)
{
if
(
item
.
startTime
-
Date
.
now
()
>
1800000
)
{
...
@@ -679,124 +679,124 @@ class LiveCourseList extends React.Component {
...
@@ -679,124 +679,124 @@ class LiveCourseList extends React.Component {


</
span
>
</
span
>
),
),
})
;
})
}
else
{
}
else
{
CourseService
.
getLiveCloudCourseDetail
({
CourseService
.
getLiveCloudCourseDetail
({
liveCourseId
:
item
.
liveCourseId
,
liveCourseId
:
item
.
liveCourseId
,
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
const
url
=
`xmqx://liveCourseId=
${
item
.
liveCourseId
}
`
;
const
url
=
`xmqx://liveCourseId=
${
item
.
liveCourseId
}
`
if
(
res
.
result
.
courseState
===
'FINISH'
)
{
if
(
res
.
result
.
courseState
===
'FINISH'
)
{
Modal
.
warning
({
Modal
.
warning
({
title
:
'刷新页面'
,
title
:
'刷新页面'
,
icon
:
<
QuestionCircleOutlined
/>,
icon
:
<
QuestionCircleOutlined
/>,
content
:
'课次已结束,请刷新一下'
,
content
:
'课次已结束,请刷新一下'
,
onOk
:
()
=>
{
onOk
:
()
=>
{
this
.
refreshCourseList
()
;
this
.
refreshCourseList
()
},
},
})
;
})
}
else
{
}
else
{
this
.
setState
({
url
,
openDownloadModal
:
true
});
this
.
setState
({
url
,
openDownloadModal
:
true
})
}
})
}
}
});
}
}
};
onShowSizeChange
=
(
current
,
size
)
=>
{
onShowSizeChange
=
(
current
,
size
)
=>
{
if
(
current
===
size
)
{
if
(
current
===
size
)
{
return
;
return
}
let
_query
=
this
.
props
.
query
_query
.
size
=
size
this
.
props
.
onChange
(
_query
)
}
}
let
_query
=
this
.
props
.
query
;
_query
.
size
=
size
;
this
.
props
.
onChange
(
_query
);
};
getDownloadVersion
()
{
getDownloadVersion
()
{
const
isMac
=
/macintosh|mac os x/i
.
test
(
navigator
.
userAgent
)
;
const
isMac
=
/macintosh|mac os x/i
.
test
(
navigator
.
userAgent
)
// 判断学员系统
// 判断学员系统
let
platform
;
let
platform
if
(
!
isMac
)
{
if
(
!
isMac
)
{
platform
=
1
;
platform
=
1
}
else
{
}
else
{
platform
=
4
;
platform
=
4
}
}
BaseService
.
getLastedVersion
({
model
:
5
,
platform
}).
then
((
res
)
=>
{
BaseService
.
getLastedVersion
({
model
:
5
,
platform
}).
then
((
res
)
=>
{
const
{
result
=
{}
}
=
res
;
const
{
result
=
{}
}
=
res
this
.
setState
({
downloadUrl
:
result
.
releaseUrl
})
;
this
.
setState
({
downloadUrl
:
result
.
releaseUrl
})
})
;
})
}
}
handleViewPlayBack
=
(
item
)
=>
{
handleViewPlayBack
=
(
item
)
=>
{
let
htmlUrl
;
let
htmlUrl
if
(
item
.
teacherId
===
User
.
getUserId
())
{
if
(
item
.
teacherId
===
User
.
getUserId
())
{
htmlUrl
=
`
${
LIVE_SHARE
}
replay/
${
item
.
liveCourseId
}
?teacherId=
${
User
.
getUserId
()}
&id=
${
User
.
getStoreId
()}
`
;
htmlUrl
=
`
${
LIVE_SHARE
}
replay/
${
item
.
liveCourseId
}
?teacherId=
${
User
.
getUserId
()}
&id=
${
User
.
getStoreId
()}
`
}
else
if
(
_
.
pluck
(
item
.
admins
,
'adminId'
).
includes
(
User
.
getUserId
()))
{
}
else
if
(
_
.
pluck
(
item
.
admins
,
'adminId'
).
includes
(
User
.
getUserId
()))
{
htmlUrl
=
`
${
LIVE_SHARE
}
replay/
${
item
.
liveCourseId
}
?userId=
${
User
.
getUserId
()}
&id=
${
User
.
getStoreId
()}
`
;
htmlUrl
=
`
${
LIVE_SHARE
}
replay/
${
item
.
liveCourseId
}
?userId=
${
User
.
getUserId
()}
&id=
${
User
.
getStoreId
()}
`
}
else
{
}
else
{
htmlUrl
=
`
${
LIVE_SHARE
}
replay/
${
item
.
liveCourseId
}
?id=
${
User
.
getStoreId
()}
`
;
htmlUrl
=
`
${
LIVE_SHARE
}
replay/
${
item
.
liveCourseId
}
?id=
${
User
.
getStoreId
()}
`
}
window
.
open
(
htmlUrl
)
}
}
window
.
open
(
htmlUrl
);
};
handleRelatedModalShow
=
(
item
)
=>
{
handleRelatedModalShow
=
(
item
)
=>
{
const
selectPlanList
=
{}
;
const
selectPlanList
=
{}
if
(
item
.
relatedPlanList
)
{
if
(
item
.
relatedPlanList
)
{
item
.
relatedPlanList
.
map
((
item
,
index
)
=>
{
item
.
relatedPlanList
.
map
((
item
,
index
)
=>
{
selectPlanList
[
item
.
planId
]
=
{}
;
selectPlanList
[
item
.
planId
]
=
{}
selectPlanList
[
item
.
planId
].
planId
=
item
.
planId
;
selectPlanList
[
item
.
planId
].
planId
=
item
.
planId
selectPlanList
[
item
.
planId
].
taskBaseVOList
=
[{
taskId
:
item
.
taskId
}]
;
selectPlanList
[
item
.
planId
].
taskBaseVOList
=
[{
taskId
:
item
.
taskId
}]
return
item
;
return
item
})
;
})
}
}
this
.
setState
({
this
.
setState
({
RelatedPlanModalVisible
:
true
,
RelatedPlanModalVisible
:
true
,
selectCourseId
:
item
.
liveCourseId
,
selectCourseId
:
item
.
liveCourseId
,
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
()
}
)
}
}
);
};
handleChangeTable
=
(
pagination
,
filters
,
sorter
)
=>
{
handleChangeTable
=
(
pagination
,
filters
,
sorter
)
=>
{
const
{
columnKey
,
order
}
=
sorter
;
const
{
columnKey
,
order
}
=
sorter
const
{
query
}
=
this
.
props
;
const
{
query
}
=
this
.
props
let
_columnKey
;
let
_columnKey
let
_order
;
let
_order
// 按创建时间升序排序
// 按创建时间升序排序
if
(
columnKey
===
'created'
&&
order
===
'ascend'
)
{
if
(
columnKey
===
'created'
&&
order
===
'ascend'
)
{
_columnKey
=
'CREATED'
;
_columnKey
=
'CREATED'
_order
=
'SORT_ASC'
;
_order
=
'SORT_ASC'
}
}
// 按创建时间降序排序
// 按创建时间降序排序
if
(
columnKey
===
'created'
&&
order
===
'descend'
)
{
if
(
columnKey
===
'created'
&&
order
===
'descend'
)
{
_columnKey
=
'CREATED'
;
_columnKey
=
'CREATED'
_order
=
'SORT_DESC'
;
_order
=
'SORT_DESC'
}
}
const
_query
=
{
const
_query
=
{
...
query
,
...
query
,
sortMap
:
{},
sortMap
:
{},
}
;
}
_query
.
sortMap
[
_columnKey
]
=
_order
;
_query
.
sortMap
[
_columnKey
]
=
_order
this
.
props
.
onChange
(
_query
)
;
this
.
props
.
onChange
(
_query
)
}
;
}
render
()
{
render
()
{
const
{
total
,
query
,
courseList
,
loading
}
=
this
.
props
;
const
{
total
,
query
,
courseList
,
loading
}
=
this
.
props
const
{
current
,
size
}
=
query
;
const
{
current
,
size
}
=
query
const
{
openDownloadModal
,
downloadUrl
,
url
,
columns
,
openCoursewareModal
,
editData
,
RelatedPlanModalVisible
,
selectCourseId
,
selectPlanList
}
=
this
.
state
;
const
{
openDownloadModal
,
downloadUrl
,
url
,
columns
,
openCoursewareModal
,
editData
,
RelatedPlanModalVisible
,
selectCourseId
,
selectPlanList
}
=
this
.
state
const
{
match
}
=
this
.
props
;
const
{
match
}
=
this
.
props
return
(
return
(
<
div
className=
'live-course-list'
>
<
div
className=
'live-course-list'
>
...
@@ -822,8 +822,8 @@ class LiveCourseList extends React.Component {
...
@@ -822,8 +822,8 @@ class LiveCourseList extends React.Component {
pageSize=
{
size
}
pageSize=
{
size
}
total=
{
parseInt
(
total
)
}
total=
{
parseInt
(
total
)
}
toPage=
{
(
page
)
=>
{
toPage=
{
(
page
)
=>
{
const
_query
=
{
...
query
,
current
:
page
+
1
}
;
const
_query
=
{
...
query
,
current
:
page
+
1
}
this
.
props
.
onChange
(
_query
)
;
this
.
props
.
onChange
(
_query
)
}
}
}
}
onShowSizeChange=
{
this
.
onShowSizeChange
}
onShowSizeChange=
{
this
.
onShowSizeChange
}
/>
/>
...
@@ -834,8 +834,8 @@ class LiveCourseList extends React.Component {
...
@@ -834,8 +834,8 @@ class LiveCourseList extends React.Component {
<
ManageCoursewareModal
<
ManageCoursewareModal
data=
{
editData
}
data=
{
editData
}
onCancel=
{
()
=>
{
onCancel=
{
()
=>
{
this
.
props
.
onChange
()
;
this
.
props
.
onChange
()
this
.
setState
({
openCoursewareModal
:
false
})
;
this
.
setState
({
openCoursewareModal
:
false
})
}
}
}
}
/>
/>
)
}
)
}
...
@@ -846,7 +846,7 @@ class LiveCourseList extends React.Component {
...
@@ -846,7 +846,7 @@ class LiveCourseList extends React.Component {
this
.
setState
({
this
.
setState
({
url
:
''
,
url
:
''
,
openDownloadModal
:
false
,
openDownloadModal
:
false
,
})
;
})
}
}
}
}
/>
/>
)
}
)
}
...
@@ -863,8 +863,8 @@ class LiveCourseList extends React.Component {
...
@@ -863,8 +863,8 @@ class LiveCourseList extends React.Component {
<
iframe
src=
{
url
}
style=
{
{
display
:
'none'
}
}
title=
'navigation'
/>
<
iframe
src=
{
url
}
style=
{
{
display
:
'none'
}
}
title=
'navigation'
/>
<
Route
path=
{
`${match.url}/live-course-data`
}
component=
{
DataList
}
/>
<
Route
path=
{
`${match.url}/live-course-data`
}
component=
{
DataList
}
/>
</
div
>
</
div
>
)
;
)
}
}
}
}
export
default
withRouter
(
LiveCourseList
)
;
export
default
withRouter
(
LiveCourseList
)
src/modules/course-manage/graphics-course/components/GraphicsCourseList.jsx
View file @
a0a455ba
...
@@ -101,7 +101,7 @@ class GraphicsCourseList extends React.Component {
...
@@ -101,7 +101,7 @@ class GraphicsCourseList extends React.Component {
dataIndex
:
'categoryName'
,
dataIndex
:
'categoryName'
,
width
:
120
,
width
:
120
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
<
div
className=
'record__item'
>
{
record
.
categoryName
}
</
div
>
return
<
div
className=
'record__item'
>
{
record
.
category
Son
Name
}
</
div
>
},
},
},
},
{
{
...
...
src/modules/course-manage/offline-course/components/OfflineCourseList.jsx
View file @
a0a455ba
...
@@ -115,7 +115,7 @@ class OfflineCourseList extends React.Component {
...
@@ -115,7 +115,7 @@ class OfflineCourseList extends React.Component {
dataIndex
:
'categoryName'
,
dataIndex
:
'categoryName'
,
width
:
120
,
width
:
120
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
<
div
className=
'record__item'
>
{
record
.
categoryName
}
</
div
>
return
<
div
className=
'record__item'
>
{
record
.
category
Son
Name
}
</
div
>
},
},
},
},
{
{
...
...
src/modules/course-manage/video-course/components/VideoCourseList.jsx
View file @
a0a455ba
...
@@ -97,7 +97,7 @@ class VideoCourseList extends React.Component {
...
@@ -97,7 +97,7 @@ class VideoCourseList extends React.Component {
dataIndex
:
'categoryName'
,
dataIndex
:
'categoryName'
,
width
:
150
,
width
:
150
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
<
div
className=
'record__item'
>
{
record
.
categoryName
}
</
div
>
return
<
div
className=
'record__item'
>
{
record
.
category
Son
Name
}
</
div
>
},
},
},
},
{
{
...
...
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