Ver código fonte

增加未到时间,不加基数

cyy 1 ano atrás
pai
commit
7a1648869b
1 arquivos alterados com 31 adições e 6 exclusões
  1. 31 6
      src/views/system/jbdHome/board/checkBoard.vue

+ 31 - 6
src/views/system/jbdHome/board/checkBoard.vue

@@ -375,6 +375,16 @@
                         }
                         compile[index]++
                     })
+                    let nDate = new Date()
+                    let xDate = this.month.split('-')
+                    if(nDate.getFullYear()<=xDate[0]*1)(
+                        reports.forEach((item,i)=>{
+                            if(i>nDate.getMonth()){
+                                reports[i] = item-this.baseNum
+                            }
+                        })
+                    )
+                    
                     // let taskCount = task.reduce((pre, cur) => pre + cur)
                     // let completeCount = complete.reduce((pre, cur) => pre + cur)
                     // let year = [
@@ -387,16 +397,31 @@
                     //         value: completeCount
                     //     }
                     // ]
+                    // console.log(reports,'rrrrrrrrrrrrrrrr')
                     let sample = [data5[0].unReceive, data4[0].receive, data4[0].incomplete, data4[0].keep]
-                    this.bottomCardData.trust = trust
-                    this.bottomCardData.accepted = accepted
-                    this.bottomCardData.reports = reports
-                    this.middleCardData.reports = reports
-                    this.bottomCardData.compile = compile
+                    // this.bottomCardData.trust = trust
+                    // this.bottomCardData.accepted = accepted
+                    // this.bottomCardData.reports = reports
+                    // this.middleCardData.reports = reports
+                    // this.bottomCardData.compile = compile
+                    this.$set(this.bottomCardData,'trust',trust)
+                    this.$set(this.bottomCardData,'accepted',accepted)
+                    this.$set(this.bottomCardData,'reports',reports)
+                    this.$set(this.middleCardData,'reports',reports)
+                    this.$set(this.bottomCardData,'compile',compile)
+
+
+
+
+
                     // this.bottomCardData.task = task
                     // this.bottomCardData.complete = complete
                     // this.bottomCardData.year = year
-                    this.bottomCardData.sample = sample
+                    // this.bottomCardData.sample = sample
+                    this.$set(this.bottomCardData,'sample',sample)
+
+
+
                     this.middleCardData.flag = true
 
                     this.bottomCardData.flag = true