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
00153e8b
Commit
00153e8b
authored
Mar 15, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理课程列表培训任务的显示
parent
ada678af
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
128 additions
and
93 deletions
+128
-93
src/modules/course-manage/components/LiveCourseList.jsx
+25
-6
src/modules/course-manage/modal/RelatedPlanModal.jsx
+1
-7
src/modules/course-manage/video-course/components/VideoCourseList.jsx
+26
-11
src/modules/plan-manage/LearningData.less
+1
-1
src/modules/plan-manage/components/BasicInfo.jsx
+3
-3
src/modules/plan-manage/components/BasicInfo.less
+3
-0
src/modules/plan-manage/components/PlanList.jsx
+4
-46
src/modules/plan-manage/components/PlanList.less
+27
-0
src/modules/plan-manage/components/TrainingTask.jsx
+3
-2
src/modules/plan-manage/components/TrainingTask.less
+26
-12
src/modules/plan-manage/modal/UserLearnDetailModal.jsx
+1
-1
src/modules/plan-manage/modal/relatedCourseModal.jsx
+2
-2
src/modules/plan-manage/modal/relatedCourseModal.less
+6
-2
No files found.
src/modules/course-manage/components/LiveCourseList.jsx
View file @
00153e8b
...
...
@@ -293,9 +293,12 @@ class LiveCourseList extends React.Component {
return
(
<
div
className=
"related-task"
>
{
record
.
relatedPlanList
?
record
.
relatedPlanList
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
.
planName
}
{
(
index
<
record
.
relatedPlanList
.
length
-
1
)
&&
(<
span
>
、
</
span
>)
}
</
span
>
})
<
Tooltip
title=
{
this
.
handlePlanName
(
record
.
relatedPlanList
)
}
>
{
record
.
relatedPlanList
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
.
planName
}
{
(
index
<
record
.
relatedPlanList
.
length
-
1
)
&&
(<
span
>
、
</
span
>)
}
</
span
>
})
}
</
Tooltip
>
:
<
span
></
span
>
}
...
...
@@ -510,9 +513,12 @@ class LiveCourseList extends React.Component {
return
(
<
div
className=
"related-task"
>
{
record
.
relatedPlanList
?
record
.
relatedPlanList
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
.
planName
}
{
(
index
<
record
.
relatedPlanList
.
length
-
1
)
&&
(<
span
>
、
</
span
>)
}
</
span
>
})
<
Tooltip
title=
{
this
.
handlePlanName
(
record
.
relatedPlanList
)
}
>
{
record
.
relatedPlanList
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
.
planName
}
{
(
index
<
record
.
relatedPlanList
.
length
-
1
)
&&
(<
span
>
、
</
span
>)
}
</
span
>
})
}
</
Tooltip
>
:
<
span
></
span
>
}
...
...
@@ -535,6 +541,19 @@ class LiveCourseList extends React.Component {
})
return
adminStr
}
handlePlanName
=
(
planArray
)
=>
{
let
planStr
=
""
;
planArray
.
map
((
item
,
index
)
=>
{
if
(
index
<
planArray
.
length
-
1
){
planStr
=
planStr
+
item
.
planName
+
'、'
;
}
else
{
planStr
=
planStr
+
item
.
planName
}
})
return
planStr
}
renderMoreOperate
=
(
item
)
=>
{
return
(
<
div
className=
"live-course-more-menu"
>
...
...
src/modules/course-manage/modal/RelatedPlanModal.jsx
View file @
00153e8b
...
...
@@ -220,13 +220,6 @@ class RelatedPlanModal extends React.Component {
this
.
selectPlanList
(
record
,
selected
,
_record
.
planId
);
},
onSelectAll
:
(
selected
,
_selectedRows
,
changeRows
)
=>
{
// let _list = [];
// if (selected)
{
// _list = _.uniq(selectVideo.concat(changeRows), false, (item) => item.id);
//
}
else
{
// _list = _.reject(selectVideo, (item) => _.find(changeRows, (data) => data.id === item.id));
//
}
// this.setState(
{
selectVideo
:
_list
});
},
}
}
/>
...
...
@@ -241,6 +234,7 @@ class RelatedPlanModal extends React.Component {
current=
{
query
.
current
-
1
}
pageSize=
{
size
}
total=
{
totalCount
}
size=
"small"
toPage=
{
(
page
)
=>
{
const
_query
=
{...
query
,
current
:
page
+
1
};
this
.
setState
({
...
...
src/modules/course-manage/video-course/components/VideoCourseList.jsx
View file @
00153e8b
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-1
1 17:16:20
* @LastEditTime: 2021-03-1
5 17:05:01
* @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -175,14 +175,17 @@ class VideoCourseList extends React.Component {
render
:
(
val
,
record
)
=>
{
return
(
<
div
className=
"related-task"
>
{
record
.
relatedPlanList
?
record
.
relatedPlanList
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
.
planName
}
{
(
index
<
record
.
relatedPlanList
.
length
-
1
)
&&
(<
span
>
、
</
span
>)
}
</
span
>
})
:
<
span
></
span
>
}
</
div
>
{
record
.
relatedPlanList
?
<
Tooltip
title=
{
this
.
handlePlanName
(
record
.
relatedPlanList
)
}
>
{
record
.
relatedPlanList
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
.
planName
}
{
(
index
<
record
.
relatedPlanList
.
length
-
1
)
&&
(<
span
>
、
</
span
>)
}
</
span
>
})
}
</
Tooltip
>
:
<
span
></
span
>
}
</
div
>
)
}
},
...
...
@@ -217,7 +220,7 @@ class VideoCourseList extends React.Component {
];
return
columns
;
}
renderMoreOperate
=
(
item
)
=>
{
return
(
<
div
className=
"live-course-more-menu"
>
...
...
@@ -240,7 +243,19 @@ class VideoCourseList extends React.Component {
</
div
>
)
}
//改变上架状态
handlePlanName
=
(
planArray
)
=>
{
let
planStr
=
""
;
planArray
.
map
((
item
,
index
)
=>
{
if
(
index
<
planArray
.
length
-
1
){
planStr
=
planStr
+
item
.
planName
+
'、'
;
}
else
{
planStr
=
planStr
+
item
.
planName
}
})
return
planStr
}
//改变上架状态
changeShelfState
=
(
item
)
=>
{
let
_shelfState
=
item
.
shelfState
if
(
_shelfState
===
'NO'
){
...
...
src/modules/plan-manage/LearningData.less
View file @
00153e8b
.plan-learn-data-list{
.ant-tabs-tab.ant-tabs-tab-active
.ant-tabs-tab-btn
{
.ant-tabs-tab.ant-tabs-tab-active{
font-weight:normal;
}
.plan-info{
...
...
src/modules/plan-manage/components/BasicInfo.jsx
View file @
00153e8b
...
...
@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Date: 2021-02-20 16:45:51
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-15 1
4:47:39
* @LastEditTime: 2021-03-15 1
7:01:47
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -219,7 +219,7 @@ class BasicInfo extends React.Component{
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
培训计划名称:
</
span
>
<
Input
value=
{
planName
}
placeholder=
"请输入培训计划名称
,最多20字
"
placeholder=
"请输入培训计划名称
(20字以内)
"
maxLength=
{
20
}
style=
{
{
width
:
240
}
}
onChange=
{
(
e
)
=>
this
.
props
.
onChange
(
'planName'
,
e
.
target
.
value
)
}
...
...
@@ -253,7 +253,7 @@ class BasicInfo extends React.Component{
<
TextArea
placeholder=
"请输入培训计划简介"
maxLength=
{
200
}
style=
{
{
width
:
'552px'
,
height
:
'
9
0px'
}
}
style=
{
{
width
:
'552px'
,
height
:
'
11
0px'
}
}
className=
"instro-textarea"
value=
{
instro
}
onChange=
{
(
e
)
=>
this
.
props
.
onChange
(
'instro'
,
e
.
target
.
value
)
}
...
...
src/modules/plan-manage/components/BasicInfo.less
View file @
00153e8b
...
...
@@ -80,6 +80,9 @@
.view-range{
display:flex;
margin-top:16px;
.label{
margin-top:2px;
}
.instro-text{
color:#999;
margin-left:12px;
...
...
src/modules/plan-manage/components/PlanList.jsx
View file @
00153e8b
...
...
@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Date: 2021-02-20 16:46:46
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-1
3 18:00:15
* @LastEditTime: 2021-03-1
5 16:19:53
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -85,7 +85,7 @@ function PlanList(props) {
},
{
title
:
'更新时间'
,
width
:
"1
2.5
%"
,
width
:
"1
0
%"
,
key
:
'updated'
,
dataIndex
:
'updated'
,
sorter
:
true
,
...
...
@@ -95,7 +95,7 @@ function PlanList(props) {
},
{
title
:
'参培人数'
,
width
:
"10%"
,
width
:
76
,
key
:
'cultureCustomerNum'
,
dataIndex
:
'cultureCustomerNum'
,
sorter
:
true
,
...
...
@@ -227,49 +227,6 @@ function PlanList(props) {
props
.
onChange
();
}
})
// let _enableState = record.enableState
// if(_enableState==='NO'){
// // _enableState = "YES";
// const params={
// "planId": record.planId,
// "enableState":"YES"
// }
// PlanService.updateStateTrainingPlan(params).then((res)=>{
// if(res.success){
// // if(_enableState === "YES"){
// record.enableState = "YES";
// message.success("已启用此计划");
// // }
// }
// })
// }else{
// // _enableState = "NO";
// // item.enableState = "YES";
// return confirm({
// title: "确定要禁用培训计划吗?",
// content: "禁用后,培训计划不再支持新用户加入,已参与培训的用户可继续培训",
// icon: (
// <span className="icon iconfont default-confirm-icon"> </span>
// ),
// okText: "确定",
// okType: "danger",
// cancelText: "取消",
// onOk: () => {
// const params={
// "planId": record.planId,
// "enableState":"NO"
// }
// PlanService.updateStateTrainingPlan(params).then((res)=>{
// if(res.success){
// // if(_enableState === "NO"){
// record.enableState = "NO";
// message.success("已禁用此计划");
// // }
// }
// })
// },
// });
// }
}
function
toEditPlanPage
(
item
){
...
...
@@ -336,6 +293,7 @@ function PlanList(props) {
bordered
size=
"middle"
scroll=
{
{
x
:
1400
}
}
className=
"plan-list-table"
/>
<
div
className=
"box-footer"
>
<
PageControl
...
...
src/modules/plan-manage/components/PlanList.less
View file @
00153e8b
.plan-list{
margin-top:12px;
.plan-list-table{
tbody {
tr{
&:nth-child(even){
background: transparent !important;
td{
background:#FFF !important;
}
}
&:nth-child(odd){
background: #FAFAFA !important;
td{
background: #FAFAFA !important;
}
}
&:hover{
td{
background:#F3f6fa !important;
}
}
}
}
}
.plan-name{
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
...
...
@@ -26,6 +49,10 @@
}
}
}
.join-number{
text-align:right;
margin-right:12px;
}
.more-operate{
line-height:20px;
}
...
...
src/modules/plan-manage/components/TrainingTask.jsx
View file @
00153e8b
...
...
@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Date: 2021-02-20 16:45:51
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-1
2 16:49:01
* @LastEditTime: 2021-03-1
5 16:14:50
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -41,6 +41,7 @@ const courseStateShow = {
title
:
"未成功开课"
,
},
};
const
DragHandle
=
sortableHandle
(()
=>
(
<
span
className=
"operate__item"
>
<
span
className=
"icon iconfont"
>

</
span
>
...
...
@@ -351,7 +352,7 @@ class TrainingTask extends React.Component {
}
</
div
>
<
div
className=
"operate"
>
<
div
className=
"
course-
operate"
>
<
DragHandle
/>
{
/* <span className="operate__item">
<span className="icon iconfont"></span>
...
...
src/modules/plan-manage/components/TrainingTask.less
View file @
00153e8b
...
...
@@ -55,22 +55,29 @@
}
}
}
}
.operate{
.operate__item{
cursor:pointer;
margin-left:16px;
color:#666666;
font-size:14px;
.icon{
.operate{
display: none;
.operate__item{
cursor:pointer;
margin-left:16px;
color:#666666;
font-size:14px;
color:#999;
.icon{
font-size:14px;
color:#999;
}
.text{
margin-left:8px;
}
}
.text{
margin-left:8px;
}
&:hover{
.operate{
display:block;
}
}
}
.course-box{
.add-course-con{
padding:16px 51px;
...
...
@@ -88,7 +95,13 @@
padding:16px 16px 16px 51px;
justify-content: space-between;
align-items: center;
.operate{
&:hover{
.course-operate{
display:block;
}
}
.course-operate{
display: none;
.operate__item{
cursor:pointer;
margin-left:16px;
...
...
@@ -103,6 +116,7 @@
}
}
}
.course-info{
.ant-form{
display:inline-block;
...
...
src/modules/plan-manage/modal/UserLearnDetailModal.jsx
View file @
00153e8b
...
...
@@ -160,7 +160,7 @@ class UserLearnDetailModal extends React.Component {
<
div
className=
"course-info"
>
<
div
className=
"course-type"
>
{
CourseType
[
record
.
courseType
].
text
}
</
div
>
<
div
className=
"name-and-state"
>
<
span
className=
"course-name"
>
{
parentIndex
+
1
}
.
{
index
+
1
}{
record
.
courseName
}
</
span
>
<
span
className=
"course-name"
>
{
parentIndex
+
1
}
.
{
index
+
1
}
{
record
.
courseName
}
</
span
>
{
record
.
courseType
===
"LIVE"
&&
<
span
className=
"course-state"
>
{
courseStateShow
[
record
.
courseState
].
title
}
</
span
>
}
...
...
src/modules/plan-manage/modal/relatedCourseModal.jsx
View file @
00153e8b
...
...
@@ -352,9 +352,9 @@ class SelectOperatorModal extends React.Component {
closeIcon=
{
<
span
className=
"icon iconfont modal-close-icon"
>

</
span
>
}
footer=
{
[
activeKey
===
'live'
?
<
a
target=
'_blank'
className=
"link-create-course"
href=
{
window
.
location
.
origin
+
window
.
location
.
pathname
+
'#/create-live-course?type=add'
}
>
没有找到需要的直播课?
<
span
>
去创建
</
span
></
a
>
<
a
target=
'_blank'
className=
"link-create-course"
href=
{
window
.
location
.
origin
+
window
.
location
.
pathname
+
'#/create-live-course?type=add'
}
onClick=
{
this
.
props
.
onClose
}
>
没有找到需要的直播课?
<
span
>
去创建
</
span
></
a
>
:
<
a
target=
'_blank'
className=
"link-create-course"
href=
{
window
.
location
.
origin
+
window
.
location
.
pathname
+
'#/create-video-course?type=add'
}
>
没有找到需要的视频课?
<
span
>
去创建
</
span
></
a
>
<
a
target=
'_blank'
className=
"link-create-course"
href=
{
window
.
location
.
origin
+
window
.
location
.
pathname
+
'#/create-video-course?type=add'
}
onClick=
{
this
.
props
.
onClose
}
>
没有找到需要的视频课?
<
span
>
去创建
</
span
></
a
>
,
<
Button
onClick=
{
()
=>
{
...
...
src/modules/plan-manage/modal/relatedCourseModal.less
View file @
00153e8b
...
...
@@ -5,6 +5,9 @@
.ant-tabs-nav-list{
margin:0 auto;
}
.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{
font-weight:normal;
}
.ant-tabs-nav .ant-tabs-tab{
padding:6px 12px !important;
margin:0;
...
...
@@ -19,9 +22,10 @@
border-radius: 0px 4px 4px 0px;
}
}
.ant-tabs-nav .ant-tabs-tab-active{
border: 1px solid #FFB714;
color:#FFB714;
border: 1px solid #FFB714;
color:#FFB714;
}
.ant-tabs-top .ant-tabs-ink-bar-animated:after{
...
...
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