浏览代码

修改异常停留事件类型

wangming 1 月之前
父节点
当前提交
6c5eb463cb
共有 2 个文件被更改,包括 19 次插入20 次删除
  1. 12 11
      src/pages/home/home.vue
  2. 7 9
      src/pagesA/abnormalInfo/abnormalInfo.vue

+ 12 - 11
src/pages/home/home.vue

@@ -121,10 +121,13 @@
                         }}
                     </view>
                 </view>
-                <view class="shareTitleTwo" v-else>
+                <view
+                    class="shareTitleTwo"
+                    v-if="alarmRetentionLists.length == 1"
+                >
                     <view class="shareTitle">
                         {{ alarmRetentionLists[0].devName }}检测到有{{
-                            getEventTypeName(item.eventType)
+                            getEventTypeName(alarmRetentionLists[0].eventType)
                         }}
                     </view>
                 </view>
@@ -282,18 +285,16 @@ export default {
                 });
         },
         getwarmType() {
-            this.$http
-                .get("pub/dic/query", { dicType: "alarm_event_type" })
-                .then((res) => {
-                    if (res.data.data) {
-                        this.warmTypeList = res.data.data;
-                    }
-                });
+            this.$http.get("wap/stats/queryEventType").then((res) => {
+                if (res.data.data) {
+                    this.warmTypeList = res.data.data;
+                }
+            });
         },
         getEventTypeName(eventType) {
             return (
-                this.warmTypeList.find((item) => item.itemCode == eventType)
-                    ?.itemName || "未知"
+                this.warmTypeList.find((item) => item.eventVal == eventType)
+                    ?.eventDesc || "未知"
             );
         },
         gotoSurvey(path) {

+ 7 - 9
src/pagesA/abnormalInfo/abnormalInfo.vue

@@ -162,18 +162,16 @@ export default {
                 });
         },
         getwarmType() {
-            this.$http
-                .get("pub/dic/query", { dicType: "alarm_event_type" })
-                .then((res) => {
-                    if (res.data.data) {
-                        this.warmTypeList = res.data.data;
-                    }
-                });
+            this.$http.get("wap/stats/queryEventType").then((res) => {
+                if (res.data.data) {
+                    this.warmTypeList = res.data.data;
+                }
+            });
         },
         getEventTypeName(eventType) {
             return (
-                this.warmTypeList.find((item) => item.itemCode == eventType)
-                    ?.itemName || "未知"
+                this.warmTypeList.find((item) => item.eventVal == eventType)
+                    ?.eventDesc || "未知"
             );
         },
         getDate(type) {