Browse Source

问题修改提交

sunzehao 1 month ago
parent
commit
82fa29553d

+ 8 - 5
src/views/IntegratedAlarm/DetailMatrix/index.vue

@@ -776,8 +776,15 @@
             },
         },
 
+
         mounted() {
-            this.requestData(true)
+            this.timmer = setInterval(() => {
+            this.requestData(true);
+            }, 5000);
+        },
+        unmounted() {
+            clearInterval(this.timmer);
+            this.timmer = null;
         },
 
         // 函数
@@ -1208,10 +1215,6 @@
                 this.$refs.child.openCurvDatas(y, 1, wpid);
             },
         },
-        unmounted() {
-            clearInterval(this.timmer);
-            this.timmer = null;
-        },
     };
 </script>
 

+ 50 - 48
src/views/IntegratedAlarm/safe/customWarning/index.vue

@@ -345,48 +345,7 @@ onMounted(() => {
   state.alarmId = route.query.alarmId || "";
   state.modelId = route.query.modelId || "";
 
-  state.tableData = new Array(5).fill({
-    tbName: null,
-    alarmId: "SQ_0125",
-    alarmType: "windturbine",
-    characteristic: "预警",
-    components: "BPQ",
-    confirmed: false,
-    description: "变频器故障27",
-    deviceId: "SXJ_KGDL_XWT_F_WT_0014_EQ",
-    devicename: "14号风机",
-    deviceType: "windturbine",
-    enabled: true,
-    lineid: "SXJ_KGDL_XWTF01_LN",
-    linename: "一号风机线",
-    modelId: "SEC-W02B-1250kW",
-    projectid: "SXJ_KGDL_XWTF01_EG",
-    projectname: "一期项目",
-    rank: 3,
-    resettable: false,
-    stationid: "GJNY_SXGS_ZZ_FDC_STA",
-    stationname: "13风电场",
-    subcomponents: "NULL",
-    suffix: null,
-    tagid: "FD-YYXWT-ShangQi.140623F1412MDL01BF399DB0122SP01RAW00",
-    triggertype: 1463,
-    uniformcode: "BJ0001",
-    superTableName: null,
-    ts: 1718160795000,
-    val: 1,
-    oval: null,
-    endts: 0,
-    timelong: 0,
-    name: null,
-    nemCode: "状态码1463",
-    faultCause: "13.7s>信号<=14.2s",
-    resolvent: "输入端142功率上升延迟300s",
-    wpName: "13风电场",
-    code: "#14",
-    wpId: null,
-    faultType: null,
-    id: "sxj_kgdl_xwt_f_wt_0014_eq_sq_0125",
-  });
+  
 
   getStationList();
   getequipmentmodel_list();
@@ -623,12 +582,55 @@ const getAlarmHistoryt = async () => {
 //   tableLoading.value = false;
     if (data) {
         query.pageTotal = data?.total;
-    data?.ls?.forEach((ele) => {
-        ele.isCloseName = ele.endts ? "已解除" : "未解除";
-        ele.deviceTypeName = tableFilter(ele.deviceType);
-        ele.endtsName = ele.endts > 0 ? formatTime(ele.endts) : "--";
-    });
-    state.tableData = data?.ls;
+        data?.ls?.forEach((ele) => {
+            ele.isCloseName = ele.endts ? "已解除" : "未解除";
+            ele.deviceTypeName = tableFilter(ele.deviceType);
+            ele.endtsName = ele.endts > 0 ? formatTime(ele.endts) : "--";
+        });
+        state.tableData = data?.ls;
+    } else {
+        state.tableData = new Array(5).fill({
+            tbName: null,
+            alarmId: "SQ_0125",
+            alarmType: "windturbine",
+            characteristic: "预警",
+            components: "BPQ",
+            confirmed: false,
+            description: "变频器故障27",
+            deviceId: "SXJ_KGDL_XWT_F_WT_0014_EQ",
+            devicename: "14号风机",
+            deviceType: "windturbine",
+            enabled: true,
+            lineid: "SXJ_KGDL_XWTF01_LN",
+            linename: "一号风机线",
+            modelId: "SEC-W02B-1250kW",
+            projectid: "SXJ_KGDL_XWTF01_EG",
+            projectname: "一期项目",
+            rank: 3,
+            resettable: false,
+            stationid: "GJNY_SXGS_ZZ_FDC_STA",
+            stationname: "13风电场",
+            subcomponents: "NULL",
+            suffix: null,
+            tagid: "FD-YYXWT-ShangQi.140623F1412MDL01BF399DB0122SP01RAW00",
+            triggertype: 1463,
+            uniformcode: "BJ0001",
+            superTableName: null,
+            ts: 1718160795000,
+            val: 1,
+            oval: null,
+            endts: 0,
+            timelong: 0,
+            name: null,
+            nemCode: "状态码1463",
+            faultCause: "13.7s>信号<=14.2s",
+            resolvent: "输入端142功率上升延迟300s",
+            wpName: "13风电场",
+            code: "#14",
+            wpId: null,
+            faultType: null,
+            id: "sxj_kgdl_xwt_f_wt_0014_eq_sq_0125",
+        });
     }
   
 };

+ 61 - 56
src/views/IntegratedAlarm/safe/historyWarning/index.vue

@@ -367,48 +367,7 @@ onMounted(() => {
   //     ];
   //   }
 
-  state.tableData = new Array(5).fill({
-    tbName: null,
-    alarmId: "SQ_0125",
-    alarmType: "windturbine",
-    characteristic: "报警",
-    components: "BPQ",
-    confirmed: false,
-    description: "变频器故障27",
-    deviceId: "SXJ_KGDL_XWT_F_WT_0014_EQ",
-    devicename: "14号风机",
-    deviceType: "windturbine",
-    enabled: true,
-    lineid: "SXJ_KGDL_XWTF01_LN",
-    linename: "一号风机线",
-    modelId: "SEC-W02B-1250kW",
-    projectid: "SXJ_KGDL_XWTF01_EG",
-    projectname: "一期项目",
-    rank: 3,
-    resettable: false,
-    stationid: "",
-    stationname: "13风电场",
-    subcomponents: "NULL",
-    suffix: null,
-    tagid: "FD-YYXWT-ShangQi.140623F1412MDL01BF399DB0122SP01RAW00",
-    triggertype: 1463,
-    uniformcode: "BJ0001",
-    superTableName: null,
-    ts: 1718160795000,
-    val: 1,
-    oval: null,
-    endts: 0,
-    timelong: 0,
-    name: null,
-    nemCode: "状态码1463",
-    faultCause: "13.7s>信号<=14.2s",
-    resolvent: "输入端142功率上升延迟300s",
-    wpName: "13风电场",
-    code: "#14",
-    wpId: null,
-    faultType: null,
-    id: "sxj_kgdl_xwt_f_wt_0014_eq_sq_0125",
-  });
+  
 
   getStationList(); //场站
   // getAlarmHistoryt();
@@ -658,20 +617,66 @@ const getAlarmHistoryt = async () => {
   };
   const { data } = await alarm_history(params);
   BASE.closeLoading();
-  query.pageTotal = data?.total;
-  data?.ls?.forEach((ele) => {
-    ele.isCloseName = ele.endts ? "已解除" : "未解除";
-    ele.alarmTypeName =
-      ele.alarmType === "booststation"
-        ? "升压站"
-        : ele.alarmType === "windturbine"
-        ? "风机"
-        : ele.alarmType === "inverter"
-        ? "光伏"
-        : "";
-    ele.endtsName = ele.endts > 0 ? formatTime(ele.endts) : "--";
-  });
-  state.tableData = data?.ls;
+  if (data) {
+    query.pageTotal = data?.total;
+    data?.ls?.forEach((ele) => {
+        ele.isCloseName = ele.endts ? "已解除" : "未解除";
+        ele.alarmTypeName =
+        ele.alarmType === "booststation"
+            ? "升压站"
+            : ele.alarmType === "windturbine"
+            ? "风机"
+            : ele.alarmType === "inverter"
+            ? "光伏"
+            : "";
+        ele.endtsName = ele.endts > 0 ? formatTime(ele.endts) : "--";
+    });
+    state.tableData = data?.ls;
+  } else {
+    state.tableData = new Array(5).fill({
+        tbName: null,
+        alarmId: "SQ_0125",
+        alarmType: "windturbine",
+        characteristic: "报警",
+        components: "BPQ",
+        confirmed: false,
+        description: "变频器故障27",
+        deviceId: "SXJ_KGDL_XWT_F_WT_0014_EQ",
+        devicename: "14号风机",
+        deviceType: "windturbine",
+        enabled: true,
+        lineid: "SXJ_KGDL_XWTF01_LN",
+        linename: "一号风机线",
+        modelId: "SEC-W02B-1250kW",
+        projectid: "SXJ_KGDL_XWTF01_EG",
+        projectname: "一期项目",
+        rank: 3,
+        resettable: false,
+        stationid: "",
+        stationname: "13风电场",
+        subcomponents: "NULL",
+        suffix: null,
+        tagid: "FD-YYXWT-ShangQi.140623F1412MDL01BF399DB0122SP01RAW00",
+        triggertype: 1463,
+        uniformcode: "BJ0001",
+        superTableName: null,
+        ts: 1718160795000,
+        val: 1,
+        oval: null,
+        endts: 0,
+        timelong: 0,
+        name: null,
+        nemCode: "状态码1463",
+        faultCause: "13.7s>信号<=14.2s",
+        resolvent: "输入端142功率上升延迟300s",
+        wpName: "13风电场",
+        code: "#14",
+        wpId: null,
+        faultType: null,
+        id: "sxj_kgdl_xwt_f_wt_0014_eq_sq_0125",
+    });
+  }
+  
 };
 //报警类型变化
 const typechange = () => {

+ 11 - 1
src/views/economicsOperation/benchmarkingManagement/loseRate/index.vue

@@ -170,6 +170,7 @@
             align="center"
             prop="name"
             label="名称"
+             width="75"
             show-overflow-tooltip
             sortable
           >
@@ -189,7 +190,7 @@
             :key="item.code"
             :prop="item.code"
             :label="item.name"
-            :width="item.name.length == 4 ? 55 : 68"
+            :width="showWidth(item)"
             show-overflow-tooltip
             sortable
           />
@@ -388,6 +389,15 @@ export default {
     this.initialization();
   },
   methods: {
+    showWidth(item) {
+        let widthS = 0
+        if (item.name === "性能损失" || item.name === "限电损失") {
+            widthS = 78
+        } else {
+            widthS = item.name.length == 4 ? 55 : 68
+        }
+        return widthS
+    },
     handlePageDChange(val) {
       this.pageD.currentPage = val;
       this.goDetail();

+ 7 - 4
src/views/economicsOperation/nxfHomePage/index.vue

@@ -60,9 +60,9 @@
                 </div>
                 <div class="homeRight">
                     <div class="tabs">
-                        <!-- @click="selectTab(index, item)" -->
                         <div class="tab-item" v-for="(item, index) of tabData" :key="item"
-                            :class="{ active: activeIndex == index }">
+                            :class="{ active: activeIndex == index }"
+                            @click="selectTab(index, item)">
                             {{ item.text }}
                         </div>
                     </div>
@@ -181,6 +181,7 @@
         },
         methods: {
             selectTab(index, item) {
+                console.log("ind===>>>", index)
                 this.activeIndex = index;
             },
             //获取发电量和主要经济指标同期对比
@@ -203,7 +204,9 @@
                         that.zbtqdb = res.data.zbtqdb
                     }
                 })
-                homeright().then(res =>{
+                homeright({
+                    periodType: this.activeIndex === 0 ? "year" : this.activeIndex === 1 ? "month" : "week"
+                }).then(res =>{
                     if (res.data) {
                         that.rightTableData = [{
                                 name: '风能利用率年排名',
@@ -248,7 +251,7 @@
 
             .tab-item {
                 padding: 0.37vh 1.852vh;
-                cursor: no-drop;
+                cursor: pointer;
 
                 &.active {
                     color: #fff;

+ 3 - 1
src/views/economicsOperation/stationAnalyse/stationElectricAnalyse/index.vue

@@ -181,6 +181,7 @@ import {
   getOwnDemand,
   getAllStation,
 } from "@/api/monthlyPerformanceAnalysis.js";
+import dayjs from "dayjs";
 export default {
   name: "StationElectricAnalyse",
   components: {
@@ -220,7 +221,7 @@ export default {
       companyOptions: [],
       station: "",
       stationOptions: [],
-      year: "2023",
+      year: "",
       selectValue: "综合场用电量分析",
       headers: [
         "综合场用电量",
@@ -235,6 +236,7 @@ export default {
   watch: {},
   created() {
     this.initialization();
+    this.year = dayjs().format("YYYY")
   },
   methods: {
     tabClick(tab) {