|
@@ -440,7 +440,7 @@
|
|
|
let markersList = [];
|
|
|
getSensorListByDeptId(that.deptId).then(function(res) {
|
|
|
that.visuForestCloudCameraBOListSearch = []
|
|
|
- that.sensorNum = res.data.length
|
|
|
+ // that.sensorNum = res.data.length
|
|
|
if (res.data != null && res.data.length > 0) {
|
|
|
for (let j = 0; j < res.data.length; j++) {
|
|
|
let dat = {
|
|
@@ -461,21 +461,21 @@
|
|
|
keepBindPopup: false,
|
|
|
isAggregation: false,
|
|
|
};
|
|
|
- if (res.data[i].deviceCode == '001') { // 水质传感器
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
|
|
|
- } else if (res.data[i].deviceCode == '002') { // 水尺
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_water_gauge";
|
|
|
- } else if (res.data[i].deviceCode == '003') { // 水文监测设备
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
|
|
|
- } else if (res.data[i].deviceCode == '004') { // 土壤监测设备
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
|
|
|
- } else if (res.data[i].deviceCode == '005') { // 病虫害监测站
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
|
|
|
- } else if (res.data[i].deviceCode == '006') { // 大气传感器
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
|
|
|
- } else if (res.data[i].deviceCode == '007') { // 水压传感器
|
|
|
- markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
|
|
|
- }
|
|
|
+ if (res.data[i].deviceType == 1) { // 水质传感器
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
|
|
|
+ } else if (res.data[i].deviceType == '002') { // 水尺
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_water_gauge";
|
|
|
+ } else if (res.data[i].deviceType == '003') { // 水文监测设备
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
|
|
|
+ } else if (res.data[i].deviceType == 2) { // 土壤监测设备
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
|
|
|
+ } else if (res.data[i].deviceType == 4) { // 病虫害监测站
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
|
|
|
+ } else if (res.data[i].deviceType == 5) { // 大气传感器
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
|
|
|
+ } else if (res.data[i].deviceType == 6) { // 水压传感器
|
|
|
+ markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
|
|
|
+ }
|
|
|
|
|
|
markersMap.lng = res.data[i].longitude;
|
|
|
markersMap.lat = res.data[i].latitude;
|