|
|
|
@ -55,7 +55,7 @@ class Goldsubject extends Component {
|
|
|
|
|
,{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"}
|
|
|
|
|
,{module_type:"exercise",module_name:"试卷"},{module_type:"poll",module_name:"问卷"}
|
|
|
|
|
,{module_type:"attachment",module_name:"资源"},{module_type:"board",module_name:"讨论"},{module_type:"course_group",module_name:"分班"},],
|
|
|
|
|
checkbofrups:[],
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// disabledEndDate= endValue => {
|
|
|
|
@ -144,20 +144,7 @@ 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,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.handleSearchschool(data.school);
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
@ -609,7 +596,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
|
|
|
|
@ -621,6 +608,18 @@ class Goldsubject extends Component {
|
|
|
|
|
// console.log(this.state);
|
|
|
|
|
// console.log(this.props);
|
|
|
|
|
// console.log(this.props.current_user);
|
|
|
|
|
var addonAfterone=this.props.form&&this.props.form.getFieldValue('period');
|
|
|
|
|
var addonAfteronelen=0;
|
|
|
|
|
if(addonAfterone){
|
|
|
|
|
addonAfteronelen=String(addonAfterone).length;
|
|
|
|
|
}
|
|
|
|
|
var addonAftertwo=this.props.form&&this.props.form.getFieldValue('credit');
|
|
|
|
|
var addonAfteronelens=0;
|
|
|
|
|
if(addonAftertwo){
|
|
|
|
|
addonAfteronelens=String(addonAftertwo).length;
|
|
|
|
|
}
|
|
|
|
|
console.log(addonAfterone);
|
|
|
|
|
console.log(addonAfteronelen);
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
|
|
|
|
@ -788,6 +787,14 @@ class Goldsubject extends Component {
|
|
|
|
|
}
|
|
|
|
|
`}
|
|
|
|
|
</style>
|
|
|
|
|
<style>{
|
|
|
|
|
`
|
|
|
|
|
.yslzxueshi .ant-input{
|
|
|
|
|
border-right: none !important;
|
|
|
|
|
height: 40px !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}</style>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="总学时"
|
|
|
|
|
hasFeedback
|
|
|
|
@ -795,18 +802,25 @@ class Goldsubject extends Component {
|
|
|
|
|
{getFieldDecorator("period",
|
|
|
|
|
{
|
|
|
|
|
rules:[{
|
|
|
|
|
required:false,
|
|
|
|
|
pattern: new RegExp(/^[0-9]\d*$/, "g"),
|
|
|
|
|
message: ''
|
|
|
|
|
}],
|
|
|
|
|
getValueFromEvent: (event) => {
|
|
|
|
|
return event.target.value.replace(/\D/g,'')
|
|
|
|
|
}}
|
|
|
|
|
pattern: new RegExp(/^[1-9]\d*$/, "g"),
|
|
|
|
|
message: '必须是数值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
max:4,
|
|
|
|
|
message: '不能超过5个字符',
|
|
|
|
|
}]}
|
|
|
|
|
)(
|
|
|
|
|
<Input id="period" className="greyInput " placeholder="例如:30"/>
|
|
|
|
|
<Input id="period" placeholder="例如:30" className="yslzxueshi" addonAfter={String(addonAfteronelen)+"/5"} />
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<style>{
|
|
|
|
|
`
|
|
|
|
|
.yslzxuefen .ant-input{
|
|
|
|
|
border-right: none !important;
|
|
|
|
|
height: 40px !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}</style>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="学分"
|
|
|
|
|
hasFeedback
|
|
|
|
@ -814,15 +828,16 @@ class Goldsubject extends Component {
|
|
|
|
|
{getFieldDecorator("credit",
|
|
|
|
|
{
|
|
|
|
|
rules:[{
|
|
|
|
|
required:false,
|
|
|
|
|
pattern: new RegExp(/^[0-9]\d*$/, "g"),
|
|
|
|
|
message: ''
|
|
|
|
|
}],
|
|
|
|
|
getValueFromEvent: (event) => {
|
|
|
|
|
return event.target.value.replace(/\D/g,'')
|
|
|
|
|
}}
|
|
|
|
|
pattern: new RegExp(/^[1-9]\d*$/, "g"),
|
|
|
|
|
message: '必须是数值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
max:4,
|
|
|
|
|
message: '不能超过5个字符',
|
|
|
|
|
}
|
|
|
|
|
]}
|
|
|
|
|
)(
|
|
|
|
|
<Input id="credit" className={"greyInput "} placeholder="例如:3"/>
|
|
|
|
|
<Input id="credit" placeholder="例如:3" className="yslzxuefen" addonAfter={String(addonAfteronelens)+"/5"} />
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
@ -884,25 +899,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>
|
|
|
|
|