新建实训控制

dev_tpm_ui
杨树林 5 years ago
parent 2d995ddfba
commit db893c10ab

@ -14,10 +14,20 @@ class GotoQQgroup extends Component {
} }
modalCancel=()=>{ modalCancel=()=>{
try {
this.props.setgoshowqqgtounp(false);
}catch (e) {
}
} }
setDownload=()=>{ setDownload=()=>{
//立即联系 //立即联系
try {
this.props.setgoshowqqgtounp(false);
}catch (e) {
}
} }

@ -19,7 +19,9 @@ import Addcourses from '../courses/coursesPublic/Addcourses';
import LoginDialog from '../login/LoginDialog'; import LoginDialog from '../login/LoginDialog';
import Trialapplication from '../login/Trialapplication' import Trialapplication from '../login/Trialapplication';
import GotoQQgroup from '../../modal/GotoQQgroup'
import 'antd/lib/modal/style/index.css'; import 'antd/lib/modal/style/index.css';
@ -31,6 +33,8 @@ import 'antd/lib/input/style/index.css';
import './TPMIndex.css'; import './TPMIndex.css';
const $ = window.$ const $ = window.$
// TODO 这部分脚本从公共脚本中直接调用 // TODO 这部分脚本从公共脚本中直接调用
@ -69,6 +73,7 @@ class NewHeader extends Component {
headtypesonClickbool:false, headtypesonClickbool:false,
headtypess:"/", headtypess:"/",
mygetHelmetapi2: null, mygetHelmetapi2: null,
goshowqqgtounp:false,
} }
console.log("176") console.log("176")
// console.log(props); // console.log(props);
@ -649,6 +654,18 @@ submittojoinclass=(value)=>{
return; return;
} }
if(this.props&&this.props.current_user&&this.props.current_user.is_shixun_marker===true){
this.setgoshowqqgtounp(true);
return;
}
if(url !== undefined || url!==""){ if(url !== undefined || url!==""){
window.location.href = url; window.location.href = url;
} }
@ -790,6 +807,14 @@ submittojoinclass=(value)=>{
return false return false
} }
} }
// 处理弹框
setgoshowqqgtounp=(bool)=>{
this.setState({
goshowqqgtounp:bool
})
}
render() { render() {
const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。
const {match} = this.props; const {match} = this.props;
@ -808,6 +833,7 @@ submittojoinclass=(value)=>{
headtypesonClickbool, headtypesonClickbool,
headtypess, headtypess,
mygetHelmetapi2, mygetHelmetapi2,
goshowqqgtounp,
}=this.state; }=this.state;
/* /*
用户名称 用户头像url 用户名称 用户头像url
@ -898,7 +924,9 @@ submittojoinclass=(value)=>{
}) })
} }
console.log("newHeadersnewHeaders");
console.log(this.props);
// this.props.current_user.is_shixun_marker
return ( return (
<div className="newHeaders" id="nHeader" > <div className="newHeaders" id="nHeader" >
@ -914,6 +942,14 @@ submittojoinclass=(value)=>{
{...this.props} {...this.props}
{...this.state} {...this.state}
/>:""} />:""}
{
goshowqqgtounp===true?
<GotoQQgroup {...this.state} {...this.props} setgoshowqqgtounp={(bool)=>this.setgoshowqqgtounp(bool)}></GotoQQgroup>
:
""
}
<a href={"/"} onClick={()=>this.headtypesonClick("/",false)} className={"fl mr30 ml25 mt10"}> <a href={"/"} onClick={()=>this.headtypesonClick("/",false)} className={"fl mr30 ml25 mt10"}>
{ {
mygetHelmetapi2 === null ? mygetHelmetapi2 === null ?
@ -1287,7 +1323,9 @@ submittojoinclass=(value)=>{
{this.props.current_user&&this.props.current_user.user_identity==="学生"?"":coursestypes===false? {this.props.current_user&&this.props.current_user.user_identity==="学生"?"":coursestypes===false?
<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.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===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?"": {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>:""

Loading…
Cancel
Save