|
|
|
@ -7,14 +7,15 @@ import axios from 'axios';
|
|
|
|
|
import Modals from '../../../modals/Modals';
|
|
|
|
|
import Associationmodel from '../../coursesPublic/Associationmodel';
|
|
|
|
|
import AccessoryModal from "../../coursesPublic/AccessoryModal";
|
|
|
|
|
|
|
|
|
|
import LoginDialog from "../../../login/LoginDialog";
|
|
|
|
|
|
|
|
|
|
class GraduateTaskItem extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
|
|
|
|
modalname:"关联项目",
|
|
|
|
|
visible:false
|
|
|
|
|
visible:false,
|
|
|
|
|
isRender:false,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -32,6 +33,11 @@ class GraduateTaskItem extends Component{
|
|
|
|
|
// isrelate:is_relate
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
Modifyloginvalue=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
isRender:false,
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cannelAssociation=()=>{
|
|
|
|
|
|
|
|
|
@ -132,7 +138,24 @@ class GraduateTaskItem extends Component{
|
|
|
|
|
|
|
|
|
|
setupdate=()=>{
|
|
|
|
|
this.props.funlist
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
showfiles =(url)=>{
|
|
|
|
|
// console.log("ShixunhomeWorkItemshowfiles");
|
|
|
|
|
// console.log( this.props.current_user.username);
|
|
|
|
|
try {
|
|
|
|
|
if(this.props.current_user.username==="游客"){
|
|
|
|
|
this.setState({
|
|
|
|
|
isRender:true,
|
|
|
|
|
match:"",
|
|
|
|
|
});
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
}
|
|
|
|
|
this.props.history.push(url);
|
|
|
|
|
// this.props.current_user
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
render(){
|
|
|
|
|
let {
|
|
|
|
|
Modalstype,
|
|
|
|
@ -142,7 +165,8 @@ class GraduateTaskItem extends Component{
|
|
|
|
|
cardsModalsavetype,
|
|
|
|
|
loadtype,
|
|
|
|
|
modalname,
|
|
|
|
|
visible
|
|
|
|
|
visible,
|
|
|
|
|
isRender
|
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
const { checkBox,
|
|
|
|
@ -165,7 +189,11 @@ class GraduateTaskItem extends Component{
|
|
|
|
|
modalSave={cardsModalsavetype}
|
|
|
|
|
loadtype={loadtype}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{isRender===true?<LoginDialog
|
|
|
|
|
Modifyloginvalue={()=>this.Modifyloginvalue()}
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
/>:""}
|
|
|
|
|
{visible===true?<Associationmodel
|
|
|
|
|
modalname={modalname}
|
|
|
|
|
visible={visible}
|
|
|
|
@ -218,13 +246,13 @@ class GraduateTaskItem extends Component{
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
this.props.isAdmin?<Link
|
|
|
|
|
to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list"}
|
|
|
|
|
onClick={()=>this.showfiles("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
|
|
|
|
|
title={discussMessage.name}
|
|
|
|
|
className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
this.props.isStudent? <Link
|
|
|
|
|
to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list"}
|
|
|
|
|
onClick={()=>this.showfiles("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
|
|
|
|
|
title={discussMessage.name}
|
|
|
|
|
className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
|
|
|
|
|
}
|
|
|
|
@ -232,8 +260,7 @@ class GraduateTaskItem extends Component{
|
|
|
|
|
{
|
|
|
|
|
this.props.isNotMember===true?this.props.discussMessage.private_icon===true?
|
|
|
|
|
<span className=" fl mt3 font-16 font-bd color-dark maxwidth580" title={discussMessage.name}>{discussMessage.name}</span>
|
|
|
|
|
:<a
|
|
|
|
|
href={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list"}
|
|
|
|
|
:<a onClick={()=>this.showfiles("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list")}
|
|
|
|
|
title={discussMessage.name}
|
|
|
|
|
className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
|
|
|
|
|
}
|
|
|
|
|