|
|
|
@ -443,8 +443,50 @@ class ShixunStudentWork extends Component {
|
|
|
|
|
starttimes:undefined,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 导出实习报告批量
|
|
|
|
|
internshipreport = (url) => {
|
|
|
|
|
console.log("internshipreport");
|
|
|
|
|
// var homeworkid = this.props.match.params.homeworkid;
|
|
|
|
|
// let url = "/zip/shixun_report";
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
console.log("326");
|
|
|
|
|
console.log(response);
|
|
|
|
|
if(response.data.status&&response.data.status===-1){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else if(response.data.status&&response.data.status===-2){
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
window.open("/api"+url, '_blank');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 课堂学生成绩的导出下载
|
|
|
|
|
Classstudentachievement = (url) => {
|
|
|
|
|
console.log("Classstudentachievement");
|
|
|
|
|
// const course_id = this.props.match.params.coursesId;
|
|
|
|
|
// let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx";
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
console.log("1374");
|
|
|
|
|
console.log(response);
|
|
|
|
|
if(response.data.status&&response.data.status===-1){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else if(response.data.status&&response.data.status===-2){
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
window.open("/api"+url, '_blank');
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {
|
|
|
|
|
data,
|
|
|
|
@ -606,10 +648,35 @@ class ShixunStudentWork extends Component {
|
|
|
|
|
<Link
|
|
|
|
|
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
|
|
|
|
|
>设置</Link>
|
|
|
|
|
{this.props.isAdmin() ? <a
|
|
|
|
|
className="fr color-blue font-16"
|
|
|
|
|
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
|
|
|
|
|
>导出</a> : ""}
|
|
|
|
|
<style>{`
|
|
|
|
|
.drop_down_menu li a {
|
|
|
|
|
padding: 0px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
.drop_down_menu {
|
|
|
|
|
width: 93px;
|
|
|
|
|
}
|
|
|
|
|
.drop_down_menu li {
|
|
|
|
|
overflow: visible;
|
|
|
|
|
width: 93px;
|
|
|
|
|
}
|
|
|
|
|
.drop_down_menu, .drop_down_normal {
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
padding-bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
a:hover {
|
|
|
|
|
color:#1A0B00 !important;
|
|
|
|
|
}
|
|
|
|
|
`}</style>
|
|
|
|
|
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
|
|
|
|
|
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
|
|
|
|
|
<li><a onClick={()=>this.internshipreport(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li><a onClick={()=>this.Classstudentachievement(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li> : ""}
|
|
|
|
|
{this.props.isAdmin()?
|
|
|
|
|
data&&data.end_immediately===true?
|
|
|
|
|
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""}
|
|
|
|
|