Browse Source

2023-03-13 fix

1. 部分同步neic代码
moccus 2 years ago
parent
commit
0ba8f6811c

+ 6 - 6
.env.development

@@ -1,6 +1,6 @@
-VUE_APP_API=http://123.60.213.70:8099
-VUE_APP_WARNING=http://10.83.68.205:8075
-VUE_APP_SHARDINGURL=http://10.83.68.205:8075
-VUE_APP_ADAPTERURL=http://10.83.68.205:8011
-VUE_APP_APIS=10.83.68.205:8099
-VUE_APP_ADAPTERURLS=10.83.68.205:8011
+VUE_APP_API=http://127.0.0.1:8100
+VUE_APP_WARNING=http://11.0.118.57:8075
+VUE_APP_SHARDINGURL=http://11.0.118.57:8075
+VUE_APP_ADAPTERURL=http://11.0.118.57:8011
+VUE_APP_APIS=11.0.118.57:8100
+VUE_APP_ADAPTERURLS=127.0.0.1:8011

+ 108 - 45
src/App.vue

@@ -1,26 +1,17 @@
 <template class="app">
-  <div :class="$store.state.showWarningMask ? 'warningMask' : ''"></div>
   <div style="background-color: #000000" ref="imageTofile">
     <div v-if="lockMaskDisplay" class="lockMask"></div>
     <!-- <div class="warningMask"></div> -->
     <TitleBar class="titleBar" />
-    <div class="left">
-      <Menu
-        :lockMaskDisplay="lockMaskDisplay"
-        :temperatureNum="temperatureNum"
-        @handleChange="handleChange"
-        @handleSearch="handleSearch"
-      />
+    <div class="left" v-if="!webMisc">
+      <Menu :lockMaskDisplay="lockMaskDisplay" :voiceCV="voiceCV" :temperatureNum="temperatureNum" @handleChange="handleChange"
+        @handleSearch="handleSearch" />
     </div>
     <div class="right">
       <el-col>
         <el-row>
           <el-col>
-            <ModeControl
-              ref="modeControl"
-              :current="current"
-              @clicks="handleClick"
-            ></ModeControl>
+            <ModeControl ref="modeControl" :current="current" @clicks="handleClick"></ModeControl>
           </el-col>
         </el-row>
         <el-row>
@@ -41,7 +32,7 @@
     <StatusBar class="statusBar" @getData="getData" />
     <router-view />
     <AllMatrices v-model="matricesDisplay" />
-    <!-- <SYZDetails v-model="$store.state.syzDialogShow"></SYZDetails> -->
+    <SYZDetails v-model="syzDialogShow" :activeTabStation="activeTabStation"></SYZDetails>
     <AGCDetails v-model="agcDisplay"></AGCDetails>
     <TemperatureMatrix v-model="temperatureDisplay" />
     <Fault v-model="faultDisplay" />
@@ -51,7 +42,8 @@
     <Calendar v-model="calendarDisplay" />
     <Record v-model="recordDisplay" />
     <State v-model="stateDisplay" />
-    <Setting v-model="settingDisplay" ></Setting>
+    <Setting v-model="settingDisplay" />
+    
   </div>
 </template>
 <script>
@@ -65,18 +57,18 @@ import WarningArea from "components/warning/warningArea.vue";
 import api from "api/index";
 import boxSelect from "components/boxSelect.vue";
 import AGCDetails from "components/focus/agcDetails.vue";
-import SYZDetails from "components/svgStation.vue";
+import SYZDetails from "components/focus/syzDetails.vue";
 import AllMatrices from "components/allMatrices.vue";
+import Setting from "components/setting.vue";
 import TemperatureMatrix from "components/temperatureMatrix.vue";
 import Fault from "components/search/fault.vue";
 import Warning from "components/search/warning.vue";
 import Status from "components/search/status.vue";
 import Action from "components/search/action.vue";
+import html2canvas from "html2canvas";
 import Calendar from "components/search/calendar.vue";
 import Record from "components/search/record.vue";
 import State from "components/search/state.vue";
-import Setting from "components/setting.vue";
-import html2canvas from "html2canvas";
 import { debounce } from "lodash";
 export default {
   data() {
@@ -89,12 +81,16 @@ export default {
       warningDisplay: false, //查询-预警查询
       statusDisplay: false, //查询-状态时间查询
       actionDisplay: false, //查询-动作查询
+      lockMaskDisplay: false, //锁屏
+      voiceCV: false,
+      webMisc: false,//样本库
+      syzDialogShow: false,
+      settingDisplay: false,
       recordDisplay: false, //查询-推荐记录
       stateDisplay: false, //查询-状态变化查询
       calendarDisplay: false, //查询-日历查询
-      lockMaskDisplay: false, //锁屏
       temperatureNum: 0, //温度矩阵故障数
-      settingDisplay: false, //设置
+      activeTabStation: '',
     };
   },
   components: {
@@ -109,11 +105,11 @@ export default {
     SYZDetails,
     AllMatrices,
     TemperatureMatrix,
-    Setting,
     Fault,
     Warning,
     Status,
     Action,
+    Setting,
     Calendar,
     Record,
     State,
@@ -137,22 +133,44 @@ export default {
       ];
       mb.register(temperature);
     },
-    debounceTemperatureMessage: debounce(function(msg) {
+    debounceTemperatureMessage: debounce(function (msg) {
       this.temperatureMessage(msg)
     }, 1000),
     temperatureMessage(msg) {
       let json = JSON.parse(msg);
       this.temperatureNum = json.countOverLimit + json.countCrossingLimit;
     },
-    
+    windturbineMessage(msg) {
+      let arr = msg.split("-");
+      if (msg === "CLOSE") {
+        this.handleClosed()
+      }
+      if (msg === "OPEN_FJJZ-ALL") {
+        this.handleChange(2)
+      }
+      if (msg === "OPEN_WDJZ-ALL") {
+        this.handleChange(3)
+      }
+      if (msg === "OPEN_AGC-ALL") {
+        this.handleChange(5)
+      }
+      if (arr[0] === "OPEN_SYZ") {
+        this.activeTabStation = arr[1]
+        this.handleClosed()
+        setTimeout(() => {
+          this.handleChange(4,true)
+        }, 3000);
+      }
+    },
     getStation() {
       api.getStation().then((res) => {
-        let stationList = [];
-        res.data.forEach((item) => {
-          if (item.type === 1) {
-            stationList.push(item);
-          }
-        });
+        // let stationList = [];
+        let stationList = res.data;
+        // res.data.forEach((item) => {
+        //   if (item.type === 1) {
+        //     stationList.push(item);
+        //   }
+        // });
         this.$store.commit("stationList", stationList);
         let syzArray = [];
         stationList.forEach((item) => {
@@ -168,20 +186,21 @@ export default {
         this.$store.commit("activeTab", syzArray[0].name);
       });
     },
-    handleChange(val) {
-      if (val !== 9) {
+    handleChange(val,flag) {
+      if (val !== 10) {
         this.matricesDisplay = false;
-        this.$store.commit("syzDialogShow", false);
+        this.syzDialogShow = false;
+        // this.$store.commit("syzDialogShow", false);
         this.agcDisplay = false;
         this.temperatureDisplay = false;
         this.faultDisplay = false;
         this.warningDisplay = false;
         this.statusDisplay = false;
         this.actionDisplay = false;
+        this.settingDisplay = false
         this.calendarDisplay = false;
         this.recordDisplay = false;
         this.stateDisplay = false;
-        this.settingDisplay = false;
       }
 
       switch (val) {
@@ -192,7 +211,13 @@ export default {
           this.temperatureDisplay = true;
           break;
         case 4:
-          this.$store.commit("syzDialogShow", true);
+          if (flag) {
+            this.syzDialogShow = true;
+          } else {
+            this.activeTabStation = ''
+            this.syzDialogShow = true;
+          }
+          
           break;
         case 5:
           this.agcDisplay = true;
@@ -200,6 +225,9 @@ export default {
         case 7:
           this.lockMaskDisplay = !this.lockMaskDisplay;
           break;
+        case 8:
+          this.voiceCV = !this.voiceCV;
+          break;
         case 9:
           this.toImage();
           break;
@@ -210,6 +238,21 @@ export default {
           break;
       }
     },
+    handleClosed() {
+      this.matricesDisplay = false;
+      this.syzDialogShow = false;
+      // this.$store.commit("syzDialogShow", false);
+      this.agcDisplay = false;
+      this.temperatureDisplay = false;
+      this.faultDisplay = false;
+      this.warningDisplay = false;
+      this.statusDisplay = false;
+      this.actionDisplay = false;
+      this.settingDisplay = false
+      this.calendarDisplay = false;
+      this.recordDisplay = false;
+      this.stateDisplay = false;
+    },
     handleSearch(val) {
       this.matricesDisplay = false;
       this.$store.commit("syzDialogShow", false);
@@ -219,10 +262,10 @@ export default {
       this.warningDisplay = false;
       this.statusDisplay = false;
       this.actionDisplay = false;
+      this.settingDisplay = false;
       this.calendarDisplay = false;
       this.recordDisplay = false;
       this.stateDisplay = false;
-      this.settingDisplay = false;
       switch (val) {
         case "fault":
           this.faultDisplay = true;
@@ -245,7 +288,6 @@ export default {
         case "changeState":
           this.stateDisplay = true;
           break;
-          
         default:
           break;
       }
@@ -292,6 +334,7 @@ export default {
 </script>
 <style>
 @import "../src/assets/styles/main.css";
+
 body {
   /* 设置内容不可选中 */
   -webkit-user-select: none;
@@ -313,6 +356,7 @@ body {
   bottom: 50px;
   /* display: none; */
 }
+
 .D- {
   width: 30px;
   height: 30px;
@@ -324,9 +368,11 @@ body {
   line-height: 30px;
   text-align: center;
 }
+
 .D-:hover {
   background-color: #999999;
 }
+
 .left {
   width: 40px;
   position: absolute;
@@ -337,6 +383,7 @@ body {
   margin-left: 7px;
   border-radius: 8px;
 }
+
 .right {
   width: 31%;
   position: absolute;
@@ -359,15 +406,18 @@ body {
   left: 0;
   z-index: 999;
 }
+
 .el-table__body-wrapper::-webkit-scrollbar-thumb {
   background-color: #999999;
   border-radius: 8px;
 }
+
 .el-collapse-item__wrap {
   background-color: #000000 !important;
   box-sizing: border-box !important;
   padding-left: 27px !important;
 }
+
 .el-collapse-item__header {
   background-color: rgb(20, 20, 20) !important;
   font-size: 12px !important;
@@ -376,15 +426,19 @@ body {
   padding-left: 30px !important;
   margin-bottom: 2px !important;
 }
+
 .el-collapse {
   border: none !important;
 }
+
 .el-collapse-item__header {
   border: none !important;
 }
+
 .el-collapse-item__wrap {
   border: none !important;
 }
+
 .lockMask {
   width: 100%;
   height: 100%;
@@ -392,40 +446,45 @@ body {
   background-color: rgba(0, 0, 0, 0.2);
   z-index: 9998;
 }
+
 .warningMask {
   width: 100%;
   height: 100%;
   position: absolute;
-  background-image: radial-gradient(
-    circle,
-    rgb(255, 0, 0, 0),
-    rgb(255, 0, 0, 0),
-    rgb(255, 0, 0, 0),
-    rgb(255, 0, 0)
-  );
+  background-image: radial-gradient(circle,
+      rgb(255, 0, 0, 0),
+      rgb(255, 0, 0, 0),
+      rgb(255, 0, 0, 0),
+      rgb(255, 0, 0));
   animation: fade 2000ms infinite;
   -webkit-animation: fade 2000ms infinite;
   z-index: 999;
   pointer-events: none;
 }
+
 @keyframes fade {
   from {
     opacity: 0.7;
   }
+
   50% {
     opacity: 0.3;
   }
+
   to {
     opacity: 0.7;
   }
 }
+
 @-webkit-keyframes fade {
   from {
     opacity: 0.7;
   }
+
   50% {
     opacity: 0.3;
   }
+
   to {
     opacity: 0.7;
   }
@@ -444,19 +503,23 @@ body {
     border-radius: 6px;
   }
 }
+
 ::-webkit-scrollbar {
   width: 8px !important;
   height: 8px !important;
   background-color: black !important;
 }
+
 ::-webkit-scrollbar-thumb {
   background-color: #999999 !important;
   border-radius: 6px !important;
 }
-.el-table--enable-row-hover .el-table__body tr:hover > td {
+
+.el-table--enable-row-hover .el-table__body tr:hover>td {
   color: rgba(37, 116, 219, 0.8) !important;
 }
-.el-table__body tr.current-row > td {
+
+.el-table__body tr.current-row>td {
   color: rgba(37, 116, 219, 0.8) !important;
 }
 </style>

BIN
src/assets/img/PV/close.png


BIN
src/assets/img/PV/pv_arrow_pic.png


BIN
src/assets/img/PV/pv_box_pic.png


BIN
src/assets/img/PV/pv_box_transformer.png


BIN
src/assets/img/PV/pv_elec_pic.png


BIN
src/assets/img/PV/pv_nb_pic.png


BIN
src/assets/img/PV/pv_pic.png


BIN
src/assets/img/PV/pv_state_blue.png


BIN
src/assets/img/PV/pv_state_gre.png


BIN
src/assets/img/PV/pv_state_grey.png


BIN
src/assets/img/PV/pv_state_org.png


BIN
src/assets/img/PV/pv_state_red.png


BIN
src/assets/img/PV/pv_state_un.png


BIN
src/assets/img/PV/pv_state_vio.png


BIN
src/assets/img/PV/zhengti.png


+ 454 - 0
src/components/PvDetailPages.vue

@@ -0,0 +1,454 @@
+<template>
+    <el-dialog width="80%" @opened="opened()" @closed="closed()" :show-close="false" custom-class="my-info-dialog">
+        <template #title>
+            <div style="margin-top: -10px; color: #ffffff">光伏详情</div>
+        </template>
+         <!-- v-loading="loading" -->
+        <div class="pvDetail">
+            <div class="pvLeftDetail">
+                <div class="commonSty titleFont">
+                    <span>逆变器编号:</span>
+                    <span style="width: 38%;color: #c3c3c3">{{windturbine.id}}</span>
+                </div>
+                <div class="commonSty titleFont">
+                    <span>逆变器状态</span>
+                    <div>
+                        <img :src="statusArr[windturbine.status]" alt="">
+                    </div>
+                </div>
+                <div v-for="(item, index) in nbqData" :key="index" class="commonSty arrSty">
+                    <div class="arrName">
+                        <span>{{item.name}}</span>
+                    </div>
+                    <div class="arrMsg">
+                        <div class="msgNum">
+                            <span style="padding-right: 20px">{{item.value}}</span>
+                        </div>
+                        <span style="width: 20%;color: #c3c3c3">{{item.unit}}</span>
+                    </div>
+                </div>
+            </div>
+            <div class="pvRightDetail">
+                <div class="pvRightDetail_top">
+                    <div class="pvRightTopTitle">
+                        <span>光伏板</span>
+                        <span v-if="showTitle(windturbine)">汇流箱</span>
+                        <span v-else>箱变</span>
+                        <span>逆变器</span>
+                        <span>电网</span>
+                    </div>
+                    <div class="pvRightBotImg">
+                        <div class="img1">
+                            <img src="../assets/img/PV/pv_pic.png" alt="">
+                        </div>
+                        <div class="imgCom">
+                            <img src="../assets/img/PV/pv_arrow_pic.png" alt="">
+                        </div>
+                        <div class="img2">
+                            <img src="../assets/img/PV/pv_box_pic.png" v-if="showTitle(windturbine)" alt="">
+                            <img src="../assets/img/PV/pv_box_transformer.png" v-else alt="">
+                        </div>
+                        <div class="imgCom">
+                            <img src="../assets/img/PV/pv_arrow_pic.png" alt="">
+                        </div>
+                        <div class="img3">
+                            <img src="../assets/img/PV/pv_nb_pic.png" alt="">
+                        </div>
+                        <div class="imgCom">
+                            <img src="../assets/img/PV/pv_arrow_pic.png" alt="">
+                        </div>
+                        <div>
+                            <img src="../assets/img/PV/pv_elec_pic.png" alt="">
+                        </div>
+                    </div>
+                </div>
+                <div class="pvRightDetail_bot">
+                    <div class="pvRightBotTitle">
+                        <span>功率曲线</span>
+                    </div>
+                    <div class="pvRightBotEchart" id="pvEchart"></div>
+                </div>
+            </div>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+import api from "api/index";
+import * as echarts from "echarts";
+
+import img0 from '../assets/img/PV/pv_state_gre.png'
+import img1 from '../assets/img/PV/pv_state_blue.png'
+import img2 from '../assets/img/PV/pv_state_red.png'
+import img3 from '../assets/img/PV/pv_state_grey.png'
+import img4 from '../assets/img/PV/pv_state_org.png'
+import img5 from '../assets/img/PV/pv_state_vio.png'
+import img6 from '../assets/img/PV/pv_state_un.png'
+export default {
+    props: {
+        windturbine: {
+            type: Object,
+            default: () => {
+                return {}
+            },
+        },
+    },
+    watch: {
+        windturbine: {
+            handler: function (json) {
+                if (json) {
+                    // this.initData();
+                }
+            },
+        },
+    },
+    data() {
+        return {
+            nbqData: [],
+            echartsData: [],
+            pvTitle: [],
+            startTimer: null,
+            echartTimer: null,
+            loading: false,
+            statusArr: []
+        };
+    },
+    computed: {
+        echartHeight() {
+            return {
+                'height': document.documentElement.clientHeight-30 + 'px'
+            }
+        }
+    },
+    created() {
+        this.statusArr = [img0, img1, img2, img3, img4, img5, img6]
+    },
+
+    methods: {
+        showTitle(data) {
+            let show = false
+            if (data.station.indexOf('HZJ') === -1) {
+                show = true
+            }
+            return show 
+        },
+        opened() {
+            this.getPvStationInfoData()
+            // this.loading = true
+        },
+        // 获取光伏详情配置
+        getPvStationInfoData() {
+            let that = this
+            that.echartsData = []
+            api.getStationInfoData().then(datas =>{
+                if (datas && datas.data) {
+                    console.log('windturbine', this.windturbine)
+                    for(let i in datas.data) {
+                        if (that.windturbine.station === i) {
+                            that.getPvStationData(datas.data[i].codeInfos)
+                            // that.startTimer = setInterval(() =>{
+                            //     that.getPvStationData(datas.data[i].codeInfos)
+                            // }, 3000)
+                            that.getEcharts(datas.data[i].codeInfos)
+                            // that.echartTimer = setInterval(() =>{
+                            //     that.getEcharts(datas.data[i].codeInfos)
+                            // }, 10000)
+                        }
+                    }
+                    
+                }
+            })
+        },
+        // 获取光伏详情配置数据
+        getPvStationData(list) {
+            console.log('list', list)
+            console.log('windturbine', this.windturbine)
+            let code = []
+            list.forEach(it =>{
+                code.push(it.code)
+            })
+            let params = {
+                id: this.windturbine.id,
+                codes: code.join(',')
+            }
+            api.getAllPvStationData(params).then(datas =>{
+                if (datas && datas.data) {
+                    list.forEach(it =>{
+                        if (it.code) {
+                            let codeFv = it.code.split(',')
+                            if (codeFv.length === 1) {
+                                for(let i in datas.data) {
+                                    if (it.code === i) {
+                                        it.value = datas.data[i].value.toFixed(2)
+                                    }
+                                }
+                            } else if (codeFv.length > 1) {
+                                for(let j =0; j<codeFv.length; j++) {
+                                    let codeVal = 0
+                                    for(let i in datas.data) {
+                                        if (codeFv[j] === i) {
+                                            codeVal += datas.data[i].value
+                                        }
+                                    }
+                                    it.value = codeVal.toFixed(2)
+                                }
+                            }
+                        } else {
+                            it.value = 0.00
+                        }
+                    })
+                    this.nbqData = list
+                }
+            })
+        },
+        // 获取曲线数据
+        getEcharts(data) {
+            let end = new Date().getTime()
+            for(let i =0; i<data.length; i++) {
+                let it = data[i]
+                if (it.type) {
+                    let params = {
+                        id: this.windturbine.id,
+                        code: it.code,
+                        startTime: end - 8*60*60*1000,
+                        endTime: end,
+                        interval: 60
+                    }
+                    api.getAllPvHistoryData(params).then(datas =>{
+                        let obj = {
+                            name: it.name,
+                            type: it.type,
+                            series: datas.data
+                        }
+                        this.echartsData.push(obj)
+                        if (this.echartsData.length === 3) {
+                            this.changeDataFormat(this.echartsData)
+                        }
+                    })
+                }
+            }
+        },
+        changeDataFormat(datas) {
+            let series = []
+            let xAxis = []
+            let legend = []
+            console.log('datas', datas)
+            datas.forEach((it, index) =>{
+                legend.push(it.name)
+                if (index === 0) {
+                    it.series.forEach(ic =>{
+                        let time = this.getTime(new Date(ic.ts))
+                        xAxis.push(time)
+                    })
+                }
+                let oneSeries = []
+                it.series.forEach(iv =>{
+                    oneSeries.push(iv.value)
+                })
+                let seriesObj = {
+                    name: it.name,
+                    type: 'line',
+                    data: oneSeries.map(ib => {
+                        return ib.toFixed(2)
+                    }),
+                    symbol: 'none'
+                }
+                series.push(seriesObj)
+            })
+            console.log('series', series)
+            console.log('xAxis', xAxis)
+            console.log('legend', legend)
+            this.getglobalLine('pvEchart', xAxis, legend, series)
+        },
+        getTime(date){ 
+            var h = date.getHours();  
+            h=h < 10 ? ('0' + h) : h;  
+            var minute = date.getMinutes();  
+            minute = minute < 10 ? ('0' + minute) : minute;  
+            var second=date.getSeconds();
+            second=second < 10 ? ('0' + second) : second;
+            return h + ':' + minute + ':' + second; 
+        },
+        closed(){
+            clearInterval(this.startTimer);
+            clearInterval(this.echartTimer);
+            this.startTimer = null
+            this.echartTimer = null
+        },
+        
+        getglobalLine(name, xAxis, legend, series) {
+            let option = {
+                backgroundColor: '#232d38',
+                tooltip: {
+                    trigger: 'axis'
+                },
+                legend: {
+                    data: legend
+                },
+                grid: {
+                    left: '5%',
+                    right: '4%',
+                    bottom: '3%',
+                    containLabel: true
+                },
+                xAxis: {
+                    type: 'category',
+                    boundaryGap: false,
+                    data: xAxis
+                },
+                yAxis: {
+                    type: 'value'
+                },
+                series: series
+            };
+            // 基于准备好的dom,初始化echarts实例
+            let dom = document.getElementById(name);
+            dom.removeAttribute("_echarts_instance_")
+            let myChart = echarts.init(dom, 'dark');
+            myChart.setOption(option);
+            this.loading = false
+            window.addEventListener("resize", function () {
+                myChart.resize()
+            })
+        },
+    }
+};
+</script>
+<style lang="less" scoped>
+.pvDetail {
+    background-color: black;
+    margin-top: -30px;
+    margin-left: -10px;
+    margin-right: -10px;
+    margin-bottom: -30px;
+    border-bottom: 20px solid rgb(36, 36, 36);
+    display: flex;
+    padding: 5px 10px;
+    .pvLeftDetail{
+        width: 20%;
+        .commonSty{
+            height: 40px;
+            background:#232d38;
+            border-radius: 10px;
+            margin-top: 10px;
+            span{
+                color: #fff;
+                display: inline-block;
+                position: relative;
+                top: 8px;
+                left: 16px;
+            }
+            img{
+                width: 20px;
+                height: 20px;
+                position: relative;
+                top: 10px;
+            }
+        }
+        .titleFont{
+            width: calc(100% - 20px);
+            font-size: 16px;
+            display: flex;
+            padding-right: 20px;
+            justify-content: space-between;
+        }
+        .arrSty{
+            display: flex;
+            justify-content: space-between;
+            span{
+                font-size: 14px;
+            }
+            .arrName{
+                width: 40%;
+                span{
+                    color: #c3c3c3;
+                }
+            }
+            .arrMsg{
+                width: 60%;
+                display: flex;
+                // justify-content: end;
+                padding-right: 20px;
+                .msgNum{
+                    width: 140px;
+                    span{
+                        padding-right: 20px;
+                        float: right;
+                    }
+                }
+                span{
+                    display: inline-block;
+                }
+            }
+        }
+    }
+    .pvRightDetail{
+        width: calc(80% - 10px);
+        padding-left: 10px;
+        .pvRightDetail_top{
+            background:#232d38;
+            border-radius: 10px;
+            margin-top: 10px;
+            .pvRightTopTitle{
+                display: flex;
+                justify-content: space-around;
+                height: 30px;
+                color: #253443;
+                border-bottom: 1px solid #5c5b5b;
+                padding: 5px 0;
+                margin-bottom: 10px;
+                span{
+                    color: #fff;
+                    margin-top: 3px;
+                }
+            }
+            .pvRightBotImg{
+                display: flex;
+                justify-content: space-around;
+                padding: 50px 0;
+                .img1{
+                    margin-top: 40px;
+                }
+                .img2{
+                    margin-top: 35px;
+                }
+                .img3{
+                    margin-top: 20px;
+                }
+                .imgCom{
+                    margin-top: 50px;
+                }
+            }
+        }
+        .pvRightDetail_bot{
+            background:#232d38;
+            border-radius: 10px;
+            margin-top: 10px;
+            height: 60%;
+            .pvRightBotTitle{
+                text-align: center;
+                height: 20px;
+                color: #253443;
+                border-bottom: 1px solid #5c5b5b;
+                padding: 10px 0;
+                margin-bottom: 10px;
+                span{
+                    color: #fff;
+                }
+            }
+            .pvRightBotEchart{
+                width: 100%;
+                // height: calc(100% - 70px);
+                height: 380px;
+            }
+        }
+    }
+}
+
+
+</style>
+<style lang="less">
+.my-info-dialog{
+    margin-top: 10vh !important;
+}
+</style>

+ 5 - 12
src/components/WindturbineDetailPages.vue

@@ -13,10 +13,10 @@
       <div class="titleList">
         <div class="chunkdiv" @click="handleClick(true)">
           <div class="title">风机号:&emsp;</div>
-          <!-- <div>{{ windturbine.windturbineId }}</div> -->
-          <div>
-            {{ windturbine.id.slice(0, windturbine.stationName.length-3) }}-{{ windturbine.code }}
-          </div>
+          <div>{{ windturbine.windturbineId }}</div>
+          <!-- <div>
+            {{ windturbine.stationId.slice(0, 2) }}-{{ windturbine.code }}
+          </div> -->
         </div>
         <div
           class="chunkdiv"
@@ -118,19 +118,12 @@
                 align="center"
               >
               </el-table-column>
-              <el-table-column
-                prop="lastUpdateTime"
-                label="故障时间"
-                width="150"
-                align="center"
-              >
-              </el-table-column>
               <el-table-column prop="alertText" label="报警信息" align="center">
               </el-table-column>
               <el-table-column label="故障状态" width="120" align="center">
                 <template #default="scope">
                   <span>
-                    {{ scope.row?.isOpened > 0 ? "故障" : "正常" }}
+                    {{ scope.row.isOpened > 0 ? "故障" : "正常" }}
                   </span>
                 </template>
               </el-table-column>

File diff suppressed because it is too large
+ 1165 - 656
src/components/allMatrices.vue


+ 269 - 129
src/components/control/areaCard.vue

@@ -5,7 +5,7 @@
       <img class="logo" src="../../assets/img/logo.png" alt="" />
       <div class="title">
         <div>{{ title }}</div>
-        <!-- <div style="display: flex; flex-direction: row; align-items: center">
+        <div style="display: flex; flex-direction: row; align-items: center">
           <div v-for="(item, index) in controlTypeList" :key="index">
             <div
               v-if="!item.type"
@@ -34,14 +34,13 @@
               {{ item.name }}
             </div>
           </div>
-        </div> -->
+        </div>
       </div>
       <div style="margin-top: 50px; height: 85%" @contextmenu="contextmenu">
-        <div class="scoll currentScroll">
-          +
+        <div class="scoll">
           <div class="currentScroll" style="height: 100%; overflow-y: scroll">
             <div class="matrix" v-if="startList.length > 0">
-              <div class="problemTitle">启动</div>
+              <div class="problemTitle titleSty">启动</div>
               <MatrixBlock
                 @on-click="handleDetial"
                 @choose-click="handleClick"
@@ -50,7 +49,7 @@
               </MatrixBlock>
             </div>
             <div class="matrix" v-if="stopList.length > 0">
-              <div class="problemTitle">停机</div>
+              <div class="problemTitle titleSty">停机</div>
               <MatrixBlock
                 @on-click="handleDetial"
                 @choose-click="handleClick"
@@ -59,7 +58,7 @@
               </MatrixBlock>
             </div>
             <div class="matrix" v-if="maintainList.length > 0">
-              <div class="problemTitle">维护</div>
+              <div class="problemTitle titleSty">维护</div>
               <MatrixBlock
                 @on-click="handleDetial"
                 @choose-click="handleClick"
@@ -68,7 +67,7 @@
               </MatrixBlock>
             </div>
             <div class="matrix" v-if="unMaintainList.length > 0">
-              <div class="problemTitle">取消维护</div>
+              <div class="problemTitle titleSty">取消维护</div>
               <MatrixBlock
                 @on-click="handleDetial"
                 @choose-click="handleClick"
@@ -79,7 +78,7 @@
           </div>
         </div>
       </div>
-      <!-- <div v-if="current == 1" class="send" @click="handleSend">发送</div> -->
+      <div v-if="current == 1" class="send" @click="handleSend">发送</div>
       <!-- <div v-if="current == 1" class="sends">发送</div> -->
     </div>
 
@@ -90,13 +89,13 @@
     >
     </WindturbineDetailPages>
   </div>
-  <!-- <StationSvgDetailPages
+  <StationSvgDetailPages
     v-model="svgVisible"
     :stationName="stationName"
-    :svgWeb="svgWeb"
+    :currentStation="svgWeb"
     @close="handleClose"
   >
-  </StationSvgDetailPages> -->
+  </StationSvgDetailPages>
 </template>
 
 <script>
@@ -106,18 +105,18 @@ import MatrixBlock from "../matrixBlock.vue";
 import MessageBridge from "utils/MessageBridge";
 import api from "api/index";
 import { debounce } from "lodash";
-// import StationSvgDetailPages from "../stationSvgDetailPages.vue";
+import StationSvgDetailPages from "../stationSvgDetailPages.vue";
 export default {
   name: "gy-card",
   components: {
     MatrixBlock,
     WindturbineDetailPages,
-    // StationSvgDetailPages,
+    StationSvgDetailPages,
   },
   created: function () {
     this.initData();
     this.suggestion();
-    // this.getControlType();
+    this.getControlType();
     this.handleWindturbineChange();
     this.intervals = setInterval(this.handleWindturbineChange, 3000);
     this.suggestion();
@@ -155,7 +154,7 @@ export default {
       // stationName: "",
       // 定时器
       // timer: "",
-      // controlTypeList: [],
+      controlTypeList: [],
       controlErorCodes: [
         "控制成功",
         "控制命令发送失败",
@@ -183,18 +182,23 @@ export default {
     },
   },
   methods: {
-    // getControlType() {
-    //   api.getControlType().then((res) => {
-    //     if (res) {
-    //       this.controlTypeList = res.data;
-    //     }
-    //   });
-    // },
+    getControlType() {
+      api.getControlType().then((res) => {
+        if (res) {
+          this.controlTypeList = res.data;
+        }
+      });
+    },
     control(current) {
       this.current = current === 0 ? current : current === 1 ? current : 1;
       this.suggestion();
     },
     initData: function () {
+      let mb = MessageBridge.getInstance();
+      let vss = [
+        { key: "/topic/voice-control", action: this.windturbineMessage },
+      ];
+      mb.register(vss);
     },
     suggestion() {
       api.recommendation().then((res) => {
@@ -203,12 +207,12 @@ export default {
           if (this.current === 0) {
             let dateList = [];
             this.titleList.forEach((item) => {
-              // let status = this.controlTypeList.filter(
-              //   (val) =>
-              //     val.stationId ===
-              //     this.windturbinelist[item.windturbineId].stationId
-              // )[0].type;
-              // if (status) {
+              let status = this.controlTypeList.filter(
+                (val) =>
+                  val.stationId ===
+                  this.windturbinelist[item.windturbineId].stationId
+              )[0].type;
+              if (status) {
                 let arr = Object.keys(this.windturbinelist).sort();
                 this.windturbinelist =
                   arr.length !== 0
@@ -229,20 +233,147 @@ export default {
                     break;
                 }
                 dateList.push(this.windturbinelist[item.windturbineId]);
-              // }
+              }
             });
-            // let mss = {};
-            // mss.type = "send";
-            // mss.deviceType = "Auto";
-            // setTimeout(() => {
-            //   if (dateList.length > 0) {
-            //     this.sendCommand(mss, dateList);
-            //   }
-            // }, 3000);
+            let mss = {};
+            mss.type = "send";
+            mss.deviceType = "Auto";
+            setTimeout(() => {
+              if (dateList.length > 0) {
+                this.sendCommand(mss, dateList);
+              }
+            }, 3000);
           }
         }
       });
     },
+    windturbineMessage(msg) {
+      if (this.$store.state.current === 1 || this.$store.state.current === 0) {
+        let arr = [];
+        if (msg === "CLOSE") {
+          arr.push(msg);
+        } else {
+          arr = msg.split("-");
+        }
+        this.dialogVisible = false;
+        this.svgVisible = false;
+        this.svgWeb = "";
+        if (arr[0] === "OPEN_FJ") {
+          this.currentWindturbine = this.windturbinelist[arr[1]];
+          setTimeout(() => {
+            this.dialogVisible = true;
+          }, 500);
+        } else if (arr[0] === "CLOSE") {
+          this.dialogVisible = false;
+          this.svgVisible = false;
+        }  else if (
+          arr[0] === "CONTROL_START" ||
+          arr[0] === "CONTROL_STOP" ||
+          arr[0] === "CONTROL_MAINTAIN" ||
+          arr[0] === "CONTROL_UNMAINTAIN"
+        ) {
+          let windControlList = [];
+          let mss = {};
+          arr.forEach((item) => {
+            if (
+              item ===
+              (this.windturbinelist[item]
+                ? this.windturbinelist[item].windturbineId
+                : "")
+            ) {
+              switch (arr[0]) {
+                case "CONTROL_START":
+                  this.windturbinelist[item].controlType = "1";
+                  break;
+                case "CONTROL_STOP":
+                  this.windturbinelist[item].controlType = "2";
+                  break;
+                case "CONTROL_MAINTAIN":
+                  this.windturbinelist[item].controlType = "6";
+                  break;
+                case "CONTROL_UNMAINTAIN":
+                  this.windturbinelist[item].controlType = "8";
+                  break;
+              }
+              windControlList.push(this.windturbinelist[item]);
+            }
+          });
+          mss.type = "send";
+          this.sendCommand(mss, windControlList);
+        } else if (
+          arr[0] === "CONTROL_LOCK_OVERHAUL" ||
+          arr[0] === "CONTROL_LOCK_MAINTAIN" ||
+          arr[0] === "CONTROL_LOCK_LNVOLVED_OVERHAUL" ||
+          arr[0] === "CONTROL_LOCK_LNVOLVED_MAINTAIN" ||
+          arr[0] === "CONTROL_LOCK_LNVOLVED_PG" ||
+          arr[0] === "CONTROL_LOCK_LNVOLVED_WEATHER" ||
+          arr[0] === "CONTROL_UNLOCK"
+        ) {
+          let windturbine = this.windturbinelist[arr[1]];
+          switch (arr[0]) {
+            case "CONTROL_LOCK":
+              this.sendLock({ value: "Lock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_OVERHAUL":
+              this.sendLock({ value: "CheckLock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_MAINTAIN":
+              this.sendLock({ value: "FaultLock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_LNVOLVED_OVERHAUL":
+              this.sendLock({ value: "StationCheckLock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_LNVOLVED_MAINTAIN":
+              this.sendLock({ value: "StationFaulLock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_LNVOLVED_PG":
+              this.sendLock({ value: "StationPowerLineLock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_LNVOLVED_WEATHER":
+              this.sendLock({ value: "StationWeatherLock" }, windturbine);
+              break;
+            case "CONTROL_UNLOCK":
+              this.sendLock({ value: "UnLock" }, windturbine);
+              break;
+          }
+        } else if (arr[0] === "CONTROL_SART_RECOMMENDATION") {
+          let mss = {};
+          mss.type = "send";
+          this.startList.forEach((item) => {
+            item.controlType = "1";
+          });
+          this.sendCommand(mss, this.startList);
+        } else if (arr[0] === "CONTROL_STOP_RECOMMENDATION") {
+          let mss = {};
+          mss.type = "send";
+          this.stopList.forEach((item) => {
+            item.controlType = "2";
+          });
+          this.sendCommand(mss, this.stopList);
+        } else if (arr[0] === "CONTROL_RECOMMENDATION_ALL") {
+          let windControlList = [];
+          let mss = {};
+          mss.type = "send";
+          this.startList.forEach((item) => {
+            item.controlType = "1";
+            windControlList.push(item);
+          });
+          this.stopList.forEach((item) => {
+            item.controlType = "2";
+            windControlList.push(item);
+          });
+          this.maintainList.forEach((item) => {
+            item.controlType = "6";
+            windControlList.push(item);
+          });
+          this.unMaintainList.forEach((item) => {
+            item.controlType = "8";
+            windControlList.push(item);
+          });
+          this.sendCommand(mss, windControlList);
+        }
+      }
+    },
     handleClick(values) {
       if (values.active) {
         let showIndex = null;
@@ -297,10 +428,10 @@ export default {
             item.controlType = 8;
           }
         });
-        // let mss = {};
-        // mss.type = "send";
-        // mss.deviceType = "Recommend";
-        // this.sendCommand(mss, this.chooseList);
+        let mss = {};
+        mss.type = "send";
+        mss.deviceType = "Recommend";
+        this.sendCommand(mss, this.chooseList);
       }
     },
     /* 右键菜单 */
@@ -308,12 +439,12 @@ export default {
       const { remote } = require("electron");
       let that = this;
       const menuTemplate = [
-        // {
-        //   label: "发送",
-        //   click() {
-        //     that.handleSend();
-        //   },
-        // },
+        {
+          label: "发送",
+          click() {
+            that.handleSend();
+          },
+        },
         {
           label: "挂牌",
           submenu: [
@@ -360,46 +491,46 @@ export default {
 
       menu.popup(remote.getCurrentWindow());
     },
-    // sendCommand(msg, windturbine) {
-    //   let bd = BackgroundData.getInstance();
-    //   if (!bd.LoginUser) {
-    //     this.$notify({
-    //       title: "请登录",
-    //       message: "控制风机需要先登录!",
-    //       type: "warning",
-    //       position: "bottom-right",
-    //       offset: 60,
-    //       duration: 3000,
-    //     });
-    //     return;
-    //   }
-    //   let sendList = windturbine;
-    //   if (sendList.length > 0) {
-    //     bd.checkout(sendList);
-    //     this.chooseList = [];
-    //     let pairs = {};
-    //     sendList.forEach((item) => {
-    //       let ct = {
-    //         windturbineId: item.windturbineId,
-    //         stationId: item.stationId,
-    //         projectId: item.projectId,
-    //         modelId: item.modelId,
-    //         controlType: item.controlType,
-    //         lockType: item.lockType,
-    //         userName: `system_${bd.LoginUser.name}`,
-    //         userId: 0,
-    //         auto: this.current === 0 ? true : false,
-    //         deviceType: msg.deviceType,
-    //       };
-    //       pairs[ct.windturbineId] = ct;
-    //     });
-    //     api.windturbControl(pairs).then((res) => {
-    //       if (res) {
-    //         this.controlSuccess(res);
-    //       }
-    //     });
-    //   }
-    // },
+    sendCommand(msg, windturbine) {
+      let bd = BackgroundData.getInstance();
+      if (!bd.LoginUser) {
+        this.$notify({
+          title: "请登录",
+          message: "控制风机需要先登录!",
+          type: "warning",
+          position: "bottom-right",
+          offset: 60,
+          duration: 3000,
+        });
+        return;
+      }
+      let sendList = windturbine;
+      if (sendList.length > 0) {
+        bd.checkout(sendList);
+        this.chooseList = [];
+        let pairs = {};
+        sendList.forEach((item) => {
+          let ct = {
+            windturbineId: item.windturbineId,
+            stationId: item.stationId,
+            projectId: item.projectId,
+            modelId: item.modelId,
+            controlType: item.controlType,
+            lockType: item.lockType,
+            userName: `system_${bd.LoginUser.name}`,
+            userId: 0,
+            auto: this.current === 0 ? true : false,
+            deviceType: msg.deviceType,
+          };
+          pairs[ct.windturbineId] = ct;
+        });
+        api.windturbControl(pairs).then((res) => {
+          if (res) {
+            this.controlSuccess(res);
+          }
+        });
+      }
+    },
     sendLock(msg, windturbine) {
       let bd = BackgroundData.getInstance();
       if (!bd.LoginUser) {
@@ -482,16 +613,14 @@ export default {
         for (let v in msg.data) {
           let val = msg.data[v];
           if (val.errorCode > 0) {
-            iserror = true;
-            mss += `${val.windturbineId}  ${
-              this.controlErorCodes[val.errorCode]
-            }\n`;
+                    iserror = true;
+                    mss += `${val.windturbineId}  ${this.controlErorCodes[val.errorCode]
+                        }\n`;
+          } else {
+              mss += `${val.windturbineId}\n`;
           }
         }
         let tp = iserror ? "warning" : "success";
-        // if (!iserror) {
-        //   mss = "控制成功";
-        // }
         this.$notify({
           title: "控制",
           message: mss,
@@ -523,31 +652,31 @@ export default {
         duration: 3000,
       });
     },
-    // handleTypeChange(val) {
-    //   let bd = BackgroundData.getInstance();
-    //   if (!bd.LoginUser) {
-    //     this.$notify({
-    //       title: "请登录",
-    //       message: "控制风机需要先登录!",
-    //       type: "warning",
-    //       position: "bottom-right",
-    //       offset: 60,
-    //       duration: 3000,
-    //     });
-    //     return;
-    //   }
-    //   api
-    //     .uodateControlType({
-    //       stationid: val.stationId,
-    //       type: !val.type,
-    //       userName: bd.LoginUser.name,
-    //     })
-    //     .then((res) => {
-    //       if (res.data === "success") {
-    //         this.getControlType();
-    //       }
-    //     });
-    // },
+    handleTypeChange(val) {
+      let bd = BackgroundData.getInstance();
+      if (!bd.LoginUser) {
+        this.$notify({
+          title: "请登录",
+          message: "控制风机需要先登录!",
+          type: "warning",
+          position: "bottom-right",
+          offset: 60,
+          duration: 3000,
+        });
+        return;
+      }
+      api
+        .uodateControlType({
+          stationid: val.stationId,
+          type: !val.type,
+          userName: bd.LoginUser.name,
+        })
+        .then((res) => {
+          if (res.data === "success") {
+            this.getControlType();
+          }
+        });
+    },
     handleWindturbineChange() {
       api.getWindturbine().then((res) => {
         let json = res.data;
@@ -642,16 +771,16 @@ export default {
     "$store.getters.current": {
       handler: function (json) {
         this.current = json;
-        // this.getControlType();
+        this.getControlType();
         if (json === 0) {
           let dateList = [];
           this.titleList.forEach((item) => {
-            // let status = this.controlTypeList.filter(
-            //   (val) =>
-            //     val.stationId ===
-            //     this.windturbinelist[item.windturbineId].stationId
-            // )[0].type;
-            // if (status) {
+            let status = this.controlTypeList.filter(
+              (val) =>
+                val.stationId ===
+                this.windturbinelist[item.windturbineId].stationId
+            )[0].type;
+            if (status) {
               let arr = Object.keys(this.windturbinelist).sort();
               this.windturbinelist =
                 arr.length !== 0
@@ -672,7 +801,7 @@ export default {
                   break;
               }
               dateList.push(this.windturbinelist[item.windturbineId]);
-            // }
+            }
           });
           let mss = {};
           mss.type = "send";
@@ -744,7 +873,7 @@ export default {
 }
 
 .problemTitle {
-  font-size: 12px;
+  /* font-size: 12px; */
   color: #bfbfbf;
   margin-top: 20px;
   margin-bottom: 20px;
@@ -852,3 +981,14 @@ export default {
   background-color: rgba(37, 116, 219, 1);
 }
 </style>
+
+<style lang="less">
+.currentScroll{
+    .matrix{
+        .titleSty {
+            font-size: 14px;
+            font-weight: bold;
+        }
+    }
+}
+</style>

+ 1 - 1
src/components/focus/currentWarningCard.vue

@@ -29,7 +29,7 @@
         <template v-slot="scope">
           <input
             type="checkbox"
-            v-model="scope.row?.isSelected"
+            v-model="scope.row.isSelected"
             @click="itemChecked(scope.row)"
           />
         </template>

+ 7 - 4
src/components/unpaidMatrixBlock.vue

@@ -15,10 +15,10 @@
               item.active ? 'left-' + item.status : 'unleft-' + item.status
             "
           >
+            <div>{{ item.windturbineId.slice(0, 2) }}</div>
+            <div>{{ item.windturbineId.slice(5) }}</div>
             <!-- <div>{{ item.windturbineId.slice(0, 2) }}</div>
-            <div>{{ item.windturbineId.slice(5) }}</div> -->
-            <div>{{ item.id.slice(0, 2) }}</div>
-            <div>{{ item.code }}</div>
+            <div>{{ item.code }}</div> -->
           </div>
           <div
             :class="
@@ -65,6 +65,7 @@
         </div>
         <div :class="'unpaid-' + item.status">
           <div
+            v-if="item.status === 4"
             class="progress"
             :style="`width: ${((item.power / item.powerProduction) * 100 >= 100
               ? 100
@@ -101,7 +102,9 @@ export default {
   mounted() {
     // this.getWindturbineFdc();
   },
-  updated() {},
+  created() {
+    console.log('dataList1', this.dataList)
+  },
   methods: {
     onSelectHandler(values) {
       this.$emit("choose-click", values);

+ 640 - 0
src/components/unpaidMatrixBlockPv.vue

@@ -0,0 +1,640 @@
+<template>
+  <div>
+    <div class="box">
+      <div
+        :class="item.active ? 'box-' + item.status : 'unbox-' + item.status"
+        :id="item.id"
+        v-for="(item, index) in dataList"
+        :key="index"
+        @click="onSelectHandler(item)"
+        @dblclick="sendMsg(item)"
+      >
+        <div class="info">
+          <div
+            :class="
+              item.active ? 'left-' + item.status : 'unleft-' + item.status
+            "
+          >
+            <div style="white-space:nowrap">{{ getName(item, 'top') }}</div>
+            <div style="white-space:nowrap">{{ getName(item, 'bot') }}</div><!-- item.id.slice(5) -->
+
+            <!-- <div>{{ item.windturbineId.slice(0, 2) }}</div>
+            <div>{{ item.code }}</div> -->
+          </div>
+          <div
+            :class="
+              item.active ? 'right-' + item.status : 'unright-' + item.status
+            "
+          >
+            <div class="rightrow">{{ item.i.toFixed(2) }} A</div>
+
+            <div class="rightrow">{{ item.u.toFixed(2) }} V</div>
+
+            <div class="rightrow">{{ item.p.toFixed(2) }} kw</div>
+
+            
+          </div>
+          <div class="locks" v-if="item.lockValue > 0">
+            <el-popover
+              placement="bottom-start"
+              :width="150"
+              trigger="hover"
+              class="popoverBack"
+              :show-arrow="false"
+            >
+              <template #reference>
+                <img class="lock" src="../assets/img/type/lock.png" alt="" />
+              </template>
+              <input
+                class="lock_input"
+                type="text"
+                placeholder=""
+                :value="
+                  item.lockValue === 9
+                    ? item.lockValues
+                    : options[item.lockValue]
+                "
+                disabled
+              />
+            </el-popover>
+          </div>
+        </div>
+        <div :class="'unpaid-' + item.status">
+          <div
+            v-if="item.status === 1"
+            class="progress"
+            :style="`width: ${((item.p / item.powerProduction) * 100 >= 100
+              ? 100
+              : (item.p / item.powerProduction) * 100
+            ).toFixed(2)}%;background-color: ${
+              unpaidColor[item.status]
+            };height: 50%;`"
+          ></div>
+        </div>
+      </div>
+    </div>
+    <!-- <WindturbineDetailPages
+      v-model="dialogVisible"
+      :showSvg="showSvg"
+      @close="handleClose"
+      :windturbine="currentWindturbine"
+    ></WindturbineDetailPages> -->
+  </div>
+</template>
+<script>
+import WindturbineDetailPages from "./WindturbineDetailPages.vue";
+export default {
+  components: {
+    WindturbineDetailPages,
+  },
+  props: {
+    dataList: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+  },
+  mounted() {
+    // this.getWindturbineFdc();
+  },
+  created() {
+    // console.log('dataList======>>>>>', this.dataList)
+  },
+  methods: {
+    getName(item, type) {
+        let name = ''
+        if (item.station) {
+            if (item.station.indexOf('HZJ') > -1) {
+                // debugger
+                if (type === 'top') {
+                    // name = item.code.slice(0, item.code.indexOf('-'))
+                    name = item.code
+                } else {
+                    // name = item.code.slice(item.code.indexOf('-')+1)
+                    name = ''
+                }
+            } else {
+                if (type === 'top') {
+                    name = item.station.slice(0, item.station.indexOf('_'))
+                } else {
+                    name = item.id.slice(item.id.indexOf('_')+1)
+                }
+            }
+        }
+        return name
+    },
+    onSelectHandler(values) {
+      this.$emit("choose-click", values);
+    },
+    sendMsg: function (itm) {
+      // this.dialogVisible = true;
+      this.$emit("on-click", itm);
+      // this.currentWindturbine = itm;
+    },
+    handleClose() {
+      this.dialogVisible = false;
+      this.showSvg = false;
+    },
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      showSvg: false,
+      currentWindturbine: {},
+      showVlaues: "",
+      // station: [],
+      options: {
+        8: "检修",
+        7: "故障维修",
+        2: "场内受累检修",
+        3: "场内受累故障",
+        4: "场外受累电网",
+        5: "场外受累天气",
+      },
+      unpaidColor: {
+        0: "#57cf3a",
+        1: "#0ec7dc",
+        2: "#1974ff",
+        3: "#cd4cdd",
+        3: "#ff3c80",
+      },
+    };
+  },
+};
+</script>
+<style lang="less" scoped>
+.box {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+}
+
+.info {
+  display: flex;
+  flex-direction: row;
+  height: 50px;
+  width: 100%;
+  justify-content: space-between;
+}
+.box-0 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(05, 187, 76, 1);
+  background-color: rgba(05, 187, 76, 0.05);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #09e45e;
+}
+
+.unbox-0 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(05, 187, 76, 1);
+  background-color: rgba(05, 187, 76, 0.2);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+}
+.unpaid-0 {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  height: 10px;
+  border-top: 1px solid rgba(05, 187, 76, 1);
+}
+.left-0 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(05, 187, 76, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-0 {
+  width: 37%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(05, 187, 76, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-0 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(05, 187, 76, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-0 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(05, 187, 76, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+.box-1 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(75, 85, 174, 1);
+  background-color: rgba(75, 85, 174, 0.05);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #6876f2;
+}
+
+.unbox-1 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(75, 85, 174, 1);
+  background-color: rgba(75, 85, 174, 0.2);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+}
+.unpaid-1 {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  height: 10px;
+  border-top: 1px solid rgba(75, 85, 174, 1);
+}
+.left-1 {
+  // width: 35%;
+  width: 50%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-1 {
+  // width: 37%;
+  width: 50%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-1 {
+  // width: 69%;
+  width: 55%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-1 {
+  // width: 65%;
+  width: 55%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+.box-2, .box-4, .box-5 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(186, 50, 55, 1);
+  background-color: rgba(186, 50, 55, 0.05);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #ff1313;
+}
+
+.unbox-2, .unbox-4, .unbox-5 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(186, 50, 55, 1);
+  background-color: rgba(186, 50, 55, 0.2);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+}
+
+.unpaid-2, .unpaid-4, .unpaid-5 {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  height: 10px;
+  border-top: 1px solid rgba(186, 50, 55, 1);
+}
+
+.left-2, .left-4, .left-5 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-2, .unleft-4, .unleft-5 {
+  width: 37%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-2, .right-4, .right-5 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-2, .unright-4, .unright-5 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.box-3 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(225, 125, 36, 1);
+  background-color: rgba(225, 125, 36, 0.05);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #f28627;
+}
+
+.unbox-3 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(225, 125, 36, 1);
+  background-color: rgba(225, 125, 36, 0.2);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+}
+
+.unpaid-3 {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  height: 10px;
+  border-top: 1px solid rgba(225, 125, 36, 1);
+}
+
+.left-3 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-3 {
+  width: 37%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-3 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-3 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.box-4 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(75, 85, 174, 1);
+  background-color: rgba(75, 85, 174, 0.05);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #6876f2;
+}
+
+.box-5, .box-6 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(186, 50, 55, 1);
+  background-color: rgba(186, 50, 55, 0.05);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #ff1313;
+}
+
+.unbox-5, .unbox-6 {
+  width: 135px;
+  height: 60px;
+  color: #ffffff;
+  border: 1px solid rgba(186, 50, 55, 1);
+  background-color: rgba(186, 50, 55, 0.2);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-right: 10px;
+  margin-top: 10px;
+}
+
+
+.unpaid-5, .unpaid-6 {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  height: 10px;
+  border-top: 1px solid rgba(186, 50, 55, 1);
+}
+
+.left-5, .left-6 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-5, .unleft-6 {
+  width: 37%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-5, .right-6 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-5, .unright-6 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.lock {
+  width: 10px;
+  height: 10px;
+  position: relative;
+  right: 4px;
+}
+
+.lock-on {
+  width: 0px;
+  height: 0px;
+  opacity: 0;
+}
+
+.locks:hover .lock-on {
+  position: fixed;
+  display: flex;
+  align-items: center;
+  width: 80px;
+  height: 30px;
+  border: 1px solid #999999;
+  background-color: #999999;
+  opacity: 1;
+  color: #ffffff;
+  z-index: 999;
+}
+
+.lock_input {
+  width: 140px;
+  background-color: #292929;
+  height: 40px;
+  color: #ffffff;
+}
+</style>

+ 92 - 77
src/components/warning/warningCard.vue

@@ -89,7 +89,7 @@ export default {
   props: {},
   data() {
     return {
-      values: [],
+      values: ["-"],
       dialogVisible: false,
       showSvg: false,
       svgVisible: false,
@@ -104,101 +104,117 @@ export default {
     faultMessage(json) {
       api.alarmFault().then((res) => {
         if (res.data) {
-          this.values = []
           let val = res.data;
           if (Object.keys(val).length > 0) {
-            // let syzAlarmArray = this.$store.state.syzAlarmArray || [];
-            // val.forEach((ele) => {
-            //   if (
-            //     ele.category1 === "SYZ" &&
-            //     ele.rank === this.$store.state.syzAlarmRank
-            //   ) {
-            //     let item = syzAlarmArray.find((findEle) => {
-            //       return ele.idString === findEle.idString;
-            //     });
-            //     if (!item) {
-            //       ele.soundSource = "syz";
-            //       ele.isConfirm = false;
-            //       syzAlarmArray.push(ele);
-            //     }
-            //   }
-            // });
+            let syzAlarmArray = this.$store.state.syzAlarmArray || [];
+            console.log('syzAlarmRank', this.$store.state.syzAlarmRank)
+            val.forEach((ele) => {
+              if (
+                ele.category1 === "SYZ" &&
+                ele.rank === this.$store.state.syzAlarmRank
+              ) {
+                let item = syzAlarmArray.find((findEle) => {
+                  return ele.idString === findEle.idString;
+                });
+                if (!item) {
+                  ele.soundSource = "syz";
+                  ele.isConfirm = false;
+                  syzAlarmArray.push(ele);
+                }
+              }
+            });
 
-            // this.$store.commit("syzAlarmArray", syzAlarmArray);
+            this.$store.commit("syzAlarmArray", syzAlarmArray);
 
-            // this.$store.commit(
-            //   "showWarningMask",
-            //   syzAlarmArray.some((ele) => {
-            //     return ele.rank === this.$store.state.syzAlarmRank;
-            //   })
-            // );
+            this.$store.commit(
+              "showWarningMask",
+              syzAlarmArray.some((ele) => {
+                return ele.rank === this.$store.state.syzAlarmRank;
+              })
+            );
 
-            // const syzAlarmItem = this.$store.getters.syzAlarmArray.some(
-            //   (ele) => {
-            //     return (
-            //       ele.category1 === "SYZ" &&
-            //       ele.rank === this.$store.state.syzAlarmRank
-            //     );
-            //   }
-            // );
+            const syzAlarmItem = this.$store.getters.syzAlarmArray.some(
+              (ele) => {
+                return (
+                  ele.category1 === "SYZ" &&
+                  ele.rank === this.$store.state.syzAlarmRank
+                );
+              }
+            );
 
-            // const syzDialogShow = this.$store.getters.syzAlarmArray.some(
-            //   (ele) => {
-            //     return !ele.isConfirm;
-            //   }
-            // );
+            const syzDialogShow = this.$store.getters.syzAlarmArray.some(
+              (ele) => {
+                return !ele.isConfirm;
+              }
+            );
 
-            // syzDialogShow && this.$store.commit("syzDialogShow", syzDialogShow);
+            syzDialogShow && this.$store.commit("syzDialogShow", syzDialogShow);
 
-            // let syzBtnFlicker = syzAlarmArray.some((ele) => {
-            //   return ele.rank === this.$store.state.syzAlarmRank;
-            // });
+            let syzBtnFlicker = syzAlarmArray.some((ele) => {
+              return ele.rank === this.$store.state.syzAlarmRank;
+            });
 
-            // this.$store.commit("syzBtnFlicker", syzBtnFlicker);
+            this.$store.commit("syzBtnFlicker", syzBtnFlicker);
 
+            let sleected = {};
+            this.values.forEach((it) => {
+              if (it.isSelected) {
+                sleected[it.id] = 0;
+              }
+            });
+            this.values = new Array();
             for (let v in val) {
               let vl = val[v];
+              if (vl.stationId != "QS_FDC" && vl.category1 == "FJ") {
+                vl.alertText = vl.windturbineName + "-" + vl.alertText;
+              }
+              if (
+                sleected[vl.id] == 0 &&
+                BackgroundData.getInstance().LoginUser
+              ) {
+                vl.isSelected = true;
+              }
               if (vl.category1 !== "GF" && vl.objectId.indexOf("GDC") < 0) {
                 this.values.push(vl);
               }
             }
 
-            // let fjAlarArray = [];
-            // let fjDataArray = [];
+            let fjAlarArray = [];
+            let fjDataArray = [];
 
-            // this.values.forEach((ele) => {
-            //   if (ele.category1 === "FJ") {
-            //     if (ele.rank >= this.$store.state.fjAlarmRank) {
-            //       fjAlarArray.push(ele);
-            //     } else {
-            //       fjDataArray.push(ele);
-            //     }
-            //   }
-            // });
+            this.values.forEach((ele) => {
+              if (ele.category1 === "FJ") {
+                if (ele.rank >= this.$store.state.fjAlarmRank) {
+                  fjAlarArray.push(ele);
+                } else {
+                  fjDataArray.push(ele);
+                }
+              }
+            });
 
-            // if (syzAlarmItem) {
-            //   let syzRes = syzAlarmArray.find((syzAlarmItem) => {
-            //     return (
-            //       syzAlarmItem.category1 === "SYZ" &&
-            //       syzAlarmItem.rank === this.$store.state.syzAlarmRank &&
-            //       this.$store.getters.syzArray.some((findEle) => {
-            //         return (
-            //           findEle.id === syzAlarmItem.stationId && !findEle.isMute
-            //         );
-            //       })
-            //     );
-            //   });
-            //   if (syzRes) {
-            //     // this.syzAudioPlay(syzAlarmArray);
-            //     this.audioPlay(this.getSound("syz"));
-            //   } else {
-            //     this.audioPlay(this.getSound("wd"));
-            //   }
-            // } else if (!syzAlarmItem && fjAlarArray.length) {
-            //   this.audioPlay(this.getSound(fjAlarArray[0].soundSource || "wd"));
-            // }
+            if (syzAlarmItem) {
+              let syzRes = syzAlarmArray.find((syzAlarmItem) => {
+                return (
+                  syzAlarmItem.category1 === "SYZ" &&
+                  syzAlarmItem.rank === this.$store.state.syzAlarmRank &&
+                  this.$store.getters.syzArray.some((findEle) => {
+                    return (
+                      findEle.id === syzAlarmItem.stationId && !findEle.isMute
+                    );
+                  })
+                );
+              });
+              if (syzRes) {
+                // this.syzAudioPlay(syzAlarmArray);
+                this.audioPlay(this.getSound("syz"));
+              } else {
+                this.audioPlay(this.getSound("wd"));
+              }
+            } else if (!syzAlarmItem && fjAlarArray.length) {
+              this.audioPlay(this.getSound(fjAlarArray[0].soundSource || "wd"));
+            }
 
-            // this.values = [].concat(fjAlarArray, fjDataArray);
+            this.values = [].concat(fjAlarArray, fjDataArray);
           }
         }
       });
@@ -319,7 +335,6 @@ export default {
             offset: 60,
             duration: 3000,
           });
-          this.faultMessage();
         });
     },
     setCellClassName({ row }) {

+ 2 - 2
src/utils/MessageBridge.js

@@ -5,7 +5,7 @@ import store from '../store/index'
 export default class MessageBridge {
   observers;// 观察者
   calcSocket;// 后台websocket
-  // adapterSocket;// 适配器websocket
+  adapterSocket;// 适配器websocket
   flag;
   windFlag;
   flagArr;
@@ -21,7 +21,7 @@ export default class MessageBridge {
     // this.reconnect()
     this.calcSocket = new WebSocket(`ws://${process.env.VUE_APP_APIS}/wisdom_service`, this.onmessage, ["/topic/attention","/topic/temperature-count"]);
       // "/topic/title-info","/topic/suggestion","/topic/fault-popup",
-    // this.adapterSocket = new WebSocket(`ws://${process.env.VUE_APP_ADAPTERURLS}/wisdom`, this.onmessage, ["/topic/windturbine", "/topic/pv"]);
+    this.adapterSocket = new WebSocket(`ws://${process.env.VUE_APP_ADAPTERURLS}/wisdom`, this.onmessage, ["/topic/windturbine", "/topic/pv"]);
   }
 
   /* 单例 */