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 5 bulan lalu
induk
melakukan
5b88c98ee1

+ 3 - 4
src/App.vue

@@ -1009,13 +1009,12 @@ 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) => {
-        console.log(1111,promiseResult)
         this.alarmList = [];
         promiseResult.forEach(({ data }) => {
           data?.ls?.forEach((ele) => {

+ 36 - 36
src/components/generatingCapacityComponent/table.vue

@@ -6,9 +6,6 @@
   >
     <div class="tableData_tit">
       <p :style="theme ? 'color:#5473E8' : 'color:#979797'">{{ tableName }}</p>
-      <el-divider />
-      <!-- <img :src="CSV_C" alt=""> -->
-      <!-- @click="handleExport" -->
       <svg
         t="1711515837802"
         class="icon"
@@ -171,32 +168,32 @@ export default {
       }
     },
     handlefilesExport(id) {
-        ElMessageBox.confirm("确认导出当前节点的所有数据?", "导出", {
-            confirmButtonText: "确认",
-            cancelButtonText: "取消",
-            type: "warning",
-          }).then(() => {
-            if (id === "1") {
-                this.handleExport()
-            } else {
-                // const a = document.createElement("a");
-                // let childs = [];
-                // const url = "/export/files?filename="
-                // a.href =
-                //   process.env.VUE_APP_GENERAT_URL + url + this.tableFilePath;
-                // a.download = "";
-                // a.target = "_blank";
-                // a.click();
-                const a = document.createElement("a");
-                const url = "/data/option/download?ids="
-                a.href =
-                  // config.baseURL + url + childs.join(",");
-                  process.env.VUE_APP_GENERAT_URL + url + id;
-                a.download = "";
-                a.target = "_blank";
-                a.click();
-            }
-          });
+      ElMessageBox.confirm("确认导出当前节点的所有数据?", "导出", {
+        confirmButtonText: "确认",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        if (id === "1") {
+          this.handleExport();
+        } else {
+          // const a = document.createElement("a");
+          // let childs = [];
+          // const url = "/export/files?filename="
+          // a.href =
+          //   process.env.VUE_APP_GENERAT_URL + url + this.tableFilePath;
+          // a.download = "";
+          // a.target = "_blank";
+          // a.click();
+          const a = document.createElement("a");
+          const url = "/data/option/download?ids=";
+          a.href =
+            // config.baseURL + url + childs.join(",");
+            process.env.VUE_APP_GENERAT_URL + url + id;
+          a.download = "";
+          a.target = "_blank";
+          a.click();
+        }
+      });
     },
   },
 
@@ -211,21 +208,20 @@ export default {
 <style lang="less">
 .warn-table1 {
   .tableData_tit {
+    width: 100%;
+    height: 50px;
     display: flex;
+    justify-content: space-between;
+    align-items: center;
 
     p {
-      width: 7%;
+      width: 25%;
       text-overflow: ellipsis;
       white-space: nowrap;
       overflow: hidden;
       font-size: 16px;
       font-weight: bold;
-      margin: 10px;
-    }
-
-    .el-divider {
-      position: relative;
-      top: -3px;
+      margin-left: 10px;
     }
 
     img {
@@ -234,6 +230,10 @@ export default {
       position: relative;
       top: 5px;
     }
+
+    .icon {
+      margin-bottom: 7px;
+    }
   }
 
   .warning-row {

+ 68 - 46
src/views/IntegratedAlarm/reliability/customAnalyse/index.vue

@@ -172,7 +172,7 @@
         >
           <template #default="scope">
             <div class="bar">
-                <!-- :style="{
+              <!-- :style="{
                   width:
                     row[`${item.code}_count`] && row[`${item.code}_time`]
                       ? (Math.ceil(row[`${item.code}_count`]) /
@@ -184,15 +184,22 @@
                 }" -->
               <div
                 class="bar-percent"
-                :style="{width: (Math.ceil(scope.row[`${item.code}_count`]) / 
-                Math.ceil(scope.column.realWidth))*100 + 'px'}"
+                :style="{
+                  width:
+                    (Math.ceil(scope.row[`${item.code}_count`]) /
+                      Math.ceil(scope.column.realWidth)) *
+                      100 +
+                    'px',
+                }"
               ></div>
-              <!-- <span class="value">{{ row[`${item.code}_count`] }} 次数</span> -->
-              <span class="value">{{ Math.ceil(scope.row[`${item.code}_count`]) }} 次数</span>
-              <!-- <span class="value">{{ showRow(scope) }} 次数</span> -->
+              <!-- <span class="value">{{ row[`${item.code}_count`] }} 次</span> -->
+              <span class="value"
+                >{{ getCalcValue(scope.row[`${item.code}_count`]) }} 次</span
+              >
+              <!-- <span class="value">{{ showRow(scope) }} 次</span> -->
             </div>
             <div class="bar">
-                <!-- :style="{
+              <!-- :style="{
                   width:
                     row[`${item.code}_count`] && row[`${item.code}_time`]
                       ? (Math.ceil(row[`${item.code}_time`]) /
@@ -204,11 +211,18 @@
                 }" -->
               <div
                 class="bar-percent"
-                :style="{width: (Math.ceil(scope.row[`${item.code}_time`]) / 
-                Math.ceil(scope.column.realWidth))*100 + 'px'}"
+                :style="{
+                  width:
+                    (Math.ceil(scope.row[`${item.code}_time`]) /
+                      Math.ceil(scope.column.realWidth)) *
+                      100 +
+                    'px',
+                }"
               ></div>
               <!-- <span class="value">{{ row[`${item.code}_time`] }} 分钟</span> -->
-              <span class="value">{{ Math.ceil(scope.row[`${item.code}_time`]) }} 分钟</span>
+              <span class="value"
+                >{{ getCalcValue(scope.row[`${item.code}_time`]) }} 分钟</span
+              >
             </div>
           </template>
         </el-table-column>
@@ -277,9 +291,9 @@ onMounted(() => {
   getWpArray();
   getequipmentmodel_list();
   getfetchRelatePart();
-//   state.tHeard = dataJson.data.data.title;
-//   state.tableData = dataJson.data.data.data;
-    changeTableData(dataJson.data.data.dataList)
+  //   state.tHeard = dataJson.data.data.title;
+  //   state.tableData = dataJson.data.data.data;
+  changeTableData(dataJson.data.data.dataList);
   // getTableList();
 });
 const pageTitle = "预警分析";
@@ -319,6 +333,14 @@ const state = reactive({
   dialogVisible: false,
 });
 
+const getCalcValue = (num) => {
+  if (!num) {
+    return 0;
+  } else {
+    return Math.ceil(num);
+  }
+};
+
 const changeType = async (value) => {
   state.typeVal = value;
   state.tHeard = [];
@@ -335,8 +357,8 @@ const changeType = async (value) => {
 };
 
 const showRow = (row) => {
-    debugger
-}
+  debugger;
+};
 
 const getWpArray = async () => {
   const { data } = await getWpList(state.typeVal);
@@ -626,7 +648,7 @@ function getTableList() {
       alarmIds: state.alarmIds,
       deviceType: state.typeVal,
     }).then((res) => {
-      changeTableData(res)
+      changeTableData(res);
     });
   } else {
     BASE.showMsg({
@@ -636,41 +658,41 @@ function getTableList() {
 }
 
 const changeTableData = (res) => {
-    if (res.length) {
-        let tableData = [];
-        let tHeard = [];
-        let data = res;
-        data.forEach((pEle) => {
-          for (let wtId in pEle) {
-            let wtItem = data.find((tableItem) => {
-              return wtId === tableItem.windturbineId;
-            });
-            !wtItem && (wtItem = { wtId });
-            pEle[wtId].forEach((cEle) => {
-              let someRes = tHeard.some((findEle) => {
-                return findEle.label == cEle.alertText;
-              });
+  if (res.length) {
+    let tableData = [];
+    let tHeard = [];
+    let data = res;
+    data.forEach((pEle) => {
+      for (let wtId in pEle) {
+        let wtItem = data.find((tableItem) => {
+          return wtId === tableItem.windturbineId;
+        });
+        !wtItem && (wtItem = { wtId });
+        pEle[wtId].forEach((cEle) => {
+          let someRes = tHeard.some((findEle) => {
+            return findEle.label == cEle.alertText;
+          });
 
-              if (!someRes) {
-                tHeard.push({
-                  label: cEle.alertText,
-                  code: cEle.alarmid,
-                });
-              }
-              wtItem[`${cEle.alarmid}_count`] = cEle.count;
-              wtItem[`${cEle.alarmid}_time`] = cEle.time;
-              wtItem["wtname"] = cEle.windturbineCode;
+          if (!someRes) {
+            tHeard.push({
+              label: cEle.alertText,
+              code: cEle.alarmid,
             });
-            tableData.push(wtItem);
           }
+          wtItem[`${cEle.alarmid}_count`] = cEle.count;
+          wtItem[`${cEle.alarmid}_time`] = cEle.time;
+          wtItem["wtname"] = cEle.windturbineCode;
         });
-        state.tHeard = tHeard;
-        state.tableData = tableData;
-      } else {
-        state.tHeard = [];
-        state.tableData = [];
+        tableData.push(wtItem);
       }
-}
+    });
+    state.tHeard = tHeard;
+    state.tableData = tableData;
+  } else {
+    state.tHeard = [];
+    state.tableData = [];
+  }
+};
 
 const handleSort = function (val) {
   let item = val.prop;

+ 11 - 3
src/views/IntegratedAlarm/reliability/historyAnalyse/index.vue

@@ -190,8 +190,8 @@
                 :style="{width: (Math.ceil(scope.row[`${item.code}_count`]) / 
                 Math.ceil(scope.column.realWidth))*100 + 'px'}"
               ></div>
-              <!-- <span class="value">{{ row[`${item.code}_count`] }} 次</span> -->
-              <span class="value">{{ Math.ceil(scope.row[`${item.code}_count`]) }} 次数</span>
+              <!-- <span class="value">{{ row[`${item.code}_count`] }} 次</span> -->
+              <span class="value">{{ getCalcValue(scope.row[`${item.code}_count`]) }} 次</span>
             </div>
             <div class="bar">
                 <!-- :style="{
@@ -210,7 +210,7 @@
                 Math.ceil(scope.column.realWidth))*100 + 'px'}"
               ></div>
               <!-- <span class="value">{{ row[`${item.code}_time`] }} 分钟</span> -->
-              <span class="value">{{ Math.ceil(scope.row[`${item.code}_time`]) }} 分钟</span>
+              <span class="value">{{ getCalcValue(scope.row[`${item.code}_time`]) }} 分钟</span>
             </div>
           </template>
         </el-table-column>
@@ -321,6 +321,14 @@ const state = reactive({
   dialogVisible: false,
 });
 
+const getCalcValue = (num) => {
+  if (!num) {
+    return 0;
+  } else {
+    return Math.ceil(num);
+  }
+};
+
 const changeType = (value) => {
   state.typeVal = value;
   getWpArray();

+ 32 - 29
src/views/IntegratedAlarm/safe/components/safecomponent.vue

@@ -202,7 +202,7 @@
             <template #default="scope">
               <el-button
                 type="text"
-                style="color: #05bb4c"
+                style="color: #1890ff !important"
                 size="small"
                 @click="confirm(scope.row)"
                 >确认本条</el-button
@@ -212,11 +212,7 @@
         </el-table>
       </el-card>
       <template #footer>
-        <el-button
-          type="info"
-          plain
-          @click="confirmAll"
-          :disabled="!dialogTableData.length"
+        <el-button type="primary" plain @click="confirmAll"
           >确认所有报警</el-button
         >
       </template>
@@ -355,32 +351,39 @@ export default {
 
     confirmAll() {
       this.stopUpdate = true;
-      this.$confirm("您确定要执行此操作吗?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          confirmAlart(this.dialogTableData)
-            .then((res) => {
-              if (res.code === 200) {
+      if (!this?.dialogTableData?.length) {
+        this.BASE.showMsg({
+          type: "error",
+          msg: "暂无报警可进行确认",
+        });
+      } else {
+        this.$confirm("您确定要执行此操作吗?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            confirmAlart(this.dialogTableData)
+              .then((res) => {
+                if (res.code === 200) {
+                  this.BASE.showMsg({
+                    type: "success",
+                    msg: `全部${this.title}确认成功`,
+                  });
+                  this.$store.commit("removeWarningList", this.dialogTableData);
+                }
+                this.stopUpdate = false;
+              })
+              .catch(() => {
                 this.BASE.showMsg({
-                  type: "success",
-                  msg: `全部${this.title}确认成功`,
+                  msg: "确认失败,请重试",
                 });
-                this.$store.commit("removeWarningList", this.dialogTableData);
-              }
-              this.stopUpdate = false;
-            })
-            .catch(() => {
-              this.BASE.showMsg({
-                msg: "确认失败,请重试",
               });
-            });
-        })
-        .catch(() => {
-          this.stopUpdate = false;
-        });
+          })
+          .catch(() => {
+            this.stopUpdate = false;
+          });
+      }
     },
 
     goToAlertDescPage(alertItem) {

+ 18 - 1
src/views/generatingCapacity/dataAnalysis/posAnalysis/index.vue

@@ -1334,7 +1334,24 @@ const funRateSubmit = async (obj) => {
           xAxis: {
             type: "category",
             boundaryGap: false,
-            data: ["北", "东北", "东", "东南", "南", "西南", "西", "西北"],
+            data: [
+              "北",
+              "",
+              "东北",
+              "",
+              "东",
+              "",
+              "东南",
+              "",
+              "南",
+              "",
+              "西南",
+              "",
+              "西",
+              "",
+              "西北",
+              "",
+            ],
             splitLine: {
               show: true,
             },

+ 13 - 120
src/views/generatingCapacity/dataAnalysis/rateAnalysis/index.vue

@@ -295,8 +295,10 @@ const currentNodeKey = ref("");
 //点击excel项时
 const funExcelChange = async (obj) => {
   excelCheckIds.value = [obj.id]; //当为单选展示风机图表时
-  tableShowId.value = obj.id
-  tableName.value = obj.code ? obj.code : obj.name.substring(0, obj.name.indexOf('_'));
+  tableShowId.value = obj.id;
+  tableName.value = obj.code
+    ? obj.code
+    : obj.name.substring(0, obj.name.indexOf("_"));
   tableFilePath.value = obj.path;
   chartExcelList.value = excelList.value.map((o) => {
     return {
@@ -364,7 +366,7 @@ const funGetTree = async () => {
     funExcelChange({
       id: actTreeNode.value.childs[0].id,
       code: actTreeNode.value.childs[0].code,
-      path: actTreeNode.value.childs[0].path
+      path: actTreeNode.value.childs[0].path,
     });
     currentNodeKey.value = actTreeNode.value?.id || "";
   }
@@ -528,9 +530,9 @@ const funSubmit = async () => {
               show: true,
             },
           },
-          series: chart.count.length
+          series: chart.roses.length
             ? [
-                ...chart.count.map((o, index) => {
+                ...chart.roses.map((o, index) => {
                   return {
                     type: "bar",
                     data: o,
@@ -556,6 +558,7 @@ const funSubmit = async () => {
                 },
               ]
             : [],
+          count: chart.count || [],
         });
         chartId++;
         scatterSeries.value[0].data = chart.frequency.data.length
@@ -974,9 +977,9 @@ const funDiaSubmit = async () => {
                 },
               },
               isRadar: true,
-              series: chart.count.length
+              series: chart.roses.length
                 ? [
-                    ...chart.count.map((o, index) => {
+                    ...chart.roses.map((o, index) => {
                       return {
                         type: "bar",
                         data: o,
@@ -1005,6 +1008,7 @@ const funDiaSubmit = async () => {
                     },
                   ]
                 : [],
+              count: chart.count || [],
             });
             chartId++;
           }
@@ -1176,11 +1180,11 @@ const initPageData = () => {
     const obj = {
       id: actTreeNode.value.childs[0].id,
       code: actTreeNode.value.childs[0].code,
-      path: actTreeNode.value.childs[0].path
+      path: actTreeNode.value.childs[0].path,
     };
 
     excelCheckIds.value = [obj.id]; //当为单选展示风机图表时
-    tableShowId.value = obj.id
+    tableShowId.value = obj.id;
     tableName.value = obj.code;
     tableFilePath.value = obj.path;
     chartExcelList.value = excelList.value.map((o) => {
@@ -1244,56 +1248,6 @@ const initPageData = () => {
               name: "方位风速",
             },
       });
-      false &&
-        console.log(1111111111, {
-          id: chartId,
-          title: "",
-          subtext: "风速风向玫瑰图",
-          xAxis: {
-            type: "category",
-            boundaryGap: false,
-            data: [
-              "北",
-              "",
-              "东北",
-              "",
-              "东",
-              "",
-              "东南",
-              "",
-              "南",
-              "",
-              "西南",
-              "",
-              "西",
-              "",
-              "西北",
-            ],
-            splitLine: {
-              show: true,
-            },
-          },
-          isRadar: false,
-          series: chart.roses.length
-            ? chart.roses.map((o, index) => {
-                return {
-                  type: "bar",
-                  data: o,
-                  coordinateSystem: "polar",
-                  name: funText(index),
-                  stack: "a",
-                  emphasis: {
-                    focus: "series",
-                  },
-                };
-              })
-            : {
-                type: "bar",
-                data: chart.roses,
-                coordinateSystem: "polar",
-                name: "方位风速",
-              },
-        });
       chartId++;
       chartData.value.push({
         id: chartId,
@@ -1356,67 +1310,6 @@ const initPageData = () => {
           : [],
         count: chart.count || [],
       });
-      false &&
-        console.log(2222222222, {
-          id: chartId,
-          title: "",
-          subtext: "风速风向频次玫瑰图",
-          isRadar: true,
-          xAxis: {
-            type: "category",
-            boundaryGap: false,
-            data: [
-              "北",
-              "",
-              "东北",
-              "",
-              "东",
-              "",
-              "东南",
-              "",
-              "南",
-              "",
-              "西南",
-              "",
-              "西",
-              "",
-              "西北",
-              "",
-            ],
-            splitLine: {
-              show: true,
-            },
-          },
-          series: chart.count.length
-            ? [
-                ...chart.count.map((o, index) => {
-                  return {
-                    type: "bar",
-                    data: o,
-                    coordinateSystem: "polar",
-                    name: funText(index),
-                    stack: "a",
-                    emphasis: {
-                      focus: "series",
-                    },
-                    coordinateSystem: "polar",
-                  };
-                }),
-                {
-                  type: "radar",
-                  tooltip: {
-                    trigger: "item",
-                  },
-                  name: "对风",
-                  data: [
-                    {
-                      value: chart.radar,
-                    },
-                  ],
-                },
-              ]
-            : [],
-        });
       chartId++;
       scatterSeries.value[0].data = chart.frequency.data.length
         ? chart.frequency.data.map((item) => {

+ 48 - 43
src/views/home/index.vue

@@ -120,7 +120,7 @@
           <div class="item">
             <div class="b">
               <div class="info">
-                <span class="jx">检修</span>
+                <span class="wh">维护</span>
                 <span
                   :style="`color: #${$store.state.theme ? '000' : 'fff'}`"
                   >{{ ztmap.jxsum }}</span
@@ -1370,7 +1370,12 @@ export default {
 
       if (wp?.wpId && wp?.name) {
         this.selectWp = wp;
-        that.mainData = wp.name === "全省数据" ? wp.name : that.isFirstLoad ? "获取中..." : that.mainData;
+        that.mainData =
+          wp.name === "全省数据"
+            ? wp.name
+            : that.isFirstLoad
+            ? "获取中..."
+            : that.mainData;
         this.wpId = wp.wpId;
       }
       // that.BASE.showLoading();
@@ -1392,9 +1397,9 @@ export default {
           }
           // that.BASE.closeLoading();
         });
-        apiGetbulletindlData(params).then(rs =>{
-            that.initbulletindlData(rs, "rel");
-        })
+      apiGetbulletindlData(params).then((rs) => {
+        that.initbulletindlData(rs, "rel");
+      });
     },
 
     sumJhdlMethod() {
@@ -1881,42 +1886,42 @@ export default {
       this.isFirstLoad = false;
     },
     initbulletindlData(res, type) {
-        let datas = type === 'json' ? res.dldata : res.data
-        if (res && datas) {
-            // 月发电量
-            if (datas.dydl) {
-            let xAxis = [];
-            let seriesRF = [];
-            let seriesSW = [];
-            let seriesGW = [];
-            this.dllist = datas;
-            datas?.dydl.forEach((it) => {
-                xAxis.push(DAYJS(it.rq).format("MM-DD"));
-                seriesRF.push(it.rfdl);
-                seriesSW.push(it.rswdl);
-                seriesGW.push(it.rycdl);
-            });
-            let series = [
-                {
-                name: "日发电量",
-                data: seriesRF,
-                barGap: "0",
-                type: "bar",
-                },
-                {
-                name: "上网电量",
-                data: seriesSW,
-                type: "bar",
-                },
-                {
-                name: "预测电量",
-                data: seriesGW,
-                type: "bar",
-                },
-            ];
-            this.getPowerBar(xAxis, series);
-            }
+      let datas = type === "json" ? res.dldata : res.data;
+      if (res && datas) {
+        // 月发电量
+        if (datas.dydl) {
+          let xAxis = [];
+          let seriesRF = [];
+          let seriesSW = [];
+          let seriesGW = [];
+          this.dllist = datas;
+          datas?.dydl.forEach((it) => {
+            xAxis.push(DAYJS(it.rq).format("MM-DD"));
+            seriesRF.push(it.rfdl);
+            seriesSW.push(it.rswdl);
+            seriesGW.push(it.rycdl);
+          });
+          let series = [
+            {
+              name: "日发电量",
+              data: seriesRF,
+              barGap: "0",
+              type: "bar",
+            },
+            {
+              name: "上网电量",
+              data: seriesSW,
+              type: "bar",
+            },
+            {
+              name: "预测电量",
+              data: seriesGW,
+              type: "bar",
+            },
+          ];
+          this.getPowerBar(xAxis, series);
         }
+      }
     },
     getPowerBar(xAxis, series) {
       const theme = sessionStorage.getItem("theme") === "true" ? true : false;
@@ -4031,18 +4036,18 @@ export default {
         }
 
         .yx {
-          color: rgb(5, 187, 76);
+          color: rgb(29, 153, 255);
         }
 
         .dj {
-          color: rgb(29, 153, 255);
+          color: rgb(5, 187, 76);
         }
 
         .gz {
           color: rgb(186, 50, 55);
         }
 
-        .jx {
+        .wh {
           color: rgb(225, 126, 35);
         }