diff --git a/public/react/src/modules/courses/gradinforms/Eduinforms.js b/public/react/src/modules/courses/gradinforms/Eduinforms.js index 81c810d5e..ad8f7c4e8 100644 --- a/public/react/src/modules/courses/gradinforms/Eduinforms.js +++ b/public/react/src/modules/courses/gradinforms/Eduinforms.js @@ -398,7 +398,7 @@ class Eduinforms extends Component{ <div> { informs === null || informs=== undefined ||informs.length === 0 ? - this.state.yslbool===true? + this.state.yslbool===false? <div className="alltask "> <div className="edu-tab-con-box clearfix edu-txt-center"><img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")} /> diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 092b038f3..b5d50abb9 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -1,8 +1,9 @@ import React, {Component} from "react"; -import {WordsBtn,markdownToHTML} from 'educoder'; +import {WordsBtn,markdownToHTML,ActionBtn,queryString,downloadFile} from 'educoder'; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Spin} from "antd"; import {Link,Switch,Route,Redirect} from 'react-router-dom'; import axios from 'axios'; + import ConclusionEvaluation from './shixunreport/ConclusionEvaluation'; import OfficialAcademicTranscript from './shixunreport/OfficialAcademicTranscript'; import Coursesshixundetails from './shixunreport/Coursesshixundetails'; @@ -28,13 +29,25 @@ class ShixunWorkReport extends Component { spinning:true, DownloadType:false, DownloadMessageval:undefined, + isspinning:false } } -/// 确认是否下载 - confirmysl(url){ - axios.get(url).then((response) => { + /// 确认是否下载 + confirmysl(url,child){ + this.setState({ isspinning: true }) + let params ={} + if(child!=undefined){ + params =child._getRequestParams()!==undefined?child._getRequestParams():{}; + } + console.log("170"); + console.log(params); + const urll=url+`?${queryString.stringify(params)}`; + axios.get(urll+ '&export=true').then((response) => { + if(response===undefined){ + return + } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){ @@ -54,16 +67,13 @@ class ShixunWorkReport extends Component { } }else { this.props.showNotification(`正在下载中`); - window.open("/api"+url, '_blank'); + window.open("/api"+url+'?export=true', '_blank'); + this.setState({ isspinning: false }) } }).catch((error) => { console.log(error) }); } - //打开pdf - confpdf = (url) =>{ - window.open(url); - } Downloadcal=()=>{ this.setState({ DownloadType:false, @@ -162,10 +172,9 @@ class ShixunWorkReport extends Component { {/*{this.props.isAdmin()?<a className=" fr font-14 ml30 mt10 mr20 color-grey-9 ">导出实训报告数据</a>:""}*/} <a onClick={this.goback} className="color-grey-6 fr font-16 ml30 mt15 mr20">返回</a> {this.props.isAdmin() ? <a - className=" color-blue font-16 fr ml30 mt15 mr20" - // onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)} - onClick={()=>this.confpdf(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)} - >导出实训报告数据</a> : ""} + className=" color-blue font-16 fr ml30 mt15" + onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)} + > <Spin size="small" spinning={this.state.isspinning}>导出实训报告数据</Spin></a> : ""} </div> <div className="stud-class-set"> diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js index eaf78b328..fd00aa699 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js +++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js @@ -40,6 +40,8 @@ class OfficialAcademicTranscript extends Component { }).catch((error)=>{ }) + }else{ + this.props.showNotification("调分为空将不会修改之前的分数"); } }