chromesetting
杨树明 5 years ago
parent 328ce57778
commit 118af12957

@ -102,11 +102,26 @@ class CoursesHome extends Component{
})
}
getUser=(url,type)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
if(url !== undefined || url!==""){
this.props.history.push(url);
}
}
render() {
let { order,search,page,coursesHomelist }=this.state;
//console.log(this.props)
return (
<div>
{this.state.updata===undefined?"":<UpgradeModals
@ -144,6 +159,7 @@ class CoursesHome extends Component{
onClick={ () => this.changeStatus("created_at")}>最新</a>
<a className={ order == "visits" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("visits")}>最热</a>
{this.props.user&&this.props.user.user_identity==="学生"?"":<span className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/courses/new")}>+新建翻转课堂</span>}
{/*<div className="fr mr5 search-new">*/}
{/*/!* <Search*/}

@ -681,6 +681,7 @@ class Exercisesetting extends Component{
<div className="clearfix">
<span className="mr15 fl mt10 font-16">截止时间</span>
<div className="fl">
<Tooltip placement="bottom" title={end_timetype===true ? this.props.isAdmin()?"":"截止时间已过,不能再修改":""}>
<DatePicker
dropdownClassName="hideDisable"
placeholder="请选择截止时间"
@ -694,9 +695,10 @@ class Exercisesetting extends Component{
disabledDate={disabledDate}
onChange={this.onChangeTimeEnd}
value={end_time && moment(end_time,"YYYY-MM-DD HH:mm")}
disabled={ end_timetype===true?true:!flagPageEdit}
disabled={ end_timetype===true?this.props.isAdmin()?false:true:!flagPageEdit}
>
</DatePicker>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span>:""

@ -584,7 +584,7 @@ class PollDetailTabForth extends Component{
<div className="clearfix">
<span className="mr15 fl mt10 font-16">截止时间</span>
<div className="fl">
<Tooltip placement="bottom" title={un_change_end ? this.props.isAdmin()?"截止时间已过,不能再修改":"":""}>
<Tooltip placement="bottom" title={un_change_end ? this.props.isAdmin()?"":"截止时间已过,不能再修改":""}>
<span>
<DatePicker
showToday={false}
@ -599,7 +599,7 @@ class PollDetailTabForth extends Component{
disabledTime={disabledDateTime}
onChange={this.onChangeTimeEnd}
value={ end_time && moment(end_time,dataformat) }
disabled={un_change_end == true ? true : !flagPageEdit }
disabled={un_change_end == true ?this.props.isAdmin()?false:true : !flagPageEdit }
>
</DatePicker>
</span>

@ -93,14 +93,14 @@ class Addshixuns extends Component {
</style>:""}
<div className="task-popup-content">
{/*<Form {...formItemLayout}>*/}
{/* <Form.Item label="实训类型">*/}
{/* <Radio.Group value={this.state.is_jupyter} onChange={this.GrouponChange}>*/}
{/* <Radio value="1">普通实训</Radio>*/}
{/* <Radio value="2">jupyter实训</Radio>*/}
{/* </Radio.Group>*/}
{/* </Form.Item>*/}
{/*</Form>*/}
<Form {...formItemLayout}>
<Form.Item label="实训类型">
<Radio.Group value={this.state.is_jupyter} onChange={this.GrouponChange}>
<Radio value="1">普通实训</Radio>
<Radio value="2">jupyter实训</Radio>
</Radio.Group>
</Form.Item>
</Form>
<p className="task-popup-text-center font-16">
<span style={{ "line-height":"30px"}}>实训名称</span>
<span><Input style={{ width:"80%"}} className="yslzxueshisy " placeholder="请输入60字以内的实训名称" onChange={this.handleChange} addonAfter={String(this.state.shixunname===undefined?0:this.state.shixunname.length)+"/60"} maxLength={60} />

@ -124,10 +124,39 @@ class ShixunPathSearch extends Component{
this.props.history.push(url)
}
//头部获取是否已经登录了
getUser=(url,type)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
if(url !== undefined || url!==""){
this.props.history.push(url);
}
}
render() {
let { order,sortList,search,page,total_count,select }=this.state;
let pathstype=false;
if(this.props&&this.props.mygetHelmetapi!=null){
let paths="/paths";
this.props.mygetHelmetapi.navbar.map((item,key)=>{
var reg = RegExp(item.link);
if(paths.match(reg)){
if(item.hidden===true){
pathstype=true
}
}
// console.log()
})
}
// console.log(this.props)
return (
<div>
{this.state.updata===undefined?"":<UpgradeModals
@ -169,6 +198,10 @@ class ShixunPathSearch extends Component{
{/*<a href="javascript:void(0)" className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("mine")}>我的</a>*/}
<span className={ order == "updated_at" ? "active" : ""} onClick={ () => this.changeStatus("updated_at")}>最新</span>
<span className={ order == "myshixun_count" ? "active" : ""} onClick={ () => this.changeStatus("myshixun_count")}>最热</span>
{this.props.user&&this.props.user.main_site===false?"":this.props.Headertop===undefined?"":<a className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/paths/new")}>+新建实践课程</a>}
{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?<a className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/paths/new")}>+新建实践课程</a>:""
}
{/*<div className="fr mr5 search-new">*/}
{/*/!* <Search*/}
{/*placeholder="请输入路径名称进行搜索"*/}

@ -1158,7 +1158,7 @@ class TPMBanner extends Component {
}
{
<a onClick={this.Senttothe}
this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter===true?"":<a onClick={this.Senttothe}
className="fr kaike kkbths mr20 font-18"
data-tip-down=""
style={{display: shixunsDetails.shixun_status === 0 || shixunsDetails.shixun_status === 3 || shixunsDetails.shixun_status === 1 || shixunsDetails.shixun_status === -1 ? "none" : "block"}}

@ -326,12 +326,12 @@ function JupyterTPI (props) {
</p>
<p className="jupyter_btn">
{/*sync | poweroff */}
{/*<Button*/}
{/* className="btn_common"*/}
{/* type="link"*/}
{/* icon="history"*/}
{/* onClick={handleClickResetTpi}*/}
{/*>重置实训</Button>*/}
<Button
className="btn_common"
type="link"
icon="history"
onClick={handleClickResetTpi}
>重置实训</Button>
<Button
className="btn_common"

Loading…
Cancel
Save