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

云图页面警报刷新

wang_xy преди 2 години
родител
ревизия
d1cac138fb
променени са 2 файла, в които са добавени 42 реда и са изтрити 24 реда
  1. 30 12
      src/api/forest.js
  2. 12 12
      src/views/forest.vue

+ 30 - 12
src/api/forest.js

@@ -8,19 +8,25 @@ export function getBaseInfo() {
   })
 }
 // 左侧获取事件信息统计
-export function getTodayEvents(param) {
+export function getTodayEvents(param,loading) {
   return request({
     url: '/center-environment/VisuForestCloudMapController/getTodayEvents',
     method: 'post',
-    data: param
+    data: param,
+    headers: {
+      loading: loading
+    },
   })
 }
 // 左侧获取事件部门数量
-export function getDeptEventCount(param) {
+export function getDeptEventCount(param,loading) {
   return request({
     url: '/center-environment/VisuForestCloudMapController/getDeptEventCount',
     method: 'post',
-    data: param
+    data: param,
+    headers: {
+      loading: loading
+    },
   })
 }
 // 右侧获取天气
@@ -34,19 +40,25 @@ export function getWeather(param) {
 
 
 // 右侧获取事件列表
-export function getEventList(param) {
+export function getEventList(param,loading) {
   return request({
     url: '/center-environment/VisuForestCloudMapController/getEventList',
     method: 'post',
-    data: param
+    data: param,
+    headers: {
+      loading: loading
+    },
   })
 }
 // 右侧获取曝光台列表
-export function getExposureStage(param) {
+export function getExposureStage(param,loading) {
   return request({
     url: 'center-environment/VisuForestCloudMapController/getExposureStage',
     method: 'post',
-    data: param
+    data: param,
+    headers: {
+      loading: loading
+    },
   })
 }
 
@@ -67,19 +79,25 @@ export function getEventByCalendar(param) {
   })
 }
 // 获取事件分类
-export function getEventByEventType(param) {
+export function getEventByEventType(param,loading) {
   return request({
     url: '/center-environment/VisuForestCloudMapController/getEventByEventType',
     method: 'post',
-    data: param
+    data: param,
+    headers: {
+      loading: loading
+    },
   })
 }
 // 获取上报排名
-export function getEventByReportorOrder(param) {
+export function getEventByReportorOrder(param,loading) {
   return request({
     url: '/center-environment/VisuForestCloudMapController/getEventByReportorOrder',
     method: 'post',
-    data: param
+    data: param,
+    headers: {
+      loading: loading
+    },
   })
 }
 // 日志文件上传

+ 12 - 12
src/views/forest.vue

@@ -869,10 +869,10 @@ export default {
         }
       })
     },
-    getTodayEvents(day) {
+    getTodayEvents(day,loading) {
       let that = this
       //左侧获取事件信息统计
-      getTodayEvents({ day: day }).then(res => {
+      getTodayEvents({ day: day },loading).then(res => {
         this.aiTotal = res.data.aiTotal
         this.aiTotal_pre = res.data.aiTotal_pre
         this.newReport = res.data.newReport
@@ -888,10 +888,10 @@ export default {
         this.eventChartAi(this.aiTotal_pre, this.otherTotal_pre)
       })
     },
-    getDeptEventCount(day) {
+    getDeptEventCount(day,loading) {
       let that = this
       //左侧获取事件部门数量
-      getDeptEventCount({ day: day }).then(res => {
+      getDeptEventCount({ day: day },loading).then(res => {
         this.forestFarm = res.data
       })
     },
@@ -919,12 +919,12 @@ export default {
         }
       })
     },
-    getEventList(day) {
+    getEventList(day,loading) {
       let that = this
       this.eventList = []
       this.eventListAll = []
       //右侧获取事件列表
-      getEventList({ day: day }).then(res => {
+      getEventList({ day: day },loading).then(res => {
         this.eventList = res.data
         this.eventListAll = res.data
         that.markersList = []
@@ -1023,10 +1023,10 @@ export default {
       this.$refs.up.pause();//停止播放音乐
       this.$refs.up.currentTime = 0;
     },
-    getEventByEventType(day) {
+    getEventByEventType(day,loading) {
       let that = this
       //右侧获取事件分类
-      getEventByEventType({ day: day }).then(res => {
+      getEventByEventType({ day: day },loading).then(res => {
         if (res.data != null && res.data.length > 0) {
           this.showEventKind = true
           this.eventKind.data = res.data
@@ -1040,10 +1040,10 @@ export default {
         }
       })
     },
-    getEventByReportorOrder(day) {
+    getEventByReportorOrder(day,loading) {
       let that = this
       //右侧获取上报排名
-      getEventByReportorOrder({ day: day }).then(res => {
+      getEventByReportorOrder({ day: day },loading).then(res => {
         if (res.data != null && res.data.length > 0) {
           this.reportList.data = res.data
           this.reportList = { ...this.reportList }
@@ -1053,10 +1053,10 @@ export default {
         }
       })
     },
-    getExposureStage(day) {
+    getExposureStage(day,loading) {
       let that = this
       //右侧获取曝光台
-      getExposureStage({ day: day }).then(res => {
+      getExposureStage({ day: day },loading).then(res => {
         this.exposureStageList = res.data
       })
     },