From d939d095aa38879953884ea263eb45984b3876e7 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周六, 08 6月 2024 14:30:38 +0800
Subject: [PATCH] 优化界面

---
 iwara-scada-web/src/views/main/WorkPieceInfo/index.vue |   30 ++++++++++++++++++++++--------
 1 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/iwara-scada-web/src/views/main/WorkPieceInfo/index.vue b/iwara-scada-web/src/views/main/WorkPieceInfo/index.vue
index a568f2c..e66158e 100644
--- a/iwara-scada-web/src/views/main/WorkPieceInfo/index.vue
+++ b/iwara-scada-web/src/views/main/WorkPieceInfo/index.vue
@@ -40,8 +40,7 @@
                 </a-select>
               </a-form-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="colMd" :sm="colSm">
+            <a-col :md="colMd" :sm="colSm">
                 <a-form-item label="宸ュ簭">
                   <a-select
                     allow-clear
@@ -55,17 +54,18 @@
                   </a-select>
                 </a-form-item>
               </a-col>
-
-              <a-col :md="colMd" :sm="colSm">
+              <a-col :md="colMd2" :sm="colSm2">
                 <a-form-item label="鍒濆涓婄嚎鏃堕棿">
                   <a-range-picker style="width:100%" :show-time="{format:'HH:mm'}" v-model="queryParam.dates" format="YYYY-MM-DD HH:mm" />
                 </a-form-item>
               </a-col>
-            </template>
+              
+            <!-- <template v-if="advanced">
+            </template> -->
             <a-col :md="colMd" :sm="colSm">
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="getData(1)">鏌ヨ</a-button>
-                <a-button style="margin-left: 8px" @click="() => (queryParam = {})">閲嶇疆</a-button>
+                <a-button style="margin-left: 8px" @click="resetQueryData">閲嶇疆</a-button>
                 <a @click="toggleAdvanced" style="margin-left: 8px">
                   {{ advanced ? '鏀惰捣' : '灞曞紑' }}
                   <a-icon :type="advanced ? 'up' : 'down'" />
@@ -108,7 +108,7 @@
 <script>
 // 鍦ㄥ埗鍝佺洃鎺�
 import { STable, XCard } from '@/components'
-import { downloadFile } from '@/utils/util'
+import { downloadFile,getThisWeekRange } from '@/utils/util'
 import moment from 'moment'
 import { WorkPieceInfoPage, WorkPieceInfoToExcel1 } from '@/api/modular/main/WorkPieceInfoManage'
 import editForm from './editForm.vue'
@@ -125,6 +125,8 @@
       gutter: 36,
       colMd: 6,
       colSm: 18,
+      colMd2: 10,
+      colSm2: 24,
       labelCol: {
         xs: { span: 24 },
         sm: { span: 8 }
@@ -134,7 +136,9 @@
         sm: { span: 15 }
       },
       advanced: false, // 楂樼骇鎼滅储 灞曞紑/鍏抽棴
-      queryParam: {},
+      queryParam: {
+        dates:[]
+      },
       columns: [
         {
           title: '搴忓彿',
@@ -232,11 +236,21 @@
   },
   created() {
     this.getEquipmentName()
+    this.initData();
     this.getData()
     this.ProcessSelectData = this.$options.filters['dictData']('process_type')
     this.QualityStateSelectData = this.$options.filters['dictData']('quality_state')
   },
   methods: {
+    initData(){
+      this.queryParam.dates = [];
+      this.queryParam.dates = getThisWeekRange();
+    },
+     //閲嶇疆
+    resetQueryData(){
+      this.queryParam = { dates:[] }
+      this.initData();
+    },
     getRowBackGround(record) {
       switch (
         record.cololType // 杩欓噷鏍规嵁鏉′欢鏀瑰彉琛ㄦ牸鑳屾櫙鑹�

--
Gitblit v1.9.3