|
|
|
@ -9,6 +9,8 @@ import {
|
|
|
|
|
import CoursesListType from '../coursesPublic/CoursesListType';
|
|
|
|
|
import Generaljobdetails from './Generaljobdetails';
|
|
|
|
|
import Generaljobanswer from './Generaljobanswer';
|
|
|
|
|
import SendTopics from '../../modals/SendTopics';
|
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
|
import '../css/members.css';
|
|
|
|
|
import "../common/formCommon.css";
|
|
|
|
|
import '../css/Courses.css';
|
|
|
|
@ -25,6 +27,7 @@ class Generaljobbankdetails extends Component {
|
|
|
|
|
workid:1,
|
|
|
|
|
isSpin:false,
|
|
|
|
|
datas:[],
|
|
|
|
|
visible:false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -128,21 +131,92 @@ class Generaljobbankdetails extends Component {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//发送至相关
|
|
|
|
|
sendTopics=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
visible:true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bindRef = ref => { this.child = ref }
|
|
|
|
|
///////////////教师截止
|
|
|
|
|
topicscancelmodel=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:false,
|
|
|
|
|
Loadtype:false,
|
|
|
|
|
visible:false,
|
|
|
|
|
Modalstopval:"",
|
|
|
|
|
ModalCancel:"",
|
|
|
|
|
ModalSave:"",
|
|
|
|
|
checkBoxValues:[],
|
|
|
|
|
checkedtype:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//删除相关
|
|
|
|
|
|
|
|
|
|
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:"normal"
|
|
|
|
|
}})
|
|
|
|
|
.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 {tab,datas} = this.state;
|
|
|
|
|
let {tab,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={"normal"}
|
|
|
|
|
checkBoxValues={[this.props.match.params.workid]}
|
|
|
|
|
topicscancelmodel={()=>this.topicscancelmodel()}
|
|
|
|
|
/>:""
|
|
|
|
|
}
|
|
|
|
|
<div className={"educontent mt10 mb20"} style={{width: "1200px"}}>
|
|
|
|
|
|
|
|
|
|
{/*<div className="educontent mb20">*/}
|
|
|
|
@ -168,9 +242,9 @@ class Generaljobbankdetails extends Component {
|
|
|
|
|
<div className=" clearfix edu-back-white poll_list">
|
|
|
|
|
<a className={parseInt(tab) === 0 ? "active ml12" : "ml12"} onClick={(e) => this.ChangeTab(0)}>内容详情</a>
|
|
|
|
|
<a className={parseInt(tab) === 1 ? "active ml12" : "ml12"} onClick={(e) => this.ChangeTab(1)}>参考答案</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/normal/${this.props.match.params.workid}/edit`} >编辑</Link>
|
|
|
|
|
<a className="fr color-blue font-16 pointer" onClick={()=>this.deletecheckBoxValues()}>删除</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|