liqk 4 years ago
parent
commit
2ba61e2b51
1 changed files with 6 additions and 2 deletions
  1. 6 2
      TEAMModelOS/ClientApp/src/view/task/index.vue

+ 6 - 2
TEAMModelOS/ClientApp/src/view/task/index.vue

@@ -319,7 +319,10 @@ export default {
                 res => {
                     if (!res.error) {
                         this.markList = res.tasks
-                        this.curTaskIndex = sessionStorage.getItem('markIndex') || 0
+                        let ch = sessionStorage.getItem('markIndex')
+                        ch = ch || 0
+                        ch = ch > this.markList.length - 1 ? 0 : ch
+                        this.curTaskIndex = ch || 0
                         if (this.markList.length > 0) this.findTaskData()
                     } else {
                         this.$Message.error('API error!')
@@ -370,9 +373,10 @@ export default {
         //当前阅卷任务未阅数量
         unmarked() {
             if (this.markList.length > 0) {
+                console.log(this.curTaskIndex,this.markList)
                 let total = this.markList[this.curTaskIndex].count
                 let marked = this.markData ? this.markData.attr.length : 0
-                
+                return total - marked
             } else {
                 return 0
             }