فهرست منبع

接口改为直连

王通 1 سال پیش
والد
کامیت
94b4bb1e27
5فایلهای تغییر یافته به همراه139 افزوده شده و 147 حذف شده
  1. 26 29
      src/api/forest.js
  2. 29 1
      src/views/date.vue
  3. 70 93
      src/views/eventdetailsdialog.vue
  4. 8 18
      src/views/firespread.vue
  5. 6 6
      src/views/forest.vue

+ 26 - 29
src/api/forest.js

@@ -86,7 +86,7 @@ export function getEventList(param,loading) {
 // 右侧获取曝光台列表
 export function getExposureStage(param,loading) {
   return request({
-    url: 'center-firecontrol/VisuForestCloudMapController/getExposureStage',
+    url: 'center-event/eventview/selectExposureStage',
     method: 'post',
     data: param,
     headers: {
@@ -98,7 +98,7 @@ export function getExposureStage(param,loading) {
 // 获取事件详情
 export function getEventDetail(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/getEventDetail',
+    url: '/center-event/eventview/getEventDetail',
     method: 'post',
     data: param
   })
@@ -106,7 +106,7 @@ export function getEventDetail(param) {
 // 获取日历颜色状态
 export function getEventByCalendar(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/getEventByCalendar',
+    url: '/center-event/eventview/selectEventByCalendar',
     method: 'post',
     data: param
   })
@@ -114,7 +114,7 @@ export function getEventByCalendar(param) {
 // 获取事件分类
 export function getEventByEventType(param,loading) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/getEventByEventType',
+    url: '/center-event/eventview/getEventByEventType',
     method: 'post',
     data: param,
     headers: {
@@ -125,7 +125,7 @@ export function getEventByEventType(param,loading) {
 // 获取上报排名
 export function getEventByReportorOrder(param,loading) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/getEventByReportorOrder',
+    url: '/center-event/eventview/getEventByReportorOrder',
     method: 'post',
     data: param,
     headers: {
@@ -152,7 +152,7 @@ export function sendEventLog(param) {
 // 事件处理流程
 export function updateCentereventTEventcatalogueStatus(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/updateCentereventTEventcatalogueStatus',
+    url: '/center-event/eventcatalogue/editEventStatus',
     method: 'post',
     data: param
   })
@@ -160,23 +160,23 @@ export function updateCentereventTEventcatalogueStatus(param) {
 // 事件处理流程-事件类型
 export function listSJfl(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/listSJfl',
-    method: 'post',
-    data: param
+    url: '/center-event/eventtype/getCentereventTEventtypeByParentId?parentId='+param.parentId,
+    method: 'get'
   })
 }
 // 事件处理流程-关联预案
 export function listYuAn() {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/listYuAn',
-    method: 'post'
+    url: '/center-data/reserve/listYuAnFegin',
+    method: 'post',
+    data:{}
   })
 }
 // 事件处理流程-签收部门
 export function selectByeventCode(eventCode) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/selectByeventCode/'+eventCode,
-    method: 'post'
+    url: '/center-event/centereventtdeptevent/selectByEventCode?eventCode='+eventCode,
+    method: 'get'
   })
 }
 // 事件处理流程-联动
@@ -197,9 +197,8 @@ export function selectTaskBO() {
 // 搜索物资
 export function listResourceByWz(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/listResourceByWz',
-    method: 'post',
-    data:param
+    url: '/center-monitor/camera/findNearbyCameras/'+param.longitude+'/'+param.latitude+'/'+param.radius,
+    method: 'get'
   })
 }
 // 任务领取部门列表
@@ -237,8 +236,8 @@ export function refusedTask(param) {
 // 事件调整关联预案
 export function updateYjYuAn(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/updateYjYuAn',
-    method: 'post',
+    url: '/center-event/centereventtfireevent',
+    method: 'put',
     data:param
   })
 }
@@ -254,24 +253,23 @@ export function uploadBase64(param) {
 // 通过事件code查询事件责任部门
 export function centereventtdepteventList(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/centereventtdepteventList',
-    method: 'post',
-    data:param
+    url: '/center-event/centereventtdeptevent/getAllCentereventDeptEvent?eventCode='+param.eventCode,
+    method: 'get'
   })
 }
 // 通过责任部门查询责任人
 export function dutysystemList(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/dutysystemList',
-    method: 'post',
-    data:param
+    url: '/center-event/dutysystem/getAllCentereventTDutySystem?depteventId='+param.depteventId,
+    method: 'get'
+
   })
 }
 
 // 事件责任制添加联系人
 export function dutysystemAdd(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/dutysystemAdd',
+    url: '/center-event/dutysystem/addOrUpdateAll',
     method: 'post',
     data:param
   })
@@ -279,9 +277,8 @@ export function dutysystemAdd(param) {
 // 事件责任制删除联系人
 export function dutysystemRemove(param) {
   return request({
-    url: '/center-firecontrol/VisuForestCloudMapController/dutysystemRemove',
-    method: 'get',
-    params:param
+    url: '/center-event/dutysystem/'+param.ids,
+    method: 'delete'
   })
 }
 
@@ -319,7 +316,7 @@ export function selectMessageById(messageId) {
 // 事件处置
 export function eventHandling(id,eventCode) {
   return request({
-    url: '/center-firecontrol/VisuForestEventCenterController/eventHandling',
+    url: '/center-event/eventcatalogue/eventHandling',
     method: 'post',
     data: {id:id,eventCode:eventCode,dataStatus:"1"}
   })

+ 29 - 1
src/views/date.vue

@@ -80,6 +80,7 @@
 import {
   getEventByCalendar
 } from '@/api/forest'
+import Cookies from 'js-cookie'
 	export default {
 		name: "ren-calendar",
 		props: {
@@ -228,9 +229,36 @@ import {
 				};
 				return today;
 			},
+      // 获得某月的天数
+       getMonthDays(y,month){
+  let monthStartDate = new Date(y, month, 1);
+  let monthEndDate = new Date(y, month + 1, 1);
+  let days = (monthEndDate - monthStartDate)/(1000 * 60 * 60 * 24);
+  console.log(days)
+  return days;
+    },
 			// 获取当前月份数据
       async monthDay(y, month) {
-        let param={ day: y+"-"+this.formatNum(Number(month)) }
+        let eventType = Cookies.get("eventXlType").split(",")
+        let eventTypeDl = Cookies.get("eventDlType").split(",")
+        let yearMonth = []
+        let day = new Date(y, month, 0).getDate();
+        for (let i = 1; i <= day; i++) {
+          let days = "";
+          if (i < 10) {
+            days = "0" + i;
+          } else {
+            days = i;
+          }
+          let aDate = y + "-" + this.formatNum(month) + "-" + days;
+          yearMonth.push(aDate);
+        }
+        let param = {
+          eventTypeId: eventType,
+          eventTypeIdDl: eventTypeDl,
+          yearMonth: yearMonth
+        }
+        // let param={ day: y+"-"+this.formatNum(Number(month)) }
         await getEventByCalendar(param).then(res => {
           //获取日历颜色状态
           this.eventByCalendarList=res.data;

+ 70 - 93
src/views/eventdetailsdialog.vue

@@ -2849,7 +2849,6 @@ export default {
         let param = {
           longitude: this.longitude,
           latitude: this.latitude,
-          type: type,
           radius: this.radius,
         };
         listResourceByWz(param).then((res) => {
@@ -2867,108 +2866,82 @@ export default {
                 keepBindPopup: false,
                 isAggregation: true,
               };
-              if (type == "qsk") {
-                markersMap.icon = "sj-icon-centerdata-t-forest-waterintake";
-              } else if (type == "sh") {
-                markersMap.icon = "sj-icon-centerdata-t-forest-watercrane";
-              } else if (type == "xfs") {
-                markersMap.icon = "sj-icon-centerdata-t-forest-firehydrant";
-              } else if (type == "qjd") {
-                markersMap.icon = "sj-icon-landing";
-              } else if (type == "jcz") {
-                markersMap.icon = "sj-icon-checkpoint";
-              } else if (type == "fhd") {
-                markersMap.icon = "sj-icon-fireteam";
-              } else if (type == "zdqy") {
-                markersMap.icon = "sj-icon-keyAreas";
-              } else if (type == "sxt") {
-                if(res.data[i].cameraUse==1)
-                {
-                  if(res.data[i].workingStatus==0)
-                  {
-                    markersMap.icon='sj-icon-map-centerdata-slmonitor'
-                    markersMap.click='preview'
-                  }else if (res.data[i].workingStatus==1)
-                  {
-                    markersMap.icon='sj-icon-map-not-centerdata-slmonitor'
-                    markersMap.click=''
-                  }
-
-                } else  if (res.data[i].cameraUse == 2){
-                  if(res.data[i].workingStatus==0)
-                  {
-                    markersMap.icon = "camera";
-                    markersMap.click='preview'
-                  }else if (res.data[i].workingStatus==1)
-                  {
-                    markersMap.icon = "camera-not";
-                    markersMap.click=''
-                  }
-                }  else if (res.data[i].cameraUse == 3) {
-                  if(res.data[i].workingStatus==0)
-                  {
-                    markersMap.icon = 'sj-icon-map-centerdata-slmonitor-traffic'
-                    markersMap.click='preview'
-                  }else if (res.data[i].workingStatus==1)
-                  {
-                    markersMap.icon = 'sj-icon-map-not-centerdata-slmonitor-traffic'
-                    markersMap.click=''
-                  }
 
+              if (res.data[i].cameraUse == 1) {
+                if (res.data[i].workingStatus == 0) {
+                  markersMap.icon = 'sj-icon-map-centerdata-slmonitor'
+                  markersMap.click = 'preview'
+                } else if (res.data[i].workingStatus == 1) {
+                  markersMap.icon = 'sj-icon-map-not-centerdata-slmonitor'
+                  markersMap.click = ''
                 }
-                else if (res.data[i].cameraUse == 4) {
-                  if(res.data[i].workingStatus==0)
-                  {
-                    markersMap.icon = 'sj-icon-map-centerdata-sand-quarry-camera'
-                    markersMap.click='preview'
-                  }else if (res.data[i].workingStatus==1)
-                  {
-                    markersMap.icon = 'sj-icon-map-not-centerdata-sand-quarry-camera'
-                    markersMap.click=''
-                  }
 
+              } else if (res.data[i].cameraUse == 2) {
+                if (res.data[i].workingStatus == 0) {
+                  markersMap.icon = "camera";
+                  markersMap.click = 'preview'
+                } else if (res.data[i].workingStatus == 1) {
+                  markersMap.icon = "camera-not";
+                  markersMap.click = ''
                 }
-                else if (res.data[i].cameraUse == 5) {
-                  if (res.data[i].workingStatus == 0) {
-                    markersMap.icon = 'sj-icon-map-centerdata-t-hydraulic-reservoir-camera'
-                    markersMap.click = 'preview'
-                  } else if (res.data[i].workingStatus == 1) {
-                    markersMap.icon = 'sj-icon-map-not-centerdata-t-hydraulic-reservoir-camera'
-                    markersMap.click = ''
-                  }
+              } else if (res.data[i].cameraUse == 3) {
+                if (res.data[i].workingStatus == 0) {
+                  markersMap.icon = 'sj-icon-map-centerdata-slmonitor-traffic'
+                  markersMap.click = 'preview'
+                } else if (res.data[i].workingStatus == 1) {
+                  markersMap.icon = 'sj-icon-map-not-centerdata-slmonitor-traffic'
+                  markersMap.click = ''
                 }
-                if (res.data[i].cameraCode != null) {
-                  //markersMap.click = "preview";
-                  // markersMap.parameter = res.data[i].cameraCode
-                  markersMap.parameter = {
-                    code: res.data[i].cameraCode,
-                    type: res.data[i].cameraFactory
-                      ? res.data[i].cameraFactory
-                      : 1,
-                    name: res.data[i].cameraName,
-                  };
+
+              } else if (res.data[i].cameraUse == 4) {
+                if (res.data[i].workingStatus == 0) {
+                  markersMap.icon = 'sj-icon-map-centerdata-sand-quarry-camera'
+                  markersMap.click = 'preview'
+                } else if (res.data[i].workingStatus == 1) {
+                  markersMap.icon = 'sj-icon-map-not-centerdata-sand-quarry-camera'
+                  markersMap.click = ''
+                }
+
+              } else if (res.data[i].cameraUse == 5) {
+                if (res.data[i].workingStatus == 0) {
+                  markersMap.icon = 'sj-icon-map-centerdata-t-hydraulic-reservoir-camera'
+                  markersMap.click = 'preview'
+                } else if (res.data[i].workingStatus == 1) {
+                  markersMap.icon = 'sj-icon-map-not-centerdata-t-hydraulic-reservoir-camera'
+                  markersMap.click = ''
                 }
               }
-              markersMap.lng = res.data[i].longitude;
-              markersMap.lat = res.data[i].latitude;
-              markersMap.bindPopupHtml =
-                '<div class="map-tip">' +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>资源名称:" +
-                res.data[i].cameraName +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "</div>";
-              markersList.push(markersMap);
-            }
+              if (res.data[i].cameraCode != null) {
+                //markersMap.click = "preview";
+                // markersMap.parameter = res.data[i].cameraCode
+                markersMap.parameter = {
+                  code: res.data[i].cameraCode,
+                  type: res.data[i].cameraFactory
+                    ? res.data[i].cameraFactory
+                    : 1,
+                  name: res.data[i].cameraName,
+                };
+              }
+            markersMap.lng = res.data[i].longitude;
+            markersMap.lat = res.data[i].latitude;
+            markersMap.bindPopupHtml =
+              '<div class="map-tip">' +
+              "<span>" +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              "                  <h4>资源名称:" +
+              res.data[i].cameraName +
+              "</h4>" +
+              "                </div>" +
+              "                </div>" +
+              "                </span>" +
+              "</div>";
+            markersList.push(markersMap);
+          }
+        }
             setTimeout(() => {
               this.$refs.supermapDialog.setMarkersByType(markersList, type);
             }, 1000);
-          }
         });
       }
     },
@@ -3516,6 +3489,10 @@ export default {
             reserve: that.sendGuanLianYuAn,
             address: that.address,
           };
+          if (param.phones.length!=0)
+          {
+            param.message='有火险事件需要处理请查收'
+          }
           updateCentereventTEventcatalogueStatus(param).then((res) => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`);

+ 8 - 18
src/views/firespread.vue

@@ -1885,7 +1885,6 @@ export default {
         let param = {
           longitude: that.longitude,
           latitude: that.latitude,
-          type: type,
           radius: that.radius
         }
         listResourceByWz(param).then(res => {
@@ -1903,21 +1902,6 @@ export default {
                 keepBindPopup: false,
                 isAggregation: true
               }
-              if (type == 'qsk') {
-                markersMap.icon = 'sj-icon-waterintake'
-              } else if (type == 'sh') {
-                markersMap.icon = 'sj-icon-watercrane'
-              } else if (type == 'xfs') {
-                markersMap.icon = 'sj-icon-firehydrant'
-              } else if (type == 'qjd') {
-                markersMap.icon = 'sj-icon-landing'
-              } else if (type == 'jcz') {
-                markersMap.icon = 'sj-icon-checkpoint'
-              } else if (type == 'fhd') {
-                markersMap.icon = 'sj-icon-fireteam'
-              } else if (type == 'zdqy') {
-                markersMap.icon = 'sj-icon-keyAreas'
-              } else if (type == 'sxt') {
                 if(res.data[i].cameraUse==1)
                 {
                   if(res.data[i].workingStatus==0)
@@ -1980,7 +1964,7 @@ export default {
                     type:res.data[i].cameraFactory?res.data[i].cameraFactory:1,name:res.data[i].cameraName}
                 }
 
-              }
+
               markersMap.lng = res.data[i].longitude
               markersMap.lat = res.data[i].latitude
               markersMap.bindPopupHtml = '<div class="map-tip">' +
@@ -1994,10 +1978,11 @@ export default {
                 '</div>'
               markersList.push(markersMap)
             }
+          }
             setTimeout(() => {
               that.$refs.supermapDialog1.setMarkersByType(markersList, type)
             }, 1000)
-          }
+
         })
       }
     },
@@ -2528,6 +2513,7 @@ export default {
           } else {
             that.sendDeptId = that.deptId;
           }
+
           //事件处理流程
           let param = {
             phones: that.sendUserFegin,
@@ -2544,6 +2530,10 @@ export default {
             reserve: that.sendGuanLianYuAn,
             address: that.address,
           };
+          if (param.phones.length!=0)
+          {
+            param.message='有火险事件需要处理请查收'
+          }
           updateCentereventTEventcatalogueStatus(param).then((res) => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`);

+ 6 - 6
src/views/forest.vue

@@ -1124,8 +1124,8 @@ export default {
       //右侧获取事件分类
       getEventByEventType({
         day: day,
-        eventTypeIdDl: that.eventTypeIdDl,
-        eventTypeId: that.eventTypeId
+        eventTypeIdDl: that.eventTypeIdDl.length==0?Cookies.get("eventDlType").split(','):that.eventTypeIdDl,
+        eventTypeId: that.eventTypeId.length==0?Cookies.get("eventXlType").split(','):that.eventTypeId
       }, loading).then(res => {
         if (res.data != null && res.data.length > 0) {
           this.showEventKind = true
@@ -1145,8 +1145,8 @@ export default {
       //右侧获取上报排名
       getEventByReportorOrder({
         day: day,
-        eventTypeIdDl: that.eventTypeIdDl,
-        eventTypeId: that.eventTypeId
+        eventTypeIdDl: that.eventTypeIdDl.length==0?Cookies.get("eventDlType").split(','):that.eventTypeIdDl,
+        eventTypeId: that.eventTypeId.length==0?Cookies.get("eventXlType").split(','):that.eventTypeId
       }, loading).then(res => {
         if (res.data != null && res.data.length > 0) {
           this.reportList.data = res.data
@@ -1244,8 +1244,8 @@ export default {
       //右侧获取曝光台
       getExposureStage({
         day: day,
-        eventTypeIdDl: that.eventTypeIdDl,
-        eventTypeId: that.eventTypeId
+        eventTypeIdDl: that.eventTypeIdDl.length==0?Cookies.get("eventDlType").split(','):that.eventTypeIdDl,
+        eventTypeId: that.eventTypeId.length==0?Cookies.get("eventXlType").split(','):that.eventTypeId
       }, loading).then(res => {
         this.exposureStageList = res.data
       })