From 738f76adfcbf102dfbf890b044ba9a25a034cb8c Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期三, 27 三月 2024 16:17:38 +0800
Subject: [PATCH] 1、用户管理页面修改身份字段名称为首页权限并调整其选项值 2、按照新需求完成客户操作工进入后页面所有布局100% 3、调整全局页脚内容

---
 src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue |   87 ++++++++++++++++++-------------------------
 1 files changed, 37 insertions(+), 50 deletions(-)

diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
index c025553..b65eec2 100644
--- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
+++ b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
@@ -11,14 +11,14 @@
           </a-col>
           <a-col :md="4" :sm="4" :xs="4">
             <a-form-item label="鏃ユ湡">
-              <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange"/>
+              <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" format='YYYY-MM-DD' @change="dataChange" :allowClear="false"/>
             </a-form-item>
           </a-col>
-          <a-col :md="3" :sm="3" :xs="3">
-            <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
-          </a-col>
           <a-col :md="2" :sm="2" :xs="2">
-            <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
+            <a-space>
+              <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
+            </a-space>
           </a-col>
         </a-row>
       </a-form>
@@ -91,14 +91,9 @@
   import moment from 'moment'
   import { putAction, getAction } from '@/api/manage'
   import $ from 'jquery'
-  import AFormItem from 'ant-design-vue/es/form/FormItem'
   import * as echarts from 'echarts'
   export default {
     name: 'StatisticsLegend',
-    components:{
-      AFormItem
-
-    },
     props: { equip: {} },
     data(){
       return{
@@ -130,16 +125,11 @@
       }
     },
     created(){
-
-
       let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD');
-
-
-      this.queryParams.collectTime = collectTime;
-
-      this.queryParams.dateTime = this.queryParams.collectTime.format('YYYYMMDD')
-      this.initEquipmentNode('-1')
-      this.queryStatistical();
+      this.queryParams.collectTime = moment().add(-1,'d').format('YYYY-MM-DD')
+      this.queryParams.dateTime = moment().add(-1,'d').format('YYYYMMDD')
+      this.initEquipmentNode()
+      // this.queryStatistical();
       // this.getTime(37800);
     },
 
@@ -589,41 +579,38 @@
         StartupLine.setOption(StartupLine_option);
       },
       queryStatistical(){
-          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;
-              this.StatCharUsedopeningRate = res.result.usedOpenRate;
-              this.StartupHeight = res.result.usedOpenRate;
-              this.openingLong = this.getTime(res.result.openLong)
-              this.waitingLong = this.getTime(res.result.waitLong);
-              this.processLong = this.getTime(res.result.processLong);
-              this.closedLong = this.getTime(res.result.closeLong);
-              this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong);
-              this.draw();
-            }
-            else{
-              this.draw();
-            }
-          })
+        getAction(this.url.dayStatisticalRate,this.queryParams).then(res =>{
+          if(res.success){
+            this.StatCharOpeningRate = res.result.openRate;
+            this.StatCharUsedRate = res.result.utilizationRate;
+            this.UtilizationHeight = res.result.openRate;
+            this.StatCharUsedopeningRate = res.result.usedOpenRate;
+            this.StartupHeight = res.result.usedOpenRate;
+            this.openingLong = this.getTime(res.result.openLong)
+            this.waitingLong = this.getTime(res.result.waitLong);
+            this.processLong = this.getTime(res.result.processLong);
+            this.closedLong = this.getTime(res.result.closeLong);
+            this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong);
+            this.draw();
+          }
+        })
       },
       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) {
+      initEquipmentNode() {
         let _this = this
         getAction(this.url.getBaseTree).then((res) => {
           if (res.success) {
             if(res.result[0]){
               _this.$set(this.queryParam, 'tierName', res.result[0].title)
+              _this.$set(this.queryParams, 'parentId', res.result[0].key)
             }
+            this.queryStatistical()
             // console.log(res.result[0].entity.tierName)
-
           } else {
             // this.$message.warn(res.message)
             this.$notification.warning({
@@ -650,9 +637,13 @@
       },
       searchReset() {
         this.queryParam = {}
-        this.queryParams = {}
+        this.queryParams = {
+          collectTime:moment().add(-1,'d').format('YYYY-MM-DD'),
+          dateTime:moment().add(-1,'d').format('YYYYMMDD')
+        }
+        this.initEquipmentNode()
         // this.dates = []
-        this.queryStatistical()
+        // this.queryStatistical()
         // this.onClearSelected()
       },
       searchQuery(){
@@ -667,18 +658,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