wangb 5 месяцев назад
Родитель
Сommit
0cabf0c239

+ 4 - 3
src/App.vue

@@ -1009,9 +1009,9 @@ export default {
     this.x = 80;
     this.y = 80;
     let requestResult = [];
-    // this.requestAlarmHistoryParams.forEach(({ alarmType, deviceType }) => {
-    //   requestResult.push(this.getAlarmHistory(alarmType, deviceType));
-    // });
+    this.requestAlarmHistoryParams.forEach(({ alarmType, deviceType }) => {
+      requestResult.push(this.getAlarmHistory(alarmType, deviceType));
+    });
 
     Promise.all(requestResult)
       .then((promiseResult) => {
@@ -1092,6 +1092,7 @@ export default {
       this.showMenuData = this.generatingCapDatas;
     }
     // }
+    window.getSocketData = this.getSocketData;
     window.addEventListener("onmessageWS", this.getSocketData);
   },
 

+ 14 - 14
src/views/IntegratedAlarm/alarmConfig/customConfig/index.vue

@@ -388,24 +388,24 @@ const state = reactive({
 });
 //型号列表
 const modelList = computed(() => {
-  //   if (query.wpId == "") {
-  //     return [];
-  //   } else {
-  //     return state.modelListAll[query.wpId];
-  //   }
+  if (query.wpId == "") {
+    return [];
+  } else {
+    return state.modelListAll[query.wpId];
+  }
   return [{ id: "SEC-W02B-1250kW", aname: "SEC-W02B-1250kW" }];
 });
 //部件列表
 const fetchList = computed(() => {
-  //   if (query.wpId == "") {
-  //     return [];
-  //   } else {
-  //     if (query.wpId.includes("FDC")) {
-  //       return state.fetchListAll?.fjbj;
-  //     } else {
-  //       return state.fetchListAll?.gfbj;
-  //     }
-  //   }
+  if (query.wpId == "") {
+    return [];
+  } else {
+    if (query.wpId.includes("FDC")) {
+      return state.fetchListAll?.fjbj;
+    } else {
+      return state.fetchListAll?.gfbj;
+    }
+  }
   return [
     {
       id: "1",

+ 2 - 1
src/views/IntegratedAlarm/safe/historyWarning/index.vue

@@ -708,7 +708,8 @@ const export2Excel = async () => {
   } else {
     let tableHeader = [];
     let tableKey = [];
-    const { data } = await alarm_history(params);
+    // const { data } = await alarm_history(params);
+    const data = { ls: state?.tableData || [] };
     if (state.isshowwindturbineName) {
       tableHeader = state.tableHeader.map((item) => item.title);
       tableKey = state.tableHeader.map((item) => item.code);

+ 2 - 1
src/views/generatingCapacity/dataAnalysis/combine/components/search.vue

@@ -92,7 +92,8 @@ export default {
 
   watch: {
     maxProduction(value) {
-      this.queryForm.maxp = value;
+      // this.queryForm.maxp = value;
+      this.queryForm.maxp = 2000;
     },
   },
 };

+ 49 - 45
src/views/generatingCapacity/dataAnalysis/combine/index.vue

@@ -3,7 +3,8 @@
     <div class="dataAnalysisComMain">
       <div class="main_top">
         <p class="topPsty">功率曲线拟合</p>
-        <search-cop @submit="funSubmit" :maxProduction="maxProduction"> </search-cop>
+        <search-cop @submit="funSubmit" :maxProduction="maxProduction">
+        </search-cop>
       </div>
       <div class="main">
         <div class="treeDataMain">
@@ -16,14 +17,17 @@
             @refresh="funGetTree"
           >
           </tree-cop>
-          <div style="padding: 5px 0;border-radius: 5px;" :style="!theme ? 'background: #181A1E' : 'background: #cdcdde'" >
+          <div
+            style="padding: 5px 0; border-radius: 5px"
+            :style="!theme ? 'background: #181A1E' : 'background: #cdcdde'"
+          >
             <tree-cop
-                :dropdownMenu="['export', 'delete', 'save']"
-                :data="processTreeData"
-                :currentNodeKey="currentNodeKey"
-                :height="treeHeight"
-                @currentChange="funProcessCurrentChange"
-                @refresh="funGetProcessTree"
+              :dropdownMenu="['export', 'delete', 'save']"
+              :data="processTreeData"
+              :currentNodeKey="currentNodeKey"
+              :height="treeHeight"
+              @currentChange="funProcessCurrentChange"
+              @refresh="funGetProcessTree"
             >
             </tree-cop>
           </div>
@@ -249,13 +253,13 @@ const funExcelChange = async (obj) => {
   activeTab.value = "1";
   isChartArea.value = false;
   tableShowId.value = obj.id;
-  let tableX = ["未满发样板机", "满发样板机", "未满发", "满发" ]
-  tableX.forEach(it =>{
+  let tableX = ["未满发样板机", "满发样板机", "未满发", "满发"];
+  tableX.forEach((it) => {
     if (obj.name.indexOf(it) !== -1) {
-        tableName.value = obj.name.substring(0, obj.name.indexOf(it)-1)
-        return
+      tableName.value = obj.name.substring(0, obj.name.indexOf(it) - 1);
+      return;
     }
-  })
+  });
   tableFilePath.value = obj.path;
   excelType.value = obj.type; // 接收excel的type 用于控制右侧tab展示
 
@@ -563,7 +567,7 @@ const tableShowId = ref("");
 const tableColumn = ref([]);
 const tableLoading = ref(false);
 const tableName = ref("");
-const tableFilePath = ref("")
+const tableFilePath = ref("");
 const tableData = ref([]);
 /**table 结束 */
 /**search 开始 */
@@ -610,14 +614,14 @@ const markDot = reactive({
   pcl9: null,
   pcl11: null,
   pcl20: null,
-  pcl25: null
+  pcl25: null,
 });
 const xAxisData = ref([]);
 const chartRef = ref(); //chart 的ref
 const seriesData = ref([]);
 const isChartArea = ref(false); // 用来控制图表是否区域划分
 const dataSet = ref("");
-const allpowerFittingData = ref([])
+const allpowerFittingData = ref([]);
 const funChartSelect = async (batch) => {
   const wDataArr = [];
   const yDataArr = [];
@@ -647,14 +651,14 @@ const funChartSelect = async (batch) => {
           only: dataRadom.value,
         },
       });
-      allpowerFittingData.value = []
-      wtRes.data.forEach(it =>{
+      allpowerFittingData.value = [];
+      wtRes.data.forEach((it) => {
         let obj = {
-            wtId: it.wtId,
-            time: it.time
-        }
-        allpowerFittingData.value.push(obj)
-    })
+          wtId: it.wtId,
+          time: it.time,
+        };
+        allpowerFittingData.value.push(obj);
+      });
       if (wtRes.code === 200) {
         let id = 1;
         const tempArr = []; //用于以风机id 聚合dataArr
@@ -836,23 +840,23 @@ const handleClick = (val) => {
 
 //故障数据
 const faultDataFn = async () => {
-    let params = {
-        // only: dataRadom.value,
-        alarmList: allpowerFittingData.value,
-        table: "alarmWt",
-    };
-    const faultRes = await httpRequest.post("/power/fitting/alarms", params);
-    faultData.value = faultRes.data;
+  let params = {
+    // only: dataRadom.value,
+    alarmList: allpowerFittingData.value,
+    table: "alarmWt",
+  };
+  const faultRes = await httpRequest.post("/power/fitting/alarms", params);
+  faultData.value = faultRes.data;
 };
 //预警数据
 const warnDataFn = async () => {
-    let params = {
-        // only: dataRadom.value,
-        alarmList: allpowerFittingData.value,
-        table: "alarmCt",
-    };
-    const warnRes = await httpRequest.post("/power/fitting/alarms", params);
-    warnData.value = warnRes.data;
+  let params = {
+    // only: dataRadom.value,
+    alarmList: allpowerFittingData.value,
+    table: "alarmCt",
+  };
+  const warnRes = await httpRequest.post("/power/fitting/alarms", params);
+  warnData.value = warnRes.data;
 };
 
 /**dialog 数据 */
@@ -950,13 +954,13 @@ const initPageData = () => {
     activeTab.value = "1";
     isChartArea.value = false;
     tableShowId.value = obj.id;
-    let tableX = ["未满发样板机", "满发样板机", "未满发", "满发" ]
-    tableX.forEach(it =>{
-        if (obj.name.indexOf(it) !== -1) {
-            tableName.value = obj.name.substring(0, obj.name.indexOf(it)-1)
-            return
-        }
-    })
+    let tableX = ["未满发样板机", "满发样板机", "未满发", "满发"];
+    tableX.forEach((it) => {
+      if (obj.name.indexOf(it) !== -1) {
+        tableName.value = obj.name.substring(0, obj.name.indexOf(it) - 1);
+        return;
+      }
+    });
     tableFilePath.value = obj.path;
     excelType.value = obj.type; // 接收excel的type 用于控制右侧tab展示
 
@@ -986,7 +990,7 @@ const initPageData = () => {
     markDot.pcl11 = chartRes.obj.pc11ratio;
     markDot.pcl20 = chartRes.obj.pc20ratio;
     markDot.pcl25 = chartRes.obj.pc25ratio;
-    
+
     avgObj.title = chartRes.obj.path
       .substring(
         chartRes.obj.path.indexOf(chartRes.obj.station + "_") +

+ 11 - 0
src/views/generatingCapacity/dataFilter/prepare/search.vue

@@ -137,6 +137,17 @@ export default {
         if (res.code === 200) {
           ElMessage.success(res.msg);
           this.$store.commit("setReadyProgress", 0);
+          window?.getSocketData &&
+            window.getSocketData({
+              detail: {
+                data: {
+                  type: "message",
+                  content: {
+                    data: 0,
+                  },
+                },
+              },
+            });
         }
       });
     },

+ 2 - 1
src/views/generatingCapacity/dataFilter/process/search.vue

@@ -85,7 +85,8 @@ export default {
 
   watch: {
     maxProduction(value) {
-      this.queryForm.maxp = value;
+      // this.queryForm.maxp = value;
+      this.queryForm.maxp = 2000;
     },
   },
 };