Browse Source

驾驶舱修改

lining 3 years ago
parent
commit
e51ca58180

+ 2 - 1
.env.development

@@ -1 +1,2 @@
-VUE_APP_API=http://10.83.68.97:8020
+VUE_APP_API=http://10.83.68.97:8020
+VUE_APP_Matrix=http://10.83.68.97:8170

+ 150 - 0
src/api/cockpit/matrix/index.js

@@ -0,0 +1,150 @@
+import request from "../../../tools/request";
+//获取驾驶舱基础信息
+const findBasicDataInfo = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `genreset/findBasicDataInfo?id=${data.id}`,
+        method: "get",
+    });
+};
+//获取驾驶舱功率曲线图和电量柱状图信息
+const findPowerInfo = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `genreset/findPowerInfo?id=${data.id}`,
+        method: "get",
+    });
+};
+const findInfo = (subUrl,data) => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `${subUrl}?id=${data.id}`,
+        method: "get",
+    });
+};
+const findInfos = (subUrl,data) => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `${subUrl}?id=${data.id}&targetName=${data.targetName}`,
+        method: "get",
+    });
+};
+//预测风速电量
+const forecastwindspeedInfo = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `genreset/getForecastwindspeedInfo?wpId=${data.wpId}`,
+        method: "get",
+    });
+};
+//未来5天天气预报功能
+const weatherRealDay5Info = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `genreset/getWeatherRealDay5Info?wpId=${data.wpId}`,
+        method: "get",
+    });
+};
+//基础矩阵
+const matrixPush = (showLoading) => {
+    return request({
+        showLoading,
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `matrix/matrixPush`,
+        method: "get",
+    });
+};
+//全风场简单矩阵
+const findSimpleMatrixAll = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `matrix/findSimpleMatrixAll?wpId=${data.wpId}`,
+        method: "get",
+    });
+};
+//风机信息
+const findWtInfo = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `monitorwt/findWtInfo?wtId=${data.wtId}`,
+        method: "get",
+    });
+};
+//明细矩阵
+const matrixDetialPush = (showLoading) => {
+    return request({
+        showLoading,
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `matrix/matrixDetialPush`,
+        method: "get",
+    });
+};
+//
+const findWtWarnInfo = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `monitorwt/findWtWarnInfo?wtId=${data.wtId}`,
+        method: "get",
+    });
+};
+//欠发矩阵
+const matrixQfPush = (showLoading) => {
+    return request({
+        showLoading,
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `matrix/matrixQfPush`,
+        method: "get",
+    });
+};
+//
+const monitor = (showLoading) => {
+    return request({
+        showLoading,
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `monitor/monitor`,
+        method: "get",
+    });
+};
+//获取AGC信息
+const getAgcValues = (showLoading) => {
+    return request({
+        showLoading,
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `genreset/getAgcValues`,
+        method: "get",
+    });
+};
+const windfarmAllAjax = () => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `powercompare/windfarmAllAjax`,
+        method: "get",
+    });
+};
+//风机信息列表
+const findWtInfoList = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_Matrix,
+        url: `monitorwt/findWtInfoList?wpId=${data.wpId}`,
+        method: "get",
+    });
+};
+
+export default {
+    findBasicDataInfo,
+    findPowerInfo,
+    findInfo,
+    findInfos,
+    forecastwindspeedInfo,
+    weatherRealDay5Info,
+    matrixPush,
+    findSimpleMatrixAll,
+    findWtInfo,
+    matrixDetialPush,
+    findWtWarnInfo,
+    matrixQfPush,
+    monitor,
+    getAgcValues,
+    windfarmAllAjax,
+    findWtInfoList,
+}

+ 5 - 1
src/components/coms/table/table.vue

@@ -270,4 +270,8 @@ export default {
 };
 </script>
 
-<style lang="less"></style>
+<style lang="less">
+.com-table{
+  height: 100%;
+}
+</style>

+ 7 - 5
src/router/index.js

@@ -54,11 +54,13 @@ const routes = [{
 		name: "WindSite",
 		component: () =>
 			import( /* webpackChunkName: "windsite" */ "../views/WindSite/WindSite.vue"),
-		children: [{
-				path: "home/:wpId", // 场站监视
-				component: () =>
-					import( /* webpackChunkName: "windsitehome" */ "../views/WindSite/pages/Home/Home.vue"),
-			}, {
+		children: [
+			// {
+			// 	path: "home/:wpId", // 场站监视
+			// 	component: () =>
+			// 		import( /* webpackChunkName: "windsitehome" */ "../views/WindSite/pages/Home/Home.vue"),
+			// }, 
+			{
 				path: "draughtfanlist/:wpId", // 风机列表
 				component: () =>
 					import( /* webpackChunkName: "windsitedraughtfanlist" */

+ 1 - 1
src/store/index.js

@@ -6,7 +6,7 @@ const debug = process.env.NODE_ENV !== 'production';
 
 // 默认状态
 const state = {
-  websocketTimeSec: 1000,
+  websocketTimeSec: 5000,
   loading: false, //全局 - 加载中....
   themeName: localStorage.getItem("themeName") || "dark", // 主题
   menuData: [],

+ 9 - 0
src/tools/request.js

@@ -1,5 +1,6 @@
 import axios from "axios";
 import store from '../store/index'
+import BASE from '@tools/basicTool.js';
 // import { getToken } from "@/utils/storage";
 const service = axios.create();
 service.defaults.timeout = 50000;
@@ -10,6 +11,10 @@ service.interceptors.request.use(
 			// Authorization: store.state.token,
 		}
 		// 统一格式包装请求参数
+		if (config.showLoading) {
+			BASE.showLoading();
+			service.defaults.showLoading = config.showLoading
+		  }
 		return config;
 	},
 	error => {
@@ -22,6 +27,10 @@ service.interceptors.response.use(
 	response => {
 		// 处理正常返回数据
 		const { status } = response;
+		if(service.defaults.showLoading){
+			BASE.closeLoading();
+			service.defaults.showLoading = false
+		}
 		if (
 			status === 200
 		) {

+ 15 - 13
src/views/Agc/Agc.vue

@@ -10,7 +10,7 @@
 
 <script>
 import AgcPanel from "./components/agc-panel.vue";
-
+import api from "@api/cockpit/matrix/index.js";
 import store from "@store/index.js";
 
 export default {
@@ -90,14 +90,8 @@ export default {
 
     // 请求服务
     requestData(showLoading) {
-      let that = this;
-      that.API.requestData({
-        showLoading,
-        method: "POST",
-        subUrl: "genreset/getAgcValues",
-        timeout: 600000,
-        success(res) {
-          let datas = [];
+      api.getAgcValues(showLoading).then(res =>{
+        let datas = [];
           if (res.data) {
             res.data.forEach((pEle) => {
               pEle.jcxx.icon = "fa fa-gears";
@@ -137,12 +131,20 @@ export default {
               pEle.tb = tb;
               datas.push(pEle);
             });
-            that.datas = datas;
+            this.datas = datas;
           } else {
-            that.datas = datas;
+            this.datas = datas;
           }
-        },
-      });
+      })
+      // that.API.requestData({
+      //   showLoading,
+      //   method: "POST",
+      //   subUrl: "genreset/getAgcValues",
+      //   timeout: 600000,
+      //   success(res) {
+          
+      //   },
+      // });
     },
   },
 

+ 426 - 119
src/views/Home/Home.vue

@@ -104,7 +104,11 @@
               @click="
                 showDoneChart({
                   data: DayPower,
-                  dialogTitle: planBtnName.indexOf('电站') !== -1 || planBtnName.indexOf('光电厂') !== -1 ? '日照强度' : '日发电量',
+                  dialogTitle:
+                    planBtnName.indexOf('电站') !== -1 ||
+                    planBtnName.indexOf('光电厂') !== -1
+                      ? '日照强度'
+                      : '日发电量',
                   dialogType: 'doneLineChart',
                 })
               "
@@ -528,8 +532,14 @@
             <row align="middle">
               <div class="situation-item fengji">
                 <div class="icon fengji-icon svg-icon svg-icon-white">
-                  <svg-icon class="" :svgid="wpId === '-2' || wpId.indexOf('GDC') !== -1 ?  'svg-photovoltaic' : 'svg-风机'" />
-				  
+                  <svg-icon
+                    class=""
+                    :svgid="
+                      wpId === '-2' || wpId.indexOf('GDC') !== -1
+                        ? 'svg-photovoltaic'
+                        : 'svg-风机'
+                    "
+                  />
                 </div>
                 <div class="info">
                   <div class="title green">接入设备</div>
@@ -796,7 +806,7 @@ import PowerPlan from "./components/power-plan.vue";
 import Map from "./components/map.vue";
 import ListBarChart2 from "../../components/chart/bar/list-bar-chart2.vue";
 import DoubleLineChart from "@com/chart/line/double-line-chart.vue";
-
+import api from "@api/cockpit/matrix/index.js";
 import Table from "./dialog/table.vue";
 
 import $ from "jquery";
@@ -923,14 +933,11 @@ export default {
   methods: {
     // 打开天气弹窗
     openWeatherDialog() {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "genreset/getWeatherRealDay5Info",
-        data: {
-          wpId: that.wpId,
-        },
-        success(res) {
+      api
+        .weatherRealDay5Info({
+          wpId: this.wpId,
+        })
+        .then((res) => {
           const keys = ["wd", "sd"];
           let weatherChart = [
             {
@@ -957,30 +964,71 @@ export default {
               });
             });
           });
-          that.tqmap5 = res.data.ls;
-          that.weatherChart = weatherChart;
-          that.showWeatherDialog = true;
-        },
-      });
+          this.tqmap5 = res.data.ls;
+          this.weatherChart = weatherChart;
+          this.showWeatherDialog = true;
+        });
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "genreset/getWeatherRealDay5Info",
+      //   data: {
+      //     wpId: that.wpId,
+      //   },
+      //   success(res) {
+      //     const keys = ["wd", "sd"];
+      //     let weatherChart = [
+      //       {
+      //         title: "温度",
+      //         smooth: true,
+      //         value: [],
+      //       },
+      //       {
+      //         title: "湿度",
+      //         smooth: true,
+      //         value: [],
+      //       },
+      //     ];
+
+      //     res.data.ls.forEach((ele) => {
+      //       ele.time = new Date(ele.time).formatDate("yyyy-MM-dd hh:mm");
+      //     });
+
+      //     keys.forEach((key, keyIndex) => {
+      //       res.data.ls.forEach((ele) => {
+      //         weatherChart[keyIndex].value.push({
+      //           text: ele.time,
+      //           value: ele[key],
+      //         });
+      //       });
+      //     });
+      //     that.tqmap5 = res.data.ls;
+      //     that.weatherChart = weatherChart;
+      //     that.showWeatherDialog = true;
+      //   },
+      // });
     },
 
     // 请求服务
-    requestData(showLoading) {
-      let that = this;
-      that.API.requestData({
-        showLoading,
-        method: "POST",
-        subUrl: "genreset/findBasicDataInfo",
-        timeout: 60000,
-        data: {
-          id: that.wpId,
-        },
-        success(res) {
-          that.powerData = [
+    requestData() {
+      api
+        .findBasicDataInfo({
+          id: this.wpId,
+        })
+        .then((res) => {
+          this.powerData = [
             {
-              title: that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? "日照强度" : "风速",
-				
-              dialogTitle: that.wpId == 0 ? '详情' : that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? "日照强度详情" : "风速详情",
+              title:
+                this.wpId === "-2" || this.wpId.indexOf("GDC") !== -1
+                  ? "日照强度"
+                  : "风速",
+
+              dialogTitle:
+                this.wpId == 0
+                  ? "详情"
+                  : this.wpId === "-2" || this.wpId.indexOf("GDC") !== -1
+                  ? "日照强度详情"
+                  : "风速详情",
               subUrl: "genreset/findGLDetail",
               targetName: "ssfs",
               dialogType: "powerLineChart",
@@ -1015,15 +1063,15 @@ export default {
             },
           ];
 
-          that.jczbmap = res.data.jczbmap;
-          that.wxssmap = res.data.wxssmap;
-          that.gxkmap = res.data.gxkmap;
-          that.mxztmap = res.data.mxztmap;
-          that.fcmap = res.data.fcmap;
-          that.xtmap = res.data.xtmap;
-          that.tqmap = res.data.tqmap;
+          this.jczbmap = res.data.jczbmap;
+          this.wxssmap = res.data.wxssmap;
+          this.gxkmap = res.data.gxkmap;
+          this.mxztmap = res.data.mxztmap;
+          this.fcmap = res.data.fcmap;
+          this.xtmap = res.data.xtmap;
+          this.tqmap = res.data.tqmap;
 
-          that.ForecastPower = [
+          this.ForecastPower = [
             {
               name: "当日预测电量",
               value: res.data.jczbmap.rycfdl,
@@ -1062,7 +1110,7 @@ export default {
             },
           ];
 
-          that.planData = {
+          this.planData = {
             yfdl: res.data.jczbmap.yfdl,
             nfdl: res.data.jczbmap.nfdl,
             yfdljh: res.data.gxkmap.yfdljh,
@@ -1070,32 +1118,136 @@ export default {
             ywcl: res.data.gxkmap.ywcl,
             nwcl: res.data.gxkmap.nwcl,
           };
-        },
-      });
+        });
+
+      // let that = this;
+      // that.API.requestData({
+      //   showLoading,
+      //   method: "POST",
+      //   subUrl: "genreset/findBasicDataInfo",
+      //   timeout: 60000,
+      //   data: {
+      //     id: that.wpId,
+      //   },
+      //   success(res) {
+      //     that.powerData = [
+      //       {
+      //         title: that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? "日照强度" : "风速",
+
+      //         dialogTitle: that.wpId == 0 ? '详情' : that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? "日照强度详情" : "风速详情",
+      //         subUrl: "genreset/findGLDetail",
+      //         targetName: "ssfs",
+      //         dialogType: "powerLineChart",
+      //         max: 30,
+      //       },
+      //       {
+      //         title: "保证功率",
+      //         value: res.data.jczbmap.bzgl,
+      //         dialogTitle: "保证功率详情",
+      //         subUrl: "genreset/findGLDetail",
+      //         targetName: "bzgl",
+      //         dialogType: "powerLineChart",
+      //         max: res.data.jczbmap.zjts,
+      //       },
+      //       {
+      //         title: "应发功率",
+      //         value: res.data.jczbmap.yfgl,
+      //         dialogTitle: "应发功率详情",
+      //         subUrl: "genreset/findGLDetail",
+      //         targetName: "yfgl",
+      //         dialogType: "powerLineChart",
+      //         max: res.data.jczbmap.zjts,
+      //       },
+      //       {
+      //         title: "实际功率",
+      //         value: res.data.jczbmap.sjgl,
+      //         dialogTitle: "实际功率详情",
+      //         subUrl: "genreset/findGLDetail",
+      //         targetName: "sjgl",
+      //         dialogType: "powerLineChart",
+      //         max: res.data.jczbmap.zjts,
+      //       },
+      //     ];
+
+      //     that.jczbmap = res.data.jczbmap;
+      //     that.wxssmap = res.data.wxssmap;
+      //     that.gxkmap = res.data.gxkmap;
+      //     that.mxztmap = res.data.mxztmap;
+      //     that.fcmap = res.data.fcmap;
+      //     that.xtmap = res.data.xtmap;
+      //     that.tqmap = res.data.tqmap;
+
+      //     that.ForecastPower = [
+      //       {
+      //         name: "当日预测电量",
+      //         value: res.data.jczbmap.rycfdl,
+      //         // total: res.data.jczbmap.rfdlsx,
+      //         total:
+      //           res.data.jczbmap.rycfdl >= res.data.jczbmap.rfdl
+      //             ? res.data.jczbmap.rycfdl + 100
+      //             : res.data.jczbmap.rfdl + 100,
+      //       },
+      //       {
+      //         name: "实际发电量",
+      //         value: res.data.jczbmap.rfdl,
+      //         // total: res.data.jczbmap.rfdlsx,
+      //         total:
+      //           res.data.jczbmap.rycfdl >= res.data.jczbmap.rfdl
+      //             ? res.data.jczbmap.rycfdl + 100
+      //             : res.data.jczbmap.rfdl + 100,
+      //       },
+      //       {
+      //         name: "当月预测电量",
+      //         value: res.data.jczbmap.yycfdl,
+      //         // total: res.data.jczbmap.yfdlsx,
+      //         total:
+      //           res.data.jczbmap.yycfdl >= res.data.jczbmap.yfdl
+      //             ? res.data.jczbmap.yycfdl + 200
+      //             : res.data.jczbmap.yfdl + 200,
+      //       },
+      //       {
+      //         name: "实际发电量",
+      //         value: res.data.jczbmap.yfdl,
+      //         // total: res.data.jczbmap.yfdlsx,
+      //         total:
+      //           res.data.jczbmap.yycfdl >= res.data.jczbmap.yfdl
+      //             ? res.data.jczbmap.yycfdl + 200
+      //             : res.data.jczbmap.yfdl + 200,
+      //       },
+      //     ];
+
+      //     that.planData = {
+      //       yfdl: res.data.jczbmap.yfdl,
+      //       nfdl: res.data.jczbmap.nfdl,
+      //       yfdljh: res.data.gxkmap.yfdljh,
+      //       nfdljh: res.data.gxkmap.nfdljh,
+      //       ywcl: res.data.gxkmap.ywcl,
+      //       nwcl: res.data.gxkmap.nwcl,
+      //     };
+      //   },
+      // });
     },
 
     getCharts() {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "genreset/findPowerInfo",
-        data: {
-          id: that.wpId,
-        },
-        success(res) {
+      api
+        .findPowerInfo({
+          id: this.wpId,
+        })
+        .then((res) => {
           let rdlKey = ["value1", "value2", "value3", "speed"];
-		  let dw = {
-			  units:"",
-			  title:""
-		  };
-		  that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? 
-		  dw={
-			  units:"(w/㎡)",
-			  title:"日照"
-		  } : dw={
-			  units:"(m/s)",
-			  title:"风速"
-		  };
+          let dw = {
+            units: "",
+            title: "",
+          };
+          this.wpId === "-2" || this.wpId.indexOf("GDC") !== -1
+            ? (dw = {
+                units: "(w/㎡)",
+                title: "日照",
+              })
+            : (dw = {
+                units: "(m/s)",
+                title: "风速",
+              });
           let DayPower = {
             units: ["(万kWh)", dw.units],
             value: [
@@ -1157,7 +1309,7 @@ export default {
               value: [],
             },
             {
-              title: that.wpId === '-2' ? "日照强度" : "平均风速",
+              title: this.wpId === "-2" ? "日照强度" : "平均风速",
               smooth: true,
               value: [],
             },
@@ -1186,10 +1338,125 @@ export default {
             });
           });
 
-          that.DayPower = DayPower;
-          that.Powertrend = Powertrend;
-        },
-      });
+          this.DayPower = DayPower;
+          this.Powertrend = Powertrend;
+        });
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "genreset/findPowerInfo",
+      //   data: {
+      //     id: that.wpId,
+      //   },
+      //   success(res) {
+      //     let rdlKey = ["value1", "value2", "value3", "speed"];
+      // let dw = {
+      //   units:"",
+      //   title:""
+      // };
+      // that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ?
+      // dw={
+      //   units:"(w/㎡)",
+      //   title:"日照"
+      // } : dw={
+      //   units:"(m/s)",
+      //   title:"风速"
+      // };
+      //     let DayPower = {
+      //       units: ["(万kWh)", dw.units],
+      //       value: [
+      //         {
+      //           title: "发电量",
+      //           yAxisIndex: 0,
+      //           value: [],
+      //         },
+      //         {
+      //           title: "上网电量",
+      //           yAxisIndex: 0,
+      //           value: [],
+      //         },
+      //         {
+      //           title: "购网电量",
+      //           yAxisIndex: 0,
+      //           value: [],
+      //         },
+      //         {
+      //           title: dw.title,
+      //           yAxisIndex: 1,
+      //           value: [],
+      //         },
+      //       ],
+      //     };
+
+      //     let glKey = [
+      //       "value2",
+      //       "value1",
+      //       "value5",
+      //       "value4",
+      //       "value7",
+      //       "value6",
+      //     ];
+      //     let Powertrend = [
+      //       {
+      //         title: "实发功率",
+      //         smooth: true,
+      //         value: [],
+      //       },
+      //       {
+      //         title: "理论功率",
+      //         smooth: true,
+      //         value: [],
+      //       },
+      //       {
+      //         title: "保证功率",
+      //         smooth: true,
+      //         value: [],
+      //       },
+      //       {
+      //         title: "4小时预测功率",
+      //         smooth: true,
+      //         value: [],
+      //       },
+      //       {
+      //         title: "24小时预测功率",
+      //         smooth: true,
+      //         value: [],
+      //       },
+      //       {
+      //         title: that.wpId === '-2' ? "日照强度" : "平均风速",
+      //         smooth: true,
+      //         value: [],
+      //       },
+      //       {
+      //         title: "72小时预测功率",
+      //         smooth: true,
+      //         value: [],
+      //       },
+      //     ];
+
+      //     rdlKey.forEach((keyEle, keyIndex) => {
+      //       res.data.rdlvos.forEach((cEle) => {
+      //         DayPower.value[keyIndex].value.push({
+      //           text: cEle.timestr,
+      //           value: cEle[keyEle],
+      //         });
+      //       });
+      //     });
+
+      //     glKey.forEach((keyEle, keyIndex) => {
+      //       res.data.glvos.forEach((cEle) => {
+      //         Powertrend[keyIndex].value.push({
+      //           text: new Date(cEle.time).formatDate("hh:mm"),
+      //           value: cEle[keyEle],
+      //         });
+      //       });
+      //     });
+
+      //     that.DayPower = DayPower;
+      //     that.Powertrend = Powertrend;
+      //   },
+      // });
     },
 
     // 点击地图展示类型
@@ -1255,27 +1522,37 @@ export default {
       this.changeShowType(wpId, planBtnName);
     },
     changeShowBackType(wpId, planBtnName) {
-		this.historyWpId = wpId;
-		this.historyPlanBtnName = planBtnName;
+      this.historyWpId = wpId;
+      this.historyPlanBtnName = planBtnName;
       this.changeShowType(this.historyWpId, this.historyPlanBtnName);
     },
     // 打开弹窗
     openDialog(dialogTitle, subUrl, targetName, dialogType) {
       this.dialogTitle = dialogTitle;
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl,
-        data: {
-          id: that.wpId,
-          targetName,
-        },
-        success(res) {
-          that.dialogShow = true;
-          that.dialogData = res.data;
-          that.dialogType = dialogType;
-        },
+      let data = {
+        id: this.wpId,
+        targetName,
+      };
+      api.findInfos(subUrl, data).then((res) => {
+        this.dialogShow = true;
+        this.dialogData = res.data;
+        this.dialogType = dialogType;
       });
+
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl,
+      //   data: {
+      //     id: that.wpId,
+      //     targetName,
+      //   },
+      //   success(res) {
+      //     that.dialogShow = true;
+      //     that.dialogData = res.data;
+      //     that.dialogType = dialogType;
+      //   },
+      // });
     },
 
     // 点击安全天数下的场站按钮重置数据
@@ -1292,20 +1569,31 @@ export default {
     },
 
     showForecastBox() {
-      let that = this;
-      that.dialogTitle = "预测电量详情";
-      that.API.requestData({
-        method: "POST",
-        subUrl: "/genreset/getForecastwindspeedInfo",
-        data: {
-          wpId: that.wpId,
-        },
-        success(res) {
-          that.dialogData = res.data;
-          that.dialogType = "table";
-          that.dialogShow = true;
-        },
-      });
+      this.dialogTitle = "预测电量详情";
+      api
+        .forecastwindspeedInfo({
+          wpId: this.wpId,
+        })
+        .then((res) => {
+          this.dialogData = res.data;
+          this.dialogType = "table";
+          this.dialogShow = true;
+        });
+
+      // let that = this;
+
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "/genreset/getForecastwindspeedInfo",
+      //   data: {
+      //     wpId: that.wpId,
+      //   },
+      //   success(res) {
+      //     that.dialogData = res.data;
+      //     that.dialogType = "table";
+      //     that.dialogShow = true;
+      //   },
+      // });
     },
 
     // 显示功率复核图表
@@ -1313,17 +1601,36 @@ export default {
       this.dialogTitle = res.dialogTitle;
       this.dialogType = res.dialogType;
 
-	  let hour = this.nowTime.split(":")[0];
-	  let minute = this.nowTime.split(":")[1] < 30 ? minute = 1 : minute = 2;
-	  let valueLength = (hour * 2) + 1 + minute;
-	  
-	  res.data.value.forEach((ele,index)=>{
-		  if(this.wpId === '0'){
-			  ele.title.indexOf('电场') !== -1 ? ele.title+='[风速]' : ele.title;
-			  ele.title.indexOf('电站') !== -1 ? ele.title+='[日照]' : ele.title;
-		  }
-		  ele.value.splice(valueLength,48)
-	  })
+      let hour = this.nowTime.split(":")[0];
+      let minute =
+        this.nowTime.split(":")[1] < 30 ? (minute = 1) : (minute = 2);
+      let valueLength = hour * 2 + 1 + minute;
+      if (res.data.value) {
+        res.data.value.forEach((ele, index) => {
+          if (this.wpId === "0") {
+            ele.title.indexOf("电场") !== -1
+              ? (ele.title += "[风速]")
+              : ele.title;
+            ele.title.indexOf("电站") !== -1
+              ? (ele.title += "[日照]")
+              : ele.title;
+          }
+          ele.value.splice(valueLength, 48);
+        });
+      } else {
+        res.data.forEach((ele, index) => {
+          if (this.wpId === "0") {
+            ele.title.indexOf("电场") !== -1
+              ? (ele.title += "[风速]")
+              : ele.title;
+            ele.title.indexOf("电站") !== -1
+              ? (ele.title += "[日照]")
+              : ele.title;
+          }
+          ele.value.splice(valueLength, 48);
+        });
+      }
+
       this.powerLineChartData = res.data.value;
       if (res.dialogTitle === "详情") {
         this.powerLineChartYAxises = [
@@ -1340,7 +1647,7 @@ export default {
             unit: "(w/㎡)",
           },
         ];
-      }else if(res.dialogTitle === "风速详情") {
+      } else if (res.dialogTitle === "风速详情") {
         this.powerLineChartYAxises = [
           {
             min: 0,
@@ -1349,16 +1656,16 @@ export default {
             unit: "(m/s)",
           },
         ];
-      }else if(res.dialogTitle === "日照强度详情") {
-	    this.powerLineChartYAxises = [
-		  {
-		    min: 0,
-		    name: "日照",
-		    position: "right",
-		    unit: "(w/㎡)",
-		  },
-	    ];
-	  }else {
+      } else if (res.dialogTitle === "日照强度详情") {
+        this.powerLineChartYAxises = [
+          {
+            min: 0,
+            name: "日照",
+            position: "right",
+            unit: "(w/㎡)",
+          },
+        ];
+      } else {
         this.powerLineChartYAxises = [
           {
             min: 0,

File diff suppressed because it is too large
+ 31 - 30
src/views/Home/components/map/svg-map-nx.vue


+ 9 - 13
src/views/Home/components/power-plan.vue

@@ -42,6 +42,7 @@ import Col from "@/components/coms/grid/col.vue";
 import Row from "@/components/coms/grid/row.vue";
 import Tab from "@/components/coms/tabs/tab.vue";
 import PercentCard2 from "../../../components/coms/cards/percent-card-2.vue";
+import api from "@api/cockpit/matrix/index.js";
 export default {
   components: { Row, Col, Tab, PercentCard2 },
   data() {
@@ -118,16 +119,11 @@ export default {
     },
 
     openDialog(dialogTitle, subUrl, dialogType) {
-      let that = this;
-      
-      that.API.requestData({
-        method: "POST",
-        subUrl,
-        data: {
-          id: that.wpId,
-        },
-        success(res) {
-          let key = [
+      let data = {
+        id: this.wpId,
+      };
+      api.findInfo(subUrl, data).then((res) => {
+        let key = [
             {
               key: "value1",
               title: "月计划发电量",
@@ -167,13 +163,13 @@ export default {
             });
           });
 
-          that.$emit("chartClick", {
+          this.$emit("chartClick", {
             dialogTitle,
             dialogType,
             data: doneLineChartData,
           });
-        },
-      });
+      })
+
     },
   },
 

+ 83 - 49
src/views/Home/components/power-review.vue

@@ -26,6 +26,7 @@
 import Col from "@/components/coms/grid/col.vue";
 import Row from "../../../components/coms/grid/row.vue";
 import DashPieChart from "../../../components/chart/pie/dash-pie-chart.vue";
+import api from "@api/cockpit/matrix/index.js";
 
 export default {
   components: {
@@ -60,61 +61,94 @@ export default {
 
   methods: {
     openDialog(dialogTitle, subUrl, targetName, dialogType) {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl,
-        data: {
-          id: that.wpId,
-          targetName,
-        },
-        success(res) {
-          let powerLineChartData = {
-            // 图表所用单位
-            units: [""],
+      let data = {
+        id: this.wpId,
+        targetName,
+      };
+      api.findInfos(subUrl, data).then((res) => {
+        let powerLineChartData = {
+          // 图表所用单位
+          units: [""],
+          value: [],
+        };
+
+        res.data.forEach((pEle, pIndex) => {
+          powerLineChartData.value.push({
+            title: pEle[0].name,
+            yAxisIndex: 0,
+            smooth: true,
             value: [],
-          };
-
-          res.data.forEach((pEle, pIndex) => {
-            powerLineChartData.value.push({
-              title: pEle[0].name,
-              yAxisIndex: 0,
-              smooth: true,
-              value: [],
-            });
+          });
 
-            pEle.forEach((cEle) => {
-              powerLineChartData.value[pIndex].value.push({
-                text: new Date(cEle.time).formatDate("hh:mm:ss"),
-                value: cEle.value1,
-              });
+          pEle.forEach((cEle) => {
+            powerLineChartData.value[pIndex].value.push({
+              text: new Date(cEle.time).formatDate("hh:mm:ss"),
+              value: cEle.value1,
             });
           });
+        });
 
-          // let powerLineChartData = [];
-
-          // res.data.forEach((pEle, pIndex) => {
-          //   powerLineChartData.push({
-          //     title: pEle[0].name,
-          //     smooth: true,
-          //     value: [],
-          //   });
-
-          //   pEle.forEach((cEle) => {
-          //     powerLineChartData[pIndex].value.push({
-          //       text: new Date(cEle.time).formatDate("hh:mm:ss"),
-          //       value: cEle.value1,
-          //     });
-          //   });
-          // });
-
-          that.$emit("chartClick", {
-            dialogTitle,
-            dialogType,
-            data: powerLineChartData,
-          });
-        },
+        this.$emit("chartClick", {
+          dialogTitle,
+          dialogType,
+          data: powerLineChartData,
+        });
       });
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl,
+      //   data: {
+      //     id: that.wpId,
+      //     targetName,
+      //   },
+      //   success(res) {
+      //     let powerLineChartData = {
+      //       // 图表所用单位
+      //       units: [""],
+      //       value: [],
+      //     };
+
+      //     res.data.forEach((pEle, pIndex) => {
+      //       powerLineChartData.value.push({
+      //         title: pEle[0].name,
+      //         yAxisIndex: 0,
+      //         smooth: true,
+      //         value: [],
+      //       });
+
+      //       pEle.forEach((cEle) => {
+      //         powerLineChartData.value[pIndex].value.push({
+      //           text: new Date(cEle.time).formatDate("hh:mm:ss"),
+      //           value: cEle.value1,
+      //         });
+      //       });
+      //     });
+
+      //     // let powerLineChartData = [];
+
+      //     // res.data.forEach((pEle, pIndex) => {
+      //     //   powerLineChartData.push({
+      //     //     title: pEle[0].name,
+      //     //     smooth: true,
+      //     //     value: [],
+      //     //   });
+
+      //     //   pEle.forEach((cEle) => {
+      //     //     powerLineChartData[pIndex].value.push({
+      //     //       text: new Date(cEle.time).formatDate("hh:mm:ss"),
+      //     //       value: cEle.value1,
+      //     //     });
+      //     //   });
+      //     // });
+
+      //     that.$emit("chartClick", {
+      //       dialogTitle,
+      //       dialogType,
+      //       data: powerLineChartData,
+      //     });
+      //   },
+      // });
     },
   },
 

+ 24 - 30
src/views/LightMatrix1/LightMatrix1.vue

@@ -183,7 +183,7 @@
             :class="cItem.color"
             @click="goDetails(cItem)"
           >
-            {{ cItem.wtnum }}
+            {{ cItem.wtId.substring(cItem.wtId.length - 3) }}
           </div>
           <!-- 站位用 保证卡片布局最后一行不会有问题 -->
           <i class="blank" v-for="i in pItem.length" :key="i"></i>
@@ -198,6 +198,7 @@
 import Row from "@/components/coms/grid/row.vue";
 import Col from "@/components/coms/grid/col.vue";
 import SvgIcon from "@com/coms/icon/svg-icon.vue";
+import api from "@api/cockpit/matrix/index.js";
 import util from "@/helper/util.js";
 
 import store from "@store/index.js";
@@ -442,38 +443,31 @@ export default {
 
     // 请求服务
     requestData(showLoading) {
-      let that = this;
-      that.API.requestData({
-        showLoading,
-        method: "POST",
-        subUrl: "matrix/matrixPush",
-        success(res) {
-          if (res) {
-            console.log("resmap:", res);
-            let sourceMap = res.data;
-            let fjmap = [];
-            for (let key in sourceMap) {
-              if (key !== "fczbmap" && key !== "fjmap") {
-                sourceMap[key] += "";
-              } else if (key === "fjmap") {
-                sourceMap[key].forEach((pItem) => {
-                  pItem.forEach((cItem) => {
-                    cItem.color = that.getColor(cItem.fjzt);
-                    cItem.isShow = true;
-                  });
+      api.matrixPush(showLoading).then((res) => {
+        if (res) {
+          let sourceMap = res.data;
+          let fjmap = [];
+          for (let key in sourceMap) {
+            if (key !== "fczbmap" && key !== "fjmap") {
+              sourceMap[key] += "";
+            } else if (key === "fjmap") {
+              sourceMap[key].forEach((pItem) => {
+                pItem.forEach((cItem) => {
+                  cItem.color = this.getColor(cItem.fjzt);
+                  cItem.isShow = true;
                 });
-              }
+              });
             }
-            that.sourceMap = sourceMap;
-            console.log("sourceMap:", that.sourceMap);
-            if (that.fillCategory) {
-              that.changeShow(that.fillCategory, that.fillFjzt, true);
-            }
-          } else {
-            that.sourceMap = {};
           }
-        },
+          this.sourceMap = sourceMap;
+          if (this.fillCategory) {
+            this.changeShow(this.fillCategory, this.fillFjzt, true);
+          }
+        } else {
+          this.sourceMap = {};
+        }
       });
+      
     },
 
     // 查看风机详情
@@ -493,7 +487,7 @@ export default {
   created() {
     let that = this;
     that.$nextTick(() => {
-      that.requestData(false);
+      that.requestData(true);
       that.timmer = setInterval(() => {
         that.requestData(false);
       }, that.$store.state.websocketTimeSec);

+ 42 - 17
src/views/LightMatrix2/LightMatrix2.vue

@@ -74,7 +74,7 @@
             >
               <div class="card-panel">
                 <div class="card-left">
-                  <div class="tag">{{ cItem.wtnum }}</div>
+                  <div class="tag">{{ cItem.wtId.substring(cItem.wtId.length - 3)}}</div>
                 </div>
                 <div class="card-right">
                   <div class="num">{{ cItem.gl }}&nbsp;kw</div>
@@ -103,6 +103,7 @@
 import Row from "@/components/coms/grid/row.vue";
 import Col from "@/components/coms/grid/col.vue";
 import util from "@/helper/util.js";
+import api from "@api/cockpit/matrix/index.js";
 
 import store from "@store/index.js";
 import { isNumber } from "util";
@@ -384,13 +385,8 @@ export default {
 
     // 请求服务
     requestData(showLoading) {
-      let that = this;
-      that.API.requestData({
-        showLoading,
-        method: "POST",
-        subUrl: "matrix/matrixQfPush",
-        success(res) {
-          if (res.data) {
+      api.matrixQfPush(showLoading).then(res =>{
+        if (res.data) {
             let sourceMap = res.data;
             for (let key in sourceMap) {
               if (key !== "fczbmap" && key !== "fjmap") {
@@ -398,22 +394,51 @@ export default {
               } else if (key === "fjmap") {
                 sourceMap[key].forEach((pItem) => {
                   pItem.forEach((cItem) => {
-                    cItem.color = that.getColor(cItem.fjzt);
+                    cItem.color = this.getColor(cItem.fjzt);
                     cItem.isShow = true;
                   });
                 });
               }
             }
-            that.sourceMap = sourceMap;
-                 console.log('sourceMap:',that.sourceMap)
-            if (that.fillCategory) {
-              that.changeShow(that.fillCategory, that.fillFjzt, true);
+            this.sourceMap = sourceMap;
+                 console.log('sourceMap:',this.sourceMap)
+            if (this.fillCategory) {
+              this.changeShow(this.fillCategory, this.fillFjzt, true);
             }
           } else {
-            that.sourceMap = {};
+            this.sourceMap = {};
           }
-        },
-      });
+      })
+      // let that = this;
+      // that.API.requestData({
+      //   showLoading,
+      //   method: "POST",
+      //   subUrl: "matrix/matrixQfPush",
+      //   success(res) {
+      //     if (res.data) {
+      //       let sourceMap = res.data;
+      //       for (let key in sourceMap) {
+      //         if (key !== "fczbmap" && key !== "fjmap") {
+      //           sourceMap[key] += "";
+      //         } else if (key === "fjmap") {
+      //           sourceMap[key].forEach((pItem) => {
+      //             pItem.forEach((cItem) => {
+      //               cItem.color = that.getColor(cItem.fjzt);
+      //               cItem.isShow = true;
+      //             });
+      //           });
+      //         }
+      //       }
+      //       that.sourceMap = sourceMap;
+      //            console.log('sourceMap:',that.sourceMap)
+      //       if (that.fillCategory) {
+      //         that.changeShow(that.fillCategory, that.fillFjzt, true);
+      //       }
+      //     } else {
+      //       that.sourceMap = {};
+      //     }
+      //   },
+      // });
     },
 
     // 查看风机详情
@@ -427,7 +452,7 @@ export default {
   created() {
     let that = this;
     that.$nextTick(() => {
-      that.requestData(false);
+      that.requestData(true);
       that.timmer = setInterval(() => {
         that.requestData(false);
       }, that.$store.state.websocketTimeSec);

+ 15 - 21
src/views/LightMatrix3/LightMatrix3.vue

@@ -107,7 +107,7 @@
             >
               <div class="card-panel">
                 <div class="card-left">
-                  <div class="tag">{{ cItem.wtnum }}</div>
+                  <div class="tag">{{ cItem.wtId.substring(cItem.wtId.length-3) }}</div>
                   <div class="icon">
                     <span
                       class="svg-icon svg-icon-sm"
@@ -756,7 +756,7 @@ import SvgIcon from "@com/coms/icon/svg-icon.vue";
 import util from "@/helper/util.js";
 import { isNumber } from "util";
 import store from "@store/index.js";
-
+import api from "@api/cockpit/matrix/index.js";
 export default {
   // 名称
   name: "LightMatrix3",
@@ -1215,14 +1215,8 @@ export default {
 
     // 请求服务
     requestData(showLoading) {
-      let that = this;
-      that.API.requestData({
-        showLoading,
-        method: "POST",
-        subUrl: "matrix/matrixDetialPush",
-        success(res) {
-          if (res.data) {
-            //  console.log("resMap:", res);
+      api.matrixDetialPush(showLoading).then(res =>{
+        if (res.data) {
             let sourceMap = res.data;
             for (let key in sourceMap) {
               if (key !== "fczbmap" && key !== "fjmap") {
@@ -1231,25 +1225,25 @@ export default {
                 sourceMap[key].forEach((pItem) => {
                   pItem.forEach((cItem) => {
                     // console.log('citemfjzt:',cItem.fjzt)
-                    cItem.color = that.getColor(cItem.fjzt);
+                    cItem.color = this.getColor(cItem.fjzt);
                     cItem.isShow = true;
                   });
                 });
               }
             }
 
-            that.sourceMap = sourceMap;
-            console.log('sourceMap:',that.sourceMap)
-            if (that.fillCategory) {
-              console.log("thatfillcategory:", that.fillCategory);
+            this.sourceMap = sourceMap;
+            console.log('sourceMap:',this.sourceMap)
+            if (this.fillCategory) {
+              console.log("thisfillcategory:", this.fillCategory);
                console.log('fillFjzt:',this.fillFjzt)
-              that.changeShow(that.fillCategory, that.fillFjzt, true);
+              this.changeShow(this.fillCategory, this.fillFjzt, true);
             }
           } else {
-            that.sourceMap = {};
+            this.sourceMap = {};
           }
-        },
-      });
+
+      })
     },
     goDetails(item) {
       this.$router.push({
@@ -1261,7 +1255,7 @@ export default {
   created() {
     let that = this;
     that.$nextTick(() => {
-      that.requestData(false);
+      that.requestData(true);
       that.timmer = setInterval(() => {
         that.requestData(false);
       }, that.$store.state.websocketTimeSec);
@@ -1954,4 +1948,4 @@ export default {
     cursor: pointer;
   }
 }
-</style>
+</style>

+ 24 - 21
src/views/Status/Status.vue

@@ -26,6 +26,7 @@ import StatusPanel from "./components/status-panel.vue";
 import StatusPanelStatic from "./components/static.vue";
 import ComTable from "@com/coms/table/table.vue";
 import ComTable1 from "./table.vue";
+import api from "@api/cockpit/matrix/index.js";
 import util from "@/helper/util.js";
 
 import store from "@store/index.js";
@@ -496,13 +497,8 @@ export default {
   methods: {
     // 请求服务
     requestData(showLoading) {
-      let that = this;
-      that.API.requestData({
-        showLoading,
-        method: "POST",
-        subUrl: "monitor/monitor",
-        success(res) {
-          if (res.data) {
+      api.monitor(showLoading).then(res =>{
+        if (res.data) {
             let sourceMap = res.data;
             let datas = [];
             let data = [];
@@ -510,7 +506,7 @@ export default {
             let data2 = [];
             sourceMap.maps.forEach((ele) => {
               sourceMap.vos.forEach((vEle) => {});
-              that.wpId1 = sourceMap.vos.find((findEle) => {
+              this.wpId1 = sourceMap.vos.find((findEle) => {
                 return findEle.wpName === ele.name;
               }).wpId;
               datas.push({
@@ -634,24 +630,31 @@ export default {
             //      data.push(sourceMap.vos[0],sourceMap.vos[1],sourceMap.vos[2],sourceMap.vos[3],sourceMap.vos[4],sourceMap.vos[5],sourceMap.vos[11])
             //      data1.push(sourceMap.vos[6],sourceMap.vos[7],sourceMap.vos[8],sourceMap.vos[9],sourceMap.vos[10],sourceMap.vos[11])
             //  }
-            //  that.unique(data,that.wpId1);
-            // //  that.unique(data1,sourceMap.vos.find((findEle) => {
+            //  this.unique(data,this.wpId1);
+            // //  this.unique(data1,sourceMap.vos.find((findEle) => {
             // //         return findEle.wpName === ele.name;
             // //       }).wpId);
 
-            that.sourceMap = sourceMap;
-            that.datas = datas;
-            that.tableData.data = data;
-            that.tableData1.data = data1;
-            that.tableData2.data = data2;
+            this.sourceMap = sourceMap;
+            this.datas = datas;
+            this.tableData.data = data;
+            this.tableData1.data = data1;
+            this.tableData2.data = data2;
           } else {
-            that.sourceMap = {};
-            that.datas = [];
-            that.tableData.data = [];
-            that.tableData1.data = [];
+            this.sourceMap = {};
+            this.datas = [];
+            this.tableData.data = [];
+            this.tableData1.data = [];
           }
-        },
-      });
+      })
+      // that.API.requestData({
+      //   showLoading,
+      //   method: "POST",
+      //   subUrl: "monitor/monitor",
+      //   success(res) {
+          
+      //   },
+      // });
     },
   },
 

+ 56 - 49
src/views/WindSite/pages/DraughtFanList.vue

@@ -12,6 +12,7 @@
 <script>
 import Table2 from "@com/coms/table/table2.vue";
 import BtnGroup2 from "@com/coms/btn/btn-group-double.vue";
+import api from "@api/cockpit/matrix/index.js";
 export default {
   // 名称
   name: "DraughtFanList",
@@ -216,27 +217,21 @@ export default {
   methods: {
     // 请求服务
     requestData(showLoading) {
-      if (this.wpId.indexOf("GDC") != -1) {
-        this.requestDataGDC(showLoading);
-        return 0;
-      }
-      let that = this;
-      that.API.requestData({
-        showLoading,
-        method: "POST",
-        subUrl: "monitorwt/findWtInfoList",
-        data: {
-          wpId: that.wpId,
-        },
-        success(res) {
-          res.data.forEach((ele) => {
+      // if (this.wpId.indexOf("GDC") != -1) {
+      //   this.requestDataGDC(showLoading);
+      //   return 0;
+      // }
+      api.findWtInfoList({
+        wpId: this.wpId,
+      }).then(res =>{
+        res.data.forEach((ele) => {
             for (let key in ele) {
               if (key !== "code" && key !== "lnid" && key !== "model" && key !== "pjid" && key !== "wpid") {
                 ele[key] = ele[key] || 0;
               }
             }
           });
-          that.data = {
+          this.data = {
             data: res.data,
             column: [
               {
@@ -374,39 +369,45 @@ export default {
               },
             ],
           };
-        },
-      });
+      })
+      // that.API.requestData({
+      //   showLoading,
+      //   method: "POST",
+      //   subUrl: "monitorwt/findWtInfoList",
+      //   data: {
+      //     wpId: that.wpId,
+      //   },
+      //   success(res) {
+          
+      //   },
+      // });
     },
     // 光伏电站列表
-    async requestDataGDC(showLoading) {
-      let res = await this.API.requestData({
-        showLoading,
-        method: "POST",
-        subUrl: "monitorinverter/findInverterInfoList",
-        data: {
-          wpId: this.wpId,
-        },
-      });
-      let column = [
-        { name: "逆变器", field: "code" },
-        { name: "光照强度", field: "JSSSFS" },
-        { name: "有功功率", field: "AI130" },
-        { name: "功率因数", field: "AI067" },
-        { name: "机内温度", field: "AIG071" },
-        { name: "逆变效率", field: "AIG072" },
-        { name: "日发电量", field: "RFDL" },
-        { name: "月发电量", field: "YFDL" },
-        { name: "年发电量", field: "NFDL" },
-        { name: "累计发电量", field: "AIG064" },
-      ];
-      this.data = { data: res.data.data, column: column };
-    },
+    // async requestDataGDC(showLoading) {
+    //   let res = await this.API.requestData({
+    //     showLoading,
+    //     method: "POST",
+    //     subUrl: "monitorinverter/findInverterInfoList",
+    //     data: {
+    //       wpId: this.wpId,
+    //     },
+    //   });
+    //   let column = [
+    //     { name: "逆变器", field: "code" },
+    //     { name: "光照强度", field: "JSSSFS" },
+    //     { name: "有功功率", field: "AI130" },
+    //     { name: "功率因数", field: "AI067" },
+    //     { name: "机内温度", field: "AIG071" },
+    //     { name: "逆变效率", field: "AIG072" },
+    //     { name: "日发电量", field: "RFDL" },
+    //     { name: "月发电量", field: "YFDL" },
+    //     { name: "年发电量", field: "NFDL" },
+    //     { name: "累计发电量", field: "AIG064" },
+    //   ];
+    //   this.data = { data: res.data.data, column: column };
+    // },
     getWp() {
-      let that = this;
-      that.API.requestData({
-        method: "GET",
-        subUrl: "powercompare/windfarmAllAjax",
-        success(res) {
+      api.windfarmAllAjax().then(res =>{
           let btnGroups = [
             {
               icon: "svg-wind-site",
@@ -432,10 +433,16 @@ export default {
             }
           });
 
-          that.btnGroupsss = btnGroups;
-          that.renderBtnActiveIndex();
-        },
-      });
+          this.btnGroupsss = btnGroups;
+          this.renderBtnActiveIndex();
+      })
+      // that.API.requestData({
+      //   method: "GET",
+      //   subUrl: "powercompare/windfarmAllAjax",
+      //   success(res) {
+          
+      //   },
+      // });
     },
 
     renderBtnActiveIndex() {

+ 139 - 111
src/views/WindSite/pages/Info/Info.vue

@@ -1,39 +1,71 @@
 <template>
-<div>
-  <div class="mg-b-8">
-    <btn-group-double :btnGroups="btnGroups" :rowIndex="0" :index="1" @select="select" />
-  </div>
-  <div class="wind-site-info">
-    <div class="wind-site-menu">
-      <div class="wind-site-title">选择风机</div>
-      <div class="wind-site-body">
-        <collapse-list :list="WindSites" :allowScroll="true" scrollHeight="calc(100vh - 175px)" @click="clickMenu" />
-      </div>
+  <div>
+    <div class="mg-b-8">
+      <btn-group-double
+        :btnGroups="btnGroups"
+        :rowIndex="0"
+        :index="1"
+        @select="select"
+      />
     </div>
-    <div class="wind-site-info-body">
-      <div class="info-menu mg-b-16">
-        <div class="info-menu-item" v-for="(item, index) in InfoBtns.data" :key="item" :class="{ active: InfoBtns.activeIndex == index }" @click="onInfoMenuItemClick(item, index)">{{ item.text }}</div>
+    <div class="wind-site-info">
+      <div class="wind-site-menu">
+        <div class="wind-site-title">选择风机</div>
+        <div class="wind-site-body">
+          <collapse-list
+            :list="WindSites"
+            :allowScroll="true"
+            scrollHeight="calc(100vh - 175px)"
+            @click="clickMenu"
+          />
+        </div>
       </div>
-      <el-row style="height: calc(100% - 45px);">
-        <el-col :span="16" style="position:relative;">
-          <!-- 基本信息 使用 v-if 每次点击重新加载  -->
-          <!-- 使用 v-show 首次全部加载 之后隐藏 点击后显示 -->
-          <base-info v-show="InfoBtns.activeIndex == 0" :data="sourceMap" />
-          <!-- <base-info v-if="InfoBtns.activeIndex == 2" /> -->
-          <div :style="$store.state.themeName === 'dark' ? 'text-align:center;' : 'text-align:center;background:#fff;'">
-            <StandAloneImg class="sai" v-show="InfoBtns.activeIndex != 0" :activeIndex="InfoBtns.activeIndex" @selectSvg="selectSvg"></StandAloneImg>
+      <div class="wind-site-info-body">
+        <div class="info-menu mg-b-16">
+          <div
+            class="info-menu-item"
+            v-for="(item, index) in InfoBtns.data"
+            :key="item"
+            :class="{ active: InfoBtns.activeIndex == index }"
+            @click="onInfoMenuItemClick(item, index)"
+          >
+            {{ item.text }}
           </div>
-          <generator class="saig" v-show="InfoBtns.activeIndex != 0" :index="InfoBtns.activeIndex" :data="sourceMap"></generator>
-        </el-col>
-        <el-col :span="8">
-          <warning :data="WarnData" />
-        </el-col>
-      </el-row>
+        </div>
+        <el-row style="height: calc(100% - 45px)">
+          <el-col :span="16" style="position: relative">
+            <!-- 基本信息 使用 v-if 每次点击重新加载  -->
+            <!-- 使用 v-show 首次全部加载 之后隐藏 点击后显示 -->
+            <base-info v-show="InfoBtns.activeIndex == 0" :data="sourceMap" />
+            <!-- <base-info v-if="InfoBtns.activeIndex == 2" /> -->
+            <div
+              :style="
+                $store.state.themeName === 'dark'
+                  ? 'text-align:center;'
+                  : 'text-align:center;background:#fff;'
+              "
+            >
+              <StandAloneImg
+                class="sai"
+                v-show="InfoBtns.activeIndex != 0"
+                :activeIndex="InfoBtns.activeIndex"
+                @selectSvg="selectSvg"
+              ></StandAloneImg>
+            </div>
+            <generator
+              class="saig"
+              v-show="InfoBtns.activeIndex != 0"
+              :index="InfoBtns.activeIndex"
+              :data="sourceMap"
+            ></generator>
+          </el-col>
+          <el-col :span="8">
+            <warning :data="WarnData" />
+          </el-col>
+        </el-row>
+      </div>
     </div>
   </div>
-</div>
-  
-  
 </template>
 
 <script>
@@ -43,8 +75,17 @@ import Warning from "./Warning.vue";
 import StandAloneImg from "./StandAloneImg.vue";
 import generator from "./pages/generator.vue";
 import BtnGroupDouble from "../../../../components/coms/btn/btn-group-double.vue";
+import api from "@api/cockpit/matrix/index.js";
+import BASE from "@tools/basicTool.js";
 export default {
-  components: { collapseList, BaseInfo, Warning, StandAloneImg, generator, BtnGroupDouble },
+  components: {
+    collapseList,
+    BaseInfo,
+    Warning,
+    StandAloneImg,
+    generator,
+    BtnGroupDouble,
+  },
   props: {
     id: {
       type: String,
@@ -134,104 +175,90 @@ export default {
 
     // 获取场列表
     getSimpleMatrixAll(showLoading) {
-      let that = this;
-      that.API.requestData({
-        showLoading,
-        method: "POST",
-        subUrl: "matrix/findSimpleMatrixAll",
-        data: {
-          wpId: that.wpId,
-        },
-        success(res) {
+      api
+        .findSimpleMatrixAll({
+          wpId: this.wtId,
+        })
+        .then((res) => {
+          BASE.closeLoading();
           let WindSites = [];
-		if(that.WindSites.length){
-			res.data.forEach((pEle, pIndex) => {
-				that.WindSites[pIndex].children = [];
-			  pEle.fjls[0].forEach((cEle) => {
-			    that.WindSites[pIndex].children.push({
-			      id: cEle.wtId,
-			      wpId: cEle.wpId,
-			      text: cEle.wtnum,
-			      color: that.getColor(cEle.fjzt),
-			    });
-			  });
-			});
-		}else{
-			res.data.forEach((ele, index) => {
-			  WindSites.push({
-			    id: String(index),
-			    text: ele.wpName,
-			    children: [],
-			  });
-			});
-			res.data.forEach((pEle, pIndex) => {
-			  pEle.fjls[0].forEach((cEle) => {
-			    WindSites[pIndex].children.push({
-			      id: cEle.wtId,
-			      wpId: cEle.wpId,
-			      text: cEle.wtnum,
-			      color: that.getColor(cEle.fjzt),
-			    });
-			  });
-			});
-			that.WindSites = WindSites;
-		}
+          if (this.WindSites.length) {
+            res.data.forEach((pEle, pIndex) => {
+              this.WindSites[pIndex].children = [];
+              pEle.fjls[0].forEach((cEle) => {
+                this.WindSites[pIndex].children.push({
+                  id: cEle.wtId,
+                  wpId: cEle.wpId,
+                  text: cEle.wtId.substring(cEle.wtId.length - 3),
+                  color: this.getColor(cEle.fjzt),
+                });
+              });
+            });
+          } else {
+            res.data.forEach((ele, index) => {
+              WindSites.push({
+                id: String(index),
+                text: ele.wpName,
+                children: [],
+              });
+            });
+            res.data.forEach((pEle, pIndex) => {
+              pEle.fjls[0].forEach((cEle) => {
+                WindSites[pIndex].children.push({
+                  id: cEle.wtId,
+                  wpId: cEle.wpId,
+                  text: cEle.wtId.substring(cEle.wtId.length - 3),
+                  color: this.getColor(cEle.fjzt),
+                });
+              });
+            });
+            this.WindSites = WindSites;
+          }
           if (res.data.length) {
-            that.wtId = that.wtId || res.data[0].fjls[0][0].wtId;
-            that.getWtInfo();
+            this.wtId = this.wtId || res.data[0].fjls[0][0].wtId;
+            this.getWtInfo();
           }
-        },
-      });
+        });
     },
 
     // 获取风机信息
     getWtInfo() {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "monitorwt/findWtInfo",
-        data: {
-          wtId: that.wtId,
-        },
-        success(res) {
-          let map = ['bjmap','fdjmap','clxmap','yymap','phmap','jcmap'];
+      api
+        .findWtInfo({
+          wtId: this.wtId,
+        })
+        .then((res) => {
+          let map = ["bjmap", "fdjmap", "clxmap", "yymap", "phmap", "jcmap"];
           let data = res.data;
-          for(var key in data){
-            if(map.includes(key) && key.endsWith("map")){
+          for (var key in data) {
+            if (map.includes(key) && key.endsWith("map")) {
               let json = data[key];
               let arrayai = [];
               let arraydi = [];
-              for(var i = 0; i < json.length; i++){
+              for (var i = 0; i < json.length; i++) {
                 let obj = {
                   name: json[i][0],
                   unit: json[i][1],
-                  value: json[i][3]
-                }
-                if(json[i][2] == "ai") arrayai.push(obj);
+                  value: json[i][3],
+                };
+                if (json[i][2] == "ai") arrayai.push(obj);
                 else arraydi.push(obj);
               }
-              data[key] = {ai: arrayai, di: arraydi}
-            } 
-          } 
-          that.sourceMap = data;
-          that.getWarnInfo();
-        },
-      });
+              data[key] = { ai: arrayai, di: arraydi };
+            }
+          }
+          this.sourceMap = data;
+          this.getWarnInfo();
+        });
     },
 
     // 获取报警信息
     getWarnInfo() {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "monitorwt/findWtWarnInfo",
-        data: {
-          wtId: that.wtId,
-        },
-        success(res) {
-          that.WarnData = res.data;
-        },
-      });
+      api.findWtWarnInfo({
+        wtId: this.wtId,
+      }).then(res =>{
+        this.WarnData = res.data;
+      })
     },
     // 点击左侧菜单
     clickMenu(res) {
@@ -246,6 +273,7 @@ export default {
     that.wpId = that.$route.params.wpId;
     that.wtId = that.$route.params.wtId;
     that.$nextTick(() => {
+      BASE.showLoading();
       that.requestData(false);
       that.timmer = setInterval(() => {
         that.requestData(false);
@@ -258,7 +286,7 @@ export default {
     this.timmer = null;
   },
 
-  watch:{
+  watch: {
     // "$route"(res){
     //   clearInterval(this.timmer);
     //   this.timmer = null;
@@ -268,7 +296,7 @@ export default {
     //     this.requestData(false);
     //   }, this.$store.state.websocketTimeSec);
     // }
-  }
+  },
 };
 </script>
 

+ 6 - 6
src/views/layout/Menu.vue

@@ -99,11 +99,11 @@ export default {
               icon: "svg-qf-matrix",
               path: "/monitor/lightmatrix2",
             },
-            {
-              text: "光伏矩阵",
-              icon: "svg-gf-matrix",
-              path: "/monitor/lightmatrix",
-            },
+            // {
+            //   text: "光伏矩阵",
+            //   icon: "svg-gf-matrix",
+            //   path: "/monitor/lightmatrix",
+            // },
             {
               text: "状态监视",
               icon: "svg-state-watch",
@@ -117,7 +117,7 @@ export default {
             {
               text: "风场",
               icon: "svg-wind-site",
-              path: "/monitor/windsite/home/MHS_FDC",
+              path: "/monitor/windsite/draughtfanlist/CL_FDC",
             },
           ],
         },