|
|
|
@ -74,9 +74,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
sanshow:'',
|
|
|
|
|
sansandiantype:undefined,
|
|
|
|
|
//新增参数判断打开关闭 默认关闭
|
|
|
|
|
showPreson:true,
|
|
|
|
|
//判断二级还是三级目录点击
|
|
|
|
|
sanclick:'issan',
|
|
|
|
|
showPreson:false,
|
|
|
|
|
//获取资源id 判断是否选中的事资源来判控
|
|
|
|
|
treeDataid:'',
|
|
|
|
|
//默认值
|
|
|
|
@ -201,8 +199,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
this.Navmodalnames(e,5,"editSecondname", data.id, data.name);
|
|
|
|
|
}
|
|
|
|
|
attachmentAddlog=(e,data)=>{
|
|
|
|
|
console.log(data.id,data.name)
|
|
|
|
|
this.Navmodalnames(e,1,"attachment",data.id,data.name);
|
|
|
|
|
this.Navmodalnames(e,1,"attachment",data.id,data.name,data.coursesecondcategoryid,data.coursesecondcategoryid===undefined?false:true);
|
|
|
|
|
}
|
|
|
|
|
flieseditDir=(e, data)=>{
|
|
|
|
|
this.Navmodalnames(e,4,"editSecondname",data.id,data.name);
|
|
|
|
@ -407,13 +404,11 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
selectnavids=(e,key,id,type,urls,index,santype)=>{
|
|
|
|
|
const doesShow = this.state.showPreson;
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
selectnavid:true,
|
|
|
|
|
newselectnavid:id,
|
|
|
|
|
url:urls,
|
|
|
|
|
showPreson:santype==='san'?!doesShow:'',
|
|
|
|
|
indexs:index
|
|
|
|
|
})
|
|
|
|
|
this.props.updataleftNavfun();
|
|
|
|
@ -612,7 +607,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Navmodalnames=(e,id,type,setnavid,name,towid)=>{
|
|
|
|
|
Navmodalnames=(e,id,type,setnavid,name,towid,showPreson)=>{
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
this.getatahcment()
|
|
|
|
|
navidtype=false
|
|
|
|
@ -625,6 +620,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
Navmodaltypename:id,
|
|
|
|
|
Navmodalziyname:name,
|
|
|
|
|
treedefaultValue:towid,
|
|
|
|
|
showPreson:showPreson,
|
|
|
|
|
setnavid:setnavid,
|
|
|
|
|
parentid:towid,
|
|
|
|
|
NavmodalValue:""
|
|
|
|
@ -639,6 +635,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
Navmodaltypename:id,
|
|
|
|
|
setnavid:setnavid,
|
|
|
|
|
treedefaultValue:towid,
|
|
|
|
|
showPreson:showPreson,
|
|
|
|
|
Navmodalziyname:name,
|
|
|
|
|
parentid:towid,
|
|
|
|
|
NavmodalValue:name
|
|
|
|
@ -723,7 +720,6 @@ class Coursesleftnav extends Component{
|
|
|
|
|
if(type===true){
|
|
|
|
|
this.updasaveNavmoda()
|
|
|
|
|
trigger('files')
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.updasaveNavmoda()
|
|
|
|
|
this.props.history.push(`/classrooms/${coursesId}/file/${result.data.category_id}`);
|
|
|
|
@ -1078,7 +1074,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
let {twosandiantypes,twosandiantypenum}=this.state;
|
|
|
|
|
return (item.type==="graduation"?"": <div className={item.type===twosandiantypes&&twosandiantypenum===index?"sandianboxs":"sandianboxs"} >
|
|
|
|
|
{/*作业/资源*/}
|
|
|
|
|
{item.type==="attachment"&&san!=='san'?<div onClick={e=>this.Navmodalnames(e,1,"attachment",item.id,"资源",iem.category_id)}>新建目录</div>:""}
|
|
|
|
|
{item.type==="attachment"&&san!=='san'?<div onClick={e=>this.Navmodalnames(e,1,"attachment",item.id,"资源",iem.category_id,true)}>新建目录</div>:""}
|
|
|
|
|
{item.type==="shixun_homework"||item.type==="attachment"||item.type==="graduation"||item.type==="common_homework"||item.type==="group_homework"?<div onClick={e=>this.Navmodalnames(e,4,"editSecondname",iem.category_id,iem.category_name)}>重命名</div>:""}
|
|
|
|
|
{item.type==="shixun_homework"||item.type==="attachment"||item.type==="common_homework"||item.type==="group_homework"?<div onClick={e=>this.deleteSecondary(e,1,iem.category_id)}>删除</div>:""}
|
|
|
|
|
{/*分班*/}
|
|
|
|
@ -1201,6 +1197,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
dropdownStyle={{ maxHeight: 400 ,width:300,overflow: 'auto' }}
|
|
|
|
|
treeData={this.state.treeData}
|
|
|
|
|
placeholder="资源"
|
|
|
|
|
disabled={this.state.showPreson}
|
|
|
|
|
defaultValue={this.state.treedefaultValue}
|
|
|
|
|
treeDefaultExpandAll
|
|
|
|
|
onChange={this.tronChange}
|
|
|
|
@ -1376,16 +1373,16 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
{
|
|
|
|
|
this.props.location.pathname!==iem.second_category_url?"":iem.third_category.map((itt,index)=>{
|
|
|
|
|
iem.third_category===undefined?"":iem.third_category.map((itt,index)=>{
|
|
|
|
|
if(itt.category_type!=="attachment"){
|
|
|
|
|
return
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<div onClick={this.getatahcment}>
|
|
|
|
|
<div onClick={this.getatahcment} style={{display:this.state.newselectnavid===undefined?'none':itt.parent_id===this.state.newselectnavid?'block':'none'}}>
|
|
|
|
|
{/*"/classrooms/"+this.props.match.params.coursesId+"/"+item.type+"/"+iem.category_type+"/"+iem.category_id*/}
|
|
|
|
|
<a className={"Draggablelichild"} key={index}>
|
|
|
|
|
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,itt.category_id,item.type+"child",itt.second_category_url,key)} onMouseLeave={(e)=>this.sansandianhide(e,index,item.type)} onMouseEnter={(e)=>this.sansandianshow(e,index,item.type,itt.category_name)}
|
|
|
|
|
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,itt.parent_id,item.type+"child",itt.second_category_url,key)} onMouseLeave={(e)=>this.sansandianhide(e,index,item.type)} onMouseEnter={(e)=>this.sansandianshow(e,index,item.type,itt.category_name)}
|
|
|
|
|
key={index}
|
|
|
|
|
ref={provided.innerRef}
|
|
|
|
|
{...provided.draggableProps}
|
|
|
|
@ -1393,7 +1390,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
// title={iem.category_name.length<10?"":iem.category_name}
|
|
|
|
|
>
|
|
|
|
|
<a className="fl pl46 pd0 Draggablelichild">
|
|
|
|
|
<span style={{marginLeft:20}} className={this.props.location.pathname===itt.second_category_url?"color-blue fl ml38 maxwidth170 task-hide Draggablelichild":"fl ml38 maxwidth170 task-hide Draggablelichild"} onMouseEnter={(e)=>this.sansandianshowys(e,index,item.type)}>{itt.category_name}</span>
|
|
|
|
|
<span style={{marginLeft:20}} className={this.props.location.pathname===itt.second_category_url?"color-blue fl ml38 maxwidth170 task-hide Draggablelichild":"fl ml38 maxwidth170 task-hide Draggablelichild"} onMouseEnter={(e)=>this.sansandianshowys(e,index,item.type)}>{itt.category_name}</span>
|
|
|
|
|
|
|
|
|
|
<span className={sansandiantype===undefined?this.props.location.pathname===itt.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14":item.type===twosandiantypes&&sansandiantype===index&&itt.category_id!=0?"none":this.props.location.pathname===itt.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14"} >{itt.category_count===0?"":itt.category_count}</span>
|
|
|
|
|
|
|
|
|
@ -1416,7 +1413,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|