소스 검색

增加矩阵页面接口

sunzehao 3 달 전
부모
커밋
a417b062d5
2개의 변경된 파일52개의 추가작업 그리고 1개의 파일을 삭제
  1. 18 0
      src/api/factoryMonitor/index.js
  2. 34 1
      src/components/windDetail/index.vue

+ 18 - 0
src/api/factoryMonitor/index.js

@@ -130,3 +130,21 @@ export function GetPowerData(data) {
     method: "get",
   });
 }
+
+//查询矩阵二级页面分类
+export function GetMatrixalarmtype(data) {
+    return request({
+      baseURL: process.env.VUE_APP_API,
+      url: `matrix/alarmtype?wtid=${data.wtid}`,
+      method: "get",
+    });
+}
+
+//查询矩阵二级页面分类
+export function GetMatrixalarmtypeTable(data) {
+    return request({
+      baseURL: process.env.VUE_APP_API,
+      url: `matrix/alarm?type=BJXT&wtid=NX_FGS_HA_F_WT_0039_EQ`,
+      method: "get",
+    });
+}

+ 34 - 1
src/components/windDetail/index.vue

@@ -395,6 +395,8 @@ import {
   GetWtMonitorInfo,
   GetWtTelemeteryInfo,
   GetWtOtherInfo,
+  GetMatrixalarmtype,
+  GetMatrixalarmtypeTable
 } from "@/api/factoryMonitor/index.js";
 import svgIcon from "@/components/coms/icon/svg-icon.vue";
 import alarmDialog from "@/components/alarm";
@@ -602,7 +604,11 @@ export default {
             code: "status",
             name: "报警状态"
         },
-      ]
+      ],
+      warnTypeData: {
+        typeData: [],
+        tableData: []
+      }
     };
   },
   components: { svgIcon, alarmDialog, powerAndSpeed,  },
@@ -683,6 +689,33 @@ export default {
     },
   },
   methods: {
+    getwarnTypeData() {
+        let that = this
+        let params = {
+            wtid: "NX_FGS_HA_F_WT_0039_EQ"
+            // wtid: that.wind.wtid
+        }
+        GetMatrixalarmtype(params).then(res =>{
+            if (res && res.data) {
+                that.warnTypeData.typeData = res.data
+                that.getwarnTableData(res.data[0])
+            }
+        })
+    },
+    getwarnTableData(data) {
+        let that = this
+        let params = {
+            type: "BJXT",
+            wtid: "NX_FGS_HA_F_WT_0039_EQ"
+            // type: data.nemCode,
+            // wtid: that.wind.wtid
+        }
+        GetMatrixalarmtypeTable(params).then(res =>{
+            if (res && res.data) {
+                that.warnTypeData.tableData = res.data
+            }
+        })
+    },
     handleXhClick(wind) {
       //   console.log(wind);
       this.$refs.powerAndSpeed && this.$refs.powerAndSpeed.init(wind);