个人主页

dev_forum
caishi 6 years ago
parent f79d1a8ad1
commit 86a20e8680

@ -67,25 +67,35 @@ class GraduateTopicDetail extends Component{
let course_id=this.props.match.params.course_id; let course_id=this.props.match.params.course_id;
let {tableData}=this.state; let {tableData}=this.state;
let url="/courses/"+course_id+"/graduation_topics/"+graduation_topic_id+"/" this.props.confirm({
if(tableData.user_selected_topic){ content: tableData.user_selected_topic==0?`是否确认取消选题?`:"是否确认选题?",
url+="student_cancel_topic.json" onOk: () => {
}else{ let url="/courses/"+course_id+"/graduation_topics/"+graduation_topic_id+"/"
url+="student_select_topic.json" if(tableData.user_selected_topic==0){
} url+="student_cancel_topic.json"
axios.post((url)).then((result)=>{ }else if(tableData.user_selected_topic==null || tableData.user_selected_topic==2){
console.log(result); url+="student_select_topic.json"
if(result.data.status == 0){ }
this.getDetailList(); axios.post((url)).then((result)=>{
this.props.showNotification(`${result.data.message}`); console.log(result);
if(result.data.status == 0){
this.getDetailList();
this.props.showNotification(`${result.data.message}`);
}
}).catch((error)=>{
console.log(error);
})
} }
}).catch((error)=>{
console.log(error);
}) })
} }
render(){ render(){
let {tableData,tablePage,tablePageSize,tab}=this.state let {
tableData,
tablePage,
tablePageSize,
tab,
}=this.state
let {course_id,graduation_topic_id}=this.props.match.params; let {course_id,graduation_topic_id}=this.props.match.params;
const isStudent =this.props.isStudent(); const isStudent =this.props.isStudent();
const isAdmin =this.props.isAdmin(); const isAdmin =this.props.isAdmin();
@ -113,8 +123,14 @@ class GraduateTopicDetail extends Component{
<Menu.Item key="2">课题详情</Menu.Item> <Menu.Item key="2">课题详情</Menu.Item>
</Menu> </Menu>
</div> </div>
{/* null: 未选题 0待确认 1已同意 2已拒绝 */}
{
isStudent && tableData.user_selected == false && (tableData.user_selected_topic==null || tableData.user_selected_topic==2) &&
<WordsBtn className="fr font-16 mt22 mr30" style="blue" onClick={this.actionTopic}>选题</WordsBtn>
}
{ {
isStudent && <WordsBtn className="fr font-16 mt22 mr30" style="blue" onClick={this.actionTopic}>{tableData.user_selected_topic ? "取消选题":"选题"}</WordsBtn> isStudent && tableData.user_selected == true && tableData.user_selected_topic==0 &&
<WordsBtn className="fr font-16 mt22 mr30" style="blue" onClick={this.actionTopic}>取消选题</WordsBtn>
} }
{ {
isAdmin && <WordsBtn className="fr font-16 mt22 mr30" to={`/courses/${course_id}/graduation_topics/${graduation_topic_id}/edit`} style="blue">编辑</WordsBtn> isAdmin && <WordsBtn className="fr font-16 mt22 mr30" to={`/courses/${course_id}/graduation_topics/${graduation_topic_id}/edit`} style="blue">编辑</WordsBtn>

@ -57,12 +57,17 @@ class GraduateTopicDetailTable extends Component{
return( return(
<div> <div>
<style>{`
.editormd-html-preview{
width:100%!important;
}
`}</style>
<div className="edu-back-white mb20 padding30"> <div className="edu-back-white mb20 padding30">
<div className="bor-bottom-greyE pb30"> <div className="bor-bottom-greyE pb30">
<div id="gratuationTopic_Detail" className="new_li markdown-body justify"> <div id="gratuationTopic_Detail" className="new_li markdown-body justify">
{ {
topicInfo && topicInfo.description!="" && topicInfo && topicInfo.description!="" &&
<span className="markdown-body fl" dangerouslySetInnerHTML={{__html: markdownToHTML(topicInfo.description)}}></span> <span className="markdown-body" dangerouslySetInnerHTML={{__html: markdownToHTML(topicInfo.description)}}></span>
} }
</div> </div>
{ {

@ -254,7 +254,7 @@ class GraduateTopicDetailTable extends Component{
tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{ tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{
return( return(
<li className="color-grey-9 clearfix" key={key}> <li className="color-grey-9 clearfix" key={key}>
<span style={{"width":"5%"}} className="color-grey-6">{parseInt(key)*parseInt(page*15)+1}</span> <span style={{"width":"5%"}} className="color-grey-6">{parseInt(key+1)+(parseInt(page-1)*15)}</span>
<span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span> <span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span>
<span style={{"width":"13%"}}>{item.student_id}</span> <span style={{"width":"13%"}}>{item.student_id}</span>
<span style={{"width":"15%"}}>{item.class_group_name || "--"}</span> <span style={{"width":"15%"}}>{item.class_group_name || "--"}</span>

@ -96,26 +96,26 @@ class GraduateTopicItem extends Component{
<div className="cl"></div> <div className="cl"></div>
<p className="color-grey mt20 clearfix"> <p className="color-grey mt20 clearfix">
<span className="fl mr40"> <span className="fl mr40 mt1">
<Tooltip title="指导老师" placement="bottom"> <Tooltip title="指导老师" placement="bottom">
<span className="color-grey3">{discussMessage.author}</span> <span className="color-grey3">{discussMessage.author}</span>
</Tooltip> </Tooltip>
</span> </span>
<span className="mr20 color-grey-9">{discussMessage.selected_count} 已选</span> <span className="fl mr20 color-grey-9 mt1">{discussMessage.selected_count} 已选</span>
<span className="color-grey-9">{discussMessage.confirmation_count} 已确认</span> <span className="fl color-grey-9 mt1">{discussMessage.confirmation_count} 已确认</span>
<span className="fr"> <span className="fr">
{ {
isAdmin && <WordsBtn onClick={()=>this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16">编辑</WordsBtn> isAdmin && <WordsBtn onClick={()=>this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16">编辑</WordsBtn>
} }
{ {
isStudent && data.user_selected == true && discussMessage.user_selected==true && isStudent && data.user_selected == true && discussMessage.user_topic_status==0 &&
<WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,discussMessage.user_selected)} style="blue" className="font-16"> <WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,true)} style="blue" className="font-16">
取消选题 取消选题
</WordsBtn> </WordsBtn>
} }
{ {
isStudent && data.user_selected == false && discussMessage.user_selected == false && isStudent && data.user_selected==false && (discussMessage.user_topic_status == null || discussMessage.user_topic_status == 2) &&
<WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,discussMessage.user_selected)} style="blue" className="font-16"> <WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,false)} style="blue" className="font-16">
选题 选题
</WordsBtn> </WordsBtn>
} }

@ -87,7 +87,7 @@ class GraduateTopicNew extends Component{
let topicId=this.props.match.params.topicId let topicId=this.props.match.params.topicId
let url=`/courses/${cid}/graduation_topics/${topicId}/edit.json`; let url=`/courses/${cid}/graduation_topics/${topicId}/edit.json`;
axios.get((url)).then((result)=>{ axios.get((url)).then((result)=>{
if(result.status==200){ if(result){
this.setState({ this.setState({
left_banner_id:result.data.left_banner_id, left_banner_id:result.data.left_banner_id,
course_name:result.data.course_name, course_name:result.data.course_name,
@ -315,6 +315,11 @@ class GraduateTopicNew extends Component{
console.log(this.props); console.log(this.props);
return( return(
<div className="newMain "> <div className="newMain ">
<style>{`
.courseForm .ant-form-item-label{
margin-left:unset!important
}
`}</style>
<div className="edu-class-container edu-position courseForm"> <div className="edu-class-container edu-position courseForm">
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<WordsBtn style="grey" className="fl" to={`/courses/${coursesId}`}>{course_name}</WordsBtn> <WordsBtn style="grey" className="fl" to={`/courses/${coursesId}`}>{course_name}</WordsBtn>
@ -385,6 +390,31 @@ class GraduateTopicNew extends Component{
margin-top:0px!important; margin-top:0px!important;
} }
.ant-form-item-children{
position:unset
}
.rememberTip{
position:absolute;
right:0px;
bottom:-10px;
}
.chooseDes .ant-form-explain{
position:absolute;
bottom:-10px;
left:0px;
}
.setUploadStyle .uploadBtn{
height:20px;
line-height:20px;
}
.setUploadStyle .ant-form-item-control{
margin-top:15px!important;
line-height:22px!important;
}
.setUploadStyle .ant-upload-list{
margin-top:5px;
}
`}</style> `}</style>
<div className="createPage"> <div className="createPage">
@ -392,7 +422,7 @@ class GraduateTopicNew extends Component{
<Form.Item <Form.Item
label="选题简介" label="选题简介"
style={{"borderBottom":'none'}} style={{"borderBottom":'none'}}
className="chooseDes" className="chooseDes pr"
> >
{getFieldDecorator('description', { {getFieldDecorator('description', {
rules: [{ rules: [{
@ -405,7 +435,9 @@ class GraduateTopicNew extends Component{
mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor> mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor>
)} )}
</Form.Item> </Form.Item>
<Form.Item> <Form.Item
className="setUploadStyle"
>
{ {
getFieldDecorator('file',{ getFieldDecorator('file',{
rules:[{ rules:[{
@ -508,6 +540,9 @@ class GraduateTopicNew extends Component{
.flexBlock .ant-row.ant-form-item { .flexBlock .ant-row.ant-form-item {
margin-bottom: 6px; margin-bottom: 6px;
} }
.ant-cascader-menu{
min-width:125px!important;
}
`}</style> `}</style>
@ -546,7 +581,7 @@ class GraduateTopicNew extends Component{
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="调研或实习地点" label="调研或实习地点"
className="mt15 with22" className="mt15 with22 setAreaStyle"
> >
{getFieldDecorator('city', { {getFieldDecorator('city', {
rules: [{ rules: [{

@ -223,7 +223,23 @@ onDelete=(index)=>{
}) })
}else{ }else{
// 加入题库 // 加入题库
let courseid=this.props.match.params.coursesId
let url=`/courses/${courseid}/graduation_topics/add_to_bank.json`;
axios.post((url),{
topic_ids:checkBoxValues
}).then((result)=>{
if(result){
this.props.showNotification(`题库更新成功`);
let {searchValue,page,status} =this.state
this.fetchAll(searchValue,page,status);
this.setState({
checkBoxValues:[],
checkAllValue:false
})
}
}).catch((error)=>{
console.log(error)
})
} }
}else{ }else{

@ -187,7 +187,7 @@ class PollDetailTabFirst extends Component{
key: 'classes', key: 'classes',
dataIndex: 'classes', dataIndex: 'classes',
width:160, width:160,
className:course_groups && course_groups.length > 0?"edu-txt-center":"edu-txt-center none" className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none"
}, { }, {
title: '提交状态', title: '提交状态',
dataIndex: 'status', dataIndex: 'status',

@ -49,23 +49,23 @@ class PollListItem extends Component{
<p className="color-grey-9 clearfix"> <p className="color-grey-9 clearfix">
{ {
item.polls_status !=1 && item.polls_status !=1 &&
<span className="fl mt2"> <span className="fl mt3">
<span className="mr20">{item.poll_answer} 已答</span> <span className="mr20">{item.poll_answer} 已答</span>
<span className="mr20">{item.poll_unanswer} 未答</span> <span className="mr20">{item.poll_unanswer} 未答</span>
</span> </span>
} }
{ {
item.polls_status ==1 && item.publish_time ==null && item.created_at && item.polls_status ==1 && item.publish_time ==null && item.created_at &&
<span className="mr20 fl mt2">创建于{moment(item.created_at).format(dataformat)}</span> <span className="mr20 fl mt3">创建于{moment(item.created_at).format(dataformat)}</span>
} }
{ {
item.polls_status ==1 && item.publish_time !=null && item.polls_status ==1 && item.publish_time !=null &&
<span className="mr20 fl mt2">将发布于{moment(item.publish_time).format(dataformat)}</span> <span className="mr20 fl mt3">将发布于{moment(item.publish_time).format(dataformat)}</span>
} }
{ {
item.polls_status ==2 && item.publish_time !=null && item.polls_status ==2 && item.publish_time !=null &&
<Tooltip title="提交剩余时间"> <Tooltip title="提交剩余时间">
<span className="mr20 fl mt2">{formatDuring(t)}</span> <span className="mr20 fl mt3">{formatDuring(t)}</span>
</Tooltip> </Tooltip>
} }
{ {
@ -81,21 +81,14 @@ class PollListItem extends Component{
} }
</WordsBtn>:"" </WordsBtn>:""
} }
</p> {
{ IsAdmin &&
IsAdmin && <ul className="fr">
<div className="homepagePostSetting" style={{"right":"0px","top":"-5px","position":"absolute","display":"block"}}> <WordsBtn style="blue" className="mr20 font-16" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn>
<ul> <WordsBtn style="blue" className="font-16" to={`/courses/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn>
<li className="edu-position edu-position-hidebox">
<i className="fa fa-bars color-grey-b"></i>
<ul className="edu-position-hide undis">
<li> <WordsBtn className="" to={`/courses/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn></li>
<li> <WordsBtn className="" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn></li>
</ul>
</li>
</ul> </ul>
</div> }
} </p>
</div> </div>
</div> </div>
) )

@ -300,7 +300,7 @@ export default class TPMMDEditor extends Component {
</div> </div>
</div> </div>
</div> </div>
<div className={"fr"}> <div className={"fr rememberTip"}>
{noStorage == true ? '' : <p id={`e_tip_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>} {noStorage == true ? '' : <p id={`e_tip_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
{noStorage == true ? '' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>} {noStorage == true ? '' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
</div> </div>

@ -268,7 +268,7 @@ class Infos extends Component{
<Menu.Item key="1">实训</Menu.Item> <Menu.Item key="1">实训</Menu.Item>
<Menu.Item key="2">实训课程</Menu.Item> <Menu.Item key="2">实训课程</Menu.Item>
<Menu.Item key="3">项目</Menu.Item> <Menu.Item key="3">项目</Menu.Item>
{ isAdmin && <Menu.Item key="4">题库</Menu.Item> } { data && data.identity !="学生" && <Menu.Item key="4" onClick={()=>this.ToBank(`/`)}>题库</Menu.Item> }
</Menu> </Menu>
</div> </div>
</div> </div>

@ -41,7 +41,7 @@ class InfosCourse extends Component{
category, category,
status, status,
page, page,
per_page:category && page ==1?17:16 per_page: this.props.is_current && category && page ==1?17:16
}}).then((result)=>{ }}).then((result)=>{
if(result){ if(result){
this.setState({ this.setState({
@ -111,18 +111,21 @@ class InfosCourse extends Component{
<li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li> <li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li>
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li> <li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div> </div>
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> {
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> is_current &&
<li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>正在进行</a></li> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status=="end" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("end")}>已结束</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
</div> <li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>正在进行</a></li>
<li className={status=="end" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("end")}>已结束</a></li>
</div>
}
<p className="pl25 pr25 clearfix font-12 mb20 mt20"> <p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"课堂"}</span> <span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"课堂"}</span>
<span className="fr color-grey-9">时间最新</span> <span className="fr color-grey-9">时间最新</span>
</p> </p>
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
!isStudent && page == 1 && !category && !isStudent && page == 1 && !category && is_current &&
<Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> <Create href={"/courses/new"} name={"新建课堂"} index="1"></Create>
} }
{ {

@ -44,7 +44,7 @@ class InfosPath extends Component{
status, status,
sort_by, sort_by,
page, page,
per_page:category && page ==1?17:16 per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{ }}).then((result)=>{
if(result){ if(result){
this.setState({ this.setState({
@ -126,7 +126,7 @@ class InfosPath extends Component{
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li> <li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div> </div>
{ {
category && category == "manage" && category && category == "manage" && is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="editing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("editing")}>编辑中</a></li> <li className={status=="editing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("editing")}>编辑中</a></li>
@ -135,7 +135,7 @@ class InfosPath extends Component{
</div> </div>
} }
{ {
category && category == "study" && category && category == "study" && is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="unfinished" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("unfinished")}>未完成</a></li> <li className={status=="unfinished" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("unfinished")}>未完成</a></li>
@ -148,7 +148,7 @@ class InfosPath extends Component{
</div> </div>
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
isStudent ==false && page == 1 && !category && !isStudent && page == 1 && !category && is_current &&
<Create href={"/paths/new"} name={"新建实训课程"} index="3"></Create> <Create href={"/paths/new"} name={"新建实训课程"} index="3"></Create>
} }
{ {

@ -37,7 +37,7 @@ class InfosProject extends Component{
category, category,
status, status,
page, page,
per_page:category && page ==1?17:16 per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{ }}).then((result)=>{
if(result){ if(result){
this.setState({ this.setState({
@ -107,18 +107,21 @@ class InfosProject extends Component{
<li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li> <li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li>
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li> <li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div> </div>
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> {
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> is_current &&
<li className={status=="publicly" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("publicly")}>公开</a></li> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status=="personal" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("personal")}>私有</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
</div> <li className={status=="publicly" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("publicly")}>公开</a></li>
<li className={status=="personal" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("personal")}>私有</a></li>
</div>
}
<p className="pl25 pr25 clearfix font-12 mb20 mt20"> <p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"项目"}</span> <span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"项目"}</span>
<span className="fr color-grey-9">时间最新</span> <span className="fr color-grey-9">时间最新</span>
</p> </p>
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
!isStudent && page == 1 && !category && !isStudent && page == 1 && !category && is_current &&
<Create href={"/projects/new"} name={"新建项目"} index="4"></Create> <Create href={"/projects/new"} name={"新建项目"} index="4"></Create>
} }
{ {

@ -44,7 +44,7 @@ class InfosShixun extends Component{
status, status,
sort_by, sort_by,
page, page,
per_page:category && page ==1?17:16 per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{ }}).then((result)=>{
if(result){ if(result){
this.setState({ this.setState({
@ -126,7 +126,7 @@ class InfosShixun extends Component{
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li> <li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div> </div>
{ {
category && category == "manage" && category && category == "manage" && is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="editing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("editing")}>编辑中</a></li> <li className={status=="editing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("editing")}>编辑中</a></li>
@ -136,7 +136,7 @@ class InfosShixun extends Component{
</div> </div>
} }
{ {
category && category == "study" && category && category == "study" && is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE"> <div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li> <li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>未通关</a></li> <li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>未通关</a></li>
@ -157,7 +157,7 @@ class InfosShixun extends Component{
</div> </div>
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
isStudent ==false && page == 1 && !category && !isStudent && page == 1 && !category && is_current &&
<Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create> <Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create>
} }
{ {

Loading…
Cancel
Save