调整样式

dev_aliyun_beta
杨树林 5 years ago
parent 6217e80adb
commit b7452575af

@ -81,22 +81,19 @@ class CoursesNew extends Component {
is_public: data.is_public === 1 ? true : false,
Realnamecertification: data.authentication,
Professionalcertification:data.professional_certification,
checkbofrups:data.course_modules,
// checkbofrups:data.course_modules,
});
try {
if(data.course_modules===undefined||data.course_modules.length===0){
this.setState({
checkbofrups:this.state.checkbofrup,
});
}
}catch (e) {
this.setState({
checkbofrups:this.state.checkbofrup,
});
}
// try {
// if(data.course_modules===undefined||data.course_modules.length===0){
// this.setState({
// checkbofrups:this.state.checkbofrup,
// });
// }
// }catch (e) {
// this.setState({
// checkbofrups:this.state.checkbofrup,
// });
// }
this.handleSearchschool(data.school);
}).catch((error) => {
console.log(error);
@ -464,7 +461,7 @@ class CoursesNew extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
let {datatime,school,searchlistscholl,checkbofrups} = this.state;
let {datatime,school,searchlistscholl} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@ -705,23 +702,6 @@ class CoursesNew extends Component {
"shixun_homework", "common_homework", "group_homework", "exercise", "attachment", "course_group",
],
})(
this.props.match.params.coursesId != undefined?
<Checkbox.Group style={{width: "800px", marginTop: "10px"}}>
{
checkbofrups===undefined?"":checkbofrups.length===0?"":checkbofrups.map((item,key)=>{
return(
item.module_type==="announcement"?
""
:
item.module_type==="online_learning"?
""
:
<Checkbox key={key} value={item.module_type} className="fl">{item.module_name}</Checkbox>
)
})
}
</Checkbox.Group>
:
<Checkbox.Group style={{width: "800px", marginTop: "10px"}}>
<Checkbox value={"shixun_homework"} className="fl">实训作业</Checkbox>
<Checkbox value={"common_homework"} className="fl">普通作业</Checkbox>

@ -144,20 +144,18 @@ class Goldsubject extends Component {
course_module_types: data.course_module_types,
school:data.school,
Whethertocreateanewclassroom:false,
checkbofrups:data.course_modules,
});
try {
if(data.course_modules===undefined||data.course_modules.length===0){
this.setState({
checkbofrups:this.state.checkbofrup,
});
}
}catch (e) {
this.setState({
checkbofrups:this.state.checkbofrup,
});
}
// try {
// if(data.course_modules===undefined||data.course_modules.length===0){
// this.setState({
// checkbofrups:this.state.checkbofrup,
// });
// }
// }catch (e) {
// this.setState({
// checkbofrups:this.state.checkbofrup,
// });
// }
this.handleSearchschool(data.school);
}).catch((error) => {
console.log(error);
@ -609,7 +607,7 @@ class Goldsubject extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,checkbofrups} = this.state;
let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@ -884,25 +882,6 @@ class Goldsubject extends Component {
"announcement","online_learning","shixun_homework","common_homework",
],
})(
this.props.match.params.coursesId != undefined?
<Checkbox.Group style={{width: "800px", marginTop: "10px"}}>
{
checkbofrups===undefined?"":checkbofrups.length===0?"":checkbofrups.map((item,key)=>{
return(
item.module_type==="announcement"?
<Checkbox value={"announcement"} className="fl" defaultChecked disabled>公告栏</Checkbox>
:
item.module_type==="online_learning"?
<Checkbox value={"online_learning"} className="fl" defaultChecked disabled>在线学习</Checkbox>
:
item.module_type==="graduation"?"":
item.module_type==="group_homework"?"":
<Checkbox key={key} value={item.module_type} className="fl">{item.module_name}</Checkbox>
)
})
}
</Checkbox.Group>
:
<Checkbox.Group style={{width: "800px", marginTop: "10px"}}>
<Checkbox value={"announcement"} className="fl" defaultChecked disabled>公告栏</Checkbox>
<Checkbox value={"online_learning"} className="fl" defaultChecked disabled>在线学习</Checkbox>

Loading…
Cancel
Save