From de30afc054a9f72b49d2b81d4c7d6891a5e97e12 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 08 十二月 2023 11:07:57 +0800
Subject: [PATCH] 车间正品率优化

---
 src/views/cockpitPage/components/BarChart.vue |   40 ++++++++++++++++++++++------------------
 1 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/src/views/cockpitPage/components/BarChart.vue b/src/views/cockpitPage/components/BarChart.vue
index 7126e77..fae86c0 100644
--- a/src/views/cockpitPage/components/BarChart.vue
+++ b/src/views/cockpitPage/components/BarChart.vue
@@ -4,7 +4,7 @@
     <div class="bar-contents">
       <div class="bar-total">
         <div class="bar-item">褰撴棩鍚堣鐢熶骇锛歿{ chartData.total }}</div>
-        <div class="bar-item">姝e搧鐜囷細{{ chartData.rate }}</div>
+        <div class="bar-item">姝e搧鐜囷細{{ chartData.rate }}%</div>
       </div>
       <div class="chart" ref="chart"></div>
     </div>
@@ -81,6 +81,7 @@
       myChart = echarts.init(chartDom);
       let option;
       let lineColor = "#35ddc74d";
+      let spirit = "/cockpitPage/order-bg.png";
       if (data) {
         option = {
           color: ["#dcb018", "#00FFFF"],
@@ -116,7 +117,8 @@
                 '<span style=width:70px;display:inline-block">' +
                 "姝e搧鐜�" +
                 "</span>&nbsp;" +
-                data.rate;
+                data.rate +
+                "%";
               list.push(lastString);
               listItem = list.join("<br>");
               return '<div class="showBox">' + listItem + "</div>";
@@ -135,6 +137,9 @@
               show: false,
               startValue: that.startValue, // 浠庡ご寮�濮�
               endValue: that.endValue, // 涓�娆℃�у睍绀哄嚑涓�
+              zoomOnMouseWheel: false,
+              moveOnMouseWheel: true,
+              moveOnMouseMove: true,
             },
           ],
           legend: {
@@ -261,27 +266,26 @@
           ],
           series: [
             {
-              type: "bar",
+              type: "pictorialBar",
               name: "姝e搧鏁伴噺",
-              barWidth: "15",
-              itemStyle: {
-                normal: {
-                  //鏌卞舰鍥惧渾瑙掞紝鍒濆鍖栨晥鏋�
-                  barBorderRadius: [4, 4, 0, 0],
-                },
-              },
+              symbol: spirit,
+              symbolRepeat: true,
+              symbolMargin: "25%",
+              symbolClip: true,
+              symbolSize: [17, 4],
+              barCategoryGap: "40%",
               data: data.datay,
             },
             {
-              type: "bar",
+              type: "pictorialBar",
+              barGap: "10%",
               name: "娆″搧鏁伴噺",
-              barWidth: "15",
-              itemStyle: {
-                normal: {
-                  //鏌卞舰鍥惧渾瑙掞紝鍒濆鍖栨晥鏋�
-                  barBorderRadius: [4, 4, 0, 0],
-                },
-              },
+              symbol: spirit,
+              symbolRepeat: true,
+              symbolMargin: "25%",
+              symbolClip: true,
+              symbolSize: [17, 4],
+              barCategoryGap: "40%",
               data: data.datay2,
             },
           ],

--
Gitblit v1.8.0