瀏覽代碼

折线图缩短异步执行时间

wt 3 年之前
父節點
當前提交
ba77a53180

+ 1 - 2
src/views/business/fireInternet/deviceMonitoring/SSMonitoring/index.vue

@@ -211,12 +211,10 @@ export default {
         getTbDeviceStatusCollect(this.queryParams).then(response =>{
           this.index1Data = response.data
           this.loading1 = false
-          this.loading2 = false
         })
         this.queryParams.status = 0
         /* 折线图 */
         getTbDeviceStatusCollectIcoDetail(this.queryParams2).then(response =>{
-          this.loading3 = false
           let data = response.data
           let lineData = []
           let total = []
@@ -233,6 +231,7 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"烟感离线处理情况跟踪",color:"#FF9721"})
+            this.loading2 = false
           }
         })
         /* 公司列表 */

+ 1 - 1
src/views/business/fireInternet/deviceMonitoring/fireMonitoring/index.vue

@@ -231,8 +231,8 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"火灾监控离线处理情况跟踪",color:"#FF2416"})
+            this.loading2 = false
           }
-          this.loading2 = false
         })
         /* 公司列表 */
         this.queryParams.status = undefined

+ 1 - 2
src/views/business/fireInternet/deviceMonitoring/waterMonitoring/device/index.vue

@@ -208,7 +208,6 @@ export default {
       }
       /* 饼图、折线图 */
         tbInfoList(this.queryParams2).then(response =>{//pointCode=201 信息  pointCode=202 电量
-          this.loading1 = false
           let data = response.data.records
           let arr = [[],[],[]]
           for(let i = 0; i<data.length;i++){
@@ -225,8 +224,8 @@ export default {
             }
           }
           this.index2Data = arr
-          this.loading2 = false
           this.index2Data[2] = {name:"水系统设备工况情况跟踪",color:"#00FFFF"}
+          this.loading2 = false
         })
     },
     getList(){

+ 1 - 1
src/views/business/fireInternet/deviceMonitoring/waterMonitoring/offLine/index.vue

@@ -234,8 +234,8 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"水系统离线处理情况跟踪",color:"#00FFFF"})
+            this.loading2 = false
           }
-          this.loading2 = false
         })
         /* 公司列表 */
         this.queryParams.status = undefined

+ 1 - 1
src/views/business/fireInternet/fireAlarm/fireMonitoring/index.vue

@@ -234,8 +234,8 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"火警监控告警处理情况跟踪",color:"#FF2416"})
+            this.loading2 = false
           }
-          this.loading2 = false
         })
         /* 公司列表 */
         listChannel(this.queryParams).then(response => {

+ 1 - 1
src/views/business/fireInternet/fireAlarm/waterAlarm/index.vue

@@ -232,8 +232,8 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"水系统监控告警处理情况跟踪",color:"#00FFFF"})
+            this.loading2 = false
           }
-          this.loading2 = false
         })
         /* 公司列表 */
         listChannel(this.queryParams).then(response => {

+ 1 - 1
src/views/business/fireInternet/hiddenDanger/index.vue

@@ -232,8 +232,8 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"隐患总揽",color:"#FF9721"})
+            this.loading2 = false
           }
-          this.loading2 = false
         })
         /* 公司列表 */
         this.queryParams.status = undefined

+ 1 - 1
src/views/components/fireInternetInfo/index2.vue

@@ -153,7 +153,7 @@ export default {
           series: series
         };
         myChart.setOption(option);
-      },1000)
+      },500)
       window.addEventListener("resize", function() {
           myChart.resize();
       });