From 301df333c4dc0c28cee67a8579784bd1c3b85abe Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期四, 22 二月 2024 15:07:51 +0800
Subject: [PATCH] 1、标准加工时间页面取消按照时间查询 2、设备利用率、设备开动率以及班次利用率页面查询区域日期被删除后因查询不到数据时表格中不会出现任何数据且无提示,故增加提示及禁止删除日期 3、设备综合效率分析页面和设备加工工件报表页面时间被手动清空与点击重置按钮清空后的查询条件不同,调整为时间为空时则查询除时间限定内所有数据 4、利用率走势分析、利用率分段分析以及报警分析页面简化页面查询功能,禁止删除日期 5、优化假期管理、加工数量管理以及合格率管理页面手动清空日期后无法正常查询数据 6、统计分析与统计图表页面调整重置按钮功能为重置名称为第一级车间以及日期为当日前一天,且无法手动清空日期 7、对比分析页面调整重置按钮功能为重置日期为当日前一周,且无法手动清空日期

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

diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
index ecbcaae..b65eec2 100644
--- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
+++ b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
@@ -11,7 +11,7 @@
           </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="2" :sm="2" :xs="2">
@@ -20,12 +20,6 @@
               <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
             </a-space>
           </a-col>
-          <!--<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">-->
-            <!--<a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>-->
-          <!--</a-col>-->
         </a-row>
       </a-form>
     </div>
@@ -97,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{
@@ -136,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);
     },
 
@@ -595,45 +579,38 @@
         StartupLine.setOption(StartupLine_option);
       },
       queryStatistical(){
-        if(this.queryParams.collectTime){
-          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();
-            }
-          })
-        }else{
-          this.$notification.warning({
-            message:'娑堟伅',
-            description:'璇烽�夋嫨鏃堕棿'
-          })
-        }
+        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 = "";
         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({
@@ -660,7 +637,11 @@
       },
       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.onClearSelected()

--
Gitblit v1.9.3