资源修改

courseware
dinglink 5 years ago
parent d45fa00476
commit ef2c9cb96f

@ -42,11 +42,11 @@ if (isDev) {
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
// 超管
debugType="admin";
//debugType="admin";
// 老师
// debugType="teacher";
// 学生
// debugType="student";
debugType="student";

@ -429,7 +429,7 @@ class Fileslistitem extends Component {
</span>
{discussMessage && discussMessage.category_name === null ? "" : this.props.child === false ?
<div className="color-grey9 task-hide fr mr30" title={discussMessage && discussMessage.category_name}
style={{"max-width": "268px"}}>所属目录{discussMessage && discussMessage.category_name}
style={{display:'flex',"max-width": "268px"}}>所属目录<div style={{display:discussMessage && discussMessage.parent_category_name === null ? "none":'block',"max-width": "80px",overflow: 'hidden',textOverflow:'ellipsis',whiteSpace: 'nowrap'}}>{discussMessage && discussMessage. parent_category_name}</div><div style={{display:discussMessage && discussMessage.parent_category_name === null ? "none":'block'}}>/</div><div style={{"max-width": "60px",overflow: 'hidden',textOverflow:'ellipsis',whiteSpace: 'nowrap'}}>{discussMessage && discussMessage.category_name}</div>
</div> : ""}
</p>

@ -962,7 +962,7 @@ class Fileslists extends Component{
}
</style>}
<Titlesearchsection
title={child===false?"全部资源":name}
title={name}
searchValue={ searchValue }
// searchtype={this.props.isAdmin||this.props.isStudent ?true:false}
onInputSearchChange={this.onInputSearchChange}
@ -1039,22 +1039,27 @@ class Fileslists extends Component{
{ course_modules&&course_modules.course_modules.map( (item,key) => {
return item.children&&item.children.filter((item)=> {
return (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1)
return (!this.state.dirSearchValue || item.title.indexOf(this.state.dirSearchValue) != -1)
}).map((itm,k)=>{
return(
<div className="bordboom">
<div className="bordboom" style={{display:'flex',marginTop:15,height:30}}>
<div >
<div style={{display:'flex',marginTop:10,height:20}}>
<div onClick={() => this.moveTos(itm.value )} style={{marginLeft:15,width:itm.title.length>13?200:undefined,color:'#000000',overflow: 'hidden',textOverflow:'ellipsis',whiteSpace: 'nowrap'}}>{itm.title}</div>
{itm.children.length===0?'':<i style={{marginLeft:15,marginRight:15}} onClick={() => this.istowshow(itm,filesId)} className="iconfont icon-xiajiantou font-12 ml2"></i>}
</div>
{ this.state.istowshowid===itm.value?
itm.children.map((tt,ti) => {
return(
filesId&&filesId===itm.id?"":
<div style={{marginTop:10,height:20}}>
<div style={{display:itm.children.length===1?'none':ti===0?'block':'none',marginLeft:15,width:250,height:1,background:'#c4c4c4'}}></div>
<Tooltip placement="right"title={tt.title.length>13?tt.title:''} >
<div style={{marginLeft:30,width:tt.title.length>13?200:undefined,color:'#000000',overflow: 'hidden',textOverflow:'ellipsis',whiteSpace: 'nowrap'}} key={ti} id={tt.value} onClick={() => this.moveTos(tt.value )} title={tt.name}>{tt.title}</div>
<div className="indexdiv" style={{marginTop:5,marginBottom:5,marginLeft:30,width:tt.title.length>13?200:undefined,overflow: 'hidden',textOverflow:'ellipsis',whiteSpace: 'nowrap'}} key={ti} id={tt.value} onClick={() => this.moveTos(tt.value )} title={tt.name}>{tt.title}</div>
</Tooltip>
<div style={{display:itm.children.length===1?'none':ti===itm.children.length-1?'block':'none',marginLeft:15,width:250,height:1,background:'#c4c4c4'}}></div>
</div>
)
})
:''}
@ -1074,11 +1079,11 @@ class Fileslists extends Component{
{/*})*/}
{/*)*/}
{/*})}*/}
{this.props.isAdmin()?parseInt(this.props.match.params.main_id)===filesId&&filesId?
{/* {this.props.isAdmin()?parseInt(this.props.match.params.main_id)===filesId&&filesId?
<p style={{marginLeft:15}}>
<a className="color-grey-6" onClick={()=>this.addDir()}>新建目录</a>
</p>
:"":""}
:"":""} */}
</ul>

@ -1,5 +1,7 @@
.bordboom{
width: 100%;
border-bottom: 1 solid red;
.indexdiv {
background:#ffffff;
}
.indexdiv:hover {
background:#ccc;
}

@ -78,7 +78,8 @@ class Coursesleftnav extends Component{
//获取资源id 判断是否选中的事资源来判控
treeDataid:'',
//默认值
treedefaultValue:''
treedefaultValue:'',
dropdownStyleshow:''
}
}
@ -911,10 +912,18 @@ class Coursesleftnav extends Component{
}
tronChange=(value)=>{
console.log(this.state.dropdownStyleshow)
this.setState({
parentid:this.state.treeDataid===value?0:value
parentid:this.state.treeDataid===value?0:value,
dropdownStyleshow:'none'
})
}
tronclick=()=>{
this.setState({
dropdownStyleshow:'inline-block'
})
}
@ -1193,15 +1202,17 @@ class Coursesleftnav extends Component{
<TreeSelect
className={"input-flex-35 greyInput fl"}
style={{width:200,color:'#000000'}}
dropdownStyle={{ maxHeight: 400 ,width:600,overflow: 'auto',color:'#000000'}}
style={{width:300,color:'#000000'}}
dropdownClassName={{display:this.state.dropdownStyleshow}}
// dropdownMenuStyle={{display:this.state.dropdownStyleshow}}
treeData={this.state.treeData}
placeholder="资源(根目录)"
disabled={this.state.showPreson}
defaultValue={this.state.treedefaultValue}
treeDefaultExpandAll
onChange={this.tronChange}
onClick={this.tronclick}
/>
</div>:''}
@ -1508,10 +1519,53 @@ class Coursesleftnav extends Component{
<span className={twosandiantype===undefined?this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue font-14":"fr mr20 color999 font-14":twosandiantype===index&&item.type!="graduation"?"none":this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue font-14":"fr mr20 color999 font-14"}>{iem.category_count===0?"":iem.category_count}</span>
</a>
</Tooltip>
}
</li>
{
iem.third_category===undefined?"":iem.third_category.map((itt,index)=>{
if(itt.category_type!=="attachment"){
return
}
return(
<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.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}
// title={iem.category_name.length<10?"":iem.category_name}
>
<a className="fl pl46 pd0 Draggablelichild">
<span style={{marginLeft:15}} className={this.props.location.pathname===itt.second_category_url?"color-blue fl ml38 maxwidth155 task-hide Draggablelichild":"fl ml38 maxwidth155 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>
{iem.category_type===twosandiantypes&&sansandiantype===index?
itt.category_name!==this.state.sanshow?"":
(
itt.category_name&&itt.category_name.length<13?
''
:
<Tooltip placement="right" key={index} title={itt.category_name} visible={toopvisibleindexs===undefined?false:toopvisibleindexs===index?true:false}>
</Tooltip>
)
:""}
</a>
</li>
</a>
</div>
)
})
}
</a>
)
})
}

@ -29,6 +29,19 @@
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
.ant-select-tree-title{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
display:inline-block;
max-width:200px;
}
.ant-select-tree-title{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
max-width:200px;
}
/*鼠标悬浮在滚动条上的主干部分*/
/*.droppableul::-webkit-scrollbar-track:hover {*/

Loading…
Cancel
Save