|
|
|
@ -4,8 +4,6 @@ import { WordsBtn,on, off, trigger } from 'educoder';
|
|
|
|
|
import '../css/members.css';
|
|
|
|
|
import '../css/busyWork.css'
|
|
|
|
|
|
|
|
|
|
const Search = Input.Search;
|
|
|
|
|
|
|
|
|
|
class Eduinforms extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
|
super(props);
|
|
|
|
@ -15,8 +13,18 @@ class Eduinforms extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
console.log("获取到数据");
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
// let url = "/courses/:id/informs.json";
|
|
|
|
|
//
|
|
|
|
|
// axios.get(url).then((response) => {
|
|
|
|
|
// if(response){
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// }).catch((error) => {
|
|
|
|
|
// console.log(error)
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
on('updateNavSuccess', this.updateNavSuccess)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -37,134 +45,19 @@ class Eduinforms extends Component{
|
|
|
|
|
<div className="edu-back-white">
|
|
|
|
|
<p className="clearfix padding30 bor-bottom-greyE">
|
|
|
|
|
<p style={{height: '20px'}}>
|
|
|
|
|
<span className="font-18 fl color-dark-21">{datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"}</span>
|
|
|
|
|
<li className="fr">
|
|
|
|
|
{this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?
|
|
|
|
|
<span>
|
|
|
|
|
<WordsBtn style="blue" onClick={()=>this.addDir()} className={"mr30 font-16"}>添加目录</WordsBtn>
|
|
|
|
|
{/*<WordsBtn style="blue" onClick={()=>this.editname(datas&&datas.main_category_name)} className={"mr30"}>目录重命名</WordsBtn>*/}
|
|
|
|
|
</span>:
|
|
|
|
|
<WordsBtn style="blue" onClick={()=>this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名</WordsBtn>:""}
|
|
|
|
|
{this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?<WordsBtn style="blue" className="mr30 font-16" onClick={this.createCommonpath}>选用实践课程</WordsBtn>:"":""}
|
|
|
|
|
{this.props.isAdmin()===true?<a className={"btn colorblue font-16"} onClick={()=>this.createCommonWork()}>选用实训</a>:""}
|
|
|
|
|
<span className="font-18 fl color-dark-21">公告栏</span>
|
|
|
|
|
<li class="btn colorblue font-16 fr">
|
|
|
|
|
编辑
|
|
|
|
|
</li>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
<div className="clearfix pl30 pr30">
|
|
|
|
|
<p style={{marginTop:'10px'}}>
|
|
|
|
|
<div style={{"display":"inline-block", "marginTop": "22px"}}>
|
|
|
|
|
<span>共 {datas&&datas.all_count}个实训作业</span>
|
|
|
|
|
<span style={{"marginLeft":"16px"}}>已发布:{datas&&datas.published_count}个</span>
|
|
|
|
|
<span style={{"marginLeft":"16px"}}>未发布: {datas&&datas.unpublished_count}个</span>
|
|
|
|
|
</div>
|
|
|
|
|
</p>
|
|
|
|
|
<div className="fl mt6 task_menu_ul">
|
|
|
|
|
<Menu mode="horizontal" defaultSelectedKeys="null" onClick={this.handleClick}>
|
|
|
|
|
<Menu.Item key="null">全部</Menu.Item>
|
|
|
|
|
{this.props.isAdmin()?<Menu.Item key="0">未发布</Menu.Item>:""}
|
|
|
|
|
<Menu.Item key="1">提交中</Menu.Item>
|
|
|
|
|
<Menu.Item key="2">补交中</Menu.Item>
|
|
|
|
|
<Menu.Item key="5">评阅中</Menu.Item>
|
|
|
|
|
</Menu>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="fr mt16 mb16 searchView">
|
|
|
|
|
<Search
|
|
|
|
|
value={Coursename}
|
|
|
|
|
placeholder="请输入名称进行搜索"
|
|
|
|
|
onInput={this.SearchCoursenames}
|
|
|
|
|
onSearch={value => this.SearchCoursename(value)}
|
|
|
|
|
></Search>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<Spin size="large" spinning={this.state.isSpin}>
|
|
|
|
|
{this.props.isAdmin()===true?<div className="mt20 edu-back-white padding20-30">
|
|
|
|
|
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<Checkbox className="fl" style={{marginTop:'0px'}}checked={checkedtype} onClick={this.funselect}>已选 {checkBoxValues&&checkBoxValues.length} 个</Checkbox>
|
|
|
|
|
<div className="studentList_operation_ul">
|
|
|
|
|
<li className="li_line"><a className="color-grey-9" onClick={this.onDelete}>删除</a></li>
|
|
|
|
|
<li className="li_line"><a className="color-grey-9" onClick={this.homeworkstart}>立即发布</a></li>
|
|
|
|
|
{/*onClick={this.homeworkstart}*/}
|
|
|
|
|
<li className="li_line"><a className="color-grey-9" onClick={this.homeworkends}>立即截止</a></li>
|
|
|
|
|
<li className="li_line" style={{display:datas===undefined?"none":datas.course_public===true?"block":"none"}}>
|
|
|
|
|
<a className="color-grey-9" onClick={this.onOpen}>设为公开</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li className="li_line drop_down" onMouseEnter={this.updadatalist}>
|
|
|
|
|
{/*onClick={()=>this.selectBlank(4)}*/}
|
|
|
|
|
移动到...<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
<ul className="drop_down_menu" style={{"right":"0px","left":"unset", maxHeight: '318px', overflowY: 'auto', minWidth: '200px'}}>
|
|
|
|
|
{ course_modules&&course_modules.homework_category.length > 10 && <p className="drop_down_search">
|
|
|
|
|
<Input placeholder="搜索" value={this.state.dirSearchValue} onChange={(e) => {this.setState({dirSearchValue: e.target.value})}}/>
|
|
|
|
|
</p> }
|
|
|
|
|
|
|
|
|
|
{course_modules&&course_modules.main_category.map((item,key)=>{
|
|
|
|
|
return(
|
|
|
|
|
datas&&datas.category_id===null?"":<li key={key} id={item.main_category_id} onClick={() => this.moveTos(item.main_category_id)}>{item.main_category_name}</li>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ course_modules&&course_modules.homework_category.filter((item,key)=> {
|
|
|
|
|
return (!this.state.dirSearchValue || item.category_name.indexOf(this.state.dirSearchValue) != -1)
|
|
|
|
|
}).map( (item,key) => {
|
|
|
|
|
if(datas&&datas.category_id!=null&&datas&&datas.category_id===item.category_id===false){
|
|
|
|
|
return <li key={key} id={item.category_id} onClick={() => this.moveTos(item.category_id )}>{item.category_name}</li>
|
|
|
|
|
}
|
|
|
|
|
if(datas&&datas.category_id===null){
|
|
|
|
|
return <li key={key} id={item.category_id} onClick={() => this.moveTos(item.category_id )}>{item.category_name}</li>
|
|
|
|
|
}
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
{`
|
|
|
|
|
.courseSecond{
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
}
|
|
|
|
|
`}
|
|
|
|
|
</style>
|
|
|
|
|
{course_modules&&course_modules.homework_category.length===0&&datas&&datas.category_id===null?
|
|
|
|
|
<div className={"courseSecond"}>暂无数据</div>:""}
|
|
|
|
|
|
|
|
|
|
{/*{course_modules&&course_modules.homework_category.map((item,key)=>{*/}
|
|
|
|
|
{/*return(*/}
|
|
|
|
|
{/*<li key={key} id={item.category_id} onClick={() => this.moveTos(item.category_id )}>{item.category_name}</li>*/}
|
|
|
|
|
{/*)*/}
|
|
|
|
|
{/*})}*/}
|
|
|
|
|
|
|
|
|
|
{this.props.isAdmin()?datas&&datas.category_name===undefined||datas&&datas.category_name===null?
|
|
|
|
|
<p className="drop_down_btn">
|
|
|
|
|
<a className="color-grey-6" onClick={()=>this.addDir()}>添加目录...</a>
|
|
|
|
|
</p>
|
|
|
|
|
:"":""}
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{/*<Spin size="large" spinning={this.state.isSpin}>*/}
|
|
|
|
|
|
|
|
|
|
</div>:""}
|
|
|
|
|
<style>{`
|
|
|
|
|
.padding02010{
|
|
|
|
|
padding: 10px 30px 0px 30px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
.ant-checkbox-group > div .boardsList {
|
|
|
|
|
border-top: 1px solid transparent;
|
|
|
|
|
padding: 10px 0px 20px!important;
|
|
|
|
|
}
|
|
|
|
|
.padding02010:hover{
|
|
|
|
|
box-shadow: 0px 2px 6px rgba(51,51,51,0.09);
|
|
|
|
|
opacity: 1;
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
}
|
|
|
|
|
`}</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Spin>
|
|
|
|
|
{/*</Spin>*/}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</React.Fragment>
|
|
|
|
|