From 58b0f1e9bd03a472321acf1dfc4e89fc4ce9df7a Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Mon, 29 Sep 2025 01:14:10 +0800
Subject: [PATCH] 9.28更换api

---
 src/page/home/components/echart.vue |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/page/home/components/echart.vue b/src/page/home/components/echart.vue
index 896776e..0e7d7ce 100644
--- a/src/page/home/components/echart.vue
+++ b/src/page/home/components/echart.vue
@@ -5,6 +5,7 @@
 </template>
 <script>
 import * as echarts from "echarts";
+import { data } from "jquery";
 export default {
   props: {
     ids: {
@@ -28,15 +29,15 @@
       oneDay: 24 * 3600 * 1000
     };
   },
+  watch: {
+    data: {
+      handler(newVal, oldVal) {
+        this.initCharts();
+      },
+    }
+  },
   methods: {
     initCharts() {
-      // let data = [];
-      // for (var i = 0; i < 1000; i++) {
-      //   data.push(this.randomData());
-      // }
-
-      // console.log("dadadadad",data);
-
       var chartDom = document.getElementById("main" + this.ids);
       var myChart = echarts.init(chartDom, "dark");
       var option;

--
Gitblit v1.9.3