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/StatisticalAnalysis/StatisticalAnalysisMain.vue |   74 +++++++++++++++----------------------
 1 files changed, 30 insertions(+), 44 deletions(-)

diff --git a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue
index fb2e168..6185aa3 100644
--- a/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue
+++ b/src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.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>
@@ -94,14 +88,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: 'StatisticalAnalysisMain',
-    components:{
-      AFormItem
-
-    },
     props: { equip: {} },
     data(){
       return{
@@ -121,7 +110,7 @@
         dates: [],
         queryParam: {},
         queryParams:{
-          collectTime:undefined,
+          collectTime:null,
         },
         shiftSubList: [],
         shiftList: [],
@@ -133,11 +122,11 @@
       }
     },
     created(){
-      let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD');
-      this.queryParams.collectTime = collectTime;
-      this.queryParams.dateTime = this.queryParams.collectTime.format('YYYYMMDD')
+      // let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD');
+      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.queryStatistical();
       // this.getTime(37800);
     },
 
@@ -414,31 +403,24 @@
         StartupLine.setOption(statChartPieOption2);
       },
       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;
-              this.StatCharUsedopeningRate = res.result.StartupHeight;
-              this.StartupHeight = res.result.StartupHeight;
-              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) {
+            // console.log(res);
+            this.StatCharOpeningRate = res.result.openRate;
+            //鍒╃敤鐜�
+            this.StatCharUsedRate = res.result.utilizationRate;
+            //寮�鏈虹巼
+            this.UtilizationHeight = res.result.openRate;
+            this.StatCharUsedopeningRate = res.result.StartupHeight;
+            this.StartupHeight = res.result.StartupHeight;
+            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 = "";
@@ -454,7 +436,7 @@
             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)
             _this.queryStatistical()
           } else {
@@ -483,7 +465,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