|
|
|
@ -8,6 +8,8 @@ import {
|
|
|
|
|
} from "antd";
|
|
|
|
|
import CoursesListType from '../coursesPublic/CoursesListType';
|
|
|
|
|
import Completetopicdetails from './Completetopicdetails';
|
|
|
|
|
import SendTopics from '../../modals/SendTopics';
|
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
|
import '../css/members.css';
|
|
|
|
|
import "../common/formCommon.css";
|
|
|
|
|
import '../css/Courses.css';
|
|
|
|
@ -23,6 +25,8 @@ class CompletetopicdePage extends Component {
|
|
|
|
|
workid:1,
|
|
|
|
|
isSpin:false,
|
|
|
|
|
datas:[],
|
|
|
|
|
visible:false
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -93,19 +97,89 @@ class CompletetopicdePage extends Component {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 确认是否下载
|
|
|
|
|
//发送至相关
|
|
|
|
|
sendTopics=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
visible:true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
topicscancelmodel=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:false,
|
|
|
|
|
Loadtype:false,
|
|
|
|
|
visible:false,
|
|
|
|
|
Modalstopval:"",
|
|
|
|
|
ModalCancel:"",
|
|
|
|
|
ModalSave:"",
|
|
|
|
|
checkBoxValues:[],
|
|
|
|
|
checkedtype:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//删除相关
|
|
|
|
|
|
|
|
|
|
bindRef = ref => { this.child = ref }
|
|
|
|
|
///////////////教师截止
|
|
|
|
|
deletecheckBoxValues=()=>{
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:true,
|
|
|
|
|
Modalstopval:"是否确认删除?",
|
|
|
|
|
ModalCancel:this.topicscancelmodel,
|
|
|
|
|
ModalSave:this.topicssavedelete,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
topicssavedelete=()=>{
|
|
|
|
|
|
|
|
|
|
const url = `/question_banks/multi_delete.json`;
|
|
|
|
|
axios.delete(url, { data: {
|
|
|
|
|
object_id: [this.props.match.params.workid],
|
|
|
|
|
object_type:"gtopic"
|
|
|
|
|
}})
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
|
window.location.href=`/users/${this.props.current_user.login}/topics/personal`;
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(function (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
});
|
|
|
|
|
this.topicscancelmodel()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let{datas}=this.state;
|
|
|
|
|
let{datas,visible}=this.state;
|
|
|
|
|
// console.log(119)
|
|
|
|
|
|
|
|
|
|
let user_id=this.props.current_user&&this.props.current_user.user_id;
|
|
|
|
|
let user_type=this.props.current_user&&this.props.current_user.user_identity;
|
|
|
|
|
let targetuserid=this.props.data&&this.props.data.id;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="newMain clearfix ">
|
|
|
|
|
{this.state.Modalstype&&this.state.Modalstype===true?<Modals
|
|
|
|
|
modalsType={this.state.Modalstype}
|
|
|
|
|
modalsTopval={this.state.Modalstopval}
|
|
|
|
|
modalCancel={this.state.ModalCancel}
|
|
|
|
|
modalSave={this.state.ModalSave}
|
|
|
|
|
modalsBottomval={this.state.ModalsBottomval}
|
|
|
|
|
loadtype={this.state.Loadtype}
|
|
|
|
|
/>:""}
|
|
|
|
|
{/*发送至弹窗*/}
|
|
|
|
|
{
|
|
|
|
|
visible&&visible===true?
|
|
|
|
|
<SendTopics
|
|
|
|
|
{...this.state}
|
|
|
|
|
{...this.props}
|
|
|
|
|
visible={visible}
|
|
|
|
|
category={"gtopic"}
|
|
|
|
|
checkBoxValues={[this.props.match.params.workid]}
|
|
|
|
|
topicscancelmodel={()=>this.topicscancelmodel()}
|
|
|
|
|
/>:""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className={"educontent mt10 mb20"} style={{width: "1200px"}}>
|
|
|
|
@ -132,9 +206,9 @@ class CompletetopicdePage extends Component {
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE ">
|
|
|
|
|
<div className=" clearfix edu-back-white poll_list">
|
|
|
|
|
<a className="active ml12" >内容详情</a>
|
|
|
|
|
<a className="fr color-blue font-16" >发送</a>
|
|
|
|
|
<a className="fr color-blue font-16" >编辑</a>
|
|
|
|
|
<a className="fr color-blue font-16" >删除</a>
|
|
|
|
|
<a className="fr color-blue font-16 pointer" onClick={()=>this.sendTopics()}>发送</a>
|
|
|
|
|
<Link className="fr color-blue font-16 pointer" to={`/banks/gtopic/${this.props.match.params.workid}/edit`} >编辑</Link>
|
|
|
|
|
<a className="fr color-blue font-16 pointer" onClick={()=>this.deletecheckBoxValues()}>删除</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|