Przeglądaj źródła

增加风机数据查询一级页面

sunzehao 10 godzin temu
rodzic
commit
622b52af86

Plik diff jest za duży
+ 1 - 0
src/App.vue


+ 18 - 0
src/api/monthlyPerformanceAnalysis.js

@@ -444,3 +444,21 @@ export function getApiphotovoltaicTimelist(params) {
     params: params
   });
 }
+
+export function getComponentsData(params) {
+  return request({
+    baseURL: process.env.VUE_APP_API,
+    url: `/original/code`,
+    method: "GET",
+    params: params
+  });
+}
+
+export function getComponentsTableData(params) {
+  return request({
+    baseURL: process.env.VUE_APP_API,
+    url: `/original/realData2`,
+    method: "GET",
+    params: params
+  });
+}

+ 10 - 0
src/router/index.js

@@ -904,6 +904,16 @@ export const asyncRoutes = [
                 },
             },
             {
+                path: "windTurbineMonitor", // 风机数据查询
+                name: "windTurbineMonitor",
+                component: () => import("@/views/economicsOperation/windTurbineMonitor"),
+                meta: {
+                    title: "风机数据查询",
+                    icon: "svg-zhgk",
+                    permissions: ["jn_alarmConfig"],
+                },
+            },
+            {
                 path: "economicsReport", // 经济运行分析报告
                 name: "economicsReport",
                 component: () => import("@/views/economicsOperation/jjyxReport"),

+ 159 - 0
src/views/economicsOperation/windTurbineMonitor/componentsDetail.vue

@@ -0,0 +1,159 @@
+<template>
+  <div class="componentsDetail">
+    <div class="de-title">
+      <div class="station">
+        <el-input v-model="windComponent" placeholder="输入测点名称进行搜索"></el-input>
+      </div>
+      <el-button round size="mini" class="searchColor" @click="getTableData">搜 索</el-button>
+      
+    </div>
+    <p style="color: #fff ">注: 最多可选10个测点进行查看</p>
+    <div class="chooseComponent">
+      <el-tag v-for="tag in tags" :key="tag.uniformCode" closable @close="handleClose(tag)" type="primary">
+        {{ tag.description }}
+      </el-tag>
+    </div>
+    <div class="componentsValue">
+      <div class="component-info">
+        <div class="info-item" v-for="(it,index) in componentsData" :key="index" @click="addTags(it)">
+          <div class="text">{{it.description}}</div>
+        </div>
+      </div>
+    </div>
+    <div class="componentsButton">
+      <el-button round size="mini" class="searchColor" @click="clearTags">清 空</el-button>
+      <el-button round size="mini" class="searchColor" @click="selectTags">确 定</el-button>
+    </div>
+  </div>
+  
+</template>
+
+<script>
+import { ElMessage } from "element-plus";
+import { getComponentsData } from "@/api/monthlyPerformanceAnalysis";
+export default {
+  props: {
+    componentsData: {
+      type: Array,
+      default: () => [],
+    },
+    windModel: {
+      type: String,
+      default: () => ""
+    }
+  },
+  data() {
+    return {
+      tags: []
+    }
+  },
+  mounted() {
+    this.tags = this.componentsData.slice(0, 10);
+  },
+  methods: {
+    //获取测点
+    funGetComponents() {
+      let that = this;
+      let params = {
+        modelId: that.windModel,
+        query: that.windComponent
+      }
+      getComponentsData(params).then((res) => {
+        if (res) {
+          that.componentsData = res
+          that.selectComponentsData = res.slice(0, 10)
+        }
+      });
+    },
+    handleClose(tag) {
+      this.tags = this.tags.filter(it => it.uniformCode !== tag.uniformCode)
+    },
+    addTags(data) {
+      if (this.tags.length < 10) {
+        this.tags.push(data)
+      } else {
+        ElMessage({ message: "最多可选10个测点!", type: 'error' })
+      }
+    },
+    clearTags() {
+      this.tags = []
+    },
+    selectTags() {
+      this.$emit("selectTags", this.tags)
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.componentsDetail{
+  .de-title {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    margin-top: 10px;
+
+    .station {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      font-size: 14px;
+      font-family: Microsoft YaHei;
+      font-weight: 400;
+      color: #b3b3b3;
+      margin-left: 10px;
+      margin-right: 10px;
+    }
+  }
+  .searchColor {
+    background-color: rgba(5, 187, 76, 0.2);
+    border: 1px solid #3b6c53;
+    color: #b3b3b3;
+    font-size: 14px;
+    margin-left: 10px;
+    &:hover {
+      background-color: rgba(5, 187, 76, 0.5);
+      color: #ffffff;
+    }
+  }
+  .chooseComponent{
+    display: flex;
+    flex-wrap: wrap;
+    gap: 10px;
+    max-height: 100px;
+    margin-bottom: 10px;
+  }
+  .componentsValue{
+    .component-info {
+      display: flex;
+      flex-wrap: wrap;
+      gap: 10px;
+      max-height: 500px;
+      overflow: auto;
+
+      .info-item {
+        height: 30px;
+        width: 19%;
+        background: fade(#606769, 20);
+        margin-bottom: 5px;
+        cursor: pointer;
+        .text {
+          width: 100%;
+          font-size: 12px;
+          text-align: center;
+          padding-top: 5px;
+          margin-right: 24px;
+          color: #fff;
+        }
+        &:hover{
+          background: #05bb4c;
+        }
+      }
+    }
+  }
+  .componentsButton{
+    margin: 20px 0;
+    text-align: end;
+  }
+}
+</style>

+ 247 - 0
src/views/economicsOperation/windTurbineMonitor/dataJson.json

@@ -0,0 +1,247 @@
+{
+  "data": {
+    "components": [
+      {
+        "description":"平均风速5分钟",
+        "uniformCode": "AI1585",
+        "unit": "",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"控制系统",
+        "uniformCode": "AI1586",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"变桨系统",
+        "uniformCode": "AI1587",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"齿轮箱",
+        "uniformCode": "AI1588",
+        "unit": "压力(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"液压系统",
+        "uniformCode": "AI1589",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"叶片",
+        "uniformCode": "AI1590",
+        "unit": "转速(rpm)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"平均风速5分钟",
+        "uniformCode": "AI1591",
+        "unit": "",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"控制系统",
+        "uniformCode": "AI1592",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"变桨系统",
+        "uniformCode": "AI1593",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"齿轮箱",
+        "uniformCode": "AI1594",
+        "unit": "压力(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"液压系统",
+        "uniformCode": "AI1595",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"叶片",
+        "uniformCode": "AI1596",
+        "unit": "转速(rpm)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"平均风速5分钟",
+        "uniformCode": "AI1597",
+        "unit": "",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"控制系统",
+        "uniformCode": "AI1598",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"变桨系统",
+        "uniformCode": "AI1599",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"齿轮箱",
+        "uniformCode": "AI15100",
+        "unit": "压力(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"液压系统",
+        "uniformCode": "AI15101",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"叶片",
+        "uniformCode": "AI15102",
+        "unit": "转速(rpm)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"平均风速5分钟",
+        "uniformCode": "AI15103",
+        "unit": "",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"控制系统",
+        "uniformCode": "AI15104",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"变桨系统",
+        "uniformCode": "AI15105",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"齿轮箱",
+        "uniformCode": "AI158106",
+        "unit": "压力(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"液压系统",
+        "uniformCode": "AI15107",
+        "unit": "流量(L/min)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      },
+      {
+        "description":"叶片",
+        "uniformCode": "AI15108",
+        "unit": "转速(rpm)",
+        "modelId":"WT2000D121H85",
+        "modelName":"中车"
+      }
+    ],
+    "tableData": {
+      "1101": [
+        {
+          "id": 214,
+          "windturbineId": 1101,
+          "code": "区域集控.惠安风场.一期.风机1101.日平均风速",
+          "description": "日平均风速",
+          "unit": "m/s",
+          "modelId": "WT2000D121H85",
+          "modelName": "中车",
+          "uniformCode": "RPJFS",
+          "rank": 1.00,
+          "time": 0,
+          "value": "1.6376551"
+        },
+        {
+          "id": 3,
+          "windturbineId": 1101,
+          "code": "区域集控.惠安风场.一期.风机1101.IGBT温度1",
+          "description": "IGBT温度1",
+          "unit": "℃",
+          "modelId": "WT2000D121H85",
+          "modelName": "中车",
+          "uniformCode": "AI002",
+          "rank": 9999.00,
+          "time": 0,
+          "value": "1.0"
+        }
+      ],
+      "1106": [
+        {
+          "id": 2309,
+          "windturbineId": 1106,
+          "code": "区域集控.惠安风场.一期.风机1106.日平均风速",
+          "description": "日平均风速",
+          "unit": "m/s",
+          "modelId": "WT2000D121H85",
+          "modelName": "中车",
+          "uniformCode": "RPJFS",
+          "rank": 1.00,
+          "time": 0,
+          "value": "1.928"
+        },
+        {
+          "id": 2098,
+          "windturbineId": 1106,
+          "code": "区域集控.惠安风场.一期.风机1106.IGBT温度1",
+          "description": "IGBT温度1",
+          "unit": "℃",
+          "modelId": "WT2000D121H85",
+          "modelName": "中车",
+          "uniformCode": "AI002",
+          "rank": 9999.00,
+          "time": 0,
+          "value": "2.0"
+        }
+      ],
+      "1107": [
+        {
+          "id": 2308,
+          "windturbineId": 1107,
+          "code": "区域集控.惠安风场.一期.风机1107.日平均风速",
+          "description": "日平均风速",
+          "unit": "m/s",
+          "modelId": "WT2000D121H85",
+          "modelName": "中车",
+          "uniformCode": "RPJFS",
+          "rank": 1.00,
+          "time": 0,
+          "value": "2.928"
+        }
+      ]
+    }
+  }
+}

+ 346 - 0
src/views/economicsOperation/windTurbineMonitor/historyDetail.vue

@@ -0,0 +1,346 @@
+<template>
+  <div class="historysingleMachine">
+    <div class="historysingleMachine_top">
+      <div class="stationsv">
+        <span class="timeaa">时间:</span>
+        <el-date-picker
+          v-model="pickerTimer"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始时间"
+          end-placeholder="结束时间"
+          size="mini"
+          format="YYYY/MM/DD"
+          value-format="YYYY-MM-DD"
+        />
+      </div>
+      <div class="but">
+        <el-button round size="mini" class="buttons" @click="seachData"
+          >搜 索</el-button
+        >
+      </div>
+    </div>
+    <div class="economicTable1">
+      <el-table
+        :data="historysingleMachineData"
+        stripe
+        size="mini"
+        height="calc(100% - 40px)"
+        ref="historysingleTable"
+        style="width: 100%"
+      >
+        <el-table-column
+          align="center"
+          :label="tabIndex === -1 ? '风机' : '逆变器'"
+          width="80"
+          fixed="left"
+        >
+          <template #default="{ row }">
+            <span>{{ tabIndex === -1 ? row.wtcode : row.wtname }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="recordDate"
+          label="日期"
+          width="120"
+          fixed="left"
+        >
+          <template #default="scope">
+            <span>{{ dateTimeFn(scope.row) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          v-for="(item, index) in tabIndex === -1 ? tableHeader : tableHeaderGf"
+          :key="index"
+          sortable
+          :prop="item.code"
+          :label="item.title"
+          show-overflow-tooltip
+          header-align="center"
+          align="center"
+        >
+          <template #header="scope">
+            <div v-if="scope.column.label.indexOf('(') > 0">
+              <div style="font-size: 14px">
+                {{
+                  scope.column.label.slice(0, scope.column.label.indexOf("("))
+                }}
+              </div>
+              <div style="font-size: 12px">
+                {{ scope.column.label.slice(scope.column.label.indexOf("(")) }}
+              </div>
+            </div>
+            <div v-else>{{ scope.column.label }}</div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        @current-change="handleCurrentChange"
+        :current-page="page.currentPage"
+        :page-size="page.pagesize"
+        @size-change="handleSizeChange"
+        :page-sizes="[20, 50, 100, 200, 500]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import {
+  getApihistorywindturbinegoodnesslist,
+  getApihistorywindturbinegoodnesslistGf,
+  getApiequipmentListByWp,
+} from "@/api/monthlyPerformanceAnalysis";
+export default {
+  props: {
+    // historyCompanyOptions: {
+    //   type: Array,
+    //   default: () => [],
+    // },
+    tabIndex: { type: Number, required: true },
+    historyStationOptions: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      //   hiscompanyVal: "",
+      hisstationVal: "",
+      hiswindVal: "",
+      pickerTimer: [],
+      historysingleMachineData: [],
+      hisWindOptions: [],
+      showBtn: true,
+      page: {
+        pagesize: 20,
+        currentPage: 1,
+        total: 0,
+      },
+      tableHeader: [
+        { title: "日发电量(万kWh)", code: "rfdl" },
+        { title: "月发电量(万kWh)", code: "yfdl" },
+        { title: "年发电量(万kWh)", code: "nfdl" },
+        { title: "日平均风速", code: "rpjfs" },
+        { title: "月平均风速", code: "ypjfs" },
+        { title: "年平均风速", code: "npjfs" },
+        { title: "日运行小时(h)", code: "ryxxs" },
+        { title: "月运行小时(h)", code: "yyxxs" },
+        { title: "年运行小时(h)", code: "nyxxs" },
+        { title: "日待机小时(h)", code: "rdjxs" },
+        { title: "月待机小时(h)", code: "ydjxs" },
+        { title: "年待机小时(h)", code: "ndjxs" },
+        { title: "日故障小时(h)", code: "rgzxs" },
+        { title: "月故障小时(h)", code: "ygzxs" },
+        { title: "年故障小时(h)", code: "ngzxs" },
+        { title: "日检修小时(h)", code: "rjxxs" },
+        { title: "月检修小时(h)", code: "yjxxs" },
+        { title: "年检修小时(h)", code: "njxxs" },
+        { title: "日中断小时(h)", code: "rzdxs" },
+        { title: "月中断小时(h)", code: "yzdxs" },
+        { title: "年中断小时(h)", code: "nzdxs" },
+        { title: "日有效风时(h)", code: "ryxfs" },
+        { title: "月有效风时(h)", code: "yyxfs" },
+        { title: "年有效风时(h)", code: "nyxfs" },
+        { title: "日损失电量(万kWh)", code: "rssdl" },
+        { title: "月损失电量(万kWh)", code: "yssdl" },
+        { title: "年损失电量(万kWh)", code: "nssdl" },
+        { title: "日停机次数", code: "rtjcs" },
+        { title: "月停机次数", code: "ytjcs" },
+        { title: "年停机次数", code: "ntjcs" },
+        { title: "日设备可利用率", code: "rsbklyl" },
+        { title: "月设备可利用率", code: "ysbklyl" },
+        { title: "年设备可利用率", code: "nsbklyl" },
+        { title: "日平均温度", code: "rpjwd" },
+        { title: "月平均温度", code: "ypjwd" },
+        { title: "年平均温度", code: "npjwd" },
+      ],
+      tableHeaderGf: [
+        { title: "型号", code: "model" },
+        { title: "日系统效率", code: "rxtxl" },
+        { title: "日离散率", code: "rlsl" },
+        { title: "日转换效率", code: "rzhxl" },
+        { title: "月系统效率", code: "yxtxl" },
+        { title: "月离散率", code: "ylsl" },
+        { title: "月转换效率", code: "yzhxl" },
+        { title: "年系统效率", code: "nxtxl" },
+        { title: "年离散率", code: "nlsl" },
+        { title: "年转换效率", code: "nzhxl" },
+      ],
+    };
+  },
+  methods: {
+    async init(row) {
+      //   this.hiscompanyVal = row.companyId;
+      this.hisstationVal = row.windtpowerstationId;
+      this.hiswindVal = row.windturbineId;
+      await this.getTableData();
+    },
+    dateTimeFn(row) {
+      return row.recordDate
+        ? row.recordDate.substring(0, row.recordDate.indexOf("T"))
+        : row.date.substring(0, row.date.indexOf("T"));
+    },
+    headerArr(label) {
+      let arr = label.split("");
+      let Newarr = [];
+      let num = 0;
+      let str = "";
+      arr.forEach((it, index) => {
+        num++;
+        str += it;
+        if (label.indexOf(it) + 1 !== label.length) {
+          if (num % 2 === 0) {
+            Newarr.push(str);
+            str = "";
+          }
+        } else {
+          Newarr.push(str);
+        }
+      });
+      return Newarr;
+    },
+    async getWindPowerStation() {
+      const { data } = await getApiequipmentListByWp({
+        wpid: this.hisstationVal,
+      });
+      this.hisWindOptions = data.data;
+      if (!this.hiswindVal && data.data.length) {
+        this.hiswindVal = data.data[0].id;
+      }
+    },
+    // changeBtn(id) {
+    //   this.tabIndex = id;
+    //   this.$emit("getHisStationOptions", this.tabIndex, this.hiscompanyVal);
+    //   this.getTableData();
+    // },
+    changeStation(val) {
+      this.hisstationVal = val;
+      this.hiswindVal = "";
+      this.getWindPowerStation();
+    },
+    changeWind(val) {
+      this.hiswindVal = val;
+      this.getTableData();
+    },
+    seachData() {
+      this.getTableData();
+    },
+    async getTableData() {
+      let params = {
+        type: this.tabIndex,
+        pageNum: this.page.currentPage,
+        pageSize: this.page.pagesize,
+        beginDate: this.pickerTimer[0],
+        endDate: this.pickerTimer[1],
+        wpId: this.hisstationVal,
+        wtId: this.hiswindVal,
+      };
+      let datas = [];
+
+      //   this.historysingleMachineData = dataJson.data.data.records;
+      //   this.page.total = dataJson.data.data.length;
+      if (this.tabIndex == -1) {
+        datas = await getApihistorywindturbinegoodnesslist(params);
+        this.historysingleMachineData = datas.data.data.records;
+        this.page.total = datas.data.data.total;
+      } else {
+        // datas = await getApihistorywindturbinegoodnesslistGf(params);
+        // this.historysingleMachineData = datas.data.data;
+        // this.page.total = datas.data.data.length;
+      }
+    },
+    handleSizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pagesize = val;
+      this.getTableData();
+    },
+    handleCurrentChange(val) {
+      this.page.currentPage = val;
+      this.getTableData();
+    },
+    //转换时间
+    getchangeTime(date) {
+      var y = date.getFullYear();
+      var m = date.getMonth() + 1;
+      m = m < 10 ? "0" + m : m;
+      var d = date.getDate();
+      d = d < 10 ? "0" + d : d;
+      return y + "-" + m + "-" + d;
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.historysingleMachine {
+  height: 100%;
+  .historysingleMachine_top {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    padding-top: 10px;
+    padding-bottom: 10px;
+
+    .stationsv {
+      .timeaa {
+        font-size: 14px;
+        font-family: Microsoft YaHei;
+        font-weight: 400;
+        color: #b3b3b3;
+        margin-right: 10px;
+        margin-left: 10px;
+      }
+    }
+
+    .but {
+      display: flex;
+      flex-direction: row;
+      align-content: center;
+      margin-left: 20px;
+      .buttons {
+        background-color: rgba(5, 187, 76, 0.2);
+        border: 1px solid #3b6c53;
+        color: #b3b3b3;
+        font-size: 14px;
+
+        &:hover,
+        &.active {
+          background-color: rgba(5, 187, 76, 0.5);
+          color: #ffffff;
+        }
+      }
+    }
+    .el-date-editor--daterange {
+      background: transparent;
+      border: 1px solid #2a374f;
+      border-radius: 30px;
+      height: 25px;
+      .el-range-input {
+        background: transparent;
+        color: #fff;
+      }
+      .el-range-separator {
+        width: 10%;
+        color: #fff;
+        position: relative;
+      }
+    }
+  }
+  .economicTable1 {
+    height: calc(100% - 58px);
+  }
+}
+.el-pagination ::v-deep {
+  .el-pagination__sizes {
+    .el-input__inner {
+      width: 100% !important;
+      border-radius: 0 !important;
+    }
+  }
+}
+</style>

+ 451 - 0
src/views/economicsOperation/windTurbineMonitor/index.vue

@@ -0,0 +1,451 @@
+<template>
+  <div class="windTurbineMonitor">
+    <div class="title">
+      <div class="station">
+        风机:
+        <el-select v-model="windSObj" clearable @clear="checkAllWind = false" collapse-tags multiple>
+            <el-option label="全选" :class="{ selected: checkAllWind }" @click="funCheckwindsAll"></el-option>
+            <el-option v-for="item in windSList" :key="item.id" :label="item.aname" :value="item.id">
+            </el-option>
+        </el-select>
+      </div>
+      <div class="station">
+        机型:
+        <el-select v-model="windModel">
+            <el-option v-for="item in windModelSList" :key="item.value" :label="item.label" :value="item.value">
+            </el-option>
+        </el-select>
+      </div>
+      <div class="station">
+        日期
+        <div class="search-input">
+          <el-date-picker
+            v-model="dateTime"
+            size="mini"
+            type="datetime"
+            format="YYYY/MM/DD HH:mm:ss"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <el-button round size="mini" class="searchColor" @click="funGetTableData"
+        >搜 索</el-button
+      >
+    </div>
+    <div class="data-bodys">
+      <div class="line clearfix">
+        <div class="leftContent left"><span>风机数据查询</span></div>
+      </div>
+      <div class="economicTable">
+        <el-table
+          :data="tableData"
+          style="width: 100%"
+          size="mini"
+          stripe
+          height="100%"
+          @cell-click="cellClick"
+          @header-click="headerClick"
+        >
+          <el-table-column
+            align="center"
+            prop="code"
+            label="风机编号"
+            width="200"
+          ></el-table-column>
+          <el-table-column
+            v-for="(item, index) in tableColumn"
+            :key="index"
+            :prop="item.code"
+            header-align="center"
+            align="center"
+          >
+            <template #header>
+              <div style="padding: 5px 0">
+                <div style="font-size: 14px">{{item.label}}</div>
+                <div style="font-size: 12px;color:#90a3b2">{{item.title}}</div>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <el-dialog
+      v-model="componentsVisible"
+      width="50%"
+      custom-class="componentsDia"
+      destroy-on-close
+    >
+      <template #title>
+        <div class="dialog-title">
+          <div class="title">测点</div>
+        </div>
+      </template>
+      <div style="height: 100%">
+        <components-detail
+          ref="componentsDetail"
+          :componentsData="componentsData"
+          :windModel="windModel"
+          @selectTags="selectTags"
+        >
+        </components-detail>
+      </div>
+    </el-dialog>
+    <el-dialog
+      v-model="dialogVisible"
+      width="100%"
+      custom-class="historyDetailModel"
+      destroy-on-close
+      fullscreen
+    >
+      <template #title>
+        <div class="dialog-title">
+          <div class="title">{{ dialogTitle }}</div>
+        </div>
+      </template>
+      <div style="height: 100%">
+        <history-detail
+          ref="windhistoryDetail"
+        >
+        </history-detail>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import dayjs from "dayjs";
+import historyDetail from "./historyDetail.vue";
+import componentsDetail from "./componentsDetail.vue";
+import { getApiequipmentListByWp2, getComponentsData, getComponentsTableData } from "@/api/monthlyPerformanceAnalysis";
+import dataJson from "./dataJson.json";
+export default {
+  name: "windTurbineMonitor",
+  components: {
+    historyDetail,
+    componentsDetail
+  },
+  data() {
+    return {
+      windSObj: [],
+      windModel: "WT2000D121H85",
+      windModelSList: [],
+      dialogVisible: false,
+      componentsVisible: false,
+      windComponent: "",
+      dialogTitle: "",
+      checkAllWind: true,
+      windSList: [],
+      stationVal: "NX_FGS_HA_FDC_STA",
+      dateTime: "",
+      tableData: [],
+      tableColumn: [],
+      company: "",
+      companyOptions: [],
+      pickerTimer: [],
+      componentsData: [],
+      selectComponentsData: [],
+
+    };
+  },
+  watch: {},
+  filters: {},
+  computed: {},
+  created() {
+    this.windModelSList = [
+      {
+        label: "中车",
+        value: "WT2000D121H85"
+      },
+      {
+        label: "联合动力",
+        value: "UP2000-130"
+      }
+    ]
+    // this.tableColumn = [
+    //   {
+    //     label: "日平均风速",
+    //     title: "m/s",
+    //     code: "RPJFS"
+    //   },
+    //   {
+    //     label: "IGBT温度1",
+    //     title: "℃",
+    //     code: "AI002"
+    //   }
+    // ]
+    // this.componentsData = dataJson.data.components
+    // this.dataChange(dataJson.data.tableData)
+    this.dateTime = dayjs().format("YYYY-MM-DD HH:mm:ss"),
+    this.getWindData();
+  },
+  methods: {
+    selectTags(tags) {
+      this.selectComponentsData = tags
+      this.tableColumn = []
+      tags.forEach(it => {
+        let obj = {
+          label: it.description,
+          title: it.unit || "",
+          code: it.uniformCode
+        }
+        this.tableColumn.push(obj)
+      })
+      this.componentsVisible = false
+    },
+    // 获取风机
+    async getWindData() {
+      this.windSList = [];
+      let params = {
+        wpid: this.stationVal,
+      };
+      const { data: datas } = await getApiequipmentListByWp2(params);
+      if (datas.data.length) {
+        this.windSList = datas.data;
+        datas.data.forEach((it, index) => {
+          if (index < 5) {
+            this.windSObj.push(it.id)
+          }
+        })
+      } else {
+        this.windSList = datas.data;
+        this.windVal = "";
+      }
+      this.funGetComponents();
+    },
+    //获取测点
+    funGetComponents() {
+      let that = this;
+      let params = {
+        modelId: that.windModel,
+        query: ""
+      }
+      getComponentsData(params).then((res) => {
+        if (res) {
+          that.componentsData = res
+          that.selectComponentsData = res.slice(0, 10)
+          that.selectComponentsData.forEach(it => {
+            let obj = {
+              label: it.description,
+              title: it.unit || "",
+              code: it.uniformCode
+            }
+            this.tableColumn.push(obj)
+          })
+          that.funGetTableData()
+        }
+      });
+    },
+    //获取表格
+    funGetTableData() {
+      let that = this;
+      let uni = []
+      that.selectComponentsData.forEach((it, index) => {
+        if (index < 5) {
+          uni.push(it.uniformCode)
+        }
+      })
+      let params = {
+        windturbineIds: that.windSObj,
+        uniformCodes: uni,
+        time: new Date(that.dateTime).getTime()
+      }
+      getComponentsTableData(params).then((res) => {
+        if (res) {
+          that.dataChange(res)
+        }
+      });
+    },
+    dataChange(res) {
+      if (res) {
+        let data = []
+        for(let i in res) {
+          let obj = {
+            code: i
+          }
+          res[i].forEach(it => {
+            obj[it.uniformCode] = it.value
+          })
+          data.push(obj)
+        }
+        this.tableData = data
+      }
+    },
+    cellClick(row, column, cell, event) {
+      this.dialogVisible = true;
+      this.dialogTitle = "历史数据查询";
+    },
+    headerClick() {
+      this.componentsVisible = true
+    },
+    funCheckwindsAll() {
+        this.checkAllWind = !this.checkAllWind;
+        if (this.checkAllWind) {
+            this.windSObj = this.windSList.map((o) => o.id);
+        } else {
+            this.windSObj = [];
+        }
+    },
+  },
+  mounted() {},
+  beforeUnmount() {},
+};
+</script>
+
+<style lang="less" scoped>
+.title {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-top: 10px;
+
+  .station {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    font-size: 14px;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: #b3b3b3;
+    margin-left: 10px;
+  }
+  .el-date-editor--daterange {
+    background: transparent;
+    border: 1px solid #2a374f;
+    border-radius: 30px;
+    height: 25px;
+    .el-range-input {
+      background: transparent;
+      color: #fff;
+    }
+    .el-range-separator {
+      width: 10%;
+      color: #fff;
+      position: relative;
+    }
+  }
+
+  .search-input {
+    margin-left: 10px;
+  }
+
+  .but {
+    display: flex;
+    flex-direction: row;
+    align-content: center;
+    margin-left: 20px;
+  }
+
+  .buttons {
+    background-color: rgba(5, 187, 76, 0.2);
+    border: 1px solid #3b6c53;
+    color: #b3b3b3;
+    font-size: 14px;
+
+    &:hover {
+      background-color: rgba(5, 187, 76, 0.5);
+      color: #ffffff;
+    }
+  }
+}
+
+.windTurbineMonitor {
+  height: 100%;
+  width: 100%;
+  padding: 0 10px;
+  padding-bottom: 10px;
+  .line {
+    padding-bottom: 5px;
+    .leftContent {
+      width: 242px;
+      height: 41px;
+      line-height: 41px;
+      background: url("~@/assets/imgs/title_left_bg.png") no-repeat;
+
+      span {
+        font-size: 16px;
+        font-family: Microsoft YaHei;
+        font-weight: 400;
+        color: #05bb4c;
+        margin-left: 25px;
+      }
+    }
+  }
+  .data-bodys {
+    display: flex;
+    flex-direction: column;
+    background-color: rgba(0, 0, 0, 0.45);
+    border-radius: 5px;
+    height: calc(100% - 45px);
+    padding-top: 10px;
+    .economicTable {
+      width: 100%;
+      height: calc(100% - 40px);
+    }
+  }
+}
+
+.clearfix::after {
+  content: "";
+  clear: both;
+  height: 0;
+  line-height: 0;
+  visibility: hidden;
+  display: block;
+}
+
+.clearfix {
+  zoom: 1;
+}
+
+.left {
+  float: left;
+}
+
+.right {
+  float: right;
+}
+
+.searchColor {
+  background-color: rgba(5, 187, 76, 0.2);
+  border: 1px solid #3b6c53;
+  color: #b3b3b3;
+  font-size: 14px;
+  margin-left: 10px;
+  &:hover {
+    background-color: rgba(5, 187, 76, 0.5);
+    color: #ffffff;
+  }
+}
+
+</style>
+<style lang="less" scoped>
+::v-deep .el-table__body-wrapper {
+  background: #142446 !important;
+}
+</style>
+<style lang="less">
+.el-overlay {
+  .el-overlay-dialog {
+    overflow-y: hidden !important;
+
+    .componentsDia{
+      margin-top: 10vh !important;
+      .el-dialog__header{
+        .dialog-title{
+          padding-left: 20px;
+        }
+      }
+      .el-dialog__body {
+        padding: 0px 20px !important;
+      }
+    }
+    .historyDetailModel{
+      .el-dialog__header{
+        .dialog-title{
+          padding-left: 20px;
+        }
+      }
+    }
+  }
+}
+</style>

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików