Преглед на файлове

导出页面逻辑补全、沙盘页面增加主要指标弹窗

Koishi преди 3 години
родител
ревизия
3a755e2c2f
променени са 2 файла, в които са добавени 117 реда и са изтрити 2 реда
  1. 92 0
      src/views/SandTable/SandTable.vue
  2. 25 2
      src/views/report/ExportExcel.vue

+ 92 - 0
src/views/SandTable/SandTable.vue

@@ -460,6 +460,62 @@
         :code="dialogVideoUrl"
       />
     </el-dialog>
+    <el-dialog
+      title="场站综合评分"
+      :custom-class="mainInfoDialogClass"
+      v-model="showMainInfoDialog"
+      width="80%"
+      :destroy-on-close="true"
+      :before-close="
+        (done) => {
+          mainInfoDialogClass = 'modal animated a1 fadeOutUpBig';
+          delaylyFn(450, done);
+        }
+      "
+      @closed="mainInfoDialogClass = 'modal animated a0 fadeInDown'"
+    >
+      <div v-for="(item, index) in mainInfo" :key="index">
+        <el-divider content-position="center">{{ item.name }}</el-divider>
+        <el-form style="margin: 30px 0" label-width="120px" inline>
+          <el-form-item
+            label="风能利用率"
+            style="width: 45%; margin-bottom: 25px"
+          >
+            <el-input v-model="item.actualpower" readonly></el-input>
+          </el-form-item>
+          <el-form-item
+            label="综合厂用电率(%)"
+            style="width: 45%; margin-bottom: 25px"
+          >
+            <el-input v-model="item.comprehensiverate" readonly></el-input>
+          </el-form-item>
+          <el-form-item
+            label="利用小时(小时)"
+            style="width: 45%; margin-bottom: 25px"
+          >
+            <el-input v-model="item.utilizationhours" readonly></el-input>
+          </el-form-item>
+          <el-form-item
+            label="设备可利用率(%)"
+            style="width: 45%; margin-bottom: 25px"
+          >
+            <el-input v-model="item.availability" readonly></el-input>
+          </el-form-item>
+          <el-form-item
+            label="MTBF(小时)"
+            style="width: 45%; margin-bottom: 25px"
+          >
+            <el-input v-model="item.mtbf" readonly></el-input>
+          </el-form-item>
+          <el-form-item
+            label="MTTR(小时)"
+            style="width: 45%; margin-bottom: 25px"
+          >
+            <el-input v-model="item.mttr" readonly></el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -511,6 +567,7 @@ export default {
       showWeatherDialog: false,
       showTableDialog: false,
       showHealthDialog: false,
+      showMainInfoDialog: false,
       weathercollapse: "",
       weatherChart: [
         {
@@ -526,6 +583,8 @@ export default {
       ],
       videoDialogClass: "modal animated a1 bounceIn",
       tableDialogClass: "modal animated a1 fadeInLeftBig",
+      mainInfoDialogClass: "modal animated a0 fadeInDownBig",
+      mainInfo: [],
       peopleClass: "",
       timeStr: "",
       wpId: "0",
@@ -915,6 +974,24 @@ export default {
       });
     },
 
+    // 获取主要指标
+    getWpMainInfo() {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034/",
+        subUrl: "benchmark/zyzb",
+        data: {
+          windPowerStation: that.wpId,
+        },
+        success(res) {
+          console.log(123123, res);
+          that.mainInfo = res.data;
+          that.showMainInfoDialog = true;
+        },
+      });
+    },
+
     clickStopRow(row) {
       this.tableItem = row;
       this.showTableDialog = true;
@@ -994,6 +1071,7 @@ export default {
       this.getTop4Info();
       this.getWarnMGT();
       this.getRepertoryMGT();
+      this.getWpMainInfo();
     },
 
     // 页面跳转
@@ -1294,6 +1372,20 @@ export default {
     font-size: 20px;
   }
 
+  .el-divider__text {
+    background: rgb(17, 28, 27);
+    color: #b3bdc0;
+  }
+
+  .el-divider {
+    background: #b3bdc0;
+  }
+
+  .el-dialog__body {
+    max-height: 600px;
+    overflow-y: scroll;
+  }
+
   animation-duration: 0;
   @keyframes dialog-fade-in {
     0% {

+ 25 - 2
src/views/report/ExportExcel.vue

@@ -67,6 +67,7 @@
                 v-model="dateArray[index]"
                 type="month"
                 placeholder="请选择"
+                @change="changeDate"
               >
               </el-date-picker>
             </td>
@@ -75,6 +76,7 @@
                 v-model="timeData[index]"
                 clearable
                 placeholder="Select"
+                @change="changeTableTime"
               >
                 <el-option
                   v-for="item in timeArray"
@@ -167,10 +169,10 @@ export default {
     this.tableVal();
   },
   methods: {
-    rqCheck() {
+    rqCheck(event) {
       this.rqChecked = event.target.checked;
     },
-    sjCheck() {
+    sjCheck(event) {
       this.sjChecked = event.target.checked;
     },
     typeClick(a) {
@@ -483,6 +485,27 @@ export default {
         }
       }
     },
+
+    changeDate(value) {
+      let dateArray = [];
+      if (this.rqCheck) {
+        this.dateArray.forEach((ele) => {
+          dateArray.push(value);
+        });
+      }
+      this.dateArray = dateArray;
+    },
+
+    changeTableTime(value) {
+      let timeData = [];
+      if (this.sjChecked) {
+        this.timeData.forEach((ele) => {
+          timeData.push(value);
+        });
+      }
+      this.timeData = timeData;
+    },
+
     zipOut(paths, pathName, zipName, deepIndex) {
       // paths 所有blob
       // pathName 所有excel文件名