资源模块调整

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

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

@ -38,7 +38,8 @@ class Selectsetting extends Component{
datatime:undefined,
fileList:[],
fileListtype:false,
is_public:false
is_public:false,
Radiovaluetype:false
}
}
@ -153,6 +154,19 @@ class Selectsetting extends Component{
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){
}else if(description.length>100){
@ -241,10 +255,18 @@ class Selectsetting extends Component{
fileList:[]
})
}
}
onChangepublic=(e)=>{
this.setState({
is_public:e.target.checked
})
}
RadioonChange=(e)=>{
this.setState({
Radiovalue: e.target.value,
});
}
render(){
let {datatime,description,datalist}=this.state;
@ -479,16 +501,6 @@ class Selectsetting extends Component{
margin-top:10px;
}
`}</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>
{`
.Selectleft20{
@ -502,7 +514,11 @@ class Selectsetting extends Component{
}
`}
</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>
<style>
{`
@ -548,6 +564,7 @@ class Selectsetting extends Component{
padding: '10px'
}}></textarea>
{this.state.descriptiontypes===true?<p className={"color-red"}>描述不能超过最大限制100个字符</p>:""}
{this.state.Radiovaluetype===true?<p className={"color-red"}>发布时间不能为空</p>:""}
</div>
<div className="mt20 marginauto clearfix edu-txt-center">

Loading…
Cancel
Save