chromesetting
杨树明 6 years ago
parent 9ee9397d6c
commit f1d14d0d9e

@ -608,10 +608,10 @@ class App extends Component {
} }
} }
/> />
<Route {/*<Route*/}
path="/interesse" component={Interestpage} {/* path="/interesse" component={Interestpage}*/}
/> {/*/>*/}
<Route path="/shixuns/new" component={Newshixuns}> <Route path="/shixuns/new" component={Newshixuns}>
</Route> </Route>

@ -1579,6 +1579,9 @@ class PollNew extends Component {
if(object.question.max_choices>0){ if(object.question.max_choices>0){
if (object.question.max_choices < object.question.min_choices) { if (object.question.max_choices < object.question.min_choices) {
this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`);
this.setState({
Newdisplay:true,
})
return; return;
} }
} }
@ -1589,10 +1592,16 @@ class PollNew extends Component {
if(object.question.min_choices){ if(object.question.min_choices){
if(object.question.min_choices===0){ if(object.question.min_choices===0){
this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`);
this.setState({
Newdisplay:true,
})
return; return;
} }
}else { }else {
this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`);
this.setState({
Newdisplay:true,
})
return; return;
} }
@ -1605,10 +1614,16 @@ class PollNew extends Component {
if(object.question.max_choices){ if(object.question.max_choices){
if(object.question.max_choices===0){ if(object.question.max_choices===0){
this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`);
this.setState({
Newdisplay:true,
})
return; return;
} }
}else { }else {
this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`);
this.setState({
Newdisplay:true,
})
return; return;
} }

@ -1294,7 +1294,8 @@ submittojoinclass=(value)=>{
<li><a onClick={(url)=>this.getUser("/courses/new")}>{this.props.user&&this.props.user.main_site===false?"新建课堂":"新建翻转课堂"}</a></li>:"" <li><a onClick={(url)=>this.getUser("/courses/new")}>{this.props.user&&this.props.user.main_site===false?"新建课堂":"新建翻转课堂"}</a></li>:""
} }
{shixuntype===true?"":<li><a onClick={(url)=>this.getUser("/shixuns/new")}>新建实训项目</a></li>} {shixuntype===true?"":<li><a onClick={(url)=>this.getUser("/shixuns/new")}>新建实训项目</a></li>}
{this.props.Headertop===undefined?"": {this.props.user&&this.props.user.main_site===false?"":this.props.Headertop===undefined?"":<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>}
{this.props.user&&this.props.user.main_site===true?"":this.props.Headertop===undefined?"":
pathstype===true?"":this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>:"" pathstype===true?"":this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>:""
} }
{this.props.user&&this.props.user.main_site===true?<li><a onClick={(url)=>this.getUser("/projects/new","projects")} target="_blank">新建开发项目</a></li>:""} {this.props.user&&this.props.user.main_site===true?<li><a onClick={(url)=>this.getUser("/projects/new","projects")} target="_blank">新建开发项目</a></li>:""}

@ -117,12 +117,12 @@ class Newshixuns extends Component {
// window.open("/shixuns/"+response.data.shixun_identifier+"/challenges"); // window.open("/shixuns/"+response.data.shixun_identifier+"/challenges");
} else { } else {
this.setState({ this.setState({
loading: true loading: false
}) })
} }
}).catch((error) => { }).catch((error) => {
this.setState({ this.setState({
loading: true loading: false
}) })
}) })

@ -263,7 +263,7 @@ class Challengesjupyter extends Component {
"" ""
: :
( (
is_teacher===true||admin===true||business===true||mysidentity===true? admin===true||business===true||mysidentity===true?
<div className="sortinxdirection mt60"> <div className="sortinxdirection mt60">
<div className="renwuxiangssi sortinxdirection"> <div className="renwuxiangssi sortinxdirection">
<div><p className="renwuxiangqdiv">任务详情</p></div> <div><p className="renwuxiangqdiv">任务详情</p></div>
@ -306,7 +306,7 @@ class Challengesjupyter extends Component {
} }
</style> </style>
{ {
is_teacher===true||admin===true||business===true||mysidentity===true? admin===true||business===true||mysidentity===true?
<div className="mt35"> <div className="mt35">
<div className="pb47"> <div className="pb47">
{ {

@ -168,6 +168,8 @@ class InfosPath extends Component{
</Menu> </Menu>
); );
// console.log(this.props.user&&this.props.user.main_site)
return( return(
<div className="educontent"> <div className="educontent">
<Spin size="large" spinning={isSpin}> <Spin size="large" spinning={isSpin}>
@ -327,7 +329,10 @@ class InfosPath extends Component{
<div className="square-list clearfix"> <div className="square-list clearfix">
{/* 295 */} {/* 295 */}
{ {
page == 1 && is_current && !category ? <Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>:"" this.props.user&&this.props.user.main_site===true?page == 1 && is_current && !category ? <Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>:"":""
}
{
this.props.user&&this.props.user.main_site===false?this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?page == 1 && is_current && !category ? <Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>:"":"":""
} }
{ {
(!data || (data && data.subjects.length==0)) && category && <NoneData></NoneData> (!data || (data && data.subjects.length==0)) && category && <NoneData></NoneData>

Loading…
Cancel
Save