|
|
|
@ -60,7 +60,10 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//打开pdf
|
|
|
|
|
confpdf = (url) =>{
|
|
|
|
|
window.open(url);
|
|
|
|
|
}
|
|
|
|
|
Downloadcal=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
DownloadType:false,
|
|
|
|
@ -69,11 +72,18 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
let query = this.props.location.pathname;
|
|
|
|
|
const type = query.split('/');
|
|
|
|
|
this.setState({
|
|
|
|
|
shixuntypes:type[3],
|
|
|
|
|
spinning:true
|
|
|
|
|
})
|
|
|
|
|
this.getdatalist()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getdatalist=()=>{
|
|
|
|
|
let homeworkid=this.props.match.params.homeworkid;
|
|
|
|
|
let url = `/student_works/${homeworkid}/shixun_work_report.json`
|
|
|
|
|
let url = `/student_works/${homeworkid}/shixun_work_report.json`
|
|
|
|
|
axios.get(url).then((result) => {
|
|
|
|
|
if (result.data.status === 403||result.data.status === 401||result.data.status === 407||result.data.status === 408) {
|
|
|
|
|
|
|
|
|
@ -90,11 +100,7 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
spinning:false
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
let query = this.props.location.pathname;
|
|
|
|
|
const type = query.split('/');
|
|
|
|
|
this.setState({
|
|
|
|
|
shixuntypes:type[3]
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
jumptopic=(anchorName)=>{
|
|
|
|
|
; if (anchorName) {
|
|
|
|
@ -157,7 +163,8 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
<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.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}
|
|
|
|
|
onClick={()=>this.confpdf(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}
|
|
|
|
|
>导出实训报告数据</a> : ""}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -182,6 +189,7 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
{...this.props}
|
|
|
|
|
data={data}
|
|
|
|
|
jumptopic={this.jumptopic}
|
|
|
|
|
getdatalist={()=>this.getdatalist()}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|