|  |  | @ -103,11 +103,11 @@ class Poll extends Component{ | 
			
		
	
		
		
			
				
					
					|  |  |  |     this.InitList(e.key,StudentList_value,page); |  |  |  |     this.InitList(e.key,StudentList_value,page); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |   // 获取列表数据
 |  |  |  |   // 获取列表数据
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   InitList=(type,search,page)=>{ |  |  |  |   InitList=(type,search,page,bank_checkValue)=>{ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     this.setState({ |  |  |  |     this.setState({ | 
			
		
	
		
		
			
				
					
					|  |  |  |       isSpin:true |  |  |  |       isSpin:true | 
			
		
	
		
		
			
				
					
					|  |  |  |     }) |  |  |  |     }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     let {pageSize}=this.state |  |  |  |     let { pageSize,checkBoxValues }=this.state | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     let coursesId=this.props.match.params.coursesId; |  |  |  |     let coursesId=this.props.match.params.coursesId; | 
			
		
	
		
		
			
				
					
					|  |  |  |     let url='/courses/'+coursesId+'/polls.json?limit='+pageSize+'&page='+page |  |  |  |     let url='/courses/'+coursesId+'/polls.json?limit='+pageSize+'&page='+page | 
			
		
	
		
		
			
				
					
					|  |  |  |     if(type!="0"){ |  |  |  |     if(type!="0"){ | 
			
		
	
	
		
		
			
				
					|  |  | @ -123,7 +123,7 @@ class Poll extends Component{ | 
			
		
	
		
		
			
				
					
					|  |  |  |           course_types:result.data.course_types, |  |  |  |           course_types:result.data.course_types, | 
			
		
	
		
		
			
				
					
					|  |  |  |           polls_counts:result.data.polls_counts, |  |  |  |           polls_counts:result.data.polls_counts, | 
			
		
	
		
		
			
				
					
					|  |  |  |           isSpin:false, |  |  |  |           isSpin:false, | 
			
		
	
		
		
			
				
					
					|  |  |  | 					checkBoxValues:[] |  |  |  | 					checkBoxValues: bank_checkValue ? bank_checkValue : [] | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         }) |  |  |  |         }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |     }).catch((error)=>{ |  |  |  |     }).catch((error)=>{ | 
			
		
	
	
		
		
			
				
					|  |  | @ -209,12 +209,6 @@ class Poll extends Component{ | 
			
		
	
		
		
			
				
					
					|  |  |  |     //判断是否有选中数据
 |  |  |  |     //判断是否有选中数据
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     if(this.state.checkBoxValues.length==0){ |  |  |  |     if(this.state.checkBoxValues.length==0){ | 
			
		
	
		
		
			
				
					
					|  |  |  |       this.props.showNotification("请先在列表中选择数据"); |  |  |  |       this.props.showNotification("请先在列表中选择数据"); | 
			
		
	
		
		
			
				
					
					|  |  |  |       // this.setState({
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       //   modalsType:true,
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       //   modalsTopval:"请先在列表中选择数据",
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       //   modalsBottomval:'',
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       //   loadtype:true
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       // })
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     }else{ |  |  |  |     }else{ | 
			
		
	
		
		
			
				
					
					|  |  |  |       if(value != "bank"){ |  |  |  |       if(value != "bank"){ | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.setState({ |  |  |  |         this.setState({ | 
			
		
	
	
		
		
			
				
					|  |  | @ -325,15 +319,13 @@ class Poll extends Component{ | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |   // 题库选用成功后,立即发布,刷新页面
 |  |  |  |   // 题库选用成功后,立即发布,刷新页面
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   useBankSuccess=(checkValue,value)=>{ |  |  |  |   useBankSuccess=(checkValue,value)=>{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     debugger; | 
			
		
	
		
		
			
				
					
					|  |  |  |     this.setState({ |  |  |  |     this.setState({ | 
			
		
	
		
		
			
				
					
					|  |  |  |       isSpin:true |  |  |  |       isSpin:true | 
			
		
	
		
		
			
				
					
					|  |  |  |     }) |  |  |  |     }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     let{type,StudentList_value,page}=this.state |  |  |  |     let{type,StudentList_value,page}=this.state | 
			
		
	
		
		
			
				
					
					|  |  |  |     this.InitList(type,StudentList_value,page); |  |  |  |     this.InitList(type,StudentList_value,page,value); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |      |  |  |  |      | 
			
		
	
		
		
			
				
					
					|  |  |  | 		this.setState({ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 			checkBoxValues:[] |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 		}) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     let coursesId=this.props.match.params.coursesId; |  |  |  |     let coursesId=this.props.match.params.coursesId; | 
			
		
	
		
		
			
				
					
					|  |  |  |     let url=`/courses/${coursesId}/polls/publish_modal.json`; |  |  |  |     let url=`/courses/${coursesId}/polls/publish_modal.json`; | 
			
		
	
		
		
			
				
					
					|  |  |  |     axios.get(url,{ |  |  |  |     axios.get(url,{ | 
			
		
	
	
		
		
			
				
					|  |  | @ -351,10 +343,6 @@ class Poll extends Component{ | 
			
		
	
		
		
			
				
					
					|  |  |  |             }) |  |  |  |             }) | 
			
		
	
		
		
			
				
					
					|  |  |  |           } |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.setState({ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           course_groups:list, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 					checkBoxValues:value |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         }) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.setState({ |  |  |  |         this.setState({ | 
			
		
	
		
		
			
				
					
					|  |  |  |           modalname:"立即发布", |  |  |  |           modalname:"立即发布", | 
			
		
	
		
		
			
				
					
					|  |  |  |           modaltype:response.data.un_publish > 0 ? 1 : 2, |  |  |  |           modaltype:response.data.un_publish > 0 ? 1 : 2, | 
			
		
	
	
		
		
			
				
					|  |  | @ -369,6 +357,8 @@ class Poll extends Component{ | 
			
		
	
		
		
			
				
					
					|  |  |  |           Savesname:"立即发布", |  |  |  |           Savesname:"立即发布", | 
			
		
	
		
		
			
				
					
					|  |  |  |           Cancel:this.homeworkhide, |  |  |  |           Cancel:this.homeworkhide, | 
			
		
	
		
		
			
				
					
					|  |  |  |           Saves:this.homeworkstartend, |  |  |  |           Saves:this.homeworkstartend, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           course_groups:list, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 					checkBoxValues:value | 
			
		
	
		
		
			
				
					
					|  |  |  |         }) |  |  |  |         }) | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |     }).catch((error) => { |  |  |  |     }).catch((error) => { | 
			
		
	
	
		
		
			
				
					|  |  | @ -425,7 +415,7 @@ class Poll extends Component{ | 
			
		
	
		
		
			
				
					
					|  |  |  |       addname:undefined, |  |  |  |       addname:undefined, | 
			
		
	
		
		
			
				
					
					|  |  |  |       addnametype:false, |  |  |  |       addnametype:false, | 
			
		
	
		
		
			
				
					
					|  |  |  |       addnametab:undefined, |  |  |  |       addnametab:undefined, | 
			
		
	
		
		
			
				
					
					|  |  |  | 			checkBoxValues:[] |  |  |  | 			// checkBoxValues:[]
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     }) |  |  |  |     }) | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |