ソースを参照

首次上传,内涵风机数据查看和风机参数对比模块。

yangxiao 4 年 前
コミット
422b00daa4
90 ファイル変更35348 行追加0 行削除
  1. 3 0
      .browserslistrc
  2. 2 0
      .env.development
  3. 2 0
      .env.production
  4. 2 0
      .env.test
  5. 23 0
      .gitignore
  6. 6 0
      babel.config.js
  7. 14736 0
      package-lock.json
  8. 49 0
      package.json
  9. BIN
      public/favicon.ico
  10. 17 0
      public/index.html
  11. 139 0
      src/App.vue
  12. 32 0
      src/api/AES.js
  13. 258 0
      src/api/axios.js
  14. 13 0
      src/api/config.js
  15. 359 0
      src/assets/css/base.scss
  16. 6 0
      src/assets/css/default.scss
  17. 4 0
      src/assets/css/font.scss
  18. BIN
      src/assets/fonts/UnidreamLED.ttf
  19. BIN
      src/assets/images/login.jpg
  20. 239 0
      src/assets/js/benchmarkingSys/innationBenchmarkParticulars.js
  21. 443 0
      src/assets/js/benchmarkingSys/internationalBenchmark.js
  22. 1127 0
      src/assets/js/benchmarkingSys/newPerformanceList.js
  23. 868 0
      src/assets/js/benchmarkingSys/performanceList.js
  24. 628 0
      src/assets/js/benchmarkingSys/projectBenchmark.js
  25. 507 0
      src/assets/js/benchmarkingSys/projectBenchmarkParticulars.js
  26. 443 0
      src/assets/js/benchmarkingSys/propertBenchmark.js
  27. 466 0
      src/assets/js/benchmarkingSys/propertBenchmarkParticulars.js
  28. 650 0
      src/assets/js/benchmarkingSys/singleTransverseBenchmark.js
  29. 275 0
      src/assets/js/benchmarkingSys/yardBenchmark.js
  30. 268 0
      src/assets/js/benchmarkingSys/yardBenchmarkParticulars.js
  31. 106 0
      src/assets/js/healthManagement/healthAssessment.js
  32. 257 0
      src/assets/js/healthManagement/healthAssessmentDetailed.js
  33. 348 0
      src/assets/js/index/index.js
  34. 362 0
      src/assets/js/lossBenchmarking/InterValueLineTable.js
  35. 252 0
      src/assets/js/lossBenchmarking/fiveLossLineTable.js
  36. 293 0
      src/assets/js/lossBenchmarking/fiveLossRates.js
  37. 25 0
      src/assets/js/lossBenchmarking/fiveLossRatesHistogramChart.js
  38. 62 0
      src/assets/js/lossBenchmarking/fiveLossRatesPieChart.js
  39. 354 0
      src/assets/js/lossBenchmarking/interValue.js
  40. 233 0
      src/assets/js/lossBenchmarking/lossRateAbandoned.js
  41. 230 0
      src/assets/js/lossBenchmarking/lossRateAffected.js
  42. 230 0
      src/assets/js/lossBenchmarking/lossRateFailure.js
  43. 273 0
      src/assets/js/lossBenchmarking/lossRateMaintenance.js
  44. 273 0
      src/assets/js/lossBenchmarking/lossRatePerformance.js
  45. 29 0
      src/assets/js/main.js
  46. 143 0
      src/assets/js/normRanking/goodnessfitRank.js
  47. 132 0
      src/assets/js/normRanking/grossgenerationRank.js
  48. 119 0
      src/assets/js/normRanking/percentageLossrRank.js
  49. 118 0
      src/assets/js/performanceAnalysis/cutAndSpeed.js
  50. 102 0
      src/assets/js/performanceAnalysis/cutAndSpeedHistory.js
  51. 663 0
      src/assets/js/performanceAnalysis/gradeEvaluation.js
  52. 217 0
      src/assets/js/performanceAnalysis/plannedGeneration.js
  53. 105 0
      src/assets/js/performanceAnalysis/rankingCallThePolice.js
  54. 187 0
      src/assets/js/performanceAnalysis/rankingCurveDeviationRate.js
  55. 95 0
      src/assets/js/performanceAnalysis/rankingLoadRate.js
  56. 88 0
      src/assets/js/performanceAnalysis/rankingUtilization.js
  57. 115 0
      src/assets/js/performanceAnalysis/singleMachineAnalysis.js
  58. 193 0
      src/assets/js/performanceAnalysis/singleMachineAnalysisOperation.js
  59. 234 0
      src/assets/js/performanceAnalysis/singleMachinePower.js
  60. 112 0
      src/assets/js/singlePerformanceAnalysis/individualHistoryinformation.js
  61. 70 0
      src/assets/js/singlePerformanceAnalysis/individualPandectinformation.js
  62. 1161 0
      src/assets/js/singlePerformanceAnalysis/individualPandectinformationdetails.js
  63. 167 0
      src/assets/js/singlePerformanceAnalysis/powerChart.js
  64. 163 0
      src/assets/js/singlePerformanceAnalysis/powerandWindspeedChart.js
  65. BIN
      src/assets/logo.png
  66. 55 0
      src/components/common/menu.vue
  67. 349 0
      src/components/index/map.vue
  68. 21 0
      src/components/index/mapInit.js
  69. 1217 0
      src/components/index/map_style.json
  70. 354 0
      src/jsonData/menu.json
  71. 80 0
      src/main.js
  72. 468 0
      src/pages/lineChart/index.vue
  73. 377 0
      src/pages/search/index.vue
  74. 3 0
      src/pages/test/index.vue
  75. 76 0
      src/router/index.js
  76. 10 0
      src/store/getters.js
  77. 29 0
      src/store/index.js
  78. 30 0
      src/store/modules/user.js
  79. 191 0
      src/tools/base.js
  80. 373 0
      src/tools/echartsTool.js
  81. 1018 0
      src/tools/echartsToolLzx.js
  82. 908 0
      src/tools/echartsToolzm.js
  83. 5 0
      src/tools/elUI.js
  84. 177 0
      src/tools/excel/Blob.js
  85. 179 0
      src/tools/excel/Export2Excel.js
  86. 101 0
      src/tools/formCheck.js
  87. 98 0
      src/tools/htmlToPdf.js
  88. 54 0
      src/tools/webSocket.js
  89. 15 0
      src/utils/auth.js
  90. 84 0
      vue.config.js

+ 3 - 0
.browserslistrc

@@ -0,0 +1,3 @@
+> 1%
+last 2 versions
+not dead

+ 2 - 0
.env.development

@@ -0,0 +1,2 @@
+// 开发服务
+VUE_APP_API_URL=http://10.155.32.4:8031/

+ 2 - 0
.env.production

@@ -0,0 +1,2 @@
+// 生产服务
+VUE_APP_API_URL=http://10.155.32.4:8082/

+ 2 - 0
.env.test

@@ -0,0 +1,2 @@
+// 测试服务
+VUE_APP_API_URL=http://test:8082/

+ 23 - 0
.gitignore

@@ -0,0 +1,23 @@
+.DS_Store
+node_modules
+/dist
+
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 6 - 0
babel.config.js

@@ -0,0 +1,6 @@
+const plugins = [];
+
+module.exports = {
+  presets: [["@vue/app", { useBuiltIns: "entry" }]],
+  plugins: plugins
+};

ファイルの差分が大きいため隠しています
+ 14736 - 0
package-lock.json


+ 49 - 0
package.json

@@ -0,0 +1,49 @@
+{
+  "name": "fe_search",
+  "version": "0.1.0",
+  "private": true,
+  "scripts": {
+    "serve": "vue-cli-service serve && webpack-dev-server --open",
+    "dev": "vue-cli-service build --mode development",
+    "test": "vue-cli-service build --mode test",
+    "build": "vue-cli-service build"
+  },
+  "dependencies": {
+    "axios": "^0.21.1",
+    "core-js": "^3.6.5",
+    "cors": "^2.8.5",
+    "crypto-js": "^4.0.0",
+    "echarts": "^5.1.0",
+    "element-ui": "^2.15.1",
+    "express-jwt": "^6.0.0",
+    "express-session": "^1.17.1",
+    "file-saver": "^2.0.5",
+    "js-cookie": "^2.2.1",
+    "jsonwebtoken": "^8.5.1",
+    "moment": "^2.29.1",
+    "stompjs": "^2.3.3",
+    "uglifyjs-webpack-plugin": "^2.2.0",
+    "vue": "^2.6.11",
+    "vue-json-excel": "^0.3.0",
+    "vue-pdf": "^4.2.0",
+    "vue-router": "^3.2.0",
+    "vuescroll": "^4.17.3",
+    "vuex": "^3.4.0",
+    "xlsx": "^0.17.0"
+  },
+  "devDependencies": {
+    "@vue/cli-plugin-babel": "~4.5.0",
+    "@vue/cli-plugin-router": "~4.5.0",
+    "@vue/cli-plugin-vuex": "~4.5.0",
+    "@vue/cli-service": "~4.5.0",
+    "babel-plugin-component": "^1.1.1",
+    "html2canvas": "^1.0.0-rc.7",
+    "image-webpack-loader": "^7.0.1",
+    "jspdf": "^2.3.1",
+    "sass": "^1.26.5",
+    "sass-loader": "^8.0.2",
+    "script-loader": "^0.7.2",
+    "vue-template-compiler": "^2.6.11",
+    "webpack-dev-server": "^3.11.2"
+  }
+}

BIN
public/favicon.ico


+ 17 - 0
public/index.html

@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <title><%= htmlWebpackPlugin.options.title %></title>
+  </head>
+  <body>
+    <noscript>
+      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

+ 139 - 0
src/App.vue

@@ -0,0 +1,139 @@
+<template>
+  <div id="app" v-loading="$store.state.loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading">
+    <el-container>
+      <el-aside width="230px">
+        <el-menu router :unique-opened="true" :default-active="defaultActive" class="el-menu-vertical-demo"
+          background-color="#545c64" text-color="#fff" active-text-color="#1890ff">
+          <el-submenu :index="'menu-' + pIndex" v-for="(pItem, pIndex) in menus" :key="pIndex">
+            <template slot="title">
+              <i class="el-icon-location"></i>
+              <span>{{pItem.name}}</span>
+            </template>
+            <el-menu-item-group>
+              <el-menu-item :route="{ path: '/search', query: { tableid: cItem.tableid } }" :index="'/search?tableid=' + cItem.tableid"
+                v-for="cItem in pItem.children" :key="cItem.tableid">{{cItem.tablename}}</el-menu-item>
+            </el-menu-item-group>
+          </el-submenu>
+          <el-submenu index="menu-fjcsdb">
+            <template slot="title">
+              <i class="el-icon-location"></i>
+              <span>参数对比</span>
+            </template>
+            <el-menu-item-group>
+              <el-menu-item :route="{ path: '/lineChart' }" index="/lineChart">风机参数对比</el-menu-item>
+            </el-menu-item-group>
+          </el-submenu>
+        </el-menu>
+      </el-aside>
+      <el-container>
+        <!-- <el-header>Header</el-header> -->
+        <el-main>
+          <router-view />
+        </el-main>
+      </el-container>
+    </el-container>
+  </div>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      defaultActive: "/search",
+      menus: []
+    }
+  },
+  mounted () {
+    let that = this;
+    that.$nextTick(() => {
+      // 获取左侧菜单数据
+      that.API.get("datacenter/tables").then((res) => {
+        let JSFW = {
+          name: '计算服务',
+          children: []
+        };
+        let MHS_FDC = {
+          name: "麻黄山",
+          children: []
+        };
+        let NSS_FDC = {
+          name: "牛首山",
+          children: []
+        };
+        let QS_FDC = {
+          name: "青山",
+          children: []
+        };
+        let SBQ_FDC = {
+          name: "石板泉",
+          children: []
+        };
+        let XS_FDC = {
+          name: "香山",
+          children: []
+        };
+        let DWK_GDC = {
+          name: "大武口",
+          children: []
+        };
+        let PL_GDC = {
+          name: "平罗",
+          children: []
+        };
+        let XH_GDC = {
+          name: "宣和",
+          children: []
+        };
+        let MCH_GDC = {
+          name: "马场湖",
+          children: []
+        };
+        res.data.forEach(ele => {
+          if (ele.windpowerstationid === 'MHS_FDC') {
+            MHS_FDC.children.push(ele);
+          } else if (ele.windpowerstationid === 'NSS_FDC') {
+            NSS_FDC.children.push(ele);
+          } else if (ele.windpowerstationid === 'QS_FDC') {
+            QS_FDC.children.push(ele);
+          } else if (ele.windpowerstationid === 'SBQ_FDC') {
+            SBQ_FDC.children.push(ele);
+          } else if (ele.windpowerstationid === 'XS_FDC') {
+            XS_FDC.children.push(ele);
+          } else if (ele.windpowerstationid === 'DWK_GDC') {
+            DWK_GDC.children.push(ele);
+          } else if (ele.windpowerstationid === 'PL_GDC') {
+            PL_GDC.children.push(ele);
+          } else if (ele.windpowerstationid === 'XH_GDC') {
+            XH_GDC.children.push(ele);
+          } else if (ele.windpowerstationid === 'MCH_GDC') {
+            MCH_GDC.children.push(ele);
+          } else {
+            JSFW.children.push(ele);
+          }
+        });
+        that.menus.push(JSFW, MHS_FDC, NSS_FDC, QS_FDC, SBQ_FDC, XS_FDC, DWK_GDC, PL_GDC, XH_GDC, MCH_GDC);
+        if (res.data && res.data.length) {
+          that.defaultActive = '/search?tableid=JSFW'
+        }
+      });
+    });
+  },
+
+}
+</script>
+
+<style lang="scss">
+@import '@assets/css/base.scss';
+</style>
+<style lang="scss" scoped>
+#app {
+  .el-container {
+    height: 100%;
+  }
+
+  .el-aside {
+    background: rgb(84, 92, 100);
+  }
+}
+</style>
+

+ 32 - 0
src/api/AES.js

@@ -0,0 +1,32 @@
+import CryptoJS from 'crypto-js';
+/**
+ * CryptoJS加密
+ */
+export function localEncrypt(word, keyStr) {
+  keyStr = keyStr ? keyStr : "BTRH201911PERMIS";
+  let key = CryptoJS.enc.Utf8.parse(keyStr);
+  let srcs = CryptoJS.enc.Utf8.parse(word);
+  let encrypted = CryptoJS.AES.encrypt(srcs, key, {
+    mode: CryptoJS.mode.ECB,
+    padding: CryptoJS.pad.Pkcs7
+  });
+  return encrypted.toString();
+}
+
+/**
+ * CryptoJS解密
+ */
+export function localDecrypt(word, keyStr) {
+  keyStr = keyStr ? keyStr : "BTRH201911PERMIS";
+  var key = CryptoJS.enc.Utf8.parse(keyStr);
+  var decrypt = CryptoJS.AES.decrypt(word, key, {
+    mode: CryptoJS.mode.ECB,
+    padding: CryptoJS.pad.Pkcs7
+  });
+  return CryptoJS.enc.Utf8.stringify(decrypt).toString();
+}
+
+export default {
+  localEncrypt,
+  localDecrypt
+}

+ 258 - 0
src/api/axios.js

@@ -0,0 +1,258 @@
+// 引入axios
+import BASE from '@tools/base'
+import store from '@store/index'
+import axios from 'axios'
+
+import { Message } from 'element-ui';
+
+export function requestData (options) {
+  return new Promise((resolve, reject) => {
+
+    if (options.showLoading) {
+      store.state.loading = true;
+    }
+
+    // 包装请求头
+    let headers = {
+      'Content-Type': 'application/x-www-form-urlencoded',
+    };
+
+    // 请求是否携带 token
+    const isMust = (options.isMust == true || options.isMust == false) ? options.isMust : true;
+    if (isMust) headers.authToken = localStorage.getItem('authToken');
+
+    // 创建请求实例
+    const XHRReq = axios.create({
+      headers,
+      baseURL: process.env.VUE_APP_API_URL || '/api/',
+      timeout: options.timeout || 3000,
+    });
+
+    // 请求拦截器
+    XHRReq.interceptors.request.use((config) => {
+      return config;
+    }, (err) => {
+      return Promise.reject(err);
+    });
+
+    // 统一格式包装请求参数
+    let params = new URLSearchParams();
+    for (let key in (options.data || {})) {
+      params.append(key, options.data[key]);
+    }
+
+    // 发起请求
+    XHRReq({
+      url: options.subUrl,
+      method: options.method || 'GET',
+      params,
+    }).then(response => {
+      if (options.showLoading) {
+        store.state.loading = false;
+      }
+      if (response.data.code === 501) { // 用户类请求错误code (账号密码错误、用户锁定、token过期等)
+        localStorage.removeItem('authToken');
+        Message.error(response.data.msg);
+        setTimeout(() => {
+          window.location.reload();
+          // window.__STATICVUE__.$router.replace('/login');
+        }, 1000);
+      } else if (response.data.code === 200) { // 请求成功 code
+        options.success && options.success(response.data);
+        resolve(response);
+      } else { // 其他code
+        Message.error((response.data && response.data.msg) || ("请求出错[" + response.data.code + "]"));
+      }
+    }).catch(error => {
+      if (options.showLoading) {
+        store.state.loading = false;
+      }
+      options.fail && options.fail(reject(error));
+    });
+  });
+}
+
+// 创建axios实例
+const httpService = axios.create({
+  withCredentials: false, // 允许携带cookie
+  baseURL: process.env.VUE_APP_API_URL || '/api/',
+  timeout: 5000, // 请求超时时间 - 3s
+  // transformRequest: [
+  //   // `transformRequest` 允许在向服务器发送前,修改请求数据
+  //   // 只能用在 'PUT', 'POST' 和 'PATCH' 这几个请求方法
+  //   // 后面数组中的函数必须返回一个字符串,或 ArrayBuffer,或 Stream
+  //   data => {
+  //     var fData = new FormData();
+  //     for(let key in data){
+  //       fData.append(key, data[key]);
+  //     }
+  //     return fData
+  //   }
+  // ],
+  //修改请求头信息
+  headers: {
+    'Content-Type': 'application/x-www-form-urlencoded',
+    // 'Access-Control-Allow-Origin':'*'
+    // 'Content-Type': 'multipart/form-data'
+    // 'Content-Type': 'application/json;charset=UTF-8'
+  },
+});
+// httpService.defaults.withCredentials = true; // 表示跨域请求时是否需要使用凭证
+// http request 拦截器
+httpService.interceptors.request.use(
+  config => {
+    return config;
+  },
+  err => {
+    return Promise.reject(err);
+  }
+);
+// respone拦截器
+httpService.interceptors.response.use(
+  response => {
+    const {
+      data
+    } = response;
+    if (data.code === 200 || data.code === 2000) {
+
+    }
+    else {
+      // let rqData = JSON.parse(response.config.data); // 请求数据
+      // console.error(BASE.getNowTime(), rqData.interfaceid+":"+data.message)
+      Message.warning(data.message);
+      store.commit('loadingStore', false); // 全局的数据 加载中.... - 开关
+      store.commit('openSubmitDDTag', false); // 防抖动 - 开关
+    }
+    return data; // 响应正确的数据
+  }, error => {
+    // 响应错误数据(错误情况分无token信息,错误码)
+    const {
+      response
+    } = error;
+    if (response) {
+      switch (error.response.status) {
+        case 400:
+          error.message = '错误请求';
+          break;
+        case 401:
+          error.message = '未授权,请重新登录';
+          break;
+        case 403:
+          error.message = '拒绝访问';
+          break;
+        case 404:
+          error.message = '请求错误,未找到该资源';
+          break;
+        case 405:
+          error.message = '请求方法未允许';
+          break;
+        case 408:
+          error.message = '请求超时';
+          break;
+        case 500:
+          error.message = '服务器端出错';
+          break;
+        case 501:
+          error.message = '网络未实现';
+          break;
+        case 502:
+          error.message = '网络错误';
+          break;
+        case 503:
+          error.message = '服务不可用';
+          break;
+        case 504:
+          error.message = '网络超时';
+          break;
+        case 505:
+          error.message = 'http版本不支持该请求';
+          break;
+        default:
+          error.message = `未知错误${error.response.status}`;
+      }
+    } else {
+      error.message = "请求超时";
+    }
+    store.commit('loadingStore', false); // 全局的数据 加载中... - 开关
+    store.commit('openSubmitDDTag', false); // 防抖动 - 开关
+    console.error(BASE.getBzDate(new Date().getTime(), 0, "datetime"), error.message)
+    Message.error(error.message + ",请稍候重试!");
+  }
+);
+
+
+/*
+ *  get请求
+ *  url: 接口地址
+ *  params: 参数,格式如下
+ * */
+export function get (url, params = {}) {
+  return new Promise((resolve, reject) => {
+    httpService({
+      url: url,
+      method: 'get',
+      params: params,
+    }).then(response => {
+      resolve(response);
+    }).catch(error => {
+      reject(error);
+    });
+  });
+}
+
+
+/*
+ *  post请求
+ *  url: 接口地址
+ *  params: 参数,格式如下
+ * */
+export function post (url, params = {}) {
+
+  return new Promise((resolve, reject) => {
+    httpService({
+      url: url,
+      method: 'post',
+      data: params,
+    }).then(response => {
+      resolve(response);
+    }).catch(error => {
+      reject(error);
+    });
+  });
+}
+
+/*
+ *  post请求 - 超过5s使用的方法
+ *  url: 接口地址
+ *  params: 参数,格式如下
+ * */
+export function postL (url, params = {}) {
+
+  return new Promise((resolve, reject) => {
+    axios.create({
+      withCredentials: false, // 允许携带cookie
+      baseURL: process.env.VUE_APP_API_URL || '/api/',
+      timeout: 210000, // 请求超时时间 - 60s
+      //修改请求头信息
+      headers: {
+        'Content-Type': 'application/x-www-form-urlencoded'
+      },
+    })({
+      url: url,
+      method: 'post',
+      data: params,
+    }).then(response => {
+      resolve(response);
+    }).catch(error => {
+      reject(error);
+    });
+  });
+}
+
+
+export default {
+  get,
+  post,
+  postL,
+  requestData
+}

+ 13 - 0
src/api/config.js

@@ -0,0 +1,13 @@
+/**
+ * 国电电力宁夏新能源集中监控系统
+ * */
+
+//测试 - 国电
+export default {
+  webSoketUrl: 'ws://10.155.32.4:8082/gyee-websocket', // webSoket
+}
+
+//生产 - 国电
+// export default {
+//   webSoketUrl: '192.168.4.203:9008', // webSoket
+// }

+ 359 - 0
src/assets/css/base.scss

@@ -0,0 +1,359 @@
+@charset "utf-8";
+
+/* 公共样式 */
+body {
+  font-size: $font-size-base;
+  font-weight: 500;
+  font-family: "PingFangSC-Regular", "Microsoft YaHei", "微软雅黑";
+  color: $font-color-base;
+  -webkit-text-size-adjust: 100%;
+  -ms-text-size-adjust: 100%;
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+body,
+div,
+dl,
+dt,
+dd,
+ul,
+ol,
+li,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+pre,
+code,
+form,
+fieldset,
+legend,
+input,
+textarea,
+p,
+blockquote,
+th,
+td,
+hr,
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+nav,
+section {
+  margin: 0;
+  padding: 0
+}
+
+input,
+select,
+textarea {
+  font-size: 100%
+}
+
+table {
+  border-collapse: collapse;
+  border-spacing: 0
+}
+
+fieldset,
+img {
+  border: 0
+}
+
+abbr,
+acronym {
+  border: 0;
+  font-variant: normal
+}
+
+del {
+  text-decoration: line-through
+}
+
+address,
+caption,
+cite,
+code,
+dfn,
+em,
+th,
+var {
+  font-style: normal;
+  font-weight: normal
+}
+
+ol,
+ul {
+  list-style: none
+}
+
+caption,
+th {
+  text-align: left
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  font-size: 100%;
+  font-weight: normal
+}
+
+q:before,
+q:after {
+  content: ''
+}
+
+button {
+  outline: 0;
+  border: none;
+}
+
+a:hover {
+  text-decoration: none
+}
+
+ins,
+a {
+  text-decoration: none;
+  cursor: pointer;
+}
+
+button {
+  cursor: pointer;
+}
+
+textarea {
+  resize: none;
+}
+
+iframe,
+img {
+  border: 0;
+}
+
+ul,
+ol {
+  list-style: none;
+}
+
+a {
+  color: $font-color-base;
+  text-decoration: none;
+}
+
+input[type="text"],
+[type="password"],
+[type="button"],
+input[type="submit"],
+input[type="reset"] {
+  -webkit-appearance: none;
+  outline: none;
+}
+
+// input  type="number" 去除上下箭头
+// 谷歌
+input[type=number]::-webkit-inner-spin-button,
+input[type=number]::-webkit-outer-spin-button {
+  -webkit-appearance: none;
+  margin: 0;
+}
+
+// 火狐
+input[type="number"] {
+  -moz-appearance: textfield;
+}
+
+// 禁止左键选中页面内容
+* {
+  -webkit-touch-callout: none;
+  /*系统默认菜单被禁用*/
+  -webkit-user-select: none;
+  /*webkit浏览器*/
+  -khtml-user-select: none;
+  /*早期浏览器*/
+  -moz-user-select: none;
+  /*火狐*/
+  -ms-user-select: none;
+  /*IE10*/
+  user-select: none;
+}
+
+input {
+  -webkit-user-select: auto;
+  /*webkit浏览器*/
+}
+
+textarea {
+  -webkit-user-select: auto;
+  /*webkit浏览器*/
+}
+
+select {
+  /*-webkit-appearance: none;去掉select的下箭头*/
+  outline: none;
+}
+
+textarea {
+  -webkit-appearance: none;
+}
+
+// * {
+//   -webkit-box-sizing: border-box;
+//   -moz-box-sizing: border-box;
+//   box-sizing: border-box;
+// }
+
+// input::-webkit-input-placeholder {
+//   /* WebKit, Blink, Edge */
+//   color: rgba(255, 255, 255, 0.25) !important;
+// }
+
+// input:-moz-placeholder {
+//   /* Mozilla Firefox 4 to 18 */
+//   color: rgba(255, 255, 255, 0.25) !important;
+// }
+
+// input::-moz-placeholder {
+//   /* Mozilla Firefox 19+ */
+//   color: rgba(255, 255, 255, 0.25) !important;
+// }
+
+// input:-ms-input-placeholder {
+//   /* Internet Explorer 10-11 */
+//   color: rgba(255, 255, 255, 0.25) !important;
+// }
+
+textarea::-webkit-input-placeholder {
+  /* WebKit, Blink, Edge */
+  color: rgba(255, 255, 255, 0.25) !important;
+}
+
+textarea:-moz-placeholder {
+  /* Mozilla Firefox 4 to 18 */
+  color: rgba(255, 255, 255, 0.25) !important;
+}
+
+textarea::-moz-placeholder {
+  /* Mozilla Firefox 19+ */
+  color: rgba(255, 255, 255, 0.25) !important;
+}
+
+textarea:-ms-input-placeholder {
+  /* Internet Explorer 10-11 */
+  color: rgba(255, 255, 255, 0.25) !important;
+}
+
+/***滚动条 - 谷歌 - 开始***/
+// *::-webkit-scrollbar {
+//   width: 7px;
+//   /*对垂直流动条有效*/
+//   height: 7px;
+//   /*对水平流动条有效*/
+// }
+
+// // 滚动条的轨道(里面装有Thumb)
+// *::-webkit-scrollbar-track {
+//   -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
+//   background-color: rgba(255, 255, 255, 0.45);
+//   border-radius: 3px;
+// }
+
+// // 滚动条里面的小方块,能向上向下移动(或往左往右移动,取决于是垂直滚动条还是水平滚动条)
+// *::-webkit-scrollbar-thumb {
+//   border-radius: 5px;
+//   -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, .3);
+//   background-color: rgba(0, 0, 0, 0.65);
+// }
+
+// // 滚动条的轨道的两端按钮,允许通过点击微调小方块的位置。
+// *::-webkit-scrollbar-button {
+//   background-color: rgba(255, 255, 255, 0.75);
+//   height: 0px;
+// }
+
+// // 内层轨道,滚动条中间部分
+// *::-webkit-scrollbar-track-piece {
+//   background-color: rgba(255, 255, 255, 0.45);
+//   border-radius: 3px;
+// }
+
+/***滚动条 - 谷歌 - 结束***/
+
+/***全局公共样式 - 开始***/
+.h_10 {
+  height: 10px;
+}
+
+.h_30 {
+  height: 30px;
+}
+
+.h_55 {
+  height: 55px;
+}
+
+.h_500 {
+  height: 500px !important;
+}
+
+.no_mr {
+  margin-right: 0px !important;
+}
+
+.no_mb {
+  margin-bottom: 0px !important;
+}
+
+.no_bb {
+  border-bottom: 0px !important;
+}
+
+.no_br {
+  border-right: 0px !important;
+}
+
+.no_bl {
+  border-left: 0px !important;
+}
+
+iframe {
+  display: block;
+  border: 0px;
+}
+
+img {
+  display: block;
+}
+
+/***框架样式 - 开始***/
+html,
+body,
+#app {
+  height: 100%;
+  width: 100%;
+  position: relative;
+}
+
+.comReport{
+  width: 100%;
+  height: 100%;
+}
+
+/***框架样式 - 结束***/
+
+
+
+/***ElUI - 公共调整 - 开始***/
+
+/***ElUI - 公共调整 - 结束***/

+ 6 - 0
src/assets/css/default.scss

@@ -0,0 +1,6 @@
+
+// 全局
+$font-size-base: 14px; // 主字号
+$font-color-base: #222; // 文字颜色
+$border-color-base: #DDD; // 边框颜色
+$border-radius-base: 2px; // 默认圆角

+ 4 - 0
src/assets/css/font.scss

@@ -0,0 +1,4 @@
+@font-face {
+  font-family: "fontNameRegular";
+  src: url("../fonts/UnidreamLED.ttf");
+}

BIN
src/assets/fonts/UnidreamLED.ttf


BIN
src/assets/images/login.jpg


+ 239 - 0
src/assets/js/benchmarkingSys/innationBenchmarkParticulars.js

@@ -0,0 +1,239 @@
+import * as echarts from "echarts";
+export default {
+    data(){
+        return{
+          pickerOptions: {
+            disabledDate(time) {
+              return time.getTime() > Date.now();
+            },
+            },
+            tb2:false,
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            
+            options: [],
+            value: '',
+            value2:'',
+            timedate: [],
+            multipleSelection:[],
+            multipleSelection1:[],
+            multipleSelection2:[],
+            orderByColumn:'',
+            isAsc:'asc',
+
+            fdcLineData:[],
+            fdcLineData2:[],
+            currentPage2: 1,
+            pagesize: 10,
+            wpId:'',
+            beginDate:'',
+            endDate:'',
+            dialogTableVisible:false,
+            sortInOrder:[],
+            sortInOrderTop:[],
+            fdcName1:'',
+            fdcName2:'',
+            sortInOrde2:[],
+            getTableData:[],
+            fdcND:[],
+
+            fdcND1:[],
+            fdcND2:[],
+            loading:true,
+            loading2:true,
+            wp_n_1: {},
+            wp_n_2: {},
+        }
+    },
+    filters: {
+      rounding (value) {
+      return value.toFixed(2)
+      }
+    },
+    /**
+     * 获取跳转数据
+     */
+     activated(){
+        this.timedate = [];
+        this.value = this.$route.query.wpId;
+        // this.timedate[0] = this.$route.query.beginDate;
+        // this.timedate[1] = this.$route.query.endDate;
+        this.timedate.push(this.$route.query.beginDate,this.$route.query.endDate);
+        this.YardTableData();
+    },
+    methods:{
+        /**
+         * 查询场内风机列表信息
+         */
+        queryApData() {
+            this.YardTableData();
+            if(this.value2 != null || this.value2 != undefined){
+                this.tb2 = true;
+            if(this.timedate == ''){
+                this.beginDate = this.$route.query.beginDate;
+                this.endDate = this.$route.query.endDate;
+            }else{
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var guilty = new URLSearchParams();
+            guilty.append('pageNum',this.currentPage2);
+            guilty.append('pageSize',this.pagesize);
+            guilty.append('orderByColumn',this.orderByColumn);
+            guilty.append('isAsc',this.isAsc);
+            guilty.append('wpId',this.value2);
+            guilty.append('beginDate',this.beginDate);
+            guilty.append('endDate',this.endDate);
+          this.API.post('/contrast/benchmarkWpInWtList',guilty).then((res) => {
+            this.fdcLineData2 = res.data;
+            this.loading2=false;
+          }).catch(error =>{
+            this.$message.error('获取数据失败');
+          });
+            }
+        },
+        /**
+         * 判断是否选择两个场站
+         */
+        queryApDataMx() {
+           
+           if(this.multipleSelection1.length+this.multipleSelection2.length==2){
+               this.multipleSelection = this.multipleSelection1.concat(this.multipleSelection2);
+           }else{
+               this.$message.error("请选两个风场!");
+               return;
+           }
+           this.wp_n_1 = {};
+           this.wp_n_2 = {};
+          if(this.multipleSelection.length==2){
+              this.wp_n_1 = this.multipleSelection[0];
+              this.wp_n_2 = this.multipleSelection[1];
+              this.fdcName1 = this.multipleSelection[0].wtName;
+              this.fdcName2 = this.multipleSelection[1].wtName;
+              this.fdcND1 = this.multipleSelection[0].wtName;
+              this.fdcND2 = this.multipleSelection[1].wtName;
+              this.fdcND.push(this.fdcND1,this.fdcND2);
+              this.sortInOrder.push(this.multipleSelection[0].fnlyl,this.multipleSelection[0].xqjsl,
+              this.multipleSelection[0].ztzhjsl,this.multipleSelection[0].fwjsl,this.multipleSelection[0].slssl,
+              this.multipleSelection[0].xnssl,this.multipleSelection[0].qfl,this.multipleSelection[0].jxssl,
+              this.multipleSelection[0].gzssl);
+              this.sortInOrderTop.push(this.multipleSelection[1].fnlyl,this.multipleSelection[1].xqjsl,
+              this.multipleSelection[1].ztzhjsl,this.multipleSelection[1].fwjsl,this.multipleSelection[1].slssl,
+              this.multipleSelection[1].xnssl,this.multipleSelection[1].qfl,this.multipleSelection[1].jxssl,
+              this.multipleSelection[1].gzssl);
+              this.getTableData.push({index:'发电量',data1:this.multipleSelection[0].scadafdl,data2:this.multipleSelection[1].scadafdl});
+              this.getTableData.push({index:'故障损失电量',data1:this.multipleSelection[0].gzss,data2:this.multipleSelection[1].gzss});
+              this.getTableData.push({index:'检修损失电量',data1:this.multipleSelection[0].jxssl,data2:this.multipleSelection[1].jxssl});
+              this.getTableData.push({index:'性能未达标损失电量',data1:this.multipleSelection[0].xnsslfraction,data2:this.multipleSelection[1].xnsslfraction});
+              this.getTableData.push({index:'受累损失电量',data1:this.multipleSelection[0].slss,data2:this.multipleSelection[1].slss});
+              this.getTableData.push({index:'风能利用率',data1:this.multipleSelection[0].fnlyl,data2:this.multipleSelection[1].fnlyl});
+              this.getTableData.push({index:'故障损失率',data1:this.multipleSelection[0].gzssl,data2:this.multipleSelection[1].gzssl});
+              this.getTableData.push({index:'检修损失率',data1:this.multipleSelection[0].jxssl,data2:this.multipleSelection[1].jxssl});
+              this.getTableData.push({index:'弃风率',data1:this.multipleSelection[0].qfl,data2:this.multipleSelection[1].qfl});
+              this.getTableData.push({index:'性能损失率',data1:this.multipleSelection[0].xnssl,data2:this.multipleSelection[1].xnssl});
+              this.getTableData.push({index:'受累损失率',data1:this.multipleSelection[0].slssl,data2:this.multipleSelection[1].slssl});
+              this.getTableData.push({index:'复位及时率',data1:this.multipleSelection[0].fwjsl,data2:this.multipleSelection[1].fwjsl});
+              this.getTableData.push({index:'消缺及时率',data1:this.multipleSelection[0].xqjsl,data2:this.multipleSelection[1].xqjsl});
+              this.getTableData.push({index:'状态转换率',data1:this.multipleSelection[0].ztzhjsl,data2:this.multipleSelection[1].ztzhjsl});        
+              
+              this.dialogTableVisible = true;
+                this.$nextTick(function() {
+                    this.ECZM.leida_tc("leiDaTu5" , this.sortInOrder,this.fdcND1,this.sortInOrderTop,this.fdcND2);
+                    this.ECZM.bar_tc("leiDaTu6" , this.wp_n_1 , this.wp_n_2 ,this.wp_n_1.wtId , this.wp_n_2.wtId);
+     
+                    //this.drawPie2('leiDaTu6')
+                })
+            } 
+                
+        },
+        /**
+         * 格式转化(取小数点)
+         */
+        filter_fdl(cellValue){
+             return parseFloat(cellValue.scadafdl).toFixed(2);
+    },
+    /**
+     * 查询场内风机列表信息
+     */
+        YardTableData(){
+            this.API.get('/powercompare/windfarmAjax').then((res) => {
+              this.options = res.data;
+            }).catch(error =>{
+                this.$message.error('获取数据失败');
+              });
+            this.wpId = this.$route.query.wpId;
+            if(this.timedate == ''){
+                this.beginDate = this.$route.query.beginDate;
+                this.endDate = this.$route.query.endDate;
+            }else{
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var guilty = new URLSearchParams();
+            guilty.append('pageNum',this.currentPage2);
+            guilty.append('pageSize',this.pagesize);
+            guilty.append('orderByColumn',this.orderByColumn);
+            guilty.append('isAsc',this.isAsc);
+            if(this.value == ''){
+              guilty.append('wpId',this.wpId);
+            }else{
+              guilty.append('wpId',this.value);
+            }
+            guilty.append('beginDate',this.beginDate);
+            guilty.append('endDate',this.endDate);
+          this.API.post('/contrast/benchmarkWpInWtList',guilty).then((res) => {
+            this.fdcLineData = res.data;
+            this.loading = false;
+          }).catch(error =>{
+            this.$message.error('获取数据失败');
+          });
+        },
+        headStyle() {
+			    return "text-align:left"
+		    },
+        handleSelectionChange(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection1=[];
+            this.multipleSelection1 = val;
+                   
+        },
+        handleSelectionChange2(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection2=[];
+            this.multipleSelection2 = val;
+                   
+        },
+        changeTableSort(column){
+          this.orderByColumn = column.prop;
+          if(column.order == "descending"){
+            this.isAsc = 'desc';
+          }else if(column.order == "ascending"){
+            this.isAsc = "asc";
+          }
+          this.YardTableData();
+        },
+        /**
+         * 日期格式转换
+         */
+        filter_date(cellValue) {
+            let date = new Date(cellValue.recordDate);
+            return this.BASE.getBzDate(date,0);
+        },
+          /**
+           * 返回按钮
+           */
+        goReturn(){
+            this.$router.push('/internationalBenchmark')
+          },
+          }
+
+}

+ 443 - 0
src/assets/js/benchmarkingSys/internationalBenchmark.js

@@ -0,0 +1,443 @@
+//import FiveLossRatesHistogramChart from "../../views/benchMarking/FiveLossRatesHistogramChart.vue";
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      timedate: [],
+      isAsc: "asc",
+      beginDate: "",
+      endDate: "",
+      gridData: [],
+      multipleSelection: [],
+      sortInOrder: [],
+      sortInOrderTop: [],
+      sortInOrde2: [],
+      getTableData: [],
+      sortInOrderTop2: [],
+      fdcName1: "",
+      fdcName2: "",
+      currentPage2: 1,
+      pagesize: 10,
+      FClist: {
+        name: "",
+        id: "",
+      },
+      value: "",
+      wpId: [],
+      wpName: [],
+      orderByColumn: "",
+      dialogTableVisible: false,
+      lineDataOption: [],
+      getChartDataValue: [],
+      getChartDataValue2: [],
+      getChartData:[],
+      wp_n_1: {},
+      wp_n_2: {},
+    };
+  },
+  components: {
+  },
+  created() {
+    this.Inquire_tableDate();
+  },
+  methods: {
+    changeFun(val) {
+      this.selectrowdate = val;
+    },
+    /**
+     * 日期转换
+     */
+    filter_date(cellValue) {
+      let date = new Date(cellValue.recordDate);
+
+      return this.BASE.getBzDate(date,0);
+    },
+    headStyle() {
+      return "text-align:center";
+    },
+    onSubmit() {
+    },
+    handleClick() {},
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
+    queryApData() {
+      this.Inquire_tableDate();
+    },
+    /**
+     * 转换格式(去小数点)
+     */
+    simplification(cellValue){
+      return parseFloat(cellValue.fdl).toFixed(2);
+    },
+    /**
+     * 详情跳转
+     */
+    handleEdit(a, b) {
+      this.wpId = [];
+      this.lineDataOption = [];
+     
+        this.lineDataOption.push({ id: b.wpId, name: b.wpName });
+        this.$router.push({
+          path: "/innationBenchmarkParticulars",
+          query: {
+            wpId: b.wpId,
+            beginDate: this.beginDate,
+            endDate: this.endDate,
+            wpName: b.wpName,
+            select: this.lineDataOption,
+          },
+        });
+    },
+    /**
+     * 对标分析
+     */
+    queryApDataMx() {
+      this.dialogTableVisible = true;
+      this.$nextTick(function () {
+        
+        this.ECZM.leida_tc("leiDaTu" , this.sortInOrder,this.fdcName1,this.sortInOrderTop,this.fdcName2);
+        this.ECZM.bar_tc("leiDaTu2" , this.wp_n_1 , this.wp_n_2 , this.wp_n_1.wpId , this.wp_n_2.wpId);
+      });
+    },
+    /**
+     * 数据格式转换
+     */
+    handleSelectionChange(val) {
+      this.wp_n_1 = "";
+      this.wp_n_2 = "";
+      this.sortInOrder = [];
+      this.sortInOrderTop = [];
+      this.getTableData = [];
+      this.sortInOrde2 = [];
+      this.multipleSelection = val;
+      if (this.multipleSelection.length == 2) {
+        this.wp_n_1 = this.multipleSelection[0];
+        this.wp_n_2 = this.multipleSelection[1];
+        this.fdcName1 = this.multipleSelection[0].wpName;
+        this.fdcName2 = this.multipleSelection[1].wpName;
+        this.sortInOrder.push(
+          this.multipleSelection[0].fnlyl,
+          this.multipleSelection[0].xqjsl,
+          this.multipleSelection[0].ztzhjsl,
+          this.multipleSelection[0].fwjsl,
+          this.multipleSelection[0].slssl,
+          this.multipleSelection[0].xnssl,
+          this.multipleSelection[0].qfl,
+          this.multipleSelection[0].jxssl,
+          this.multipleSelection[0].gzssl
+        );
+        this.sortInOrderTop.push(
+          this.multipleSelection[1].fnlyl,
+          this.multipleSelection[1].xqjsl,
+          this.multipleSelection[1].ztzhjsl,
+          this.multipleSelection[1].fwjsl,
+          this.multipleSelection[1].slssl,
+          this.multipleSelection[1].xnssl,
+          this.multipleSelection[1].qfl,
+          this.multipleSelection[1].jxssl,
+          this.multipleSelection[1].gzssl
+        );
+        this.getTableData.push({
+          index: "发电量",
+          data1: this.multipleSelection[0].fdl,
+          data2: this.multipleSelection[1].fdl,
+        });
+        this.getTableData.push({
+          index: "故障损失电量",
+          data1: this.multipleSelection[0].gzss,
+          data2: this.multipleSelection[1].gzss,
+        });
+        this.getTableData.push({
+          index: "检修损失电量",
+          data1: this.multipleSelection[0].jxssl,
+          data2: this.multipleSelection[1].jxssl,
+        });
+        this.getTableData.push({
+          index: "性能未达标损失电量",
+          data1: this.multipleSelection[0].xnsslfraction,
+          data2: this.multipleSelection[1].xnsslfraction,
+        });
+        this.getTableData.push({
+          index: "受累损失电量",
+          data1: this.multipleSelection[0].slss,
+          data2: this.multipleSelection[1].slss,
+        });
+        this.getTableData.push({
+          index: "风能利用率",
+          data1: this.multipleSelection[0].fnlyl,
+          data2: this.multipleSelection[1].fnlyl,
+        });
+        this.getTableData.push({
+          index: "故障损失率",
+          data1: this.multipleSelection[0].gzssl,
+          data2: this.multipleSelection[1].gzssl,
+        });
+        this.getTableData.push({
+          index: "检修损失率",
+          data1: this.multipleSelection[0].jxssl,
+          data2: this.multipleSelection[1].jxssl,
+        });
+        this.getTableData.push({
+          index: "弃风率",
+          data1: this.multipleSelection[0].qfl,
+          data2: this.multipleSelection[1].qfl,
+        });
+        this.getTableData.push({
+          index: "性能损失率",
+          data1: this.multipleSelection[0].xnssl,
+          data2: this.multipleSelection[1].xnssl,
+        });
+        this.getTableData.push({
+          index: "受累损失率",
+          data1: this.multipleSelection[0].slssl,
+          data2: this.multipleSelection[1].slssl,
+        });
+        this.getTableData.push({
+          index: "复位及时率",
+          data1: this.multipleSelection[0].fwjsl,
+          data2: this.multipleSelection[1].fwjsl,
+        });
+        this.getTableData.push({
+          index: "消缺及时率",
+          data1: this.multipleSelection[0].xqjsl,
+          data2: this.multipleSelection[1].xqjsl,
+        });
+        this.getTableData.push({
+          index: "状态转换率",
+          data1: this.multipleSelection[0].ztzhjsl,
+          data2: this.multipleSelection[1].ztzhjsl,
+        });
+      }
+    },
+    handleCurrentChange(val) {
+    },
+    /**
+     * 分页功能
+     */
+    handleSizeChange(val) {
+      this.pagesize = val;
+    },
+    /**
+     * 分页功能
+     */
+    changeTableSort(column) {
+      this.orderByColumn = column.prop;
+      if (column.order == "descending") {
+        this.isAsc = "desc";
+      } else if (column.order == "ascending") {
+        this.isAsc = "asc";
+      }
+      this.Inquire_tableDate();
+    },
+    /**
+     * 查询场际对标列表信息
+     */
+    Inquire_tableDate() { 
+      var newData = new Date();
+       this.timedate[0] = this.BASE.getBzDate(newData.getTime(),-1);
+       this.timedate[1] = this.BASE.getBzDate(newData.getTime(),0);
+      let that = this;
+      this.API.get("/powercompare/windfarmAjax").then((res) => {
+        that.FClist = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+      if (this.timedate == "") {
+        this.timedate[0] = "2021-01-01";
+        this.timedate[1] = "2021-01-01";
+        this.beginDate = this.timedate[0];
+        this.endDate = this.timedate[1];
+      } else {
+        this.beginDate = this.timedate[0];
+        this.endDate = this.timedate[1];
+      }
+      var fiveLossData = new URLSearchParams();
+      fiveLossData.append("pageNum", this.currentPage2);
+      fiveLossData.append("pageSize", this.pagesize);
+      fiveLossData.append("orderByColumn", this.orderByColumn);
+      fiveLossData.append("isAsc", this.isAsc);
+      fiveLossData.append("wpId", this.value);
+      fiveLossData.append("beginDate", this.beginDate);
+      fiveLossData.append("endDate", this.endDate);
+      this.API
+        .post("/contrast/benchmarkWpOutList", fiveLossData)
+        .then((res) => {
+          that.gridData = res.data;
+          that.getPackageData(that.gridData);
+          that.getPackageData2(that.gridData);
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    toExcel() {},
+    getPackageData(gridData) {
+      for (let i = 0; i < gridData.length; i++) {
+        this.getChartDataValue.push({
+          value: gridData[i].fdl,
+          name: gridData[i].wpName,
+        });
+        this.getChartDataValue2.push({
+          value: gridData[i].gzss,
+          name: gridData[i].wpName,
+        });
+      }
+      this.getChartDataImport();
+      this.getChartDataValue = [];
+      this.getChartDataValue2 = [];
+    },
+    getChartDataImport() {
+      var charts = echarts.init(document.getElementById("chartPie"));
+      let option = {
+        title: {
+          text: "发电量占比",
+          left: "center",
+        },
+        color: ["#90ED7D", "#F7A35C", "#7CB5EC", "#434348", "#8085E9"],
+        tooltip: {
+          trigger: "item",
+        },
+        legend: {
+          orient: "vertical",
+          left: "left",
+        },
+        series: [
+          {
+            type: "pie",
+            radius: "50%",
+            data: this.getChartDataValue,
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: "rgba(0, 0, 0, 0.5)",
+              },
+            },
+          },
+        ],
+      };
+      charts.setOption(option);
+
+      var charts2 = echarts.init(document.getElementById("chartPieRight"));
+      let option2 = {
+        title: {
+          text: "损失电量占比",
+          left: "center",
+        },
+        color: ["#90ED7D", "#F7A35C", "#7CB5EC", "#434348", "#8085E9"],
+        tooltip: {
+          trigger: "item",
+        },
+        legend: {
+          orient: "vertical",
+          left: "left",
+        },
+        series: [
+          {
+            type: "pie",
+            radius: "50%",
+            data: this.getChartDataValue2,
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: "rgba(0, 0, 0, 0.5)",
+              },
+            },
+          },
+        ],
+      };
+      charts2.setOption(option2);
+    },
+    getPackageData2(gridData){
+            this.getChartData = [];
+            for(let i=0;i<gridData.length;i++){
+                this.getChartData.push({product:gridData[i].wpName,'限电损失电量单位:万KWh':gridData[i].xdss,
+                '故障损失电量单位:万KWh':gridData[i].gzss,'检修损失电量单位:万KWh':gridData[i].jxssl,
+                '性能损失电量单位:万KWh':gridData[i].xnssl,'受累损失电量单位:万KWh':gridData[i].slss})
+            }
+            this.getChartDataImport2();
+        },
+    getChartDataImport2(){
+            var charts =echarts.init(document.getElementById("chartHistogram"));
+            let option = {
+            title: {
+                text: '损失电量分析',
+                left: 'center'
+            },
+            legend: {
+                orient: 'vertical',
+                left: 'right'
+            },
+            tooltip: {},
+            dataset: {
+                 dimensions: ['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'],
+                 source: this.getChartData
+            },
+            xAxis: {type: 'category'},
+            yAxis: {},
+            // Declare several bar series, each will be mapped
+            // to a column of dataset.source by default.
+            series: [
+                {
+                    // barGap:'100%',/*多个并排柱子设置柱子之间的间距*/
+                    type: 'bar',
+                    barWidth : 30,
+                    itemStyle:{
+                        normal:{
+                            color:'#D201D8'
+                        }
+                    }
+                },
+                {
+                    
+                    type: 'bar',
+                    barWidth : 30,
+                    itemStyle:{
+                        normal:{
+                            color:'#FD0100'
+                        }
+                    }
+                },
+                {
+                    
+                    type: 'bar',
+                    barWidth : 30,
+                    itemStyle:{
+                        normal:{
+                            color:'#FF7B16'
+                        }
+                    }
+                },
+                {
+                    
+                    type: 'bar',
+                    barWidth : 30,
+                    itemStyle:{
+                        normal:{
+                            color:'#8085E9'
+                        }
+                    }
+                },
+                {
+                    
+                    type: 'bar',
+                    barWidth : 30,
+                    itemStyle:{
+                        normal:{
+                            color:'#A6A6A6'
+                        }
+                    }
+                },
+                
+            ]
+        };
+        charts.setOption(option);
+        }
+  },
+};

ファイルの差分が大きいため隠しています
+ 1127 - 0
src/assets/js/benchmarkingSys/newPerformanceList.js


+ 868 - 0
src/assets/js/benchmarkingSys/performanceList.js

@@ -0,0 +1,868 @@
+
+import * as echarts from "echarts";
+//import excelHelper from "@/utils/excelHelper";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      len:10,
+      fc:"",
+      pj:"",
+      xl:"",
+      autoHeight_fc: 400,
+      autoHeight_pj: 800,
+      autoHeight_xl: 1200,
+      tableHeight_fc:460,
+      tableHeight_pj:860,
+      tableHeight_xl:1220,
+      queryAll_table_lyl:[],
+      wpIdslist: {
+        name:"",
+        id:"",
+      },
+      projectlist:{
+        name:"",
+        id:"",
+      },
+      linelist:{
+        name:"",
+        id:"",
+      },
+      fc_date: [],
+      pj_date: [],
+      xl_date: [],
+      beginDate: "",
+      endDate: "",
+      activeName: "first",
+      tableid: "fc",
+      styleObject_fc: {
+        height: '460px'
+      },
+      styleObject_pj: {
+        height: '860px'
+      },
+      styleObject_xl: {
+        height: '1220px'
+      },
+      linechar_data:{
+        dayspeed:[],
+        daydl2:[],
+        daynhgzssdl:[],
+        daynhcfdl:[],
+        daynhqfdl:[],
+        daynhxdssdl:[],
+        lyl:[],
+        wtName:[],
+        total:[],
+        daynhwhssdl:[]
+      }
+    };
+  },
+  methods: {
+    created(){
+      
+      },
+    onSubmit() {},
+    /**
+     * 获取风场
+     */
+    query_wpid() {
+       var newData = new Date();
+       this.beginDate = this.BASE.getBzDate(newData.getTime(),-1);
+       this.endDate = this.BASE.getBzDate(newData.getTime(),0);
+       this.API.get("powercompare/windfarmAjax?").then((res) => {
+       this.wpIdslist = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    /**
+     * 获取项目
+     */
+    query_xml(){
+      this.pj = "";
+      this.xl = "";
+      this.API.get("powercompare/projectAjax?wpIds=" + this.fc).then((res) => {
+        this.projectlist = res.data;
+        
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    /**
+     * 获取线路
+     */
+    query_xl(){
+      this.xl = "";
+      this.API.get("powercompare/lineAjax?pjIds=" + this.pj).then((res) => {
+        this.linelist = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    /**
+     * 获取当前卡片状态
+     */
+    handleClick(tab) {
+      Object.assign(this.$data.autoHeight_fc, this.$options.data().autoHeight_fc);
+      Object.assign(this.$data.styleObject_fc, this.$options.data().styleObject_fc);
+      Object.assign(this.$data.autoHeight_pj, this.$options.data().autoHeight_pj);
+      Object.assign(this.$data.styleObject_pj, this.$options.data().styleObject_pj);
+      Object.assign(this.$data.autoHeight_xl, this.$options.data().autoHeight_xl);
+      Object.assign(this.$data.styleObject_xl, this.$options.data().styleObject_xl);
+      Object.assign(this.$data.queryAll_table_lyl, this.$options.data().queryAll_table_lyl);
+      if (tab.name === "first") {
+        this.tableid = "fc";
+        this.query();
+      } else if (tab.name === "second") {
+        this.tableid = "pj";
+        this.query();
+      } else if (tab.name === "jdxl") {
+        this.tableid = "xl";
+        this.query();
+      }
+    },
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
+    /**
+     * 查询风场、项目、线路列表数据结果
+     */
+    query() {
+      Object.assign(this.$data.autoHeight_fc, this.$options.data().autoHeight_fc);
+      Object.assign(this.$data.styleObject_fc, this.$options.data().styleObject_fc);
+      Object.assign(this.$data.autoHeight_pj, this.$options.data().autoHeight_pj);
+      Object.assign(this.$data.styleObject_pj, this.$options.data().styleObject_pj);
+      Object.assign(this.$data.autoHeight_xl, this.$options.data().autoHeight_xl);
+      Object.assign(this.$data.styleObject_xl, this.$options.data().styleObject_xl);
+      Object.assign(this.$data.queryAll_table_lyl, this.$options.data().queryAll_table_lyl);
+      this.styleObject_fc.height = '460px';
+      this.autoHeight_fc = '400px';
+      this.styleObject_pj.height = '860px';
+      this.autoHeight_pj = '800px';
+      this.styleObject_xl.height = '1260px';
+      this.autoHeight_xl = '1200px';
+      this.fc_date = [];
+      this.xl_date = [];
+      this.pj_date = [];
+      //表格数据获取
+      this.API
+        .get(
+          "powercompare/powerAjaxAll?wpIds=" +
+            this.fc +
+            "&beginDate=" +
+            this.beginDate +
+            "&endDate=" +
+            this.endDate +
+            "&queryType=" +
+            this.tableid +
+            "&sortName=" +
+            this.fc +
+            "&sortOrder=" +
+            "Asc"
+        )
+        .then((res) => {
+          let that = this;
+          Object.assign(this.$data.linechar_data, this.$options.data().linechar_data);
+          this.linechar_data.dayspeed=[];
+          this.linechar_data.daydl2=[];
+          this.linechar_data.daynhgzssdl=[];
+          this.linechar_data.daynhcfdl=[];
+          this.linechar_data.daynhqfdl=[];
+          this.linechar_data.daynhxdssdl=[];
+          this.linechar_data.lyl=[];
+          this.linechar_data.wtName=[];
+          this.linechar_data.daynhwhssdl=[];
+          let queryAll_table = res.data.list;
+          let queryAll_table_lyl = res.data.lyl;
+          for(let i = 0;i < Object.keys(queryAll_table).length;i++){
+            if(queryAll_table[i].wtName!="合计"){
+            that.linechar_data.dayspeed.push(queryAll_table[i].dayspeed.toFixed(2));
+            that.linechar_data.daydl2.push(queryAll_table[i].daydl2.toFixed(2));
+            that.linechar_data.daynhgzssdl.push(queryAll_table[i].daynhgzssdl.toFixed(2));
+            that.linechar_data.daynhcfdl.push(queryAll_table[i].daynhcfdl.toFixed(2));
+            that.linechar_data.daynhqfdl.push(queryAll_table[i].daynhqfdl.toFixed(2));
+            that.linechar_data.daynhxdssdl.push(queryAll_table[i].daynhxdssdl.toFixed(2));
+            that.linechar_data.lyl.push(queryAll_table[i].lyl.toFixed(2));
+            that.linechar_data.wtName.push(queryAll_table[i].wtName);
+            that.linechar_data.total.push(queryAll_table[i].total.toFixed(2));
+             that.linechar_data.daynhwhssdl.push(queryAll_table[i].daynhwhssdl.toFixed(2));
+            }
+          }
+          if (this.tableid === "fc") {
+            that.fc_date = queryAll_table;
+            that.drawhistogram_fc(this.linechar_data,queryAll_table_lyl);
+          } else if (this.tableid === "pj") {
+            that.pj_date = queryAll_table;
+            that.drawhistogram_pj(this.linechar_data,queryAll_table_lyl);
+          } else if (this.tableid === "xl") {
+            that.xl_date = queryAll_table;
+            that.drawhistogram_xl(this.linechar_data,queryAll_table_lyl);
+          }
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    /**
+     * 
+     * 询风场、项目、线路列表数据结果
+     */
+    queryPowerAll() {
+      Object.assign(this.$data.autoHeight_fc, this.$options.data().autoHeight_fc);
+      Object.assign(this.$data.styleObject_fc, this.$options.data().styleObject_fc);
+      Object.assign(this.$data.linechar_data, this.$options.data().linechar_data);
+      let that = this;
+      if (
+        this.beginDate == "" ||
+        this.endDate == "" ||
+        this.beginDate == undefined ||
+        this.endDate == undefined
+      ) {
+        this.query_wpid();
+        that.$message.error("请选时间!");
+        return;
+      }
+      this.fc_date = [];
+      this.xl_date = [];
+      this.pj_date = [];
+
+      if (
+        that.fc == "" ||
+        that.fc == null ||
+        that.fc == undefined
+      ) {
+        that.query();
+      } else {
+        this.API
+          .get(
+            "powercompare/powerAjax?wpIds=" +
+              this.fc +
+              "&pjIds=" +
+              this.pj +
+              "&lineIds=" +
+              this.xl +
+              "&beginDate=" +
+              this.beginDate +
+              "&endDate=" +
+              this.endDate +
+              "&sortName=" +
+              this.fc +
+              "&sortOrder=" +
+              "Asc"
+          )
+          .then((res) => {
+            let that = this;
+            this.len = Object.keys(res.data.list).length;
+            if(this.len <= 10){that.autoHeight_fc = 575; that.styleObject_fc.height = '700px' }
+            else if(this.len > 10 && this.len <=20){that.autoHeight_fc = 775; that.styleObject_fc.height = '800px';that.autoHeight_pj = 775; that.styleObject_pj.height = '800px';that.autoHeight_xl = 775; that.styleObject_xl.height = '800px' }
+            else if(this.len > 20 && this.len <=30){that.autoHeight_fc = 975; that.styleObject_fc.height = '1000px';that.autoHeight_pj = 975; that.styleObject_pj.height = '1000px';that.autoHeight_xl = 975; that.styleObject_xl.height = '1000px' }
+            else if(this.len > 30 && this.len <=40){that.autoHeight_fc = 1175; that.styleObject_fc.height = '1200px';that.autoHeight_pj = 1175; that.styleObject_pj.height = '1200px';that.autoHeight_xl = 1175; that.styleObject_xl.height = '1200px' }
+            else if(this.len > 40 && this.len <=50){that.autoHeight_fc = 1375; that.styleObject_fc.height = '1400px';that.autoHeight_pj = 1375; that.styleObject_pj.height = '1400px';that.autoHeight_xl = 1375; that.styleObject_xl.height = '1400px' }
+            else if(this.len > 50 && this.len <=60){that.autoHeight_fc = 1575; that.styleObject_fc.height = '1600px';that.autoHeight_pj = 1575; that.styleObject_pj.height = '1600px';that.autoHeight_xl = 1575; that.styleObject_xl.height = '1600px' }
+            else if(this.len > 60 && this.len <=70){that.autoHeight_fc = 1775; that.styleObject_fc.height = '1800px';that.autoHeight_pj = 1775; that.styleObject_pj.height = '1800px';that.autoHeight_xl = 1775; that.styleObject_xl.height = '1800px' }
+            else if(this.len > 70 && this.len <=80){that.autoHeight_fc = 1975; that.styleObject_fc.height = '2000px';that.autoHeight_pj = 1975; that.styleObject_pj.height = '2000px';that.autoHeight_xl = 1975; that.styleObject_xl.height = '2000px' }
+            else{that.autoHeight_fc = 2175; that.styleObject_fc.height = '2200px';that.autoHeight_pj = 2175; that.styleObject_pj.height = '2200px';that.autoHeight_xl = 2175; that.styleObject_xl.height = '2200px' }
+             this.tableHeight_fc = this.autoHeight_fc - 20; 
+             this.tableHeight_pj = this.autoHeight_pj - 20; 
+             this.tableHeight_xl = this.autoHeight_xl - 20; 
+          Object.assign(this.$data.linechar_data, this.$options.data().linechar_data);
+          this.linechar_data.dayspeed=[];
+          this.linechar_data.daydl2=[];
+          this.linechar_data.daynhgzssdl=[];
+          this.linechar_data.daynhcfdl=[];
+          this.linechar_data.daynhqfdl=[];
+          this.linechar_data.daynhxdssdl=[];
+          this.linechar_data.lyl=[];
+          this.linechar_data.wtName=[];
+          this.linechar_data.daynhwhssdl=[];
+          let queryAll_table = res.data.list;
+          let queryAll_table_lyl = res.data.lyl;
+          //this.query_lyl(queryAll_table);
+          for(let i = 0;i < Object.keys(queryAll_table).length;i++){
+            if(queryAll_table[i].wtName!="合计"){
+            that.linechar_data.dayspeed.push(queryAll_table[i].dayspeed.toFixed(2));
+            that.linechar_data.daydl2.push(queryAll_table[i].daydl2.toFixed(2));
+            that.linechar_data.daynhgzssdl.push(queryAll_table[i].daynhgzssdl.toFixed(2));
+            that.linechar_data.daynhcfdl.push(queryAll_table[i].daynhcfdl.toFixed(2));
+            that.linechar_data.daynhqfdl.push(queryAll_table[i].daynhqfdl.toFixed(2));
+            that.linechar_data.daynhxdssdl.push(queryAll_table[i].daynhxdssdl.toFixed(2));
+            that.linechar_data.lyl.push(queryAll_table[i].lyl.toFixed(2));
+            that.linechar_data.wtName.push(queryAll_table[i].wtName);
+            that.linechar_data.total.push(queryAll_table[i].total.toFixed(2));
+            that.linechar_data.daynhwhssdl.push(queryAll_table[i].daynhwhssdl.toFixed(2));
+            }
+            
+          }
+           if (this.tableid === "fc") {
+            that.fc_date = queryAll_table;
+            that.drawhistogram_fc(this.linechar_data,queryAll_table_lyl);
+          } else if (this.tableid === "pj") {
+            that.pj_date = queryAll_table;
+            that.drawhistogram_pj(this.linechar_data,queryAll_table_lyl);
+          } else if (this.tableid === "xl") {
+            that.xl_date = queryAll_table;
+            that.drawhistogram_xl(this.linechar_data,queryAll_table_lyl);
+          }
+          }).catch(error =>{
+            this.$message.error('获取数据失败');
+          });
+      }
+    },
+    /**
+     * 
+     * 查询检查
+     */
+    checkwindfarm() {
+      if (this.fc == "") {
+        this.$message.error("请选择风场!");
+        return;
+      }
+    },
+    checkproject() {
+      if (this.fc == "") {
+        this.$message.error("请选择项目!");
+        return;
+      }
+      if (new Date(this.timedate) == null) {
+        this.$message.error("请选择时间");
+        return;
+      }
+    },
+    checktime() {
+      if (new Date(this.timedate) == null) {
+        this.$message.error("请选择时间");
+        return;
+      }
+    },
+    /**
+     * 详情跳转
+     */
+    queryApDataMx() {
+      this.$router.push({ path: "/newPerformanceList" ,
+      query: {
+            beginDate : this.beginDate,
+            endDate : this.endDate
+          },});
+    },
+
+    /**
+     * 格式转换
+     */
+    filter_total(cellValue) {
+      return parseFloat(cellValue.total).toFixed(2);
+    },
+
+    filter_daydl2(cellValue) {
+      return parseFloat(cellValue.daydl2).toFixed(2);
+    },
+    filter_dayspeed(cellValue) {
+      return parseFloat(cellValue.dayspeed).toFixed(2);
+    },
+    filter_daynhwhssdl(cellValue) {
+      return parseFloat(cellValue.daynhwhssdl).toFixed(2);
+    },
+    filter_daynhcfdl(cellValue) {
+      return parseFloat(cellValue.daynhcfdl).toFixed(2);
+    },
+    filter_daynhxdssdl(cellValue) {
+      return parseFloat(cellValue.daynhqfdl).toFixed(2);
+    },
+    filter_lyl(cellValue) {
+      return parseFloat(cellValue.lyl).toFixed(2);
+    },
+    filter_daynhgzssdl(cellValue) {
+      return parseFloat(cellValue.daynhgzssdl).toFixed(2);
+    },
+    // toExcel() {
+    //   let that = this;
+    //   if (this.tableid === "fc") {
+    //     excelHelper.exportExcel("fc_table", "fc数据", ".xls", true);
+    //   } else if (this.tableid === "pj") {
+    //     excelHelper.exportExcel("pj_table", "pj数据", ".xls", true);
+    //   } else if (this.tableid === "xl") {
+    //     excelHelper.exportExcel("xl_table", "xl数据", ".xls", true);
+    //   }
+    // },
+    drawhistogram_fc(date,date2) {
+      this.chartLine = echarts.init(document.getElementById("histogram_fc"));
+      this.chartLine.clear();
+      this.chartLine.resize({ height: this.autoHeight_fc });
+
+      var option;
+      option = {
+        color: [
+          "#64E572",
+          "#24CBE5",
+          "#DDDF00",
+          "#ED561B",
+          "#50B432",
+          "#058DC7",
+        ],
+        title: {
+          text: "风机绩效榜单",
+          left: 300,
+          top: -5,
+          textStyle: {
+            fontSize: 13,
+          },
+        },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            // Use axis to trigger tooltip
+            type: "shadow", // 'shadow' as default; can also be 'line' or 'shadow'
+          },
+        },
+        legend: {
+          left: 15,
+          top: 30,
+          data: [
+            "实发电量",
+            "计划检修损失",
+            "非计划检修损失",
+            "限电损失",
+            "受累损失",
+            "性能损失",
+            "-",
+          ],
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        xAxis: {
+          type: "value",
+          max: Math.ceil(Math.max.apply(null, date.total))+ Math.ceil((Math.max.apply(null, date.total))*0.08)
+        },
+        yAxis: {
+          type: "category",
+          data: date.wtName,
+        },
+        series: [
+          {
+            name: "实发电量",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daydl2,
+          },
+          {
+            name: "计划检修损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhwhssdl,
+          },
+          {
+            name: "非计划检修损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhgzssdl,
+          },
+          {
+            name: "限电损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhxdssdl,
+          },
+          {
+            name: "受累损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhcfdl,
+          },
+          {
+            name: "性能损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhqfdl,
+          },
+          //曲线
+          {
+            name: "-",
+            data: date.total,
+            markPoint: {
+                data: date2,
+                        },
+            type: "line",
+            symbol: "circle",
+            symbolSize: 20,
+            lineStyle: {
+              color: "#5470C6",
+              width: 4,
+              type: "dashed",
+            },
+            itemStyle: {
+              borderWidth: 3,
+              borderColor: "#EE6666",
+              color: "yellow",
+            },
+          },
+        ],
+      };
+      this.chartLine.setOption(option);
+    },
+    drawhistogram_pj(date,date2) {
+      this.chartLine = echarts.init(document.getElementById("histogram_xm"));
+      this.chartLine.clear();
+      this.chartLine.resize({ height: this.autoHeight_pj });
+
+      var option;
+
+      var option;
+      option = {
+        color: [
+          "#64E572",
+          "#24CBE5",
+          "#DDDF00",
+          "#ED561B",
+          "#50B432",
+          "#058DC7",
+        ],
+        title: {
+          text: "项目绩效榜单",
+          left: 300,
+          top: -5,
+          textStyle: {
+            fontSize: 13,
+          },
+        },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            // Use axis to trigger tooltip
+            type: "shadow", // 'shadow' as default; can also be 'line' or 'shadow'
+          },
+        },
+        legend: {
+          left: 15,
+          top: 30,
+          data: [
+            "实发电量",
+            "计划检修损失",
+            "非计划检修损失",
+            "限电损失",
+            "受累损失",
+            "性能损失",
+            "-",
+          ],
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        xAxis: {
+          type: "value",
+          max: Math.ceil(Math.max.apply(null, date.total))+ Math.ceil((Math.max.apply(null, date.total))*0.08)
+         },
+        yAxis: {
+          type: "category",
+          data: date.wtName,
+        },
+        series: [
+          {
+            name: "实发电量",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daydl2,
+          },
+          {
+            name: "计划检修损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhwhssdl,
+          },
+          {
+            name: "非计划检修损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhgzssdl,
+          },
+          {
+            name: "限电损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhxdssdl,
+          },
+          {
+            name: "受累损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhcfdl,
+          },
+          {
+            name: "性能损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhqfdl,
+          },
+          //曲线
+          {
+            name: "-",
+            data: date.total,
+            markPoint: {
+                data: date2,
+                        },
+            type: "line",
+            symbol: "circle",
+            symbolSize: 20,
+            lineStyle: {
+              color: "#5470C6",
+              width: 4,
+              type: "dashed",
+            },
+            itemStyle: {
+              borderWidth: 3,
+              borderColor: "#EE6666",
+              color: "yellow",
+            },
+          },
+        ],
+      };
+      this.chartLine.setOption(option);
+    },
+    drawhistogram_xl(date,date2) {
+      this.chartLine = echarts.init(document.getElementById("histogram_jdxl"));
+      this.chartLine.clear();
+      this.chartLine.resize({ height: this.autoHeight_xl });
+      var option;
+
+      var option;
+      option = {
+        color: [
+          "#64E572",
+          "#24CBE5",
+          "#DDDF00",
+          "#ED561B",
+          "#50B432",
+          "#058DC7",
+        ],
+        title: {
+          text: "路线绩效榜单",
+          left: 300,
+          top: -5,
+          textStyle: {
+            fontSize: 13,
+          },
+        },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            // Use axis to trigger tooltip
+            type: "shadow", // 'shadow' as default; can also be 'line' or 'shadow'
+          },
+        },
+        legend: {
+          left: 15,
+          top: 30,
+          data: [
+            "实发电量",
+            "计划检修损失",
+            "非计划检修损失",
+            "限电损失",
+            "受累损失",
+            "性能损失",
+            "-",
+          ],
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        xAxis: {
+          type: "value",
+          max: Math.ceil(Math.max.apply(null, date.total))+ Math.ceil((Math.max.apply(null, date.total))*0.08)
+        },
+        yAxis: {
+          type: "category",
+          data: date.wtName,
+        },
+        series: [
+          {
+            name: "实发电量",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daydl2,
+          },
+          {
+            name: "计划检修损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhwhssdl,
+          },
+          {
+            name: "非计划检修损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhgzssdl,
+          },
+          {
+            name: "限电损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhxdssdl,
+          },
+          {
+            name: "受累损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhcfdl,
+          },
+          {
+            name: "性能损失",
+            type: "bar",
+            stack: "total",
+            label: {
+              show: true,
+            },
+            emphasis: {
+              focus: "series",
+            },
+            data: date.daynhqfdl,
+          },
+          //曲线
+          {
+            name: "-",
+            data: date.total,
+            markPoint: {
+                data: date2,
+                        },
+            type: "line",
+            symbol: "circle",
+            symbolSize: 20,
+            lineStyle: {
+              color: "#5470C6",
+              width: 4,
+              type: "dashed",
+            },
+            itemStyle: {
+              borderWidth: 3,
+              borderColor: "#EE6666",
+              color: "yellow",
+            },
+          },
+        ],
+      };
+      this.chartLine.setOption(option);
+    },
+  },
+  mounted() {
+    this.$nextTick(() => {
+               
+            //后面的50:根据需求空出的高度,自行调整
+        });
+       
+    this.query_wpid();
+    this.query();
+  },
+};

+ 628 - 0
src/assets/js/benchmarkingSys/projectBenchmark.js

@@ -0,0 +1,628 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      formInline: {
+        windfarm: "",
+        project: "",
+        line: "",
+      },
+      timedate: [
+      ],
+      pj:'',
+      fc:'',
+      isAsc: "asc",
+      beginDate: "2021-01-01",
+      endDate: "2021-01-04",
+      gridData: [],
+      multipleSelection: [],
+      sortInOrder: [],
+      sortInOrderTop: [],
+      sortInOrde2: [],
+      getTableData: [],
+      sortInOrderTop2: [],
+      pjName1: "",
+      pjName2: "",
+      currentPage2: 1,
+      pagesize: 10,
+      fdcLineData: [],
+      wpIdslist:{
+        name:"",
+        id:"",
+      },
+      projectlist:{
+        name:"",
+        id:"",
+      },
+      options: [
+        {
+          value: "MHS_FDC",
+          label: "麻黄山风电场",
+        },
+        {
+          value: "NSS_FDC",
+          label: "牛首山风电场",
+        },
+        {
+          value: "SBQ_FDC",
+          label: "石板泉风电场",
+        },
+        {
+          value: "QS_FDC",
+          label: "青山风电场",
+        },
+        {
+          value: "XS_FDC",
+          label: "香山风电场",
+        },
+      ],
+      loading:true,
+      value: "",
+      pjId: [],
+      pjName: [],
+      wtName:[],
+      wtId:[],
+      orderByColumn: "",
+      dialogTableVisible: false,
+      lineDataOption: [],
+      getChartDataValue: [],
+      getChartDataValue2: [],
+      getChartData:[],
+      wp_n_1: {},
+      wp_n_2: {},
+    };
+  },
+  components: {
+  },
+  created() {
+      this.query_wpid();
+    this.FiveLossInformation();
+  },
+  methods: {
+    changeFun(val) {
+      this.selectrowdate = val;
+    },
+    /**
+     * 日期格式化
+     */
+    filter_date(cellValue) {
+      let date = new Date(cellValue.recordDate);
+
+      return this.BASE.getBzDate(date,0);
+    },
+    /**
+     * 查询项目
+     */
+    query_xml(){
+      this.pj = "";
+      this.xl = "";
+      this.API.get("powercompare/projectAjax?wpIds=" + this.fc).then((res) => {
+        this.projectlist = res.data;
+        
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    headStyle() {
+      return "text-align:left";
+    },
+    onSubmit() {
+    },
+    handleClick() {},
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
+    /**
+     * 查询风场
+     */
+    query_wpid() {
+      var newData = new Date();
+       this.timedate[0] = this.BASE.getBzDate(newData.getTime(),-1);
+       this.timedate[1] = this.BASE.getBzDate(newData.getTime(),0);
+      this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.wpIdslist = res.data;
+        
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    queryApData() {
+      this.FiveLossInformation();
+    },
+    /**
+     * 获取表格数据
+     */
+    handleEdit(a, b) {
+      this.pjId = [];
+      this.lineDataOption = [];
+      
+        this.lineDataOption.push({ id: b.pjId, name: b.pjName });
+        this.$router.push({
+          path: "/projectBenchmarkParticulars",
+          query: {
+            pjId: b.pjId,
+            beginDate: this.beginDate,
+            endDate: this.endDate,
+            pjName: b.pjName,
+            select: this.lineDataOption,
+            wtId:b.wpId,
+            wtName:b.wpName,
+          },
+        });
+    },
+    /**
+     * 查询检查
+     */
+    checkwindfarm() {
+      if (this.formInline.windfarm == "") {
+        this.$message.error("请选择风场!");
+        return;
+      }
+    },
+    /**
+     * 格式化
+     */
+    filter_fdl(cellValue){
+             return parseFloat(cellValue.fdl).toFixed(2);
+    },
+    /**
+     * 查询检查
+     */
+    checkproject() {
+      if (this.formInline.project == "") {
+        this.$message.error("请选择项目!");
+        return;
+      }
+      if (new Date(this.timedate) == null) {
+        this.$message.error("请选择时间");
+        return;
+      }
+    },
+    querycheck(){
+      if(this.multipleSelection.length == 2){
+        this.queryApDataMx();
+      }else{
+        this.$message({
+          message:"请选择两个项目!",
+          type:'error'
+        });
+        return
+      }
+    },
+    /**
+     * 控制弹出层
+     */
+    queryApDataMx() {
+      this.dialogTableVisible = true;
+      this.$nextTick(function () {
+        this.ECZM.leida_tc("leiDaTu" , this.sortInOrder,this.pjName1,this.sortInOrderTop,this.pjName2);
+        this.ECZM.bar_tc("leiDaTu2" , this.wp_n_1 , this.wp_n_2 , this.wp_n_1.wpId , this.wp_n_2.wpId);
+      });
+    },
+    /**
+     * 改变数据格式
+     */
+    handleSelectionChange(val) {
+      this.wp_n_1 = {};
+      this.wp_n_2 = {};
+      this.pjName1="";
+      this.pjName2="";
+      this.sortInOrder = [];
+      this.sortInOrderTop = [];
+      this.getTableData = [];
+      this.sortInOrde2 = [];
+      this.multipleSelection = val;
+      if (this.multipleSelection.length == 2) {
+        this.wp_n_1 = this.multipleSelection[0];
+        this.wp_n_2 = this.multipleSelection[1];
+        this.pjName1 = this.multipleSelection[0].pjName;
+        this.pjName2 = this.multipleSelection[1].pjName;
+        this.sortInOrder.push(
+          this.multipleSelection[0].fnlyl,
+          this.multipleSelection[0].xqjsl,
+          this.multipleSelection[0].ztzhjsl,
+          this.multipleSelection[0].fwjsl,
+          this.multipleSelection[0].slssl,
+          this.multipleSelection[0].xnssl,
+          this.multipleSelection[0].qfl,
+          this.multipleSelection[0].jxssl,
+          this.multipleSelection[0].gzssl
+        );
+        this.sortInOrderTop.push(
+          this.multipleSelection[1].fnlyl,
+          this.multipleSelection[1].xqjsl,
+          this.multipleSelection[1].ztzhjsl,
+          this.multipleSelection[1].fwjsl,
+          this.multipleSelection[1].slssl,
+          this.multipleSelection[1].xnssl,
+          this.multipleSelection[1].qfl,
+          this.multipleSelection[1].jxssl,
+          this.multipleSelection[1].gzssl
+        );
+        // for (let i = 0; i < this.multipleSelection.length; i++) {
+        //   this.sortInOrde2.push({
+        //     product: this.multipleSelection[i].pjName,
+        //     "限电损失电量单位:万KWh": this.multipleSelection[i].xdss,
+        //     "故障损失电量单位:万KWh": this.multipleSelection[i].gzss,
+        //     "检修损失电量单位:万KWh": this.multipleSelection[i].jxssl,
+        //     "性能损失电量单位:万KWh": this.multipleSelection[i].xnssl,
+        //     "受累损失电量单位:万KWh": this.multipleSelection[i].slss,
+        //   });
+        // }
+        this.getTableData.push({
+          index: "发电量",
+          data1: this.multipleSelection[0].fdl,
+          data2: this.multipleSelection[1].fdl,
+        });
+        this.getTableData.push({
+          index: "故障损失电量",
+          data1: this.multipleSelection[0].gzss,
+          data2: this.multipleSelection[1].gzss,
+        });
+        this.getTableData.push({
+          index: "检修损失电量",
+          data1: this.multipleSelection[0].jxssl,
+          data2: this.multipleSelection[1].jxssl,
+        });
+        this.getTableData.push({
+          index: "性能未达标损失电量",
+          data1: this.multipleSelection[0].xnsslfraction,
+          data2: this.multipleSelection[1].xnsslfraction,
+        });
+        this.getTableData.push({
+          index: "受累损失电量",
+          data1: this.multipleSelection[0].slss,
+          data2: this.multipleSelection[1].slss,
+        });
+        this.getTableData.push({
+          index: "风能利用率",
+          data1: this.multipleSelection[0].fnlyl,
+          data2: this.multipleSelection[1].fnlyl,
+        });
+        this.getTableData.push({
+          index: "故障损失率",
+          data1: this.multipleSelection[0].gzssl,
+          data2: this.multipleSelection[1].gzssl,
+        });
+        this.getTableData.push({
+          index: "检修损失率",
+          data1: this.multipleSelection[0].jxssl,
+          data2: this.multipleSelection[1].jxssl,
+        });
+        this.getTableData.push({
+          index: "弃风率",
+          data1: this.multipleSelection[0].qfl,
+          data2: this.multipleSelection[1].qfl,
+        });
+        this.getTableData.push({
+          index: "性能损失率",
+          data1: this.multipleSelection[0].xnssl,
+          data2: this.multipleSelection[1].xnssl,
+        });
+        this.getTableData.push({
+          index: "受累损失率",
+          data1: this.multipleSelection[0].slssl,
+          data2: this.multipleSelection[1].slssl,
+        });
+        this.getTableData.push({
+          index: "复位及时率",
+          data1: this.multipleSelection[0].fwjsl,
+          data2: this.multipleSelection[1].fwjsl,
+        });
+        this.getTableData.push({
+          index: "消缺及时率",
+          data1: this.multipleSelection[0].xqjsl,
+          data2: this.multipleSelection[1].xqjsl,
+        });
+        this.getTableData.push({
+          index: "状态转换率",
+          data1: this.multipleSelection[0].ztzhjsl,
+          data2: this.multipleSelection[1].ztzhjsl,
+        });
+      }
+    },
+    handleCurrentChange(val) {
+    },
+    /**
+     * 分页功能
+     */
+    handleSizeChange(val) {
+      this.pagesize = val;
+    },
+    changeTableSort(column) {
+      this.orderByColumn = column.prop;
+      if (column.order == "descending") {
+        this.isAsc = "desc";
+      } else if (column.order == "ascending") {
+        this.isAsc = "asc";
+      }
+      this.FiveLossInformation();
+    },
+    /**
+     * 获取数据
+     */
+    FiveLossInformation() {
+      let that = this;
+      this.API.get("/powercompare/windfarmAjax").then((res) => {
+        that.options = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+      if (this.timedate == "") {
+        this.timedate[0] = "2021-01-01";
+        this.timedate[1] = "2021-01-04";
+        this.beginDate = this.timedate[0];
+        this.endDate = this.timedate[1];
+      } else {
+        this.beginDate = this.timedate[0];
+        this.endDate = this.timedate[1];
+      }
+      var fiveLossData = new URLSearchParams();
+      fiveLossData.append("wpId", this.fc);
+      fiveLossData.append("beginDate", this.beginDate);
+      fiveLossData.append("endDate", this.endDate);
+      fiveLossData.append("pjId", this.pj);
+      this.API
+        .post("/contrast/benchmarkPjList", fiveLossData)
+        .then((res) => {
+          that.gridData = res.data;
+          that.loading=false;
+          that.getPackageData(that.gridData);
+          that.getPackageData2(that.gridData);
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    drawPie2() {
+      var charts2;
+      if (charts2 != null && charts2 != "" && charts2 != undefined) {
+        charts2.dispose();
+      }
+      charts2 = echarts.init(document.getElementById("leiDaTu2"));
+      let option2 = {
+        legend: {
+          orient: "vertical",
+          left: "right",
+        },
+        tooltip: {},
+        dataset: {
+          dimensions: [
+            "product",
+            "限电损失电量单位:万KWh",
+            "故障损失电量单位:万KWh",
+            "检修损失电量单位:万KWh",
+            "性能损失电量单位:万KWh",
+            "受累损失电量单位:万KWh",
+          ],
+          source: this.sortInOrde2,
+        },
+        xAxis: { type: "category" },
+        yAxis: {},
+        // Declare several bar series, each will be mapped
+        // to a column of dataset.source by default.
+        series: [
+          {
+            // barGap:'100%',/*多个并排柱子设置柱子之间的间距*/
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#D201D8",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#FD0100",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#FF7B16",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#8085E9",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#A6A6A6",
+              },
+            },
+          },
+        ],
+      };
+      charts2.clear();
+      charts2.setOption(option2);
+    },
+    toExcel() {},
+    getPackageData(gridData) {
+      for (let i = 0; i < gridData.length; i++) {
+        this.getChartDataValue.push({
+          value: gridData[i].fdl,
+          name: gridData[i].pjName,
+        });
+        this.getChartDataValue2.push({
+          value: gridData[i].gzss,
+          name: gridData[i].pjName,
+        });
+      }
+      this.getChartDataImport();
+      this.getChartDataValue = [];
+      this.getChartDataValue2 = [];
+    },
+    getChartDataImport() {
+      var charts = echarts.init(document.getElementById("chartPie"));
+      let option = {
+        title: {
+          text: "发电量占比",
+          left: "center",
+        },
+        color: ["#90ED7D", "#F7A35C", "#7CB5EC", "#434348", "#8085E9"],
+        tooltip: {
+          trigger: "item",
+        },
+        legend: {
+          orient: "vertical",
+          left: "left",
+        },
+        series: [
+          {
+            type: "pie",
+            radius: "50%",
+            data: this.getChartDataValue,
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: "rgba(0, 0, 0, 0.5)",
+              },
+            },
+          },
+        ],
+      };
+      charts.setOption(option);
+
+      var charts2 = echarts.init(document.getElementById("chartPieRight"));
+      let option2 = {
+        title: {
+          text: "损失电量占比",
+          left: "center",
+        },
+        color: ["#90ED7D", "#F7A35C", "#7CB5EC", "#434348", "#8085E9"],
+        tooltip: {
+          trigger: "item",
+        },
+        legend: {
+          orient: "vertical",
+          left: "left",
+        },
+        series: [
+          {
+            type: "pie",
+            radius: "50%",
+            data: this.getChartDataValue2,
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: "rgba(0, 0, 0, 0.5)",
+              },
+            },
+          },
+        ],
+      };
+      charts2.setOption(option2);
+    },
+    getPackageData2(gridData){
+            this.getChartData = [];
+            for(let i=0;i<gridData.length;i++){
+                this.getChartData.push({product:gridData[i].pjName,'限电损失电量单位:万KWh':gridData[i].xdss,
+                '故障损失电量单位:万KWh':gridData[i].gzss,'检修损失电量单位:万KWh':gridData[i].jxssl,
+                '性能损失电量单位:万KWh':gridData[i].xnssl,'受累损失电量单位:万KWh':gridData[i].slss})
+            }
+            this.getChartDataImport2();
+        },
+    getChartDataImport2(){
+            var charts =echarts.init(document.getElementById("chartHistogram"));
+            let option = {
+            title: {
+                text: '损失电量分析',
+                left: 'center'
+            },
+            legend: {
+                orient: 'vertical',
+                left: 'right'
+            },
+            tooltip: {},
+            dataset: {
+                 dimensions: ['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'],
+                 source: this.getChartData
+            },
+            xAxis: {type: 'category'},
+            yAxis: {},
+            // Declare several bar series, each will be mapped
+            // to a column of dataset.source by default.
+            series: [
+                {
+                    // barGap:'100%',/*多个并排柱子设置柱子之间的间距*/
+                    type: 'bar',
+                    barWidth : 30,
+                    itemStyle:{
+                        normal:{
+                            color:'#D201D8'
+                        }
+                    }
+                },
+                {
+                    
+                    type: 'bar',
+                    barWidth : 30,
+                    itemStyle:{
+                        normal:{
+                            color:'#FD0100'
+                        }
+                    }
+                },
+                {
+                    
+                    type: 'bar',
+                    barWidth : 30,
+                    itemStyle:{
+                        normal:{
+                            color:'#FF7B16'
+                        }
+                    }
+                },
+                {
+                    
+                    type: 'bar',
+                    barWidth : 30,
+                    itemStyle:{
+                        normal:{
+                            color:'#8085E9'
+                        }
+                    }
+                },
+                {
+                    
+                    type: 'bar',
+                    barWidth : 30,
+                    itemStyle:{
+                        normal:{
+                            color:'#A6A6A6'
+                        }
+                    }
+                },
+                
+            ]
+        };
+        charts.setOption(option);
+        },
+    mounted() {
+            this.query_wpid();
+    },
+  },
+};

+ 507 - 0
src/assets/js/benchmarkingSys/projectBenchmarkParticulars.js

@@ -0,0 +1,507 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      tb2: false,
+      options: [],
+      loading:true,
+      loading2:true,
+      fc: "",
+      fc2: "",
+      pj: "",
+      pj2: "",
+      timedate: [],
+      multipleSelection: [],
+      multipleSelection1: [],
+      multipleSelection2: [],
+      orderByColumn: "",
+      isAsc: "asc",
+      fdcLineData: [],
+      fdcLineData2: [],
+      currentPage2: 1,
+      pagesize: 10,
+      wpId: "",
+      pjId: "",
+      beginDate: "",
+      endDate: "",
+      dialogTableVisible: false,
+      sortInOrder: [],
+      sortInOrderTop: [],
+      pjName1: "",
+      pjName2: "",
+      sortInOrde2: [],
+      getTableData: [],
+      fdcND: [],
+      fdcND1: "",
+      fdcND2: "",
+      wpIdslist: {
+        name: "",
+        id: "",
+      },
+      projectlist: {
+        name: "",
+        id: "",
+      },
+      projectlist2: {
+        name: "",
+        id: "",
+      },
+      wp_n_1: {},
+      wp_n_2: {},
+    };
+  },
+  filters: {
+    rounding(fc) {
+      return fc.toFixed(2);
+    },
+  },
+  created() {
+    this.timedate = [];
+    this.timedate.push(this.$route.query.beginDate,this.$route.query.endDate);
+    this.fc = this.$route.query.wtId;
+    this.pj = this.$route.query.pjId;
+    this.query_wpid();
+    this.query_xml();
+    this.YardTableData();
+  },
+  methods: {
+    /**
+     * 查询项目对标列表信息
+     */
+    queryApData() {
+      this.YardTableData();
+      if (this.fc2 != null || this.fc2 != undefined) {
+        this.tb2 = true;
+        if (this.timedate == "") {
+          this.beginDate = this.$route.query.beginDate;
+          this.endDate = this.$route.query.endDate;
+        } else {
+          this.beginDate = this.timedate[0];
+          this.endDate = this.timedate[1];
+        }
+        var guilty = new URLSearchParams();
+        guilty.append("pageNum", this.currentPage2);
+        guilty.append("pageSize", this.pagesize);
+        guilty.append("orderByColumn", this.orderByColumn);
+        guilty.append("isAsc", this.isAsc);
+        guilty.append("wpId", this.fc2);
+        guilty.append("pjId", this.pj2);
+        guilty.append("beginDate", this.beginDate);
+        guilty.append("endDate", this.endDate);
+        this.API.post("/contrast/benchmarkPjList", guilty).then((res) => {
+          this.fdcLineData2 = res.data;
+          this.loading2=false;
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+      }
+    },
+    /**
+     * 
+     * 查询检查
+     */
+    querycheck(){
+      if(this.multipleSelection1.length + this.multipleSelection2.length ==2){
+        this.queryApDataMx();
+      }else{
+        this.$message({
+          message:"请选择两个项目!",
+          type:'error'
+        });
+        return
+      }
+    },
+    /**
+     * 数据格式转换
+     */
+    queryApDataMx() {
+       this.dialogTableVisible = true;
+       this.wp_n_1 = {};
+       this.wp_n_2 = {};
+        this.multipleSelection = this.multipleSelection1.concat(this.multipleSelection2);
+        this.wp_n_1 = this.multipleSelection[0];
+        this.wp_n_2 = this.multipleSelection[1];
+        this.pjName1 = this.multipleSelection[0].pjName;
+        this.pjName2 = this.multipleSelection[1].pjName;
+        this.fdcND1 =
+          this.multipleSelection[0].pjName +
+          "" +
+          this.BASE.getBzDate(new Date(this.multipleSelection[0].recordDate),0);
+        this.fdcND2 =
+          this.multipleSelection[1].pjName +
+          "" +
+          this.BASE.getBzDate(new Date(this.multipleSelection[1].recordDate),0);
+        this.fdcND.push(this.fdcND1, this.fdcND2);
+        this.sortInOrder.push(
+          this.multipleSelection[0].fnlyl,
+          this.multipleSelection[0].xqjsl,
+          this.multipleSelection[0].ztzhjsl,
+          this.multipleSelection[0].fwjsl,
+          this.multipleSelection[0].slssl,
+          this.multipleSelection[0].xnssl,
+          this.multipleSelection[0].qfl,
+          this.multipleSelection[0].jxssl,
+          this.multipleSelection[0].gzssl
+        );
+        this.sortInOrderTop.push(
+          this.multipleSelection[1].fnlyl,
+          this.multipleSelection[1].xqjsl,
+          this.multipleSelection[1].ztzhjsl,
+          this.multipleSelection[1].fwjsl,
+          this.multipleSelection[1].slssl,
+          this.multipleSelection[1].xnssl,
+          this.multipleSelection[1].qfl,
+          this.multipleSelection[1].jxssl,
+          this.multipleSelection[1].gzssl
+        );
+        // for (let i = 0; i < this.multipleSelection.length; i++) {
+        //   this.sortInOrde2.push({
+        //     product: this.multipleSelection[i].pjName,
+        //     "限电损失电量单位:万KWh": this.multipleSelection[i].xdss,
+        //     "故障损失电量单位:万KWh": this.multipleSelection[i].gzss,
+        //     "检修损失电量单位:万KWh": this.multipleSelection[i].jxssl,
+        //     "性能损失电量单位:万KWh": this.multipleSelection[i].xnssl,
+        //     "受累损失电量单位:万KWh": this.multipleSelection[i].slss,
+        //   });
+        // }
+        this.getTableData.push({
+          index: "发电量",
+          data1: this.multipleSelection[0].scadafdl,
+          data2: this.multipleSelection[1].scadafdl,
+        });
+        this.getTableData.push({
+          index: "故障损失电量",
+          data1: this.multipleSelection[0].gzss,
+          data2: this.multipleSelection[1].gzss,
+        });
+        this.getTableData.push({
+          index: "检修损失电量",
+          data1: this.multipleSelection[0].jxssl,
+          data2: this.multipleSelection[1].jxssl,
+        });
+        this.getTableData.push({
+          index: "性能未达标损失电量",
+          data1: this.multipleSelection[0].xnsslfraction,
+          data2: this.multipleSelection[1].xnsslfraction,
+        });
+        this.getTableData.push({
+          index: "受累损失电量",
+          data1: this.multipleSelection[0].slss,
+          data2: this.multipleSelection[1].slss,
+        });
+        this.getTableData.push({
+          index: "风能利用率",
+          data1: this.multipleSelection[0].fnlyl,
+          data2: this.multipleSelection[1].fnlyl,
+        });
+        this.getTableData.push({
+          index: "故障损失率",
+          data1: this.multipleSelection[0].gzssl,
+          data2: this.multipleSelection[1].gzssl,
+        });
+        this.getTableData.push({
+          index: "检修损失率",
+          data1: this.multipleSelection[0].jxssl,
+          data2: this.multipleSelection[1].jxssl,
+        });
+        this.getTableData.push({
+          index: "弃风率",
+          data1: this.multipleSelection[0].qfl,
+          data2: this.multipleSelection[1].qfl,
+        });
+        this.getTableData.push({
+          index: "性能损失率",
+          data1: this.multipleSelection[0].xnssl,
+          data2: this.multipleSelection[1].xnssl,
+        });
+        this.getTableData.push({
+          index: "受累损失率",
+          data1: this.multipleSelection[0].slssl,
+          data2: this.multipleSelection[1].slssl,
+        });
+        this.getTableData.push({
+          index: "复位及时率",
+          data1: this.multipleSelection[0].fwjsl,
+          data2: this.multipleSelection[1].fwjsl,
+        });
+        this.getTableData.push({
+          index: "消缺及时率",
+          data1: this.multipleSelection[0].xqjsl,
+          data2: this.multipleSelection[1].xqjsl,
+        });
+        this.getTableData.push({
+          index: "状态转换率",
+          data1: this.multipleSelection[0].ztzhjsl,
+          data2: this.multipleSelection[1].ztzhjsl,
+        });
+      
+      this.$nextTick(function () {
+        this.ECZM.leida_tc("leiDaTu3" , this.sortInOrder,this.pjName1,this.sortInOrderTop,this.pjName2);
+        this.ECZM.bar_tc("leiDaTu4" , this.wp_n_1 , this.wp_n_2 ,this.wp_n_1.wpId , this.wp_n_2.wpId);
+      });
+    },
+    filter_fdl(cellValue) {
+      return parseFloat(cellValue.scadafdl).toFixed(2);
+    },
+    /**
+     * 查询项目对标列表信息
+     */
+    YardTableData() {
+      this.API.get("/powercompare/windfarmAjax").then((res) => {
+        this.options = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+      this.wpId = this.$route.query.wpId;
+      this.pjId = this.$route.query.pjId;
+      if (this.timedate == "") {
+        this.beginDate = this.$route.query.beginDate;
+        this.endDate = this.$route.query.endDate;
+      } else {
+        this.beginDate = this.timedate[0];
+        this.endDate = this.timedate[1];
+      }
+      var guilty = new URLSearchParams();
+      guilty.append("pageNum", this.currentPage2);
+      guilty.append("pageSize", this.pagesize);
+      guilty.append("orderByColumn", this.orderByColumn);
+      guilty.append("isAsc", this.isAsc);
+      if (this.fc == "") {
+        guilty.append("wpId", this.wpId);
+      } else {
+        guilty.append("wpId", this.fc);
+      }
+      if (this.pj == "") {
+        guilty.append("wpId", this.pjId);
+      } else {
+        guilty.append("wpId", this.pj);
+      }
+      guilty.append("beginDate", this.beginDate);
+      guilty.append("endDate", this.endDate);
+      this.API.post("/contrast/benchmarkPjList", guilty).then((res) => {
+        this.fdcLineData = res.data;
+        this.loading=false;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    /**
+     * 查询项目
+     */
+    query_xml() {
+      this.pj = "";
+      this.xl = "";
+      this.API
+        .get("powercompare/projectAjax?wpIds=" + this.fc)
+        .then((res) => {
+          this.projectlist = res.data;
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    query_xml2() {
+      this.pj = "";
+      this.xl = "";
+      this.API
+        .get("powercompare/projectAjax?wpIds=" + this.fc2)
+        .then((res) => {
+          this.projectlist2 = res.data;
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    query_wpid() {
+      this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.wpIdslist = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });;
+    },
+    headStyle() {
+      return "text-align:left";
+    },
+    handleSelectionChange(val) {
+      this.sortInOrder = [];
+      this.sortInOrderTop = [];
+      this.getTableData = [];
+      this.sortInOrde2 = [];
+      this.multipleSelection1 = [];
+      this.multipleSelection1 = val;
+    },
+    handleSelectionChange2(val) {
+      this.sortInOrder = [];
+      this.sortInOrderTop = [];
+      this.getTableData = [];
+      this.sortInOrde2 = [];
+      this.multipleSelection2 = [];
+      this.multipleSelection2 = val;
+    },
+    changeTableSort(column) {
+      this.orderByColumn = column.prop;
+      if (column.order == "descending") {
+        this.isAsc = "desc";
+      } else if (column.order == "ascending") {
+        this.isAsc = "asc";
+      }
+      this.YardTableData();
+    },
+    filter_date(cellValue) {
+      let date = new Date(cellValue.recordDate);
+      return this.BASE.getBzDate(date,0);
+    },
+    drawPie() {
+      var charts;
+      if (charts != null && charts != "" && charts != undefined) {
+        charts.dispose();
+      }
+      charts = echarts.init(document.getElementById("leiDaTu3"));
+      let option = {
+        title: {
+          // text: '对标排名分析',
+          left: "center",
+        },
+        tooltip: {},
+        // legend: {
+        //     data: ['预算分配(Allocated Budget)', '实际开销(Actual Spending)'],
+        //     left: 'right'
+        // },
+        radar: {
+          // shape: 'circle',
+          name: {
+            textStyle: {
+              color: "#fff",
+              backgroundColor: "#999",
+              borderRadius: 3,
+              padding: [3, 5],
+            },
+          },
+          indicator: [
+            { name: "风能利用率", max: 150 },
+            { name: "消缺及时率", max: 150 },
+            { name: "状态转换率", max: 150 },
+            { name: "复位及时率", max: 150 },
+            { name: "受累损失率", max: 150 },
+            { name: "性能损失率", max: 150 },
+            { name: "弃风率", max: 150 },
+            { name: "检修损失率", max: 150 },
+            { name: "故障损失率", max: 150 },
+          ],
+        },
+        series: [
+          {
+            name: "预算 vs 开销(Budget vs spending)",
+            type: "radar",
+            // areaStyle: {normal: {}},
+            data: [
+              {
+                value: this.sortInOrder,
+                name: this.pjName1,
+              },
+              {
+                value: this.sortInOrderTop,
+                name: this.pjName2,
+              },
+            ],
+          },
+        ],
+      };
+      charts.clear();
+      charts.setOption(option);
+    },
+    drawPie2() {
+      var charts2;
+      if (charts2 != null && charts2 != "" && charts2 != undefined) {
+        charts2.dispose();
+      }
+      charts2 = echarts.init(document.getElementById("leiDaTu4"));
+      let option2 = {
+        legend: {
+          orient: "vertical",
+          left: "right",
+        },
+        tooltip: {},
+        dataset: {
+          dimensions: [
+            "product",
+            "限电损失电量单位:万KWh",
+            "故障损失电量单位:万KWh",
+            "检修损失电量单位:万KWh",
+            "性能损失电量单位:万KWh",
+            "受累损失电量单位:万KWh",
+          ],
+          source: this.sortInOrde2,
+        },
+        xAxis: {
+          type: "category",
+          date: this.fdcND,
+          axisPointer: {
+            type: "shadow",
+          },
+        },
+        yAxis: { type: "category" },
+        series: [
+          {
+            // barGap:'100%',/*多个并排柱子设置柱子之间的间距*/
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#D201D8",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#FD0100",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#FF7B16",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#8085E9",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#A6A6A6",
+              },
+            },
+          },
+        ],
+      };
+      charts2.clear();
+      charts2.setOption(option2);
+    },
+    /**
+     * 返回按钮
+     */
+    goReturn() {
+      this.$router.push("/projectBenchmark");
+    },
+    toExcel() {},
+  },
+};

+ 443 - 0
src/assets/js/benchmarkingSys/propertBenchmark.js

@@ -0,0 +1,443 @@
+import * as echarts from "echarts";
+//import FiveLossRatesHistogramChart from "../../views/benchMarking/FiveLossRatesHistogramChart.vue";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      formInline: {
+        windfarm: "",
+        project: "",
+        line: "",
+      },
+      timedate: [],
+      isAsc: "asc",
+      beginDate: "",
+      endDate: "",
+      gridData: [],
+      multipleSelection: [],
+      sortInOrder: [],
+      sortInOrderTop: [],
+      sortInOrde2: [],
+      getTableData: [],
+      sortInOrderTop2: [],
+      fdcName1: "",
+      fdcName2: "",
+      wp_n_1: {},
+      wp_n_2: {},
+      currentPage2: 1,
+      pagesize: 10,
+      classification: [
+        {
+          id: "qf",
+          label: "弃风率",
+        },
+        {
+          id: "gz",
+          label: "故障损失率",
+        },
+        {
+          id: "jx",
+          label: "检修损失率",
+        },
+        {
+          id: "xn",
+          label: "性能损失率",
+        },
+        {
+          id: "sl",
+          label: "受累损失率",
+        },
+      ],
+      options: [
+        {
+          value: "MHS_FDC",
+          label: "麻黄山风电场",
+        },
+        {
+          value: "NSS_FDC",
+          label: "牛首山风电场",
+        },
+        {
+          value: "SBQ_FDC",
+          label: "石板泉风电场",
+        },
+        {
+          value: "QS_FDC",
+          label: "青山风电场",
+        },
+        {
+          value: "XS_FDC",
+          label: "香山风电场",
+        },
+      ],
+      value: "",
+      value2: "gz",
+      wpId: [],
+      wpName: [],
+      orderByColumn: "",
+      dialogTableVisible: false,
+      lineDataOption: [],
+      getChartDataValue: [],
+      getChartDataValue2: [],
+      chartsAName2: "",
+      selectrowdate: {},
+    };
+  },
+//   components: {
+//     FiveLossRatesHistogramChart: FiveLossRatesHistogramChart,
+//   },
+  created() {
+    this.FiveLossInformation();
+  },
+  methods: {
+    headStyle() {
+      return "text-align:center";
+    },
+    onSubmit() {
+    },
+    handleClick() {},
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
+    queryApData() {
+      this.FiveLossInformation();
+    },
+    /**
+     * 
+     * 检查是否选择两个项目
+     */
+    querycheck(){
+      if(this.selectrowdate.length == 2){
+        this.queryApDataMx();
+      }else{
+        this.$message({
+          message:"请选择两个项目!",
+          type:'error'
+        });
+        return
+      }
+    },
+    /**
+     * 获取表格数据
+     */
+    handleEdit(a, b) {
+      this.wpId = [];
+      this.lineDataOption = [];
+        this.lineDataOption.push({ id: b.wpId, name: b.wpName });
+        this.$router.push({
+          path: "/propertBenchmarkParticulars",
+          query: {
+            wpId: b.wpId,
+            beginDate: this.beginDate,
+            endDate: this.endDate,
+            wpName: b.wpName,
+            select: this.lineDataOption,
+          },
+        });
+    },
+    /**
+     * 查询检查
+     */
+    checkwindfarm() {
+      if (this.formInline.windfarm == "") {
+        this.$message.error("请选择风场!");
+        return;
+      }
+    },
+    checkproject() {
+      if (this.formInline.project == "") {
+        this.$message.error("请选择项目!");
+        return;
+      }
+      if (new Date(this.timedate) == null) {
+        this.$message.error("请选择时间");
+        return;
+      }
+    },
+    /**
+     * 弹出控制
+     */
+    queryApDataMx() {
+      this.dialogTableVisible = true;
+      this.check_wpid();
+      this.$nextTick(function () {
+      this.ECZM.bar_tc("leiDaTu8" , this.wp_n_1 , this.wp_n_2 , this.wp_n_1.wpId , this.wp_n_2.wpId);
+      this.ECZM.leida_tc("leiDatu6" , this.sortInOrder,this.fdcName1,this.sortInOrderTop,this.fdcName2);
+      });
+    },
+    handleSelectionChange(val) {
+      this.selectrowdate = val;
+    },
+    /**
+     * 数据转换
+     */
+     check_wpid() {
+      this.wp_n_1 = {};
+      this.wp_n_2 = {};
+      this.sortInOrder = [];
+      this.sortInOrderTop = [];
+      this.getTableData = [];
+      this.sortInOrde2 = [];
+      this.fdcName1 = "";
+      this.fdcName2 = "";
+     
+        this.wp_n_1 = this.selectrowdate[0];
+        this.wp_n_2 = this.selectrowdate[1];
+        this.fdcName1 = this.selectrowdate[0].wpName;
+        this.fdcName2 = this.selectrowdate[1].wpName;
+        this.sortInOrder.push(
+          this.selectrowdate[0].fnlyl,
+          this.selectrowdate[0].xqjsl,
+          this.selectrowdate[0].ztzhjsl,
+          this.selectrowdate[0].fwjsl,
+          this.selectrowdate[0].slssl,
+          this.selectrowdate[0].xnssl,
+          this.selectrowdate[0].qfl,
+          this.selectrowdate[0].jxssl,
+          this.selectrowdate[0].gzssl
+        );
+        this.sortInOrderTop.push(
+          this.selectrowdate[1].fnlyl,
+          this.selectrowdate[1].xqjsl,
+          this.selectrowdate[1].ztzhjsl,
+          this.selectrowdate[1].fwjsl,
+          this.selectrowdate[1].slssl,
+          this.selectrowdate[1].xnssl,
+          this.selectrowdate[1].qfl,
+          this.selectrowdate[1].jxssl,
+          this.selectrowdate[1].gzssl
+        );
+        this.getTableData.push({
+          index: "发电量",
+          data1: this.selectrowdate[0].fdl,
+          data2: this.selectrowdate[1].fdl,
+        });
+        this.getTableData.push({
+          index: "故障损失电量",
+          data1: this.selectrowdate[0].gzss,
+          data2: this.selectrowdate[1].gzss,
+        });
+        this.getTableData.push({
+          index: "检修损失电量",
+          data1: this.selectrowdate[0].jxssl,
+          data2: this.selectrowdate[1].jxssl,
+        });
+        this.getTableData.push({
+          index: "性能未达标损失电量",
+          data1: this.selectrowdate[0].xnsslfraction,
+          data2: this.selectrowdate[1].xnsslfraction,
+        });
+        this.getTableData.push({
+          index: "受累损失电量",
+          data1: this.selectrowdate[0].slss,
+          data2: this.selectrowdate[1].slss,
+        });
+        this.getTableData.push({
+          index: "风能利用率",
+          data1: this.selectrowdate[0].fnlyl,
+          data2: this.selectrowdate[1].fnlyl,
+        });
+        this.getTableData.push({
+          index: "故障损失率",
+          data1: this.selectrowdate[0].gzssl,
+          data2: this.selectrowdate[1].gzssl,
+        });
+        this.getTableData.push({
+          index: "检修损失率",
+          data1: this.selectrowdate[0].jxssl,
+          data2: this.selectrowdate[1].jxssl,
+        });
+        this.getTableData.push({
+          index: "弃风率",
+          data1: this.selectrowdate[0].qfl,
+          data2: this.selectrowdate[1].qfl,
+        });
+        this.getTableData.push({
+          index: "性能损失率",
+          data1: this.selectrowdate[0].xnssl,
+          data2: this.selectrowdate[1].xnssl,
+        });
+        this.getTableData.push({
+          index: "受累损失率",
+          data1: this.selectrowdate[0].slssl,
+          data2: this.selectrowdate[1].slssl,
+        });
+        this.getTableData.push({
+          index: "复位及时率",
+          data1: this.selectrowdate[0].fwjsl,
+          data2: this.selectrowdate[1].fwjsl,
+        });
+        this.getTableData.push({
+          index: "消缺及时率",
+          data1: this.selectrowdate[0].xqjsl,
+          data2: this.selectrowdate[1].xqjsl,
+        });
+        this.getTableData.push({
+          index: "状态转换率",
+          data1: this.selectrowdate[0].ztzhjsl,
+          data2: this.selectrowdate[1].ztzhjsl,
+        });
+    },
+    handleSizeChange(val) {
+      this.pagesize = val;
+    },
+    changeTableSort(column) {
+      this.orderByColumn = column.prop;
+      if (column.order == "descending") {
+        this.isAsc = "desc";
+      } else if (column.order == "ascending") {
+        this.isAsc = "asc";
+      }
+      this.FiveLossInformation();
+    },
+    /**
+     * 查询风机列表信息
+     */
+    FiveLossInformation() {
+      var newData = new Date();
+       this.timedate[0] = this.BASE.getBzDate(newData.getTime(),-1);
+       this.timedate[1] = this.BASE.getBzDate(newData.getTime(),0);
+      let that = this;
+      this.API.get("/powercompare/windfarmAjax").then((res) => {
+        that.options = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+      if (this.timedate == "") {
+        this.beginDate = this.timedate[0];
+        this.endDate = this.timedate[1];
+      } else {
+        this.beginDate = this.timedate[0];
+        this.endDate = this.timedate[1];
+      }
+      var fiveLossData = new URLSearchParams();
+      fiveLossData.append("pageNum", this.currentPage2);
+      fiveLossData.append("pageSize", this.pagesize);
+      fiveLossData.append("orderByColumn", this.orderByColumn);
+      fiveLossData.append("isAsc", this.isAsc);
+      fiveLossData.append("wpId", this.value);
+      fiveLossData.append("beginDate", this.beginDate);
+      fiveLossData.append("endDate", this.endDate);
+      this.API
+        .post("/contrast/benchmarkLossList", fiveLossData)
+        .then((res) => {
+          that.gridData = res.data;
+          that.getPackageData(that.gridData, that.value2);
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    getPackageData(gridData, value2) {
+      for (let i = 0; i < gridData.length; i++) {
+        this.getChartDataValue.push({
+          value: gridData[i].fdl,
+          name: gridData[i].wpName,
+        });
+        if (value2 == "gz") {
+          this.chartsAName2 = "故障损失占比";
+          this.getChartDataValue2.push({
+            value: gridData[i].gzss,
+            name: gridData[i].wpName,
+          });
+        } else if (value2 == "xn") {
+          this.chartsAName2 = "性能损失占比";
+          this.getChartDataValue2.push({
+            value: gridData[i].qfss,
+            name: gridData[i].wpName,
+          });
+        } else if (value2 == "qf") {
+          this.chartsAName2 = "弃风率占比";
+          this.getChartDataValue2.push({
+            value: gridData[i].qfl,
+            name: gridData[i].wpName,
+          });
+        } else if (value2 == "jx") {
+          this.chartsAName2 = "检修损失占比";
+          this.getChartDataValue2.push({
+            value: gridData[i].whss,
+            name: gridData[i].wpName,
+          });
+        } else if (value2 == "sl") {
+          this.chartsAName2 = "受累损失占比";
+          this.getChartDataValue2.push({
+            value: gridData[i].slss,
+            name: gridData[i].wpName,
+          });
+        }
+      }
+      this.getChartDataImport();
+      this.getChartDataValue = [];
+      this.getChartDataValue2 = [];
+    },
+    /**
+     * 判断当前分类
+     */
+    getChartDataImport() {
+      var charts = echarts.init(document.getElementById("chartPie"));
+      let option = {
+        title: {
+          text: "发电量占比",
+          left: "center",
+        },
+        color: ["#90ED7D", "#F7A35C", "#7CB5EC", "#434348", "#8085E9"],
+        tooltip: {
+          trigger: "item",
+        },
+        legend: {
+          orient: "vertical",
+          left: "left",
+        },
+        series: [
+          {
+            type: "pie",
+            radius: "50%",
+            data: this.getChartDataValue,
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: "rgba(0, 0, 0, 0.5)",
+              },
+            },
+          },
+        ],
+      };
+      charts.setOption(option);
+
+      var charts2 = echarts.init(document.getElementById("chartPieRight"));
+      let option2 = {
+        title: {
+          text: this.chartsAName2,
+          left: "center",
+        },
+        color: ["#90ED7D", "#F7A35C", "#7CB5EC", "#434348", "#8085E9"],
+        tooltip: {
+          trigger: "item",
+        },
+        legend: {
+          orient: "vertical",
+          left: "left",
+        },
+        series: [
+          {
+            type: "pie",
+            radius: "50%",
+            data: this.getChartDataValue2,
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: "rgba(0, 0, 0, 0.5)",
+              },
+            },
+          },
+        ],
+      };
+      charts2.setOption(option2);
+    },
+  },
+};

+ 466 - 0
src/assets/js/benchmarkingSys/propertBenchmarkParticulars.js

@@ -0,0 +1,466 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      tb2: false,
+      loading:true,
+      loading2:true,
+      tableData: [],
+      options: [],
+      fc: "",
+      fc2: "",
+      pj: "",
+      pj2: "",
+      timedate: [],
+      multipleSelection: [],
+      multipleSelection1: [],
+      multipleSelection2: [],
+      orderByColumn: "",
+      isAsc: "asc",
+      fdcLineData: [],
+      fdcLineData2: [],
+      currentPage2: 1,
+      pagesize: 10,
+      wpId: "",
+      pjId: "",
+      beginDate: "",
+      endDate: "",
+      dialogTableVisible: false,
+      sortInOrder: [],
+      sortInOrderTop: [],
+      pjName1: "",
+      pjName2: "",
+      sortInOrde2: [],
+      getTableData: [],
+      fdcND: [],
+      fdcND1: "",
+      fdcND2: "",
+      wp_n_1: {},
+      wp_n_2: {},
+      wpIdslist: {
+        name: "",
+        id: "",
+      },
+      projectlist: {
+        name: "",
+        id: "",
+      },
+      projectlist2: {
+        name: "",
+        id: "",
+      },
+    };
+  },
+  filters: {
+    rounding(fc) {
+      return fc.toFixed(2);
+    },
+  },
+  created() {
+    this.timedate[0] = this.$route.query.beginDate;
+    this.timedate[1] = this.$route.query.endDate;
+    this.fc = this.$route.query.wpId;
+    this.query_xml();
+    this.query_wpid();
+    this.YardTableData();
+  },
+  methods: {
+    /**
+     * 查询风机列表信息
+     */
+    queryApData() {
+      this.YardTableData();
+      if (this.fc2 != null || this.fc2 != undefined) {
+        this.tb2 = true;
+        if (this.timedate == "") {
+          this.beginDate = this.$route.query.beginDate;
+          this.endDate = this.$route.query.endDate;
+        } else {
+          this.beginDate = this.timedate[0];
+          this.endDate = this.timedate[1];
+        }
+        var guilty = new URLSearchParams();
+        guilty.append("pageNum", this.currentPage2);
+        guilty.append("pageSize", this.pagesize);
+        guilty.append("orderByColumn", this.orderByColumn);
+        guilty.append("isAsc", this.isAsc);
+        guilty.append("wpId", this.fc2);
+        guilty.append("wtId", this.pj2);
+        guilty.append("beginDate", this.beginDate);
+        guilty.append("endDate", this.endDate);
+        this.API.post("/contrast/benchmarkWtList", guilty).then((res) => {
+          this.fdcLineData2 = res.data;
+          this.loading2 = false;
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+      }
+    },
+    /**
+     * 查询检查
+     */
+    querycheck(){
+      if(this.multipleSelection1.length + this.multipleSelection2.length ==2){
+        this.queryApDataMx();
+      }else{
+        this.$message({
+          message:"请选择两个项目!",
+          type:'error'
+        });
+        return
+      }
+    },
+    /**
+     * 判断是否选择两项  改变数据格式
+     */
+    queryApDataMx() {
+      this.dialogTableVisible = true;
+      this.wp_n_1 = {};
+      this.wp_n_2 = {};
+      this.getTableData = [];
+      if (
+        this.multipleSelection1.length + this.multipleSelection2.length ==
+        2
+      ) {
+        this.multipleSelection = this.multipleSelection1.concat(
+          this.multipleSelection2
+        );
+      } else {
+        this.$message.error("请选两个风场!");
+        return;
+      }
+      if (this.multipleSelection.length == 2) {
+        
+        this.wp_n_1 = this.multipleSelection[0];
+        this.wp_n_2 = this.multipleSelection[1];
+        this.pjName1 = this.multipleSelection[0].wtName;
+        this.pjName2 = this.multipleSelection[1].wtName;
+        this.fdcND1 =
+          this.multipleSelection[0].wtName +
+          "" +
+          this.BASE.getBzDate(new Date(this.multipleSelection[0].recordDate),0);
+        this.fdcND2 =
+          this.multipleSelection[1].wtName +
+          "" +
+          this.BASE.getBzDate(new Date(this.multipleSelection[1].recordDate),0);
+        this.fdcND.push(this.fdcND1, this.fdcND2);
+        this.sortInOrder.push(
+          this.multipleSelection[0].fnlyl,
+          this.multipleSelection[0].xqjsl,
+          this.multipleSelection[0].ztzhjsl,
+          this.multipleSelection[0].fwjsl,
+          this.multipleSelection[0].slssl,
+          this.multipleSelection[0].xnssl,
+          this.multipleSelection[0].qfl,
+          this.multipleSelection[0].jxssl,
+          this.multipleSelection[0].gzssl
+        );
+        this.sortInOrderTop.push(
+          this.multipleSelection[1].fnlyl,
+          this.multipleSelection[1].xqjsl,
+          this.multipleSelection[1].ztzhjsl,
+          this.multipleSelection[1].fwjsl,
+          this.multipleSelection[1].slssl,
+          this.multipleSelection[1].xnssl,
+          this.multipleSelection[1].qfl,
+          this.multipleSelection[1].jxssl,
+          this.multipleSelection[1].gzssl
+        );
+        // for (let i = 0; i < this.multipleSelection.length; i++) {
+        //   this.sortInOrde2.push({
+        //     product: this.multipleSelection[i].wtName+" "+this.BASE.getBzDate(this.multipleSelection[i].recordDate,0),
+        //     "限电损失电量单位:万KWh": this.multipleSelection[i].xdss,
+        //     "故障损失电量单位:万KWh": this.multipleSelection[i].gzss,
+        //     "检修损失电量单位:万KWh": this.multipleSelection[i].jxssl,
+        //     "性能损失电量单位:万KWh": this.multipleSelection[i].xnssl,
+        //     "受累损失电量单位:万KWh": this.multipleSelection[i].slss,
+        //   });
+        // }
+        this.getTableData.push({
+          index: "发电量",
+          data1: this.multipleSelection[0].scadafdl,
+          data2: this.multipleSelection[1].scadafdl,
+        });
+        this.getTableData.push({
+          index: "故障损失电量",
+          data1: this.multipleSelection[0].gzss,
+          data2: this.multipleSelection[1].gzss,
+        });
+        this.getTableData.push({
+          index: "检修损失电量",
+          data1: this.multipleSelection[0].jxssl,
+          data2: this.multipleSelection[1].jxssl,
+        });
+        this.getTableData.push({
+          index: "性能未达标损失电量",
+          data1: this.multipleSelection[0].xnsslfraction,
+          data2: this.multipleSelection[1].xnsslfraction,
+        });
+        this.getTableData.push({
+          index: "受累损失电量",
+          data1: this.multipleSelection[0].slss,
+          data2: this.multipleSelection[1].slss,
+        });
+        this.getTableData.push({
+          index: "风能利用率",
+          data1: this.multipleSelection[0].fnlyl,
+          data2: this.multipleSelection[1].fnlyl,
+        });
+        this.getTableData.push({
+          index: "故障损失率",
+          data1: this.multipleSelection[0].gzssl,
+          data2: this.multipleSelection[1].gzssl,
+        });
+        this.getTableData.push({
+          index: "检修损失率",
+          data1: this.multipleSelection[0].jxssl,
+          data2: this.multipleSelection[1].jxssl,
+        });
+        this.getTableData.push({
+          index: "弃风率",
+          data1: this.multipleSelection[0].qfl,
+          data2: this.multipleSelection[1].qfl,
+        });
+        this.getTableData.push({
+          index: "性能损失率",
+          data1: this.multipleSelection[0].xnssl,
+          data2: this.multipleSelection[1].xnssl,
+        });
+        this.getTableData.push({
+          index: "受累损失率",
+          data1: this.multipleSelection[0].slssl,
+          data2: this.multipleSelection[1].slssl,
+        });
+        this.getTableData.push({
+          index: "复位及时率",
+          data1: this.multipleSelection[0].fwjsl,
+          data2: this.multipleSelection[1].fwjsl,
+        });
+        this.getTableData.push({
+          index: "消缺及时率",
+          data1: this.multipleSelection[0].xqjsl,
+          data2: this.multipleSelection[1].xqjsl,
+        });
+        this.getTableData.push({
+          index: "状态转换率",
+          data1: this.multipleSelection[0].ztzhjsl,
+          data2: this.multipleSelection[1].ztzhjsl,
+        });
+      }
+      this.$nextTick(function () {
+        this.ECZM.leida_tc("leiDaTu3" , this.sortInOrder,this.pjName1,this.sortInOrderTop,this.pjName2);
+        this.ECZM.bar_tc("leiDaTu4" , this.wp_n_1 , this.wp_n_2 ,this.wp_n_1.wtId , this.wp_n_2.wtId);
+      
+      });
+    },
+    /**
+     * 保留两位小数
+     */
+    filter_fdl(cellValue) {
+      return parseFloat(cellValue.scadafdl).toFixed(2);
+    },
+    /**
+     * 查询风机列表信息
+     */
+    YardTableData() {
+      this.API.get("/powercompare/windfarmAjax").then((res) => {
+        this.options = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+      this.wpId = this.$route.query.wpId;
+      if (this.timedate == "") {
+        this.beginDate = this.$route.query.beginDate;
+        this.endDate = this.$route.query.endDate;
+      } else {
+        this.beginDate = this.timedate[0];
+        this.endDate = this.timedate[1];
+      }
+      var guilty = new URLSearchParams();
+      guilty.append("pageNum", this.currentPage2);
+      guilty.append("pageSize", this.pagesize);
+      guilty.append("orderByColumn", this.orderByColumn);
+      guilty.append("isAsc", this.isAsc);
+      if (this.fc == "") {
+        guilty.append("wpId", this.wpId);
+      } else {
+        guilty.append("wpId", this.fc);
+      }
+      if (this.pj == "") {
+        guilty.append("wtId", this.pjId);
+      } else {
+        guilty.append("wtId", this.pj);
+      }
+      guilty.append("beginDate", this.beginDate);
+      guilty.append("endDate", this.endDate);
+      this.API.post("/contrast/benchmarkWtList", guilty).then((res) => {
+        this.fdcLineData = res.data;
+        this.loading = false;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    /**
+     * 获取项目
+     */
+    query_xml() {
+      this.pj = "";
+      this.xl = "";
+      this.pj2 = "";
+      this.xl2 = "";
+      this.API
+        .get("powercompare/windturbineAjax?wpId=" + this.fc)
+        .then((res) => {
+          this.projectlist = res.data;
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    query_xml2() {
+      this.pj = "";
+      this.xl = "";
+      this.API
+        .get("powercompare/windturbineAjax?wpId=" + this.fc2)
+        .then((res) => {
+          this.projectlist2 = res.data;
+        });
+    },
+    /**
+     * 查询风场
+     */
+    query_wpid() {
+      this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.wpIdslist = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    headStyle() {
+      return "text-align:left";
+    },
+    handleSelectionChange(val) {
+      this.sortInOrder = [];
+      this.sortInOrderTop = [];
+      this.getTableData = [];
+      this.sortInOrde2 = [];
+      this.multipleSelection1 = [];
+      this.multipleSelection1 = val;
+    },
+    handleSelectionChange2(val) {
+      this.sortInOrder = [];
+      this.sortInOrderTop = [];
+      this.getTableData = [];
+      this.sortInOrde2 = [];
+      this.multipleSelection2 = [];
+      this.multipleSelection2 = val;
+    },
+    changeTableSort(column) {
+      this.orderByColumn = column.prop;
+      if (column.order == "descending") {
+        this.isAsc = "desc";
+      } else if (column.order == "ascending") {
+        this.isAsc = "asc";
+      }
+      this.YardTableData();
+    },
+    filter_date(cellValue) {
+      let date = new Date(cellValue.recordDate);
+      return this.BASE.getBzDate(date,0);
+    },
+    drawPie2() {
+      var charts2;
+      if (charts2 != null && charts2 != "" && charts2 != undefined) {
+        charts2.dispose();
+      }
+      charts2 = this.$echarts.init(document.getElementById("leiDaTu4"));
+      let option2 = {
+        legend: {
+          orient: "vertical",
+          left: "right",
+        },
+        tooltip: {},
+        dataset: {
+          dimensions: [
+            "product",
+            "限电损失电量单位:万KWh",
+            "故障损失电量单位:万KWh",
+            "检修损失电量单位:万KWh",
+            "性能损失电量单位:万KWh",
+            "受累损失电量单位:万KWh",
+          ],
+          source: this.sortInOrde2,
+        },
+        xAxis: {
+          type: "category",
+          date: this.fdcND,
+          axisPointer: {
+            type: "shadow",
+          },
+        },
+        yAxis: { type: "category" },
+        series: [
+          {
+            // barGap:'100%',/*多个并排柱子设置柱子之间的间距*/
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#D201D8",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#FD0100",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#FF7B16",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#8085E9",
+              },
+            },
+          },
+          {
+            type: "bar",
+            barWidth: 30,
+            itemStyle: {
+              normal: {
+                color: "#A6A6A6",
+              },
+            },
+          },
+        ],
+      };
+      charts2.clear();
+      charts2.setOption(option2);
+    },
+    /**
+     * 返回
+     */
+    goReturn() {
+      this.$router.push("/benchmark_property");
+    },
+    toExcel() {},
+  },
+};

+ 650 - 0
src/assets/js/benchmarkingSys/singleTransverseBenchmark.js

@@ -0,0 +1,650 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      fj: ["MG01_01"],
+      fc: "MHS_FDC",
+      leida_list: [],
+      Date1: "",
+      leida_list_0: [],
+      leida_list_1: [],
+      leida_list_2: [],
+      leida_list_3: [],
+      leida_list_4: [],
+      tableData: [],
+      tableData_y: [],
+      tableData_n: [],
+      wpIdslist: {
+        name: "",
+        id: "",
+      },
+      jfpl: "",
+      jfpl0: "",
+      jfpl1: "",
+      jfpl2: "",
+      jfpl3: "",
+      jfpl4: "",
+      wtIdslist: {
+        name: "",
+        id: "",
+        key: "",
+      },
+      activeName: "first",
+      compareDayList: {},
+      lineDate: {
+        speed: [],
+        value1: [],
+        value2: [],
+        value3: [],
+        value4: [],
+        value5: [],
+      },
+      lineDate_y: {
+        speed: [],
+        value1: [],
+        value2: [],
+        value3: [],
+        value4: [],
+        value5: [],
+      },
+      lineDate_n: {
+        speed: [],
+        value1: [],
+        value2: [],
+        value3: [],
+        value4: [],
+        value5: [],
+      },
+    };
+  },
+
+  created() {
+    this.Date1 = this.BASE.getBzDate(new Date().getTime(),-1);
+    this.query_wpid();
+  },
+  methods: {
+    clear() {
+      this.fj = [];
+    },
+    /**
+     * 初始化数据 调用查询检查
+     */
+    handleClick() {
+      this.tableData = [];
+      this.tableData_n = [];
+      this.tableData_y = [];
+      this.query_check();
+    },
+    /**
+     * 获取风场
+     */
+    query_wpid() {
+      this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.wpIdslist = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    /**
+     * 清空
+     */
+    query1() {
+      this.clear();
+      this.query();
+    },
+    /**
+     * 查询风场
+     */
+    query() {
+      let that = this;
+      this.API
+        .get("powercompare/windturbineAjax?wpId=" + that.fc)
+        .then((res) => {
+          this.wtIdslist = res.data;
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    /**
+     * 查询检查
+     */
+    query_check() {
+      if (
+        this.fc == null ||
+        this.fc == undefined ||
+        this.fc == "" ||
+        this.fj == null ||
+        this.fj == undefined ||
+        this.fj == ""
+      ) {
+        Object.assign(this.$data.lineDate, this.$options.data().lineDate);
+        Object.assign(this.$data.lineDate_y, this.$options.data().lineDate_y);
+        Object.assign(this.$data.lineDate_n, this.$options.data().lineDate_n);
+        this.$message({
+          showClose: true,
+          message: "请选着风机或风场",
+          type: "error",
+        });
+      } else {
+        if (this.activeName == "first") {
+          Object.assign(this.$data.tableData, this.$options.data().tableData);
+          Object.assign(this.$data.lineDate, this.$options.data().lineDate);
+          this.query_line();
+        } else if (this.activeName == "second") {
+          Object.assign(
+            this.$data.tableData_y,
+            this.$options.data().tableData_y
+          );
+          Object.assign(this.$data.lineDate_y, this.$options.data().lineDate_y);
+          this.query_line_y();
+        } else if (this.activeName == "thired") {
+          Object.assign(
+            this.$data.tableData_n,
+            this.$options.data().tableData_n
+          );
+          Object.assign(this.$data.lineDate_n, this.$options.data().lineDate_n);
+          this.query_line_n();
+        }
+      }
+    },
+    /**
+     * 获取年 曲线数据
+     */
+    query_line_n() {
+      let that = this;
+      this.API
+        .get(
+          "compare/compareYearChat?windturbineid=" +
+            this.fj +
+            "&date=" +
+            this.Date1
+        )
+        .then((res) => {
+          let Date = res.data;
+          for (let i = 0; i < Date.length; i++) {
+            that.lineDate_n.speed[i] = Date[i].speed;
+            that.lineDate_n.value1[i] = Date[i].value1;
+            that.lineDate_n.value2[i] = Date[i].value2;
+            that.lineDate_n.value3[i] = Date[i].value3;
+            that.lineDate_n.value4[i] = Date[i].value4;
+            that.lineDate_n.value5[i] = Date[i].value5;
+          }
+          this.query_daycompare_n();
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    /**
+     * 获取年雷达图数据 表格
+     */
+    query_daycompare_n() {
+      this.API
+        .get(
+          "compare/compareYearList?windturbineid=" +
+            this.fj +
+            "&date=" +
+            this.Date1
+        )
+        .then((res) => {
+          this.tableData_n = res.data;
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+
+      this.API
+        .get("compare/fzyYear?windturbineid=" + this.fj + "&date=" + this.Date1)
+        .then((res) => {
+          let that = this;
+          Object.assign(
+            this.$data.leida_list_0,
+            this.$options.data().leida_list_0
+          );
+          Object.assign(
+            this.$data.leida_list_1,
+            this.$options.data().leida_list_1
+          );
+          Object.assign(
+            this.$data.leida_list_2,
+            this.$options.data().leida_list_2
+          );
+          Object.assign(
+            this.$data.leida_list_3,
+            this.$options.data().leida_list_3
+          );
+          Object.assign(
+            this.$data.leida_list_4,
+            this.$options.data().leida_list_4
+          );
+          let len = Object.keys(res.data).length;
+          let lenfj = this.fj.length;
+          if (len == 2) {
+            this.jfpl0 = res.data.jfpl0;
+            let value_list_0 = res.data.data0;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+          } else if (len == 4) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            let value_list_0 = res.data.data0;
+            let value_list_1 = res.data.data1;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+            for (let i = 1; i < value_list_1.length; i++) {
+              that.leida_list_1.push(value_list_1[i].data1);
+            }
+          } else if (len == 6) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            this.jfpl2 = res.data.jfpl2;
+            let value_list_0 = res.data.data0;
+            let value_list_1 = res.data.data1;
+            let value_list_2 = res.data.data2;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+            for (let i = 1; i < value_list_1.length; i++) {
+              that.leida_list_1.push(value_list_1[i].data1);
+            }
+            for (let i = 1; i < value_list_2.length; i++) {
+              that.leida_list_2.push(value_list_2[i].data1);
+            }
+          } else if (len == 8) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            this.jfpl2 = res.data.jfpl2;
+            this.jfpl3 = res.data.jfpl3;
+            let value_list_0 = res.data.data0;
+            let value_list_1 = res.data.data1;
+            let value_list_2 = res.data.data2;
+            let value_list_3 = res.data.data3;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+            for (let i = 1; i < value_list_1.length; i++) {
+              that.leida_list_1.push(value_list_1[i].data1);
+            }
+            for (let i = 1; i < value_list_2.length; i++) {
+              that.leida_list_2.push(value_list_2[i].data1);
+            }
+            for (let i = 1; i < value_list_3.length; i++) {
+              that.leida_list_3.push(value_list_3[i].data1);
+            }
+          } else if (len == 10) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            this.jfpl2 = res.data.jfpl2;
+            this.jfpl3 = res.data.jfpl3;
+            this.jfpl4 = res.data.jfpl4;
+            for (let i = 1; i < Object.keys(res.data.data0).length; i++) {
+              that.leida_list_0.push(res.data.data0[i].data1);
+              that.leida_list_1.push(res.data.data1[i].data1);
+              that.leida_list_2.push(res.data.data2[i].data1);
+              that.leida_list_3.push(res.data.data3[i].data1);
+              that.leida_list_4.push(res.data.data4[i].data1);
+            }
+          }
+          if (this.fj.length == 1) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+          } else if (this.fj.length == 2) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+          } else if (this.fj.length == 3) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+            this.ECZM.leida_djbhd("fzy3",this.leida_list_2,this.jfpl2);
+          } else if (this.fj.length == 4) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+            this.ECZM.leida_djbhd("fzy3",this.leida_list_2,this.jfpl2); 
+            this.ECZM.leida_djbhd("fzy4",this.leida_list_3,this.jfpl3);
+          } else if (this.fj.length == 5) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+            this.ECZM.leida_djbhd("fzy3",this.leida_list_2,this.jfpl2); 
+            this.ECZM.leida_djbhd("fzy4",this.leida_list_3,this.jfpl3); 
+            this.ECZM.leida_djbhd("fzy5",this.leida_list_4,this.jfpl4); 
+          }
+          this.ECZM.bar_djbhd("linechar_n",this.fj,this.lineDate);
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    /**
+     * 获取月曲线数据
+     */
+    query_line_y() {
+      let that = this;
+      this.API
+        .get(
+          "compare/compareMonthChat?windturbineid=" +
+            this.fj +
+            "&date=" +
+            this.Date1
+        )
+        .then((res) => {
+          let Date = res.data;
+          for (let i = 0; i < Date.length; i++) {
+            that.lineDate_y.speed[i] = Date[i].speed;
+            that.lineDate_y.value1[i] = Date[i].value1;
+            that.lineDate_y.value2[i] = Date[i].value2;
+            that.lineDate_y.value3[i] = Date[i].value3;
+            that.lineDate_y.value4[i] = Date[i].value4;
+            that.lineDate_y.value5[i] = Date[i].value5;
+          }
+          this.query_daycompare_y();
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    /**
+     * 获取月雷达图数据 表格
+     */
+    query_daycompare_y() {
+      this.API
+        .get(
+          "compare/compareMonthList?windturbineid=" +
+            this.fj +
+            "&date=" +
+            this.Date1
+        )
+        .then((res) => {
+          this.tableData_y = res.data;
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+      this.API
+        .get(
+          "compare/fzyMonth?windturbineid=" + this.fj + "&date=" + this.Date1
+        )
+        .then((res) => {
+          let that = this;
+          Object.assign(
+            this.$data.leida_list_0,
+            this.$options.data().leida_list_0
+          );
+          Object.assign(
+            this.$data.leida_list_1,
+            this.$options.data().leida_list_1
+          );
+          Object.assign(
+            this.$data.leida_list_2,
+            this.$options.data().leida_list_2
+          );
+          Object.assign(
+            this.$data.leida_list_3,
+            this.$options.data().leida_list_3
+          );
+          Object.assign(
+            this.$data.leida_list_4,
+            this.$options.data().leida_list_4
+          );
+
+          if (Object.keys(res.data).length == 2) {
+            this.jfpl0 = res.data.jfpl0;
+            let value_list_0 = res.data.data0;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+          } else if (Object.keys(res.data).length == 4) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            let value_list_0 = res.data.data0;
+            let value_list_1 = res.data.data1;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+            for (let i = 1; i < value_list_1.length; i++) {
+              that.leida_list_1.push(value_list_1[i].data1);
+            }
+          } else if (Object.keys(res.data).length == 6) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            this.jfpl2 = res.data.jfpl2;
+            let value_list_0 = res.data.data0;
+            let value_list_1 = res.data.data1;
+            let value_list_2 = res.data.data2;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+            for (let i = 1; i < value_list_1.length; i++) {
+              that.leida_list_1.push(value_list_1[i].data1);
+            }
+            for (let i = 1; i < value_list_2.length; i++) {
+              that.leida_list_2.push(value_list_2[i].data1);
+            }
+          } else if (Object.keys(res.data).length == 8) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            this.jfpl2 = res.data.jfpl2;
+            this.jfpl3 = res.data.jfpl3;
+            let value_list_0 = res.data.data0;
+            let value_list_1 = res.data.data1;
+            let value_list_2 = res.data.data2;
+            let value_list_3 = res.data.data3;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+            for (let i = 1; i < value_list_1.length; i++) {
+              that.leida_list_1.push(value_list_1[i].data1);
+            }
+            for (let i = 1; i < value_list_2.length; i++) {
+              that.leida_list_2.push(value_list_2[i].data1);
+            }
+            for (let i = 1; i < value_list_3.length; i++) {
+              that.leida_list_3.push(value_list_3[i].data1);
+            }
+          } else if (Object.keys(res.data).length == 10) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            this.jfpl2 = res.data.jfpl2;
+            this.jfpl3 = res.data.jfpl3;
+            this.jfpl4 = res.data.jfpl4;
+            for (let i = 1; i < Object.keys(res.data.data0).length; i++) {
+              that.leida_list_0.push(res.data.data0[i].data1);
+              that.leida_list_1.push(res.data.data1[i].data1);
+              that.leida_list_2.push(res.data.data2[i].data1);
+              that.leida_list_3.push(res.data.data3[i].data1);
+              that.leida_list_4.push(res.data.data4[i].data1);
+            }
+          }
+          if (this.fj.length == 1) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+          } else if (this.fj.length == 2) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+          } else if (this.fj.length == 3) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+            this.ECZM.leida_djbhd("fzy3",this.leida_list_2,this.jfpl2);
+          } else if (this.fj.length == 4) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+            this.ECZM.leida_djbhd("fzy3",this.leida_list_2,this.jfpl2); 
+            this.ECZM.leida_djbhd("fzy4",this.leida_list_3,this.jfpl3);
+          } else if (this.fj.length == 5) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+            this.ECZM.leida_djbhd("fzy3",this.leida_list_2,this.jfpl2); 
+            this.ECZM.leida_djbhd("fzy4",this.leida_list_3,this.jfpl3); 
+            this.ECZM.leida_djbhd("fzy5",this.leida_list_4,this.jfpl4); 
+          }
+          this.ECZM.bar_djbhd("linechar_y",this.fj,this.lineDate);
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    /**
+     * 获取日曲线数据
+     */
+    query_line() {
+      let that = this;
+      this.API
+        .get(
+          "compare/compareDayChat?windturbineid=" +
+            this.fj +
+            "&date=" +
+            this.Date1
+        )
+        .then((res) => {
+          let Date = res.data;
+          for (let i = 0; i < Date.length; i++) {
+            that.lineDate.speed[i] = Date[i].speed;
+            that.lineDate.value1[i] = Date[i].value1;
+            that.lineDate.value2[i] = Date[i].value2;
+            that.lineDate.value3[i] = Date[i].value3;
+            that.lineDate.value4[i] = Date[i].value4;
+            that.lineDate.value5[i] = Date[i].value5;
+          }
+          this.query_daycompare();
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+    /**
+     * 获取日雷达图数据 表格
+     */
+    query_daycompare() {
+      Object.assign(this.$data.tableData, this.$options.data().tableData);
+      this.API
+        .get(
+          "compare/compareDayList?windturbineid=" +
+            this.fj +
+            "&date=" +
+            this.Date1
+        )
+        .then((res) => {
+          this.tableData = res.data;
+        });
+      this.API
+        .get("compare/fzyDay?windturbineid=" + this.fj + "&date=" + this.Date1)
+        .then((res) => {
+          let that = this;
+          Object.assign(
+            this.$data.leida_list_0,
+            this.$options.data().leida_list_0
+          );
+          Object.assign(
+            this.$data.leida_list_1,
+            this.$options.data().leida_list_1
+          );
+          Object.assign(
+            this.$data.leida_list_2,
+            this.$options.data().leida_list_2
+          );
+          Object.assign(
+            this.$data.leida_list_3,
+            this.$options.data().leida_list_3
+          );
+          Object.assign(
+            this.$data.leida_list_4,
+            this.$options.data().leida_list_4
+          );
+
+          if (Object.keys(res.data).length == 2) {
+            this.jfpl0 = res.data.jfpl0;
+            let value_list_0 = res.data.data0;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+          } else if (Object.keys(res.data).length == 4) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            let value_list_0 = res.data.data0;
+            let value_list_1 = res.data.data1;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+            for (let i = 1; i < value_list_1.length; i++) {
+              that.leida_list_1.push(value_list_1[i].data1);
+            }
+          } else if (Object.keys(res.data).length == 6) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            this.jfpl2 = res.data.jfpl2;
+            let value_list_0 = res.data.data0;
+            let value_list_1 = res.data.data1;
+            let value_list_2 = res.data.data2;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+            for (let i = 1; i < value_list_1.length; i++) {
+              that.leida_list_1.push(value_list_1[i].data1);
+            }
+            for (let i = 1; i < value_list_2.length; i++) {
+              that.leida_list_2.push(value_list_2[i].data1);
+            }
+          } else if (Object.keys(res.data).length == 8) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            this.jfpl2 = res.data.jfpl2;
+            this.jfpl3 = res.data.jfpl3;
+            let value_list_0 = res.data.data0;
+            let value_list_1 = res.data.data1;
+            let value_list_2 = res.data.data2;
+            let value_list_3 = res.data.data3;
+            for (let i = 1; i < value_list_0.length; i++) {
+              that.leida_list_0.push(value_list_0[i].data1);
+            }
+            for (let i = 1; i < value_list_1.length; i++) {
+              that.leida_list_1.push(value_list_1[i].data1);
+            }
+            for (let i = 1; i < value_list_2.length; i++) {
+              that.leida_list_2.push(value_list_2[i].data1);
+            }
+            for (let i = 1; i < value_list_3.length; i++) {
+              that.leida_list_3.push(value_list_3[i].data1);
+            }
+          } else if (Object.keys(res.data).length == 10) {
+            this.jfpl0 = res.data.jfpl0;
+            this.jfpl1 = res.data.jfpl1;
+            this.jfpl2 = res.data.jfpl2;
+            this.jfpl3 = res.data.jfpl3;
+            this.jfpl4 = res.data.jfpl4;
+            for (let i = 1; i < Object.keys(res.data.data0).length; i++) {
+              that.leida_list_0.push(res.data.data0[i].data1);
+              that.leida_list_1.push(res.data.data1[i].data1);
+              that.leida_list_2.push(res.data.data2[i].data1);
+              that.leida_list_3.push(res.data.data3[i].data1);
+              that.leida_list_4.push(res.data.data4[i].data1);
+            }
+          }
+          if (this.fj.length == 1) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+          } else if (this.fj.length == 2) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+          } else if (this.fj.length == 3) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+            this.ECZM.leida_djbhd("fzy3",this.leida_list_2,this.jfpl2);
+          } else if (this.fj.length == 4) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+            this.ECZM.leida_djbhd("fzy3",this.leida_list_2,this.jfpl2); 
+            this.ECZM.leida_djbhd("fzy4",this.leida_list_3,this.jfpl3);
+          } else if (this.fj.length == 5) {
+            this.ECZM.leida_djbhd("fzy1",this.leida_list_0,this.jfpl0); 
+            this.ECZM.leida_djbhd("fzy2",this.leida_list_1,this.jfpl1); 
+            this.ECZM.leida_djbhd("fzy3",this.leida_list_2,this.jfpl2); 
+            this.ECZM.leida_djbhd("fzy4",this.leida_list_3,this.jfpl3); 
+            this.ECZM.leida_djbhd("fzy5",this.leida_list_4,this.jfpl4); 
+          }
+        this.ECZM.bar_djbhd("linechar",this.fj,this.lineDate);
+        }).catch(error =>{
+          this.$message.error('获取数据失败');
+        });
+    },
+  },
+  mounted() {
+    this.ECZM.bar_djbhd("linechar",this.fj,this.lineDate);
+    this.query();
+    this.query_check();
+  },
+};

+ 275 - 0
src/assets/js/benchmarkingSys/yardBenchmark.js

@@ -0,0 +1,275 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+     
+      FClist: {
+        name: "",
+        id: "",
+      },
+      fdcName1: "",
+      fdcName2: "",
+      date1: "2021-01-01",
+      date2: "2020-01-03",
+      wp_n_1: {},
+      wp_n_2: {},
+      selectrowdate: {},
+      histogram: {
+        date: [],
+        xdss: [],
+        gzss: [],
+        jxss: [],
+        xnss: [],
+        slss: [],
+      },
+      wpId: [],
+      wpName: [],
+      lineDataOption: [],
+      beginDate: "2021-01-01",
+      endDate: "2021-01-03",
+      fc: "",
+      tableData: [],
+      dialogTableVisible: false,
+      getChartDataValue: [],
+      getChartDataValue2: [],
+      getTableData: [],
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+    };
+  },
+  methods: {
+    
+    /**
+     * 控制弹出
+     */
+    dialog() {
+      this.dialogTableVisible = true;
+      this.check_wpid();
+      this.$nextTick(function () {
+        this.ECZM.leida_tc("leidatu" , this.getChartDataValue,this.fdcName1,this.getChartDataValue2,this.fdcName2);
+        this.ECZM.bar_tc("histogram_n" , this.wp_n_1 , this.wp_n_2 , this.wp_n_1.wpId , this.wp_n_2.wpId);
+      });
+    },
+    headStyle() {
+      return "text-align:left";
+    },
+    /**
+     * 
+     *  风场检查
+     */
+    check_wpid() {
+      this.wp_n_1 = {};
+      this.wp_n_2 = {};
+      this.fdcName1 = "";
+      this.fdcName2 = "";
+      this.getChartDataValue = [];
+      this.getChartDataValue2 = [];
+      this.getTableData = [];
+      if (Object.keys(this.selectrowdate).length != 2) {
+        this.alert_jg();
+        return;
+      } else {
+        this.wp_n_1 = this.selectrowdate[0];
+        this.wp_n_2 = this.selectrowdate[1];
+        this.fdcName1 = this.wp_n_1.wpId;
+        this.fdcName2 = this.wp_n_2.wpId;
+        this.getChartDataValue.push(
+          this.wp_n_1.fnlyl,
+          this.wp_n_1.gzssl,
+          this.wp_n_1.jxssl,
+          this.wp_n_1.qfl,
+          this.wp_n_1.xnssl,
+          this.wp_n_1.slssl,
+          this.wp_n_1.fwjsl,
+          this.wp_n_1.ztzhl,
+          this.wp_n_1.xqjsl
+        );
+        this.getChartDataValue2.push(
+          this.wp_n_2.fnlyl,
+          this.wp_n_2.gzssl,
+          this.wp_n_2.jxssl,
+          this.wp_n_2.qfl,
+          this.wp_n_2.xnssl,
+          this.wp_n_2.slssl,
+          this.wp_n_2.fwjsl,
+          this.wp_n_2.ztzhl,
+          this.wp_n_2.xqjsl
+        );
+        this.getTableData.push({
+          index: "发电量",
+          data1: this.wp_n_1.scadafdl,
+          data2: this.wp_n_2.scadafdl,
+        });
+        this.getTableData.push({
+          index: "故障损失电量",
+          data1: this.wp_n_1.gzss,
+          data2: this.wp_n_2.gzss,
+        });
+        this.getTableData.push({
+          index: "检修损失电量",
+          data1: this.wp_n_1.jxssl,
+          data2: this.wp_n_2.jxssl,
+        });
+        this.getTableData.push({
+          index: "性能未达标损失电量",
+          data1: this.wp_n_1.xnsslfraction,
+          data2: this.wp_n_2.xnsslfraction,
+        });
+        this.getTableData.push({
+          index: "受累损失电量",
+          data1: this.wp_n_1.slss,
+          data2: this.wp_n_2.slss,
+        });
+        this.getTableData.push({
+          index: "风能利用率",
+          data1: this.wp_n_1.fnlyl,
+          data2: this.wp_n_2.fnlyl,
+        });
+        this.getTableData.push({
+          index: "故障损失率",
+          data1: this.wp_n_1.gzssl,
+          data2: this.wp_n_2.gzssl,
+        });
+        this.getTableData.push({
+          index: "检修损失率",
+          data1: this.wp_n_1.jxssl,
+          data2: this.wp_n_2.jxssl,
+        });
+        this.getTableData.push({
+          index: "弃风率",
+          data1: this.wp_n_1.qfl,
+          data2: this.wp_n_2.qfl,
+        });
+        this.getTableData.push({
+          index: "性能损失率",
+          data1: this.wp_n_1.xnssl,
+          data2: this.wp_n_2.xnssl,
+        });
+        this.getTableData.push({
+          index: "受累损失率",
+          data1: this.wp_n_1.slssl,
+          data2: this.wp_n_2.slssl,
+        });
+        this.getTableData.push({
+          index: "复位及时率",
+          data1: this.wp_n_1.fwjsl,
+          data2: this.wp_n_2.fwjsl,
+        });
+        this.getTableData.push({
+          index: "消缺及时率",
+          data1: this.wp_n_1.xqjsl,
+          data2: this.wp_n_2.xqjsl,
+        });
+        this.getTableData.push({
+          index: "状态转换率",
+          data1: this.wp_n_1.ztzhjsl,
+          data2: this.wp_n_2.ztzhjsl,
+        });
+      }
+    },
+    /**
+     * 获取表格行值
+     * 
+     */
+    changeFun(val) {
+      this.selectrowdate = val;
+    },
+    /**
+     * 获取风场列表
+     */
+    query_fc() {
+      let that = this ;
+      var newData = new Date();
+       this.beginDate = this.BASE.getBzDate(newData,-1);
+       this.endDate = this.BASE.getBzDate(newData,0);
+       this.API.get("powercompare/windfarmAjax?").then((res) => {
+        that.FClist = res.data;
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    /**
+     * 
+     * 弹出提示信 息
+     */
+    alert_jg() {
+      this.$message({
+        message: "只能选择两条数据",
+        type: "warning",
+      });
+      return;
+    },
+    /**
+     * 
+     * 跳转详情页面
+     */
+    handleEdit(a, b) {
+        this.lineDataOption.push({ id: b.wpId, name: b.wpName });
+        this.$router.push({
+          path: "/yardBenchmarkParticulars",
+          query: {
+            wpId: b.wpId,
+            beginDate: this.beginDate,
+            endDate: this.endDate,
+            wpName: b.wpName,
+            select: this.lineDataOption,
+          },
+        });
+    },
+    /**
+     * 查询场内对标列表信息
+     */
+    query_benchmarkWpList() {
+      Object.assign(this.$data.histogram, this.$options.data().histogram);
+      let that = this;
+      var page = new URLSearchParams();
+      page.append("wpId", this.fc);
+      page.append("beginDate", this.beginDate);
+      page.append("endDate", this.endDate);
+      this.API.post("/contrast/benchmarkWpList", page).then((res) => {
+        this.tableData = res.data;
+        let len = this.tableData.length;
+        for (let i = 0; i < len; i++) {
+          that.histogram.date[i] = this.BASE.getBzDate(
+            new Date(res.data[i].recordDate),0
+          );
+          
+            that.histogram.xdss[i] = res.data[i].xdss;
+          
+
+          
+            that.histogram.gzss[i] = res.data[i].gzss;
+          
+
+          
+            that.histogram.jxss[i] = res.data[i].whss;
+         
+            that.histogram.xnss[i] = res.data[i].qfss;
+          
+            that.histogram.slss[i] = res.data[i].slss;
+          
+        }
+
+        this.ECZM.getBar_fdd("histogram",this.histogram);
+      }).catch(error =>{
+        this.$message.error('获取数据失败');
+      });
+    },
+    /**
+     * 
+     * 日期类型转换
+     */
+    filter_date(cellValue) {
+      let date = new Date(cellValue.recordDate);
+
+      return this.BASE.getBzDate(date,0);
+    },
+  },
+  mounted() {
+    this.query_fc();
+    this.query_benchmarkWpList();
+  },
+};

+ 268 - 0
src/assets/js/benchmarkingSys/yardBenchmarkParticulars.js

@@ -0,0 +1,268 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      loading:true,
+      options: [],
+
+      value: [],
+      timedate: [],
+      multipleSelection: [],
+      orderByColumn: "",
+      isAsc: "asc",
+      fdcLineData: [],
+      currentPage2: 1,
+      pagesize: 10,
+      wpId: "",
+      beginDate: "",
+      endDate: "",
+      dialogTableVisible: false,
+      sortInOrder: [],
+      sortInOrderTop: [],
+      fdcName1: "",
+      fdcName2: "",
+      sortInOrde2: [],
+      getTableData: [],
+      wp_n_1: {},
+      wp_n_2: {},
+    };
+  },
+  filters: {
+    /**
+     * 改变格式(取小数点)
+     */
+    rounding(value) {
+      return value.toFixed(2);
+    },
+  },
+  activated() {
+    this.timedate = [];
+    this.wpId = this.$route.query.wpId;
+    this.timedate.push(this.$route.query.beginDate,this.$route.query.endDate); 
+    this.queryApData();
+  },
+  methods: {
+    /**
+     * 获取当前id
+     */
+queryApData() {
+    this.value = this.$route.query.wpId;
+    this.YardTableData();
+  },
+
+  queryApDataMx() {
+    this.dialogTableVisible = true;
+    this.wp_n_1 = {};
+    this.wp_n_2 = {};
+    this.getTableData = [];
+    if (this.multipleSelection.length == 2) {
+      this.wp_n_1 = this.multipleSelection[0];
+      this.wp_n_2 = this.multipleSelection[1];
+      this.fdcName1 = this.multipleSelection[0].wtName;
+      this.fdcName2 = this.multipleSelection[1].wtName;
+      this.sortInOrder.push(
+        this.multipleSelection[0].fnlyl,
+        this.multipleSelection[0].xqjsl,
+        this.multipleSelection[0].ztzhjsl,
+        this.multipleSelection[0].fwjsl,
+        this.multipleSelection[0].slssl,
+        this.multipleSelection[0].xnssl,
+        this.multipleSelection[0].qfl,
+        this.multipleSelection[0].jxssl,
+        this.multipleSelection[0].gzssl
+      );
+      this.sortInOrderTop.push(
+        this.multipleSelection[1].fnlyl,
+        this.multipleSelection[1].xqjsl,
+        this.multipleSelection[1].ztzhjsl,
+        this.multipleSelection[1].fwjsl,
+        this.multipleSelection[1].slssl,
+        this.multipleSelection[1].xnssl,
+        this.multipleSelection[1].qfl,
+        this.multipleSelection[1].jxssl,
+        this.multipleSelection[1].gzssl
+      );
+      this.getTableData.push({
+        index: "发电量",
+        data1: this.multipleSelection[0].scadafdl,
+        data2: this.multipleSelection[1].scadafdl,
+      });
+      this.getTableData.push({
+        index: "故障损失电量",
+        data1: this.multipleSelection[0].gzss,
+        data2: this.multipleSelection[1].gzss,
+      });
+      this.getTableData.push({
+        index: "检修损失电量",
+        data1: this.multipleSelection[0].jxssl,
+        data2: this.multipleSelection[1].jxssl,
+      });
+      this.getTableData.push({
+        index: "性能未达标损失电量",
+        data1: this.multipleSelection[0].xnsslfraction,
+        data2: this.multipleSelection[1].xnsslfraction,
+      });
+      this.getTableData.push({
+        index: "受累损失电量",
+        data1: this.multipleSelection[0].slss,
+        data2: this.multipleSelection[1].slss,
+      });
+      this.getTableData.push({
+        index: "风能利用率",
+        data1: this.multipleSelection[0].fnlyl,
+        data2: this.multipleSelection[1].fnlyl,
+      });
+      this.getTableData.push({
+        index: "故障损失率",
+        data1: this.multipleSelection[0].gzssl,
+        data2: this.multipleSelection[1].gzssl,
+      });
+      this.getTableData.push({
+        index: "检修损失率",
+        data1: this.multipleSelection[0].jxssl,
+        data2: this.multipleSelection[1].jxssl,
+      });
+      this.getTableData.push({
+        index: "弃风率",
+        data1: this.multipleSelection[0].qfl,
+        data2: this.multipleSelection[1].qfl,
+      });
+      this.getTableData.push({
+        index: "性能损失率",
+        data1: this.multipleSelection[0].xnssl,
+        data2: this.multipleSelection[1].xnssl,
+      });
+      this.getTableData.push({
+        index: "受累损失率",
+        data1: this.multipleSelection[0].slssl,
+        data2: this.multipleSelection[1].slssl,
+      });
+      this.getTableData.push({
+        index: "复位及时率",
+        data1: this.multipleSelection[0].fwjsl,
+        data2: this.multipleSelection[1].fwjsl,
+      });
+      this.getTableData.push({
+        index: "消缺及时率",
+        data1: this.multipleSelection[0].xqjsl,
+        data2: this.multipleSelection[1].xqjsl,
+      });
+      this.getTableData.push({
+        index: "状态转换率",
+        data1: this.multipleSelection[0].ztzhjsl,
+        data2: this.multipleSelection[1].ztzhjsl,
+      });
+    }
+    this.$nextTick(function () {
+      this.ECZM.leida_tc("leiDaTu3" , this.sortInOrder,this.fdcName1,this.sortInOrderTop,this.fdcName2);
+      this.ECZM.bar_tc("leiDaTu4" , this.wp_n_1 , this.wp_n_2 ,this.wp_n_1.wtId , this.wp_n_2.wtId);
+      
+    });
+  },
+  /**
+   * 改变格式去小数点
+   */
+  filter_fdl(cellValue) {
+    return parseFloat(cellValue.scadafdl).toFixed(2);
+  },
+  /**
+   * 判断选中条数是否等于2
+   */
+  ApDataMxcheck() {
+    if (this.multipleSelection.length == 2) {
+      this.queryApDataMx();
+    } else {
+      this.$message({
+        message: "请选择两个风机!",
+        type: "warning",
+      });
+      return;
+    }
+  },
+  /**
+   * 查询场内风机列表信息
+   */
+  YardTableData() {
+    let that = this;
+    Object.assign(this.$data.fdcLineData, this.$options.data().fdcLineData);
+    this.API.get("/powercompare/windfarmAjax").then((res) => {
+      this.options = res.data;
+    }).catch(error =>{
+      this.$message.error('获取数据失败');
+    });
+    this.wpId = this.$route.query.wpId;
+    if (this.timedate == "") {
+      this.beginDate = this.$route.query.beginDate;
+      this.endDate = this.$route.query.endDate;
+    } else {
+      this.beginDate = this.timedate[0];
+      this.endDate = this.timedate[1];
+    }
+    var guilty = new URLSearchParams();
+    guilty.append("pageNum", this.currentPage2);
+    guilty.append("pageSize", this.pagesize);
+    guilty.append("orderByColumn", this.orderByColumn);
+    guilty.append("isAsc", this.isAsc);
+    if (this.value == []) {
+      guilty.append("wpId", this.wpId);
+    } else {
+      guilty.append("wpId", this.value);
+    }
+    guilty.append("beginDate", this.beginDate);
+    guilty.append("endDate", this.endDate);
+    this.API.post("/contrast/benchmarkWpInWtList", guilty).then((res) => {
+      this.fdcLineData = res.data;
+      this.loading=false;
+    }).catch(error =>{
+      this.$message.error('获取数据失败');
+    });
+  },
+  headStyle() {
+    return "text-align:center";
+  },
+  /**
+   * 选中表格
+   */
+  handleSelectionChange(val) {
+    this.sortInOrder = [];
+    this.sortInOrderTop = [];
+    this.getTableData = [];
+    this.sortInOrde2 = [];
+    this.multipleSelection = [];
+    this.multipleSelection = val;
+  },
+  changeTableSort(column) {
+    this.orderByColumn = column.prop;
+    if (column.order == "descending") {
+      this.isAsc = "desc";
+    } else if (column.order == "ascending") {
+      this.isAsc = "asc";
+    }
+    this.YardTableData();
+  },
+  /**
+   * 时间格式转化
+   */
+  filter_date(cellValue) {
+    let date = new Date(cellValue.recordDate);
+    return this.BASE.getBzDate(date,0);
+  },
+  /**
+   * 返回按钮
+   */
+  goReturn() {
+    this.$router.push("/yardBenchmark");
+  },
+  /**
+   * 导出表格
+   */
+  toExcel() {
+    excelHelper.exportExcel("fdcLineData","损失率对标列表",".xls",true);
+  },
+},
+};

+ 106 - 0
src/assets/js/healthManagement/healthAssessment.js

@@ -0,0 +1,106 @@
+// import {formatDate} from '../../utils/fomatDate';
+export default {
+    data(){
+        return {
+            pdfTitle: '因子评价报告',
+            pdfSelector: '单机性能分析',
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            value:'',
+            value2:'',
+            options:[],
+            options2:[],
+            time:'',
+            fanData:'',
+            tableData: [],
+            timedate: [
+            // {beginDate:'2021-01-01'},
+            // {endDate:'2021-01-04'}
+            ],
+            beginDate:'',
+            endDate:'',
+            updateTime:'',
+            updateTime1:'',
+            recodedate:'',
+            
+        }
+    },
+    filters: { 
+        rounding (value) {
+            return value.toFixed(2)
+        } 
+    },
+    created(){
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+        this.getHealthForm();
+    },
+    methods:{
+        queryApData() {
+             this.getHealthForm();
+        },
+        formatDate(time) {
+            let date = new Date(time.recodedate);
+            return this.BASE.getBzDate(date, 0);
+        },
+        handleEdit(a,b){
+          let date = new Date(b.recodedate);
+          this.recodedate = this.BASE.getBzDate(date, 0);
+          this.$router.push({
+            path:'/healthAssessmentDetailed',
+            query:{
+              wtid:b.wtid,
+              recorddate: this.recodedate,
+            }
+          })
+        },
+        headStyle() {
+          return "text-align:center"
+        },
+        changeTableSort(column){
+          this.orderByColumn = column.prop;
+          if(column.order == "descending"){
+            this.isAsc = 'desc';
+          }else if(column.order == "ascending"){
+            this.isAsc = "asc";
+          }
+          this.performance();
+        },
+        getFCData(){
+            this.API.get('/powercompare/windturbineAjax?wpId=' + this.value).then((res) => {
+                this.options2 = res.data;
+            })
+        },
+        getHealthForm(){
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);
+            if(this.timedate == ''){
+                this.timedate[0] = this.updateTime1;
+                this.timedate[1] = this.updateTime;
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }else{
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var healthForm = new URLSearchParams();
+            healthForm.append('wtId',this.value2);
+            healthForm.append('beginDate',this.beginDate);
+            healthForm.append('endDate',this.endDate);
+            this.API.post('/report/getReportList',healthForm).then((res) =>{
+                console.log(res)
+                if(res.data == ''){
+
+                }else{
+                    this.tableData.push(res.data[0])
+                    console.log(this.tableData)
+                }
+            })
+        },
+    }
+}

+ 257 - 0
src/assets/js/healthManagement/healthAssessmentDetailed.js

@@ -0,0 +1,257 @@
+export default {
+    data(){
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            tjdiv:'',
+            tableDataAll:[],
+            fdjtable:[],
+            clxtable:[],
+            zktable:[],
+            bjtable:[],
+            wtid:'',
+            textData:'',
+            recorddate:'',
+            qxpclChart:'',
+            qxpclData:[],
+            qxpcljzzData:[],
+            xqxpcldata:[],
+            fdlChart:[],
+            clxChart:[],
+            bjChart:[],
+            zkChart:[],
+            fdlData:[],
+            clxData:[],
+            bjData:[],
+            zkData:[],
+            xfdldata:[],
+            xclxdata:[],
+            xbjdata:[],
+            xzkdata:[],
+            //推荐检修风速
+            windspeed:'',
+            //结论
+            conclusion:'',
+            //高频
+            highfrequency:'',
+            //中频
+            intermediatefrequency:'',
+            //低频
+            lowfrequency:'',
+            //推荐工具器
+            tools:'',
+            //平均消缺时长
+            mainhour:'',
+            //推荐检修方法
+            mainmethod:'',
+            //推荐检修日期
+            maindate:'',
+            //报告出具时间
+            bgcjdate:'',
+            //风机
+            wtName:'',
+            //评级操作
+            djpgjb:'',
+            //推荐处理方法
+            approach:'',
+            // 推荐检修理由
+            mainreason:'',
+            //echart数值大小
+            max:'',
+            pdfTitle: '因子评价报告',
+            pdfSelector: '单机性能分析',
+            
+
+        }
+    },
+    created(){
+        this.getData();
+        this.KeyparameterData();
+    },
+    methods:{
+      // 导出pdf
+      getPdf(name){
+        this.Get_PDF.downloadPDF( document.querySelector('#pdfDom'),name)
+      },
+        headStyle() {
+          return "text-align:center"
+        },
+        KeyparameterData(){
+            this.fdjtable.push({name:'发电机轴A温度',edz:'76',yxfw:'0-95',qz:'0.035'});
+            this.fdjtable.push({name:'发电机轴B温度',edz:'76',yxfw:'0-95',qz:'0.035'});
+            this.fdjtable.push({name:'发电机U相绕组温度',edz:'120',yxfw:'0-150',qz:'0.038'});
+            this.fdjtable.push({name:'发电机V相绕组温度',edz:'120',yxfw:'0-150',qz:'0.427'});
+            this.fdjtable.push({name:'发电机W相绕组温度',edz:'120',yxfw:'0-150',qz:'0.465'});
+            this.fdjtable.push({name:'发电机冷却风',edz:'56',yxfw:'0-70',qz:'0'});
+            this.clxtable.push({name:'齿轮箱输入轴1油温',edz:'76',yxfw:'0-95',qz:'0.0114'});
+            this.clxtable.push({name:'齿轮箱输入轴2油温',edz:'76',yxfw:'0-95',qz:'0.4537'});
+            this.clxtable.push({name:'齿轮箱入口油温',edz:'64',yxfw:'0-80',qz:'0.0218'});
+            this.clxtable.push({name:'齿轮箱油温',edz:'31',yxfw:'10-14-76-80',qz:'0.5131'});
+            this.bjtable.push({name:'变浆电容器温度1',edz:'52',yxfw:'0-65',qz:'0.0069'});
+            this.bjtable.push({name:'变浆电容器温度2',edz:'52',yxfw:'0-65',qz:'0.0069'});
+            this.bjtable.push({name:'变浆电容器温度3',edz:'52',yxfw:'0-65',qz:'0.0069'});
+            this.bjtable.push({name:'变浆电容电压1',edz:'58',yxfw:'53-56-60-63',qz:'0.2724'});
+            this.bjtable.push({name:'变浆电容电压2',edz:'58',yxfw:'53-56-60-63',qz:'0.2724'});
+            this.bjtable.push({name:'变浆电容电压3',edz:'58',yxfw:'53-56-60-63',qz:'0.2724'});
+            this.bjtable.push({name:'变浆电流器温度1',edz:'60',yxfw:'0-75',qz:'0.0128'});
+            this.bjtable.push({name:'变浆电流器温度2',edz:'60',yxfw:'0-75',qz:'0.0128'});
+            this.bjtable.push({name:'变浆电流器温度3',edz:'60',yxfw:'0-75',qz:'0.0128'});
+            this.bjtable.push({name:'电机温度1',edz:'110',yxfw:'0-135',qz:'0.0083'});
+            this.bjtable.push({name:'电机温度2',edz:'110',yxfw:'0-135',qz:'0.0083'});
+            this.bjtable.push({name:'电机温度3',edz:'110',yxfw:'0-135',qz:'0.0083'});
+            this.bjtable.push({name:'变浆控制柜温度1',edz:'52',yxfw:'0-65',qz:'0.0033'});
+            this.bjtable.push({name:'变浆控制柜温度2',edz:'52',yxfw:'0-65',qz:'0.0033'});
+            this.bjtable.push({name:'变浆控制柜温度3',edz:'52',yxfw:'0-65',qz:'0.0033'});
+            this.zktable.push({name:'塔底柜温度',edz:'40',yxfw:'0-50',qz:'0.75'});
+            this.zktable.push({name:'塔顶机舱柜温度',edz:'60',yxfw:'0-75',qz:'0.25'});
+            
+
+        },
+        changeTableSort(column){
+          this.orderByColumn = column.prop;
+          if(column.order == "descending"){
+            this.isAsc = 'desc';
+          }else if(column.order == "ascending"){
+            this.isAsc = "asc";
+          }
+        }, 
+        getData(){
+            this.qxpclData = [];
+            this.qxpcljzzData = [];
+            this.fdlData = [];
+            this.wtid = this.$route.query.wtid;
+            this.recorddate = this.$route.query.recorddate;
+            console.log(this.recorddate)
+            var healthForm = new URLSearchParams();
+            healthForm.append('wtId',this.wtid);
+            healthForm.append('recorddate',this.recorddate);
+            this.API.post('/report/healthReport',healthForm).then((res) =>{
+                console.log(res.data)
+                this.qxpclChart = res.data.sub;
+                if(res.data.main.gztop3name == '健康指标未达到推荐级别,故不在推荐范围之内'){
+                    this.tjdiv = false;
+                }else{
+                    this.tjdiv = true;
+                }
+                for(let i=0;i<this.qxpclChart.length;i++){
+                    this.djpgjb = this.qxpclChart[0].djpgjb;
+                    this.qxpclData.push(this.qxpclChart[i].qxpcl);
+                    this.qxpcljzzData.push(this.qxpclChart[i].qxpcljzz);
+                    let datechart = new Date(this.qxpclChart[i].recodedate);
+                    this.xqxpcldata.push(this.BASE.getBzDate(datechart, 0));
+                    this.$nextTick(function() {
+                        this.getChartDataImport('chartHistogram')
+                    })
+                }
+                this.conclusion = res.data.main.gztop3name;
+                this.highfrequency = res.data.main.top1type;
+                this.intermediatefrequency = res.data.main.top2type;
+                this.lowfrequency = res.data.main.top3type;
+                this.windspeed = res.data.main.speed;
+                this.tools = res.data.main.tools;
+                this.mainhour = res.data.main.mainhour;
+                this.mainmethod = res.data.main.mainmethod;
+                this.maindate = res.data.main.maindate;
+                let date = new Date(this.maindate);
+                this.maindate = this.BASE.getBzDate(date, 0);
+                this.bgcjdate = res.data.main.recodedate;
+                let datebg = new Date(this.bgcjdate);
+                this.bgcjdate = this.BASE.getBzDate(datebg, 0);
+                this.approach = res.data.main.approach;
+                this.mainreason = res.data.main.mainreason;
+            })
+            var healthFormCharts = new URLSearchParams();
+            healthFormCharts.append('wtId',this.wtid);
+            healthFormCharts.append('partId','fdj');
+            healthFormCharts.append('recorddate',this.recorddate);
+            this.API.post('/report/healthReportChart',healthFormCharts).then((res) =>{
+                this.fdlChart = res.data;
+                for(let i=0;i<this.fdlChart.length;i++){
+                    this.fdlData.push(this.fdlChart[i].value);
+                    let datefdlchart = new Date(this.fdlChart[i].recorddate);
+                    this.xfdldata.push(this.BASE.getBzDate(datefdlchart, 0));
+                    this.$nextTick(function() {
+                        this.getChartDataImport2('chartHistogram2')
+                    })
+                }
+            })
+            var gearboxCharts = new URLSearchParams();
+            gearboxCharts.append('wtId',this.wtid);
+            gearboxCharts.append('partId','clx');
+            gearboxCharts.append('recorddate',this.recorddate);
+            this.API.post('/report/healthReportChart',gearboxCharts).then((res) =>{
+                this.clxChart = res.data;
+                for(let i=0;i<this.clxChart.length;i++){
+                    this.clxData.push(this.clxChart[i].value);
+                    let dateclxchart = new Date(this.clxChart[i].recorddate);
+                    this.xclxdata.push(this.BASE.getBzDate(dateclxchart, 0));
+                    this.$nextTick(function() {
+                        this.getChartDataImport3('chartHistogram3')
+                    })
+                }
+            })
+            var PitchCharts = new URLSearchParams();
+            PitchCharts.append('wtId',this.wtid);
+            PitchCharts.append('partId','bj');
+            PitchCharts.append('recorddate',this.recorddate);
+            this.API.post('/report/healthReportChart',PitchCharts).then((res) =>{
+                this.bjChart = res.data;
+                for(let i=0;i<this.bjChart.length;i++){
+                    this.bjData.push(this.bjChart[i].value);
+                    let datebjchart = new Date(this.bjChart[i].recorddate);
+                    this.xbjdata.push(this.BASE.getBzDate(datebjchart, 0));
+                    this.$nextTick(function() {
+                        this.getChartDataImport4('chartHistogram4')
+                    })
+                }
+            })
+            var mastercontrolCharts = new URLSearchParams();
+            mastercontrolCharts.append('wtId',this.wtid);
+            mastercontrolCharts.append('partId','zk');
+            mastercontrolCharts.append('recorddate',this.recorddate);
+            this.API.post('/report/healthReportChart',mastercontrolCharts).then((res) =>{
+                this.zkChart = res.data;
+                console.log(this.zkChart)
+                for(let i=0;i<this.zkChart.length;i++){
+                    this.wtName = this.zkChart[0].wtname;
+                    this.zkData.push(this.zkChart[i].value);
+                    let datezkchart = new Date(this.zkChart[i].recorddate);
+                    this.xzkdata.push(this.BASE.getBzDate(datezkchart, 0))
+                    this.$nextTick(function() {
+                        this.getChartDataImport5('chartHistogram5')
+                    })
+                }
+            })
+        },
+        getChartDataImport(){
+            this.ECLZX.getHealthCurve("chartHistogram",['曲线偏差率', '基准值'],
+            this.xqxpcldata,this.qxpclData,this.qxpcljzzData);
+        },
+        getChartDataImport2(){
+            this.max = 5;
+            this.ECLZX.getHealthTrendChart("chartHistogram2",['发电量健康走势'],
+            this.xfdldata,this.max,this.fdlData);
+        },
+         getChartDataImport3(){
+            this.max = 1;
+            this.ECLZX.getHealthTrendChart("chartHistogram3",['齿轮箱健康走势'],
+            this.xclxdata,this.max,this.clxData);
+        },
+        getChartDataImport4(){
+            this.max = 5;
+            this.ECLZX.getHealthTrendChart("chartHistogram4",['变桨健康走势'],
+            this.xbjdata,this.max,this.bjData);
+        },
+        getChartDataImport5(){
+            this.max = 5;
+            this.ECLZX.getHealthTrendChart("chartHistogram5",['主控健康走势'],
+            this.xzkdata,this.max,this.zkData);
+        },
+        goReturn(){
+            this.$router.push('/healthAssessment')
+        },
+    }
+}

+ 348 - 0
src/assets/js/index/index.js

@@ -0,0 +1,348 @@
+import bdMap from "@components/index/map"
+import websocket from "@tools/webSocket"
+export default {
+  data() {
+    return {
+      
+    }
+  },
+  components: {
+    bdMap
+  },
+  mounted: function() {
+    this.init();
+  },
+  methods: {
+    // 初始化
+    init() {
+      // websocket.init("/topic/popup");
+
+      this.ET.getBarsH("finishedPower",
+      ['月计划完成率1302%', '年计划完成率76%'],[
+        {
+          name: '月计划完成率',
+          type: 'bar',
+          barWidth: 12,
+          itemStyle: {
+            color: this.ET.color[0],
+            barBorderRadius: [0, 3, 3, 0] // 柱子圆角
+          },
+          data: [18203, 23489]
+        },
+        {
+          name: '年计划完成率',
+          type: 'bar',
+          barWidth: 12,
+          itemStyle: {
+            color: this.ET.color[2],
+            barBorderRadius: [0, 3, 3, 0] // 柱子圆角
+          },
+          data: [19325, 681807]
+        }
+      ]); // 完成电量
+
+      this.ET.getGaugesH("powerLoad",[
+        {
+          name: '转速',
+          type: 'gauge',
+          center: ['14%', '60%'],    // 默认全局居中
+          radius: '60%',
+          min: 0,
+          max: 100,
+          startAngle: 180, // 开始角度
+          endAngle: 0, // 结束角度
+          splitNumber: 2, // 分段
+          axisLine: { // 坐标轴线
+            lineStyle: { // 属性lineStyle控制线条样式
+              width: 12,
+              color: [ // 设置分段颜色
+                [0.5, "#69db7c"],
+                [0.8, "#ffa94d"],
+                [1, "#ff6b6b"]
+              ]
+            }
+          },
+          axisLabel: {
+            distance: -5, // 标签与刻度线的距离。
+            formatter: function (value) {
+              return Math.ceil(value);
+            }
+          },
+          axisTick: { // 坐标轴小标记
+            show: false,
+          },
+          splitLine: { // 分隔线
+            show: false,
+          },
+          pointer: {
+            width: 5
+          },
+          title: {
+            offsetCenter: [0, '30%'], // x, y,单位px
+          },
+          detail: { // 当前指示数值
+            fontSize: 16,
+            offsetCenter: [0, '-120%'],
+            formatter: '{value}m/s'
+          },
+          data: [{ value: 34, name: '风速' }]
+        },
+        {
+          name: '转速',
+          type: 'gauge',
+          center: ['38%', '60%'], // 默认全局居中
+          radius: '60%',
+          min: 0,
+          max: 600,
+          startAngle: 180, // 开始角度
+          endAngle: 0, // 结束角度
+          splitNumber: 2, // 分段
+          axisLine: { // 坐标轴线
+            lineStyle: { // 属性lineStyle控制线条样式
+              width: 12,
+              color: [ // 设置分段颜色
+                [0.5, "#69db7c"],
+                [0.8, "#ffa94d"],
+                [1, "#ff6b6b"]
+              ]
+            }
+          },
+          axisLabel: {
+            distance: -5, // 标签与刻度线的距离。
+            formatter: function (value) {
+              return Math.ceil(value);
+            }
+          },
+          axisTick: {            // 坐标轴小标记
+            show: false,
+          },
+          splitLine: {           // 分隔线
+            show: false,
+          },
+          pointer: {
+            width: 5
+          },
+          title: {
+            offsetCenter: [0, '30%'],       // x, y,单位px
+          },
+          detail: { // 当前指示数值
+            fontSize: 16,
+            offsetCenter: [0, '-120%'],
+            formatter: '{value}MW'
+          },
+          data: [{ value: 341, name: '保证功率' }]
+        },
+        {
+          name: '转速',
+          type: 'gauge',
+          center: ['62%', '60%'],    // 默认全局居中
+          radius: '60%',
+          min: 0,
+          max: 600,
+          startAngle: 180, // 开始角度
+          endAngle: 0, // 结束角度
+          splitNumber: 2, // 分段
+          axisLine: {            // 坐标轴线
+            lineStyle: {       // 属性lineStyle控制线条样式
+              width: 12,
+              color: [ // 设置分段颜色
+                [0.5, "#69db7c"],
+                [0.8, "#ffa94d"],
+                [1, "#ff6b6b"]
+              ]
+            }
+          },
+          axisLabel: {
+            distance: -5, // 标签与刻度线的距离。
+            formatter: function (value) {
+              return Math.ceil(value);
+            }
+          },
+          axisTick: {            // 坐标轴小标记
+            show: false,
+          },
+          splitLine: {           // 分隔线
+            show: false,
+          },
+          pointer: {
+            width: 5
+          },
+          title: {
+            offsetCenter: [0, '30%'],       // x, y,单位px
+          },
+          detail: { // 当前指示数值
+            fontSize: 16,
+            offsetCenter: [0, '-120%'],
+            formatter: '{value}MW'
+          },
+          data: [{ value: 134, name: '应发功率' }]
+        },
+        {
+          name: '转速',
+          type: 'gauge',
+          center: ['86%', '60%'],    // 默认全局居中
+          radius: '60%',
+          min: 0,
+          max: 600,
+          startAngle: 180, // 开始角度
+          endAngle: 0, // 结束角度
+          splitNumber: 2, // 分段
+          axisLine: {            // 坐标轴线
+            lineStyle: {       // 属性lineStyle控制线条样式
+              width: 12,
+              color: [ // 设置分段颜色
+                [0.5, "#69db7c"],
+                [0.8, "#ffa94d"],
+                [1, "#ff6b6b"]
+              ]
+            }
+          },
+          axisLabel: {
+            distance: -5, // 标签与刻度线的距离。
+            formatter: function (value) {
+              return Math.ceil(value);
+            }
+          },
+          axisTick: {            // 坐标轴小标记
+            show: false,
+          },
+          splitLine: {           // 分隔线
+            show: false,
+          },
+          pointer: {
+            width: 5
+          },
+          title: {
+            offsetCenter: [0, '30%'],       // x, y,单位px
+          },
+          detail: { // 当前指示数值
+            fontSize: 16,
+            offsetCenter: [0, '-120%'],
+            formatter: '{value}MW'
+          },
+          data: [{ value: 234, name: '实发功率' }]
+        },
+      ]); // 功率负荷
+
+      this.ET.getLine("powerLine",[{
+        name: '应发功率(单位:MW)',
+        icon: "rect"
+      },{
+        name: '实发功率(单位:MW)',
+        icon: "rect"
+      },{
+        name: '理论功率(单位:MW)',
+        icon: "rect"
+      },{
+        name: '预测功率(单位:MW)',
+        icon: "rect"
+      },{
+        name: '保证功率(单位:MW)',
+        icon: "rect"
+      },{
+        name: '最优功率(单位:MW)',
+        icon: "rect"
+      },{
+        name: '平均风速/日照强度',
+        icon: "rect"
+      }],
+      ['00\n00', '00\n30','01\n00', '01\n30','02\n00', '02\n30','03\n00', '03\n30'],[
+        {
+          name: '应发功率(单位:MW)',
+          type: 'line',
+          smooth: true, // 平滑
+          symbol: "circle", // 拐点图形
+          symbolSize: 1,
+          data: [120, 1321, 101, 1324, 901, 2310, 1110]
+        },
+        {
+          name: '实发功率(单位:MW)',
+          type: 'line',
+          smooth: true,
+          symbol: "circle", // 拐点图形
+          symbolSize: 1,
+          data: [2220, 182, 191, 234, 290, 330, 310]
+        },
+        {
+          name: '理论功率(单位:MW)',
+          type: 'line',
+          smooth: true,
+          symbol: "circle", // 拐点图形
+          symbolSize: 1,
+          data: [1520, 232, 201, 154, 190, 330, 410]
+        },
+        {
+          name: '预测功率(单位:MW)',
+          type: 'line',
+          smooth: true,
+          symbol: "circle", // 拐点图形
+          symbolSize: 1,
+          data: [3230.45, 332, 301, 334, 390, 330, 320]
+        },
+        {
+          name: '保证功率(单位:MW)',
+          type: 'line',
+          smooth: true,
+          symbol: "circle", // 拐点图形
+          symbolSize: 1,
+          data: [2230, 932, 901, 934, 1290, 1330, 1320]
+        },
+        {
+          name: '最优功率(单位:MW)',
+          type: 'line',
+          smooth: true,
+          symbol: "circle", // 拐点图形
+          symbolSize: 1,
+          data: [820, 932, 901, 934, 1290, 1330, 1320]
+        },
+        {
+          name: '平均风速/日照强度',
+          type: 'line',
+          smooth: true,
+          symbol: "circle", // 拐点图形
+          symbolSize: 1,
+          yAxisIndex: 1,
+          data: [10, 2, 1, 14, 12, 13, 10]
+        }
+      ]); // 功率曲线
+
+      this.ET.getBarsV("dayPowerTotal",[{
+        name: '日发电量(单位:万kWh)',
+        icon: "rect"
+      },{
+        name: '上网电量(单位:万kWh)',
+        icon: "rect"
+      },{
+        name: '购网电量(单位:万kWh)',
+        icon: "rect"
+      },{
+        name: '风速',
+        icon: "rect"
+      }],
+      ['1日', '2日', '3日', '4日', '5日', '6日', '7日', '8日', '9日', '10日', '11日', '12日', '13日', '14日', '15日'], [
+        {
+          name: '日发电量(单位:万kWh)',
+          type: 'bar',
+          data: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
+        },
+        {
+          name: '上网电量(单位:万kWh)',
+          type: 'bar',
+          data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
+        },
+        {
+          name: '购网电量(单位:万kWh)',
+          type: 'bar',
+          data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
+        },
+        {
+          name: '风速',
+          type: 'bar',
+          yAxisIndex: 1,
+          data: [2.6, 5.9, 9.0, 26.4, 28.7, 7.7, 15.6, 8.2, 8.7, 18.8, 6.0, 2.3],
+        }
+      ]); // 日发电量
+
+    },
+  }
+}

+ 362 - 0
src/assets/js/lossBenchmarking/InterValueLineTable.js

@@ -0,0 +1,362 @@
+export default {
+    data(){
+        return{
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            tableData: [{
+                date: '2016-05-02',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1518 弄'
+            }, {
+                date: '2016-05-04',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1517 弄'
+            }, {
+                date: '2016-05-01',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1519 弄'
+            }, {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            }],
+            options: [],
+            tableSwitch:false,
+            value: '',
+            value2: '',
+            timedate: [],
+            multipleSelection:[],
+            multipleSelection1:[],
+            multipleSelection2:[],
+            orderByColumn:'',
+            isAsc:'asc',
+            fdcLineData:[],
+            fdcLineData2:[],
+            currentPage2: 1,
+            pagesize: 10,
+            cid:[],
+            cid1:'',
+            cid2:'',
+            wpId:[],
+            beginDate:'',
+            endDate:'',
+            dialogTableVisible:false,
+            sortInOrder:[],
+            sortInOrderTop:[],
+            fdcName1:'',
+            fdcName2:'',
+            sortInOrde2:[],
+            getTableData:[],
+            updateTime:'',
+            updateTime1:'',
+        }
+    },
+    filters: {
+      rounding (value) {
+      return value.toFixed(2)
+      }
+    },
+    created(){
+        this.getDataLine();
+    },
+    methods:{
+        queryApData() {
+            this.getDataLine();
+        },
+        queryApDataMx() {
+            this.dialogTableVisible = true;
+            if (this.multipleSelection1.length + this.multipleSelection2.length == 2) {
+              this.multipleSelection = this.multipleSelection1.concat(this.multipleSelection2);
+            } else {
+              this.$message.error("请选两个风场!");
+              return;
+            }
+            console.log(this.multipleSelection)
+            if(this.multipleSelection.length==2){
+              this.fdcName1 = this.multipleSelection[0].wtName;
+              this.fdcName2 = this.multipleSelection[1].wtName;
+              this.sortInOrder.push(this.multipleSelection[0].fnlyl,this.multipleSelection[0].xqjsl,
+              this.multipleSelection[0].ztzhjsl,this.multipleSelection[0].fwjsl,this.multipleSelection[0].slssl,
+              this.multipleSelection[0].xnssl,this.multipleSelection[0].qfl,this.multipleSelection[0].jxssl,
+              this.multipleSelection[0].gzssl);
+              this.sortInOrderTop.push(this.multipleSelection[1].fnlyl,this.multipleSelection[1].xqjsl,
+              this.multipleSelection[1].ztzhjsl,this.multipleSelection[1].fwjsl,this.multipleSelection[1].slssl,
+              this.multipleSelection[1].xnssl,this.multipleSelection[1].qfl,this.multipleSelection[1].jxssl,
+              this.multipleSelection[1].gzssl);
+              for(let i=0;i<this.multipleSelection.length;i++){
+              this.sortInOrde2.push({product:this.multipleSelection[i].wtName,'限电损失电量单位:万KWh':this.multipleSelection[i].xdss,
+                    '故障损失电量单位:万KWh':this.multipleSelection[i].gzss,'检修损失电量单位:万KWh':this.multipleSelection[i].jxssl,
+                    '性能损失电量单位:万KWh':this.multipleSelection[i].xnssl,'受累损失电量单位:万KWh':this.multipleSelection[i].slss});
+              }
+              this.getTableData.push({index:'发电量',data1:this.multipleSelection[0].scadafdl,data2:this.multipleSelection[1].scadafdl});
+              this.getTableData.push({index:'故障损失电量',data1:this.multipleSelection[0].gzss,data2:this.multipleSelection[1].gzss});
+              this.getTableData.push({index:'检修损失电量',data1:this.multipleSelection[0].jxssl,data2:this.multipleSelection[1].jxssl});
+              this.getTableData.push({index:'性能未达标损失电量',data1:this.multipleSelection[0].xnsslfraction,data2:this.multipleSelection[1].xnsslfraction});
+              this.getTableData.push({index:'受累损失电量',data1:this.multipleSelection[0].slss,data2:this.multipleSelection[1].slss});
+              this.getTableData.push({index:'风能利用率',data1:this.multipleSelection[0].fnlyl,data2:this.multipleSelection[1].fnlyl});
+              this.getTableData.push({index:'故障损失率',data1:this.multipleSelection[0].gzssl,data2:this.multipleSelection[1].gzssl});
+              this.getTableData.push({index:'检修损失率',data1:this.multipleSelection[0].jxssl,data2:this.multipleSelection[1].jxssl});
+              this.getTableData.push({index:'弃风率',data1:this.multipleSelection[0].qfl,data2:this.multipleSelection[1].qfl});
+              this.getTableData.push({index:'性能损失率',data1:this.multipleSelection[0].xnssl,data2:this.multipleSelection[1].xnssl});
+              this.getTableData.push({index:'受累损失率',data1:this.multipleSelection[0].slssl,data2:this.multipleSelection[1].slssl});
+              this.getTableData.push({index:'复位及时率',data1:this.multipleSelection[0].fwjsl,data2:this.multipleSelection[1].fwjsl});
+              this.getTableData.push({index:'消缺及时率',data1:this.multipleSelection[0].xqjsl,data2:this.multipleSelection[1].xqjsl});
+              this.getTableData.push({index:'状态转换率',data1:this.multipleSelection[0].ztzhjsl,data2:this.multipleSelection[1].ztzhjsl});        
+            }
+            this.$nextTick(function() {
+                this.drawPie('leiDaTu3')
+            })
+            this.$nextTick(function() {
+                this.drawPie2('leiDaTu4')
+            })
+        },
+        getDataLine(){
+          this.API.get('/powercompare/windfarmAjax').then((res) => {
+              this.options = res.data;
+          })
+          this.wpId = this.$route.query.wpId;
+          this.cid = this.$route.query.cid;
+          console.log(this.wpId)
+          if(this.value == ''){
+            if(this.wpId.length == 2){
+              this.tableSwitch = true;
+              this.value = this.wpId[0];
+              this.value2 = this.wpId[1];
+              this.cid1 = this.cid[0];
+              this.cid2 = this.cid[1];
+              this.FiveLossTableData1();
+            }else{
+              this.value = this.wpId;
+              this.cid1 = this.cid;
+              this.FiveLossTableData1();
+            }
+          }else{
+              this.FiveLossTableData1();
+          }
+        },
+        FiveLossTableData1(){
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);
+            if(this.timedate == ''){
+              this.timedate[0] = this.updateTime1;
+              this.timedate[1] = this.updateTime;
+              this.beginDate = this.timedate[0];
+              this.endDate = this.timedate[1];
+            }else{
+              this.beginDate = this.timedate[0];
+              this.endDate = this.timedate[1];
+            }
+            var interValueLineData = new URLSearchParams();
+            interValueLineData.append('pageNum',this.currentPage2);
+            interValueLineData.append('pageSize',this.pagesize);
+            interValueLineData.append('orderByColumn',this.orderByColumn);
+            interValueLineData.append('isAsc',this.isAsc);
+            interValueLineData.append('cid',this.cid1);
+            interValueLineData.append('beginDate',this.beginDate);
+            interValueLineData.append('endDate',this.endDate);
+            interValueLineData.append('wpId',this.value);
+            this.API.post('/contrast/benchmarkZjWtList',interValueLineData).then((res) => {
+              console.log(res)
+              this.fdcLineData = res.data;
+          })
+          this.FiveLossTableData2();
+        },
+        FiveLossTableData2(){
+            if(this.timedate == ''){
+              this.timedate[0] = this.updateTime1;
+              this.timedate[1] = this.updateTime;
+              this.beginDate = this.timedate[0];
+              this.endDate = this.timedate[1];
+            }else{
+              this.beginDate = this.timedate[0];
+              this.endDate = this.timedate[1];
+            }
+            if(this.value2.length > 0){
+                this.tableSwitch = true;
+            }else{
+                this.tableSwitch = false;
+            }
+            var interValueLineData = new URLSearchParams();
+            interValueLineData.append('pageNum',this.currentPage2);
+            interValueLineData.append('pageSize',this.pagesize);
+            interValueLineData.append('orderByColumn',this.orderByColumn);
+            interValueLineData.append('isAsc',this.isAsc);
+            interValueLineData.append('cid',this.cid2);
+            interValueLineData.append('beginDate',this.beginDate);
+            interValueLineData.append('endDate',this.endDate);
+            interValueLineData.append('wpId',this.value2);
+            this.API.post('/contrast/benchmarkZjWtList',interValueLineData).then((res) => {
+             this.fdcLineData2 = res.data;
+          })
+        },
+        headStyle() {
+			    return "text-align:center"
+		    },
+        handleSelectionChange(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection1 = [];
+            this.multipleSelection1 = val;
+        },
+        handleSelectionChange2(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection2 = [];
+            this.multipleSelection2 = val;
+        },
+        changeTableSort(column){
+          this.orderByColumn = column.prop;
+          if(column.order == "descending"){
+            this.isAsc = 'desc';
+          }else if(column.order == "ascending"){
+            this.isAsc = "asc";
+          }
+          this.getDataLine();
+        },
+        drawPie() {
+            var charts;
+            if (charts != null && charts != "" && charts != undefined){
+                charts.dispose();
+            }
+            charts= this.$echarts.init(document.getElementById('leiDaTu3'));
+            let option = {
+              title: {
+            // text: '对标排名分析',
+            left: 'center'
+        },
+        tooltip: {},
+        // legend: {
+        //     data: ['预算分配(Allocated Budget)', '实际开销(Actual Spending)'],
+        //     left: 'right'
+        // },
+        radar: {
+            // shape: 'circle',
+            name: {
+                textStyle: {
+                    color: '#fff',
+                    backgroundColor: '#999',
+                    borderRadius: 3,
+                    padding: [3, 5]
+                }
+            },
+            indicator: [
+                { name: '风能利用率', max: 150},
+                { name: '消缺及时率', max: 150},
+                { name: '状态转换率', max: 150},
+                { name: '复位及时率', max: 150},
+                { name: '受累损失率', max: 150},
+                { name: '性能损失率', max: 150},
+                { name: '弃风率', max: 150},
+                { name: '检修损失率', max: 150},
+                { name: '故障损失率', max: 150},
+            ]
+        },
+        series: [{
+            name: '预算 vs 开销(Budget vs spending)',
+            type: 'radar',
+            // areaStyle: {normal: {}},
+            data: [
+                {
+                    value: this.sortInOrder,
+                    name:this.fdcName1
+                },
+                {
+                    value: this.sortInOrderTop,
+                    name: this.fdcName2
+                }
+            ]
+        }]
+            }
+            charts.clear();
+            charts.setOption(option);
+            
+          },
+          drawPie2() {
+            var charts2;
+            if (charts2 != null && charts2 != "" && charts2 != undefined){
+                charts2.dispose();
+            }
+            charts2= this.$echarts.init(document.getElementById('leiDaTu4'));
+            let option2 = {
+              legend: {
+                  orient: 'vertical',
+                  left: 'right'
+              },
+              tooltip: {},
+              dataset: {
+                  dimensions: ['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'],
+                  source: this.sortInOrde2
+              },
+              xAxis: {type: 'category'},
+              yAxis: {},
+              series: [
+                  {
+                        // barGap:'100%',/*多个并排柱子设置柱子之间的间距*/
+                        type: 'bar',
+                        barWidth : 30,
+                        itemStyle:{
+                            normal:{
+                                color:'#D201D8'
+                            }
+                        }
+                    },
+                    {
+                        
+                        type: 'bar',
+                        barWidth : 30,
+                        itemStyle:{
+                            normal:{
+                                color:'#FD0100'
+                            }
+                        }
+                    },
+                    {
+                        
+                        type: 'bar',
+                        barWidth : 30,
+                        itemStyle:{
+                            normal:{
+                                color:'#FF7B16'
+                            }
+                        }
+                    },
+                    {
+                        
+                        type: 'bar',
+                        barWidth : 30,
+                        itemStyle:{
+                            normal:{
+                                color:'#8085E9'
+                            }
+                        }
+                    },
+                    {
+                        type: 'bar',
+                        barWidth : 30,
+                        itemStyle:{
+                            normal:{
+                                color:'#A6A6A6'
+                            }
+                        }
+                    },
+              ]
+                  }
+                  charts2.clear();
+                  charts2.setOption(option2);
+            
+          },
+          goReturn(){
+            this.$router.push('/interValue')
+          },
+          toExcel(){}
+          }
+
+}

+ 252 - 0
src/assets/js/lossBenchmarking/fiveLossLineTable.js

@@ -0,0 +1,252 @@
+export default {
+    data() {
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            tableData: [{
+                date: '2016-05-02',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1518 弄'
+            }, {
+                date: '2016-05-04',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1517 弄'
+            }, {
+                date: '2016-05-01',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1519 弄'
+            }, {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            }],
+            fdcLineData2: [],
+            options: [{
+                value: 'MHS_FDC',
+                label: '麻黄山风电场'
+            }, {
+                value: 'NSS_FDC',
+                label: '牛首山风电场'
+            },
+            {
+                value: 'SBQ_FDC',
+                label: '石板泉风电场'
+            },
+            {
+                value: 'QS_FDC',
+                label: '青山风电场'
+            },
+            {
+                value: 'XS_FDC',
+                label: '香山风电场'
+            }],
+            value: '',
+            value2: '',
+            valueAll: '',
+            timedate: [],
+            timedate2: [],
+            multipleSelection: [],
+            multipleSelection1: [],
+            multipleSelection2: [],
+            orderByColumn: '',
+            isAsc: 'asc',
+            fdcLineData: [],
+            currentPage2: 1,
+            pagesize: 10,
+            tableSwitch: false,
+            wpId: '',
+            beginDate: '',
+            beginDate2: '',
+            endDate: '',
+            endDate2: '',
+            dialogTableVisible: false,
+            sortInOrder: [],
+            sortInOrderTop: [],
+            fdcName1: '',
+            fdcName2: '',
+            sortInOrde2: [],
+            getTableData: [],
+        }
+    },
+    filters: {
+        rounding(value) {
+            return value.toFixed(2)
+        }
+    },
+    created() {
+        this.FiveLossTableData();
+    },
+    methods: {
+        queryApData() {
+            this.FiveLossTableData();
+        },
+        queryApDataMx() {
+            this.dialogTableVisible = true;
+            if (this.multipleSelection1.length + this.multipleSelection2.length == 2) {
+                this.multipleSelection = this.multipleSelection1.concat(this.multipleSelection2);
+            } else {
+                this.$message.error("请选两个风场!");
+                return;
+            }
+            console.log(this.multipleSelection)
+            if (this.multipleSelection.length == 2) {
+                this.fdcName1 = this.multipleSelection[0].wtName;
+                this.fdcName2 = this.multipleSelection[1].wtName;
+                this.sortInOrder.push(this.multipleSelection[0].fnlyl, this.multipleSelection[0].xqjsl,
+                    this.multipleSelection[0].ztzhjsl, this.multipleSelection[0].fwjsl, this.multipleSelection[0].slssl,
+                    this.multipleSelection[0].xnssl, this.multipleSelection[0].qfl, this.multipleSelection[0].jxssl,
+                    this.multipleSelection[0].gzssl);
+                this.sortInOrderTop.push(this.multipleSelection[1].fnlyl, this.multipleSelection[1].xqjsl,
+                    this.multipleSelection[1].ztzhjsl, this.multipleSelection[1].fwjsl, this.multipleSelection[1].slssl,
+                    this.multipleSelection[1].xnssl, this.multipleSelection[1].qfl, this.multipleSelection[1].jxssl,
+                    this.multipleSelection[1].gzssl);
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.sortInOrde2.push({
+                        product: this.multipleSelection[i].wtName, '限电损失电量单位:万KWh': this.multipleSelection[i].xdss,
+                        '故障损失电量单位:万KWh': this.multipleSelection[i].gzss, '检修损失电量单位:万KWh': this.multipleSelection[i].jxssl,
+                        '性能损失电量单位:万KWh': this.multipleSelection[i].xnssl, '受累损失电量单位:万KWh': this.multipleSelection[i].slss
+                    });
+                }
+                this.getTableData.push({ index: '发电量', data1: this.multipleSelection[0].scadafdl, data2: this.multipleSelection[1].scadafdl });
+                this.getTableData.push({ index: '故障损失电量', data1: this.multipleSelection[0].gzss, data2: this.multipleSelection[1].gzss });
+                this.getTableData.push({ index: '检修损失电量', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '性能未达标损失电量', data1: this.multipleSelection[0].xnsslfraction, data2: this.multipleSelection[1].xnsslfraction });
+                this.getTableData.push({ index: '受累损失电量', data1: this.multipleSelection[0].slss, data2: this.multipleSelection[1].slss });
+                this.getTableData.push({ index: '风能利用率', data1: this.multipleSelection[0].fnlyl, data2: this.multipleSelection[1].fnlyl });
+                this.getTableData.push({ index: '故障损失率', data1: this.multipleSelection[0].gzssl, data2: this.multipleSelection[1].gzssl });
+                this.getTableData.push({ index: '检修损失率', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '弃风率', data1: this.multipleSelection[0].qfl, data2: this.multipleSelection[1].qfl });
+                this.getTableData.push({ index: '性能损失率', data1: this.multipleSelection[0].xnssl, data2: this.multipleSelection[1].xnssl });
+                this.getTableData.push({ index: '受累损失率', data1: this.multipleSelection[0].slssl, data2: this.multipleSelection[1].slssl });
+                this.getTableData.push({ index: '复位及时率', data1: this.multipleSelection[0].fwjsl, data2: this.multipleSelection[1].fwjsl });
+                this.getTableData.push({ index: '消缺及时率', data1: this.multipleSelection[0].xqjsl, data2: this.multipleSelection[1].xqjsl });
+                this.getTableData.push({ index: '状态转换率', data1: this.multipleSelection[0].ztzhjsl, data2: this.multipleSelection[1].ztzhjsl });
+            }
+            this.$nextTick(function () {
+                this.drawPie('leiDaTu3')
+            })
+            this.$nextTick(function () {
+                this.drawPie2('leiDaTu4')
+            })
+        },
+        FiveLossTableData() {
+            this.API.get('/powercompare/windfarmAjax').then((res) => {
+                this.options = res.data;
+            })
+            this.wpId = this.$route.query.wpId;
+            if (this.value == '') {
+                if (this.wpId.length == 2) {
+                    this.tableSwitch = true;
+                    this.value = this.wpId[0];
+                    this.value2 = this.wpId[1];
+                    this.FiveLossTableDataTable1();
+                } else {
+                    this.value = this.wpId;
+                    this.FiveLossTableDataTable1();
+                }
+            } else {
+                this.FiveLossTableDataTable1();
+            }
+        },
+        FiveLossTableDataTable1() {
+            if (this.timedate == '') {
+                this.timedate[0] = this.$route.query.beginDate;
+                this.timedate[1] = this.$route.query.endDate;
+                this.beginDate = this.$route.query.beginDate;
+                this.endDate = this.$route.query.endDate;
+            } else {
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var fiveLossLineDatatable1 = new URLSearchParams();
+            fiveLossLineDatatable1.append('pageNum', this.currentPage2);
+            fiveLossLineDatatable1.append('pageSize', this.pagesize);
+            fiveLossLineDatatable1.append('orderByColumn', this.orderByColumn);
+            fiveLossLineDatatable1.append('isAsc', this.isAsc);
+            fiveLossLineDatatable1.append('wpId', this.value);
+            fiveLossLineDatatable1.append('beginDate', this.beginDate);
+            fiveLossLineDatatable1.append('endDate', this.endDate);
+            this.API.post('/contrast/benchmarkWtList', fiveLossLineDatatable1).then((res) => {
+                this.fdcLineData = res.data;
+            })
+            this.FiveLossTableDataTable2();
+        },
+        FiveLossTableDataTable2() {
+            if (this.timedate == '') {
+                this.beginDate = this.$route.query.beginDate;
+                this.endDate = this.$route.query.endDate;
+            } else {
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            console.log(this.value2.length)
+            if (this.value2.length > 0) {
+                this.tableSwitch = true;
+            } else {
+                this.tableSwitch = false;
+            }
+            var fiveLossLineDatatable2 = new URLSearchParams();
+            fiveLossLineDatatable2.append('pageNum', this.currentPage2);
+            fiveLossLineDatatable2.append('pageSize', this.pagesize);
+            fiveLossLineDatatable2.append('orderByColumn', this.orderByColumn);
+            fiveLossLineDatatable2.append('isAsc', this.isAsc);
+            fiveLossLineDatatable2.append('wpId', this.value2);
+            fiveLossLineDatatable2.append('beginDate', this.beginDate);
+            fiveLossLineDatatable2.append('endDate', this.endDate);
+            this.API.post('/contrast/benchmarkWtList', fiveLossLineDatatable2).then((res) => {
+                this.fdcLineData2 = res.data;
+            })
+        },
+        headStyle() {
+            return "text-align:center"
+        },
+        handleSelectionChange(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection1 = [];
+            this.multipleSelection1 = val;
+        },
+        handleSelectionChange2(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection2 = [];
+            this.multipleSelection2 = val;
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.FiveLossTableData();
+        },
+        drawPie() {
+            this.ECLZX.getFiveLossRadarMap("leiDaTu3",[
+                {
+                    value: this.sortInOrder,
+                    name: this.fdcName1
+                },
+                {
+                    value: this.sortInOrderTop,
+                    name: this.fdcName2
+                }
+            ]);
+        },
+        drawPie2() {
+            this.ECLZX.getFiveLossRadarHistogram("leiDaTu4",['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'],this.sortInOrde2);
+        },
+        goReturn() {
+            this.$router.push('/fiveLossRates')
+        },
+        toExcel() { }
+    }
+
+}

+ 293 - 0
src/assets/js/lossBenchmarking/fiveLossRates.js

@@ -0,0 +1,293 @@
+import FiveLossRatesPieChart from '@views/lossBenchmarking/fiveLossRatesPieChart';
+import FiveLossRatesHistogramChart from '@views/lossBenchmarking/fiveLossRatesHistogramChart.vue';
+export default {
+    data() {
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            timedate: [
+                // {beginDate:'2021-01-01'},
+                // {endDate:'2021-01-04'}
+            ],
+            isAsc: 'asc',
+            beginDate: '',
+            endDate: '',
+            gridData: [],
+            multipleSelection: [],
+            sortInOrder: [],
+            sortInOrderTop: [],
+            sortInOrde2: [],
+            getTableData: [],
+            sortInOrderTop2: [],
+            fdcName1: '',
+            fdcName2: '',
+            currentPage2: 1,
+            pagesize: 10,
+            fdcLineData: '',
+            classification: [{
+                id: 'qf',
+                label: '弃风率'
+            }, {
+                id: 'gz',
+                label: '故障损失率'
+            },
+            {
+                id: 'jx',
+                label: '检修损失率'
+            },
+            {
+                id: 'xn',
+                label: '性能损失率'
+            },
+            {
+                id: 'sl',
+                label: '受累损失率'
+            }],
+            options: [{
+                value: 'MHS_FDC',
+                label: '麻黄山风电场'
+            }, {
+                value: 'NSS_FDC',
+                label: '牛首山风电场'
+            },
+            {
+                value: 'SBQ_FDC',
+                label: '石板泉风电场'
+            },
+            {
+                value: 'QS_FDC',
+                label: '青山风电场'
+            },
+            {
+                value: 'XS_FDC',
+                label: '香山风电场'
+            }],
+            value: '',
+            value2: 'gz',
+            wpId: [],
+            wpName: [],
+            updateTime1: '',
+            updateTime: '',
+            orderByColumn: '',
+            dialogTableVisible: false,
+            lineDataOption: [],
+            tableData: [{
+                date: '2016-05-02',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1518 弄'
+            }, {
+                date: '2016-05-04',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1517 弄'
+            }, {
+                date: '2016-05-01',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1519 弄'
+            }, {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            },
+            {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            },
+            {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            }]
+
+        }
+    },
+    components: {
+        FiveLossRatesPieChart: FiveLossRatesPieChart,
+        FiveLossRatesHistogramChart: FiveLossRatesHistogramChart
+    },
+    created() {
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+        this.FiveLossInformation();
+    },
+    methods: {
+        headStyle() {
+            return "text-align:center"
+        },
+        onSubmit() {
+            console.log("submit!");
+        },
+        handleClick() { },
+        deleteRow(index, rows) {
+            rows.splice(index, 1);
+        },
+        queryApData() {
+            this.FiveLossInformation();
+        },
+        handleEdit(a, b) {
+            this.wpId = [];
+            this.lineDataOption = [];
+            if (this.multipleSelection.length == 2) {
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.wpId.push(this.multipleSelection[i].wpId)
+                    this.wpName.push(this.multipleSelection[i].wpName)
+                    this.lineDataOption.push({ id: this.multipleSelection[i].wpId, name: this.multipleSelection[i].wpName })
+                }
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: this.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: this.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            } else {
+                console.log(b)
+                this.lineDataOption.push({ id: b.wpId, name: b.wpName })
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: b.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: b.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            }
+        },
+        checkwindfarm() {
+            if (this.formInline.windfarm == "") {
+                this.$message.error("请选择风场!");
+                return;
+            }
+        },
+        checkproject() {
+            if (this.formInline.project == "") {
+                this.$message.error("请选择项目!");
+                return;
+            }
+            if (new Date(this.timedate) == null) {
+                this.$message.error("请选择时间");
+                return;
+            }
+        },
+        queryApDataMx() {
+            this.dialogTableVisible = true;
+            this.$nextTick(function () {
+                this.drawPie('leiDaTu')
+            })
+            this.$nextTick(function () {
+                this.drawPie2('leiDaTu2')
+            })
+        },
+        handleSelectionChange(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection = val;
+            if (this.multipleSelection.length == 2) {
+                this.fdcName1 = this.multipleSelection[0].wpName;
+                this.fdcName2 = this.multipleSelection[1].wpName;
+                this.sortInOrder.push(this.multipleSelection[0].fnlyl, this.multipleSelection[0].xqjsl,
+                    this.multipleSelection[0].ztzhjsl, this.multipleSelection[0].fwjsl, this.multipleSelection[0].slssl,
+                    this.multipleSelection[0].xnssl, this.multipleSelection[0].qfl, this.multipleSelection[0].jxssl,
+                    this.multipleSelection[0].gzssl);
+                this.sortInOrderTop.push(this.multipleSelection[1].fnlyl, this.multipleSelection[1].xqjsl,
+                    this.multipleSelection[1].ztzhjsl, this.multipleSelection[1].fwjsl, this.multipleSelection[1].slssl,
+                    this.multipleSelection[1].xnssl, this.multipleSelection[1].qfl, this.multipleSelection[1].jxssl,
+                    this.multipleSelection[1].gzssl);
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.sortInOrde2.push({
+                        product: this.multipleSelection[i].wpName, '限电损失电量单位:万KWh': this.multipleSelection[i].xdss,
+                        '故障损失电量单位:万KWh': this.multipleSelection[i].gzss, '检修损失电量单位:万KWh': this.multipleSelection[i].jxssl,
+                        '性能损失电量单位:万KWh': this.multipleSelection[i].xnssl, '受累损失电量单位:万KWh': this.multipleSelection[i].slss
+                    });
+                }
+                this.getTableData.push({ index: '发电量', data1: this.multipleSelection[0].fdl, data2: this.multipleSelection[1].fdl });
+                this.getTableData.push({ index: '故障损失电量', data1: this.multipleSelection[0].gzss, data2: this.multipleSelection[1].gzss });
+                this.getTableData.push({ index: '检修损失电量', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '性能未达标损失电量', data1: this.multipleSelection[0].xnsslfraction, data2: this.multipleSelection[1].xnsslfraction });
+                this.getTableData.push({ index: '受累损失电量', data1: this.multipleSelection[0].slss, data2: this.multipleSelection[1].slss });
+                this.getTableData.push({ index: '风能利用率', data1: this.multipleSelection[0].fnlyl, data2: this.multipleSelection[1].fnlyl });
+                this.getTableData.push({ index: '故障损失率', data1: this.multipleSelection[0].gzssl, data2: this.multipleSelection[1].gzssl });
+                this.getTableData.push({ index: '检修损失率', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '弃风率', data1: this.multipleSelection[0].qfl, data2: this.multipleSelection[1].qfl });
+                this.getTableData.push({ index: '性能损失率', data1: this.multipleSelection[0].xnssl, data2: this.multipleSelection[1].xnssl });
+                this.getTableData.push({ index: '受累损失率', data1: this.multipleSelection[0].slssl, data2: this.multipleSelection[1].slssl });
+                this.getTableData.push({ index: '复位及时率', data1: this.multipleSelection[0].fwjsl, data2: this.multipleSelection[1].fwjsl });
+                this.getTableData.push({ index: '消缺及时率', data1: this.multipleSelection[0].xqjsl, data2: this.multipleSelection[1].xqjsl });
+                this.getTableData.push({ index: '状态转换率', data1: this.multipleSelection[0].ztzhjsl, data2: this.multipleSelection[1].ztzhjsl });
+            }
+        },
+        handleCurrentChange(val) {
+            // console.log(`当前页: ${val}`);
+        },
+        handleSizeChange(val) {
+            console.log(`每页 ${val} 条`);
+            this.pagesize = val;
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.FiveLossInformation();
+        },
+        FiveLossInformation() {
+            let that = this;
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);
+            if (this.timedate == '') {
+                this.timedate[0] = this.updateTime1;
+                this.timedate[1] = this.updateTime;
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            } else {
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var fiveLossData = new URLSearchParams();
+            fiveLossData.append('pageNum', this.currentPage2);
+            fiveLossData.append('pageSize', this.pagesize);
+            fiveLossData.append('orderByColumn', this.orderByColumn);
+            fiveLossData.append('isAsc', this.isAsc);
+            fiveLossData.append('wpId', this.value);
+            fiveLossData.append('beginDate', this.beginDate);
+            fiveLossData.append('endDate', this.endDate);
+            this.API.post('/contrast/benchmarkLossList', fiveLossData).then((res) => {
+                that.gridData = res.data;
+                that.$refs.FiveLossRatesPieChart.getPackageData(that.gridData,that.value2);
+                that.$refs.FiveLossRatesHistogramChart.getPackageData2(that.gridData);
+            })
+        },
+        drawPie() {
+            this.ECLZX.getFiveLossRadarMap("leiDaTu",[
+                {
+                    value: this.sortInOrder,
+                    name: this.fdcName1
+                },
+                {
+                    value: this.sortInOrderTop,
+                    name: this.fdcName2
+                }
+            ]);
+        },
+        drawPie2() {
+            this.ECLZX.getFiveLossRadarHistogram("leiDaTu2",['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'],this.sortInOrde2);
+        },
+        toExcel() { }
+    },
+}

+ 25 - 0
src/assets/js/lossBenchmarking/fiveLossRatesHistogramChart.js

@@ -0,0 +1,25 @@
+import * as echarts from "echarts";
+export default {
+    data(){
+        return {
+            getChartData:[]
+        }
+    },
+    components:{
+
+    },
+    methods:{
+        getPackageData2(gridData){
+            this.getChartData = [];
+            for(let i=0;i<gridData.length;i++){
+                this.getChartData.push({product:gridData[i].wpName,'限电损失电量单位:万KWh':gridData[i].xdss,
+                '故障损失电量单位:万KWh':gridData[i].gzss,'检修损失电量单位:万KWh':gridData[i].jxssl,
+                '性能损失电量单位:万KWh':gridData[i].xnssl,'受累损失电量单位:万KWh':gridData[i].slss})
+            }
+            this.getChartDataImport();
+        },
+        getChartDataImport(){
+            this.ECLZX.getFiveLossHistogram("chartHistogram",['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'],this.getChartData);
+        }
+    },
+}

+ 62 - 0
src/assets/js/lossBenchmarking/fiveLossRatesPieChart.js

@@ -0,0 +1,62 @@
+export default {
+  data() {
+    return {
+      getChartDataValue: [],
+      getChartDataValue2: [],
+      chartsAName2: "",
+    };
+  },
+  methods: {
+    getPackageData(gridData, value2) {
+      this.getChartDataValue = [];
+      this.getChartDataValue2 = [];
+      console.log(value2);
+      for (let i = 0; i < gridData.length; i++) {
+        this.getChartDataValue.push({
+          value: gridData[i].fdl,
+          name: gridData[i].wpName,
+        });
+        if (value2 == "gz") {
+          this.chartsAName2 = "故障损失占比";
+          this.getChartDataValue2.push({
+            value: gridData[i].gzss,
+            name: gridData[i].wpName,
+          });
+        } else if (value2 == "xn") {
+          this.chartsAName2 = "性能损失占比";
+          this.getChartDataValue2.push({
+            value: gridData[i].qfss,
+            name: gridData[i].wpName,
+          });
+        } else if (value2 == "qf") {
+          this.chartsAName2 = "弃风率占比";
+          this.getChartDataValue2.push({
+            value: gridData[i].qfl,
+            name: gridData[i].wpName,
+          });
+        } else if (value2 == "jx") {
+          this.chartsAName2 = "检修损失占比";
+          this.getChartDataValue2.push({
+            value: gridData[i].whss,
+            name: gridData[i].wpName,
+          });
+        } else if (value2 == "sl") {
+          this.chartsAName2 = "受累损失占比";
+          this.getChartDataValue2.push({
+            value: gridData[i].slss,
+            name: gridData[i].wpName,
+          });
+        }
+      }
+      
+      this.getChartDataImport();
+      
+    },
+    getChartDataImport() {
+      // console.log(this.getChartDataValue)
+      this.ECLZX.getFiveLossSectorLeft("chartPie",this.getChartDataValue);
+      this.ECLZX.getFiveLossSectorRight("chartPieRight",this.chartsAName2,this.getChartDataValue2);
+      
+    },
+  },
+};

+ 354 - 0
src/assets/js/lossBenchmarking/interValue.js

@@ -0,0 +1,354 @@
+export default {
+    data() {
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            options: [{
+                value: 'MHS_FDC',
+                label: '麻黄山风电场'
+            }, {
+                value: 'NSS_FDC',
+                label: '牛首山风电场'
+            },
+            {
+                value: 'SBQ_FDC',
+                label: '石板泉风电场'
+            },
+            {
+                value: 'QS_FDC',
+                label: '青山风电场'
+            },
+            {
+                value: 'XS_FDC',
+                label: '香山风电场'
+            }],
+            value: "",
+            value2: "",
+            value3: "",
+            value4: "",
+            ortInOrder: [],
+            sortInOrderTop: [],
+            sortInOrde2: [],
+            getTableData: [],
+            fdcName1: '',
+            fdcName2: '',
+            dialogTableVisible: false,
+            year: "",
+            month: "",
+            cid: [],
+            wpId: [],
+            options2: [
+                {
+                    value: '1',
+                    label: '一值'
+                }, {
+                    value: '2',
+                    label: '二值'
+                },
+                {
+                    value: '3',
+                    label: '三值'
+                },
+
+            ],
+            classification: [{
+                id: 'qf',
+                label: '弃风率'
+            }, {
+                id: 'gz',
+                label: '故障损失率'
+            },
+            {
+                id: 'jx',
+                label: '检修损失率'
+            },
+            {
+                id: 'xn',
+                label: '性能损失率'
+            },
+            {
+                id: 'sl',
+                label: '受累损失率'
+            }],
+            multipleSelection: [],
+            getTableDataAll: [],
+            pagesize: 10,
+            currentPage2: 1,
+            orderByColumn: '',
+            isAsc: 'asc',
+            doesExist: 'no',
+            tableData: []
+        }
+    },
+    created() {
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+                this.options = res.data;
+        })
+        this.InterValueDatainitial();
+    },
+    methods: {
+        headStyle() {
+            return "text-align:center"
+        },
+        queryApData() {
+            this.InterValueData();
+        },
+        queryApDataMx() {
+            this.dialogTableVisible = true;
+            this.$nextTick(function () {
+                this.drawPie('leiDaTu')
+            })
+            this.$nextTick(function () {
+                this.drawPie2('leiDaTu2')
+            })
+        },
+        handleEdit(a, b) {
+            this.cid = [];
+            this.wpId = [];
+            if (this.multipleSelection.length == 2) {
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.cid.push(this.multipleSelection[i].cid)
+                    this.wpId.push(this.multipleSelection[i].wpId)
+                }
+                this.$router.push({
+                    path: '/interValueLineTable',
+                    query: {
+                        cid: this.cid,
+                        wpId: this.wpId
+                    }
+                })
+            }
+            else {
+                console.log(b)
+                this.$router.push({
+                    path: '/interValueLineTable',
+                    query: {
+                        cid: b.cid,
+                        wpId: b.wpId
+                    }
+                })
+
+            }
+        },
+        handleSelectionChange(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection = val;
+            if (this.multipleSelection.length == 2) {
+                this.fdcName1 = this.multipleSelection[0].wpName;
+                this.fdcName2 = this.multipleSelection[1].wpName;
+                this.sortInOrder.push(this.multipleSelection[0].fnlyl, this.multipleSelection[0].xqjsl,
+                    this.multipleSelection[0].ztzhjsl, this.multipleSelection[0].fwjsl, this.multipleSelection[0].slssl,
+                    this.multipleSelection[0].xnssl, this.multipleSelection[0].qfl, this.multipleSelection[0].jxssl,
+                    this.multipleSelection[0].gzssl);
+                this.sortInOrderTop.push(this.multipleSelection[1].fnlyl, this.multipleSelection[1].xqjsl,
+                    this.multipleSelection[1].ztzhjsl, this.multipleSelection[1].fwjsl, this.multipleSelection[1].slssl,
+                    this.multipleSelection[1].xnssl, this.multipleSelection[1].qfl, this.multipleSelection[1].jxssl,
+                    this.multipleSelection[1].gzssl);
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.sortInOrde2.push({
+                        product: this.multipleSelection[i].wpName, '限电损失电量单位:万KWh': this.multipleSelection[i].xdss,
+                        '故障损失电量单位:万KWh': this.multipleSelection[i].gzss, '检修损失电量单位:万KWh': this.multipleSelection[i].jxssl,
+                        '性能损失电量单位:万KWh': this.multipleSelection[i].xnssl, '受累损失电量单位:万KWh': this.multipleSelection[i].slss
+                    });
+                }
+                this.getTableData.push({ index: '发电量', data1: this.multipleSelection[0].fdl, data2: this.multipleSelection[1].fdl });
+                this.getTableData.push({ index: '故障损失电量', data1: this.multipleSelection[0].gzss, data2: this.multipleSelection[1].gzss });
+                this.getTableData.push({ index: '检修损失电量', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '性能未达标损失电量', data1: this.multipleSelection[0].xnsslfraction, data2: this.multipleSelection[1].xnsslfraction });
+                this.getTableData.push({ index: '受累损失电量', data1: this.multipleSelection[0].slss, data2: this.multipleSelection[1].slss });
+                this.getTableData.push({ index: '风能利用率', data1: this.multipleSelection[0].fnlyl, data2: this.multipleSelection[1].fnlyl });
+                this.getTableData.push({ index: '故障损失率', data1: this.multipleSelection[0].gzssl, data2: this.multipleSelection[1].gzssl });
+                this.getTableData.push({ index: '检修损失率', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '弃风率', data1: this.multipleSelection[0].qfl, data2: this.multipleSelection[1].qfl });
+                this.getTableData.push({ index: '性能损失率', data1: this.multipleSelection[0].xnssl, data2: this.multipleSelection[1].xnssl });
+                this.getTableData.push({ index: '受累损失率', data1: this.multipleSelection[0].slssl, data2: this.multipleSelection[1].slssl });
+                this.getTableData.push({ index: '复位及时率', data1: this.multipleSelection[0].fwjsl, data2: this.multipleSelection[1].fwjsl });
+                this.getTableData.push({ index: '消缺及时率', data1: this.multipleSelection[0].xqjsl, data2: this.multipleSelection[1].xqjsl });
+                this.getTableData.push({ index: '状态转换率', data1: this.multipleSelection[0].ztzhjsl, data2: this.multipleSelection[1].ztzhjsl });
+            }
+
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.InterValueDatainitial();
+        },
+        InterValueDatainitial() {
+            this.API.get('/powercompare/windfarmAjax').then((res) => {
+                this.options = res.data;
+            })
+            this.doesExist = 'no';
+            var valueData1 = new URLSearchParams();
+            valueData1.append('orderByColumn', this.orderByColumn);
+            valueData1.append('isAsc', this.isAsc);
+            this.API.post('/contrast/benchmarkZjList', valueData1).then((res) => {
+                console.log(res)
+                this.tableData = res.data;
+                // for(let i=0;i<this.tableData.length;i++){
+                //     this.getTableDataAll.push(this.tableData[i])
+                // }
+            })
+        },
+        InterValueData() {
+            this.doesExist = 'no';
+            var valueData = new URLSearchParams();
+            valueData.append('orderByColumn', this.orderByColumn);
+            valueData.append('isAsc', this.isAsc);
+            valueData.append('wpId', this.value);
+            valueData.append('year', this.value2);
+            valueData.append('month', this.value3);
+            valueData.append('zjs', this.value4)
+            this.API.post('/contrast/addBenchmarkZj', valueData).then((res) => {
+                console.log(res.data)
+                this.tableData.push(res.data[0]);
+            })
+        },
+        drawPie() {
+            var charts;
+            if (charts != null && charts != "" && charts != undefined) {
+                charts.dispose();
+            }
+            charts = this.$echarts.init(document.getElementById('leiDaTu'));
+            let option = {
+                title: {
+                    // text: '对标排名分析',
+                    left: 'center'
+                },
+                tooltip: {},
+                // legend: {
+                //     data: ['预算分配(Allocated Budget)', '实际开销(Actual Spending)'],
+                //     left: 'right'
+                // },
+                radar: {
+                    // shape: 'circle',
+                    name: {
+                        textStyle: {
+                            color: '#fff',
+                            backgroundColor: '#999',
+                            borderRadius: 3,
+                            padding: [3, 5]
+                        }
+                    },
+                    indicator: [
+                        { name: '风能利用率', max: 150 },
+                        { name: '消缺及时率', max: 150 },
+                        { name: '状态转换率', max: 150 },
+                        { name: '复位及时率', max: 150 },
+                        { name: '受累损失率', max: 150 },
+                        { name: '性能损失率', max: 150 },
+                        { name: '弃风率', max: 150 },
+                        { name: '检修损失率', max: 150 },
+                        { name: '故障损失率', max: 150 },
+                    ]
+                },
+                series: [{
+                    name: '预算 vs 开销(Budget vs spending)',
+                    type: 'radar',
+                    // areaStyle: {normal: {}},
+                    data: [
+                        {
+                            value: this.sortInOrder,
+                            name: this.fdcName1
+                        },
+                        {
+                            value: this.sortInOrderTop,
+                            name: this.fdcName2
+                        }
+                    ]
+                }]
+            }
+            charts.clear();
+            charts.setOption(option);
+
+        },
+        drawPie2() {
+            var charts2;
+            if (charts2 != null && charts2 != "" && charts2 != undefined) {
+                charts2.dispose();
+            }
+            charts2 = this.$echarts.init(document.getElementById('leiDaTu2'));
+            let option2 = {
+                legend: {
+                    orient: 'vertical',
+                    left: 'right'
+                },
+                tooltip: {},
+                dataset: {
+                    dimensions: ['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'],
+                    source: this.sortInOrde2
+                },
+                xAxis: { type: 'category' },
+                yAxis: {},
+                // Declare several bar series, each will be mapped
+                // to a column of dataset.source by default.
+                series: [
+                    {
+                        // barGap:'100%',/*多个并排柱子设置柱子之间的间距*/
+                        type: 'bar',
+                        barWidth: 30,
+                        itemStyle: {
+                            normal: {
+                                color: '#D201D8'
+                            }
+                        }
+                    },
+                    {
+
+                        type: 'bar',
+                        barWidth: 30,
+                        itemStyle: {
+                            normal: {
+                                color: '#FD0100'
+                            }
+                        }
+                    },
+                    {
+
+                        type: 'bar',
+                        barWidth: 30,
+                        itemStyle: {
+                            normal: {
+                                color: '#FF7B16'
+                            }
+                        }
+                    },
+                    {
+
+                        type: 'bar',
+                        barWidth: 30,
+                        itemStyle: {
+                            normal: {
+                                color: '#8085E9'
+                            }
+                        }
+                    },
+                    {
+                        type: 'bar',
+                        barWidth: 30,
+                        itemStyle: {
+                            normal: {
+                                color: '#A6A6A6'
+                            }
+                        }
+                    },
+                ]
+            }
+            charts2.clear();
+            charts2.setOption(option2);
+
+        },
+        clearAll() {
+            this.tableData = [];
+        }
+    }
+}

+ 233 - 0
src/assets/js/lossBenchmarking/lossRateAbandoned.js

@@ -0,0 +1,233 @@
+import FiveLossRatesPieChart from '@views/lossBenchmarking/fiveLossRatesPieChart';
+import FiveLossRatesHistogramChart from '@views/lossBenchmarking/fiveLossRatesHistogramChart.vue';
+export default {
+    data() {
+        return {
+            pickerOptions:{//禁用当前日期之前的日期
+                disabledDate(time) {
+                //Date.now()是javascript中的内置函数,它返回自1970年1月1日00:00:00 UTC以来经过的毫秒数。
+                    return time.getTime() > Date.now() - 8.64e7;
+                },
+            },
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            timedate: [],
+            isAsc: 'asc',
+            beginDate: '2021-01-01',
+            endDate: '2021-01-04',
+            gridData: "",
+            multipleSelection: [],
+            sortInOrder: [],
+            sortInOrderTop: [],
+            sortInOrde2: [],
+            getTableData: [],
+            sortInOrderTop2: [],
+            fdcName1: '',
+            fdcName2: '',
+            currentPage2: 1,
+            pagesize: 10,
+            fdcLineData: '',
+            options: [],
+            value: '',
+            value2: 'qf',
+            wpId: [],
+            wpName: [],
+            orderByColumn: '',
+            dialogTableVisible: false,
+            lineDataOption: [],
+            tableData: [],
+            updateTime: '',
+            updateTime1: '',
+
+        }
+    },
+    components: {
+        FiveLossRatesPieChart: FiveLossRatesPieChart,
+        FiveLossRatesHistogramChart: FiveLossRatesHistogramChart
+    },
+    created() {
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+        this.FiveLossInformation();
+    },
+    methods: {
+        headStyle() {
+            return "text-align:center"
+        },
+        onSubmit() {
+            console.log("submit!");
+        },
+        handleClick() { },
+        deleteRow(index, rows) {
+            rows.splice(index, 1);
+        },
+        queryApData() {
+            this.FiveLossInformation();
+        },
+        handleEdit(a, b) {
+            this.wpId = [];
+            this.lineDataOption = [];
+            if (this.multipleSelection.length == 2) {
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.wpId.push(this.multipleSelection[i].wpId)
+                    this.wpName.push(this.multipleSelection[i].wpName)
+                    this.lineDataOption.push({ id: this.multipleSelection[i].wpId, name: this.multipleSelection[i].wpName })
+                }
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: this.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: this.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            } else {
+                console.log(b)
+                this.lineDataOption.push({ id: b.wpId, name: b.wpName })
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: b.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: b.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            }
+        },
+        checkwindfarm() {
+            if (this.formInline.windfarm == "") {
+                this.$message.error("请选择风场!");
+                return;
+            }
+        },
+        checkproject() {
+            if (this.formInline.project == "") {
+                this.$message.error("请选择项目!");
+                return;
+            }
+            if (new Date(this.timedate) == null) {
+                this.$message.error("请选择时间");
+                return;
+            }
+        },
+        queryApDataMx() {
+            this.dialogTableVisible = true;
+            this.$nextTick(function () {
+                this.drawPie('leiDaTu')
+            })
+            this.$nextTick(function () {
+                this.drawPie2('leiDaTu2')
+            })
+        },
+        handleSelectionChange(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection = val;
+            if (this.multipleSelection.length == 2) {
+                this.fdcName1 = this.multipleSelection[0].wpName;
+                this.fdcName2 = this.multipleSelection[1].wpName;
+                this.sortInOrder.push(this.multipleSelection[0].fnlyl, this.multipleSelection[0].xqjsl,
+                    this.multipleSelection[0].ztzhjsl, this.multipleSelection[0].fwjsl, this.multipleSelection[0].slssl,
+                    this.multipleSelection[0].xnssl, this.multipleSelection[0].qfl, this.multipleSelection[0].jxssl,
+                    this.multipleSelection[0].gzssl);
+                this.sortInOrderTop.push(this.multipleSelection[1].fnlyl, this.multipleSelection[1].xqjsl,
+                    this.multipleSelection[1].ztzhjsl, this.multipleSelection[1].fwjsl, this.multipleSelection[1].slssl,
+                    this.multipleSelection[1].xnssl, this.multipleSelection[1].qfl, this.multipleSelection[1].jxssl,
+                    this.multipleSelection[1].gzssl);
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.sortInOrde2.push({
+                        product: this.multipleSelection[i].wpName, '限电损失电量单位:万KWh': this.multipleSelection[i].xdss,
+                        '故障损失电量单位:万KWh': this.multipleSelection[i].gzss, '检修损失电量单位:万KWh': this.multipleSelection[i].jxssl,
+                        '性能损失电量单位:万KWh': this.multipleSelection[i].xnssl, '受累损失电量单位:万KWh': this.multipleSelection[i].slss
+                    });
+                }
+                this.getTableData.push({ index: '发电量', data1: this.multipleSelection[0].fdl, data2: this.multipleSelection[1].fdl });
+                this.getTableData.push({ index: '故障损失电量', data1: this.multipleSelection[0].gzss, data2: this.multipleSelection[1].gzss });
+                this.getTableData.push({ index: '检修损失电量', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '性能未达标损失电量', data1: this.multipleSelection[0].xnsslfraction, data2: this.multipleSelection[1].xnsslfraction });
+                this.getTableData.push({ index: '受累损失电量', data1: this.multipleSelection[0].slss, data2: this.multipleSelection[1].slss });
+                this.getTableData.push({ index: '风能利用率', data1: this.multipleSelection[0].fnlyl, data2: this.multipleSelection[1].fnlyl });
+                this.getTableData.push({ index: '故障损失率', data1: this.multipleSelection[0].gzssl, data2: this.multipleSelection[1].gzssl });
+                this.getTableData.push({ index: '检修损失率', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '弃风率', data1: this.multipleSelection[0].qfl, data2: this.multipleSelection[1].qfl });
+                this.getTableData.push({ index: '性能损失率', data1: this.multipleSelection[0].xnssl, data2: this.multipleSelection[1].xnssl });
+                this.getTableData.push({ index: '受累损失率', data1: this.multipleSelection[0].slssl, data2: this.multipleSelection[1].slssl });
+                this.getTableData.push({ index: '复位及时率', data1: this.multipleSelection[0].fwjsl, data2: this.multipleSelection[1].fwjsl });
+                this.getTableData.push({ index: '消缺及时率', data1: this.multipleSelection[0].xqjsl, data2: this.multipleSelection[1].xqjsl });
+                this.getTableData.push({ index: '状态转换率', data1: this.multipleSelection[0].ztzhjsl, data2: this.multipleSelection[1].ztzhjsl });
+            }
+        },
+        handleCurrentChange(val) {
+            // console.log(`当前页: ${val}`);
+        },
+        handleSizeChange(val) {
+            console.log(`每页 ${val} 条`);
+            this.pagesize = val;
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.FiveLossInformation();
+        },
+        FiveLossInformation() {
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);
+            if (this.timedate == '') {
+                this.timedate[0] = this.updateTime1;
+                this.timedate[1] = this.updateTime;
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            } else {
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var fiveLossData = new URLSearchParams();
+            fiveLossData.append('pageNum', this.currentPage2);
+            fiveLossData.append('pageSize', this.pagesize);
+            fiveLossData.append('orderByColumn', this.orderByColumn);
+            fiveLossData.append('isAsc', this.isAsc);
+            fiveLossData.append('wpId', this.value);
+            fiveLossData.append('beginDate', this.beginDate);
+            fiveLossData.append('endDate', this.endDate);
+            this.API.post('/contrast/benchmarkLossList', fiveLossData).then((res) => {
+                this.gridData = res.data;
+                this.$refs.FiveLossRatesPieChart.getPackageData(this.gridData, this.value2);
+                this.$refs.FiveLossRatesHistogramChart.getPackageData2(this.gridData);
+            })
+        },
+        drawPie() {
+            this.ECLZX.getFiveLossRadarMap("leiDaTu", [
+                {
+                    value: this.sortInOrder,
+                    name: this.fdcName1
+                },
+                {
+                    value: this.sortInOrderTop,
+                    name: this.fdcName2
+                }
+            ]);
+        },
+        drawPie2() {
+            this.ECLZX.getFiveLossRadarHistogram("leiDaTu2",
+            ['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'], this.sortInOrde2);
+        },
+        toExcel() { }
+    },
+}

+ 230 - 0
src/assets/js/lossBenchmarking/lossRateAffected.js

@@ -0,0 +1,230 @@
+import FiveLossRatesPieChart from '@views/lossBenchmarking/fiveLossRatesPieChart';
+import FiveLossRatesHistogramChart from '@views/lossBenchmarking/fiveLossRatesHistogramChart.vue';
+export default {
+    data() {
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            timedate: [
+                // {beginDate:'2021-01-01'},
+                // {endDate:'2021-01-04'}
+            ],
+            isAsc: 'asc',
+            beginDate: '2021-01-01',
+            endDate: '2021-01-04',
+            gridData: "",
+            multipleSelection: [],
+            sortInOrder: [],
+            sortInOrderTop: [],
+            sortInOrde2: [],
+            getTableData: [],
+            sortInOrderTop2: [],
+            fdcName1: '',
+            fdcName2: '',
+            currentPage2: 1,
+            pagesize: 10,
+            fdcLineData: '',
+            options: [],
+            value: '',
+            value2: 'sl',
+            wpId: [],
+            wpName: [],
+            orderByColumn: '',
+            dialogTableVisible: false,
+            lineDataOption: [],
+            tableData: [],
+            updateTime:'',
+            updateTime1:'',
+
+        }
+    },
+    components: {
+        FiveLossRatesPieChart: FiveLossRatesPieChart,
+        FiveLossRatesHistogramChart: FiveLossRatesHistogramChart
+    },
+    created() {
+        this.FiveLossInformation();
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+    },
+    methods: {
+        headStyle() {
+            return "text-align:center"
+        },
+        onSubmit() {
+            console.log("submit!");
+        },
+        handleClick() { },
+        deleteRow(index, rows) {
+            rows.splice(index, 1);
+        },
+        queryApData() {
+            this.FiveLossInformation();
+        },
+        handleEdit(a, b) {
+            this.wpId = [];
+            this.lineDataOption = [];
+            if (this.multipleSelection.length == 2) {
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.wpId.push(this.multipleSelection[i].wpId)
+                    this.wpName.push(this.multipleSelection[i].wpName)
+                    this.lineDataOption.push({ id: this.multipleSelection[i].wpId, name: this.multipleSelection[i].wpName })
+                }
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: this.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: this.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            } else {
+                console.log(b)
+                this.lineDataOption.push({ id: b.wpId, name: b.wpName })
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: b.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: b.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            }
+        },
+        checkwindfarm() {
+            if (this.formInline.windfarm == "") {
+                this.$message.error("请选择风场!");
+                return;
+            }
+        },
+        checkproject() {
+            if (this.formInline.project == "") {
+                this.$message.error("请选择项目!");
+                return;
+            }
+            if (new Date(this.timedate) == null) {
+                this.$message.error("请选择时间");
+                return;
+            }
+        },
+        queryApDataMx() {
+            this.dialogTableVisible = true;
+            this.$nextTick(function () {
+                this.drawPie('leiDaTu')
+            })
+            this.$nextTick(function () {
+                this.drawPie2('leiDaTu2')
+            })
+        },
+        handleSelectionChange(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection = val;
+            if (this.multipleSelection.length == 2) {
+                this.fdcName1 = this.multipleSelection[0].wpName;
+                this.fdcName2 = this.multipleSelection[1].wpName;
+                this.sortInOrder.push(this.multipleSelection[0].fnlyl, this.multipleSelection[0].xqjsl,
+                    this.multipleSelection[0].ztzhjsl, this.multipleSelection[0].fwjsl, this.multipleSelection[0].slssl,
+                    this.multipleSelection[0].xnssl, this.multipleSelection[0].qfl, this.multipleSelection[0].jxssl,
+                    this.multipleSelection[0].gzssl);
+                this.sortInOrderTop.push(this.multipleSelection[1].fnlyl, this.multipleSelection[1].xqjsl,
+                    this.multipleSelection[1].ztzhjsl, this.multipleSelection[1].fwjsl, this.multipleSelection[1].slssl,
+                    this.multipleSelection[1].xnssl, this.multipleSelection[1].qfl, this.multipleSelection[1].jxssl,
+                    this.multipleSelection[1].gzssl);
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.sortInOrde2.push({
+                        product: this.multipleSelection[i].wpName, '限电损失电量单位:万KWh': this.multipleSelection[i].xdss,
+                        '故障损失电量单位:万KWh': this.multipleSelection[i].gzss, '检修损失电量单位:万KWh': this.multipleSelection[i].jxssl,
+                        '性能损失电量单位:万KWh': this.multipleSelection[i].xnssl, '受累损失电量单位:万KWh': this.multipleSelection[i].slss
+                    });
+                }
+                this.getTableData.push({ index: '发电量', data1: this.multipleSelection[0].fdl, data2: this.multipleSelection[1].fdl });
+                this.getTableData.push({ index: '故障损失电量', data1: this.multipleSelection[0].gzss, data2: this.multipleSelection[1].gzss });
+                this.getTableData.push({ index: '检修损失电量', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '性能未达标损失电量', data1: this.multipleSelection[0].xnsslfraction, data2: this.multipleSelection[1].xnsslfraction });
+                this.getTableData.push({ index: '受累损失电量', data1: this.multipleSelection[0].slss, data2: this.multipleSelection[1].slss });
+                this.getTableData.push({ index: '风能利用率', data1: this.multipleSelection[0].fnlyl, data2: this.multipleSelection[1].fnlyl });
+                this.getTableData.push({ index: '故障损失率', data1: this.multipleSelection[0].gzssl, data2: this.multipleSelection[1].gzssl });
+                this.getTableData.push({ index: '检修损失率', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '弃风率', data1: this.multipleSelection[0].qfl, data2: this.multipleSelection[1].qfl });
+                this.getTableData.push({ index: '性能损失率', data1: this.multipleSelection[0].xnssl, data2: this.multipleSelection[1].xnssl });
+                this.getTableData.push({ index: '受累损失率', data1: this.multipleSelection[0].slssl, data2: this.multipleSelection[1].slssl });
+                this.getTableData.push({ index: '复位及时率', data1: this.multipleSelection[0].fwjsl, data2: this.multipleSelection[1].fwjsl });
+                this.getTableData.push({ index: '消缺及时率', data1: this.multipleSelection[0].xqjsl, data2: this.multipleSelection[1].xqjsl });
+                this.getTableData.push({ index: '状态转换率', data1: this.multipleSelection[0].ztzhjsl, data2: this.multipleSelection[1].ztzhjsl });
+            }
+        },
+        handleCurrentChange(val) {
+            // console.log(`当前页: ${val}`);
+        },
+        handleSizeChange(val) {
+            console.log(`每页 ${val} 条`);
+            this.pagesize = val;
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.FiveLossInformation();
+        },
+        FiveLossInformation() {  
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);          
+            if (this.timedate == '') {
+                this.timedate[0] = this.updateTime1;
+                this.timedate[1] = this.updateTime;
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            } else {
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var fiveLossData = new URLSearchParams();
+            fiveLossData.append('pageNum', this.currentPage2);
+            fiveLossData.append('pageSize', this.pagesize);
+            fiveLossData.append('orderByColumn', this.orderByColumn);
+            fiveLossData.append('isAsc', this.isAsc);
+            fiveLossData.append('wpId', this.value);
+            fiveLossData.append('beginDate', this.beginDate);
+            fiveLossData.append('endDate', this.endDate);
+            this.API.post('/contrast/benchmarkLossList', fiveLossData).then((res) => {
+                this.gridData = res.data;
+                this.$refs.FiveLossRatesPieChart.getPackageData(this.gridData, this.value2);
+                this.$refs.FiveLossRatesHistogramChart.getPackageData2(this.gridData);
+            })
+        },
+        drawPie() {
+            this.ECLZX.getFiveLossRadarMap("leiDaTu", [
+                {
+                    value: this.sortInOrder,
+                    name: this.fdcName1
+                },
+                {
+                    value: this.sortInOrderTop,
+                    name: this.fdcName2
+                }
+            ]);
+        },
+        drawPie2() {
+            this.ECLZX.getFiveLossRadarHistogram("leiDaTu2",
+            ['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'], this.sortInOrde2);
+        },
+        toExcel() { }
+    },
+}

+ 230 - 0
src/assets/js/lossBenchmarking/lossRateFailure.js

@@ -0,0 +1,230 @@
+import FiveLossRatesPieChart from '@views/lossBenchmarking/fiveLossRatesPieChart';
+import FiveLossRatesHistogramChart from '@views/lossBenchmarking/fiveLossRatesHistogramChart.vue';
+export default {
+    data() {
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            timedate: [
+                // {beginDate:'2021-01-01'},
+                // {endDate:'2021-01-04'}
+            ],
+            isAsc: 'asc',
+            beginDate: '2021-01-01',
+            endDate: '2021-01-04',
+            gridData: "",
+            multipleSelection: [],
+            sortInOrder: [],
+            sortInOrderTop: [],
+            sortInOrde2: [],
+            getTableData: [],
+            sortInOrderTop2: [],
+            fdcName1: '',
+            fdcName2: '',
+            currentPage2: 1,
+            pagesize: 10,
+            fdcLineData: '',
+            options: [],
+            value: '',
+            value2: 'gz',
+            wpId: [],
+            wpName: [],
+            orderByColumn: '',
+            dialogTableVisible: false,
+            lineDataOption: [],
+            tableData: [],
+            updateTime: '',
+            updateTime1: '',
+
+
+        }
+    },
+    components: {
+        FiveLossRatesPieChart: FiveLossRatesPieChart,
+        FiveLossRatesHistogramChart: FiveLossRatesHistogramChart
+    },
+    created() {
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+        this.FiveLossInformation();
+    },
+    methods: {
+        headStyle() {
+            return "text-align:center"
+        },
+        onSubmit() {
+            console.log("submit!");
+        },
+        handleClick() { },
+        deleteRow(index, rows) {
+            rows.splice(index, 1);
+        },
+        queryApData() {
+            this.FiveLossInformation();
+        },
+        handleEdit(a, b) {
+            this.wpId = [];
+            this.lineDataOption = [];
+            if (this.multipleSelection.length == 2) {
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.wpId.push(this.multipleSelection[i].wpId)
+                    this.wpName.push(this.multipleSelection[i].wpName)
+                    this.lineDataOption.push({ id: this.multipleSelection[i].wpId, name: this.multipleSelection[i].wpName })
+                }
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: this.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: this.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            } else {
+                console.log(b)
+                this.lineDataOption.push({ id: b.wpId, name: b.wpName })
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: b.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: b.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            }
+        },
+        checkwindfarm() {
+            if (this.formInline.windfarm == "") {
+                this.$message.error("请选择风场!");
+                return;
+            }
+        },
+        checkproject() {
+            if (this.formInline.project == "") {
+                this.$message.error("请选择项目!");
+                return;
+            }
+            if (new Date(this.timedate) == null) {
+                this.$message.error("请选择时间");
+                return;
+            }
+        },
+        queryApDataMx() {
+            this.dialogTableVisible = true;
+            this.$nextTick(function () {
+                this.drawPie('leiDaTu')
+            })
+            this.$nextTick(function () {
+                this.drawPie2('leiDaTu2')
+            })
+        },
+        handleSelectionChange(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection = val;
+            if (this.multipleSelection.length == 2) {
+                this.fdcName1 = this.multipleSelection[0].wpName;
+                this.fdcName2 = this.multipleSelection[1].wpName;
+                this.sortInOrder.push(this.multipleSelection[0].fnlyl, this.multipleSelection[0].xqjsl,
+                    this.multipleSelection[0].ztzhjsl, this.multipleSelection[0].fwjsl, this.multipleSelection[0].slssl,
+                    this.multipleSelection[0].xnssl, this.multipleSelection[0].qfl, this.multipleSelection[0].jxssl,
+                    this.multipleSelection[0].gzssl);
+                this.sortInOrderTop.push(this.multipleSelection[1].fnlyl, this.multipleSelection[1].xqjsl,
+                    this.multipleSelection[1].ztzhjsl, this.multipleSelection[1].fwjsl, this.multipleSelection[1].slssl,
+                    this.multipleSelection[1].xnssl, this.multipleSelection[1].qfl, this.multipleSelection[1].jxssl,
+                    this.multipleSelection[1].gzssl);
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.sortInOrde2.push({
+                        product: this.multipleSelection[i].wpName, '限电损失电量单位:万KWh': this.multipleSelection[i].xdss,
+                        '故障损失电量单位:万KWh': this.multipleSelection[i].gzss, '检修损失电量单位:万KWh': this.multipleSelection[i].jxssl,
+                        '性能损失电量单位:万KWh': this.multipleSelection[i].xnssl, '受累损失电量单位:万KWh': this.multipleSelection[i].slss
+                    });
+                }
+                this.getTableData.push({ index: '发电量', data1: this.multipleSelection[0].fdl, data2: this.multipleSelection[1].fdl });
+                this.getTableData.push({ index: '故障损失电量', data1: this.multipleSelection[0].gzss, data2: this.multipleSelection[1].gzss });
+                this.getTableData.push({ index: '检修损失电量', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '性能未达标损失电量', data1: this.multipleSelection[0].xnsslfraction, data2: this.multipleSelection[1].xnsslfraction });
+                this.getTableData.push({ index: '受累损失电量', data1: this.multipleSelection[0].slss, data2: this.multipleSelection[1].slss });
+                this.getTableData.push({ index: '风能利用率', data1: this.multipleSelection[0].fnlyl, data2: this.multipleSelection[1].fnlyl });
+                this.getTableData.push({ index: '故障损失率', data1: this.multipleSelection[0].gzssl, data2: this.multipleSelection[1].gzssl });
+                this.getTableData.push({ index: '检修损失率', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '弃风率', data1: this.multipleSelection[0].qfl, data2: this.multipleSelection[1].qfl });
+                this.getTableData.push({ index: '性能损失率', data1: this.multipleSelection[0].xnssl, data2: this.multipleSelection[1].xnssl });
+                this.getTableData.push({ index: '受累损失率', data1: this.multipleSelection[0].slssl, data2: this.multipleSelection[1].slssl });
+                this.getTableData.push({ index: '复位及时率', data1: this.multipleSelection[0].fwjsl, data2: this.multipleSelection[1].fwjsl });
+                this.getTableData.push({ index: '消缺及时率', data1: this.multipleSelection[0].xqjsl, data2: this.multipleSelection[1].xqjsl });
+                this.getTableData.push({ index: '状态转换率', data1: this.multipleSelection[0].ztzhjsl, data2: this.multipleSelection[1].ztzhjsl });
+            }
+        },
+        handleCurrentChange(val) {
+            // console.log(`当前页: ${val}`);
+        },
+        handleSizeChange(val) {
+            console.log(`每页 ${val} 条`);
+            this.pagesize = val;
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.FiveLossInformation();
+        },
+        FiveLossInformation() {
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);
+            if (this.timedate == '') {
+                this.timedate[0] = this.updateTime1;
+                this.timedate[1] = this.updateTime;
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            } else {
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var fiveLossData = new URLSearchParams();
+            fiveLossData.append('pageNum', this.currentPage2);
+            fiveLossData.append('pageSize', this.pagesize);
+            fiveLossData.append('orderByColumn', this.orderByColumn);
+            fiveLossData.append('isAsc', this.isAsc);
+            fiveLossData.append('wpId', this.value);
+            fiveLossData.append('beginDate', this.beginDate);
+            fiveLossData.append('endDate', this.endDate);
+            this.API.post('/contrast/benchmarkLossList', fiveLossData).then((res) => {
+                this.gridData = res.data;
+                this.$refs.FiveLossRatesPieChart.getPackageData(this.gridData, this.value2);
+                this.$refs.FiveLossRatesHistogramChart.getPackageData2(this.gridData);
+            })
+        },
+        drawPie() {
+            this.ECLZX.getFiveLossRadarMap("leiDaTu", [
+                {
+                    value: this.sortInOrder,
+                    name: this.fdcName1
+                },
+                {
+                    value: this.sortInOrderTop,
+                    name: this.fdcName2
+                }
+            ]);
+        },
+        drawPie2() {
+            this.ECLZX.getFiveLossRadarHistogram("leiDaTu2", ['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'], this.sortInOrde2);
+        },
+        toExcel() { }
+    },
+}

+ 273 - 0
src/assets/js/lossBenchmarking/lossRateMaintenance.js

@@ -0,0 +1,273 @@
+import FiveLossRatesPieChart from '@views/lossBenchmarking/fiveLossRatesPieChart';
+import FiveLossRatesHistogramChart from '@views/lossBenchmarking/fiveLossRatesHistogramChart.vue';
+export default {
+    data() {
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            timedate: [
+                // {beginDate:'2021-01-01'},
+                // {endDate:'2021-01-04'}
+            ],
+            isAsc: 'asc',
+            beginDate: '2021-01-01',
+            endDate: '2021-01-04',
+            gridData: "",
+            multipleSelection: [],
+            sortInOrder: [],
+            sortInOrderTop: [],
+            sortInOrde2: [],
+            getTableData: [],
+            sortInOrderTop2: [],
+            fdcName1: '',
+            fdcName2: '',
+            currentPage2: 1,
+            pagesize: 10,
+            fdcLineData: '',
+            options: [{
+                value: 'MHS_FDC',
+                label: '麻黄山风电场'
+            }, {
+                value: 'NSS_FDC',
+                label: '牛首山风电场'
+            },
+            {
+                value: 'SBQ_FDC',
+                label: '石板泉风电场'
+            },
+            {
+                value: 'QS_FDC',
+                label: '青山风电场'
+            },
+            {
+                value: 'XS_FDC',
+                label: '香山风电场'
+            }],
+            value: '',
+            value2: 'jx',
+            wpId: [],
+            wpName: [],
+            orderByColumn: '',
+            dialogTableVisible: false,
+            lineDataOption: [],
+            tableData: [{
+                date: '2016-05-02',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1518 弄'
+            }, {
+                date: '2016-05-04',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1517 弄'
+            }, {
+                date: '2016-05-01',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1519 弄'
+            }, {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            },
+            {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            },
+            {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            }],
+            updateTime: '',
+            updateTime1: ''
+
+        }
+    },
+    components: {
+        FiveLossRatesPieChart: FiveLossRatesPieChart,
+        FiveLossRatesHistogramChart: FiveLossRatesHistogramChart
+    },
+    created() {
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+        this.FiveLossInformation();
+    },
+    methods: {
+        headStyle() {
+            return "text-align:center"
+        },
+        onSubmit() {
+            console.log("submit!");
+        },
+        handleClick() { },
+        deleteRow(index, rows) {
+            rows.splice(index, 1);
+        },
+        queryApData() {
+            this.FiveLossInformation();
+        },
+        handleEdit(a, b) {
+            this.wpId = [];
+            this.lineDataOption = [];
+            if (this.multipleSelection.length == 2) {
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.wpId.push(this.multipleSelection[i].wpId)
+                    this.wpName.push(this.multipleSelection[i].wpName)
+                    this.lineDataOption.push({ id: this.multipleSelection[i].wpId, name: this.multipleSelection[i].wpName })
+                }
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: this.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: this.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            } else {
+                console.log(b)
+                this.lineDataOption.push({ id: b.wpId, name: b.wpName })
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: b.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: b.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            }
+        },
+        checkwindfarm() {
+            if (this.formInline.windfarm == "") {
+                this.$message.error("请选择风场!");
+                return;
+            }
+        },
+        checkproject() {
+            if (this.formInline.project == "") {
+                this.$message.error("请选择项目!");
+                return;
+            }
+            if (new Date(this.timedate) == null) {
+                this.$message.error("请选择时间");
+                return;
+            }
+        },
+        queryApDataMx() {
+            this.dialogTableVisible = true;
+            this.$nextTick(function () {
+                this.drawPie('leiDaTu')
+            })
+            this.$nextTick(function () {
+                this.drawPie2('leiDaTu2')
+            })
+        },
+        handleSelectionChange(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection = val;
+            if (this.multipleSelection.length == 2) {
+                this.fdcName1 = this.multipleSelection[0].wpName;
+                this.fdcName2 = this.multipleSelection[1].wpName;
+                this.sortInOrder.push(this.multipleSelection[0].fnlyl, this.multipleSelection[0].xqjsl,
+                    this.multipleSelection[0].ztzhjsl, this.multipleSelection[0].fwjsl, this.multipleSelection[0].slssl,
+                    this.multipleSelection[0].xnssl, this.multipleSelection[0].qfl, this.multipleSelection[0].jxssl,
+                    this.multipleSelection[0].gzssl);
+                this.sortInOrderTop.push(this.multipleSelection[1].fnlyl, this.multipleSelection[1].xqjsl,
+                    this.multipleSelection[1].ztzhjsl, this.multipleSelection[1].fwjsl, this.multipleSelection[1].slssl,
+                    this.multipleSelection[1].xnssl, this.multipleSelection[1].qfl, this.multipleSelection[1].jxssl,
+                    this.multipleSelection[1].gzssl);
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.sortInOrde2.push({
+                        product: this.multipleSelection[i].wpName, '限电损失电量单位:万KWh': this.multipleSelection[i].xdss,
+                        '故障损失电量单位:万KWh': this.multipleSelection[i].gzss, '检修损失电量单位:万KWh': this.multipleSelection[i].jxssl,
+                        '性能损失电量单位:万KWh': this.multipleSelection[i].xnssl, '受累损失电量单位:万KWh': this.multipleSelection[i].slss
+                    });
+                }
+                this.getTableData.push({ index: '发电量', data1: this.multipleSelection[0].fdl, data2: this.multipleSelection[1].fdl });
+                this.getTableData.push({ index: '故障损失电量', data1: this.multipleSelection[0].gzss, data2: this.multipleSelection[1].gzss });
+                this.getTableData.push({ index: '检修损失电量', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '性能未达标损失电量', data1: this.multipleSelection[0].xnsslfraction, data2: this.multipleSelection[1].xnsslfraction });
+                this.getTableData.push({ index: '受累损失电量', data1: this.multipleSelection[0].slss, data2: this.multipleSelection[1].slss });
+                this.getTableData.push({ index: '风能利用率', data1: this.multipleSelection[0].fnlyl, data2: this.multipleSelection[1].fnlyl });
+                this.getTableData.push({ index: '故障损失率', data1: this.multipleSelection[0].gzssl, data2: this.multipleSelection[1].gzssl });
+                this.getTableData.push({ index: '检修损失率', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '弃风率', data1: this.multipleSelection[0].qfl, data2: this.multipleSelection[1].qfl });
+                this.getTableData.push({ index: '性能损失率', data1: this.multipleSelection[0].xnssl, data2: this.multipleSelection[1].xnssl });
+                this.getTableData.push({ index: '受累损失率', data1: this.multipleSelection[0].slssl, data2: this.multipleSelection[1].slssl });
+                this.getTableData.push({ index: '复位及时率', data1: this.multipleSelection[0].fwjsl, data2: this.multipleSelection[1].fwjsl });
+                this.getTableData.push({ index: '消缺及时率', data1: this.multipleSelection[0].xqjsl, data2: this.multipleSelection[1].xqjsl });
+                this.getTableData.push({ index: '状态转换率', data1: this.multipleSelection[0].ztzhjsl, data2: this.multipleSelection[1].ztzhjsl });
+            }
+        },
+        handleCurrentChange(val) {
+            // console.log(`当前页: ${val}`);
+        },
+        handleSizeChange(val) {
+            console.log(`每页 ${val} 条`);
+            this.pagesize = val;
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.FiveLossInformation();
+        },
+        FiveLossInformation() {
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);
+            if (this.timedate == '') {
+                this.timedate[0] = this.updateTime1;
+                this.timedate[1] = this.updateTime;
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            } else {
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var fiveLossData = new URLSearchParams();
+            fiveLossData.append('pageNum', this.currentPage2);
+            fiveLossData.append('pageSize', this.pagesize);
+            fiveLossData.append('orderByColumn', this.orderByColumn);
+            fiveLossData.append('isAsc', this.isAsc);
+            fiveLossData.append('wpId', this.value);
+            fiveLossData.append('beginDate', this.beginDate);
+            fiveLossData.append('endDate', this.endDate);
+            this.API.post('/contrast/benchmarkLossList', fiveLossData).then((res) => {
+                this.gridData = res.data;
+                this.$refs.FiveLossRatesPieChart.getPackageData(this.gridData, this.value2);
+                this.$refs.FiveLossRatesHistogramChart.getPackageData2(this.gridData);
+            })
+        },
+        drawPie() {
+            this.ECLZX.getFiveLossRadarMap("leiDaTu", [
+                {
+                    value: this.sortInOrder,
+                    name: this.fdcName1
+                },
+                {
+                    value: this.sortInOrderTop,
+                    name: this.fdcName2
+                }
+            ]);
+        },
+        drawPie2() {
+            this.ECLZX.getFiveLossRadarHistogram("leiDaTu2", ['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'], this.sortInOrde2);
+        },
+        toExcel() { }
+    },
+}

+ 273 - 0
src/assets/js/lossBenchmarking/lossRatePerformance.js

@@ -0,0 +1,273 @@
+import FiveLossRatesPieChart from '@views/lossBenchmarking/fiveLossRatesPieChart';
+import FiveLossRatesHistogramChart from '@views/lossBenchmarking/fiveLossRatesHistogramChart.vue';
+export default {
+    data() {
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            timedate: [
+                // {beginDate:'2021-01-01'},
+                // {endDate:'2021-01-04'}
+            ],
+            isAsc: 'asc',
+            beginDate: '2021-01-01',
+            endDate: '2021-01-04',
+            gridData: "",
+            multipleSelection: [],
+            sortInOrder: [],
+            sortInOrderTop: [],
+            sortInOrde2: [],
+            getTableData: [],
+            sortInOrderTop2: [],
+            fdcName1: '',
+            fdcName2: '',
+            currentPage2: 1,
+            pagesize: 10,
+            fdcLineData: '',
+            options: [{
+                value: 'MHS_FDC',
+                label: '麻黄山风电场'
+            }, {
+                value: 'NSS_FDC',
+                label: '牛首山风电场'
+            },
+            {
+                value: 'SBQ_FDC',
+                label: '石板泉风电场'
+            },
+            {
+                value: 'QS_FDC',
+                label: '青山风电场'
+            },
+            {
+                value: 'XS_FDC',
+                label: '香山风电场'
+            }],
+            value: '',
+            value2: 'xn',
+            wpId: [],
+            wpName: [],
+            orderByColumn: '',
+            dialogTableVisible: false,
+            lineDataOption: [],
+            tableData: [{
+                date: '2016-05-02',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1518 弄'
+            }, {
+                date: '2016-05-04',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1517 弄'
+            }, {
+                date: '2016-05-01',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1519 弄'
+            }, {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            },
+            {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            },
+            {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            }],
+            updateTime:'',
+            updateTime1:'',
+
+        }
+    },
+    components: {
+        FiveLossRatesPieChart: FiveLossRatesPieChart,
+        FiveLossRatesHistogramChart: FiveLossRatesHistogramChart
+    },
+    created() {
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+        this.FiveLossInformation();
+    },
+    methods: {
+        headStyle() {
+            return "text-align:center"
+        },
+        onSubmit() {
+            console.log("submit!");
+        },
+        handleClick() { },
+        deleteRow(index, rows) {
+            rows.splice(index, 1);
+        },
+        queryApData() {
+            this.FiveLossInformation();
+        },
+        handleEdit(a, b) {
+            this.wpId = [];
+            this.lineDataOption = [];
+            if (this.multipleSelection.length == 2) {
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.wpId.push(this.multipleSelection[i].wpId)
+                    this.wpName.push(this.multipleSelection[i].wpName)
+                    this.lineDataOption.push({ id: this.multipleSelection[i].wpId, name: this.multipleSelection[i].wpName })
+                }
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: this.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: this.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            } else {
+                console.log(b)
+                this.lineDataOption.push({ id: b.wpId, name: b.wpName })
+                console.log(this.lineDataOption)
+                this.$router.push({
+                    path: '/fiveLossLineTable',
+                    query: {
+                        wpId: b.wpId,
+                        beginDate: this.beginDate,
+                        endDate: this.endDate,
+                        wpName: b.wpName,
+                        select: this.lineDataOption
+                    }
+                })
+            }
+        },
+        checkwindfarm() {
+            if (this.formInline.windfarm == "") {
+                this.$message.error("请选择风场!");
+                return;
+            }
+        },
+        checkproject() {
+            if (this.formInline.project == "") {
+                this.$message.error("请选择项目!");
+                return;
+            }
+            if (new Date(this.timedate) == null) {
+                this.$message.error("请选择时间");
+                return;
+            }
+        },
+        queryApDataMx() {
+            this.dialogTableVisible = true;
+            this.$nextTick(function () {
+                this.drawPie('leiDaTu')
+            })
+            this.$nextTick(function () {
+                this.drawPie2('leiDaTu2')
+            })
+        },
+        handleSelectionChange(val) {
+            this.sortInOrder = [];
+            this.sortInOrderTop = [];
+            this.getTableData = [];
+            this.sortInOrde2 = [];
+            this.multipleSelection = val;
+            if (this.multipleSelection.length == 2) {
+                this.fdcName1 = this.multipleSelection[0].wpName;
+                this.fdcName2 = this.multipleSelection[1].wpName;
+                this.sortInOrder.push(this.multipleSelection[0].fnlyl, this.multipleSelection[0].xqjsl,
+                    this.multipleSelection[0].ztzhjsl, this.multipleSelection[0].fwjsl, this.multipleSelection[0].slssl,
+                    this.multipleSelection[0].xnssl, this.multipleSelection[0].qfl, this.multipleSelection[0].jxssl,
+                    this.multipleSelection[0].gzssl);
+                this.sortInOrderTop.push(this.multipleSelection[1].fnlyl, this.multipleSelection[1].xqjsl,
+                    this.multipleSelection[1].ztzhjsl, this.multipleSelection[1].fwjsl, this.multipleSelection[1].slssl,
+                    this.multipleSelection[1].xnssl, this.multipleSelection[1].qfl, this.multipleSelection[1].jxssl,
+                    this.multipleSelection[1].gzssl);
+                for (let i = 0; i < this.multipleSelection.length; i++) {
+                    this.sortInOrde2.push({
+                        product: this.multipleSelection[i].wpName, '限电损失电量单位:万KWh': this.multipleSelection[i].xdss,
+                        '故障损失电量单位:万KWh': this.multipleSelection[i].gzss, '检修损失电量单位:万KWh': this.multipleSelection[i].jxssl,
+                        '性能损失电量单位:万KWh': this.multipleSelection[i].xnssl, '受累损失电量单位:万KWh': this.multipleSelection[i].slss
+                    });
+                }
+                this.getTableData.push({ index: '发电量', data1: this.multipleSelection[0].fdl, data2: this.multipleSelection[1].fdl });
+                this.getTableData.push({ index: '故障损失电量', data1: this.multipleSelection[0].gzss, data2: this.multipleSelection[1].gzss });
+                this.getTableData.push({ index: '检修损失电量', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '性能未达标损失电量', data1: this.multipleSelection[0].xnsslfraction, data2: this.multipleSelection[1].xnsslfraction });
+                this.getTableData.push({ index: '受累损失电量', data1: this.multipleSelection[0].slss, data2: this.multipleSelection[1].slss });
+                this.getTableData.push({ index: '风能利用率', data1: this.multipleSelection[0].fnlyl, data2: this.multipleSelection[1].fnlyl });
+                this.getTableData.push({ index: '故障损失率', data1: this.multipleSelection[0].gzssl, data2: this.multipleSelection[1].gzssl });
+                this.getTableData.push({ index: '检修损失率', data1: this.multipleSelection[0].jxssl, data2: this.multipleSelection[1].jxssl });
+                this.getTableData.push({ index: '弃风率', data1: this.multipleSelection[0].qfl, data2: this.multipleSelection[1].qfl });
+                this.getTableData.push({ index: '性能损失率', data1: this.multipleSelection[0].xnssl, data2: this.multipleSelection[1].xnssl });
+                this.getTableData.push({ index: '受累损失率', data1: this.multipleSelection[0].slssl, data2: this.multipleSelection[1].slssl });
+                this.getTableData.push({ index: '复位及时率', data1: this.multipleSelection[0].fwjsl, data2: this.multipleSelection[1].fwjsl });
+                this.getTableData.push({ index: '消缺及时率', data1: this.multipleSelection[0].xqjsl, data2: this.multipleSelection[1].xqjsl });
+                this.getTableData.push({ index: '状态转换率', data1: this.multipleSelection[0].ztzhjsl, data2: this.multipleSelection[1].ztzhjsl });
+            }
+        },
+        handleCurrentChange(val) {
+            // console.log(`当前页: ${val}`);
+        },
+        handleSizeChange(val) {
+            console.log(`每页 ${val} 条`);
+            this.pagesize = val;
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.FiveLossInformation();
+        },
+        FiveLossInformation() {
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);
+            if (this.timedate == '') {
+                this.timedate[0] = this.updateTime1;
+                this.timedate[1] = this.updateTime;
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            } else {
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var fiveLossData = new URLSearchParams();
+            fiveLossData.append('pageNum', this.currentPage2);
+            fiveLossData.append('pageSize', this.pagesize);
+            fiveLossData.append('orderByColumn', this.orderByColumn);
+            fiveLossData.append('isAsc', this.isAsc);
+            fiveLossData.append('wpId', this.value);
+            fiveLossData.append('beginDate', this.beginDate);
+            fiveLossData.append('endDate', this.endDate);
+            this.API.post('/contrast/benchmarkLossList', fiveLossData).then((res) => {
+                this.gridData = res.data;
+                this.$refs.FiveLossRatesPieChart.getPackageData(this.gridData, this.value2);
+                this.$refs.FiveLossRatesHistogramChart.getPackageData2(this.gridData);
+            })
+        },
+        drawPie() {
+            this.ECLZX.getFiveLossRadarMap("leiDaTu", [
+                {
+                    value: this.sortInOrder,
+                    name: this.fdcName1
+                },
+                {
+                    value: this.sortInOrderTop,
+                    name: this.fdcName2
+                }
+            ]);
+        },
+        drawPie2() {
+            this.ECLZX.getFiveLossRadarHistogram("leiDaTu2", ['product', '限电损失电量单位:万KWh', '故障损失电量单位:万KWh', '检修损失电量单位:万KWh', '性能损失电量单位:万KWh', '受累损失电量单位:万KWh'], this.sortInOrde2);
+        },
+        toExcel() { }
+    },
+}

+ 29 - 0
src/assets/js/main.js

@@ -0,0 +1,29 @@
+import menuData from "@jsonData/menu.json"
+import menuZj from "@components/common/menu"
+export default {
+  data() {
+    return {
+      menuIndex: '1', // 菜单默认选中项
+      menu: [], // 菜单数据
+    }
+  },
+  components: {
+    menuZj
+  },
+  created: function() {
+    this.init();
+  },
+  methods: {
+    // 初始化
+    init() {
+      this.menu = menuData.menu;
+      // this.API.get('/powercompare/windfarmAjax').then(res => {
+      //   console.log(res)
+      //   // if (res.code === 200) {
+      //   //   this.eqType = this.BASE.cascaderBugRepair(res.data.result);
+      //   // }
+  
+      // });
+    },
+  }
+}

+ 143 - 0
src/assets/js/normRanking/goodnessfitRank.js

@@ -0,0 +1,143 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      FClist: {
+        name: "",
+        id: "",
+      },
+      loading:true,
+      tableData: [],
+      dialogTableVisible: false,
+      beginDate: "2021-01-01",
+      endDate: "2021-01-01",
+      fc: "MHS_FDC",
+      selectrowdate: {},
+      histogram_Date: [],
+      histogram_sers: [],
+      h_Date:[],
+    };
+  },
+  methods: {
+    /**
+     * 查询风场
+     */
+    query_fc() {
+       var newData = new Date();
+       this.beginDate = this.BASE.getBzDate(newData.getTime(),-1);
+       this.endDate = this.BASE.getBzDate(newData.getTime(),0);
+       this.API.get("powercompare/windfarmAjax?").then((res) => {
+       this.FClist = res.data;
+      }).catch(e=>e);
+    },
+    /**
+     * 获取数据
+     */
+    query_table() {
+      this.API
+        .get(
+          "leaderboard/fittingtoplist?wpIps=" +
+            this.fc +
+            "&pageNum=" +
+            1 +
+            "&pageSize=" +
+            10 +
+            "&orderByColumn=" +
+            "" +
+            "&isAsc=" +
+            "asc" +
+            "&beginDate=" +
+            this.beginDate +
+            "&endDate=" +
+            this.endDate
+        )
+        .then((res) => {
+          this.tableData = res.data;
+          this.loading=false;
+        }).catch(e=>e);;
+    },
+    headStyle() {
+      return "text-align:center";
+    },
+    /**
+     * 矩阵选中 获取行数据
+     */
+    changeFun(val) {
+      let wt = [];
+      this.histogram_Date = {};
+      this.histogram_sers = [];
+      for (let i = 0; i < Object.keys(val).length; i++) {
+        wt.push(val[i].windturbine);
+      }
+          this.API
+        .get(
+          "leaderboard/fittingtopchart?wtIds=" +
+            wt +
+            "&beginDate=" +
+            this.beginDate +
+            "&endDate=" +
+            this.endDate
+        )
+        .then((res) => {
+          this.histogram_Date = [];
+          this.h_Date = [];
+          this.h_Date = res.data;
+          this.histogram_sers = res.data.sers;
+        }).catch(e=>e);;
+      
+    },
+    // toExcel() {
+    //   let that = this;
+    //   excelHelper.exportExcel("tableData", "拟合优度排行榜", ".xls", true);
+    // },
+    /**
+     * 转换格式
+     */
+    filter_bdate(cellValue) {
+      let date = new Date(cellValue.beginDate);
+
+      return this.BASE.getBzDate(date,0);
+    },
+    filter_edate(cellValue) {
+      let date = new Date(cellValue.endDate);
+
+      return this.BASE.getBzDate(date,0);
+    },
+    filter_generatingCapacity(cellValue) {
+      return parseFloat(cellValue.power).toFixed(2);
+    },
+    filter_power(cellValue) {
+      return parseFloat(cellValue.power).toFixed(2);
+    },
+    /**
+     * 改变数据格式,调取曲线图
+     */
+    curveCreation() {
+      let that = this;
+      let design = [];
+      for (let j = 0; j < Object.keys(this.histogram_sers).length; j++) {
+        let name1 = that.histogram_sers[j];
+        design = that.h_Date[name1];
+        that.histogram_Date.push({
+          type: "line",
+          name: name1,
+          stack: "总量",
+          data: design,
+        });
+      }
+      this.dialogTableVisible = true;
+      this.$nextTick(function () {
+        this.ECZM.zzt_cdbqd('histogram' , this.histogram_sers , this.histogram_Date);
+      });
+    },
+  },
+  mounted() {
+    this.query_fc();
+    this.query_table();
+  },
+};

+ 132 - 0
src/assets/js/normRanking/grossgenerationRank.js

@@ -0,0 +1,132 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      list:[],
+      FClist: [],
+      GFlist: [
+        
+      ],
+      loading:true,
+      QBlist: [
+       
+      ],
+      lxlist: [
+        {
+          name: "全部",
+          id: "qb",
+        },
+        {
+          name: "风场",
+          id: "fc",
+        },
+        {
+          name: "光伏",
+          id: "gf",
+        },
+      ],
+      tableData: [],
+      beginDate: "2021-01-01",
+      endDate: "2021-01-01",
+      lx: "qb",
+      fc: "",
+      selectrowdate: {},
+    };
+  },
+  methods: {
+    check_lx() {
+      this.fc = "";
+      if (this.lx == "fc") {
+        this.list={};
+        this.list = this.FClist;
+      } else if (this.lx == "gf") {
+        this.list = {};
+        this.list = this.GFlist;
+      } else if (this.lx == "qb") {
+        this.list = {};
+        this.list = this.QBlist;
+      }
+    },
+    query_fc() {
+       var newData = new Date();
+       this.beginDate = this.BASE.getBzDate(newData.getTime(),-1);
+       this.endDate = this.BASE.getBzDate(newData.getTime(),0);
+      let that = this;
+      let fjj="";
+      this.API.get("powercompare/windfarmAllAjax?").then((res) => {
+        this.QBlist = res.data;
+
+        for (let i = 0; i < Object.keys(this.QBlist).length; i++) {
+          fjj = "";
+          fjj = this.QBlist[i].id;
+          if (fjj.endsWith("FDC")) {
+            that.FClist.push(this.QBlist[i]);
+          } else {
+            that.GFlist.push(this.QBlist[i]);
+          }
+        }
+        this.list = this.QBlist;
+     });
+    },
+    query_table() {
+      this.loading=true;
+      this.tableData=[];
+      this.API
+        .get(
+          "leaderboard/totalPowerCapacityTopList?wpIps=" +
+            this.fc +
+            "&pageNum=" +
+            1 +
+            "&pageSize=" +
+            10 +
+            "&orderByColumn=" +
+            "" +
+            "&isAsc=" +
+            "asc" +
+            "&beginDate=" +
+            this.beginDate +
+            "&endDate=" +
+            this.endDate
+        )
+        .then((res) => {
+          this.tableData = res.data;
+          this.loading=false;
+        });
+    },
+    // toExcel() {
+    //   let that = this;
+    //   excelHelper.exportExcel("tableData", "总发电量排行", ".xls", true);
+    // },
+    headStyle() {
+      return "text-align:center";
+    },
+    changeFun(val) {
+      this.selectrowdate = val;
+    },
+    filter_bdate(cellValue) {
+      let date = new Date(cellValue.beginDate);
+
+      return this.BASE.getBzDate(date);
+    },
+    filter_edate(cellValue) {
+      let date = new Date(cellValue.endDate);
+
+      return this.BASE.getBzDate(date);
+    },
+    filter_power(cellValue) {
+      return parseFloat(cellValue.power).toFixed(2);
+    },
+    filter_speed(cellValue) {
+      return parseFloat(cellValue.speed).toFixed(2);
+    },
+  },
+  mounted() {
+    this.query_fc();
+    this.query_table();
+  },
+};

+ 119 - 0
src/assets/js/normRanking/percentageLossrRank.js

@@ -0,0 +1,119 @@
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      FClist: [
+      ],
+      pjlist: [
+      ],
+      lxlist: [
+      ],
+      fjlist: [
+      ],
+      fc1list: [
+      ],
+      lxlist: [
+        {
+          name: "风场",
+          id: "0",
+        },
+        {
+          name: "项目",
+          id: "1",
+        },
+        {
+          name: "线路",
+          id: "2",
+        },
+        {
+          name: "风机",
+          id: "3",
+        },
+      ],
+      tableData: [],
+      beginDate: "2021-01-01",
+      endDate: "2021-01-03",
+      lx: "0",
+      fc: "",
+      selectrowdate: {},
+    };
+  },
+  methods: {
+    query_gb(){
+      this.fc = "";
+      if (this.lx == "0") {
+        this.FClist={};
+        this.FClist = this.fc1list;
+      } else if (this.lx == "1") {
+        this.FClist = {};
+        this.FClist = this.pjlist;
+      } else if (this.lx == "2") {
+        this.FClist = {};
+        this.FClist = this.xllist;
+      }else if (this.lx == "3") {
+        this.FClist = {};
+        this.FClist = this.fjlist;
+      }
+    },
+    query_fc() {
+      this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.fc1list = res.data;
+        this.FClist = res.data;
+      });
+       this.API.get("powercompare/projectAllAjax?").then((res) => {
+        this.pjlist = res.data;
+      });
+       this.API.get("powercompare/lineAllAjax?").then((res) => {
+        this.xllist = res.data;
+      });
+       this.API.get("powercompare/windturbineAllAjax?").then((res) => {
+        this.fjlist = res.data;
+      });
+    },
+    query_table() {
+
+      this.API
+        .get(
+          "leaderboard/lossList?wpId=" +
+            this.fc +
+            "&pageNum=" +
+            1 +
+            "&pageSize=" +
+            10 +
+            "&orderByColumn=" +
+            "" +
+            "&isAsc=" +
+            "asc" +
+            "&beginDate=" +
+            this.beginDate +
+            "&endDate=" +
+            this.endDate +
+            "&type=" +
+            this.lx
+        )
+        .then((res) => {
+          this.tableData = res.data;
+        });
+    },
+    // toExcel() {
+    //   excelHelper.exportExcel("tableData", "损失率排行", ".xls", true);
+    // },
+    headStyle() {
+      return "text-align:center";
+    },
+    changeFun(val) {
+      this.selectrowdate = val;
+    },
+  },
+  mounted() {
+    var newData = new Date();
+    this.beginDate = this.BASE.getBzDate(newData.getTime(),-1);
+    this.endDate = this.BASE.getBzDate(newData.getTime(),0);
+    this.query_fc();
+    this.query_table();
+  },
+};

+ 118 - 0
src/assets/js/performanceAnalysis/cutAndSpeed.js

@@ -0,0 +1,118 @@
+// import excelHelper from "@/utils/excelHelper";
+export default {
+    data() {
+        return {
+            //element ui表单组件自带数据 
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            //时间,初始数据为昨日时间
+            time: '',
+            //分页起始页
+            currentPage2: 1,
+             //每页显示数据个数
+            pagesize: 10,
+            //切入切出风速表格数据
+            gridData: [],
+            //风场选择器
+            options: [],
+            //所需排序值
+            orderByColumn: '',
+            //排序,默认为升序asc
+            isAsc: '',
+            value: 'MHS_FDC',
+            //表格对应的风场id,点击历史按钮会将wtid数据传入历史页面
+            wtid: '',
+            //结束日期,默认为今日日期,点击历史按钮会将endDate数据传入历史页面
+            endDate: '',
+            //日期昨天
+            updateTime: '',
+        }
+    },
+
+    created() {
+        //获取风场信息数据
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+         //获取昨日日期时间
+        var newData = new Date();
+        this.updateTime = this.BASE.getBzDate(newData.getTime(), -1);
+        //获取今日日期时间
+        this.endDate = this.BASE.getBzDate(newData.getTime(), 0);
+        this.callAndSpeedData(); 
+               
+        },
+    methods: {
+        //点击查询按钮调用查询方法
+        queryApData() {
+            this.callAndSpeedData();
+        },
+        //点击历史按钮触发点击事件,b值为点击历史获取当前行的数据
+        handleEdit(a, b) {
+            this.wtId = b.windturbineid;
+            console.log(this.wtId)
+            //跳转方法并传入数据
+            this.$router.push({
+                path: '/cutAndSpeedHistory',
+                query: {
+                    //风场
+                    wpId: this.value,
+                    //风机
+                    wtId: this.wtId,
+                    //开始时间
+                    beginDate: this.time,
+                    //结束时间
+                    endDate: this.endDate,
+                }
+            })
+        },
+        //表格字体居中
+        headStyle() {
+            return "text-align:center"
+        },
+        //排序方法
+        changeTableSort(column) {
+            //排序方法 column.prop为点击要排序列的数据,将需要排序的值赋给orderByColumn
+            this.orderByColumn = column.prop;
+            //如果column.order为descending(点击排序上箭头),则为降序,若为ascending(点击排序下箭头),则为升序,并将值赋给isAsc
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.callAndSpeedData();
+        },
+        //获取切入切出风速方法
+        callAndSpeedData() {
+            //判断time是否有值,若没有选择时间,则为昨日日期时间
+            if (this.time == '') {
+                this.time = this.updateTime
+            }
+            console.log(this.time)
+            var callAndSpeedData = new URLSearchParams();
+            //页数
+            callAndSpeedData.append('pageNum', this.currentPage2);
+            //页面数据个数
+            callAndSpeedData.append('pageSize', this.pagesize);
+            //需要排序的参数
+            callAndSpeedData.append('orderByColumn', this.orderByColumn);
+            //升序还是降序
+            callAndSpeedData.append('isAsc', this.isAsc);
+            //风场id
+            callAndSpeedData.append('wpId', this.value);
+            //日期
+            callAndSpeedData.append('recorddate', this.time);
+            this.API.post('/outputspeed/outputSpeedlist', callAndSpeedData).then((res) => {
+                this.gridData = res.data;
+                console.log(this.gridData);
+            })
+        },
+        //导出excel方法
+        toExcel() {
+            excelHelper.exportExcel("callthepolicetable", "负荷率排行榜", ".xls", true);
+        },
+    }
+}

+ 102 - 0
src/assets/js/performanceAnalysis/cutAndSpeedHistory.js

@@ -0,0 +1,102 @@
+// import {formatDate} from '../../utils/fomatDate';
+// import excelHelper from "@/utils/excelHelper";
+export default {
+    data() {
+      return {
+        formInline: {
+        windfarm: "",
+        project: "",
+        line: "",
+        },
+        time: '2021-01-01',
+        timedate: [
+            
+        ],
+        currentPage2: 1,
+	      pagesize: 10,
+        gridData:[],
+        gridDataChart:[],
+        charFreData:[],
+        charNameData:[],
+        options: [],
+        options2: [],
+        orderByColumn:'',
+        isAsc: '',
+        value: '',
+        value2:'',
+        wtid:'',
+        endDate:'',
+      }
+    },
+    created(){
+        this.callAndSpeedData();
+    },
+    methods:{
+        queryApData() {
+            this.callAndSpeedData();
+        },
+        headStyle() {
+          return "text-align:center"
+        },
+        changeTableSort(column){
+          this.orderByColumn = column.prop;
+          if(column.order == "descending"){
+            this.isAsc = 'desc';
+          }else if(column.order == "ascending"){
+            this.isAsc = "asc";
+          }
+          this.callAndSpeedData();
+        },
+        callAndSpeedData(){
+            this.API.get('/powercompare/windfarmAjax').then((res) => {
+                this.options = res.data;
+            })
+            // this.value = this.$route.query.wpId;
+            if(this.value == ''){
+                this.value = this.$route.query.wpId;
+                this.API.get('/powercompare/windturbineAjax?wpId=' + this.value).then((res) => {
+                    this.options2 = res.data;
+                })
+            }else{
+               this.API.get('/powercompare/windturbineAjax?wpId=' + this.value).then((res) => {
+                    this.options2 = res.data;
+                }) 
+            }
+            var callAndSpeedData = new URLSearchParams();
+            callAndSpeedData.append('pageNum',this.currentPage2);
+		    callAndSpeedData.append('pageSize',this.pagesize);
+            callAndSpeedData.append('orderByColumn',this.orderByColumn);
+            callAndSpeedData.append('isAsc',this.isAsc);
+            if(this.value == ''){
+                this.value = this.$route.query.wpId;
+                callAndSpeedData.append('wpId',this.value);
+            }else{
+                callAndSpeedData.append('wpId',this.value);
+            }
+		  	if(this.value2 == ''){
+                this.value2 = this.$route.query.wtId;
+                callAndSpeedData.append('wtId',this.value2);
+            }else{
+                callAndSpeedData.append('wtId',this.value2);
+            }
+            if(this.timedate == ''){
+                this.timedate[0] = this.$route.query.beginDate;
+                this.timedate[1] = this.$route.query.endDate;
+                callAndSpeedData.append('beginDate',this.timedate[0]);
+                callAndSpeedData.append('endDate',this.timedate[1]);
+            }else{
+                callAndSpeedData.append('beginDate',this.timedate[0]);
+                callAndSpeedData.append('endDate',this.timedate[1]);
+            }
+            this.API.post('/outputspeed/outputspeedhistorylist',callAndSpeedData).then((res) => {
+                this.gridData = res.data
+            })
+        },
+        goReturn(){
+            this.$router.push('/cutAndSpeed')
+          },
+        toExcel(){
+            excelHelper.exportExcel("callthepolicetable","负荷率排行榜",".xls",true);
+        },
+    }
+}

+ 663 - 0
src/assets/js/performanceAnalysis/gradeEvaluation.js

@@ -0,0 +1,663 @@
+// import excelHelper from "@/utils/excelHelper";
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      //风场选择器
+      options: [],
+      //风机日信息等级评估管理表格数据
+      gridData: [],
+      //风机月信息等级评估管理表格数据
+      gridDataMonth: [],
+      //风机年信息等级评估管理表格数据
+      gridDataYear: [],
+      value: "NSS_FDC",
+      value1: "",
+      value2: "",
+      value3: "",
+      yearvalue: "",
+      monthvalue: "",
+      //风机日信息等级评估管理对比框开关
+      dialogTableVisible: false,
+      //风机月信息等级评估管理对比框开关
+      dialogTableVisibleMonth: false,
+      //风机年信息等级评估管理对比框开关
+      dialogTableVisibleYear: false,
+      //elementui组件多选数据包
+      multipleSelection: [],
+      //分页起始页
+      currentPage2: 1,
+      //每页显示数据个数
+      pagesize: 10,
+      //等级评估对标雷达图1数据
+      radarChartData1: [],
+      //等级评估对标雷达图2数据
+      radarChartData2: [],
+      //等级评估雷达图标题名称
+      radarChartName: "",
+      //雷达图数据名称1
+      radatChartWindturbineid1: "",
+      //雷达图数据名称2
+      radatChartWindturbineid2: "",
+      fan1: "",
+      fan2: "",
+      //对比框表格风机编号数据1
+      fanNumber1: "",
+      //对比框表格风机编号数据2
+      fanNumber2: "",
+      //风机日信息等级评估管理页面表格显示开关
+      dailyInformation: true,
+      //风机月信息等级评估管理页面表格显示开关
+      monthlyInformation: false,
+      //风机年信息等级评估管理页面表格显示开关
+      annualInformation: false,
+      activeName: "first",
+      //对比框表格右侧数据
+      sortInOrder: [],
+      //对比框表格左侧数据
+      sortInOrderTop: [],
+      ranking1: "",
+      ranking2: "",
+      score1: "",
+      score2: "",
+      //所需排序值
+      orderByColumn: "windturbineid",
+      //排序,默认为升序asc
+      isAsc: "asc",
+      //获取日信息分页数据
+      total: 0,
+      //获取月信息分页数据
+      totalMonth: "",
+      //获取年信息分页数据
+      totalYear: "",
+      //日期昨天
+      updateTime: "",
+    };
+  },
+  created() {
+    //获取风场信息数据
+    this.API.get("/powercompare/windfarmAjax").then((res) => {
+      this.options = res.data;
+    });
+    //获取昨日日期时间
+    var newData = new Date();
+    this.updateTime = this.BASE.getBzDate(newData.getTime(), -1);
+  },
+  mounted() {
+    this.gradeByDaygData();
+    this.gamonthlistByPage();
+    this.gayearlistByPage();
+    
+  },
+  methods: {
+    headStyle() {
+      //表格文字居中显示
+      return "text-align:center";
+    },
+    currentSel() {
+      this.gradeByDaygData();
+      this.gamonthlistByPage();
+      this.gayearlistByPage();
+    },
+    //排序方法
+    changeTableSort(column) {
+      //排序方法 column.prop为点击要排序列的数据,将需要排序的值赋给orderByColumn
+      this.orderByColumn = column.prop;
+      //如果column.order为descending(点击排序上箭头),则为降序,若为ascending(点击排序下箭头),则为升序,并将值赋给isAsc
+      if (column.order == "descending") {
+        this.isAsc = "desc";
+      } else if (column.order == "ascending") {
+        this.isAsc = "asc";
+      }
+      this.gradeByDaygData();
+    },
+    //处理对比框表格数据方法val为点击多选框的数据
+    handleSelectionChange(val) {
+      this.sortInOrder = [];
+      this.sortInOrderTop = [];
+      this.multipleSelection = val;
+      //如果多选框中的数据有两个,那么对其对比框表格赋值并显示
+      if (this.multipleSelection.length == 2) {
+        this.fan1 = this.multipleSelection[0].windturbineid;
+        this.fanNumber1 = "风机编号:" + this.fan1;
+        this.fan2 = this.multipleSelection[1].windturbineid;
+        this.fanNumber2 = "风机编号:" + this.fan2;
+        this.ranking1 = "排名:" + this.fan1.slice(5);
+        this.ranking2 = "排名:" + this.fan2.slice(5);
+        this.score1 = "评分:" + this.fan1.slice(5);
+        this.score2 = "评分:" + this.fan2.slice(5);
+        this.sortInOrderTop.push({
+          lhpj: "量化评级:" + this.multipleSelection[0].level,
+          zhpm: "量化评级:" + this.multipleSelection[1].level,
+        });
+        this.sortInOrderTop.push({
+          lhpj: "综合排名:" + this.multipleSelection[0].rank,
+          zhpm: "综合排名:" + this.multipleSelection[1].rank,
+        });
+        this.sortInOrder.push({
+          lx: "",
+          index: "发电量",
+          data1: this.multipleSelection[0].dayfdl,
+          data2: this.multipleSelection[1].dayfdl,
+          ranking1: this.multipleSelection[0].monthfdl,
+          ranking2: this.multipleSelection[1].monthfdl,
+          score1: this.multipleSelection[0].yearfdl,
+          score2: this.multipleSelection[1].yearfdl,
+        });
+        this.sortInOrder.push({
+          lx: "",
+          index: "理论发电量",
+          data1: this.multipleSelection[0].dayllfdl,
+          data2: this.multipleSelection[1].dayllfdl,
+          ranking1: this.multipleSelection[0].monthllfdl,
+          ranking2: this.multipleSelection[1].monthllfdl,
+          score1: this.multipleSelection[0].yearllfdl,
+          score2: this.multipleSelection[1].yearllfdl,
+        });
+        this.sortInOrder.push({
+          lx: "",
+          index: "平均功率",
+          data1: this.multipleSelection[0].daygl,
+          data2: this.multipleSelection[1].daygl,
+          ranking1: this.multipleSelection[0].monthgl,
+          ranking2: this.multipleSelection[1].monthgl,
+          score1: this.multipleSelection[0].yeargl,
+          score2: this.multipleSelection[1].yeargl,
+        });
+        this.sortInOrder.push({
+          lx: "",
+          index: "故障损失电量",
+          data1: this.multipleSelection[0].daygzssdl,
+          data2: this.multipleSelection[1].daygzssdl,
+          ranking1: this.multipleSelection[0].monthgzssdl,
+          ranking2: this.multipleSelection[1].monthgzssdl,
+          score1: this.multipleSelection[0].yeargzssdl,
+          score2: this.multipleSelection[1].yeargzssdl,
+        });
+        this.sortInOrder.push({
+          lx: "",
+          index: "限电损失电量",
+          data1: this.multipleSelection[0].dayxdssdl,
+          data2: this.multipleSelection[1].dayxdssdl,
+          ranking1: this.multipleSelection[0].monthxdssdl,
+          ranking2: this.multipleSelection[1].monthxdssdl,
+          score1: this.multipleSelection[0].yearxdssdl,
+          score2: this.multipleSelection[1].yearxdssdl,
+        });
+        this.sortInOrder.push({
+          lx: "",
+          index: "维护损失电量",
+          data1: this.multipleSelection[0].daywhssdl,
+          data2: this.multipleSelection[1].daywhssdl,
+          ranking1: this.multipleSelection[0].monthwhssdl,
+          ranking2: this.multipleSelection[1].monthwhssdl,
+          score1: this.multipleSelection[0].yearwhssdl,
+          score2: this.multipleSelection[1].yearwhssdl,
+        });
+        this.sortInOrder.push({
+          lx: "",
+          index: "故障时间",
+          data1: this.multipleSelection[0].daygzsj,
+          data2: this.multipleSelection[1].daygzsj,
+          ranking1: this.multipleSelection[0].monthgzsj,
+          ranking2: this.multipleSelection[1].monthgzsj,
+          score1: this.multipleSelection[0].yeargzsj,
+          score2: this.multipleSelection[1].yeargzsj,
+        });
+        this.sortInOrder.push({
+          lx: "",
+          index: "维护时间",
+          data1: this.multipleSelection[0].daywhsj,
+          data2: this.multipleSelection[1].daywhsj,
+          ranking1: this.multipleSelection[0].monthwhsj,
+          ranking2: this.multipleSelection[1].monthwhsj,
+          score1: this.multipleSelection[0].yearwhsj,
+          score2: this.multipleSelection[1].yearwhsj,
+        });
+        this.sortInOrder.push({
+          lx: "",
+          index: "运行时间",
+          data1: this.multipleSelection[0].dayyxsj,
+          data2: this.multipleSelection[1].dayyxsj,
+          ranking1: this.multipleSelection[0].monthyxsj,
+          ranking2: this.multipleSelection[1].monthyxsj,
+          score1: this.multipleSelection[0].yearyxsj,
+          score2: this.multipleSelection[1].yearyxsj,
+        });
+        this.sortInOrder.push({
+          lx: "",
+          index: "停机时间",
+          data1: this.multipleSelection[0].daytjsj,
+          data2: this.multipleSelection[1].daytjsj,
+          ranking1: this.multipleSelection[0].monthtjsj,
+          ranking2: this.multipleSelection[1].monthtjsj,
+          score1: this.multipleSelection[0].yeartjsj,
+          score2: this.multipleSelection[1].yeartjsj,
+        });
+        this.sortInOrder.push({
+          lx: "性能",
+          index: "平均切入风速",
+          data1: this.multipleSelection[0].dayxfqr,
+          data2: this.multipleSelection[1].dayxfqr,
+          ranking1: this.multipleSelection[0].monthxfqr,
+          ranking2: this.multipleSelection[1].monthxfqr,
+          score1: this.multipleSelection[0].yearxfqr,
+          score2: this.multipleSelection[1].yearxfqr,
+        });
+        this.sortInOrder.push({
+          lx: "性能",
+          index: "性能损失电量",
+          data1: this.multipleSelection[0].dayxnssdl,
+          data2: this.multipleSelection[1].dayxnssdl,
+          ranking1: this.multipleSelection[0].monthxnssdl,
+          ranking2: this.multipleSelection[1].monthxnssdl,
+          score1: this.multipleSelection[0].yearxnssdl,
+          score2: this.multipleSelection[1].yearxnssdl,
+        });
+        this.sortInOrder.push({
+          lx: "性能",
+          index: "拟合优度",
+          data1: this.multipleSelection[0].daynhyd,
+          data2: this.multipleSelection[1].daynhyd,
+          ranking1: this.multipleSelection[0].monthnhyd,
+          ranking2: this.multipleSelection[1].monthnhyd,
+          score1: this.multipleSelection[0].yearnhyd,
+          score2: this.multipleSelection[1].yearnhyd,
+        });
+        this.sortInOrder.push({
+          lx: "性能",
+          index: "功率一致性系数",
+          data1: this.multipleSelection[0].dayglyzxxs,
+          data2: this.multipleSelection[1].dayglyzxxs,
+          ranking1: this.multipleSelection[0].monthglyzxxs,
+          ranking2: this.multipleSelection[1].monthglyzxxs,
+          score1: this.multipleSelection[0].yearglyzxxs,
+          score2: this.multipleSelection[1].yearglyzxxs,
+        });
+        this.sortInOrder.push({
+          lx: "可靠性管理",
+          index: "利用小时",
+          data1: this.multipleSelection[0].daylyxs,
+          data2: this.multipleSelection[1].daylyxs,
+          ranking1: this.multipleSelection[0].monthlyxs,
+          ranking2: this.multipleSelection[1].monthlyxs,
+          score1: this.multipleSelection[0].yearlyxs,
+          score2: this.multipleSelection[1].yearlyxs,
+        });
+        this.sortInOrder.push({
+          lx: "可靠性管理",
+          index: "设备可利用率",
+          data1: this.multipleSelection[0].daysbklyl,
+          data2: this.multipleSelection[1].daysbklyl,
+          ranking1: this.multipleSelection[0].monthsbklyl,
+          ranking2: this.multipleSelection[1].monthsbklyl,
+          score1: this.multipleSelection[0].yearsbklyl,
+          score2: this.multipleSelection[1].yearsbklyl,
+        });
+        this.sortInOrder.push({
+          lx: "可靠性管理",
+          index: "等效可利用系数",
+          data1: this.multipleSelection[0].daydxkyxs,
+          data2: this.multipleSelection[1].daydxkyxs,
+          ranking1: this.multipleSelection[0].monthdxkyxs,
+          ranking2: this.multipleSelection[1].monthdxkyxs,
+          score1: this.multipleSelection[0].yeardxkyxs,
+          score2: this.multipleSelection[1].yeardxkyxs,
+        });
+        this.sortInOrder.push({
+          lx: "可靠性管理",
+          index: "有效风时速",
+          data1: this.multipleSelection[0].dayyxfss,
+          data2: this.multipleSelection[1].dayyxfss,
+          ranking1: this.multipleSelection[0].monthyxfss,
+          ranking2: this.multipleSelection[1].monthyxfss,
+          score1: this.multipleSelection[0].yearyxfss,
+          score2: this.multipleSelection[1].yearyxfss,
+        });
+        this.sortInOrder.push({
+          lx: "资源",
+          index: "平均风速",
+          data1: this.multipleSelection[0].dayfs,
+          data2: this.multipleSelection[1].dayfs,
+          ranking1: this.multipleSelection[0].monthfs,
+          ranking2: this.multipleSelection[1].monthfs,
+          score1: this.multipleSelection[0].yearfs,
+          score2: this.multipleSelection[1].yearfs,
+        });
+        this.sortInOrder.push({
+          lx: "资源",
+          index: "静风频率",
+          data1: this.multipleSelection[0].daygl,
+          data2: this.multipleSelection[1].daygl,
+          ranking1: this.multipleSelection[0].monthgl,
+          ranking2: this.multipleSelection[1].monthgl,
+          score1: this.multipleSelection[0].yeargl,
+          score2: this.multipleSelection[1].yeargl,
+        });
+        this.radarChartData();
+      }
+    },
+    //点击分页调用方法刷新页面
+    handleSizeChange(val) {
+      this.pagesize = val;
+      this.gradeByDaygData();
+      this.gamonthlistByPage();
+      this.gayearlistByPage();
+    },
+    //刷新分页显示当前页数目
+    handleCurrentChange(val) {
+      this.gradeByDaygData();
+      this.gamonthlistByPage();
+      this.gayearlistByPage();
+    },
+    //导出excel风机等级评估日数据
+    exportDayData() {
+      excelHelper.exportExcel("daytable", "等级评估日数据", ".xls", true);
+    },
+    //导出excel风机等级评估月数据
+    exportMonthData() {
+      excelHelper.exportExcel("monthtable", "等级评估月数据", ".xls", true);
+    },
+    //导出excel风机等级评估年数据
+    exportYearData() {
+      excelHelper.exportExcel("yeartable", "等级评估年数据", ".xls", true);
+    },
+    //点击打开日对比框方法
+    dialogTableVisibleOpen() {
+      this.dialogTableVisible = true;
+      //多选风机id赋值给radatChartWindturbineid1为雷达图数据1名称
+      this.radatChartWindturbineid1 = this.multipleSelection[0].windturbineid;
+      //多选风机id赋值给radatChartWindturbineid1为雷达图数据2名称
+      this.radatChartWindturbineid2 = this.multipleSelection[1].windturbineid;
+      //调用对应EChart热力图
+      this.$nextTick(function () {
+        this.drawPie("leiDaTu");
+      });
+    },
+    //点击打开月对比框方法
+    dialogTableVisibleOpenMonth() {
+      this.dialogTableVisibleMonth = true;
+      this.radatChartWindturbineid1 = this.multipleSelection[0].windturbineid;
+      this.radatChartWindturbineid2 = this.multipleSelection[1].windturbineid;
+      this.$nextTick(function () {
+        this.drawPie2("leiDaTu2");
+      });
+    },
+    //点击打开年对比框方法
+    dialogTableVisibleOpenYear() {
+      this.dialogTableVisibleYear = true;
+      this.radatChartWindturbineid1 = this.multipleSelection[0].windturbineid;
+      this.radatChartWindturbineid2 = this.multipleSelection[1].windturbineid;
+      this.$nextTick(function () {
+        this.drawPie3("leiDaTu2");
+      });
+    },
+    handleClick(tab) {
+      //根据点击切换判断打开哪个表格的div,tab.name包含所有的切换页面名,根据名字判断打开了哪页。
+      if (tab.name === "first") {
+        this.dailyInformation = true;
+        this.monthlyInformation = false;
+        this.annualInformation = false;
+        this.gradeByDaygData();
+        this.gamonthlistByPage();
+        this.gayearlistByPage();
+      } else if (tab.name === "second") {
+        this.dailyInformation = false;
+        this.monthlyInformation = true;
+        this.annualInformation = false;
+        this.gradeByDaygData();
+        this.gamonthlistByPage();
+        this.gayearlistByPage();
+      } else if (tab.name === "cord") {
+        this.dailyInformation = false;
+        this.monthlyInformation = false;
+        this.annualInformation = true;
+        this.gradeByDaygData();
+        this.gamonthlistByPage();
+        this.gayearlistByPage();
+      }
+    },
+    gradeByDaygData() {
+      //风机日信息等级评估管理数据
+      let that = this;
+      var page = new URLSearchParams();
+      //页数
+      page.append("pageNum", this.currentPage2);
+      //页面数据个数
+      page.append("pageSize", this.pagesize);
+      //需要排序的参数
+      page.append("orderByColumn", this.orderByColumn);
+      //升序还是降序
+      page.append("isAsc", this.isAsc);
+      //风场id
+      page.append("wpId", this.value);
+      if (this.value1 == "") {
+        this.value1 = this.updateTime;
+      }
+      page.append("recorddate", this.value1);
+      this.API.post("/benchmarking/gadaylistByPage", page).then((res) => {
+        //gridData日表格数据
+        that.gridData = res.data.list;
+        //total日分页数据
+        that.total = res.data.total;
+      });
+    },
+    gamonthlistByPage() {
+      //风机月信息等级评估管理数据
+      let that = this;
+      var pagemonth = new URLSearchParams();
+      pagemonth.append("pageNum", this.currentPage2);
+      pagemonth.append("pageSize", this.pagesize);
+      pagemonth.append("wpId", this.value);
+      if (this.yearvalue == "") {
+        this.yearvalue = this.updateTime.substring(0, 4);
+      }
+      //年份
+      pagemonth.append("year", this.yearvalue);
+      if (this.value2 == "") {
+        this.value2 = this.updateTime;
+        //判断数据长度是否为2位数,若为2位数截取两位数,一位数则截取一位数
+        if (this.value2.substring(5, 7) < 10) {
+          this.monthvalue = this.value2.substring(6, 7);
+        } else {
+          this.monthvalue = this.value2.substring(5, 7);
+        }
+      } else {
+        if (this.value2.substring(5, 7) < 10) {
+          this.monthvalue = this.value2.substring(6, 7);
+        } else {
+          this.monthvalue = this.value2.substring(5, 7);
+        }
+      }
+      //月份
+      pagemonth.append("month", this.monthvalue);
+      this.API
+        .post("/benchmarking/gamonthlistByPage", pagemonth)
+        .then((res) => {
+          //gridDataMonth月表格数据
+          that.gridDataMonth = res.data.list;
+          //totalMonth月分页数据
+          that.totalMonth = res.data.total;
+        });
+    },
+    gayearlistByPage() {
+      //风机年信息等级评估管理数据
+      let that = this;
+      this.yearvalue = this.value3.toString();
+      var pageyear = new URLSearchParams();
+      pageyear.append("pageNum", this.currentPage2);
+      pageyear.append("pageSize", this.pagesize);
+      pageyear.append("wpId", this.value);
+      if (this.value3 == "") {
+        this.value3 = this.updateTime.substring(0, 4);
+      }
+      pageyear.append("year", this.value3);
+      this.API
+        .post("/benchmarking/gayearlistByPage", pageyear)
+        .then((res) => {
+          //gridDataYear年表格数据
+          that.gridDataYear = res.data.list;
+          //totalYear年分页数据
+          that.totalYear = res.data.total;
+        });
+    },
+    radarChartData() {
+      //获取EChart雷达图数据
+      let that = this;
+      this.API
+        .get(
+          "/benchmarking/wtchart?gaid1=" +
+          this.multipleSelection[0].id +
+          "&gaid2=" +
+          this.multipleSelection[1].id
+        )
+        .then((res) => {
+          var arr1 = [];
+          var name = [];
+          res.data.gaid1.forEach(function (item) {
+            arr1.push({
+              //雷达图数据
+              data1: item.data1,
+            });
+            name.push({
+              //雷达图数据命名
+              name: item.name,
+            });
+          });
+          that.radarChartName = name;
+          //将target雷达图显示容量加入数组中。
+          var target = {
+            max: 15,
+          };
+          //循环遍历数据
+          for (let v = 0; v < that.radarChartName.length; v++) {
+            const returnedTarget = Object.assign(
+              that.radarChartName[v],
+              target
+            );
+          }
+          for (let i = 0; i < arr1.length; i++) {
+            that.radarChartData1.push(arr1[i].data1);
+          }
+          var arr2 = [];
+          res.data.gaid2.forEach(function (item) {
+            arr2.push({
+              data1: item.data1,
+            });
+          });
+          for (let j = 0; j < arr2.length; j++) {
+            that.radarChartData2.push(arr2[j].data1);
+          }
+        });
+    },
+    //风机日信息等级评估管理Echart图
+    drawPie() {
+      this.ECLZX.getGradeEvaluationChartData("leiDaTu",
+      [
+        {
+          value: this.radarChartData1,
+          name: this.radatChartWindturbineid1,
+        },
+        {
+          value: this.radarChartData2,
+          name: this.radatChartWindturbineid2,
+        },
+      ],this.radarChartName,[this.radatChartWindturbineid1, this.radatChartWindturbineid2]);
+    },
+    //风机月信息等级评估管理Echart图
+    drawPie2() {
+      var charts2;
+      if (charts2 != null && charts2 != "" && charts2 != undefined) {
+        charts2.dispose();
+      }
+      charts2 = this.$echarts.init(document.getElementById("leiDaTu2"));
+      let option2 = {
+        tooltip: {},
+        legend: {
+          x: "center", //可设定图例在左、右、居中
+          y: "bottom",
+          data: [this.radatChartWindturbineid1, this.radatChartWindturbineid2],
+        },
+        radar: {
+          // shape: 'circle',
+          name: {
+            textStyle: {
+              color: "#fff",
+              backgroundColor: "#999",
+              borderRadius: 3,
+              padding: [3, 5],
+            },
+          },
+          indicator: this.radarChartName,
+        },
+        series: [
+          {
+            name: "预算 vs 开销(Budget vs spending)",
+            type: "radar",
+            // areaStyle: {normal: {}},
+            data: [
+              {
+                value: this.radarChartData1,
+                name: this.radatChartWindturbineid1,
+              },
+              {
+                value: this.radarChartData2,
+                name: this.radatChartWindturbineid2,
+              },
+            ],
+          },
+        ],
+      };
+      charts2.clear();
+      charts2.setOption(option2);
+    },
+    //风机年信息等级评估管理Echart图
+    drawPie3() {
+      var charts3;
+      if (charts3 != null && charts3 != "" && charts3 != undefined) {
+        charts3.dispose();
+      }
+
+      charts3 = this.$echarts.init(document.getElementById("leiDaTu3"));
+      let option3 = {
+        tooltip: {},
+        legend: {
+          x: "center", //可设定图例在左、右、居中
+          y: "bottom",
+          data: [this.radatChartWindturbineid1, this.radatChartWindturbineid2],
+        },
+        radar: {
+          // shape: 'circle',
+          name: {
+            textStyle: {
+              color: "#fff",
+              backgroundColor: "#999",
+              borderRadius: 3,
+              padding: [3, 5],
+            },
+          },
+          indicator: this.radarChartName,
+        },
+        series: [
+          {
+            name: "预算 vs 开销(Budget vs spending)",
+            type: "radar",
+            // areaStyle: {normal: {}},
+            data: [
+              {
+                value: this.radarChartData1,
+                name: this.radatChartWindturbineid1,
+              },
+              {
+                value: this.radarChartData2,
+                name: this.radatChartWindturbineid2,
+              },
+            ],
+          },
+        ],
+      };
+      charts3.clear();
+      charts3.setOption(option3);
+    },
+  },
+};

+ 217 - 0
src/assets/js/performanceAnalysis/plannedGeneration.js

@@ -0,0 +1,217 @@
+// import excelHelper from "@/utils/excelHelper";
+import * as echarts from "echarts";
+export default {
+    data() {
+      return {
+        formInline: {
+        windfarm: "",
+        project: "",
+        line: "",
+        },
+        timeyear:'',
+        currentPage2: 1,
+	    pagesize: 10,
+        gridData:[],
+        gridDataChart:[],
+        charFreData:[],
+        charNameData:[],
+        options: [],
+        options2: [],
+        options3: [],
+        orderByColumn:'',
+        isAsc: '',
+        value: '',
+        value2:'',
+        value3:'',
+        value4:'',
+        dialogFormVisible: false,
+        dialogFormVisible2: false,
+        form: {
+          gc01: '',
+          gc02: '',
+          gc03: '',
+          gc04: '',
+          gc05: '',
+          gc06: '',
+          gc07: '',
+          gc08: '',
+          gc09: '',
+          gc10: '',
+          gc11: '',
+          gc12: '',
+          generatingcapacity: '',
+        },
+        form2: {
+          gc01: '',
+          gc02: '',
+          gc03: '',
+          gc04: '',
+          gc05: '',
+          gc06: '',
+          gc07: '',
+          gc08: '',
+          gc09: '',
+          gc10: '',
+          gc11: '',
+          gc12: '',
+          generatingcapacity: '',
+        },
+        formLabelWidth: '200px',
+        fcdialog:'',
+        fc:'',
+        xm:'',
+        nf:'',
+        modifyid:'',
+        modifyprojectid:'',
+        updateTime:'',
+      }
+    },
+   
+    created(){
+        this.API.get('/powercompare/windfarmAllAjax').then((res) => {
+            this.options = res.data;
+        })
+        var newData = new Date();
+        this.updateTime = this.BASE.getBzDate(newData.getTime(), -1);
+        this.callAndSpeedData();
+    },
+    methods:{
+        queryApData() {
+            this.callAndSpeedData();
+        },
+        handleEdit(a,b){
+          this.wtId = b.windturbineid;
+          console.log(this.wtId)
+          this.$router.push({
+          path:'/cutAndSpeedHistory',
+          query:{
+            wpId:this.value,
+            wtId:this.wtId,
+            beginDate:this.time,
+            endDate:this.endDate,
+          }
+        })
+        },
+        tableDatawindturbineName(val){
+          this.dialogFormVisible2 = true;
+          this.fanData = val;
+          console.log(this.fanData)
+          var modifyData = new URLSearchParams();
+          modifyData.append('projectid',this.fanData.projectid);
+          modifyData.append('year',this.fanData.year);
+          this.API.post('/projectplan/getSingleProjectPlan',modifyData).then((res) => {
+                this.modifyid = res.data.id;
+                this.modifyprojectid = res.data.projectid;
+                this.fc = res.data.windpowerName;
+                this.xm = res.data.projectName;
+                this.nf = res.data.year;
+                this.form2.gc01 = res.data.gc01;
+                this.form2.gc02 = res.data.gc02;
+                this.form2.gc03 = res.data.gc03;
+                this.form2.gc04 = res.data.gc04;
+                this.form2.gc05 = res.data.gc05;
+                this.form2.gc06 = res.data.gc06;
+                this.form2.gc07 = res.data.gc07;
+                this.form2.gc08 = res.data.gc08;
+                this.form2.gc09 = res.data.gc09;
+                this.form2.gc10 = res.data.gc10;
+                this.form2.gc11 = res.data.gc11;
+                this.form2.gc12 = res.data.gc12;
+                this.form2.generatingcapacity = res.data.generatingcapacity;
+            })
+        },
+        saveData(){
+            var addSaveData = new URLSearchParams();
+            addSaveData.append('id',this.modifyid);
+            addSaveData.append('projectid',this.modifyprojectid);
+            addSaveData.append('generatingcapacity',this.form2.generatingcapacity);
+            addSaveData.append('year',this.nf);
+            addSaveData.append('gc01',this.form2.gc01);
+            addSaveData.append('gc02',this.form2.gc02);
+            addSaveData.append('gc03',this.form2.gc03);
+            addSaveData.append('gc04',this.form2.gc04);
+            addSaveData.append('gc05',this.form2.gc05);
+            addSaveData.append('gc06',this.form2.gc06);
+            addSaveData.append('gc07',this.form2.gc07);
+            addSaveData.append('gc08',this.form2.gc08);
+            addSaveData.append('gc09',this.form2.gc09);
+            addSaveData.append('gc10',this.form2.gc10);
+            addSaveData.append('gc11',this.form2.gc11);
+            addSaveData.append('gc12',this.form2.gc12);
+            this.API.post('/projectplan/saveData',addSaveData).then((res) => {
+                console.log(res.data)
+            })
+            this.dialogFormVisible2 = false;
+        },
+        headStyle() {
+          return "text-align:center"
+        },
+        changeTableSort(column){
+          this.orderByColumn = column.prop;
+          if(column.order == "descending"){
+            this.isAsc = 'desc';
+          }else if(column.order == "ascending"){
+            this.isAsc = "asc";
+          }
+          this.callAndSpeedData();
+        },
+        projectData(){
+            this.API.get('/powercompare/projectAjax?wpIds=' + this.value).then((res) =>{
+                this.options2 = res.data;
+            })
+        },
+        projectData2(){
+            this.API.get('/powercompare/projectAjax?wpIds=' + this.value3).then((res) =>{
+                this.options3 = res.data;
+            })
+        },
+        callAndSpeedData(){
+            var plannedGenerationData = new URLSearchParams();
+		  	plannedGenerationData.append('wpId',this.value);
+		    plannedGenerationData.append('pjId',this.value2);
+            if(this.timeyear == ''){
+                this.timeyear = this.updateTime.substring(0,4);
+            }
+            plannedGenerationData.append('year',this.timeyear);
+            this.API.post('/projectplan/getProjectPlanVo',plannedGenerationData).then((res) => {
+                this.gridData = res.data
+                console.log(this.gridData)
+            })
+        },
+        modifyData(){
+            
+
+        },
+        addSaveData(){
+            console.log(this.value3)
+            var addSaveData = new URLSearchParams();
+            addSaveData.append('id',this.value3);
+            addSaveData.append('projectid',this.value4);
+            addSaveData.append('generatingcapacity',this.form.generatingcapacity);
+            addSaveData.append('year',this.timeyear);
+            addSaveData.append('gc01',this.form.gc01);
+            addSaveData.append('gc02',this.form.gc02);
+            addSaveData.append('gc03',this.form.gc03);
+            addSaveData.append('gc04',this.form.gc04);
+            addSaveData.append('gc05',this.form.gc05);
+            addSaveData.append('gc06',this.form.gc06);
+            addSaveData.append('gc07',this.form.gc07);
+            addSaveData.append('gc08',this.form.gc08);
+            addSaveData.append('gc09',this.form.gc09);
+            addSaveData.append('gc10',this.form.gc10);
+            addSaveData.append('gc11',this.form.gc11);
+            addSaveData.append('gc12',this.form.gc12);
+            this.API.post('/projectplan/saveData',addSaveData).then((res) => {
+                console.log(res.data)
+            })
+            this.dialogFormVisible = false;
+        },
+        // modifyData(a,b,c){
+        //     this.dialogFormVisible2 = true;
+        //     console.log(a,b,c)
+        // },
+        toExcel(){
+            excelHelper.exportExcel("callthepolicetable","负荷率排行榜",".xls",true);
+        },
+    }
+}

+ 105 - 0
src/assets/js/performanceAnalysis/rankingCallThePolice.js

@@ -0,0 +1,105 @@
+// import excelHelper from "@/utils/excelHelper";
+import * as echarts from "echarts";
+export default {
+    data() {
+      return {
+        formInline: {
+        windfarm: "",
+        project: "",
+        line: "",
+        },
+        timedate: [],
+        currentPage2: 1,
+		pagesize: 10,
+        gridData:[],
+        gridDataChart:[],
+        charFreData:[],
+        charNameData:[],
+        options: [{
+          id: '1',
+          name: '按报警统计'
+        }, {
+          id: '2',
+          name: '按报警分类统计'
+        }, {
+          id: '3',
+          name: '按厂家统计'
+        }],
+        orderByColumn:'',
+        isAsc: '',
+        value: '1',
+        updateTime:'',
+        updateTime1:'',
+      }
+    },
+   
+    created(){
+        this.callThePolicRateData();
+        
+    },
+    methods:{
+        queryApData() {
+            this.callThePolicRateData();
+            this.$nextTick(function() {
+			    this.getChartDataImport('chartHistogram')
+		    })
+        },
+        
+        headStyle() {
+			return "text-align:center"
+		},
+        
+        changeTableSort(column){
+			this.orderByColumn = column.prop;
+			if(column.order == "descending"){
+				this.isAsc = 'desc';
+			}else if(column.order == "ascending"){
+				this.isAsc = "asc";
+			}
+			this.callThePolicRateData();
+		},
+        callThePolicRateData(){
+            this.charFreData = [];
+            this.charNameData = [];
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);
+            if(this.timedate == ''){
+                this.timedate[0] = this.updateTime1;
+                this.timedate[1] = this.updateTime;
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }else{
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var callThePolicRateData = new URLSearchParams();
+            callThePolicRateData.append('pageNum',this.currentPage2);
+			callThePolicRateData.append('pageSize',this.pagesize);
+            callThePolicRateData.append('orderByColumn',this.orderByColumn);
+            callThePolicRateData.append('isAsc',this.isAsc);
+			callThePolicRateData.append('type',this.value);
+			callThePolicRateData.append('beginDate',this.beginDate);
+            callThePolicRateData.append('endDate',this.endDate);
+            this.API.post('/leaderboard/querywarningStatistical',callThePolicRateData).then((res) => {
+                this.gridData = res.data;
+                this.gridDataChart = res.data;
+                for(let i=0;i<this.gridDataChart.length;i++){
+                    this.charFreData.push(this.gridDataChart[i].frequencyday);
+                    this.charNameData.push(this.gridDataChart[i].name);
+                }
+                this.$nextTick(function() {
+			        this.getChartDataImport('chartHistogram')
+		        })
+            })
+            
+        },
+        toExcel(){
+            excelHelper.exportExcel("callthepolicetable","负荷率排行榜",".xls",true);
+        },
+        getChartDataImport(){
+            this.ECLZX.getcallThePoliceChart("chartHistogram",
+            this.charNameData,this.charFreData);
+        }
+    }
+}

+ 187 - 0
src/assets/js/performanceAnalysis/rankingCurveDeviationRate.js

@@ -0,0 +1,187 @@
+// import excelHelper from "@/utils/excelHelper";
+export default {
+    data(){
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            activeName: 'first',
+            information:'first',
+            value:'MHS_FDC',
+            value2:'',
+            options: [],
+            time:'',
+            timemonth:'',
+            month:'',
+            timeyear:'',
+            year:'',
+            title:'月曲线偏差率排行榜',
+            daymonth:'',
+            dayyear:'',
+            currentPage2: 1,
+		    pagesize: 10,
+            orderByColumn:'',
+            isAsc: '',
+            type:'1',
+            gridData:[],
+            dialogFormVisible:false,
+            fanData:[],
+            ChartData:[],
+            dayChartData:[],
+            Xdata:[],
+            sjdata:[],
+            bzdata:[],
+            eldialogtitle:'',
+
+            
+        }
+    },
+    created(){
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+        this.DeviceRatData();
+    },
+    methods:{
+        queryApData() {
+             this.DeviceRatData();
+        },
+        headStyle() {
+			return "text-align:center"
+		},
+        handleClick(tab) {
+            this.information = tab.name;
+            this.DeviceRatData();
+        },
+        clickCopy(e) {
+             this.type = e;
+        },
+        tableDatawindturbineName(val) {
+            if(this.type == "1"){
+                this.dialogFormVisible = false;
+            }else{
+          this.dialogFormVisible = true;
+          this.Xdata = [];
+          this.sjdata = [];
+          this.bzdata = [];
+          this.fanData = val;
+          var deviceRateChartData = new URLSearchParams();
+          if(this.information == 'first'){
+            this.eldialogtitle = '月曲线偏差率排行';
+            deviceRateChartData.append('type',this.type);
+            deviceRateChartData.append('wtId',this.fanData.windturbineid);
+            this.timeyear = this.year.toString();
+            deviceRateChartData.append('year',this.timeyear);  
+            this.timemonth = this.month.toString();
+            if(this.timemonth.substring(6,7) < 10){
+                this.timemonth = this.timemonth.substring(6,7);
+            }else{
+                this.timemonth = this.timemonth.substring(5,7)
+            }      
+            deviceRateChartData.append('month',this.timemonth);
+            this.API.post('/leaderboard/curveMonthchatAjax',deviceRateChartData).then((res) =>{
+                this.ChartData = res.data.datas;
+                for(let i = 0; i<this.ChartData.length ; i++){
+                    this.Xdata.push(this.ChartData[i].value1);
+                    this.sjdata.push(this.ChartData[i].value2);
+                    this.bzdata.push(this.ChartData[i].value3);
+                }
+                this.$nextTick(function() {
+                    this.drawPie('leiDaTu')
+                })
+            })
+          }else if(this.information == 'second'){
+            this.eldialogtitle = '日曲线偏差率排行';
+            deviceRateChartData.append('type',this.type);
+            deviceRateChartData.append('wtId',this.fanData.windturbineid);
+            deviceRateChartData.append('recorddate',this.time);
+            this.API.post('/leaderboard/getCurvechatAjax',deviceRateChartData).then((res) =>{
+                this.ChartData = res.data.datas;
+                for(let i = 0; i<this.ChartData.length ; i++){
+                    this.Xdata.push(this.ChartData[i].value1);
+                    this.sjdata.push(this.ChartData[i].value2);
+                    this.bzdata.push(this.ChartData[i].value3);
+                }
+                this.$nextTick(function() {
+                    this.drawPie('leiDaTu')
+                })
+            })
+           }
+            }
+        },
+        changeTableSort(column){
+			this.orderByColumn = column.prop;
+			if(column.order == "descending"){
+				this.isAsc = 'desc';
+			}else if(column.order == "ascending"){
+				this.isAsc = "asc";
+			}
+			this.DeviceRatData();
+		},
+        DeviceRatData(){
+            this.gridData = [];
+            var deviceRatData = new URLSearchParams();
+            if(this.information == 'first'){
+                var newData = new Date();
+                this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+                this.title = '月曲线偏差率排行榜';
+                deviceRatData.append('pageNum',this.currentPage2);
+                deviceRatData.append('pageSize',this.pagesize);
+                deviceRatData.append('orderByColumn',this.orderByColumn);
+                deviceRatData.append('isAsc',this.isAsc);
+                deviceRatData.append('wpId',this.value); 
+                if(this.year == ''){
+                    this.year = this.updateTime;
+                    this.year = this.year.slice(0,4);
+                }else{
+                    this.year = this.year.toString();          
+                    
+                }  
+                deviceRatData.append('year',this.year);
+                if(this.month == ''){
+                    this.month = this.updateTime;
+                    if(this.month.substring(5,7) < 10 ){
+                        this.timemonth = this.month.substring(6,7);
+                    }else{
+                        this.timemonth = this.month.substring(5,7);
+                    }
+                }else{
+                    if(this.month.substring(5,7) < 10){
+                        this.timemonth = this.month.substring(6,7);
+                    }else{
+                        this.timemonth = this.month.substring(5,7)
+                    }
+                }
+                deviceRatData.append('month',this.timemonth);
+                this.API.post("/leaderboard/curvefittingmonthmainList",deviceRatData).then((res) => {
+                    this.gridData = res.data;
+                })
+            }else if(this.information == 'second'){
+                this.title = '日曲线偏差率排行榜';
+                deviceRatData.append('pageNum',this.currentPage2);
+                deviceRatData.append('pageSize',this.pagesize);
+                deviceRatData.append('orderByColumn',this.orderByColumn);
+                deviceRatData.append('isAsc',this.isAsc);
+                deviceRatData.append('wpId',this.value);
+                var newData = new Date();
+                this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+                if(this.time == ''){
+                    this.time = this.updateTime;
+                }
+                deviceRatData.append('recorddate',this.time);
+                this.API.post("/leaderboard/curvefittingmainList",deviceRatData).then((res) =>{
+                    this.gridData = res.data;
+                })
+            }
+        },
+        drawPie() {
+				this.ECLZX.getCurveDeviationRate("leiDaTu",
+                ['实际功率(kw)', '保证功率(kw)'],this.Xdata,this.sjdata,this.bzdata);
+		},
+        toExcel(){
+            excelHelper.exportExcel("devicerattable","负荷率排行榜",".xls",true);
+        }
+    }
+}

+ 95 - 0
src/assets/js/performanceAnalysis/rankingLoadRate.js

@@ -0,0 +1,95 @@
+// import excelHelper from "@/utils/excelHelper";
+export default {
+    data() {
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            timedate: [],
+            currentPage2: 1,
+            pagesize: 10,
+            gridData: [],
+            options: [{
+                value: 'fc',
+                label: '风场'
+            }, {
+                value: 'gf',
+                label: '光伏'
+            }],
+            options2: [],
+            orderByColumn: '',
+            isAsc: '',
+            value: '风场',
+            value2: 'MHS_FDC',
+            updateTime: '',
+            updateTime1: '',
+        }
+    },
+    filters: {
+        rounding(value) {
+            return value.toFixed(2)
+        }
+    },
+    created() {
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options2 = res.data;
+        })
+        this.loadRateData();
+    },
+    methods: {
+        queryApData() {
+            this.loadRateData();
+        },
+
+        headStyle() {
+            return "text-align:center"
+        },
+        formatDatebeginDate(time) {
+            let dateks = new Date(time.beginDate);
+            return this.BASE.getBzDate(dateks, 0);
+        },
+        formatDateendDate(time) {
+            let datejz = new Date(time.endDate);
+            return this.BASE.getBzDate(datejz, 0);
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.loadRateData();
+        },
+        loadRateData() {
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);
+            if (this.timedate == '') {
+                this.timedate[0] = this.updateTime1;
+                this.timedate[1] = this.updateTime;
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            } else {
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var loadRateData = new URLSearchParams();
+            loadRateData.append('pageNum', this.currentPage2);
+            loadRateData.append('pageSize', this.pagesize);
+            loadRateData.append('orderByColumn', this.orderByColumn);
+            loadRateData.append('isAsc', this.isAsc);
+            loadRateData.append('wpId', this.value2);
+            loadRateData.append('beginDate', this.beginDate);
+            loadRateData.append('endDate', this.endDate);
+            this.API.post('/leaderboard/loadfactortoplist', loadRateData).then((res) => {
+                this.gridData = res.data;
+            })
+        },
+        toExcel() {
+            excelHelper.exportExcel("loadratetable", "曲线偏差率排行榜", ".xls", true);
+        }
+    }
+}

+ 88 - 0
src/assets/js/performanceAnalysis/rankingUtilization.js

@@ -0,0 +1,88 @@
+// import excelHelper from "@/utils/excelHelper";
+export default {
+    data() {
+      return {
+        formInline: {
+        windfarm: "",
+        project: "",
+        line: "",
+        },
+        timedate: [],
+        currentPage2: 1,
+		pagesize: 10,
+        gridData:[],
+        options: [{
+          value: '0',
+          label: '风场'
+        }, {
+          value: '1',
+          label: '项目'
+        },{
+          value: '2',
+          label: '线路'
+        },{
+          value: '3',
+          label: '风机'
+        }],
+        options2: [],
+        orderByColumn:'',
+        isAsc: '',
+        value: '0',
+        value2: ''
+      }
+    },
+    created(){
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options2 = res.data;
+        })
+        this.UtilizationRateData();
+    },
+    methods:{
+        queryApData() {
+            this.UtilizationRateData();
+        },
+        
+        headStyle() {
+			return "text-align:center"
+		},
+        
+        changeTableSort(column){
+			this.orderByColumn = column.prop;
+			if(column.order == "descending"){
+				this.isAsc = 'desc';
+			}else if(column.order == "ascending"){
+				this.isAsc = "asc";
+			}
+			this.UtilizationRateData();
+		},
+        UtilizationRateData(){
+            var newData = new Date();
+            this.updateTime = this.BASE.getBzDate(newData.getTime(), 0);
+            this.updateTime1 = this.BASE.getBzDate(newData.getTime(), -1);
+            if(this.timedate == ''){
+                this.timedate[0] = this.updateTime1;
+                this.timedate[1] = this.updateTime;
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }else{
+                this.beginDate = this.timedate[0];
+                this.endDate = this.timedate[1];
+            }
+            var utilizationRateData = new URLSearchParams();
+            utilizationRateData.append('pageNum',this.currentPage2);
+			utilizationRateData.append('pageSize',this.pagesize);
+            utilizationRateData.append('orderByColumn',this.orderByColumn);
+            utilizationRateData.append('isAsc',this.isAsc);
+			utilizationRateData.append('wpId',this.value2);
+			utilizationRateData.append('beginDate',this.beginDate);
+            utilizationRateData.append('endDate',this.endDate);
+            utilizationRateData.append('type',this.value);
+            this.API.post('/leaderboard/utilizationList',utilizationRateData).then((res) => {
+                this.gridData = res.data;
+            })
+        },
+        toExcel(){
+            excelHelper.exportExcel("loadratetable","曲线偏差率排行榜",".xls",true);
+        }
+    }
+}

+ 115 - 0
src/assets/js/performanceAnalysis/singleMachineAnalysis.js

@@ -0,0 +1,115 @@
+// import excelHelper from "@/utils/excelHelper";
+import * as echarts from "echarts";
+export default {
+    data() {
+      return {
+        formInline: {
+        windfarm: "",
+        project: "",
+        line: "",
+        },
+        month:'',
+        year:'',
+        timeyear:'',
+        timemonth:'',
+        currentPage2: 1,
+	      pagesize: 10,
+        gridData:[],
+        gridDataChart:[],
+        charFreData:[],
+        charNameData:[],
+        options: [],
+        options2: [],
+        orderByColumn:'',
+        isAsc: '',
+        value: 'MHS_FDC',
+        value2:'',
+        fanData:'',
+        title:'',
+        updateTime:'',
+      }
+    },
+   
+    created(){
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+        this.callAndSpeedData();
+    },
+    methods:{
+        queryApData() {
+            this.callAndSpeedData();
+        },
+        headStyle() {
+          return "text-align:center,background-color:red"
+        },
+        tableDatawindturbineName(val){
+          this.fanData = val;
+          console.log(this.fanData)
+          this.timemonth = this.month.toString(); 
+          this.timeyear = this.year.toString();
+          this.timemonth = this.timemonth.slice(5,7);
+          this.$router.push({
+            path:'/singleMachineAnalysisOperation',
+            query:{
+              data:this.fanData,
+              timeyear: this.year,
+              timemonth: this.timemonth
+            }
+          })
+        },
+        changeTableSort(column){
+          this.orderByColumn = column.prop;
+          if(column.order == "descending"){
+            this.isAsc = 'desc';
+          }else if(column.order == "ascending"){
+            this.isAsc = "asc";
+          }
+          this.callAndSpeedData();
+        },
+        projectData(){
+            this.API.get('/powercompare/projectAjax?wpIds=' + this.value).then((res) =>{
+                this.options2 = res.data;
+            })
+        },
+        callAndSpeedData(){
+            const nowDate = new Date();
+            const date = {
+                year: nowDate.getFullYear(),
+                month: nowDate.getMonth() + 1,
+                date: nowDate.getDate(),
+            }
+            const newmonth = date.month>10?date.month:'0'+date.month
+            const day = date.date>10?date.date - 1:'0'+date.date
+            this.updateTime = date.year + '-' + newmonth + '-' + day
+            if(this.month == ''){
+              this.month = this.updateTime;
+              this.timemonth = this.month.slice(5,7);
+            }else{
+              this.month = this.month.toString(); 
+              this.timemonth = this.month.slice(5,7);
+            }
+            if(this.year == ''){
+              this.year = this.updateTime;
+              this.year = this.year.slice(0,4);
+            }else{
+              this.year = this.year.toString();
+            }
+            var performanceAnalysis = new URLSearchParams();
+            performanceAnalysis.append('pageNum',this.currentPage2);
+		      	performanceAnalysis.append('pageSize',this.pagesize);
+            performanceAnalysis.append('orderByColumn',this.orderByColumn);
+            performanceAnalysis.append('isAsc',this.isAsc);
+		  	    performanceAnalysis.append('wpId',this.value);
+            performanceAnalysis.append('year',this.year);
+            performanceAnalysis.append('month',this.timemonth);
+            this.API.post('/singleanalysis/singleanalysisMain',performanceAnalysis).then((res) => {
+                this.gridData = res.data;
+                this.title = this.gridData[0].windPowerStationName + this.timeyear + '年' + this.timemonth + '月单台机组运行指标性能分析';
+            })
+        },
+        toExcel(){
+            excelHelper.exportExcel("callthepolicetable","负荷率排行榜",".xls",true);
+        },
+    }
+}

+ 193 - 0
src/assets/js/performanceAnalysis/singleMachineAnalysisOperation.js

@@ -0,0 +1,193 @@
+// import {formatDate} from '../../utils/fomatDate';
+export default {
+    data() {
+        return {
+            pdfTitle: '因子评价报告',
+            pdfSelector: '单机性能分析',
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            title: '',
+            year: '',
+            month: '',
+            getData: [],
+            tableDataAll: [],
+            text1: '',
+            sbxxs: '',
+            tbsbxxs: '',
+            tbsbklly: '',
+            sbklly: '',
+            dxkyxs: '',
+            tbdxkyxs: '',
+            jfpl: '',
+            tbjfpl: '',
+            gltxyzx: '',
+            tbglyzxxs: '',
+            text2: '',
+            fdlChart: '',
+            wsChart: '',
+            date: [],
+            date2: [],
+            date3: [],
+            xdData: [],
+            xnwdbData: [],
+            jxssData: [],
+            gzssData: [],
+            fdldata: [],
+            fsdata: [],
+            jdChart: [],
+            jfData: [],
+            djData: [],
+            slssData: [],
+            tableData: [{
+                date: '2016-05-02',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1518 弄'
+            }, {
+                date: '2016-05-04',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1517 弄'
+            }, {
+                date: '2016-05-01',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1519 弄'
+            }, {
+                date: '2016-05-03',
+                name: '王小虎',
+                address: '上海市普陀区金沙江路 1516 弄'
+            }]
+
+        }
+    },
+    filters: {
+        //方法一: yyyy-MM-dd hh:mm
+
+    },
+    created() {
+        this.performance();
+        this.$nextTick(function () {
+            this.getChartDataImport('chartHistogram')
+        })
+    },
+    methods: {
+        headStyle() {
+            return "text-align:center"
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.performance();
+        },
+        performance() {
+            this.tableDataAll = [];
+            this.getData = this.$route.query.data;
+            this.year = this.$route.query.timeyear;
+            this.month = this.$route.query.timemonth;
+            this.title = this.getData.windturbineName + this.year + '年' + this.month + '月运行指标性能分析';
+            var performance = new URLSearchParams();
+            performance.append('wtId', this.getData.windturbineid);
+            performance.append('year', this.year);
+            performance.append('month', this.month);
+            this.API.post('/singleanalysis/singleanalysisSub', performance).then((res) => {
+                console.log(res)
+                this.tableData = res.data;
+                this.tableDataAll.push({ name: '实际发电量(万千瓦时)', byz: this.tableData.byzb.fdl, qntq: this.tableData.tqzb.fdl, tbzzl: this.tableData.tbzb.fdl, hb: this.tableData.hqzb.fdl, hq: this.tableData.hbzb.fdl });
+                this.tableDataAll.push({ name: '理论发电量(万千瓦时)', byz: this.tableData.byzb.llfdl, qntq: this.tableData.tqzb.llfdl, tbzzl: this.tableData.tbzb.llfdl, hb: this.tableData.hqzb.llfdl, hq: this.tableData.hbzb.llfdl });
+                this.tableDataAll.push({ name: '设备利用小时(小时)', byz: this.tableData.byzb.lyxs, qntq: this.tableData.tqzb.lyxs, tbzzl: this.tableData.tbzb.lyxs, hb: this.tableData.hqzb.lyxs, hq: this.tableData.hbzb.lyxs });
+                this.tableDataAll.push({ name: '设备利用率(%)', byz: this.tableData.byzb.sbklyl, qntq: this.tableData.tqzb.sbklyl, tbzzl: this.tableData.tbzb.sbklyl, hb: this.tableData.hqzb.sbklyl, hq: this.tableData.hbzb.sbklyl });
+                this.tableDataAll.push({ name: '等效可用系数(%)', byz: this.tableData.byzb.dxklyxs, qntq: this.tableData.tqzb.dxklyxs, tbzzl: this.tableData.tbzb.dxklyxs, hb: this.tableData.hqzb.dxklyxs, hq: this.tableData.hbzb.dxklyxs });
+                this.tableDataAll.push({ name: '平均风速(m/s)', byz: this.tableData.byzb.fs, qntq: this.tableData.tqzb.fs, tbzzl: this.tableData.tbzb.fs, hb: this.tableData.hqzb.fs, hq: this.tableData.hbzb.fs });
+                this.tableDataAll.push({ name: '小风切入风速(m/s)', byz: this.tableData.byzb.xfqr, qntq: this.tableData.tqzb.xfqr, tbzzl: this.tableData.tbzb.xfqr, hb: this.tableData.hqzb.xfqr, hq: this.tableData.hbzb.xfqr });
+                this.tableDataAll.push({ name: '小风切入合格率(%)', byz: this.tableData.byzb.xfqrhgl, qntq: this.tableData.tqzb.xfqrhgl, tbzzl: this.tableData.tbzb.xfqrhgl, hb: this.tableData.hqzb.xfqrhgl, hq: this.tableData.hbzb.xfqrhgl });
+                this.tableDataAll.push({ name: '有效风时数(小时)', byz: this.tableData.byzb.yxfss, qntq: this.tableData.tqzb.yxfss, tbzzl: this.tableData.tbzb.yxfss, hb: this.tableData.hqzb.yxfss, hq: this.tableData.hbzb.yxfss });
+                this.tableDataAll.push({ name: '故障损失电量(万千瓦时)', byz: this.tableData.byzb.gzss, qntq: this.tableData.tqzb.gzss, tbzzl: this.tableData.tbzb.gzss, hb: this.tableData.hqzb.gzss, hq: this.tableData.hbzb.gzss });
+                this.tableDataAll.push({ name: '调度限电损失电量(万千瓦时)', byz: this.tableData.byzb.xdss, qntq: this.tableData.tqzb.xdss, tbzzl: this.tableData.tbzb.xdss, hb: this.tableData.hqzb.xdss, hq: this.tableData.hbzb.xdss });
+                this.tableDataAll.push({ name: '计划检修损失电量(万千瓦时)', byz: this.tableData.byzb.jxss, qntq: this.tableData.tqzb.jxss, tbzzl: this.tableData.tbzb.jxss, hb: this.tableData.hqzb.jxss, hq: this.tableData.hbzb.jxss });
+                this.tableDataAll.push({ name: '性能未达标损失电量(万千瓦时)', byz: this.tableData.byzb.xnss, qntq: this.tableData.tqzb.xnss, tbzzl: this.tableData.tbzb.xnss, hb: this.tableData.hqzb.xnss, hq: this.tableData.hbzb.xnss });
+                this.tableDataAll.push({ name: '故障停运时间(小时)', byz: this.tableData.byzb.gzxs, qntq: this.tableData.tqzb.gzxs, tbzzl: this.tableData.tbzb.gzxs, hb: this.tableData.hqzb.gzxs, hq: this.tableData.hbzb.gzxs });
+                this.tableDataAll.push({ name: '检修停运时间(小时)', byz: this.tableData.byzb.jxxs, qntq: this.tableData.tqzb.jxxs, tbzzl: this.tableData.tbzb.jxxs, hb: this.tableData.hqzb.jxxs, hq: this.tableData.hbzb.jxxs });
+                this.tableDataAll.push({ name: '并网时间(小时)', byz: this.tableData.byzb.rlxs, qntq: this.tableData.tqzb.rlxs, tbzzl: this.tableData.tbzb.rlxs, hb: this.tableData.hqzb.rlxs, hq: this.tableData.hbzb.rlxs });
+                this.tableDataAll.push({ name: '待机时间(小时)', byz: this.tableData.byzb.tjxs, qntq: this.tableData.tqzb.tjxs, tbzzl: this.tableData.tbzb.tjxs, hb: this.tableData.hqzb.tjxs, hq: this.tableData.hbzb.tjxs });
+                this.tableDataAll.push({ name: '通讯中断时间(小时)', byz: this.tableData.byzb.zdxs, qntq: this.tableData.tqzb.zdxs, tbzzl: this.tableData.tbzb.zdxs, hb: this.tableData.hqzb.zdxs, hq: this.tableData.hbzb.zdxs });
+                this.tableDataAll.push({ name: '功率特性一致性系数(%)', byz: this.tableData.byzb.glyzxxs, qntq: this.tableData.tqzb.glyzxxs, tbzzl: this.tableData.tbzb.glyzxxs, hb: this.tableData.hqzb.glyzxxs, hq: this.tableData.hbzb.glyzxxs });
+                this.tableDataAll.push({ name: '静风频率(%)', byz: this.tableData.byzb.jfpl, qntq: this.tableData.tqzb.jfpl, tbzzl: this.tableData.tbzb.jfpl, hb: this.tableData.hqzb.jfpl, hq: this.tableData.hbzb.jfpl });
+                this.text1 = this.tableData.byzb.windturbineName;
+                this.sbxxs = this.tableData.byzb.lyxs;
+                this.tbsbxxs = this.tableData.tqzb.lyxs;
+                this.sbklly = this.tableData.byzb.sbklyl;
+                this.tbsbklly = this.tableData.tqzb.sbklyl;
+                this.dxkyxs = this.tableData.byzb.dxklyxs;
+                this.tbdxkyxs = this.tableData.tqzb.dxklyxs;
+                this.jfpl = this.tableData.byzb.jfpl;
+                this.tbjfpl = this.tableData.tqzb.jfpl;
+                this.gltxyzx = this.tableData.byzb.glyzxxs;
+                this.tbglyzxxs = this.tableData.tqzb.glyzxxs;
+                this.text2 = this.tableData.byzb.windturbineName + this.year + '年' + this.month + '月平均风速' + this.tableData.byzb.fs + 'm/s、同比' +
+                    this.tableData.tqzb.fs + 'm/s,有效风时数' + this.tableData.byzb.yxfss + '小时、同比' + this.tableData.tqzb.yxfss + '小时,实际发电电量' +
+                    this.tableData.byzb.fdl + '万kwh、同比' + this.tableData.tqzb.fdl + '万kwh,同比增长率' + this.tableData.tbzb.fdl + '%,各项损失电量累计' +
+                    this.tableData.byzb.xnss + '万kwh、同比' + this.tableData.tqzb.xnss + '万kwh,同比增长率' + this.tableData.tbzb.xnss + '%,理论发电量' +
+                    this.tableData.byzb.llfdl + '万kwh、实际发电量与理论发电量相差' + this.tableData.tbzb.llfdl + '万kwh';
+            })
+            this.API.post('/singleanalysis/singleanalysisChart', performance).then((res) => {
+                this.fdlChart = res.data.ff;
+                for (let i = 0; i < this.fdlChart.length; i++) {
+                    let date = this.BASE.getBzDate(new Date(this.fdlChart[i].recorddate),0);
+                    this.date.push(date);
+                    this.fdldata.push(this.fdlChart[i].fdl);
+                    this.fsdata.push(this.fdlChart[i].fs);
+                    this.$nextTick(function () {
+                        this.getChartDataImport('chartHistogram')
+                    })
+                }
+                this.wsChart = res.data.ws;
+                console.log(this.wsChart)
+                for (let i = 0; i < this.wsChart.length; i++) {
+                    let wsdate = this.BASE.getBzDate(new Date(this.wsChart[i].recorddate),0);
+                    this.date2.push(wsdate);
+                    this.xdData.push(this.wsChart[i].xdss);
+                    this.xnwdbData.push(this.wsChart[i].xnss);
+                    this.jxssData.push(this.wsChart[i].jxss);
+                    this.gzssData.push(this.wsChart[i].gzss);
+                    this.slssData.push(this.wsChart[i].slss);
+                    this.$nextTick(function () {
+                        this.getLossChartDataImport('losschartHistogram')
+                    })
+                }
+                this.jdChart = res.data.jd;
+                // console.log(this.jdChart)
+                for (let i = 0; i < this.jdChart.length; i++) {
+                    let jddata = this.BASE.getBzDate(new Date(this.jdChart[i].recorddate),0);
+                    this.date3.push(jddata);
+                    this.jfData.push(this.jdChart[i].jfpl);
+                    this.djData.push(this.jdChart[i].tjxs);
+                    this.$nextTick(function () {
+                        this.getWindChartDataImport('windchartHistogram')
+                    })
+                }
+            })
+
+        },
+        getChartDataImport() {
+            this.ECLZX.getSingleMachineAnalysisOperationChart("chartHistogram",
+            this.fdldata,['发电量(万千瓦时)', '风速(m/s)'],this.date,this.fsdata);
+        },
+        getLossChartDataImport() {
+            this.ECLZX.getSingleMachineAnalysisOperationChart2("losschartHistogram",
+            ['限电损失电量(万千瓦时)', '性能未达标损失电量(万千瓦时)', '检修损失电量(万千瓦时)', '故障损失电量(万千瓦时)', '受累损失电量(万千瓦时)'],
+            this.date2,this.xdData,this.xnwdbData,this.jxssData,this.gzssData,this.slssData);
+        },
+        getWindChartDataImport() {
+            this.ECLZX.getSingleMachineAnalysisOperationChart3("windchartHistogram",
+            ['静风频率(小时)', '待机时间(小时)'],this.date3,this.jfData,this.djData);
+        },
+        goReturn() {
+            this.$router.push('/singleMachineAnalysis')
+        },
+    }
+}

+ 234 - 0
src/assets/js/performanceAnalysis/singleMachinePower.js

@@ -0,0 +1,234 @@
+// import excelHelper from "@/utils/excelHelper";
+export default {
+    data() {
+        return {
+            formInline: {
+                windfarm: "",
+                project: "",
+                line: "",
+            },
+            activeName: 'first',
+            information: 'first',
+            value: 'MHS_FDC',
+            value2: 'MG01_01',
+            options: [],
+            options2: [],
+            month: '',
+            time: '',
+            timemonth: '',
+            timeyear: '',
+            updateTime: '',
+            title: '月曲线偏差率排行榜',
+            daymonth: '',
+            dayyear: '',
+            currentPage2: 1,
+            pagesize: 10,
+            orderByColumn: '',
+            isAsc: '',
+            gridData: [],
+            gridDataChart: [],
+            gridDataChartX: [],
+            gridDataChartYsjnh: [],
+            gridDataChartYzynh: [],
+            gridDataChartYbzgl: [],
+            switchtableall: true,
+            switchtableday: false,
+            switchtablemonth: false,
+            total: 0,
+        }
+    },
+    created() {
+        var newData = new Date();
+        this.updateTime = this.BASE.getBzDate(newData.getTime(), -1);
+        this.API.get('/powercompare/windfarmAjax').then((res) => {
+            this.options = res.data;
+        })
+        this.API.get('/powercompare/windturbineAjax?wpId=' + this.value).then((res) => {
+            this.options2 = res.data;
+        })
+        this.singleMachinePower();
+    },
+    methods: {
+        queryApData() {
+            this.singleMachinePower();
+        },
+        handleSizeChange(val) {
+            console.log(`每页 ${val} 条`);
+            this.pagesize = val;
+            this.singleMachinePower();
+        },
+        handleCurrentChange(val) {
+            // console.log(`当前页: ${val}`);
+            this.singleMachinePower();
+        },
+        headStyle() {
+            return "text-align:center"
+        },
+        handleClick(tab) {
+            // console.log(tab.name)
+            this.information = tab.name;
+            this.singleMachinePower();
+        },
+        changeTableSort(column) {
+            this.orderByColumn = column.prop;
+            if (column.order == "descending") {
+                this.isAsc = 'desc';
+            } else if (column.order == "ascending") {
+                this.isAsc = "asc";
+            }
+            this.singleMachinePower();
+        },
+        singleMachinePower() {
+            this.gridDataChart = [];
+            this.gridDataChartX = [];
+            this.gridDataChartYsjnh = [];
+            this.gridDataChartYzynh = [];
+            this.gridDataChartYbzgl = [];
+
+            var singleMachinePowerData = new URLSearchParams();
+            var singleMachinePowerDataChart = new URLSearchParams();
+            if (this.information == 'first') {
+                this.title = '单机总功率信息列表';
+                this.switchtableall = true;
+                this.switchtableday = false;
+                this.switchtablemonth = false;
+                singleMachinePowerData.append('pageNum', this.currentPage2);
+                singleMachinePowerData.append('pageSize', this.pagesize);
+                singleMachinePowerData.append('orderByColumn', this.orderByColumn);
+                singleMachinePowerData.append('isAsc', this.isAsc);
+                singleMachinePowerData.append('wtId', this.value2);
+                this.API.post("/powersaturation/powersaturationamonutlist", singleMachinePowerData).then((res) => {
+                    this.gridData = res.data.list;
+                    this.total = res.data.total;
+                })
+                singleMachinePowerDataChart.append('wtId', this.value2);
+                this.API.post("/powersaturation/powersaturationamonutchart", singleMachinePowerDataChart).then((res) => {
+                    this.gridDataChart = res.data;
+                    for (let i = 0; i < this.gridDataChart.length; i++) {
+                        this.gridDataChartX.push(this.gridDataChart[i].value1);
+                        this.gridDataChartYsjnh.push(this.gridDataChart[i].value2);
+                        this.gridDataChartYzynh.push(this.gridDataChart[i].value3);
+                        this.gridDataChartYbzgl.push(this.gridDataChart[i].value4);
+                    }
+                    this.$nextTick(function () {
+                        this.drawPie('leiDaTu')
+                    })
+                })
+            } else if (this.information == 'second') {
+                this.title = '单机月功率信息列表';
+                this.switchtableall = false;
+                this.switchtableday = true;
+                this.switchtablemonth = false;
+                singleMachinePowerData.append('pageNum', this.currentPage2);
+                singleMachinePowerData.append('pageSize', this.pagesize);
+                singleMachinePowerData.append('orderByColumn', this.orderByColumn);
+                singleMachinePowerData.append('isAsc', this.isAsc);
+                singleMachinePowerData.append('wtId', this.value2);
+                if (this.timeyear == '') {
+                    this.timeyear = this.updateTime;
+                    this.timeyear = this.timeyear.slice(0, 4);
+                } else {
+                    this.timeyear = this.timeyear.toString();
+
+                }
+                singleMachinePowerData.append('year', this.timeyear);
+                if (this.month == '') {
+                    this.month = this.updateTime;
+                    if (this.month.substring(5, 7) < 10) {
+                        this.timemonth = this.month.substring(6, 7);
+                    } else {
+                        this.timemonth = this.month.substring(5, 7);
+                    }
+                } else {
+                    this.timemonth = this.month.toString();
+                    if (this.timemonth.substring(5, 7) < 10) {
+                        this.timemonth = this.timemonth.substring(6, 7);
+                    } else {
+                        this.timemonth = this.timemonth.substring(5, 7)
+                    }
+                }
+                console.log(this.timemonth)
+                singleMachinePowerData.append('month', this.timemonth);
+                this.API.post("/powersaturation/powersaturationmonthlist", singleMachinePowerData).then((res) => {
+                    this.gridData = res.data.list;
+                    this.total = res.data.total;
+                })
+                singleMachinePowerDataChart.append('wtId', this.value2);
+                singleMachinePowerDataChart.append('year', this.timeyear);
+                singleMachinePowerDataChart.append('month', this.timemonth);
+                this.API.post("/powersaturation/powersaturationmonthchart", singleMachinePowerDataChart).then((res) => {
+                    this.gridDataChart = res.data;
+                    for (let i = 0; i < this.gridDataChart.length; i++) {
+                        this.gridDataChartX.push(this.gridDataChart[i].value1);
+                        this.gridDataChartYsjnh.push(this.gridDataChart[i].value2);
+                        this.gridDataChartYzynh.push(this.gridDataChart[i].value3);
+                        this.gridDataChartYbzgl.push(this.gridDataChart[i].value4);
+                    }
+                    console.log(this.gridDataChart)
+                    this.$nextTick(function () {
+                        this.drawPie('leiDaTu')
+                    })
+                })
+            } else if (this.information == 'cord') {
+                this.title = '单机日功率信息列表';
+                this.switchtableall = false;
+                this.switchtableday = false;
+                this.switchtablemonth = true;
+                if (this.time == '') {
+                    this.time = this.updateTime;
+                }
+                singleMachinePowerData.append('pageNum', this.currentPage2);
+                singleMachinePowerData.append('pageSize', this.pagesize);
+                singleMachinePowerData.append('orderByColumn', this.orderByColumn);
+                singleMachinePowerData.append('isAsc', this.isAsc);
+                singleMachinePowerData.append('wtId', this.value2);
+                singleMachinePowerData.append('recorddate', this.time);
+                this.API.post("/powersaturation/powersaturationlist", singleMachinePowerData).then((res) => {
+                    this.gridData = res.data.list;
+                    this.total = res.data.total;
+                })
+                singleMachinePowerDataChart.append('wtId', this.value2);
+                singleMachinePowerDataChart.append('recorddate', this.time);
+                this.API.post("/powersaturation/powersaturationchart", singleMachinePowerDataChart).then((res) => {
+                    this.gridDataChart = res.data;
+                    for (let i = 0; i < this.gridDataChart.length; i++) {
+                        this.gridDataChartX.push(this.gridDataChart[i].value1);
+                        this.gridDataChartYsjnh.push(this.gridDataChart[i].value2);
+                        this.gridDataChartYzynh.push(this.gridDataChart[i].value3);
+                        this.gridDataChartYbzgl.push(this.gridDataChart[i].value4);
+                    }
+                    this.$nextTick(function () {
+                        this.drawPie('leiDaTu')
+                    })
+                })
+            }
+        },
+        toExcel() {
+            excelHelper.exportExcel("singlemachinepower", "负荷率排行榜", ".xls", true);
+        },
+        drawPie() {
+            this.ECLZX.getSingleMachineSaturationChart("leiDaTu",this.gridDataChartX,
+            [
+                {
+                  name: '实际拟合功率',
+                  type: 'line',
+                  stack: '总量',
+                  data: this.gridDataChartYsjnh
+                },
+                {
+                  name: '最优拟合功率',
+                  type: 'line',
+                  stack: '总量',
+                  data: this.gridDataChartYzynh
+                },
+                {
+                  name: '保证功率',
+                  type: 'line',
+                  stack: '总量',
+                  data: this.gridDataChartYbzgl
+                },
+              ],['实际拟合功率', '最优拟合功率', '保证功率']);
+
+        },
+    }
+}

+ 112 - 0
src/assets/js/singlePerformanceAnalysis/individualHistoryinformation.js

@@ -0,0 +1,112 @@
+
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+        wpIdslist: {
+        name:"",
+        id:"",
+      },
+      b:[],
+      fc:"",
+      fj:"",
+      data_01:"2021-01-01",
+      data_02:"2021-01-03",
+      currentPage2: 1,
+      pagesize:10,
+      orderByColumn: "",
+      tableData:[],
+    }
+  },
+   created() {
+  },
+  methods: {
+     query_table(){
+     let that = this;
+      var digital = new URLSearchParams();
+      digital.append("pageNum", this.currentPage2);
+      digital.append("pageSize", this.pagesize);
+      digital.append("orderByColumn", this.orderByColumn);
+      digital.append("isAsc", this.isAsc);
+      digital.append("wtId", this.fj);
+      digital.append("beginDate", this.data_01);
+      digital.append("endDate", this.data_02);
+      this.API.post("/goodness/goodhistorylist", digital).then((res) => {
+         this.tableData = res.data;
+      });
+
+     },
+     /**改变格式 */
+     data_formatter(cellValue){ return this.BASE.getBzDate(new Date(cellValue.recorddate),0)},
+     gaindate() {
+      let _this = this;
+      if (this.fc == null || this.fc == undefined || this.fc == "") {
+        _this.b = JSON.parse(sessionStorage.getItem('b'));
+        _this.fc = JSON.parse(sessionStorage.getItem('fc'));
+        _this.fj = JSON.parse(sessionStorage.getItem('fj'));
+        _this.data_01 = JSON.parse(sessionStorage.getItem('data_01'));
+        _this.data_02 = JSON.parse(sessionStorage.getItem('data_02'));
+      } else {
+        this.b = this.$route.query.data;
+        this.fc = this.$route.query.data.windtpowerstationid;
+        this.fj = this.$route.query.data.windturbineid;
+        this.data_01 = this.BASE.getBzDate(
+          new Date(this.$route.query.data.recorddate),-1
+        );
+        this.data_02 = this.BASE.getBzDate(
+          new Date(this.$route.query.data.recorddate),0
+        );
+      }
+      // this.b = this.$route.query.data;
+      // this.fc = this.$route.query.data.windtpowerstationid;
+      // this.fj = this.$route.query.data.windturbineid;
+      // this.data_01 = this.BASE.getBzDate(
+      //   new Date(this.$route.query.data.recorddate),0
+      // );
+      // this.data_02 = this.BASE.getBzDate(
+      //   new Date(this.$route.query.data.recorddate+60*60*24*1000),0
+      // );
+      this.query_wpid();
+    },
+    /**返回 */
+    goback() {
+      this.$router.push({
+        path: "/individualPandectinformation"
+      });
+    },
+    /**获取id */
+    query_wpid() {
+      this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.wpIdslist = res.data;
+      });
+    },
+  },
+  mounted() {
+      this.b = this.$route.query.data;
+      this.fc = this.$route.query.data.windtpowerstationid;
+      this.fj = this.$route.query.data.windturbineid;
+      this.data_01 = this.BASE.getBzDate(
+        new Date(this.$route.query.data.recorddate),0
+      );
+      this.data_02 = this.BASE.getBzDate(
+        new Date(this.$route.query.data.recorddate+1),0
+      );
+      window.addEventListener("beforeunload", () => {
+        sessionStorage.setItem('b', JSON.stringify(this.$route.query.data));
+        sessionStorage.setItem('fc', JSON.stringify(this.$route.query.data.windtpowerstationid));
+        sessionStorage.setItem('fj', JSON.stringify(this.$route.query.data.windturbineid));
+        sessionStorage.setItem('data_01', JSON.stringify(this.BASE.getBzDate(
+          new Date(this.$route.query.data.recorddate),-1
+        )));
+        sessionStorage.setItem('data_02', JSON.stringify(this.BASE.getBzDate(
+          new Date(this.$route.query.data.recorddate),0
+        )));
+      });
+      this.gaindate();
+      this.query_table();
+    },
+};

+ 70 - 0
src/assets/js/singlePerformanceAnalysis/individualPandectinformation.js

@@ -0,0 +1,70 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      tableData: [],
+      date_1: "",
+      currentPage2: 1,
+      pagesize: 10,
+      isAsc:'asc',
+      orderByColumn:'',
+      wpIdslist: {
+        name: "",
+        id: "",
+      },
+      fc: "MHS_FDC",
+    };
+  },
+  created() {},
+  methods: {
+    /**查询数据 */
+    query_table(){
+      let that = this;
+      this.tableData = [];
+      var digital = new URLSearchParams();
+        digital.append('isAsc',this.isAsc);
+        digital.append('wpId',this.fc);
+        digital.append('recorddate',this.date_1);
+      this.API.post('/goodness/windturbinegoodness',digital).then((res) => {
+          that.tableData = res.data.list;
+      })
+    },
+    /**跳转详情或历史 */
+    handleEdit(b) {
+      this.$router.push({
+        path: "/individualPandectinformationdetails",
+        query: {
+          data: b,
+        },
+      });
+    },
+    history(b) {
+      this.$router.push({
+        path: "/individualHistoryinformation",
+        query: {
+          data: b,
+        },
+      });
+    },
+    // toExcel() {
+    //   excelHelper.exportExcel("tableData", "单机信息总览", ".xls", true);
+    // },
+    query_wpid() {
+        this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.wpIdslist = res.data;
+      });
+    },
+    
+  },
+  mounted() {
+    var newData = new Date();
+    this.date_1 =  this.BASE.getBzDate(newData.getTime(),-1);
+    this.query_wpid();
+    this.query_table();
+  }
+};

ファイルの差分が大きいため隠しています
+ 1161 - 0
src/assets/js/singlePerformanceAnalysis/individualPandectinformationdetails.js


+ 167 - 0
src/assets/js/singlePerformanceAnalysis/powerChart.js

@@ -0,0 +1,167 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      wpIdslist: {
+        name: "",
+        id: "",
+      },
+      pjIdslist: {
+        name: "麻黄山一期工程",
+        id: "MHS01_GC",
+      },
+      xlIdslist: {
+        name: "麻黄山一号集电线路",
+        id: "MHS01_XL",
+      },
+      fc: "MHS_FDC",
+      pj: "麻黄山一期工程",
+      xl: "麻黄山一号集电线路",
+      year: "2021",
+      month: "01",
+      activeName: "no_1",
+      loading: true,
+      loading2: true,
+      loading3: true,
+      xllist: [],
+      scatter_1: [],
+      scatter_2: [],
+      scatter_3: [],
+    };
+  },
+  created() { },
+  methods: {
+    /**
+     * 查询风场
+     */
+    query_wpid() {
+      let that = this;
+      let newData = new Date();
+      this.year = newData.getFullYear() + '';
+      let month = newData.getMonth() +'';
+      if(this.month==0){that.month=12;that.year=that.year-1};
+      if (month < 10) { that.month = '0' + month };
+      this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.wpIdslist = res.data;
+        this.query_xml();
+        this.query_xl();
+      });
+      this.query_xl();
+    },
+    /**
+     * 当前卡片判断
+     */
+    handleClick() {
+      if (this.activeName == "no_1") {
+        this.query_scatter_1();
+      } else if (this.activeName == "no_2") {
+        this.query_scatter_2();
+      } else if (this.activeName == "no_3") {
+        this.query_scatter_3();
+      }
+    },
+    /**
+     * 查线路
+     */
+    query_xl() {
+      this.xl = "";
+      Object.assign(this.$data.xlIdslist, this.$options.data().xlIdslist);
+      this.API
+        .get("powercompare/lineWpIdAjax?wpId=" + this.fc)
+        .then((res) => {
+          this.xlIdslist = res.data;
+        });
+    },
+    /**
+     * 查数据
+     */
+    query_scatter_1() {
+      let that = this;
+      Object.assign(this.$data.scatter_1, this.$options.data().scatter_1);
+      var digital = new URLSearchParams();
+      digital.append("wpId", this.fc);
+      digital.append("lnId", "");
+      digital.append("pjId", "");
+      digital.append("year", this.year);
+      digital.append("month", this.month);
+      this.API.postL("/scatter/scatterAjax", digital).then((res) => {
+        this.scatter_1 = res.data.data;
+        this.loading1 = false;
+        this.ECZM.sdt("scatter_diagram_1",this.scatter_1);
+
+      });
+    },
+    query_scatter_2() {
+      let that = this;
+      Object.assign(this.$data.scatter_2, this.$options.data().scatter_2);
+      var digital = new URLSearchParams();
+      digital.append("wpId", this.fc);
+      digital.append("lnId", "");
+      digital.append("pjId", this.pj);
+      digital.append("year", this.year);
+      digital.append("month", this.month);
+      this.API.postL("/scatter/scatterAjax", digital).then((res) => {
+        this.scatter_2 = res.data.data;
+        this.loading2 = false;
+        this.ECZM.sdt("scatter_diagram_2",this.scatter_2);
+
+      });
+    },
+    query_scatter_3() {
+      Object.assign(this.$data.scatter_3, this.$options.data().scatter_3);
+      var digital = new URLSearchParams();
+      digital.append("wpId", this.fc);
+      digital.append("lnId", this.xl);
+      digital.append("pjId", "");
+      digital.append("year", this.year);
+      digital.append("month", this.month);
+      this.API.postL("/scatter/scatterAjax", digital).then((res) => {
+        this.scatter_3 = res.data.data;
+        this.loading3 = false;
+        this.ECZM.sdt("scatter_diagram_3",this.scatter_3);
+      });
+    },
+    /**
+     * 查项目
+     */
+    query_xml() {
+      let that = this;
+      Object.assign(this.$data.xllist, this.$options.data().xllist);
+      Object.assign(this.$data.pjIdslist, this.$options.data().pjIdslist);
+      this.pj = "";
+      this.xl = "";
+      this.xllist = [];
+      this.API
+        .get("powercompare/projectAjax?wpIds=" + this.fc)
+        .then((res) => {
+          this.pjIdslist = res.data;
+          for (let i = 0; i < Object.keys(this.pjIdslist).length; i++) {
+            that.xllist.push(that.pjIdslist[i].id);
+          }
+        });
+    },
+    /**
+     * 过滤
+     */
+    filter() {
+      for (let i = 0; i < Object.keys(this.QBlist).length; i++) {
+        fjj = "";
+        fjj = this.QBlist[i].id;
+        if (fjj.endsWith("FDC")) {
+          that.FClist.push(this.QBlist[i]);
+        } else {
+          that.GFlist.push(this.QBlist[i]);
+        }
+      }
+    },
+  },
+  mounted() {
+    this.query_wpid();
+    this.query_scatter_1();
+  },
+};

+ 163 - 0
src/assets/js/singlePerformanceAnalysis/powerandWindspeedChart.js

@@ -0,0 +1,163 @@
+
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+        },
+      wpIdslist: {
+        name: "",
+        id: "",
+      },
+      loading:true,
+      loading2:true,
+      wtIdslist: {
+        name: "麻黄山1号风机",
+        id: "MG01_01",
+      },
+      fc: "MHS_FDC",
+      fj: "MG01_01",
+      year: "2021",
+      month: "12",
+      sdtDate: [],
+      lineDate:[],
+    };
+  },
+  created() {},
+  methods: {
+    /**
+     * 查询风机风场
+     */
+    query() {
+      this.wtIdslist = [];
+      let that = this;
+      this.API
+        .get("powercompare/windturbineAjax?wpId=" + that.fc)
+        .then((res) => {
+          this.wtIdslist = res.data;
+        });
+    },
+    query_wpid() {
+      let that = this;
+      let newData = new Date();
+      this.year = newData.getFullYear()+'';
+      this.month = newData.getMonth()+''; 
+      if(this.month==0){that.month=12;that.year=that.year-1};
+      this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.wpIdslist = res.data;
+      });
+      this.query();
+    },
+    /**
+     * 获取数据
+     */
+    query_scatter() {
+      let sdtDate = [];
+      let lineDate = [];
+      var digital = new URLSearchParams();
+      digital.append("wtId", this.fj);
+      digital.append("year", this.year);
+      digital.append("month", this.month);
+      this.API.postL("/scatter/scatterWtAjax", digital).then((res) => {
+        sdtDate = res.data.data.scatter;
+        lineDate = res.data.data.line;
+        this.draw_scatter_diagram(sdtDate,lineDate);
+        this.loading=false;
+      });
+    },
+    /**
+     * 画图
+     */
+    draw_scatter_diagram(a,b) {
+      var chartDom = document.getElementById("scatter_diagram");
+      var myChart = echarts.init(chartDom);
+      var option;
+
+      //echarts.registerTransform(ecStat.transform.regression);
+
+      
+
+      option = {
+        title: {
+          text: "风机功率排布情况",
+        },
+        legend: {
+          data: ["功率"],
+          left: "right",
+        },
+        
+        tooltip: {
+          show: false,
+          trigger: "axis",
+          axisPointer: {
+            type: "cross",
+          },
+        },
+        xAxis: {
+          splitLine: {
+            lineStyle: {
+              type: "dashed",
+            },
+          },
+          axisLabel: {
+            formatter: "{value} m/s",
+          },
+          splitNumber: 20,
+        },
+        yAxis: {
+          min: -40,
+          splitLine: {
+            lineStyle: {
+              type: "dashed",
+            },
+          },
+          axisLabel: {
+            formatter: "{value} 万kw",
+          },
+        },
+        series: [
+          {
+            name: "功率",
+            type: "scatter",
+            color: "#FF7F50",
+            data : a,
+            markPoint: {
+              data: [
+                { type: "max", name: "最大值" },
+                { type: "min", name: "最小值" },
+              ],
+              symbol: "pin",
+              symbolSize: 50,
+              silent: true,
+            },
+            markLine: {
+              data: [{ type: "average", name: "平均值" }],
+            },
+          },
+          {
+            name: "line",
+            type: "line",
+            data:b,
+            smooth: true,
+            datasetIndex: 1,
+            symbolSize: 0.1,
+            symbol: "circle",
+            color: "#87CEFA",
+            label: { show: false },
+            labelLayout: { dx: -20 },
+            encode: { label: 2, tooltip: 1 },
+          },
+        ],
+      };
+
+      option && myChart.setOption(option);
+    },
+  },
+  mounted() {
+    this.query_wpid();
+    this.query_scatter();
+  },
+};

BIN
src/assets/logo.png


+ 55 - 0
src/components/common/menu.vue

@@ -0,0 +1,55 @@
+<template>
+  <el-menu v-if="menuIndex !== undefined" :default-active="menuIndex"
+    background-color="#545c64"
+    text-color="#fff"
+    active-text-color="#ffd04b" class="el-menu-demo" mode="horizontal">
+    <template v-for="(item, i) in menu">
+      <el-menu-item :key="i" v-if="item.children.length === 0" :index="(i+1)+''" @click="menuC(item.url)">{{item.name}}</el-menu-item>
+      <menuZj :key="i" v-else :obj="item" :fIndex="(i+1)+''"></menuZj>
+    </template>
+  </el-menu>
+  <el-submenu v-else :index="fIndex" :popper-append-to-body="false">
+    <template slot="title">{{obj.name}}</template>
+    <template v-for="(item, i) in obj.children">
+      <el-menu-item :key="i" v-if="item.children.length === 0" :index="fIndex+'-'+(i+1)" @click="menuC(item.url)">{{item.name}}</el-menu-item>
+      <menuZj :key="i" v-else :obj="item" :fIndex="fIndex+'-'+(i+1)"></menuZj>
+    </template>
+  </el-submenu>
+</template>
+
+<script>
+
+export default {
+  name: "menuZj",
+  data() {
+    return {
+    }
+  },
+  props:{
+    menuIndex: String, // 菜单默认选中项
+    menu: Array, // 菜单数据
+    obj: Object, // 菜单对象
+    fIndex: String, // 父元素的index值
+  },
+  created() {
+    this.init();
+  },
+  methods: {
+
+    //初始化
+    init() {
+      
+    },
+    // 菜单点击跳转
+    menuC(url) {
+      this.$router.push({
+        path: url
+      });
+    }
+  }
+}
+
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 349 - 0
src/components/index/map.vue

@@ -0,0 +1,349 @@
+<template>
+  <div class="sjdpMap">
+    <!-- <div class="title">
+      <div class="font"><font v-for="(item, i) in orgHistory" :key="i">{{item.name}}{{orgHistory.length-1 >i?"/":""}}</font></div>
+      <img @click="orgBack" v-if="orgHistory.length > 1" class="ico" src="../../../static/mapBoard/goBack.png" />
+    </div> -->
+    <div class="date" v-if="dateTag">
+      <font>日期范围:</font>
+      <div class="input">
+        <a-range-picker v-model="date" @change="pushFunc" @calendarChange="initDisabledDate" :placeholder="['起始日期', '截止日期']"
+          :disabled-date="disabledDate" />
+      </div>
+    </div>
+    <div id="container" class="map"></div>
+    <!-- <div class="mapExample">
+      <div class="one" v-if="userinfo.type <= 0">
+        <img src="../../../static/mapBoard/mapExample_1.png" />
+        <font>总中心</font>
+      </div>
+      <div class="one" v-if="userinfo.type <= 1">
+        <img src="../../../static/mapBoard/mapExample_2.png" />
+        <font>分中心</font>
+      </div>
+      <div class="one" v-if="userinfo.type <= 2">
+        <img src="../../../static/mapBoard/mapExample_3.png" />
+        <font>隧管站</font>
+      </div>
+      <div class="one" v-if="userinfo.type <= 3">
+        <img src="../../../static/mapBoard/mapExample_4.png" />
+        <font>隧道</font>
+      </div>
+    </div> -->
+  </div>
+</template>
+
+<script>
+import BMPGL_style from '@components/index/map_style'
+import BMPGL from '@components/index/mapInit'
+export default {
+  data () {
+    return {
+      userinfo: "", // 用户信息 - 从缓存中取
+      orgData: [], // 组织机构数据
+      orgLevel: 0, // 记录当前组织的等级
+      orgHistory: [], // 记录当前层级到顶级的所有组织id
+      orgNowChoose: [], // 组织机构 - 当前选择的组织id集合
+      sdFId: [], // 选隧道 - 存隧管站ID
+
+      timer: null, // 处理同一个元素上的单击和双击冲突
+
+      date: ["", ""], // 日期
+      disabledDate: "", // 日期控件可选的范围控制函数变量
+      startDate: "2019-10-10 00:00:00", // 默认项目其实日期
+
+      moveTag: false, // 是否移动
+
+      map: null, // 地图
+    }
+  },
+  props: {
+    dateTag: Boolean, // 是否开启日期选择
+  },
+  created () {
+    this.init();
+  },
+  methods: {
+
+    //初始化
+    init () {
+      this.initMap();
+    },
+    // 初始化地图
+    initMap () {
+      let _this = this;
+      // 地图实力存在需要先销毁
+      // 销毁地图,当使用 WebGL 渲染地图时,如果确认不再使用该地图实例,则需要调用本方法销毁 WebGL 上下文,
+      // 否则频繁创建新地图实例会导致浏览器报:too many WebGL context 的警告
+      if (this.map !== null) {
+        this.map.destroy();
+      }
+
+      BMPGL.init().then(BMapGL => {
+        // 创建地图实例
+        this.map = new BMapGL.Map('container');
+        this.map.centerAndZoom(new BMapGL.Point(106.152924, 37.387416), 8);
+        this.map.enableScrollWheelZoom(true);
+
+        // 改变地图风格
+        this.map.setMapStyleV2({
+          styleJson: BMPGL_style
+        });
+
+        // 描边
+        // var bd1 = new BMapGL.Boundary();
+        // bd1.get('宁夏', function (rs) {
+        //   let count = rs.boundaries.length;
+        //   for (let i = 0; i < count; i++) {
+        //     let path = [];
+        //     let str = rs.boundaries[i].replace(' ', '');
+        //     let points = str.split(';');
+        //     for (let j = 0; j < points.length; j++) {
+        //       let lng = points[j].split(',')[0];
+        //       let lat = points[j].split(',')[1];
+        //       path.push(new BMapGL.Point(lng, lat));
+        //     }
+        //     let prism = new BMapGL.Prism(path, 5000, {
+        //       topFillColor: '#1e6aff',
+        //       topFillOpacity: 0.4,
+        //       sideFillColor: '#04367b',
+        //       sideFillOpacity: 0.4
+        //     });
+        //     _this.map.addOverlay(prism);
+        //   }
+        // });
+
+        // 描边
+        var bd1 = new BMapGL.Boundary();
+        bd1.get('银川', function (rs) {
+          let count = rs.boundaries.length;
+          for (let i = 0; i < count; i++) {
+            let path = [];
+            let str = rs.boundaries[i].replace(' ', '');
+            let points = str.split(';');
+            for (let j = 0; j < points.length; j++) {
+              let lng = points[j].split(',')[0];
+              let lat = points[j].split(',')[1];
+              path.push(new BMapGL.Point(lng, lat));
+            }
+            let prism = new BMapGL.Prism(path, 5000, {
+              topFillColor: '#00E6FF',
+              topFillOpacity: 0.4,
+              sideFillColor: '#04367b',
+              sideFillOpacity: 0.4
+            });
+            _this.map.addOverlay(prism);
+          }
+        });
+
+        // 描边
+        var bd1 = new BMapGL.Boundary();
+        bd1.get('吴忠', function (rs) {
+          let count = rs.boundaries.length;
+          for (let i = 0; i < count; i++) {
+            let path = [];
+            let str = rs.boundaries[i].replace(' ', '');
+            let points = str.split(';');
+            for (let j = 0; j < points.length; j++) {
+              let lng = points[j].split(',')[0];
+              let lat = points[j].split(',')[1];
+              path.push(new BMapGL.Point(lng, lat));
+            }
+            let prism = new BMapGL.Prism(path, 5000, {
+              topFillColor: '#3D8BFF',
+              topFillOpacity: 0.4,
+              sideFillColor: '#04367b',
+              sideFillOpacity: 0.4
+            });
+            _this.map.addOverlay(prism);
+          }
+        });
+
+        // 描边
+        var bd1 = new BMapGL.Boundary();
+        bd1.get('石嘴山', function (rs) {
+          let count = rs.boundaries.length;
+          for (let i = 0; i < count; i++) {
+            let path = [];
+            let str = rs.boundaries[i].replace(' ', '');
+            let points = str.split(';');
+            for (let j = 0; j < points.length; j++) {
+              let lng = points[j].split(',')[0];
+              let lat = points[j].split(',')[1];
+              path.push(new BMapGL.Point(lng, lat));
+            }
+            let prism = new BMapGL.Prism(path, 5000, {
+              topFillColor: '#7AAFFF',
+              topFillOpacity: 0.4,
+              sideFillColor: '#04367b',
+              sideFillOpacity: 0.4
+            });
+            _this.map.addOverlay(prism);
+          }
+        });
+
+        // 描边
+        var bd1 = new BMapGL.Boundary();
+        bd1.get('中卫', function (rs) {
+          let count = rs.boundaries.length;
+          for (let i = 0; i < count; i++) {
+            let path = [];
+            let str = rs.boundaries[i].replace(' ', '');
+            let points = str.split(';');
+            for (let j = 0; j < points.length; j++) {
+              let lng = points[j].split(',')[0];
+              let lat = points[j].split(',')[1];
+              path.push(new BMapGL.Point(lng, lat));
+            }
+            let prism = new BMapGL.Prism(path, 5000, {
+              topFillColor: '#FFB13D',
+              topFillOpacity: 0.4,
+              sideFillColor: '#04367b',
+              sideFillOpacity: 0.4
+            });
+            _this.map.addOverlay(prism);
+          }
+        });
+
+        // 描边
+        var bd1 = new BMapGL.Boundary();
+        bd1.get('固原', function (rs) {
+          let count = rs.boundaries.length;
+          for (let i = 0; i < count; i++) {
+            let path = [];
+            let str = rs.boundaries[i].replace(' ', '');
+            let points = str.split(';');
+            for (let j = 0; j < points.length; j++) {
+              let lng = points[j].split(',')[0];
+              let lat = points[j].split(',')[1];
+              path.push(new BMapGL.Point(lng, lat));
+            }
+            let prism = new BMapGL.Prism(path, 5000, {
+              topFillColor: '#D24EE9',
+              topFillOpacity: 0.4,
+              sideFillColor: '#04367b',
+              sideFillOpacity: 0.4
+            });
+            _this.map.addOverlay(prism);
+          }
+        });
+
+        // // 创建点标记
+        // let _this = this;
+        // this.orgData.forEach((item)=>{
+
+        //   let quanStyle = item.type === undefined?4:item.type;
+
+        //   let sizeDefault = [20, 20];
+        //   let size = [54, 54];
+        //   let mouseoverColor = ""; // 离开
+        //   let mouseoutColor = ""; // 进入
+        //   switch(quanStyle) {
+        //     case 1:
+        //       size = [54, 54];
+        //       mouseoverColor = "mapExample_1"; // 离开
+        //       mouseoutColor = "mapD_1"; // 进入
+        //       break;
+        //     case 2:
+        //       size = [54, 54];
+        //       mouseoverColor = "mapExample_2"; // 离开
+        //       mouseoutColor = "mapD_2"; // 进入
+        //       break;
+        //     case 3:
+        //       size = [48, 48];
+        //       mouseoverColor = "mapExample_3"; // 离开
+        //       mouseoutColor = "mapD_3"; // 进入
+        //       break;
+        //     case 4:
+        //       size = [44, 44];
+        //       mouseoverColor = "mapExample_4"; // 离开
+        //       mouseoutColor = "mapD_4"; // 进入
+        //       break;
+        //   }
+
+        //   // 创建图标
+        //   var myIcon = new BMapGL.Icon("/static/mapBoard/"+mouseoutColor+".png", new BMapGL.Size(size[0], size[1]));
+        //   // 创建Marker标注,使用小车图标
+        //   var pt = new BMapGL.Point(item.latitude, item.longitude);
+        //   var marker = new BMapGL.Marker(pt, {
+        //     icon: myIcon
+        //   });
+        //   // 将标注添加到地图
+        //   this.map.addOverlay(marker);
+        //   // 添加鼠标事件
+        //   marker.addEventListener('mouseover', function() {
+        //     var opts = {
+        //       width : 0,     // 信息窗口宽度
+        //       height: 0,
+        //       offset: new BMapGL.Size(10, -10), // 偏移
+        //       title : item.name , // 信息窗口标题
+        //     }
+        //     var infoWindow = new BMapGL.InfoWindow(item.remark !== undefined?item.remark:item.lineName, opts);  // 创建信息窗口对象
+        //     _this.map.openInfoWindow(infoWindow, new BMapGL.Point(item.latitude, item.longitude)); //开启信息窗口
+        //   });
+        //   marker.addEventListener('mouseout', function(e) {
+        //     _this.map.closeInfoWindow();
+        //   })
+        //   marker.addEventListener('click', function(e) {
+        //     _this.changeOrgID(item);
+        //     let mouseTag = e.target.getIcon().imageUrl.indexOf("/mapD_") >= 0;
+        //     if(mouseTag){
+        //       if(_this.orgNowChoose.length > 1){
+        //         var myIcon1 = new BMapGL.Icon("/static/mapBoard/"+mouseoverColor+".png", new BMapGL.Size(sizeDefault[0], sizeDefault[1]));
+        //         e.target.setIcon(myIcon1);
+        //       }
+        //     }else{
+        //       var myIcon1 = new BMapGL.Icon("/static/mapBoard/"+mouseoutColor+".png", new BMapGL.Size(size[0], size[1]));
+        //       e.target.setIcon(myIcon1);
+        //     }
+        //   })
+        //   marker.addEventListener('dblclick', function(e) {
+        //     _this.getOrg(item)
+        //   })
+        //   this.map.addOverlay(marker);
+        // });
+      })
+        .catch(err => {
+          console.log(err);
+        });
+
+
+    },
+
+  }
+}
+
+</script>
+
+<style lang="scss" scoped>
+.sjdpMap {
+  width: 100%;
+  height: 100%;
+
+  .map {
+    width: 100%;
+    height: 100%;
+    z-index: 1;
+    ::v-deep .anchorBL {
+      display: none;
+    }
+  }
+  .mapExample {
+    position: absolute;
+    bottom: 30px;
+    right: 60px;
+    > .one {
+      overflow: hidden;
+      margin-top: 10px;
+      > img {
+        float: left;
+      }
+      > font {
+        line-height: 20px;
+        float: left;
+        margin-left: 9px;
+      }
+    }
+  }
+}
+</style>

+ 21 - 0
src/components/index/mapInit.js

@@ -0,0 +1,21 @@
+/*
+ *  初始地图接口数据
+ * */
+export function init() {
+  let ak = "bxxBdZbwUaKERLhkKzIXtXTFTEDXDKpe";
+  return new Promise(function(resolve, reject) {
+    window.init = function() {
+      // eslint-disable-next-line
+      resolve(BMapGL);
+    };
+    const script = document.createElement("script");
+    script.type = "text/javascript";
+    script.src = `http://api.map.baidu.com/api?v=1.0&type=webgl&ak=${ak}&callback=init`;
+    script.onerror = reject;
+    document.head.appendChild(script);
+  });
+}
+
+export default {
+  init,
+};

ファイルの差分が大きいため隠しています
+ 1217 - 0
src/components/index/map_style.json


+ 354 - 0
src/jsonData/menu.json

@@ -0,0 +1,354 @@
+{
+  "menu": [
+    {
+      "name": "首页",
+      "url": "/",
+      "children": []
+    },
+    {
+      "name": "后台管理",
+      "url": null,
+      "children": [
+        {
+          "name": "菜单",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "角色",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "权限",
+          "url": "/a",
+          "children": []
+        }
+      ]
+    },
+    {
+      "name": "实时监控",
+      "url": null,
+      "children": [
+        {
+          "name": "状态监视",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "矩阵监视",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "明细矩阵",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "欠发矩阵",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "AGC监视",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "实时分析",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "气象预测",
+          "url": "/a",
+          "children": []
+        }
+      ]
+    },
+    {
+      "name": "性能分析",
+      "url": null,
+      "children": [
+        {
+          "name": "等级评估",
+          "url": "/gradeEvaluation",
+          "children": []
+        },
+        {
+          "name": "切入切出风速整合",
+          "url": "/cutAndSpeed",
+          "children": []
+        },
+        {
+          "name": "单机饱和度",
+          "url": "/singleMachinePower",
+          "children": []
+        },
+        {
+          "name": "计划发电量",
+          "url": "/plannedGeneration",
+          "children": []
+        },
+        {
+          "name": "单机性能分析",
+          "url": "/singleMachineAnalysis",
+          "children": []
+        },
+        {
+          "name": "性能分析",
+          "url": "/a",
+          "children": [
+            {
+              "name": "单机性能分析",
+              "url": "/a",
+              "children": [
+                {
+                  "name": "单机信息总览",
+                  "url": "/individualPandectinformation",
+                  "children": []
+                },
+                {
+                  "name": "单机功率风速排布图",
+                  "url": "/powerandWindspeedChart",
+                  "children": []
+                },
+                {
+                  "name": "风机功率排布图",
+                  "url": "/powerChart",
+                  "children": []
+                }
+              ]
+            },
+            {
+              "name": "指标排行",
+              "url": "/a",
+              "children": [
+                {
+                  "name": "拟合优度排行",
+                  "url": "/goodnessfitRank",
+                  "children": []
+                },
+                {
+                  "name": "总发电量排行",
+                  "url": "/grossgenerationRank",
+                  "children": []
+                },
+                {
+                  "name": "损失率排行",
+                  "url": "/percentageLossrRank",
+                  "children": []
+                },
+                {
+                  "name": "负荷率排行榜",
+                  "url": "/rankingLoadRate",
+                  "children": []
+                },
+                {
+                  "name": "报警排行榜",
+                  "url": "/rankingCallThePolice",
+                  "children": []
+                },
+                {
+                  "name": "利用率排行榜",
+                  "url": "/rankingUtilization",
+                  "children": []
+                },
+                {
+                  "name": "曲线偏差率排行榜",
+                  "url": "/rankingCurveDeviationRate",
+                  "children": []
+                }
+              ]
+            }
+          ]
+        },
+        {
+          "name": "专题分析",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "指标排行",
+          "url": "/a",
+          "children": []
+        }
+      ]
+    },
+    {
+      "name": "对标管理",
+      "url": "/",
+      "children": [
+        {
+          "name": "风机绩效",
+          "url": "/",
+          "children": [
+            {
+              "name": "风机绩效榜单",
+              "url": "/performanceList",
+              "children": []
+            }
+          ]
+        },
+        {
+          "name": "损失对标",
+          "url": "/",
+          "children": [
+            {
+              "name": "五项损失率",
+              "url": "/fiveLossRates",
+              "children": []
+            },
+            {
+              "name": "故障损失率",
+              "url": "/lossRateFailure",
+              "children": []
+            },
+            {
+              "name": "受累损失率",
+              "url": "/lossRateAffected",
+              "children": []
+            },
+            {
+              "name": "检修损失率",
+              "url": "/lossRateMaintenance",
+              "children": []
+            },
+            {
+              "name": "弃风率",
+              "url": "/lossRateAbandoned",
+              "children": []
+            }
+          ]
+        },
+        {
+          "name": "场际对标",
+          "url": "/a",
+          "children": [
+            {
+              "name": "场内对标",
+              "url": "/yardBenchmark",
+              "children": []
+            },
+            {
+              "name": "场际对标",
+              "url": "/internationalBenchmark",
+              "children": []
+            }
+          ]
+        },
+        {
+          "name": "项目对标",
+          "url": "/",
+          "children": [
+            {
+              "name": "项目对标",
+              "url": "/projectBenchmark",
+              "children": []
+            }
+          ]
+        },
+        {
+          "name": "性能对标",
+          "url": "/",
+          "children": [
+            {
+              "name": "性能对标",
+              "url": "/propertBenchmark",
+              "children": []
+            },
+            {
+              "name": "单机横向对比",
+              "url": "/singleTransverseBenchmark",
+              "children": []
+            }
+          ]
+        },
+        {
+          "name": "值际对标",
+          "url": "/interValue",
+          "children": []
+        }
+      ]
+    },
+    {
+      "name": "健康管理",
+      "url": null,
+      "children": [
+        {
+          "name": "健康评价报告",
+          "url": "/healthAssessment",
+          "children": []
+        },
+        {
+          "name": "等级评估",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "故障诊断",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "液压站诊断",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "故障自诊断",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "健康管理",
+          "url": "/a",
+          "children": []
+        }
+      ]
+    },
+    {
+      "name": "智能报警",
+      "url": "/",
+      "children": []
+    },
+    {
+      "name": "安全管控",
+      "url": null,
+      "children": [
+        {
+          "name": "人员矩阵",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "全局监视",
+          "url": "/a",
+          "children": []
+        }
+      ]
+    },
+    {
+      "name": "报表管理",
+      "url": null,
+      "children": [
+        {
+          "name": "统计分析",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "报    表",
+          "url": "/a",
+          "children": []
+        },
+        {
+          "name": "新能源日报",
+          "url": "/a",
+          "children": []
+        }
+      ]
+    }
+  ]
+}

+ 80 - 0
src/main.js

@@ -0,0 +1,80 @@
+import Vue from 'vue'
+import App from './App.vue'
+import router from './router'
+import store from './store'
+
+// 解决IE内核浏览器问题
+import 'core-js/stable';
+import 'regenerator-runtime/runtime';
+
+// ElementUI
+import '@tools/elUI'
+
+import axios from "@api/axios"; // API接口访问
+Vue.prototype.API = axios;
+
+import base from "@tools/base"; // 公共方法
+Vue.prototype.BASE = base;
+
+import ECzm from "@tools/echartsToolzm"; // echarts处理 - zm
+Vue.prototype.ECZM = ECzm;
+
+import echartsTool from "@tools/echartsTool"; // Echarts 工具类 - ylf
+Vue.prototype.ET = echartsTool;
+
+import EClzx from "@tools/echartsToolLzx"; // echarts处理
+Vue.prototype.ECLZX = EClzx;
+
+// import formCheck from "@tools/formCheck"; // 表单的处理
+// Vue.prototype.FC = formCheck;
+
+import Get_PDF from '@tools/htmlToPdf'; // pdf导出
+Vue.prototype.Get_PDF = Get_PDF;
+
+//时间格式转换
+import moment from 'moment';
+Vue.use(moment);
+
+// excel导出
+import Blob from '@tools/excel/Blob.js';
+import Export2Excel from '@tools/excel/Export2Excel.js';
+
+// 滚动条
+import vuescroll from "vuescroll";
+Vue.use(vuescroll, {
+  ops: {
+    scrollPanel: {
+      easing: "easeInOutQuad",
+      scrollingX: false, // 横向滚动条关闭
+    },
+    rail: {
+      //轨道设置
+      background: "rgba(255,255,255,0.45)",
+      opacity: 0,
+      size: "9px",
+      specifyBorderRadius: false, // 是否指定轨道的 borderRadius, 如果不那么将会自动设置。
+      gutterOfEnds: "0px", // 轨道距 x 和 y 轴两端的距离。
+      gutterOfSide: "0px",
+      keepShow: false, //是否即使 bar 不存在的情况下也保持显示。
+    },
+    bar: {
+      showDelay: 500, // 在鼠标离开容器后多长时间隐藏滚动条
+      onlyShowBarOnScroll: true, // 是否只在滚动时显示
+      keepShow: true, // 滚动条是否保持显示
+      background: "rgba(0,0,0,0.65)", // 滚动条背景色
+      size: "7px",
+    },
+  }, // 在这里设置全局默认配置
+  name: "VueScroll", // 在这里自定义组件名字,默认是vueScroll
+});
+
+// 引入外部字体
+import '@assets/css/font.scss'
+
+Vue.config.productionTip = false
+
+new Vue({
+  router,
+  store,
+  render: h => h(App)
+}).$mount('#app')

+ 468 - 0
src/pages/lineChart/index.vue

@@ -0,0 +1,468 @@
+<template>
+  <div class="searchPage">
+    <div class="searchBox">
+      <el-form ref="form" :model="form" inline label-width="80px">
+        <el-form-item label="日期:">
+          <el-date-picker size="medium" value-format="yyyy-MM-dd HH:mm:ss" v-model="form.dateArea" type="datetimerange"
+            :picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="间隔:">
+          <el-input placeholder="请输入间隔" clearable v-model="form.interval" type="number"></el-input>
+        </el-form-item>
+        <transition name="el-zoom-in-center">
+          <el-form-item v-show="form.interval" label=" ">
+            <el-radio-group v-model="form.type" size="small">
+              <el-radio label="0" @click.native.prevent="getRadio('0')">最大</el-radio>
+              <el-radio label="1" @click.native.prevent="getRadio('1')">最小</el-radio>
+              <el-radio label="2" @click.native.prevent="getRadio('2')">平均</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </transition>
+      </el-form>
+      <div class="btnBox">
+        <el-button type="primary" size="middle" @click="renderCharts">查询</el-button>
+      </div>
+    </div>
+    <div class="cardBox">
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+          <span>类型</span>
+          <!-- <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button> -->
+        </div>
+        <div>
+          <el-radio-group v-model="form.fjType" size="small" @change="(fjType) => { this.resetForm(); }">
+            <el-form ref="form" :model="form">
+              <el-form-item style="margin-bottom:5px;">
+                <el-radio border size="medium" label="1">单风机多参数对比</el-radio>
+              </el-form-item>
+              <el-form-item style="margin-bottom:5px;">
+                <el-radio border size="medium" label="2">多风机单参数对比</el-radio>
+              </el-form-item>
+            </el-form>
+          </el-radio-group>
+        </div>
+      </el-card>
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+          <span>设备结构</span>
+        </div>
+        <div>
+          <div class="treeBox">
+            <el-input size="small" placeholder="输入以检索" :disabled="!treeData.length" v-model="filterText"></el-input>
+            <el-tree ref="treeRef" node-key="id" :data="treeData" :props="treeProps" :show-checkbox="true"
+              :highlight-current="true" :filter-node-method="filterNode" @check-change="getTreeChecked"></el-tree>
+          </div>
+        </div>
+      </el-card>
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+          <span>关键参数</span>
+        </div>
+        <div class="selectBox">
+          <el-select style="width:100%;" v-model="form.gjcs" filterable clearable :multiple="!treeIsMultiple"
+            placeholder="输入以检索" @change="(res) => { this.$forceUpdate(); }">
+            <el-option v-for="item in gjcsOptions" :key="item.id" :label="item.description" :value="item.code">
+            </el-option>
+          </el-select>
+        </div>
+      </el-card>
+    </div>
+    <div class="chartsBox">
+      <div id="lineChart" style="width:100%;height:100%;"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { Message } from 'element-ui';
+import * as echarts from "echarts";
+
+export default {
+  data () {
+    return {
+      form: {
+        pointId: "",
+        pointName: "",
+        autoReq: false,
+        dateArea: [
+          this.fmtDate(new Date(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24))),
+          this.fmtDate(new Date())
+        ],
+        interval: "",
+        type: "",
+        fjType: "1",
+        gjcs: ''
+      },
+
+      treeIsMultiple: false,
+      filterText: "",
+
+      treeData: [],
+      gjcsOptions: [],
+
+      treeProps: {
+        children: 'children',
+        label: 'label'
+      },
+
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一天',
+          onClick (picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一周',
+          onClick (picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick (picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick (picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      }
+    }
+  },
+
+  mounted () {
+    let that = this;
+    that.$nextTick(() => {
+      that.getEquipmentStructure();
+      that.getEquipmentParams();
+    });
+  },
+
+  methods: {
+    // 获取风机列表并包装成树形结构
+    getEquipmentStructure () {
+      let that = this;
+      that.API.requestData({
+        subUrl: "paramComparison/equipmentStructure",
+        success (res) {
+          // 请求成功的回调
+          let treeData = [];
+
+          res.data.forEach(ele => {
+            let findRes = treeData.find(findEle => {
+              return ele.windpowerstationid === findEle.label;
+            });
+            if (!findRes) {
+              let treeTemp = {
+                label: ele.windpowerstationid,
+                children: []
+              };
+              treeTemp.children.push({
+                label: ele.name,
+                id: ele.id
+              });
+              treeData.push(treeTemp);
+            } else {
+              findRes.children.push({
+                label: ele.name,
+                id: ele.id
+              });
+            }
+          });
+          that.treeData = treeData;
+        }
+      });
+    },
+
+    // 获取关键节点
+    getEquipmentParams () {
+      let that = this;
+      that.API.requestData({
+        subUrl: "paramComparison/equipmentParams",
+        success (res) {
+          that.gjcsOptions = res.data;
+        }
+      });
+    },
+
+    // 获取单选结果
+    getRadio (type) {
+      if (type === this.form.type && this.form.type !== '') {
+        this.form.type = '';
+      } else {
+        this.form.type = type;
+      }
+    },
+
+    // 渲染图表
+    renderCharts () {
+      let that = this;
+      that.$nextTick(() => {
+
+        let begin = that.form.dateArea.length ? that.form.dateArea[0] : '';
+        let end = that.form.dateArea.length ? that.form.dateArea[1] : '';
+        let interval = that.form.interval;
+        let type = that.form.type;
+        let paramtype = that.form.fjType;
+        let wts = [];
+        let wtsArray = that.$refs.treeRef.getCheckedNodes();
+        let params = that.form.gjcs;
+
+        wtsArray.forEach(pEle => {
+          if (pEle.id) {
+            wts.push(pEle.id);
+          } else {
+            pEle.children.forEach(cEle => {
+              wts.push(cEle.id);
+            });
+          }
+        });
+
+        let data = {};
+        data.begin = begin;
+        data.end = end;
+        interval && (data.interval = interval);
+        type && (data.type = type);
+        data.paramtype = paramtype;
+        data.wts = wts.toString();
+        data.params = params.toString();
+
+        if (begin && end && paramtype && wts.length && params.length) {
+          that.API.requestData({
+            subUrl: "paramComparison/generatingCurve",
+            timeout: 30000,
+            data,
+            success (res) {
+              console.log('res', res);
+
+              if (res.data.length) {
+
+                let xAxisData = []; // x轴标题
+                let seriesData = []; // 折线图数据
+
+                let keyArray = [];
+
+                if (that.form.fjType === '1') {
+                  params.forEach(ele => {
+                    let findRes = that.gjcsOptions.find(findEle => {
+                      return ele === findEle.code;
+                    });
+                    keyArray.push(findRes.description);
+                  });
+                } else {
+                  wtsArray.forEach(pEle => {
+                    if (pEle.id) {
+                      keyArray.push(pEle.label);
+                    } else {
+                      pEle.children.forEach(cEle => {
+                        keyArray.push(cEle.label);
+                      });
+                    }
+                  });
+                }
+
+                keyArray.forEach(ele => {
+                  seriesData.push({
+                    data: [],
+                    type: 'line',
+                    smooth: true,
+                    name: ele
+                  });
+                });
+
+                res.data.forEach(pEle => {
+                  xAxisData.push(that.fmtDate(new Date(pEle.time)));
+                  keyArray.forEach((cEle, cIndex) => {
+                    seriesData[cIndex].data.push((pEle[cEle] || null));
+                  });
+                });
+
+                document.getElementById("lineChart").removeAttribute("_echarts_instance_");
+                let chartDom = document.getElementById('lineChart');
+                let myChart = echarts.init(chartDom);
+                let option = {
+                  xAxis: {
+                    type: 'category',
+                    data: xAxisData
+                  },
+                  yAxis: {
+                    type: 'value'
+                  },
+                  series: seriesData,
+                  tooltip: {
+                    trigger: 'axis',
+                    axisPointer: {
+                      type: 'cross',
+                      label: {
+                        backgroundColor: '#6a7985'
+                      }
+                    }
+                  }
+                };
+                option && myChart.setOption(option);
+
+              } else {
+                Message.warning("所选参数暂无数据,请切换参数后再次尝试");
+              }
+            }
+          });
+        } else {
+          Message.error("无法查询,请检查 日期、设备结构与关键参数是否已选择");
+        }
+
+      });
+    },
+
+    // 过滤树形节点
+    filterNode (value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
+
+    // 获取树形选中
+    getTreeChecked (data, checked, node) {
+      if (!this.treeIsMultiple) {
+        if (checked === true) {
+          this.checkedId = data.id;
+          this.$refs.treeRef.setCheckedKeys([data.id]);
+        } else {
+          if (this.checkedId == data.id) {
+            this.$refs.treeRef.setCheckedKeys([]);
+          }
+        }
+      }
+    },
+
+    // 重置表单
+    resetForm () {
+      this.form.fjType === '1' ? this.treeIsMultiple = false : this.treeIsMultiple = true;
+      this.$refs.treeRef.setCheckedKeys([]);
+      this.form.gjcs = '';
+      this.$forceUpdate();
+      document.getElementById("lineChart").removeAttribute("_echarts_instance_");
+      echarts.init(document.getElementById('lineChart'));
+    },
+
+    // 格式化日期
+    fmtDate (date) {
+      let curDate = date || new Date();
+      let year = curDate.getFullYear();
+      let mouth = curDate.getUTCMonth() + 1;
+      let day = curDate.getDate();
+      let hour = curDate.getHours();
+      let minutes = curDate.getMinutes();
+      let seconds = curDate.getSeconds();
+      return year + '-' + (mouth < 10 ? '0' + mouth : mouth) + '-' + (day < 10 ? '0' + day : day) + ' ' + (hour < 10 ? '0' + hour : hour) + ':' + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds);
+    }
+  },
+
+  watch: {
+    filterText (val) {
+      this.$refs.treeRef.filter(val);
+    }
+  },
+}
+</script>
+<style lang="scss" scoped>
+.searchBox {
+  width: 80%;
+  display: flex;
+  justify-content: start;
+  align-items: center;
+  position: relative;
+
+  .btnBox {
+    position: absolute;
+    left: calc(100% + 60px);
+    top: 0;
+    display: flex;
+    justify-content: start;
+    align-items: center;
+  }
+
+  .el-input {
+    width: 150px;
+  }
+}
+
+.cardBox {
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+
+  .el-card {
+    width: 32%;
+    height: 255px;
+
+    .treeBox {
+      width: 100%;
+
+      .el-tree {
+        width: 100%;
+        height: 110px;
+        margin-top: 10px;
+        overflow-y: scroll;
+
+        &::-webkit-scrollbar {
+          width: 6px;
+          height: 6px;
+          background: #fff;
+        }
+
+        &::-webkit-scrollbar-track {
+          border-radius: 5px;
+          background: #fff;
+        }
+
+        &::-webkit-scrollbar-thumb {
+          border-radius: 10px;
+          background: rgba(144, 147, 153, 0.3);
+        }
+      }
+    }
+  }
+}
+
+.selectBox {
+  .el-select {
+    max-height: 150px;
+    overflow-y: scroll;
+
+    &::-webkit-scrollbar {
+      width: 6px;
+      height: 6px;
+      background: #fff;
+    }
+
+    &::-webkit-scrollbar-track {
+      border-radius: 5px;
+      background: #fff;
+    }
+
+    &::-webkit-scrollbar-thumb {
+      border-radius: 10px;
+      background: rgba(144, 147, 153, 0.3);
+    }
+  }
+}
+
+.chartsBox {
+  width: 100%;
+  height: 400px;
+}
+</style>

+ 377 - 0
src/pages/search/index.vue

@@ -0,0 +1,377 @@
+<template>
+  <div class="searchPage">
+    <div class="searchBox">
+      <el-form ref="form" :model="form" inline label-width="80px">
+        <el-form-item label="点名:">
+          <el-input style="width: 250px;" placeholder="请输入点名" size="middle" v-model="form.pointId" clearable></el-input>
+        </el-form-item>
+        <el-form-item label="描述:">
+          <el-input placeholder="请输入描述" size="middle" v-model="form.pointName" clearable></el-input>
+        </el-form-item>
+        <el-form-item label=" ">
+          <el-checkbox v-model="form.autoReq" label="刷新" border @change="reReqAjax"></el-checkbox>
+        </el-form-item>
+      </el-form>
+      <div class="btnBox">
+        <el-button type="primary" size="middle" @click="getTableData">查询</el-button>
+        <el-button type="warning" size="middle" @click="exportExcel('tableData')" v-if="tableData.length">导出</el-button>
+      </div>
+    </div>
+    <div class="tableBox">
+      <el-table :data="tableData" align="center" header-align="center" style="width: 100%;" height="700" max-height="700"
+        :fit="true">
+        <el-table-column type="index" :index="indexMethod" label="序号" width="100"></el-table-column>
+        <el-table-column prop="pointId" label="点名" :show-overflow-tooltip="true"></el-table-column>
+        <el-table-column prop="pointName" label="描述" width="400" :show-overflow-tooltip="true"></el-table-column>
+        <el-table-column prop="value" label="值" width="300"></el-table-column>
+        <el-table-column prop="timeDate" label="时间戳" width="260"></el-table-column>
+        <el-table-column fixed="right" label="操作" width="150">
+          <template slot-scope="scope">
+            <el-button @click="goDetails(scope.row)" type="text" size="small">详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <div class="block" style="margin-top:5px;" align="right">
+        <el-pagination
+          @size-change="handleSizerealChange"
+          @current-change="getPaginationCurrent"
+          :current-page="currentPage"
+          :page-sizes="[100, 200, 300, 400]"
+          :page-size="pagesizereal"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="currentPageTotal">
+        </el-pagination>
+        <!-- <el-pagination
+          background
+          layout="prev, pager, next"
+          :page-size="pagesize"
+          :current-page.sync="currentPage"
+          @current-change="getPaginationCurrent"
+          :total="currentPageTotal">
+        </el-pagination> -->
+      </div>
+    <el-dialog title="查看详情" top="50px" :visible.sync="showDialog" width="95%" @closed="(res) =>{ this.form.dateArea=[];this.detailsTableData=[]; }">
+      <div class="searchBox">
+        <el-form ref="form" :model="form" inline label-width="80px">
+          <el-form-item label="点名:">
+            <el-input readonly style="width: 300px;" size="middle" v-model="pointId" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="日期:">
+            <el-date-picker size="medium" value-format="yyyy-MM-dd HH:mm:ss" v-model="form.dateArea" type="datetimerange"
+              :picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right"
+              @change="(res) => { this.getDatePickerChange(res); }">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="间隔:">
+            <el-input placeholder="请输入间隔" clearable v-model="form.interval" type="number"></el-input>
+          </el-form-item>
+        </el-form>
+        <div class="btnBox">
+          <el-button type="primary" size="middle" @click="getDetails">查询</el-button>
+          <el-button type="warning" size="middle" @click="exportExcel('detailsTableData')" v-if="detailsTableData.length">导出</el-button>
+        </div>
+      </div>
+      <div class="tableBox" style="margin-top:0;">
+        <el-table :data="detailsTableData.slice((currentPage-1)*pagesize,currentPage*pagesize)" align="center"
+          header-align="center" style="width: 100%" max-height="450" height="450" :fit="true">
+          <el-table-column type="index" :index="indexMethod" label="序号" width="100"></el-table-column>
+          <el-table-column prop="pointId" label="点名" :show-overflow-tooltip="true"></el-table-column>
+          <el-table-column prop="pointName" label="描述" width="400" :show-overflow-tooltip="true"></el-table-column>
+          <el-table-column prop="timeDate" label="时间戳" width="260"></el-table-column>
+          <el-table-column prop="value" label="值" width="300"></el-table-column>
+          
+        </el-table>
+      </div>
+      <div class="block" style="margin-top:5px;">
+        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+          :page-sizes="[10, 20, 50, 100]" :page-size="pagesize" layout="total, sizes, prev, pager, next, jumper" :total="detailsTableData.length">
+        </el-pagination>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { Message } from 'element-ui';
+
+export default {
+  data () {
+    return {
+      tableid: "",
+      pointId: "",
+      form: {
+        pointId: "",
+        pointName: "",
+        autoReq: false,
+        dateArea: [],
+        interval: ""
+      },
+      showDialog: false,
+      tableData: [],
+      detailsTableData: [],
+      autoReqTimmer: null,
+
+      currentPage: 1,
+      pagesize: 10,
+      pagesizereal: 100,
+      currentPageTotal: 0,
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一天',
+          onClick (picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一周',
+          onClick (picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick (picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick (picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      }
+    }
+  },
+
+  mounted () {
+    let that = this;
+    that.$nextTick(() => {
+      that.tableid = that.$route.query.tableid;
+      that.getTableData();
+    });
+  },
+
+  destroyed () {
+    clearInterval(this.autoReqTimmer);
+    this.autoReqTimmer = null;
+  },
+
+  created(){
+    let that = this
+    that.tableid = "JSFW";
+    that.getTableData();
+  },
+
+  methods: {
+    // 获取表格数据
+    getTableData (skipLoading) {
+      if (!skipLoading) {
+        this.$store.commit("loadingStore", true);
+      }
+      this.API.get("datacenter/realtimeData?tableid=" + this.tableid + "&pointId=" + this.form.pointId + "&pointName=" + this.form.pointName+ "&pageNum=" + this.currentPage+ "&pageSize=" + this.pagesizereal).then((res) => {
+        res.data.forEach(ele => {
+          ele.timeDate = this.fmtDate(new Date(ele.time));
+          if (ele.value > 0) {
+            ele.value = parseFloat(ele.value).toFixed(4);
+          }
+        });
+        this.tableData = res.data || [];
+        this.currentPageTotal = res.count || [];
+        if (!skipLoading) {
+          this.$store.commit("loadingStore", false);
+        }
+      });
+    },
+
+    // index渲染函数
+    indexMethod (index) {
+      return index + 1;
+    },
+
+    // 查看详情按钮被点击
+    goDetails (row) {
+      this.pointId = row.pointId;
+      this.showDialog = true;
+    },
+
+    // 获取详情
+    getDetails () {
+      if (!this.form.dateArea || !this.form.dateArea.length) {
+        Message.error("请先选择要查询的日期区间后再试");
+      } else {
+        this.$store.commit("loadingStore", true);
+        let begin = (this.form.dateArea.length ? this.form.dateArea[0] : '');
+        let end = (this.form.dateArea.length ? this.form.dateArea[1] : '');
+
+        this.API.get("datacenter/historyData?pointId=" + this.pointId + "&begin=" + begin + "&end=" + end + (this.form.interval ? ("&interval=" + this.form.interval) : '')).then((res) => {
+          res.data.forEach(ele => {
+            ele.timeDate = this.fmtDate(new Date(ele.time));
+            if (ele.value > 0) {
+              ele.value = parseFloat(ele.value).toFixed(4);
+            }
+          });
+
+          this.detailsTableData = res.data || [];
+          this.$store.commit("loadingStore", false);
+        });
+      }
+    },
+    // 初始页currentPage、初始每页数据数pagesize和数据data
+    handleSizeChange: function (size) {
+      this.pagesize = size;
+    },
+    handleSizerealChange: function (size) {
+      this.currentPage = 1;
+      this.pagesizereal = size;
+      this.getTableData();
+    },
+    handleCurrentChange: function (currentPage) {
+      this.currentPage = currentPage;
+    },
+
+
+    // 导出excel
+    exportExcel (tableDataName) {
+      if (tableDataName === 'tableData') {
+        let tableid = this.tableid;
+        let pointId = this.form.pointId || '';
+        let pointName = this.form.pointName || '';
+        this.API.get("datacenter/realtimeExport?tableid=" + tableid + "&pointId=" + pointId + "&pointName=" + pointName).then(res => {
+          const { export_json_to_excel } = require('@tools/excel/Export2Excel.js'); // 注意这个Export2Excel路径      
+          const tHeader = ['点名', '描述']; // 上面设置Excel的表格第一行的标题       
+          const filterVal = ['id', 'name']; // 上面的index、nickName、name是tableData里对象的属性key值   
+          const list = res.data; //把要导出的数据tableData存到list 
+          const data = this.formatJson(filterVal, list);
+          export_json_to_excel(tHeader, data, '导出的Excel'); // 最后一个是表名字
+        });
+      } else {
+        const { export_json_to_excel } = require('@tools/excel/Export2Excel.js'); // 注意这个Export2Excel路径      
+        const tHeader = ['点名', '描述', '时间戳', '值']; // 上面设置Excel的表格第一行的标题       
+        const filterVal = ['pointId', 'pointName', 'timeDate', 'value']; // 上面的index、nickName、name是tableData里对象的属性key值   
+        const list = this[tableDataName]; //把要导出的数据tableData存到list 
+        const data = this.formatJson(filterVal, list);
+        export_json_to_excel(tHeader, data, '导出的Excel'); // 最后一个是表名字
+      }
+    },
+
+    formatJson (filterVal, jsonData) {
+      return jsonData.map(v => filterVal.map(j => v[j]));
+    },
+
+    // 刷新开关
+    reReqAjax () {
+      clearInterval(this.autoReqTimmer);
+      this.autoReqTimmer = null;
+      if (this.form.autoReq) {
+        Message.success("已开启自动刷新数据,每间隔 1 秒自动刷新一次数据");
+        this.autoReqTimmer = setInterval(() => {
+          this.getTableData(true);
+        }, 1000);
+      } else {
+        Message.warning("已关闭自动刷新数据");
+      }
+    },
+
+    // 分页器每页数量修改
+    getPaginationSize (value) {
+      this.currentPageSize = value;
+      this.getDetails();
+    },
+
+    // 分页器页数修改
+    getPaginationCurrent (value) {
+      this.currentPage = value;
+      this.getTableData();
+    },
+
+    // 获取选中的时间
+    getDatePickerChange (value) {
+      this.detailsTableData = [];
+    },
+
+
+    // 格式化日期
+    fmtDate (date) {
+      let curDate = date || new Date();
+      let year = curDate.getFullYear();
+      let mouth = curDate.getUTCMonth() + 1;
+      let day = curDate.getDate();
+      let hour = curDate.getHours();
+      let minutes = curDate.getMinutes();
+      let seconds = curDate.getSeconds();
+      return year + '-' + (mouth < 10 ? '0' + mouth : mouth) + '-' + (day < 10 ? '0' + day : day) + ' ' + (hour < 10 ? '0' + hour : hour) + ':' + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds);
+    },
+  },
+
+  watch: {
+    $route (value) {
+      this.tableid = value.query.tableid;
+      this.form.pointName = "";
+      this.form.autoReq = false;
+      clearInterval(this.autoReqTimmer);
+      this.autoReqTimmer = null;
+      this.getTableData();
+    }
+  }
+}
+</script>
+  
+<style lang="scss" scoped>
+.searchBox {
+  width: 80%;
+  display: flex;
+  justify-content: start;
+  align-items: center;
+  position: relative;
+
+  .btnBox {
+    position: absolute;
+    left: calc(100% + 20px);
+    top: 0;
+    display: flex;
+    justify-content: start;
+    align-items: center;
+  }
+
+  .el-input {
+    width: 150px;
+  }
+}
+
+.tableBox {
+  margin-top: 10px;
+}
+
+.paginationBox {
+  width: 100%;
+  margin-top: 20px;
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
+}
+</style>
+<style lang="scss">
+.tableBox {
+  .cell {
+    text-align: center;
+  }
+}
+.searchPage {
+  .el-dialog__body {
+    padding: 10px 20px;
+    max-height: 570px;
+    overflow: hidden;
+  }
+}
+</style>

+ 3 - 0
src/pages/test/index.vue

@@ -0,0 +1,3 @@
+<template>
+  <div>test</div>
+</template>

+ 76 - 0
src/router/index.js

@@ -0,0 +1,76 @@
+import Vue from 'vue'
+import VueRouter from 'vue-router'
+
+// 路由3+版本的异常处理
+const originalPush = VueRouter.prototype.push
+VueRouter.prototype.push = function push (location) {
+  return originalPush.call(this, location).catch(err => err)
+}
+const originalReplace = VueRouter.prototype.replace;
+VueRouter.prototype.replace = function replace (location) {
+  return originalReplace.call(this, location).catch(err => err);
+}
+
+// 公共页面
+import search from '@pages/search';
+import lineChart from '@pages/lineChart';
+import test from '@pages/test';
+
+// 子路由
+
+Vue.use(VueRouter)
+
+const routes = [
+  {
+    path: '/search',
+    component: search
+  }, {
+    path: '/lineChart',
+    component: lineChart
+  }, {
+    path: '/test',
+    component: test
+  }, {
+    path: '/',
+    redirect: '/search'
+  }
+]
+
+const router = new VueRouter({
+  mode: 'history',
+  // base: '/report/', / 部署单页面 404 history  带井号解决(去掉history 放web-inf)
+  base: '/',
+  routes
+})
+
+/**
+ * 路由的钩子函数,处理是否登录的判断
+ * **/
+router.beforeEach((to, from, next) => {
+  // 路由地址不存在的处理办法
+  if (to.matched.length === 0) { // 如果未匹配到路由
+    // sessionStorage.removeItem("btrh_sxsd_locationHref");
+    next('/404')   // 如果上级也未匹配到路由则跳转登录页面,如果上级能匹配到则转上级路由
+  }
+
+  if (to.matched.some(r => r.meta.requireAuth)) {
+
+    let userinfo = JSON.parse(sessionStorage.getItem("btrh_sxsd_userinfo"));
+    userinfo = "";
+    if (userinfo !== null) {
+      // if(to.path !== "/"){
+      //   // 判断当前菜单是否有权限打开,如果无权限,自动退出
+      //   routerCheck(userinfo.roleId, to.path, next);
+      // }else{
+      //   next();
+      // }
+      next();
+      return;
+    }
+    next("/login");
+  } else {
+    next();
+  }
+})
+
+export default router

+ 10 - 0
src/store/getters.js

@@ -0,0 +1,10 @@
+const getters = {
+  sidebar: state => state.app.sidebar,
+  device: state => state.app.device,
+  token: state => state.user.token,  //建立token的快捷访问   user 是因为index.js中导入的时候名称定义为user
+  submitDDTag: state => state.submitDDTag,
+  loading:state =>state.loading,
+  // avatar: state => state.user.avatar,
+  // name: state => state.user.name 
+}
+export default getters

+ 29 - 0
src/store/index.js

@@ -0,0 +1,29 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+import getters from './getters'
+import user from './modules/user'
+Vue.use(Vuex)
+
+const state = {
+  submitDDTag: false,   //提交 - 防抖动 - 针对快速请求问题的拦截机制
+  loading: false,   //全局 - 加载中....
+};
+//改变状态的方法
+const mutations = {
+  openSubmitDDTag (state, tag) {
+    state.submitDDTag = tag;
+  },
+  loadingStore (state, tag) {
+    state.loading = tag;
+  },
+};
+var vuexStore = new Vuex.Store({
+  module: {
+    user//调用this['user/login']()  引用 ...mapActions(['user/login']),
+  },
+  getters,
+  state,
+  mutations,
+});
+
+export default vuexStore;

+ 30 - 0
src/store/modules/user.js

@@ -0,0 +1,30 @@
+import { getToken, setToken, removeToken } from '@/utils/auth'
+const state = {
+  token: getToken //设置token为共享状态   初始化vuex的时候 就先从缓存中读取
+}
+const mutations = {
+  setToken (state, token) {
+    state.token = token//将数据设置给vuex
+    //同步给缓存
+    setToken(token)
+  },
+  removeToken (state) {
+    state.token = null//将vuex的数据置空
+    removeToken()//同步到缓存
+  }
+}
+const actions = {
+  async login (context, data) {
+    const result = await login(data)
+    if (result.data.sucess) {
+      //调用vuex中setToken方法
+      context.commit('setToken', result.data.data)
+    }
+  }
+}
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+}

+ 191 - 0
src/tools/base.js

@@ -0,0 +1,191 @@
+import crypto from "crypto";
+
+//个位数字补零
+export function numberB0(n) {
+  return n < 10 ? "0" + n : n;
+}
+/**
+ * 
+ * 传入时间戳,返回 hh-MM-ss
+ */
+export  function getBztime(data = 1){
+  let myDate;
+
+  if(data !== 1){
+    myDate = new Date(data * 1000);
+  }else{
+    myDate = new Date();
+  }
+
+  let H = myDate.getHours(),
+      Min = myDate.getMinutes(),
+      S = myDate.getSeconds();
+
+
+  if(H < 10){
+    H = '0' + H ;
+  }
+  if(Min < 10){
+    Min = '0' + Min ;
+  }
+  if(S < 10){
+    S = '0' + S ;
+  }
+  return H + ':' + Min;
+}
+/**
+ * 通过传入的时间戳获取所需的一个标准格式的日期
+ * 参数:
+ * time: 时间戳
+ * tag: 0,今天;1,明天,-1,昨天
+ * type: 输出格式,date:标准日期1999-01-10;datetime:标准日期时间:1999-01-10 10:10:10。
+ * 返回:1999-01-10
+ */
+export function getBzDate(time, tag = 0, type = "date") {
+  let dateTime = new Date(time).getTime() + 3600*1000*24*tag;
+  let newDate = new Date(dateTime);
+  let result = newDate.getFullYear() + "-" + numberB0((newDate.getMonth() + 1)) + "-" + numberB0(newDate.getDate());
+  switch(type){
+    case "date":
+      return result;
+      break;
+    case "datetime":
+      return result + " " + numberB0(newDate.getHours()) + ":" + numberB0(newDate.getMinutes()) + ":" + numberB0(newDate.getSeconds());
+      break;
+    default:
+      return result;
+  }
+}
+
+/**
+ * 传入[开始日期, 结束日期]
+ * 返回格式[2020-10-01 00:00:00, 2020-10-01 23:59:59]
+ * tag: 1,补时分秒
+ *      2,补分秒
+ *      3,补秒
+ * */
+export function dateQjChange(list, tag) {
+  if (list[0] === "" || list[0] === null) return list;
+  let d1 = new Date(list[0]);
+  let d2 = new Date(list[1]);
+  if (tag === undefined) {
+    tag = 1;
+  }
+  switch (tag) {
+    case 1:
+      return [
+        d1.getFullYear() +
+          "-" +
+          numberB0(d1.getMonth() + 1) +
+          "-" +
+          numberB0(d1.getDate()) +
+          " 00:00:00",
+        d2.getFullYear() +
+          "-" +
+          numberB0(d2.getMonth() + 1) +
+          "-" +
+          numberB0(d2.getDate()) +
+          " 23:59:59",
+      ];
+    case 2:
+      return [
+        d1.getFullYear() +
+          "-" +
+          numberB0(d1.getMonth() + 1) +
+          "-" +
+          numberB0(d1.getDate()) +
+          " " +
+          numberB0(d1.getHours()) +
+          ":00:00",
+        d2.getFullYear() +
+          "-" +
+          numberB0(d2.getMonth() + 1) +
+          "-" +
+          numberB0(d2.getDate()) +
+          " " +
+          numberB0(d2.getHours()) +
+          ":59:59",
+      ];
+      break;
+    case 3:
+      return [
+        d1.getFullYear() +
+          "-" +
+          numberB0(d1.getMonth() + 1) +
+          "-" +
+          numberB0(d1.getDate()) +
+          " " +
+          numberB0(d1.getHours()) +
+          ":" +
+          numberB0(d1.getMinutes()) +
+          ":00",
+        d2.getFullYear() +
+          "-" +
+          numberB0(d2.getMonth() + 1) +
+          "-" +
+          numberB0(d2.getDate()) +
+          " " +
+          numberB0(d2.getHours()) +
+          ":" +
+          numberB0(d2.getMinutes()) +
+          ":59",
+      ];
+      break;
+  }
+}
+
+//金额分割符,4位分割(仅数字)
+export function getNewNum(nStr) {
+  nStr += "";
+  var x = nStr.split(".");
+  var x1 = x[0];
+  var x2 = x.length > 1 ? "." + x[1] : "";
+  var rgx = /(\d+)(\d{4})/;
+  while (rgx.test(x1)) {
+    x1 = x1.replace(rgx, "$1" + "," + "$2");
+  }
+  return x1 + x2;
+}
+
+/*
+ *  对一个数字上取舍,如1234,取舍结果是2000。
+ *  适配万亿级别的数字,无上限
+ *  num: 数字
+ * */
+export function numberCeil(num) {
+  num = Math.ceil(num);
+  let indexNum = (num+"").length;
+  let result = 0;
+  let w = Math.pow(10,(indexNum - 1));
+  result = Math.ceil(num/w)*w;
+  return result;
+}
+
+/*
+ *  Ant和element-ui 级联相同bug - 底层存在children的时候会显示空模块的问题,此方法可以完成任意级别的递归找children。
+ *  data:原型数据
+ * */
+export function cascaderBugRepair(data) {
+  if (data == null) return false;
+  let nums = data.length;
+  for (var i = 0; i < nums; i++) {
+    if (data[i].children.length <= 0) {
+      delete data[i].children;
+    } else {
+      if (data[i].children.length > 0) {
+        data[i].children = cascaderBugRepair(data[i].children);
+      }
+    }
+  }
+  return data;
+}
+
+export default {
+  numberCeil,
+  getBzDate,
+  cascaderBugRepair,
+  getNewNum,
+  dateQjChange,
+  getBztime,
+  numberB0,
+};

+ 373 - 0
src/tools/echartsTool.js

@@ -0,0 +1,373 @@
+import * as EC from 'echarts';
+import { Message } from 'element-ui';
+import BASE from '@tools/base';
+const color = ["#014EB5", "#A800FF", "#e82edb", "#B5454C", "#443bff", "#e8cb25", "#3dffb0", "#e8a425", "#ff7aab", "#e84b1e", "#552ce2", "#ffae21", "#e8861e", "#d441ff", "#35e8e4", "#9c7aff", "#e86fd8", "#ffee38"];
+
+/*
+ *  获取 多柱状图 - 横向
+ *  id: 元素ID
+ *  x: ['月计划完成率1302%', '年计划完成率76%']
+ *  data: [
+      {
+        name: '月计划完成率',
+        type: 'bar',
+        barWidth: 12,
+        itemStyle: {
+          color: this.ET.color[0],
+          barBorderRadius: [0, 3, 3, 0] // 柱子圆角
+        },
+        data: [18203, 23489]
+      },
+      {
+        name: '年计划完成率',
+        type: 'bar',
+        barWidth: 12,
+        itemStyle: {
+          color: this.ET.color[2],
+          barBorderRadius: [0, 3, 3, 0] // 柱子圆角
+        },
+        data: [19325, 681807]
+      }
+    ]
+ *  name: 提示框name
+ * */
+export function getBarsH(id, x, data) {
+  if (data === undefined) {
+    Message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  let option = {
+    tooltip: {
+      // formatter: '{b0}<br />{a}: {c0}'
+      formatter: function (params, ticket, callback) {
+        return '<font style="font-size: 12px; color: #ddd">' + params.name + '</font><br />' + (params.seriesIndex === 0 ? "实际" : "计划") + '发电量(万KW):<b>' + BASE.getNewNum(params.value) + '</b>';
+        // return params.name+': '+params.seriesIndex+'<br />'+params.seriesName+': '+params.data.value;
+      }
+    },
+    grid: {
+      top: 10,
+      left: 110,
+      right: 20,
+      bottom: 30,
+    },
+    xAxis: {
+      type: 'value',
+      boundaryGap: [0, 0.01],
+      minInterval: 1, // 刻度不出现小数
+      axisLine: {
+        lineStyle: {
+          color: "#CCC"
+        }
+      },
+      axisTick: {
+        show: false
+      },
+      axisLabel: {
+        fontSize: 10,
+        color: "#333",
+        formatter: function (value, index) {
+          if (value > 10000) {
+            return value / 10000 + 'w';
+          } else {
+            return value;
+          }
+        }
+      },
+    },
+    yAxis: {
+      type: 'category',
+      data: x,
+      axisLine: {
+        lineStyle: {
+          color: "#CCC"
+        }
+      },
+      axisTick: {
+        show: false
+      },
+      axisLabel: {
+        fontSize: 10,
+        color: "#333"
+      },
+      splitLine: {
+        show: false
+      }
+    },
+    series: data
+  };
+  myChart.setOption(option, true);
+}
+
+/*
+ *  获取 多柱状图 - 纵向
+ *  id: 元素ID
+ *  x: ['00\n00', '00\n30','01\n00', '01\n30','02\n00', '02\n30','03\n00', '03\n30',]
+ *  data: [
+      {
+        name: '月计划完成率',
+        type: 'bar',
+        barWidth: 12,
+        itemStyle: {
+          color: this.ET.color[0],
+          barBorderRadius: [0, 3, 3, 0] // 柱子圆角
+        },
+        data: [18203, 23489]
+      },
+      {
+        name: '年计划完成率',
+        type: 'bar',
+        barWidth: 12,
+        itemStyle: {
+          color: this.ET.color[2],
+          barBorderRadius: [0, 3, 3, 0] // 柱子圆角
+        },
+        data: [19325, 681807]
+      }
+    ]
+ *  name: 提示框name
+ * */
+export function getBarsV(id, legendData, x, data) {
+  if (data === undefined) {
+    Message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  let maxMin = getMax(data); // 计算最大值
+  var myChart = EC.init(document.getElementById(id));
+  let option = {
+    tooltip: {
+      trigger: 'axis'
+    },
+    legend: {
+      orient: 'vertical',
+      right: 10,
+      top: 10,
+      data: legendData
+    },
+    grid: {
+      top: 35,
+      left: 60,
+      right: 220,
+      bottom: 30,
+    },
+    xAxis: {
+      type: 'category',
+      boundaryGap: false,
+      boundaryGap: true, // 坐标两边留白策略 - 点在两个坐标中间
+      data: x,
+      axisLine: {
+        lineStyle: {
+          color: "#C8D6E4"
+        }
+      },
+      axisTick: {
+        lineStyle: {
+          color: "#C8D6E4"
+        }
+      },
+      axisLabel: {
+        color: "#333"
+      },
+    },
+    yAxis: [{
+      type: 'value',
+      name: '发电量(万kW/h)',
+      axisLine: {
+        show: false
+      },
+      axisTick: {
+        show: false
+      },
+      min:maxMin[0][1], // 最小值
+      max:maxMin[0][0], // 最大值
+      splitNumber:5, // 刻度数
+      interval: (maxMin[0][0]-maxMin[0][1])/5 //强制设置刻度间隔
+    },
+    {
+      type: 'value',
+      name: '风速(m/s)',
+      axisLine: {
+        show: false
+      },
+      axisTick: {
+        show: false
+      },
+      min:maxMin[1][1], // 最小值
+      max:maxMin[1][0], // 最大值
+      splitNumber:5, // 刻度数
+      interval: (maxMin[1][0]-maxMin[1][1])/5 //强制设置刻度间隔
+    }],
+    series: data
+  };
+  myChart.setOption(option, true);
+}
+
+/*
+ *  获取 折线图
+ *  id: 元素ID
+ *  x: ['00\n00', '00\n30','01\n00', '01\n30','02\n00', '02\n30','03\n00', '03\n30',]
+ *  data: [
+      {
+        name: '月计划完成率',
+        type: 'bar',
+        barWidth: 12,
+        itemStyle: {
+          color: this.ET.color[0],
+          barBorderRadius: [0, 3, 3, 0] // 柱子圆角
+        },
+        data: [18203, 23489]
+      },
+      {
+        name: '年计划完成率',
+        type: 'bar',
+        barWidth: 12,
+        itemStyle: {
+          color: this.ET.color[2],
+          barBorderRadius: [0, 3, 3, 0] // 柱子圆角
+        },
+        data: [19325, 681807]
+      }
+    ]
+ *  name: 提示框name
+ * */
+export function getLine(id, legendData, x, data) {
+  if (data === undefined) {
+    Message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  let max = getMax(data); // 计算最大值
+  var myChart = EC.init(document.getElementById(id));
+  let option = {
+    tooltip: {
+      trigger: 'axis'
+    },
+    legend: {
+      orient: 'vertical',
+      right: 10,
+      top: 20,
+      data: legendData
+    },
+    grid: {
+      top: 35,
+      left: 60,
+      right: 210,
+      bottom: 40,
+    },
+    xAxis: {
+      type: 'category',
+      boundaryGap: true, // 坐标两边留白策略 - 点在两个坐标中间
+      data: x,
+      axisLine: {
+        lineStyle: {
+          color: "#C8D6E4"
+        }
+      },
+      axisTick: {
+        lineStyle: {
+          color: "#C8D6E4"
+        }
+      },
+      axisLabel: {
+        color: "#333"
+      },
+    },
+    yAxis: [{
+      type: 'value',
+      name: '功率数值(MW)',
+      axisLine: {
+        show: false
+      },
+      axisTick: {
+        show: false
+      },
+      min: 0,
+      max: max[0],
+      splitNumber: 5,
+      interval: max[0]/5
+    },
+    {
+      type: 'value',
+      name: '平均风速/日照强度',
+      axisLine: {
+        show: false
+      },
+      axisTick: {
+        show: false
+      },
+      min: 0,
+      max: max[1],
+      splitNumber: 5,
+      interval: max[1]/5
+    }],
+    series: data
+  };
+  myChart.setOption(option, true);
+}
+// 获取最大值
+export function getMax(data) {
+  let d1 = [];
+  let d0 = [];
+  data.forEach((item)=>{
+    if(item.yAxisIndex === 1){
+      d1 = d1.concat(item.data)
+    }else{
+      d0 = d0.concat(item.data)
+    }
+  });
+  return [BASE.numberCeil(Math.max.apply(null,d0)), BASE.numberCeil(Math.max.apply(null,d1))]
+}
+
+/*
+ *  获取 仪表
+ *  id: 元素ID
+ *  x: ['00\n00', '00\n30','01\n00', '01\n30','02\n00', '02\n30','03\n00', '03\n30',]
+ *  data: [
+      {
+        name: '月计划完成率',
+        type: 'bar',
+        barWidth: 12,
+        itemStyle: {
+          color: this.ET.color[0],
+          barBorderRadius: [0, 3, 3, 0] // 柱子圆角
+        },
+        data: [18203, 23489]
+      },
+      {
+        name: '年计划完成率',
+        type: 'bar',
+        barWidth: 12,
+        itemStyle: {
+          color: this.ET.color[2],
+          barBorderRadius: [0, 3, 3, 0] // 柱子圆角
+        },
+        data: [19325, 681807]
+      }
+    ]
+ *  name: 提示框name
+ * */
+export function getGaugesH(id, data) {
+  if (data === undefined) {
+    Message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  let option = {
+    tooltip: {
+      formatter: "{a} <br/>{c} {b}"
+    },
+    series: data
+  };
+  myChart.setOption(option, true);
+}
+
+
+export default {
+  getGaugesH,
+
+  getBarsH,
+  getBarsV,
+
+  getLine,
+
+  color,
+}

ファイルの差分が大きいため隠しています
+ 1018 - 0
src/tools/echartsToolLzx.js


+ 908 - 0
src/tools/echartsToolzm.js

@@ -0,0 +1,908 @@
+import * as EC from 'echarts';
+import BASE from '@tools/base';
+const color = ["#00FFF0", "#014EB5", "#A800FF", "#e82edb", "#B5454C", "#443bff", "#e8cb25", "#3dffb0", "#e8a425", "#ff7aab", "#e84b1e", "#552ce2", "#ffae21", "#e8861e", "#d441ff", "#35e8e4", "#9c7aff", "#e86fd8", "#ffee38"];
+
+/*
+ *  柱状图(非堆叠柱状图)
+ *  id: 元素ID
+ *  data 数据
+ * [
+          {
+            name: "限电损失电量(单位:万kwh)",
+            type: "bar",
+            data: this.histogram.xdss,
+          },
+          {
+            name: "故障损失电量(单位:万kwh)",
+            type: "bar",
+            data: this.histogram.gzss,
+          },
+          ,
+          {
+            name: "检修损失电量(单位:万kwh)",
+            type: "bar",
+            data: this.histogram.jxss,
+          },
+          {
+            name: "性能损失电量(单位:万kwh)",
+            type: "bar",
+            data: this.histogram.xnss,
+          },
+          {
+            name: "受累损失电量(单位:万kwh)",
+            type: "bar",
+            data: this.histogram.slss,
+          },
+        ]
+ *  xdata :  横坐标数据
+ * */
+export function getBar_fdd (id, data) {
+  if (data === undefined) {
+    message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  var option;
+  option = {
+    title: {
+      text: "损失电量分析",
+    },
+    tooltip: {
+      trigger: "axis",
+      axisPointer: {
+        type: "shadow",
+      },
+    },
+    legend: {
+      data: [
+        "限电损失电量(单位:万kwh)",
+        "故障损失电量(单位:万kwh)",
+        "检修损失电量(单位:万kwh)",
+        "性能损失电量(单位:万kwh)",
+        "受累损失电量(单位:万kwh)",
+      ],
+    },
+    grid: {
+      left: "3%",
+      right: "4%",
+      bottom: "3%",
+      containLabel: true,
+    },
+    yAxis: {
+      type: "value",
+      boundaryGap: [0, 0.01],
+    },
+    xAxis: {
+      type: "category",
+      data: data.date,
+    },
+    series: [
+      {
+        name: "限电损失电量(单位:万kwh)",
+        type: "bar",
+        data: data.xdss,
+      },
+      {
+        name: "故障损失电量(单位:万kwh)",
+        type: "bar",
+        data: data.gzss,
+      },
+      ,
+      {
+        name: "检修损失电量(单位:万kwh)",
+        type: "bar",
+        data: data.jxss,
+      },
+      {
+        name: "性能损失电量(单位:万kwh)",
+        type: "bar",
+        data: data.xnss,
+      },
+      {
+        name: "受累损失电量(单位:万kwh)",
+        type: "bar",
+        data: data.slss,
+      },
+    ],
+  };
+  myChart.setOption(option, true);
+}
+/**
+ * 对标分析弹出雷达图--->
+ * @param {id名称} id 
+ * @param {第一台风机数据} value1 
+ * @param {第一台风机名字} name1 
+ * @param {第二台风机数据} value2 
+ * @param {第二台风机名字} name2 
+ * @returns 
+ */
+export function leida_tc (id, value1, name1, value2, name2) {
+  if (value1 === undefined || value2 === undefined) {
+    message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart;
+  if (document.getElementById(id) != null) {
+    myChart = EC.init(document.getElementById(id));
+
+  }
+
+  var option;
+
+  option = {
+    title: {
+      text: "对标排名分析",
+      left: 400,
+      top: -5,
+      textStyle: {
+        fontSize: 13,
+      },
+    },
+    grid: {
+      top: "10%",
+      left: "10%",
+      right: "10%",
+      bottom: "0",
+    },
+    tooltip: {},
+    legend: {
+      orient: "vertical",
+      x: "left", //可设定图例在左、右、居中
+      y: "0", //可设定图例在上、下、居中
+      padding: [0, 50, 0, 0],
+    },
+    radar: {
+      // shape: 'circle',
+      name: {
+        textStyle: {
+          color: "#fff",
+          backgroundColor: "#999",
+          borderRadius: 3,
+          padding: [3, 5],
+        },
+      },
+      indicator: [
+        { name: "风能利用率", max: 100 },
+        { name: "故障损失率", max: 100 },
+        { name: "检修损失率", max: 100 },
+        { name: "弃风率", max: 100 },
+        { name: "性能损失率", max: 100 },
+        { name: "受累损失率", max: 100 },
+        { name: "复位及时率", max: 100 },
+        { name: "状态转换率", max: 100 },
+        { name: "消缺及时率", max: 100 },
+      ],
+    },
+    series: [
+      {
+        name: "预算 vs 开销(Budget vs spending)",
+        type: "radar",
+        // areaStyle: {normal: {}},
+        data: [
+          {
+            value: value1,
+            name: name1,
+          },
+          {
+            value: value2,
+            name: name2,
+          },
+        ],
+      },
+    ],
+  };
+  myChart.setOption(option, true);
+
+}
+/**
+ * 
+ * @param {id名称} id 
+ * @param {第一台风机数据} value1 
+ * @param {第二台风机数据} value2 
+ * @returns 
+ */
+export function bar_tc (id, value1, value2, n1, n2) {
+  if (value1 === undefined || value2 === undefined) {
+    message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  var option;
+  option = {
+    tooltip: {
+      trigger: "axis",
+      axisPointer: {
+        type: "cross",
+        crossStyle: {
+          color: "#999",
+        },
+      },
+    },
+    title: {
+      text: "损失电量分析",
+      left: 100,
+      top: 8,
+      textStyle: {
+        fontSize: 13,
+      },
+    },
+    grid: {
+      top: "90",
+      left: "10%",
+      right: "10%",
+      bottom: "30",
+    },
+    legend: {
+      orient: "vertical",
+      right: "0%",
+      padding: [6, 99, 9, 5],
+      data: [
+        "限电损失电量(单位:万kwh)",
+        "故障损失电量(单位:万kwh)",
+        "检修损失电量(单位:万kwh)",
+        "性能损失电量(单位:万kwh)",
+        "受累损失电量(单位:万kwh)",
+      ],
+    },
+    xAxis: [
+      {
+        type: "category",
+        data: [
+          BASE.getBzDate(new Date(value1.recordDate), 0) + "/" + n1,
+          BASE.getBzDate(new Date(value2.recordDate), 0) + "/" + n2,
+        ],
+        axisPointer: {
+          type: "shadow",
+        },
+      },
+    ],
+    yAxis: [
+      {
+        type: "value",
+        name: "电量",
+
+        axisLabel: {
+          formatter: "{value} 万kw",
+        },
+      },
+    ],
+    series: [
+      {
+        name: "限电损失电量(单位:万kwh)",
+        type: "bar",
+        yAxisIndex: 0,
+        data: [value1.xdss, value2.xdss],
+      },
+      {
+        name: "故障损失电量(单位:万kwh)",
+        type: "bar",
+        yAxisIndex: 0,
+        data: [value1.gzss, value2.gzss],
+      },
+      {
+        name: "检修损失电量(单位:万kwh)",
+        type: "bar",
+        yAxisIndex: 0,
+        data: [value1.jxss, value2.jxss],
+      },
+      {
+        name: "性能损失电量(单位:万kwh)",
+        type: "bar",
+        yAxisIndex: 0,
+        data: [value1.xnss, value2.xnss],
+      },
+      {
+        name: "受累损失电量(单位:万kwh)",
+        type: "bar",
+        yAxisIndex: 0,
+        data: [value1.slss, value2.slss],
+      },
+    ],
+  };
+
+
+
+  myChart.setOption(option, true);
+}
+/**
+ * 
+ * @param {id名称} id 
+ * @param {数据} value 
+ * @returns 
+ */
+export function bar_tc_2 (id, value) {
+  if (value === undefined) {
+    message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  let option = {
+    legend: {
+      orient: "vertical",
+      left: "right",
+    },
+    tooltip: {},
+    dataset: {
+      dimensions: [
+        "product",
+        "限电损失电量单位:万KWh",
+        "故障损失电量单位:万KWh",
+        "检修损失电量单位:万KWh",
+        "性能损失电量单位:万KWh",
+        "受累损失电量单位:万KWh",
+      ],
+      source: value,
+    },
+    xAxis: { type: "category" },
+    yAxis: {},
+    // Declare several bar series, each will be mapped
+    // to a column of dataset.source by default.
+    series: [
+      {
+        // barGap:'100%',/*多个并排柱子设置柱子之间的间距*/
+        type: "bar",
+        barWidth: 30,
+        itemStyle: {
+          normal: {
+            color: "#D201D8",
+          },
+        },
+      },
+      {
+        type: "bar",
+        barWidth: 30,
+        itemStyle: {
+          normal: {
+            color: "#FD0100",
+          },
+        },
+      },
+      {
+        type: "bar",
+        barWidth: 30,
+        itemStyle: {
+          normal: {
+            color: "#FF7B16",
+          },
+        },
+      },
+      {
+        type: "bar",
+        barWidth: 30,
+        itemStyle: {
+          normal: {
+            color: "#8085E9",
+          },
+        },
+      },
+      {
+        type: "bar",
+        barWidth: 30,
+        itemStyle: {
+          normal: {
+            color: "#A6A6A6",
+          },
+        },
+      },
+    ],
+  };
+  myChart.setOption(option, true);
+}
+/**
+ * 用在单机饱和度分体  表格内雷达图
+ * @param {id名称} id 
+ * @param {雷达图数据} value 
+ * @param {雷达图名称} name 
+ * @returns 
+ */
+export function leida_djbhd (id, value, name) {
+  if (value === undefined) {
+    message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  myChart.resize({ height: 300 });
+  let option = {
+    tooltip: {},
+    legend: {
+      top: "93%",
+      left: "10%",
+    },
+    tooltip: {
+      triggerOn: "none",
+      alwaysShowContent: true,
+      position: function (pt) {
+        return [pt[0], 130];
+      },
+    },
+    radar: {
+      name: {
+        textStyle: {
+          color: "#fff",
+          backgroundColor: "#999",
+          borderRadius: 3,
+          padding: [3, 5],
+        },
+      },
+      indicator: [
+        { name: "北", max: 99 },
+        { name: "北北东", max: 99 },
+        { name: "北东", max: 99 },
+        { name: "东北东", max: 99 },
+        { name: "东", max: 99 },
+        { name: "东南东", max: 99 },
+        { name: "南东", max: 99 },
+        { name: "南南东", max: 99 },
+        { name: "南", max: 99 },
+        { name: "南南西", max: 99 },
+        { name: "南西", max: 99 },
+        { name: "西南西", max: 99 },
+        { name: "西", max: 99 },
+        { name: "西北西", max: 99 },
+        { name: "北西", max: 99 },
+        { name: "北北西", max: 99 },
+      ],
+    },
+    series: [
+      {
+        type: "radar",
+        // areaStyle: {normal: {}},
+        data: [
+          {
+            value: value,
+            name: name,
+            label: {
+              show: true,
+              position: "insideBottomRight",
+              distance: 14.5,
+              //rotate: -45,
+              offset: [11, 0],
+              formatter: function (params) {
+                let list = ["北", "北北东", "北东", "东北东", "东", "东南东", "南东", "南南东", "南", "南南西", "南西", "西南西", "西", "西北西", "北西", "北北西"]
+                if (params.value < 10) {
+                  return ''
+                } else {
+                  return list[params.dimensionIndex] + ':' + params.value;
+                }
+              }
+            },
+            areaStyle: {
+              opacity: 0.9,
+              color: new EC.graphic.RadialGradient(0.5, 0.5, 1, [
+                {
+                  color: "#B8D3E4",
+                  offset: 0,
+                },
+                {
+                  color: "#72ACD1",
+                  offset: 1,
+                },
+              ]),
+            },
+          },
+        ],
+        itemStyle: { normal: { label: { show: true } } },
+      },
+    ],
+    tooltip: {
+      show: false,
+      position: function (p) {
+        //其中p为当前鼠标的位置
+        return [p[0] + 10, p[1] - 100];
+      },
+      // formatter: function (params) {
+      //   //其中p为当前鼠标的位置
+      //   debugger
+      //    let fanhui = [];
+      //    let str ='';
+      //    let list = ["北","北北东","北东","东北东","东","东南东","南东","南南东","南","南南西","南西","西南西","西","西北西","北西","北北西"]
+      //    for(let i=1;i<Object.keys(params.value).length;i++){
+      //           if(params.value[i]>10){
+      //             fanhui.push(params.value[i]+':'+list[i]);
+      //           }
+      //    }
+      //    for(let j = 1 ;j<fanhui.length;j++){
+      //       str.concat(fanhui[j]);
+      //    }
+      //    return str;
+      // },
+      textStyle: {
+        fontWeight: "16px",
+        fontSize: 16,
+        lineHeight: 0,
+      },
+    },
+  };
+
+  myChart.setOption(option, true);
+}
+/**
+ * 单机饱和度---->
+ * @param {id名称} id 
+ * @param {风机集合} fj 
+ * @param {曲线数据} lineDate 
+ * @returns 
+ */
+export function bar_djbhd (id, fj, lineDate) {
+  if (lineDate === undefined) {
+    message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  let option = {
+    title: {
+      text: "日功率曲线",
+    },
+    tooltip: {
+      trigger: "axis",
+    },
+    legend: {
+      data: fj,
+    },
+    grid: {
+      left: "3%",
+      right: "4%",
+      bottom: "3%",
+      containLabel: true,
+    },
+    toolbox: {
+      feature: {
+        saveAsImage: {},
+      },
+    },
+    xAxis: {
+      type: "category",
+      boundaryGap: false,
+
+      data: lineDate.speed,
+    },
+    yAxis: {
+      type: "value",
+    },
+    series: [
+      {
+        name: fj[0],
+        type: "line",
+        stack: "总量",
+        smooth: true,
+        data: lineDate.value1,
+      },
+      {
+        name: fj[1],
+        type: "line",
+        stack: "总量",
+        smooth: true,
+        data: lineDate.value2,
+      },
+      {
+        name: fj[2],
+        type: "line",
+        stack: "总量",
+        smooth: true,
+        data: lineDate.value3,
+      },
+      {
+        name: fj[3],
+        type: "line",
+        stack: "总量",
+        smooth: true,
+        data: lineDate.value3,
+      },
+      {
+        name: fj[4],
+        type: "line",
+        stack: "总量",
+        smooth: true,
+        data: lineDate.value4,
+      },
+    ],
+  };
+  myChart.setOption(option, true);
+}
+/**
+ * 用于单机性能分析--->可定义显示属性位置
+ * @param {id名称} id 
+ * @param {数据} value 
+ * @param {名} name 
+ * @returns 
+ */
+export function bar_DJXNFX (id, value, name) {
+  if (value === undefined) {
+    message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  var option;
+
+  option = {
+    title: {},
+    tooltip: {},
+    legend: {
+      top: "93%",
+      left: "10%",
+    },
+    radar: {
+      // shape: 'circle',
+      name: {
+        textStyle: {
+          color: "#fff",
+          backgroundColor: "#999",
+          borderRadius: 3,
+          padding: [3, 5],
+        },
+      },
+      indicator: [
+        { name: "北", max: 99 },
+        { name: "北北东", max: 99 },
+        { name: "北东", max: 99 },
+        { name: "东北东", max: 99 },
+        { name: "东", max: 99 },
+        { name: "东南东", max: 99 },
+        { name: "南东", max: 99 },
+        { name: "南南东", max: 99 },
+        { name: "南", max: 99 },
+        { name: "南南西", max: 99 },
+        { name: "南西", max: 99 },
+        { name: "西南西", max: 99 },
+        { name: "西", max: 99 },
+        { name: "西北西", max: 99 },
+        { name: "北西", max: 99 },
+        { name: "北北西", max: 99 },
+      ],
+    },
+    series: [
+      {
+        type: "radar",
+        // areaStyle: {normal: {}},
+        data: [
+          {
+            value: value,
+            name: name,
+            // label: {
+            //   show: true,
+            //   formatter: function (params) {
+            //     return params.value;
+            //   },
+            // },
+            areaStyle: {
+              opacity: 0.9,
+              color: new EC.graphic.RadialGradient(0.5, 0.5, 1, [
+                {
+                  color: "#B8D3E4",
+                  offset: 0,
+                },
+                {
+                  color: "#72ACD1",
+                  offset: 1,
+                },
+              ]),
+            },
+          },
+        ],
+
+      },
+    ],
+    tooltip: {
+      position: function (p) { //其中p为当前鼠标的位置
+        return [p[0] + 10, p[1] - 100];
+      },
+      textStyle: {
+        fontWeight: "16px",
+        fontSize: 16,
+        lineHeight: 0,
+
+      }
+      // formatter: (params) => {
+      //   for(var i=0;i<Object.keys(params.data.value).length;i++){
+      //   return params.data.name[0]+':'+params.data.value[0];
+      //   }
+      // },
+    },
+  };
+
+  myChart.setOption(option, true);
+}
+/**
+ * 
+* 用于单机性能分析--->
+ * @param {id名称} id 
+ * @param {数据} value 
+ * @returns 
+ */
+export function qt_DJXNFX (id, value) {
+  if (value === undefined) {
+    message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  var option;
+  option = {
+    title: {
+      text: "",
+    },
+
+    tooltip: {
+      trigger: "item",
+    },
+    grid: {
+      left: 99,
+      top: 66,
+    },
+    legend: {
+      orient: "vertical",
+      left: "left",
+    },
+
+    series: [
+      {
+        type: "pie",
+        radius: ["35%", "70%"],
+        center: ["58%", "50%"],
+        data: value,
+        emphasis: {
+          itemStyle: {
+            shadowBlur: 10,
+            shadowOffsetX: 0,
+            shadowColor: "rgba(0, 0, 0, 0.5)",
+          },
+        },
+      },
+    ],
+  };
+
+  myChart.setOption(option, true);
+}
+
+/**
+ * 散点图
+ * @param {名称} id 
+ * @param {数据} value 
+ */
+
+export function sdt (id, value) {
+  if (value === undefined) {
+    message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  var option;
+
+
+  option = {
+    title: {
+      text: "风机功率排布情况",
+      lft: "300px",
+    },
+    legend: {
+      data: ["功率"],
+      right: "66px",
+    },
+
+    tooltip: {
+      show: false,
+      trigger: "axis",
+      axisPointer: {
+        type: "cross",
+      },
+    },
+    xAxis: {
+      type: "value",
+      scale: true,
+      splitLine: {
+        lineStyle: {
+          type: "dashed",
+        },
+      },
+      axisLabel: {
+        formatter: "{value} m/s",
+      },
+      splitNumber: 20,
+    },
+    yAxis: {
+      type: "value",
+      scale: true,
+      min: -40,
+      splitLine: {
+        lineStyle: {
+          type: "dashed",
+        },
+      },
+      axisLabel: {
+        formatter: "{value} 万kw",
+      },
+    },
+    series: [
+      {
+        name: "功率",
+        type: "scatter",
+        color: "#FF7F50",
+        data: value,
+        markPoint: {
+          data: [
+            { type: "max", name: "最大值" },
+            { type: "min", name: "最小值" },
+          ],
+          symbol: "pin",
+          symbolSize: 50,
+          silent: true,
+        },
+        markLine: {
+          data: [{ type: "average", name: "平均值" }],
+        },
+      },
+      {
+        name: "line",
+        type: "line",
+        smooth: true,
+        datasetIndex: 1,
+        symbolSize: 0.1,
+        symbol: "circle",
+        color: "#87CEFA",
+        label: { show: false },
+        labelLayout: { dx: -20 },
+        encode: { label: 2, tooltip: 1 },
+      },
+    ],
+  };
+
+  myChart.setOption(option, true);
+}
+
+/**
+* 数据长度固定曲线图(多曲线,传service整体)
+*/
+
+export function zzt_cdbqd (id, value, name) {
+  if (value === undefined) {
+    message.error("没有找到报表数据,请检查!");
+    return;
+  }
+  var myChart = EC.init(document.getElementById(id));
+  var option;
+  option = {
+    title: {
+      text: "折线图堆叠",
+    },
+    tooltip: {
+      trigger: "axis",
+    },
+    legend: {
+      data: value
+    },
+    grid: {
+      left: "3%",
+      right: "4%",
+      bottom: "3%",
+      containLabel: true,
+    },
+    toolbox: {
+      feature: {
+        saveAsImage: {},
+      },
+    },
+    xAxis: {
+      type: "category",
+      data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18],
+    },
+    yAxis: {
+      type: "value",
+    },
+    series: name,
+  };
+
+  myChart.setOption(option, true);
+}
+
+export default {
+  getBar_fdd,
+  leida_tc,
+  bar_tc,
+  bar_tc_2,
+  leida_djbhd,
+  bar_djbhd,
+  bar_DJXNFX,
+  qt_DJXNFX,
+  zzt_cdbqd,
+  sdt,
+  color,
+}

+ 5 - 0
src/tools/elUI.js

@@ -0,0 +1,5 @@
+import Vue from 'vue';
+
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+Vue.use(ElementUI);

+ 177 - 0
src/tools/excel/Blob.js

@@ -0,0 +1,177 @@
+/* eslint-disable */
+/* Blob.js
+ * A Blob implementation.
+ * 2014-05-27
+ *
+ * By Eli Grey, http://eligrey.com
+ * By Devin Samarin, https://github.com/eboyjr
+ * License: X11/MIT
+ *   See LICENSE.md
+ */
+
+/*global self, unescape */
+/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
+ plusplus: true */
+
+/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
+
+const blob = function (view) {
+  "use strict";
+
+  view.URL = view.URL || view.webkitURL;
+
+  if (view.Blob && view.URL) {
+    try {
+      new Blob;
+      return;
+    } catch (e) {}
+  }
+
+  // Internally we use a BlobBuilder implementation to base Blob off of
+  // in order to support older browsers that only have BlobBuilder
+  var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function (view) {
+    var
+      get_class = function (object) {
+        return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
+      },
+      FakeBlobBuilder = function BlobBuilder() {
+        this.data = [];
+      },
+      FakeBlob = function Blob(data, type, encoding) {
+        this.data = data;
+        this.size = data.length;
+        this.type = type;
+        this.encoding = encoding;
+      },
+      FBB_proto = FakeBlobBuilder.prototype,
+      FB_proto = FakeBlob.prototype,
+      FileReaderSync = view.FileReaderSync,
+      FileException = function (type) {
+        this.code = this[this.name = type];
+      },
+      file_ex_codes = (
+        "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " +
+        "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR"
+      ).split(" "),
+      file_ex_code = file_ex_codes.length,
+      real_URL = view.URL || view.webkitURL || view,
+      real_create_object_URL = real_URL.createObjectURL,
+      real_revoke_object_URL = real_URL.revokeObjectURL,
+      URL = real_URL,
+      btoa = view.btoa,
+      atob = view.atob
+
+      ,
+      ArrayBuffer = view.ArrayBuffer,
+      Uint8Array = view.Uint8Array;
+    FakeBlob.fake = FB_proto.fake = true;
+    while (file_ex_code--) {
+      FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
+    }
+    if (!real_URL.createObjectURL) {
+      URL = view.URL = {};
+    }
+    URL.createObjectURL = function (blob) {
+      var
+        type = blob.type,
+        data_URI_header;
+      if (type === null) {
+        type = "application/octet-stream";
+      }
+      if (blob instanceof FakeBlob) {
+        data_URI_header = "data:" + type;
+        if (blob.encoding === "base64") {
+          return data_URI_header + ";base64," + blob.data;
+        } else if (blob.encoding === "URI") {
+          return data_URI_header + "," + decodeURIComponent(blob.data);
+        }
+        if (btoa) {
+          return data_URI_header + ";base64," + btoa(blob.data);
+        } else {
+          return data_URI_header + "," + encodeURIComponent(blob.data);
+        }
+      } else if (real_create_object_URL) {
+        return real_create_object_URL.call(real_URL, blob);
+      }
+    };
+    URL.revokeObjectURL = function (object_URL) {
+      if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) {
+        real_revoke_object_URL.call(real_URL, object_URL);
+      }
+    };
+    FBB_proto.append = function (data /*, endings*/ ) {
+      var bb = this.data;
+      // decode data to a binary string
+      if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {
+        var
+          str = "",
+          buf = new Uint8Array(data),
+          i = 0,
+          buf_len = buf.length;
+        for (; i < buf_len; i++) {
+          str += String.fromCharCode(buf[i]);
+        }
+        bb.push(str);
+      } else if (get_class(data) === "Blob" || get_class(data) === "File") {
+        if (FileReaderSync) {
+          var fr = new FileReaderSync;
+          bb.push(fr.readAsBinaryString(data));
+        } else {
+          // async FileReader won't work as BlobBuilder is sync
+          throw new FileException("NOT_READABLE_ERR");
+        }
+      } else if (data instanceof FakeBlob) {
+        if (data.encoding === "base64" && atob) {
+          bb.push(atob(data.data));
+        } else if (data.encoding === "URI") {
+          bb.push(decodeURIComponent(data.data));
+        } else if (data.encoding === "raw") {
+          bb.push(data.data);
+        }
+      } else {
+        if (typeof data !== "string") {
+          data += ""; // convert unsupported types to strings
+        }
+        // decode UTF-16 to binary string
+        bb.push(unescape(encodeURIComponent(data)));
+      }
+    };
+    FBB_proto.getBlob = function (type) {
+      if (!arguments.length) {
+        type = null;
+      }
+      return new FakeBlob(this.data.join(""), type, "raw");
+    };
+    FBB_proto.toString = function () {
+      return "[object BlobBuilder]";
+    };
+    FB_proto.slice = function (start, end, type) {
+      var args = arguments.length;
+      if (args < 3) {
+        type = null;
+      }
+      return new FakeBlob(
+        this.data.slice(start, args > 1 ? end : this.data.length), type, this.encoding
+      );
+    };
+    FB_proto.toString = function () {
+      return "[object Blob]";
+    };
+    FB_proto.close = function () {
+      this.size = this.data.length = 0;
+    };
+    return FakeBlobBuilder;
+  }(view));
+
+  view.Blob = function Blob(blobParts, options) {
+    var type = options ? (options.type || "") : "";
+    var builder = new BlobBuilder();
+    if (blobParts) {
+      for (var i = 0, len = blobParts.length; i < len; i++) {
+        builder.append(blobParts[i]);
+      }
+    }
+    return builder.getBlob(type);
+  };
+}
+exports.blob = blob;

+ 179 - 0
src/tools/excel/Export2Excel.js

@@ -0,0 +1,179 @@
+//Export2Excel.js
+/* eslint-disable */
+require('script-loader!file-saver');
+require('./Blob.js');//转二进制用  这边要写你的blob的实际地址
+require('script-loader!xlsx/dist/xlsx.core.min');
+
+function generateArray (table) {
+  var out = [];
+  var rows = table.querySelectorAll('tr');
+  var ranges = [];
+  for (var R = 0; R < rows.length; ++R) {
+    var outRow = [];
+    var row = rows[R];
+    var columns = row.querySelectorAll('td');
+    for (var C = 0; C < columns.length; ++C) {
+      var cell = columns[C];
+      var colspan = cell.getAttribute('colspan');
+      var rowspan = cell.getAttribute('rowspan');
+      var cellValue = cell.innerText;
+      if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
+
+      //Skip ranges
+      ranges.forEach(function (range) {
+        if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {
+          for (var i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null);
+        }
+      });
+
+      //Handle Row Span
+      if (rowspan || colspan) {
+        rowspan = rowspan || 1;
+        colspan = colspan || 1;
+        ranges.push({
+          s: {
+            r: R,
+            c: outRow.length
+          },
+          e: {
+            r: R + rowspan - 1,
+            c: outRow.length + colspan - 1
+          }
+        });
+      };
+
+      //Handle Value
+      outRow.push(cellValue !== "" ? cellValue : null);
+
+      //Handle Colspan
+      if (colspan)
+        for (var k = 0; k < colspan - 1; ++k) outRow.push(null);
+    }
+    out.push(outRow);
+  }
+  return [out, ranges];
+};
+
+function datenum (v, date1904) {
+  if (date1904) v += 1462;
+  var epoch = Date.parse(v);
+  return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
+}
+
+function sheet_from_array_of_arrays (data, opts) {
+  var ws = {};
+  var range = {
+    s: {
+      c: 10000000,
+      r: 10000000
+    },
+    e: {
+      c: 0,
+      r: 0
+    }
+  };
+  for (var R = 0; R != data.length; ++R) {
+    for (var C = 0; C != data[R].length; ++C) {
+      if (range.s.r > R) range.s.r = R;
+      if (range.s.c > C) range.s.c = C;
+      if (range.e.r < R) range.e.r = R;
+      if (range.e.c < C) range.e.c = C;
+      var cell = {
+        v: data[R][C]
+      };
+      if (cell.v == null) continue;
+      var cell_ref = XLSX.utils.encode_cell({
+        c: C,
+        r: R
+      });
+
+      if (typeof cell.v === 'number') cell.t = 'n';
+      else if (typeof cell.v === 'boolean') cell.t = 'b';
+      else if (cell.v instanceof Date) {
+        cell.t = 'n';
+        cell.z = XLSX.SSF._table[14];
+        cell.v = datenum(cell.v);
+      } else cell.t = 's';
+
+      ws[cell_ref] = cell;
+    }
+  }
+  if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
+  return ws;
+}
+
+function Workbook () {
+  if (!(this instanceof Workbook)) return new Workbook();
+  this.SheetNames = [];
+  this.Sheets = {};
+}
+
+function s2ab (s) {
+  var buf = new ArrayBuffer(s.length);
+  var view = new Uint8Array(buf);
+  for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
+  return buf;
+}
+
+export function export_table_to_excel (id) {
+  var theTable = document.getElementById(id);
+  console.log('a')
+  var oo = generateArray(theTable);
+  var ranges = oo[1];
+
+  /* original data */
+  var data = oo[0];
+  var ws_name = "导出的Excel";
+  console.log(data);
+
+  var wb = new Workbook(),
+    ws = sheet_from_array_of_arrays(data);
+
+  /* add ranges to worksheet */
+  // ws['!cols'] = ['apple', 'banan'];
+  ws['!merges'] = ranges;
+
+  /* add worksheet to workbook */
+  wb.SheetNames.push(ws_name);
+  wb.Sheets[ws_name] = ws;
+
+  var wbout = XLSX.write(wb, {
+    bookType: 'xlsx',
+    bookSST: false,
+    type: 'binary'
+  });
+
+  saveAs(new Blob([s2ab(wbout)], {
+    type: "application/octet-stream"
+  }), "test.xlsx")
+}
+
+function formatJson (jsonData) {
+  console.log(jsonData)
+}
+export function export_json_to_excel (th, jsonData, defaultTitle) {
+
+  /* original data */
+
+  var data = jsonData;
+  data.unshift(th);
+  var ws_name = "导出的Excel";
+
+  var wb = new Workbook(),
+    ws = sheet_from_array_of_arrays(data);
+
+
+  /* add worksheet to workbook */
+  wb.SheetNames.push(ws_name);
+  wb.Sheets[ws_name] = ws;
+
+  var wbout = XLSX.write(wb, {
+    bookType: 'xlsx',
+    bookSST: false,
+    type: 'binary'
+  });
+  var title = defaultTitle || '列表'
+  saveAs(new Blob([s2ab(wbout)], {
+    type: "application/octet-stream"
+  }), title + ".xlsx")
+};

+ 101 - 0
src/tools/formCheck.js

@@ -0,0 +1,101 @@
+/**
+ *  带小数点的数字输入 - 默认4为小数
+ *  例如:FC.numDxsCheck(form, 3,'phone')
+ *  form:表单对象,其中包括phone
+ *  ws:几位小数,默认2位小数,传1代表1位小数
+ *  key:键名不叫phone时需要传入新的键名
+ * */
+export function numDxsCheck(form, ws, key) {
+  if (key === undefined) {
+    key = "cost";
+  }
+  form[key] = form[key] + "";
+
+  //先把非数字的都替换掉,除了数字和.
+  form[key] = form[key].replace(/[^\d.]/g, "");
+  //必须保证第一个为数字而不是.
+  form[key] = form[key].replace(/^\./g, "");
+  //保证只有出现一个.而没有多个.
+  form[key] = form[key].replace(/\.{2,}/g, ".");
+  //保证.只出现一次,而不能出现两次以上
+  form[key] = form[key].replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+
+  //只能输入4个小数
+  let c = null;
+  switch (ws) {
+    case 1:
+      c = /^(\-)*(\d+)\.(\d).*$/;
+      break;
+    case 2:
+      c = /^(\-)*(\d+)\.(\d\d).*$/;
+      break;
+    case 3:
+      c = /^(\-)*(\d+)\.(\d\d\d).*$/;
+      break;
+    case 4:
+      c = /^(\-)*(\d+)\.(\d\d\d\d).*$/;
+      break;
+    default:
+      c = /^(\-)*(\d+)\.(\d\d).*$/;
+  }
+  //只能输入两个小数
+  form[key] = form[key].replace(c, "$1$2.$3");
+}
+
+/**
+ *  只能输入数字
+ *  例如:FC.numCheck(form,'num')
+ *  form:表单对象,其中包括num
+ *  key:键名不叫num时需要传入新的键名
+ * */
+export function numCheck(form, key) {
+  if (key === undefined) {
+    key = "num";
+  }
+  form[key] = form[key].replace(/[^\d]/g, "");
+}
+
+/**
+ *  只能输入:英文字母或数字
+ *  例如:FC.numEnCheck(form,'num')
+ *  form:表单对象,其中包括num
+ *  key:键名不叫num时需要传入新的键名
+ * */
+export function numEnCheck(form, key) {
+  if (key === undefined) {
+    key = "num";
+  }
+  form[key] = form[key].replace(/[^\w\.\/]/gi, "");
+}
+
+/*
+ *  手机号 长度
+ *  处理手机号长度,默认对象内手机号的字段名称为phone
+ *  form:表单对象,其中包括phone
+ *  key:键名不叫phone时需要传入新的键名
+ * */
+export function phoneMaxLength(form, key) {
+  if (key === undefined) {
+    key = "phone";
+  }
+  if (form[key].length > 11) {
+    form[key] = form[key].substring(0, 11);
+  }
+}
+
+/*
+ *  禁止选择的日期区间
+ *  禁止选择今天以后的日期 - 今天可选
+ *  num: 天,0:今天可选,1:今天不可选,2:昨天也不可选,-1:明天可选,-2:后天也可选,类推
+ * */
+export function rangePickerDisabledDate(current, num) {
+  return current && current > new Date().getTime() - 3600 * 1000 * 24 * num;
+}
+
+export default {
+  rangePickerDisabledDate,
+  numCheck,
+  numEnCheck,
+  phoneMaxLength,
+  numDxsCheck,
+};

+ 98 - 0
src/tools/htmlToPdf.js

@@ -0,0 +1,98 @@
+import html2canvas from 'html2canvas';
+import JsPDF from 'jspdf';
+
+/**
+ * @param  ele          要生成 pdf 的DOM元素(容器)
+ * @param  padfName     PDF文件生成后的文件名字
+ * */
+
+function downloadPDF(ele, pdfName){
+
+    let eleW = ele.offsetWidth;// 获得该容器的宽
+    let eleH = ele.offsetHeight;// 获得该容器的高
+
+
+    let eleOffsetTop = ele.offsetTop;  // 获得该容器到文档顶部的距离
+    let eleOffsetLeft = ele.offsetLeft; // 获得该容器到文档最左的距离
+
+    var canvas = document.createElement("canvas");
+    var abs = 0;
+
+    let win_in = document.documentElement.clientWidth || document.body.clientWidth; // 获得当前可视窗口的宽度(不包含滚动条)
+    let win_out = window.innerWidth; // 获得当前窗口的宽度(包含滚动条)
+
+    if(win_out>win_in){
+        // abs = (win_o - win_i)/2;    // 获得滚动条长度的一半
+        abs = (win_out - win_in)/2;    // 获得滚动条宽度的一半
+        // console.log(a, '新abs');
+    }
+
+    canvas.width = eleW * 2;    // 将画布宽&&高放大两倍
+    canvas.height = eleH * 2;
+
+
+
+
+    var context = canvas.getContext("2d");
+
+    context.scale(2, 2);
+
+    context.translate(-eleOffsetLeft -abs, -eleOffsetTop);
+    // 这里默认横向没有滚动条的情况,因为offset.left(),有无滚动条的时候存在差值,因此
+    // translate的时候,要把这个差值去掉
+
+    // html2canvas(element).then( (canvas)=>{ //报错
+    // html2canvas(element[0]).then( (canvas)=>{
+    html2canvas( ele, {
+        dpi: 300,
+        // allowTaint: true,  //允许 canvas 污染, allowTaint参数要去掉,否则是无法通过toDataURL导出canvas数据的
+        useCORS:true  //允许canvas画布内 可以跨域请求外部链接图片, 允许跨域请求。
+    } ).then( (canvas)=>{
+
+        var contentWidth = canvas.width;
+        var contentHeight = canvas.height;
+        //一页pdf显示html页面生成的canvas高度;
+        var pageHeight = contentWidth / 592.28 * 841.89;
+        //未生成pdf的html页面高度
+        var leftHeight = contentHeight;
+        //页面偏移
+        var position = 0;
+        //a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高
+        var imgWidth = 595.28;
+        var imgHeight = 595.28/contentWidth * contentHeight;
+
+        var pageData = canvas.toDataURL('image/jpeg', 1.0);
+
+
+
+        var pdf = new JsPDF('', 'pt', 'a4');
+
+        //有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
+        //当内容未超过pdf一页显示的范围,无需分页
+        if (leftHeight < pageHeight) {
+            //在pdf.addImage(pageData, 'JPEG', 左,上,宽度,高度)设置在pdf中显示;
+            pdf.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight);
+            // pdf.addImage(pageData, 'JPEG', 20, 40, imgWidth, imgHeight);
+        } else {    // 分页
+            while(leftHeight > 0) {
+                pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight);
+                leftHeight -= pageHeight;
+                position -= 841.89;
+                //避免添加空白页
+                if(leftHeight > 0) {
+                    pdf.addPage();
+                }
+            }
+        }
+
+        //可动态生成
+        pdf.save(pdfName);
+    })
+
+
+}
+
+
+export default {
+    downloadPDF
+}

+ 54 - 0
src/tools/webSocket.js

@@ -0,0 +1,54 @@
+import Stomp from 'stompjs'
+import myconfig from '@api/config'
+import store from '@store/index'
+
+// ============================一般使用的变量============================
+let number = 0;
+
+// ============================  大函数体   ============================
+export function init(topic) {
+  let wsClient = null;
+  var url = myconfig.webSoketUrl;
+  // let socket = new SockJS(url);  // 这个地址要找你们后端
+  // wsClient = Stomp.over(socket);
+  wsClient = Stomp.client(url);
+  wsClient.debug = null;
+  wsClient.connect({ topic: topic }, wsClient2 => connectCallBackSubscribe(wsClient, topic), error => reconnect(error, wsClient));
+}
+// 断线重连
+export function reconnect(error, wsClient) {
+  //连接失败时再次调用函数
+  number++;
+  wsClient.connected = false;
+  clearTimeout(setTimeout(init('/topic/popup'), 1000 * 5));
+  debugX("DataAdapter reconnect:" + number + " 次");
+  return;
+}
+// 链接并推送数据
+export function connectCallBackSubscribe(wsClient, topic) {
+  number = 0;
+  wsClient.connected = true;
+  wsClient.subscribe(topic, stompMessage => reflexWindturbineBasicInformation(stompMessage));
+}
+// ============================  解析函数体  ============================
+export function reflexWindturbineBasicInformation(stompMessage) {
+  var newdata = JSON.parse(stompMessage.body);
+  // store.dispatch('getupdate', newdata);
+  console.log(newdata)
+
+}
+// ============================  其他  ============================
+export function debugX(text) {
+  console.log(text);
+}
+
+export function close(params) {
+  // console.log("关闭socket")
+  socket.close();
+}
+
+
+export default {
+  init,
+  close
+}

+ 15 - 0
src/utils/auth.js

@@ -0,0 +1,15 @@
+import Cookies from 'js-cookie'
+
+const TokenKey = 'hrsaas-bjgy-token'
+
+export function getToken () {
+  return Cookies.get(TokenKey)
+}
+
+export function setToken (token) {
+  return Cookies.set(TokenKey, token)
+}
+
+export function removeToken () {
+  return Cookies.remove(TokenKey)
+}

+ 84 - 0
vue.config.js

@@ -0,0 +1,84 @@
+// vue.config.js
+const path = require('path');
+const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV);
+const resolve = (dir) => path.join(__dirname, dir);
+const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); // 去掉 console.log
+module.exports = {
+  publicPath: "./", // 默认'/',部署应用包时的基本 URL
+  indexPath: 'index.html', // 相对于打包路径index.html的路径
+  outputDir: 'dist', // 'dist', 生产环境构建文件的目录
+  assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
+  lintOnSave: false, // 是否在开发环境下通过 eslint-loader 在每次保存时 lint 代码
+  runtimeCompiler: true, // 是否使用包含运行时编译器的 Vue 构建版本
+  productionSourceMap: !IS_PROD, // 生产环境的 source map
+  chainWebpack: config => {
+    config.resolve.symlinks(true); // 修复热更新失效
+    // 添加别名
+    config.resolve.alias
+      .set('@', resolve('src'))
+      .set('@api', resolve('src/api'))
+      .set('@tools', resolve('src/tools'))
+      .set('@assets', resolve('src/assets'))
+      .set('@components', resolve('src/components'))
+      .set('@pages', resolve('src/pages'))
+      .set('@router', resolve('src/router'))
+      .set('@store', resolve('src/store'))
+      .set('@jsonData', resolve('src/jsonData'));
+    // 压缩图片
+    if (IS_PROD) {
+      config.module
+        .rule("images")
+        .use("image-webpack-loader")
+        .loader("image-webpack-loader")
+        .options({
+          mozjpeg: { progressive: true, quality: 65 },
+          optipng: { enabled: false },
+          pngquant: { quality: [0.65, 0.9], speed: 4 },
+          gifsicle: { interlaced: false }
+          // webp: { quality: 75 }
+        });
+    }
+  },
+  css: {
+    loaderOptions: {
+      sass: {
+        prependData: `@import "./src/assets/css/default";`,
+      },
+    },
+  },
+  // 去掉console.log
+  configureWebpack: config => {
+    if (IS_PROD) {
+      const plugins = [];
+      plugins.push(
+        new UglifyJsPlugin({
+          uglifyOptions: {
+            compress: {
+              drop_console: true,
+              drop_debugger: false,
+              pure_funcs: ["console.log"] //移除console
+            }
+          },
+          sourceMap: false,
+          parallel: true
+        })
+      );
+      config.plugins = [...config.plugins, ...plugins];
+    }
+  },
+  devServer: {
+    //代理配置
+    proxy: {
+      //这里的api表示请求的地址有apizzzs,就触发代理机制
+      '/apizzz': {
+        target: 'www.baidu.com',//我们要代理的地址
+        changeOrigin: true,//是否跨域
+        pathRewrite: {
+          //'^/api',''//假设想把 localhost:8080/api/login 变成www.baidu.com/login就需要这么做
+        }
+      }
+    },
+    open: true, // 是否打开浏览器
+  }
+
+}