@@ -1025,8 +1079,8 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?
导出
:""}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js
index 4e807fde4..7c1a1474a 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js
@@ -4,6 +4,7 @@ import {Link} from 'react-router-dom';
import { WordsBtn,markdownToHTML} from 'educoder';
import axios from 'axios';
import Modals from '../../../modals/Modals';
+import DownloadMessage from '../../../modals/DownloadMessage';
import HomeworkModal from "../../coursesPublic/HomeworkModal";
import CoursesListType from '../../coursesPublic/CoursesListType';
import moment from 'moment';
@@ -187,6 +188,41 @@ class GraduationTasksquestions extends Component{
course_groupslist:id
})
}
+
+ /// 确认是否下载
+ 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 ),建议:
+
+ 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(){
let { Modalstype,Modalstopval,ModalCancel,ModalSave,questionslist} =this.state;
@@ -218,7 +254,12 @@ class GraduationTasksquestions extends Component{
{/*modalSave={ModalSave}*/}
{/*loadtype={Loadtype}*/}
{/*/>*/}
-
+
导出
:""}