Merge branch 'dev_aliyun' into dev_hjm_a

dev_hjm_a
hjm 5 years ago
commit a9cbde65c9

@ -293,7 +293,7 @@ class Fileslistitem extends Component{
<span className="mr15 color-dark">{discussMessage.author.name}</span>
<span className="mr15 color-grey9">大小 {discussMessage.filesize}</span>
<span className="mr15 color-grey9">下载 {discussMessage.downloads_count}</span>
<span className="mr15 color-grey9">引用 {discussMessage.quotes}</span>
{/*<span className="mr15 color-grey9">引用 {discussMessage.quotes}</span>*/}
<span className="mr15 color-grey-c">
{/*{moment(discussMessage.publish_time).format('YYYY-MM-DD HH:mm:ss')}*/}
{/*{moment(discussMessage.publish_time).fromNow()}*/}

@ -51,8 +51,14 @@ class Fileslists extends Component{
})
if(this.props.match.params.main_id){
this.seactall();
this.setState({
child:false,
})
}else if(this.props.match.params.Id){
this.seactall(parseInt(this.props.match.params.Id),1)
this.setState({
child:true,
})
}
this.updadatalist();
on('updateNavSuccess', this.updateNavSuccess)
@ -74,9 +80,12 @@ class Fileslists extends Component{
this.setState({
isSpin:true,
checkBoxValues:[],
checkAllValue:false
checkAllValue:false,
})
if(this.props.match.params.main_id!=undefined){
this.setState({
child:false,
})
this.seactall();
}
}
@ -84,31 +93,15 @@ class Fileslists extends Component{
this.setState({
isSpin:true,
checkBoxValues:[],
checkAllValue:false
checkAllValue:false,
})
if(this.props.match.params.Id!=undefined){
this.setState({
child:true,
})
this.seactall(parseInt(this.props.match.params.Id),1)
}
}
// if ( prevProps.match.params.Id != this.props.match.params.Id ||prevProps.isaloadtype!= this.props.isaloadtype) {
// let lists=this.props.course_modules;
// if(lists!=undefined){
// debugger
// let url=this.props.location.pathname;
// lists.forEach((item,index)=>{
// if(url===item.category_url){
// this.seactall();
// }
// if(item.second_category!=undefined&&item.second_category.length!=0){
// item.second_category.forEach((iem,key)=>{
// if(url===iem.second_category_url){
// this.seactall(parseInt(this.props.match.params.Id),2);
// }
// })
// }
// })
// }
// }
}
updadatalist=(id)=>{
@ -399,11 +392,16 @@ class Fileslists extends Component{
}
addDir = () => {
let {filesId}=this.state;
let {filesId,course_modules}=this.state;
this.setState({
checkBoxValues:[]
})
trigger('attachmentAddlog', parseInt(filesId))
if(parseInt(this.props.match.params.main_id)!=parseInt(this.props.coursesids)){
trigger('attachmentAddlog', parseInt( course_modules&&course_modules.course_modules[0].id))
}else{
trigger('attachmentAddlog', parseInt(filesId))
}
}
editDir = (name) => {
@ -677,11 +675,13 @@ class Fileslists extends Component{
course_modules,
shixunmodal,
course_is_public,
filesId
filesId,
child
} = this.state;
let category_id= this.props.match.params.category_id;
return(
<React.Fragment >
@ -779,13 +779,14 @@ class Fileslists extends Component{
/>:""}
<Titlesearchsection
title={name}
title={child===false?"全部资源":name}
searchValue={ searchValue }
// searchtype={this.props.isAdmin||this.props.isStudent ?true:false}
onInputSearchChange={this.onInputSearchChange}
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()?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()?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() ? <WordsBtn style="blue" className="mr30 font-16" onClick={()=>this.addResource()}>选用资源</WordsBtn>:""}
@ -869,7 +870,7 @@ class Fileslists extends Component{
{/*})}*/}
{this.props.isAdmin()?parseInt(this.props.match.params.main_id)===filesId&&filesId?
<p className="drop_down_btn">
<a className="color-grey-6" onClick={()=>this.addDir()}>添加目录</a>
<a className="color-grey-6" onClick={()=>this.addDir()}>新建目录</a>
</p>
:"":""}
</ul>
@ -885,7 +886,7 @@ class Fileslists extends Component{
{/*className={sorttype === 'created_on'?"none":""} className={sorttype === 'quotes'?"none":""} className={sorttype === 'downloads'?"none":""} */}
<li style={{width:'130px'}} onClick={() => this.onSortTypeChange('created_on')}>更新时间排序</li>
<li style={{width:'130px'}} onClick={() => this.onSortTypeChange('downloads')}>下载次数排序</li>
<li style={{width:'130px'}} onClick={() => this.onSortTypeChange('quotes')}>引用次数排序</li>
{/*<li style={{width:'130px'}} onClick={() => this.onSortTypeChange('quotes')}>引用次数排序</li>*/}
</ul>
</li>:""}
</div>

@ -291,7 +291,7 @@ class BoardsNew extends Component{
return(
<div className="newMain ">
<AddDirModal {...this.props}
title="添加目录"
title="新建目录"
label="目录名称"
ref="addDirModal"
addSuccess={this.addSuccess}
@ -385,7 +385,7 @@ class BoardsNew extends Component{
<React.Fragment>
<Divider style={{ margin: '4px 0' }} />
<div style={{ padding: '8px', cursor: 'pointer' }} onMouseDown={() => this.refs['addDirModal'].open()}>
<Icon type="plus" /> 添加目录
<Icon type="plus" /> 新建目录
</div>
</React.Fragment>
}

@ -349,7 +349,7 @@ class Boards extends Component{
searchPlaceholder={ '请输入帖子名称进行搜索' }
firstRowRight={
<React.Fragment>
{ !isCourseEnd && isAdmin && !parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加目录</WordsBtn> }
{ !isCourseEnd && isAdmin && !parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>新建目录</WordsBtn> }
{ isAdmin && !!parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>目录重命名</WordsBtn> }
{ !isCourseEnd && isAdminOrStudent && <WordsBtn style="blue" className="" onClick={()=>this.onToBoardsNew()}>我要发贴</WordsBtn> }
</React.Fragment>
@ -393,7 +393,7 @@ class Boards extends Component{
<p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6"
onClick={()=>this.addDir()}
>添加目录...</a>
>新建目录...</a>
</p>
}
{/* <p className="drop_down_btn"><a href="javascript:void(0)" className="color-grey-6">添加分班...</a></p> */}

@ -401,7 +401,7 @@ class Coursesleftnav extends Component{
axios.get(url).then((result)=>{
navidtype=true
this.props.updataleftNavfun();
console.log(this.props)
// console.log(this.props)
let list=this.props.course_modules;
for(var i=0; i<list.length;i++){
if(list[i].id!=id){
@ -442,7 +442,7 @@ class Coursesleftnav extends Component{
navidtype=false
if(id===1||id===2||id===6){
this.setState({
Navmodalname:id===2?"新建分班":"添加目录",
Navmodalname:id===2?"新建分班":"新建目录",
Navtitles:id===2?"分班名称":"目录名称",
Navplaceholder:"请输入名称最大限制60个字符",
Navmodalnametype:true,
@ -781,15 +781,15 @@ class Coursesleftnav extends Component{
return ( <div className={"sandianbox"}>
{/*公告栏*/}
{/*作业*/}
{item.type==="shixun_homework"?<div onClick={e=>this.Navmodalnames(e,1,"shixun_homework",item.id)}>添加目录</div>:""}
{item.type==="shixun_homework"?<div onClick={e=>this.Navmodalnames(e,1,"shixun_homework",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==="graduation"?<div onClick={()=>this.Navmodalnames(1,"attachment",item.id)}>添加目录</div>:""}*/}
{/*讨论区*/}
{item.type==="board"?this.props.current_user&&this.props.current_user.course_is_end===true?"":<div onClick={e=>this.Navmodalnames(e,6,"board",item.main_id)}>添加目录</div>:""}
{item.type==="board"?this.props.current_user&&this.props.current_user.course_is_end===true?"":<div onClick={e=>this.Navmodalnames(e,6,"board",item.main_id)}>新建目录</div>:""}
{/*分班*/}
{item.type==="course_group"?this.props.current_user&&this.props.current_user.course_is_end===true?"":<div onClick={e=>this.Navmodalnames(e,2,"course_group",item.id)}>添加分班</div>:""}
{item.type==="course_group"?this.props.current_user&&this.props.current_user.course_is_end===true?"":<div onClick={e=>this.Navmodalnames(e,2,"course_group",item.id)}>新建分班</div>:""}
{/*分班*/}
{/*{item.type==="course_group"? :""}*/}
<div onClick={e=>this.Navmodalnames(e,3,"editname",item.id,item.name)}>重命名</div>

@ -75,7 +75,7 @@ class Poll extends Component{
selectBlank=(type)=>{
if(type===2){
this.setState({
addname:"添加目录",
addname:"新建目录",
addnametype:true,
addnametab:type,
addcanner:this.homeworkhide,

@ -74,7 +74,7 @@ class ListNav extends Component{
<p className="clearfix padding30 bor-bottom-greyE">
<span className="font-18 fl">资源列表</span>
<li className="fr">
<a href="javascript:void(0)" className="color-blue mr30">添加目录</a>
<a href="javascript:void(0)" className="color-blue mr30">新建目录</a>
<a href="javascript:void(0)" className="color-blue mr30">导入资源</a>
<a href="javascript:void(0)" className="color-blue">上传资源</a>
</li>

@ -304,8 +304,8 @@ class ShixunhomeWorkItem extends Component{
<div className="clearfix ds pr pt5 contentSection" >
<style>{`
.maxwidth580{
max-width: 580px;
.maxwidth422{
max-width: 422px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap
@ -317,21 +317,21 @@ class ShixunhomeWorkItem extends Component{
{
this.props.isAdmin?<a onClick={()=>this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
className="fl mt3 font-16 font-bd color-dark maxwidth422">{discussMessage.name}</a>:""
}
{
this.props.isStudent? <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
className="fl mt3 font-16 font-bd color-dark maxwidth422">{discussMessage.name}</a>:""
}
{
this.props.isNotMember===true? this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer" title={"私有属性,非课堂成员不能访问"}>{discussMessage.name}</span>
<span className="fl mt3 font-16 font-bd color-dark maxwidth422 pointer" title={"私有属性,非课堂成员不能访问"}>{discussMessage.name}</span>
: <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
className="fl mt3 font-16 font-bd color-dark maxwidth422">{discussMessage.name}</a>:""
}
@ -346,12 +346,45 @@ class ShixunhomeWorkItem extends Component{
<CoursesListType typelist={discussMessage.status} typesylename={""} />
<style>
{
`
.homepagePostSettingname{
width:192px !important;
}
.homepagePostSettingbox{
width:139px !important;
}
`
}
</style>
{this.props.isAdmin?<span onClick={(event)=>this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"6px","display":"block"}}>
<Link className="btn colorblue font-16" to={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</Link>
{this.props.isAdminOrCreator()?<a onClick={(event)=>this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
{/*<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>*/}
<WordsBtn className="btn colorblue font-16 ml15" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>
</span>:""}
{this.props.isStudent===true?this.props.course_identity===5?
<WordsBtn style="blue" className="colorblue font-16 mr20 fr mt10">
{startbtn===false?
(discussMessage.task_operation[0] == '继续挑战' || discussMessage.task_operation[0] == '查看实战' ?
<a className="btn colorblue" href={getTaskUrlById(discussMessage.task_operation[1])}>
{discussMessage.task_operation[0]}
</a>
:
<a className="btn colorblue" onClick={()=>this.taskoperationId(discussMessage.task_operation[1])}>
{discussMessage.task_operation[0]}
</a>):<a className="btn colorblue" ></a>}
</WordsBtn>:"":""
}
</h6>
<div className="cl"></div>
<p className="color-grey mt16 fl">
<span className="mr50 df">
<p className="color-grey mt16 fl" style={{"width":"820px"}}>
<span >
{/* <a href="/users/innov" className="panel-name-small hide fl mr15 mr30 color-grey3">{discussMessage.author.name}</a> */}
{ discussMessage.author && <span className="mr15 color-grey-3">{discussMessage.author}</span> }
{discussMessage.commit_count===undefined?"":<span className="mr15 color-grey9">已开始做题 {discussMessage.commit_count}</span>}
@ -381,7 +414,7 @@ class ShixunhomeWorkItem extends Component{
{
discussMessage && discussMessage.upper_category_name &&
<ConditionToolTip title={discussMessage.upper_category_name} condition={ discussMessage.upper_category_name.length > 22 }>
{ <span className="mr15 color-grey9 task-hide" style={discussMessage.time_status===1||discussMessage.time_status===2||discussMessage.time_status===3||discussMessage.time_status===4||discussMessage.time_status===5||discussMessage.time_status===6?{"maxWidth":"85px"}:{"maxWidth":"272px"}} title={discussMessage.upper_category_name}>{discussMessage.upper_category_name}</span>}
{ <div className=" color-grey9 task-hide fr" style={discussMessage.time_status===1||discussMessage.time_status===2||discussMessage.time_status===3||discussMessage.time_status===4||discussMessage.time_status===5||discussMessage.time_status===6?{"maxWidth":"268px"}:{"maxWidth":"625px"}} title={discussMessage.upper_category_name}>所属目录{discussMessage.upper_category_name}</div>}
</ConditionToolTip>
}
@ -396,39 +429,6 @@ class ShixunhomeWorkItem extends Component{
</p>
<style>
{
`
.homepagePostSettingname{
width:192px !important;
}
.homepagePostSettingbox{
width:139px !important;
}
`
}
</style>
{this.props.isAdmin?<div onClick={(event)=>this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"46px","display":"block"}}>
<Link className="btn colorblue font-16" to={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</Link>
{this.props.isAdminOrCreator()?<a onClick={(event)=>this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
{/*<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>*/}
<WordsBtn className="btn colorblue font-16 ml15" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>
</div>:""}
{this.props.isStudent===true?this.props.course_identity===5?
<WordsBtn style="blue" className="colorblue font-16 mr20 fr mt10">
{startbtn===false?
(discussMessage.task_operation[0] == '继续挑战' || discussMessage.task_operation[0] == '查看实战' ?
<a className="btn colorblue" href={getTaskUrlById(discussMessage.task_operation[1])}>
{discussMessage.task_operation[0]}
</a>
:
<a className="btn colorblue" onClick={()=>this.taskoperationId(discussMessage.task_operation[1])}>
{discussMessage.task_operation[0]}
</a>):<a className="btn colorblue" ></a>}
</WordsBtn>:"":""
}
</div>

@ -1152,7 +1152,7 @@ class ShixunHomework extends Component{
{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.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>:""}
@ -1252,7 +1252,7 @@ class ShixunHomework extends Component{
{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>
<a className="color-grey-6" onClick={()=>this.addDir()}>新建目录...</a>
</p>
:"":""}

@ -541,7 +541,7 @@ class LoginDialog extends Component {
if (isRender === undefined) {
isRender = false
}
console.log(this.props)
// console.log(this.props)
return (
<Dialog open={true} id="DialogID"
style={{ display: isRender==false? 'none' : ''}}

@ -267,10 +267,12 @@ class Otherlogin extends Component {
className={this.state.logintypes==="username"?"bor-red mb20 wechatpass":" mb20 wechatpass"}
></Input>
<Input value={this.state.password}
<Input.Password value={this.state.password}
autoComplete="new-password"
onInput={this.passwordonChange}
className={this.state.logintypes==="password"?"bor-red wechatpass":" wechatpass"}
placeholder="请输入密码"></Input>
placeholder="请输入密码"
></Input.Password>
</Content>
{this.state.logintypes==="username"?<span className={"color-red ml50"}>请填写账号</span>:this.state.logintypes==="password"?<span className={"color-red ml50"}></span>:""}
<Footer>

@ -248,16 +248,10 @@ class DetailTop extends Component{
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
this.setState({
@ -272,16 +266,10 @@ class DetailTop extends Component{
this.props.showLoginDialog()
return
}
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({
// AccountProfiletype:true
// })
// return
// }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
this.setState({
Modalstype:true,

Loading…
Cancel
Save