newyslclassrooms
杨树林 5 years ago
parent 2aeda266d5
commit 5f003b3a4b

@ -327,7 +327,9 @@ class Fileslistitem extends Component {
</style> </style>
{ {
discussMessage.link && discussMessage.link ? discussMessage.link && discussMessage.link ?
<p className="fl mt3 fwlz pointer">外链</p> <p className="fl mt3 fwlz " style={{
cursor:"auto"
}}>外链</p>
: :
"" ""
} }

@ -598,7 +598,8 @@ class Fileslists extends Component{
this.setState({ this.setState({
Addanexternallink:false, Addanexternallink:false,
title: "", title: "",
link: "" link: "",
discussMessageid:null,
}) })
if(ints===1){ if(ints===1){
this.Updateresourcepage(); this.Updateresourcepage();
@ -896,6 +897,7 @@ class Fileslists extends Component{
categoryid={category_id} categoryid={category_id}
setupdate={(ints,bool)=>this.sendResourcessls(ints,bool)} setupdate={(ints,bool)=>this.sendResourcessls(ints,bool)}
has_course_groups={this.state.has_course_groups} has_course_groups={this.state.has_course_groups}
course_id={this.props.match.params.coursesId}
attachmentId={this.state.coursesecondcategoryid} attachmentId={this.state.coursesecondcategoryid}
/>:""} />:""}
{/*设置资源*/} {/*设置资源*/}

@ -62,7 +62,7 @@ class sendResources extends Component{
componentDidMount() { componentDidMount() {
let {discussMessageid} =this.props;
try { try {
this.setState({ this.setState({
resourcesname:this.props.title, resourcesname:this.props.title,
@ -72,9 +72,45 @@ class sendResources extends Component{
}catch (e) { }catch (e) {
} }
console.log(discussMessageid);
try {
if(discussMessageid){
this.getalldata();
}
}catch (e) {
}
}
getalldata=()=>{
let {discussMessageid} =this.props;
let course_id=this.props.course_id;
let url="/files/"+discussMessageid+".json";
axios.get(url, {
params:{
course_id:course_id,
}
})
.then((response) => {
if(response.status===200){
this.setState({
datalist:response.data,
description: response.data.description,
is_public:response.data.is_public,
datatime:response.data.publish_time,
Radiovalue:response.data.delay_publish==false?0:1,
//attachment_histories:response.data.attachment_histories
})
} }
})
.catch(function (error) {
console.log(error);
});
}
//勾选实训 //勾选实训
shixunhomeworkedit=(list)=>{ shixunhomeworkedit=(list)=>{

Loading…
Cancel
Save