Lijy 2 anos atrás
pai
commit
cbe5daae17

+ 12 - 12
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -775,21 +775,21 @@
                 res => {
                     if (res.code == "ok") {
                         // 更具数据的长度去加每个柱子的间距
-                        // for(var i in res.data.costList) {
-                        //     if(i>20) {
-                        //         this.widthHtval = +this.widthHtval + 40
-                        //     } else {
-                        //         this.widthHtval = document.body.clientWidth - 230
-                        //     }
-                        // }
-                        // console.log(this.dayjs().add('0','day').format("YYYY-MM-DD HH:mm:ss"), '结束处理')
-                        if(res.data.costList.length > 20) {
-                            for(var i in res.data.costList) {
+                        for(var i in res.data.costList) {
+                            if(i>20) {
                                 this.widthHtval = +this.widthHtval + 40
+                            } else {
+                                this.widthHtval = document.body.clientWidth - 230
                             }
-                        } else {
-                            this.widthHtval = document.body.clientWidth - 230
                         }
+                        // console.log(this.dayjs().add('0','day').format("YYYY-MM-DD HH:mm:ss"), '结束处理')
+                        // if(res.data.costList.length > 20) {
+                        //     for(var i in res.data.costList) {
+                        //         this.widthHtval = +this.widthHtval + 40
+                        //     }
+                        // } else {
+                        //     this.widthHtval = document.body.clientWidth - 230
+                        // }
 
                         var xList = []
                         var yList = []