whj 1 年間 前
コミット
5402ef6a8a
1 ファイル変更32 行追加4 行削除
  1. 32 4
      src/views/preparation/report/PreparationReport.vue

+ 32 - 4
src/views/preparation/report/PreparationReport.vue

@@ -124,16 +124,26 @@ export default {
           bottom: '3%',
           containLabel: true
         },
-        yAxis: {
-          type: 'value',
-          boundaryGap: [0, 0.01]
-        },
+        yAxis: [
+          {
+            type: 'value',
+            name: '次数'
+          },
+          {
+            type: 'value',
+            name: '费用',
+            axisLabel: {
+              formatter: '{value} 元'
+            }
+          }
+        ],
         xAxis: {
           type: 'category',
           data: this.chartsData1.map(item => (item.year + '-' + item.month))
         },
         series: [
           {
+            name: '次数',
             type: 'bar',
             data: this.chartsData1.map(item => item.num),
             itemStyle: {
@@ -148,6 +158,24 @@ export default {
                 }
               }
             }
+          },
+          {
+            name: '费用',
+            type: 'line',
+            data: this.chartsData1.map(item => item.totalFee),
+            yAxisIndex: 1,
+            itemStyle: {
+              normal: {
+                label: {
+                  show: true, // 开启显示
+                  position: 'top', // 在上方显示
+                  textStyle: { // 数值样式
+                    color: 'black',
+                    fontSize: 16
+                  }
+                }
+              }
+            }
           }
         ]
       }