Explorar el Código

分项耗能搜索优化

yuhan hace 1 año
padre
commit
a487a70fa2

+ 3 - 5
src/views/module_ems/energyAnalyse/components/commonSearch.vue

@@ -36,12 +36,10 @@
             <a-date-picker
               v-if="type === 'day'"
               v-model="queryParams.day"
-              :editable="false"
-              :clearable="false"
-              value-format="yyyy-MM-dd"
-              type="date"
+              format="YYYY-MM-DD"
+              value-format="yyyy-MM-DD"
               placeholder="选择日期"
-            >
+              >
             </a-date-picker>
           </a-form-item>
         </a-col>

+ 3 - 7
src/views/module_ems/energyAnalyse/energyItem/index.vue

@@ -118,12 +118,11 @@
       })
     },
     methods: {
-      async getItemizedenergy(){
+      getItemizedenergy(){
         this.loading = true
         var data = this.$refs.commonSearch.queryParams
-        await getAction(this.url.list, data).then(response => {
+        getAction(this.url.list, data).then(response => {
           if(response.success){
-            this.$message.success(response.message);
             var listData = response.result
             // 日
             this.itemizedStatistics.nowDay = (listData.dayStatistics.find(item=>item.type === '当日用能')).howManyValue
@@ -173,18 +172,15 @@
             this.dongli = listData.dongli
             this.zhaoming = listData.zhaoming
             this.qita = listData.qita
-            this.loading = false
-
           }else{
             this.$message.warning(response.message);
-            this.loading = false
           }
         }).finally(() => {
           this.initDayPieCharts()
           this.initWeekPieCharts()
           this.initMonthPieCharts()
           this.initEcharts()
-          // this.loading = false
+          this.loading = false
         })
       },
       initDayPieCharts(){