Procházet zdrojové kódy

Merge branch 'yx' into wsy

630 před 3 roky
rodič
revize
6f29113253

+ 2 - 2
public/static/config/modeConfig.js

@@ -1,5 +1,5 @@
 // 本地联调开关
-const localTest = 0;
+const localTest = 1;
 
 // 服务器地址
 let baseURL = null;
@@ -8,7 +8,7 @@ let baseURL = null;
 let websocketUrl = null;
 
 if (localTest) {
-    baseURL = "http://192.168.10.12:8082/" // 联机调试 - 石林
+    baseURL = "http://192.168.10.13:8082/" // 联机调试 - 石林
         // baseURL = "http://10.155.32.33:9001/" // 联机调试 - 谢生杰
 } else {
     baseURL = "http://10.155.32.4:8082/" // 正式环境

+ 1 - 1
src/components/chart/combination/vertival-bar-line-chart.vue

@@ -46,7 +46,7 @@ export default {
     // 单位
     units: {
       type: Array,
-      default: () => ["健康趋势", "风机健康状态数量"],
+      default: () => ["", "风机健康状态数量"],
     },
     // 显示 legend
     showLegend: {

+ 140 - 137
src/components/chart/line/double-line-chart.vue

@@ -1,291 +1,294 @@
 <template>
-  <div class="chart" :id="id"></div>
+  <div class="chart"
+       :id="id"></div>
 </template>
 
 <script>
-import util from "@/helper/util.js";
-import partten from "@/helper/partten.js";
-import * as echarts from "echarts";
+import util from '@/helper/util.js'
+import partten from '@/helper/partten.js'
+import * as echarts from 'echarts'
 
 export default {
-  name: "double-line-chart",
-  componentName: "double-line-chart",
+  name: 'double-line-chart',
+  componentName: 'double-line-chart',
   props: {
     width: {
       type: String,
-      default: "100%",
+      default: '100%'
     },
     height: {
       type: String,
-      default: "13.889vh",
+      default: '13.889vh'
     },
     // 传入数据
     list: {
       type: Array,
       default: () => [
         {
-          title: "绿线",
+          title: '绿线',
           smooth: true,
           value: [
             {
-              text: "",
-              value: 0,
+              text: '',
+              value: 0
             },
             {
-              text: "0:00",
-              value: 20,
+              text: '0:00',
+              value: 20
             },
             {
-              text: "10:00",
-              value: 1,
+              text: '10:00',
+              value: 1
             },
             {
-              text: "11:00",
-              value: 40,
+              text: '11:00',
+              value: 40
             },
             {
-              text: "12:00",
-              value: 10,
+              text: '12:00',
+              value: 10
             },
             {
-              text: "13:00",
-              value: 15,
+              text: '13:00',
+              value: 15
             },
             {
-              text: "14:00",
-              value: 30,
+              text: '14:00',
+              value: 30
             },
             {
-              text: "15:00",
-              value: 40,
+              text: '15:00',
+              value: 40
             },
             {
-              text: "",
-              value: 10,
-            },
-          ],
+              text: '',
+              value: 10
+            }
+          ]
         },
         {
-          title: "黄线",
+          title: '黄线',
           smooth: true,
           value: [
             {
-              text: "",
-              value: 0,
+              text: '',
+              value: 0
             },
             {
-              text: "0:00",
-              value: 40,
+              text: '0:00',
+              value: 40
             },
             {
-              text: "10:00",
-              value: 20,
+              text: '10:00',
+              value: 20
             },
             {
-              text: "11:00",
-              value: 20,
+              text: '11:00',
+              value: 20
             },
             {
-              text: "12:00",
-              value: 10,
+              text: '12:00',
+              value: 10
             },
             {
-              text: "13:00",
-              value: 40,
+              text: '13:00',
+              value: 40
             },
             {
-              text: "14:00",
-              value: 50,
+              text: '14:00',
+              value: 50
             },
             {
-              text: "15:00",
-              value: 40,
+              text: '15:00',
+              value: 40
             },
             {
-              text: "",
-              value: 10,
-            },
-          ],
-        },
-      ],
+              text: '',
+              value: 10
+            }
+          ]
+        }
+      ]
     },
     // 单位
     unit: {
       type: String,
-      default: "",
+      default: ''
     },
     showLegend: {
       type: Boolean,
-      default: false,
-    },
+      default: false
+    }
   },
   data() {
     return {
-      id: "",
+      id: '',
       chart: null,
-      color: ["#05bb4c", "#f8de5b", "#4b55ae", "#fa8c16", "#1DA0D7","#DD5044"],
-      newlist: null,
-    };
+      color: ['#05bb4c', '#f8de5b', '#4b55ae', '#fa8c16', '#1DA0D7', '#DD5044'],
+      newlist: null
+    }
   },
   watch: {
     list: {
       handler(newValue, oldValue) {
-        console.warn(newValue);
-        this.newlist = newValue;
+        console.warn(newValue)
+        this.newlist = newValue
         this.$nextTick(() => {
-          this.initChart();
-        });
+          this.initChart()
+        })
       },
-      deep: true,
-    },
+      deep: true
+    }
   },
   computed: {
     colorValue() {
-      return partten.getColor(this.color);
+      return partten.getColor(this.color)
     },
     datas() {
-      return this.newlist.map((t) => {
-        return t.value;
-      });
+      return this.newlist.map(t => {
+        return t.value
+      })
     },
     legend() {
-      return this.newlist.map((t) => {
-        return t.title;
-      });
+      if (this.newlist) {
+        return this.newlist.map(t => {
+          return t.title
+        })
+      }
     },
     xdata() {
-      return this.newlist[0].value.map((t) => {
-        return t.text;
-      });
+      return this.newlist[0].value.map(t => {
+        return t.text
+      })
     },
     series() {
-      let result = [];
+      let result = []
       this.newlist.forEach((value, index) => {
         result.push({
           name: value.title,
-          type: "line",
+          type: 'line',
           smooth: value.smooth,
           showSymbol: false,
           zlevel: index,
           lineStyle: {
             normal: {
               color: this.color[index],
-              width: 1,
-            },
+              width: 1
+            }
           },
           yAxisIndex: value.yAxisIndex,
-          data: value.value.map((t) => {
-            return t.value;
-          }),
-        });
-      });
+          data: value.value.map(t => {
+            return t.value
+          })
+        })
+      })
 
-      return result;
+      return result
     },
     yAxis() {
-      let result = [];
+      let result = []
       result.push({
-        type: "value",
+        type: 'value',
         name: this.unit,
         axisLabel: {
-          formatter: "{value}",
-          fontSize: util.vh(14),
+          formatter: '{value}',
+          fontSize: util.vh(14)
         },
         boundaryGap: false,
         //分格线
         splitLine: {
-          show: false,
-        },
-      });
-      return result;
-    },
+          show: false
+        }
+      })
+      return result
+    }
   },
   methods: {
     resize() {},
     initChart() {
-      const chart = echarts.init(this.$el);
+      const chart = echarts.init(this.$el)
 
       let option = {
         color: this.color,
         tooltip: {
-          trigger: "axis",
-          backgroundColor: "rgba(0,0,0,0.4)",
-          borderColor: partten.getColor("gray"),
+          trigger: 'axis',
+          backgroundColor: 'rgba(0,0,0,0.4)',
+          borderColor: partten.getColor('gray'),
           textStyle: {
-            color: "#fff",
-            fontSize: util.vh(16),
-          },
+            color: '#fff',
+            fontSize: util.vh(16)
+          }
         },
         legend: {
           show: this.showLegend,
           data: this.legend,
           right: 56,
-          icon: "circle",
+          icon: 'circle',
           itemWidth: 6,
-          inactiveColor: partten.getColor("gray"),
+          inactiveColor: partten.getColor('gray'),
           textStyle: {
-            color: partten.getColor("grayl"),
-            fontSize: 12,
-          },
+            color: partten.getColor('grayl'),
+            fontSize: 12
+          }
         },
         grid: {
           top: 16,
           left: 32,
           right: 8,
-          bottom: 24,
+          bottom: 24
         },
         xAxis: [
           {
-            type: "category",
+            type: 'category',
             boundaryGap: false,
             axisLabel: {
-              formatter: "{value}",
+              formatter: '{value}',
               textStyle: {
-                color: partten.getColor("gray"),
-                fontSize: util.vh(14),
-              },
+                color: partten.getColor('gray'),
+                fontSize: util.vh(14)
+              }
             },
-            data: this.xdata,
-          },
+            data: this.xdata
+          }
         ],
         yAxis: this.yAxis,
-        series: this.series,
-      };
+        series: this.series
+      }
 
-      chart.clear();
-      chart.setOption(option);
+      chart.clear()
+      chart.setOption(option)
 
-      this.resize = function () {
-        chart.resize();
-      };
+      this.resize = function() {
+        chart.resize()
+      }
 
-      window.addEventListener("resize", this.resize);
-    },
+      window.addEventListener('resize', this.resize)
+    }
   },
   created() {
     this.$nextTick(() => {
-      this.id = "pie-chart-" + util.newGUID();
-    });
-    this.newlist = this.list;
-    console.warn(this.list);
-    console.warn(this.newlist);
+      this.id = 'pie-chart-' + util.newGUID()
+    })
+    this.newlist = this.list
+    console.warn(this.list)
+    console.warn(this.newlist)
   },
   mounted() {
     this.$nextTick(() => {
-      this.$el.style.width = this.width;
-      this.$el.style.height = this.height;
-      this.initChart();
-    });
+      this.$el.style.width = this.width
+      this.$el.style.height = this.height
+      this.initChart()
+    })
   },
   updated() {
     this.$nextTick(() => {
-      this.initChart();
-    });
+      this.initChart()
+    })
   },
   unmounted() {
-    window.removeEventListener("resize", this.resize);
-  },
-};
+    window.removeEventListener('resize', this.resize)
+  }
+}
 </script>
 
 <style lang="less">

+ 290 - 0
src/components/chart/line/double-line-chartold.vue

@@ -0,0 +1,290 @@
+<template>
+  <div class="chart"
+       :id="id"></div>
+</template>
+
+<script>
+import util from '@/helper/util.js'
+import partten from '@/helper/partten.js'
+import * as echarts from 'echarts'
+
+export default {
+  name: 'double-line-chart',
+  componentName: 'double-line-chart',
+  props: {
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '13.889vh'
+    },
+    // 传入数据
+    list: {
+      type: Array,
+      default: () => [
+        {
+          title: '绿线',
+          smooth: true,
+          value: [
+            {
+              text: '',
+              value: 0
+            },
+            {
+              text: '0:00',
+              value: 20
+            },
+            {
+              text: '10:00',
+              value: 1
+            },
+            {
+              text: '11:00',
+              value: 40
+            },
+            {
+              text: '12:00',
+              value: 10
+            },
+            {
+              text: '13:00',
+              value: 15
+            },
+            {
+              text: '14:00',
+              value: 30
+            },
+            {
+              text: '15:00',
+              value: 40
+            },
+            {
+              text: '',
+              value: 10
+            }
+          ]
+        },
+        {
+          title: '黄线',
+          smooth: true,
+          value: [
+            {
+              text: '',
+              value: 0
+            },
+            {
+              text: '0:00',
+              value: 40
+            },
+            {
+              text: '10:00',
+              value: 20
+            },
+            {
+              text: '11:00',
+              value: 20
+            },
+            {
+              text: '12:00',
+              value: 10
+            },
+            {
+              text: '13:00',
+              value: 40
+            },
+            {
+              text: '14:00',
+              value: 50
+            },
+            {
+              text: '15:00',
+              value: 40
+            },
+            {
+              text: '',
+              value: 10
+            }
+          ]
+        }
+      ]
+    },
+    // 单位
+    unit: {
+      type: String,
+      default: ''
+    },
+    showLegend: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      id: '',
+      chart: null,
+      color: ['#05bb4c', '#f8de5b', '#4b55ae', '#fa8c16']
+    }
+  },
+  computed: {
+    colorValue() {
+      return partten.getColor(this.color)
+    },
+    datas() {
+      return this.list.map(t => {
+        return t.value
+      })
+    },
+    legend() {
+      if (this.newlist) {
+        return this.newlist.map(t => {
+          return t.title
+        })
+      } else {
+        return ''
+      }
+    },
+    xdata() {
+      if (this.list) {
+        return this.list[0].value.map(t => {
+          return t.text
+        })
+      } else {
+        return ''
+      }
+    },
+    series() {
+      let result = []
+      this.list.forEach((value, index) => {
+        result.push({
+          name: value.title,
+          type: 'line',
+          smooth: value.smooth,
+          showSymbol: false,
+          zlevel: index,
+          lineStyle: {
+            normal: {
+              color: this.color[index],
+              width: 1
+            }
+          },
+          yAxisIndex: value.yAxisIndex,
+          data: value.value.map(t => {
+            return t.value
+          })
+        })
+      })
+
+      return result
+    },
+    yAxis() {
+      let result = []
+      result.push({
+        type: 'value',
+        name: this.unit,
+        axisLabel: {
+          formatter: '{value}',
+          fontSize: util.vh(14)
+        },
+        boundaryGap: false,
+        //分格线
+        splitLine: {
+          show: false
+        }
+      })
+      return result
+    }
+  },
+  methods: {
+    resize() {},
+    initChart() {
+      const chart = echarts.init(this.$el)
+
+      let option = {
+        color: this.color,
+        tooltip: {
+          trigger: 'axis',
+          backgroundColor: 'rgba(0,0,0,0.4)',
+          borderColor: partten.getColor('gray'),
+          textStyle: {
+            color: '#fff',
+            fontSize: util.vh(16)
+          }
+        },
+        legend: {
+          show: this.showLegend,
+          data: this.legend,
+          right: 56,
+          icon: 'circle',
+          itemWidth: 6,
+          inactiveColor: partten.getColor('gray'),
+          textStyle: {
+            color: partten.getColor('grayl'),
+            fontSize: 12
+          }
+        },
+        grid: {
+          top: 16,
+          left: 32,
+          right: 8,
+          bottom: 24
+        },
+        xAxis: [
+          {
+            type: 'category',
+            boundaryGap: false,
+            axisLabel: {
+              formatter: '{value}',
+              textStyle: {
+                color: partten.getColor('gray'),
+                fontSize: util.vh(14)
+              }
+            },
+            data: this.xdata
+          }
+        ],
+        yAxis: this.yAxis,
+        series: this.series
+      }
+
+      chart.clear()
+      chart.setOption(option)
+
+      this.resize = function() {
+        chart.resize()
+      }
+
+      window.addEventListener('resize', this.resize)
+    }
+  },
+  created() {
+    this.$nextTick(() => {
+      this.id = 'pie-chart-' + util.newGUID()
+    })
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.$el.style.width = this.width
+      this.$el.style.height = this.height
+      this.initChart()
+    })
+  },
+  updated() {
+    this.$nextTick(() => {
+      this.initChart()
+    })
+  },
+  unmounted() {
+    window.removeEventListener('resize', this.resize)
+  }
+}
+</script>
+
+<style lang="less">
+.chart {
+  width: 100%;
+  height: 100%;
+  display: inline-block;
+}
+</style>

+ 0 - 1
src/components/chart/line/img-line-chart.vue

@@ -360,7 +360,6 @@ export default {
             fontSize: util.vh(16),
           },
           formatter: function (params) {
-            console.log(params);
             let str = ''
             for (let i = 0; i < params.length; i++) {
               if (params[i].seriesName == "风向") {

+ 8 - 3
src/router/index.js

@@ -215,6 +215,11 @@ const routes = [{
 				component: () => import('../views/windAnalysis/index.vue'),
 			},
 			{
+				path: '/windAnalysis/fx', // 风向
+				name: 'fxzstmain',
+				component: () => import('../views/windAnalysis/fxzstmain.vue'),
+			},
+			{
 				path: 'boosterstation/:wpId', // 升压站
 				component: () =>
 					import( /* webpackChunkName: "boosterstation" */
@@ -343,18 +348,18 @@ const routes = [{
 				component: () =>
 					import("../views/HealthControl/Health0.vue"),
 			}, {
-				path: "/health/health10/:wtId",
+				path: "/health/health10/:wpId/:wtId",
 				name: "health10",
 				component: () =>
 					import( /* webpackChunkName: "health8" */ "../views/HealthControl/Health10.vue"),
 			}, {
-				path: 'healthLineChart/:wtId', // 风机健康趋势
+				path: 'healthLineChart/:wpId/:wtId', // 风机健康趋势
 				component: () =>
 					import( /* webpackChunkName: "healthLineChart" */
 						'../views/HealthControl/healthLineChart.vue'),
 			},
 			{
-				path: 'healthLineChart2/:wtId', // 健康趋势
+				path: 'healthLineChart2/:wpId/:wtId', // 健康趋势
 				component: () =>
 					import( /* webpackChunkName: "healthLineChart2" */
 						'../views/HealthControl/healthLineChart2.vue'),

+ 5 - 2
src/views/Agc/Agc.vue

@@ -90,12 +90,13 @@ export default {
 
     // 请求服务
     requestData(showLoading) {
+      console.log(111111)
       let that = this;
       that.API.requestData({
         showLoading,
         method: "POST",
         subUrl: "genreset/getAgcValues",
-        // timeout: 600000,
+         timeout: 600000,
         success(res) {
           let datas = [];
           if (res.data) {
@@ -139,6 +140,8 @@ export default {
               datas.push(pEle);
             });
             that.datas = datas;
+
+            console.log(2222222,datas)
           } else {
             that.datas = datas;
           }
@@ -153,7 +156,7 @@ export default {
       that.requestData(false);
       that.timmer = setInterval(() => {
         that.requestData(false);
-      }, 10000);
+      }, 60000);
     });
   },
 

+ 18 - 4
src/views/Agc/components/agc-panel.vue

@@ -79,14 +79,14 @@
       </tbody>
     </table>
     <!-- 查看默认实例去除末尾参数 :list 即可 -->
-    <DoubleLineChart v-if="chartType === 'double'" height="13.889vh" :list="chartData"></DoubleLineChart>
-    <MultipleLineChart v-if="chartType === 'multiple'" height="13.889vh" :list="chartData" :hoverType="'axis'"></MultipleLineChart>
+    <DoubleLineChart v-if="chartType === 'double'" height="13.889vh" :list="data.tb || chartData"></DoubleLineChart>
+    <MultipleLineChart v-if="chartType === 'multiple'" height="13.889vh" :list="data.tb || chartData" :hoverType="'axis'"></MultipleLineChart>
   </ComPanel>
 </template>
 
 <script>
 import ComPanel from "@com/coms/panel/panel2.vue";
-import DoubleLineChart from "@com/chart/line/double-line-chart.vue";
+import DoubleLineChart from "@com/chart/line/marker-line-chart.vue";
 import MultipleLineChart from "@com/chart/line/multiple-line-chart.vue";
 export default {
   // 名称
@@ -106,7 +106,11 @@ export default {
     },
     chartData: {
       type: Array,
-      default: [],
+      default: [{
+          title: "",
+          smooth: true,
+          value: []
+      }]
     },
   },
   // 自定义事件
@@ -234,6 +238,11 @@ export default {
   },
   mounted() {
     // 渲染后
+    this.list=this.data || [{
+          title: "",
+          yAxisIndex: 1, // 使用单位
+          value: []
+    }];
   },
   beforeUpdate() {
     // 数据更新前
@@ -241,6 +250,11 @@ export default {
   updated() {
     // 数据更新后
   },
+  watch:{
+    daya(res){
+      this.list=res;
+    }
+  }
 };
 </script>
 

+ 8 - 8
src/views/HealthControl/Health0.vue

@@ -69,7 +69,7 @@
               <div class="fan-code-label font-md gray-l">低频:</div>
               <div class="fan-code-value font-md green">{{stoptypemap && stoptypemap.top3type}}</div>
             </div>
-            <span class="svg-icon svg-icon-white svg-icon-md mg-l-16">
+            <!-- <span class="svg-icon svg-icon-white svg-icon-md mg-l-16">
               <SvgIcon svgid="svg-wind-site"></SvgIcon>
             </span>
             <div class="fan-code bg">
@@ -77,7 +77,7 @@
             </div>
             <div class="fan-code">
               <div class="fan-code-value nm font-md green">{{stoptypemap && stoptypemap.wtscore}}</div>
-            </div>
+            </div> -->
             <button class="btn mg-l-16" type="button"  @click="onClickReport()">
               <i class="el-icon-s-order mg-r-8"></i><span>健康报告</span>
             </button>
@@ -99,9 +99,9 @@
           </el-col>
           <el-col :span="6"></el-col>
           <el-col :span="6"></el-col>
-          <!-- <el-col :span="6">
-            <progress-bar title="风机" name="风机健康度" :progress='partmap && partmap.fj.smsyl' :color="partmap &&color(partmap.fj.jkzt)"></progress-bar>
-          </el-col> -->
+          <el-col :span="6">
+            <progress-bar title="风机" name="风机健康度" :progress='stoptypemap && stoptypemap.wtscore' :color="stoptypemap &&color('05bb4c')"></progress-bar>
+          </el-col>
         </el-row>
         <el-row>
           <el-col :span="6" class="mg-t-16">
@@ -713,9 +713,9 @@ export default {
     };
   },
   created() {
-      this.search()
-        this.wtid = this.$route.params.wtId;
-        this.wpid = this.$route.params.wpId;
+    this.wtid = this.$route.params.wtId;
+    this.wpid = this.$route.params.wpId;
+    this.search()
   },
   methods: {
     // 查看健康报告

+ 188 - 160
src/views/HealthControl/Health10.vue

@@ -13,7 +13,7 @@
       </el-col>
       <el-col :span="12" class="wrong-list">
         <panel :title="'故障信息'" :showLine="false">
-          <div class="data-list" style="display:flex;">
+          <div class="data-list" style="display: flex">
             <Table :data="top10TableLeft" :canScroll="false" />
             <Table :data="top10TableRight" :canScroll="false" />
           </div>
@@ -24,47 +24,56 @@
       <el-col :span="12">
         <panel :title="'八大部件'" :showLine="false">
           <div class="table">
-            <table style="width:100%;" border="0" cellspacing="0">
+            <table style="width: 100%" border="0" cellspacing="0">
               <thead>
                 <tr>
-                  <th rowspan="1" class="type1" style="width:50px;"></th>
-                  <th rowspan="1" class="type1" style="width:105px;">健康度</th>
-                  <th rowspan="2" class="type1" style="width:400px;">
+                  <th rowspan="1" class="type1" style="width: 50px"></th>
+                  <th rowspan="1" class="type1" style="width: 105px">健康度</th>
+                  <th rowspan="2" class="type1" style="width: 400px">
                     MTBF(H/H)
                   </th>
-                  <th rowspan="1" class="type1" style="width:180px;"></th>
-                  <th rowspan="1" class="type1" style="width:100px;">
+                  <th rowspan="1" class="type1" style="width: 180px"></th>
+                  <th rowspan="1" class="type1" style="width: 100px">
                     MTTR(H)
                   </th>
                 </tr>
               </thead>
             </table>
             <el-scrollbar>
-              <div style="height:calc(100vh - 174px);">
-                <table style="width:100%;" border="0" cellspacing="0">
+              <div style="height: calc(100vh - 174px)">
+                <table style="width: 100%" border="0" cellspacing="0">
                   <tbody>
                     <tr v-for="(item, index) of partsArray" :key="index">
-                      <td style="width:50px;">
-                        {{item[1]}}
+                      <td style="width: 50px">
+                        {{ item[1] }}
                       </td>
-                      <td style="width:105px;">
-                        <div :style="'background-color: ' + item[0] + ';width:10px;height:10px;margin:0 auto;'"></div>
+                      <td style="width: 105px">
+                        <div
+                          :style="
+                            'background-color: ' +
+                            item[0] +
+                            ';width:10px;height:10px;margin:0 auto;'
+                          "
+                        ></div>
                       </td>
-                      <td style="width:400px;">
+                      <td style="width: 400px">
                         <div class="percent-item">
-                          {{item[3]}}%
-                          <div class="percent-bar" style="margin-right: 4px;">
-                            <div class="percent-value" :style="'width:' + item[3] +'%'"></div>
+                          {{ item[3] }}%
+                          <div class="percent-bar" style="margin-right: 4px">
+                            <div
+                              class="percent-value"
+                              :style="'width:' + item[3] + '%'"
+                            ></div>
                           </div>
                           <!-- 剩余9999/建个故障9999 -->
-                          {{item[4]}}
+                          {{ item[4] }}
                         </div>
                       </td>
-                      <td style="width:200px;">
+                      <td style="width: 200px">
                         <table-line-chart :height="'20px'" :list="item[8]" />
                       </td>
-                      <td style="width:#00bf4d">
-                        {{item[6]}}
+                      <td style="width: #00bf4d">
+                        {{ item[6] }}
                       </td>
                     </tr>
                   </tbody>
@@ -77,19 +86,42 @@
       <el-col :span="12">
         <div class="chart-title">
           <div class="title-panel" style="">
-            <span style="text-align: left;padding-left: 20px;font-size:12px;">故障信息 </span>
-            <span class="des-title">预计损失电量<span class="num">73824.0</span><span class="unit">Kwh</span></span>
-            <span class="des-title">预计检修时长<span class="num">29.33</span><span class="unit">H</span></span>
+            <span style="text-align: left; padding-left: 20px; font-size: 12px"
+              >故障信息
+            </span>
+            <span class="des-title"
+              >预计损失电量<span class="num">73824.0</span
+              ><span class="unit">Kwh</span></span
+            >
+            <span class="des-title"
+              >预计检修时长<span class="num">29.33</span
+              ><span class="unit">H</span></span
+            >
           </div>
-          <img-line-chart height="270px" :list="line.value" :units="line.units" />
+          <img-line-chart
+            height="270px"
+          />
         </div>
       </el-col>
     </el-row>
     <div class="fc-info mg-b-16">
       <panel :title="'曲线'" :showLine="false">
-        <zoom-line-chart height="35vh" :list="powerChartData.value" :units="powerChartData.units" />
+        <zoom-line-chart
+          height="35vh"
+          :list="powerChartData.value"
+          :units="powerChartData.units"
+        />
       </panel>
     </div>
+    <HealthReport
+      :show="healthReportShow"
+      :params="{ wtId: this.wtId, recorddate: this.recorddate }"
+      @closed="
+        (res) => {
+          this.healthReportShow = false;
+        }
+      "
+    />
   </div>
 </template>
 
@@ -101,18 +133,20 @@ import Table from "../../components/coms/table/table.vue";
 import TableLineChart from "../../components/chart/line/table-line-chart.vue";
 // import StrightLineChart from "../../components/chart/line/stright-line-chart.vue";
 import ImgLineChart from "../../components/chart/line/img-line-chart.vue";
-import ZoomLineChart from '../../components/chart/line/zoom-line-chart.vue';
+import ZoomLineChart from "../../components/chart/line/zoom-line-chart.vue";
+import HealthReport from "@com/other/healthReport/index.vue";
 
 export default {
-  setup () { },
+  setup() {},
   components: {
     Panel,
     Table,
     TableLineChart,
     ImgLineChart,
     ZoomLineChart,
+    HealthReport
   },
-  data () {
+  data() {
     const that = this;
     return {
       top5Table: {
@@ -133,7 +167,7 @@ export default {
             width: "45%",
           },
         ],
-        data: []
+        data: [],
       },
       dateTable: {
         column: [
@@ -151,12 +185,16 @@ export default {
             name: "健康情况",
             field: "",
             width: "30%",
-            template () {
+            template() {
               return "<div style='border: 1px solid #182238;background: #303f6e;width: 70%;margin: 0 auto;color:#FFF;cursor: pointer;'>查看报告</div>";
             },
+            click(e,row) {
+              that.recorddate = row.date;
+              that.healthReportShow = true;
+            },
           },
         ],
-        data: []
+        data: [],
       },
       top10TableLeft: {
         column: [
@@ -167,7 +205,7 @@ export default {
           },
           {
             name: "故障名称",
-            field: "warnDesc"
+            field: "warnDesc",
           },
           {
             name: "故障时间",
@@ -194,7 +232,7 @@ export default {
           },
           {
             name: "故障名称",
-            field: "warnDesc"
+            field: "warnDesc",
           },
           {
             name: "故障时间",
@@ -224,7 +262,11 @@ export default {
             name: "故障名称",
             field: "v1",
             template: function (data) {
-              return "<div style='overflow: hidden;text-overflow:ellipsis;white-space: nowrap;'>" + data + "</div>";
+              return (
+                "<div style='overflow: hidden;text-overflow:ellipsis;white-space: nowrap;'>" +
+                data +
+                "</div>"
+              );
             },
           },
           {
@@ -280,7 +322,7 @@ export default {
         ],
       },
       // 月发电量对比
-      line: {
+      weatherChart: {
         units: ["功率", "风速"],
         value: [
           {
@@ -290,67 +332,67 @@ export default {
               {
                 text: "05-02 00:00",
                 value: 11,
-                weather: 'sun',
+                weather: "sun",
                 direction: "n",
               },
               {
                 text: "05-04 00:00",
                 value: 11,
-                weather: 'rain',
+                weather: "rain",
                 direction: "s",
               },
               {
                 text: "05-06 00:00",
                 value: 13,
-                weather: 'sun',
+                weather: "sun",
                 direction: "w",
               },
               {
                 text: "05-08 00:00",
                 value: 12,
-                weather: 'cloud',
+                weather: "cloud",
                 direction: "e",
               },
               {
                 text: "05-10 00:00",
                 value: 13,
-                weather: 'sun',
+                weather: "sun",
                 direction: "nw",
               },
               {
                 text: "05-12 00:00",
                 value: 12,
-                weather: 'sun',
+                weather: "sun",
                 direction: "ne",
               },
               {
                 text: "05-14 00:00",
                 value: 11,
-                weather: 'cloud',
+                weather: "cloud",
                 direction: "sw",
               },
               {
                 text: "05-16 00:00",
                 value: 11,
-                weather: 'sun',
+                weather: "sun",
                 direction: "se",
               },
               {
                 text: "05-18 00:00",
                 value: 13,
-                weather: 'rain',
+                weather: "rain",
                 direction: "n",
               },
               {
                 text: "05-20 00:00",
                 value: 11,
-                weather: 'cloud',
+                weather: "cloud",
                 direction: "n",
               },
               {
                 text: "05-22 00:00",
                 value: 12,
-                weather: 'sun',
+                weather: "sun",
                 direction: "n",
               },
             ],
@@ -409,102 +451,40 @@ export default {
       },
       powerChartData: {
         units: [""],
-        value: [{
-          title: "",
-          yAxisIndex: 0,
-          value: []
-        }],
-      },
-      line2: {
-        units: ["功率", "风速"],
         value: [
           {
-            title: "应发功率",
+            title: "",
             yAxisIndex: 0,
-            value: [
-              {
-                text: "05-02 00:00",
-                value: 1,
-              },
-              {
-                text: "05-04 00:00",
-                value: 3,
-              },
-              {
-                text: "05-06 00:00",
-                value: 4,
-              },
-              {
-                text: "05-08 00:00",
-                value: 2,
-              },
-              {
-                text: "05-10 00:00",
-                value: 3,
-              },
-              {
-                text: "05-12 00:00",
-                value: 5,
-              },
-              {
-                text: "05-14 00:00",
-                value: 1,
-              },
-              {
-                text: "05-16 00:00",
-                value: 1,
-              },
-              {
-                text: "05-18 00:00",
-                value: 3,
-              },
-              {
-                text: "05-20 00:00",
-                value: 4,
-              },
-              {
-                text: "05-22 00:00",
-                value: 2,
-              },
-              {
-                text: "05-24 00:00",
-                value: 3,
-              },
-              {
-                text: "05-26 00:00",
-                value: 5,
-              },
-              {
-                text: "05-28 00:00",
-                value: 1,
-              },
-            ],
+            value: [],
           },
         ],
       },
+      healthReportShow: false,
     };
   },
 
-  created () {
+  created() {
+    this.wpId = this.$route.params.wpId;
     this.wtId = this.$route.params.wtId;
     this.getTop5();
     this.renderDateTable();
     this.getTop10();
     this.getMtbfByBj();
     this.getFindPowerChar();
+    this.getWeather();
   },
 
   methods: {
     // 获取等级评价
-    getTop5 () {
+    getTop5() {
       let that = this;
       that.API.requestData({
         method: "POST",
         subUrl: "healthsub/gadaytop5",
         data: {
-          wtId: that.wtId
+          wtId: that.wtId,
         },
-        success (res) {
+        success(res) {
           let top5TableData = [];
           let index = 1;
           for (let key in res.data) {
@@ -514,48 +494,54 @@ export default {
               date: ele[1],
               rank: ele[2],
               wpId: ele[3],
-              wtId: ele[4]
+              wtId: ele[4],
             });
             index++;
           }
           that.top5Table.data = top5TableData;
-        }
+        },
       });
     },
 
     // 渲染健康报告表格
-    renderDateTable (day = 5) {
+    renderDateTable(day = 5) {
       let tableData = [];
       for (let i = 0; i < day; i++) {
         tableData.push({
-          index: (i + 1),
-          date: new Date((new Date().getTime() - 3600 * 1000 * 24 * (i + 1))).formatDate("yyyy-MM-dd hh:mm:ss"),
-          wtId: this.wtId
+          index: i + 1,
+          date: new Date(
+            new Date().getTime() - 3600 * 1000 * 24 * (i + 1)
+          ).formatDate("yyyy-MM-dd hh:mm:ss"),
+          wtId: this.wtId,
         });
       }
       this.dateTable.data = tableData;
     },
 
     // 获取等级评价
-    getTop10 () {
+    getTop10() {
       let that = this;
       that.API.requestData({
         method: "POST",
         subUrl: "healthsub/queryStopTop10",
         data: {
-          wtId: that.wtId
+          wtId: that.wtId,
         },
-        success (res) {
+        success(res) {
           let leftData = [];
           let rightData = [];
 
           res.data.forEach((ele, index) => {
             const item = {
-              index: (index + 1),
+              index: index + 1,
               warnDesc: ele.warnDesc,
-              startTime: new Date(ele.startTime).formatDate("yyyy-MM-dd hh:mm:ss"),
-              stopTime: new Date(ele.stopTime).formatDate("yyyy-MM-dd hh:mm:ss"),
-              stopHours: ele.stopHours
+              startTime: new Date(ele.startTime).formatDate(
+                "yyyy-MM-dd hh:mm:ss"
+              ),
+              stopTime: new Date(ele.stopTime).formatDate(
+                "yyyy-MM-dd hh:mm:ss"
+              ),
+              stopHours: ele.stopHours,
             };
             if (index < 5) {
               leftData.push(item);
@@ -566,83 +552,125 @@ export default {
 
           that.top10TableLeft.data = leftData;
           that.top10TableRight.data = rightData;
-        }
+        },
       });
     },
 
     // 获取八大部件
-    getMtbfByBj () {
+    getMtbfByBj() {
       let that = this;
       that.API.requestData({
         method: "POST",
         subUrl: "healthsub/getWtMttrandMtbfByBj",
         data: {
-          wtId: that.wtId
+          wtId: that.wtId,
         },
-        success (res) {
+        success(res) {
           let partsArray = [];
           for (let key in res.data) {
             let linChartData = [];
             res.data[key][2].split(",").forEach((ele, index) => {
               linChartData.push({
-                text: (index + 1),
+                text: index + 1,
                 value: ele,
               });
             });
             res.data[key].push(linChartData);
-            partsArray.push(res.data[key])
+            partsArray.push(res.data[key]);
           }
           that.partsArray = partsArray;
-        }
+        },
       });
     },
 
     // 获取发电曲线
-    getFindPowerChar () {
+    getFindPowerChar() {
       let that = this;
       that.API.requestData({
         method: "POST",
         subUrl: "healthsub/findPowerChar",
-        timeout: 300000,
         data: {
-          wtId: that.wtId
+          wtId: that.wtId,
         },
-        success (res) {
+        success(res) {
           let chartUnits = ["(WM)", "(m/s)"];
-          let chartData = [{
-            title: "理论功率",
-            yAxisIndex: 0,
-            value: []
-          }, {
-            title: "实际功率",
-            yAxisIndex: 0,
-            value: []
-          }, {
-            title: "实时风速",
-            yAxisIndex: 1,
-            value: []
-          }];
+          let chartData = [
+            {
+              title: "理论功率",
+              yAxisIndex: 0,
+              value: [],
+            },
+            {
+              title: "实际功率",
+              yAxisIndex: 0,
+              value: [],
+            },
+            {
+              title: "实时风速",
+              yAxisIndex: 1,
+              value: [],
+            },
+          ];
 
           res.data.timearr.forEach((time, index) => {
             chartData[0].value.push({
               text: new Date(time).formatDate("MM-dd hh:mm"),
-              value: res.data.llgl[index]
+              value: res.data.llgl[index],
             });
             chartData[1].value.push({
               text: new Date(time).formatDate("MM-dd hh:mm"),
-              value: res.data.sjgl[index]
+              value: res.data.sjgl[index],
             });
             chartData[2].value.push({
               text: new Date(time).formatDate("MM-dd hh:mm"),
-              value: res.data.ssfs[index]
+              value: res.data.ssfs[index],
             });
           });
           that.powerChartData.value = chartData;
           that.powerChartData.units = chartUnits;
-        }
+        },
       });
     },
-  }
+
+    // 获取天气信息
+    getWeather() {
+      let that = this;
+      that.API.requestData({
+        method: "POST",
+        subUrl: "healthsub/getWeatherRealDay5Info",
+        data: {
+          wpId: that.wpId,
+        },
+        success(res) {
+          console.log(123123, res);
+          let weatherChart = [];
+
+          let chartUnits = ["(m/s)", "(℃)"];
+          let chartData = [
+            {
+              title: "风速",
+              yAxisIndex: 0,
+              value: [],
+            },
+            {
+              title: "温度",
+              yAxisIndex: 1,
+              value: [],
+            },
+          ];
+
+          res.data.ls.forEach((item) => {
+            chartData[0].value.push({
+              text: "05-02 00:00",
+              value: 11,
+              weather: "sun",
+              direction: "n",
+            });
+          });
+        },
+      });
+    },
+  },
 };
 </script>
 

+ 44 - 38
src/views/HealthControl/Health2.vue

@@ -2,22 +2,19 @@
   <div class="health-2">
     <div class="power-info mg-b-16">
       <div class="info-tab">
-        <div class="tab" :class="type === '2' ? 'active' : ''" @click="changeDate('2')">
+        <div
+          class="tab"
+          v-for="(item, index) in infoList"
+          :key="index"
+          :class="item.active ? 'active' : ''"
+          @click="onClickInfo(item)"
+        >
           <i class="svg-icon svg-icon svg-icon-sm">
-            <svg-icon :svgid="'svg-h-day'" />
+            <svg-icon :svgid="item.svgid" />
           </i>
-          <span> 7日健康趋势 </span>
-        </div>
-        <div class="tab" :class="type === '3' ? 'active' : ''" @click="changeDate('3')">
-          <i class="svg-icon svg-icon svg-icon-sm">
-            <svg-icon :svgid="'svg-h-month'" />
-          </i>
-          <span>30日健康趋势</span>
+          <span> {{ item.title }} </span>
         </div>
         <div class="empty"></div>
-        <!-- <div class="tab">
-          <span>全部风场健康趋势</span>
-        </div> -->
       </div>
       <div class="info-chart">
         <panel class="info-chart-panel" :title="'损失电量分析'">
@@ -104,6 +101,11 @@ export default {
   data() {
     return {
       type: "2",
+      infoList: [
+        // {title: '24小时健康趋势', svgid: 'svg-24-houre', active: false, type: 'houre'},
+        { title: "7日健康趋势", svgid: "svg-h-day", active: true, type: "day" },
+        { title: "30日健康趋势", svgid: "svg-h-month", active: false, type: "month"},
+      ],
       bardata: {
         area: [],
         legend: [],
@@ -149,43 +151,46 @@ export default {
     };
   },
   created() {
-    this.requestData();
+    this.requestCoulometry(2);
     this.getAllMap();
   },
 
   methods: {
+    // 未确认缺陷按钮下的健康趋势选项
+    onClickInfo(item) {
+      this.infoList.forEach((element) => {
+        if (item.type == element.type) {
+          item.active = true;
+          switch (item.type) {
+            case "day":
+              this.requestCoulometry(2);
+              break;
+            case "month":
+              this.requestCoulometry(3);
+          }
+        } else {
+          element.active = false;
+        }
+      });
+    },
     // 获取顶部柱状图数据
-    requestData() {
+    // 损失电量分析  type:1 表示24小时健康趋势,2 表示七天健康趋势 3 表示30天健康趋势
+    requestCoulometry(type) {
       let that = this;
       that.API.requestData({
         method: "POST",
+        timeout: 8000,
         subUrl: "recommen/findAllChartjz",
-        data: {
-          wpId: "0",
-          type: that.type,
-        },
+        data: { wpId: 0, type: type },
         success(res) {
-          // 顶部图表绿线
-          let lineData = res.data.lvchart;
-
-          let area = res.data.datechart;
-          let legend = ["优数量", "良数量", "差数量"];
-          let data = [];
-
-          let dataLength = res.data.datechart.length;
-
-          for (let i = 0; i < dataLength; i++) {
-            data.push([res.data.yslchart[i], res.data.lslchart[i], res.data.cslchart[i]]);
+          if (res.code == 200) {
+            that.bardata.legend = ["优数量", "良数量", "差数量"];
+            that.lineData = res.data.lvchart;
+            that.bardata.area = res.data.datechart;
+            that.bardata.data[2] = res.data.cslchart;
+            that.bardata.data[1] = res.data.lslchart;
+            that.bardata.data[0] = res.data.yslchart;
           }
-
-          let bardata = {
-            area,
-            legend,
-            data,
-          };
-
-          that.bardata = bardata;
-          that.lineData = lineData;
         },
       });
     },
@@ -194,6 +199,7 @@ export default {
       let that = this;
       that.API.requestData({
         method: "POST",
+        timeout: 8000,
         subUrl: "healthmain/findAllMap",
         success(res) {
           res.data.wpmap.forEach((ele) => {

+ 3 - 1
src/views/HealthControl/Health4.vue

@@ -31,6 +31,7 @@ export default {
   data() {
     return {
       activeIndex:0,
+      wpId:"",
       wtId:"",
       menuDatas: [{
         icon: "svg-agc",
@@ -50,8 +51,9 @@ export default {
 
   created() {
    this.wtId = this.$route.params.wtId;
+   this.wpId = this.$route.params.wpId;
    this.menuDatas.forEach(ele=>{
-     ele.path += ('/'+this.wtId);
+     ele.path += ('/'+this.wpId + '/'+this.wtId);
    });
   },
   

+ 1 - 1
src/views/HealthControl/Health5.vue

@@ -89,7 +89,7 @@ export default {
     },
     // 跳转按钮
     onClickJump(item){
-      console.warn(item);
+      // console.warn(item);
        this.$router.push({
         path: `/health/health0/${item.wpId}/${item.wtId}`
       });

+ 1 - 0
src/views/HealthControl/HealthTab1.vue

@@ -201,6 +201,7 @@ export default {
       let that = this;
       that.API.requestData({
         method: "POST",
+        timeout: 8000,
         subUrl: "recommen/findAllChartjz",
         data: { wpId: 0, type: type },
         success(res) {

+ 1 - 0
src/views/HealthControl/HealthTab2.vue

@@ -90,6 +90,7 @@ export default {
       let that = this;
       that.API.requestData({
         method: "POST",
+        timeout: 8000,
         subUrl: "recommen/findAllChartjz",
         data: { wpId: 0, type: type },
         success(res) {

+ 1 - 0
src/views/HealthControl/healthLineChart.vue

@@ -17,6 +17,7 @@ export default {
 
   created() {
     this.wtId = this.$route.params.wtId;
+    this.wpId = this.$route.params.wpId;
     this.requestData();
   },
   

+ 3 - 0
src/views/HealthControl/healthLineChart2.vue

@@ -69,11 +69,13 @@ export default {
       bardata: { area: [], legend: [], data: [] }, // 损失电量分析echart数值
       lineData: [],
       wtId: undefined,
+      wpId: undefined,
       hisValue: {},  //健康走势图
     };
   },
   created() {
     this.wtId = this.$route.params.wtId;
+    this.wpId = this.$route.params.wpId;
     this.requestCoulometry(2)
     this.requestHisValue()
     this.requestMttrrand()
@@ -101,6 +103,7 @@ export default {
       let that = this;
       that.API.requestData({
         method: "POST",
+        timeout: 8000,
         subUrl: "recommen/findAllChartjz",
         data: { wpId: 0, type: type },
         success(res) {

+ 1 - 1
src/views/NewPages/dj1.vue

@@ -472,7 +472,7 @@ import RadarChart from "../../components/chart/radar/radar-chart.vue";
 import panel from "../../components/coms/panel/panel.vue";
 import Table from "../../components/coms/table/table.vue";
 export default {
-  components: { panel, AreaBarChart, MultipleBarLineChart, Table, MarkerLineChart, DirectionRadarChart, DualPieChart, RadarChart },
+  components: { panel, AreaLineChart, MultipleBarLineChart, Table, MarkerLineChart, DirectionRadarChart, DualPieChart, RadarChart },
   setup() {},
   data() {
     return {

+ 2 - 2
src/views/WindSite/pages/BoosterStation.vue

@@ -56,8 +56,8 @@ export default {
   methods: {
     select(res) {
       this.$router.replace({
-        path: `/monitor/windsite/boosterstation/${res.code}`,
-      });
+      path: `/monitor/windsite/boosterstation/${res.code}`,
+    });
     },
     getWp() {
       let that = this;

+ 1 - 0
src/views/WindSite/pages/GeneralAppearance.vue

@@ -18,6 +18,7 @@
           <img src="../../../assets/map/fan/black.png" />
           <span class="sub-title gray">接入台数</span>
           <span class="sub-count font-num white">{{wpnumMap.jrts}}</span>
+          
         </div>
         <div class="sub-title-item">
           <img src="../../../assets/map/fan/green.png" />

+ 1 - 1
src/views/WindSite/pages/Home/Home.vue

@@ -700,7 +700,7 @@ export default {
       that.requestMonthPower(false);
       that.timmer = setInterval(() => {
         that.requestData(false);
-      }, that.$store.state.websocketTimeSec);
+      }, 60000);
       that.timmer2 = setInterval(() => {
         that.nowTime = new Date().formatDate("hh:mm:ss");
       }, 1000);

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

@@ -238,7 +238,7 @@ export default {
                 }, {
                   text: "风资源风向",
                   icon: "svg-wind-site",
-                  path: "/windAnalysis",
+                  path: "/windAnalysis/fx",
                 },
               ],
             },