From 3c6bdb6f439ff7af04765259fd6a91b6d201d095 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 19 六月 2025 17:12:25 +0800
Subject: [PATCH] 工单,数据中心用户查看数据的权限,合同考核每日,以及导出每日和按月

---
 src/views/screen/components/subheading.vue |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/src/views/screen/components/subheading.vue b/src/views/screen/components/subheading.vue
index d387fd1..aeae700 100644
--- a/src/views/screen/components/subheading.vue
+++ b/src/views/screen/components/subheading.vue
@@ -27,6 +27,13 @@
   },
 
   methods: {
+    setFontSize(res){
+      const clientWidth = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+      if (!clientWidth) return;
+      let fontSize = clientWidth / 1920;
+      return res*fontSize;
+    },
+
     initChart (val1, val2, color) {
       const annularDom = this.$refs.echarts
       const myAnnular = this.$echarts.init(annularDom)
@@ -64,7 +71,7 @@
                   show: true, // 鍗曠嫭鏄剧ず璇ユ暟鎹」
                   formatter: val1 + '',
                   color: color,
-                  fontSize: 14
+                  fontSize: this.setFontSize(14)
                 }
               },
 
@@ -88,7 +95,6 @@
           }
         ]
       }
-
       myAnnular.setOption(option)
     },
 
@@ -109,16 +115,15 @@
     })
   },
   watch: {
-    isData(){
-      this.getW()
-      this.$nextTick(() => {
-        this.initChart(
-          this.isData.value1,
-          this.isData.value2,
-          this.isData.color
-        )
-      })
-    }
+    isData: {
+      handler(newVal, oldVal) {
+        this.getW()
+        this.$nextTick(() => {
+          this.initChart(newVal.value1, newVal.value2, newVal.color);
+        });
+      },
+      deep: true
+    },
   }
 }
 </script>
@@ -150,7 +155,6 @@
 
     .title {
       text-align: center;
-      font-size: 14px;
       color: #dcf8ff;
       white-space: nowrap;
       overflow: hidden;

--
Gitblit v1.8.0