Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 5 years ago
commit ffa647be48

@ -1349,11 +1349,13 @@ class Listofworks extends Component {
axios.get(url).then((response) => {
console.log("1350");
console.log(response);
if(response.data.status === 200){
window.open("/api"+url, '_blank');
if(response.data.status&&response.data.status===-1){
}else{
}else if(response.data.status&&response.data.status===-2){
}else{
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
@ -1374,7 +1376,12 @@ class Listofworks extends Component {
axios.get(url).then((response) => {
console.log("1374");
console.log(response);
if(response.data.status=== 200){
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
}else{
window.open("/api"+url, '_blank');
}

@ -1608,21 +1608,20 @@ class Trainingjobsetting extends Component {
})
}
// 导出实习报告批量
internshipreport = () => {
internshipreport = (url) => {
console.log("internshipreport");
var homeworkid = this.props.match.params.homeworkid;
let url = "/zip/shixun_report";
axios.get((url),{
params: {
homework_common_id: homeworkid,
}
},{responseType: 'blob'}).then((response) => {
// 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.status === 200){
window.open(url, '_blank');
}else{
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) => {
@ -1631,19 +1630,22 @@ class Trainingjobsetting 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),{responseType: 'blob'}).then((response) => {
console.log("339");
// 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.status === 200){
window.open(url, '_blank');
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)
});
@ -1789,9 +1791,9 @@ class Trainingjobsetting 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><a onClick={()=>this.internshipreport(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.Classstudentachievement()}>学生成绩</a>
<li><a onClick={()=>this.Classstudentachievement(`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`)}>学生成绩</a>
</li>
</ul>
</li>: ""}

@ -319,21 +319,20 @@ class Workquestionandanswer extends Component {
// 导出实习报告批量
internshipreport = () => {
internshipreport = (url) => {
console.log("internshipreport");
var homeworkid = this.props.match.params.homeworkid;
let url = "/zip/shixun_report";
axios.get((url),{
params: {
homework_common_id: homeworkid,
}
},{responseType: 'blob'}).then((response) => {
// 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.status === 200){
window.open(url, '_blank');
}else{
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) => {
@ -342,19 +341,22 @@ class Workquestionandanswer 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),{responseType: 'blob'}).then((response) => {
console.log("339");
// 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.status === 200){
window.open(url, '_blank');
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)
});
@ -485,9 +487,9 @@ class Workquestionandanswer extends Component {
<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><a onClick={()=>this.internshipreport(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.Classstudentachievement()}>学生成绩</a>
<li><a onClick={()=>this.Classstudentachievement(`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`)}>学生成绩</a>
</li>
</ul>
</li> : ""}

@ -1481,7 +1481,7 @@ export default class TPMsettings extends Component {
<a onClick={()=>this.testscripttip(0)}><img
src={getImageUrl("images/educoder/problem.png") }/></a>
<div className="invite-tip clearfix none " id="test_script_tip"
style={{top: '33px', right: '-6px',width: '271px',zIndex: '10',display: testscripttiptype===true?'block':"none"}}>
style={{top: '33px', right: '-6px',width: '322px',zIndex: '10',display: testscripttiptype===true?'block':"none"}}>
<span className="top-black-trangle"></span>
<div className="padding20 invitecontent clearfix">
<p className="font-12 edu-txt-left">

Loading…
Cancel
Save