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