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
f2b70b05
Commit
f2b70b05
authored
May 28, 2021
by
guomingpang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:外部课程相关模块
parent
f1b850cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
129 additions
and
131 deletions
+129
-131
src/modules/course-manage/modal/ShareLiveModal.jsx
+21
-50
src/modules/course-manage/video-course/components/VideoCourseFilter.jsx
+18
-4
src/modules/course-manage/video-course/components/VideoCourseList.jsx
+27
-7
src/modules/knowledge-base/modal/AddCourse.jsx
+63
-70
No files found.
src/modules/course-manage/modal/ShareLiveModal.jsx
View file @
f2b70b05
...
@@ -7,18 +7,17 @@
...
@@ -7,18 +7,17 @@
*/
*/
import
React
from
'react'
import
React
from
'react'
import
{
Modal
,
Input
,
Button
,
message
}
from
'antd'
import
{
Modal
,
Button
,
message
}
from
'antd'
import
domtoimage
from
'dom-to-image'
import
domtoimage
from
'dom-to-image'
import
html2canvas
from
'html2canvas'
import
qrcode
from
'@/libs/qrcode/qrcode.js'
import
qrcode
from
'@/libs/qrcode/qrcode.js'
import
User
from
'@/common/js/user'
import
User
from
'@/common/js/user'
import
$
from
'jquery'
import
$
from
'jquery'
import
_
from
'underscore'
import
CourseService
from
'@/domains/course-domain/CourseService'
import
CourseService
from
'@/domains/course-domain/CourseService'
import
'./ShareLiveModal.less'
import
'./ShareLiveModal.less'
import
'./ShareLiveModal.less'
const
DEFAULT_COVER
=
'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'
const
DEFAULT_COVER
=
'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'
class
ShareLiveModal
extends
React
.
Component
{
class
ShareLiveModal
extends
React
.
Component
{
...
@@ -33,42 +32,6 @@ class ShareLiveModal extends React.Component {
...
@@ -33,42 +32,6 @@ class ShareLiveModal extends React.Component {
componentDidMount
()
{
componentDidMount
()
{
// 获取短链接
// 获取短链接
this
.
handleConvertShortUrl
()
this
.
handleConvertShortUrl
()
// const { needStr, data, type } = this.props;
// const { courseName, coverUrl = DEFAULT_COVER, scheduleVideoUrl } = data;
// const { shareUrl ,time} = this.state;
// // 判断是否是默认图, 默认图不需要在URL后面增加字符串
// const isDefaultCover = coverUrl === DEFAULT_COVER;
// let coverImgSrc = coverUrl;
// if(type === 'videoClass'){
// if(!coverUrl || isDefaultCover){
// coverImgSrc = `${scheduleVideoUrl}?x-oss-process=video/snapshot,t_0,m_fast&anystring=anystring`
// }
// }else{
// data.courseMediaVOS.map((item,index)=>{
// if( item.contentType === "COVER"){
// coverImgSrc = item.mediaUrl;
// }
// })
// }
// let image = new Image()
// image.src =coverImgSrc + '?v=' + Math.random()
// image.crossOrigin = "*"
// image.onload = ()=>{
// let imgData = getBase64Image(image)
// this.setState({imgData})
// }
// function getBase64Image (img) {
// let canvas = document.createElement("canvas")
// canvas.width = img.width
// canvas.height = img.height
// let ctx = canvas.getContext("2d")
// ctx.drawImage(img, 0, 0, img.width, img.height)
// let dataURL = canvas.toDataURL("image/png")
// return dataURL
// }
}
}
handleConvertShortUrl
=
()
=>
{
handleConvertShortUrl
=
()
=>
{
...
@@ -134,17 +97,21 @@ class ShareLiveModal extends React.Component {
...
@@ -134,17 +97,21 @@ class ShareLiveModal extends React.Component {
}
}
render
()
{
render
()
{
const
{
needStr
,
data
,
type
,
title
}
=
this
.
props
const
{
courseDivision
,
data
,
type
,
title
}
=
this
.
props
const
{
courseName
,
coverUrl
=
DEFAULT_COVER
,
scheduleVideoUrl
}
=
data
const
{
courseName
,
coverUrl
=
DEFAULT_COVER
,
scheduleVideoUrl
}
=
data
const
{
shareUrl
,
imgData
,
showImg
,
time
}
=
this
.
state
const
{
shareUrl
,
showImg
,
time
}
=
this
.
state
// 判断是否是默认图, 默认图不需要在URL后面增加字符串
// 判断是否是默认图, 默认图不需要在URL后面增加字符串
const
isDefaultCover
=
coverUrl
===
DEFAULT_COVER
const
isDefaultCover
=
coverUrl
===
DEFAULT_COVER
let
coverImgSrc
=
coverUrl
let
coverImgSrc
=
coverUrl
if
(
type
===
'videoClass'
)
{
if
(
type
===
'videoClass'
)
{
if
((
!
coverUrl
||
isDefaultCover
)
&&
title
!==
'图文课'
&&
title
!=
'线下课'
)
{
if
((
!
coverUrl
||
isDefaultCover
)
&&
title
!==
'图文课'
&&
title
!==
'线下课'
)
{
coverImgSrc
=
`
${
scheduleVideoUrl
}
?x-oss-process=video/snapshot,t_0,m_fast&anystring=anystring`
if
(
courseDivision
===
'external'
)
{
coverImgSrc
=
'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png'
}
else
{
coverImgSrc
=
`
${
scheduleVideoUrl
}
?x-oss-process=video/snapshot,t_0,m_fast&anystring=anystring`
}
}
}
}
else
{
}
else
{
data
.
courseMediaVOS
.
map
((
item
,
index
)
=>
{
data
.
courseMediaVOS
.
map
((
item
,
index
)
=>
{
...
@@ -172,15 +139,19 @@ class ShareLiveModal extends React.Component {
...
@@ -172,15 +139,19 @@ class ShareLiveModal extends React.Component {
<
div
className=
'course-name-title'
>
{
type
===
'videoClass'
?
`${courseName}开课啦`
:
`邀请你观看直播:`
}
</
div
>
<
div
className=
'course-name-title'
>
{
type
===
'videoClass'
?
`${courseName}开课啦`
:
`邀请你观看直播:`
}
</
div
>
{
type
===
'liveClass'
&&
<
div
class=
'live-couse-name'
>
{
courseName
}
</
div
>
}
{
type
===
'liveClass'
&&
<
div
class=
'live-couse-name'
>
{
courseName
}
</
div
>
}
{
showImg
?
(
<
Choose
>
<
img
crossOrigin=
'*'
src=
{
coverImgSrc
+
`?=${time}`
}
className=
'course-cover'
/>
<
When
condition=
{
showImg
}
>
)
:
(
<
img
crossOrigin=
'*'
src=
{
coverImgSrc
+
`?=${time}`
}
className=
'course-cover'
alt=
''
/>
<
img
src=
{
coverImgSrc
+
`?=${time}`
}
className=
'course-cover'
/>
</
When
>
)
}
<
Otherwise
>
<
img
src=
{
coverImgSrc
+
`?=${time}`
}
className=
'course-cover'
alt=
''
/>
</
Otherwise
>
</
Choose
>
<
div
className=
'qrcode-wrap'
>
<
div
className=
'qrcode-wrap'
>
<
div
className=
'qrcode-wrap__left'
>
<
div
className=
'qrcode-wrap__left'
>
<
div
className=
'text'
>
长按识别二维码进入观看
</
div
>
<
div
className=
'text'
>
长按识别二维码进入观看
</
div
>
<
img
className=
'finger'
src=
'https://image.xiaomaiketang.com/xm/thpkWDwJsC.png'
/>
<
img
className=
'finger'
src=
'https://image.xiaomaiketang.com/xm/thpkWDwJsC.png'
alt=
''
/>
</
div
>
</
div
>
<
div
className=
'qrcode-wrap__right'
id=
'qrcodeWrap'
></
div
>
<
div
className=
'qrcode-wrap__right'
id=
'qrcodeWrap'
></
div
>
</
div
>
</
div
>
...
...
src/modules/course-manage/video-course/components/VideoCourseFilter.jsx
View file @
f2b70b05
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:11:57
* @LastEditors: fusanqiasng
* @LastEditTime: 2021-05-28 14:07:37
* @Description: 视频课-搜索模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import
React
from
'react'
import
React
from
'react'
import
{
Row
,
Input
,
Select
,
Tooltip
,
TreeSelect
}
from
'antd'
import
{
Row
,
Input
,
Select
,
Tooltip
,
TreeSelect
}
from
'antd'
...
@@ -48,18 +57,21 @@ class VideoCourseFilter extends React.Component {
...
@@ -48,18 +57,21 @@ class VideoCourseFilter extends React.Component {
this
.
queryCategoryTree
()
this
.
queryCategoryTree
()
}
}
// 查询分类树
// 查询分类树
queryCategoryTree
=
(
categoryName
)
=>
{
queryCategoryTree
=
(
categoryName
=
''
)
=>
{
let
query
=
{
let
query
=
{
bizType
:
'QUESTION'
,
bizType
:
'QUESTION'
,
source
:
2
,
source
:
2
,
categoryName
,
tenantId
:
User
.
getStoreId
(),
tenantId
:
User
.
getStoreId
(),
userId
:
User
.
getStoreUserId
(),
userId
:
User
.
getStoreUserId
(),
count
:
false
,
count
:
false
,
}
}
AidToolService
.
queryExternalCategoryTree
(
query
).
then
((
res
)
=>
{
AidToolService
.
queryExternalCategoryTree
(
query
).
then
((
res
)
=>
{
const
{
categoryList
=
[]
}
=
res
.
result
const
{
categoryList
=
[]
}
=
res
.
result
console
.
log
(
this
.
renderTreeNodes
(
categoryList
))
this
.
setState
({
this
.
setState
({
categoryList
:
this
.
renderTreeNodes
(
categoryList
),
categoryList
:
this
.
renderTreeNodes
(
categoryList
),
categoryName
,
})
})
})
})
}
}
...
@@ -175,14 +187,15 @@ class VideoCourseFilter extends React.Component {
...
@@ -175,14 +187,15 @@ class VideoCourseFilter extends React.Component {
render
()
{
render
()
{
const
{
currentTabKey
}
=
this
.
props
const
{
currentTabKey
}
=
this
.
props
const
{
const
{
query
:
{
courseName
,
beginTime
,
endTime
,
operatorId
,
shelfState
},
query
:
{
courseName
,
beginTime
,
endTime
,
operatorId
,
shelfState
,
categoryId
},
expandFilter
,
expandFilter
,
teacherList
,
teacherList
,
teacherQuery
,
teacherQuery
,
categoryList
,
categoryList
,
category
Id
,
category
Name
,
}
=
this
.
state
}
=
this
.
state
console
.
log
(
'categoryList'
,
categoryList
)
return
(
return
(
<
div
className=
'video-course-filter'
>
<
div
className=
'video-course-filter'
>
<
Row
type=
'flex'
justify=
'space-between'
align=
'top'
>
<
Row
type=
'flex'
justify=
'space-between'
align=
'top'
>
...
@@ -261,7 +274,8 @@ class VideoCourseFilter extends React.Component {
...
@@ -261,7 +274,8 @@ class VideoCourseFilter extends React.Component {
<
div
className=
'search-condition__item'
>
<
div
className=
'search-condition__item'
>
<
span
className=
'shelf-status'
>
课程分类:
</
span
>
<
span
className=
'shelf-status'
>
课程分类:
</
span
>
<
TreeSelect
<
TreeSelect
value=
{
categoryId
||
null
}
treeNodeFilterProp=
'categoryName'
showSearch
style=
{
{
width
:
'calc(100% - 75px)'
}
}
style=
{
{
width
:
'calc(100% - 75px)'
}
}
dropdownStyle=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
dropdownStyle=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
treeData=
{
categoryList
}
treeData=
{
categoryList
}
...
...
src/modules/course-manage/video-course/components/VideoCourseList.jsx
View file @
f2b70b05
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
* @LastEditors: fusanqiasng
<<<<<<< HEAD
* @LastEditTime: 2021-05-28 14:01:36
=======
<<<<<<< Updated upstream
* @LastEditTime: 2021-05-27 17:48:31
=======
* @LastEditTime: 2021-05-27 19:13:55
>>>>>>> Stashed changes
>>>>>>> feature/pangguoming/20210520/external_courses
* @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'
import
_
from
'underscore'
import
_
from
'underscore'
...
@@ -62,7 +78,6 @@ class VideoCourseList extends React.Component {
...
@@ -62,7 +78,6 @@ class VideoCourseList extends React.Component {
fixed
:
'left'
,
fixed
:
'left'
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
const
{
coverUrl
,
scheduleVideoUrl
}
=
record
const
{
coverUrl
,
scheduleVideoUrl
}
=
record
console
.
log
(
'coverUrl'
,
coverUrl
)
return
(
return
(
<
div
className=
'record__item'
>
<
div
className=
'record__item'
>
{
/* 上传了封面的话就用上传的封面, 没有的话就取视频的第一帧 */
}
{
/* 上传了封面的话就用上传的封面, 没有的话就取视频的第一帧 */
}
...
@@ -144,9 +159,9 @@ class VideoCourseList extends React.Component {
...
@@ -144,9 +159,9 @@ class VideoCourseList extends React.Component {
<
Tooltip
<
Tooltip
title=
{
title=
{
<
div
>
<
div
>
开启后,
用户可在学院内查看到此课程。若课程“未成功开课”,则系统会自动“关闭”学院展示
。
开启后,
学员可在学院内查看到此课程
。
<
br
/>
<
br
/>
关闭后,学院内不再展示此课程,但
用户
仍可通过分享的海报/链接查看此课程。
关闭后,学院内不再展示此课程,但
学员
仍可通过分享的海报/链接查看此课程。
</
div
>
</
div
>
}
>
}
>
<
i
className=
'icon iconfont'
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
}
}
>
<
i
className=
'icon iconfont'
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
}
}
>
...
@@ -240,10 +255,13 @@ class VideoCourseList extends React.Component {
...
@@ -240,10 +255,13 @@ class VideoCourseList extends React.Component {
<
div
className=
'operate__item'
onClick=
{
()
=>
this
.
handleShowWatchDataModal
(
record
)
}
>
<
div
className=
'operate__item'
onClick=
{
()
=>
this
.
handleShowWatchDataModal
(
record
)
}
>
观看数据
观看数据
</
div
>
</
div
>
<
span
className=
'operate__item split'
>
|
</
span
>
<
div
className=
'operate__item'
onClick=
{
()
=>
this
.
handleShowShareModal
(
record
)
}
>
<
If
condition=
{
type
===
'internal'
}
>
分享
<
span
className=
'operate__item split'
>
|
</
span
>
</
div
>
<
div
className=
'operate__item'
onClick=
{
()
=>
this
.
handleShowShareModal
(
record
)
}
>
分享
</
div
>
</
If
>
<
span
className=
'operate__item split'
>
|
</
span
>
<
span
className=
'operate__item split'
>
|
</
span
>
<
Dropdown
overlay=
{
this
.
renderMoreOperate
(
record
)
}
>
<
Dropdown
overlay=
{
this
.
renderMoreOperate
(
record
)
}
>
<
span
className=
'more-operate'
>
<
span
className=
'more-operate'
>
...
@@ -350,6 +368,7 @@ class VideoCourseList extends React.Component {
...
@@ -350,6 +368,7 @@ class VideoCourseList extends React.Component {
// 显示分享弹窗
// 显示分享弹窗
handleShowShareModal
=
(
record
,
needStr
=
false
)
=>
{
handleShowShareModal
=
(
record
,
needStr
=
false
)
=>
{
const
{
type
}
=
this
.
props
const
{
id
,
scheduleVideoUrl
}
=
record
const
{
id
,
scheduleVideoUrl
}
=
record
const
htmlUrl
=
`
${
LIVE_SHARE
}
video_detail/
${
id
}
?id=
${
User
.
getStoreId
()}
`
const
htmlUrl
=
`
${
LIVE_SHARE
}
video_detail/
${
id
}
?id=
${
User
.
getStoreId
()}
`
const
longUrl
=
htmlUrl
const
longUrl
=
htmlUrl
...
@@ -366,6 +385,7 @@ class VideoCourseList extends React.Component {
...
@@ -366,6 +385,7 @@ class VideoCourseList extends React.Component {
needStr=
{
needStr
}
needStr=
{
needStr
}
data=
{
shareData
}
data=
{
shareData
}
type=
'videoClass'
type=
'videoClass'
courseDivision=
{
type
}
title=
'视频课'
title=
'视频课'
close=
{
()
=>
{
close=
{
()
=>
{
this
.
setState
({
this
.
setState
({
...
...
src/modules/knowledge-base/modal/AddCourse.jsx
View file @
f2b70b05
...
@@ -3,15 +3,7 @@
...
@@ -3,15 +3,7 @@
* @Author: zangsuyun
* @Author: zangsuyun
* @Date: 2021-03-13 09:54:26
* @Date: 2021-03-13 09:54:26
* @LastEditors: fusanqiasng
* @LastEditors: fusanqiasng
<<<<<<< HEAD
* @LastEditTime: 2021-05-28 14:21:22
<<<<<<< HEAD
* @LastEditTime: 2021-05-28 13:44:46
=======
* @LastEditTime: 2021-05-25 21:48:22
>>>>>>> beb2d0f (featru:外部课程冒烟测试bug修复)
=======
* @LastEditTime: 2021-05-27 19:08:41
>>>>>>> 9b82e1b (fix:修复外部课程相关模块bug)
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -421,7 +413,6 @@ class AddCourse extends React.Component {
...
@@ -421,7 +413,6 @@ class AddCourse extends React.Component {
return
(
return
(
<
div
className=
'record__item'
>
<
div
className=
'record__item'
>
{
/* 上传了封面的话就用上传的封面, 没有的话就取视频的第一帧 */
}
{
/* 上传了封面的话就用上传的封面, 没有的话就取视频的第一帧 */
}
<
img
<
img
className=
'course-cover'
className=
'course-cover'
src=
{
src=
{
...
@@ -432,7 +423,6 @@ class AddCourse extends React.Component {
...
@@ -432,7 +423,6 @@ class AddCourse extends React.Component {
}
}
alt=
''
alt=
''
/>
/>
<
Choose
>
<
Choose
>
<
When
condition=
{
record
.
courseName
.
length
>
25
}
>
<
When
condition=
{
record
.
courseName
.
length
>
25
}
>
<
Tooltip
title=
{
record
.
courseName
}
>
<
Tooltip
title=
{
record
.
courseName
}
>
...
@@ -635,10 +625,10 @@ class AddCourse extends React.Component {
...
@@ -635,10 +625,10 @@ class AddCourse extends React.Component {
handAddCourse
=
()
=>
{
handAddCourse
=
()
=>
{
const
{
selectVideo
,
selectLive
,
selectPicture
}
=
this
.
state
const
{
selectVideo
,
selectLive
,
selectPicture
}
=
this
.
state
const
batchAddList
=
[]
const
batchAddList
=
[]
if
(
selectVideo
.
length
)
{
if
(
selectVideo
.
external
.
length
)
{
batchAddList
.
push
({
batchAddList
.
push
({
categoryId
:
this
.
props
.
categoryId
,
categoryId
:
this
.
props
.
categoryId
,
refIds
:
_
.
pluck
(
selectVideo
,
'id'
),
refIds
:
_
.
pluck
(
selectVideo
.
external
,
'id'
),
storeId
:
User
.
getStoreId
(),
storeId
:
User
.
getStoreId
(),
type
:
'VOICE'
,
type
:
'VOICE'
,
createId
:
User
.
getStoreUserId
(),
createId
:
User
.
getStoreUserId
(),
...
@@ -705,7 +695,10 @@ class AddCourse extends React.Component {
...
@@ -705,7 +695,10 @@ class AddCourse extends React.Component {
return
(
return
(
<
div
>
<
div
>
<
Button
onClick=
{
this
.
props
.
onClose
}
>
取消
</
Button
>
<
Button
onClick=
{
this
.
props
.
onClose
}
>
取消
</
Button
>
<
Button
disabled=
{
!
(
selectLive
.
length
||
selectVideo
.
length
||
selectPicture
.
length
)
}
type=
'primary'
onClick=
{
this
.
handAddCourse
}
>
<
Button
disabled=
{
!
(
selectLive
.
length
||
selectVideo
.
external
.
length
||
selectVideo
.
internal
.
length
||
selectPicture
.
length
)
}
type=
'primary'
onClick=
{
this
.
handAddCourse
}
>
确定
确定
</
Button
>
</
Button
>
</
div
>
</
div
>
...
@@ -784,24 +777,18 @@ class AddCourse extends React.Component {
...
@@ -784,24 +777,18 @@ class AddCourse extends React.Component {
return
(
return
(
<
Modal
visible=
{
true
}
width=
{
800
}
title=
'新增课程'
footer=
{
this
.
renderFooter
()
}
onCancel=
{
this
.
props
.
onClose
}
className=
'add-course-modal'
>
<
Modal
visible=
{
true
}
width=
{
800
}
title=
'新增课程'
footer=
{
this
.
renderFooter
()
}
onCancel=
{
this
.
props
.
onClose
}
className=
'add-course-modal'
>
<
Tabs
defaultActiveKey=
'VIDEO'
>
<
Tabs
defaultActiveKey=
'LIVE'
>
<
TabPane
tab=
'视频课'
key=
'VIDEO'
>
<
TabPane
tab=
'直播课'
key=
'LIVE'
>
<
Radio
.
Group
value=
{
videoCourseDivision
}
onChange=
{
this
.
videoCourseDivisionChange
}
style=
{
{
marginBottom
:
8
}
}
>
<
Radio
.
Button
value=
'internal'
>
内部课程
</
Radio
.
Button
>
<
Radio
.
Button
value=
'external'
>
外部课程
</
Radio
.
Button
>
</
Radio
.
Group
>
<
div
className=
'live-list'
>
<
div
className=
'live-list'
>
<
div
>
<
div
>
<
Row
type=
'flex'
justify=
'space-between'
align=
'top'
>
<
Row
type=
'flex'
justify=
'space-between'
align=
'top'
>
<
div
>
<
div
>
<
span
style=
{
{
lineHeight
:
'32px'
}
}
>
课程名称:
</
span
>
<
span
style=
{
{
lineHeight
:
'32px'
}
}
>
课程名称:
</
span
>
<
Search
<
Search
value=
{
videoSearchDefalt
[
videoCourseDivision
].
courseName
}
style=
{
{
width
:
'calc(100% - 75px)'
}
}
style=
{
{
width
:
'calc(100% - 75px)'
}
}
placeholder=
'搜索课程名称'
placeholder=
'搜索课程名称'
onChange=
{
this
.
handleChangVideoCourseName
}
onSearch=
{
(
value
)
=>
{
onSearch=
{
(
value
)
=>
{
this
.
handleChang
Video
Filter
(
'courseName'
,
value
)
this
.
handleChang
Live
Filter
(
'courseName'
,
value
)
}
}
}
}
enterButton=
{
<
span
className=
'icon iconfont'
>

</
span
>
}
enterButton=
{
<
span
className=
'icon iconfont'
>

</
span
>
}
/>
/>
...
@@ -809,14 +796,15 @@ class AddCourse extends React.Component {
...
@@ -809,14 +796,15 @@ class AddCourse extends React.Component {
<
div
style=
{
{
width
:
'50%'
}
}
>
<
div
style=
{
{
width
:
'50%'
}
}
>
<
span
className=
'shelf-status'
>
课程分类:
</
span
>
<
span
className=
'shelf-status'
>
课程分类:
</
span
>
<
TreeSelect
<
TreeSelect
value=
{
videoSearchDefalt
[
videoCourseDivision
].
categoryId
}
treeNodeFilterProp=
'categoryName'
showSearch
style=
{
{
width
:
'calc(100% - 75px)'
}
}
style=
{
{
width
:
'calc(100% - 75px)'
}
}
dropdownStyle=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
dropdownStyle=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
treeData=
{
videoCourseDivision
===
'internal'
?
categoryList
:
categoryListExternal
}
treeData=
{
categoryList
}
placeholder=
'请选择课程类型'
placeholder=
'请选择课程类型'
allowClear
allowClear
onChange=
{
(
value
)
=>
{
onChange=
{
(
value
)
=>
{
this
.
handleChang
Video
Filter
(
'categoryId'
,
value
)
this
.
handleChang
Live
Filter
(
'categoryId'
,
value
)
}
}
}
}
/>
/>
</
div
>
</
div
>
...
@@ -836,57 +824,56 @@ class AddCourse extends React.Component {
...
@@ -836,57 +824,56 @@ class AddCourse extends React.Component {
}
}
}
}
/>
/>
<
Table
<
Table
rowKey=
{
(
record
)
=>
record
.
id
}
bordered
dataSource=
{
videoDataSource
[
videoCourseDivision
]
}
columns=
{
this
.
videoColumns
()
}
size=
'middle'
size=
'middle'
rowSelection=
{
VideoSelection
}
pagination=
{
false
}
pagination=
{
false
}
bordered
columns=
{
this
.
liveColumns
()
}
className=
'video-list-table'
rowSelection=
{
LiveSelection
}
// loading={loading}
dataSource=
{
liveDataSource
}
style=
{
{
maxHeight
:
359
,
overflow
:
'scroll'
}
}
style=
{
{
maxHeight
:
359
,
overflow
:
'scroll'
}
}
rowKey=
{
(
row
)
=>
row
.
liveCourseId
}
/>
/>
{
liveTotalCount
>
0
&&
(
<
div
className=
'box-footer'
>
<
div
className=
'box-footer'
>
{
videoDataSource
[
videoCourseDivision
].
length
>
0
&&
(
<
PageControl
<
PageControl
current=
{
videoQuery
[
videoCourseDivision
]
.
current
-
1
}
current=
{
liveQuery
.
current
-
1
}
pageSize=
{
videoSize
[
videoCourseDivision
]
}
pageSize=
{
liveSize
}
total=
{
videoTotalCount
[
videoCourseDivision
]
}
total=
{
parseInt
(
liveTotalCount
)
}
toPage=
{
(
page
)
=>
{
toPage=
{
(
page
)
=>
{
const
_query
=
{
...
videoQuery
[
videoCourseDivision
],
current
:
page
+
1
}
const
_query
=
{
...
liveQuery
,
current
:
page
+
1
}
console
.
log
(
'_query'
,
_query
)
this
.
setState
(
this
.
setState
(
{
{
videoQuery
:
{
...
videoQuery
,
[
videoCourseDivision
]:
_query
,
},
liveQuery
:
_query
,
liveQuery
:
_query
,
},
},
()
=>
{
()
=>
{
this
.
handleFetch
Video
List
()
this
.
handleFetch
Live
List
()
}
}
)
)
}
}
}
}
onShowSizeChange=
{
this
.
onShow
Video
SizeChange
}
onShowSizeChange=
{
this
.
onShow
Live
SizeChange
}
/>
/>
)
}
</
div
>
</
div
>
)
}
</
div
>
</
div
>
</
TabPane
>
</
TabPane
>
<
TabPane
tab=
'直播课'
key=
'LIVE'
>
<
TabPane
tab=
'视频课'
key=
'VIDEO'
>
<
Radio
.
Group
value=
{
videoCourseDivision
}
onChange=
{
this
.
videoCourseDivisionChange
}
style=
{
{
marginBottom
:
8
}
}
>
<
Radio
.
Button
value=
'internal'
>
内部课程
</
Radio
.
Button
>
<
Radio
.
Button
value=
'external'
>
外部课程
</
Radio
.
Button
>
</
Radio
.
Group
>
<
div
className=
'live-list'
>
<
div
className=
'live-list'
>
<
div
>
<
div
>
<
Row
type=
'flex'
justify=
'space-between'
align=
'top'
>
<
Row
type=
'flex'
justify=
'space-between'
align=
'top'
>
<
div
>
<
div
>
<
span
style=
{
{
lineHeight
:
'32px'
}
}
>
课程名称:
</
span
>
<
span
style=
{
{
lineHeight
:
'32px'
}
}
>
课程名称:
</
span
>
<
Search
<
Search
value=
{
videoSearchDefalt
[
videoCourseDivision
].
courseName
}
style=
{
{
width
:
'calc(100% - 75px)'
}
}
style=
{
{
width
:
'calc(100% - 75px)'
}
}
placeholder=
'搜索课程名称'
placeholder=
'搜索课程名称'
onChange=
{
this
.
handleChangVideoCourseName
}
onSearch=
{
(
value
)
=>
{
onSearch=
{
(
value
)
=>
{
this
.
handleChang
Live
Filter
(
'courseName'
,
value
)
this
.
handleChang
Video
Filter
(
'courseName'
,
value
)
}
}
}
}
enterButton=
{
<
span
className=
'icon iconfont'
>

</
span
>
}
enterButton=
{
<
span
className=
'icon iconfont'
>

</
span
>
}
/>
/>
...
@@ -894,13 +881,15 @@ class AddCourse extends React.Component {
...
@@ -894,13 +881,15 @@ class AddCourse extends React.Component {
<
div
style=
{
{
width
:
'50%'
}
}
>
<
div
style=
{
{
width
:
'50%'
}
}
>
<
span
className=
'shelf-status'
>
课程分类:
</
span
>
<
span
className=
'shelf-status'
>
课程分类:
</
span
>
<
TreeSelect
<
TreeSelect
treeNodeFilterProp=
'categoryName'
showSearch
style=
{
{
width
:
'calc(100% - 75px)'
}
}
style=
{
{
width
:
'calc(100% - 75px)'
}
}
dropdownStyle=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
dropdownStyle=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
treeData=
{
categoryList
}
treeData=
{
videoCourseDivision
===
'internal'
?
categoryList
:
categoryListExternal
}
placeholder=
'请选择课程类型'
placeholder=
'请选择课程类型'
allowClear
allowClear
onChange=
{
(
value
)
=>
{
onChange=
{
(
value
)
=>
{
this
.
handleChang
Live
Filter
(
'categoryId'
,
value
)
this
.
handleChang
Video
Filter
(
'categoryId'
,
value
)
}
}
}
}
/>
/>
</
div
>
</
div
>
...
@@ -920,43 +909,45 @@ class AddCourse extends React.Component {
...
@@ -920,43 +909,45 @@ class AddCourse extends React.Component {
}
}
}
}
/>
/>
<
Table
<
Table
bordered
rowKey=
{
(
record
)
=>
record
.
id
}
dataSource=
{
videoDataSource
[
videoCourseDivision
]
}
columns=
{
this
.
videoColumns
()
}
size=
'middle'
size=
'middle'
rowSelection=
{
VideoSelection
}
pagination=
{
false
}
pagination=
{
false
}
columns=
{
this
.
liveColumns
()
}
bordered
rowSelection=
{
LiveSelection
}
className=
'video-list-table'
// loading={loading}
dataSource=
{
liveDataSource
}
style=
{
{
maxHeight
:
359
,
overflow
:
'scroll'
}
}
style=
{
{
maxHeight
:
359
,
overflow
:
'scroll'
}
}
rowKey=
{
(
row
)
=>
row
.
liveCourseId
}
/>
/>
{
liveTotalCount
>
0
&&
(
<
div
className=
'box-footer'
>
<
div
className=
'box-footer'
>
{
videoDataSource
[
videoCourseDivision
].
length
>
0
&&
(
<
PageControl
<
PageControl
current=
{
liveQuery
.
current
-
1
}
current=
{
videoQuery
[
videoCourseDivision
]
.
current
-
1
}
pageSize=
{
liveSize
}
pageSize=
{
videoSize
[
videoCourseDivision
]
}
total=
{
parseInt
(
liveTotalCount
)
}
total=
{
videoTotalCount
[
videoCourseDivision
]
}
toPage=
{
(
page
)
=>
{
toPage=
{
(
page
)
=>
{
const
_query
=
{
...
liveQuery
,
current
:
page
+
1
}
const
_query
=
{
...
videoQuery
[
videoCourseDivision
],
current
:
page
+
1
}
console
.
log
(
'_query'
,
_query
)
this
.
setState
(
this
.
setState
(
{
{
liveQuery
:
_query
,
videoQuery
:
{
videoQuery
:
{
...
videoQuery
,
...
videoQuery
,
[
videoCourseDivision
]:
_query
,
[
videoCourseDivision
]:
_query
,
},
},
},
},
()
=>
{
()
=>
{
this
.
handleFetch
Live
List
()
this
.
handleFetch
Video
List
()
}
}
)
)
}
}
}
}
onShowSizeChange=
{
this
.
onShow
Live
SizeChange
}
onShowSizeChange=
{
this
.
onShow
Video
SizeChange
}
/>
/>
</
div
>
)
}
)
}
</
div
>
</
div
>
</
div
>
</
TabPane
>
</
TabPane
>
<
TabPane
tab=
'图文课'
key=
'PICTURE'
>
<
TabPane
tab=
'图文课'
key=
'PICTURE'
>
<
div
className=
'live-list'
>
<
div
className=
'live-list'
>
<
div
>
<
div
>
...
@@ -975,6 +966,8 @@ class AddCourse extends React.Component {
...
@@ -975,6 +966,8 @@ class AddCourse extends React.Component {
<
div
style=
{
{
width
:
'50%'
}
}
>
<
div
style=
{
{
width
:
'50%'
}
}
>
<
span
className=
'shelf-status'
>
课程分类:
</
span
>
<
span
className=
'shelf-status'
>
课程分类:
</
span
>
<
TreeSelect
<
TreeSelect
treeNodeFilterProp=
'categoryName'
showSearch
style=
{
{
width
:
'calc(100% - 75px)'
}
}
style=
{
{
width
:
'calc(100% - 75px)'
}
}
dropdownStyle=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
dropdownStyle=
{
{
maxHeight
:
400
,
overflow
:
'auto'
}
}
treeData=
{
categoryList
}
treeData=
{
categoryList
}
...
...
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