Преглед на файлове

跳转工时成本统计的人员和研究中心柱状图柱子上面的显示

Lijy преди 1 година
родител
ревизия
7de3c50caf
променени са 1 файла, в които са добавени 16 реда и са изтрити 1 реда
  1. 16 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

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

@@ -650,6 +650,13 @@
                             stack:'1',
                             barMaxWidth: 30,
                             data: dataList,
+                            label: {
+                                normal: {
+                                    show: true,
+                                    position: 'top',
+                                    formatter: `{c} ${this.yAxisValue==0 ? '元' : '小时'}`,
+                                }
+                            }
                         })
                     }
                     }
@@ -748,6 +755,7 @@
                         }],
                         series: series,
                     };
+                    console.log('人员=======>', series)
                     // console.log('setoption');
                     myChart.setOption(option,{notMerge:true});
             },
@@ -1170,7 +1178,7 @@
                                         normal: {
                                             show: true,
                                             position: 'top',
-                                            formatter: '{c}',
+                                            formatter: `{c} ${this.yAxisValue==0 ? '元' : '小时'}`,
                                         }
                                     }
                                 }],
@@ -1220,6 +1228,13 @@
                                     type: 'bar',
                                     barMaxWidth: 30,
                                     data: yList,
+                                    label: {
+                                        normal: {
+                                            show: true,
+                                            position: 'top',
+                                            formatter: `{c} ${this.yAxisValue==0 ? '元' : '小时'}`,
+                                        }
+                                    }
                                 }],
                                 grid: {  
                                     left: '100px',