From 703703929e97b94ca1c1c5e35a578e5fe9d4cfea Mon Sep 17 00:00:00 2001
From: suerprisePlus <15810472099@163.com>
Date: 星期一, 30 九月 2024 09:58:04 +0800
Subject: [PATCH] 代码修改

---
 src/views/visualization/leftMenu.vue |   68 ++++++++++++++++++++++++++++++----
 1 files changed, 60 insertions(+), 8 deletions(-)

diff --git a/src/views/visualization/leftMenu.vue b/src/views/visualization/leftMenu.vue
index 668da82..311369e 100644
--- a/src/views/visualization/leftMenu.vue
+++ b/src/views/visualization/leftMenu.vue
@@ -1,26 +1,63 @@
 <template>
     <div class="leftMnu">
         <div class="menuBox">
-            <div class="aside-title">{{ title.t1 }}</div>
+            <chart-vue :childData="childData"></chart-vue>
         </div>
         <div class="menuBox">
-            <div class="aside-title">{{ title.t2 }}</div>
+            <chart-vue :childData="childData1"></chart-vue>
         </div>
         <div class="menuBox">
-            <div class="aside-title">{{ title.t3 }}</div>
+            <chart-vue :childData="childData2"></chart-vue>
         </div>
     </div>
 </template>
 
 <script>
+import * as echarts from 'echarts';
+import chartVue from './list/chart.vue';
+import data from './data.js';
 export default {
+    components: {
+        chartVue
+    },
+    props: {
+        leftChartData: {
+            type: Object,
+            required: true
+        },
+    },
     data() {
         return {
-            title: {
-                t1: 'xxx',
-                t2: 'XXXX',
-                t3: 'xxxxx'
-            }
+            childData: null,
+            childData1: null,
+            childData2: null,
+        }
+    },
+    watch: {
+
+    },
+    mounted() {
+        this.initEchart();
+    },
+    methods: {
+        initEchart() {
+            this.initEchart1();
+            this.initEchart2();
+            this.initEchart3();
+        },
+        initEchart1() {
+            var chart1= data[3];
+            chart1.id = "myChart01";
+            this.childData =chart1
+        },
+        initEchart2() {
+            var chart2= data[4];
+            chart2.id = "myChart02";
+            this.childData1 = chart2
+        }, initEchart3() {
+            var chart3= data[5];
+            chart3.id = "myChart03";
+            this.childData2 = chart3
         }
     }
 }
@@ -40,6 +77,8 @@
         background: url(~@/assets/images/Screen/chartbg.png);
         background-size: 100% 100%;
         background-repeat: no-repeat;
+        display: flex;
+        flex-direction: column;
 
         .aside-title {
             box-sizing: border-box;
@@ -55,6 +94,19 @@
             background-size: 100% 100%;
             background-repeat: no-repeat;
         }
+
+        .echartBox {
+            flex: 1;
+            padding: 5px;
+            position: relative;
+
+            .chartBox {
+                width: calc(100% - 10px);
+                height: calc(100% - 10px);
+
+                position: absolute;
+            }
+        }
     }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3