|
|
@ -13,7 +13,7 @@ import Modals from "../../modals/Modals";
|
|
|
|
import axios from 'axios'
|
|
|
|
import axios from 'axios'
|
|
|
|
import _ from 'lodash'
|
|
|
|
import _ from 'lodash'
|
|
|
|
import NoneData from "../coursesPublic/NoneData"
|
|
|
|
import NoneData from "../coursesPublic/NoneData"
|
|
|
|
|
|
|
|
import DownloadMessageysl from "../../modals/DownloadMessageysl";
|
|
|
|
import CreateGroupByImportModal from './modal/CreateGroupByImportModal'
|
|
|
|
import CreateGroupByImportModal from './modal/CreateGroupByImportModal'
|
|
|
|
|
|
|
|
|
|
|
|
const Search =Input.Search;
|
|
|
|
const Search =Input.Search;
|
|
|
@ -131,10 +131,49 @@ class studentsList extends Component{
|
|
|
|
modalsBottomval:"",
|
|
|
|
modalsBottomval:"",
|
|
|
|
modalCancel:"",
|
|
|
|
modalCancel:"",
|
|
|
|
n_And_e:1,
|
|
|
|
n_And_e:1,
|
|
|
|
isSpin:false
|
|
|
|
isSpin:false,
|
|
|
|
|
|
|
|
DownloadType:false,
|
|
|
|
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// 确认是否下载
|
|
|
|
|
|
|
|
confirmysl(url){
|
|
|
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
|
|
|
if(response === undefined){
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
|
|
|
this.props.showNotification(`正在下载中`);
|
|
|
|
|
|
|
|
window.open("/api"+url, '_blank');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Downloadcal=()=>{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
DownloadType:false,
|
|
|
|
|
|
|
|
DownloadMessageval:undefined
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inputStudent=(e)=>{
|
|
|
|
inputStudent=(e)=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -490,6 +529,12 @@ class studentsList extends Component{
|
|
|
|
exportUrl += paramsString;
|
|
|
|
exportUrl += paramsString;
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<React.Fragment >
|
|
|
|
<React.Fragment >
|
|
|
|
|
|
|
|
<DownloadMessageysl
|
|
|
|
|
|
|
|
{...this.props}
|
|
|
|
|
|
|
|
value={this.state.DownloadMessageval}
|
|
|
|
|
|
|
|
modalCancel={this.Downloadcal}
|
|
|
|
|
|
|
|
modalsType={this.state.DownloadType}
|
|
|
|
|
|
|
|
/>
|
|
|
|
<Titlesearchsection
|
|
|
|
<Titlesearchsection
|
|
|
|
title={isParent ? "学生列表" :
|
|
|
|
title={isParent ? "学生列表" :
|
|
|
|
<React.Fragment>
|
|
|
|
<React.Fragment>
|
|
|
@ -525,7 +570,7 @@ class studentsList extends Component{
|
|
|
|
{ isAdmin && isParent && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加分班</WordsBtn> }
|
|
|
|
{ isAdmin && isParent && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加分班</WordsBtn> }
|
|
|
|
{ isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.deleteDir()}>删除分班</WordsBtn> }
|
|
|
|
{ isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.deleteDir()}>删除分班</WordsBtn> }
|
|
|
|
{ isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> }
|
|
|
|
{ isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> }
|
|
|
|
{ isAdmin && <WordsBtn style="blue" className="" href={`${exportUrl}`}>导出成绩</WordsBtn> }
|
|
|
|
{ isAdmin && <WordsBtn style="blue" className="" onClick={()=>this.confirmysl(exportUrl)} >导出成绩</WordsBtn> }
|
|
|
|
{/* */}
|
|
|
|
{/* */}
|
|
|
|
</React.Fragment>
|
|
|
|
</React.Fragment>
|
|
|
|
}
|
|
|
|
}
|
|
|
|