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
7bb5f82a
Commit
7bb5f82a
authored
Jan 14, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理权限操作
parent
70e57491
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
14 deletions
+106
-14
src/modules/course-manage/components/LiveCourseList.jsx
+102
-14
src/modules/course-manage/components/LiveCourseOpt.jsx
+4
-0
No files found.
src/modules/course-manage/components/LiveCourseList.jsx
View file @
7bb5f82a
...
...
@@ -9,22 +9,13 @@
import
React
from
'react'
;
import
{
Table
,
Modal
,
message
,
Dropdown
,
Button
,
Switch
,
Tooltip
}
from
'antd'
;
import
{
Route
,
withRouter
}
from
'react-router-dom'
;
// import Bus from '@/core/bus';
// import User from "@/core/user";
// import User_t from "@/teacher/core/user";
import
{
PageControl
}
from
"@/components"
;
// import { LIVE_SHARE_MAP } from '@/common/constants/academic/cloudClass';
import
DownloadLiveModal
from
'@/components/DownloadLiveModal'
;
// import LiveStudentListModal from '../modal/LiveStudentListModal';
// import CheckBalanceModal from '../modal/CheckBalanceModal';
// import StartLiveModal from '../modal/StartLiveModal';
// import ClassRecordModal from '../modal/ClassRecordModal';
// import PlayBackRecordModal from '../modal/PlayBackRecordModal';
import
ManageCoursewareModal
from
'../modal/ManageCoursewareModal'
;
import
ShareLiveModal
from
'../modal/ShareLiveModal'
;
// import AccountChargeModal from '../modal/AccountChargeModal';
// import SelectStudent from '../modal/select-student';
import
'./LiveCourseList.less'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
...
...
@@ -34,7 +25,7 @@ import BaseService from "@/domains/basic-domain/baseService";
import
DataList
from
'../DataList/DataList'
;
import
User
from
'@/common/js/user'
;
import
_
from
"underscore"
;
import
user
from
'@/common/js/user'
;
const
{
confirm
}
=
Modal
;
const
courseStateShow
=
{
...
...
@@ -149,8 +140,10 @@ class LiveCourseList extends React.Component {
</
div
>
</
div
>
);
const
columns
=
[
let
columns
const
userRole
=
User
.
getUserRole
();
if
(
userRole
!==
"CloudLecturer"
){
columns
=
[
{
title
:
"直播课"
,
width
:
"25%"
,
...
...
@@ -325,6 +318,101 @@ class LiveCourseList extends React.Component {
}
}
];
}
else
{
columns
=
[
{
title
:
"直播课"
,
width
:
"25%"
,
key
:
"course"
,
dataIndex
:
"courseName"
,
render
:
(
val
,
record
)
=>
{
let
hasCover
=
false
;
return
(
<
div
className=
"record__item"
>
{
record
.
courseMediaVOS
.
map
((
item
,
index
)
=>
{
if
(
item
.
contentType
===
"COVER"
){
hasCover
=
true
;
return
<
img
className=
"course-cover"
src=
{
item
.
mediaUrl
}
/>
}
})
}
{
!
hasCover
&&
<
img
className=
"course-cover"
src=
{
'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'
}
/>
}
<
div
>
<
div
className=
"course-name"
>
{
record
.
courseName
}
</
div
>
<
div
>
<
span
className=
"course-time"
>
{
formatDate
(
"YYYY-MM-DD H:i"
,
parseInt
(
record
.
startTime
))
}
~
{
formatDate
(
"H:i"
,
parseInt
(
record
.
endTime
))
}
</
span
>
<
span
className=
"course-status"
style=
{
{
color
:
courseStateShow
[
record
.
courseState
].
color
,
border
:
`1px solid ${courseStateShow[record.courseState].color}`
}
}
>
{
courseStateShow
[
record
.
courseState
].
title
}
</
span
>
</
div
>
<
div
className=
"teacher-assistant"
>
<
span
className=
"teacher"
>
讲师:
{
record
.
teacherName
}
</
span
>
{
record
.
admins
.
length
>
0
&&
<>
<
span
className=
"split"
>
|
</
span
>
<
span
className=
"assistant"
>
助教:
{
record
.
admins
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
.
adminName
}
{
(
index
<
record
.
admins
.
length
-
1
)
&&
(<
span
>
、
</
span
>)
}
</
span
>
})
}
</
span
>
</>
}
</
div
>
</
div
>
</
div
>
)
}
},
{
title
:
"课程分类"
,
width
:
"10%"
,
key
:
"couseCatalog"
,
dataIndex
:
"couseCatalog"
,
render
:
(
val
,
item
)
=>
{
return
(
<
div
className=
"categoryName"
>
{
item
.
categoryName
}
</
div
>
)
},
},
{
title
:
"课件管理"
,
width
:
"8%"
,
key
:
"courseware"
,
dataIndex
:
"courseware"
,
render
:
(
val
,
item
)
=>
{
return
(
<
span
className=
"courseware"
onClick=
{
()
=>
{
this
.
setState
({
editData
:
item
,
openCoursewareModal
:
true
,
});
}
}
>
{
item
.
courseDocumentCount
}
个
</
span
>
);
},
},
{
title
:
'上课数据'
,
width
:
"9%"
,
key
:
"quota"
,
dataIndex
:
"quota"
,
render
:
(
val
,
item
)
=>
{
return
(
<
span
className=
"iconfont icon quota-icon"
onClick=
{
()
=>
{
this
.
handleLinkToClassData
(
item
)
}
}
>

</
span
>
);
},
},
];
}
this
.
setState
({
columns
})
}
renderMoreOperate
=
(
item
)
=>
{
...
...
src/modules/course-manage/components/LiveCourseOpt.jsx
View file @
7bb5f82a
...
...
@@ -11,6 +11,7 @@ import { Button, Modal, message } from 'antd';
import
Service
from
'@/common/js/service'
;
import
'./liveCourseOpt.less'
;
import
BaseService
from
"@/domains/basic-domain/baseService"
;
import
User
from
'@/common/js/user'
class
LiveCourseOpt
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
@@ -41,10 +42,13 @@ class LiveCourseOpt extends React.Component {
})
}
render
()
{
const
userRole
=
User
.
getUserRole
();
return
(
<
div
className=
"live-course-opt"
>
<
div
className=
"opt__left"
>
{
userRole
!==
"CloudLecturer"
&&
<
Button
type=
"primary"
onClick=
{
this
.
handleCreateLiveCouese
}
>
新建直播课
</
Button
>
}
<
Button
onClick=
{
this
.
handleDownloadClient
}
>
下载直播客户端
</
Button
>
</
div
>
</
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