소스 검색

优化建议报告联调

SunZehao 7 달 전
부모
커밋
7195459473
2개의 변경된 파일33개의 추가작업 그리고 26개의 파일을 삭제
  1. 8 0
      src/api/zhbj/index.js
  2. 25 26
      src/views/IntegratedAlarm/yhjyReport/index.vue

+ 8 - 0
src/api/zhbj/index.js

@@ -1021,3 +1021,11 @@ export function apiGetbaseStation() {
     })
 }
 
+// 风电数据准备页面
+export function apiGeWarningReport(params) {
+    return request({
+        baseURL: process.env.VUE_APP_REPORT,
+        url: `WarningReport/report?time=${params.reportParamDate}&wpid=${params.reportStation}`,
+        method: 'get'
+    })
+}

+ 25 - 26
src/views/IntegratedAlarm/yhjyReport/index.vue

@@ -25,8 +25,7 @@
             </div>
         </div>
         <div class="infoBox">
-            <div id="pdfDom" ref="pdfContent"
-                :style="!theme ? 'background-color: #040c0b' : 'background-color: #fff'">
+            <div id="pdfDom" ref="pdfContent" :style="!theme ? 'background-color: #040c0b' : 'background-color: #fff'">
                 <h2 style="
             font-weight: bolder;
             text-align: center;
@@ -152,8 +151,8 @@
                             fixed="right" />
                     </el-table> -->
                     <!-- 温度类隐患 -->
-                    <el-table class="toolSty" :data="fjsxList2" border style="width: 100%; margin: 10px 0"
-                         stripe :header-cell-style="{
+                    <el-table class="toolSty" :data="fjsxList2" border style="width: 100%; margin: 10px 0" stripe
+                        :header-cell-style="{
               padding: '4px',
               fontSize: '12px',
               fontWeight: bold,
@@ -179,8 +178,7 @@
                                 </template>
                             </el-table-column>
                         </el-table-column>
-                        <el-table-column prop="reliabilityIssue" align="center" label="可靠性问题"
-                             width="92" />
+                        <el-table-column prop="reliabilityIssue" align="center" label="可靠性问题" width="92" />
                     </el-table>
                 </div>
 
@@ -368,7 +366,6 @@
 </template>
 
 <script>
-    import httpRequest from "@/utils/request.js";
     import Docxtemplater from "docxtemplater";
     import PizZip from "pizzip";
     import JSZipUtils from "jszip-utils";
@@ -380,7 +377,8 @@
     import dayjs from "dayjs";
 
     import {
-        getWpList
+        getWpList,
+        apiGeWarningReport
     } from "@/api/zhbj";
 
     import {
@@ -429,20 +427,20 @@
             /**场站 */
             funGetStation() {
                 let that = this;
-                this.renderReportPage({
-                    data: jsonData.reldata
-                });
-                // that.stationList = [];
-                // that.reportStation = "";
-                // getWpList().then((res) => {
-                //     if (res) {
-                //         that.stationList = res.data;
-                //         if (that.stationList.length) {
-                //             that.reportStation = that.stationList[0].id;
-                //             that.handleReportOp();
-                //         }
-                //     }
+                // this.renderReportPage({
+                //     data: jsonData.reldata
                 // });
+                that.stationList = [];
+                that.reportStation = "";
+                getWpList().then((res) => {
+                    if (res) {
+                        that.stationList = res.data;
+                        if (that.stationList.length) {
+                            that.reportStation = that.stationList[0].id;
+                            that.handleReportOp();
+                        }
+                    }
+                });
             },
             async exportPDFop() {
                 this.loading = true;
@@ -659,11 +657,12 @@
                     this.maintenanceRecommendations = {};
                     this.conclusionMsg = "";
 
-                    httpRequest
-                        .get(
-                            `/WarningReport/report?time=${this.reportParamDate}&wpid=${this.reportStation}`
-                        )
-                        .then((res) => {
+                    let params = {
+                        reportParamDate: this.reportParamDate,
+                        reportStation: this.reportStation
+                    }
+
+                    apiGeWarningReport(params).then((res) => {
                             this.renderReportPage(res);
                         })
                         .catch(() => {