资源模块调整

dev_auth
杨树明 5 years ago
parent c1a88b7dfe
commit 2cedb6da30

@ -745,6 +745,7 @@ class Fileslists extends Component{
{/*选择资源*/} {/*选择资源*/}
{shixunmodal&&shixunmodal===true?<Selectresource {shixunmodal&&shixunmodal===true?<Selectresource
{...this.props} {...this.props}
{...this.state}
visible={this.state.shixunmodal} visible={this.state.shixunmodal}
shixunmodallist={this.state.shixunmodallist} shixunmodallist={this.state.shixunmodallist}
newshixunmodallist={this.state.newshixunmodallist} newshixunmodallist={this.state.newshixunmodallist}
@ -760,6 +761,7 @@ class Fileslists extends Component{
{/*上传资源*/} {/*上传资源*/}
{Accessoryvisible&&Accessoryvisible===true?<Sendresource {Accessoryvisible&&Accessoryvisible===true?<Sendresource
{...this.props} {...this.props}
{...this.state}
modalname={"上传资源"} modalname={"上传资源"}
visible={Accessoryvisible} visible={Accessoryvisible}
Cancelname={"取消"} Cancelname={"取消"}
@ -773,6 +775,7 @@ class Fileslists extends Component{
{/*设置资源*/} {/*设置资源*/}
{Settingtype&&Settingtype===true?<Selectsetting {Settingtype&&Settingtype===true?<Selectsetting
{...this.props} {...this.props}
{...this.state}
Settingtype={Settingtype} Settingtype={Settingtype}
discussMessageid={discussMessageid} discussMessageid={discussMessageid}
course_id={this.props.match.params.coursesId} course_id={this.props.match.params.coursesId}

@ -38,7 +38,8 @@ class Selectsetting extends Component{
datatime:undefined, datatime:undefined,
fileList:[], fileList:[],
fileListtype:false, fileListtype:false,
is_public:false is_public:false,
Radiovaluetype:false
} }
} }
@ -153,6 +154,19 @@ class Selectsetting extends Component{
newfileList.push(list.response.id) newfileList.push(list.response.id)
} }
if(this.state.Radiovalue===1){
if(datatime===undefined||datatime===null||datatime=== ""){
this.setState({
Radiovaluetype:true
})
return
}else{
this.setState({
Radiovaluetype:false
})
}
}
if(description===undefined||description===null){ if(description===undefined||description===null){
}else if(description.length>100){ }else if(description.length>100){
@ -241,10 +255,18 @@ class Selectsetting extends Component{
fileList:[] fileList:[]
}) })
} }
} }
onChangepublic=(e)=>{
this.setState({
is_public:e.target.checked
})
}
RadioonChange=(e)=>{
this.setState({
Radiovalue: e.target.value,
});
}
render(){ render(){
let {datatime,description,datalist}=this.state; let {datatime,description,datalist}=this.state;
@ -479,16 +501,6 @@ class Selectsetting extends Component{
margin-top:10px; margin-top:10px;
} }
`}</style> `}</style>
{this.props.course_is_public===true?<div>
<span className={"color-ooo"}>公开</span><Checkbox checked={this.state.is_public} onChange={this.onChangepublic}>
<span className={"font-14 color-ooo"}>选中所有用户可见否则课堂成员可见</span>
</Checkbox>
</div>:""}
<style> <style>
{` {`
.Selectleft20{ .Selectleft20{
@ -502,7 +514,11 @@ class Selectsetting extends Component{
} }
`} `}
</style> </style>
{this.props.course_is_public===true?<div>
<span className={"color-ooo"}>公开</span><Checkbox checked={this.state.is_public} onChange={this.onChangepublic}>
<span className={"font-14 color-ooo"}>选中所有用户可见否则课堂成员可见</span>
</Checkbox>
</div>:""}
</p> </p>
<style> <style>
{` {`
@ -548,6 +564,7 @@ class Selectsetting extends Component{
padding: '10px' padding: '10px'
}}></textarea> }}></textarea>
{this.state.descriptiontypes===true?<p className={"color-red"}>描述不能超过最大限制100个字符</p>:""} {this.state.descriptiontypes===true?<p className={"color-red"}>描述不能超过最大限制100个字符</p>:""}
{this.state.Radiovaluetype===true?<p className={"color-red"}>发布时间不能为空</p>:""}
</div> </div>
<div className="mt20 marginauto clearfix edu-txt-center"> <div className="mt20 marginauto clearfix edu-txt-center">

Loading…
Cancel
Save