From 7378d933ee7f3e3c5b86bb671deaaa7f66d5903d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 4 Jul 2019 22:33:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMsettings/TPMsettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index 949b0a949..e570264f7 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -1474,7 +1474,7 @@ export default class TPMsettings extends Component { this.testscripttip(0)}>
+ style={{top: '33px', right: '-6px',width: '322px',zIndex: '10',display: testscripttiptype===true?'block':"none"}}>

From 9b56db808c52fc9ae04bfbd9346275aa6b43bbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 4 Jul 2019 22:52:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/Listofworks.js | 15 +++++-- .../shixunHomework/Trainingjobsetting.js | 44 ++++++++++--------- .../shixunHomework/Workquestionandanswer.js | 44 ++++++++++--------- 3 files changed, 57 insertions(+), 46 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 7fea77b35..9ea5bc78a 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1349,11 +1349,13 @@ class Listofworks extends Component { axios.get(url).then((response) => { console.log("1350"); console.log(response); - if(response.data.status === 200){ - window.open("/api"+url, '_blank'); + if(response.data.status&&response.data.status===-1){ - }else{ + }else if(response.data.status&&response.data.status===-2){ + + }else{ + window.open("/api"+url, '_blank'); } }).catch((error) => { console.log(error) @@ -1374,7 +1376,12 @@ class Listofworks extends Component { axios.get(url).then((response) => { console.log("1374"); console.log(response); - if(response.data.status=== 200){ + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + + }else{ window.open("/api"+url, '_blank'); } diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index f67eca6ab..0afd9ff4d 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1608,21 +1608,20 @@ class Trainingjobsetting extends Component { }) } // 导出实习报告批量 - internshipreport = () => { + internshipreport = (url) => { console.log("internshipreport"); - var homeworkid = this.props.match.params.homeworkid; - let url = "/zip/shixun_report"; - axios.get((url),{ - params: { - homework_common_id: homeworkid, - } - },{responseType: 'blob'}).then((response) => { + // var homeworkid = this.props.match.params.homeworkid; + // let url = "/zip/shixun_report"; + axios.get(url).then((response) => { console.log("326"); console.log(response); - if(response.status === 200){ - window.open(url, '_blank'); - }else{ + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + }else{ + window.open("/api"+url, '_blank'); } }).catch((error) => { @@ -1631,19 +1630,22 @@ class Trainingjobsetting extends Component { } // 课堂学生成绩的导出下载 - Classstudentachievement = () => { + Classstudentachievement = (url) => { console.log("Classstudentachievement"); - const course_id = this.props.match.params.coursesId; - let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; - axios.get((url),{responseType: 'blob'}).then((response) => { - console.log("339"); + // const course_id = this.props.match.params.coursesId; + // let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; + axios.get(url).then((response) => { + console.log("1374"); console.log(response); - if(response.status === 200){ - window.open(url, '_blank'); + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + }else{ + window.open("/api"+url, '_blank'); } - }).catch((error) => { console.log(error) }); @@ -1789,9 +1791,9 @@ class Trainingjobsetting extends Component { {this.props.isAdmin() ?

  • 导出
  • : ""} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index ab650aae2..c582dfb32 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -319,21 +319,20 @@ class Workquestionandanswer extends Component { // 导出实习报告批量 - internshipreport = () => { + internshipreport = (url) => { console.log("internshipreport"); - var homeworkid = this.props.match.params.homeworkid; - let url = "/zip/shixun_report"; - axios.get((url),{ - params: { - homework_common_id: homeworkid, - } - },{responseType: 'blob'}).then((response) => { + // var homeworkid = this.props.match.params.homeworkid; + // let url = "/zip/shixun_report"; + axios.get(url).then((response) => { console.log("326"); console.log(response); - if(response.status === 200){ - window.open(url, '_blank'); - }else{ + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + }else{ + window.open("/api"+url, '_blank'); } }).catch((error) => { @@ -342,19 +341,22 @@ class Workquestionandanswer extends Component { } // 课堂学生成绩的导出下载 - Classstudentachievement = () => { + Classstudentachievement = (url) => { console.log("Classstudentachievement"); - const course_id = this.props.match.params.coursesId; - let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; - axios.get((url),{responseType: 'blob'}).then((response) => { - console.log("339"); + // const course_id = this.props.match.params.coursesId; + // let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx"; + axios.get(url).then((response) => { + console.log("1374"); console.log(response); - if(response.status === 200){ - window.open(url, '_blank'); + if(response.data.status&&response.data.status===-1){ + + + }else if(response.data.status&&response.data.status===-2){ + }else{ + window.open("/api"+url, '_blank'); } - }).catch((error) => { console.log(error) }); @@ -485,9 +487,9 @@ class Workquestionandanswer extends Component {
  • 导出
  • : ""}