123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <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>
|