|
@@ -7,7 +7,7 @@
|
|
|
|
|
|
<!-- <span class="btn-back" @click="handleBackTo" ref="btnBack"><Icon type="ios-arrow-back" />{{$t('totalAnalysis.ql_text13')}}</span> -->
|
|
|
<Loading :top="300" v-show="dataLoading" type="3"></Loading>
|
|
|
- <ExerciseList :propsList="questionList" :examScope="examScope" isAnalysis @pageScroll="doScroll" ref="exList"></ExerciseList>
|
|
|
+ <ExerciseList :propsList="questionList" :examScope="examScope" isAnalysis @pageScroll="doScroll" ref="exList" isShowAnalysis></ExerciseList>
|
|
|
</div>
|
|
|
|
|
|
<!-- 右侧题目列表题型概览 -->
|
|
@@ -111,16 +111,6 @@
|
|
|
ConnectorList: [],
|
|
|
CorrectList: [],
|
|
|
ComposeList: [],
|
|
|
- typeTransfer: {
|
|
|
- 'single': '单选',
|
|
|
- 'multiple': '多选',
|
|
|
- 'judge': '判断',
|
|
|
- 'complete': '填空',
|
|
|
- 'subjective': '主观',
|
|
|
- 'connector': '连线',
|
|
|
- 'correct': '改错',
|
|
|
- 'compose': '综合'
|
|
|
- },
|
|
|
diffColors: ['#32CF74', '#E8BE15', '#F19300', '#EB5E00', '#D30000'],
|
|
|
dataColumns: [
|
|
|
{
|
|
@@ -350,7 +340,11 @@
|
|
|
})
|
|
|
this.flatList = allItems
|
|
|
console.log('拉平后的题目',allItems)
|
|
|
+ // 获取当前试题的分析数据
|
|
|
+ let itemAnalysisArr = this.getExerciseList()
|
|
|
+ console.log(JSON.stringify(itemAnalysisArr))
|
|
|
this.$nextTick(() => {
|
|
|
+ console.log(this.$refs['indexRef' + (qIndex - 1)][0])
|
|
|
setTimeout(() => {
|
|
|
this.$refs['indexRef' + (qIndex - 1)][0].click() // 根据路由携带的题序 来触发对应题序的点击事件 完成滚动
|
|
|
}, 1000)
|
|
@@ -397,9 +391,9 @@
|
|
|
let questionList = this.$refs.exList.$el.getElementsByClassName('exercise-item')
|
|
|
let itemIndex = this.questionList.indexOf(item)
|
|
|
let questionDom = questionList[itemIndex]
|
|
|
- questionDom.style.border = '3px solid #2db7f5'
|
|
|
+ questionDom.style.border = '2px solid #2db7f5'
|
|
|
setTimeout(() => {
|
|
|
- questionDom.style.border = 'none'
|
|
|
+ questionDom.style.border = '2px solid transparent'
|
|
|
},2000)
|
|
|
this.doScroll(questionDom.offsetTop)
|
|
|
// 伪数组处理统一背景颜色
|
|
@@ -408,9 +402,6 @@
|
|
|
})
|
|
|
// 将当前选中项修改选中色
|
|
|
currentSpan.style.background = '#139c51'
|
|
|
-
|
|
|
- console.log(itemIndex)
|
|
|
- console.log(this.$refs.exList)
|
|
|
this.$refs.exList.collapseList = [itemIndex]
|
|
|
})
|
|
|
|
|
@@ -427,7 +418,7 @@
|
|
|
handleCollapseChange(val) {
|
|
|
let questionIndex = val[0]
|
|
|
if (questionIndex === '999') return
|
|
|
- if (questionIndex && this.collapseList.indexOf(questionIndex) === -1 && questionIndex !== '999') {
|
|
|
+ if (questionIndex && this.collapseList.indexOf(questionIndex) === -1) {
|
|
|
this.collapseList.push(questionIndex)
|
|
|
this.activeCollapseIndex = questionIndex
|
|
|
} else if (questionIndex === 0) {
|
|
@@ -448,7 +439,27 @@
|
|
|
return 0
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 获取所有试题的对应分析数据 */
|
|
|
+ getExerciseList() {
|
|
|
+ let analysisJson = JSON.parse(JSON.stringify(this.getAnalysisJson))
|
|
|
+ let curSubjectIndex = analysisJson.subjects.map(i => i.name).indexOf(this.$store.state.totalAnalysis
|
|
|
+ .currentSubject)
|
|
|
+ let result = []
|
|
|
+ analysisJson.paper[curSubjectIndex].Value.forEach((exercise, exerciseIndex) => {
|
|
|
+ let obj = {}
|
|
|
+ analysisJson.paperKey.forEach((key, index) => {
|
|
|
+ obj[key] = exercise[index]
|
|
|
+ })
|
|
|
+
|
|
|
+ analysisJson.classes.forEach(classItem => {
|
|
|
+ obj[classItem.className] = classItem.subjects[curSubjectIndex].item[exerciseIndex]
|
|
|
+ })
|
|
|
+ result.push(obj)
|
|
|
+ })
|
|
|
+ return result
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
@@ -459,6 +470,8 @@
|
|
|
})
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
|
|
|
},
|
|
|
|
|
@@ -469,8 +482,8 @@
|
|
|
return top
|
|
|
},
|
|
|
// 获取最新试题数据
|
|
|
- getExerciseData() {
|
|
|
- return this.$store.state.totalAnalysis.exerciseData
|
|
|
+ getAnalysisJson() {
|
|
|
+ return this.$store.state.totalAnalysis.analysisJson
|
|
|
},
|
|
|
// 替换题序
|
|
|
getIndexOrder(){
|
|
@@ -488,12 +501,6 @@
|
|
|
// box.style.top = this.scrollTop >= 129 ? '100px' : (t + 'px')
|
|
|
// btnBack.style.top = this.scrollTop >= 129 ? (this.scrollTop - 152) + 'px' : '0px'
|
|
|
},
|
|
|
- // 渲染最新试题统计数据
|
|
|
- getExerciseData(val) {
|
|
|
- if (!val) return
|
|
|
- this.tableData = JSON.parse(JSON.stringify(val))
|
|
|
- console.log(this.tableData)
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</script>
|