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
de9553ed
Commit
de9553ed
authored
Mar 13, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/zhangleyuan/20200220/training-program' into dev
parents
bd30a9f7
4fb83424
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
130 additions
and
54 deletions
+130
-54
src/core/antd.less
+3
-1
src/modules/course-manage/modal/RelatedPlanModal.jsx
+3
-1
src/modules/plan-manage/AddPlan.jsx
+5
-3
src/modules/plan-manage/LearningData.jsx
+2
-0
src/modules/plan-manage/LearningData.less
+4
-0
src/modules/plan-manage/components/BasicInfo.less
+3
-4
src/modules/plan-manage/components/PlanList.jsx
+11
-6
src/modules/plan-manage/components/PlanList.less
+25
-12
src/modules/plan-manage/components/TrainingTask.less
+2
-0
src/modules/plan-manage/modal/UserLearnDetailModal.jsx
+7
-8
src/modules/plan-manage/modal/UserLearnDetailModal.less
+58
-15
src/modules/plan-manage/modal/relatedCourseModal.jsx
+3
-2
src/modules/store-manage/StoreInfo.jsx
+4
-2
No files found.
src/core/antd.less
View file @
de9553ed
...
@@ -784,4 +784,6 @@ mr0 {
...
@@ -784,4 +784,6 @@ mr0 {
.ant-table-column-sorter {
.ant-table-column-sorter {
margin-left: 2px!important;
margin-left: 2px!important;
}
}
.ant-table-column-sorter-full{
margin-top:-0.32rem !important;
}
src/modules/course-manage/modal/RelatedPlanModal.jsx
View file @
de9553ed
...
@@ -122,7 +122,9 @@ class RelatedPlanModal extends React.Component {
...
@@ -122,7 +122,9 @@ class RelatedPlanModal extends React.Component {
item
.
taskId
=
selectPlanList
[
key
].
taskBaseVOList
[
0
].
taskId
;
item
.
taskId
=
selectPlanList
[
key
].
taskBaseVOList
[
0
].
taskId
;
}
}
}
}
_selectPlanList
.
push
(
item
)
if
(
item
.
taskId
){
_selectPlanList
.
push
(
item
)
}
}
}
return
_selectPlanList
;
return
_selectPlanList
;
}
}
...
...
src/modules/plan-manage/AddPlan.jsx
View file @
de9553ed
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Author: zhangleyuan
* @Date: 2021-02-20 16:13:39
* @Date: 2021-02-20 16:13:39
* @LastEditors: zhangleyuan
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-1
2 11:29:4
8
* @LastEditTime: 2021-03-1
3 14:58:3
8
* @Description: 描述一下
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -38,6 +38,7 @@ function AddPlan() {
...
@@ -38,6 +38,7 @@ function AddPlan() {
const
[
basicData
,
setBasicData
]
=
useState
(
defaultBasicData
);
const
[
basicData
,
setBasicData
]
=
useState
(
defaultBasicData
);
const
[
taskList
,
setTaskList
]
=
useState
(
defaultTaskList
);
const
[
taskList
,
setTaskList
]
=
useState
(
defaultTaskList
);
const
[
expiredCourseList
,
setExpiredCourseList
]
=
useState
([]);
const
[
expiredCourseList
,
setExpiredCourseList
]
=
useState
([]);
const
[
hasGetDetail
,
setHasGetDetail
]
=
useState
(
false
);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
type
===
'edit'
){
if
(
type
===
'edit'
){
getPlanDetail
();
getPlanDetail
();
...
@@ -91,6 +92,7 @@ function AddPlan() {
...
@@ -91,6 +92,7 @@ function AddPlan() {
return
_item
return
_item
})
})
}
}
setTaskList
(
trainingTaskList
);
setBasicData
({
setBasicData
({
planName
,
planName
,
coverUrl
:
coverUrl
||
defaultCover
,
coverUrl
:
coverUrl
||
defaultCover
,
...
@@ -102,7 +104,7 @@ function AddPlan() {
...
@@ -102,7 +104,7 @@ function AddPlan() {
percentCompleteLive
,
percentCompleteLive
,
percentCompleteVideo
percentCompleteVideo
})
})
set
TaskList
(
trainingTaskList
)
set
HasGetDetail
(
true
);
})
})
}
}
function
handleChangeBasicInfo
(
field
,
value
){
function
handleChangeBasicInfo
(
field
,
value
){
...
@@ -261,7 +263,7 @@ function AddPlan() {
...
@@ -261,7 +263,7 @@ function AddPlan() {
</
div
>
</
div
>
<
div
className=
"basic-info__wrap"
>
<
div
className=
"basic-info__wrap"
>
<
div
className=
"title"
>
培训任务
</
div
>
<
div
className=
"title"
>
培训任务
</
div
>
{
(
type
===
'edit'
&&
taskList
.
length
>
0
)
&&
{
(
type
===
'edit'
&&
hasGetDetail
)
&&
<
TrainingTask
data=
{
taskList
}
onChange=
{
handleChangeTaskInfo
}
/>
<
TrainingTask
data=
{
taskList
}
onChange=
{
handleChangeTaskInfo
}
/>
}
}
{
type
===
'add'
&&
{
type
===
'add'
&&
...
...
src/modules/plan-manage/LearningData.jsx
View file @
de9553ed
...
@@ -27,6 +27,7 @@ class LearningData extends React.Component {
...
@@ -27,6 +27,7 @@ class LearningData extends React.Component {
createName
:
""
createName
:
""
}
}
}
}
componentDidMount
(){
componentDidMount
(){
this
.
getPlanDetail
();
this
.
getPlanDetail
();
Bus
.
bind
(
'watchDataView'
,()
=>
{
this
.
setState
({
activeKey
:
"userLearningData"
})
})
Bus
.
bind
(
'watchDataView'
,()
=>
{
this
.
setState
({
activeKey
:
"userLearningData"
})
})
...
@@ -62,6 +63,7 @@ class LearningData extends React.Component {
...
@@ -62,6 +63,7 @@ class LearningData extends React.Component {
})
})
})
})
}
}
render
()
{
render
()
{
const
{
planName
,
coverUrl
,
courseNum
,
created
,
cultureCustomerNum
,
activeKey
,
createName
}
=
this
.
state
;
const
{
planName
,
coverUrl
,
courseNum
,
created
,
cultureCustomerNum
,
activeKey
,
createName
}
=
this
.
state
;
return
(
return
(
...
...
src/modules/plan-manage/LearningData.less
View file @
de9553ed
.plan-learn-data-list{
.plan-learn-data-list{
.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
font-weight:normal;
}
.plan-info{
.plan-info{
margin:16px;
margin:16px;
padding:16px;
padding:16px;
...
...
src/modules/plan-manage/components/BasicInfo.less
View file @
de9553ed
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
margin-top: 16px;
margin-top: 16px;
&__wrap {
&__wrap {
position: relative;
position: relative;
display: flex;
.tag {
.tag {
border-radius: 2px;
border-radius: 2px;
background: #D6D6D6;
background: #D6D6D6;
...
@@ -43,9 +44,6 @@
...
@@ -43,9 +44,6 @@
}
}
}
}
.opt-btns{
.opt-btns{
display:flex;
align-items: center;
margin-top:12px;
.default-btn {
.default-btn {
margin:0 8px;
margin:0 8px;
color: #5289FA;
color: #5289FA;
...
@@ -56,6 +54,7 @@
...
@@ -56,6 +54,7 @@
}
}
}
}
.tips{
.tips{
margin-top:8px;
font-size:14px;
font-size:14px;
color:#999;
color:#999;
}
}
...
@@ -97,7 +96,7 @@
...
@@ -97,7 +96,7 @@
display: flex;
display: flex;
margin-top:22px;
margin-top:22px;
.standard-label{
.standard-label{
margin-top:
2
px;
margin-top:
3
px;
}
}
.live-standard-info{
.live-standard-info{
margin-bottom:10px;
margin-bottom:10px;
...
...
src/modules/plan-manage/components/PlanList.jsx
View file @
de9553ed
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Author: zhangleyuan
* @Date: 2021-02-20 16:46:46
* @Date: 2021-02-20 16:46:46
* @LastEditors: zhangleyuan
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-1
0 15:51:26
* @LastEditTime: 2021-03-1
3 15:24:41
* @Description: 描述一下
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -28,10 +28,10 @@ function PlanList(props) {
...
@@ -28,10 +28,10 @@ function PlanList(props) {
title
:
'培训计划'
,
title
:
'培训计划'
,
key
:
'planName'
,
key
:
'planName'
,
dataIndex
:
'planName'
,
dataIndex
:
'planName'
,
width
:
'1
5
%'
,
width
:
'1
8
%'
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
(
return
(
<
div
className=
"plan
__
name"
>
<
div
className=
"plan
-
name"
>
{
val
}
{
val
}
</
div
>
</
div
>
)
)
...
@@ -75,7 +75,7 @@ function PlanList(props) {
...
@@ -75,7 +75,7 @@ function PlanList(props) {
},
},
{
{
title
:
'创建时间'
,
title
:
'创建时间'
,
width
:
"1
0
%"
,
width
:
"1
2.5
%"
,
key
:
'created'
,
key
:
'created'
,
dataIndex
:
'created'
,
dataIndex
:
'created'
,
sorter
:
true
,
sorter
:
true
,
...
@@ -85,7 +85,7 @@ function PlanList(props) {
...
@@ -85,7 +85,7 @@ function PlanList(props) {
},
},
{
{
title
:
'更新时间'
,
title
:
'更新时间'
,
width
:
"1
0
%"
,
width
:
"1
2.5
%"
,
key
:
'updated'
,
key
:
'updated'
,
dataIndex
:
'updated'
,
dataIndex
:
'updated'
,
sorter
:
true
,
sorter
:
true
,
...
@@ -111,7 +111,8 @@ function PlanList(props) {
...
@@ -111,7 +111,8 @@ function PlanList(props) {
title
:
'操作'
,
title
:
'操作'
,
key
:
'operate'
,
key
:
'operate'
,
dataIndex
:
'operate'
,
dataIndex
:
'operate'
,
width
:
'25%'
,
fixed
:
'right'
,
width
:
176
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
(
return
(
<
div
className=
"operate"
>
<
div
className=
"operate"
>
...
@@ -145,6 +146,7 @@ function PlanList(props) {
...
@@ -145,6 +146,7 @@ function PlanList(props) {
];
];
return
columns
;
return
columns
;
}
}
function
renderMoreOperate
(
item
){
function
renderMoreOperate
(
item
){
return
(
return
(
<
div
className=
"live-course-more-menu"
>
<
div
className=
"live-course-more-menu"
>
...
@@ -158,6 +160,7 @@ function PlanList(props) {
...
@@ -158,6 +160,7 @@ function PlanList(props) {
</
div
>
</
div
>
)
)
}
}
function
handleChangeTable
(
pagination
,
filters
,
sorter
){
function
handleChangeTable
(
pagination
,
filters
,
sorter
){
const
{
columnKey
,
order
}
=
sorter
;
const
{
columnKey
,
order
}
=
sorter
;
const
{
query
}
=
props
;
const
{
query
}
=
props
;
...
@@ -330,6 +333,8 @@ function PlanList(props) {
...
@@ -330,6 +333,8 @@ function PlanList(props) {
pagination=
{
false
}
pagination=
{
false
}
onChange=
{
handleChangeTable
}
onChange=
{
handleChangeTable
}
bordered
bordered
size=
"middle"
scroll=
{
{
x
:
1400
}
}
/>
/>
<
div
className=
"box-footer"
>
<
div
className=
"box-footer"
>
<
PageControl
<
PageControl
...
...
src/modules/plan-manage/components/PlanList.less
View file @
de9553ed
.plan-list{
.plan-list{
margin-top:12px;
margin-top:12px;
.plan-name{
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.operate-text {
.operate-text {
color: #5289FA;
cursor: pointer;
}
.operate {
display: flex;
&__item {
color: #5289FA;
color: #5289FA;
cursor: pointer;
cursor: pointer;
}
.operate {
&.split {
display: flex;
margin: 0 8px;
color: #BFBFBF;
&__item {
color: #5289FA;
cursor: pointer;
&.split {
margin: 0 8px;
color: #BFBFBF;
}
}
}
}
}
}
.more-operate{
line-height:20px;
}
}
}
\ No newline at end of file
src/modules/plan-manage/components/TrainingTask.less
View file @
de9553ed
...
@@ -63,6 +63,7 @@
...
@@ -63,6 +63,7 @@
color:#666666;
color:#666666;
font-size:14px;
font-size:14px;
.icon{
.icon{
font-size:14px;
color:#999;
color:#999;
}
}
.text{
.text{
...
@@ -94,6 +95,7 @@
...
@@ -94,6 +95,7 @@
color:#666666;
color:#666666;
font-size:14px;
font-size:14px;
.icon{
.icon{
font-size:14px;
color:#999;
color:#999;
}
}
.text{
.text{
...
...
src/modules/plan-manage/modal/UserLearnDetailModal.jsx
View file @
de9553ed
...
@@ -158,14 +158,13 @@ class UserLearnDetailModal extends React.Component {
...
@@ -158,14 +158,13 @@ class UserLearnDetailModal extends React.Component {
render
:
(
val
,
record
,
index
)
=>
{
render
:
(
val
,
record
,
index
)
=>
{
return
(
return
(
<
div
className=
"course-info"
>
<
div
className=
"course-info"
>
<
span
className=
"course-type"
>
{
CourseType
[
record
.
courseType
].
text
}
</
span
>
<
div
className=
"course-type"
>
{
CourseType
[
record
.
courseType
].
text
}
</
div
>
<
span
className=
"course-name"
>
{
parentIndex
+
1
}
.
{
index
+
1
}{
record
.
courseName
}
</
span
>
<
div
className=
"name-and-state"
>
{
record
.
courseState
===
"EXPIRED"
&&
<
span
className=
"course-name"
>
{
parentIndex
+
1
}
.
{
index
+
1
}{
record
.
courseName
}
</
span
>
<
span
className=
"icon iconfont tip"
>

</
span
>
{
record
.
courseType
===
"LIVE"
&&
}
<
span
className=
"course-state"
>
{
courseStateShow
[
record
.
courseState
].
title
}
</
span
>
{
record
.
courseType
===
"LIVE"
&&
}
<
span
className=
"course-state"
>
{
courseStateShow
[
record
.
courseState
].
title
}
</
span
>
</
div
>
}
</
div
>
</
div
>
)
)
}
}
...
...
src/modules/plan-manage/modal/UserLearnDetailModal.less
View file @
de9553ed
.user-Learn-modal{
.user-Learn-modal{
.customer-info{
.customer-info{
margin-bottom:16px;
margin-bottom:16px;
.customer-name{
.customer-name{
...
@@ -13,6 +14,18 @@
...
@@ -13,6 +14,18 @@
}
}
.plan-table{
.plan-table{
margin-bottom:8px;
margin-bottom:8px;
.ant-table-thead{
tr {
th{
padding:9px 24px;
}
}
}
tr{
td{
padding:8px 24px;
}
}
.plan-instro{
.plan-instro{
display: flex;
display: flex;
align-items: center;
align-items: center;
...
@@ -20,7 +33,7 @@
...
@@ -20,7 +33,7 @@
margin-right:8px;
margin-right:8px;
img{
img{
width: 97px;
width: 97px;
height: 5
5
px;
height: 5
4
px;
display: inline-block;
display: inline-block;
border-radius:4px;
border-radius:4px;
}
}
...
@@ -36,6 +49,18 @@
...
@@ -36,6 +49,18 @@
}
}
}
}
.task-table{
.task-table{
.ant-table-thead{
tr {
th{
padding:9px 16px;
}
}
}
tr{
td{
padding:14px 16px;
}
}
.taskName{
.taskName{
color:#666666;
color:#666666;
font-size:14px;
font-size:14px;
...
@@ -45,8 +70,12 @@
...
@@ -45,8 +70,12 @@
font-size:14px;
font-size:14px;
}
}
.course-info{
.course-info{
display:flex;
margin-left:57px;
margin-left:57px;
align-items: center;
.course-type{
.course-type{
width:54px;
height: 22px;
font-size:11px;
font-size:11px;
color:#666666;
color:#666666;
padding:1px 8px;
padding:1px 8px;
...
@@ -54,19 +83,28 @@
...
@@ -54,19 +83,28 @@
margin-right:4px;
margin-right:4px;
border-radius: 2px;
border-radius: 2px;
}
}
.course-name{
.name-and-state{
color:#666666;
flex:1;
font-size:14px;
.course-name{
margin-right:8px;
color:#666666;
}
font-size:14px;
.tip{
margin-right:8px;
font-size:14px;
}
color:#FF4F4F;
.tip{
margin-right:2px;
font-size:14px;
color:#FF4F4F;
margin-right:2px;
}
.course-state{
color:#999;
font-size:14px;
}
}
}
.course-state{
color:#999;
}
font-size:14px;
.ant-table-expanded-row{
td{
padding:0 16px;
}
}
}
}
.ant-table-content{
.ant-table-content{
...
@@ -76,13 +114,18 @@
...
@@ -76,13 +114,18 @@
border:none;
border:none;
}
}
.child-table{
.child-table{
.ant-table-content{
.ant-table-content{
border:none;
border:none;
thead{
thead{
display:none;
display:none;
}
}
tbody tr td{
tbody tr {
border-bottom:none;
td{
border-bottom:none;
padding:14px 16px;
}
}
}
}
}
...
...
src/modules/plan-manage/modal/relatedCourseModal.jsx
View file @
de9553ed
...
@@ -161,11 +161,12 @@ class SelectOperatorModal extends React.Component {
...
@@ -161,11 +161,12 @@ class SelectOperatorModal extends React.Component {
videoSize
:
size
videoSize
:
size
},()
=>
{
this
.
handleFetchLiveDataList
()})
},()
=>
{
this
.
handleFetchLiveDataList
()})
}
}
// 请求表头
// 请求表头
parseLiveColumns
=
()
=>
{
parseLiveColumns
=
()
=>
{
const
columns
=
[
const
columns
=
[
{
{
title
:
<
span
><
span
>
课程信息
</
span
><
Tooltip
title=
"
以下为该培训计划暂未关联的课程。 已关联的课程不支持重复选择,因此不显示。
"
><
i
className=
"icon iconfont"
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
}
}
>

</
i
></
Tooltip
></
span
>,
title
:
<
span
><
span
>
课程信息
</
span
><
Tooltip
title=
"
仅显示未关联课程,已关联课程不支持重复选择
"
><
i
className=
"icon iconfont"
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
}
}
>

</
i
></
Tooltip
></
span
>,
key
:
'course'
,
key
:
'course'
,
dataIndex
:
'course'
,
dataIndex
:
'course'
,
width
:
'45%'
,
width
:
'45%'
,
...
@@ -229,7 +230,7 @@ class SelectOperatorModal extends React.Component {
...
@@ -229,7 +230,7 @@ class SelectOperatorModal extends React.Component {
parseVideoColumns
=
()
=>
{
parseVideoColumns
=
()
=>
{
const
columns
=
[
const
columns
=
[
{
{
title
:
<
span
><
span
>
课程信息
</
span
><
Tooltip
title=
"
以下为该培训计划暂未关联的课程。 已关联的课程不支持重复选择,因此不显示。
"
><
i
className=
"icon iconfont"
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
}
}
>

</
i
></
Tooltip
></
span
>,
title
:
<
span
><
span
>
课程信息
</
span
><
Tooltip
title=
"
仅显示未关联课程,已关联课程不支持重复选择
"
><
i
className=
"icon iconfont"
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
}
}
>

</
i
></
Tooltip
></
span
>,
key
:
'course'
,
key
:
'course'
,
dataIndex
:
'course'
,
dataIndex
:
'course'
,
width
:
'60%'
,
width
:
'60%'
,
...
...
src/modules/store-manage/StoreInfo.jsx
View file @
de9553ed
...
@@ -248,9 +248,11 @@ class StoreInfo extends React.Component {
...
@@ -248,9 +248,11 @@ class StoreInfo extends React.Component {
{
logo
?
<
img
src=
{
logo
}
className=
"logo-img"
/>
:
<
div
className=
"logo-box"
><
span
className=
"text"
>
Logo
</
span
></
div
>
}
{
logo
?
<
img
src=
{
logo
}
className=
"logo-img"
/>
:
<
div
className=
"logo-box"
><
span
className=
"text"
>
Logo
</
span
></
div
>
}
</
div
>
</
div
>
<
div
className=
"operate-con"
>
<
div
className=
"operate-con"
>
<
div
><
span
onClick=
{
()
=>
{
this
.
setState
({
showSelectFileModal
:
true
})}
}
className=
"upload-btn"
>
上传
</
span
></
div
>
<
div
><
span
onClick=
{
()
=>
{
this
.
setState
({
showSelectFileModal
:
true
})}
}
className=
"upload-btn"
>
{
logo
?
<
span
>
重新上传
</
span
>
:
<
span
>
上传
</
span
>
}
</
span
></
div
>
<
div
className=
"tip"
>
建议尺寸702*180px。最大2M,支持jpg、jpeg和png。
</
div
>
<
div
className=
"tip"
>
建议尺寸702*180px。最大2M,支持jpg、jpeg和png。
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
...
...
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