Browse Source

monitor加传参

qinhouyu 2 năm trước cách đây
mục cha
commit
5a66cceb9d
2 tập tin đã thay đổi với 6 bổ sung8 xóa
  1. 3 3
      src/api/monitor.js
  2. 3 5
      src/views/monitor.vue

+ 3 - 3
src/api/monitor.js

@@ -5,7 +5,7 @@ export function selectDeviceType() {
   return request({
     url: '/center-emergency/VisuEmergencyMonitorCenterController/selectDeviceType',
     method: 'post',
-    data:{type:5}
+    data:{"deptId":deptId}
   })
 }
 // 根据设备类型查看列表
@@ -64,9 +64,9 @@ export function getSensorListByDeptId(deptId) {
 export function getDlblistBydeptId(deptId) {
   let url = "";
   if(deptId!=null&&deptId!=""){
-    url= '/center-emergency/VisuEmergencyMonitorCenterController/getDlblistBydeptId?deptId=' + deptId;
+    url= '/center-emergency/VisuEmergencyMonitorCenterController/getDlblistBydeptId?deptId=' + deptId+ '&type=5';
   }else{
-    url= '/center-emergency/VisuEmergencyMonitorCenterController/getDlblistBydeptId';
+    url= '/center-emergency/VisuEmergencyMonitorCenterController/getDlblistBydeptId?type=5';
   }
   return request({
     url: url,

+ 3 - 5
src/views/monitor.vue

@@ -435,7 +435,6 @@
         // this.getNotCoverPlaces(this.deptId);
       },
       laClick() {
-        this.$refs.supermap.clearG();
         this.onLa = true;
         this.onShe = false;
         this.onChuan = false;
@@ -453,13 +452,12 @@
         this.placeholderMsg = "请输入传感器名称"
         this.deptId = Cookies.get("deptId")
         this.getMonitorDeviceAndDataList(null)
-        this.$refs.supermap.clearG();
       },
       // 云广播
       getDlblistBydeptId(deptId) {
         let that = this;
         let markersList = [];
-        getDlblistBydeptId(deptId).then(function(res) {
+        getDlblistBydeptId(that.deptId).then(function(res) {
             that.loudspeakerNum = res.data.length
             that.visuForestCloudCameraBOListSearch = []
             that.tempList = []
@@ -570,7 +568,7 @@
       getMonitorDeviceAndDataList(deptId) {
         let list = []
         let markersList = [];
-        getMonitorDeviceAndDataList(deptId).then((res) => {
+        getMonitorDeviceAndDataList(this.deptId).then((res) => {
           this.visuForestCloudCameraBOListSearch = []
           this.tempList = []
           list = res.data
@@ -1275,7 +1273,7 @@
       selectDeviceType() {
         //获取左侧动态感知设备
         let that = this
-        selectDeviceType().then(res => {
+        selectDeviceType(that.deptId).then(res => {
           that.cameraMarkersList = []
           that.tempList = []
           that.visuForestCloudMapDeviceBOList = res.data.visuForestCloudMapDeviceBOList