wangb hai 3 meses
pai
achega
9930615901

+ 8 - 3
src/components/commonHeaders.vue

@@ -44,9 +44,9 @@
                   <img :src="header_wendang" class="Settingitem downItem" />
                 </a>
               </el-tooltip>
-              <!-- <el-tooltip class="box-item" effect="light" content="系统设置">
-                                <img :src="header_shezhi" class="Settingitem">
-                            </el-tooltip> -->
+              <el-tooltip class="box-item" effect="light" content="系统设置">
+                  <img :src="header_shezhi" class="Settingitem" @click="openSystemSet">
+              </el-tooltip>
               <el-tooltip class="box-item" effect="light" content="退出">
                 <img
                   :src="header_dianyuan"
@@ -174,6 +174,11 @@ export default {
         }
       }
     },
+    openSystemSet() {
+      // let url = 'http://127.0.0.1:8009/login'
+      let url = "http://172.16.12.101:8082/login"
+      window.open(url,"target")
+    },
     showHeader(route) {
       this.menuData.forEach((it) => {
         if (route.path.indexOf("powerPrediction") > -1) {

+ 89 - 0
src/components/generatingCapacityComponent/table.vue

@@ -31,6 +31,8 @@
       size="small"
       ref="windLifeTable"
       v-loading="loading"
+      show-summary
+      :summary-method="getSummaries"
       :max-height="tableHeight"
       :style="{ width: '100%' }"
       :row-class-name="rowstyle ? tableRowClassName : ''"
@@ -95,6 +97,12 @@ export default {
         return false;
       },
     },
+    fromTableId: {
+      type: String,
+      default: () => {
+        return "";
+      },
+    },
     tableId: {
       type: String,
       default: () => {
@@ -141,6 +149,87 @@ export default {
         return "";
       }
     },
+    getSummaries(datas) {
+      const {columns, data} = datas
+      const sums = [];
+      columns.forEach((column, index) => {
+        const values = data.map(item => Number(item[column.property]));
+        if (index === 0) {
+          if (this.fromTableId === '2') {
+            this.getSunOrAvg(1, sums, index, values)
+          } else {
+            // if (this.fromTableId === '1' || this.fromTableId === '3' || this.fromTableId === '4' || this.fromTableId === '5' || this.fromTableId === '6')
+            sums[index] = '合计';
+            return
+          } 
+        }
+        if (!values.every(value => isNaN(value))) {
+          if (this.fromTableId === '1') {
+            if (index === 1 || index === 5 || index === 11 || index === 12 || index === 13) {
+              this.getSunOrAvg(2, sums, index, values)
+            } else {
+              this.getSunOrAvg(1, sums, index, values)
+            }
+          } else if (this.fromTableId === '2' || this.fromTableId === '5') {
+            if (index !== 0) {
+              this.getSunOrAvg(2, sums, index, values)
+            }
+          } else if (this.fromTableId === '3') {
+            if (index === 2) {
+              this.getSunOrAvg(2, sums, index, values)
+            } else {
+              this.getSunOrAvg(1, sums, index, values)
+            }
+          } else if (this.fromTableId === '4') {
+            if (index === 1) {
+              this.getSunOrAvg(2, sums, index, values)
+            } else {
+              this.getSunOrAvg(1, sums, index, values)
+            }
+          } else if (this.fromTableId === '6') {
+            if (index === 3 || index === 9) {
+              this.getSunOrAvg(1, sums, index, values)
+            } else {
+              this.getSunOrAvg(2, sums, index, values)
+            }
+          } else if (this.fromTableId === '7') {
+            if (index === 2 || index === 3) {
+              this.getSunOrAvg(2, sums, index, values)
+            } else {
+              this.getSunOrAvg(1, sums, index, values)
+            }
+          }
+            
+        } else {
+            sums[index] = '-';
+        }
+      });
+
+      return sums;
+    },
+    getSunOrAvg(type, sums, index, values) {
+      if (type === 1) {
+        sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+                return prev + curr;
+            } else {
+                return prev;
+            }
+        }, 0) / values.length;
+        return sums[index] = sums[index].toFixed(2) + ' (avg)';
+      } else {
+        sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+                return prev + curr;
+            } else {
+                return prev;
+            }
+        }, 0);
+        return sums[index] = sums[index].toFixed(2)
+      }
+    },
     handleExport() {
       let $e = this.$refs.windLifeTable.$el;
       try {

+ 1 - 1
src/components/powerPredictionComponent/homePageAssembly/globalDialogPage.vue

@@ -214,7 +214,7 @@
                 const sums = [];
                 columns.forEach((column, index) => {
                 if (index === 0) {
-                    sums[index] = '合计(平均值)';
+                    sums[index] = '合计(avg)';
                     return;
                 }
                 const values = data.map(item => Number(item[column.property]));

+ 1 - 1
src/components/powerPredictionComponent/panoramicPowerDialog/panoramaPowerDialogPage.vue

@@ -163,7 +163,7 @@
                                 return prev;
                             }
                         }, 0) / values.length;
-                        sums[index] = sums[index].toFixed(2) + ' (平均值)';
+                        sums[index] = sums[index].toFixed(2) + ' (avg)';
                     } else {
                         sums[index] = values.reduce((prev, curr) => {
                             const value = Number(curr);

+ 1 - 1
src/components/powerPredictionComponent/powerPredictionDialog/predictionDialogPage.vue

@@ -180,7 +180,7 @@
                 const sums = [];
                 columns.forEach((column, index) => {
                 if (index === 0) {
-                    sums[index] = '合计(平均值)';
+                    sums[index] = '合计(avg)';
                     return;
                 }
                 const values = data.map(item => Number(item[column.property]));

+ 2 - 0
src/views/generatingCapacity/dataAnalysis/agcAnalysis/index.vue

@@ -42,6 +42,8 @@
                 :height="tableHeight"
                 :tableId="tableShowId"
                 :tableName="tableName"
+                fromTableId="7"
+                style="position:relative;top: -10px;"
               >
               </table-cop>
               <el-pagination layout="prev, pager, next" :total="50" />

+ 2 - 0
src/views/generatingCapacity/dataAnalysis/angleAnalysis/index.vue

@@ -47,9 +47,11 @@
                 :data="tableData"
                 :column="tableColumn"
                 :theme="theme"
+                fromTableId="5"
                 :height="tableHeight"
                 :tableId="tableShowId"
                 :tableName="tableName"
+                style="position:relative;top: -15px;"
                 :rowstyle="true"
               ></table-cop>
             </div>

+ 2 - 0
src/views/generatingCapacity/dataAnalysis/combine/index.vue

@@ -105,11 +105,13 @@
                 :data="tableData"
                 :column="tableColumn"
                 :theme="theme"
+                fromTableId="2"
                 :loading="tableLoading"
                 :height="tableHeight"
                 :tableId="tableShowId"
                 :tableName="tableName"
                 :tableFilePath="tableFilePath"
+                style="position:relative;top: -15px;"
               >
               </table-cop>
             </el-tab-pane>

+ 2 - 0
src/views/generatingCapacity/dataAnalysis/hotAnalysis/index.vue

@@ -137,10 +137,12 @@
                     :data="tableData"
                     :column="tableColumn"
                     :theme="theme"
+                    fromTableId="3"
                     :height="tableHeight"
                     :tableId="tableShowId"
                     :tableName="tableName"
                     :tableFilePath="tableFilePath"
+                    style="position:relative;top: -15px;"
                   ></table-cop>
                 </div>
               </el-tabs>

+ 2 - 0
src/views/generatingCapacity/dataAnalysis/rateAnalysis/index.vue

@@ -38,10 +38,12 @@
                 :data="tableData"
                 :column="tableColumn"
                 :theme="theme"
+                fromTableId="4"
                 :height="tableHeight"
                 :tableId="tableShowId"
                 :tableName="tableName"
                 :tableFilePath="tableFilePath"
+                style="position:relative;top: -15px;"
               ></table-cop>
             </div>
             <el-row v-if="activeTab === '1'" :style="{ height: tableHeight }">

+ 2 - 0
src/views/generatingCapacity/dataAnalysis/windAnalysis/index.vue

@@ -45,6 +45,8 @@
                 :height="tableHeight"
                 :tableId="tableShowId"
                 :tableName="tableName"
+                fromTableId="6"
+                style="position:relative;top: -15px;"
               ></table-cop>
               <div
                 v-show="activeTab === '1'"

+ 1 - 0
src/views/generatingCapacity/dataFilter/prepare/index.vue

@@ -35,6 +35,7 @@
             :height="tableHeight"
             :tableId="tableShowId"
             :tableName="tableName"
+            fromTableId="1"
             :tableFilePath="tableFilePath"
             @export="funExport"
           >

+ 1 - 0
src/views/generatingCapacity/dataFilter/process/index.vue

@@ -54,6 +54,7 @@
             :column="tableColumn"
             :loading="tableLoading"
             :theme="theme"
+            fromTableId="1"
             :height="tableHeight"
             :tableId="tableShowId"
             :tableName="tableName"

+ 1 - 1
src/views/generatingCapacity/yhjyReport/dataJson.json

@@ -11,7 +11,7 @@
             "value": ""
         },
         {
-            "name": "总装机容量(KW)",
+            "name": "总装机容量(Mw)",
             "nameEn": "windCapacity",
             "value": ""
         },