瀏覽代碼

问题修改

SunZehao 5 月之前
父節點
當前提交
156c159139
共有 2 個文件被更改,包括 47 次插入23 次删除
  1. 25 14
      src/App.vue
  2. 22 9
      src/views/home/index.vue

+ 25 - 14
src/App.vue

@@ -997,6 +997,7 @@ export default {
         this.showHeader = route.path === "/login" ? false : true;
         this.isShowMenu =
           route.path === "/login" || route.path === "/home" ? false : true;
+        this.pagestyFn(route.path)
       },
       immediate: true,
     },
@@ -1437,26 +1438,36 @@ export default {
           str = "width: 200px";
         } else if (path.indexOf("powerPrediction") > -1) {
           str = "width: 160px";
-        }
-      }
-      return str;
-    },
-    pagestyFn() {
-      let str = "width: 100%;height:100vh";
-      let path = window.location.href;
-      if (!this.isCollapse) {
-        if (path.indexOf("generatingCap") > -1) {
-          str = "width: calc(100% - 200px);height:100vh";
-        } else if (path.indexOf("powerPrediction") > -1) {
-          str = "width: calc(100% - 150px);height:100vh";
         } else if (path.indexOf("integratedAlarm") > -1) {
-          str = "width: calc(100% - 300px);height:100vh";
+          str = "width: 300px";
         }
       } else {
-        str = "width: calc(100% - 66px);height:100vh";
+        str = "width: 66px";
       }
       return str;
     },
+    pagestyFn(path) {
+        let str = "width: 100%;height:100vh";
+    //   let path = window.location.href;
+        if (path) {
+            if (path.indexOf("home") > -1) {
+                str = "width:100%;height:100vh";
+            } else {
+                if (!this.isCollapse) {
+                  if (path.indexOf("generatingCap") > -1) {
+                    str = "width: calc(100% - 200px);height:100vh";
+                  } else if (path.indexOf("powerPrediction") > -1) {
+                    str = "width: calc(100% - 150px);height:100vh";
+                  } else if (path.indexOf("integratedAlarm") > -1) {
+                    str = "width: calc(100% - 300px);height:100vh";
+                  }
+                } else {
+                  str = "width: calc(100% - 66px);height:100vh";
+                }
+            }
+        }
+        return str;
+    },
     headerName(name) {
       this.showMenuData = [];
       if (name === "功率预测") {

+ 22 - 9
src/views/home/index.vue

@@ -78,7 +78,10 @@
             <span class="blue"></span>
           </div>
           <div class="headerRight">
-            <span class="headerName">实时状态</span>
+            <div class="headerNaAll">
+                <span class="headerNa">实时状态</span>
+                <span class="headerNa2">单位:台</span>
+              </div>
             <span class="headerZs">
               <span class="headerZsN"></span>
             </span>
@@ -443,10 +446,11 @@
                 </div>
                 <div class="powerItem">
                   <div style="width: calc(100% - 100px)">
+                    <!-- width="100%" -->
                     <forecast-bar-component
                       :list="item"
                       height="40px"
-                      width="100%"
+                      width="420px"
                       :theme="swichTheme"
                     />
                   </div>
@@ -467,10 +471,11 @@
                 <div class="powerName">{{ item[0].name }}</div>
                 <div class="powerItem">
                   <div style="width: calc(100% - 100px)">
+                    <!-- width="calc(100% + 22px)" -->
                     <forecast-bar-component
                       :list="item"
                       height="40px"
-                      width="calc(100% + 22px)"
+                      width="390px"
                       :theme="swichTheme"
                     />
                   </div>
@@ -745,7 +750,15 @@
     >
       <el-table
         :data="jhdlTableData"
-        style="width: 100%; height: 300px"
+        style="width: 100%; height: 425px"
+        :cell-style="{
+            height: '20px',
+            padding: '3px',
+            fontSize: '12px',
+            'border-top': '0px solid rgba(0,0,0,.5)',
+            'border-bottom': '1px solid rgba(0,0,0,.5)',
+            'border-right': '1px solid  rgba(0,0,0,.5)',
+            }"
         :summary-method="sumJhdlMethod"
         show-summary
         border
@@ -756,7 +769,7 @@
         <el-table-column prop="jhdl" label="计划电量(万kWh)" align="center" />
         <el-table-column prop="wcl" label="完成率(%)" align="center" />
       </el-table>
-      <div id="jhdlwcqk" style="width: 100%; height: 450px"></div>
+      <div id="jhdlwcqk" style="width: 100%; height: 400px"></div>
     </el-dialog>
     <el-dialog
       class="currentDialog"
@@ -1516,7 +1529,7 @@ export default {
                 id: "day",
                 value: it.rfdl,
                 color: "#FF9B23",
-                total: 1500,
+                total: res.data.rl * 24,
               },
             ],
             [
@@ -1525,7 +1538,7 @@ export default {
                 id: "day2",
                 value: it.rycdl,
                 color: "#FF9B23",
-                total: 1500,
+                total: res.data.rl * 24,
               },
             ],
           ];
@@ -1536,7 +1549,7 @@ export default {
                 id: "day",
                 value: it.yfdl,
                 color: "#1C99FF",
-                total: 45000,
+                total: res.data.rl * 24 * 30,
               },
             ],
             [
@@ -1545,7 +1558,7 @@ export default {
                 id: "day2",
                 value: it.yycdl,
                 color: "#1C99FF",
-                total: 45000,
+                total: res.data.rl * 24 * 30,
               },
             ],
           ];