|
|
|
@ -5,7 +5,8 @@ import locale from 'antd/lib/date-picker/locale/zh_CN';
|
|
|
|
|
import { WordsBtn,getUrl ,handleDateString} from 'educoder';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import Modals from '../../../modals/Modals';
|
|
|
|
|
import DownloadMessage from '../../../modals/DownloadMessage';
|
|
|
|
|
import DownloadMessageysl from "../../../modals/DownloadMessageysl";
|
|
|
|
|
|
|
|
|
|
import CoursesListType from '../../coursesPublic/CoursesListType';
|
|
|
|
|
import HomeworkModal from "../../coursesPublic/HomeworkModal";
|
|
|
|
|
import moment from 'moment';
|
|
|
|
@ -70,7 +71,9 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
endtimetype:false,
|
|
|
|
|
flagPageEdit:false,
|
|
|
|
|
visible:false,
|
|
|
|
|
starttime:undefined
|
|
|
|
|
starttime:undefined,
|
|
|
|
|
DownloadType:false,
|
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -891,34 +894,41 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
}
|
|
|
|
|
/// 确认是否下载
|
|
|
|
|
confirmysl(url){
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if(response === undefined){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(response.data.status&&response.data.status===-1){
|
|
|
|
|
|
|
|
|
|
this.refs.DownloadMessage.confirmysl(url);
|
|
|
|
|
|
|
|
|
|
// axios.get(url).then((response) => {
|
|
|
|
|
// if(response.data.status&&response.data.status===-1){
|
|
|
|
|
}else if(response.data.status&&response.data.status===-2){
|
|
|
|
|
if(response.data.messages === "100"){
|
|
|
|
|
// 已超出文件导出的上限数量(100 ),建议:
|
|
|
|
|
|
|
|
|
|
// }else if(response.data.status&&response.data.status===-2){
|
|
|
|
|
// if(response.data.messages === "100"){
|
|
|
|
|
// // 已超出文件导出的上限数量(100 ),建议:
|
|
|
|
|
this.setState({
|
|
|
|
|
DownloadType:true,
|
|
|
|
|
DownloadMessageval:100
|
|
|
|
|
})
|
|
|
|
|
}else {
|
|
|
|
|
//因附件资料超过500M
|
|
|
|
|
this.setState({
|
|
|
|
|
DownloadType:true,
|
|
|
|
|
DownloadMessageval:500
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
this.props.showNotification(`正在下载中`);
|
|
|
|
|
window.open("/api"+url, '_blank');
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
|
// DownloadType:true,
|
|
|
|
|
// DownloadMessageval:100
|
|
|
|
|
// })
|
|
|
|
|
// }else {
|
|
|
|
|
// //因附件资料超过500M
|
|
|
|
|
// this.setState({
|
|
|
|
|
// DownloadType:true,
|
|
|
|
|
// DownloadMessageval:500
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// }else {
|
|
|
|
|
// this.props.showNotification(`正在下载中`);
|
|
|
|
|
// window.open("/api"+url, '_blank');
|
|
|
|
|
// }
|
|
|
|
|
// }).catch((error) => {
|
|
|
|
|
// console.log(error)
|
|
|
|
|
// });
|
|
|
|
|
Downloadcal=()=> {
|
|
|
|
|
this.setState({
|
|
|
|
|
DownloadType: false,
|
|
|
|
|
DownloadMessageval: undefined
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render(){
|
|
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
|
|
@ -994,10 +1004,14 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
{/*course_groups={course_groups}*/}
|
|
|
|
|
{/*skipTop={this.skipTop}*/}
|
|
|
|
|
{/*/>*/}
|
|
|
|
|
<DownloadMessage
|
|
|
|
|
<DownloadMessageysl
|
|
|
|
|
{...this.props}
|
|
|
|
|
ref="DownloadMessage"
|
|
|
|
|
value={this.state.DownloadMessageval}
|
|
|
|
|
modalCancel={this.Downloadcal}
|
|
|
|
|
modalsType={this.state.DownloadType}
|
|
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<HomeworkModal
|
|
|
|
|
starttimes={this.state.starttimes}
|
|
|
|
|
typs={this.state.typs}
|
|
|
|
|