dev_forum
杨树林 6 years ago
parent 2b33ed3863
commit c96a9db7ab

@ -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}

@ -6,9 +6,8 @@ import axios from 'axios';
import moment from 'moment';
import HomeworkModal from "../../coursesPublic/HomeworkModal";
import Modals from '../../../modals/Modals';
import DownloadMessage from '../../../modals/DownloadMessage';
import CoursesListType from '../../coursesPublic/CoursesListType';
import DownloadMessageysl from "../../../modals/DownloadMessageysl";
import ModulationModal from "../../coursesPublic/ModulationModal";
import AllocationModal from "../../coursesPublic/AllocationModal";
import Associationmodel from '../../coursesPublic/Associationmodel';
@ -626,9 +625,9 @@ class GraduationTaskssettinglist extends Component{
this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pageNumber);
}
/// 确认是否下载
confirmysl(url){
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state;
let params ={
@ -640,7 +639,43 @@ class GraduationTaskssettinglist extends Component{
b_order:b_order,
search:search,
}
this.refs.DownloadMessage.confirmysl(url,params);
axios.get(url,{
params
}).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=()=> {
this.setState({
DownloadType: false,
DownloadMessageval: undefined
})
}
render(){
@ -1007,7 +1042,13 @@ class GraduationTaskssettinglist extends Component{
setupdate={this.setupdate}
/>:""}
<DownloadMessage ref="DownloadMessage" {...this.props} />
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{taskslistdata&&taskslistdata?
// 教师列表

@ -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
}
Downloadcal=()=>{
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:false,
DownloadMessageval:undefined
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(){
@ -256,9 +259,12 @@ class GraduationTasksquestions extends Component{
{/*modalSave={ModalSave}*/}
{/*loadtype={Loadtype}*/}
{/*/>*/}
<DownloadMessage
<DownloadMessageysl
{...this.props}
ref="DownloadMessage"
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<HomeworkModal
starttimes={this.state.starttimes}

@ -276,6 +276,7 @@ class ShixunHomeworkPage extends Component {
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{parseInt(tab) === 0 &&<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>}

@ -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(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.props.modalsType===undefined?false:this.props.modalsType}
width="530px"
>
<div className="educouddiv">
<div><p>欢迎使用EduCoder您可以试用1天</p></div>
<div><p>超过期限需要经过管理员的授权审核</p></div>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={this.modalCancel()}>先试试看</a>
<a className="task-btn task-btn-orange" onClick={this.setDownload()}>立即申请授权</a>
</div>
</div>
</Modal>
)
}
}
export default MyEduCoderModal;

@ -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(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.props.modalsType===undefined?false:this.props.modalsType}
width="530px"
>
<div className="educouddiv">
<div><p>您尚未完善个人资料</p></div>
<div><p>请在完成资料后提交试用申请</p></div>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={this.modalCancel()}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.setDownload()}>立即完善资料</a>
</div>
</div>
</Modal>
)
}
}
export default Notcompleted;

@ -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(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.props.modalsType===undefined?false:this.props.modalsType}
width="530px"
>
<div className="educouddiv">
<div><p>密码已重置请重新登录</p></div>
<a className="task-btn task-btn-orange" onClick={this.setDownload()}>知道啦</a>
</div>
</Modal>
)
}
}
export default ReadPassword;

@ -32,6 +32,10 @@
height: 45px;
}
.educouddiv {
display: flex;
justify-content: center;
}
.left_right {

Loading…
Cancel
Save