cloudroam
2024-11-26 e6421c4ece90615aa0333ec58a723979c978a62b
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%;