Prechádzať zdrojové kódy

feat:天气接口更改+离线监控图标添加

lavinia 2 mesiacov pred
rodič
commit
9849eac47a

+ 8 - 0
src/api/largeScreenApi.js

@@ -45,4 +45,12 @@ export function getVideoRealtimeUrl(data){
     method: 'post',
     data
   })
+}
+//获取天气信息
+export function getWeatherInfo(data){
+  return request({
+    url: '/api/sddnWeiHe/weather/queryWeather',
+    method: 'post',
+    data
+  })
 }

BIN
src/views/components/layerList/image/greyCamera.png


+ 1 - 1
src/views/components/layerList/index.vue

@@ -451,7 +451,7 @@ export default {
             const graphic = new mars3d.graphic.BillboardEntity({
               position: [point.longitude, point.latitude],
               style: {
-                image: require('./image/camera.png'),
+                image: point.status == 0?require('./image/camera.png'):require('./image/greyCamera.png'),
                 scale: 0.8,
                 clampToGround: true,
                 horizontalOrigin: this.Cesium.HorizontalOrigin.CENTER,

+ 12 - 5
src/views/hydrologic-info/left.vue

@@ -97,6 +97,7 @@ import iconUrl4 from '@/assets/image/hydrologic/icon1.png'
 import iconUrl5 from '@/assets/image/hydrologic/icon3.png'
 import iconUrl6 from '@/assets/image/hydrologic/icon2.png'
 import { getHydrologicalList } from '@/api/hydrologicalStationApi'
+import { getWeatherInfo } from '@/api/largeScreenApi'
 export default {
   data() {
     return {
@@ -191,19 +192,25 @@ export default {
       })
     },
     getAirInfo() {
-      window.requestSDK('/order/weather/now', { adcode: '610481' }, {}, 'post').then(async (res) => {
+      getWeatherInfo().then((res) => {
         this.qxList.forEach((item, index) => {
           if (index == 0) {
-            item.val = res.data.dew + ''
+            item.val = res.data.length > 0 ? res.data[0].tempMax + '℃' : '36'
           }
           if (index == 1) {
-            item.val = res.data.feelsLike + ''
+            item.val = res.data.length > 0 ? res.data[0].tempMin + '℃' : '20'
           }
           if (index == 2) {
-            item.val = res.data.text
+            item.val = res.data.length > 0 ? res.data[0].textNight : ''
           }
           if (index == 3) {
-            item.val = res.data.windScale + '级'
+            item.val = res.data.length > 0 ? res.data[0].windSpeedDay + '级' : ''
+          }
+          if (index == 4) {
+            item.val = res.data.length > 0 ? res.data[0].sunrise  : ''
+          }
+          if (index == 5) {
+            item.val = res.data.length > 0 ? res.data[0].sunset  : ''
           }
         })
       })

+ 2 - 2
src/views/sand-monitor/left.vue

@@ -62,11 +62,11 @@
             <div class="base-info-card">
               <div class="base-info-item">
                 <span>采砂区名称</span>
-                <span class="value">1#采砂区</span>
+                <span class="value">兴平市仪空采砂区</span>
               </div>
               <div class="base-info-item">
                 <span>采砂区面积</span>
-                <span class="value">1#采砂区 <span>万㎡</span></span>
+                <span class="value">1 <span>万㎡</span></span>
               </div>
               <div class="base-info-item">
                 <span>采砂区状态</span>