|
|
|
@ -1336,23 +1336,19 @@ class Listofworks extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 导出实习报告批量
|
|
|
|
|
internshipreport = ()=>{
|
|
|
|
|
internshipreport = (url)=>{
|
|
|
|
|
console.log("internshipreport");
|
|
|
|
|
let url = "/zip/shixun_report";
|
|
|
|
|
let homeworkid = this.props.match.params.homeworkid;
|
|
|
|
|
axios.get((url),{
|
|
|
|
|
params: {
|
|
|
|
|
homework_common_id: homeworkid,
|
|
|
|
|
work_status: this.state.course_groupyslstwo,
|
|
|
|
|
course_group: this.state.checkedValuesineinfo,
|
|
|
|
|
search: this.state.searchtext,
|
|
|
|
|
}
|
|
|
|
|
},{responseType: 'blob'}).then((response) => {
|
|
|
|
|
console.log("1342");
|
|
|
|
|
console.log(response);
|
|
|
|
|
// params: {
|
|
|
|
|
// homework_common_id: homeworkid,
|
|
|
|
|
// work_status: this.state.course_groupyslstwo,
|
|
|
|
|
// course_group: this.state.checkedValuesineinfo,
|
|
|
|
|
// search: this.state.searchtext,
|
|
|
|
|
// }
|
|
|
|
|
// let url = "/zip/shixun_report";
|
|
|
|
|
// let homeworkid = this.props.match.params.homeworkid;
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if(response.status === 200){
|
|
|
|
|
window.open(url, '_blank');
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
@ -1361,21 +1357,19 @@ class Listofworks extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 课堂学生成绩的导出下载
|
|
|
|
|
Classstudentachievement=()=>{
|
|
|
|
|
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),{
|
|
|
|
|
params: {
|
|
|
|
|
group_id: this.state.checkedValuesineinfo,
|
|
|
|
|
search: this.state.searchtext,
|
|
|
|
|
}
|
|
|
|
|
},{responseType: 'blob'}).then((response) => {
|
|
|
|
|
console.log("1306");
|
|
|
|
|
console.log(response);
|
|
|
|
|
// const course_id = this.props.match.params.coursesId;
|
|
|
|
|
// let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx";
|
|
|
|
|
// ,{
|
|
|
|
|
// params: {
|
|
|
|
|
// group_id: this.state.checkedValuesineinfo,
|
|
|
|
|
// search: this.state.searchtext,
|
|
|
|
|
// }
|
|
|
|
|
// },{responseType: 'blob'})
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if(response.status === 200){
|
|
|
|
|
window.open(url, '_blank');
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
@ -1531,8 +1525,8 @@ class Listofworks extends Component {
|
|
|
|
|
{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()}>实训报告</a></li>
|
|
|
|
|
<li><a onClick={()=>this.Classstudentachievement()} >学生成绩</a></li>
|
|
|
|
|
<li><a onClick={()=>this.internshipreport(`/api/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a></li>
|
|
|
|
|
<li><a onClick={()=>this.Classstudentachievement(`/api/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)} >学生成绩</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>:""}
|
|
|
|
|
{this.props.isAdmin() ?
|
|
|
|
|