dev_forum
杨树林 5 years ago
parent 07a26e5c38
commit f04f6f7e5e

@ -115,6 +115,7 @@ class Listofworks extends Component {
key: 'name',
align: 'center',
className:'font-14',
width:'120px',
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.name}</span>
)
@ -139,7 +140,7 @@ class Listofworks extends Component {
dataIndex: 'classroom',
align: 'center',
className:'font-14',
width:'288px',
width:"260px",
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
)
@ -239,9 +240,9 @@ class Listofworks extends Component {
</span>
</Tooltip>
:
<a style={{color:"#9A9A9A"}}>
<span style={{color:"#9A9A9A"}}>
--
</a>
</span>
)
:
<span style={parseInt(record.efficiencyscore) <= 60 ? {
@ -367,6 +368,7 @@ class Listofworks extends Component {
key: 'name',
align: 'center',
className:'font-14',
width:'120px',
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.name}</span>
)
@ -391,7 +393,7 @@ class Listofworks extends Component {
dataIndex: 'classroom',
align: 'center',
className:'font-14',
width:'288px',
width:"260px",
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
)
@ -491,9 +493,9 @@ class Listofworks extends Component {
</span>
</Tooltip>
:
<a style={{color:"#9A9A9A"}}>
<span style={{color:"#9A9A9A"}}>
--
</a>
</span>
)
:
<span style={parseInt(record.efficiencyscore) <= 60 ? {

@ -443,7 +443,49 @@ 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 {
@ -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> : "" : ""}

Loading…
Cancel
Save