diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 0a45ccdcf..776e462b1 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -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){ + + }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.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 ),建议: - - // 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,11 +1004,15 @@ class GraduationTaskssettingapp extends Component{ {/*course_groups={course_groups}*/} {/*skipTop={this.skipTop}*/} {/*/>*/} - - { + if(response === undefined){ + return + } + 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) + }); + } - let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state; - - let params ={ - teacher_comment:teacher_comment, - task_status:task_status, - course_group:course_group, - cross_comment:cross_comment, - order:order, - b_order:b_order, - search:search, - } - this.refs.DownloadMessage.confirmysl(url,params); + Downloadcal=()=> { + this.setState({ + DownloadType: false, + DownloadMessageval: undefined + }) } render(){ @@ -1007,7 +1042,13 @@ class GraduationTaskssettinglist extends Component{ setupdate={this.setupdate} />:""} - + {taskslistdata&&taskslistdata? // 教师列表 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index b08ff6f78..dab3e10f6 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -4,7 +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 DownloadMessageysl from "../../../modals/DownloadMessageysl"; import HomeworkModal from "../../coursesPublic/HomeworkModal"; import CoursesListType from '../../coursesPublic/CoursesListType'; import moment from 'moment'; @@ -192,37 +192,40 @@ class GraduationTasksquestions extends Component{ /// 确认是否下载 confirmysl(url){ - 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 ),建议: - - // 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) - // }); + axios.get(url).then((response) => { + if(response === undefined){ + return + } + 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=()=>{ + + Downloadcal=()=> { this.setState({ - DownloadType:false, - DownloadMessageval:undefined + DownloadType: false, + DownloadMessageval: undefined }) } render(){ @@ -256,9 +259,12 @@ class GraduationTasksquestions extends Component{ {/*modalSave={ModalSave}*/} {/*loadtype={Loadtype}*/} {/*/>*/} - {parseInt(tab) === 0 && this.Getdataback(jobsettingsdata, teacherdata)}>} diff --git a/public/react/src/modules/user/MyEduCoderModal.js b/public/react/src/modules/user/MyEduCoderModal.js new file mode 100644 index 000000000..cca6de622 --- /dev/null +++ b/public/react/src/modules/user/MyEduCoderModal.js @@ -0,0 +1,51 @@ +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import { Modal} from 'antd'; +import axios from 'axios'; +import 'common.css' +//立即申请试用 +class MyEduCoderModal extends Component { + + constructor(props) { + super(props); + this.state={ + + } + } + + modalCancel=()=>{ + //取消 + } + + setDownload=()=>{ + //立即联系 + } + + + render() { + + return( + +
+

欢迎使用EduCoder,您可以试用1天

+

超过期限,需要经过管理员的授权审核

+ +
+
+ ) + } +} + +export default MyEduCoderModal; \ No newline at end of file diff --git a/public/react/src/modules/user/Notcompleted.js b/public/react/src/modules/user/Notcompleted.js new file mode 100644 index 000000000..99c85c543 --- /dev/null +++ b/public/react/src/modules/user/Notcompleted.js @@ -0,0 +1,49 @@ +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import { Modal} from 'antd'; +import axios from 'axios'; +import 'common.css' +//完善个人资料 +class Notcompleted extends Component { + + constructor(props) { + super(props); + + } + + modalCancel=()=>{ + //取消 + } + + setDownload=()=>{ + //立即联系 + } + + + render() { + + return( + +
+

您尚未完善个人资料

+

请在完成资料后,提交试用申请

+ +
+
+ ) + } +} + +export default Notcompleted; \ No newline at end of file diff --git a/public/react/src/modules/user/ReadPassword.js b/public/react/src/modules/user/ReadPassword.js new file mode 100644 index 000000000..ef09d794e --- /dev/null +++ b/public/react/src/modules/user/ReadPassword.js @@ -0,0 +1,42 @@ +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import { Modal} from 'antd'; +import axios from 'axios'; +import 'common.css' +//密码已重置,请重新登录 +class ReadPassword extends Component { + + constructor(props) { + super(props); + + } + + + setDownload=()=>{ + //立即联系 + } + + + render() { + + return( + +
+

密码已重置,请重新登录

+ 知道啦 +
+
+ ) + } +} + +export default ReadPassword; \ No newline at end of file diff --git a/public/react/src/modules/user/common.css b/public/react/src/modules/user/common.css index 77a3aee7d..0cbf13364 100644 --- a/public/react/src/modules/user/common.css +++ b/public/react/src/modules/user/common.css @@ -32,6 +32,10 @@ height: 45px; } + .educouddiv { + display: flex; + justify-content: center; + } .left_right {