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
f6dd4e5e
Commit
f6dd4e5e
authored
Dec 16, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:解决合并代码后的一些冲突
parent
c233f4f6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
302 additions
and
148 deletions
+302
-148
src/components/Breadcrumbs.tsx
+4
-3
src/data-source/course/request-api.ts
+14
-4
src/domains/course-domain/CourseService.ts
+13
-3
src/modules/course-manage/AddLive.jsx
+0
-0
src/modules/course-manage/LiveCoursePage.jsx
+2
-43
src/modules/course-manage/components/AddLiveBasic.jsx
+1
-1
src/modules/course-manage/components/AddLiveClass.jsx
+112
-13
src/modules/course-manage/components/AddLiveIntro.jsx
+2
-2
src/modules/course-manage/components/LiveCourseFilter.jsx
+71
-29
src/modules/course-manage/components/LiveCourseList.jsx
+83
-50
No files found.
src/components/Breadcrumbs.tsx
View file @
f6dd4e5e
...
...
@@ -28,9 +28,10 @@ const Breadcrumbs = (props: BreadcrumbsProps) => {
const
isArray
=
_
.
isArray
(
navList
);
return
(
<
div
className=
"xm-breadCrumb"
>
<
span
onClick=
{
_onClick
}
className=
"back-btn"
/>
<
LeftOutlined
/>
<
span
className=
"text ml5"
>
{
text
?
text
:
'返回'
}
</
span
>
<
span
onClick=
{
_onClick
}
className=
"back-btn"
>
<
LeftOutlined
/>
<
span
className=
"text ml5"
>
{
text
?
text
:
'返回'
}
</
span
>
</
span
>
<
div
className=
"divide"
></
div
>
<
Breadcrumb
>
{
isString
&&
<
Breadcrumb
.
Item
>
{
navList
}
</
Breadcrumb
.
Item
>
}
...
...
src/data-source/course/request-api.ts
View file @
f6dd4e5e
/*
* @Author: wufan
* @Date: 2020-12-12 11:57:10
* @LastEditors:
wuf
an
* @LastEditTime: 2020-12-16 15:
01:26
* @LastEditors:
zhangleyu
an
* @LastEditTime: 2020-12-16 15:
49:11
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -34,4 +34,15 @@ export function exportPlayBackCourseData(params: object) {
}
export
function
fetchPlaybackList
(
params
:
object
)
{
return
Service
.
Hades
(
"public/courseCloud/getUserReplayRecordPage"
,
params
);
}
\ No newline at end of file
}
export
function
getLiveCloudCourseDetail
(
params
:
object
)
{
return
Service
.
Hades
(
"public/courseCloud/getLiveCloudCourseDetail"
,
params
);
}
export
function
updateLiveCloudCourse
(
params
:
object
)
{
return
Service
.
Hades
(
"public/courseCloud/updateLiveCloudCourse"
,
params
);
}
export
function
delOrRecoverLiveCloudCourse
(
params
:
object
)
{
return
Service
.
Hades
(
"public/courseCloud/delOrRecoverLiveCloudCourse"
,
params
);
}
src/domains/course-domain/CourseService.ts
View file @
f6dd4e5e
/*
* @Author: wufan
* @Date: 2020-11-25 18:25:02
* @LastEditors:
wuf
an
* @LastEditTime: 2020-12-1
5 14:27:36
* @LastEditors:
zhangleyu
an
* @LastEditTime: 2020-12-1
6 15:50:43
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
{
fetchLecturerData
,
fetchUserData
,
exportStudentCourseData
,
createLiveCloudCourse
,
getLiveCloudCoursePage
,
exportPlayBackCourseData
,
fetchPlaybackList
}
from
'@/data-source/course/request-api'
;
import
{
fetchLecturerData
,
fetchUserData
,
exportStudentCourseData
,
exportPlayBackCourseData
,
fetchPlaybackList
,
createLiveCloudCourse
,
getLiveCloudCoursePage
,
getLiveCloudCourseDetail
,
updateLiveCloudCourse
,
delOrRecoverLiveCloudCourse
}
from
'@/data-source/course/request-api'
;
export
default
class
courseService
{
// 获取讲师上课数据
...
...
@@ -40,4 +40,13 @@ export default class courseService {
return
fetchPlaybackList
(
params
);
}
static
getLiveCloudCourseDetail
(
params
:
any
)
{
return
getLiveCloudCourseDetail
(
params
);
}
static
updateLiveCloudCourse
(
params
:
any
)
{
return
updateLiveCloudCourse
(
params
);
}
static
delOrRecoverLiveCloudCourse
(
params
:
any
)
{
return
delOrRecoverLiveCloudCourse
(
params
);
}
}
\ No newline at end of file
src/modules/course-manage/AddLive.jsx
View file @
f6dd4e5e
This diff is collapsed.
Click to expand it.
src/modules/course-manage/LiveCoursePage.jsx
View file @
f6dd4e5e
...
...
@@ -9,13 +9,11 @@ class LiveCoursePage extends React.Component {
constructor
(
props
)
{
super
(
props
);
// const { instId, teacherId } = window.currentUserInstInfo;
this
.
state
=
{
courseList
:
[],
// 直播课列表
query
:
{
current
:
1
,
size
:
10
,
storeId
:
User
.
getStoreId
()
},
total
:
0
,
loading
:
true
,
...
...
@@ -26,10 +24,9 @@ class LiveCoursePage extends React.Component {
}
// 获取直播课列表
handleFetchLiveList
=
(
_query
)
=>
{
const
{
query
}
=
this
.
state
;
const
params
=
{
...
query
,
...
_query
,
storeId
:
User
.
getStoreId
()
};
this
.
setState
({
query
:
params
});
CourseService
.
getLiveCloudCoursePage
(
params
).
then
((
res
)
=>
{
...
...
@@ -42,49 +39,11 @@ class LiveCoursePage extends React.Component {
this
.
setState
({
loading
:
false
});
});
}
// handleFetchLiveList= (_query) => {
// const _courseList=[
// {
// applyMode: "ANYONE",
// autoSendReport: "AUTO",
// channel: "XIAOMAI",
// consumeClassTime: 30,
// consumeHourNum: 1,
// courseDocumentCount: 0,
// courseMediaVOS: [],
// courseName: "0988",
// courseState: "EXPIRED",
// createdReport: "INVALID",
// endTime: 1607515751000,
// haveRecord: "NO",
// instId: "1213001850820476929",
// intro: "",
// liveCourseId: "1336612757182279681",
// liveType: "LARGE_CLASS_LIVE",
// needRecord: "YES",
// nickname: "张莹",
// podium: 0,
// quota: 1,
// roomId: 9984,
// startTime: 1607508551000,
// teacherId: "1226497609046880257",
// thirdPartType: "TENCENT",
// whetherRecord: "YES",
// }
// ];
// this.setState({
// courseList: _courseList,
// total:1
// });
// }
render
()
{
const
{
query
,
total
,
courseList
}
=
this
.
state
;
return
(
<
div
className=
"page big-live-page"
>
<
div
className=
"content-header"
>
大班直播
</
div
>
<
div
className=
"content-header"
>
直播课
</
div
>
<
div
className=
"box"
>
<
LiveCourseFilter
onChange=
{
this
.
handleFetchLiveList
}
...
...
src/modules/course-manage/components/AddLiveBasic.jsx
View file @
f6dd4e5e
...
...
@@ -77,7 +77,7 @@ class AddLiveBasic extends React.Component {
}
render
()
{
const
{
showCutModal
,
imageFile
,
courseCatalogList
}
=
this
.
state
;
const
{
data
,
liveScene
}
=
this
.
props
;
const
{
data
}
=
this
.
props
;
const
{
courseName
,
coverUrl
}
=
data
;
const
fileName
=
''
;
...
...
src/modules/course-manage/components/AddLiveClass.jsx
View file @
f6dd4e5e
...
...
@@ -7,7 +7,7 @@
*/
import
React
from
'react'
;
import
{
TimePicker
,
Select
,
Spin
,
Tooltip
}
from
'antd'
;
import
{
TimePicker
,
Select
,
Spin
,
Tooltip
,
DatePicker
}
from
'antd'
;
import
{
InfoCircleFilled
}
from
'@ant-design/icons'
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
...
...
@@ -124,25 +124,21 @@ class AddLiveClass extends React.Component {
assistantQuery
}
=
this
.
state
;
const
{
pageType
,
liveScene
,
data
,
selectedAssistant
,
isXiaomai
,
isEdit
,
after
}
=
this
.
props
;
const
{
pageType
,
data
,
isEdit
}
=
this
.
props
;
const
{
endTime
,
startTime
,
studentList
,
consumeStudentList
,
calendarTime
,
teacherId
,
liveDate
,
timeHorizonStart
,
timeHorizonEnd
}
=
data
;
// 已选择的上课学员数量(不扣课时)
const
hasSelectedStu
=
studentList
.
length
;
// 已选择的上课学员数量(扣课时)
const
hasSelectedDeductionStu
=
consumeStudentList
.
length
;
console
.
log
(
"teacherId"
,
teacherId
);
return
(
<
Spin
spinning=
{
loading
}
>
<
div
className=
"add-live__class-info"
>
<
div
className=
"course"
>
{
/*
<div className="course">
<div className="day">
<span className="label">
<span className="require">*</span>
...
...
@@ -192,12 +188,113 @@ class AddLiveClass extends React.Component {
}}
/>
</div>
</div> */
}
{
pageType
===
'add'
&&
<
div
className=
"course"
>
<
div
className=
"day"
>
<
span
className=
"label"
>
<
span
className=
"require"
>
*
</
span
>
上课日期
<
Tooltip
overlayStyle=
{
{
maxWidth
:
300
,
zIndex
:
'9999'
}
}
title=
{
<
div
style=
{
{
width
:
'266px'
}
}
>
支持按上课日期批量创建直播课,创建后按“课程名称_日期”命名,例如:
<
br
/>
张三的语文课_9月18日
<
br
/>
张三的语文课_9月19日......
</
div
>
}
>
<
span
className=
"iconfont"
>

</
span
>
</
Tooltip
>
:
</
span
>
<
div
>
<
div
className=
'select-day'
>
已选
<
span
className=
"mark-day"
>
{
isLongArr
(
calendarTime
)
?
calendarTime
.
length
:
0
}
</
span
>
天
</
div
>
<
MultipleDatePicker
selectDateList=
{
calendarTime
}
onSelect=
{
this
.
selectMultiDate
}
canSelectTodayBefore=
{
false
}
/>
</
div
>
</
div
>
<
div
className=
"hour"
id=
"hour"
>
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
上课时间:
</
span
>
<
TimePicker
format=
"HH:mm"
value=
{
startTime
?
moment
(
startTime
)
:
null
}
placeholder=
"开始时间"
style=
{
{
width
:
100
,
minWidth
:
100
}
}
onChange=
{
(
time
)
=>
{
this
.
props
.
onChange
(
'startTime'
,
time
);
}
}
/>
~
<
TimePicker
format=
"HH:mm"
value=
{
endTime
?
moment
(
endTime
)
:
null
}
placeholder=
"结束时间"
style=
{
{
width
:
100
,
minWidth
:
100
}
}
onChange=
{
(
time
)
=>
{
this
.
props
.
onChange
(
'endTime'
,
time
)
}
}
/>
</
div
>
</
div
>
}
{
pageType
===
'edit'
&&
<
div
className=
"time"
id=
"time"
>
<
div
className=
"content"
>
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
上课时间:
</
span
>
<
DatePicker
disabled=
{
!
isEdit
}
format=
"YYYY-MM-DD"
value=
{
liveDate
?
moment
(
Number
(
liveDate
))
:
null
}
style=
{
{
width
:
160
,
minWidth
:
130
,
marginRight
:
10
}
}
placeholder=
"上课日期"
getCalendarContainer=
{
()
=>
document
.
getElementById
(
"time"
)
}
disabledDate=
{
this
.
disabledDate
}
onChange=
{
(
date
)
=>
{
this
.
props
.
onChange
(
'liveDate'
,
date
)
}
}
/>
<
TimePicker
disabled=
{
!
isEdit
}
format=
"HH:mm"
value=
{
timeHorizonStart
?
moment
(
Number
(
timeHorizonStart
))
:
null
}
defaultOpenValue=
{
moment
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
}
placeholder=
"开始时间"
style=
{
{
width
:
100
,
minWidth
:
100
,
marginRight
:
10
}
}
getPopupContainer=
{
()
=>
document
.
getElementById
(
"time"
)
}
onChange=
{
(
time
)
=>
{
this
.
props
.
onChange
(
'timeHorizonStart'
,
time
)
}
}
/>
<
TimePicker
disabled=
{
!
isEdit
}
format=
"HH:mm"
value=
{
timeHorizonEnd
?
moment
(
Number
(
timeHorizonEnd
))
:
null
}
defaultOpenValue=
{
moment
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
}
placeholder=
"结束时间"
style=
{
{
width
:
100
,
minWidth
:
100
}
}
getPopupContainer=
{
()
=>
document
.
getElementById
(
"time"
)
}
onChange=
{
(
time
)
=>
{
this
.
props
.
onChange
(
'timeHorizonEnd'
,
time
)
}
}
/>
</
div
>
</
div
>
}
<
div
className=
"teacher"
>
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
讲师:
</
span
>
<
Select
placeholder=
"请选择讲师"
style=
{
{
width
:
240
,
marginTop
:
6
}
}
showSearch
allowClear
value=
{
teacherId
}
filterOption=
{
(
input
,
option
)
=>
option
}
onPopupScroll=
{
this
.
handleScrollTeacherList
}
onChange=
{
(
value
)
=>
{
...
...
@@ -208,7 +305,7 @@ class AddLiveClass extends React.Component {
this
.
setState
({
teacherQuery
},
()
=>
{
this
.
handleScroll
TeacherList
()
this
.
get
TeacherList
()
})
}
}
>
...
...
@@ -224,6 +321,8 @@ class AddLiveClass extends React.Component {
<
Select
id=
"assistant"
placeholder=
"请选择助教老师"
showSearch
allowClear
style=
{
{
width
:
240
,
marginTop
:
6
}
}
filterOption=
{
(
input
,
option
)
=>
option
}
onPopupScroll=
{
this
.
handleScrollAssistantList
}
...
...
src/modules/course-manage/components/AddLiveIntro.jsx
View file @
f6dd4e5e
...
...
@@ -207,7 +207,7 @@ class AddLiveIntro extends React.Component {
}
render
()
{
const
{
liveScene
,
liveType
,
isXiaomai
,
isEdit
,
data
:
{
introduction
,
needRecord
,
whetherRecord
,
liveCourseMediaRequests
=
[],
liveCourseWarmMedia
=
{},
isAutoSendReport
}
}
=
this
.
props
;
const
{
liveType
,
isXiaomai
,
isEdit
,
data
:
{
introduction
,
needRecord
,
whetherRecord
,
liveCourseMediaRequests
=
[],
liveCourseWarmMedia
=
{},
isAutoSendReport
}
}
=
this
.
props
;
const
{
showCutModal
,
warmUrl
,
showSelectFileModal
,
diskList
,
imageFile
}
=
this
.
state
return
(
<
div
className=
"add-live__intro-info"
>
...
...
@@ -269,7 +269,7 @@ class AddLiveIntro extends React.Component {
</
div
>
<
div
className=
"opt-btns"
>
<
Button
disabled=
{
liveScene
===
'large'
&&
!
isEdit
}
disabled=
{
!
isEdit
}
onClick=
{
()
=>
{
this
.
setState
({
showSelectFileModal
:
true
...
...
src/modules/course-manage/components/LiveCourseFilter.jsx
View file @
f6dd4e5e
...
...
@@ -13,7 +13,8 @@ import Bus from '@/core/bus';
import
TeacherSearchSelect
from
"@/modules/common/TeacherSearchSelect"
;
import
RangePicker
from
"@/modules/common/DateRangePicker"
;
import
moment
from
'moment'
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
'./LiveCourseFilter.less'
;
const
{
Search
}
=
Input
;
...
...
@@ -22,31 +23,57 @@ const { Option } = Select;
const
defaultQuery
=
{
courseName
:
null
,
startTime
:
null
,
teacher
Name
:
null
,
teacher
Id
:
null
,
courseState
:
null
,
shelfState
:
null
,
}
const
defaultTeacherQuery
=
{
size
:
10
,
current
:
1
,
nickName
:
null
}
class
LiveCourseFilter
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
query
:
{...
defaultQuery
},
teacherQuery
:
defaultTeacherQuery
,
teacherList
:[],
expandFilter
:
false
}
}
componentWillReceiveProps
(
nextProps
)
{
const
{
match
:
{
path
}
}
=
nextProps
;
const
{
match
:
{
path
:
curPath
}
}
=
this
.
props
;
if
(
path
!==
curPath
)
{
this
.
setState
({
query
:
{...
defaultQuery
}
})
componentDidMount
()
{
this
.
getTeacherList
();
}
getTeacherList
(
current
=
1
,
selectList
){
const
{
teacherQuery
,
teacherList
}
=
this
.
state
;
const
_query
=
{
...
teacherQuery
,
current
,
size
:
10
};
StoreService
.
getEmployeeList
(
_query
).
then
((
res
)
=>
{
const
{
result
=
{}
}
=
res
;
const
{
records
=
[],
total
=
0
,
hasNext
}
=
result
;
const
list
=
current
>
1
?
teacherList
.
concat
(
records
)
:
records
;
this
.
setState
({
hasNext
,
teacherList
:
list
,
})
});
}
// 滑动加载更多讲师列表
handleScrollTeacherList
=
(
e
)
=>
{
const
{
hasNext
}
=
this
.
state
;
const
container
=
e
.
target
;
const
scrollToBottom
=
container
&&
container
.
scrollHeight
<=
container
.
clientHeight
+
container
.
scrollTop
;
if
(
scrollToBottom
&&
hasNext
)
{
const
{
teacherQuery
}
=
this
.
state
;
this
.
getTeacherList
(
teacherQuery
.
current
+
1
);
}
}
// 改变搜索条件
handleChangeQuery
=
(
field
,
value
)
=>
{
this
.
setState
({
...
...
@@ -117,7 +144,7 @@ class LiveCourseFilter extends React.Component {
courseState
,
teacherName
,
teacherId
,
shelfState
}
=
this
.
state
.
query
;
const
{
expandFilter
}
=
this
.
state
;
const
{
expandFilter
,
teacherList
,
teacherQuery
}
=
this
.
state
;
const
{
teacherId
:
_teahcerId
}
=
{};
const
isTeacher
=
!!
_teahcerId
;
// 判断是否是老师身份
...
...
@@ -147,20 +174,35 @@ class LiveCourseFilter extends React.Component {
style=
{
{
width
:
"calc(100% - 70px)"
}
}
/>
</
div
>
{
!
isTeacher
&&
<
div
className=
"search-condition__item"
>
<
TeacherSearchSelect
id=
"teacher_select"
ref=
"TeacherSelect"
label=
"讲师"
placeholder=
"请选择"
teacherName=
{
teacherName
}
onSelect=
{
this
.
handleSelectTeacher
}
defaultValue=
{
teacherId
}
/>
</
div
>
}
<
div
className=
"search-condition__item"
>
<
span
>
讲师:
</
span
>
<
Select
placeholder=
"请选择讲师"
style=
{
{
width
:
240
,
marginTop
:
6
}
}
showSearch
allowClear
filterOption=
{
(
input
,
option
)
=>
option
}
onPopupScroll=
{
this
.
handleScrollTeacherList
}
onChange=
{
(
value
)
=>
{
this
.
handleChangeQuery
(
'teacherId'
,
value
)
}
}
onSearch=
{
(
value
)
=>
{
teacherQuery
.
nickName
=
value
this
.
setState
({
teacherQuery
},
()
=>
{
this
.
getTeacherList
()
})
}
}
>
{
_
.
map
(
teacherList
,
(
item
,
index
)
=>
{
return
(
<
Select
.
Option
value=
{
item
.
userId
}
key=
{
item
.
userId
}
>
{
item
.
nickName
}
</
Select
.
Option
>
);
})
}
</
Select
>
</
div
>
{
expandFilter
&&
<
div
className=
"search-condition__item"
>
<
span
className=
"select-status"
>
上课状态:
</
span
>
...
...
@@ -188,8 +230,8 @@ class LiveCourseFilter extends React.Component {
value=
{
shelfState
}
onChange=
{
(
value
)
=>
{
this
.
handleChangeQuery
(
'shelfState'
,
value
)
}
}
>
<
Option
value=
"
UN_START
"
>
上架中
</
Option
>
<
Option
value=
"
STARTING
"
>
未上架
</
Option
>
<
Option
value=
"
YES
"
>
上架中
</
Option
>
<
Option
value=
"
NO
"
>
未上架
</
Option
>
</
Select
>
</
div
>
}
...
...
src/modules/course-manage/components/LiveCourseList.jsx
View file @
f6dd4e5e
...
...
@@ -79,7 +79,6 @@ class LiveCourseList extends React.Component {
getDownloadVersion
()
{
}
// 显示分享弹窗
handleShowShareModal
=
(
item
,
needStr
=
false
)
=>
{
const
_appId
=
appId
;
...
...
@@ -107,7 +106,15 @@ class LiveCourseList extends React.Component {
this
.
setState
({
shareLiveModal
})
}
//改变上架状态
changeShelfState
=
(
item
)
=>
{
if
(
item
.
shelfState
===
'NO'
){
item
.
shelfState
=
"YES"
}
else
{
}
}
// 前往上课数据页面
handleLinkToClassData
=
(
item
)
=>
{
// TODOLIST 确定后端是否是根据liveCourseId 返回数据
...
...
@@ -131,7 +138,7 @@ class LiveCourseList extends React.Component {
const
columns
=
[
{
title
:
"直播课"
,
width
:
"2
0
%"
,
width
:
"2
5
%"
,
key
:
"course"
,
dataIndex
:
"courseName"
,
render
:
(
val
,
record
)
=>
{
...
...
@@ -139,13 +146,13 @@ class LiveCourseList extends React.Component {
<
div
className=
"record__item"
>
<
img
className=
"course-cover"
src=
{
'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'
}
/>
<
div
>
<
div
className=
"course-name"
>
课程名称
</
div
>
<
div
className=
"course-name"
>
{
record
.
courseName
}
</
div
>
<
div
>
<
span
className=
"course-time"
>
2020-11-09 10:00~11:00
</
span
>
<
span
>
待开课
</
span
>
<
span
className=
"course-time"
>
{
formatDate
(
"YYYY-MM-DD H:i"
,
parseInt
(
record
.
startTime
))
}
~
{
formatDate
(
"H:i"
,
parseInt
(
record
.
endTime
))
}
</
span
>
<
span
>
{
courseStateShow
[
record
.
courseState
].
title
}
</
span
>
</
div
>
<
div
>
<
span
>
讲师:
吴帆
</
span
>
<
span
>
讲师:
{
record
.
teacherName
}
</
span
>
<
span
>
|
</
span
>
<
span
>
助教:周晓
</
span
>
</
div
>
...
...
@@ -161,7 +168,7 @@ class LiveCourseList extends React.Component {
dataIndex
:
"couseCatalog"
,
render
:
(
val
,
item
)
=>
{
return
(
<
div
>
一阶培训
</
div
>
<
div
>
{
item
.
categoryName
}
</
div
>
)
},
},
...
...
@@ -172,7 +179,7 @@ class LiveCourseList extends React.Component {
dataIndex
:
"courseware"
,
render
:
(
val
,
item
)
=>
{
return
(
<
span
>
2个
</
span
>
<
span
>
{
item
.
courseDocumentCount
}
</
span
>
);
},
},
...
...
@@ -185,7 +192,7 @@ class LiveCourseList extends React.Component {
return
(
<
span
className=
"iconfont icon"
onClick=
{
()
=>
{
this
.
handleLinkToClassData
(
item
)
}
}
>

</
span
>
}
}
>

</
span
>
);
},
},
...
...
@@ -195,51 +202,74 @@ class LiveCourseList extends React.Component {
dataIndex
:
"courseware"
,
render
:
(
val
,
item
,
index
)
=>
{
return
(
<
Switch
defaultChecked
/>
<
Switch
checked=
{
item
.
shelfState
===
"YES"
?
true
:
false
}
onChange=
{
()
=>
this
.
changeShelfState
(
item
)
}
/>
)
},
},
{
title
:
"操作"
,
width
:
"
20
%"
,
width
:
"
15
%"
,
key
:
"operate"
,
dataIndex
:
"operate"
,
render
:
(
val
,
item
)
=>
{
return
(
<
div
className=
"operate"
>
<
div
key=
"enter_live_room1"
className=
"operate__item"
onClick=
{
()
=>
{
this
.
handleEnterLiveRoom
(
item
)
}
}
>
进入直播间
</
div
>
<
span
className=
"operate__item split"
key=
"enter_live_room1_split"
>
|
</
span
>
<
div
key=
"view_play_back"
className=
"operate__item"
>
查看回放
</
div
>
<
span
className=
"operate__item split"
key=
"view_play_back_split"
>
|
</
span
>
<
div
key=
"share"
{
(
item
.
courseState
===
"UN_START"
||
item
.
courseState
===
"STARTING"
)
&&
<
div
key=
"enter_live_room1"
className=
"operate__item"
onClick=
{
()
=>
{
this
.
handleShowShareModal
(
item
);
}
}
>
分享
onClick=
{
()
=>
{
this
.
handleEnterLiveRoom
(
item
)
}
}
>
进入直播间
</
div
>
<
span
key=
"split1"
className=
"operate__item split"
>
|
</
span
>
<
div
className=
"big-live"
>
<
Dropdown
overlay=
{
this
.
renderMoreOperate
(
item
)
}
>
<
span
className=
"more-operate"
>
<
span
className=
"operate-text"
>
更多
</
span
>
<
span
className=
"iconfont icon"
style=
{
{
color
:
"#FC9C6B"
}
}
}
{
(
item
.
courseState
===
"FINISH"
)
&&
<>
<
span
className=
"operate__item split"
key=
"enter_live_room1_split"
>
|
</
span
>
<
div
key=
"view_play_back"
className=
"operate__item"
>
查看回放
</
div
>
</>
}
{
item
.
courseState
!==
"EXPIRED"
&&
<>
<
span
className=
"operate__item split"
key=
"view_play_back_split"
>
|
</
span
>
<
div
key=
"share"
className=
"operate__item"
onClick=
{
()
=>
{
this
.
handleShowShareModal
(
item
);
}
}
>

</
span
>
</
span
>
</
Dropdown
>
</
div
>
分享
</
div
>
</>
}
{
item
.
courseState
!==
"EXPIRED"
&&
<>
<
span
key=
"split1"
className=
"operate__item split"
>
|
</
span
>
<
div
className=
"big-live"
>
<
Dropdown
overlay=
{
this
.
renderMoreOperate
(
item
)
}
>
<
span
className=
"more-operate"
>
<
span
className=
"operate-text"
>
更多
</
span
>
<
span
className=
"iconfont icon"
style=
{
{
color
:
"#FC9C6B"
}
}
>

</
span
>
</
span
>
</
Dropdown
>
</
div
>
</>
}
{
item
.
courseState
===
"EXPIRED"
&&
<
div
className=
"operate__item"
onClick=
{
this
.
handleDelete
}
>
删除
</
div
>
}
</
div
>
)
}
...
...
@@ -253,12 +283,14 @@ class LiveCourseList extends React.Component {
<
div
className=
"live-course-more-menu"
>
<
div
className=
"operate__item"
onClick=
{
this
.
toEditCoursePage
(
item
)
}
onClick=
{
()
=>
this
.
toEditCoursePage
(
item
)
}
>
编辑
</
div
>
<
div
className=
"operate__item"
onClick=
{
this
.
handleDelete
}
>
删除
</
div
>
{
item
.
courseState
!==
"STARTING"
&&
<
div
className=
"operate__item"
onClick=
{
this
.
handleDelete
}
>
删除
</
div
>
}
</
div
>
)
}
...
...
@@ -276,12 +308,13 @@ class LiveCourseList extends React.Component {
})
}
deleteConfirm
=
(
item
)
=>
{
message
.
success
(
"已删除"
);
}
toEditCoursePage
=
(
item
)
=>
{
//
window.RCHistory.push({
// pathname: '/create-live-course?type=edit'
,
//
})
window
.
RCHistory
.
push
({
pathname
:
`/create-live-course?type=edit&id=
${
item
.
liveCourseId
}
`
,
})
}
refreshCourseList
=
()
=>
{
this
.
props
.
onChange
(
this
.
props
.
query
);
...
...
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