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
b11a9005
Commit
b11a9005
authored
May 07, 2021
by
chenshu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:初始化
parent
173422ca
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
133 deletions
+86
-133
src/modules/course-manage/offline-course/components/OfflineCourseFilter.jsx
+12
-61
src/modules/course-manage/offline-course/components/OfflineCourseList.jsx
+30
-60
src/modules/course-manage/offline-course/components/OfflineCourseList.less
+22
-12
src/modules/knowledge-base/ENUM.js
+22
-0
No files found.
src/modules/course-manage/offline-course/components/OfflineCourseFilter.jsx
View file @
b11a9005
...
...
@@ -116,15 +116,10 @@ class OfflineCourseFilter extends React.Component {
const
{
query
:
{
courseName
,
operator
,
beginTime
,
endTime
,
operatorId
,
shelfState
courseState
,
shelfState
,
},
expandFilter
,
teacherList
,
teacherQuery
}
=
this
.
state
;
return
(
...
...
@@ -142,62 +137,22 @@ class OfflineCourseFilter extends React.Component {
enterButton=
{
<
span
className=
"icon iconfont"
>

</
span
>
}
/>
</
div
>
<
div
className=
"search-condition__item"
>
<
span
>
创建人
:
</
span
>
<
span
className=
"select-status"
>
课程状态
:
</
span
>
<
Select
placeholder=
"请选择创建人"
style=
{
{
width
:
"calc(100% - 70px)"
}
}
showSearch
allowClear
filterOption=
{
(
input
,
option
)
=>
option
}
onPopupScroll=
{
this
.
handleScrollTeacherList
}
style=
{
{
width
:
"calc(100% - 70px)"
}
}
placeholder=
"请选择"
allowClear=
{
true
}
value=
{
courseState
}
onChange=
{
(
value
)
=>
{
this
.
handleChangeQuery
(
'courseState'
,
value
)
}
}
suffixIcon=
{
<
span
className=
"icon iconfont"
style=
{
{
fontSize
:
'12px'
,
color
:
'#BFBFBF'
}
}
>

</
span
>
}
value=
{
operatorId
}
onChange=
{
(
value
)
=>
{
this
.
handleChangeQuery
(
'operatorId'
,
value
)
}
}
onSearch=
{
(
value
)
=>
{
teacherQuery
.
nickName
=
value
this
.
setState
({
teacherQuery
},
()
=>
{
this
.
getTeacherList
()
})
}
}
onClear
={(
value
)=
>
{
this
.
setState
({
teacherQuery
:{
size
:
10
,
current
:
1
,
nickName
:
null
}
},
()
=>
{
this
.
getTeacherList
()
})
}
}
>
{
_
.
map
(
teacherList
,
(
item
,
index
)
=>
{
return
(
<
Select
.
Option
value=
{
item
.
id
}
key=
{
item
.
id
}
>
{
item
.
nickName
}
</
Select
.
Option
>
);
})
}
<
Option
value=
"UN_START"
>
未开始
</
Option
>
<
Option
value=
"STARTING"
>
进行中
</
Option
>
<
Option
value=
"FINISH"
>
已结束
</
Option
>
<
Option
value=
"EXPIRED"
>
已取消
</
Option
>
</
Select
>
</
div
>
<
div
className=
"search-condition__item"
>
<
span
className=
"search-date"
>
创建日期:
</
span
>
<
RangePicker
id=
"course_date_picker"
allowClear=
{
false
}
value=
{
beginTime
?
[
moment
(
beginTime
),
moment
(
endTime
)]
:
null
}
format=
{
"YYYY-MM-DD"
}
onChange=
{
(
dates
)
=>
{
this
.
handleChangeDates
(
dates
)
}
}
style=
{
{
width
:
"calc(100% - 70px)"
}
}
/>
</
div
>
{
expandFilter
&&
<
div
className=
"search-condition__item"
>
<
span
className=
"shelf-status"
>
学院展示:
</
span
>
<
Select
...
...
@@ -212,13 +167,9 @@ class OfflineCourseFilter extends React.Component {
<
Option
value=
"NO"
>
关闭
</
Option
>
</
Select
>
</
div
>
}
</
div
>
<
div
className=
"reset-fold-area"
>
<
Tooltip
title=
"清空筛选"
><
span
className=
"resetBtn iconfont icon"
onClick=
{
this
.
handleReset
}
>

</
span
></
Tooltip
>
<
span
style=
{
{
cursor
:
'pointer'
}
}
className=
"fold-btn"
onClick=
{
()
=>
{
this
.
setState
({
expandFilter
:
!
expandFilter
});
}
}
>
{
this
.
state
.
expandFilter
?
<
span
><
span
>
收起
</
span
><
span
className=
"iconfont icon fold-icon"
>

</
span
>
</
span
>
:
<
span
>
展开
<
span
className=
"iconfont icon fold-icon"
>

</
span
></
span
>
}
</
span
>
</
div
>
</
Row
>
</
div
>
...
...
src/modules/course-manage/offline-course/components/OfflineCourseList.jsx
View file @
b11a9005
...
...
@@ -19,6 +19,7 @@ import WatchDataModal from '../modal/WatchDataModal'
import
CourseService
from
"@/domains/course-domain/CourseService"
;
import
RelatedPlanModal
from
'../../modal/RelatedPlanModal'
;
import
ENUM
from
"../../../knowledge-base/ENUM.js"
;
import
User
from
'@/common/js/user'
...
...
@@ -78,7 +79,7 @@ class OfflineCourseList extends React.Component {
parseColumns
=
()
=>
{
const
columns
=
[
{
title
:
'
图文
课'
,
title
:
'
线下
课'
,
key
:
'scheduleName'
,
dataIndex
:
'scheduleName'
,
width
:
321
,
...
...
@@ -87,49 +88,40 @@ class OfflineCourseList extends React.Component {
const
{
coverUrl
,
scheduleVideoUrl
}
=
record
;
return
(
<
div
className=
"record__item"
>
{
/* 上传了封面的话就用上传的封面, 没有的话就取视频的第一帧 */
}
<
img
className=
"course-cover"
src=
{
coverUrl
||
defaultCoverUrl
}
/>
{
record
.
courseName
.
length
>
25
?
<
div
>
<
Tooltip
title=
{
record
.
courseName
}
>
<
div
className=
"course-name"
>
{
record
.
courseName
}
</
div
>
</
Tooltip
>
:
<
div
className=
"course-
name"
>
{
record
.
courseName
}
</
div
>
}
<
div
className=
"course-text"
>
地点:一行最多二十字超出一行最多二十字超出
</
div
>
<
div
className=
"course-
text"
>
12-01 09:00 ~ 01-01 14:00
</
div
>
</
div
>
</
div
>
)
}
},
{
title
:
'
课程分类
'
,
key
:
'c
ategoryNam
e'
,
dataIndex
:
'c
ategoryNam
e'
,
title
:
'
上课状态
'
,
key
:
'c
ourseStat
e'
,
dataIndex
:
'c
ourseStat
e'
,
width
:
120
,
render
:
(
val
,
record
)
=>
{
return
(
<
div
className=
"record__item"
>
{
record
.
categoryOneName
}{
record
.
categoryTwoName
?
`-${record.categoryTwoName}`
:
''
}
{
ENUM
.
offlineStateShow
[
val
]
}
</
div
>
)
}
},
{
title
:
'
创建人
'
,
key
:
'c
reate
Name'
,
dataIndex
:
'c
reate
Name'
,
width
:
1
0
0
,
render
:
(
val
)
=>
{
title
:
'
课程分类
'
,
key
:
'c
ategory
Name'
,
dataIndex
:
'c
ategory
Name'
,
width
:
1
2
0
,
render
:
(
val
,
record
)
=>
{
return
(
<
div
>
{
val
&&
<
Tooltip
title=
{
val
}
>
<
div
>
{
val
.
length
>
4
?
`${val.slice(0,4)}
...
`
:
val
}
</
div
>
</
Tooltip
>
}
<
div
className=
"record__item"
>
{
record
.
categoryOneName
}{
record
.
categoryTwoName
?
`-${record.categoryTwoName}`
:
''
}
</
div
>
)
}
...
...
@@ -148,59 +140,37 @@ class OfflineCourseList extends React.Component {
},
},
{
title
:
"
观看用户数
"
,
title
:
"
讲师
"
,
width
:
110
,
key
:
"
watchUserCount
"
,
dataIndex
:
"
watchUserCount
"
,
key
:
"
teacher
"
,
dataIndex
:
"
teacher
"
,
render
:
(
val
,
item
)
=>
{
return
(
<
div
className=
"watchUserCount"
>
{
val
}
</
div
>
<
div
className=
"watchUserCount"
>
张老师
</
div
>
)
},
},
{
title
:
'
创建
时间'
,
title
:
'
报名
时间'
,
width
:
181
,
key
:
'
cre
ated'
,
dataIndex
:
'
cre
ated'
,
key
:
'
upd
ated'
,
dataIndex
:
'
upd
ated'
,
sorter
:
true
,
render
:
(
val
)
=>
{
return
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
}
},
{
title
:
'
最近修改
时间'
,
title
:
'
创建
时间'
,
width
:
181
,
key
:
'
upd
ated'
,
dataIndex
:
'
upd
ated'
,
key
:
'
cre
ated'
,
dataIndex
:
'
cre
ated'
,
sorter
:
true
,
render
:
(
val
)
=>
{
return
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
}
},
{
title
:
'关联项'
,
width
:
200
,
key
:
"planList"
,
dataIndex
:
"planList"
,
render
:
(
val
,
record
)
=>
{
return
(
<
div
className=
"related-task"
>
{
record
.
relatedPlanList
?
<
Tooltip
title=
{
this
.
handlePlanName
(
record
.
relatedPlanList
)
}
placement=
"top"
arrowPointAtCenter
>
{
record
.
relatedPlanList
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
.
planName
}
{
(
index
<
record
.
relatedPlanList
.
length
-
1
)
&&
(<
span
>
、
</
span
>)
}
</
span
>
})
}
</
Tooltip
>
:
<
span
></
span
>
}
</
div
>
)
}
},
{
title
:
'操作'
,
key
:
'operate'
,
dataIndex
:
'operate'
,
...
...
@@ -365,7 +335,7 @@ class OfflineCourseList extends React.Component {
needStr=
{
needStr
}
data=
{
shareData
}
type=
"videoClass"
title=
"
图文
课"
title=
"
线下
课"
close=
{
()
=>
{
this
.
setState
({
shareLiveModal
:
null
...
...
@@ -434,7 +404,7 @@ class OfflineCourseList extends React.Component {
const
{
current
,
size
}
=
query
;
return
(
<
div
className=
"
video
-course-list"
>
<
div
className=
"
offline
-course-list"
>
<
Table
rowKey=
{
record
=>
record
.
id
}
dataSource=
{
dataSource
}
...
...
@@ -443,7 +413,7 @@ class OfflineCourseList extends React.Component {
pagination=
{
false
}
scroll=
{
{
x
:
1500
}
}
bordered
className=
"
video
-list-table"
className=
"
offline
-list-table"
/>
<
div
className=
"box-footer"
>
...
...
src/modules/course-manage/offline-course/components/OfflineCourseList.less
View file @
b11a9005
.
video
-course-list {
.
offline
-course-list {
margin-top: 12px;
.
video
-list-table{
.
offline
-list-table{
tbody {
tr{
&:nth-child(even){
...
...
@@ -51,29 +51,39 @@
display: flex;
.course-cover {
min-width:
97
px;
max-width:
97
px;
height:
5
0px;
min-width:
116
px;
max-width:
116
px;
height:
6
0px;
border-radius: 2px;
margin-right: 8px;
background-color: #
666
;
background-color: #
000
;
}
.course-name {
color: #333;
max-width:262px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
line-height: 20px;
margin-bottom: 4px;
}
.course-text {
color: #666;
width:188
px;
max-width:262
px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
height:48px;
white-space: nowrap;
line-height: 20px;
font-size: 12px;
}
}
}
.
video
-course-more-menu {
.
offline
-course-more-menu {
background: white;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
border-radius: 4px;
...
...
src/modules/knowledge-base/ENUM.js
View file @
b11a9005
...
...
@@ -30,6 +30,28 @@ const ENUM = {
color
:
"#999"
,
},
},
offlineStateShow
:
{
UN_START
:
{
code
:
1
,
title
:
"未开始"
,
color
:
"#FFB714"
,
},
STARTING
:
{
code
:
2
,
title
:
"进行中"
,
color
:
"#238FFF"
,
},
FINISH
:
{
code
:
3
,
title
:
"已结束"
,
color
:
"#3BBDAA"
,
},
EXPIRED
:
{
code
:
4
,
title
:
"已取消"
,
color
:
"#999"
,
},
},
CourseTypeEnum
:
{
LIVE
:
"直播课"
,
...
...
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