调整课堂首页面包屑

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

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

@ -628,7 +628,7 @@ class Goldsubject extends Component {
this.applyForAddOrgForm.setVisible(true) this.applyForAddOrgForm.setVisible(true)
} }
render() { 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 {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props) const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form delete propsWithoutForm.form
@ -664,11 +664,11 @@ class Goldsubject extends Component {
{ {
` `
.color-green-light { .color-green-light {
color: #45E660!important; color: #45E660!important;
} }
.line15{line-height: 15px;}
` `
} }
</style> </style>
<ApplyForAddOrgModal ref="applyForAddOrgModal" wrappedComponentRef={(form) => this.applyForAddOrgForm = form} schoolName={school} <ApplyForAddOrgModal ref="applyForAddOrgModal" wrappedComponentRef={(form) => this.applyForAddOrgForm = form} schoolName={school}
@ -693,47 +693,50 @@ class Goldsubject extends Component {
{/* <Breadcrumb.Item>{Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}</Breadcrumb.Item>*/} {/* <Breadcrumb.Item>{Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}</Breadcrumb.Item>*/}
{/*</Breadcrumb>*/} {/*</Breadcrumb>*/}
<p className="clearfix mb20 mt10"> <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> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">{Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}</WordsBtn> <WordsBtn className="fl cdefault">{Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}</WordsBtn>
</p> </p>
<div style={{width: '100%', height: '70px'}}> <div style={{width: '100%', height: '50px'}}>
<p className=" fl color-black mt18 summaryname">{Whethertocreateanewclassroom===true ? "新建课堂" : "编辑课堂"}</p> <p className=" fl color-black summaryname">{Whethertocreateanewclassroom===true ? "新建课堂" : "编辑课堂"}</p>
<a onClick={this.goback} className="color-grey-6 fr font-16 ml30 mt18 mr20"></a> <a onClick={this.goback} className="color-grey-6 fr font-16 ml30 line15 mr20"></a>
</div> </div>
<style> <style>
{` {`
.ant-col-12{ .ant-col-12{
width:800px; width:800px;
} }
`} `}
</style> </style>
<Form onSubmit={this.handleSubmit} className={"edu-back-white newcourses"}> <Form onSubmit={this.handleSubmit} className={"edu-back-white newcourses"}>
{/*内容*/} {/*内容*/}
<style> <style>
{` {`
.ant-select-dropdown{ .ant-select-dropdown{
// top: 221px !important; // top: 221px !important;
// left: 115px !important; // left: 115px !important;
height: 160px; height: 160px;
} }
.ant-select-dropdown-menu{ .ant-select-dropdown-menu{
height: 160px; height: 160px;
} }
.construction .ant-input{ .construction .ant-input{
margin-left: 0px !important; margin-left: 0px !important;
} }
.construction { .construction {
margin-left: 11px; margin-left: 11px;
} }
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder {
line-height: 28px; line-height: 28px;
z-index: 2000; z-index: 2000;
} }
`}
.line15{line-height: 15px;}
`}
</style> </style>
{/*<div className="stud-class-set bor-bottom-greyE padding10200 ">*/} {/*<div className="stud-class-set bor-bottom-greyE padding10200 ">*/}
@ -772,30 +775,30 @@ class Goldsubject extends Component {
<style> <style>
{ {
` `
.ml19{ .ml19{
margin-left:19px; margin-left:19px;
} } }
` `
} }
</style> </style>
<div className="stud-class-set bor-bottom-greyE padding1020 "> <div className="stud-class-set bor-bottom-greyE padding1020 ">
<style>{ <style>{
` `
.yslzxueshis .ant-input{ .yslzxueshis .ant-input{
border-right: none !important; border-right: none !important;
height: 40px !important; height: 40px !important;
width: 655px !important; width: 655px !important;
} }
.yslzxueshisy span .ant-input-group-addon{ .yslzxueshisy span .ant-input-group-addon{
width: 65px !important; width: 65px !important;
background-color: #fafafa!important; background-color: #fafafa!important;
} }
.yslzxueshisy .ant-input-group-addon{ .yslzxueshisy .ant-input-group-addon{
width: 65px !important; width: 65px !important;
background-color: #fafafa!important; background-color: #fafafa!important;
} }
` `
}</style> }</style>
<style> <style>
{bordebool===false? {bordebool===false?
@ -845,27 +848,27 @@ class Goldsubject extends Component {
<div className="stud-class-set bor-bottom-greyE padding1020 coursenavbox coursenavboxtow yslinputcourput"> <div className="stud-class-set bor-bottom-greyE padding1020 coursenavbox coursenavboxtow yslinputcourput">
<style> <style>
{` {`
.ant-form-item{ .ant-form-item{
margin-bottom: 10px !important; margin-bottom: 10px !important;
} }
`} `}
</style> </style>
<style>{ <style>{
` `
.yslzxueshi .ant-input{ .yslzxueshi .ant-input{
border-right: none !important; border-right: none !important;
height: 40px !important; height: 40px !important;
width: 236px !important width: 236px !important
} }
.yslzxueshi .ant-input-group { .yslzxueshi .ant-input-group {
width: 280px !important; width: 280px !important;
} }
.yslzxueshi .ant-input-group-addon{ .yslzxueshi .ant-input-group-addon{
width: 44px !important; width: 44px !important;
background-color: #fafafa!important; background-color: #fafafa!important;
} }
` `
}</style> }</style>
<Form.Item <Form.Item
label="总学时" label="总学时"
@ -911,19 +914,19 @@ class Goldsubject extends Component {
rules: [{type: 'object',required: true, message: "开始时间不能为空"}], rules: [{type: 'object',required: true, message: "开始时间不能为空"}],
})( })(
<span className="fl mt5"> <span className="fl mt5">
<DatePicker <DatePicker
showToday={false} showToday={false}
placeholder="请选择开始时间" placeholder="请选择开始时间"
// showTime={{format: 'HH:mm'}} // showTime={{format: 'HH:mm'}}
locale={locale} locale={locale}
format={dateFormat} format={dateFormat}
width={"210px"} width={"210px"}
value={datatimetwo === undefined ? "" :datatimetwo === null ? "" : moment(datatimetwo, dateFormat)} value={datatimetwo === undefined ? "" :datatimetwo === null ? "" : moment(datatimetwo, dateFormat)}
disabledTime={disabledDateTime} disabledTime={disabledDateTime}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
onChange={this.onChangeTimepublishstwo} onChange={this.onChangeTimepublishstwo}
/> />
</span> </span>
)} )}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
@ -934,19 +937,19 @@ class Goldsubject extends Component {
required: true, message: "结束时间不能为空"}], required: true, message: "结束时间不能为空"}],
})( })(
<span className="fl mt5"> <span className="fl mt5">
<DatePicker <DatePicker
showToday={false} showToday={false}
placeholder="请选择结束时间" placeholder="请选择结束时间"
// showTime={{format: 'HH:mm'}} // showTime={{format: 'HH:mm'}}
locale={locale} locale={locale}
format={dateFormat} format={dateFormat}
width={"210px"} width={"210px"}
value={datatime === undefined ? "" :datatime === null ? "" : moment(datatime, dateFormat)} value={datatime === undefined ? "" :datatime === null ? "" : moment(datatime, dateFormat)}
disabledTime={disabledDateTime} disabledTime={disabledDateTime}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
onChange={this.onChangeTimepublishs} onChange={this.onChangeTimepublishs}
/> />
</span> </span>
)} )}
</Form.Item> </Form.Item>
</div> </div>

Loading…
Cancel
Save