调整课堂首页面包屑

dev_oauth
杨树明 5 years ago
parent 72b438a280
commit a467ef8475

@ -77,6 +77,7 @@ class CoursesNew extends Component {
this.setState({
datatime: data.end_date,
dataname:data.name,
is_public: data.is_public === 1 ? true : false,
Realnamecertification: data.authentication,
Professionalcertification:data.professional_certification,
@ -326,7 +327,7 @@ class CoursesNew extends Component {
}
goback = () => {
goback = (id) => {
// if(this.props.match.params.coursesId===undefined){
// this.props.history.push("/courses");
@ -334,7 +335,12 @@ class CoursesNew extends Component {
// this.props.history.push(this.props.current_user.first_category_url);
// }
// window.history.go(-1)
if(id===undefined){
this.props.history.goBack()
}else{
this.props.history.push(this.props.current_user.first_category_url);
}
}
onCheckAllChange = (e) => {
@ -494,7 +500,7 @@ class CoursesNew extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
let {datatime,school,searchlistscholl,bordebool} = this.state;
let {datatime,school,searchlistscholl,bordebool,dataname} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@ -504,7 +510,7 @@ class CoursesNew extends Component {
// form合并了
// console.log("获取到的数据");
// console.log(this.state);
// console.log(this.props);
//console.log(this.props.current_user.first_category_url);
// console.log(this.props.current_user);
var addonAfterone=this.props.form&&this.props.form.getFieldValue('period');
var addonAfteronelen=0;
@ -537,7 +543,7 @@ class CoursesNew extends Component {
.color-green-light {
color: #45E660!important;
}
.line15{line-height: 15px;}
`
}
</style>
@ -562,15 +568,19 @@ class CoursesNew extends Component {
{/*</Breadcrumb>*/}
<p className="clearfix mb20 mt10">
<a className="btn colorgrey fl hovercolorblue " href="/courses">翻转课堂</a>
<a className="btn colorgrey fl hovercolorblue "
href={this.props.match.params.coursesId === undefined ?"/courses":this.props.current_user&&this.props.current_user.first_category_url}
>
{this.props.match.params.coursesId === undefined ?"翻转课堂":dataname}
</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">{this.props.match.params.coursesId === undefined ?"新建课堂":"编辑课堂"}</WordsBtn>
<WordsBtn className="fl cdefault">{this.props.match.params.coursesId === undefined ?"新建课堂":"编辑课堂"}</WordsBtn>
</p>
<div style={{width: '100%', height: '70px'}}>
<p className=" fl color-black mt18 summaryname">{this.props.match.params.coursesId === undefined ? "新建课堂" : "编辑课堂"}</p>
<a onClick={this.goback} className="color-grey-6 fr font-16 ml30 mt18 mr20">返回</a>
<div style={{width: '100%', height: '50px'}}>
<p className=" fl color-black summaryname">{this.props.match.params.coursesId === undefined ? "新建课堂" : "编辑课堂"}</p>
<a onClick={()=>this.goback(this.props.match.params.coursesId)} className="color-grey-6 fr font-16 ml30 line15 mr20">返回</a>
</div>
<style>
{`

@ -628,7 +628,7 @@ class Goldsubject extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
let {datatime,datatimetwo,school,bordebool,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state;
let {datatime,datatimetwo,school,bordebool,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo,name} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@ -667,7 +667,7 @@ class Goldsubject extends Component {
.color-green-light {
color: #45E660!important;
}
.line15{line-height: 15px;}
`
}
</style>
@ -693,14 +693,15 @@ class Goldsubject extends Component {
{/* <Breadcrumb.Item>{Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}</Breadcrumb.Item>*/}
{/*</Breadcrumb>*/}
<p className="clearfix mb20 mt10">
<a className="btn colorgrey fl hovercolorblue " href="/courses">翻转课堂</a>
<a className="btn colorgrey fl hovercolorblue " href={Whethertocreateanewclassroom===true?"/courses":this.props.current_user&&this.props.current_user.first_category_url}
>{Whethertocreateanewclassroom===true?"翻转课堂":name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">{Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}</WordsBtn>
<WordsBtn className="fl cdefault">{Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}</WordsBtn>
</p>
<div style={{width: '100%', height: '70px'}}>
<p className=" fl color-black mt18 summaryname">{Whethertocreateanewclassroom===true ? "新建课堂" : "编辑课堂"}</p>
<a onClick={this.goback} className="color-grey-6 fr font-16 ml30 mt18 mr20"></a>
<div style={{width: '100%', height: '50px'}}>
<p className=" fl color-black summaryname">{Whethertocreateanewclassroom===true ? "新建课堂" : "编辑课堂"}</p>
<a onClick={this.goback} className="color-grey-6 fr font-16 ml30 line15 mr20"></a>
</div>
<style>
{`
@ -733,6 +734,8 @@ class Goldsubject extends Component {
line-height: 28px;
z-index: 2000;
}
.line15{line-height: 15px;}
`}
</style>
@ -774,7 +777,7 @@ class Goldsubject extends Component {
`
.ml19{
margin-left:19px;
} }
}
`
}
</style>

Loading…
Cancel
Save