Commit 964245b4 by guomingpang

Merge branch 'feature/pangguoming/20210701/active_students_number' into dev

parents 57f64f2f 85ce4d41
...@@ -31,6 +31,8 @@ class Home extends React.Component { ...@@ -31,6 +31,8 @@ class Home extends React.Component {
unfinishedNum: 0, unfinishedNum: 0,
weekVisitCustomerNum: 0, weekVisitCustomerNum: 0,
incWeekVisitCustomerNum: 0, incWeekVisitCustomerNum: 0,
courseNum: 0, //课程总数
inCourseNum: 0, //本月新增课程总数
}; };
this._chart = null; this._chart = null;
} }
...@@ -101,6 +103,8 @@ class Home extends React.Component { ...@@ -101,6 +103,8 @@ class Home extends React.Component {
trainingPlanNum: res.result.trainingPlanNum, trainingPlanNum: res.result.trainingPlanNum,
weekVisitCustomerNum: res.result.weekVisitCustomerNum, weekVisitCustomerNum: res.result.weekVisitCustomerNum,
incWeekVisitCustomerNum: res.result.incWeekVisitCustomerNum, incWeekVisitCustomerNum: res.result.incWeekVisitCustomerNum,
courseNum: res.result.videoCourseNum + res.result.liveCourseNum + res.result.pictureCourseNum + res.result.offlineCourseNum,
inCourseNum: res.result.incLiveCourseNum + res.result.incVideoCourseNum + res.result.incPictureCourseNum + res.result.incOfflineCourseNum,
}); });
} }
}); });
...@@ -215,6 +219,8 @@ class Home extends React.Component { ...@@ -215,6 +219,8 @@ class Home extends React.Component {
render() { render() {
const { const {
courseNum,
inCourseNum,
examNum, examNum,
incExamNum, incExamNum,
list, list,
...@@ -306,11 +312,11 @@ class Home extends React.Component { ...@@ -306,11 +312,11 @@ class Home extends React.Component {
<span className='header-word'>课程总数 (个)</span> <span className='header-word'>课程总数 (个)</span>
</div> </div>
<div className='data-number'>{videoCourseNum + liveCourseNum + pictureCourseNum + offlineCourseNum}</div> <div className='data-number'>{courseNum}</div>
<div className='data-footer'> <div className='data-footer'>
<span className='footer-word'>本月新增</span> <span className='footer-word'>本月新增</span>
{incCustomerNum > 0 && <span className='icon iconfont'>&#xe635;</span>} {inCourseNum > 0 && <span className='icon iconfont'>&#xe635;</span>}
<span className='footer-number'>{incCustomerNum > 0 ? incCustomerNum : 0}</span> <span className='footer-number'>{inCourseNum > 0 ? inCourseNum : 0}</span>
</div> </div>
<div className='course-box'> <div className='course-box'>
<div className='course-item'> <div className='course-item'>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
width: ~'calc(16.67% - 8px)'; width: ~'calc(16.67% - 8px)';
padding: 16px; padding: 16px;
&.course-data { &.course-data {
width: ~'calc(33% - 24px)'; width: 33%;
} }
.header { .header {
display: flex; display: flex;
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
border-radius: 4px; border-radius: 4px;
background: #fafafa; background: #fafafa;
height: 124px; height: 124px;
width: 55%; width: 60%;
position: absolute; position: absolute;
right: 16px; right: 16px;
top: 28px; top: 28px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment