Ver código fonte

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

# Conflicts:
#	public/static/config/modeConfig.js
#	src/router/index.js
shilin 3 anos atrás
pai
commit
b8599fa2df

+ 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.12: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://192.168.10.12: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;

+ 4 - 4
src/router/index.js

@@ -474,13 +474,13 @@ const routes = [{
     }
 ]
 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>

+ 0 - 1
src/views/NewPages/alarm-center.vue

@@ -168,7 +168,6 @@ export default {
           success(res) {
             _this.options = res.data
             _this.optSelectValue = res.data[0].id
-            // _this.getList(false);
             _this.$nextTick(() => {
               _this.getList(false);
               _this.timmer = setInterval(() => {

Diferenças do arquivo suprimidas por serem muito extensas
+ 896 - 100
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;
     }

Diferenças do arquivo suprimidas por serem muito extensas
+ 1101 - 188
src/views/NewPages/ztfx.vue


+ 75 - 78
src/views/WindSite/pages/Home/Home.vue

@@ -1,18 +1,13 @@
 <template>
- <div class="btn-group-tabs">
-            <BtnGroup2
-                :btnGroups="btnGroupsss"
-                :rowIndex="rowIndex"
-                :index="selectIndex"
-                @select="select"
-            ></BtnGroup2>
-        </div>
+  <div class="btn-group-tabs">
+    <BtnGroup2 :btnGroups="btnGroupsss" :rowIndex="rowIndex" :index="selectIndex" @select="select"></BtnGroup2>
+  </div>
   <div class="wind-site-home">
     <div class="mg-b-16">
       <btn-group-double :btnGroups="btnGroups" :rowIndex="0" :index="1" @select="select" />
     </div>
     <row>
-      <wind-site-weather :time="nowTime" :data="tqmap"/>
+      <wind-site-weather :time="nowTime" :data="tqmap" />
       <panel-3 class="wind-site-info">
         <row align="middle">
           <div class="info-item">
@@ -189,7 +184,8 @@
       </div>
       <div class="mg-l-16" style="flex:1 1 auto;" ref="lineChart">
         <panel title="4小时功率曲线图">
-          <multiple-line-chart height="18.519vh" v-if="Powertrend" :list="Powertrend.value" :units="Powertrend.units" :showLegend="true" />
+          <multiple-line-chart height="18.519vh" v-if="Powertrend" :list="Powertrend.value" :units="Powertrend.units"
+            :showLegend="true" />
         </panel>
       </div>
       <div class="mg-l-16" style="flex:0 0 400px;">
@@ -200,36 +196,37 @@
     </div>
     <row>
       <Col :span="8">
-        <panel title="日度损失电量分析">
-          <dual-pie-chart :innerData="pieChartData.dayData" :outerData="pieChartData.dayData" height="21.296vh" />
-        </panel>
+      <panel title="日度损失电量分析">
+        <dual-pie-chart :innerData="pieChartData.dayData" :outerData="pieChartData.dayData" height="21.296vh" />
+      </panel>
       </Col>
       <Col :span="8">
-        <panel title="月度损失电量分析">
-          <dual-pie-chart :innerData="pieChartData.monthData" :outerData="pieChartData.monthData" height="21.296vh" />
-        </panel>
+      <panel title="月度损失电量分析">
+        <dual-pie-chart :innerData="pieChartData.monthData" :outerData="pieChartData.monthData" height="21.296vh" />
+      </panel>
       </Col>
       <Col :span="8">
-        <panel title="年度损失电量分析">
-          <dual-pie-chart :innerData="pieChartData.yearData" :outerData="pieChartData.yearData" height="21.296vh" />
-        </panel>
+      <panel title="年度损失电量分析">
+        <dual-pie-chart :innerData="pieChartData.yearData" :outerData="pieChartData.yearData" height="21.296vh" />
+      </panel>
       </Col>
     </row>
     <row>
       <Col :span="8">
-        <panel title="日度损失电量分析">
-          <hover-bar-chart :list="dayLost" height="21.296vh" />
-        </panel>
+      <panel title="日度损失电量分析">
+        <hover-bar-chart :list="dayLost" height="21.296vh" />
+      </panel>
       </Col>
       <Col :span="8">
-        <panel title="日发电量对比">
-          <multiple-bar-chart height="21.296vh" :list="CompleteElectricity.data" :units="CompleteElectricity.units" :showLegend="true" />
-        </panel>
+      <panel title="日发电量对比">
+        <multiple-bar-chart height="21.296vh" :list="CompleteElectricity.data" :units="CompleteElectricity.units"
+          :showLegend="true" />
+      </panel>
       </Col>
       <Col :span="8">
-        <panel title="月发电量对比">
-          <normal-line-chart height="21.296vh" :list="MonthCompare.value" :units="MonthCompare.units" />
-        </panel>
+      <panel title="月发电量对比">
+        <normal-line-chart height="21.296vh" :list="MonthCompare.value" :units="MonthCompare.units" />
+      </panel>
       </Col>
     </row>
   </div>
@@ -259,7 +256,7 @@ export default {
   // 使用组件
   components: { BtnGroup2, WindSiteWeather, Row, Col, Panel, DualPieChart, MultipleLineChart, Panel3, SvgIcon, HoverBarChart, MultipleBarChart, NormalLineChart, LightMatrix, BtnGroupDouble, Station },
   // 数据
-  data() {
+  data () {
     return {
       timmer: null, // 计时器
       timmer2: null,
@@ -338,78 +335,78 @@ export default {
           },
         ],
       },
-       selectIndex:0,
-      rowIndex:0,
+      selectIndex: 0,
+      rowIndex: 0,
       btnGroupsss: [
-                {
-                    icon: "svg-wind-site",
-                    btns: [],
-                },
-                {
-                    icon: "svg-photovoltaic",
-                    btns: [],
-                },
-            ],
+        {
+          icon: "svg-wind-site",
+          btns: [],
+        },
+        {
+          icon: "svg-photovoltaic",
+          btns: [],
+        },
+      ],
     };
   },
   // 函数
   methods: {
 
 
-     getWp(){
+    getWp () {
       let that = this;
       that.API.requestData({
         method: "GET",
         subUrl: "powercompare/windfarmAllAjax",
-        success(res) {
+        success (res) {
           console.warn(res);
           let btnGroups = [{
             icon: "svg-wind-site",
             btns: []
-          },{
+          }, {
             icon: "svg-photovoltaic",
             btns: []
           }];
 
-          res.data.forEach((ele,index)=>{
-            if(ele.id.indexOf("FDC") !== -1){
+          res.data.forEach((ele, index) => {
+            if (ele.id.indexOf("FDC") !== -1) {
               btnGroups[0].btns.push({
-                text:ele.name,
-                code:ele.id
+                text: ele.name,
+                code: ele.id
               });
-            }else{
+            } else {
               btnGroups[1].btns.push({
-                text:ele.name,
-                code:ele.id
+                text: ele.name,
+                code: ele.id
               });
             }
           });
 
-          that.btnGroupsss=btnGroups;
+          that.btnGroupsss = btnGroups;
           that.renderBtnActiveIndex();
 
         },
       });
     },
 
-    renderBtnActiveIndex(){
-      this.btnGroupsss.forEach((pEle,pIndex)=>{
-        pEle.btns.forEach((cEle,cIndex)=>{
-          if(cEle.code === this.wpId) {
-            this.rowIndex=pIndex;
-            this.selectIndex=cIndex;
+    renderBtnActiveIndex () {
+      this.btnGroupsss.forEach((pEle, pIndex) => {
+        pEle.btns.forEach((cEle, cIndex) => {
+          if (cEle.code === this.wpId) {
+            this.rowIndex = pIndex;
+            this.selectIndex = cIndex;
           }
         });
       });
     },
 
-    select(res) {
+    select (res) {
       this.$router.replace({
         path: `/monitor/windsite/home/${res.code}`
       });
     },
     // 根据风机状态码返回对应 class
-    getColor(fjzt) {
+    getColor (fjzt) {
       switch (fjzt) {
         case 0:
           return "green";
@@ -428,7 +425,7 @@ export default {
       }
     },
     // 请求服务
-    requestData(showLoading) {
+    requestData (showLoading) {
       this.requestWpInfo(showLoading);
       this.requestLoss(showLoading);
       this.requestPower(showLoading);
@@ -436,7 +433,7 @@ export default {
     },
 
     // 获取场站监视数据
-    requestWpInfo(showLoading) {
+    requestWpInfo (showLoading) {
       let that = this;
       that.API.requestData({
         showLoading,
@@ -445,7 +442,7 @@ export default {
         data: {
           wpId: that.wpId,
         },
-        success(res) {
+        success (res) {
           if (res.data) {
             that.tqmap = res.data.tqmap;
             let fjmap = [];
@@ -541,7 +538,7 @@ export default {
             keys.forEach((key, keyIndex) => {
               res.data.glvos.forEach((ele) => {
                 Powertrend.value[keyIndex].value.push({
-                  text: new Date().formatDate("yyyy-MM-dd"),
+                  text: new Date().formatDate("hh:mm"),
                   value: ele[key],
                 });
               });
@@ -590,7 +587,7 @@ export default {
     },
 
     // 获取日度损失电量分析
-    requestLoss(showLoading) {
+    requestLoss (showLoading) {
       let that = this;
       that.API.requestData({
         showLoading,
@@ -599,7 +596,7 @@ export default {
         data: {
           wpId: that.wpId,
         },
-        success(res) {
+        success (res) {
           let dayLost = [];
           res.data.forEach((ele) => {
             dayLost.push({
@@ -613,7 +610,7 @@ export default {
     },
 
     // 获取完成电量
-    requestPower(showLoading) {
+    requestPower (showLoading) {
       let that = this;
       that.API.requestData({
         showLoading,
@@ -622,7 +619,7 @@ export default {
         data: {
           wpId: that.wpId,
         },
-        success(res) {
+        success (res) {
           let data = [
             {
               title: "发电量",
@@ -653,7 +650,7 @@ export default {
     },
 
     // 获取月发电量对比
-    requestMonthPower(showLoading) {
+    requestMonthPower (showLoading) {
       let that = this;
       that.API.requestData({
         showLoading,
@@ -662,7 +659,7 @@ export default {
         data: {
           wpId: that.wpId,
         },
-        success(res) {
+        success (res) {
           let data = [
             {
               title: "月发电量",
@@ -693,11 +690,11 @@ export default {
     },
   },
 
-  created() {
+  created () {
     let that = this;
     that.wpId = that.$route.params.wpId;
     that.$nextTick(() => {
-    that.getWp();
+      that.getWp();
       that.requestData(false);
       that.timmer = setInterval(() => {
         that.requestData(false);
@@ -708,16 +705,16 @@ export default {
     });
   },
 
-  mounted() {},
+  mounted () { },
 
-  unmounted() {
+  unmounted () {
     clearInterval(this.timmer);
     clearInterval(this.timmer2);
     this.timmer = null;
     this.timmer2 = null;
   },
-  watch:{
-    "$route"(res){
+  watch: {
+    "$route" (res) {
       console.warn('router变化');
       this.wpId = res.params.wpId;
       this.requestData(false);
@@ -848,7 +845,7 @@ export default {
 }
 
 .btn-group-tabs {
-        display: flex;
-        flex-direction: row;
-    }
+  display: flex;
+  flex-direction: row;
+}
 </style>

+ 40 - 40
src/views/WindSite/pages/Matrix.vue

@@ -8,7 +8,7 @@
         <i class="fa fa-send"></i>
         <span>{{ sourceMap.fczbmap.jczbmap.name }}</span>
         <span class="sub-title">接入台数</span>
-        <span class="sub-count">{{ sourceMap.fczbmap.jczbmap.yxts }}</span>
+        <span class="sub-count">{{ sourceMap.fczbmap.jczbmap.jrts }}</span>
       </div>
     </div>
     <div class="panel-body">
@@ -51,12 +51,12 @@ export default {
     SvgIcon
   },
 
-  data() {
+  data () {
     return {
       timmer: null, // 计时器
-      wpId:"",
-      selectIndex:0,
-      rowIndex:0,
+      wpId: "",
+      selectIndex: 0,
+      rowIndex: 0,
       mapping: {
         green: "svg-standby",
         blue: "svg-normal-power",
@@ -98,7 +98,7 @@ export default {
   },
 
   methods: {
-    getColor(fjzt) {
+    getColor (fjzt) {
       switch (fjzt) {
         case 0:
           return "green";
@@ -125,7 +125,7 @@ export default {
     },
 
     // 请求服务
-    requestData(showLoading) {
+    requestData (showLoading) {
       let that = this;
       that.API.requestData({
         showLoading,
@@ -134,7 +134,7 @@ export default {
         data: {
           wpId: that.wpId,
         },
-        success(res) {
+        success (res) {
           if (res.data) {
             let sourceMap = res.data;
             for (let key in sourceMap) {
@@ -157,61 +157,61 @@ export default {
       });
     },
 
-    getWp(){
+    getWp () {
       let that = this;
       that.API.requestData({
         method: "GET",
         subUrl: "powercompare/windfarmAllAjax",
-        success(res) {
+        success (res) {
 
           let btnGroups = [{
             icon: "fa fa-fire",
             btns: []
-          },{
+          }, {
             icon: "fa fa-fire-extinguisher",
             btns: []
           }];
 
-          res.data.forEach((ele,index)=>{
-            if(ele.id.indexOf("FDC") !== -1){
+          res.data.forEach((ele, index) => {
+            if (ele.id.indexOf("FDC") !== -1) {
               btnGroups[0].btns.push({
-                text:ele.name,
-                code:ele.id
+                text: ele.name,
+                code: ele.id
               });
-            }else{
+            } else {
               btnGroups[1].btns.push({
-                text:ele.name,
-                code:ele.id
+                text: ele.name,
+                code: ele.id
               });
             }
           });
 
-          that.btnGroups=btnGroups;
+          that.btnGroups = btnGroups;
           that.renderBtnActiveIndex();
 
         },
       });
     },
 
-    renderBtnActiveIndex(){
-      this.btnGroups.forEach((pEle,pIndex)=>{
-        pEle.btns.forEach((cEle,cIndex)=>{
-          if(cEle.code === this.wpId) {
-            this.rowIndex=pIndex;
-            this.selectIndex=cIndex;
+    renderBtnActiveIndex () {
+      this.btnGroups.forEach((pEle, pIndex) => {
+        pEle.btns.forEach((cEle, cIndex) => {
+          if (cEle.code === this.wpId) {
+            this.rowIndex = pIndex;
+            this.selectIndex = cIndex;
           }
         });
       });
     },
 
-    select(res) {
+    select (res) {
       this.$router.replace({
         path: `/monitor/windsite/matrix/${res.code}`
       });
     },
   },
 
-  created() {
+  created () {
     let that = this;
     that.wpId = that.$route.params.wpId;
     that.$nextTick(() => {
@@ -223,15 +223,15 @@ export default {
     });
   },
 
-  mounted() {},
+  mounted () { },
 
-  unmounted() {
+  unmounted () {
     clearInterval(this.timmer);
     this.timmer = null;
   },
 
-  watch:{
-    "$route"(res){
+  watch: {
+    "$route" (res) {
       this.wpId = res.params.wpId;
       this.requestData(false);
       this.renderBtnActiveIndex();
@@ -326,16 +326,16 @@ export default {
           }
 
           .icon {
-              flex-grow: 1;
-              height: calc(100% - 16px);
-              display: flex;
-              align-items: center;
-              justify-content: center;
-
-              i {
-                font-size: 14px;
-              }
+            flex-grow: 1;
+            height: calc(100% - 16px);
+            display: flex;
+            align-items: center;
+            justify-content: center;
+
+            i {
+              font-size: 14px;
             }
+          }
         }
 
         .card-right {

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

+ 48 - 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",
@@ -123,7 +124,7 @@ export default {
           ],
         },
         {
-          id: "singleAnalysis",
+          id: "performanceAnalysis",
           text: "统计分析",
           data: [
             {
@@ -180,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",
+            //     }
+            //   ]
+            // }
           ],
         },
         {
@@ -213,7 +214,7 @@ export default {
               icon: "svg-wind-site",
               path: "/health",
               children: [
-                 {
+                {
                   text: "健康推荐",
                   icon: "svg-wind-site",
                   path: "/health",
@@ -245,7 +246,7 @@ export default {
                 },
               ],
             },
-            
+
           ],
         },
         {
@@ -316,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'
                 }
               ]
             }
@@ -394,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;
@@ -408,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;
@@ -429,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;