浏览代码

问题修改

SunZehao 3 天之前
父节点
当前提交
01d2f810cb
共有 1 个文件被更改,包括 22 次插入9 次删除
  1. 22 9
      src/views/IntegratedAlarm/DetailMatrix/index.vue

+ 22 - 9
src/views/IntegratedAlarm/DetailMatrix/index.vue

@@ -233,9 +233,9 @@
           </div>
         </div> -->
       </div>
-      <!-- 风电场/光电站列表 -->
-      <el-scrollbar height="calc(100% - 72px)">
-        <div class="matrix-box">
+      <!-- 风电场/光电站列表 height="calc(100% - 72px)"-->
+      <el-scrollbar height="100%">
+        <div class="matrix-box"  :style="isFullScreen ? 'height: 97vh' : 'height: 94vh'">
           <!-- 单个风场/电站 -->
           <div
             class="matrixs"
@@ -318,7 +318,7 @@
                   class="c"
                   @click="handleLeftClick(val, value.czlx, value.wpid)"
                 >
-                  <img src="@assets/images/ugly.gif" v-if="val.status === 0" />
+                  <img src="@assets/images/ugly.gif" v-if="val.status === 0 || val.status === 1" />
                   <img src="@assets/images/ugly.png" v-else />
                 </div>
                 <div class="r" :class="stateMap[val.status]">
@@ -671,6 +671,7 @@ export default {
   // 数据
   data() {
     return {
+        isFullScreen: false,
       switchtToUglyMode: 1,
       loading: false,
       warnDialog: false,
@@ -1185,11 +1186,23 @@ export default {
   },
 
   mounted() {
-    // this.changeData(true, dataJson.data);
-    this.requestData(true);
-    this.timmer = setInterval(() => {
-      this.requestData(true);
-    }, 5000);
+    const clientHeight =
+    document.documentElement.clientHeight || document.body.clientHeight;
+    if (clientHeight === 1080) {
+    this.isFullScreen = true;
+    } else {
+    this.isFullScreen = false;
+    }
+    window.onresize = () => {
+    const clientHeight =
+        document.documentElement.clientHeight || document.body.clientHeight;
+    this.isFullScreen = window.screen.height == clientHeight;
+    };
+    this.changeData(true, dataJson.data);
+    // this.requestData(true);
+    // this.timmer = setInterval(() => {
+    //   this.requestData(true);
+    // }, 5000);
   },
   unmounted() {
     clearInterval(this.timmer);