<template>
  <div class="safe">
    <div class="bottomCard">
      <div class="cardLine">
        <div
          class="lineItem card"
          :style="isFullScreen ? 'height: 90vh' : 'height: 95vh'"
        >
          <Safecom
            title="风机预警"
            deviceType="windturbine"
            alarmType="custom"
          />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import dayjs from "dayjs";
import Safecom from "@/views/IntegratedAlarm/safe/components/safecomponent.vue";
export default {
  data() {
    return {
      isFullScreen: false,
    };
  },
  components: {
    Safecom,
  },
  created() {
    const clientHeight =
      document.documentElement.clientHeight || document.body.clientHeight;
    if (clientHeight === 1080) {
      this.isFullScreen = true;
    } else {
      this.isFullScreen = false;
    }
  },
  mounted() {
    window.onresize = () => {
      const clientHeight =
        document.documentElement.clientHeight || document.body.clientHeight;
      this.isFullScreen = window.screen.height == clientHeight;
    };

    console.log("isFullScreen=====>>>>", this.isFullScreen);
  },
};
</script>

<style lang="less" scoped>
.safe {
  width: 100%;
  height: 100%;
  padding: 20px 10px;

  .bottomCard {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    justify-content: space-around;
    .cardLine {
      // width: calc(100% / 3 - 15px);
    //   width: calc(100% / 2 - 15px);
    width: 100%;
        height: 100%;
    //   height: 95vh;
      display: flex;
      flex-direction: column;
      //   justify-content: space-between;
      align-items: center;
      .lineItem {
        width: 100%;
        height: calc(100% / 2 - 10px);
      }
    }
  }
}

.card {
  padding: 10px;
  border-radius: 4px;
  background-color: #161f1e;
  overflow: hidden;
  color: #fff;
  -webkit-transition: 0.3s;
  transition: 0.3s;
  box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
}
</style>
<style lang="scss">
.notificatBox {
  width: 100%;

  .notificatP {
    color: rgb(7, 7, 7);
  }

  .btn {
    display: flex;
    justify-content: flex-end;
  }
}

.scrollbarC {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
}
</style>
