Преглед на файлове

预警配置、报警配置BUG修复

Koishi преди 20 часа
родител
ревизия
a8521b859a

+ 27 - 19
src/App.vue

@@ -583,6 +583,7 @@ export default {
   },
 
   async created() {
+    this.getAllWp();
     // await this.initWebSocket();
     // this.getAlarmConfig();
     // this.x = 80;
@@ -648,7 +649,6 @@ export default {
     $(window).resize(() => {
       that.setScale();
     });
-    
   },
 
   unmounted() {
@@ -656,6 +656,15 @@ export default {
   },
 
   methods: {
+    getAllWp() {
+      fetchStationListAll().then(({ data }) => {
+        data.forEach((ele) => {
+          ele.name = ele.aname;
+        });
+        this.$store.commit("changeStationAll", data);
+      });
+    },
+
     openWeb() {
       this.activeTab = "yxzb";
       window.location.href = `${process.env.VUE_APP_URL}/index.html/#/runtime/b0d3f1f4-3e5d-429b-af81-2661e7099caa/862c8272-8cf8-435c-b3fc-b28936b4bfe0?instanceId=82546b6b-59a3-7a1b-fbd4-b2d4516cf991`;
@@ -687,24 +696,24 @@ export default {
       let str = window.location.href;
       if (str.indexOf("integratedAlarm") > -1) {
         this.showMenuData = this.warnDatas;
-        this.$nextTick(() =>{
-            document.title = '预警系统'
-        })
+        this.$nextTick(() => {
+          document.title = "预警系统";
+        });
       } else if (str.indexOf("economicsOperation") > -1) {
         this.showMenuData = this.economyDatas;
-        this.$nextTick(() =>{
-            document.title = '经济运行'
-        })
+        this.$nextTick(() => {
+          document.title = "经济运行";
+        });
       } else if (str.indexOf("nxreport") > -1) {
         this.showMenuData = this.reportDatas;
-        this.$nextTick(() =>{
-            document.title = '智能报表'
-        })
+        this.$nextTick(() => {
+          document.title = "智能报表";
+        });
       } else {
         this.showMenuData = this.warnDatas;
-        this.$nextTick(() =>{
-            document.title = '预警系统'
-        })
+        this.$nextTick(() => {
+          document.title = "预警系统";
+        });
       }
     },
     pagestyFn(path) {
@@ -1341,14 +1350,13 @@ body {
             }
           }
 
-          .elGrounpTitleAll:hover{
+          .elGrounpTitleAll:hover {
             // .chSpna{
-                background: #1c69bb;
-                padding: 0 10px;
-                color: #a5b7df;
+            background: #1c69bb;
+            padding: 0 10px;
+            color: #a5b7df;
             // }
-                
-            }
+          }
 
           .elGrounpTitle {
             .svgSty {

+ 81 - 73
src/views/IntegratedAlarm/alarmConfig/components/custom_components.vue

@@ -104,7 +104,7 @@
             >
               <el-option
                 v-for="item in state.modelList"
-                :key="item"
+                :key="item.id"
                 :value="item.id"
                 :label="item.aname"
               ></el-option>
@@ -258,33 +258,33 @@
           ref="popoverRef"
           :virtual-ref="buttonRef"
         >
-            <template #reference>
+          <template #reference>
             <el-button
-                type="primary"
-                style="margin-right: 16px"
-                ref="buttonRef"
-                size="mini"
-                @click.stop="
-                    () => {
-                    lPopVisible = !lPopVisible;
-                    setTableCheckbox();
-                    }
-                "
-                >修改排查方案添\删除</el-button
-                >
-            </template>
-            <div class="warn-table">
+              type="primary"
+              style="margin-right: 16px"
+              ref="buttonRef"
+              size="mini"
+              @click.stop="
+                () => {
+                  lPopVisible = !lPopVisible;
+                  setTableCheckbox();
+                }
+              "
+              >修改排查方案添\删除</el-button
+            >
+          </template>
+          <div class="warn-table">
             <el-table
-                ref="multipleTableRef"
-                :max-height="550"
-                width="100%"
-                :data="state.alarmMapList"
-                @selection-change="handleSelectionChange"
-                stripe
-                border
+              ref="multipleTableRef"
+              :max-height="550"
+              width="100%"
+              :data="state.alarmMapList"
+              @selection-change="handleSelectionChange"
+              stripe
+              border
             >
-                <el-table-column type="selection" width="55" align="center" />
-                <el-table-column
+              <el-table-column type="selection" width="55" align="center" />
+              <el-table-column
                 label="类型"
                 prop="types"
                 align="center"
@@ -293,8 +293,8 @@
                 column-key="types"
                 :filters="getFilters('types')"
                 :filter-method="filterHandler"
-                ></el-table-column>
-                <el-table-column
+              ></el-table-column>
+              <el-table-column
                 label="名称"
                 prop="name"
                 align="center"
@@ -302,80 +302,88 @@
                 column-key="name"
                 :filters="getFilters('name')"
                 :filter-method="filterHandler"
-                ></el-table-column>
-                <el-table-column
+              ></el-table-column>
+              <el-table-column
                 label="排查步骤"
                 prop="troubleMethod"
                 align="left"
-                >
+              >
                 <template #default="scope">
-                    <template v-if="Array.isArray(splitStr(scope.row.troubleMethod))">
+                  <template
+                    v-if="Array.isArray(splitStr(scope.row.troubleMethod))"
+                  >
                     <p
-                        v-for="(item, index) in splitStr(scope.row.troubleMethod)"
-                        :key="index"
+                      v-for="(item, index) in splitStr(scope.row.troubleMethod)"
+                      :key="index"
                     >
-                        {{ index + 1 }}. {{ item }}
+                      {{ index + 1 }}. {{ item }}
                     </p>
-                    </template>
-                    <p v-else>
+                  </template>
+                  <p v-else>
                     {{ scope.row.troubleMethod }}
-                    </p>
+                  </p>
                 </template>
-                </el-table-column>
-                <el-table-column
+              </el-table-column>
+              <el-table-column
                 label="检修方案"
                 prop="processMethod"
                 align="left"
-                >
+              >
                 <template #default="scope">
-                    <template v-if="Array.isArray(splitStr(scope.row.processMethod))">
+                  <template
+                    v-if="Array.isArray(splitStr(scope.row.processMethod))"
+                  >
                     <p
-                        v-for="(item, index) in splitStr(scope.row.processMethod)"
-                        :key="index"
+                      v-for="(item, index) in splitStr(scope.row.processMethod)"
+                      :key="index"
                     >
-                        {{ index + 1 }}. {{ item }}
+                      {{ index + 1 }}. {{ item }}
                     </p>
-                    </template>
-                    <p v-else>
+                  </template>
+                  <p v-else>
                     {{ scope.row.processMethod }}
-                    </p>
+                  </p>
                 </template>
-                </el-table-column>
-                <el-table-column
+              </el-table-column>
+              <el-table-column
                 label="所需工具"
                 prop="tools"
                 align="left"
                 width="120px"
-                >
+              >
                 <template #default="scope">
-                    <template v-if="Array.isArray(splitStr(scope.row.tools))">
-                    <p v-for="(item, index) in splitStr(scope.row.tools)" :key="index">
-                        {{ index + 1 }}. {{ item }}
+                  <template v-if="Array.isArray(splitStr(scope.row.tools))">
+                    <p
+                      v-for="(item, index) in splitStr(scope.row.tools)"
+                      :key="index"
+                    >
+                      {{ index + 1 }}. {{ item }}
                     </p>
-                    </template>
-                    <p v-else>
+                  </template>
+                  <p v-else>
                     {{ scope.row.tools }}
-                    </p>
+                  </p>
                 </template>
-                </el-table-column>
-                <el-table-column
-                label="备品备件"
-                prop="spareParts"
-                align="left"
-                >
+              </el-table-column>
+              <el-table-column label="备品备件" prop="spareParts" align="left">
                 <template #default="scope">
-                    <template v-if="Array.isArray(splitStr(scope.row.spareParts))">
-                    <p v-for="(item, index) in splitStr(scope.row.spareParts)" :key="index">
-                        {{ index + 1 }}. {{ item }}
+                  <template
+                    v-if="Array.isArray(splitStr(scope.row.spareParts))"
+                  >
+                    <p
+                      v-for="(item, index) in splitStr(scope.row.spareParts)"
+                      :key="index"
+                    >
+                      {{ index + 1 }}. {{ item }}
                     </p>
-                    </template>
-                    <p v-else>
+                  </template>
+                  <p v-else>
                     {{ scope.row.spareParts }}
-                    </p>
+                  </p>
                 </template>
-                </el-table-column>
+              </el-table-column>
             </el-table>
-            </div>
+          </div>
         </el-popover>
         <el-table
           width="100%"
@@ -663,7 +671,7 @@ const splitStr = (str) => {
       .filter((_, index) => index % 2 !== 0);
   }
   return str;
-}
+};
 
 const getExtraCharacters = (str1, str2) => {
   let result = "";
@@ -961,7 +969,7 @@ const rules = reactive({
 
 //categorychanged
 const categorychanged = async (val) => {
-  form.value.stationId = "";
+  form.value.stationId = "NX_FGS_HA_FDC_STA";
   form.value.modelId = "";
   form.value.expression = "";
   form.value.relatedParts = "";
@@ -1189,7 +1197,7 @@ const closeDialog = () => {
 
   .el-table {
     margin: 5px 0;
-    .el-table__inner-wrapper{
+    .el-table__inner-wrapper {
       // max-width: 95%;
       width: 100%;
       overflow-x: auto;

+ 19 - 4
src/views/IntegratedAlarm/alarmConfig/components/windturbine_components.vue

@@ -85,9 +85,9 @@
         >
           <el-option
             v-for="item in modelArray"
-            :key="item"
-            :label="item"
-            :value="item"
+            :key="item.id"
+            :label="item.aname"
+            :value="item.id"
           />
         </el-select>
       </el-form-item>
@@ -384,7 +384,22 @@ export default {
     getWtModel() {
       getWtModel(this.dialogOptions.stationId).then((res) => {
         this.dialogOptions.modelId = res?.data?.[0] || "";
-        this.modelArray = res.data;
+
+        const modelMap = {
+          WT2000D121H85: "中车",
+          "UP2000-130": "联合动力",
+        };
+        const arr = [];
+        res.data.forEach((id) => {
+          if (modelMap[id]) {
+            arr.push({
+              id,
+              aname: modelMap[id],
+            });
+          }
+        });
+
+        this.modelArray = arr;
         if (this.dialogOptions.deviceType === "booststation") {
           this.getPointList();
         }

+ 33 - 12
src/views/IntegratedAlarm/alarmConfig/customConfig/index.vue

@@ -31,7 +31,7 @@
         </el-upload>
       </div>
       <div class="search-wrapper">
-        <el-select
+        <!-- <el-select
           v-model="query.category"
           size="mini"
           class="search-item"
@@ -39,14 +39,15 @@
           @change="categorychanged"
         >
           <el-option key="1" label="风机报警" value="windturbine"></el-option>
-          <!-- <el-option
+          <el-option
             key="2"
             label="升压站报警"
             value="booststation"
-          ></el-option> -->
+            v-if="false"
+          ></el-option>
           <el-option key="3" label="光伏报警" value="inverter"></el-option>
-        </el-select>
-        <el-select
+        </el-select> -->
+        <!-- <el-select
           v-model="query.wpId"
           clearable
           size="mini"
@@ -61,7 +62,7 @@
             :value="item.id"
             :label="item.aname"
           ></el-option>
-        </el-select>
+        </el-select> -->
         <el-select
           v-model="query.relatedparts"
           clearable
@@ -101,7 +102,7 @@
           popper-class="select"
         >
           <el-option
-            v-for="item in modelList"
+            v-for="item in modelList1"
             :key="item.id"
             :value="item.id"
             :label="item.aname"
@@ -219,7 +220,7 @@ import {
   custombj_fetchTableData,
   getStationinfo,
   fetchRelatePartAndAlarmType,
-  fetchModel,
+  getWtModel,
   fetchBooststation,
   custombj_importTemplate,
   getWpList,
@@ -247,7 +248,7 @@ const query = reactive({
   pageNum: 1,
   pageSize: 22,
   name: "",
-  wpId: "",
+  wpId: "NX_FGS_HA_FDC_STA",
   rank: "",
   modelId: "",
   category: "windturbine",
@@ -1845,9 +1846,29 @@ const getfetchRelatePart = async () => {
   //   getData();
 };
 // 机型
+const modelList1 = ref([]);
 const getequipmentmodel_list = async () => {
-  const { data } = await fetchModel();
-  state.modelListAll = data;
+  const { data } = await getWtModel();
+
+  const modelMap = {
+    WT2000D121H85: "中车",
+    "UP2000-130": "联合动力",
+  };
+
+  const arr = [];
+
+  data.forEach((id) => {
+    if (modelMap[id]) {
+      arr.push({
+        id,
+        aname: modelMap[id],
+      });
+    }
+  });
+  state.modelListAll = {
+    [query.wpId]: arr,
+  };
+  modelList1.value = arr;
 };
 const handleEditClick = (row) => {
   let obj = Object.assign({}, row);
@@ -1946,7 +1967,7 @@ const handleError = (response) => {
 const clean = () => {
   query.modelId = "";
   query.relatedparts = "";
-  query.wpId = "";
+  query.wpId = "NX_FGS_HA_FDC_STA";
   query.enabled = "";
   query.rank = "";
   query.name = "";

+ 26 - 8
src/views/IntegratedAlarm/alarmConfig/historyConfig/index.vue

@@ -42,7 +42,7 @@
           <el-option key="1" label="风机" value="windturbine"></el-option>
           <!-- <el-option key="3" label="光伏" value="inverter"></el-option> -->
         </el-select>
-        <el-select
+        <!-- <el-select
           class="search-item"
           v-model="query.wpId"
           clearable
@@ -59,7 +59,7 @@
             :value="item.id"
             :label="item.aname"
           ></el-option>
-        </el-select>
+        </el-select> -->
         <el-select
           class="search-item"
           v-if="query.alarmType != 'booststation'"
@@ -70,7 +70,7 @@
           popper-class="select"
         >
           <el-option
-            v-for="item in modelList"
+            v-for="item in modelList1"
             :key="item.id"
             :value="item.id"
             :label="item.aname"
@@ -174,7 +174,7 @@ import {
   windturbinebj_fetchTableData,
   getStationinfo,
   fetchRelatePartAndAlarmType,
-  fetchModel,
+  getWtModel,
   getWpList,
 } from "@/api/zhbj/index.js";
 import { outExportExcel } from "@/tools/excel/exportExcel.js"; //引入文件
@@ -201,7 +201,7 @@ onMounted(() => {
 const query = reactive({
   pageNum: 1,
   pageSize: 22,
-  wpId: "",
+  wpId: "NX_FGS_HA_FDC_STA",
   modelId: "",
   name: "",
   alarmType: "windturbine",
@@ -240,15 +240,34 @@ const state = reactive({
   ],
 });
 // 机型
+const modelList1 = ref([]);
 const getequipmentmodel_list = async () => {
-  const { data } = await fetchModel();
+  const { data } = await getWtModel();
   state.modelListAll = data;
+
+  const modelMap = {
+    WT2000D121H85: "中车",
+    "UP2000-130": "联合动力",
+  };
+
+  const arr = [];
+
+  data.forEach((id) => {
+    if (modelMap[id]) {
+      arr.push({
+        id,
+        aname: modelMap[id],
+      });
+    }
+  });
+
+  modelList1.value = arr;
 };
 // 场站列表/升压站列表
 const stationList = ref([]);
 const categorychanged = async (value) => {
   query.alarmType = value;
-  query.wpId = "";
+  query.wpId = "NX_FGS_HA_FDC_STA";
   query.modelId = "";
   getWpArray();
   getData();
@@ -277,7 +296,6 @@ const getData = async () => {
       ele.resetTableName = ele.resetTable ? "是" : "否";
     });
     state.tableData = res.records;
-    console.log(hisTable.value);
     total.value = res.total;
   }
 };