Merge branch 'courseware' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

courseware
杨树林 5 years ago
commit e604fc6b93

@ -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";

@ -18,7 +18,7 @@ class Fileslistitem extends Component {
settingList = (bools) => {
let {discussMessage} = this.props
console.log(discussMessage);
this.setState({
discussMessageid: discussMessage.id
})
@ -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>

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import { Input, Checkbox, Table, Tooltip, Pagination,Spin } from "antd";
import { Input, Checkbox, Table, Tooltip, Pagination,Spin, Divider } from "antd";
import { WordsBtn,on, off, trigger ,getUrl} from 'educoder';
import axios from 'axios';
import Modals from '../../modals/Modals';
@ -17,6 +17,7 @@ import _ from 'lodash'
import './style.css';
import '../css/members.css';
import moment from 'moment';
import { tuple } from "antd/lib/_util/type";
class Fileslists extends Component{
constructor(props){
super(props);
@ -45,7 +46,11 @@ class Fileslists extends Component{
isSpin:false,
course_second_categories:[],
title: "",
link: ""
link: "",
//是否展开
istowshowid:'',
//新增参数判断几级目录
parent_category_id:'',
}
}
@ -141,10 +146,6 @@ class Fileslists extends Component{
}
}
}
updadatalist=(id)=>{
@ -163,7 +164,7 @@ class Fileslists extends Component{
let list = response.data.course_modules;
let course_second_categoriess;
list.map((item, key) => {
course_second_categoriess = item.course_second_categories?item.course_second_categories:[]
course_second_categoriess = item.children?item.children:[]
})
this.setState({
@ -181,8 +182,8 @@ class Fileslists extends Component{
}
updatafiled=()=>{
let{sort}=this.state;
console.log(5)
let{sort}=this.state;
if(this.props.match.params.main_id){
this.seactall(undefined,sort);
}else if(this.props.match.params.Id){
@ -216,12 +217,15 @@ class Fileslists extends Component{
})
newsort="desc"
}
console.log(1)
this.getfileslist(pagesize,page,tagname,searchValue,newsort,sorttype,coursesecondcategoryid);
}
getfileslist=(pagesize,page,tagname,searchValue,sort,sorttype,coursesecondcategoryid)=>{
this.updadatalist(0);
let url = "/files.json";
const courseid = this.props.match.params.coursesId;
let id=coursesecondcategoryid;
@ -248,7 +252,8 @@ class Fileslists extends Component{
unpublish_count:list.unpublish_count,
files:list.files,
filesId:list.id,
name:list.name,
name:list.name,
parent_category_id:list.parent_category_id,
course_is_public:result.data.data.course_is_public,
page:page
@ -453,15 +458,21 @@ class Fileslists extends Component{
}
addDir = () => {
let {filesId,course_modules}=this.state;
let {filesId,course_modules,coursesecondcategoryid}=this.state;
//调用获取资源接口 刷新数据
this.setState({
checkBoxValues:[]
})
})
if(parseInt(this.props.match.params.main_id)!=parseInt(this.props.coursesids)){
trigger('attachmentAddlog', parseInt( course_modules&&course_modules.course_modules[0].id))
trigger('attachmentAddlog', {id: parseInt( course_modules&&course_modules.course_modules[0].value),name:'资源',coursesecondcategoryid:coursesecondcategoryid})
}else{
trigger('attachmentAddlog', parseInt(filesId))
}
console.log(parseInt(filesId))
trigger('attachmentAddlog', {id:parseInt(filesId),name:'资源',coursesecondcategoryid:coursesecondcategoryid})
}
}
@ -554,7 +565,9 @@ class Fileslists extends Component{
PaginationTask=(page)=>{
let {search,order,selectpage,checkAllValue,checkBoxValues}=this.state;
let selectpagetype=selectpage===page?true:false
let selectpagetype=selectpage===page&&checkBoxValues.length===15?true:false
console.log(selectpagetype)
this.setState({
page:page,
checkAllValue:selectpagetype,
@ -658,6 +671,13 @@ class Fileslists extends Component{
})
}
//判断二级链接是否显示
istowshow(item){
this.setState({
istowshowid:item.value
})
}
moveTos=(id)=>{
let {checkBoxValues} = this.state;
@ -773,7 +793,9 @@ class Fileslists extends Component{
this.setState({
course_groupslist:id
})
}
}
render(){
let { searchValue,
checkBoxValues,
@ -940,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}
@ -948,7 +970,7 @@ class Fileslists extends Component{
firstRowRight={
<React.Fragment>
{/*{this.props.isAdmin()?parseInt(this.props.match.params.main_id)===parseInt(this.props.coursesids)?<WordsBtn style="blue" onClick={()=>this.addDir()} className={"mr30 font-16"}>新建目录</WordsBtn>:"":""}*/}
{this.props.isAdmin()?<WordsBtn style="blue" onClick={()=>this.addDir()} className={"mr30 font-16"}>新建目录</WordsBtn>:""}
{this.props.isAdmin()?this.state.parent_category_id===null||this.state.parent_category_id===undefined||this.state.parent_category_id===0?<WordsBtn style="blue" onClick={()=>this.addDir()} className={"mr30 font-16"}>新建目录</WordsBtn>:"":''}
{this.props.isAdmin()?parseInt(this.props.match.params.main_id)!=parseInt(this.props.coursesids)?<WordsBtn style="blue" onClick={()=>this.editDir(name)} className={"mr30 font-16"}>目录重命名</WordsBtn>:"":""}
{this.props.isAdmin()||this.props.isStudent() ? this.props.user&&this.props.user.main_site===true? <WordsBtn style="blue" className="mr30 font-16" onClick={()=>this.addResource()}>选用资源</WordsBtn>:"":""}
@ -998,31 +1020,54 @@ class Fileslists extends Component{
.courseSecond{
margin-left: 10px;
padding: 10px;
}
}
`}
</style>
<ul className="drop_down_menu" style={{"right":"0px","left":"unset","min-width":'150px'}}>
<ul className="drop_down_menu" style={{"right":"0px","left":"unset","min-width":'180px'}}>
{/* <p style={{marginLeft:15,color:"#000000",fontSize:20}}>资源</p> */}
{this.state.course_second_categories&&this.state.course_second_categories.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.course_modules.map((item,key)=>{
return(
filesId&&filesId===item.id?"":<li key={key} id={item.id} onClick={() => this.moveTos(0)} title={item.module_name}>{item.module_name}</li>
filesId&&filesId===item.value?"":<li key={key} id={item.value} onClick={() => this.moveTos(0)} title={item.title}>{item.title}</li>
)
})}
{ course_modules&&course_modules.course_modules.map( (item,key) => {
return item.course_second_categories&&item.course_second_categories.filter((item)=> {
return (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1)
return item.children&&item.children.filter((item)=> {
return (!this.state.dirSearchValue || item.title.indexOf(this.state.dirSearchValue) != -1)
}).map((itm,k)=>{
return(
filesId&&filesId===itm.id?"":<li key={k} id={itm.id} onClick={() => this.moveTos(itm.id )} title={itm.name}>{itm.name}</li>
<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 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>
)
})
:''}
</div>
)
})
})}
{this.state.course_second_categories&&this.state.course_second_categories.length===0?
{this.state.course_second_categories.length===0?
<div className={"courseSecond"}>暂无数据</div>:""}
{/*{course_modules&&course_modules.course_modules.map((item,key)=>{*/}
@ -1034,11 +1079,11 @@ class Fileslists extends Component{
{/*})*/}
{/*)*/}
{/*})}*/}
{this.props.isAdmin()?parseInt(this.props.match.params.main_id)===filesId&&filesId?
<p className="drop_down_btn">
{/* {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>

@ -0,0 +1,7 @@
.indexdiv {
background:#ffffff;
}
.indexdiv:hover {
background:#ccc;
}

@ -1,7 +1,7 @@
import React,{ Component } from "react";
import { Link } from "react-router-dom";
import axios from 'axios';
import {Checkbox,Modal,Input,Tooltip,notification,Popover} from 'antd';
import {Checkbox,Modal,Input,Tooltip,notification,Popover,Dropdown,Menu,TreeSelect} from 'antd';
import { DragDropContext,Draggable, Droppable} from 'react-beautiful-dnd';
import Modals from '../../modals/Modals';
import { on, off, trigger } from 'educoder';
@ -11,7 +11,8 @@ const CheckboxGroup = Checkbox.Group;
let navidtype=true;
const { SubMenu } = Menu;
const { TreeNode } = TreeSelect;
//a little function to help us with reordering the result
const reorder = (list, startIndex, endIndex) => {
@ -62,10 +63,27 @@ class Coursesleftnav extends Component{
antIcon:false,
chapterupdate:false,
successFunc:undefined
successFunc:undefined,
//用来判断 是不是资源点击进入的
Navmodalziyname:'',
treeData:undefined,
//默认为0主目录
parentid:0,
//判断3级目录是否显示三个点
sanshow:'',
sansandiantype:undefined,
//新增参数判断打开关闭 默认关闭
showPreson:false,
//获取资源id 判断是否选中的事资源来判控
treeDataid:'',
//默认值
treedefaultValue:'',
dropdownStyleshow:''
}
}
// updataleftNav=()=>{
//
// let id=this.props.match.params.coursesId;
@ -182,7 +200,7 @@ class Coursesleftnav extends Component{
this.Navmodalnames(e,5,"editSecondname", data.id, data.name);
}
attachmentAddlog=(e,data)=>{
this.Navmodalnames(e,1,"attachment",data);
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);
@ -208,7 +226,6 @@ class Coursesleftnav extends Component{
on('editcommon_homeworks',this.editcommon_homeworks)
let courstype=this.props.match.url;
courstype = courstype.split('/');
courstype=courstype[3];
@ -234,7 +251,6 @@ class Coursesleftnav extends Component{
newselectnavid:parseInt(category_id),
})
}else{
if(isNaN(category_id)){
this.setState({
positiontype:courstype,
@ -286,7 +302,36 @@ class Coursesleftnav extends Component{
}
}
}
}
//请求接口获取资源列表数据
getatahcment(){
let coursesId=this.props.match.params.coursesId;
let url="/courses/"+coursesId+"/attahcment_category_list.json";
axios.get(url, {params:{
no_child: true,
}
}).then((response) => {
if(response!=undefined){
if(response.data&&response.data) {
if (response.data.status != 401) {
let tr=response.data.course_modules;
this.setState({
treeData:tr
})
tr.map((iem,index)=>{
this.setState({
treeDataid:iem.value
})
})
}
}
}
})
}
setnavid=(e,key,id,type,url)=>{
// this.props.getleftNavid && this.props.getleftNavid(key,type);
@ -359,7 +404,8 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡
}
selectnavids=(e,key,id,type,urls,index)=>{
selectnavids=(e,key,id,type,urls,index,santype)=>{
this.setState({
selectnavid:true,
newselectnavid:id,
@ -384,7 +430,6 @@ class Coursesleftnav extends Component{
// console.log("twosandianshow");
// console.log(key);
// console.log(type);
this.setState({
toopvisibleindexs:key,
twosandiantype:key,
@ -394,6 +439,23 @@ class Coursesleftnav extends Component{
})
e.stopPropagation();//阻止冒泡
}
sansandianshow=(e,key,type,name)=>{
// console.log("twosandianshow");
// console.log(key);
this.setState({
toopvisibleindexs:key,
sansandiantype:key,
toopvisible:false,
sanshow:name,
toopvisibleindex:undefined,
twosandiantypes:type
})
e.stopPropagation();//阻止冒泡
}
twosandianshowys=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
@ -403,6 +465,17 @@ class Coursesleftnav extends Component{
})
e.stopPropagation();//阻止冒泡
}
sansandianshowys=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
// console.log(type);
this.setState({
toopvisibleindexs:key,
})
e.stopPropagation();//阻止冒泡
}
twosandianshowyss=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
@ -413,6 +486,16 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡
}
sansandianshowyss=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
// console.log(type);
this.setState({
toopvisibleindexs:undefined,
})
e.stopPropagation();//阻止冒泡
}
twosandianhide=(e,index,type)=>{
// console.log(index)
this.setState({
@ -426,6 +509,20 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡
}
sansandianhide=(e,index,type)=>{
// console.log(index)
this.setState({
toopvisibleindexs:undefined,
sansandiantype:undefined,
twosandiantypenum:undefined,
toopvisible:true,
sanshow:'',
toopvisibleindex:index,
twosandiantypes:type
})
e.stopPropagation();//阻止冒泡
}
twosandianhideys=(e,index,type)=>{
// console.log(index)
this.setState({
@ -442,6 +539,9 @@ class Coursesleftnav extends Component{
navid:undefined,
sandiantype:undefined,
twosandiantype:undefined,
sansandiantype:undefined,
})
let url="/course_modules/"+id+"/sticky_module.json"
@ -461,6 +561,7 @@ class Coursesleftnav extends Component{
navid:undefined,
sandiantype:undefined,
twosandiantype:undefined,
sansandiantype:undefined,
ModalsType:false
})
@ -481,6 +582,8 @@ class Coursesleftnav extends Component{
})
}
edithidden=(e,id)=>{
e.stopPropagation();//阻止冒泡
let {course_modules}=this.props;
@ -505,8 +608,9 @@ class Coursesleftnav extends Component{
}
Navmodalnames=(e,id,type,setnavid,name)=>{
Navmodalnames=(e,id,type,setnavid,name,towid,showPreson)=>{
e.stopPropagation();//阻止冒泡
this.getatahcment()
navidtype=false
if(id===1||id===2||id===6){
this.setState({
@ -515,7 +619,11 @@ class Coursesleftnav extends Component{
Navplaceholder:"请输入名称最大限制60个字符",
Navmodalnametype:true,
Navmodaltypename:id,
Navmodalziyname:name,
treedefaultValue:towid,
showPreson:showPreson,
setnavid:setnavid,
parentid:towid,
NavmodalValue:""
})
}else if(id===3||id===4||id===5||id===7){
@ -527,6 +635,10 @@ class Coursesleftnav extends Component{
Navmodalnametype:true,
Navmodaltypename:id,
setnavid:setnavid,
treedefaultValue:towid,
showPreson:showPreson,
Navmodalziyname:'',
parentid:towid,
NavmodalValue:name
})
@ -565,7 +677,9 @@ class Coursesleftnav extends Component{
saveNavmodapost=(url,value,positiontype,coursesId,type)=>{
console.log(positiontype)
axios.post(url,
{name:value}).then((result)=>{
{name:value,
parent_id:this.state.parentid
}).then((result)=>{
if(result!=undefined){
if(result.data.status===0){
@ -604,11 +718,9 @@ class Coursesleftnav extends Component{
}
if(positiontype==="files"||positiontype==="file"){
if(type===true){
this.updasaveNavmoda()
trigger('files')
}else{
this.updasaveNavmoda()
this.props.history.push(`/classrooms/${coursesId}/file/${result.data.category_id}`);
@ -798,7 +910,23 @@ class Coursesleftnav extends Component{
}
}
tronChange=(value)=>{
console.log(this.state.dropdownStyleshow)
this.setState({
parentid:this.state.treeDataid===value?0:value,
dropdownStyleshow:'none'
})
}
tronclick=()=>{
this.setState({
dropdownStyleshow:'inline-block'
})
}
droppablepost=(url,list)=>{
axios.post(url,{position: list}).then((result)=>{
@ -871,6 +999,7 @@ class Coursesleftnav extends Component{
}
hidesandian=(e,key)=>{
this.setState({
sandiantypes:undefined
@ -885,9 +1014,11 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡
}
showsandians=(e,key,urls,num,id,type,index)=> {
let {url}=this.state;
if (key === this.props.indexs) {
this.props.unlocationNavfun(undefined)
} else {
this.props.updataleftNavfun();
@ -923,7 +1054,7 @@ class Coursesleftnav extends Component{
{/*/!* 分组作业 *!/*/}
{item.type==="group_homework"?<div onClick={e=>this.Navmodalnames(e,1,"group_homeworks",item.id)}>新建目录</div>:""}
{/*资源*/}
{item.type==="attachment"?<div onClick={e=>this.Navmodalnames(e,1,"attachment",item.id)}>新建目录</div>:""}
{item.type==="attachment"?<div onClick={e=>this.Navmodalnames(e,1,"attachment",item.id,"资源")}>新建目录</div>:""}
{/* 视频 */}
{item.type==="video"?<div onClick={e=>this.Navmodalnames(e,1,"video",item.id)}>新建目录</div>:""}
{/*毕业设计*/}
@ -948,10 +1079,11 @@ class Coursesleftnav extends Component{
<div onClick={e=>this.editSetup(e,item.id)}>置顶</div>
</div>)
}
content=(item,iem,index)=>{
content=(item,iem,index,san)=>{
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,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>:""}
{/*分班*/}
@ -980,6 +1112,7 @@ class Coursesleftnav extends Component{
})
}
render(){
let {
twosandiantype,
Navmodalname,
@ -991,7 +1124,8 @@ class Coursesleftnav extends Component{
ModalSave,
loadtype,
twosandiantypes,
toopvisibleindexs
toopvisibleindexs,
sansandiantype
}=this.state;
let {course_modules,hidden_modules,is_teacher} =this.props;
@ -1003,6 +1137,9 @@ class Coursesleftnav extends Component{
// console.log("CoursesLeftNav");
// console.log(course_modules);
return(
<ul className="mb10 newedu-class-leftnav">
@ -1059,14 +1196,35 @@ class Coursesleftnav extends Component{
destroyOnClose={true}
centered={true}
>
<div className="df">
<div className={"fl mt5"}>{this.state.Navtitles}</div>
<div>
{this.state.Navmodalziyname==="资源"?<div className="df" style={{marginBottom:50}}>
<div className={"fl mt5"} >上级目录</div>
<TreeSelect
className={"input-flex-35 greyInput fl"}
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>:''}
<div className="df" >
<div className={"fl mt5"} >{this.state.Navtitles}</div>
<Input placeholder={this.state.Navplaceholder}
className={"input-flex-35 greyInput fl"}
maxLength="60"
value={NavmodalValue}
onInput={this.setNavmodalValue}
/>
</div>
</div>
<style>
{
@ -1077,6 +1235,7 @@ class Coursesleftnav extends Component{
`
}
</style>
{this.state.NavmodalValuetype===true?<span className={"ml70 color-red"}>
{this.state.NavmodalValues}
</span>:""}
@ -1182,7 +1341,7 @@ class Coursesleftnav extends Component{
>
{/*"/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,iem.category_id,item.type+"child",iem.second_category_url,key)} onMouseLeave={(e)=>this.twosandianhide(e,index,item.type)} onMouseEnter={(e)=>this.twosandianshow(e,index,item.type)}
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key,'san')} onMouseLeave={(e)=>this.twosandianhide(e,index,item.type)} onMouseEnter={(e)=>this.twosandianshow(e,index,item.type)}
key={index}
ref={provided.innerRef}
{...provided.draggableProps}
@ -1193,6 +1352,7 @@ class Coursesleftnav extends Component{
<span className={this.props.location.pathname===iem.second_category_url?"color-blue fl ml38 maxwidth170 task-hide Draggablelichild":"fl ml38 maxwidth170 task-hide Draggablelichild"} onMouseEnter={(e)=>this.twosandianshowys(e,index,item.type)}>{iem.category_name}</span>
<span className={twosandiantype===undefined?this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14":item.type===twosandiantypes&&twosandiantype===index&&iem.category_id!=0?"none":this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14"} >{iem.category_count===0?"":iem.category_count}</span>
{item.type===twosandiantypes&&twosandiantype===index?
iem.category_id===0?"":
iem.category_type==="graduation_topics"||iem.category_type==="graduation_tasks"?
@ -1224,6 +1384,53 @@ class Coursesleftnav extends Component{
</li>
</a>
{
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}
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
// 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?
<Popover placement="right" content={this.content(item,itt,index,'san')} trigger="hover" key={index} onMouseEnter={(e)=>this.sansandianshowyss(e)}>
<i className={"iconfont icon-sandian fr color999 mr15 Draggablelichild"}></i>
</Popover>
:
<Tooltip placement="right" key={index} title={itt.category_name} visible={toopvisibleindexs===undefined?false:toopvisibleindexs===index?true:false}>
<Popover placement="right" content={this.content(item,itt,index,'san')} trigger="hover" key={index} onMouseEnter={(e)=>this.sansandianshowyss(e)}>
<i className={"iconfont icon-sandian fr color999 mr15 Draggablelichild"}></i>
</Popover>
</Tooltip>
)
:""}
</a>
</li>
</a>
</div>
)
})
}
</Tooltip>
)}
</Draggable>
@ -1312,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 {*/

@ -109,7 +109,7 @@ class Videostatisticslist extends Component {
width: '100px',
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">
<script>
<script>
{
`
a{ 

Loading…
Cancel
Save