From 1a8f581489982ab9ed4dcd462b1df2a89e5e005c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 17 Jul 2019 09:13:47 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Testpapersettinghomepage.js | 92 ++++---- .../courses/shixunHomework/Listofworks.js | 2 + .../shixunHomework/ShixunHomeworkPage.js | 207 +++--------------- 3 files changed, 73 insertions(+), 228 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index 81d5a6a27..398a45228 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -110,34 +110,34 @@ class Testpapersettinghomepage extends Component{ groupyslsval:list }) } - experiment=(url)=>{ - - axios.get(url).then((response) => { - console.log(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 { - window.open("/api"+url, '_blank'); - } - }).catch((error) => { - console.log(error) - }); - - } + // experiment=(url)=>{ + // + // axios.get(url).then((response) => { + // console.log(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 { + // window.open("/api"+url, '_blank'); + // } + // }).catch((error) => { + // console.log(error) + // }); + // + // } setgameexercise=(url)=>{ @@ -169,18 +169,18 @@ class Testpapersettinghomepage extends Component{ Loadtype:false }) } - DownloadType=()=>{ - this.setState({ - DownloadType:false, - DownloadMessageval:undefined - }) - } - Downloadcal=()=>{ - this.setState({ - DownloadType:false, - DownloadMessageval:undefined - }) - } + // DownloadType=()=>{ + // this.setState({ + // DownloadType:false, + // DownloadMessageval:undefined + // }) + // } + // Downloadcal=()=>{ + // this.setState({ + // DownloadType:false, + // DownloadMessageval:undefined + // }) + // } render(){ let {tab,visible,Commonheadofthetestpaper}=this.state; const isAdmin =this.props.isAdmin(); @@ -188,12 +188,12 @@ class Testpapersettinghomepage extends Component{ return(