Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_aliyun_beta
cxt 5 years ago
commit b00766cd15

@ -398,7 +398,7 @@ class Eduinforms extends Component{
<div>
{
informs === null || informs=== undefined ||informs.length === 0 ?
this.state.yslbool===true?
this.state.yslbool===false?
<div className="alltask ">
<div className="edu-tab-con-box clearfix edu-txt-center"><img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")} />

@ -1,8 +1,9 @@
import React, {Component} from "react";
import {WordsBtn,markdownToHTML} from 'educoder';
import {WordsBtn,markdownToHTML,ActionBtn,queryString,downloadFile} from 'educoder';
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Spin} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
import axios from 'axios';
import ConclusionEvaluation from './shixunreport/ConclusionEvaluation';
import OfficialAcademicTranscript from './shixunreport/OfficialAcademicTranscript';
import Coursesshixundetails from './shixunreport/Coursesshixundetails';
@ -28,13 +29,25 @@ class ShixunWorkReport extends Component {
spinning:true,
DownloadType:false,
DownloadMessageval:undefined,
isspinning:false
}
}
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
/// 确认是否下载
confirmysl(url,child){
this.setState({ isspinning: true })
let params ={}
if(child!=undefined){
params =child._getRequestParams()!==undefined?child._getRequestParams():{};
}
console.log("170");
console.log(params);
const urll=url+`?${queryString.stringify(params)}`;
axios.get(urll+ '&export=true').then((response) => {
if(response===undefined){
return
}
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
@ -54,16 +67,13 @@ class ShixunWorkReport extends Component {
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
window.open("/api"+url+'?export=true', '_blank');
this.setState({ isspinning: false })
}
}).catch((error) => {
console.log(error)
});
}
//打开pdf
confpdf = (url) =>{
window.open(url);
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
@ -162,10 +172,9 @@ class ShixunWorkReport extends Component {
{/*{this.props.isAdmin()?<a className=" fr font-14 ml30 mt10 mr20 color-grey-9 ">导出实训报告数据</a>:""}*/}
<a onClick={this.goback} className="color-grey-6 fr font-16 ml30 mt15 mr20">返回</a>
{this.props.isAdmin() ? <a
className=" color-blue font-16 fr ml30 mt15 mr20"
// onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}
onClick={()=>this.confpdf(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}
>导出实训报告数据</a> : ""}
className=" color-blue font-16 fr ml30 mt15"
onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}
> <Spin size="small" spinning={this.state.isspinning}>导出实训报告数据</Spin></a> : ""}
</div>
<div className="stud-class-set">

@ -40,6 +40,8 @@ class OfficialAcademicTranscript extends Component {
}).catch((error)=>{
})
}else{
this.props.showNotification("调分为空将不会修改之前的分数");
}
}

Loading…
Cancel
Save