|
|
|
@ -7,11 +7,12 @@ import Sendtofilesmodal from "../coursesPublic/SendToFilesModal";
|
|
|
|
|
import Selectresource from "../coursesPublic/SelectResource";
|
|
|
|
|
import Sendresource from "../coursesPublic/sendResource";
|
|
|
|
|
import Selectsetting from "../coursesPublic/SelectSetting";
|
|
|
|
|
import CourseLayoutcomponent from '../common/CourseLayoutComponent';
|
|
|
|
|
import HomeworkModal from "../coursesPublic/HomeworkModal";
|
|
|
|
|
import Fileslistitem from './Fileslistitem';
|
|
|
|
|
import Titlesearchsection from '../common/titleSearch/TitleSearchSection';
|
|
|
|
|
import './style.css';
|
|
|
|
|
import '../css/members.css';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
|
|
|
|
|
class Fileslists extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
@ -232,6 +233,8 @@ class Fileslists extends Component{
|
|
|
|
|
this.props.showNotification("请先在列表中选择要发送的资源");
|
|
|
|
|
}else if(value===3){
|
|
|
|
|
this.props.showNotification("请先在列表中选择要公开的资源");
|
|
|
|
|
}else if(value===4){
|
|
|
|
|
this.props.showNotification("请先在列表中选择要发布的资源");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -549,7 +552,78 @@ class Fileslists extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
homeworkstart=()=>{
|
|
|
|
|
let selectnum= this.testonSelect();
|
|
|
|
|
if(selectnum===true){
|
|
|
|
|
this.noSelect(4);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let starttime= this.props.getNowFormatDates(1);
|
|
|
|
|
let endtime=this.props.getNowFormatDates(2);
|
|
|
|
|
this.setState({
|
|
|
|
|
modalname:"立即发布",
|
|
|
|
|
visible:true,
|
|
|
|
|
typs:"start",
|
|
|
|
|
Topval:"学生将能立即查看和下载发布资源",
|
|
|
|
|
// Botvalleft:"暂不发布",
|
|
|
|
|
// Botval:`本操作只对"未发布"的分班有效`,
|
|
|
|
|
// starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
// starttimes:starttime,
|
|
|
|
|
// endtime:"截止时间:"+endtime,
|
|
|
|
|
Cancelname:"暂不发布",
|
|
|
|
|
Savesname:"立即发布",
|
|
|
|
|
Cancel:this.homeworkhide,
|
|
|
|
|
Saves:this.homeworkstartend,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 立即发布
|
|
|
|
|
homeworkstartend=(ds,endtime)=>{
|
|
|
|
|
let {checkBoxValues}=this.state;
|
|
|
|
|
let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
let url ="/files/bulk_publish.json";
|
|
|
|
|
axios.put(url, {
|
|
|
|
|
course_id:coursesId,
|
|
|
|
|
ids :checkBoxValues,
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result.status===200){
|
|
|
|
|
this.props.showNotification("发布成功")
|
|
|
|
|
this.setState({
|
|
|
|
|
checkBoxValues:[],
|
|
|
|
|
checkAllValue:false
|
|
|
|
|
})
|
|
|
|
|
this.homeworkhide()
|
|
|
|
|
this.props.updataleftNavfun()
|
|
|
|
|
this.updatafiled()
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
homeworkhide=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
modalname:undefined,
|
|
|
|
|
modaltype:undefined,
|
|
|
|
|
visible:false,
|
|
|
|
|
Topval:undefined,
|
|
|
|
|
Topvalright:undefined,
|
|
|
|
|
Botvalleft:undefined,
|
|
|
|
|
Botval:undefined,
|
|
|
|
|
starttime:undefined,
|
|
|
|
|
endtime:undefined,
|
|
|
|
|
Cancelname:undefined,
|
|
|
|
|
Savesname:undefined,
|
|
|
|
|
Cancel:undefined,
|
|
|
|
|
Saves:undefined,
|
|
|
|
|
StudentList_value:undefined,
|
|
|
|
|
addname:undefined,
|
|
|
|
|
addnametype:false,
|
|
|
|
|
addnametab:undefined,
|
|
|
|
|
typs:undefined,
|
|
|
|
|
starttimes:undefined,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render(){
|
|
|
|
|
|
|
|
|
|
let { searchValue,
|
|
|
|
@ -582,6 +656,26 @@ class Fileslists extends Component{
|
|
|
|
|
return(
|
|
|
|
|
<React.Fragment >
|
|
|
|
|
|
|
|
|
|
{/*立即发布*/}
|
|
|
|
|
{this.state.visible===true?<HomeworkModal
|
|
|
|
|
category_id={this.props.match.params.category_id}
|
|
|
|
|
modaltype={this.state.modaltype}
|
|
|
|
|
modalname={this.state.modalname}
|
|
|
|
|
visible={this.state.visible}
|
|
|
|
|
Topval={this.state.Topval}
|
|
|
|
|
Topvalright={this.state.Topvalright}
|
|
|
|
|
Botvalleft={this.state.Botvalleft}
|
|
|
|
|
Botval={this.state.Botval}
|
|
|
|
|
starttime={this.state.starttime}
|
|
|
|
|
starttimes={this.state.starttimes}
|
|
|
|
|
typs={this.state.typs}
|
|
|
|
|
endtime={this.state.endtime}
|
|
|
|
|
Cancelname={this.state.Cancelname}
|
|
|
|
|
Savesname={this.state.Savesname}
|
|
|
|
|
Cancel={this.state.Cancel}
|
|
|
|
|
Saves={this.state.Saves}
|
|
|
|
|
course_groups={this.state.course_groups}
|
|
|
|
|
/>:""}
|
|
|
|
|
|
|
|
|
|
{/*发送*/}
|
|
|
|
|
<Sendtofilesmodal
|
|
|
|
@ -687,9 +781,9 @@ class Fileslists extends Component{
|
|
|
|
|
<div className="studentList_operation_ul">
|
|
|
|
|
{this.props.isAdmin()?<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onDelete}>删除</a></li>:""}
|
|
|
|
|
{this.props.isAdmin()?<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onSend}>发送</a></li>:""}
|
|
|
|
|
{/*{this.props.isAdmin()?*/}
|
|
|
|
|
{/*<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.homeworkstart}>立即发布</a></li>*/}
|
|
|
|
|
{/*:""}*/}
|
|
|
|
|
{this.props.isAdmin()?
|
|
|
|
|
<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.homeworkstart}>立即发布</a></li>
|
|
|
|
|
:""}
|
|
|
|
|
{this.props.isAdmin()?course_is_public===true?
|
|
|
|
|
<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onOpen}>设为公开</a></li>
|
|
|
|
|
:"":""}
|
|
|
|
|