浏览代码

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

# Conflicts:
#	src/router/index.js
shilin 3 年之前
父节点
当前提交
5d8b39d698

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

@@ -11,7 +11,7 @@ if (localTest) {
     baseURL = "http://192.168.10.12:8082/" // 联机调试 - 石林
         // baseURL = "http://10.155.32.33:9001/" // 联机调试 - 谢生杰
 } else {
-    baseURL = "http://10.155.32.4:8082/" // 正式环境
+    baseURL = "http://192.168.10.13:8082/" // 正式环境
 }
 
 websocketUrl = (baseURL.replace(/http:\/\/|https:\/\//g, "")) + "gyee-websocket";

+ 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">

+ 3 - 3
src/router/index.js

@@ -348,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: {
     // 查看健康报告

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

@@ -487,6 +487,7 @@ export default {
 
   created () {
     this.wtId = this.$route.params.wtId;
+    this.wpId = this.$route.params.wpId;
     this.getTop5();
     this.renderDateTable();
     this.getTop10();

+ 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/healthLineChart.vue

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

+ 2 - 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()

+ 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" />