Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

Adjustreact
daiao 5 years ago
commit 8422354c05

@ -65,6 +65,10 @@ class Subject < ApplicationRecord
excellent ? CourseMember.where(role: 4, course_id: courses.pluck(:id)).pluck(:user_id).length : shixuns.pluck(:myshixuns_count).sum excellent ? CourseMember.where(role: 4, course_id: courses.pluck(:id)).pluck(:user_id).length : shixuns.pluck(:myshixuns_count).sum
end end
def myshixuns_count
shixuns.pluck(:myshixuns_count).sum
end
def all_score def all_score
subject_shixun_score + subject_shixun_choose_score subject_shixun_score + subject_shixun_choose_score
end end

@ -1,6 +1,6 @@
json.subjects @subjects do |subject| json.subjects @subjects do |subject|
json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count) json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count)
json.myshixuns_count subject.excellent ? subject.member_count : subject.myshixuns_count json.myshixuns_count subject.myshixuns_count
json.challenges_count subject.subject_challenge_count json.challenges_count subject.subject_challenge_count
json.image_url url_to_avatar(subject) json.image_url url_to_avatar(subject)
json.allow_visit subject.status > 1 || User.current.manager_of_subject?(subject) || User.current.admin? json.allow_visit subject.status > 1 || User.current.manager_of_subject?(subject) || User.current.admin?

@ -3,7 +3,7 @@ json.subject do
json.description @subject.description json.description @subject.description
json.shixuns_count @subject.shixuns_count json.shixuns_count @subject.shixuns_count
json.challenges_count @subject.subject_challenge_count json.challenges_count @subject.subject_challenge_count
json.member_count @subject.member_count json.member_count @subject.myshixuns_count
json.subject_score @subject.all_score json.subject_score @subject.all_score
json.learning_notes @subject.learning_notes json.learning_notes @subject.learning_notes
end end

@ -247,7 +247,7 @@ const App = (props) => {
<section className="static_section_header"> <section className="static_section_header">
<div className="header_title"> <div className="header_title">
<span className="title-p">学习统计</span> <span className="title-p">学习统计</span>
<span className="title-sub">Android综合实训之物联网移动应用</span> <span className="title-sub"></span>
</div> </div>
<div className="header-number header-flex"> <div className="header-number header-flex">
<StaticNumberAndTxt <StaticNumberAndTxt

@ -30,13 +30,13 @@
font-weight: bold; font-weight: bold;
&::before{ &::before{
position: absolute; //position: absolute;
content: ''; //content: '';
border-left: 1px solid rgba(192,196,204,1); //border-left: 1px solid rgba(192,196,204,1);
right: -10px; //right: -10px;
top: 2px; //top: 2px;
bottom: 0px; //bottom: 0px;
margin-left: 10px; //margin-left: 10px;
} }
} }
.title-sub{ .title-sub{
@ -105,7 +105,7 @@
.ant-table-thead{ .ant-table-thead{
th{ th{
background: rgba(241,248,255,1); background: rgba(241,248,255,1);
} }
.ant-table-column-title{ .ant-table-column-title{
color: #303133; color: #303133;
@ -152,5 +152,5 @@
} }
.tool-clazz{ .tool-clazz{
max-width: 200px !important; max-width: 200px !important;
} }

Loading…
Cancel
Save