From 997835429a1d66643364091e8437ebbbeb8ff97a Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期四, 28 九月 2023 14:09:58 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into develop

---
 src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue |   44 ++++++++++++++++++++++++++++----------------
 1 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
index eec09ae..f861422 100644
--- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
+++ b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
@@ -14,7 +14,7 @@
               <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange"/>
             </a-form-item>
           </a-col>
-          <a-col :md="3" :sm="3" :xs="3">
+          <a-col :md="2" :sm="2" :xs="2">
             <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
           </a-col>
           <a-col :md="2" :sm="2" :xs="2">
@@ -359,7 +359,11 @@
                   textStyle:{
                     color:'#000',
                   },
-                  formatter:"鏃堕暱锛歿c}H"
+                  // formatter:"鏃堕暱锛歿c}H",
+                  formatter:params=>{
+                    const value=String(params.value)
+                    return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H`
+                  }
                 },
                 itemStyle: {
                   normal: {
@@ -456,7 +460,11 @@
                 textStyle:{
                   color:'#000',
                 },
-                formatter:"鏃堕暱锛歿c}H"
+                // formatter:"鏃堕暱锛歿c}H",
+                formatter:params=>{
+                  const value=String(params.value)
+                  return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H`
+                }
               },
             itemStyle: {
               normal: {
@@ -549,7 +557,11 @@
               textStyle:{
                 color:'#000',
               },
-              formatter:"鏃堕暱锛歿c}H"
+              // formatter:"鏃堕暱锛歿c}H",
+              formatter:params=>{
+                const value=String(params.value)
+                return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H`
+              }
             },
             itemStyle: {
               normal: {
@@ -577,9 +589,9 @@
         StartupLine.setOption(StartupLine_option);
       },
       queryStatistical(){
+        if(this.queryParams.collectTime){
           getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{
             if(res.success){
-              // console.log(res);
               this.StatCharOpeningRate = res.result.openRate;
               this.StatCharUsedRate = res.result.utilizationRate;
               this.UtilizationHeight = res.result.openRate;
@@ -592,16 +604,20 @@
               this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong);
               this.draw();
             }
-            else{
-              this.draw();
-            }
           })
+        }else{
+          this.$notification.warning({
+            message:'娑堟伅',
+            description:'璇烽�夋嫨鏃堕棿'
+          })
+        }
       },
       dataChange(val) {
         this.queryParam.collectTime1 = "";
-        this.queryParams.dateTime = val.format('YYYYMMDD')
-        this.queryParams.collectTime = val.format('YYYY-MM-DD');
-
+        if(val){
+          this.queryParams.dateTime = val.format('YYYYMMDD')
+          this.queryParams.collectTime = val.format('YYYY-MM-DD');
+        }
       },
       initEquipmentNode(id) {
         let _this = this
@@ -640,7 +656,7 @@
         this.queryParam = {}
         this.queryParams = {}
         // this.dates = []
-        this.queryStatistical()
+        // this.queryStatistical()
         // this.onClearSelected()
       },
       searchQuery(){
@@ -655,18 +671,14 @@
             this.$set(this.queryParam, 'equipmentId', val.equipmentId)
             this.queryParams.parentId = ''
             this.queryParams.equipmentId = val.equipmentId
-            this.searchQuery()
           }else{
             this.queryParams.parentId = val.key
             this.queryParams.equipmentId = ''
             this.$set(this.queryParam, 'tierName', val.title)
-            this.searchQuery()
             }
             this.searchQuery()
           }
           // this.searchQuery();
-
-
       }
 
   }

--
Gitblit v1.9.3