Browse Source

常规消缺

Koishi 5 days ago
parent
commit
cfb5ee439b
2 changed files with 32 additions and 6 deletions
  1. 18 5
      src/App.vue
  2. 14 1
      src/views/economicsOperation/nxfHomePage/index.vue

+ 18 - 5
src/App.vue

@@ -50,7 +50,9 @@
           text-color="#fff"
           background-color="#132444"
           active-text-color="#fff"
-          :style="`height:calc(100% - 72px - 80px);margin-top:30px;${
+          :style="`height:${
+            switchTabShow() ? '100%' : 'calc(100% - 72px - 80px)'
+          };margin-top:${switchTabShow() ? '30px' : '0'};${
             showMenuData?.[0]?.width && !isCollapse
               ? `width: ${showMenuData?.[0]?.width}`
               : ''
@@ -113,7 +115,7 @@
       <!-- <alarmBadge /> -->
     </div>
 
-    <div class="curTabsBox">
+    <div class="curTabsBox" v-if="switchTabShow()">
       <div
         class="item"
         :class="activeTab === 'yxzb' ? 'active' : ''"
@@ -577,6 +579,7 @@ export default {
       return this.showMenuData.length;
     },
   },
+
   async created() {
     // await this.initWebSocket();
     // this.getAlarmConfig();
@@ -634,6 +637,7 @@ export default {
     //     });
     //   });
   },
+
   mounted() {
     this.initMenu();
     let that = this;
@@ -643,9 +647,11 @@ export default {
       that.setScale();
     });
   },
+
   unmounted() {
     console.log("离开标记", this.socketLeaveFlag);
   },
+
   methods: {
     openWeb() {
       this.activeTab = "yxzb";
@@ -657,6 +663,10 @@ export default {
       this.$router.push({ path: "/economicsOperation" });
     },
 
+    switchTabShow() {
+      return window.location.href.indexOf("#/integratedAlarm") === -1;
+    },
+
     getSelectState(idx) {
       //   routepath === $route.path ? 'isSelect' : ''
       const href = window.location.href;
@@ -690,7 +700,12 @@ export default {
           str = "padding-left: 220px";
         }
       }
-      return str;
+
+      return `${str};height:${
+        this.switchTabShow()
+          ? "calc(100% - 80px - 20px); margin-top:20px;"
+          : "calc(100% - 80px);"
+      }`;
     },
     noGrounpItemFn(path) {
       let str = "66px";
@@ -1517,8 +1532,6 @@ body {
   .main-body {
     flex: 0 0 100%;
     max-width: 100%;
-    height: calc(100% - @headerHeight - 20px);
-    margin-top: 20px;
     // padding: 1.481vh;
     // transition: flex 0.1s, margin-left 0.1s;
     // transition-timing-function: ease-in-out;

+ 14 - 1
src/views/economicsOperation/nxfHomePage/index.vue

@@ -152,7 +152,13 @@
       </el-tab-pane>
     </el-tabs>
 
-    <div class="operationHome" v-if="$route.path === '/economicsOperation'">
+    <div
+      class="operationHome"
+      :style="`height:${
+        switchTabShow() ? '100%' : 'calc(100% - 20px);margin-top:20px;'
+      }`"
+      v-if="$route.path === '/economicsOperation'"
+    >
       <!-- <tab @select="selectionItemClick" /> -->
       <div class="homeMain">
         <div class="homeLeaf">
@@ -309,6 +315,7 @@ export default {
     MultipleYLineChartNormal,
     MultipleBarChart,
   },
+
   data() {
     return {
       tabActiveName: "jjfx",
@@ -393,11 +400,17 @@ export default {
       this.getGeneratingcapacity();
     }, 10000);
   },
+
   unmounted() {
     clearInterval(this.timmer);
     this.timmer = null;
   },
+
   methods: {
+    switchTabShow() {
+      return window.location.href.indexOf("#/integratedAlarm") === -1;
+    },
+
     selectTab(index, item) {
       console.log("ind===>>>", index);
       this.activeIndex = index;