<template>
  <div class="home">
    <layout>
      <template #left>
        <!-- <leftDesk :resultData="leftData" v-if="allShow"></leftDesk> -->
        <feedwaterDesk :resultData="leftData1"></feedwaterDesk>
      </template>
      <template #right>
        <!-- <reightDesk :resultData="leftData"></reightDesk> -->
        <waterIntakingDesk :resultData="leftData1"></waterIntakingDesk>
      </template>
    </layout>
  </div>
</template>

<script setup>
import { getAllPointDataList, getHistorySaveData } from "@/api/home"
import { ref, reactive } from 'vue';
import layout from "@/components/layout_/index.vue";
import leftDesk from './index/leftDesk.vue'
import feedwaterDesk from './index/feedwaterDesk.vue'
import waterIntakingDesk from './index/waterIntakingDesk.vue'
import reightDesk from './index/reightDesk.vue'

const intervalId = ref(null)
const mapElement = ref(null)
const allShow = ref(true)
const leftData = ref({})
const leftData1 = ref([])
const deptList = reactive([])
const dialogFormVisible = ref(false);
const waterSupply = ref({})
const monitoringVisible = ref(false)
// 生命周期
onMounted(() => {
  getHomeData()
});
onUnmounted(() => {
  clearInterval(intervalId.value);
})
function getHomeData() {
  getAllPointDataList().then((res) => {
    if (res.code == 200) {
      leftData1.value = res.data
    }
  })
}
</script>

<style lang="scss" scoped>
#myIframe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  user-select: none;
}

.home {
  position: relative;
  width: 100%;
  // height: 100vh;
  height: 100%;
  overflow: hidden;
}

.color-cyan {
  background-color: rgb(88, 240, 222);
}

.color-yellow {
  background-color: rgb(242, 179, 39);
}

.color-blue {
  background-color: rgb(76, 155, 255);
}

.color-red {
  background-color: rgb(239, 93, 57);
}

.text-cyan {
  color: rgb(88, 240, 222);
}

.text-yellow {
  color: rgb(242, 179, 39);
}

.text-blue {
  color: rgb(76, 155, 255);
}

.text-red {
  color: rgb(239, 93, 57);
}
</style>
