Explorar o código

forest事件分类接口

qinhouyu hai 1 ano
pai
achega
fe0257d93b
Modificáronse 2 ficheiros con 26 adicións e 12 borrados
  1. 21 10
      src/api/forest.js
  2. 5 2
      src/views/forest.vue

+ 21 - 10
src/api/forest.js

@@ -32,6 +32,17 @@ export function getEventList(param,loading) {
     },
   })
 }
+// 获取事件分类
+export function getEventByEventType(param,loading) {
+  return request({
+    url: '/center-event/eventview/getEventByEventType',
+    method: 'post',
+    data: param,
+    headers: {
+      loading: loading
+    },
+  })
+}
 // 获取日历颜色状态
 export function getEventByCalendar(param) {
   return request({
@@ -169,16 +180,16 @@ export function getEventDetail(param) {
 //   })
 // }
 // 获取事件分类
-export function getEventByEventType(param,loading) {
-  return request({
-    url: '/center-emergency/VisuEmergencyCloudMapController/getEventByEventType',
-    method: 'post',
-    data: param,
-    headers: {
-      loading: loading
-    },
-  })
-}
+// export function getEventByEventType(param,loading) {
+//   return request({
+//     url: '/center-emergency/VisuEmergencyCloudMapController/getEventByEventType',
+//     method: 'post',
+//     data: param,
+//     headers: {
+//       loading: loading
+//     },
+//   })
+// }
 // 获取上报排名
 export function getEventByReportorOrder(param,loading) {
   return request({

+ 5 - 2
src/views/forest.vue

@@ -1095,9 +1095,12 @@ export default {
       })
     },
     getEventByEventType(day, loading) {
-      let that = this
       //右侧获取事件分类
-      getEventByEventType({ eventTypeIdDl: that.eventTypeIdDl, eventTypeId: that.eventTypeId, day: day }, loading).then(res => {
+      getEventByEventType({
+        eventTypeIdDl: this.eventTypeIdDl.length === 0 ? Cookies.get("eventTypeDl").split(",") : this.eventTypeIdDl,
+        eventTypeId: this.eventTypeId.length === 0 ? Cookies.get("eventType").split(",") : this.eventTypeId,
+        day: day
+      }, loading).then(res => {
         if (res.data != null && res.data.length > 0) {
           this.showEventKind = true
           this.eventKind.data = res.data