var indata = this.questionList.filter( element => { var i=0, xuanx =false; if(element.type == "1"|element.type == "2"){ screenOptions.forEach((element1,index) => { xuanx = element.options.find( item => { console.log(index) return (item.content == screenOptions[index].content&item.index == screenOptions[index].code) },index ) }); // xuanx = element.options.find( // item => { // return (item.content == screenOptions[0].content&item.index == screenOptions[0].code) // } // ) }else if(element.type == "4"){ screenOptions.forEach((element1,index) => { xuanx = element.fillAnswer.find( item => { console.log(index) return (item.answer == screenOptions[index].answer&item.fillNo == screenOptions[index].fillNo) },index ) }); // xuanx = element.fillAnswer.find( // item => { // return (item.answer == screenOptions[0].answer&item.fillNo == screenOptions[0].fillNo) // } // ) }else if(element.type == "3"|element.type == "5"){ i=1 } if(xuanx){ i++ } console.log(xuanx,i) return ( element.courseId==this.courseId& element.knowledgeId== this.knowledgeId& element.difficulty== this.difficulty& element.type== this.questionType& element.title== quesInfo.title& element.analysis== quesInfo.analysis& element.answer== quesInfo.answer& element.score== quesInfo.score&i ) } )