|
|
@ -10,7 +10,8 @@ class SendTopics extends Component{
|
|
|
|
search:null,
|
|
|
|
search:null,
|
|
|
|
Radiolist:undefined,
|
|
|
|
Radiolist:undefined,
|
|
|
|
showcheck:false,
|
|
|
|
showcheck:false,
|
|
|
|
smallisSpin:false
|
|
|
|
smallisSpin:false,
|
|
|
|
|
|
|
|
yslbanksMenu:undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -18,8 +19,13 @@ class SendTopics extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount(){
|
|
|
|
componentDidMount(){
|
|
|
|
|
|
|
|
// console.log("SendTopicssssssssssss");
|
|
|
|
|
|
|
|
// console.log(this.props);
|
|
|
|
let{search}=this.state;
|
|
|
|
let{search}=this.state;
|
|
|
|
this.onupdatalist(search)
|
|
|
|
this.onupdatalist(search)
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
yslbanksMenu:this.props.banksMenu,
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onupdatalist=(search)=>{
|
|
|
|
onupdatalist=(search)=>{
|
|
|
@ -49,6 +55,8 @@ class SendTopics extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onChange=(e)=>{
|
|
|
|
onChange=(e)=>{
|
|
|
|
|
|
|
|
console.log("SendTopics");
|
|
|
|
|
|
|
|
console.log(e);
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
Radiolist:e.target.value
|
|
|
|
Radiolist:e.target.value
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -78,9 +86,60 @@ class SendTopics extends Component{
|
|
|
|
smallisSpin:false
|
|
|
|
smallisSpin:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if(result.data.status===0){
|
|
|
|
if(result.data.status===0){
|
|
|
|
this.props.showNotification(result.data.message)
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
this.props.topicscancelmodel()
|
|
|
|
this.props.topicscancelmodel();
|
|
|
|
|
|
|
|
// result.data.task_ids;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
this.props.updataslist()
|
|
|
|
this.props.updataslist()
|
|
|
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
if(this.props.mysendall===true){
|
|
|
|
|
|
|
|
//详情页面跳过来的
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
var rurls="";
|
|
|
|
|
|
|
|
if(this.state.yslbanksMenu.category==="normal"){
|
|
|
|
|
|
|
|
//普通作业
|
|
|
|
|
|
|
|
rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.task_ids}/setting`;
|
|
|
|
|
|
|
|
}else if(this.state.yslbanksMenu.category==="group"){
|
|
|
|
|
|
|
|
//分组作业
|
|
|
|
|
|
|
|
rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.task_ids}/setting`;
|
|
|
|
|
|
|
|
}else if(this.state.yslbanksMenu.category==="exercise"){
|
|
|
|
|
|
|
|
// 试卷
|
|
|
|
|
|
|
|
rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.task_ids}/student_exercise_list?tab=3`;
|
|
|
|
|
|
|
|
}else if(this.state.yslbanksMenu.category==="poll") {
|
|
|
|
|
|
|
|
//问卷
|
|
|
|
|
|
|
|
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.task_ids}/detail?tab=3`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
window.open(rurls,'_blank');
|
|
|
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
//外部多个列表页跳过来的
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
var rurls="";
|
|
|
|
|
|
|
|
if(this.props.category==="normal"){
|
|
|
|
|
|
|
|
//普通作业
|
|
|
|
|
|
|
|
rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.category_id}`;
|
|
|
|
|
|
|
|
}else if(this.props.category==="group"){
|
|
|
|
|
|
|
|
//分组作业
|
|
|
|
|
|
|
|
rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.category_id}`;
|
|
|
|
|
|
|
|
}else if(this.props.category==="exercise"){
|
|
|
|
|
|
|
|
// 试卷
|
|
|
|
|
|
|
|
rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.category_id}`;
|
|
|
|
|
|
|
|
}else if(this.props.category==="poll") {
|
|
|
|
|
|
|
|
//问卷
|
|
|
|
|
|
|
|
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.category_id}`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
window.open(rurls,'_blank');
|
|
|
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
console.log(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
this.props.showNotification(result.data.message)
|
|
|
|
this.props.showNotification(result.data.message)
|
|
|
|
}
|
|
|
|
}
|
|
|
|