-
+
-
+
+
+
+
-
-
-
-
-
-
-
diff --git a/src/libs/util.js b/src/libs/util.js index 79c63f6..90d034c 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -106,15 +106,15 @@ const util = { }, // 成功提示 successMsg(message) { - Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500}) + Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000}) }, // 警告提示 warningMsg(message) { - Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500}) + Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000}) }, // 错误提示 errorMsg(message) { - Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500}) + Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000}) }, } diff --git a/src/mixins/examDo/index.js b/src/mixins/examDo/index.js index fc4f7d1..df54629 100644 --- a/src/mixins/examDo/index.js +++ b/src/mixins/examDo/index.js @@ -29,6 +29,12 @@ export default { }, updateProgress(item,isFillBlank){ let subjects = this.subjects + + let singleAnswered = [] + let multipleAnswered = [] + let judgeAnswered = [] + let fillBlankAnswered = [] + let briefAnswerAnswered = [] if(isFillBlank){ let index = item.getAttribute('data-index') if([...item.parentElement.querySelectorAll('input')].some(n => n.value)){ @@ -37,12 +43,35 @@ export default { subjects[3][index].hadAnswer = 0 } this.fillBlankAnsweredCount = subjects[3].filter(n => n.hadAnswer).length + subjects[3].map((n,i) => { + n.hadAnswer && fillBlankAnswered.push(i) + }) + this.fillBlankAnswered = fillBlankAnswered }else{ this.singleAnsweredCount = subjects[0].filter(n => n.val).length this.multipleAnsweredCount = subjects[1].filter(n => n.val.length).length this.judgeAnsweredCount = subjects[2].filter(n => n.val).length this.briefAnswerAnsweredCount = subjects[4].filter(n => n.val).length + + subjects[0].map((n,i) => { + n.val && singleAnswered.push(i) + }) + subjects[1].map((n,i) => { + n.val.length && multipleAnswered.push(i) + }) + subjects[2].map((n,i) => { + n.val && judgeAnswered.push(i) + }) + subjects[4].map((n,i) => { + n.val && briefAnswerAnswered.push(i) + }) + + this.singleAnswered = singleAnswered + this.multipleAnswered = multipleAnswered + this.judgeAnswered = judgeAnswered + this.briefAnswerAnswered = briefAnswerAnswered } + let answered = this.singleAnsweredCount + this.multipleAnsweredCount + this.judgeAnsweredCount + this.fillBlankAnsweredCount + this.briefAnswerAnsweredCount this.progress = this.totalLen ? Math.floor((answered / this.totalLen * 100)) : 0 }, diff --git a/src/pages/achievement/assessment/index.vue b/src/pages/achievement/assessment/index.vue index 38961f3..1db668f 100644 --- a/src/pages/achievement/assessment/index.vue +++ b/src/pages/achievement/assessment/index.vue @@ -87,8 +87,6 @@
单选题(共{{singleCount}}题,合计{{singlePoint}}分)
+单选题({{singlePoint}}分/{{singleCount}}题,合计{{singlePoint * singleCount}}分)
多选题(共{{multipleCount}}题,合计{{multipleChoiceScore}}分)
+多选题({{multipleChoiceScore}}分/{{multipleCount}}题,合计{{multipleChoiceScore * multipleCount}}分)
判断题(共{{judgeCount}}题,合计{{judgeScore}}分)
+判断题({{judgeScore}}分/{{judgeCount}}题,合计{{judgeScore * judgeCount}}分)
填空题(共{{fillBlankCount}}题,合计{{fillBlanksScore}}分)
+填空题({{fillBlanksScore}}分/{{fillBlankCount}}题,合计{{fillBlanksScore * fillBlankCount}}分)
简答题(共{{briefAnswerCount}}题,合计{{briefAnswerScore}}分)
+简答题({{briefAnswerScore}}分/{{briefAnswerCount}}题,合计{{briefAnswerScore * briefAnswerCount}}分)
单选题(共{{singleCount}}题,合计{{singlePoint}}分)
+单选题({{singlePoint}}分/{{singleCount}}题,合计{{singlePoint * singleCount}}分)
多选题(共{{multipleCount}}题,合计{{multipleChoiceScore}}分)
+多选题({{multipleChoiceScore}}分/{{multipleCount}}题,合计{{multipleChoiceScore * multipleCount}}分)
判断题(共{{judgeCount}}题,合计{{judgeScore}}分)
+判断题({{judgeScore}}分/{{judgeCount}}题,合计{{judgeScore * judgeCount}}分)
填空题(共{{fillBlankCount}}题,合计{{fillBlanksScore}}分)
+填空题({{fillBlanksScore}}分/{{fillBlankCount}}题,合计{{fillBlanksScore * fillBlankCount}}分)
简答题(共{{briefAnswerCount}}题,合计{{briefAnswerScore}}分)
+简答题({{briefAnswerScore}}分/{{briefAnswerCount}}题,合计{{briefAnswerScore * briefAnswerCount}}分)
{{scope.row.duration | defaultShow}}
@@ -75,7 +75,7 @@ export default { keyword: function(val) { clearTimeout(this.searchTimer) this.searchTimer = setTimeout(() => { - this.getData() + this.initData() },500) } }, @@ -92,6 +92,10 @@ export default { this.total = res.data.pageUtils.totalCount }).catch(res => {}) }, + initData(){ + this.page = 1 + this.getData() + }, handleDelete(row) { this.$confirm('确定要删除吗?', '提示', { type: 'warning' @@ -105,11 +109,11 @@ export default { .catch(() => {}); }, handleSelectionChange(val) { - this.multipleSelection = val; + this.multipleSelection = val }, handleCurrentChange(val) { - this.page = val; - this.getData(); + this.page = val + this.getData() }, practice(row){ if(row.isHava){ @@ -118,6 +122,7 @@ export default { title: '提示', confirmButtonText: '是', cancelButtonText: '否', + customClass: 'normal' }).then(_ => { this.toDo(row,0) }).catch(() => { diff --git a/src/pages/practice/list/randomPractice.vue b/src/pages/practice/list/randomPractice.vue index ce2f719..9844cf5 100644 --- a/src/pages/practice/list/randomPractice.vue +++ b/src/pages/practice/list/randomPractice.vue @@ -52,7 +52,7 @@ export default { keyword: function(val) { clearTimeout(this.searchTimer) this.searchTimer = setTimeout(() => { - this.getData() + this.initData() },500) } }, @@ -66,6 +66,10 @@ export default { this.total = res.data.list.totalCount }).catch(res => {}) }, + initData(){ + this.page = 1 + this.getData() + }, handleSelectionChange(val) { this.multipleSelection = val }, diff --git a/src/pages/practice/randomDo/index.vue b/src/pages/practice/randomDo/index.vue index a99454b..8e1412d 100644 --- a/src/pages/practice/randomDo/index.vue +++ b/src/pages/practice/randomDo/index.vue @@ -4,34 +4,34 @@单选题(共{{singleCount}}题,合计{{singlePoint}}分)
+单选题({{avgScore}}分/{{singleCount}}题,合计{{singleCount * avgScore}}分)
多选题(共{{multipleCount}}题,合计{{multipleChoiceScore}}分)
+多选题({{avgScore}}分/{{multipleCount}}题,合计{{multipleCount * avgScore}}分)
判断题(共{{judgeCount}}题,合计{{judgeScore}}分)
+判断题({{avgScore}}分/{{judgeCount}}题,合计{{judgeCount * avgScore}}分)
填空题(共{{fillBlankCount}}题,合计{{fillBlanksScore}}分)
+填空题({{avgScore}}分/{{fillBlankCount}}题,合计{{fillBlankCount * avgScore}}分)
简答题(共{{briefAnswerCount}}题,合计{{briefAnswerScore}}分)
+简答题({{avgScore}}分/{{briefAnswerCount}}题,合计{{briefAnswerCount * avgScore}}分)