Преглед на файлове

单机信息总览详情上传

yangxiao преди 3 години
родител
ревизия
70be6f14d3

+ 5 - 6
public/static/config/modeConfig.js

@@ -1,4 +1,3 @@
-
 // 本地联调开关
 const localTest = 0;
 
@@ -9,15 +8,15 @@ let baseURL = null;
 let websocketUrl = null;
 
 if (localTest) {
-  baseURL = "http://192.168.10.23:8082/" // 联机调试 - 石林
-  // baseURL = "http://10.155.32.33:9001/" // 联机调试 - 谢生杰
+    baseURL = "http://192.168.10.12:8082/" // 联机调试 - 石林
+        // baseURL = "http://10.155.32.33:9001/" // 联机调试 - 谢生杰
 } else {
-  baseURL = "http://10.155.32.4:8082/" // 正式环境
+    baseURL = "http://10.155.32.4:8082/" // 正式环境
 }
 
 websocketUrl = (baseURL.replace(/http:\/\/|https:\/\//g, "")) + "gyee-websocket";
 
 window.__MODE__ = {
-  baseURL,
-  websocketUrl
+    baseURL,
+    websocketUrl
 };

+ 29 - 27
src/components/chart/combination/area-bar-chart.vue

@@ -41,7 +41,7 @@ export default {
     },
     lineData: {
       type: Array,
-      default: () => [200, 350, 400, 500, 600, 700, 800, 900, 1200],
+      default: () => [[200, 350, 400, 500, 600, 700, 800, 900, 1200]],
     },
     areaData: {
       type: Array,
@@ -88,23 +88,23 @@ export default {
       default: () => ["#323E6F", "#1DA0D7", "#02BB4C", "#DB5520", "#EDB32F", "#EDEB2F"],
     },
   },
-  data() {
+  data () {
     return {
       id: "",
       chart: null,
     };
   },
   computed: {
-    legend() {
+    legend () {
       let data = this.bardata.legend;
       data.push(this.units[0]);
       return data;
     },
-    areaChartData() {
+    areaChartData () {
       let data = [];
       for (var i = 0; i < this.areaData.length; i++) {
         let item = this.areaData[i];
-        var color = partten.getColor(item.state);
+        var color = (item.color ? item.color : partten.getColor(item.state));
         data.push({
           name: item.name,
           value: [item.start, item.end, item.end - item.start],
@@ -120,7 +120,7 @@ export default {
     },
   },
   methods: {
-    renderItem(params, api) {
+    renderItem (params, api) {
       var start = api.coord([api.value(0)]);
       var end = api.coord([api.value(1)]);
       var height = api.size([0, 1])[1];
@@ -149,7 +149,7 @@ export default {
         }
       );
     },
-    initChart() {
+    initChart () {
       let that = this;
       let chart = echarts.init(this.$el);
 
@@ -203,7 +203,7 @@ export default {
             min: 0,
             axisLabel: {
               show: false,
-              formatter: function(val) {
+              formatter: function (val) {
                 return Math.max(0, val - 0) + " ms";
               },
             },
@@ -254,7 +254,7 @@ export default {
             },
           },
           {
-            data: [this.areaData[0].name],
+            data: [(this.areaData && this.areaData[0] && this.areaData[0].name || "")],
             axisLabel: { show: false },
           },
         ],
@@ -262,19 +262,21 @@ export default {
       };
 
       // line data
-      if (this.lineData.length > 0) {
-        option.series.push({
-          name: this.units[0],
-          type: "line",
-          data: this.lineData,
-          smooth: true, //平滑展示
-          yAxisIndex: 0,
-          lineStyle: {
-            color: partten.getColor("green"),
-          },
-          itemStyle: {
-            color: partten.getColor("green"),
-          },
+      if (this.lineData.length) {
+        this.lineData.forEach((ele, index) => {
+          option.series.push({
+            name: this.units[index] || this.units[0] || "",
+            type: "line",
+            data: ele,
+            smooth: true, //平滑展示
+            yAxisIndex: 0,
+            lineStyle: {
+              color: this.color[index]
+            },
+            itemStyle: {
+              color: this.color[index]
+            }
+          });
         });
       }
 
@@ -306,7 +308,7 @@ export default {
           },
           tooltip: {
             show: true,
-            formatter: function(params) {
+            formatter: function (params) {
               return params.marker + params.name + ": " + params.value[2] + "s";
             },
           },
@@ -320,7 +322,7 @@ export default {
 
       chart.setOption(option);
 
-      chart.on("click", function(e, p) {
+      chart.on("click", function (e, p) {
         if (e.seriesType == "custom") {
           that.$emit("areaClick", { data: e.data.exData });
         }
@@ -330,17 +332,17 @@ export default {
   emits: {
     areaClick: null,
   },
-  created() {
+  created () {
     this.id = "pie-chart-" + util.newGUID();
   },
-  mounted() {
+  mounted () {
     this.$nextTick(() => {
       this.$el.style.width = this.width;
       this.$el.style.height = this.height;
       this.initChart();
     });
   },
-  updated() {
+  updated () {
     this.$nextTick(() => {
       this.initChart();
     });

+ 34 - 34
src/components/chart/line/marker-line-chart.vue

@@ -160,40 +160,40 @@ export default {
               width: 1,
             },
           },
-          markPoint:
-            index == 0
-              ? {
-                  data: [
-                    {
-                      type: "average",
-                      name: "保证功率",
-                      symbolSize: 0,
-                      label: {
-                        offset: [0, -40],
-                        formatter: function(param) {
-                          return `{title|${param.name}}` + "\n" + `{value| ${param.value}${that.unit}}`;
-                        },
-                        backgroundColor: partten.getColor("green") + 33,
-                        borderColor: partten.getColor("green"),
-                        borderWidth: 0.5,
-                        borderRadius: 2,
-                        padding: 8,
-                        rich: {
-                          title: {
-                            color: partten.getColor("green"),
-                            fontSize: 12,
-                          },
-                          value: {
-                            color: "#fff",
-                            fontSize: 16,
-                            padding: [12, 0, 0, -4],
-                          },
-                        },
-                      },
-                    },
-                  ],
-                }
-              : {},
+          markPoint:{},
+            // index == 0
+            //   ? {
+            //       data: [
+            //         {
+            //           type: "average",
+            //           name: "保证功率",
+            //           symbolSize: 0,
+            //           label: {
+            //             offset: [0, -40],
+            //             formatter: function(param) {
+            //               return `{title|${param.name}}` + "\n" + `{value| ${param.value}${that.unit}}`;
+            //             },
+            //             backgroundColor: partten.getColor("green") + 33,
+            //             borderColor: partten.getColor("green"),
+            //             borderWidth: 0.5,
+            //             borderRadius: 2,
+            //             padding: 8,
+            //             rich: {
+            //               title: {
+            //                 color: partten.getColor("green"),
+            //                 fontSize: 12,
+            //               },
+            //               value: {
+            //                 color: "#fff",
+            //                 fontSize: 16,
+            //                 padding: [12, 0, 0, -4],
+            //               },
+            //             },
+            //           },
+            //         },
+            //       ],
+            //     }
+            //   : {},
           yAxisIndex: value.yAxisIndex,
           data: value.value.map((t) => {
             return t.value;

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

@@ -13,7 +13,7 @@
           <td
             v-for="(col, i) of data.column"
             :key="i"
-            :style="{ width: col.width }"
+            :style="{ width: col.width, color: row.color }"
             :class="{ light: hoverRow == row || hoverCol == col, num: col.is_num, 'always-light': col.is_light || row.is_light }"
             @mouseenter="hover(row, col)"
             @mouseleave="leave()"

+ 471 - 473
src/router/index.js

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

+ 5 - 1
src/views/HealthControl/HealthTab4.vue

@@ -88,6 +88,7 @@
 import InfoHistory from "./infotrack2.vue";
 import ComTable from "@com/coms/table/table.vue";
 import SvgIcon from "../../components/coms/icon/svg-icon.vue";
+import { warn } from '@vue/runtime-core';
 
 export default {
   components: { InfoHistory, ComTable, SvgIcon },
@@ -162,8 +163,9 @@ export default {
     },
     // 消缺跟踪
     onClickTrack(row){
-      this.dialogVisible = true
+      console.warn('onClickTrack');
       this.requestTrack(row);
+      
     },
     // 历史查询
     onClickHistory(row){
@@ -239,6 +241,8 @@ export default {
         success(res) {
           if (res.code == 200) {
             that.trackDate = res.data
+            console.warn(that.trackDate);
+            that.dialogVisible = true
           }
         },
       });

+ 39 - 11
src/views/HealthControl/defect-elimination-tracking.vue

@@ -13,11 +13,11 @@
         <div class="info-form-box">
           <div class="info-form">
             <div class="info-form-label">检修人员:</div>
-            <div class="info-form-value">王义波</div>
+            <div class="info-form-value">{{formdata.workleader}}</div>
           </div>
           <div class="info-form">
             <div class="info-form-label">收缩血压:</div>
-            <div class="info-form-value">0</div>
+            <div class="info-form-value">{{infoss.SSXY}}</div>
           </div>
         </div>
       </div>
@@ -25,11 +25,11 @@
         <div class="info-form-box">
           <div class="info-form">
             <div class="info-form-label">工作时长:</div>
-            <div class="info-form-value">76.0分钟</div>
+            <div class="info-form-value">{{formdata.qxclsc}}</div>
           </div>
           <div class="info-form">
             <div class="info-form-label">舒张血压:</div>
-            <div class="info-form-value">0</div>
+            <div class="info-form-value">{{infoss.SZXY}}</div>
           </div>
         </div>
       </div>
@@ -41,7 +41,7 @@
           </div>
           <div class="info-form">
             <div class="info-form-label">心跳频率:</div>
-            <div class="info-form-value">0</div>
+            <div class="info-form-value">{{infoss.XTPL}}</div>
           </div>
         </div>
       </div>
@@ -49,18 +49,18 @@
         <div class="info-form-box">
           <div class="info-form">
             <div class="info-form-label">疲劳度:</div>
-            <div class="info-form-value">0</div>
+            <div class="info-form-value">正常</div>
           </div>
           <div class="info-form">
             <div class="info-form-label">血压:</div>
-            <div class="info-form-value">0</div>
+            <div class="info-form-value">{{infoss.SZXY}}</div>
           </div>
         </div>
       </div>
     </div>
     <div class="det-chart-title">检修人员健康情况</div>
     <div class="det-chart-sub-title">工作期间检测值</div>
-    <normal-line-chart class="det-chart" height="21.296vh" :showLegend="true" />
+    <normal-line-chart :list='infols' class="det-chart" height="21.296vh" :showLegend="true" />
     <div class="det-chart-sub-title-big">专业技能:</div>
     <div class="det-chart-sub-title">电力类,机电类</div>
   </div>
@@ -79,6 +79,8 @@ export default {
     return {
       showMe: false,
       header: require("@assets/logo.png"),
+      infoss:'',    //msg
+      infols:'',    //chart
     };
   },
   created(){
@@ -88,8 +90,8 @@ export default {
   // 函数
   methods: {
     async search() {
-      const { data } = await this.API.requestData({
-        subUrl: "/recommen/findShbraceletList",
+      const {data} = await this.API.requestData({
+        subUrl: "recommen/findShbraceletList",
         method: "POST", 
         data:{
           name : this.formdata.workleader,
@@ -97,7 +99,33 @@ export default {
           endDate : this.formdata.checktime,
         }
       });
-      console.warn(data);
+      console.warn(data.data);
+      this.infoss = data.data.ss
+      let ls = data.data.ls
+      this.infols=[];
+      for(let i in ls){
+        let obj ={
+          title: i,
+          yAxisIndex: 0,
+          value:[]
+        }
+        for(let k in ls[i]){
+          let obj1 = {
+            text: new Date(ls[i][k].pointTime * 1000).formatDate("yyyy-MM-dd hh:mm:ss"),
+            value:ls[i][k].pointValue
+          }
+          obj.value.push(obj1)
+        }
+        this.infols.push(obj)
+      }
+      // let obj = {
+      //   title: "日发电量",
+      //   yAxisIndex: 0,
+      //   value:[
+
+      //   ]
+      // }
+      // this.infols = data.data.ls
     },
     show: function () {
       this.showMe = true;

+ 18 - 25
src/views/HealthControl/infotrack.vue

@@ -292,6 +292,24 @@ export default {
      this.form = this.formdata;
      console.warn(this.form);
      console.warn(this.statu(this.form));
+     this.form.tjss = this.form.tjss
+        ? new Date(this.form.tjss).formatDate("yyyy-MM-dd hh:mm:ss")
+        : null;
+      this.form.prodtdepttime = this.form.prodtdepttime
+        ? new Date(this.form.prodtdepttime).formatDate("yyyy-MM-dd hh:mm:ss")
+        : null;
+      this.form.departuretime = this.form.departuretime
+        ? new Date(this.form.departuretime).formatDate("yyyy-MM-dd hh:mm:ss")
+        : null;
+      this.form.arrivaltime = this.form.arrivaltime
+        ? new Date(this.form.arrivaltime).formatDate("yyyy-MM-dd hh:mm:ss")
+        : null;
+      this.form.repairedtime = this.form.repairedtime
+        ? new Date(this.form.repairedtime).formatDate("yyyy-MM-dd hh:mm:ss")
+        : null;
+      this.form.checktime = this.form.checktime
+        ? new Date(this.form.checktime).formatDate("yyyy-MM-dd hh:mm:ss")
+        : null;
   },
   // 函数
   methods: {
@@ -328,31 +346,6 @@ export default {
       }
     },
   },
-  watch: {
-    data(value) {
-      // this.form = value;
-      // console.warn(this.statu(value));
-      // console.warn(this.form);
-      this.form.tjss = value.tjss
-        ? new Date(value.tjss).formatDate("yyyy-MM-dd hh:mm:ss")
-        : "";
-      this.form.prodtdepttime = value.prodtdepttime
-        ? new Date(value.prodtdepttime).formatDate("yyyy-MM-dd hh:mm:ss")
-        : "";
-      this.form.departuretime = value.departuretime
-        ? new Date(value.departuretime).formatDate("yyyy-MM-dd hh:mm:ss")
-        : "";
-      this.form.arrivaltime = value.arrivaltime
-        ? new Date(value.arrivaltime).formatDate("yyyy-MM-dd hh:mm:ss")
-        : "";
-      this.form.repairedtime = value.repairedtime
-        ? new Date(value.repairedtime).formatDate("yyyy-MM-dd hh:mm:ss")
-        : "";
-      this.form.checktime = value.checktime
-        ? new Date(value.checktime).formatDate("yyyy-MM-dd hh:mm:ss")
-        : "";
-    },
-  },
 };
 </script>
 

+ 348 - 102
src/views/HealthControl/infotrack2.vue

@@ -1,9 +1,13 @@
 <template>
   <div class="track-info">
     <div class="form-info">
-       <div class="work-flow">
+      <div class="work-flow">
         <div class="work-flow-line"></div>
-        <div :class="['work-flow-item', item.name == statu(form) ? 'active' : '']" v-for="(item, i) in svgarr" :key="i">
+        <div
+          :class="['work-flow-item', item.name == statu(form) ? 'active' : '']"
+          v-for="(item, i) in svgarr"
+          :key="i"
+        >
           <div class="work-flow-icon-item">
             <div class="work-flow-icon-o"></div>
             <div class="work-flow-icon-i"></div>
@@ -14,7 +18,7 @@
           <div class="work-flow-text">{{ item.name }}</div>
         </div>
       </div>
-       <div class="form-body">
+      <div class="form-body">
         <el-form ref="form" :model="form" label-width="120px">
           <el-row>
             <el-col :span="12">
@@ -27,10 +31,7 @@
             </el-col>
             <el-col :span="12">
               <el-form-item label="风机:">
-                <el-input
-                  v-model="form.wtId"
-                  placeholder="风机名称"
-                ></el-input>
+                <el-input v-model="form.wtId" placeholder="风机名称"></el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -180,71 +181,244 @@
       <div class="white">评价</div>
       <div class="evaluate-item">
         <div class="evaluate-label">任务分配时长</div>
-        <el-input-number class="input-number" v-model="form.rwfpsc" :controls="false" controls-position="right" :min="0" :max="1000"></el-input-number>
+        <el-input-number
+          class="input-number"
+          v-model="form.rwfpsc"
+          :controls="false"
+          controls-position="right"
+          :min="0"
+          :max="1000"
+        ></el-input-number>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">任务分配平均时长</div>
-        <el-input-number class="input-number" v-model="form.rwfppjsc" :controls="false" controls-position="right" :min="0" :max="1000"></el-input-number>
+        <el-input-number
+          class="input-number"
+          v-model="form.rwfppjsc"
+          :controls="false"
+          controls-position="right"
+          :min="0"
+          :max="1000"
+        ></el-input-number>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">到达现场时长</div>
-        <el-input-number class="input-number" v-model="form.ddxcsc" :controls="false" controls-position="right" :min="0" :max="1000"></el-input-number>
+        <el-input-number
+          class="input-number"
+          v-model="form.ddxcsc"
+          :controls="false"
+          controls-position="right"
+          :min="0"
+          :max="1000"
+        ></el-input-number>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">到达现场平均时长</div>
-        <el-input-number class="input-number" v-model="form.ddxcpjsc" :controls="false" controls-position="right" :min="0" :max="1000"></el-input-number>
+        <el-input-number
+          class="input-number"
+          v-model="form.ddxcpjsc"
+          :controls="false"
+          controls-position="right"
+          :min="0"
+          :max="1000"
+        ></el-input-number>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">缺陷处理时长</div>
-        <el-input-number class="input-number" v-model="form.qxclsc" :controls="false" controls-position="right" :min="0" :max="1000"></el-input-number>
+        <el-input-number
+          class="input-number"
+          v-model="form.qxclsc"
+          :controls="false"
+          controls-position="right"
+          :min="0"
+          :max="1000"
+        ></el-input-number>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">缺陷处理平均时长</div>
-        <el-input-number class="input-number" v-model="form.qxclpjsc" :controls="false" controls-position="right" :min="0" :max="1000"></el-input-number>
+        <el-input-number
+          class="input-number"
+          v-model="form.qxclpjsc"
+          :controls="false"
+          controls-position="right"
+          :min="0"
+          :max="1000"
+        ></el-input-number>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">验收时长</div>
-        <el-input-number class="input-number" v-model="form.yssc" :controls="false" controls-position="right" :min="0" :max="1000"></el-input-number>
+        <el-input-number
+          class="input-number"
+          v-model="form.yssc"
+          :controls="false"
+          controls-position="right"
+          :min="0"
+          :max="1000"
+        ></el-input-number>
         <div class="evaluate-unit">min</div>
       </div>
       <div class="evaluate-item">
         <div class="evaluate-label">验收平均时长</div>
-        <el-input-number class="input-number" v-model="form.yspjsc" :controls="false" controls-position="right" :min="0" :max="1000"></el-input-number>
+        <el-input-number
+          class="input-number"
+          v-model="form.yspjsc"
+          :controls="false"
+          controls-position="right"
+          :min="0"
+          :max="1000"
+        ></el-input-number>
         <div class="evaluate-unit">min</div>
       </div>
     </div>
     <div class="tabs">
       <div class="tab-box">
-        <div class="tab-item" v-for="(tab, index) of tabs" :key="index" :class="{ active: activeTab == index }" @click="selectTab(index)">
-          <span class="svg-icon svg-icon-md" :class="activeTab == index ? 'svg-icon-green' : 'svg-icon-write'">
+        <div
+          class="tab-item"
+          v-for="(tab, index) of tabs"
+          :key="index"
+          :class="{ active: activeTab == index }"
+          @click="selectTab(tab,index)"
+        >
+          <span
+            class="svg-icon svg-icon-md"
+            :class="activeTab == index ? 'svg-icon-green' : 'svg-icon-write'"
+          >
             <SvgIcon :svgid="tab.icon"></SvgIcon>
           </span>
           <span>{{ tab.text }}</span>
         </div>
       </div>
     </div>
-    <defect-elimination-tracking ref="det" :show="false" :formdata='formdata'></defect-elimination-tracking>
+    <defect-elimination-tracking
+      ref="det"
+      :show="false"
+      :formdata="formdata"
+    ></defect-elimination-tracking>
+  <div class="dialog-box">  
+    <el-dialog
+      title="消缺历史"
+      v-model="dialogVisible"
+       width="1200px" height='800px' custom-class="modal" :close-on-click-modal="false"
+      :before-close="handleClose"
+    >
+    <div class="diamain">
+      <div class="left">
+        <el-tree
+        :data="data"
+        :props="defaultProps"
+        node-key="id"
+        :default-expand-all="true"
+        custom-class="modal" 
+        @node-click="handleNodeClick"
+      ></el-tree>
+      </div>
+      <div class="right">
+        <div class="table-box">
+        <ComTable :data="tableData" height="700px"></ComTable>
+      </div>
+      </div>
+    </div>
+    </el-dialog>
+     </div> 
   </div>
 </template>
 
 <script>
+import ComTable from "@com/coms/table/table.vue";
 import SvgIcon from "@com/coms/icon/svg-icon.vue";
-import DefectEliminationTracking from "../HealthControl/defect-elimination-tracking.vue";  //手环监控
+import DefectEliminationTracking from "../HealthControl/defect-elimination-tracking.vue"; //手环监控
 export default {
   components: {
-    SvgIcon,DefectEliminationTracking
+    SvgIcon,ComTable,
+    DefectEliminationTracking,
   },
-   props: {
-    data: Object,
+  props: {
+    formdata: Object,
   },
   data() {
     return {
+      location:'',
+      tableData:{
+          column: [
+          { 
+            name: "消缺描述",
+            field: "xqms",
+            is_light: false
+          },
+          { 
+            name: "消缺人员",
+            field: "xqry",
+            is_light: false
+          },
+          { 
+            name: "消缺时间",
+            field: "xqsj",
+            is_light: false
+          },
+          { 
+            name: "更换部件",
+            field: "ghbj",
+            is_light: false
+          },
+          { 
+            name: "更换原因",
+            field: "ghyy",
+            is_light: false
+          },
+          { 
+            name: "更换数量",
+            field: "ghsl",
+            is_light: false
+          },
+        ],
+        data: [],
+      },
+       data: [{
+          label: '一级 1',
+          children: [{
+            label: '二级 1-1',
+            children: [{
+              label: '三级 1-1-1'
+            }]
+          }]
+        }, {
+          label: '一级 2',
+          children: [{
+            label: '二级 2-1',
+            children: [{
+              label: '三级 2-1-1'
+            }]
+          }, {
+            label: '二级 2-2',
+            children: [{
+              label: '三级 2-2-1'
+            }]
+          }]
+        }, {
+          label: '一级 3',
+          children: [{
+            label: '二级 3-1',
+            children: [{
+              label: '三级 3-1-1'
+            }]
+          }, {
+            label: '二级 3-2',
+            children: [{
+              label: '三级 3-2-1'
+            }]
+          }]
+        }],
+        defaultProps: {
+          children: 'children',
+          label: 'label'
+        },
+      dialogVisible:false,
       tabs: [
         {
           icon: "svg-gis",
@@ -258,6 +432,10 @@ export default {
           icon: "svg-jk",
           text: "监控视频",
         },
+        {
+          icon: "svg-jk",
+          text: "消缺历史",
+        },
       ],
       activeTab: 0,
       svgarr: [
@@ -327,22 +505,44 @@ export default {
         qxclpjsc: 0,
         yssc: 0,
         yspjsc: 0,
-        workHours: 0
+        workHours: 0,
       },
     };
   },
   created() {
-     this.form = this.formdata;
-     console.warn(this.form);
-     console.warn(this.statu(this.form));
-  },
-  mounted() {
-    this.$nextTick(() => {
-      this.form = this.data;
-    });
+    this.form = this.formdata;
+    console.warn(this.form);
+    console.warn(this.statu(this.form));
+    this.form.tjss = this.form.tjss
+      ? new Date(this.form.tjss).formatDate("yyyy-MM-dd hh:mm:ss")
+      : null;
+    this.form.prodtdepttime = this.form.prodtdepttime
+      ? new Date(this.form.prodtdepttime).formatDate("yyyy-MM-dd hh:mm:ss")
+      : null;
+    this.form.departuretime = this.form.departuretime
+      ? new Date(this.form.departuretime).formatDate("yyyy-MM-dd hh:mm:ss")
+      : null;
+    this.form.arrivaltime = this.form.arrivaltime
+      ? new Date(this.form.arrivaltime).formatDate("yyyy-MM-dd hh:mm:ss")
+      : null;
+    this.form.repairedtime = this.form.repairedtime
+      ? new Date(this.form.repairedtime).formatDate("yyyy-MM-dd hh:mm:ss")
+      : null;
+    this.form.checktime = this.form.checktime
+      ? new Date(this.form.checktime).formatDate("yyyy-MM-dd hh:mm:ss")
+      : null;
   },
+
   // 函数
   methods: {
+    handleNodeClick(data) {
+      this.location = data.id
+        console.log(data);
+        this.searchTab(data.id)
+      },
+    DateformatDate(val) {
+      return new Date(val).formatDate("yyyy-MM-dd hh:mm:ss");
+    },
     showDet() {
       this.$refs.det.show();
     },
@@ -362,34 +562,74 @@ export default {
         data.status == "开风机工作票"
       ) {
         return "消缺单已下达";
-      } else if (null == data.status || data.status == "流程未启动" || data.status == "流程未启用") {
+      } else if (
+        null == data.status ||
+        data.status == "流程未启动" ||
+        data.status == "流程未启用"
+      ) {
         return "流程未启动";
-      }
-      else{
+      } else {
         return "流程未启动";
       }
     },
-    selectTab: function (index) {
+    async searchH(){
+      const {data} = await this.API.requestData({
+        method: "POST",
+        subUrl: "/recommen/findLocationTreeByWtId",
+        data: {
+          wtId: this.form.wtId ,
+        },
+      })
+      this.dialogVisible =true
+      this.data = data.data
+      this.location = data.data[0].id
+      console.warn(data);
+      this.searchTab()
+    },
+    async searchTab(){
+      const {data} = await this.API.requestData({
+        method: "POST",
+        subUrl: "/recommen/findWobugeqByLocation",
+        data: {
+          tablepar: {
+            pageNum:1,
+            pageSize:10,
+          },
+          location:this.location
+        },
+      })
+      console.warn(data);
+      this.tableData.data= data.data
+    },
+    selectTab: function (tab,index) {
       this.activeTab = index;
-      if(index == 1){
-        this.showDet()
+      if (index == 1) {
+        this.showDet();
+      }
+      if(tab.text == '消缺历史'){
+        this.searchH()
       }
-    },
-  },
-  watch: {
-    data(value) {
-      this.form.tjss = value.tjss?new Date(value.tjss).formatDate("yyyy-MM-dd hh:mm:ss"):""
-      this.form.prodtdepttime = value.prodtdepttime?new Date(value.prodtdepttime).formatDate("yyyy-MM-dd hh:mm:ss"):""
-      this.form.departuretime = value.departuretime?new Date(value.departuretime).formatDate("yyyy-MM-dd hh:mm:ss"):""
-      this.form.arrivaltime = value.arrivaltime?new Date(value.arrivaltime).formatDate("yyyy-MM-dd hh:mm:ss"):""
-      this.form.repairedtime = value.repairedtime?new Date(value.repairedtime).formatDate("yyyy-MM-dd hh:mm:ss"):""
-      this.form.checktime = value.checktime?new Date(value.checktime).formatDate("yyyy-MM-dd hh:mm:ss"):"" 
     },
   },
 };
 </script>
 
 <style lang="less">
+.diamain{
+  width: 100%;
+  height: 700px;
+  overflow:hidden;
+  display: flex;
+  justify-content: space-between;
+  .left{
+    width: 30%;
+    overflow-y: auto;
+  }
+  .right{
+    width: 68%;
+  }
+}
+
 .track-info {
   display: flex;
   .form-info {
@@ -422,28 +662,32 @@ export default {
         &.active {
           .work-flow-icon-item {
             .work-flow-icon-o {
-                border: 1px solid @green;
-                opacity: 0.4;
-              }
+              border: 1px solid @green;
+              opacity: 0.4;
+            }
 
-              .work-flow-icon-i {
-                border: 2px solid @green;
-                background: linear-gradient(to bottom, #1F2B2B 0%,#1F2B2B 20%,@green 100%);
-              }
+            .work-flow-icon-i {
+              border: 2px solid @green;
+              background: linear-gradient(
+                to bottom,
+                #1f2b2b 0%,
+                #1f2b2b 20%,
+                @green 100%
+              );
+            }
 
-              .svg-icon {
-                svg {
-                  use {
-                    fill: @green;
-                  }
+            .svg-icon {
+              svg {
+                use {
+                  fill: @green;
                 }
               }
+            }
           }
 
           .work-flow-text {
             color: @green;
           }
-          
         }
 
         .work-flow-icon-item {
@@ -458,7 +702,7 @@ export default {
             width: 60px;
             height: 60px;
             border-radius: 50%;
-            border: 1px solid #B3BDC0;
+            border: 1px solid #b3bdc0;
             opacity: 0.4;
           }
 
@@ -480,7 +724,12 @@ export default {
             height: 50px;
             border-radius: 50%;
             border: 2px solid #606769;
-            background: linear-gradient(to bottom, #1F2B2B 0%,#1F2B2B 20%,#606769 100%);
+            background: linear-gradient(
+              to bottom,
+              #1f2b2b 0%,
+              #1f2b2b 20%,
+              #606769 100%
+            );
           }
 
           .svg-icon {
@@ -490,21 +739,20 @@ export default {
             top: calc(50% - 10px);
             left: calc(50% - 13px);
             svg {
-               width: 26px;
+              width: 26px;
               height: 26px;
               use {
                 fill: @gray-l;
               }
             }
           }
-          
         }
 
         .work-flow-text {
-            color: @gray-l;
-            margin-top: 8px;
-            font-size: @fontsize-s;
-          }
+          color: @gray-l;
+          margin-top: 8px;
+          font-size: @fontsize-s;
+        }
       }
     }
   }
@@ -535,8 +783,6 @@ export default {
         margin: 0 16px;
       }
     }
-
-    
   }
 
   .tabs {
@@ -546,45 +792,45 @@ export default {
     border-left: 1px solid #53626833;
 
     .tab-box {
-    margin: 1.852vh 2.778vh;
-    display: inline-block;
-    z-index: 2;
-    position: relative;
-    margin: 26px 0 0 20px;
+      margin: 1.852vh 2.778vh;
+      display: inline-block;
+      z-index: 2;
+      position: relative;
+      margin: 26px 0 0 20px;
 
-    .tab-item {
-      display: flex;
-      align-items: center;
-      // justify-content: center;
-      font-size: @fontsize-l;
-      cursor: pointer;
-      // width: 120px;
-      padding: 8px;
-      margin-bottom: 16px;
+      .tab-item {
+        display: flex;
+        align-items: center;
+        // justify-content: center;
+        font-size: @fontsize-l;
+        cursor: pointer;
+        // width: 120px;
+        padding: 8px;
+        margin-bottom: 16px;
 
-      &.active {
-        color: @green;
-        position: relative;
-        background-image: @greenLinearTop;
+        &.active {
+          color: @green;
+          position: relative;
+          background-image: @greenLinearTop;
 
-        &::after {
-          content: "";
-          position: absolute;
-          width: 100%;
-          height: 5px;
-          border: 1px solid @green;
-          border-top: 0;
-          left: 0;
-          bottom: 0;
-          box-sizing: border-box;
+          &::after {
+            content: "";
+            position: absolute;
+            width: 100%;
+            height: 5px;
+            border: 1px solid @green;
+            border-top: 0;
+            left: 0;
+            bottom: 0;
+            box-sizing: border-box;
+          }
         }
-      }
 
-      .svg-icon {
-        margin-right: 16px;
+        .svg-icon {
+          margin-right: 16px;
+        }
       }
     }
   }
-  }
 }
 </style>

+ 137 - 21
src/views/NewPages/alarm-center.vue

@@ -2,38 +2,49 @@
   <div class="alarm-center">
     <div class="action-bar">
       <div class="selections mg-b-16">
-        <div class="item" @click="tabSelect(0)" :class="{ active: tabIndex == 0 }">发电机</div>
+        <div v-for="(tabItem, tabIndex) in tabLists" :key="tabItem.type" class="item" :class="{ active: tabIndex == cureent }" @click="tabSelect(tabItem.type, tabIndex)" >
+          {{ tabItem.name }}
+        </div>
+        <!-- <div class="item" @click="tabSelect(0)" :class="{ active: tabIndex == 0 }">发电机</div>
         <div class="item" @click="tabSelect(1)" :class="{ active: tabIndex == 1 }">齿轮箱</div>
         <div class="item" @click="tabSelect(2)" :class="{ active: tabIndex == 2 }">变桨系统</div>
         <div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 3 }">液压站</div>
         <div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 4 }">风机震动</div>
-        <div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 5 }">其他参数</div>
+        <div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 5 }">其他参数</div> -->
       </div>
       <div class="query mg-b-16">
         <div class="query-items">
           <div class="query-item">
             <div class="lable">风场:</div>
             <div class="search-input">
-              <el-select v-model="value1" clearable placeholder="请选择" popper-class="select">
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+              <el-select v-model="optSelectValue" clearable placeholder="请选择" popper-class="select" @change="handelSelectChange">
+                <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"> </el-option>
               </el-select>
             </div>
           </div>
         </div>
         <div class="query-actions">
-          <button class="btn green">搜索</button>
+          <button class="btn green" @click="handelSelectChange">搜索</button>
         </div>
       </div>
     </div>
     <el-scrollbar>
       <div class="fj">
+        <div class="fj-item" v-for="(item, index) in tableLists" :key="index">
+          <div class="fj-title">风机编号:{{item[0].wtId}}</div>
+          <div class="fj-info">
+            <Table :data="handleTable(item)"></Table>
+          </div>
+        </div>
+      </div>
+      <!-- <div class="fj">
         <div class="fj-item" v-for="index in 25" :key="index">
           <div class="fj-title">风机编号:000</div>
           <div class="fj-info">
             <Table :data="tableData"></Table>
           </div>
         </div>
-      </div>
+      </div> -->
     </el-scrollbar>
   </div>
 </template>
@@ -44,7 +55,70 @@ export default {
   components: { Table },
   data() {
     return {
-      tableData: {
+      cureent: 0,
+      optSelectValue: '',
+      tabLists: [
+        {
+          type: 'fdj',
+          name: '发电机'
+        },
+        {
+          type: 'clx',
+          name: '齿轮箱'
+        },
+        {
+          type: 'bj',
+          name: '变桨系统'
+        },
+        {
+          type: 'yyz',
+          name: '液压站'
+        },
+        {
+          type: 'zd',
+          name: '风机震动'
+        },
+        {
+          type: 'qt',
+          name: '其他参数'
+        }
+      ],
+      // tableData: {
+      //   column: [
+      //     {
+      //       name: "",
+      //       field: "name",
+      //       is_num: false,
+      //       is_light: false,
+      //     },
+      //     {
+      //       name: "",
+      //       field: "value",
+      //       is_num: false,
+      //       is_light: false,
+      //     },
+      //   ],
+      //   data: [
+      //     // {
+      //     //   name: "发电机绕组U1温度",
+      //     //   desc: "1234.56",
+      //     // },
+      //   ],
+      // },
+      tableLists: [],
+      options: [],
+      type: '',
+      timmer: null, // 遮罩开关
+    };
+  },
+  methods: {
+    tabSelect(type, index) {
+      this.cureent = index
+      this.type = type
+      this.getList(true)
+    },
+    handleTable(item) {
+      let tableData = {
         column: [
           {
             name: "",
@@ -54,27 +128,69 @@ export default {
           },
           {
             name: "",
-            field: "desc",
+            field: "value",
             is_num: false,
             is_light: false,
           },
         ],
-        data: [
-          {
-            name: "发电机绕组U1温度",
-            desc: "1234.56",
+        data: item
+      }
+      return tableData
+    },
+    handelSelectChange() {
+      this.getList(true)
+    },
+    getList(showLoading) {
+      let _this = this
+      _this.API.requestData({
+          showLoading,
+          method: "POST",
+          subUrl: "/temperature/getTemperatureList",
+          data:{
+            type: this.type,
+            wpId: this.optSelectValue
           },
-        ],
-      },
-    };
-  },
-  methods: {
-    tabSelect(tab) {},
+          success(res) {
+            _this.tableLists = res.data
+            // this.tableData.data = res.data
+            // debugger
+            console.log(res)
+          }
+      })
+    },
+
+    getSelectLists(showLoading) {
+      let _this = this
+      _this.API.requestData({
+          showLoading,
+          method: "GET",
+          subUrl: "/powercompare/windfarmAjax",
+          success(res) {
+            _this.options = res.data
+            _this.optSelectValue = res.data[0].id
+            _this.$nextTick(() => {
+              _this.getList(false);
+              _this.timmer = setInterval(() => {
+                _this.getList(false)
+              }, _this.$store.state.websocketTimeSec);
+            });
+          }
+      })
+    }
   },
   created() {
-    for (let i = 1; i < 7; i++) {
-      this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
-    }
+    // for (let i = 1; i < 7; i++) {
+    //   this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
+    // }
+    this.type = this.tabLists[0].type
+    this.getSelectLists(false);
+
+    // this.getList()
+  },
+
+  unmounted() {
+    clearInterval(this.timmer);
+    this.timmer = null;
   },
 };
 </script>

Файловите разлики са ограничени, защото са твърде много
+ 844 - 84
src/views/NewPages/dj1.vue


+ 548 - 0
src/views/NewPages/fdlyl.vue

@@ -0,0 +1,548 @@
+<template>
+  <div class="ztfx" >
+    <div class="action-bar">
+      <div class="query mg-b-16">
+        <div class="query-items">
+          <div class="query-item">
+            <div class="lable">日期:</div>
+            <div class="search-input">
+              <el-date-picker
+                v-model="monthValue"
+                type="year"
+                placeholder="选择年份"
+                popper-class="date-select"
+                :clearable="false"
+              >
+              </el-date-picker>
+            </div>
+          </div>
+          <div class="query-item">
+            <div class="search-input select-btn">
+              <button class="btn green" @click="onClickSearch">搜索</button>
+            </div>
+            <div class="search-input select-btn">
+              <button class="btn green" @click="exportPDF">导出</button>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <el-row :gutter="20" class="table-panel pdfDom">
+      <el-col :span="24">
+        <!-- <panel :title="'月度'" :showLine="false"> -->
+          <div class="table">
+            <table style="width:100%;" border="0" cellspacing="0">
+              <thead>
+                <tr>
+                  <th rowspan="2" class="type1" style="width:4vh;"></th>
+                  <template v-for="m of monthData" :key="m">
+                    <th style="width:6vh;" class="type1" rowspan="2">{{m}}</th>
+                  </template>
+                </tr>
+                
+              </thead>
+            </table>
+              <div style=" ">
+                <table
+                  style="width:100%;text-align:center;"
+                  border="0"
+                  cellspacing="0"
+                >
+                  <tbody>
+                    <tr>
+                      <td style="width:4vh;"></td>
+                      <template v-for="(x ,i) of MhsLists" :key="i">
+                        <td style="width:3vh;">本期</td>
+                        <td style="width:3vh;">同期</td>
+                      </template>
+                    </tr>
+                    <tr>
+                      <td class="td-item" style="width:4vh;">麻黄山</td>
+                      <template v-for="(item, index) of MhsLists" :key="index">
+                        <td style="width:3vh;">
+                          {{ item.current }}
+                          <template v-if="item.compare === -1">
+                            <span class="svg-icon svg-icon-yellow">
+                              <svg-icon svgid="svg-arrow-dpwn-1" />
+                            </span>
+                          </template>
+                          <template v-if="item.compare === 1">
+                            <span class="svg-icon svg-icon-green">
+                              <svg-icon svgid="svg-arrow-up-1" />
+                            </span>
+                          </template>
+                        </td>
+                        <td style="width:3vh;">
+                          {{ item.sameperiod }}
+                        </td>
+                      </template>
+                    </tr>
+                    <tr>
+                      <td class="td-item" style="width:4vh;">牛首山</td>
+                      <template v-for="(item, index) of NshList" :key="index">
+                        <td style="width:3vh;">
+                          {{ item.current }}
+                          <template v-if="item.compare === -1">
+                            <span class="svg-icon svg-icon-yellow">
+                              <svg-icon svgid="svg-arrow-dpwn-1" />
+                            </span>
+                          </template>
+                          <template v-if="item.compare === 1">
+                            <span class="svg-icon svg-icon-green">
+                              <svg-icon svgid="svg-arrow-up-1" />
+                            </span>
+                          </template>
+                        </td>
+                        <td style="width:3vh;">
+                          {{ item.sameperiod }}
+                        </td>
+                      </template>
+                    </tr>
+                    <tr>
+                      <td class="td-item" style="width:4vh;">青山</td>
+                      <template v-for="(item, index) of QshList" :key="index">
+                        <td style="width:3vh;">
+                          {{ item.current }}
+                          <template v-if="item.compare === -1">
+                            <span class="svg-icon svg-icon-yellow">
+                              <svg-icon svgid="svg-arrow-dpwn-1" />
+                            </span>
+                          </template>
+                          <template v-if="item.compare === 1">
+                            <span class="svg-icon svg-icon-green">
+                              <svg-icon svgid="svg-arrow-up-1" />
+                            </span>
+                          </template>
+                        </td>
+                        <td style="width:3vh;">
+                          {{ item.sameperiod }}
+                        </td>
+                      </template>
+                    </tr>
+                    <tr>
+                      <td class="td-item" style="width:4vh;">石板泉</td>
+                      <template v-for="(item, index) of SbaqList" :key="index">
+                        <td style="width:3vh;">
+                          {{ item.current }}
+                          <template v-if="item.compare === -1">
+                            <span class="svg-icon svg-icon-yellow">
+                              <svg-icon svgid="svg-arrow-dpwn-1" />
+                            </span>
+                          </template>
+                          <template v-if="item.compare === 1">
+                            <span class="svg-icon svg-icon-green">
+                              <svg-icon svgid="svg-arrow-up-1" />
+                            </span>
+                          </template>
+                        </td>
+                        <td style="width:3vh;">
+                          {{ item.sameperiod }}
+                        </td>
+                      </template>
+                    </tr>
+                    <tr>
+                      <td class="td-item" style="width:4vh;">香山</td>
+                      <template v-for="(item, index) of XshList" :key="index">
+                        <td style="width:3vh;">
+                          {{ item.current }}
+                          <template v-if="item.compare === -1">
+                            <span class="svg-icon svg-icon-yellow">
+                              <svg-icon svgid="svg-arrow-dpwn-1" />
+                            </span>
+                          </template>
+                          <template v-if="item.compare === 1">
+                            <span class="svg-icon svg-icon-green">
+                              <svg-icon svgid="svg-arrow-up-1" />
+                            </span>
+                          </template>
+                        </td>
+                        <td style="width:3vh;">
+                          {{ item.sameperiod }}
+                        </td>
+                      </template>
+                    </tr>
+                    <tr>
+                      <td class="td-item" style="width:4vh;">公司</td>
+                      <template v-for="(item, index) of GsList" :key="index">
+                        <td style="width:3vh;">
+                          {{ item.current }}
+                          <template v-if="item.compare === -1">
+                            <span class="svg-icon svg-icon-yellow">
+                              <svg-icon svgid="svg-arrow-dpwn-1" />
+                            </span>
+                          </template>
+                          <template v-if="item.compare === 1">
+                            <span class="svg-icon svg-icon-green">
+                              <svg-icon svgid="svg-arrow-up-1" />
+                            </span>
+                          </template>
+                        </td>
+                        <td style="width:3vh;">
+                          {{ item.sameperiod }}
+                        </td>
+                      </template>
+                    </tr>
+                  </tbody>
+                </table>
+              </div>
+            <!-- </el-scrollbar> -->
+          </div>
+      </el-col>
+    </el-row>
+    <el-row :gutter="20" class="table-panel">
+      <el-col :span="24">
+        <panel title="公司可利用率分析" :showLine="false">
+          <!-- <vertival-bar-line-chart
+            :height="'360px'"
+            :units="units"
+            :bardata="bardata"
+            :lineData="lineData"
+          /> -->
+
+          <MultipleLineChart  
+            :list="DayPower.value" 
+            :units="DayPower.units" 
+            height="40vh" :showLegend="true" 
+          />
+           <!-- :units="units"
+            :bardata="bardata"
+            :lineData="lineData" -->
+        </panel>
+      </el-col>
+    </el-row>
+      
+  </div>
+</template>
+
+<script>
+// import VertivalBarLineChart from "../../components/chart/combination/vertival-bar-line-chart.vue";
+// import VertivalBarLineChart from "../../components/chart/bar/list-bar-chart.vue";
+import MultipleLineChart from "../../components/chart/bar/multiple-bar-chart.vue";
+import Panel from "../../components/coms/panel/panel.vue";
+import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
+import SvgIcon from "../../components/coms/icon/svg-icon.vue";
+import Get_PDF from "@tools/htmlToPdf";
+export default {
+  setup() {},
+  components: {
+    Panel,
+    DualPieChart,
+    SvgIcon,
+    // VertivalBarLineChart,
+    MultipleLineChart
+  },
+  data() {
+    return {
+      monthData: [],
+      MhsLists: [],
+      NshList: [],
+      QshList: [],
+      SbaqList: [],
+      XshList: [],
+      GsList: [],
+      units: [],
+      nowCurrent: 1,
+      months: new Date().getMonth() + 1,
+      pickerOptions: {},
+      bardata: { area: [], legend: [], data: [] }, // 损失电量分析echart数值
+      lineData: [],
+      timmer: null,
+      monthValue: this.getmonthValue(),
+      list: [],
+      DayPower: {
+        // 图表所用单位
+        units: [""],
+        value: [
+          {
+            title: "",
+            yAxisIndex: 0, // 使用单位
+            value: [],
+          },
+        ],
+      },
+    };
+  },
+  created() {
+    let _this = this
+    // _this.$nextTick(() => {
+      _this.getLists(false);
+    //   _this.timmer = setInterval(() => {
+    //     _this.getLists(false)
+    //   }, _this.$store.state.websocketTimeSec);
+    // });
+  },
+  unmounted() {
+    clearInterval(this.timmer);
+    this.timmer = null;
+  },
+  mounted() {},
+  methods: {
+    exportPDF (name) {
+      this.BASE.showMsg({
+        type: "success",
+        msg: "正在导出...请稍后..."
+      });
+      Get_PDF.downloadPDF(document.querySelector('.pdfDom'), "风能利用率");
+    },
+    getmonthValue(){
+      let year = new Date().getFullYear().toString()
+      return year
+    },
+    onClickSearch() {
+      this.getLists(false)
+    },
+    monthChange(data){
+      let year = data.getFullYear().toString();
+      return year
+    },
+
+    isNumber(val) {
+      return typeof val === 'number' && !isNaN(val)
+    },
+    getLists(showLoading) {
+      let MhsLists = []
+      let NshList= []
+      let QshList= []
+      let SbaqList= []
+      let XshList= []
+      let GsList= []
+      let _this = this
+      let year = ''
+      if (typeof(this.monthValue) === 'string') {
+        year = this.monthValue
+      } else {
+        year = this.monthChange(this.monthValue)
+      }
+      const site = ['compare', 'year', 'month']
+      _this.API.requestData({
+          showLoading,
+          method: "GET",
+          baseURL: 'http://10.155.32.4:8034',
+          subUrl: "/specific/fnlylList",
+          data:{
+            year: year
+          },
+          success(res) {
+            _this.list = res.data.map(item => {
+              for (let key in item) {
+                if (!site.includes(key)) {
+                  if(_this.isNumber(item[key])) {
+                    item[key] = item[key].toFixed(2)
+                  } else if (!item[key]){
+                    item[key] = 0
+                    item[key] = item[key].toFixed(2)
+                  }
+                }
+                
+              }
+              if (item.wpid === 'MHS_FDC') {
+                MhsLists.push(item)
+              } else if (item.wpid === 'NSS_FDC') {
+                NshList.push(item)
+              } else if (item.wpid === 'QS_FDC') {
+                QshList.push(item)
+              } else if (item.wpid === 'NSS_FDC') {
+                NshList.push(item)
+              } else if (item.wpid === 'SBQ_FDC') {
+                SbaqList.push(item)
+              } else if (item.wpid === 'XS_FDC') {
+                XshList.push(item)
+              } else {
+                GsList.push(item)
+              }
+            })
+
+            _this.MhsLists = MhsLists.sort(_this.compare('month'))
+            _this.NshList= NshList.sort(_this.compare('month'))
+            _this.QshList= QshList.sort(_this.compare('month'))
+            _this.SbaqList= SbaqList.sort(_this.compare('month'))
+            _this.XshList= XshList.sort(_this.compare('month'))
+            _this.GsList= GsList.sort(_this.compare('month'))
+
+            let nowCureent = []
+            let sameCureent = []
+            let monthData = []
+            let monthsAll = []
+            _this.GsList.map(item => {
+              let objs = {}
+              let obj = {}
+              monthsAll.push(item.month)
+              if (item.month > 10) {
+                objs.text = item.month.toString()
+                obj.text = item.month.toString()
+              } else {
+                item.text = '0'+ item.month
+                objs.text = item.text
+                obj.text = item.text
+              }
+              for (let key in item) {
+                if (key === 'current') {
+                  objs.value = item.current
+                  nowCureent.push(objs)
+                } else if (key === 'sameperiod'){
+                  obj.value = item.sameperiod
+                  sameCureent.push(obj)
+                }
+                
+              }
+            })
+            _this.monthData = monthsAll
+            _this.DayPower = {
+              // 图表所用单位
+              units: [""],
+              value: [
+                {
+                  title: "本期",
+                  yAxisIndex: 0, // 使用单位
+                  value: nowCureent,
+                  // nowCureent
+                },
+                {
+                  title: "同期",
+                  yAxisIndex: 0, // 使用单位
+                  value: sameCureent,
+                  // sameCureent
+                },
+              ],
+            }
+
+            // _this.DayPower = {
+            //   // 图表所用单位
+            //   units: [""],
+            //   value: [
+            //     {
+            //       title: "本期",
+            //       yAxisIndex: 0, // 使用单位
+            //       value: [],
+            //     },
+            //     {
+            //       title: "同期",
+            //       yAxisIndex: 0, // 使用单位
+            //       value: [],
+            //     },
+            //   ],
+            // },
+            // _this.bardata.legend = ["本期", "同期"]
+            // _this.lineData = [];
+            // _this.bardata.area = monthData;
+            // _this.bardata.data[0] = sameCureent;
+            // _this.bardata.data[1] = nowCureent;
+          }
+      })
+    },
+    compare(property) {
+      return (a, b) => {
+        let val1 = a[property]
+        let val2 = b[property]
+        return val1 - val2
+      }
+    }
+  }
+};
+</script>
+
+<style lang="less">
+.ztfx {
+  font-size: 12px;
+  .select-btn {
+    width: 92px;
+  }
+  .com-panel {
+    border: 1px solid #6067697d;
+  }
+  .table-complex {
+    margin-top: 10px;
+    .table {
+      border: 1px solid #6067697d;
+      tbody {
+        tr:nth-child(2n) td {
+          background-color: fade(@gray, 20%);
+
+          &.item {
+            background-color: transparent;
+          }
+        }
+      }
+
+      th {
+        background: fade(@gray, 40);
+        font-size: 12px;
+        font-weight: 400;
+        line-height: 24px;
+        color: @gray-l;
+
+        &.type1 {
+          border-left: 0;
+          border-right: 0;
+        }
+      }
+      td {
+        color: @gray-l;
+        text-align: center;
+        height: 26px;
+        line-height: 26px;
+
+        // &.item {
+        //   width: 100px;
+        // }
+      }
+      svg {
+        height: 1.222vh;
+      }
+    }
+  }
+  .table-panel {
+    margin-top: 10px;
+    .panel-header {
+      text-align: center;
+    }
+    .table {
+      border: 1px solid #6067697d;
+      tbody {
+        tr:nth-child(2n) td {
+          background-color: fade(@gray, 20%);
+
+          &.item {
+            background-color: transparent;
+          }
+        }
+      }
+      .td-item {
+        width: 6vh;
+      }
+      th {
+        background: fade(@gray, 40);
+        font-size: 12px;
+        font-weight: 400;
+        line-height: 24px;
+        color: @gray-l;
+
+        &.type1 {
+          border-left: 0;
+          border-right: 0;
+          height: 4vh;
+        }
+      }
+      td {
+        color: @gray-l;
+        text-align: center;
+        height: 46px;
+        line-height: 46px;
+
+        &.item {
+          width: 100px;
+        }
+      }
+      svg {
+        height: 1.222vh;
+      }
+    }
+  }
+  .pie-chart-panel {
+    margin-top: 10px;
+    .line{
+      border:none;
+    }
+  }
+}
+</style>

+ 206 - 269
src/views/NewPages/znzhfx.vue

@@ -1,86 +1,61 @@
 <template>
   <div class="znzhfx">
     <el-scrollbar height="1022px">
-      <el-row>
-        <el-col :span="12">
-          <el-row>
-            <el-col :span="24">
-              <div class="query mg-b-8">
-                <div class="query-items">
-                  <div class="query-item">
-                    <div class="lable">风场:</div>
-                    <div class="search-input">
-                      <el-select
-                        v-model="value1"
-                        clearable
-                        placeholder="请选择风场"
-                        popper-class="select"
-                      >
-                        <el-option
-                          v-for="item in options"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </div>
-                  </div>
-                  <div class="query-item">
-                    <div class="lable">日期:</div>
-                    <div class="search-input">
-                      <el-date-picker
-                        v-model="value4"
-                        type="date"
-                        placeholder="选择日期"
-                        popper-class="date-select"
-                      >
-                      </el-date-picker>
-                    </div>
-                  </div>
-                  <div class="query-item">
-                    <button class="btn" type="button">
-                      <span>计算</span>
-                    </button>
-                    <button class="btn" type="button">
-                      <span>导出</span>
-                    </button>
-                  </div>
-                </div>
-              </div>
-            </el-col>
-          </el-row>
-        </el-col>
-      </el-row>
       <el-row :gutter="20" class="table-panel">
         <el-col :span="24">
-          <div class="table-title">
-            麻黄山风电场年05月单台机组运行指标性能分析
-          </div>
-          <Table :data="tableData1" :canScroll="false" />
           <div class="back">
             <button class="btn" type="button">
               <span>返回</span>
             </button>
           </div>
-        </el-col>
-      </el-row>
-      <el-row :gutter="20" class="table-panel">
-        <el-col :span="24">
           <div class="table-title">
-            麻黄山01号风机2021年05月运行指标性能分析
+            {{ wtId }}号风机{{ year }}年{{ month }}月运行指标性能分析
           </div>
           <Table :data="tableData2" :canScroll="false" />
         </el-col>
       </el-row>
       <div class="mg-b-16 anliz-des">
         <div>
-          麻黄山01号风机2021年05月运行指标性能分析内容内容内容内容内容内容,麻黄山01号风机2021年05月运行指标性能分析内容内容内容内容内容内容。
-        </div>
-        <div>
-          麻黄山01号风机2021年05月运行指标性能分析内容内容内容内容内容内容,麻黄山01号风机2021年05月运行指标性能分析内容内容内容内容内容内容麻黄山01号风机2021年05月运行指标性能分析内容内容内容内容内容内容,麻黄山01号风机2021年05
-          月运行指标性能分析内容内容内容内容内容内容麻黄山01号风机2021年05月运行指标性能分析内容内容内容内容内容内容,麻黄山01号风机2021年05月运行指标性能分析内容内容内容内容内容内容麻黄山01号风机2021年05月运行指标性能分析内容内
-          容内容内容内容内容,麻黄山01号风机2021年05月运行指标性能分析内容内容内容内容内容内容。
+          本月{{ wtId }}号风机风机设备利用小时数{{
+            tableVal.byzb && tableVal.byzb.lyxs
+          }}小时、同比{{
+            tableVal.tpzb && tableVal.tpzb.lyxs
+          }}小时,设备可利用率{{
+            tableVal.byzb && tableVal.byzb.sbklyl
+          }}%、同比{{ tableVal.tpzb && tableVal.tpzb.sbklyl }}}%,
+          等效可用系数{{ tableVal.byzb && tableVal.byzb.dxklyxs }}%、同比{{
+            tableVal.tpzb && tableVal.tpzb.dxklyxs
+          }}}%,静风频率达到{{ tableVal.byzb && tableVal.byzb.jfpl }}%、同比{{
+            tableVal.tpzb && tableVal.tpzb.jfpl
+          }}}%, 机组功率特性一致性系数达到{{
+            tableVal.byzb && tableVal.byzb.glyzxxs
+          }}%、同比{{ tableVal.tpzb && tableVal.tpzb.glyzxxs }}}%。
+          <br />
+          {{ wtId }}风机{{ year }}年{{ month }}月平均风速{{
+            tableVal.byzb && tableVal.byzb.fs
+          }}m/s、同比{{ tableVal.tpzb && tableVal.tpzb.fs }}m/s,
+          小风平均切入风速{{ tableVal.byzb && tableVal.byzb.xfqr }}m/s、同比{{
+            tableVal.tpzb && tableVal.tpzb.xfqr
+          }}m/s, 有效风时数{{
+            tableVal.byzb && tableVal.byzb.yxfss
+          }}小时、同比{{ tableVal.tpzb && tableVal.tpzb.yxfss }}小时,
+          实际发电电量{{ tableVal.byzb && tableVal.byzb.fdl }}万kwh、同比{{
+            tableVal.tpzb && tableVal.tpzb.fdl
+          }}万kwh,同比增长率{{ tableVal.tbzb && tableVal.tbzb.fdl }}%,
+          各项损失电量累计{{
+            tableVal.byzb && tableVal.byzb.llfdl - tableVal.byzb.fdl
+          }}万kwh、同比{{
+            tableVal.tpzb && tableVal.tpzb.llfdl - tableVal.tpzb.fdl
+          }}万kwh,同比增长率{{
+            tableVal.tbzb && tableVal.byzb.llfdl - tableVal.tbzb.fdl
+          }}%, 理论发电量{{
+            tableVal.byzb && tableVal.byzb.llfdl
+          }}万kwh,实际发电量与理论发电量相差{{
+            tableVal.tbzb && tableVal.tbzb.llfdl
+          }}万kwh。
+          <br />
+          本月静风频率
+          %,月累计静风时长0.00小时,月累计待机小时116.44小时,待机占比48.51%。
         </div>
       </div>
       <div class="mg-b-16">
@@ -120,146 +95,32 @@ export default {
   },
   data() {
     return {
-      options: [
-        {
-          value: "选项1",
-          label: "黄金糕",
-        },
-        {
-          value: "选项2",
-          label: "双皮奶",
-        },
-        {
-          value: "选项3",
-          label: "蚵仔煎",
-        },
-        {
-          value: "选项4",
-          label: "龙须面",
-        },
-        {
-          value: "选项5",
-          label: "北京烤鸭",
-        },
-      ],
-      tableData1: {
-        column: [
-          {
-            name: " ",
-            field: "name",
-            width: "3%",
-          },
-          {
-            name: "实际发电量(万kWh)",
-            field: "v1",
-          },
-          {
-            name: "理论发电量(万kWh)",
-            field: "v2",
-          },
-          {
-            name: "设备利用小时数(h)",
-            field: "v3",
-          },
-          {
-            name: "设备科利用率(%)",
-            field: "v4",
-          },
-          {
-            name: "等效可用系数(%)",
-            field: "v5",
-          },
-          {
-            name: "平均风速(m/s)",
-            field: "v6",
-          },
-          {
-            name: "小风切入风速(m/s)",
-            field: "v7",
-          },
-        ],
-        data: [
-          {
-            name: "1",
-            v1: "麻黄山01号风机",
-            v2: "174785",
-            v3: "174789.01",
-            v4: "100",
-            v5: "100",
-            v6: "3.46",
-            v7: "3.78",
-          },
-          {
-            name: "2",
-            v1: "麻黄山01号风机",
-            v2: "174785",
-            v3: "174789.01",
-            v4: "100",
-            v5: "100",
-            v6: "3.46",
-            v7: "3.78",
-          },
-          {
-            name: "3",
-            v1: "麻黄山01号风机",
-            v2: "174785",
-            v3: "174789.01",
-            v4: "100",
-            v5: "100",
-            v6: "3.46",
-            v7: "3.78",
-          },
-          {
-            name: "4",
-            v1: "麻黄山01号风机",
-            v2: "174785",
-            v3: "174789.01",
-            v4: "100",
-            v5: "100",
-            v6: "3.46",
-            v7: "3.78",
-          },
-          {
-            name: "5",
-            v1: "麻黄山01号风机",
-            v2: "174785",
-            v3: "174789.01",
-            v4: "100",
-            v5: "100",
-            v6: "3.46",
-            v7: "3.78",
-          },
-          {
-            name: "6",
-            v1: "麻黄山01号风机",
-            v2: "174785",
-            v3: "174789.01",
-            v4: "100",
-            v5: "100",
-            v6: "3.46",
-            v7: "3.78",
-          },
-          {
-            name: "7",
-            v1: "麻黄山01号风机",
-            v2: "174785",
-            v3: "174789.01",
-            v4: "100",
-            v5: "100",
-            v6: "3.46",
-            v7: "3.78",
-          },
-          {
-            name: "8",
-            v1: "麻黄山01号风机",
-            v2: "174785",
-            v3: "174789.01",
-            v4: "100",
-            v5: "100",
-            v6: "3.46",
-            v7: "3.78",
-          },
-        ],
+      wtId:'',
+      year:'',
+      month:'',
+      tableVal:'',
+      tabrow:{
+         "fdl":'实际发电量(万千瓦时)',
+         "fs":'平均风速(m/s)',
+         "gzss":'故障损失电量(万千瓦时)',
+         "jxss":'计划检修损失电量(万千瓦时)',
+         "xdss":'调度限电损失电量(万千瓦时)',
+         "xnss":'性能未达标损失电量(万千瓦时)',
+         "slss":'受累损失电量(万千瓦时)',
+         "llfdl":'理论发电量(万千瓦时)',
+         "gzxs":'故障停运时间(小时)',
+         "jxxs":'检修停运时间(小时)',
+         "tjxs":'待机时间(小时)',
+         "zdxs":'通讯中断时间(小时)',
+         "yxxs":'并网时间(小时)',
+         "lyxs":'设备利用小时(小时)',
+         "sbklyl":'设备利用率(%)',
+         "dxklyxs":'等效可用系数(%)',
+         "xfqr":'小风切入风速(m/s)',
+         "glyzxxs":'功率特性一致性系数(%)',
+         "yxfss":'有效风时数(小时)',
+         "xfqrhgl":'小风切入合格率(%)',
+         "jfpl":'静风频率(%)',
       },
       tableData2: {
         column: [
@@ -269,23 +130,23 @@ export default {
           },
           {
             name: "本月值",
-            field: "v1",
+            field: "byzb",
           },
           {
             name: "去年同期",
-            field: "v2",
+            field: "hqzb",
           },
           {
             name: "同比增长率(%)",
-            field: "v3",
+            field: "hbzb",
           },
           {
             name: "环比",
-            field: "v4",
+            field: "tqzb",
           },
           {
             name: "环比端值(%)",
-            field: "v5",
+            field: "tbzb",
           },
         ],
         data: [
@@ -297,62 +158,6 @@ export default {
             v4: "22322",
             v5: "-36",
           },
-          {
-            name: "实际发电量(万kWh)",
-            v1: "174785",
-            v2: "317885",
-            v3: "-45",
-            v4: "22322",
-            v5: "-36",
-          },
-          {
-            name: "实际发电量(万kWh)",
-            v1: "174785",
-            v2: "317885",
-            v3: "-45",
-            v4: "22322",
-            v5: "-36",
-          },
-          {
-            name: "实际发电量(万kWh)",
-            v1: "174785",
-            v2: "317885",
-            v3: "-45",
-            v4: "22322",
-            v5: "-36",
-          },
-          {
-            name: "实际发电量(万kWh)",
-            v1: "174785",
-            v2: "317885",
-            v3: "-45",
-            v4: "22322",
-            v5: "-36",
-          },
-          {
-            name: "实际发电量(万kWh)",
-            v1: "174785",
-            v2: "317885",
-            v3: "-45",
-            v4: "22322",
-            v5: "-36",
-          },
-          {
-            name: "实际发电量(万kWh)",
-            v1: "174785",
-            v2: "317885",
-            v3: "-45",
-            v4: "22322",
-            v5: "-36",
-          },
-          {
-            name: "实际发电量(万kWh)",
-            v1: "174785",
-            v2: "317885",
-            v3: "-45",
-            v4: "22322",
-            v5: "-36",
-          },
         ],
       },
       bar1Data: [
@@ -509,7 +314,139 @@ export default {
       ],
     };
   },
-  created() {},
+  created() {
+    this.wtId = this.$route.params.wtId;
+    this.year = this.$route.params.year;
+    this.month = this.$route.params.month;
+    this.search()
+    this.searchChart()
+  },
+  filters:{
+    tabrowfil(val){
+      return this.tabrow[val]
+    }
+  },
+  methods:{
+    async search() {
+      const { data } = await this.API.requestData({
+        subUrl: "/singleanalysis/singleanalysisSub",
+        method:'POST',
+        data:{
+             wtId : this.wtId,
+             year : this.year,
+             month : this.month,
+        }
+      });
+      console.warn(data.data);
+      const res = data.data
+      this.tableVal = data.data
+      console.warn(this.tableVal);
+      let arr=[];
+      let keyarr = Object.keys(res.byzb)
+      console.warn(keyarr);
+      let jarr = Object.keys(res)
+      for(let k of keyarr){
+        let obj={
+          'name' : k,
+          'byzb' : null,
+          'hbzb' : null,
+          'hqzb' : null,
+          'tbzb' : null,
+          'tqzb' : null,
+        }
+        for(let i in res){
+          for(let j of jarr){
+            if(i == j){
+            obj[j] = res[i][k]
+          }
+          }
+        }
+        arr.push(obj)
+      }
+      arr= arr.filter((e)=>{
+        return e.name != 'id' &&  e.name != 'windturbineid' && e.name != 'windturbineName' 
+        && e.name != 'windPowerStationId' && e.name != 'windPowerStationName' 
+        && e.name != 'recorddate' && e.name != 'swdl'&& e.name != 'gwdl' 
+        && e.name != 'rlxs' && e.name != 'fjrl'
+      })
+      arr.forEach(e=>{
+        e.name = this.tabrow[e.name]
+      })
+      this.tableData2.data = arr
+      console.warn(arr);
+    },
+     async searchChart() {
+      const { data } = await this.API.requestData({
+        subUrl: "/singleanalysis/singleanalysisChart",
+        method:'POST',
+        data:{
+             wtId : this.wtId,
+             year : this.year,
+             month : this.month,
+        }
+      });
+      console.warn(data.data);
+      const res = data.data
+      let arrff=[];
+      res.ff.forEach(e => {
+        let obj={
+          text: new Date(e.recorddate ).formatDate("MM-dd"),
+          value:e.fdl,
+        }
+        arrff.push(obj)
+      });
+      this.bar1Data[0].value = arrff
+      ////
+      let arrjdjf=[];
+      let arrjddj=[];
+      res.jd.forEach(e => {
+        let obj={
+          text: new Date(e.recorddate ).formatDate("MM-dd"),
+          value:e.jfpl,
+        }
+        let obj1={
+          text: new Date(e.recorddate ).formatDate("MM-dd"),
+          value:e.tjxs,
+        }
+        arrjdjf.push(obj)
+        arrjddj.push(obj1)
+      });
+      let obj={
+        title: "静风时长(小时)",
+        smooth: false,
+        value:arrjdjf
+      }
+      let obj1={
+        title: "待机时长(小时)",
+        smooth: false,
+        value:arrjddj
+      }
+      this.list =[]
+      this.list.push(obj)
+      this.list.push(obj1)
+      console.warn(this.list);
+      /////
+      let arrwsarea=[];
+      let arrwslegend=["限电损失电量",
+          "性能未达标损失电量",
+          "检修损失电量",
+          "故障损失电量",
+          "受累损失电量" ];
+      let arrwsdata=[];
+      res.ws.forEach(e => {
+        let arr=[]
+        for(let k of ['xdss','xnss','jxss','gzss','slss']){
+          arr.push(e[k])
+        }
+        arrwsdata.push(arr)
+        arrwsarea.push(new Date(e.recorddate ).formatDate("MM-dd"))
+      });
+      this.bar2data.area = arrwsarea
+      this.bar2data.legend = arrwslegend
+      this.bar2data.data = arrwsdata
+      console.warn(this.bar2data);
+    },
+  }
 };
 </script>
 
@@ -526,7 +463,7 @@ export default {
     .table-title {
       font-size: 16px;
       text-align: center;
-      color: #FEFEFE;
+      color: #fefefe;
       height: 4.6972vh;
       line-height: 4.6972vh;
     }

Файловите разлики са ограничени, защото са твърде много
+ 1590 - 335
src/views/NewPages/ztfx.vue


+ 58 - 59
src/views/cutAnalyse/index.vue

@@ -1,33 +1,32 @@
 <template>
   <div class="draught-fan-list">
     <div class="query mg-b-8">
-			<div class="query-items">
-				<div class="query-item">
-					<div class="lable">场站:</div>
-					<div class="search-input">
-						<el-select v-model="wpId" clearable placeholder="请选择"
-							popper-class="select">
-							<el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
-						</el-select>
-					</div>
-				</div>
-				<div class="query-item">
-					<div class="lable">日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="recorddate" type="date"
-							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
-						</el-date-picker>
-					</div>
-				</div>
-			</div>
-			<div class="query-actions">
-				<button class="btn green" @click="search()">查询</button>
-			</div>
-		</div>
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">日期:</div>
+          <div class="search-input">
+            <el-date-picker v-model="recorddate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+            </el-date-picker>
+          </div>
+        </div>
+      </div>
+      <div class="query-actions">
+        <button class="btn green" @click="search()">查询</button>
+      </div>
+    </div>
     <div class="df-table">
       <ComTable height="78vh" :data="tableData"></ComTable>
     </div>
-    <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal" :close-on-click-modal="true" @closed="dialogType = ''">
+    <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal"
+      :close-on-click-modal="true" @closed="dialogType = ''">
       <ComTable height="100vh" :data="tableHistoryData"></ComTable>
     </el-dialog>
   </div>
@@ -41,18 +40,18 @@ export default {
 
   // 使用组件
   components: {
-   ComTable
+    ComTable
   },
 
   // 数据
-  data() {
+  data () {
     const that = this;
     return {
-      isAsc:"asc",
-      wpArray:[],
-      wpId:"",
-      recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
-      dialogShow:false,
+      isAsc: "asc",
+      wpArray: [],
+      wpId: "",
+      recorddate: new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
+      dialogShow: false,
       tableData: {
         column: [
           {
@@ -290,10 +289,10 @@ export default {
             field: "",
             is_num: false,
             is_light: false,
-            template() {
-								return "<el-button type='text' style='cursor: pointer;'>历史</el-button>";
-						},
-            click(e, row){
+            template () {
+              return "<el-button type='text' style='cursor: pointer;'>历史</el-button>";
+            },
+            click (e, row) {
               that.getOutputspeedHistoryList(row)
             }
           }
@@ -437,55 +436,55 @@ export default {
   // 函数
   methods: {
     // 请求服务
-    requestData() {
+    requestData () {
       let that = this;
       that.API.requestData({
         method: "GET",
         subUrl: "powercompare/windfarmAjax",
-        success(res) {
-          that.wpArray=res.data;
-          that.wpId=res.data[0].id;
+        success (res) {
+          that.wpArray = res.data;
+          that.wpId = res.data[0].id;
           that.getOutputSpeedList(that.wpId)
         }
       });
     },
 
-    getOutputSpeedList(wpId){
+    getOutputSpeedList (wpId) {
       let that = this;
-      if(!that.wpId || !that.recorddate){
+      if (!that.wpId || !that.recorddate) {
         that.BASE.showMsg({
-          msg:"场站与日期不可为空"
+          msg: "场站与日期不可为空"
         });
-      }else{
+      } else {
         that.API.requestData({
           method: "POST",
           subUrl: "outputspeed/outputSpeedlist",
-          data:{
+          data: {
             wpId,
-            isAsc:that.isAsc,
-            recorddate:that.recorddate
+            isAsc: that.isAsc,
+            recorddate: that.recorddate
           },
-          success(res) {
+          success (res) {
             that.tableData.data = res.data;
           }
         });
       }
-      
+
     },
 
-    getOutputspeedHistoryList (item){
+    getOutputspeedHistoryList (item) {
       let that = this;
       that.API.requestData({
         method: "POST",
         subUrl: "outputspeed/outputspeedhistorylist",
-        data:{
-          wpId:item.windpowerstationid,
-          wtId:item.windturbineid,
+        data: {
+          wpId: item.windpowerstationid,
+          wtId: item.windturbineid,
           beginDate: (new Date().formatDate("yyyy-MM") + '-01'),
           endDate: new Date().formatDate("yyyy-MM-dd")
         },
-        success(res) {
-          res.data.forEach(ele=>{
+        success (res) {
+          res.data.forEach(ele => {
             ele.time = new Date(ele.recorddate).formatDate("yyyy-MM-dd");
           });
           that.tableHistoryData.data = res.data;
@@ -494,18 +493,18 @@ export default {
       });
     },
 
-    search(){
+    search () {
       this.getOutputSpeedList(this.wpId);
     }
   },
 
-  created() {
+  created () {
     this.requestData();
   },
 
-  mounted() {},
+  mounted () { },
 
-  unmounted() {},
+  unmounted () { },
 };
 </script>
 
@@ -533,7 +532,7 @@ export default {
     margin-top: 1.481vh;
 
     &:before {
-      content: "";
+      content: '';
       width: 0.37vh;
       height: 0.37vh;
       background: @write;

+ 10 - 10
src/views/layout/Header.vue

@@ -20,7 +20,7 @@
 </template>
 <script>
 export default {
-  data() {
+  data () {
     return {
       menus: [
         {
@@ -36,9 +36,9 @@ export default {
           isActive: false,
         },
         {
-          id: "singleAnalysis",
+          id: "performanceAnalysis",
           text: "统计分析",
-          path: "/singleAnalysis",
+          path: "/performanceAnalysis",
           isActive: false,
         },
         {
@@ -85,25 +85,25 @@ export default {
     };
   },
   methods: {
-    click(index, data) {
+    click (index, data) {
       this.activeIndex = index;
       this.$router.push(data.path);
     },
-    clickSubMenu(index, code) {
+    clickSubMenu (index, code) {
       console.log(index, code);
     },
-    clickMenu() {
+    clickMenu () {
       this.dropdown = !this.dropdown;
     },
   },
   computed: {
-    activeClass(data) {
+    activeClass (data) {
       return data.isActive ? "active" : "";
     },
   },
   watch: {
     $route: {
-      handler: function(val, oldVal) {
+      handler: function (val, oldVal) {
         this.menus.some((t, index) => {
           if (val.path.includes(t.id)) {
             this.activeIndex = index;
@@ -151,7 +151,7 @@ export default {
         transition: color 0.2s ease-in-out;
 
         &::after {
-          content: "";
+          content: '';
           position: absolute;
           width: 100%;
           height: 0.463vh;
@@ -208,7 +208,7 @@ export default {
         background-color: fade(@write, 5%);
 
         &::after {
-          content: "";
+          content: '';
           position: absolute;
           width: 100%;
           height: 0.463vh;

+ 60 - 47
src/views/layout/Menu.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="menu">
     <ul class="menu-list">
-      <li class="menu-item" v-for="(menu, index) of currentMenu" :key="menu" @click="click(index)" :class="{ active: activeIndex == index }" @mouseenter="subMenuShow(menu.children, index)">
+      <li class="menu-item" v-for="(menu, index) of currentMenu" :key="menu" @click="click(index)" :class="{ active: activeIndex == index }"
+        @mouseenter="subMenuShow(menu.children, index)">
         <router-link v-if="!menu.children" :to="menu.path">
           <el-tooltip class="item" effect="dark" :content="menu.text" placement="right" :show-after="500">
             <div class="menu-icon svg-icon" :class="activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'">
@@ -37,7 +38,7 @@ export default {
     SvgIcon,
   },
   props: {},
-  data() {
+  data () {
     return {
       currRoot: "monitor",
       menuData: [
@@ -80,7 +81,7 @@ export default {
               icon: "svg-agc",
               path: "/monitor/agc",
             },
-           {
+            {
               text: "风场",
               icon: "svg-wind-site",
               path: "/monitor/windsite/home/MHS_FDC",
@@ -107,11 +108,23 @@ export default {
                   path: "/historySearch"
                 }
               ]
+            },
+            {
+              text: "预警记录",
+              icon: "svg-wind-site",
+              path: "/new",
+              children: [
+                {
+                  text: "预警管理",
+                  icon: "svg-wind-site",
+                  path: "/new/alarmcenter"
+                }
+              ]
             }
           ],
         },
         {
-          id: "singleAnalysis",
+          id: "performanceAnalysis",
           text: "统计分析",
           data: [
             {
@@ -168,28 +181,28 @@ export default {
                 }
               ]
             },
-            {
-              text: "单机分析",
-              icon: "svg-wind-site",
-              path: "/fgzyfx",
-              children: [
-                {
-                  text: "单机分析详细",
-                  icon: "svg-wind-site",
-                  path: "/new/dj1",
-                },
-                {
-                  text: "电量预测",
-                  icon: "svg-wind-site",
-                  path: "/new/pf1",
-                },
-                {
-                  text: "气象预测",
-                  icon: "svg-wind-site",
-                  path: "/new/fs",
-                }
-              ]
-            }
+            // {
+            //   text: "单机分析",
+            //   icon: "svg-wind-site",
+            //   path: "/fgzyfx",
+            //   children: [
+            //     {
+            //       text: "单机分析详细",
+            //       icon: "svg-wind-site",
+            //       path: "/new/dj1",
+            //     },
+            //     {
+            //       text: "电量预测",
+            //       icon: "svg-wind-site",
+            //       path: "/new/pf1",
+            //     },
+            //     {
+            //       text: "气象预测",
+            //       icon: "svg-wind-site",
+            //       path: "/new/fs",
+            //     }
+            //   ]
+            // }
           ],
         },
         {
@@ -201,7 +214,7 @@ export default {
               icon: "svg-wind-site",
               path: "/health",
               children: [
-                 {
+                {
                   text: "健康推荐",
                   icon: "svg-wind-site",
                   path: "/health",
@@ -233,7 +246,7 @@ export default {
                 },
               ],
             },
-            
+
           ],
         },
         {
@@ -304,24 +317,24 @@ export default {
             },
             // 三率管理
             {
-              text:'三率管理',
-              icon:'svg-matrix',
-              path:'/slgl',
-              children:[
+              text: '三率管理',
+              icon: 'svg-matrix',
+              path: '/slgl',
+              children: [
                 {
-                  text:'复位及时率',
-                  icon:'svg-wind-site',
-                  path:'/fwjsl'
+                  text: '复位及时率',
+                  icon: 'svg-wind-site',
+                  path: '/fwjsl'
                 },
                 {
-                  text:'状态转换率',
-                  icon:'svg-wind-site',
-                  path:'/ztzhl'
+                  text: '状态转换率',
+                  icon: 'svg-wind-site',
+                  path: '/ztzhl'
                 },
                 {
-                  text:'消缺及时率',
-                  icon:'svg-wind-site',
-                  path:'/xqjsl'
+                  text: '消缺及时率',
+                  icon: 'svg-wind-site',
+                  path: '/xqjsl'
                 }
               ]
             }
@@ -382,11 +395,11 @@ export default {
     };
   },
   methods: {
-    click(index) {
+    click (index) {
       this.activeIndex = index;
       this.subIndex = null;
     },
-    subMenuShow(children, index) {
+    subMenuShow (children, index) {
       if (children) {
         this.isShowSubMenu = true;
         this.parentIndex = index;
@@ -396,18 +409,18 @@ export default {
       }
       this.subMenu = children;
     },
-    subMenuHide() {
+    subMenuHide () {
       this.isShowSubMenu = false;
       this.parentIndex = null;
       this.subMenu = [];
     },
-    subclick(index) {
+    subclick (index) {
       this.activeIndex = this.parentIndex;
       this.subIndex = index;
     },
   },
   computed: {
-    currentMenu() {
+    currentMenu () {
       let data = this.menuData.filter((t) => {
         return t.id == this.currRoot;
       })[0].data;
@@ -417,7 +430,7 @@ export default {
   watch: {
     // 监听路由
     $route: {
-      handler: function(val, oldVal) {
+      handler: function (val, oldVal) {
         this.menuData.some((element, index) => {
           if (val.path.includes(element.id)) {
             this.currRoot = element.id;

+ 166 - 178
src/views/performanceAnalysis/index.vue

@@ -1,76 +1,71 @@
 <template>
   <div class="draught-fan-list">
     <div class="query mg-b-8">
-			<div class="query-items">
-				<div class="query-item">
-					<div class="lable">场站:</div>
-					<div class="search-input">
-						<el-select v-model="wpId" clearable placeholder="请选择"
-							popper-class="select">
-							<el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
-						</el-select>
-					</div>
-				</div>
-				<div class="query-item">
-					<div class="lable">日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="recorddate" type="date"
-							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
-						</el-date-picker>
-					</div>
-				</div>
-			</div>
-			<div class="query-actions">
-				<button class="btn green" @click="search">查询</button>
-				<button class="btn green" @click="exportExcel">导出</button>
-			</div>
-		</div>
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select">
+              <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">日期:</div>
+          <div class="search-input">
+            <el-date-picker v-model="recorddate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+            </el-date-picker>
+          </div>
+        </div>
+      </div>
+      <div class="query-actions">
+        <button class="btn green" @click="search">查询</button>
+        <button class="btn green" @click="exportExcel">导出</button>
+      </div>
+    </div>
     <div class="df-table">
       <ComTable height="78vh" :data="tableData"></ComTable>
     </div>
-    <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal" :close-on-click-modal="true" @closed="dialogType = ''">
+    <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal"
+      :close-on-click-modal="true" @closed="dialogType = ''">
       <div class="query mg-b-8">
-			<div class="query-items">
-				<div class="query-item">
-					<div class="lable">场站:</div>
-					<div class="search-input">
-						<el-select v-model="wpId2" clearable placeholder="请选择"
-							popper-class="select" @change="reGetWtArray">
-							<el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
-						</el-select>
-					</div>
-				</div>
-        <div class="query-item">
-					<div class="lable">风机:</div>
-					<div class="search-input">
-						<el-select v-model="wtId" clearable placeholder="请选择"
-							popper-class="select">
-							<el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
-						</el-select>
-					</div>
-				</div>
-				<div class="query-item">
-					<div class="lable">开始日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="beginDate" type="date"
-							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
-						</el-date-picker>
-					</div>
-				</div>
-				<div class="query-item">
-					<div class="lable">结束日期:</div>
-					<div class="search-input">
-						<el-date-picker v-model="endDate" type="date"
-							value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
-						</el-date-picker>
-					</div>
-				</div>
-			</div>
-			<div class="query-actions">
-				<button class="btn green" @click="reGetHistoryTableData">查询</button>
-				<button class="btn green" @click="exportExcel2">导出</button>
-			</div>
-		</div>
+        <div class="query-items">
+          <div class="query-item">
+            <div class="lable">场站:</div>
+            <div class="search-input">
+              <el-select v-model="wpId2" clearable placeholder="请选择" popper-class="select" @change="reGetWtArray">
+                <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
+              </el-select>
+            </div>
+          </div>
+          <div class="query-item">
+            <div class="lable">风机:</div>
+            <div class="search-input">
+              <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
+                <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
+              </el-select>
+            </div>
+          </div>
+          <div class="query-item">
+            <div class="lable">开始日期:</div>
+            <div class="search-input">
+              <el-date-picker v-model="beginDate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+              </el-date-picker>
+            </div>
+          </div>
+          <div class="query-item">
+            <div class="lable">结束日期:</div>
+            <div class="search-input">
+              <el-date-picker v-model="endDate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
+              </el-date-picker>
+            </div>
+          </div>
+        </div>
+        <div class="query-actions">
+          <button class="btn green" @click="reGetHistoryTableData">查询</button>
+          <button class="btn green" @click="exportExcel2">导出</button>
+        </div>
+      </div>
       <ComTable height="78vh" :data="historyTableData"></ComTable>
     </el-dialog>
   </div>
@@ -84,34 +79,27 @@ export default {
 
   // 使用组件
   components: {
-   ComTable
+    ComTable
   },
 
   // 数据
-  data() {
+  data () {
     const that = this;
     return {
-      isAsc:"asc",
-      wpArray:[],
-      wtArray:[],
-      wpId:"",
-      wtId:"",
-      wpId2:"",
-      recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
-      beginDate:"",
-      endDate:"",
-      dialogShow:false,
+      isAsc: "asc",
+      wpArray: [],
+      wtArray: [],
+      wpId: "",
+      wtId: "",
+      wpId2: "",
+      recorddate: new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
+      beginDate: "",
+      endDate: "",
+      dialogShow: false,
 
       tableData: {
         column: [
           {
-            name: "风场",
-            field: "name",
-            is_num: false,
-            is_light: false,
-            sortable: true
-          },
-          {
             name: "风机",
             field: "windturbineid",
             is_num: false,
@@ -193,10 +181,10 @@ export default {
             field: "",
             is_num: false,
             is_light: false,
-            template() {
-								return "<el-button type='text' style='cursor: pointer;'>详情</el-button>";
-						},
-            click(e, row){
+            template () {
+              return "<el-button type='text' style='cursor: pointer;'>详情</el-button>";
+            },
+            click (e, row) {
               that.jumpUrl(row);
             }
           },
@@ -205,10 +193,10 @@ export default {
             field: "",
             is_num: false,
             is_light: false,
-            template() {
-								return "<el-button type='text' style='cursor: pointer;'>历史</el-button>";
-						},
-            click(e, row){
+            template () {
+              return "<el-button type='text' style='cursor: pointer;'>历史</el-button>";
+            },
+            click (e, row) {
               that.getOutputspeedHistoryList(row);
             }
           }
@@ -374,122 +362,122 @@ export default {
   // 函数
   methods: {
     // 请求服务
-    requestData() {
+    requestData () {
       let that = this;
       that.API.requestData({
         method: "GET",
         subUrl: "powercompare/windfarmAjax",
-        success(res) {
-          that.wpArray=res.data;
-          that.wpId=res.data[0].id;
+        success (res) {
+          that.wpArray = res.data;
+          that.wpId = res.data[0].id;
           that.getOutputSpeedList(that.wpId)
         }
       });
     },
 
-    getOutputSpeedList(wpId){
+    getOutputSpeedList (wpId) {
       let that = this;
-      if(!that.wpId || !that.recorddate){
+      if (!that.wpId || !that.recorddate) {
         that.BASE.showMsg({
-          msg:"场站与日期不可为空"
+          msg: "场站与日期不可为空"
         });
-      }else{
+      } else {
         that.API.requestData({
           method: "POST",
           subUrl: "goodness/windturbinegoodness",
-          data:{
+          data: {
             wpId,
-            isAsc:that.isAsc,
-            recorddate:that.recorddate
+            isAsc: that.isAsc,
+            recorddate: that.recorddate
           },
-          success(res) {
+          success (res) {
             that.tableData.data = res.data.list;
           }
         });
       }
-      
+
     },
 
-    getOutputspeedHistoryList (item){
+    getOutputspeedHistoryList (item) {
       let that = this;
 
       that.API.requestData({
-          method: "GET",
-          subUrl: "powercompare/windturbineAjax",
-          data:{
-            wpId: item.windtpowerstationid
-          },
-          success(res) {
-            that.wtArray=res.data;
-
-            that.wpId2 = item.windtpowerstationid;
-            that.wtId = item.windturbineid;
-            that.beginDate = (new Date().formatDate("yyyy-MM") + '-01');
-            that.endDate = new Date().formatDate("yyyy-MM-dd");
-
-            that.API.requestData({
-              method: "POST",
-              subUrl: "goodness/goodhistorylist",
-              data:{
-                wpId: that.wpId2,
-                wtId: that.wtId,
-                beginDate: that.beginDate,
-                endDate: that.endDate
-              },
-              success(res) {
-                res.data.forEach(ele=>{
-                  ele.time=new Date(ele.recorddate).formatDate("yyyy-MM-dd");
-                });
-                that.historyTableData.data = res.data;
-                that.dialogShow = true;
-              }
-            });
-          }
-        });
+        method: "GET",
+        subUrl: "powercompare/windturbineAjax",
+        data: {
+          wpId: item.windtpowerstationid
+        },
+        success (res) {
+          that.wtArray = res.data;
+
+          that.wpId2 = item.windtpowerstationid;
+          that.wtId = item.windturbineid;
+          that.beginDate = (new Date().formatDate("yyyy-MM") + '-01');
+          that.endDate = new Date().formatDate("yyyy-MM-dd");
+
+          that.API.requestData({
+            method: "POST",
+            subUrl: "goodness/goodhistorylist",
+            data: {
+              wpId: that.wpId2,
+              wtId: that.wtId,
+              beginDate: that.beginDate,
+              endDate: that.endDate
+            },
+            success (res) {
+              res.data.forEach(ele => {
+                ele.time = new Date(ele.recorddate).formatDate("yyyy-MM-dd");
+              });
+              that.historyTableData.data = res.data;
+              that.dialogShow = true;
+            }
+          });
+        }
+      });
     },
 
-    reGetWtArray(){
+    reGetWtArray () {
       let that = this;
       that.API.requestData({
-          method: "GET",
-          subUrl: "powercompare/windturbineAjax",
-          data:{
-            wpId: that.wpId2
-          },
-          success(res) {
-            that.wtArray=res.data;
-            that.wtId = res.data[0].id;
-          }
-        });
+        method: "GET",
+        subUrl: "powercompare/windturbineAjax",
+        data: {
+          wpId: that.wpId2
+        },
+        success (res) {
+          that.wtArray = res.data;
+          that.wtId = res.data[0].id;
+        }
+      });
     },
 
-    reGetHistoryTableData(){
-      let that=this;
-      if(!that.wpId2){
+    reGetHistoryTableData () {
+      let that = this;
+      if (!that.wpId2) {
         that.BASE.showMgs({
-          msg:"场站不可为空"
+          msg: "场站不可为空"
         });
-      }else if(!that.wtId){
+      } else if (!that.wtId) {
         that.BASE.showMgs({
-          msg:"风机不可为空"
+          msg: "风机不可为空"
         });
-      }else if(!that.beginDate || !that.endDate){
+      } else if (!that.beginDate || !that.endDate) {
         that.BASE.showMgs({
-          msg:"开始日期与结束日期不可为空"
+          msg: "开始日期与结束日期不可为空"
         });
-      }else{
+      } else {
         that.API.requestData({
           method: "POST",
           subUrl: "goodness/goodhistorylist",
-          data:{
+          data: {
             wpId: that.wpId2,
             wtId: that.wtId,
             beginDate: that.beginDate,
             endDate: that.endDate
           },
-          success(res) {
-            res.data.forEach(ele=>{
-              ele.time=new Date(ele.recorddate).formatDate("yyyy-MM-dd");
+          success (res) {
+            res.data.forEach(ele => {
+              ele.time = new Date(ele.recorddate).formatDate("yyyy-MM-dd");
             });
             that.historyTableData.data = res.data;
             that.dialogShow = true;
@@ -498,7 +486,7 @@ export default {
       }
     },
 
-    search(){
+    search () {
       this.getOutputSpeedList(this.wpId);
     },
 
@@ -506,15 +494,15 @@ export default {
     exportExcel () {
       let that = this;
       const { export_json_to_excel } = require('@tools/excel/Export2Excel.js'); // 注意这个Export2Excel路径      
-      
+
       // const tHeader = ['点名', '描述']; // 上面设置Excel的表格第一行的标题       
       // const filterVal = ['id', 'name']; // 上面的index、nickName、name是tableData里对象的属性key值   
-      
+
       let tHeader = []; // 上面设置Excel的表格第一行的标题       
       let filterVal = []; // 上面的index、nickName、name是tableData里对象的属性key值
 
-      that.tableData.column.forEach(ele=>{
-        if(ele.name !== "操作"){
+      that.tableData.column.forEach(ele => {
+        if (ele.name !== "操作") {
           tHeader.push(ele.name);
           filterVal.push(ele.field);
         }
@@ -529,15 +517,15 @@ export default {
     exportExcel2 () {
       let that = this;
       const { export_json_to_excel } = require('@tools/excel/Export2Excel.js'); // 注意这个Export2Excel路径      
-      
+
       // const tHeader = ['点名', '描述']; // 上面设置Excel的表格第一行的标题       
       // const filterVal = ['id', 'name']; // 上面的index、nickName、name是tableData里对象的属性key值   
-      
+
       let tHeader = []; // 上面设置Excel的表格第一行的标题       
       let filterVal = []; // 上面的index、nickName、name是tableData里对象的属性key值
 
-      that.historyTableData.column.forEach(ele=>{
-        if(ele.name !== "操作"){
+      that.historyTableData.column.forEach(ele => {
+        if (ele.name !== "操作") {
           tHeader.push(ele.name);
           filterVal.push(ele.field);
         }
@@ -553,18 +541,18 @@ export default {
     },
 
     // 页面跳转
-    jumpUrl(item){
-      this.$router.push(`/new/dj1/${item.windtpowerstationid}`);
+    jumpUrl (item) {
+      this.$router.push(`/performanceAnalysis/detail/${item.windtpowerstationid}/${item.windturbineid}`);
     }
   },
 
-  created() {
+  created () {
     this.requestData();
   },
 
-  mounted() {},
+  mounted () { },
 
-  unmounted() {},
+  unmounted () { },
 };
 </script>
 
@@ -592,7 +580,7 @@ export default {
     margin-top: 1.481vh;
 
     &:before {
-      content: "";
+      content: '';
       width: 0.37vh;
       height: 0.37vh;
       background: @write;

+ 1 - 1
src/views/realSearch/index.vue

@@ -15,7 +15,7 @@
           </div>
         </div>
         <div class="query-item">
-          <div class="lable">描述:</div>
+          <div class="lable"></div>
           <div class="search-input">
             <el-checkbox v-model="form.autoReq" label="刷新" border @change="reReqAjax"></el-checkbox>
           </div>

+ 8 - 1
src/views/singleAnalysis/index.vue

@@ -61,7 +61,10 @@ export default {
             field: "windturbineName",
             is_num: false,
             is_light: false,
-            sortable: true
+            sortable: true,
+            click(e, row){
+              that.goznzhfx(row)
+            }
           },
           {
             name: "实际发电量(万千瓦时)",
@@ -195,6 +198,10 @@ export default {
 
   // 函数
   methods: {
+    goznzhfx(row){
+      console.warn(row);
+      this.$router.push({path:`/new/znzhfx/${row.windturbineid}/${new Date(this.recorddate).formatDate("yyyy")}/${new Date(this.recorddate).formatDate("MM")}`})
+    },
     // 请求服务
     requestData() {
       let that = this;