From 03f8fb8642b527a6e01f5c8fd2fe33987b12a4d6 Mon Sep 17 00:00:00 2001
From: 鲁尚清 <lushangqing@honggroup.com.cn>
Date: Mon, 8 Nov 2021 11:58:24 +0800
Subject: [PATCH] lineChart封装为组件

---
 hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/declareLine/index.js | 3 +++
 hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/lineChart/index.html | 5 +----
 hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/lineChart/index.js   | 7 ++-----
 hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/index.html                      | 2 +-
 4 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/declareLine/index.js b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/declareLine/index.js
index 3927af4..1d2a045 100644
--- a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/declareLine/index.js
+++ b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/declareLine/index.js
@@ -16,6 +16,9 @@ export default {
             chartId:'line-echart-declare'
         }
     },
+    watch:{
+
+    },
     setup(props, {attrs, slots, emit}) {
         const {proxy} = Vue.getCurrentInstance();
 
diff --git a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/lineChart/index.html b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/lineChart/index.html
index b2b2180..7f25b7f 100644
--- a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/lineChart/index.html
+++ b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/lineChart/index.html
@@ -1,4 +1 @@
-<div class="lineChart">
-<!--    <div :id="chartId" style="width:100%;height:225px;"></div>-->
-    <div id="line-echart" style="width:100%;height:225px;"></div>
-</div>
\ No newline at end of file
+<div :id="chartId" style="width:100%;height:225px;"></div>
diff --git a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/lineChart/index.js b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/lineChart/index.js
index 1b40146..7ded17c 100644
--- a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/lineChart/index.js
+++ b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/components/lineChart/index.js
@@ -24,11 +24,8 @@ export default {
             proxy.yAxisData=props.yAxisData;
             proxy.seriesData=props.seriesData;
             proxy.chartId=props.chartId;
-            console.log('ddd',proxy.chartId)
-
-            const chartDom = document.getElementById('line-echart');
-            // const chartDom = document.getElementById(proxy.chartId);
-            console.log('d3e3',$(proxy.chartId))
+                // const chartDom = document.getElementById('line-echart-declare');
+            const chartDom=proxy.$el
             const myChart = echarts.init(chartDom);
             let option;
 
diff --git a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/index.html b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/index.html
index a5a0b0e..48dcd56 100644
--- a/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/index.html
+++ b/hg-monitor-web-zj/src/main/resources/static/vue3/src/views/zjdaping/index.html
@@ -13,7 +13,7 @@
         <section class="screen-left left-40" >
             <div class="left-top">
                 <!--省局网络拓扑-->
-                <NetworkTopology ></NetworkTopology>
+<!--                <NetworkTopology ></NetworkTopology>-->
             </div>
             <div class="left-bottom data-cloud">
                 <div class="left-bottom-left flex-data">
--
libgit2 0.24.0