From 0ae255185f422781f8a5cc4c52ad56ee0d3a1e6e Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期五, 29 十一月 2024 19:07:15 +0800
Subject: [PATCH] 1.首页可拖拽 2.没有名字去掉悬浮层 3.增加了背景

---
 src/views/screen1/main-container.vue |   35 +++++++++++++++++++++++++++++------
 1 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/src/views/screen1/main-container.vue b/src/views/screen1/main-container.vue
index fed0c38..ea603e3 100644
--- a/src/views/screen1/main-container.vue
+++ b/src/views/screen1/main-container.vue
@@ -1,16 +1,20 @@
 <template>
   <div class="main-container" :style="{ zoom: zoom_main }" id="screencontent">
     <div class="screen1-place" v-if="false"></div>
-    <div class="itm-map" @click="toArea01">
+
+      <itm-map-plant-board @click="toArea01"></itm-map-plant-board>
+
+
+
+    <!-- <div class="itm-map" @click="toArea01">
       <itm-map-item
           v-for="(item, index) in itmmapdatas"
           :item="item"
           :key="index"
           :no="index"
       ></itm-map-item>
-
-      <!-- v-if="item_show" -->
-    </div>
+    
+    </div> -->
     <div class="chart-itm">
       <itm
           v-if="areas && !chartclose1"
@@ -19,6 +23,8 @@
           :switchInfo="switchInfo"
           :chartclose="chartclose1"
           @show="chartclose1 = true"
+          @refresh="getSwitchInfoStatic"
+          :key="componentKey"
       ></itm>
       <itm-left
           v-if="areas && !chartclose2"
@@ -50,8 +56,10 @@
 import itmMapItem from "./itm-map-item.vue";
 import {getAreaTjData, getSwitchStatusStatic, getSwitchInfoStatic} from "@/api/area";
 
+import itmMapPlantBoard from "./itm-map-plant-board.vue";
+
 export default {
-  components: {itmMapItem, itm, itmLeft},
+  components: {itmMapItem, itm, itmLeft,itmMapPlantBoard},
   props: {
     item_show: true,
     item1_show: false,
@@ -67,6 +75,7 @@
       chartclose2: false,
       switchDeviceStatus: {},
       switchInfo:{},
+      componentKey:0,
     };
   },
   created() {
@@ -76,9 +85,14 @@
       this.zoom_main = parseFloat(zoom);
     }
     this.getList();
+
+    console.log("itmmapdatas")
+    console.log(this.itmmapdatas)
+
   },
 
   methods: {
+    
     getList() {
       getAreaTjData().then((res) => {
         // console.log('areas',res.switchAreaInfo || [])
@@ -96,7 +110,16 @@
       getSwitchInfoStatic().then(res => {
         this.switchInfo = res
       })
+      // this.getSwitchInfoStatic()
     },
+
+    getSwitchInfoStatic(){
+      getSwitchInfoStatic().then(res => {
+        this.switchInfo = res
+      })
+      this.componentKey+=1
+    },
+
     handleWheel(event) {
       event.preventDefault();
       const delta = event.deltaY < 0 ? 0.05 : -0.05;
@@ -148,7 +171,7 @@
     height: 88.3rem;
     background-image: url("../../assets/screen/screen1/screen-place.png");
   }
-
+  
   .itm-map {
     position: relative;
     width: 100%;

--
Gitblit v1.9.3