优化实训作业评阅页面

issues25489
杨树林 5 years ago
parent e23cacf01d
commit 4b0cc37380

@ -37,6 +37,7 @@ class ShixunWorkReport extends Component {
showAppraiseModaltype:false, showAppraiseModaltype:false,
work_comment_hidden:undefined, work_comment_hidden:undefined,
work_comment:undefined, work_comment:undefined,
has_commit: false,
} }
} }
@ -111,7 +112,8 @@ class ShixunWorkReport extends Component {
data:result.data, data:result.data,
work_comment_hidden:result.data.work_comment_hidden, work_comment_hidden:result.data.work_comment_hidden,
work_comment:result.data.work_comment, work_comment:result.data.work_comment,
spinning:false spinning: false,
has_commit: result.data.has_commit
}) })
} }
@ -303,7 +305,7 @@ class ShixunWorkReport extends Component {
} }
render() { render() {
let{data,showAppraiseModaltype,work_comment_hidden,work_comment} =this.state; let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit} = this.state;
let category_id=data===undefined?"":data.category===null?"":data.category.category_id; let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id; let homework_common_id=data===undefined?"":data.homework_common_id;
@ -557,7 +559,9 @@ class ShixunWorkReport extends Component {
showAppraiseModal={(type,id,show,hidden)=>this.showAppraiseModal(type,id,show,hidden)} showAppraiseModal={(type,id,show,hidden)=>this.showAppraiseModal(type,id,show,hidden)}
/> />
{
has_commit === false ? "" :
<div>
<div className="stud-class-set bor-bottom-greyE mt17"> <div className="stud-class-set bor-bottom-greyE mt17">
<div className="clearfix edu-back-white poll_list"> <div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">图形统计</div> <div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">图形统计</div>
@ -582,9 +586,9 @@ class ShixunWorkReport extends Component {
`} `}
</style> </style>
{ {
data&&data.shixun_detail===undefined?"":data.shixun_detail.map((item,key)=>{ data && data.shixun_detail === undefined ? "" : data.shixun_detail.map((item, key) => {
return( return (
<div id={"id"+item.position} key={key} className={"mb20"}> <div id={"id" + item.position} key={key} className={"mb20"}>
<div className="font-16 color-dark-21 ml20 mr20"> <div className="font-16 color-dark-21 ml20 mr20">
<p className="clearfix mb20"> <p className="clearfix mb20">
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF"> <span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
@ -602,7 +606,8 @@ class ShixunWorkReport extends Component {
/> />
</div> </div>
{item.st===0?item.passed_code===null?"":<div className="font-16 color-dark-21 ml20 mr20"> {item.st === 0 ? item.passed_code === null ? "" :
<div className="font-16 color-dark-21 ml20 mr20">
<div className="bor-grey-e mt15"> <div className="bor-grey-e mt15">
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox"> <p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span> <span className="fl">最近通过的代码</span>
@ -630,13 +635,16 @@ class ShixunWorkReport extends Component {
</li> </li>
</div> </div>
</div> </div>
</div>:""} </div> : ""}
</div> </div>
) )
}) })
} }
</div> </div>
</div> </div>
</div>
}
</div> </div>
</div> </div>

Loading…
Cancel
Save