Browse Source

3024 检测看板统计基数调整

cyy 1 year ago
parent
commit
cf7d4fd034
1 changed files with 24 additions and 17 deletions
  1. 24 17
      src/views/system/jbdHome/board/checkBoard.vue

+ 24 - 17
src/views/system/jbdHome/board/checkBoard.vue

@@ -80,7 +80,8 @@
                 bottomCardData: {
                     flag: false
                 },
-                timer: null
+                timer: null,
+                baseNum: 0
             }
         },
         // beforeRouteEnter(to, from, next){
@@ -100,16 +101,22 @@
             curdPost('sql', sql).then(res => {
                 const { data = [] } = res.variables || {}
                 this.acceptList = data.map(i => i.lei_xing_ming_che)
-                this.updateAll()
-    
-                if (this.timer){
-                    clearInterval(this.timer)
-                }
                 
-    
-                this.timer = setInterval(() => {
+                
+                const sql1 = 'select bao_gao_ke_xia_za from t_bgsxb'
+                curdPost('sql', sql1).then(res1 => {
+                    const  data1 = res1.variables.data
+                    this.baseNum = data1[0].bao_gao_ke_xia_za * 1
+                    // console.log(data1[0],'ddddddddddddd')
                     this.updateAll()
-                }, 1000 * 10)
+    
+                    if (this.timer){
+                        clearInterval(this.timer)
+                    }
+                    this.timer = setInterval(() => {
+                        this.updateAll()
+                    }, 1000 * 10)
+                })
             })
         },
         beforeDestroy() {
@@ -190,18 +197,18 @@
                                 children: [
                                     {
                                         label: '总数',
-                                        value: yptask
+                                        value: yptask + this.baseNum
                                     },
                                     {
                                         label: '未完成',
-                                        value: yptask - ypFinish
+                                        value: yptask - ypFinish + this.baseNum
                                     },
                                     {
                                         label: '已完成',
-                                        value: ypFinish
+                                        value: ypFinish + this.baseNum
                                     }
                                 ],
-                                unit: ''
+                                unit: ''
                             },
                             // {
                             //     title: '检测',
@@ -226,11 +233,11 @@
                                 children: [
                                     {
                                         label: '总数',
-                                        value: report
+                                        value: report + this.baseNum
                                     },
                                     {
                                         label: '进行中',
-                                        value: report*1 - bgFinish*1
+                                        value: report*1 - bgFinish*1 + this.baseNum
                                     },
                                     // {
                                     //     label: '待审批',
@@ -238,7 +245,7 @@
                                     // },
                                     {
                                         label: '已发放',
-                                        value: bgFinish
+                                        value: bgFinish + this.baseNum
                                     }
                                 ],
                                 unit: '份'
@@ -350,7 +357,7 @@
 
                     let trust = new Array(12).fill(0)
                     let accepted = new Array(12).fill(0)
-                    let reports = new Array(12).fill(0)
+                    let reports = new Array(12).fill(this.baseNum)
                     let compile = new Array(12).fill(0)
                     // let task = new Array(12).fill(0)
                     // let complete = new Array(12).fill(0)