|
@@ -0,0 +1,638 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="optimizationSuggestions">
|
|
|
|
+ <div class="main_top">
|
|
|
|
+ <p class="topPsty">优化建议报告</p>
|
|
|
|
+ <div class="seach">
|
|
|
|
+ <el-form class="generat-seach" :inline="true">
|
|
|
|
+ <el-form-item label="场站">
|
|
|
|
+ <el-select v-model="reportStation" placeholder="选择场站">
|
|
|
|
+ <el-option v-for="item in stationList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="报告月份" class="!mb-0">
|
|
|
|
+ <el-date-picker style="width: 120px" v-model="reportParamDate" type="month"
|
|
|
|
+ value-format="YYYY-MM" placeholder="请选择" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" @click="handleReportOp">查询</el-button>
|
|
|
|
+ <!-- <el-button
|
|
|
|
+ style="width: 100px"
|
|
|
|
+ type="danger"
|
|
|
|
+ @click="exportPDFop"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ >导出 PDF</el-button
|
|
|
|
+ > -->
|
|
|
|
+ <el-button style="width: 100px" type="primary" @click="exportWORD" :loading="loading">导出 WORD
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="infoBox">
|
|
|
|
+ <div id="pdfDomop" :class="!theme ? 'block' : 'white'"
|
|
|
|
+ :style="!theme ? 'background-color: #040c0b' : 'background-color: #fff'">
|
|
|
|
+ <h2 style="
|
|
|
|
+ font-weight: bolder;
|
|
|
|
+ text-align: center;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ " :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ {{ OperationName }}
|
|
|
|
+ </h2>
|
|
|
|
+ <!-- 概述 -->
|
|
|
|
+ <h3 style="text-indent: 2em; font-weight: bolder; margin-bottom: 10px"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ 1.概述
|
|
|
|
+ </h3>
|
|
|
|
+ <p style="
|
|
|
|
+ text-indent: 2em;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ ">
|
|
|
|
+ {{ OperationGs }}
|
|
|
|
+ </p>
|
|
|
|
+ <h4 style="text-indent: 2em; font-weight: bolder; margin: 10px 0"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ 1.1 风电场基本信息
|
|
|
|
+ </h4>
|
|
|
|
+ <div style="text-indent: 2em;line-height: 30px;font-size: 15px;" v-for="(item, index) in basrMsgArr"
|
|
|
|
+ :key="index">
|
|
|
|
+ <span style="background: #fff;
|
|
|
|
+ width: 8px;
|
|
|
|
+ height: 8px;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin: 0 15px 0 15px;" :style="!theme ? 'background: #fff' : 'background: #000'"></span>
|
|
|
|
+ <span style="font-weight: bolder;margin-right: 10px;"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">{{item.name}}: </span>
|
|
|
|
+ <span style="
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;" :style="!theme ? 'color: #fff' : 'color: #000'">{{ item.value }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 筛选标准 -->
|
|
|
|
+ <h3 style="text-indent: 2em; font-weight: bolder; margin-bottom: 10px; margin-top: 10px"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ 2.筛选标准
|
|
|
|
+ </h3>
|
|
|
|
+ <p style="
|
|
|
|
+ text-indent: 2em;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ ">
|
|
|
|
+ 本报告依据以下标准对风机进行筛选:
|
|
|
|
+ </p>
|
|
|
|
+ <div style="text-indent: 2em;line-height: 30px;font-size: 15px;" v-for="(item, index) in orderMsgArr"
|
|
|
|
+ :key="index">
|
|
|
|
+ <span style="background: #fff;
|
|
|
|
+ width: 8px;
|
|
|
|
+ height: 8px;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin: 0 15px 0 15px;" :style="!theme ? 'background: #fff' : 'background: #000'"></span>
|
|
|
|
+ <span style="font-weight: bolder;margin-right: 10px;"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">{{item.name}}: </span>
|
|
|
|
+ <span style="
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;" :style="!theme ? 'color: #fff' : 'color: #000'">{{ item.value }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 风机筛选分析 -->
|
|
|
|
+ <h3 style="text-indent: 2em; font-weight: bolder; margin-bottom: 10px; margin-top: 10px"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ 3.风机筛选分析
|
|
|
|
+ </h3>
|
|
|
|
+ <p style="
|
|
|
|
+ text-indent: 2em;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ ">
|
|
|
|
+ 根据以上标准,对每台风机的运行数据及隐患问题信息进行分析,结果如下:
|
|
|
|
+ </p>
|
|
|
|
+ <div class="warn-table">
|
|
|
|
+ <el-table class="toolSty" :data="fjsxList1" border style="width: 100%; margin: 10px 0"
|
|
|
|
+ max-height="500" stripe :header-cell-style="{
|
|
|
|
+ padding: '4px',
|
|
|
|
+ fontSize: '14px',
|
|
|
|
+ border: '0.5px solid rgba(0,0,0,.5) !important',
|
|
|
|
+ }" :cell-style="{
|
|
|
|
+ height: '40px',
|
|
|
|
+ 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)',
|
|
|
|
+ }">
|
|
|
|
+ <el-table-column prop="turbineId" align="center" label="风机编号" width="150" />
|
|
|
|
+ <el-table-column prop="ratedPowerKw" align="center" label="额定功率(KW)" width="90" />
|
|
|
|
+ <el-table-column prop="actualRatedPowerKw" align="center" label="实际额定功率(KW)" width="90" />
|
|
|
|
+ <el-table-column v-for="(item, index) in orderTableColumn" :key="index" :label="item.name"
|
|
|
|
+ :width="item.width" align="center">
|
|
|
|
+ <el-table-column v-for="(res, index) in item.children" :key="index" :label="res.name"
|
|
|
|
+ align="center">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <span>
|
|
|
|
+ {{ scope.row[res.code] }}
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" prop="performanceIssues" label="性能问题" width="90"
|
|
|
|
+ fixed="right" />
|
|
|
|
+ </el-table>
|
|
|
|
+ <!-- 温度类隐患 -->
|
|
|
|
+ <el-table class="toolSty" :data="fjsxList2" border style="width: 100%; margin: 10px 0"
|
|
|
|
+ max-height="500" stripe :header-cell-style="{
|
|
|
|
+ padding: '4px',
|
|
|
|
+ fontSize: '14px',
|
|
|
|
+ border: '0.5px solid rgba(0,0,0,.5) !important',
|
|
|
|
+ }" :cell-style="{
|
|
|
|
+ height: '40px',
|
|
|
|
+ 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)',
|
|
|
|
+ }">
|
|
|
|
+ <el-table-column prop="turbineId" align="center" label="风机编号" width="150" fixed />
|
|
|
|
+ <el-table-column prop="downtimeCount" align="center" label="故障停机次数" width="80" />
|
|
|
|
+ <el-table-column v-for="(item, index) in orderTableColumn2" :key="index" :label="item.name"
|
|
|
|
+ :width="item.width" align="center">
|
|
|
|
+ <el-table-column v-for="(res, index) in item.children" :key="index" :label="res.name"
|
|
|
|
+ align="center">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <span>
|
|
|
|
+ {{ scope.row[res.code] }}
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="reliabilityIssue" align="center" label="可靠性问题" width="100"
|
|
|
|
+ fixed="right" />
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <h4 style="text-indent: 2em; font-weight: bolder; margin: 10px 0"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ 3.1 筛选结果
|
|
|
|
+ </h4>
|
|
|
|
+ <div style="text-indent: 2em;line-height: 30px;font-size: 15px;" v-for="(item, index) in orderResultArr"
|
|
|
|
+ :key="index">
|
|
|
|
+ <span style="background: #fff;
|
|
|
|
+ width: 8px;
|
|
|
|
+ height: 8px;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin: 0 15px 0 15px;" :style="!theme ? 'background: #fff' : 'background: #000'"></span>
|
|
|
|
+ <span style="font-weight: bolder;margin-right: 10px;"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">{{item.windName}}: </span>
|
|
|
|
+ <span style="
|
|
|
|
+ text-align: justify;margin-right: 10px;
|
|
|
|
+ line-height: 22px;" :style="!theme ? 'color: #fff' : 'color: #000'">{{ item.value }}</span>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- 风机情况说明 -->
|
|
|
|
+ <h3 style="text-indent: 2em; font-weight: bolder; margin-bottom: 10px; margin-top: 10px"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ 4.风机情况说明
|
|
|
|
+ </h3>
|
|
|
|
+ <div v-for="(val, key, index) in windSituationReport" :key="index">
|
|
|
|
+ <h4 style="text-indent: 2em; font-weight: bolder; margin: 10px 0"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ {{`4.${index+1} ${key}` }}
|
|
|
|
+ </h4>
|
|
|
|
+ <div style="text-indent: 2em;line-height: 30px;font-size: 15px;" v-for="(item, index) in val"
|
|
|
|
+ :key="index">
|
|
|
|
+ <span style="background: #fff;
|
|
|
|
+ width: 8px;
|
|
|
|
+ height: 8px;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin: 0 15px 0 15px;" :style="!theme ? 'background: #fff' : 'background: #000'"></span>
|
|
|
|
+ <!-- <span style="font-weight: bolder;margin-right: 10px;"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">{{item.name}}: </span> -->
|
|
|
|
+ <span style="
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;" :style="!theme ? 'color: #fff' : 'color: #000'">{{ item }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- 检修建议 -->
|
|
|
|
+ <h3 style="text-indent: 2em; font-weight: bolder; margin-bottom: 10px; margin-top: 10px"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ 5.检修建议
|
|
|
|
+ </h3>
|
|
|
|
+ <p style="
|
|
|
|
+ text-indent: 2em;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ ">
|
|
|
|
+ 针对筛选出的风机,提出以下检修建议:
|
|
|
|
+ </p>
|
|
|
|
+ <div v-for="(val, key, index) in maintenanceRecommendations" :key="index">
|
|
|
|
+ <h4 style="text-indent: 2em; font-weight: bolder; margin: 10px 0"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ {{`5.${index+1} ${key}` }}
|
|
|
|
+ </h4>
|
|
|
|
+ <div style="text-indent: 2em;line-height: 30px;font-size: 15px;" v-for="(item, idx) in val"
|
|
|
|
+ :key="idx">
|
|
|
|
+ <span style="background: #fff;
|
|
|
|
+ width: 8px;
|
|
|
|
+ height: 8px;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin: 0 15px 0 15px;" :style="!theme ? 'background: #fff' : 'background: #000'"></span>
|
|
|
|
+ <!-- <span>{{idx+1}}</span> -->
|
|
|
|
+ <span style="font-weight: bolder;margin-right: 10px;"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">{{item.name}}: </span>
|
|
|
|
+ <span style="
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;" :style="!theme ? 'color: #fff' : 'color: #000'">{{ item.value }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- 结论 -->
|
|
|
|
+ <h3 style="text-indent: 2em; font-weight: bolder; margin-bottom: 10px; margin-top: 10px"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">
|
|
|
|
+ 6.结论
|
|
|
|
+ </h3>
|
|
|
|
+ <p style="
|
|
|
|
+ text-indent: 2em;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ ">
|
|
|
|
+ {{conclusionMsg.result}}
|
|
|
|
+ </p>
|
|
|
|
+ <div style="text-indent: 2em;line-height: 30px;font-size: 15px;"
|
|
|
|
+ v-for="(item, idx) in conclusionMsg.resultObj" :key="idx">
|
|
|
|
+ <span style="background: #fff;
|
|
|
|
+ width: 8px;
|
|
|
|
+ height: 8px;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin: 0 15px 0 15px;" :style="!theme ? 'background: #fff' : 'background: #000'"></span>
|
|
|
|
+ <!-- <span>{{idx+1}}</span> -->
|
|
|
|
+ <span style="font-weight: bolder;margin-right: 10px;"
|
|
|
|
+ :style="!theme ? 'color: #fff' : 'color: #000'">{{item.name}}: </span>
|
|
|
|
+ <span style="
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;" :style="!theme ? 'color: #fff' : 'color: #000'">{{ item.value }}</span>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div style="display: flex; margin-top: 15px">
|
|
|
|
+ <p style="
|
|
|
|
+ text-indent: 2em;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ ">
|
|
|
|
+ 编写人:XXX
|
|
|
|
+ </p>
|
|
|
|
+ <p style="
|
|
|
|
+ text-indent: 2em;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ ">
|
|
|
|
+ 审核人:XXX
|
|
|
|
+ </p>
|
|
|
|
+ <p style="
|
|
|
|
+ text-indent: 2em;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ text-align: justify;
|
|
|
|
+ line-height: 22px;
|
|
|
|
+ ">
|
|
|
|
+ 日期:XXX
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+ import httpRequest from "@/utils/request.js";
|
|
|
|
+ import htmlToPdf from "../report/fixGetPDF";
|
|
|
|
+ import Docxtemplater from "docxtemplater";
|
|
|
|
+ import PizZip from "pizzip";
|
|
|
|
+ import JSZipUtils from "jszip-utils";
|
|
|
|
+ import {
|
|
|
|
+ saveAs
|
|
|
|
+ } from "file-saver";
|
|
|
|
+ import dayjs from "dayjs";
|
|
|
|
+
|
|
|
|
+ import {
|
|
|
|
+ apiGetbaseStation
|
|
|
|
+ } from "@/api/gengra";
|
|
|
|
+
|
|
|
|
+ import {
|
|
|
|
+ ElMessage
|
|
|
|
+ } from "element-plus";
|
|
|
|
+
|
|
|
|
+ import jsonData from "./dataJson.json";
|
|
|
|
+ import twoxizeJson from "../report/lianggexizeJson";
|
|
|
|
+ export default {
|
|
|
|
+ name: "yhjyReport",
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ stationList: [],
|
|
|
|
+ reportStation: "",
|
|
|
|
+ basrMsgArr: jsonData.basrMsgArr,
|
|
|
|
+ orderMsgArr: jsonData.orderMsgArr,
|
|
|
|
+ orderResultArr: [],
|
|
|
|
+ maintenanceRecommendations: [],
|
|
|
|
+ windSituationReport: [],
|
|
|
|
+ orderTableColumn: jsonData.orderTableColumn,
|
|
|
|
+ orderTableColumn2: jsonData.orderTableColumn2,
|
|
|
|
+ conclusionMsg: {},
|
|
|
|
+ OperationName: "",
|
|
|
|
+ OperationGs: "",
|
|
|
|
+ OperationMonth: "",
|
|
|
|
+ fjsxList1: [],
|
|
|
|
+ fjsxList2: [],
|
|
|
|
+ theme: true,
|
|
|
|
+ loading: false,
|
|
|
|
+ reportParamDate: dayjs()
|
|
|
|
+ .startOf("month")
|
|
|
|
+ .format("YYYY-MM"),
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ created() {
|
|
|
|
+ this.theme = this.$store.state.theme;
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ mounted() {
|
|
|
|
+ this.funGetStation()
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ methods: {
|
|
|
|
+ /**场站 */
|
|
|
|
+ funGetStation() {
|
|
|
|
+ let that = this;
|
|
|
|
+ apiGetbaseStation().then((res) => {
|
|
|
|
+ if (res) {
|
|
|
|
+ that.stationList = res.data;
|
|
|
|
+ if (that.stationList.length) {
|
|
|
|
+ that.reportStation = that.stationList[0].id;
|
|
|
|
+ that.handleReportOp()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ exportPDFop() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ htmlToPdf.getPdf(
|
|
|
|
+ document.querySelector("#pdfDomop"),
|
|
|
|
+ "经济运行分析会报告"
|
|
|
|
+ );
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ ElMessage.success("打印成功!");
|
|
|
|
+ }, 1000);
|
|
|
|
+ },
|
|
|
|
+ exportWORD() {
|
|
|
|
+ httpRequest
|
|
|
|
+ .get(`/WarningReport/report?time=${this.reportParamDate}&wpid=${this.reportStation}`)
|
|
|
|
+ .then((tempRes) => {
|
|
|
|
+ this.getWordFn(tempRes)
|
|
|
|
+ }).catch(e => {
|
|
|
|
+ this.getWordFn({
|
|
|
|
+ data: jsonData.data
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 导出word方法
|
|
|
|
+ getWordFn(tempRes) {
|
|
|
|
+ let temWordData = {
|
|
|
|
+ titleName: this.OperationName,
|
|
|
|
+ operationGs: this.OperationGs,
|
|
|
|
+ stationName: tempRes.data.stationid.aname,
|
|
|
|
+ windNumber: tempRes.data.stationid.jrwindQuantityLd,
|
|
|
|
+ zzjrl: tempRes.data.stationid.windCapacity,
|
|
|
|
+ reportTime: tempRes.data.reporttime,
|
|
|
|
+ fjsxList1: tempRes.data.xnwtls,
|
|
|
|
+ fjsxList2: tempRes.data.kkxwtls,
|
|
|
|
+ orderResultArr: this.orderResultArr,
|
|
|
|
+ windSituationReportWord: [],
|
|
|
|
+ maintenanceRecommendationsWord: []
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //4.风机情况说明
|
|
|
|
+ let qksmNum = 0
|
|
|
|
+ for (const key in tempRes.data.qksm) {
|
|
|
|
+ if (Object.prototype.hasOwnProperty.call(tempRes.data.qksm, key)) {
|
|
|
|
+ const element = tempRes.data.qksm[key];
|
|
|
|
+ let eleArr = []
|
|
|
|
+ let eleObj = {
|
|
|
|
+ name: "",
|
|
|
|
+ value: ""
|
|
|
|
+ }
|
|
|
|
+ element.forEach(it => {
|
|
|
|
+ eleObj.name = it.split(':')[0]
|
|
|
|
+ eleObj.value = it.split(':')[1]
|
|
|
|
+ eleArr.push(eleObj)
|
|
|
|
+ })
|
|
|
|
+ let obj = {
|
|
|
|
+ index: qksmNum++,
|
|
|
|
+ windName: key,
|
|
|
|
+ windValue: eleArr
|
|
|
|
+ }
|
|
|
|
+ temWordData.windSituationReportWord.push(obj)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 读取并获得模板文件的二进制内容
|
|
|
|
+ JSZipUtils.getBinaryContent(
|
|
|
|
+ `./static/optimizationSuggestionsReport.docx`,
|
|
|
|
+ (error, content) => {
|
|
|
|
+ // 抛出异常
|
|
|
|
+ if (error) throw error;
|
|
|
|
+ // 创建一个JSZip实例,内容为模板的内容
|
|
|
|
+ let zip = new PizZip(content);
|
|
|
|
+ // 创建并加载docxtemplater实例对象
|
|
|
|
+ let doc = new Docxtemplater();
|
|
|
|
+ doc.loadZip(zip);
|
|
|
|
+ doc.setData(temWordData);
|
|
|
|
+ try {
|
|
|
|
+ // 用模板变量的值替换所有模板变量
|
|
|
|
+ doc.render();
|
|
|
|
+ } catch (error) {
|
|
|
|
+ // 抛出异常
|
|
|
|
+ let e = {
|
|
|
|
+ message: error.message,
|
|
|
|
+ name: error.name,
|
|
|
|
+ stack: error.stack,
|
|
|
|
+ properties: error.properties,
|
|
|
|
+ };
|
|
|
|
+ console.log(JSON.stringify({
|
|
|
|
+ error: e
|
|
|
|
+ }));
|
|
|
|
+ throw error;
|
|
|
|
+ }
|
|
|
|
+ // 生成一个代表docxtemplater对象的zip文件(不是一个真实的文件,而是在内存中的表示)
|
|
|
|
+ let out = doc.getZip().generate({
|
|
|
|
+ type: "blob",
|
|
|
|
+ mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
|
|
+ });
|
|
|
|
+ // 将目标文件对象保存为目标类型的文件,并命名
|
|
|
|
+ saveAs(out, `${temWordData.titleName}.docx`);
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ handleReportOp() {
|
|
|
|
+ if (this.reportParamDate) {
|
|
|
|
+ this.OperationName = "";
|
|
|
|
+ this.OperationGs = ""
|
|
|
|
+ this.OperationMonth = "";
|
|
|
|
+
|
|
|
|
+ httpRequest
|
|
|
|
+ .get(`/WarningReport/report?time=${this.reportParamDate}&wpid=${this.reportStation}`)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.renderReportPage(res);
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.renderReportPage({
|
|
|
|
+ data: jsonData.data
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ renderReportPage(res) {
|
|
|
|
+
|
|
|
|
+ this.OperationMonth = res.data.reporttime
|
|
|
|
+ let date = this.OperationMonth.split('-')
|
|
|
|
+ this.OperationName = date[0] + '年' + date[1] + '月' + res.data.stationid.aname + '性能及可靠性优化建议报告';
|
|
|
|
+ this.OperationGs = `本报告旨在对${res.data.stationid.aname}内的风机进行综合分析,以筛选出同时存在性能问题和可靠性隐患的风机,为后续的检修与优化提供依据。`
|
|
|
|
+
|
|
|
|
+ this.basrMsgArr.forEach(it => {
|
|
|
|
+ if (it.nameEn === "reportDate") {
|
|
|
|
+ it.value = date[0] + '年' + date[1] + '月'
|
|
|
|
+ } else {
|
|
|
|
+ it.value = res.data.stationid[it.nameEn]
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.orderMsgArr.forEach(it => {
|
|
|
|
+ it.value = jsonData.orderMsg[it.nameEn]
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.fjsxList1 = res.data.xnwtls;
|
|
|
|
+ this.fjsxList2 = res.data.kkxwtls;
|
|
|
|
+ // 3.1筛选结果
|
|
|
|
+ for (const key in res.data.FilterResults) {
|
|
|
|
+ if (Object.prototype.hasOwnProperty.call(res.data.FilterResults, key)) {
|
|
|
|
+ const element = res.data.FilterResults[key];
|
|
|
|
+ let obj = {
|
|
|
|
+ windName: key,
|
|
|
|
+ value: element
|
|
|
|
+ }
|
|
|
|
+ this.orderResultArr.push(obj)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 4风机情况说明
|
|
|
|
+ this.windSituationReport = res.data.qksm
|
|
|
|
+
|
|
|
|
+ // this.maintenanceRecommendations = res.data.maintenanceRecommendations
|
|
|
|
+ // this.conclusionMsg = res.data.conclusion
|
|
|
|
+
|
|
|
|
+ // this.OperationData = res.data;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ watch: {
|
|
|
|
+ "$store.state.theme"(bool) {
|
|
|
|
+ this.theme = bool;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+ .optimizationSuggestions {
|
|
|
|
+ height: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
+ align-content: center;
|
|
|
|
+
|
|
|
|
+ .main_top {
|
|
|
|
+ height: 40px;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ .topPsty {
|
|
|
|
+ position: relative;
|
|
|
|
+ top: 5px;
|
|
|
|
+ padding: 7px 20px;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ border-radius: 3px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .seach {
|
|
|
|
+ padding: 20px 0 0 20px;
|
|
|
|
+
|
|
|
|
+ .generat-seach {
|
|
|
|
+ .el-form-item {
|
|
|
|
+ .el-form-item__content {
|
|
|
|
+ .el-select {
|
|
|
|
+ width: 130px !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .infoBox {
|
|
|
|
+ height: calc(100% - 80px);
|
|
|
|
+ background: #fff;
|
|
|
|
+ overflow: scroll;
|
|
|
|
+
|
|
|
|
+ #pdfDomop {
|
|
|
|
+ margin: 20px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &.themeLight {
|
|
|
|
+ .topPsty {
|
|
|
|
+ color: #2778ff;
|
|
|
|
+ background: #ffffff;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &.themeDark {
|
|
|
|
+ .topPsty {
|
|
|
|
+ color: #1c99ff;
|
|
|
|
+ background: #1e2126;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</style>
|
|
|
|
+<style lang="less">
|
|
|
|
+ .el-overlay {
|
|
|
|
+ .el-overlay-dialog {
|
|
|
|
+ .reportDia {
|
|
|
|
+ margin-top: 0 !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .reportDia {
|
|
|
|
+ .repoerDateBox {
|
|
|
|
+ width: calc(100% - 40px);
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</style>
|