Koishi il y a 3 ans
Parent
commit
a04af5bc3f

+ 425 - 432
src/components/chart/line/multiple-y-line-chart-normal.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="chart" :id="id"></div>
+  <div class="chart" :id="id"></div>
 </template>
 
 <script>
@@ -8,460 +8,453 @@ import partten from "@/helper/partten.js";
 import * as echarts from "echarts";
 
 export default {
-    name: "multiple-y-line-chart-normal",
-    componentName: "multiple-y-line-chart-normal",
-    props: {
-        width: {
-            type: String,
-            default: "100%",
+  name: "multiple-y-line-chart-normal",
+  componentName: "multiple-y-line-chart-normal",
+  props: {
+    width: {
+      type: String,
+      default: "100%",
+    },
+    height: {
+      type: String,
+      default: "13.889vh",
+    },
+    // 数据
+    list: {
+      type: Array,
+      default: () => [
+        {
+          title: "机舱震动x方向",
+          yAxisIndex: 0,
+          value: [
+            {
+              text: "-0.003",
+              value: -0.003,
+            },
+            {
+              text: "-0.002",
+              value: -0.002,
+            },
+            {
+              text: "-0.003",
+              value: -0.006,
+            },
+            {
+              text: "-0.003",
+              value: -0.003,
+            },
+            {
+              text: "-0.002",
+              value: -0.002,
+            },
+            {
+              text: "-0.003",
+              value: -0.006,
+            },
+            {
+              text: "-0.003",
+              value: -0.003,
+            },
+            {
+              text: "-0.002",
+              value: -0.002,
+            },
+            {
+              text: "-0.003",
+              value: -0.006,
+            },
+          ],
         },
-        height: {
-            type: String,
-            default: "13.889vh",
+        {
+          title: "机舱震动y方向",
+          yAxisIndex: 1,
+          value: [
+            {
+              text: "-0.01",
+              value: -0.01,
+            },
+            {
+              text: "-0.005",
+              value: -0.005,
+            },
+            {
+              text: "-0.008",
+              value: -0.008,
+            },
+            {
+              text: "-0.01",
+              value: -0.01,
+            },
+            {
+              text: "-0.005",
+              value: -0.005,
+            },
+            {
+              text: "-0.008",
+              value: -0.008,
+            },
+            {
+              text: "-0.01",
+              value: -0.01,
+            },
+            {
+              text: "-0.005",
+              value: -0.005,
+            },
+            {
+              text: "-0.008",
+              value: -0.008,
+            },
+          ],
         },
-        // 数据
-        list: {
-            type: Array,
-            default: () => [
-                {
-                    title: "机舱震动x方向",
-                    yAxisIndex: 0,
-                    value: [
-                        {
-                            text: "-0.003",
-                            value: -0.003,
-                        },
-                        {
-                            text: "-0.002",
-                            value: -0.002,
-                        },
-                        {
-                            text: "-0.003",
-                            value: -0.006,
-                        },
-                        {
-                            text: "-0.003",
-                            value: -0.003,
-                        },
-                        {
-                            text: "-0.002",
-                            value: -0.002,
-                        },
-                        {
-                            text: "-0.003",
-                            value: -0.006,
-                        },
-                        {
-                            text: "-0.003",
-                            value: -0.003,
-                        },
-                        {
-                            text: "-0.002",
-                            value: -0.002,
-                        },
-                        {
-                            text: "-0.003",
-                            value: -0.006,
-                        },
-                    ],
-                },
-                {
-                    title: "机舱震动y方向",
-                    yAxisIndex: 1,
-                    value: [
-                        {
-                            text: "-0.01",
-                            value: -0.01,
-                        },
-                        {
-                            text: "-0.005",
-                            value: -0.005,
-                        },
-                        {
-                            text: "-0.008",
-                            value: -0.008,
-                        },
-                        {
-                            text: "-0.01",
-                            value: -0.01,
-                        },
-                        {
-                            text: "-0.005",
-                            value: -0.005,
-                        },
-                        {
-                            text: "-0.008",
-                            value: -0.008,
-                        },
-                        {
-                            text: "-0.01",
-                            value: -0.01,
-                        },
-                        {
-                            text: "-0.005",
-                            value: -0.005,
-                        },
-                        {
-                            text: "-0.008",
-                            value: -0.008,
-                        },
-                    ],
-                },
-                {
-                    title: "机舱震动最大偏移值",
-                    yAxisIndex: 2,
-                    value: [
-                        {
-                            text: "1",
-                            value: 1,
-                        },
-                        {
-                            text: "0.05",
-                            value: 0.05,
-                        },
-                        {
-                            text: "0.5",
-                            value: 0.5,
-                        },
-                        {
-                            text: "1",
-                            value: 1,
-                        },
-                        {
-                            text: "0.05",
-                            value: 0.05,
-                        },
-                        {
-                            text: "0.5",
-                            value: 0.5,
-                        },
-                        {
-                            text: "1",
-                            value: 1,
-                        },
-                        {
-                            text: "0.05",
-                            value: 0.05,
-                        },
-                        {
-                            text: "0.5",
-                            value: 0.5,
-                        },
-                    ],
-                },
-                {
-                    title: "风速1",
-                    yAxisIndex: 3,
-                    value: [
-                        {
-                            text: "1",
-                            value: 1,
-                        },
-                        {
-                            text: "5",
-                            value: 5,
-                        },
-                        {
-                            text: "3",
-                            value: 1,
-                        },
-                        {
-                            text: "1",
-                            value: 1,
-                        },
-                        {
-                            text: "5",
-                            value: 5,
-                        },
-                        {
-                            text: "3",
-                            value: 1,
-                        },
-                        {
-                            text: "1",
-                            value: 1,
-                        },
-                        {
-                            text: "5",
-                            value: 5,
-                        },
-                        {
-                            text: "3",
-                            value: 1,
-                        },
-                    ],
-                },
-                {
-                    title: "风速2",
-                    yAxisIndex: 4,
-                    value: [
-                        {
-                            text: "1",
-                            value: 1,
-                        },
-                        {
-                            text: "2",
-                            value: 2,
-                        },
-                        {
-                            text: "3",
-                            value: 1,
-                        },
-                        {
-                            text: "1",
-                            value: 1,
-                        },
-                        {
-                            text: "2",
-                            value: 2,
-                        },
-                        {
-                            text: "3",
-                            value: 1,
-                        },
-                        {
-                            text: "1",
-                            value: 1,
-                        },
-                        {
-                            text: "2",
-                            value: 2,
-                        },
-                        {
-                            text: "3",
-                            value: 1,
-                        },
-                    ],
-                },
-            ],
+        {
+          title: "机舱震动最大偏移值",
+          yAxisIndex: 2,
+          value: [
+            {
+              text: "1",
+              value: 1,
+            },
+            {
+              text: "0.05",
+              value: 0.05,
+            },
+            {
+              text: "0.5",
+              value: 0.5,
+            },
+            {
+              text: "1",
+              value: 1,
+            },
+            {
+              text: "0.05",
+              value: 0.05,
+            },
+            {
+              text: "0.5",
+              value: 0.5,
+            },
+            {
+              text: "1",
+              value: 1,
+            },
+            {
+              text: "0.05",
+              value: 0.05,
+            },
+            {
+              text: "0.5",
+              value: 0.5,
+            },
+          ],
         },
-        showLegend: {
-            type: Boolean,
-            default: false,
+        {
+          title: "风速1",
+          yAxisIndex: 3,
+          value: [
+            {
+              text: "1",
+              value: 1,
+            },
+            {
+              text: "5",
+              value: 5,
+            },
+            {
+              text: "3",
+              value: 1,
+            },
+            {
+              text: "1",
+              value: 1,
+            },
+            {
+              text: "5",
+              value: 5,
+            },
+            {
+              text: "3",
+              value: 1,
+            },
+            {
+              text: "1",
+              value: 1,
+            },
+            {
+              text: "5",
+              value: 5,
+            },
+            {
+              text: "3",
+              value: 1,
+            },
+          ],
         },
-        // 轴
-        yAxises: {
-            type: Array,
-            default: () => [
-                {
-                    name: '机舱震动x方向',
-                    min: -0.01,
-                    max: 0,
-                    unit: "",
-                    position: "left",
-                },
-                {
-                    name: '机舱震动y方向',
-                    min: -0.01,
-                    max: 0,
-                    unit: "",
-                    position: "right",
-                },
-                {
-                    name: '机舱震动最大偏移值',
-                    min: 0,
-                    max: 1,
-                    unit: "",
-                    position: "left",
-                },
-                {
-                    name: '风速1',
-                    min: 0,
-                    max: 10,
-                    unit: "",
-                    position: "right",
-                },
-                {
-                    name: '风速2',
-                    min: 0,
-                    max: 10,
-                    unit: "",
-                    position: "left",
-                },
-            ],
+        {
+          title: "风速2",
+          yAxisIndex: 4,
+          value: [
+            {
+              text: "1",
+              value: 1,
+            },
+            {
+              text: "2",
+              value: 2,
+            },
+            {
+              text: "3",
+              value: 1,
+            },
+            {
+              text: "1",
+              value: 1,
+            },
+            {
+              text: "2",
+              value: 2,
+            },
+            {
+              text: "3",
+              value: 1,
+            },
+            {
+              text: "1",
+              value: 1,
+            },
+            {
+              text: "2",
+              value: 2,
+            },
+            {
+              text: "3",
+              value: 1,
+            },
+          ],
         },
+      ],
     },
-    data() {
-        return {
-            id: "",
-            chart: null,
-            color: ["#323E6F", "#1DA0D7", "#05BB4C", "#EDB32F", "#DB5520"],
-        };
+    showLegend: {
+      type: Boolean,
+      default: false,
     },
-    computed: {
-        legend() {
-            return this.list.map((t) => {
-                return t.title;
-            });
+    // 轴
+    yAxises: {
+      type: Array,
+      default: () => [
+        {
+          name: "机舱震动x方向",
+          min: -0.01,
+          max: 0,
+          unit: "",
+          position: "left",
         },
-        xdata() {
-            console.log('this.list[0].value:',this.list)
-            return this.list[0]?.value.map((t) => {
-                return t.text;
-            });
+        {
+          name: "机舱震动y方向",
+          min: -0.01,
+          max: 0,
+          unit: "",
+          position: "right",
         },
-        yAxis() {
-            let result = [];
-            let p = {left: 0, right: 0};
-            this.yAxises.forEach((item, index) => {
-                console.log('yitem:',item)
-                result.push({
-                    type: "value",
-                    name: `${item.name}${item.unit}`,
-                    nameLocation: p[item.position] % 2 == 0 ? "end" : "start",
-                    nameGap: 10,
-                    min: item.min,
-                    max: item.max,
-                    position: item.position,
-                    offset: p[item.position] * 50,
-                    axisLabel: {
-                        formatter: "{value}",
-                        fontSize: 12,
-                    },
-                    //分格线
-                    splitLine: {
-                        lineStyle: {
-                            color: partten.getColor("gray"),
-                            type: "dashed",
-                        },
-                    },
-                    axisLine: {
-                      show: true,
-                    },
-                    axisTick: {
-                      show: true
-                    }
-                });
-                p[item.position]++;
-            });
-console.log('yResult:',result)
-            return result;
-            
+        {
+          name: "机舱震动最大偏移值",
+          min: 0,
+          max: 1,
+          unit: "",
+          position: "left",
         },
-        series() {
-            let result = [];
-           console.log('list:',this.list)
-            this.list.forEach((value, index) => {
-                console.log('seriesValue:',value)
-                console.log('seriesIndex:',index)
-                result.push({
-                    name: value.title,
-                    type: "line",
-                    smooth: true,
-                    zlevel: index,
-                    lineStyle: {
-                        normal: {
-                            color: this.color[index],
-                            width: 1,
-                        },
-                    },
-                    showSymbol: false,
-                    yAxisIndex: value.yAxisIndex,
-                    data: value.value.map((t) => {
-                        return t.value;
-                    }),
-                });
-            });
-
-            return result;
+        {
+          name: "风速1",
+          min: 0,
+          max: 10,
+          unit: "",
+          position: "right",
         },
-    },
-    methods: {
-        resize() {},
-        initChart() {
-            const chart = echarts.init(this.$el);
-
-            let option = this.option();
-            chart.clear();
-          
-            chart.setOption(option);
-            this.resize = function() {
-                chart.resize();
-            };
-
-            window.addEventListener("resize", this.resize);
-        },
-        option: function () {
-            return {
-                color: this.color,
-                tooltip: {
-                    trigger: "axis",
-                    backgroundColor: "rgba(0,0,0,0.4)",
-                    borderColor: partten.getColor("gray"),
-                    textStyle: {
-                        color: "#fff",
-                        fontSize: 12,
-                    },
-                },
-                legend: {
-                    show: this.showLegend,
-                    data: this.legend,
-                    top: 'top',
-                    icon: "circle",
-                    itemWidth: 6,
-                    inactiveColor: partten.getColor("gray"),
-                    textStyle: {
-                        color: partten.getColor("grayl"),
-                        fontSize: 12,
-                    },
-                },
-                grid: {
-                    top: 27,
-                    left: 16,
-                    right: 16,
-                    bottom: 0,
-                    containLabel: true,
-                },
-                xAxis: [
-                    {
-                        type: "category",
-                        boundaryGap: false,
-                        axisLabel: {
-                            formatter: "{value}",
-                            fontSize: 12,
-                            textStyle: {
-                                color: partten.getColor("gray"),
-                            },
-                        },
-                        data: this.xdata,
-                    },
-                ],
-                yAxis: this.yAxis,
-                series: this.series,
-            };
-        },
-        reload: function () {
-            const chart = echarts.getInstanceByDom(this.$el);
-            chart.clear();
-            let option = this.option();
-            chart.setOption(option);
+        {
+          name: "风速2",
+          min: 0,
+          max: 10,
+          unit: "",
+          position: "left",
         },
+      ],
+    },
+  },
+  data() {
+    return {
+      id: "",
+      chart: null,
+      color: ["#323E6F", "#1DA0D7", "#05BB4C", "#EDB32F", "#DB5520"],
+    };
+  },
+  computed: {
+    legend() {
+      return this.list.map((t) => {
+        return t && t.title;
+      });
     },
-    created() {
-        this.id = "pie-chart-" + util.newGUID();
+    xdata() {
+      return this.list[0]?.value.map((t) => {
+        return t.text;
+      });
     },
-    mounted() {
-        this.$nextTick(() => {
-            this.$el.style.width = this.width;
-            this.$el.style.height = this.height;
-            this.initChart();
+    yAxis() {
+      let result = [];
+      let p = { left: 0, right: 0 };
+      this.yAxises.forEach((item, index) => {
+        result.push({
+          type: "value",
+          name: `${item.name}${item.unit}`,
+          nameLocation: p[item.position] % 2 == 0 ? "end" : "start",
+          nameGap: 10,
+          min: item.min,
+          max: item.max,
+          position: item.position,
+          offset: p[item.position] * 50,
+          axisLabel: {
+            formatter: "{value}",
+            fontSize: 12,
+          },
+          //分格线
+          splitLine: {
+            lineStyle: {
+              color: partten.getColor("gray"),
+              type: "dashed",
+            },
+          },
+          axisLine: {
+            show: true,
+          },
+          axisTick: {
+            show: true,
+          },
         });
+        p[item.position]++;
+      });
+      return result;
     },
-    updated() {
-        this.$nextTick(() => {
-            this.initChart();
+    series() {
+      let result = [];
+      this.list.forEach((value, index) => {
+        result.push({
+          name: value.title,
+          type: "line",
+          smooth: true,
+          zlevel: index,
+          lineStyle: {
+            normal: {
+              color: this.color[index],
+              width: 1,
+            },
+          },
+          showSymbol: false,
+          yAxisIndex: value.yAxisIndex,
+          data: value.value.map((t) => {
+            return t.value;
+          }),
         });
+      });
+
+      return result;
+    },
+  },
+  methods: {
+    resize() {},
+    initChart() {
+      const chart = echarts.init(this.$el);
+
+      let option = this.option();
+      chart.clear();
+
+      chart.setOption(option);
+      this.resize = function () {
+        chart.resize();
+      };
+
+      window.addEventListener("resize", this.resize);
+    },
+    option: function () {
+      return {
+        color: this.color,
+        tooltip: {
+          trigger: "axis",
+          backgroundColor: "rgba(0,0,0,0.4)",
+          borderColor: partten.getColor("gray"),
+          textStyle: {
+            color: "#fff",
+            fontSize: 12,
+          },
+        },
+        legend: {
+          show: this.showLegend,
+          data: this.legend,
+          top: "top",
+          icon: "circle",
+          itemWidth: 6,
+          inactiveColor: partten.getColor("gray"),
+          textStyle: {
+            color: partten.getColor("grayl"),
+            fontSize: 12,
+          },
+        },
+        grid: {
+          top: 27,
+          left: 16,
+          right: 16,
+          bottom: 0,
+          containLabel: true,
+        },
+        xAxis: [
+          {
+            type: "category",
+            boundaryGap: false,
+            axisLabel: {
+              formatter: "{value}",
+              fontSize: 12,
+              textStyle: {
+                color: partten.getColor("gray"),
+              },
+            },
+            data: this.xdata,
+          },
+        ],
+        yAxis: this.yAxis,
+        series: this.series,
+      };
     },
-    unmounted() {
-        window.removeEventListener("resize", this.resize);
+    reload: function () {
+      const chart = echarts.getInstanceByDom(this.$el);
+      chart.clear();
+      let option = this.option();
+      chart.setOption(option);
     },
+  },
+  created() {
+    this.id = "pie-chart-" + util.newGUID();
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.$el.style.width = this.width;
+      this.$el.style.height = this.height;
+      this.initChart();
+    });
+  },
+  updated() {
+    this.$nextTick(() => {
+      this.initChart();
+    });
+  },
+  unmounted() {
+    window.removeEventListener("resize", this.resize);
+  },
 };
 </script>
 
 <style lang="less">
 .chart {
-    width: 100%;
-    height: 100%;
-    display: inline-block;
+  width: 100%;
+  height: 100%;
+  display: inline-block;
 }
 </style>

+ 10 - 0
src/router/index.js

@@ -395,6 +395,16 @@ const routes = [{
 	component: () => import("../views/HealthControl/assess/assessconfig.vue")
 },
 {
+	path: "/health/zhpj/yxpj",//运行评价
+	name: "yxpj",
+	component: () => import("../views/HealthControl/zhpj/yxpj.vue")
+},
+{
+	path: "/health/zhpj/jxpj",//检修评价
+	name: "jxpj",
+	component: () => import("../views/HealthControl/zhpj/jxpj.vue")
+},
+{
 	path: "/health/gzzd/malfunctionDiagnose", // 故障诊断
 	name: "malfunctionDiagnose",
 	component: () => import("../views/malfunctionDiagnose/index.vue")

+ 136 - 0
src/views/HealthControl/zhpj/dayinfo.vue

@@ -0,0 +1,136 @@
+<template>
+	<div class="health-day-info">
+		<div class="header">
+			<span class="herder-info" :width="800" v-for="item of gridDatas" :key="item">场站:{{ item.wpid }}</span>
+			<span class="herder-info">基础指标</span>
+		</div>
+		<div class="body">
+			<div class="left">
+				<table class="table-form">
+					<tr>
+						<td class="white" v-for="item of gridDatas" :key="item">
+							等级:{{ item.grade }}
+						</td>
+					</tr>
+					<tr>
+						<td class="white" v-for="item of gridDatas" :key="item">
+							综合排名:{{ item.zpm }}
+						</td>
+					</tr>
+				</table>
+
+				<div class="chart-body">
+					<normal-radar-chart :height="'500px'" :value="chartDatas" />
+				</div>
+			</div>
+			<div class="left">
+				<table class="table-form">
+					<tr>
+						<td class="white">指标</td>
+						<td class="white" v-for="item of gridDatas" :key="item">
+							{{ item.wpid }}
+						</td>
+						<td class="white" :colspan="gridDatas.length">排名</td>
+						<td class="white" colspan="2">评分</td>
+					</tr>
+					<tr v-for="item of column" :key="item">
+						<td class="white">{{ item.name }}</td>
+						<td class="white" v-for="row of gridDatas" :key="row">
+							{{ row[item.field] }}
+						</td>
+						<td class="white" v-for="row of gridDatas" :key="row">
+							{{ row[item.rank] }}
+						</td>
+						<td class="white" v-for="row of gridDatas" :key="row">
+							{{ row[item.score] ? row[item.score] : 0 }}
+						</td>
+					</tr>
+				</table>
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+	import NormalRadarChart from "../../../components/chart/radar/normal-radar-chart.vue";
+	export default {
+		components: {
+			NormalRadarChart
+		},
+		props: {
+			gridDatas: {},
+			chartDatas: {},
+			column: []
+		},
+		data() {
+			return {
+				value: "",
+				radarValue: [{
+					indicator: [
+						"复位及时率(%)", "mttf", "缺陷下单及时率(%)", "缺陷验收及时率(%)", "设备利用小时", "限电损失率(%)", "性能损失率(%)",
+						"综合场用电量", "状态转换及时率(%)"
+					],
+					data: [{
+							value: [
+								44200, 14200, 20000, 35000, 50000, 38000, 44200, 14200, 20000,
+								35000,
+							],
+							name: "NAME1",
+						},
+						{
+							value: [
+								35000, 44200, 14200, 20000, 35000, 50000, 38000, 44200, 14200,
+								20000,
+							],
+							name: "NAME2",
+						},
+					],
+				}, ],
+			};
+		},
+	};
+</script>
+
+<style lang="less">
+	.health-day-info {
+		.header {
+			display: flex;
+			width: 100%;
+			height: 40px;
+			line-height: 40px;
+			background: fade(@gray, 60);
+			color: @white;
+
+			.herder-info {
+				flex: 1 0 25%;
+				text-align: center;
+				font-size: @fontsize-s;
+
+				&:last-child {
+					flex: 1 0 50%;
+				}
+			}
+		}
+
+		.body {
+			display: flex;
+
+			.left {
+				flex: 0 0 50%;
+
+				display: flex;
+				flex-direction: column;
+
+				.chart-body {
+					flex-grow: 1;
+					display: flex;
+					align-items: center;
+				}
+			}
+
+			.right {
+				flex: 0 0 50%;
+			}
+		}
+	}
+</style>

+ 441 - 0
src/views/HealthControl/zhpj/jxpj.vue

@@ -0,0 +1,441 @@
+<template>
+	<div>
+		<div class="query mg-b-8">
+			<div class="query-items">
+				<div class="query-item">
+					<div class="lable">年月:</div>
+					<div class="search-input">
+						<el-date-picker v-model="date" type="month" placeholder="选择年月" popper-class="date-select"
+							value-format="YYYY-MM"></el-date-picker>
+					</div>
+				</div>
+				<div class="query-actions">
+					<button class="btn green" @click="handleSubmit">查询</button>
+					<button class="btn green" @click="contrast">对比</button>
+				</div>
+			</div>
+		</div>
+		<div class="table-box">
+			<div class="title">运行评价</div>
+			<ComTable ref="curRef" :data="tableData" :pageSize="20" :pageable="false" height="73vh"
+				v-loading="tableLoading" element-loading-text="拼命加载中.." element-loading-background="rgba(0, 0, 0, 0.8)">
+			</ComTable>
+		</div>
+		<el-dialog title="运行评价对比" v-model="dialogVisible" width="70%" top="10vh" custom-class="modal">
+			<dayinfo :gridDatas="dialogData1" :chartDatas="dialogData2" :column='column' />
+		</el-dialog>
+	</div>
+</template>
+<script>
+	import ComTable from "@/components/coms/table/table-unpage.vue";
+	import Dayinfo from "./dayinfo.vue";
+
+	export default {
+		name: "gradeassessment",
+		components: {
+			ComTable,
+			Dayinfo
+		},
+		data() {
+			let that = this;
+			return {
+				dialogVisible: false,
+				date: "",
+				tableLoading: true,
+				dataIds: new Set(),
+				dialogData1: [],
+				dialogData2: [],
+				column: [],
+				indicator: ["复位及时率(%)", "mttf", "缺陷下单及时率(%)", "缺陷验收及时率(%)", "设备利用小时", "限电损失率(%)","性能损失率(%)", "综合场用电量", "状态转换及时率(%)"],
+				tableData: {
+					column: [{
+							name: "",
+							field: "fj",
+							is_num: false,
+							is_light: false,
+							sortable: false,
+							width: '70px',
+							template: () => {
+								return "<input class='check curCheckBox checkItem' type='CheckBox'/>";
+							},
+							click: function(event, data) {
+								if (event.target.checked == false) {
+									that.dataIds.delete(data.id);
+								}
+								if (event.target.checked) {
+									if (that.dataIds.size < 2) {
+										that.dataIds.add(data.id);
+									} else {
+										event.target.checked = false;
+									}
+								}
+							},
+						},
+						{
+							name: "场站",
+						 field: "wpid",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "综合排名",
+							field: "zpm",
+							is_num: false,
+							is_light: false,
+							width: '100px',
+						},
+						{
+							name: "等级",
+							field: "grade",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+							width: '70px',
+						},
+						{
+						 name: "风能利用率(%)",
+							field: "fnlyl",
+						 is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "复位及时率(%)",
+							field: "fwjsl",
+							is_num: false,
+							is_light: false,
+						 sortable: true,
+						},
+						{
+							name: "mttf",
+							field: "mttf",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "平均小风切入风速",
+							field: "pjxfqrfs",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+
+						{
+							name: "缺陷下单及时率(%)",
+						 field: "qxxdjsl",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "缺陷验收及时率(%)",
+							field: "qxysjsl",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "设备利用小时",
+							field: "sblyxs",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "限电损失率(%)",
+							field: "xdssl",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "性能损失率(%)",
+							field: "xnssl",
+							is_num: false,
+							is_light: false,
+						 sortable: true,
+						},
+						{
+							name: "综合场用电量",
+							field: "zhcydl",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "状态转换及时率(%)",
+							field: "ztzhjsl",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+						  name: "操作",
+						  field: "sjbz",
+						  is_num: false,
+						  is_light: false,
+						  sortable: true,
+						  id: "id",
+						  template: () => {
+						    return "<el-button type='text' style='cursor: pointer;'>详情</el-button>";
+						  },
+						  click: function (event, data) {
+							  that.contrast(that.dataIds.add(data.id))
+						  },
+						},
+					],
+					data: [],
+				},
+			};
+		},
+		created() {
+			this.date = this.getDate();
+			this.getTable(this.date);
+		},
+		methods: {
+			clearCheckBox() {
+				this.$refs.curRef.clearCheckBox();
+				this.dataIds = new Set();
+			},
+			// 获取表格数据
+			getTable() {
+				let that = this;
+				that.tableLoading = true;
+				that.API.requestData({
+					timeout: 60000,
+					method: "GET",
+					baseURL: "http://10.155.32.4:8034",
+					subUrl: '/evaluation/maintenance',
+					data: {
+						month: that.date
+					},
+					success(res) {
+						that.tableLoading = false;
+						if (res.code === 200) {
+							var data = [];
+							res.data.forEach((item, index) => {
+								item["index"] = index;
+								data[index] = item;
+							});
+							that.tableData.data = data;
+						}
+					},
+					Error(res) {
+						console.log("tag", res);
+					},
+				});
+			},
+			// 查询
+			handleSubmit() {
+				this.clearCheckBox();
+				this.getTable(this.date);
+			},
+			// 日信息对比
+			contrast(one) {
+				var that = this;
+				if (that.dataIds.size == 2 || one) {
+					that.dialogVisible = true;
+					const tmpArr = Array.from(that.dataIds);
+					if(one){
+						const data = {
+							gaid1: tmpArr[0]
+						};
+					}else{
+						const data = {
+							gaid1: tmpArr[0],
+							gaid2: tmpArr[1],
+						};
+					}
+					const dialogData1 = [];
+					that.tableData.data.forEach(ele => {
+						tmpArr.forEach(ele2 => {
+							if (ele.id == ele2) {
+								dialogData1.push(ele)
+							}
+						})
+					})
+					that.dialogData1 = dialogData1;
+					const chartData = [{
+						indicator: that.indicator,
+						data: [],
+					}];
+					const data1 = [],
+						data2 = [];
+					let column = [];
+					chartData[0].indicator.forEach(ele => {
+						that.tableData.column.forEach(ele2 => {
+							if (ele2.name == ele) {
+								column.push({
+									name: ele,
+									field: ele2.field,
+									rank: ele2.field + 'pm',
+									score: ele2.field + 'pf'
+								})
+								let data1Name = '',data2Name = '';
+								dialogData1.forEach((ele3, index3) => {
+									if (index3 == 0) {
+										data1.push({
+											name: ele,
+											data1: ele3[ele2.field]
+										})
+										data1Name = ele3.wpid
+									}
+									
+									if(that.dataIds.size == 2){
+										if (index3 == 1) {
+											data2.push({
+												name: ele,
+												data1: ele3[ele2.field]
+											})
+											data2Name = ele3.wpid
+										}
+									}
+								})
+								data1.push({name: data1Name});
+								if(that.dataIds.size == 2){
+									data2.push({name: data2Name});
+								}
+							}
+						})
+					})
+					that.column = column;
+					if (data1) {
+						chartData[0].data.push(that.getChartData(data1,chartData[0].indicator));
+					}
+					if(that.dataIds.size == 2){
+						if (data2) {
+							chartData[0].data.push(that.getChartData(data2,chartData[0].indicator));
+						}
+					}
+					that.dialogData2 = chartData;
+				}
+				this.clearCheckBox();
+			},
+			getChartData(resData,indicator) {
+				const chartData = {};
+				const rowMap = {};
+				resData.forEach(function(rowData, index) {
+					rowMap[rowData["name"]] = rowData["data1"];
+				});
+				chartData["name"] = resData[resData.length - 1]["name"];
+				chartData["value"] = [];
+				indicator.forEach(ele=>{
+					chartData["value"].push(rowMap[ele]);
+				})
+				return chartData;
+			},
+			// 获取日期
+			getDate() {
+				var date = new Date();
+				var year = date.getFullYear(),
+					month = date.getMonth() + 1,
+					day = date.getDate() - 1;
+				month >= 1 && month <= 9 ? (month = "0" + month) : "";
+				day >= 0 && day <= 9 ? (day = "0" + day) : "";
+				return year + "-" + month;
+			},
+		},
+	};
+</script>
+<style scoped>
+	.newsDiv {
+		color: rgba(255, 255, 255, 0.75);
+		background-color: rgba(255, 255, 255, 0.1);
+		margin-bottom: 8px;
+		line-height: 3.4259vh;
+		padding: 0 15px;
+	}
+
+	.newspan {
+		line-height: 30px;
+		cursor: pointer;
+		padding: 0 1vw;
+		margin: 0 2px;
+		color: #9ca5a8;
+		transition: color 0.2s ease-in-out;
+		position: relative;
+	}
+
+	.newspan:hover {
+		background: linear-gradient(to top,
+				rgba(5, 187, 76, 0.5),
+				rgba(5, 187, 76, 0));
+		color: white;
+		position: relative;
+	}
+
+	.newspan:hover::after {
+		content: "";
+		position: absolute;
+		width: 100%;
+		height: 0.463vh;
+		border: 0.093vh solid #05bb4c;
+		border-top: 0;
+		left: 0;
+		bottom: 0;
+		box-sizing: border-box;
+	}
+
+	.active {
+		background: linear-gradient(to top,
+				rgba(5, 187, 76, 0.5),
+				rgba(5, 187, 76, 0));
+		color: white;
+		position: relative;
+	}
+
+	.active::after {
+		content: "";
+		position: absolute;
+		width: 100%;
+		height: 0.463vh;
+		border: 0.093vh solid #05bb4c;
+		border-top: 0;
+		left: 0;
+		bottom: 0;
+		box-sizing: border-box;
+	}
+
+	.title {
+		background: rgba(255, 255, 255, 0.1);
+		margin-bottom: 8px;
+		padding: 1vh;
+	}
+</style>
+<style lang="less">
+	.decision-page-2 {
+		.content .project-table {
+			tbody {
+				height: calc(100vh - 24.5vh);
+			}
+		}
+
+		.project-table {
+			overflow: auto;
+
+			tbody {
+				height: 239px;
+			}
+
+			th,
+			td {
+				color: #b2bdc0;
+
+				&:nth-child(1) {
+					width: 50px;
+				}
+
+				&:nth-child(2) {
+					width: 50px;
+				}
+			}
+		}
+
+		.action {
+			text-decoration: underline;
+			color: @green;
+			cursor: pointer;
+		}
+	}
+</style>

+ 441 - 0
src/views/HealthControl/zhpj/yxpj.vue

@@ -0,0 +1,441 @@
+<template>
+	<div>
+		<div class="query mg-b-8">
+			<div class="query-items">
+				<div class="query-item">
+					<div class="lable">年月:</div>
+					<div class="search-input">
+						<el-date-picker v-model="date" type="month" placeholder="选择年月" popper-class="date-select"
+							value-format="YYYY-MM"></el-date-picker>
+					</div>
+				</div>
+				<div class="query-actions">
+					<button class="btn green" @click="handleSubmit">查询</button>
+					<button class="btn green" @click="contrast">对比</button>
+				</div>
+			</div>
+		</div>
+		<div class="table-box">
+			<div class="title">运行评价</div>
+			<ComTable ref="curRef" :data="tableData" :pageSize="20" :pageable="false" height="73vh"
+				v-loading="tableLoading" element-loading-text="拼命加载中.." element-loading-background="rgba(0, 0, 0, 0.8)">
+			</ComTable>
+		</div>
+		<el-dialog title="运行评价对比" v-model="dialogVisible" width="70%" top="10vh" custom-class="modal">
+			<dayinfo :gridDatas="dialogData1" :chartDatas="dialogData2" :column='column' />
+		</el-dialog>
+	</div>
+</template>
+<script>
+	import ComTable from "@/components/coms/table/table-unpage.vue";
+	import Dayinfo from "./dayinfo.vue";
+
+	export default {
+		name: "gradeassessment",
+		components: {
+			ComTable,
+			Dayinfo
+		},
+		data() {
+			let that = this;
+			return {
+				dialogVisible: false,
+				date: "",
+				tableLoading: true,
+				dataIds: new Set(),
+				dialogData1: [],
+				dialogData2: [],
+				column: [],
+				indicator: ["复位及时率(%)", "mttf", "缺陷下单及时率(%)", "缺陷验收及时率(%)", "设备利用小时", "限电损失率(%)","性能损失率(%)", "综合场用电量", "状态转换及时率(%)"],
+				tableData: {
+					column: [{
+							name: "",
+							field: "fj",
+							is_num: false,
+							is_light: false,
+							sortable: false,
+							width: '70px',
+							template: () => {
+								return "<input class='check curCheckBox checkItem' type='CheckBox'/>";
+							},
+							click: function(event, data) {
+								if (event.target.checked == false) {
+									that.dataIds.delete(data.id);
+								}
+								if (event.target.checked) {
+									if (that.dataIds.size < 2) {
+										that.dataIds.add(data.id);
+									} else {
+										event.target.checked = false;
+									}
+								}
+							},
+						},
+						{
+							name: "场站",
+						 field: "wpid",
+							is_num: false,
+							is_light: false,
+						},
+						{
+							name: "综合排名",
+							field: "zpm",
+							is_num: false,
+							is_light: false,
+							width: '100px',
+						},
+						{
+							name: "等级",
+							field: "grade",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+							width: '70px',
+						},
+						{
+						 name: "风能利用率(%)",
+							field: "fnlyl",
+						 is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "复位及时率(%)",
+							field: "fwjsl",
+							is_num: false,
+							is_light: false,
+						 sortable: true,
+						},
+						{
+							name: "mttf",
+							field: "mttf",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "平均小风切入风速",
+							field: "pjxfqrfs",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+
+						{
+							name: "缺陷下单及时率(%)",
+						 field: "qxxdjsl",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "缺陷验收及时率(%)",
+							field: "qxysjsl",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "设备利用小时",
+							field: "sblyxs",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "限电损失率(%)",
+							field: "xdssl",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "性能损失率(%)",
+							field: "xnssl",
+							is_num: false,
+							is_light: false,
+						 sortable: true,
+						},
+						{
+							name: "综合场用电量",
+							field: "zhcydl",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+							name: "状态转换及时率(%)",
+							field: "ztzhjsl",
+							is_num: false,
+							is_light: false,
+							sortable: true,
+						},
+						{
+						  name: "操作",
+						  field: "sjbz",
+						  is_num: false,
+						  is_light: false,
+						  sortable: true,
+						  id: "id",
+						  template: () => {
+						    return "<el-button type='text' style='cursor: pointer;'>详情</el-button>";
+						  },
+						  click: function (event, data) {
+							  that.contrast(that.dataIds.add(data.id))
+						  },
+						},
+					],
+					data: [],
+				},
+			};
+		},
+		created() {
+			this.date = this.getDate();
+			this.getTable(this.date);
+		},
+		methods: {
+			clearCheckBox() {
+				this.$refs.curRef.clearCheckBox();
+				this.dataIds = new Set();
+			},
+			// 获取表格数据
+			getTable() {
+				let that = this;
+				that.tableLoading = true;
+				that.API.requestData({
+					timeout: 60000,
+					method: "GET",
+					baseURL: "http://10.155.32.4:8034",
+					subUrl: '/evaluation/operation',
+					data: {
+						month: that.date
+					},
+					success(res) {
+						that.tableLoading = false;
+						if (res.code === 200) {
+							var data = [];
+							res.data.forEach((item, index) => {
+								item["index"] = index;
+								data[index] = item;
+							});
+							that.tableData.data = data;
+						}
+					},
+					Error(res) {
+						console.log("tag", res);
+					},
+				});
+			},
+			// 查询
+			handleSubmit() {
+				this.clearCheckBox();
+				this.getTable(this.date);
+			},
+			// 日信息对比
+			contrast(one) {
+				var that = this;
+				if (that.dataIds.size == 2 || one) {
+					that.dialogVisible = true;
+					const tmpArr = Array.from(that.dataIds);
+					if(one){
+						const data = {
+							gaid1: tmpArr[0]
+						};
+					}else{
+						const data = {
+							gaid1: tmpArr[0],
+							gaid2: tmpArr[1],
+						};
+					}
+					const dialogData1 = [];
+					that.tableData.data.forEach(ele => {
+						tmpArr.forEach(ele2 => {
+							if (ele.id == ele2) {
+								dialogData1.push(ele)
+							}
+						})
+					})
+					that.dialogData1 = dialogData1;
+					const chartData = [{
+						indicator: that.indicator,
+						data: [],
+					}];
+					const data1 = [],
+						data2 = [];
+					let column = [];
+					chartData[0].indicator.forEach(ele => {
+						that.tableData.column.forEach(ele2 => {
+							if (ele2.name == ele) {
+								column.push({
+									name: ele,
+									field: ele2.field,
+									rank: ele2.field + 'pm',
+									score: ele2.field + 'pf'
+								})
+								let data1Name = '',data2Name = '';
+								dialogData1.forEach((ele3, index3) => {
+									if (index3 == 0) {
+										data1.push({
+											name: ele,
+											data1: ele3[ele2.field]
+										})
+										data1Name = ele3.wpid
+									}
+									
+									if(that.dataIds.size == 2){
+										if (index3 == 1) {
+											data2.push({
+												name: ele,
+												data1: ele3[ele2.field]
+											})
+											data2Name = ele3.wpid
+										}
+									}
+								})
+								data1.push({name: data1Name});
+								if(that.dataIds.size == 2){
+									data2.push({name: data2Name});
+								}
+							}
+						})
+					})
+					that.column = column;
+					if (data1) {
+						chartData[0].data.push(that.getChartData(data1,chartData[0].indicator));
+					}
+					if(that.dataIds.size == 2){
+						if (data2) {
+							chartData[0].data.push(that.getChartData(data2,chartData[0].indicator));
+						}
+					}
+					that.dialogData2 = chartData;
+				}
+				this.clearCheckBox();
+			},
+			getChartData(resData,indicator) {
+				const chartData = {};
+				const rowMap = {};
+				resData.forEach(function(rowData, index) {
+					rowMap[rowData["name"]] = rowData["data1"];
+				});
+				chartData["name"] = resData[resData.length - 1]["name"];
+				chartData["value"] = [];
+				indicator.forEach(ele=>{
+					chartData["value"].push(rowMap[ele]);
+				})
+				return chartData;
+			},
+			// 获取日期
+			getDate() {
+				var date = new Date();
+				var year = date.getFullYear(),
+					month = date.getMonth() + 1,
+					day = date.getDate() - 1;
+				month >= 1 && month <= 9 ? (month = "0" + month) : "";
+				day >= 0 && day <= 9 ? (day = "0" + day) : "";
+				return year + "-" + month;
+			},
+		},
+	};
+</script>
+<style scoped>
+	.newsDiv {
+		color: rgba(255, 255, 255, 0.75);
+		background-color: rgba(255, 255, 255, 0.1);
+		margin-bottom: 8px;
+		line-height: 3.4259vh;
+		padding: 0 15px;
+	}
+
+	.newspan {
+		line-height: 30px;
+		cursor: pointer;
+		padding: 0 1vw;
+		margin: 0 2px;
+		color: #9ca5a8;
+		transition: color 0.2s ease-in-out;
+		position: relative;
+	}
+
+	.newspan:hover {
+		background: linear-gradient(to top,
+				rgba(5, 187, 76, 0.5),
+				rgba(5, 187, 76, 0));
+		color: white;
+		position: relative;
+	}
+
+	.newspan:hover::after {
+		content: "";
+		position: absolute;
+		width: 100%;
+		height: 0.463vh;
+		border: 0.093vh solid #05bb4c;
+		border-top: 0;
+		left: 0;
+		bottom: 0;
+		box-sizing: border-box;
+	}
+
+	.active {
+		background: linear-gradient(to top,
+				rgba(5, 187, 76, 0.5),
+				rgba(5, 187, 76, 0));
+		color: white;
+		position: relative;
+	}
+
+	.active::after {
+		content: "";
+		position: absolute;
+		width: 100%;
+		height: 0.463vh;
+		border: 0.093vh solid #05bb4c;
+		border-top: 0;
+		left: 0;
+		bottom: 0;
+		box-sizing: border-box;
+	}
+
+	.title {
+		background: rgba(255, 255, 255, 0.1);
+		margin-bottom: 8px;
+		padding: 1vh;
+	}
+</style>
+<style lang="less">
+	.decision-page-2 {
+		.content .project-table {
+			tbody {
+				height: calc(100vh - 24.5vh);
+			}
+		}
+
+		.project-table {
+			overflow: auto;
+
+			tbody {
+				height: 239px;
+			}
+
+			th,
+			td {
+				color: #b2bdc0;
+
+				&:nth-child(1) {
+					width: 50px;
+				}
+
+				&:nth-child(2) {
+					width: 50px;
+				}
+			}
+		}
+
+		.action {
+			text-decoration: underline;
+			color: @green;
+			cursor: pointer;
+		}
+	}
+</style>

+ 64 - 20
src/views/Home/Home.vue

@@ -174,7 +174,7 @@
               <table class="table-card">
                 <tr class="">
                   <td class="text gray">装机容量</td>
-                  <td class="value green">{{ Number(jczbmap.zjrl)}}</td>
+                  <td class="value green">{{ Number(jczbmap.zjrl) }}</td>
                   <td class="unit gray">MW</td>
                 </tr>
                 <tr class="">
@@ -187,7 +187,7 @@
                     {{ wpId === "0" ? "减排二氧化硫" : "年运行小时" }}
                   </td>
                   <td class="value green">
-                     <!-- {{ wpId === "0" ? jczbmap.jpeyhl  : gxkmap.nyxxs }} -->
+                    <!-- {{ wpId === "0" ? jczbmap.jpeyhl  : gxkmap.nyxxs }} -->
                     {{ wpId === "0" ? jczbmap.jpeyhl : gxkmap.nyxxs }}
                   </td>
                   <!-- <td class="unit gray">
@@ -203,7 +203,7 @@
                   </td>
                   <td class="value green">
                     <!-- {{ wpId === "0" ? jczbmap.jpeyht  : gxkmap.ndxkyss }} -->
-                     {{ wpId === "0" ? jczbmap.jpeyht : gxkmap.ndxkyss }}
+                    {{ wpId === "0" ? jczbmap.jpeyht : gxkmap.ndxkyss }}
                   </td>
                   <!-- <td class="unit gray">{{ wpId === "0" ? "万吨" : "%" }}</td> -->
                   <td class="unit gray">{{ wpId === "0" ? "吨" : "%" }}</td>
@@ -214,7 +214,7 @@
                   </td>
                   <td class="value green">
                     <!-- {{ wpId === "0" ? jczbmap.jys  : gxkmap.ngzxs }} -->
-                     {{ wpId === "0" ? jczbmap.jys : gxkmap.ngzxs }}
+                    {{ wpId === "0" ? jczbmap.jys : gxkmap.ngzxs }}
                   </td>
                   <!-- <td class="unit gray">
                     {{ wpId === "0" ? "万吨" : "小时" }}
@@ -229,7 +229,7 @@
                   </td>
                   <td class="value green">
                     <!-- {{ wpId === "0" ? jczbmap.jybm  : gxkmap.ndjxs }} -->
-                      {{ wpId === "0" ? jczbmap.jybm : gxkmap.ndjxs }}
+                    {{ wpId === "0" ? jczbmap.jybm : gxkmap.ndjxs }}
                   </td>
                   <!-- <td class="unit gray">
                     {{ wpId === "0" ? "万吨" : "小时" }}
@@ -791,15 +791,27 @@
       top="10vh"
       custom-class="modal"
       :close-on-click-modal="true"
-      @closed="dialogType = ''"
+      @closed="
+        (res) => {
+          dialogType = '';
+          powerLineChartData = null;
+        }
+      "
     >
       <Table :data="dialogData" v-if="dialogType === 'table'" />
       <multiple-y-line-chart-normal
         height="500px"
+        :list="powerLineChartData"
+        :yAxises="powerLineChartYAxises"
+        :showLegend="true"
+        v-if="dialogType === 'powerLineChart' && powerLineChartData"
+      />
+      <multiple-y-line-chart-normal
+        height="500px"
         :list="Powertrend"
         :yAxises="PowertrendYAxises"
         :showLegend="true"
-        v-if="dialogType === 'powerLineChart'"
+        v-if="dialogType === 'powerLineChart' && !powerLineChartData"
       />
       <multiple-bar-chart
         height="500px"
@@ -881,6 +893,7 @@ export default {
       tqmap: {},
       nowTime: "",
       planBtnName: "全部",
+      powerLineChartYAxises: [],
       powerLineChartData: [
         {
           title: "",
@@ -959,7 +972,6 @@ export default {
           wpId: that.wpId,
         },
         success(res) {
-          console.log("resWeather:", res);
           const keys = ["wd", "sd"];
           let weatherChart = [
             {
@@ -1005,7 +1017,6 @@ export default {
           id: that.wpId,
         },
         success(res) {
-          // console.log('basicData:',res)
           that.powerData = [
             {
               title: "风速",
@@ -1058,25 +1069,37 @@ export default {
               name: "当日预测电量",
               value: res.data.jczbmap.rycfdl,
               // total: res.data.jczbmap.rfdlsx,
-              total: res.data.jczbmap.rycfdl >= res.data.jczbmap.rfdl ? res.data.jczbmap.rycfdl + 100 : res.data.jczbmap.rfdl + 100,
+              total:
+                res.data.jczbmap.rycfdl >= res.data.jczbmap.rfdl
+                  ? res.data.jczbmap.rycfdl + 100
+                  : res.data.jczbmap.rfdl + 100,
             },
             {
               name: "实际发电量",
               value: res.data.jczbmap.rfdl,
               // total: res.data.jczbmap.rfdlsx,
-              total: res.data.jczbmap.rycfdl >= res.data.jczbmap.rfdl ? res.data.jczbmap.rycfdl + 100 : res.data.jczbmap.rfdl + 100,
+              total:
+                res.data.jczbmap.rycfdl >= res.data.jczbmap.rfdl
+                  ? res.data.jczbmap.rycfdl + 100
+                  : res.data.jczbmap.rfdl + 100,
             },
             {
               name: "当月预测电量",
               value: res.data.jczbmap.yycfdl,
               // total: res.data.jczbmap.yfdlsx,
-              total: res.data.jczbmap.yycfdl >= res.data.jczbmap.yfdl ? res.data.jczbmap.yycfdl + 200 : res.data.jczbmap.yfdl + 200,
+              total:
+                res.data.jczbmap.yycfdl >= res.data.jczbmap.yfdl
+                  ? res.data.jczbmap.yycfdl + 200
+                  : res.data.jczbmap.yfdl + 200,
             },
             {
               name: "实际发电量",
               value: res.data.jczbmap.yfdl,
               // total: res.data.jczbmap.yfdlsx,
-              total: res.data.jczbmap.yycfdl >= res.data.jczbmap.yfdl ? res.data.jczbmap.yycfdl + 200 : res.data.jczbmap.yfdl + 200,
+              total:
+                res.data.jczbmap.yycfdl >= res.data.jczbmap.yfdl
+                  ? res.data.jczbmap.yycfdl + 200
+                  : res.data.jczbmap.yfdl + 200,
             },
           ];
 
@@ -1101,7 +1124,6 @@ export default {
           id: that.wpId,
         },
         success(res) {
-          console.log("resCharts:", res);
           let rdlKey = ["value1", "value2", "value3", "speed"];
           let DayPower = {
             units: ["(万kWh)", "(m/s)"],
@@ -1213,7 +1235,6 @@ export default {
     openDialog(dialogTitle, subUrl, targetName, dialogType) {
       this.dialogTitle = dialogTitle;
       let that = this;
-      console.log("dialogSuburl:", subUrl);
       that.API.requestData({
         method: "POST",
         subUrl,
@@ -1222,7 +1243,6 @@ export default {
           targetName,
         },
         success(res) {
-          console.log("resDialog:", res);
           that.dialogShow = true;
           that.dialogData = res.data;
           that.dialogType = dialogType;
@@ -1253,7 +1273,6 @@ export default {
           wpId: that.wpId,
         },
         success(res) {
-          console.log("forecastBoxRes:", res);
           that.dialogData = res.data;
           that.dialogType = "table";
           that.dialogShow = true;
@@ -1263,17 +1282,42 @@ export default {
 
     // 显示功率复核图表
     showPowerChart(res) {
-      console.log("powerChartRes:", res);
       this.dialogTitle = res.dialogTitle;
       this.dialogType = res.dialogType;
 
-      this.powerLineChartData = res.data;
+      // this.powerLineChartData = res.data;
+      this.powerLineChartData = res.data.value;
+      if (res.dialogTitle === "风速详情") {
+        this.powerLineChartYAxises = [
+          {
+            min: 0,
+            name: "风速",
+            position: "left",
+            unit: "(m/s)",
+          },
+          {
+            min: 0,
+            name: "日照",
+            position: "right",
+            unit: "(w/㎡)",
+          },
+        ];
+      } else {
+        this.powerLineChartYAxises = [
+          {
+            min: 0,
+            name: "功率",
+            position: "left",
+            unit: "(万kWh)",
+          },
+        ];
+      }
+
       this.dialogShow = true;
     },
 
     // 显示计划电量完成情况图表
     showDoneChart(res) {
-      console.log("doneChartRes:", res);
       this.dialogTitle = res.dialogTitle;
       this.dialogType = res.dialogType;
 

+ 25 - 25
src/views/Home/components/power-review.vue

@@ -69,45 +69,45 @@ export default {
           targetName,
         },
         success(res) {
-          // let powerLineChartData = {
-          //   // 图表所用单位
-          //   units: [""],
-          //   value: [],
-          // };
-
-          // res.data.forEach((pEle, pIndex) => {
-          //   powerLineChartData.value.push({
-          //     title: pEle[0].name,
-          //     yAxisIndex: 0,
-          //     smooth: true,
-          //     value: [],
-          //   });
-
-          //   pEle.forEach((cEle) => {
-          //     powerLineChartData.value[pIndex].value.push({
-          //       text: new Date(cEle.time).formatDate("hh:mm:ss"),
-          //       value: cEle.value1,
-          //     });
-          //   });
-          // });
-
-          let powerLineChartData = [];
+          let powerLineChartData = {
+            // 图表所用单位
+            units: [""],
+            value: [],
+          };
 
           res.data.forEach((pEle, pIndex) => {
-            powerLineChartData.push({
+            powerLineChartData.value.push({
               title: pEle[0].name,
+              yAxisIndex: 0,
               smooth: true,
               value: [],
             });
 
             pEle.forEach((cEle) => {
-              powerLineChartData[pIndex].value.push({
+              powerLineChartData.value[pIndex].value.push({
                 text: new Date(cEle.time).formatDate("hh:mm:ss"),
                 value: cEle.value1,
               });
             });
           });
 
+          // let powerLineChartData = [];
+
+          // res.data.forEach((pEle, pIndex) => {
+          //   powerLineChartData.push({
+          //     title: pEle[0].name,
+          //     smooth: true,
+          //     value: [],
+          //   });
+
+          //   pEle.forEach((cEle) => {
+          //     powerLineChartData[pIndex].value.push({
+          //       text: new Date(cEle.time).formatDate("hh:mm:ss"),
+          //       value: cEle.value1,
+          //     });
+          //   });
+          // });
+
           that.$emit("chartClick", {
             dialogTitle,
             dialogType,

+ 9 - 8
src/views/Status/Status.vue

@@ -15,10 +15,9 @@
     <div class="table-box">
       <ComTable1 :data="tableData1"></ComTable1>
     </div>
-     <div class="table-box">
+    <div class="table-box">
       <ComTable1 :data="tableData2"></ComTable1>
     </div>
- 
   </div>
 </template>
 
@@ -26,7 +25,7 @@
 import StatusPanel from "./components/status-panel.vue";
 import StatusPanelStatic from "./components/static.vue";
 import ComTable from "@com/coms/table/table.vue";
-import ComTable1 from "./table.vue"
+import ComTable1 from "./table.vue";
 import util from "@/helper/util.js";
 
 import store from "@store/index.js";
@@ -48,7 +47,7 @@ export default {
       sourceMap: {}, // 核心数据
       datas: [],
       // wpId1: "",
-      wpId:"",
+      wpId: "",
       dwkGzqd: "",
       plGzqd: "",
       zhGzqd: "",
@@ -345,7 +344,7 @@ export default {
         ],
         data: [],
       },
-            tableData2: {
+      tableData2: {
         column: [
           {
             // name: "场站名称",
@@ -562,10 +561,12 @@ export default {
                     f3: ele.ycgl,
                     f4: "",
                     f5: "",
-                    is_light: !ele.zxzt_fjzt,
+                    // is_light: !ele.zxzt_fjzt,
+                    is_light: true,
                   },
                   {
-                    f1: "测风塔:",
+                    f1:
+                      ele.name.indexOf("风电场") !== -1 ? "测风塔:" : "气象站:",
                     // f2: "风速",
                     f2: ele.name.includes("风") ? "风速" : "光照强度",
                     // f3: (ele.cftfs || 0) + "m/s",
@@ -600,7 +601,7 @@ export default {
             let zj = sourceMap.vos.filter((ele) => {
               return ele.wpId.includes("0");
             });
-          data2.push(zj[0])
+            data2.push(zj[0]);
             fdcArr.push(fdhj[0]);
             //  console.log(fdcArr)
             fdcArr.forEach((ele) => {

+ 10 - 3
src/views/WindSite/pages/Home/Home.vue

@@ -327,7 +327,7 @@
           </panel>
         </div>
         <div class="mg-l-16" style="flex: 1 1 auto" ref="lineChart">
-          <panel title="4小时功率曲线图" v-if="resCode.includes('FDC')">
+          <panel title="24小时功率曲线图" v-if="resCode.includes('FDC')">
             <multiple-line-chart
               height="18.519vh"
               v-if="Powertrend"
@@ -639,6 +639,7 @@ export default {
       });
       that.resCode = res.code;
     },
+
     // 根据风机状态码返回对应 class
     getColor(fjzt) {
       switch (fjzt) {
@@ -658,6 +659,7 @@ export default {
           return "write";
       }
     },
+
     // 请求服务
     requestData(showLoading) {
       this.requestWpInfo(showLoading);
@@ -899,6 +901,7 @@ export default {
             });
           });
           that.dayLost = dayLost;
+          console.log(123123, res);
         },
       });
     },
@@ -1027,6 +1030,7 @@ export default {
         },
       });
     },
+
     rfdl() {
       this.rfdlDialog = true;
     },
@@ -1037,7 +1041,8 @@ export default {
     that.wpId = that.$route.params.wpId;
     that.paramsId = that.$route.params.wpId;
     that.resCode = that.$route.params.wpId;
-    that.stationChartData = require(`./stationJson/${that.$route.params.wpId}.js`).default;
+    that.stationChartData =
+      require(`./stationJson/${that.$route.params.wpId}.js`).default;
     that.$nextTick(() => {
       that.getWp();
       that.requestData(false);
@@ -1064,10 +1069,12 @@ export default {
   watch: {
     $route(res) {
       this.wpId = res.params.wpId;
-      this.stationChartData = require(`./stationJson/${this.$route.params.wpId}.js`).default;
+      this.stationChartData =
+        require(`./stationJson/${this.$route.params.wpId}.js`).default;
       if (res.params.wpId) {
         this.requestData(false);
         this.renderBtnActiveIndex();
+        this.requestLoss();
       }
     },
   },

+ 31 - 18
src/views/WindSite/pages/Tower.vue

@@ -1,6 +1,11 @@
 <template>
   <div class="btn-group-tabs">
-      <BtnGroup2 :btnGroups="btnGroupsss" :rowIndex="rowIndex" :index="selectIndex" @select="select"></BtnGroup2>
+    <BtnGroup2
+      :btnGroups="btnGroupsss"
+      :rowIndex="rowIndex"
+      :index="selectIndex"
+      @select="select"
+    ></BtnGroup2>
   </div>
   <div class="tower">
     <Wave></Wave>
@@ -47,13 +52,13 @@
       <!-- <template v-slot:tools>
       </template> -->
       <!-- <template v-slot:default> -->
-        <multiple-line-chart
-          height="220px"
-          :list="Powertrend"
-          :units="['(MW)']"
-          :showLegend="true"
-          :hoverType="'axis'"
-        />
+      <multiple-line-chart
+        height="220px"
+        :list="Powertrend"
+        :units="['(MW)']"
+        :showLegend="true"
+        :hoverType="'axis'"
+      />
       <!-- </template> -->
     </toolbar-panel>
   </div>
@@ -92,8 +97,8 @@ export default {
   data() {
     return {
       btnGroupsss: [],
-      rowIndex:1,
-      selectIndex:1,
+      rowIndex: 1,
+      selectIndex: 1,
       timmer: null, // 计时器
       cftmap: {},
       glvos: [],
@@ -150,7 +155,6 @@ export default {
           id: that.wpId,
         },
         success(res) {
-
           let rdlKey = ["value1", "value2", "value3", "speed"];
           let DayPower = {
             // 图表所用单位
@@ -263,17 +267,17 @@ export default {
         },
       });
     },
-    getWp () {
+    getWp() {
       let that = this;
       that.API.requestData({
         method: "GET",
         subUrl: "powercompare/windfarmAllAjax",
-        success (res) {
+        success(res) {
           let btnGroups = [
             {
               icon: "svg-wind-site",
               btns: [],
-            }
+            },
           ];
 
           res.data.forEach((ele, index) => {
@@ -282,7 +286,7 @@ export default {
                 text: ele.name,
                 code: ele.id,
               });
-            } 
+            }
           });
 
           that.btnGroupsss = btnGroups;
@@ -290,7 +294,7 @@ export default {
         },
       });
     },
-    renderBtnActiveIndex () {
+    renderBtnActiveIndex() {
       this.btnGroupsss.forEach((pEle, pIndex) => {
         pEle.btns.forEach((cEle, cIndex) => {
           if (cEle.code === this.wpId) {
@@ -301,12 +305,12 @@ export default {
       });
     },
 
-    select (res) {
+    select(res) {
       this.$router.replace({
         path: `/monitor/windsite/tower/${res.code}`,
       });
       this.wpId = res.code;
-      this.renderBtnActiveIndex ();
+      this.renderBtnActiveIndex();
       this.requestData(false);
       this.requestLine();
     },
@@ -314,6 +318,15 @@ export default {
 
   created() {
     let that = this;
+    if (that.$route.params.wpId.indexOf("GDC") !== -1) {
+      that.$router.replace({
+        path: `/monitor/windsite/tower/MHS_FDC`,
+      });
+    } else {
+      that.$router.replace({
+        path: `/monitor/windsite/tower/${that.$route.params.wpId}`,
+      });
+    }
     that.wpId = that.$route.params.wpId;
     that.getWp();
     that.$nextTick(() => {