dev_forum
杨树明 6 years ago
parent 8b99e0f41e
commit 68c1d08dd3

@ -548,7 +548,7 @@ class Exercisesetting extends Component{
},
};
console.log(flagPageEdit===true?polls&&polls.exercise_status===1?3:2:1)
// console.log(flagPageEdit===true?polls&&polls.exercise_status===1?3:2:1)
return(
<div>
<Modals

@ -7,6 +7,7 @@ import '../css/members.css';
import '../css/busyWork.css';
import axios from 'axios';
import Modals from '../../modals/Modals';
import DownloadMessage from '../../modals/DownloadMessage';
import Studentshavecompletedthelist from './Studentshavecompletedthelist';
import WrappedExercisesetting from './Exercisesetting';
import ExerciseDisplay from './ExerciseDisplay'
@ -117,8 +118,16 @@ class Testpapersettinghomepage extends Component{
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadMessageval:500
})
}
}else {
window.open(url, '_blank');
@ -159,6 +168,13 @@ class Testpapersettinghomepage extends Component{
Loadtype:false
})
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render(){
let {tab,visible,Commonheadofthetestpaper}=this.state;
const isAdmin =this.props.isAdmin();
@ -166,6 +182,12 @@ class Testpapersettinghomepage extends Component{
return(
<div className="newMain clearfix ">
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<div className={"educontent mb20"} style={{width:"1200px"}}>
{/* 公用的提示弹框 */}
{this.state.Modalstype===true?<Modals

@ -4,6 +4,7 @@ import {WordsBtn, ActionBtn} from 'educoder';
import TraineetraininginformationModal from './TraineetraininginformationModal';
import ModulationModal from "../coursesPublic/ModulationModal";
import HomeworkModal from "../coursesPublic/HomeworkModal";
import DownloadMessage from '../../modals/DownloadMessage';
import {Base64} from 'js-base64';
import {Internshipreportsy} from './Httpdownloads'
import {
@ -1345,8 +1346,17 @@ class Listofworks extends Component {
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadMessageval:500
})
}
}else {
window.open(url, '_blank');
@ -1355,6 +1365,13 @@ class Listofworks extends Component {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
// console.log("Listofworks.js000")
@ -1380,6 +1397,12 @@ class Listofworks extends Component {
updatas={() => this.isupdatas()}
/> : ""}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{visibles === true ?
<div>

@ -3,7 +3,8 @@ import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn,ActionBtn} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import NoneData from '../coursesPublic/NoneData'
import NoneData from '../coursesPublic/NoneData';
import DownloadMessage from '../../modals/DownloadMessage';
import {
Form,
Select,
@ -465,8 +466,17 @@ class ShixunStudentWork extends Component {
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadMessageval:500
})
}
}else {
window.open(url, '_blank');
@ -476,7 +486,12 @@ class ShixunStudentWork extends Component {
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
let {
data,
@ -566,6 +581,13 @@ class ShixunStudentWork extends Component {
issCancel={()=>this.hideshowmodel()}
updatas={()=>this.getupdata()}
/>:""}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}

@ -8,6 +8,7 @@ import OfficialAcademicTranscript from './shixunreport/OfficialAcademicTranscrip
import Coursesshixundetails from './shixunreport/Coursesshixundetails';
import Shixunechart from './shixunreport/Shixunechart';
import {UnControlled as CodeMirror} from 'react-codemirror2';
import DownloadMessage from '../../modals/DownloadMessage';
import 'codemirror/mode/cmake/cmake';
import 'codemirror/mode/xml/xml';
import 'codemirror/mode/javascript/javascript';
@ -38,8 +39,17 @@ class ShixunWorkReport extends Component {
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadMessageval:500
})
}
}else {
window.open(url, '_blank');
@ -83,6 +93,12 @@ class ShixunWorkReport extends Component {
}
}
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
let{data} =this.state;
let category_id=data===undefined?"":data.category.category_id;
@ -108,7 +124,12 @@ class ShixunWorkReport extends Component {
<WordsBtn className="fl">{data&&data.username}</WordsBtn>
</p>
</div>
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname">{data&&data.shixun_name}</p>
{/*{this.props.isAdmin()?<a className=" fr font-14 ml30 mt10 mr20 color-grey-9 ">导出实训报告数据</a>:""}*/}

@ -27,7 +27,7 @@ import '../poll/pollStyle.css'
import moment from 'moment';
import 'moment/locale/zh-cn';
import Modals from "../../modals/Modals";
import DownloadMessage from '../../modals/DownloadMessage';
const RadioGroup = Radio.Group;
//GraduationTaskssetting.js
@ -1618,8 +1618,16 @@ class Trainingjobsetting extends Component {
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadMessageval:500
})
}
}else {
window.open(url, '_blank');
@ -1629,7 +1637,12 @@ class Trainingjobsetting extends Component {
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
@ -1663,6 +1676,14 @@ class Trainingjobsetting extends Component {
data={[]}
issCancel={()=>this.hideshowmodel()}
/>:""}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}

@ -1,8 +1,6 @@
import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, ActionBtn, markdownToHTML} from 'educoder';
import GraduateTopicReply from '../graduation/topics/GraduateTopicReply'
import MemoDetailMDEditortwo from '../../forums/MemoDetailMDEditortwo'
import {
Form,
Select,
@ -37,13 +35,9 @@ import CommonReply from "../common/comments/CommonReply";
import Homeworddescription from "../shixunHomework/Homeworddescription";
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
// import Homeworddescription from "../shixunHomework/Homeworddescription";
import DownloadMessage from '../../modals/DownloadMessage';
const TextArea = Input.TextArea
//GraduationTaskssetting.js
//作业问答页面
class Workquestionandanswer extends Component {
//unifiedsetting 统一设置
@ -327,8 +321,16 @@ class Workquestionandanswer extends Component {
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:false,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:false,
DownloadMessageval:500
})
}
}else {
window.open(url, '_blank');
@ -337,7 +339,12 @@ class Workquestionandanswer extends Component {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let {
@ -366,6 +373,12 @@ class Workquestionandanswer extends Component {
issCancel={() => this.hideshowmodel()}
updatas={() => this.isupdatas()}
/> : ""}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}

@ -0,0 +1,51 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Modal} from 'antd';
class DownloadMessage extends Component {
constructor(props) {
super(props);
this.state = {
funmodalsType:false,
istype:false
}
}
setDownload=()=>{
this.props.modalCancel();
window.open(`/users/${this.props.user.login}/private_messages`)
}
render() {
return(
<Modal
keyboard={false}
title="提示"
visible={this.props.modalsType===undefined?false:this.props.modalsType}
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
width="530px"
>
<div className="task-popup-content">
{this.props.value===500?<p>
<p className="task-popup-text-center font-16">因附件资料超过500M您可以通过检索分批下载</p>
<p className="task-popup-text-center font-16 mt5">或者通过微信或者QQ联系管理员辅助您打包下载</p>
</p>:this.props.value===100?
<p>
<p className="task-popup-text-center font-16">已超出文件导出的上限数量 <span className={"color-orange-tip"}>100</span> </p>
<p className="task-popup-text-center font-16 mt20">1.通过检索分批次下载</p>
<p className="task-popup-text-center font-16 mt5">2.联系管理员辅助下载</p>
</p>
:""}
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={this.props.modalCancel}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.setDownload}>立即联系</a>
</div>
</div>
</Modal>
)
}
}
export default DownloadMessage;
Loading…
Cancel
Save