xujuanning 2 недель назад
Родитель
Сommit
8cde0411ae

+ 1 - 1
src/App.vue

@@ -114,7 +114,7 @@
         <!-- :style="{ paddingLeft: isFixed && menuLength > 0 ? '52px' : 0 }" -->
         <router-view />
       </div>
-      <alarmBadge />
+      <!-- <alarmBadge /> -->
     </div>
 
     <div class="curTabsBox" v-if="switchTabShow()">

+ 2 - 1
src/components/alarm-badge/index.vue

@@ -170,7 +170,6 @@ export default {
   },
   methods: {
     wsinit() {
-        this.$store.commit("setWarningList", []);
         this.getAlarmConfig();
         this.x = 80;
         this.y = 80;
@@ -181,6 +180,8 @@ export default {
 
         Promise.all(requestResult)
         .then((promiseResult) => {
+        this.$store.commit("setWarningList", []);
+
             promiseResult.forEach(({ data }) => {
             data?.ls?.forEach((ele) => {
                 this.pushALarmItem(ele);

+ 1 - 0
src/components/chart/combination/area-line-chart.vue

@@ -296,6 +296,7 @@ export default {
             data: value.value,
             smooth: true, //平滑展示
             yAxisIndex: value.text === '风速' ? 1 : 0,
+            itemStyle: value.itemStyle
           });
         });
       }

+ 3 - 2
src/components/chart/combination/multiple-bar-line-chart.vue

@@ -152,6 +152,7 @@ export default {
             data: value.value.map((t) => {
               return t.value;
             }),
+            itemStyle: value.itemStyle
           });
         });
       }
@@ -167,10 +168,10 @@ export default {
           smooth: true, //平滑展示
           yAxisIndex: 1,
           lineStyle: {
-            color: "#f8de5b",
+            color: "#3ba272",
           },
           itemStyle: {
-            color: "#f8de5b",
+            color: "#3ba272",
           },
         });
       }

+ 11 - 10
src/components/chart/line/multiple-line-chart.vue

@@ -265,16 +265,17 @@ export default {
           smooth: true,
           showSymbol: false,
           zlevel: index,
-          lineStyle: {
-            normal: {
-              // color: index != 0 ? this.$store.state.themeName === "dark" ? partten.getColor("gray") : "#000" : this.color[index],
-              color: this.color[index],
-              width: 1,
-            },
-            // emphasis: {
-            //   color: this.color[index],
-            // },
-          },
+          itemStyle: value.itemStyle,
+          // lineStyle: {
+          //   normal: {
+          //     // color: index != 0 ? this.$store.state.themeName === "dark" ? partten.getColor("gray") : "#000" : this.color[index],
+          //     color: this.color[index],
+          //     width: 1,
+          //   },
+          //   // emphasis: {
+          //   //   color: this.color[index],
+          //   // },
+          // },
           // areaStyle: {
           //   normal: {
           //     color:

+ 60 - 4
src/views/IntegratedAlarm/safe/components/safecomponent.vue

@@ -17,7 +17,7 @@
       </div>
     </div>
     <el-table
-      :data="dialogTableData"
+      :data="alarmList"
       style="width: 100%"
       height="calc(100% - 100px)"
     >
@@ -38,7 +38,7 @@
       <el-table-column
         v-if="deviceType != 'booststation'"
         align="center"
-        prop="deviceName"
+        prop="code"
         label="设备"
         width="80"
         show-overflow-tooltip
@@ -271,6 +271,8 @@
 
 <script>
 import { confirmAlart } from "@/api/zhbj/index.js";
+import { alarm_history } from "@/api/zhbj/index.js";
+import dayjs from "dayjs";
 export default {
   props: {
     title: {
@@ -306,17 +308,69 @@ export default {
       dialogTableData: [],
       fullTableData: [],
       stopUpdate: false,
+      timer: null
     };
   },
 
   created() {
-    this.initWarningList();
+  },
+  mounted() {
+    this.getAlarmHistory();
+    this.timer = setInterval(() => {
+      this.getAlarmHistory();
+    }, 60000);
+  },
+  unmounted() {
+    clearInterval(this.timer);
+    this.timer = null;
   },
 
   methods: {
     iconfonts() {
       return this.iconfontsObj[this.deviceType];
     },
+    //查历史报警
+    getAlarmHistory() {
+      let params = {
+        pageNum: 1,
+        pageSize: 30,
+        alarmId: "",
+        alarmType: "custom",
+        deviceType: "windturbine",
+        stationid: "",
+        deviceid: "",
+        modelId: "",
+        components: "",
+        description: "",
+        isclose: false,
+        // begin: dayjs().add(-1, "hour").format("YYYY-MM-DD HH:mm:ss"),//获取当前时间的前一天的相同时间
+        begin: dayjs().startOf('day').format("YYYY-MM-DD HH:mm:ss"), //获取当天 0 点
+        end: dayjs().format("YYYY-MM-DD HH:mm:ss"),
+      };
+      if (params.alarmType == "windturbine") {
+        // params.stationid = "SXJ_KGDL_DJY_FDC_STA";
+        params.stationid = "";
+      } else if (params.alarmType == "inverter") {
+        params.stationid = "SXJ_KGDL_JR_GDC_STA";
+      }
+      alarm_history(params, 12000).then(res => {
+        if (res?.data?.ls?.length > 0) {
+          let alarmList = [];
+          this.alarmList = [];
+          res.data.ls.forEach((ele) => {
+            ele.tsName = dayjs(ele.ts).format("MM-DD HH-mm-ss")
+            alarmList.push(ele);
+          });
+          alarmList.sort((a, b) => {
+            return b.ts - a.ts;
+          });
+          this.alarmList = alarmList;
+          console.log("alarmList===>>>>", this.alarmList);
+        }
+      })
+
+      
+    },
 
     initWarningList() {
       if (this.$store.state.warningList?.length > 0) {
@@ -345,7 +399,9 @@ export default {
         //   return b.ts - a.ts;
         // });
         this.alarmList = alarmList;
-        console.log("alarmList===>>>>", this.alarmList);
+        console.log("warningList===>>>>", this.$store.state.warningList);
+        // console.log("dialogTableData===>>>>", dialogTableData);
+        // console.log("alarmList===>>>>", this.alarmList);
         if (!this.stopUpdate) {
           this.dialogTableData = dialogTableData;
         }

+ 1 - 1
src/views/economicsOperation/efficiency/stateEfficiency/index.vue

@@ -154,7 +154,7 @@ export default {
       company: "",
       companyOptions: [],
       tableData: [],
-      current: "1",
+      current: "2",
     };
   },
   filters: {},

+ 9 - 0
src/views/economicsOperation/windAnalyse/monthlyAnalysis/reportDialog.vue

@@ -132,6 +132,7 @@ import PizZip from "pizzip";
 import docxtemplater from "docxtemplater";
 import JSZipUtils from "jszip-utils";
 import { saveAs } from "file-saver";
+import { nxfStyle } from "@/utils/nxfCodeStyle";
 export default {
   data() {
     return {
@@ -524,12 +525,14 @@ export default {
             barWidth: 25,
             yAxisIndex: 0,
             data: barData,
+            itemStyle: { color: nxfStyle("实际发电量") },
           },
           {
             name: "风速",
             type: "line",
             yAxisIndex: 1,
             data: lineData,
+            itemStyle: { color: nxfStyle("风速") },
           },
         ],
       };
@@ -562,6 +565,7 @@ export default {
           stack: "one",
           barWidth: "25",
           data: res.ws.map((i) => i.jxss),
+          itemStyle: { color: nxfStyle("检修损失电量") },
         },
         {
           name: "故障损失电量",
@@ -569,6 +573,7 @@ export default {
           stack: "one",
           barWidth: "25",
           data: res.ws.map((i) => i.gzss),
+          itemStyle: { color: nxfStyle("故障损失电量") },
         },
         {
           name: "限电损失电量",
@@ -576,6 +581,7 @@ export default {
           stack: "one",
           barWidth: "25",
           data: res.ws.map((i) => i.xdss),
+          itemStyle: { color: nxfStyle("限电损失电量") },
         },
         {
           name: "受累损失电量",
@@ -583,6 +589,8 @@ export default {
           stack: "one",
           barWidth: "25",
           data: res.ws.map((i) => i.slss),
+          // itemStyle: { color: nxfStyle("受累损失电量") },
+          itemStyle: { color: "#cccccc" },
         },
         {
           name: "性能未达标损失电量",
@@ -590,6 +598,7 @@ export default {
           stack: "one",
           barWidth: "25",
           data: res.ws.map((i) => i.xnss),
+          itemStyle: { color: nxfStyle("性能损失电量") },
         },
       ];
 

+ 3 - 0
src/views/economicsOperation/windAnalyse/powerSearch/index.vue

@@ -148,6 +148,7 @@ import partten from "@/helper/partten.js";
 import util from "@/helper/util.js";
 import utils from "@/utills/downXlsx";
 import dataJson from "./dataJson.json";
+import { nxfStyle } from "@/utils/nxfCodeStyle";
 export default {
   name: "PowerSearch",
   data() {
@@ -328,6 +329,7 @@ export default {
           lineStyle: {
             width: 1,
           },
+          itemStyle: { color: nxfStyle("保证功率") },
           data: seriesOne,
         };
         // series.push(obj)
@@ -338,6 +340,7 @@ export default {
           lineStyle: {
             width: 1,
           },
+          itemStyle: { color: nxfStyle("拟合功率") },
           data: seriesTwo,
         };
         // series.push(objs)

+ 12 - 3
src/views/economicsOperation/windAnalyse/singleWindAnasyle/windDetailDialog.vue

@@ -208,7 +208,7 @@
           >
             <div class="power-info month-1">
               <div class="info-item">
-                <div class="text">发电量:</div>
+                <div class="text">实际发电量:</div>
                 <div class="value green">{{ dayPowerInfo.rfdl }}万kWh</div>
               </div>
               <div class="info-item">
@@ -307,7 +307,7 @@
               >
                 <div class="power-info month-3">
                   <div class="info-item">
-                    <div class="text">月发电量:</div>
+                    <div class="text">月实际发电量:</div>
                     <div class="value green">{{ dayPowerInfo.yfdl }}万kWh</div>
                   </div>
                   <div class="info-item">
@@ -388,7 +388,7 @@
               >
                 <div class="power-info power-infoss month-2">
                   <div class="info-item">
-                    <div class="text">年发电量:</div>
+                    <div class="text">年实际发电量:</div>
                     <div class="value green">{{ dayPowerInfo.nfdl }}</div>
                   </div>
                   <div class="info-item">
@@ -1451,30 +1451,35 @@ export default {
             type: "bar",
             yAxisIndex: 0,
             value: [],
+            itemStyle: { color: nxfStyle("实际发电量") },
           },
           {
             title: "检修损失",
             type: "bar",
             yAxisIndex: 0,
             value: [],
+            itemStyle: { color: nxfStyle("检修损失电量") },
           },
           {
             title: "故障损失",
             type: "bar",
             yAxisIndex: 0,
             value: [],
+            itemStyle: { color: nxfStyle("故障损失电量") },
           },
           {
             title: "限电损失",
             type: "bar",
             yAxisIndex: 0,
             value: [],
+            itemStyle: { color: nxfStyle("限电损失电量") },
           },
           {
             title: "欠发损失",
             type: "bar",
             yAxisIndex: 0,
             value: [],
+            itemStyle: { color: nxfStyle("受累损失电量") },
           },
         ];
         let powerChartLineData = {
@@ -1482,6 +1487,7 @@ export default {
           unit: "(m/s)",
           type: "line",
           data: [],
+          itemStyle: { color: nxfStyle("风速") },
         };
         for (let i = 0; i < keyArray.length; i++) {
           let keyEle = keyArray[i];
@@ -1634,16 +1640,19 @@ export default {
             title: "实际拟合功率",
             yAxisIndex: 0,
             value: [],
+            itemStyle: { color: nxfStyle("拟合功率") },
           },
           {
             title: "最优功率",
             yAxisIndex: 0,
             value: [],
+            itemStyle: { color: nxfStyle("偏差下限") },
           },
           {
             title: "保证功率",
             yAxisIndex: 0,
             value: [],
+            itemStyle: { color: nxfStyle("保证功率") },
           },
         ];
         keyArray.forEach((keyEle, keyIndex) => {