Переглянути джерело

Merge branch 'yx' of http://61.161.152.110:10101/r/electronic-map into yx

zhangming 3 роки тому
батько
коміт
235490484c

+ 426 - 0
src/components/coms/table/table-qc.vue

@@ -0,0 +1,426 @@
+<template>
+  <table class="com-table">
+    <thead>
+      <tr>
+        <th v-for="(col, index) of data.column" :key="index" :class="{ light: col.is_light }" :style="{ width: col.width }" @click="onSort(col)">
+          {{ col.name }}
+        </th>
+      </tr>
+    </thead>
+    <el-scrollbar>
+      <tbody :style="{ height: height }">
+        <tr v-for="(row, index) of tableData" :key="index">
+          <td
+            v-for="(col, i) of data.column"
+            :key="i"
+            :style="{ width: col.width }"
+            :class="{ light: hoverRow == row || hoverCol == col, num: col.is_num, 'always-light': col.is_light || row.is_light }"
+            @mouseenter="hover(row, col)"
+            @mouseleave="leave()"
+          >
+            <component :is="col.type ? col.type : 'div'" v-bind="col.props" v-html="template(col, row[col.field])" @click="onClick(col, row)"> </component>
+          </td>
+        </tr>
+      </tbody>
+    </el-scrollbar>
+    <el-pagination class="mg-t-8" v-if="pageable" @current-change="handleCurrentChange" :current-page="currentPage4" :page-size="pageSize" layout="total, prev, pager, next, jumper" :total="data.total"> </el-pagination>
+    <el-dialog :title="dialogTitle" v-model="dialogShow" width="70%" top="10vh" custom-class="modal" :close-on-click-modal="true">
+      <div class="chart" id="chartDiv" height="500px"></div>
+    </el-dialog>
+  </table>
+</template>
+
+<script>
+import * as echarts from "echarts";
+export default {
+  // 名称
+  name: "ComTable",
+  // 使用组件
+  components: {},
+  // 传入参数
+  props: {
+    data: Object,
+    // hover 样式
+    showHover: {
+      type: Boolean,
+      default: true,
+    },
+    // 列高亮
+    showColHover: {
+      type: Boolean,
+      default: false,
+    },
+    canScroll: {
+      type: Boolean,
+      default: true,
+    },
+    pageSize: {
+      type: Number,
+      default: 0,
+    },
+    height: {
+      type: String,
+      default: "",
+    },
+  },
+  // 自定义事件
+  emits: {
+    // 分页事件
+    onPagging: null,
+  },
+  // 数据
+  data() {
+    return {
+      hoverRow: -1,
+      hoverCol: -1,
+      sortCol: "",
+      sortType: "",
+      currentPage: 1,
+      dialogShow: false,
+      dialogTitle:"",
+      dialogData:{},
+    };
+  },
+  computed: {
+    tableData() {
+      let that = this;
+      if (this.sortCol == "") {
+        return this.data.data;
+      } else {
+        let data = this.data.data;
+
+        data.sort((a, b) => {
+          let rev = 1;
+          if (that.sortType == "ASC") rev = 1;
+          else if (that.sortType == "DESC") rev = -1;
+
+          if (a[that.sortCol] > b[that.sortCol]) return rev * 1;
+          if (a[that.sortCol] < b[that.sortCol]) return rev * -1;
+          return 0;
+        });
+        return data;
+      }
+    },
+    pageable() {
+      return this.pageSize != 0;
+    },
+    pages() {
+      if (this.pageable) return parseInt(this.data.total / this.pageSize) + 1;
+      else return 0;
+    },
+    startRow() {
+      if (this.pageable) return (this.currentPage - 1) * this.pageSize;
+      else return 0;
+    },
+    endRow() {
+      if (this.pageable) return this.currentPage * this.pageSize;
+      else return this.data.data.length;
+    },
+  },
+  // 函数
+  methods: {
+    clearCheckBox(time){
+      this.$nextTick(()=>{
+        setTimeout(()=>{
+          const domArray = document.querySelectorAll(".curCheckBox");
+          for(let i=0;i<domArray.length;i++){
+            domArray[i].checked=false;
+          }
+        },(time || 300));
+      });
+    },
+    onClick(col, data) {
+      this.dialogShow = true;
+      this.dialogTitle="曲线偏差率排行";
+      const date = new Date();
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      let pdate = this.$parent.date.split("-");
+      if(pdate && pdate.length>1){
+        year = pdate[0];
+        month = pdate[1];
+      }
+
+      let that = this;
+      that.API.requestData({
+        method: "POST",
+        subUrl:"/leaderboard/curveMonthchatAjax",
+        data: {
+          wtId  : data.fj,
+          month : month,
+          type  :"zybz",
+          year  : year
+        },
+        success (res) {
+          if (res.code === 200) {
+            const linedata1 = [];
+            const linedata2 = [];
+            
+            res.data.datas.forEach((item, index) => {
+              linedata1.push(item['value2']);
+              linedata2.push(item['value3']);
+            });
+            
+            that.dialogShow = true;
+            that.dialogTitle="曲线偏差率排行";
+            that.initChart(linedata1,linedata2);
+          }
+        }
+      });
+    },
+    initChart(data1,data2){
+      let myChart = echarts.init(document.getElementById('chartDiv'));
+      let option = {
+        "color": [
+            "#05bb4c",
+            "#4b55ae",
+        ],
+        tooltip: {
+            trigger: 'axis'
+        },
+        "legend": {
+            "show": true,
+            "data": [
+                "最优功率",
+                "保证功率",
+            ],
+            "right": 56,
+            "icon": "circle",
+            "itemWidth": 6,
+            "inactiveColor": "#606769",
+            "textStyle": {
+                "color": "#B3BDC0",
+                "fontSize": 12
+            }
+        },
+        "grid": {
+            "top": 32,
+            "left": 40,
+            "right": 40,
+            "bottom": 24
+        },
+        "xAxis": [
+            {
+                "type": "category",
+                "boundaryGap": false,
+                "axisLabel": {
+                    "formatter": "{value}",
+                    "fontSize": 9.35925925925926,
+                    "textStyle": {
+                        "color": "#606769"
+                    }
+                },
+                "axisLine": {
+                    "show": false
+                },
+                "data": ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25"]
+            }
+        ],
+        "yAxis": [
+            {
+                "type": "value",
+                "name": "(W)",
+                "axisLabel": {
+                    "formatter": "{value}",
+                    "fontSize": 9.35925925925926
+                },
+                "axisLine": {
+                    "show": false
+                },
+                "splitLine": {
+                    "show": true,
+                    "lineStyle": {
+                        "color": "#606769",
+                        "type": "dashed"
+                    }
+                }
+            }
+        ],
+        "series": [
+            {
+                "name": "最优功率",
+                "type": "line",
+                "smooth": true,
+                "showSymbol": false,
+                "zlevel": 0,
+                "lineStyle": {
+                    "normal": {
+                        "color": "#05bb4c",
+                        "width": 1
+                    },
+                    "emphasis": {
+                        "color": "#05bb4c"
+                    }
+                },
+                "areaStyle": {
+                    "normal": {
+                        "color": {
+                            "colorStops": [
+                                {
+                                    "offset": 0,
+                                    "color": "rgba(5,187,76,0.3)"
+                                },
+                                {
+                                    "offset": 1,
+                                    "color": "rgba(5,187,76,0.1)"
+                                }
+                            ],
+                            "x": 0,
+                            "y": 0,
+                            "x2": 0,
+                            "y2": 1,
+                            "type": "linear",
+                            "global": false
+                        },
+                        "shadowColor": "rgba(5,187,76,0.1)",
+                        "shadowBlur": 10
+                    },
+                    "emphasis": {
+                        "color": {
+                            "colorStops": [
+                                {
+                                    "offset": 0,
+                                    "color": "rgba(5,187,76,0.3)"
+                                },
+                                {
+                                    "offset": 1,
+                                    "color": "rgba(5,187,76,0.1)"
+                                }
+                            ],
+                            "x": 0,
+                            "y": 0,
+                            "x2": 0,
+                            "y2": 1,
+                            "type": "linear",
+                            "global": false
+                        },
+                        "shadowColor": "rgba(5,187,76,0.1)",
+                        "shadowBlur": 10
+                    }
+                },
+
+                "yAxisIndex": 0,
+                "data": data1
+            },
+            {
+                "name": "保证功率",
+                "type": "line",
+                "smooth": true,
+                "showSymbol": false,
+                "zlevel": 2,
+                "lineStyle": {
+                    "normal": {
+                        "color": "#606769",
+                        "width": 1
+                    },
+                    "emphasis": {
+                        "color": "#fa8c16"
+                    }
+                },
+                "areaStyle": {
+                    "normal": {
+                        "color": "transparent",
+                        "shadowColor": "rgba(250,140,22,0.1)",
+                        "shadowBlur": 10
+                    },
+                    "emphasis": {
+                        "color": {
+                            "colorStops": [
+                                {
+                                    "offset": 0,
+                                    "color": "rgba(250,140,22,0.3)"
+                                },
+                                {
+                                    "offset": 1,
+                                    "color": "rgba(250,140,22,0.1)"
+                                }
+                            ],
+                            "x": 0,
+                            "y": 0,
+                            "x2": 0,
+                            "y2": 1,
+                            "type": "linear",
+                            "global": false
+                        },
+                        "shadowColor": "rgba(250,140,22,0.1)",
+                        "shadowBlur": 10
+                    }
+                },
+
+                "yAxisIndex": 0,
+                "data": data2
+            }
+        ]
+      };
+      myChart.clear();
+      myChart && myChart && myChart.setOption(option);
+      this.resize = function() {
+        myChart.resize();
+      };
+      window.addEventListener("resize", this.resize);
+      myChart.resize();
+    },
+    onSort(col) {
+      if (col.sortable == true) {
+        this.sortCol = col.field;
+        switch (this.sortType) {
+          case "":
+            this.sortType = "DESC";
+            break;
+          case "DESC":
+            this.sortType = "ASC";
+            break;
+          case "ASC":
+            this.sortType = "";
+            break;
+        }
+      }
+    },
+    template(col, data) {
+      if (!col.template) return data;
+      else return col.template(data);
+    },
+    hover(row, col) {
+      if (this.showHover) {
+        this.hoverRow = row;
+        if (this.showColHover) this.hoverCol = col;
+      }
+    },
+    leave() {
+      this.hoverRow = -1;
+      this.hoverCol = -1;
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.$emit("onPagging", {
+        pageIndex: this.currentPage,
+        pageSize: this.pageSize,
+        start: this.startRow,
+        end: this.endRow,
+      });
+    },
+  },
+  // 生命周期钩子
+  beforeCreate() {
+    // 创建前
+  },
+  created() {
+    // 创建后
+  },
+  beforeMount() {
+    // 渲染前
+  },
+  mounted() {
+    // 渲染后
+  },
+  beforeUpdate() {},
+  updated() {},
+};
+</script>
+
+<style lang="less">
+.chart {
+  width: 1000px;
+  height: 500px;
+}
+</style>

+ 215 - 0
src/components/coms/table/table-unpage.vue

@@ -0,0 +1,215 @@
+<template>
+  <table class="com-table">
+    <thead>
+      <tr>
+        <th v-for="(col, index) of data.column" :key="index" :class="{ light: col.is_light }" :style="{ width: col.width }" @click="onSort(col)">
+          {{ col.name }}
+        </th>
+      </tr>
+    </thead>
+    <el-scrollbar>
+      <tbody :style="{ height: height }">
+        <tr v-for="(row, index) of tableData" :key="index">
+          <td
+            v-for="(col, i) of data.column"
+            :key="i"
+            :style="{ width: col.width }"
+            :class="{ light: hoverRow == row || hoverCol == col, num: col.is_num, 'always-light': col.is_light || row.is_light }"
+            @mouseenter="hover(row, col)"
+            @mouseleave="leave()"
+          >
+            <component :is="col.type ? col.type : 'div'" v-bind="col.props" v-html="template(col, row[col.field])" @click="onClick(col, row)"> </component>
+          </td>
+        </tr>
+      </tbody>
+    </el-scrollbar>
+  </table>
+</template>
+
+<script>
+export default {
+  // 名称
+  name: "ComTable",
+  // 使用组件
+  components: {},
+  // 传入参数
+  props: {
+    /**
+             * {
+                    column: [{
+                        name: "风机名称",
+                        field: "name",
+                        type:'div',
+                        width:'', // 宽度
+                        is_num: false, // 是否为数字
+                        is_light: false, // 是否高亮
+                        template:function(){ }
+                        click:function(){} //点击事件
+                        sortable:fasle // 排序
+                        // 新增用于在表格中使用动态三方组件
+                        type:'el-tag', // * 新增 用于传入三方组件名称 实现三方组件引入  component :is 方式实现
+                        props:{}, // * 新增 用户传入三方组件的 props 与type同时使用
+                    },{
+                        name: "冷却风温度",
+                        field: "lqf",
+                        is_num: true,
+                        is_light: false
+                    }],
+                    data: [{
+                        name: "1E01",
+                        lqf: 15.78,
+                        is_light: false
+                    }],
+                    total:200
+                }
+             */
+    data: Object,
+    // hover 样式
+    showHover: {
+      type: Boolean,
+      default: true,
+    },
+    // 列高亮
+    showColHover: {
+      type: Boolean,
+      default: false,
+    },
+    canScroll: {
+      type: Boolean,
+      default: true,
+    },
+    pageSize: {
+      type: Number,
+      default: 0,
+    },
+    height: {
+      type: String,
+      default: "",
+    },
+  },
+  // 自定义事件
+  emits: {
+    // 分页事件
+    onPagging: null,
+  },
+  // 数据
+  data() {
+    return {
+      hoverRow: -1,
+      hoverCol: -1,
+      sortCol: "",
+      sortType: "",
+      currentPage: 1,
+    };
+  },
+  computed: {
+    tableData() {
+      let that = this;
+      if (this.sortCol == "") {
+        return this.data.data;
+      } else {
+        let data = this.data.data;
+
+        data.sort((a, b) => {
+          let rev = 1;
+          if (that.sortType == "ASC") rev = 1;
+          else if (that.sortType == "DESC") rev = -1;
+
+          if (a[that.sortCol] > b[that.sortCol]) return rev * 1;
+          if (a[that.sortCol] < b[that.sortCol]) return rev * -1;
+          return 0;
+        });
+        return data;
+      }
+    },
+    pageable() {
+      return this.pageSize != 0;
+    },
+    pages() {
+      if (this.pageable) return parseInt(this.data.total / this.pageSize) + 1;
+      else return 0;
+    },
+    startRow() {
+      if (this.pageable) return (this.currentPage - 1) * this.pageSize;
+      else return 0;
+    },
+    endRow() {
+      if (this.pageable) return this.currentPage * this.pageSize;
+      else return this.data.data.length;
+    },
+  },
+  // 函数
+  methods: {
+    clearCheckBox(time){
+      this.$nextTick(()=>{
+        setTimeout(()=>{
+          const domArray = document.querySelectorAll(".curCheckBox");
+          for(let i=0;i<domArray.length;i++){
+            domArray[i].checked=false;
+          }
+        },(time || 300));
+      });
+    },
+    onClick(col, data) {
+      if (col.click) col.click(event, data);
+    },
+    onSort(col) {
+      if (col.sortable == true) {
+        this.sortCol = col.field;
+        switch (this.sortType) {
+          case "":
+            this.sortType = "DESC";
+            break;
+          case "DESC":
+            this.sortType = "ASC";
+            break;
+          case "ASC":
+            this.sortType = "";
+            break;
+        }
+      }
+    },
+    template(col, data) {
+      if (!col.template) return data;
+      else return col.template(data);
+    },
+    hover(row, col) {
+      if (this.showHover) {
+        this.hoverRow = row;
+        if (this.showColHover) this.hoverCol = col;
+      }
+    },
+    leave() {
+      this.hoverRow = -1;
+      this.hoverCol = -1;
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.$emit("onPagging", {
+        pageIndex: this.currentPage,
+        pageSize: this.pageSize,
+        start: this.startRow,
+        end: this.endRow,
+      });
+    },
+  },
+  // 生命周期钩子
+  beforeCreate() {
+    // 创建前
+  },
+  created() {
+    // 创建后
+  },
+  beforeMount() {
+    // 渲染前
+  },
+  mounted() {
+    // 渲染后
+  },
+  beforeUpdate() {},
+  updated() {},
+};
+</script>
+
+<style lang="less">
+</style>

+ 602 - 3
src/router/index.js

@@ -1,7 +1,8 @@
 import { createRouter, createWebHashHistory } from 'vue-router'
 import Home from '../views/Home/Home.vue'
-
+ 
 const routes = [{
+<<<<<<< HEAD
         path: '/',
         redirect: '/monitor/home'
     },
@@ -570,15 +571,613 @@ const routes = [{
         component: () =>
             import ( /* webpackChunkName: "historysearch" */ "../views/NewPages/history-search.vue"),
     },
+=======
+  path: '/',
+  redirect: '/monitor/home'
+},
+{
+  path: '/monitor/home', // 驾驶舱
+  name: 'Home',
+  component: Home,
+},
+{
+  path: '/monitor/about',
+  name: 'About',
+  component: () =>
+    import( /* webpackChunkName: "about" */ '../views/About.vue'),
+},
+{
+  path: '/monitor/demo',
+  name: 'Demo',
+  component: () =>
+    import( /* webpackChunkName: "Demo" */ '../views/Demo.vue'),
+},
+{
+  path: '/monitor/status', // 状态监视
+  name: 'Status',
+  component: () =>
+    import( /* webpackChunkName: "status" */ '../views/Status/Status.vue'),
+},
+{
+  path: '/monitor/agc', // AGC 监视
+  name: 'Agc',
+  component: () =>
+    import( /* webpackChunkName: "agc" */ '../views/Agc/Agc.vue'),
+},
+{
+  path: '/monitor/windsite',
+  name: 'WindSite',
+  component: () =>
+    import( /* webpackChunkName: "windsite" */ '../views/WindSite/WindSite.vue'),
+  children: [{
+    path: 'home/:wpId', // 场站监视
+    component: () =>
+      import( /* webpackChunkName: "windsitehome" */ '../views/WindSite/pages/Home/Home.vue'),
+  }, {
+    path: 'draughtfanlist/:wpId', // 风机列表
+    component: () =>
+      import( /* webpackChunkName: "windsitedraughtfanlist" */ '../views/WindSite/pages/DraughtFanList.vue'),
+  }, {
+    path: 'matrix/:wpId', // 风场矩阵
+    component: () =>
+      import( /* webpackChunkName: "windsitematrix" */ '../views/WindSite/pages/Matrix.vue'),
+  }, {
+    path: 'lightmatrix/:wpId',
+    component: () =>
+      import( /* webpackChunkName: "windsitelightmatrix" */ '../views/WindSite/pages/LightMatrix.vue'),
+  }, {
+    path: 'box/:wpId',
+    component: () =>
+      import( /* webpackChunkName: "windsitebox" */ '../views/WindSite/pages/Box.vue'),
+  }, {
+    path: 'info/:wpId/:wtId', // 单机状态监视
+    component: () =>
+      import( /* webpackChunkName: "info" */ '../views/WindSite/pages/Info/Info.vue'),
+  }, {
+    path: 'tower/:wpId', // 测风塔
+    component: () =>
+      import( /* webpackChunkName: "windsitetower" */ '../views/WindSite/pages/Tower.vue'),
+  }, {
+    path: 'inverter-info/:wpId',
+    component: () =>
+      import( /* webpackChunkName: "inverter-info" */ '../views/WindSite/pages/Inverter-Info.vue'),
+  }, {
+    path: 'map/:wpId',
+    component: () =>
+      import( /* webpackChunkName: "windsitemap" */ '../views/WindSite/pages/Map.vue'),
+  }, {
+    path: 'map1/:wpId',
+    component: () =>
+      import( /* webpackChunkName: "windsitemap1" */ '../views/WindSite/pages/Map1.vue'),
+  },
+  {
+    path: 'boosterstation/:wpId', // 升压站
+    component: () =>
+      import( /* webpackChunkName: "boosterstation" */ '../views/WindSite/pages/BoosterStation.vue'),
+  },
+  {
+    path: "generalappearance/:wpId", // 总样貌
+    component: () =>
+      import( /* webpackChunkName: "generalappearance" */ "../views/WindSite/pages/GeneralAppearance.vue"),
+  },
+  ]
+},
+{
+  path: '/monitor/lightmatrix', // 光伏明细矩阵
+  name: 'LightMatrix',
+  component: () =>
+    import( /* webpackChunkName: "lightmatrix" */ '../views/LightMatrix/LightMatrix.vue'),
+},
+{
+  path: '/monitor/lightmatrix1', // 基础矩阵
+  name: 'LightMatrix1',
+  component: () =>
+    import( /* webpackChunkName: "lightmatrix1" */ '../views/LightMatrix1/LightMatrix1.vue'),
+},
+{
+  path: '/monitor/lightmatrix2', // 欠发矩阵
+  name: 'LightMatrix2',
+  component: () =>
+    import( /* webpackChunkName: "lightmatrix2" */ '../views/LightMatrix2/LightMatrix2.vue'),
+}, {
+  path: '/monitor/lightmatrix3', // 明细矩阵
+  name: 'LightMatrix3',
+  component: () =>
+    import( /* webpackChunkName: "lightmatrix3" */ '../views/LightMatrix3/LightMatrix3.vue'),
+}, {
+  path: '/decision/decision1', //风机绩效榜
+  name: 'decision1',
+  component: () =>
+    import( /* webpackChunkName: "decision1" */ '../views/Decision/Decision1.vue'),
+},
+{
+  path: '/decision/decision1Mx', //风机绩效榜明细
+  name: 'decision1Mx',
+  component: () =>
+    import( /* webpackChunkName: "decision1Mx" */ '../views/Decision/Decision1Mx.vue'),
+},
+{
+  path: '/decision/decision2', //五项损失率
+  name: 'decision2',
+  component: () =>
+    import( /* webpackChunkName: "decision2" */ '../views/Decision/Decision2.vue'),
+},
+{
+  path: '/decision/decision2Cndb', //场内对标
+  name: 'decision2Cndb',
+  component: () =>
+    import( /* webpackChunkName: "decision2Cndb" */ '../views/Decision/Decision2Cndb.vue'),
+},
+{
+  path: '/decision/decision2Cjdb', //场际对标
+  name: 'decision2Cjdb',
+  component: () =>
+    import( /* webpackChunkName: "decision2Cjdb" */ '../views/Decision/Decision2Cjdb.vue'),
+},
+{
+  path: '/decision/decision2Xmdb', //项目对标
+  name: 'decision2Xmdb',
+  component: () =>
+    import( /* webpackChunkName: "decision2Xmdb" */ '../views/Decision/Decision2Xmdb.vue'),
+},
+{
+  path: '/decision/decision2Xldb', //线路对标
+  name: 'decision2Xldb',
+  component: () =>
+    import( /* webpackChunkName: "decision2Xldb" */ '../views/Decision/Decision2Xldb.vue'),
+},
+{
+  path: '/decision/decision3', //性能对标
+  name: 'decision3',
+  component: () =>
+    import( /* webpackChunkName: "decision3" */ '../views/Decision/Decision3.vue'),
+},
+{
+  path: '/decision/decision4', //值际对标
+  name: 'decision4',
+  component: () =>
+    import( /* webpackChunkName: "decision4" */ '../views/Decision/Decision4.vue'),
+},
+{
+  path: '/decision/decision4czzl', //操作指令统计
+  name: 'decision4czzl',
+  component: () =>
+    import( /* webpackChunkName: "decision4czzl" */ '../views/Decision/Decision4Czzl.vue'),
+},
+{
+  path: '/health',
+  name: 'health',
+  component: () =>
+    import('../views/HealthControl/Health.vue'),
+},
+{
+  path: '/health/healthDay', //风机  日  信息量化评级管理
+  name: 'healthDay',
+  component: () =>
+    import('../views/HealthControl/HealthDay.vue'),
+},
+{
+  path: '/health/healthMonth', //风机  月  信息量化评级管理
+  name: 'healthMonth',
+  component: () =>
+    import('../views/HealthControl/HealthMonth.vue'),
+},
+{
+  path: '/health/healthYear', //风机  年  信息量化评级管理
+  name: 'healthYear',
+  component: () =>
+    import('../views/HealthControl/HealthYear.vue'),
+},
+{
+  path: '/health/health1',
+  name: 'health1',
+  component: () =>
+    import('../views/HealthControl/Health1.vue'),
+},
+{
+  path: '/health/health2', // 健康管理首页
+  name: 'health2',
+  component: () =>
+    import('../views/HealthControl/Health2.vue'),
+},
+{
+  path: '/health/health3/:wpId', // 场站健康管理
+  name: 'health3',
+  component: () =>
+    import('../views/HealthControl/Health3.vue'),
+},
+{
+  path: '/health/health4',
+  name: 'health4',
+  children: [{
+    path: "/health/health0/:wpId/:wtId",
+    name: "health0",
+    component: () =>
+      import("../views/HealthControl/Health0.vue"),
+  }, {
+    path: "/health/health10/:wtId",
+    name: "health10",
+    component: () =>
+      import( /* webpackChunkName: "health8" */ "../views/HealthControl/Health10.vue"),
+  }, {
+    path: 'healthLineChart/:wtId', // 风机健康趋势
+    component: () =>
+      import( /* webpackChunkName: "healthLineChart" */ '../views/HealthControl/healthLineChart.vue'),
+  },
+  {
+    path: 'healthLineChart2/:wtId', // 健康趋势
+    component: () =>
+      import( /* webpackChunkName: "healthLineChart2" */ '../views/HealthControl/healthLineChart2.vue'),
+  }
+  ],
+  component: () =>
+    import('../views/HealthControl/Health4.vue'),
+},
+{
+  path: '/health/health5/',
+  name: 'health5',
+  component: () =>
+    import('../views/HealthControl/Health5.vue'),
+},
+{
+  path: '/health/health6', // 健康总览
+  name: 'health6',
+  component: () =>
+    import('../views/HealthControl/Health6.vue'),
+},
+{
+  path: '/cutAnalyse', // 切入切出分析
+  name: 'cutAnalyse',
+  component: () =>
+    import('../views/cutAnalyse/index.vue'),
+},
+{
+  path: '/cutAnalyse', // 切入切出分析
+  name: 'cutAnalyse',
+  component: () =>
+    import('../views/cutAnalyse/index.vue'),
+},
+{
+  path: '/wtSaturability', // 单机饱和度
+  name: 'wtSaturability',
+  component: () =>
+    import('../views/wtSaturability/index.vue'),
+},
+{
+  path: '/windAnalysis', // 风资源分析
+  name: 'windAnalysis',
+  component: () =>
+    import('../views/windAnalysis/index.vue'),
+},
+{
+  path: '/powerRank', // 发电效率排行
+  name: 'powerRank',
+  component: () =>
+    import('../views/powerRank/index.vue'),
+},
+{
+  path: '/totalPowerRank', // 总发电效率排行
+  name: 'totalPowerRank',
+  component: () =>
+    import('../views/totalPowerRank/index.vue'),
+},
+{
+  path: '/warningRank', // 报警排行
+  name: 'warningRank',
+  component: () =>
+    import('../views/warningRank/index.vue'),
+},
+{
+  path: '/realSearch', // 测点数据查询
+  name: 'realSearch',
+  component: () =>
+    import('../views/realSearch/index.vue'),
+},
+{
+  path: '/singleAnalysis', // 单机月度分析
+  name: 'singleAnalysis',
+  component: () =>
+    import('../views/singleAnalysis/index.vue'),
+},
+{
+  path: '/performanceAnalysis', // 单机信息总览
+  name: 'performanceAnalysis',
+  component: () => import('../views/performanceAnalysis/index.vue'),
+},
+{
+  path: "/performanceAnalysis/detail/:wpId/:wtId", // 单机信息总览详情
+  name: "performanceAnalysisDetail",
+  component: () => import( /* webpackChunkName: "performanceAnalysisDetail" */ "../views/NewPages/dj1.vue"),
+},
+{
+  path: '/historySearch', // 测点历史数据查询
+  name: 'historySearch',
+  component: () =>
+    import('../views/historySearch/index.vue'),
+},
+{
+  path: '/knowledge', //故障知识列表
+  name: 'knowledge1',
+  component: () =>
+    import('../views/Knowledge/Knowledge1.vue'),
+},
+{
+  path: '/knowledge2', //安全措施知识
+  name: 'knowledge2',
+  component: () =>
+    import('../views/Knowledge/Knowledge2.vue'),
+},
+{
+  path: '/knowledge3', //风险辨识知识
+  name: 'knowledge3',
+  component: () =>
+    import('../views/Knowledge/Knowledge3.vue'),
+},
+{
+  path: '/knowledge4', //作业指导知识
+  name: 'knowledge4',
+  component: () =>
+    import('../views/Knowledge/Knowledge4.vue'),
+},
+{
+  path: '/knowledge5', //特征参数
+  name: 'knowledge5',
+  component: () =>
+    import('../views/Knowledge/Knowledge5.vue'),
+},
+{
+  path: '/knowledge6', //排查检修方案
+  name: 'knowledge6',
+  component: () =>
+    import('../views/Knowledge/Knowledge6.vue'),
+},
+{
+  path: '/knowledge7', //预警知识
+  name: 'knowledge7',
+  component: () =>
+    import('../views/Knowledge/Knowledge7.vue'),
+},
+{
+  path: '/allLifeManage', // 全生命周期管理
+  name: 'allLifeManage',
+  component: () =>
+    import('../views/allLifeManage/index.vue'),
+},
+{
+  path: "/health/health8",
+  name: "health8",
+  component: () =>
+    import( /* webpackChunkName: "health8" */ "../views/HealthControl/Health8.vue"),
+},
+{
+  path: "/monitor/sandtable",
+  name: "sandtable",
+  component: () =>
+    import( /* webpackChunkName: "sandtable" */ "../views/SandTable/SandTable.vue"),
+},
+{
+  path: "/warnStatistics", // 预警评判分析
+  name: "warnStatistics",
+  component: () =>
+    import( /* webpackChunkName: "warnStatistics" */ "../views/warnStatistics/index.vue"),
+},
+{
+  path: "/malfunctionStatistics", // 故障统计
+  name: "malfunctionStatistics",
+  component: () =>
+    import( /* webpackChunkName: "malfunctionStatistics" */ "../views/malfunctionStatistics/index.vue"),
+},
+{
+  path: "/planPower", // 计划发电量填报
+  name: "planPower",
+  component: () =>
+    import( /* webpackChunkName: "planPower" */ "../views/planPower/index.vue"),
+},
+{
+  path: "/new/pf1",
+  name: "pf1",
+  component: () =>
+    import( /* webpackChunkName: "pf1" */ "../views/NewPages/power-forecast-1.vue"),
+},
+{
+  path: "/new/fs",
+  name: "fs",
+  component: () =>
+    import( /* webpackChunkName: "fs" */ "../views/NewPages/forecast-system.vue"),
+},
+{
+  path: '/new/ztfx', // 专题分析
+  name: 'ztfx',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/ztfx.vue'),
+},
+{
+  path: '/new/fnlyl', // 风能利用率
+  name: 'fnlyl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/fnlyl.vue'),
+},
+{
+  path: '/new/whssl', // 维护损失率
+  name: 'whssl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/whssl.vue'),
+},
+{
+  path: '/new/gzssl', // 故障损失率
+  name: 'gzssl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/gzssl.vue'),
+},
+{
+  path: '/new/xdssl', // 限电损失率
+  name: 'xdssl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/xdssl.vue'),
+},
+{
+  path: '/new/xnssl', // 性能损失率
+  name: 'xnssl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/xnssl.vue'),
+},
+{
+  path: '/new/slssl', // 受累损失率
+  name: 'slssl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/slssl.vue'),
+},
+{
+  path: '/new/mtbf', // mtbf
+  name: 'mtbf',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/mtbf.vue'),
+},
+{
+  path: '/new/mttr', // mttr
+  name: 'mttr',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/mttr.vue'),
+},
+{
+  path: '/new/zfwjsl', // 复位及时率
+  name: 'zfwjsl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/fwjsl.vue'),
+},
+{
+  path: '/new/zztzhl', // 状态转换率
+  name: 'zztzhl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/ztzhl.vue'),
+},
+{
+  path: '/new/zxqjsl', // 消缺及时率
+  name: 'zxqjsl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/xqjsl.vue'),
+},
+{
+  path: '/new/zfdl', // 发电量分析
+  name: 'zfdl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/fdl.vue'),
+},
+{
+  path: '/new/zzhcydl', // 综合场用电量
+  name: 'zzhcydl',
+  component: () => import( /* webpackChunkName: "ztfx" */ '../views/specific/zhcydl.vue'),
+},
+{
+  path: '/new/intelligentalarmcenter',
+  name: 'intelligentalarmcenter',
+  component: () =>
+    import( /* webpackChunkName: "intelligentalarmcenter" */ '../views/NewPages/intelligent-alarm-center.vue'),
+},
+{
+  path: '/new/personnel',
+  name: 'personnel',
+  component: () =>
+    import( /* webpackChunkName: "personnel" */ '../views/NewPages/personnel.vue'),
+},
+{
+  path: '/new/znzhfx/:wtId/:year/:month',
+  name: 'znzhfx',
+  component: () =>
+    import( /* webpackChunkName: "ztfx" */ '../views/NewPages/znzhfx.vue'),
+},
+{
+  path: '/new/alarmcenter',
+  name: 'alarmcenter',
+  component: () =>
+    import( /* webpackChunkName: "personnel" */ '../views/NewPages/alarm-center.vue'),
+},
+{
+  path: '/new/knowledgebase',
+  name: 'knowledgebase',
+  component: () =>
+    import( /* webpackChunkName: "knowledgebase" */ '../views/NewPages/knowledge-base.vue'),
+},
+{
+  path: "/new/dj",
+  name: "dj",
+  component: () =>
+    import( /* webpackChunkName: "dj" */ "../views/NewPages/dj.vue"),
+},
+{
+  path: "/new/dj2",
+  name: "dj2",
+  component: () =>
+    import( /* webpackChunkName: "dj2" */ "../views/NewPages/dj2.vue"),
+},
+{
+  path: "/new/dialog",
+  name: "dialog",
+  component: () =>
+    import( /* webpackChunkName: "dj2" */ "../views/NewPages/dialogs.vue"),
+}, // 三率管理/复位及时率
+{
+  path: '/fwjsl',
+  name: 'fwjsl',
+  component: () =>
+    import('../views/Decision/slgl/fwjsl.vue')
+},
+// 三率管理/状态转换率
+{
+  path: '/ztzhl',
+  name: 'ztzhl',
+  component: () =>
+    import('../views/Decision/slgl/ztzhl.vue')
+},
+// 三率管理/消缺及时率
+{
+  path: '/xqjsl',
+  name: 'xqjsl',
+  component: () =>
+    import('../views/Decision/slgl/xqjsl.vue')
+},
+// 曲线排行榜
+{
+    path:'/qxpclfx',
+    name:'qxpclfx',
+    component:()=> import('../views/nxfx/qxpclfx.vue')
+},
+// 等级评估(单机等级评估管理-量化评级)
+{
+    path:'/djpg',
+    name:'djpg',
+    component:()=> import('../views/HealthControl/gradeassessment.vue')
+},
+{
+  path: "/new/powerforecast2",
+  name: "powerforecast2",
+  component: () => import(/* webpackChunkName: "powerforecast2" */ "../views/NewPages/power-forecast-2.vue"),
+},
+{
+  path: "/new/alarmcenter1",
+  name: "alarmcenter1",
+  component: () => import(/* webpackChunkName: "alarmcenter1" */ "../views/NewPages/alarm-center-1.vue"),
+},
+{
+  path: "/new/tjsj",
+  name: "tjsj",
+  component: () =>
+      import ( /* webpackChunkName: "tjsj" */ "../views/warn/tjsj.vue"),
+},
+{
+  path: "/new/xdgl",
+  name: "xdgl",
+  component: () =>
+      import ( /* webpackChunkName: "xdgl" */ "../views/warn/xdgl.vue"),
+},
+{
+  path: "/new/alarmcenter2",
+  name: "alarmcenter2",
+  component: () =>
+      import ( /* webpackChunkName: "alarmcenter2" */ "../views/NewPages/alarm-center-2.vue"),
+},
+{
+  path: "/new/historysearch",
+  name: "historysearch",
+  component: () => import(/* webpackChunkName: "historysearch" */ "../views/NewPages/history-search.vue"),
+},
+>>>>>>> cb64883b15d2927935ecc72ec2882985c2859f83
 ]
 const router = createRouter({
     history: createWebHashHistory(),
     base: '/zhfx/',
     routes
 })
-
+ 
 router.beforeEach((to, from, next) => {
     next()
 })
-
+ 
 export default router

+ 32 - 47
src/tools/basicTool.js

@@ -172,57 +172,30 @@ export default {
 
   /**
    * 导出 Json 为 excel 表格
-   * @param {Object} options 传入一个配置项,根据传入的配置项导出对应的 excel 表格,其中:
-   * @param {Array} tTitle 表格的标题,置空则为默认以日期为标题的表格
-   * @param {Array} tHeader 表格的表头,必传
-   * @param {Array} tBody 表格需要展示的字段名,必传
-   * @param {Array} tMerges 表格标题需要合并的单元格,置空则为默认 A1 格为表格标题显示区域
-   * @param {Array} tData 表格渲染所用的数据源,必传
-   * @param {Boolean} autoWidth 表是否根据表格内容自动撑开列宽,置空则为默认 true 
-   * @param {String} exportName 所导出的表格文件名,置空则以时间戳为文件名称进行导出
+   * @param {Object} tableData 用于规定表格表头和内容的 Object
+   * @param {String} excelName 导出的文件名
    */
-  exportExcelForJson (options) {
-    const {
-      export_json_to_excel
-    } = __getExport2Excel();
-
-    let title = options.tTitle;
-
-    if (!title || !title.length) {
-      title = []
-      options.tBody.forEach((ele, index) => {
-        if (!index) {
-          title.push(new Date().formatDate("yyyy-MM-dd") + '导出的表格');
-        } else {
-          title.push("");
-        }
-      });
-    }
-
-    let header = options.tHeader;
-    let data = options.tData.map(data => options.tBody.map(key => data[key]));
-    let merges = options.tMerges || [];
-    let filename = options.exportName || new Date().getTime();
-    let bookType = "xlsx";
-    let autoWidth = (options.autoWidth == true || options.autoWidth == false) ? options.autoWidth : true;
-
-    data.map(item => {
-      item.map((i, index) => {
-        if (!i) item[index] = "";
-      });
+  exportExcel (tableData, excelName) {
+    const { export_json_to_excel } = require('@tools/excel/Export2Excel.js'); // 注意这个Export2Excel路径      
+    let tHeader = []; // 上面设置Excel的表格第一行的标题       
+    let filterVal = []; // 上面的index、nickName、name是tableData里对象的属性key值   
+
+    const formatJson = function (filterVal, jsonData) {
+      return jsonData.map(v => filterVal.map(j => v[j]));
+    };
+
+    tableData.column.forEach(ele => {
+      tHeader.push(ele.name);
+      filterVal.push(ele.field);
     });
 
-    export_json_to_excel({
-      title,
-      header,
-      data,
-      merges,
-      filename,
-      bookType,
-      autoWidth
-    });
+    const list = tableData.data; //把要导出的数据tableData存到list 
+    const data = formatJson(filterVal, list);
+    export_json_to_excel(tHeader, data, (excelName || "导出的Excel")); // 最后一个是表名字
   },
 
+
+
   // JS 触发全屏功能
   requestFullscreen () {
     //全屏
@@ -285,5 +258,17 @@ export default {
     isMail: /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/,
     // 是否是数字
     isNumber: /^(-?\d+)(\.\d+)?$/
+  },
+
+  elCkeck: {
+    isNumber (rule, value, callback) {
+      if (value === '') {
+        callback(new Error('该值不可为空'));
+      } else if (!/^(-?\d+)(\.\d+)?$/.test(value)) {
+        callback(new Error('输入有误,仅支持输入数字'));
+      } else {
+        callback();
+      }
+    }
   }
-};
+}

+ 192 - 231
src/views/HealthControl/dayinfo.vue

@@ -1,31 +1,22 @@
 <template>
   <div class="health-day-info">
     <div class="header">
-      <span class="herder-info">
-        风机编号:麻黄山24号风机
-      </span>
-      <span class="herder-info">
-        风机编号:麻黄山24号风机
-      </span>
-      <span class="herder-info">
-        基础指标
-      </span>
+      <span class="herder-info" :width="800" v-for="item of gridDatas" :key="item">风机编号:{{item.windturbineid}}</span>
+      <span class="herder-info">基础指标</span>
     </div>
     <div class="body">
       <div class="left">
         <table class="table-form">
           <tr>
-            <td class="white">量化评级:AA</td>
-            <td class="white">量化评级:AA</td>
+            <td class="white" v-for="item of gridDatas" :key="item">量化评级:{{item.level}}</td>
           </tr>
           <tr>
-            <td class="white">综合排名:1</td>
-            <td class="white">综合排名:1</td>
+            <td class="white" v-for="item of gridDatas" :key="item">综合排名:{{item.rank}}</td>
           </tr>
         </table>
 
         <div class="chart-body">
-          <normal-radar-chart :height="'500px'" :value="radarValue" />
+          <normal-radar-chart :height="'500px'" :value="chartDatas" />
         </div>
       </div>
       <div class="left">
@@ -33,210 +24,16 @@
           <tr>
             <td class="white">类型</td>
             <td class="white">指标</td>
-            <td class="white">麻黄山24号风机</td>
-            <td class="white">麻黄山26号风机</td>
-            <td class="white" colspan="2">排名</td>
+            <td class="white" v-for="item of gridDatas" :key="item">{{item.windturbineid}}</td>
+            <td class="white" :colspan="gridDatas.length">排名</td>
             <td class="white" colspan="2">评分</td>
           </tr>
-          <tr>
-            <td class="white"></td>
-            <td class="white">发电量</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white"></td>
-            <td class="white">理论发电量</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white"></td>
-            <td class="white">平均功率</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white"></td>
-            <td class="white">故障损失电量</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white"></td>
-            <td class="white">限电损失电量</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white"></td>
-            <td class="white">维护损失电量</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white"></td>
-            <td class="white">故障时间</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white"></td>
-            <td class="white">维护时间</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white"></td>
-            <td class="white">运行时间</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white"></td>
-            <td class="white">停机时间</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white">性能</td>
-            <td class="white">平均切入风速</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white">性能</td>
-            <td class="white">性能损失电量</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white">性能</td>
-            <td class="white">拟合优度</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white">性能</td>
-            <td class="white">功率一致性系数</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white">可靠性管理</td>
-            <td class="white">利用小时</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white">可靠性管理</td>
-            <td class="white">设备可利用率</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white">可靠性管理</td>
-            <td class="white">等效可利用率</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white">可靠性管理</td>
-            <td class="white">有效风时数</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white">可靠性管理</td>
-            <td class="white">平均风速</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-          </tr>
-          <tr>
-            <td class="white">可靠性管理</td>
-            <td class="white">静风频率</td>
-            <td class="white">187.99</td>
-            <td class="white">187.99</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
-            <td class="white">0</td>
+          <tr v-for="item of column" :key="item">
+            <td class="white">{{item.type}}</td>
+            <td class="white">{{item.name}}</td>
+            <td class="white" v-for="row of gridDatas" :key="row">{{row[item.field]}}</td>
+            <td class="white" v-for="row of gridDatas" :key="row">{{row[item.rank]}}</td>
+            <td class="white" v-for="row of gridDatas" :key="row">{{row[item.score]}}</td>
           </tr>
         </table>
       </div>
@@ -248,31 +45,195 @@
 import NormalRadarChart from "../../components/chart/radar/normal-radar-chart.vue";
 export default {
   components: { NormalRadarChart },
+  props: {
+    gridDatas: {},
+    chartDatas: {}
+  },
   data() {
     return {
       value: "",
-      radarValue: [
+      column: [
         {
-          indicator: ["平均切入风速", "性能损失电量", "拟合优度", "功率一致性系数", "利用小时", "设备可利用率", "等效可利用系数", "有效风时数", "平均风速", "静风频率"],
-          data: [
-            {
-              value: [44200, 14200, 20000, 35000, 50000, 38000, 44200, 14200, 20000, 35000],
-              name: "NAME",
-            },
-          ],
+          name: "发电量",
+          field: "dayfdl",
+          rank: "monthfdl"
         },
         {
-          indicator: ["平均切入风速", "性能损失电量", "拟合优度", "功率一致性系数", "利用小时", "设备可利用率", "等效可利用系数", "有效风时数", "平均风速", "静风频率"],
+          name: "理论发电量",
+          field: "dayllfdl",
+          rank: "monthllfdl",
+          score: "yearllfdl"
+        },
+        {
+          name: "平均功率",
+          field: "daygl",
+          rank: "monthgl",
+          score: "yeargl"
+        },
+        {
+          name: "故障损失电量",
+          field: "daygzssdl",
+          rank: "monthgzssdl",
+          score: "yeargzssdl"
+        },
+        {
+          name: "限电损失电量",
+          field: "dayxdssdl",
+          rank: "monthxdssdl",
+          score: "yearxdssdl"
+        },
+        {
+          name: "维护损失电量",
+          field: "daywhssdl",
+          rank: "monthwhssdl",
+          score: "yearwhssdl"
+        },
+        {
+          name: "故障时间",
+          field: "daygzsj",
+          rank: "monthgzsj",
+          score: "yeargzsj"
+        },
+        {
+          name: "维护时间",
+          field: "daywhsj",
+          rank: "monthwhsj",
+          score: "yearwhsj"
+        },
+        {
+          name: "运行时间",
+          field: "dayyxsj",
+          rank: "monthyxsj",
+          score: "yearyxsj"
+        },
+        {
+          name: "停机时间",
+          field: "daytjsj",
+          rank: "monthtjsj",
+          score: "yeartjsj"
+        },
+        {
+          name: "平均切入风速",
+          field: "dayxfqr",
+          type: "性能",
+          rank: "monthxfqr",
+          score: "yearxfqr"
+        },
+        {
+          name: "性能损失电量",
+          field: "dayxnssdl",
+          type: "性能",
+          rank: "monthxnssdl",
+          score: "yearxnssdl"
+        },
+        {
+          name: "拟合优度",
+          field: "daynhyd",
+          type: "性能",
+          rank: "monthnhyd",
+          score: "yearnhyd"
+        },
+        {
+          name: "功率一致性系数",
+          field: "dayglyzxxs",
+          type: "性能",
+          rank: "monthglyzxxs",
+          score: "yearglyzxxs"
+        },
+        {
+          name: "利用小时",
+          field: "daylyxs",
+          type: "可靠性管理",
+          rank: "monthlyxs",
+          score: "yearlyxs"
+        },
+        {
+          name: "设备可利用率",
+          field: "daysbklyl",
+          type: "可靠性管理",
+          rank: "monthsbklyl",
+          score: "yearsbklyl"
+        },
+        {
+          name: "等效可利用率",
+          field: "daydxkyxs",
+          type: "可靠性管理",
+          rank: "monthdxkyxs",
+          score: "yeardxkyxs"
+        },
+        {
+          name: "有效风时数",
+          field: "dayyxfss",
+          type: "可靠性管理",
+          rank: "monthyxfss",
+          score: "yearyxfss"
+        },
+        {
+          name: "平均风速",
+          field: "dayfs",
+          type: "资源",
+          rank: "monthfs",
+          score: "yearfs"
+        },
+        {
+          name: "静风频率",
+          field: "dayjfpl",
+          type: "资源",
+          rank: "monthjfpl",
+          score: "yearjfpl"
+        }
+      ],
+      radarValue: [
+        {
+          indicator: [
+            "平均切入风速",
+            "性能损失电量",
+            "拟合优度",
+            "功率一致性系数",
+            "利用小时",
+            "设备可利用率",
+            "等效可利用系数",
+            "有效风时数",
+            "平均风速",
+            "静风频率"
+          ],
           data: [
             {
-              value: [44210, 14200, 10000, 36000, 50000, 38400, 42200, 14200, 20000, 35000],
-              name: "NAME",
+              value: [
+                44200,
+                14200,
+                20000,
+                35000,
+                50000,
+                38000,
+                44200,
+                14200,
+                20000,
+                35000
+              ],
+              name: "NAME1"
             },
-          ],
-        },
-      ],
+                        {
+              value: [
+                35000,
+                44200,
+                14200,
+                20000,
+                35000,
+                50000,
+                38000,
+                44200,
+                14200,
+                20000,
+                
+              ],
+              name: "NAME2"
+            }
+          ]
+        }
+      ]
     };
-  },
+  }
 };
 </script>
 

+ 278 - 0
src/views/HealthControl/gradeHistory.vue

@@ -0,0 +1,278 @@
+<template>
+  <div>
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item" v-if="option.shows == 'd'">
+          <div class="lable">日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="option.date"
+              type="date"
+              placeholder="选择日期"
+              popper-class="date-select"
+              value-format="YYYY-MM-DD"
+            ></el-date-picker>
+          </div>
+        </div>
+        <div class="query-item" v-if="option.shows == 'm'">
+          <div class="lable">年月:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="option.date"
+              type="month"
+              placeholder="选择年月"
+              popper-class="date-select"
+              value-format="YYYY-MM"
+            ></el-date-picker>
+          </div>
+        </div>
+        <div class="query-item" v-if="option.shows == 'y'">
+          <div class="lable">年:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="option.date"
+              type="year"
+              placeholder="选择年"
+              popper-class="date-select"
+              value-format="YYYY"
+            ></el-date-picker>
+          </div>
+        </div>
+        <div class="query-actions">
+          <button class="btn green" @click="getTable">查询</button>
+        </div>
+      </div>
+    </div>
+    <div class="table-box">
+      <Table
+        ref="curRef"
+        :data="hisData"
+        height="70vh"
+        v-loading="tableLoading"
+        element-loading-text="拼命加载中.."
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      ></Table>
+    </div>
+  </div>
+</template>
+<script>
+import Table from "@/components/coms/table/table-unpage.vue";
+export default {
+  name: "gradeHistory",
+  components: { Table },
+  props: {
+    gridDatas: {},
+    option: Object
+  },
+  data() {
+    return {
+      tableLoading: false,
+      hisData: {
+        column: [
+          {
+            name: "风机编号",
+            field: "windturbineid",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "日期",
+            field: "recorddate",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id",
+            template: function(data) {
+              return new Date(data).formatDate("yyyy-MM-dd");
+            }
+          },
+          {
+            name: "发电量(kWh)",
+            field: "dayfdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "理论发电量(kWh)",
+            field: "dayllfdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "平均风速(m/s)",
+            field: "dayfs",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "平均功率(kW)",
+            field: "daygl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "故障损失电量(kWh)",
+            field: "daygzssdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "限电损失电量(kWh)",
+            field: "dayxdssdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "维护损失电量(kWh)",
+            field: "daywhssdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "性能损失电量(kWh)",
+            field: "dayxnssdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "利用小时数(h)",
+            field: "daylyxs",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "拟合优度(%)",
+            field: "daynhyd",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "设备可利用率(%)",
+            field: "daysbklyl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "等效可用系数(%)",
+            field: "daydxkyxs",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "有效风时数(h)",
+            field: "dayyxfss",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "平均切入风速(m/s)",
+            field: "dayxfqr",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "静风频率(%)",
+            field: "dayjfpl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "功率一致性系数(%)",
+            field: "dayglyzxxs",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          }
+        ],
+        data: [{ a: "aaa" }]
+      }
+    };
+  },
+  created() {
+    this.getTable();
+  },
+  beforeUpdate() {},
+  methods: {
+    getTable() {
+      let that = this;
+      let subUrl = "";
+      const data = {
+        wtId: this.option["windturbineid"]
+      };
+      if ("d" == this.option.shows) {
+        subUrl = "/benchmarking/gadayhistlist";
+        data["recorddate"] = this.option["date"];
+      }
+      if ("m" == this.option.shows) {
+        subUrl = "/benchmarking/gamonthhistlist";
+        const dateStr = this.option["date"].split("-");
+        if (dateStr.length > 1) {
+          data["year"] = dateStr[0];
+          data["month"] = dateStr[1];
+        }
+      }
+      if ("y" == this.option.shows) {
+        subUrl = "/benchmarking/gayearhistlist";
+        data["year"] = this.option["date"];
+      }
+      that.tableLoading = true;
+      that.API.requestData({
+        timeout: 60000,
+        method: "POST",
+        subUrl: subUrl,
+        data: data,
+        success(res) {
+          that.tableLoading = false;
+          if (res.code === 200) {
+            var data = [];
+            res.data.forEach((item, index) => {
+              item["index"] = index;
+              data[index] = item;
+            });
+            that.hisData.data = data;
+          }
+        },
+        Error(res) {
+          console.log("tag", res);
+        }
+      });
+    }
+  }
+};
+</script>
+
+<style lang="less">
+</style>

+ 652 - 0
src/views/HealthControl/gradeassessment.vue

@@ -0,0 +1,652 @@
+<template>
+  <div>
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div
+          class="newspan"
+          v-for="(item, index) of optionData"
+          :key="index"
+          :class="{ active: cur == index }"
+          @click="handleOpen(item, index)"
+        >{{ item }}</div>
+      </div>
+    </div>
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select v-model="value1" clearable placeholder="请选择" popper-class="select">
+              <el-option
+                v-for="item in ChangZhan"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              ></el-option>
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item" v-if="shows == 'd'">
+          <div class="lable">日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="date"
+              type="date"
+              placeholder="选择日期"
+              popper-class="date-select"
+              value-format="YYYY-MM-DD"
+            ></el-date-picker>
+          </div>
+        </div>
+        <div class="query-item" v-if="shows == 'm'">
+          <div class="lable">年月:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="date"
+              type="month"
+              placeholder="选择年月"
+              popper-class="date-select"
+              value-format="YYYY-MM"
+            ></el-date-picker>
+          </div>
+        </div>
+        <div class="query-item" v-if="shows == 'y'">
+          <div class="lable">年:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="date"
+              type="year"
+              placeholder="选择年"
+              popper-class="date-select"
+              value-format="YYYY"
+            ></el-date-picker>
+          </div>
+        </div>
+        <div class="query-actions">
+          <button class="btn green" @click="handleSubmit">查询</button>
+          <button class="btn green" @click="contrast">对比</button>
+        </div>
+      </div>
+    </div>
+    <div class="table-box">
+      <div class="title">{{ showTitle }}</div>
+      <ComTable
+        ref="curRef"
+        :data="tableData"
+        :pageSize="20"
+        :pageable=false
+        height="73vh"
+        v-loading="tableLoading"
+        element-loading-text="拼命加载中.."
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      ></ComTable>
+    </div>
+    <el-dialog :title="dialogTitle" v-model="dialogVisible" width="70%" top="10vh" custom-class="modal">
+      <dayinfo :gridDatas="dialogData1" :chartDatas="dialogData2" />
+    </el-dialog>
+    <el-dialog :title="'历史数据查询>>'+hisDialogTitle" v-model="hisDialogVisible" width="70%" top="10vh" custom-class="modal">
+      <gradeHistory :option="hisOption" ref="gradeHistory"/>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import ComTable from "@/components/coms/table/table-unpage.vue";
+import Dayinfo from "./dayinfo.vue";
+import GradeHistory from "./gradeHistory.vue";
+
+export default {
+  name: "gradeassessment",
+  components: { ComTable, Dayinfo, GradeHistory },
+  data() {
+    let that = this;
+    return {
+      cur: 0,
+      optionData: [
+        "风机日信息量化评级管理",
+        "风机月信息量化评级管理",
+        "风机年信息量化评级管理"
+      ],
+      dialogTitle: "日信息对比",
+      dialogVisible: false,
+      hisDialogVisible: false,
+      hisDialogTitle:"",
+      ChangZhan: [],
+      value1: "XS_FDC",
+      date: "",
+      shows: "d",
+      showTitle: "风机日信息量化评级管理",
+      tableLoading: true,
+      dataIds: new Set(),
+      dialogData1: [],
+      dialogData2: [],
+      hisOption:{},
+      tableData: {
+        column: [
+          {
+            name: "",
+            field: "fj",
+            is_num: false,
+            is_light: false,
+            sortable: false,
+            template: () => {
+              return "<input class='check curCheckBox checkItem' type='CheckBox'/>";
+            },
+            click: function(event, data) {
+              if (event.target.checked == false) {
+                that.dataIds.delete(data.id);
+              }
+              if (event.target.checked) {
+                if (that.dataIds.size < 2) {
+                  that.dataIds.add(data.id);
+                } else {
+                  event.target.checked = false;
+                }
+              }
+            }
+          },
+          {
+            name: "风机编号",
+            field: "windturbineid",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "等級",
+            field: "level",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+
+          {
+            name: "综合排名",
+            field: "rank",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "发电量(kWh)",
+            field: "dayfdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "理论发电量(kWh)",
+            field: "dayllfdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "平均风速(m/s)",
+            field: "dayfs",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "平均功率(kW)",
+            field: "daygl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "故障损失电量(kWh)",
+            field: "daygzssdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "限电损失电量(kWh)",
+            field: "dayxdssdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "维护损失电量(kWh)",
+            field: "daywhssdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "性能损失电量(kWh)",
+            field: "dayxnssdl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "利用小时数(h)",
+            field: "daylyxs",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "拟合优度(%)",
+            field: "daynhyd",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "设备可利用率(%)",
+            field: "daysbklyl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "等效可用系数(%)",
+            field: "daydxkyxs",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "有效风时数(h)",
+            field: "dayyxfss",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "平均切入风速(m/s)",
+            field: "dayxfqr",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "静风频率(%)",
+            field: "dayjfpl",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "功率一致性系数(%)",
+            field: "dayglyzxxs",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "操作",
+            field: "sjbz",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id",
+            template: () => {
+              return "<a href='javascript:void(0);' value='xq'>详情</a>&nbsp;<a href='javascript:void(0);' value='ls'>历史</a>";
+            },
+            click: function(event, data) {
+              if('xq' == event.target.getAttribute("value")){
+                that.dialogVisible = true;
+                that.dialogData1 = [data];
+                const service1 = {
+                  name: data.windturbineid,
+                  value: [
+                    data["yearxfqr"],
+                    data["yearxnssdl"],
+                    data["yearnhyd"],
+                    data["yearglyzxxs"],
+                    data["yearlyxs"],
+                    data["yearsbklyl"],
+                    data["yeardxkyxs"],
+                    data["yearyxfss"],
+                    data["yearfs"],
+                    data["yearjfpl"]
+                  ]
+                };
+                const chartData = [
+                  {
+                    indicator: [
+                      "平均切入风速",
+                      "性能损失电量",
+                      "拟合优度",
+                      "功率一致性系数",
+                      "利用小时",
+                      "设备可利用率",
+                      "等效可利用系数",
+                      "有效风时数",
+                      "平均风速",
+                      "静风频率"
+                    ],
+                    data: [service1]
+                  }
+                ];
+                that.dialogData2 = chartData;
+              }
+              if('ls' == event.target.getAttribute("value")){
+                that.hisOption["shows"] = that.shows;
+                that.hisOption["date"] = that.date;
+                that.hisOption["windturbineid"] = data.windturbineid;
+                that.hisDialogTitle = data.windturbineid;
+                that.hisDialogVisible = true;
+                that.$refs.gradeHistory.getTable();
+              }
+            }
+          }
+        ],
+        data: []
+      },
+      tableId: ""
+    };
+  },
+  created() {
+    this.ChangZhanVal();
+    this.date = this.getDate(0);
+    this.getTable(this.date);
+  },
+  methods: {
+    clearCheckBox() {
+      this.$refs.curRef.clearCheckBox();
+      this.dataIds = new Set();
+    },
+    // 获取表格数据
+    getTable(date) {
+      let that = this;
+      let subUrl = "";
+      const data = {
+        isAsc: "asc",
+        wpId: this.value1
+      };
+      if ("d" == this.shows) {
+        subUrl = "/benchmarking/gadaylistByPage";
+        data["recorddate"] = date;
+      }
+      if ("m" == this.shows) {
+        subUrl = "/benchmarking/gamonthlistByPage";
+        const dateStr = date.split("-");
+        if (dateStr.length > 1) {
+          data["year"] = dateStr[0];
+          data["month"] = dateStr[1];
+        }
+      }
+      if ("y" == this.shows) {
+        subUrl = "/benchmarking/gayearlistByPage";
+        data["year"] = date;
+      }
+      that.tableLoading = true;
+      that.API.requestData({
+        timeout: 60000,
+        method: "POST",
+        subUrl: subUrl,
+        data: data,
+        success(res) {
+          that.tableLoading = false;
+          if (res.code === 200) {
+            var data = [];
+            res.data.list.forEach((item, index) => {
+              item["index"] = index;
+              data[index] = item;
+            });
+            that.tableData.data = data;
+          }
+        },
+        Error(res) {
+          console.log("tag", res);
+        }
+      });
+    },
+    //   tab
+    handleOpen(vl, index) {
+      this.$nextTick(() => {
+        this.cur = index;
+        this.showTitle = vl;
+        if (index == 0) {
+          this.date = this.getDate(0);
+          this.shows = "d";
+          this.dialogTitle = "日信息对比";
+        }
+        if (index == 1) {
+          this.date = this.getDate(1);
+          this.shows = "m";
+          this.dialogTitle = "月信息对比";
+        }
+        if (index == 2) {
+          this.date = this.getDate(2);
+          this.shows = "y";
+          this.dialogTitle = "年信息对比";
+        }
+      });
+    },
+    // 场站
+    ChangZhanVal() {
+      var that = this;
+      that.API.requestData({
+        method: "GET",
+        baseURL: "http://10.155.32.4:9001/",
+        subUrl: "benchmarking/wplist",
+        success(res) {
+          that.ChangZhan = res.data;
+          that.value1 = res.data[0].id;
+        }
+      });
+    },
+    // 查询
+    handleSubmit() {
+      this.clearCheckBox();
+      this.getTable(this.date);
+    },
+    // 日信息对比
+    contrast() {
+      var that = this;
+      if (that.dataIds.size == 2) {
+        that.dialogVisible = true;
+        const tmpArr = Array.from(that.dataIds);
+        const data = {
+          gaid1: tmpArr[0],
+          gaid2: tmpArr[1]
+        };
+
+        that.API.requestData({
+          method: "GET",
+          subUrl: "/benchmarking/wtinfo",
+          data: data,
+          success(res) {
+            that.dialogData1 = [res.data.gaid1, res.data.gaid2];
+          }
+        });
+        that.API.requestData({
+          method: "GET",
+          subUrl: "/benchmarking/wtchart",
+          data: data,
+          success(res) {
+            const data1 = res.data.gaid1;
+            const data2 = res.data.gaid2;
+            const chartData = [
+              {
+                indicator: [
+                  "平均切入风速",
+                  "性能损失电量",
+                  "拟合优度",
+                  "功率一致性系数",
+                  "利用小时",
+                  "设备可利用率",
+                  "等效可利用系数",
+                  "有效风时数",
+                  "平均风速",
+                  "静风频率"
+                ],
+                data: []
+              }
+            ];
+            if (data1) {
+              chartData[0].data.push(that.getChartData(data1));
+            }
+            if (data2) {
+              chartData[0].data.push(that.getChartData(data2));
+            }
+            that.dialogData2 = chartData;
+          }
+        });
+      }
+      this.clearCheckBox();
+    },
+    getChartData(resData) {
+      const chartData = {};
+      const rowMap = {};
+      resData.forEach(function(rowData, index) {
+        rowMap[rowData["name"]] = rowData["data1"];
+      });
+      chartData["name"] = resData[resData.length - 1]["name"];
+      chartData["value"] = [];
+      chartData["value"].push(rowMap["平均切入风速"]);
+      chartData["value"].push(rowMap["性能损失电量"]);
+      chartData["value"].push(rowMap["拟合优度"]);
+      chartData["value"].push(rowMap["功率一致性系数"]);
+      chartData["value"].push(rowMap["利用小时"]);
+      chartData["value"].push(rowMap["设备可利用率"]);
+      chartData["value"].push(rowMap["等效可利用系数"]);
+      chartData["value"].push(rowMap["有效风时数"]);
+      chartData["value"].push(rowMap["平均风速"]);
+      chartData["value"].push(rowMap["静风频率"]);
+      return chartData;
+    },
+    // 获取日期
+    getDate(vl) {
+      var date = new Date();
+      var year = date.getFullYear(),
+        month = date.getMonth() + 1,
+        day = date.getDate() - 1;
+      month >= 1 && month <= 9 ? (month = "0" + month) : "";
+      day >= 0 && day <= 9 ? (day = "0" + day) : "";
+      if (vl == 0) {
+        return year + "-" + month + "-" + day;
+      }
+      if (vl == 1) {
+        return year + "-" + month;
+      }
+      if (vl == 2) {
+        return year + "";
+      }
+    }
+  }
+};
+</script>
+<style scoped>
+.newsDiv {
+  color: rgba(255, 255, 255, 0.75);
+  background-color: rgba(255, 255, 255, 0.1);
+  margin-bottom: 8px;
+  line-height: 3.4259vh;
+  padding: 0 15px;
+}
+.newspan {
+  line-height: 30px;
+  cursor: pointer;
+  padding: 0 1vw;
+  margin: 0 2px;
+  color: #9ca5a8;
+  transition: color 0.2s ease-in-out;
+  position: relative;
+}
+.newspan:hover {
+  background: linear-gradient(
+    to top,
+    rgba(5, 187, 76, 0.5),
+    rgba(5, 187, 76, 0)
+  );
+  color: white;
+  position: relative;
+}
+.newspan:hover::after {
+  content: "";
+  position: absolute;
+  width: 100%;
+  height: 0.463vh;
+  border: 0.093vh solid #05bb4c;
+  border-top: 0;
+  left: 0;
+  bottom: 0;
+  box-sizing: border-box;
+}
+.active {
+  background: linear-gradient(
+    to top,
+    rgba(5, 187, 76, 0.5),
+    rgba(5, 187, 76, 0)
+  );
+  color: white;
+  position: relative;
+}
+.active::after {
+  content: "";
+  position: absolute;
+  width: 100%;
+  height: 0.463vh;
+  border: 0.093vh solid #05bb4c;
+  border-top: 0;
+  left: 0;
+  bottom: 0;
+  box-sizing: border-box;
+}
+.title {
+  background: rgba(255, 255, 255, 0.1);
+  margin-bottom: 8px;
+  padding: 1vh;
+}
+</style>
+<style lang="less">
+.decision-page-2 {
+  .content .project-table {
+    tbody {
+      height: calc(100vh - 24.5vh);
+    }
+  }
+  .project-table {
+    overflow: auto;
+    tbody {
+      height: 239px;
+    }
+
+    th,
+    td {
+      color: #b2bdc0;
+
+      &:nth-child(1) {
+        width: 50px;
+      }
+
+      &:nth-child(2) {
+        width: 50px;
+      }
+    }
+  }
+
+  .action {
+    text-decoration: underline;
+    color: @green;
+    cursor: pointer;
+  }
+}
+</style>

+ 1 - 0
src/views/Home/dialog/table.vue

@@ -15,6 +15,7 @@
       <div class="left">
         <table class="table-form">
           <tr>
+            <td class="white"></td>
             <td class="white" v-for="(item, index) in tableData.datels" :key="index">{{item}}</td>
           </tr>
           <tr v-for="(item, index) in tableData.result" :key="index">

+ 13 - 5
src/views/NewPages/dj1.vue

@@ -69,7 +69,7 @@
       <el-row>
         <el-col :span="15">
           <panel :title="'功率曲线'" class="mg-b-16">
-            <marker-line-chart :height="'28vh'" :list="powerLineChartData" :showLegend="true" />
+            <marker-line-chart :height="'28vh'" :list="powerLineChartData" :units="['(MW)', '(m/s)']" :showLegend="true" />
           </panel>
           <panel :title="'日发电量信息'" class="mg-b-16 outline" :showLine="false">
             <div class="power-info">
@@ -452,7 +452,7 @@
 <script>
 import AreaBarChart from "../../components/chart/combination/area-bar-chart.vue";
 import MultipleBarLineChart from "../../components/chart/combination/multiple-bar-line-chart.vue";
-import MarkerLineChart from "../../components/chart/line/marker-line-chart.vue";
+import MarkerLineChart from "../../components/chart/line/multiple-line-chart.vue";
 import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
 import DirectionRadarChart from "@com/chart/radar/radar-chart.vue";
 import panel from "../../components/coms/panel/panel.vue";
@@ -462,7 +462,7 @@ export default {
   setup () { },
   data () {
     return {
-      tabIndex: 4,
+      tabIndex: 0,
       tableData: {
         column: [
           {
@@ -596,6 +596,7 @@ export default {
 
       powerLineChartData: [{
         title: "",
+        yAxisIndex: 0,
         value: []
       }],
 
@@ -945,16 +946,23 @@ export default {
           recorddate: that.recorddate
         },
         success (res) {
-          const keyArray = ["value1", "value2", "value3"];
+          const keyArray = ["value1", "value2", "value3", "value4"];
 
           let powerLineChartData = [{
+            title: "风速",
+            yAxisIndex: 1,
+            value: []
+          }, {
             title: "实际拟合功率",
+            yAxisIndex: 0,
             value: []
           }, {
-            title: "最优拟合功率",
+            title: "最优功率",
+            yAxisIndex: 0,
             value: []
           }, {
             title: "保证功率",
+            yAxisIndex: 0,
             value: []
           }];
 

+ 0 - 3
src/views/WindSite/pages/Home/Home.vue

@@ -357,7 +357,6 @@ export default {
         method: "GET",
         subUrl: "powercompare/windfarmAllAjax",
         success(res) {
-          console.warn(res);
           let btnGroups = [
             {
               icon: "svg-wind-site",
@@ -443,7 +442,6 @@ export default {
           wpId: that.wpId,
         },
         success(res) {
-          console.log(123, res);
           if (res.data) {
             that.tqmap = res.data.tqmap;
             let fjmap = [];
@@ -716,7 +714,6 @@ export default {
   },
   watch: {
     $route(res) {
-      console.warn("router变化");
       this.wpId = res.params.wpId;
       this.requestData(false);
       this.renderBtnActiveIndex();

+ 93 - 0
src/views/allLifeManage/index.vue

@@ -0,0 +1,93 @@
+<template>
+  <div class="health">
+    <div class="selections mg-b-16">
+      <div class="item" @click="tabSelect(0)" :class="{ active: tabIndex == 0 }">风场功率风速排布图</div>
+      <div class="item" @click="tabSelect(1)" :class="{ active: tabIndex == 1 }">项目功率风速排布图</div>
+      <div class="item" @click="tabSelect(2)" :class="{ active: tabIndex == 2 }">线路功率风速排布图</div>
+    </div>
+    <div class="curHeight" v-if="tabIndex == 0">
+      <Tab1 />
+    </div>
+    <div class="curHeight" v-if="tabIndex == 1">
+      <Tab2 />
+    </div>
+    <div class="curHeight" v-if="tabIndex == 2">
+      <Tab3 />
+    </div>
+  </div>
+</template>
+
+<script>
+import Tab1 from "./tab1.vue";
+import Tab2 from "./tab2.vue";
+import Tab3 from "./tab3.vue";
+export default {
+  // 名称
+  name: "wtSaturability",
+
+  // 使用组件
+  components: {
+    Tab1,
+    Tab2,
+    Tab3
+  },
+
+  // 数据
+  data () {
+    const that = this;
+    return {
+      tabIndex: 0,
+    };
+  },
+
+  // 函数
+  methods: {
+    tabSelect (state) {
+      this.tabIndex = state;
+    },
+    // 请求服务
+    requestData () {
+      
+    }
+  },
+
+  created () {
+    this.requestData();
+  },
+
+  mounted () { },
+
+  unmounted () { },
+};
+</script>
+
+<style lang="less" scope>
+.health {
+  .selections {
+    display: flex;
+
+    .item {
+      flex: 0 0 128px;
+      text-align: center;
+      line-height: 33px;
+      margin-right: 8px;
+      color: @font-color;
+      font-size: @fontsize-s;
+      background: fade(@gray, 20);
+      border: 1px solid fade(@gray, 20);
+
+      &:hover,
+      &.active {
+        background: fade(@green, 20);
+        border: 1px solid @green;
+        color: @green;
+        cursor: pointer;
+      }
+    }
+  }
+
+  .curHeight {
+    height: 87vh;
+  }
+}
+</style>

+ 384 - 0
src/views/allLifeManage/tab1.vue

@@ -0,0 +1,384 @@
+<template>
+  <div class="draught-fan-list">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">风场:</div>
+          <div class="search-input">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="getWtArray">
+              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">风机:</div>
+          <div class="search-input">
+            <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+      </div>
+      <div class="query-actions">
+        <button class="btn green" @click="search()">查询</button>
+      </div>
+    </div>
+    <div class="df-table">
+      <ComTable height="78vh" :data="tableData"></ComTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import ComTable from "@com/coms/table/table.vue";
+export default {
+  // 名称
+  name: "cutAnalyse",
+
+  // 使用组件
+  components: {
+    ComTable
+  },
+
+  // 数据
+  data () {
+    const that = this;
+    return {
+      wpArray: [],
+      wpId: "",
+      wtArray: [],
+      wtId: "",
+      tableData: {
+        column: [
+          {
+            name: "风机编号",
+            field: "wtnum",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "所属风电场",
+            field: "ownerwf",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "所属工程",
+            field: "ownerproject",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "所属线路",
+            field: "ownerline",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "编号",
+            field: "wtwfnum",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "编号",
+            field: "wtgridnum",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "供应商",
+            field: "vendor",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "型号",
+            field: "model",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "额定功率",
+            field: "ratedpower",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "额定风速",
+            field: "ratedwinspe",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "额定电压",
+            field: "ratedvoltage",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "额定转速",
+            field: "ratedrev",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "切入风速",
+            field: "cutinwinspe",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "切出风速",
+            field: "cutoutwinspe",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "生存风速",
+            field: "maxwinspe",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "最低温度",
+            field: "lowertemp",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "最高温度",
+            field: "hightemp",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "最低转速",
+            field: "lowerrev",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "最高转速",
+            field: "highrev",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "风轮直径",
+            field: "roterdiameter",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "月大风切入合格率",
+            field: "monthinputbigratio",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "轮毂高度",
+            field: "hubheight",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "出厂日期",
+            field: "releasedate",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "吊装日期",
+            field: "installdate",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "调试日期",
+            field: "testdate",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "投运日期",
+            field: "opdate",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "位置",
+            field: "location",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "风机位置",
+            field: "wflocation",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "风机ID",
+            field: "wtid",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          }
+        ],
+        data: [],
+      }
+    };
+  },
+
+  // 函数
+  methods: {
+    // 获取风场
+    getWpArray () {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/windfarmAjax",
+        success (res) {
+          that.wpArray = res.data;
+          that.wpId = that.wpId || res.data[0].id;
+          that.getWtArray(that.wpId, true);
+        }
+      });
+    },
+
+    // 获取风机
+    getWtArray (wpId, keepRequest) {
+      let that = this;
+      if (wpId) {
+        that.API.requestData({
+          method: "GET",
+          subUrl: "powercompare/windturbineAjax",
+          data: {
+            wpId
+          },
+          success (res) {
+            that.wtArray = res.data;
+            const findRes = res.data.some(ele => {
+              return ele.id === that.wtId;
+            });
+            that.wtId = (findRes ? that.wtId : res.data[0].id);
+            that.getTableData();
+          }
+        });
+      } else {
+        that.wtArray = [];
+        that.wtId = "";
+      }
+    },
+
+    getTableData () {
+      let that = this;
+      if (!that.wpId || !that.wtId) {
+        that.BASE.showMsg({
+          msg: "场站与日期不可为空"
+        });
+      } else {
+        that.API.requestData({
+          method: "GET",
+          baseURL:"http://192.168.10.18:9988/",
+          subUrl: "windturbine/list",
+          data: {
+            wtId:that.wtId
+          },
+          success (res) {
+            res.data.forEach(ele => {
+              ele.installdate = new Date(ele.installdate).formatDate("yyyy-MM-dd hh:mm:ss");
+              ele.opdate = new Date(ele.opdate).formatDate("yyyy-MM-dd hh:mm:ss");
+              ele.releasedate = new Date(ele.releasedate).formatDate("yyyy-MM-dd hh:mm:ss");
+              ele.testdate = new Date(ele.testdate).formatDate("yyyy-MM-dd hh:mm:ss");
+            });
+            that.tableData.data = res.data;
+          }
+        });
+      }
+
+    },
+
+
+    search () {
+      this.getTableData();
+    }
+  },
+
+  created () {
+    this.getWpArray();
+  },
+
+  mounted () { },
+
+  unmounted () { },
+};
+</script>
+
+<style lang="less" scoped>
+.draught-fan-list {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .btn-group-tabs {
+    display: flex;
+    flex-direction: row;
+
+    .photovoltaic {
+      margin-left: 1.481vh;
+    }
+  }
+
+  .df-table {
+    border: 0.093vh solid fade(@darkgray, 50%);
+    position: relative;
+    overflow: auto;
+    flex-grow: 1;
+    margin-top: 1.481vh;
+
+    &:before {
+      content: '';
+      width: 0.37vh;
+      height: 0.37vh;
+      background: @write;
+      position: absolute;
+      left: 0.278vh;
+      top: 0.278vh;
+    }
+
+    tbody {
+      height: calc(100vh - 166px);
+    }
+  }
+}
+</style>

+ 184 - 0
src/views/allLifeManage/tab2.vue

@@ -0,0 +1,184 @@
+<template>
+  <div class="draught-fan-list">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getProject(); }">
+              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">项目:</div>
+          <div class="search-input">
+            <el-select v-model="projectId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in projectArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+					<div class="lable">日期:</div>
+					<div class="search-input">
+						<el-date-picker v-model="recorddate" type="date"
+							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+						</el-date-picker>
+					</div>
+				</div>
+      </div>
+      <div class="query-actions">
+        <button class="btn green" @click="search">搜索</button>
+      </div>
+    </div>
+    <NormalScatterChart height="650px" :data="chartData" :showLegend="true" />
+  </div>
+</template>
+
+<script>
+import NormalScatterChart from "@com/chart/scatter/normal-scatter-chart.vue";
+export default {
+  // 名称
+  name: "cutAnalyse",
+
+  // 使用组件
+  components: {
+    NormalScatterChart
+  },
+
+  // 数据
+  data () {
+    return {
+      isAsc: "asc",
+      wpArray: [],
+      projectArray: [],
+      wpId: "",
+      projectId:"",
+      wtId: "MG01_01",
+      recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
+      chartData: [{
+        title: "风资源分析",
+        value: []
+      }]
+    };
+  },
+
+  // 函数
+  methods: {
+    // 获取风场
+    getWp (reGetWp) {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/windfarmAjax",
+        success (res) {
+          that.wpArray = res.data;
+          that.wpId = res.data[0].id;
+          that.getProject();
+        }
+      });
+    },
+
+    // 获取期数
+    getProject(){
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/projectAjax",
+        data:{
+          wpIds: that.wpId
+        },
+        success (res) {
+          that.projectArray = res.data;
+          that.projectId = res.data[0].id;
+          that.getChartData();
+        }
+      });
+    },
+
+    // 获取图表数据
+    getChartData () {
+      let that = this;
+      that.API.requestData({
+        method: "POST",
+        subUrl: "scatter/scatterAjax",
+        data: {
+          wpId: that.wpId,
+          pjId: that.projectId,
+          lnId: "",
+          year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
+          month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
+        },
+        success (res) {
+          let chartData = [{
+            title: "风资源分析",
+            value: (res.data || [])
+          }];
+          that.$nextTick(()=>{
+            that.chartData = chartData;
+          });
+        }
+      });
+    },
+
+    search () {
+      if (!this.wpId || !this.projectId) {
+        this.BASE.showMsg({
+          msg: '场站与项目为必选项'
+        });
+      } else {
+        this.getChartData();
+      }
+    }
+  },
+
+  created () {
+    this.getWp();
+  },
+
+  mounted () { },
+
+  unmounted () { },
+};
+</script>
+
+<style lang="less" scoped>
+.draught-fan-list {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .btn-group-tabs {
+    display: flex;
+    flex-direction: row;
+
+    .photovoltaic {
+      margin-left: 1.481vh;
+    }
+  }
+
+  .df-table {
+    border: 0.093vh solid fade(@darkgray, 50%);
+    position: relative;
+    overflow: auto;
+    flex-grow: 1;
+    margin-top: 1.481vh;
+    height: 30vh;
+
+    &:before {
+      content: '';
+      width: 0.37vh;
+      height: 0.37vh;
+      background: @write;
+      position: absolute;
+      left: 0.278vh;
+      top: 0.278vh;
+    }
+
+    tbody {
+      height: calc(100vh - 166px);
+    }
+  }
+}
+</style>

+ 184 - 0
src/views/allLifeManage/tab3.vue

@@ -0,0 +1,184 @@
+<template>
+  <div class="draught-fan-list">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getLine(); }">
+              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">线路:</div>
+          <div class="search-input">
+            <el-select v-model="lineId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in lineArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+					<div class="lable">日期:</div>
+					<div class="search-input">
+						<el-date-picker v-model="recorddate" type="date"
+							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+						</el-date-picker>
+					</div>
+				</div>
+      </div>
+      <div class="query-actions">
+        <button class="btn green" @click="search">搜索</button>
+      </div>
+    </div>
+    <NormalScatterChart height="650px" :data="chartData" :showLegend="true" />
+  </div>
+</template>
+
+<script>
+import NormalScatterChart from "@com/chart/scatter/normal-scatter-chart.vue";
+export default {
+  // 名称
+  name: "cutAnalyse",
+
+  // 使用组件
+  components: {
+    NormalScatterChart
+  },
+
+  // 数据
+  data () {
+    return {
+      isAsc: "asc",
+      wpArray: [],
+      lineArray: [],
+      wpId: "",
+      lineId:"",
+      wtId: "MG01_01",
+      recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
+      chartData: [{
+        title: "风资源分析",
+        value: []
+      }]
+    };
+  },
+
+  // 函数
+  methods: {
+    // 获取风场
+    getWp (reGetWp) {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/windfarmAjax",
+        success (res) {
+          that.wpArray = res.data;
+          that.wpId = res.data[0].id;
+          that.getLine();
+        }
+      });
+    },
+
+    // 获取线路
+    getLine(){
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/lineWpIdAjax",
+        data:{
+          wpId: that.wpId
+        },
+        success (res) {
+          that.lineArray = res.data;
+          that.lineId = res.data[0].id;
+          that.getChartData();
+        }
+      });
+    },
+
+    // 获取图表数据
+    getChartData () {
+      let that = this;
+      that.API.requestData({
+        method: "POST",
+        subUrl: "scatter/scatterAjax",
+        data: {
+          wpId: that.wpId,
+          pjId: "",
+          lnId: that.lineId,
+          year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
+          month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
+        },
+        success (res) {
+          let chartData = [{
+            title: "风资源分析",
+            value: (res.data || [])
+          }];
+          that.$nextTick(()=>{
+            that.chartData = chartData;
+          });
+        }
+      });
+    },
+
+    search () {
+      if (!this.wpId || !this.lineId) {
+        this.BASE.showMsg({
+          msg: '场站与线路为必选项'
+        });
+      } else {
+        this.getChartData();
+      }
+    }
+  },
+
+  created () {
+    this.getWp();
+  },
+
+  mounted () { },
+
+  unmounted () { },
+};
+</script>
+
+<style lang="less" scoped>
+.draught-fan-list {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .btn-group-tabs {
+    display: flex;
+    flex-direction: row;
+
+    .photovoltaic {
+      margin-left: 1.481vh;
+    }
+  }
+
+  .df-table {
+    border: 0.093vh solid fade(@darkgray, 50%);
+    position: relative;
+    overflow: auto;
+    flex-grow: 1;
+    margin-top: 1.481vh;
+    height: 30vh;
+
+    &:before {
+      content: '';
+      width: 0.37vh;
+      height: 0.37vh;
+      background: @write;
+      position: absolute;
+      left: 0.278vh;
+      top: 0.278vh;
+    }
+
+    tbody {
+      height: calc(100vh - 166px);
+    }
+  }
+}
+</style>

+ 43 - 18
src/views/layout/Menu.vue

@@ -119,6 +119,26 @@ export default {
                   icon: "svg-wind-site",
                   path: "/new/alarmcenter",
                 },
+                {
+                  text: "预警管理1",
+                  icon: "svg-wind-site",
+                  path: "/new/alarmcenter1",
+                },
+                {
+                  text: "预警管理2",
+                  icon: "svg-wind-site",
+                  path: "/new/alarmcenter2",
+                },
+                {
+                  text: "预警管理3",
+                  icon: "svg-wind-site",
+                  path: "/new/tjsj",
+                },
+                {
+                  text: "预警管理4",
+                  icon: "svg-wind-site",
+                  path: "/new/xdgl",
+                },
               ],
             },
           ],
@@ -150,7 +170,7 @@ export default {
                 {
                   text: "曲线偏差率分析",
                   icon: "svg-wind-site",
-                  path: "/nxfx4",
+                  path: "/qxpclfx",
                 },
                 {
                   text: "单机性能分析",
@@ -292,6 +312,11 @@ export default {
               path: "/health",
               children: [
                 {
+                  text: "量化评级",
+                  icon: "svg-wind-site",
+                  path: "/djpg",
+                },
+                {
                   text: "健康推荐",
                   icon: "svg-wind-site",
                   path: "/health",
@@ -527,38 +552,38 @@ export default {
   },
 };
 </script>
-
+ 
 <style lang="less">
 .menu {
   padding-top: 1.481vh;
-
+ 
   .menu-list {
     margin: 0;
     padding: 0;
     list-style: none;
-
+ 
     .menu-item {
       padding: 1.481vh 0;
       text-align: center;
-
+ 
       .menu-icon {
         display: flex;
         justify-content: center;
       }
-
+ 
       &.active i {
         color: #05bb4c;
         transition: color 1s;
       }
     }
   }
-
+ 
   i {
     font-size: 2.222vh;
     color: rgba(255, 255, 255, 50%);
   }
 }
-
+ 
 .sub-menu {
   position: absolute;
   top: 0;
@@ -569,19 +594,19 @@ export default {
   background: fade(#192a26, 75);
   border-right: 1px solid fade(@green, 50);
   box-shadow: inset 11px 0px 20px 0px fade(#021412, 60);
-
+ 
   .menu-list {
     margin: 0;
     padding: 0;
     list-style: none;
-
+ 
     .menu-item {
       display: flex;
       text-align: center;
       line-height: 1.5;
       padding: 8px 0;
       background: #121d1c;
-
+ 
       a {
         display: flex;
         width: 100%;
@@ -589,7 +614,7 @@ export default {
         padding: 0 1.4815vh;
         font-size: @fontsize-s;
         text-decoration: unset;
-
+ 
         .menu-icon {
           display: flex;
           align-items: center;
@@ -602,10 +627,10 @@ export default {
           }
         }
       }
-
+ 
       &.active {
         background: #323e70;
-
+ 
         .menu-icon {
           display: flex;
           svg use {
@@ -613,21 +638,21 @@ export default {
           }
         }
       }
-
+ 
       .sub-menu-text {
         margin-left: 1.1111vh;
         color: @gray-l;
       }
-
+ 
       & + .menu-item {
         border-top: 1px solid fade(@darkgray, 40);
       }
     }
   }
-
+ 
   i {
     font-size: 2.222vh;
     color: rgba(255, 255, 255, 50%);
   }
 }
-</style>
+</style>

+ 238 - 0
src/views/malfunctionStatistics/index.vue

@@ -0,0 +1,238 @@
+<template>
+  <div class="draught-fan-list">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">日期:</div>
+          <div class="search-input">
+            <el-date-picker v-model="recorddate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+            </el-date-picker>
+          </div>
+        </div>
+      </div>
+      <div class="query-actions">
+        <button class="btn green" @click="search()">查询</button>
+      </div>
+    </div>
+    <div class="df-table curTable">
+      <el-table :data="tableData.data" height="78vh" max-height="78vh" stripe style="width: 100%" :border="true">
+        <el-table-column :show-overflow-tooltip="true" prop="wtname" label="风机"></el-table-column>
+        <el-table-column :show-overflow-tooltip="true" :label="tableTitle">
+          <el-table-column :show-overflow-tooltip="true" label="近一天">
+            <el-table-column :show-overflow-tooltip="true" label="1">
+              <el-table-column :show-overflow-tooltip="true" prop="day1top1name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day1top1" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="2">
+              <el-table-column :show-overflow-tooltip="true" prop="day1top2name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day1top2" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="3">
+              <el-table-column :show-overflow-tooltip="true" prop="day1top3name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day1top3" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="true" label="近三天">
+            <el-table-column :show-overflow-tooltip="true" label="1">
+              <el-table-column :show-overflow-tooltip="true" prop="day3top1name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day3top1" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="2">
+              <el-table-column :show-overflow-tooltip="true" prop="day3top2name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day3top2" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="3">
+              <el-table-column :show-overflow-tooltip="true" prop="day3top3name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day3top3" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="true" label="近七天">
+            <el-table-column :show-overflow-tooltip="true" label="1">
+              <el-table-column :show-overflow-tooltip="true" prop="day7top1name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day7top1" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="2">
+              <el-table-column :show-overflow-tooltip="true" prop="day7top2name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day7top2" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="3">
+              <el-table-column :show-overflow-tooltip="true" prop="day7top3name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day7top3" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="true" label="近十五天">
+            <el-table-column :show-overflow-tooltip="true" label="1">
+              <el-table-column :show-overflow-tooltip="true" prop="day15top1name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day15top1" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="2">
+              <el-table-column :show-overflow-tooltip="true" prop="day15top2name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day15top2" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="3">
+              <el-table-column :show-overflow-tooltip="true" prop="day15top3name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day15top3" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="true" label="近一个月">
+            <el-table-column :show-overflow-tooltip="true" label="1">
+              <el-table-column :show-overflow-tooltip="true" prop="month1top1name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="month1top1" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="2">
+              <el-table-column :show-overflow-tooltip="true" prop="month1top2name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="month1top2" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="3">
+              <el-table-column :show-overflow-tooltip="true" prop="month1top3name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="month1top3" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+          </el-table-column>
+        </el-table-column>
+      </el-table>
+    </div>
+    <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal"
+      :close-on-click-modal="true" @closed="dialogType = ''">
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  // 名称
+  name: "cutAnalyse",
+
+  // 数据
+  data () {
+    const that = this;
+    return {
+      isAsc: "asc",
+      wpArray: [],
+      wpId: "",
+      recorddate: new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
+      tableTitle: "",
+      tableData: {
+        column: [
+          {
+            name: "风机",
+            field: "windturbineid",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          }
+        ],
+        data: [],
+      },
+    };
+  },
+
+  // 函数
+  methods: {
+    // 请求服务
+    requestData () {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/windfarmAjax",
+        success (res) {
+          that.wpArray = res.data;
+          that.wpId = res.data[0].id;
+          that.getTableData();
+        }
+      });
+    },
+
+    getTableData () {
+      let that = this;
+      if (!that.wpId || !that.recorddate) {
+        that.BASE.showMsg({
+          msg: "场站与日期不可为空"
+        });
+      } else {
+        that.API.requestData({
+          method: "GET",
+          baseURL: "http://10.155.32.4:8034/",
+          subUrl: "reliability/failurestatistics",
+          data: {
+            wpid: that.wpId,
+            date: that.recorddate
+          },
+          success (res) {
+            if (res.data.length) {
+              that.tableTitle = res.data[0].wpname + "故障统计";
+              that.tableData.data = res.data;
+            }
+          }
+        });
+      }
+    },
+
+    search () {
+      this.getTableData();
+    }
+  },
+
+  created () {
+    this.requestData();
+  },
+
+  mounted () { },
+
+  unmounted () { },
+};
+</script>
+
+<style lang="less" scoped>
+.draught-fan-list {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .btn-group-tabs {
+    display: flex;
+    flex-direction: row;
+
+    .photovoltaic {
+      margin-left: 1.481vh;
+    }
+  }
+
+  .df-table {
+    border: 0.093vh solid fade(@darkgray, 50%);
+    position: relative;
+    overflow: auto;
+    flex-grow: 1;
+    margin-top: 1.481vh;
+
+    &:before {
+      content: '';
+      width: 0.37vh;
+      height: 0.37vh;
+      background: @write;
+      position: absolute;
+      left: 0.278vh;
+      top: 0.278vh;
+    }
+
+    tbody {
+      height: calc(100vh - 166px);
+    }
+  }
+}
+</style>
+<style lang="less">
+.curTable {
+  .cell {
+    text-align: center;
+  }
+}
+</style>

+ 324 - 0
src/views/nxfx/qxpclfx.vue

@@ -0,0 +1,324 @@
+<template>
+  <div>
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div
+          class="newspan"
+          v-for="(item, index) of optionData"
+          :key="index"
+          :class="{ active: cur == index }"
+          @click="handleOpen(item, index)"
+        >
+          {{ item }}
+        </div>
+      </div>
+    </div>
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select
+              v-model="value1"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+            >
+              <el-option
+                v-for="item in ChangZhan"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item" v-if="shows == true">
+          <div class="lable">年月:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="date"
+              type="month"
+              placeholder="选择年月"
+              popper-class="date-select"
+              value-format="YYYY-MM"
+            >
+            </el-date-picker>
+          </div>
+        </div>
+        <div class="query-item" v-else>
+          <div class="lable">日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="date2"
+              type="date"
+              placeholder="选择日期"
+              popper-class="date-select"
+              value-format="YYYY-MM-DD"
+            >
+            </el-date-picker>
+          </div>
+        </div>
+        <div class="query-actions">
+          <button class="btn green" @click="handleSubmit">查询</button>
+        </div>
+      </div>
+    </div>
+    <div class="table-box">
+      <div class="title">{{ showTitle }}</div>
+      <ComTable
+        :data="tableData"
+        :pageSize="20"
+        height="73vh"
+        v-loading="tableLoading"
+        element-loading-text="拼命加载中.."
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      ></ComTable>
+    </div>
+  </div>
+</template>
+<script>
+import ComTable from "@/components/coms/table/table-qc.vue";
+import thermometerVue from "../../components/chart/bar/thermometer.vue";
+export default {
+  name: "qxpclfx",
+  components: { ComTable },
+  data() {
+    return {
+      cur: 0,
+      optionData: ["月曲线偏差率排行榜", "日曲线偏差率排行榜"],
+      ChangZhan: [],
+      value1: "XS_FDC",
+      date: "",
+      date2: "",
+      shows: true,
+      showTitle: "月曲线偏差率排行榜",
+      tableLoading: true,
+      tableData: {
+        column: [
+          {
+            name: "风机",
+            field: "fj",
+            is_num: false,
+            is_light: false,
+            sortable: thermometerVue
+          },
+          {
+            name: "实际 / 保证(%)",
+            field: "sjbz",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "实际 / 最优(%)",
+            field: "sjzy",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "最优 / 保证(%)",
+            field: "zybz",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "环比",
+            field: "hb",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "同比",
+            field: "tb",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          },
+          {
+            name: "比标杆风机",
+            field: "bbgfj",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            id: "id"
+          }
+        ],
+        data: []
+      },
+      tableId: ""
+    };
+  },
+  created() {
+    this.ChangZhanVal();
+    this.date = this.getDate(1);
+    this.date2 = this.getDate(2);
+    this.getTable(this.date);
+  },
+  methods: {
+    // 获取表格数据
+    getTable(date) {
+      let that = this;
+      that.tableLoading = true;
+      that.API.requestData({
+        timeout:60000,
+        method: "POST",
+        subUrl: "/leaderboard/curvefittingmainList",
+        data: {
+          isAsc: "asc",
+          wpId: that.value1,
+          recorddate: date
+        },
+        success(res) {
+          that.tableLoading = false;
+          if (res.code === 200) {
+            // that.tableData.data = res.data
+            var data = [];
+            res.data.forEach((item, index) => {
+              data[index] = {
+                fj: item.windturbineid,
+                sjbz: item.deviationrate2,
+                sjzy: item.deviationrate1,
+                zybz: item.deviationrate3,
+                hb: item.monthdeviationrate,
+                tb: item.yeardeviationrate,
+                bbgfj: item.standarddeviationrate
+              };
+            });
+            that.tableData.data = data;
+          }
+        },
+        Error(res) {
+          console.log("tag", res);
+        }
+      });
+    },
+    //   tab
+    handleOpen(vl, index) {
+      this.$nextTick(() => {
+        this.cur = index;
+        this.showTitle = vl;
+        if (index == 0) {
+          this.getDate(1);
+          this.shows = true;
+        } else {
+          this.getDate(2);
+          this.shows = false;
+        }
+      });
+    },
+    // 场站
+    ChangZhanVal() {
+      var that = this;
+      that.API.requestData({
+        method: "GET",
+        baseURL: "http://10.155.32.4:9001/",
+        subUrl: "benchmarking/wplist",
+        success(res) {
+          that.ChangZhan = res.data;
+          that.value1 = res.data[0].id;
+        }
+      });
+    },
+    // 查询
+    handleSubmit() {
+      if (this.shows == true) {
+        // alert(this.date);
+        this.getTable(this.date);
+      } else {
+        // alert(this.date2);
+        this.getTable(this.date2);
+      }
+    },
+    // 获取日期
+    getDate(vl) {
+      //时间戳处理,val=1是默认开始时间(当前月第一天),val=2是默认结束时间(今天)
+      var date = new Date();
+      var year = date.getFullYear(),
+        month = date.getMonth() + 1,
+        day = date.getDate() - 1;
+      month >= 1 && month <= 9 ? (month = "0" + month) : "";
+      day >= 0 && day <= 9 ? (day = "0" + day) : "";
+      var begin = year + "-" + month;
+      var end = year + "-" + month + "-" + day;
+      if (vl == 1) {
+        return begin;
+      } else if (vl == 2) {
+        return end;
+      }
+    },
+  }
+};
+</script>
+<style scoped>
+.newsDiv {
+  color: rgba(255, 255, 255, 0.75);
+  background-color: rgba(255, 255, 255, 0.1);
+  margin-bottom: 8px;
+  line-height: 3.4259vh;
+  padding: 0 15px;
+}
+.newspan {
+  line-height: 30px;
+  cursor: pointer;
+  padding: 0 1vw;
+  margin: 0 2px;
+  color: #9ca5a8;
+  transition: color 0.2s ease-in-out;
+  position: relative;
+}
+.newspan:hover {
+  background: linear-gradient(
+    to top,
+    rgba(5, 187, 76, 0.5),
+    rgba(5, 187, 76, 0)
+  );
+  color: white;
+  position: relative;
+}
+.newspan:hover::after {
+  content: "";
+  position: absolute;
+  width: 100%;
+  height: 0.463vh;
+  border: 0.093vh solid #05bb4c;
+  border-top: 0;
+  left: 0;
+  bottom: 0;
+  box-sizing: border-box;
+}
+.active {
+  background: linear-gradient(
+    to top,
+    rgba(5, 187, 76, 0.5),
+    rgba(5, 187, 76, 0)
+  );
+  color: white;
+  position: relative;
+}
+.active::after {
+  content: "";
+  position: absolute;
+  width: 100%;
+  height: 0.463vh;
+  border: 0.093vh solid #05bb4c;
+  border-top: 0;
+  left: 0;
+  bottom: 0;
+  box-sizing: border-box;
+}
+.title {
+  background: rgba(255, 255, 255, 0.1);
+  margin-bottom: 8px;
+  padding: 1vh;
+}
+</style>

+ 544 - 0
src/views/planPower/index.vue

@@ -0,0 +1,544 @@
+<template>
+  <div class="draught-fan-list">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="getProject(true)">
+              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">项目:</div>
+          <div class="search-input">
+            <el-select v-model="projectId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in projectArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">日期:</div>
+          <div class="search-input">
+            <el-date-picker v-model="recorddate" type="year" value-format="YYYY" placeholder="选择日期" popper-class="date-select">
+            </el-date-picker>
+          </div>
+        </div>
+      </div>
+      <div class="query-actions">
+        <button class="btn green" @click="search()">查询</button>
+        <button class="btn green" @click="dialogShow = true">新增</button>
+        <button class="btn green" @click="exportExcel()" v-if="tableData.data.length">导出</button>
+      </div>
+    </div>
+    <div class="df-table">
+      <ComTable height="78vh" :data="tableData"></ComTable>
+    </div>
+    <el-dialog title="新增计划发电量" v-model="dialogShow" width="85%" top="10vh" custom-class="modal curDialog"
+      :close-on-click-modal="false" @closed="resetForm">
+      <el-form ref="form" :model="form" :rules="rules" inline label-width="80px">
+        <el-form-item label="场站" prop="submitWpId">
+          <el-select v-model="form.submitWpId" clearable placeholder="请选择" popper-class="select" @change="reGetProject()">
+            <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="项目" prop="submitProjectId">
+          <el-select v-model="form.submitProjectId" clearable placeholder="请选择" popper-class="select">
+            <el-option v-for="item in projectArray2" :key="item.id" :value="item.id" :label="item.name" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="时间" prop="submitData">
+          <el-date-picker v-model="form.submitData" type="year" value-format="YYYY" placeholder="选择日期" popper-class="date-select">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item class="curFlex" label="1月份计划发电量(万kWh):" prop="gc01">
+          <el-input v-model="form.gc01"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="2月份计划发电量(万kWh):" prop="gc02">
+          <el-input v-model="form.gc02"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="3月份计划发电量(万kWh):" prop="gc03">
+          <el-input v-model="form.gc03"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="4月份计划发电量(万kWh):" prop="gc04">
+          <el-input v-model="form.gc04"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="5月份计划发电量(万kWh):" prop="gc05">
+          <el-input v-model="form.gc05"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="6月份计划发电量(万kWh):" prop="gc06">
+          <el-input v-model="form.gc06"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="7月份计划发电量(万kWh):" prop="gc07">
+          <el-input v-model="form.gc07"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="8月份计划发电量(万kWh):" prop="gc08">
+          <el-input v-model="form.gc08"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="9月份计划发电量(万kWh):" prop="gc09">
+          <el-input v-model="form.gc09"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="10月份计划发电量(万kWh):" prop="gc10">
+          <el-input v-model="form.gc10"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="11月份计划发电量(万kWh):" prop="gc11">
+          <el-input v-model="form.gc11"></el-input>
+        </el-form-item>
+        <el-form-item class="curFlex" label="12月份计划发电量(万kWh):" prop="gc12">
+          <el-input v-model="form.gc12"></el-input>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <span class="dialog-footer">
+          <button class="btn green" @click="submit">提交</button>
+          <button class="btn green" @click="dialogShow = false">取消</button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import ComTable from "@com/coms/table/table.vue";
+export default {
+  // 名称
+  name: "cutAnalyse",
+
+  // 使用组件
+  components: {
+    ComTable
+  },
+
+  // 数据
+  data () {
+    const that = this;
+    return {
+      isAsc: "asc",
+      wpArray: [],
+      wpId: "",
+      projectArray: [],
+      projectId: "",
+      projectArray2: [],
+      recorddate: new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy"),
+      dialogShow: false,
+      tableData: {
+        column: [
+          {
+            name: "名称",
+            field: "projectName",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "年",
+            field: "year",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "1月",
+            field: "gc01",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "2月",
+            field: "gc02",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "3月",
+            field: "gc03",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "4月",
+            field: "gc04",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "5月",
+            field: "gc05",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "6月",
+            field: "gc06",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "7月",
+            field: "gc07",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "8月",
+            field: "gc08",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "9月",
+            field: "gc09",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "10月",
+            field: "gc10",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "11月",
+            field: "gc11",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "12月",
+            field: "gc12",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "合计",
+            field: "generatingcapacity",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          },
+          {
+            name: "操作",
+            field: "generatingcapacity",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+            template () {
+              return "<el-button type='text' style='cursor: pointer;'>编辑</el-button>";
+            },
+            click (e, row) {
+              that.editData(row)
+            }
+          }
+        ],
+        data: [],
+      },
+      form: {
+        outagehours: 0.0,
+        submitWpId: "",
+        submitProjectId: "",
+        submitData: "",
+        gc01: "",
+        gc02: "",
+        gc03: "",
+        gc04: "",
+        gc05: "",
+        gc06: "",
+        gc07: "",
+        gc08: "",
+        gc09: "",
+        gc10: "",
+        gc11: "",
+        gc12: "",
+      },
+      rules: {
+        submitWpId: [
+          { required: true, message: '请选择场站', trigger: 'change' },
+        ],
+        submitProjectId: [
+          { required: true, message: '请选择项目', trigger: 'change' },
+        ],
+        submitData: [
+          { required: true, message: '请选择时间', trigger: 'change' },
+        ],
+        gc01: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc02: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc03: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc04: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc05: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc06: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc07: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc08: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc09: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc10: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc11: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+        gc12: [
+          { required: true, validator: this.BASE.elCkeck.isNumber, trigger: 'change' },
+        ],
+      }
+    };
+  },
+
+  // 函数
+  methods: {
+    // 请求服务
+    requestData () {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/windfarmAllAjax",
+        success (res) {
+          that.wpArray = res.data;
+          that.wpId = that.wpId || res.data[0].id;
+          that.getProject();
+        }
+      });
+    },
+
+    // 获取期数
+    getProject (skipRequest) {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/projectAjax",
+        data: {
+          wpIds: that.wpId
+        },
+        success (res) {
+          that.projectArray = res.data;
+          that.projectArray2 = res.data;
+          that.projectId = res.data[0].id;
+          if (!skipRequest) {
+            that.getTableData();
+          }
+        }
+      });
+    },
+
+    // 弹窗获取期数
+    reGetProject (wpIds = this.form.submitWpId) {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/projectAjax",
+        data: {
+          wpIds
+        },
+        success (res) {
+          that.projectArray2 = res.data;
+          that.form.submitProjectId = res.data[0].id
+          that.dialogShow = true;
+        }
+      });
+    },
+
+    getTableData () {
+      let that = this;
+      if (!that.recorddate) {
+        that.BASE.showMsg({
+          msg: "时间不可为空"
+        });
+      } else {
+        that.API.requestData({
+          method: "POST",
+          subUrl: "projectplan/getProjectPlanVo",
+          data: {
+            isAsc: that.isAsc,
+            wpId: that.wpId || "",
+            pjId: that.projectId || "",
+            year: new Date(that.recorddate).getFullYear()
+          },
+          success (res) {
+            that.tableData.data = res.data;
+          }
+        });
+      }
+    },
+
+    // 导出excel
+    exportExcel () {
+      this.BASE.exportExcel(this.tableData);
+    },
+
+    submit () {
+      let that = this;
+      that.$refs.form.validate((valid) => {
+        if (valid) {
+          let data = that.BASE.deepCopy(that.form);
+          data.windpower = that.form.submitWpId;
+          data.projectid = that.form.submitProjectId;
+          data.year = new Date(that.form.submitData).getFullYear();
+          data.generatingcapacity = (parseFloat(data.gc01) + parseFloat(data.gc02) + parseFloat(data.gc03) + parseFloat(data.gc04) + parseFloat(data.gc05) + parseFloat(data.gc06) + parseFloat(data.gc07) + parseFloat(data.gc08) + parseFloat(data.gc09) + parseFloat(data.gc10) + parseFloat(data.gc11) + parseFloat(data.gc12));
+          that.API.requestData({
+            method: "POST",
+            subUrl: "projectplan/saveData",
+            data,
+            success (res) {
+              that.getTableData();
+              that.BASE.showMsg({
+                type: "success",
+                msg: "保存成功"
+              });
+              that.dialogShow = false;
+            }
+          });
+        } else {
+          return false;
+        }
+      });
+    },
+
+    editData (item) {
+      let that = this;
+      that.API.requestData({
+        method: "POST",
+        subUrl: "projectplan/getSingleProjectPlan",
+        data: {
+          pjId: item.projectid,
+          year: item.year
+        },
+        success (res) {
+          that.reGetProject(res.data.windpower || "");
+          that.form = res.data;
+          that.form.submitWpId = res.data.windpower;
+          that.form.submitProjectId = res.data.projectid;
+          that.form.submitData = res.data.year;
+          that.form.outagehours = 0.0;
+          that.dialogShow = true;
+        }
+      });
+    },
+
+    resetForm () {
+      for (let key in this.form) {
+        if(key === "outagehours"){
+          this.form[key] = 0.0;
+        }
+        this.form[key] = "";
+      }
+      this.$refs.form.resetFields();
+    },
+
+    search () {
+      this.getTableData();
+    }
+  },
+
+  created () {
+    this.requestData();
+  },
+
+  mounted () { },
+
+  unmounted () { },
+};
+</script>
+
+<style lang="less" scoped>
+.draught-fan-list {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .btn-group-tabs {
+    display: flex;
+    flex-direction: row;
+
+    .photovoltaic {
+      margin-left: 1.481vh;
+    }
+  }
+
+  .df-table {
+    border: 0.093vh solid fade(@darkgray, 50%);
+    position: relative;
+    overflow: auto;
+    flex-grow: 1;
+    margin-top: 1.481vh;
+
+    &:before {
+      content: '';
+      width: 0.37vh;
+      height: 0.37vh;
+      background: @write;
+      position: absolute;
+      left: 0.278vh;
+      top: 0.278vh;
+    }
+
+    tbody {
+      height: calc(100vh - 166px);
+    }
+  }
+}
+</style>
+<style lang="less">
+.el-form {
+  .el-form-item {
+    margin-bottom: 30px;
+  }
+  .el-form-item.curFlex {
+    width: 100%;
+    .el-form-item__label {
+      width: 210px !important;
+    }
+    .el-form-item__content {
+      display: flex;
+      justify-content: start;
+      align-items: center;
+      width: 100%;
+    }
+  }
+}
+
+.curDialog {
+  .el-dialog__body {
+    max-height: 600px;
+    overflow-y: scroll;
+  }
+
+  .dialog-footer {
+    width: 100%;
+    margin-top: 20px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+}
+</style>
+

+ 293 - 0
src/views/warn/tjsj.vue

@@ -0,0 +1,293 @@
+<template>
+  <div class="knowledge-2">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getWt(wpId, true); }">
+              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">风机:</div>
+          <div class="search-input">
+            <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">类型:</div>
+          <div class="search-input">
+            <el-select v-model="type" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in typeArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="query-item">
+          <div class="lable">开始日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="value1"
+              @change="BeginChange(value1)"
+              type="date"
+              value-format="YYYY-MM-DD"
+              placeholder="选择日期"
+              popper-class="date-select"
+            >
+            </el-date-picker>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">结束日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="value2"
+              @change="EndChange(value2)"
+              type="date"
+              value-format="YYYY-MM-DD"
+              placeholder="选择日期"
+              popper-class="date-select"
+            >
+            </el-date-picker>
+            <div class="unit svg-icon svg-icon-gray">
+              <svg-icon :svgid="''" />
+            </div>
+          </div>
+        </div>
+        </div>
+      </div>
+      <div class="query-actions" style="margin-right: 1500px">
+        <button class="btn green" @click="onClickSearch">查询</button>
+      </div>
+    </div>
+    <div>
+      <ComTable :data="tableData" height="85vh"></ComTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import ComTable from "@com/coms/table/table.vue";
+
+export default {
+  components: { ComTable },
+  data() {
+    return {
+      value1: "",
+      value2: "",
+      wpId: "",
+      wpName: "",
+      wtId: "",
+      type: "",
+      typeArray: [
+        
+        {
+          id: 4,
+          name: '维护'        
+        },
+        {
+          id: 2,
+          name: '故障'        
+        }],
+      tableData: {
+        column: [
+          {
+            name: "场站",
+            field: "wpName",
+            is_num: true,
+            is_light: false,
+          },
+          {
+            name: "机组",
+            field: "wtName",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "开始时刻",
+            field: "stopTime",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "结束时刻",
+            field: "startTime",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "停机小时数(h)",
+            field: "stopHours",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "状态",
+            field: "statusName",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "停机类型",
+            field: "warnDesc",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "损失电量(kWh)",
+            field: "lossPower",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "报警信息",
+            field: "handleWay",
+            is_num: false,
+            is_light: false,
+          },
+        ],
+        data: [],
+      },
+    };
+  },
+  created() {
+    // this.requestSafeList();
+    this.value1 = this.getTime(1);
+		this.value2 = this.getTime(2);
+    this.getWp();
+    this.requestSafeList();
+  },
+  methods: {
+    getTime(val) { //时间戳处理,val=1是默认开始时间(当前月第一天),val=2是默认结束时间(今天)
+				var date = new Date();
+				var year = date.getFullYear(),
+					month = date.getMonth() + 1,
+					day = date.getDate();
+				month >= 1 && month <= 9 ? (month = '0' + month) : '';
+				day >= 0 && day <= 9 ? (day = '0' + day) : '';
+				var begin = year + '-' + month + '-01';
+				var end = year + '-' + month + '-' + day;
+				if (val == 1) {
+					return begin;
+				} else if (val == 2) {
+					return end;
+				}
+			},
+// 获取风场
+    getWp (reGetWp) {
+      let that = this;
+      that.API.requestData({
+        baseURL: "http://10.155.32.4:9001",
+          subUrl: "benchmarking/wplist",
+        success (res) {
+          console.log(11)
+          that.wpArray = res.data;
+          that.wpId = res.data[0].id;
+          that.wpName = res.data[0].wpName;
+          that.getWt(that.wpId, reGetWp);
+        }
+      });
+    },
+
+    // 获取风机
+    getWt (wpid, reGetWp) {
+      let that = this;
+      if (that.wpId) {
+        that.API.requestData({
+          method: "GET",
+          baseURL: "http://10.155.32.4:9001",
+          subUrl: "benchmarking/wtList",
+          data: {
+            wpid
+          },
+          success (res) {
+            that.wtArray = res.data;
+            // that.wtId = res.data[0].id;
+            if (!reGetWp) {
+              that.getTabData();
+            }
+          }
+        });
+      }
+    },
+    BeginChange(vl) {
+      this.value1 = vl;
+    },
+    EndChange(vl) {
+      this.value2 = vl;
+    },
+    typeChange(vl) {
+      this.type = vl;
+    },
+    // 搜索按钮
+    onClickSearch() {
+      this.requestSafeList();
+    },
+    // 获取停机事件
+    requestSafeList() {
+      let that = this;
+
+      let data = {
+        tablepar: {
+          pageNum: 1,
+          pageSize: 1000,
+        },
+        beginDate: that.value1,
+        endDate: that.value2,
+        wpId: that.wpId,
+      };
+
+      if(that.wtId!='') data.wtId=that.wtId;
+      if(that.type!='') data.type=that.type;
+
+      this.API.requestData({
+        method: "POST",
+        baseURL: "http://192.168.10.18:8082",
+        subUrl: "/event/getShutdownevent",
+        data,
+        success(res) {
+          if (res.code == 200) {
+            that.tableData.data = [];
+            let data = res.data.list;
+            console.log(data);
+            for (var i = 0; i < data.length; i++) {
+              let obj = {
+                wpName: data[i].wpName,
+                wtName: data[i].wtName,
+                stopTime: new Date(data[i].stopTime).formatDate("yyyy-MM-dd hh:mm:ss"),
+                
+                stopHours: data[i].stopHours,
+                statusName: data[i].statusName,
+                warnDesc: data[i].warnDesc,
+                lossPower: data[i].lossPower,
+                handleWay: data[i].handleWay,
+
+              };
+              if(data[i].startTime) obj.startTime=new Date(data[i].startTime).formatDate("yyyy-MM-dd hh:mm:ss");
+              that.tableData.data.push(obj);
+            }
+          }
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scope>
+@titleGray: #9ca5a8;
+@rowGray: #606769;
+@darkBack: #536268;
+.knowledge-2 {
+  .el-select {
+    width: 200px;
+  }
+  .el-input {
+    width: 200px;
+  }
+}
+</style>

+ 234 - 0
src/views/warn/xdgl.vue

@@ -0,0 +1,234 @@
+<template>
+  <div class="knowledge-2">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="query-item">
+          <div class="lable">开始日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="value1"
+              @change="BeginChange(value1)"
+              type="date"
+              value-format="YYYY-MM-DD"
+              placeholder="选择日期"
+              popper-class="date-select"
+            >
+            </el-date-picker>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">结束日期:</div>
+          <div class="search-input">
+            <el-date-picker
+              v-model="value2"
+              @change="EndChange(value2)"
+              type="date"
+              value-format="YYYY-MM-DD"
+              placeholder="选择日期"
+              popper-class="date-select"
+            >
+            </el-date-picker>
+            <div class="unit svg-icon svg-icon-gray">
+              <svg-icon :svgid="''" />
+            </div>
+          </div>
+        </div>
+        </div>
+      </div>
+      <div class="query-actions" style="margin-right: 1500px">
+        <button class="btn green" @click="onClickSearch">查询</button>
+      </div>
+    </div>
+    <div>
+      <ComTable :data="tableData" height="85vh"></ComTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import ComTable from "@com/coms/table/table.vue";
+
+export default {
+  components: { ComTable },
+  data() {
+    return {
+      value1: "",
+      value2: "",
+      wpId: "",
+      tableData: {
+        column: [
+          {
+            name: "编号",
+            field: "id",
+            is_num: true,
+            is_light: false,
+          },
+          {
+            name: "限电时刻",
+            field: "stopTime",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "恢复时刻",
+            field: "startTime",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "停机类型",
+            field: "stopTypeId",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "限电时间",
+            field: "stopHours",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "损失电量(kWh)",
+            field: "lossPower",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "限电原因",
+            field: "description",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "关联风机",
+            field: "wts",
+            is_num: false,
+            is_light: false,
+          },
+        ],
+        data: [],
+      },
+    };
+  },
+  created() {
+    // this.requestSafeList();
+    this.value1 = this.getTime(1);
+		this.value2 = this.getTime(2);
+    this.getWp();
+    this.requestSafeList();
+  },
+  methods: {
+    getTime(val) { //时间戳处理,val=1是默认开始时间(当前月第一天),val=2是默认结束时间(今天)
+				var date = new Date();
+				var year = date.getFullYear(),
+					month = date.getMonth() + 1,
+					day = date.getDate();
+				month >= 1 && month <= 9 ? (month = '0' + month) : '';
+				day >= 0 && day <= 9 ? (day = '0' + day) : '';
+				var begin = year + '-' + month + '-01';
+				var end = year + '-' + month + '-' + day;
+				if (val == 1) {
+					return begin;
+				} else if (val == 2) {
+					return end;
+				}
+			},
+// 获取风场
+    getWp (reGetWp) {
+      let that = this;
+      that.API.requestData({
+        baseURL: "http://10.155.32.4:9001",
+          subUrl: "benchmarking/wplist",
+        success (res) {
+          console.log(11)
+          that.wpArray = res.data;
+          that.wpId = res.data[0].id;
+          that.wpName = res.data[0].wpId;
+          // that.getWt(that.wpId, reGetWp);
+        }
+      });
+    },
+
+    
+    BeginChange(vl) {
+      this.value1 = vl;
+    },
+    EndChange(vl) {
+      this.value2 = vl;
+    },
+    typeChange(vl) {
+      this.type = vl;
+    },
+    // 搜索按钮
+    onClickSearch() {
+      this.requestSafeList();
+    },
+    // 获取限电事间
+    requestSafeList() {
+      let that = this;
+
+      let data = {
+        tablepar: {
+          pageNum: 1,
+          pageSize: 1000,
+        },
+        beginDate: that.value1,
+        endDate: that.value2,
+        wpId: that.wpId,
+      };
+
+      
+
+      this.API.requestData({
+        method: "POST",
+        baseURL: "http://192.168.10.18:8082",
+        subUrl: "/brownouts/getBrownoutsList",
+        data,
+        success(res) {
+          if (res.code == 200) {
+            that.tableData.data = [];
+            let data = res.data.list;
+            console.log(data);
+            for (var i = 0; i < data.length; i++) {
+              let obj = {
+                id: i+1,
+                stopTime: new Date(data[i].stopTime).formatDate("yyyy-MM-dd hh:mm:ss"),
+                startTime: new Date(data[i].startTime).formatDate("yyyy-MM-dd hh:mm:ss"),
+                stopTypeId: data[i].stopTypeId,
+                stopHours: data[i].stopHours,
+                lossPower: data[i].lossPower,
+                description: data[i].description,
+                wts: data[i].wts,
+              };
+              that.tableData.data.push(obj);
+            }
+          }
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scope>
+@titleGray: #9ca5a8;
+@rowGray: #606769;
+@darkBack: #536268;
+.knowledge-2 {
+  .el-select {
+    width: 200px;
+  }
+  .el-input {
+    width: 200px;
+  }
+}
+</style>

+ 238 - 0
src/views/warnStatistics/index.vue

@@ -0,0 +1,238 @@
+<template>
+  <div class="draught-fan-list">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">日期:</div>
+          <div class="search-input">
+            <el-date-picker v-model="recorddate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+            </el-date-picker>
+          </div>
+        </div>
+      </div>
+      <div class="query-actions">
+        <button class="btn green" @click="search()">查询</button>
+      </div>
+    </div>
+    <div class="df-table curTable">
+      <el-table :data="tableData.data" height="78vh" max-height="78vh" stripe style="width: 100%" :border="true">
+        <el-table-column :show-overflow-tooltip="true" prop="wtname" label="风机"></el-table-column>
+        <el-table-column :show-overflow-tooltip="true" :label="tableTitle">
+          <el-table-column :show-overflow-tooltip="true" label="近一天">
+            <el-table-column :show-overflow-tooltip="true" label="1">
+              <el-table-column :show-overflow-tooltip="true" prop="day1top1name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day1top1" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="2">
+              <el-table-column :show-overflow-tooltip="true" prop="day1top2name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day1top2" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="3">
+              <el-table-column :show-overflow-tooltip="true" prop="day1top3name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day1top3" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="true" label="近三天">
+            <el-table-column :show-overflow-tooltip="true" label="1">
+              <el-table-column :show-overflow-tooltip="true" prop="day3top1name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day3top1" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="2">
+              <el-table-column :show-overflow-tooltip="true" prop="day3top2name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day3top2" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="3">
+              <el-table-column :show-overflow-tooltip="true" prop="day3top3name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day3top3" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="true" label="近七天">
+            <el-table-column :show-overflow-tooltip="true" label="1">
+              <el-table-column :show-overflow-tooltip="true" prop="day7top1name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day7top1" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="2">
+              <el-table-column :show-overflow-tooltip="true" prop="day7top2name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day7top2" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="3">
+              <el-table-column :show-overflow-tooltip="true" prop="day7top3name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day7top3" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="true" label="近十五天">
+            <el-table-column :show-overflow-tooltip="true" label="1">
+              <el-table-column :show-overflow-tooltip="true" prop="day15top1name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day15top1" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="2">
+              <el-table-column :show-overflow-tooltip="true" prop="day15top2name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day15top2" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="3">
+              <el-table-column :show-overflow-tooltip="true" prop="day15top3name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="day15top3" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="true" label="近一个月">
+            <el-table-column :show-overflow-tooltip="true" label="1">
+              <el-table-column :show-overflow-tooltip="true" prop="month1top1name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="month1top1" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="2">
+              <el-table-column :show-overflow-tooltip="true" prop="month1top2name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="month1top2" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="true" label="3">
+              <el-table-column :show-overflow-tooltip="true" prop="month1top3name" label="故障"></el-table-column>
+              <el-table-column :show-overflow-tooltip="true" prop="month1top3" label="频次" :sortable="true"></el-table-column>
+            </el-table-column>
+          </el-table-column>
+        </el-table-column>
+      </el-table>
+    </div>
+    <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal"
+      :close-on-click-modal="true" @closed="dialogType = ''">
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  // 名称
+  name: "cutAnalyse",
+
+  // 数据
+  data () {
+    const that = this;
+    return {
+      isAsc: "asc",
+      wpArray: [],
+      wpId: "",
+      recorddate: new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
+      tableTitle: "",
+      tableData: {
+        column: [
+          {
+            name: "风机",
+            field: "windturbineid",
+            is_num: false,
+            is_light: false,
+            sortable: true
+          }
+        ],
+        data: [],
+      },
+    };
+  },
+
+  // 函数
+  methods: {
+    // 请求服务
+    requestData () {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/windfarmAjax",
+        success (res) {
+          that.wpArray = res.data;
+          that.wpId = res.data[0].id;
+          that.getTableData();
+        }
+      });
+    },
+
+    getTableData () {
+      let that = this;
+      if (!that.wpId || !that.recorddate) {
+        that.BASE.showMsg({
+          msg: "场站与日期不可为空"
+        });
+      } else {
+        that.API.requestData({
+          method: "GET",
+          baseURL: "http://10.155.32.4:8034/",
+          subUrl: "reliability/earlyWarn",
+          data: {
+            wpid: that.wpId,
+            date: that.recorddate
+          },
+          success (res) {
+            if (res.data.length) {
+              that.tableTitle = res.data[0].wpname + "预警统计";
+              that.tableData.data = res.data;
+            }
+          }
+        });
+      }
+    },
+
+    search () {
+      this.getTableData();
+    }
+  },
+
+  created () {
+    this.requestData();
+  },
+
+  mounted () { },
+
+  unmounted () { },
+};
+</script>
+
+<style lang="less" scoped>
+.draught-fan-list {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .btn-group-tabs {
+    display: flex;
+    flex-direction: row;
+
+    .photovoltaic {
+      margin-left: 1.481vh;
+    }
+  }
+
+  .df-table {
+    border: 0.093vh solid fade(@darkgray, 50%);
+    position: relative;
+    overflow: auto;
+    flex-grow: 1;
+    margin-top: 1.481vh;
+
+    &:before {
+      content: '';
+      width: 0.37vh;
+      height: 0.37vh;
+      background: @write;
+      position: absolute;
+      left: 0.278vh;
+      top: 0.278vh;
+    }
+
+    tbody {
+      height: calc(100vh - 166px);
+    }
+  }
+}
+</style>
+<style lang="less">
+.curTable {
+  .cell {
+    text-align: center;
+  }
+}
+</style>