wangtao 2 years ago
parent
commit
8e3f09dc34
3 changed files with 22 additions and 13 deletions
  1. 6 1
      src/assets/styles/index.scss
  2. 2 1
      src/layout/components/AppMain.vue
  3. 14 11
      src/views/index.vue

+ 6 - 1
src/assets/styles/index.scss

@@ -119,7 +119,12 @@ aside {
 
 //main-container全局样式
 .app-container {
-    padding: 20px;
+    //padding: 20px;
+    background: #fff;
+    position: relative;
+    margin: 15px;
+    min-height: calc(100vh - 80px);
+    padding: 15px;
 }
 
 .components-container {

+ 2 - 1
src/layout/components/AppMain.vue

@@ -25,10 +25,11 @@ export default {
 <style lang="scss" scoped>
 .app-main {
   /* 50= navbar  50  */
-  min-height: 100vh;
+  min-height: calc(100vh);
   width: 100%;
   position: relative;
   overflow: hidden;
+  background: #F4F4F4;
 }
 
 .fixed-header+.app-main {

+ 14 - 11
src/views/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container home" >
+  <div class="app-container" >
     <div id="main" >
       <el-row :gutter="10">
           <el-col :span="6">
@@ -15,7 +15,7 @@
               <el-card class="box-card card_left2 mg10" v-loading="loading3">
                 <span class="h2">报警处理</span>
                 <div class="contain">
-                  <index3 :resData="index3Data"  style="width:105%;height:calc(100vh - 55.5vh - 100px);margin-left:-2.5%;" alt="折线图" />
+                  <index3 :resData="index3Data"  style="width:105%;height:calc(100vh - 55.5vh - 120px);margin-left:-2.5%;" alt="折线图" />
                 </div>
               </el-card>
             </div>
@@ -23,16 +23,16 @@
           <el-col :span="12">
             <div class="card_center">
               <el-card class="box-card card_center1" style="padding:0 !important">
-                  <!-- <div class="map" style="height:45vh">
+                  <div class="map" style="height:45vh">
                     <iframe style="width:100%;height:100%;border:none;" src='https://www.thingjs.com/s/ef7ee6a73896c01bda77e679?params=105b0f77fd24654d4eebc434e9'></iframe>
-                  </div> -->
+                  </div>
               </el-card>
               <el-card class="box-card card_center2 mg10">
                 <div class="title">
                   <span class="h2">实时告警信息</span>
                 </div>
                 <div class="contain">
-                  <el-table :data="index4Data"  style="margin-top:10px" height="calc(100vh - 54vh - 100px)">
+                  <el-table :data="index4Data"  style="margin-top:10px" height="calc(100vh - 54vh - 120px)">
                     <el-table-column label="告警时间" align="left" prop="alarmTime"  show-overflow-tooltip />
                     <el-table-column label="告警内容" align="left" prop="property"  show-overflow-tooltip />
                     <el-table-column label="设备名称" align="left" prop="deviceName"  show-overflow-tooltip />
@@ -93,7 +93,7 @@
                   <!-- <div class="title-btn" style="margin:10px auto">异常设备数</div> -->
                   <div>
                     <div>
-                      <el-table :data="index6Data" height="calc(100vh - 61.8vh - 100px)">
+                      <el-table :data="index6Data" height="calc(100vh - 61.8vh - 120px)">
                         <el-table-column label="序号" align="left" prop="id" />
                         <el-table-column label="告警值" align="left" prop="property" show-overflow-tooltip />
                         <el-table-column label="当前状态" align="left" prop="alarmStatus" >
@@ -287,7 +287,10 @@ export default {
 </script>
 
 <style scoped lang="scss">
-
+.app-container{
+  width:calc(100% - 30px) !important;
+  height: 91% !important;
+}
   .text {
     font-size: 14px;
   }
@@ -310,7 +313,7 @@ export default {
     height:100%;
   }
   #main{
-    height:100%;
+    // height:100%;
     .box-card{
       .h2{
         text-align: center;
@@ -354,7 +357,7 @@ export default {
         }
       }
       .card_left2{
-        height:calc(100vh - 48vh - 100px);
+        height:calc(100vh - 48vh - 120px);
         .contain{
           margin:20px auto 0;
           text-align: left;
@@ -407,12 +410,12 @@ export default {
         height:48vh;
       }
       .card_center2{
-        height:calc(100vh - 48vh - 100px);
+        height:calc(100vh - 48vh - 120px);
       }
     }
     .card_right{
       .card_right1{
-        height:35.5vh;
+        height:calc(35.5vh - 20px);
         #total-squares {
           margin: 2vh auto 0;
           text-align: center;