From 83bff199d22d380fc7e1b83bb2db0f0814385530 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 07 十二月 2023 16:11:34 +0800
Subject: [PATCH] 饼图背景优化、统计数量字体和位置调整、订单完成比率背景和颜色调整、工单进度列表修改

---
 src/views/cockpitPage/components/MachineStartupRate.vue |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/views/cockpitPage/components/MachineStartupRate.vue b/src/views/cockpitPage/components/MachineStartupRate.vue
index 0daa82e..8af3e2f 100644
--- a/src/views/cockpitPage/components/MachineStartupRate.vue
+++ b/src/views/cockpitPage/components/MachineStartupRate.vue
@@ -8,7 +8,7 @@
           <span class="top-rate">{{ startupRate + "%" }}</span>
         </div>
       </div>
-      <div class="chart" ref="chart"></div>
+      <div id="main" class="chart" ref="chart"></div>
     </div>
   </div>
 </template>
@@ -40,6 +40,8 @@
       }
       myChart = echarts.init(chartDom);
       let img = "/cockpitPage/machine-chart-bg.png";
+      let height = myChart.getHeight() / 1;
+      let width = height + 5;
       let option;
       if (data) {
         option = {
@@ -52,11 +54,10 @@
               {
                 type: "image",
                 z: 5,
-                right: 25,
                 style: {
                   image: img,
-                  width: 240,
-                  height: 245,
+                  width: width,
+                  height: height,
                   opacity: 0.55,
                 },
                 left: "center",
@@ -112,6 +113,20 @@
         };
 
         option && myChart.setOption(option);
+        // window.addEventListener("resize", function () {
+        //   // var chart = echarts.getInstanceByDom(document.getElementById("main"));
+        //   let width = myChart.getWidth();
+        //   let height = myChart.getHeight();
+        //   console.log(width, height, "sssssssssss");
+        //   let logo = myChart.getOption().graphic[0].elements[0];
+        //   console.log(logo, "fffff");
+        //   logo.style.width = width / 2;
+        //   logo.style.height = height / 2;
+        //   myChart.setOption({
+        //     graphic: [logo],
+        //   });
+        //   myChart.resize();
+        // });
       } else {
         option = {};
         myChart.setOption(option, true);

--
Gitblit v1.8.0