From d8e63409472a68b02643d1bb4feb230e0d5c9417 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, 9 Oct 2019 17:18:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 33 ++++++++++++++----- public/react/src/modules/tpm/TPMIndexHOC.js | 12 ++++++- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 7532d03c9..2380df531 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -22,10 +22,10 @@ import './style.css'; import 'moment/locale/zh-cn'; import axios from 'axios'; import moment from 'moment'; -import '../css/members.css' -import '../css/busyWork.css' -import '../poll/pollStyle.css' -import './Challenges.css' +import '../css/members.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; +import './Challenges.css'; import {getImageUrl} from 'educoder'; import TraineetraininginformationModal from "./TraineetraininginformationModal"; import DownloadMessageysl from '../../modals/DownloadMessageysl'; @@ -33,7 +33,7 @@ import Startshixuntask from "../coursesPublic/Startshixuntask"; import ModulationModal from "../coursesPublic/ModulationModal"; import HomeworkModal from "../coursesPublic/HomeworkModal"; import ShixunWorkModal from "./Shixunworkdetails/ShixunWorkModal"; -import NoneData from '../../../modules/courses/coursesPublic/NoneData' +import NoneData from '../../../modules/courses/coursesPublic/NoneData'; const Search = Input.Search; const RadioGroup = Radio.Group; @@ -1587,6 +1587,12 @@ class Listofworksstudentone extends Component { if(this.props.isAdmin() === true){ if(result.data.update_score===true){ if(bool===true){ + + try { + this.props.yslslowCheckresults(); + }catch (e) { + + } this.setComputeTimet(); } } @@ -2202,6 +2208,11 @@ class Listofworksstudentone extends Component { // var homeworkid = this.props.match.params.homeworkid; this.Getalistofworks(homeworkid,false); // this.props.history.replace(matchurl); + try{ + this.props.yslslowCheckresultsNo(); + }catch (e) { + + } }, 2500); } } @@ -2961,9 +2972,9 @@ class Listofworksstudentone extends Component { // console.log("老师开始计算成绩了1111111"); let matchurl = this.props.match.url; - this.setState({ - computeTimetype:false - }) + // this.setState({ + // computeTimetype:false + // }) let homeworkid = this.props.match.params.homeworkid; let url = "/homework_commons/"+homeworkid+"/update_score.json"; @@ -2983,6 +2994,12 @@ class Listofworksstudentone extends Component { }catch (e) { } + try{ + this.props.yslslowCheckresultsNo(); + }catch (e) { + + } + }, 2500); } // this.props.history.replace( matchurl ); diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index d4142bd06..e0fa0bcca 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -516,7 +516,15 @@ export function TPMIndexHOC(WrappedComponent) { } }) } - showGlobalLoading = (tip) => { + yslslowCheckresults =(tip) =>{ + this._gLoadingTip = tip || '正在执行成绩计算,完成后将为您自动刷新结果。温馨提示:执行时间因作品数量而异'; + this.setState({ globalLoading: true }) + } + yslslowCheckresultsNo =() =>{ + this.setState({ globalLoading: false }) + } + + showGlobalLoading = (tip) => { this._gLoadingTip = tip || '加载中,请稍后...'; this.setState({ globalLoading: true }) } @@ -553,6 +561,8 @@ export function TPMIndexHOC(WrappedComponent) { slowDownload: this.slowDownload, showGlobalLoading: this.showGlobalLoading, hideGlobalLoading: this.hideGlobalLoading, + yslslowCheckresults:this.yslslowCheckresults, + yslslowCheckresultsNo:this.yslslowCheckresultsNo, } return (