Просмотр исходного кода

build: bump version to 1.15.16

1. 修复多个页面的空数据渲染问题,新增loading状态控制
2. 调整设备数据监听逻辑,避免空数组访问报错
3. 优化详情页时间参数传递逻辑
allen 6 дней назад
Родитель
Сommit
1805a7d706

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "云飞智控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
-    "versionName" : "1.15.15",
-    "versionCode" : 11515,
+    "versionName" : "1.15.16",
+    "versionCode" : 11516,
     "transformPx" : false,
     "sassImplementationName" : "node-sass",
     /* 5+App特有相关 */

+ 3 - 1
pages/bzy/components/deviceData.vue

@@ -365,8 +365,10 @@ export default {
           newVal.forEach(item=>{
             this.historyData.push(item.d_h_t)
           })
+          this.objItem = this.historyData[0]
+        }else{
+          this.objItem = {}
         }
-        this.objItem = this.historyData[0]
       },
       deep:true,
       immediate:true,

+ 5 - 3
pages/bzy/detail.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="device-detail">
+  <view class="device-detail" v-show="!loading">
     <view class="device-detail__header">
       <u-icon
         size="36"
@@ -117,8 +117,8 @@ export default {
   },
   data(){
     return {
-      isShowTab:false,
-      showPicker: false,
+      loading: false,
+      isShowTab: false,
       disableShow: false,
       isShowOperation: false,
       photoIcon:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/photoIcon.png',
@@ -387,6 +387,7 @@ export default {
       this.pestList = data
     },
     async getPolylineData(){
+      this.loading = true;
       const res = await this.$myRequest({
         url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
         method: 'POST',
@@ -397,6 +398,7 @@ export default {
           end_time: new Date(this.endDate + ' 23:59:59').getTime()/1000,
         },
       });
+      this.loading = false;
       const data = res || [];
       this.polylineList = data
     },

+ 6 - 3
pages/cbd/detail.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="device-detail">
+  <view class="device-detail" v-show="!loading">
     <view class="device-detail__header">
       <u-icon
         size="36"
@@ -143,6 +143,7 @@ export default {
     return {
       isShowTab:false,
       showPicker: false,
+      loading: false,
       disableShow: false,
       isShowOperation: false,
       photoIcon:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/photoIcon.png',
@@ -411,6 +412,7 @@ export default {
       this.pestList = data
     },
     async getPolylineData(){
+      this.loading = true;
       const res = await this.$myRequest({
         url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
         method: 'POST',
@@ -421,6 +423,7 @@ export default {
           end_time: new Date(this.endDate + ' 23:59:59').getTime()/1000,// 转成毫秒
         },
       });
+      this.loading = false;
       const data = res || [];
       this.polylineList = data
     },
@@ -447,8 +450,8 @@ export default {
         method: 'POST',
         data: {
         d_id: this.deviceInfo.d_id,
-        start: this.startDate + ' 00:00:00',
-        end: this.endDate + ' 23:59:59',
+        start: this.startDate,
+        end: this.endDate,
         model: 'B'
         },
       });

+ 3 - 1
pages/scd/components/deviceData.vue

@@ -363,8 +363,10 @@ export default {
           newVal.forEach(item=>{
             this.historyData.push(item.d_h_t)
           })
+          this.objItem = this.historyData[0]
+        }else{
+          this.objItem = {}
         }
-        this.objItem = this.historyData[0]
       },
       deep:true,
       immediate:true,

+ 4 - 1
pages/scd/detail.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="device-detail">
+  <view class="device-detail" v-show="!loading">
     <view class="device-detail__header">
       <u-icon
         size="36"
@@ -133,6 +133,7 @@ export default {
       totalPage: 0,
       currentYear: new Date().getFullYear(),
       selectorRange: [],
+      loading: false,
       maxDate: this.formatDate(new Date()),
       minDate: this.formatDate(new Date(new Date().getFullYear(), 0, 1)),
       show: false,
@@ -413,6 +414,7 @@ export default {
       this.pestList = data
     },
     async getPolylineData(){
+      this.loading = true;
       const res = await this.$myRequest({
         url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
         method: 'POST',
@@ -423,6 +425,7 @@ export default {
           end_time: new Date(this.endDate).getTime()/1000,// 转成毫秒
         },
       });
+      this.loading = false;
       const data = res || [];
       this.polylineList = data
     },