|
|
@ -1,8 +1,9 @@
|
|
|
|
import React, {Component} from "react";
|
|
|
|
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 { 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 {Link,Switch,Route,Redirect} from 'react-router-dom';
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
|
|
|
|
import ConclusionEvaluation from './shixunreport/ConclusionEvaluation';
|
|
|
|
import ConclusionEvaluation from './shixunreport/ConclusionEvaluation';
|
|
|
|
import OfficialAcademicTranscript from './shixunreport/OfficialAcademicTranscript';
|
|
|
|
import OfficialAcademicTranscript from './shixunreport/OfficialAcademicTranscript';
|
|
|
|
import Coursesshixundetails from './shixunreport/Coursesshixundetails';
|
|
|
|
import Coursesshixundetails from './shixunreport/Coursesshixundetails';
|
|
|
@ -28,13 +29,25 @@ class ShixunWorkReport extends Component {
|
|
|
|
spinning:true,
|
|
|
|
spinning:true,
|
|
|
|
DownloadType:false,
|
|
|
|
DownloadType:false,
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
|
|
|
|
isspinning:false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// 确认是否下载
|
|
|
|
/// 确认是否下载
|
|
|
|
confirmysl(url){
|
|
|
|
confirmysl(url,child){
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
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){
|
|
|
|
if(response.data.status&&response.data.status===-1){
|
|
|
|
|
|
|
|
|
|
|
|
}else if(response.data.status&&response.data.status===-2){
|
|
|
|
}else if(response.data.status&&response.data.status===-2){
|
|
|
@ -54,16 +67,13 @@ class ShixunWorkReport extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
this.props.showNotification(`正在下载中`);
|
|
|
|
this.props.showNotification(`正在下载中`);
|
|
|
|
window.open("/api"+url, '_blank');
|
|
|
|
window.open("/api"+url+'?export=true', '_blank');
|
|
|
|
|
|
|
|
this.setState({ isspinning: false })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
console.log(error)
|
|
|
|
console.log(error)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//打开pdf
|
|
|
|
|
|
|
|
confpdf = (url) =>{
|
|
|
|
|
|
|
|
window.open(url);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Downloadcal=()=>{
|
|
|
|
Downloadcal=()=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
DownloadType:false,
|
|
|
|
DownloadType:false,
|
|
|
@ -124,6 +134,17 @@ class ShixunWorkReport extends Component {
|
|
|
|
goback = () => {
|
|
|
|
goback = () => {
|
|
|
|
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.state.data.homework_common_id}/list?tab=0`);
|
|
|
|
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.state.data.homework_common_id}/list?tab=0`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setupdalist=(challenge_score,overall_appraisal,work_score)=>{
|
|
|
|
|
|
|
|
let {data}=this.state;
|
|
|
|
|
|
|
|
let newdata=data;
|
|
|
|
|
|
|
|
newdata.challenge_score=challenge_score;
|
|
|
|
|
|
|
|
newdata.overall_appraisal=overall_appraisal;
|
|
|
|
|
|
|
|
newdata.work_score=work_score;
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
data:newdata
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
let{data} =this.state;
|
|
|
|
let{data} =this.state;
|
|
|
|
console.log(data)
|
|
|
|
console.log(data)
|
|
|
@ -162,10 +183,9 @@ class ShixunWorkReport extends Component {
|
|
|
|
{/*{this.props.isAdmin()?<a className=" fr font-14 ml30 mt10 mr20 color-grey-9 ">导出实训报告数据</a>:""}*/}
|
|
|
|
{/*{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>
|
|
|
|
<a onClick={this.goback} className="color-grey-6 fr font-16 ml30 mt15 mr20">返回</a>
|
|
|
|
{this.props.isAdmin() ? <a
|
|
|
|
{this.props.isAdmin() ? <a
|
|
|
|
className=" color-blue font-16 fr ml30 mt15 mr20"
|
|
|
|
className=" color-blue font-16 fr ml30 mt15"
|
|
|
|
// 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`)}
|
|
|
|
> <Spin size="small" spinning={this.state.isspinning}>导出实训报告数据</Spin></a> : ""}
|
|
|
|
>导出实训报告数据</a> : ""}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="stud-class-set">
|
|
|
|
<div className="stud-class-set">
|
|
|
@ -190,6 +210,7 @@ class ShixunWorkReport extends Component {
|
|
|
|
data={data}
|
|
|
|
data={data}
|
|
|
|
jumptopic={this.jumptopic}
|
|
|
|
jumptopic={this.jumptopic}
|
|
|
|
getdatalist={()=>this.getdatalist()}
|
|
|
|
getdatalist={()=>this.getdatalist()}
|
|
|
|
|
|
|
|
setupdalist={(challenge_score,overall_appraisal,work_score)=>this.setupdalist(challenge_score,overall_appraisal,work_score)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|