From 56189c90cc03b0dbe38594bec13c378e52bde4ea Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 09 9月 2024 13:47:02 +0800
Subject: [PATCH] 查询时间优化

---
 yiqi_iwara-scada-web/public/config.js                                 |    4 ++--
 yiqi_iwara-scada-web/src/views/main/WorkPieceOutboundRecord/index.vue |   18 ++++++++++++++++--
 yiqi_iwara-scada-web/src/views/main/WorkPieceOutbound/index.vue       |   17 +++++++++++++++--
 3 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/yiqi_iwara-scada-web/public/config.js b/yiqi_iwara-scada-web/public/config.js
index b072eea..f6ddba0 100644
--- a/yiqi_iwara-scada-web/public/config.js
+++ b/yiqi_iwara-scada-web/public/config.js
@@ -1,2 +1,2 @@
-window.VUE_BASE_URL = 'http://localhost:7788'
-//window.VUE_BASE_URL = 'http://192.168.216.203:7788'
+//window.VUE_BASE_URL = 'http://localhost:7788'
+window.VUE_BASE_URL = 'http://192.168.216.203:7788'
diff --git a/yiqi_iwara-scada-web/src/views/main/WorkPieceOutbound/index.vue b/yiqi_iwara-scada-web/src/views/main/WorkPieceOutbound/index.vue
index ae62d89..8241a77 100644
--- a/yiqi_iwara-scada-web/src/views/main/WorkPieceOutbound/index.vue
+++ b/yiqi_iwara-scada-web/src/views/main/WorkPieceOutbound/index.vue
@@ -31,7 +31,7 @@
             <a-col :md="colMd" :sm="colSm">
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="$refs.table.refresh(true)">鏌ヨ</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'" />
@@ -74,6 +74,7 @@
 <script>
 import { STable } from '@/components'
 import moment from 'moment'
+import { downloadFile,getThisWeekRange } from '@/utils/util'
 import { WorkPieceOutboundPage, WorkPieceOutboundRevoke } from '@/api/modular/main/WorkPieceOutboundManage'
 import addForm from './addForm.vue'
 import editForm from './editForm.vue'
@@ -97,7 +98,9 @@
         sm: { span: 15 }
       },
       advanced: false, // 楂樼骇鎼滅储 灞曞紑/鍏抽棴
-      queryParam: {},
+      queryParam: {
+        dates:[],
+      },
       columns: [
       {
             title: '搴忓彿',
@@ -176,9 +179,19 @@
         scopedSlots: { customRender: 'action' }
       })
     }
+    this.initData();
   },
   methods: {
     moment,
+    initData(){
+      this.queryParam.dates = [];
+      this.queryParam.dates = getThisWeekRange();
+    },
+        //閲嶇疆
+  resetQueryData(){
+      this.queryParam = { dates:[] }
+      this.initData();
+    },
     /**
      * 鏌ヨ鍙傛暟缁勮
      */
diff --git a/yiqi_iwara-scada-web/src/views/main/WorkPieceOutboundRecord/index.vue b/yiqi_iwara-scada-web/src/views/main/WorkPieceOutboundRecord/index.vue
index 8d1e504..4e6bf6f 100644
--- a/yiqi_iwara-scada-web/src/views/main/WorkPieceOutboundRecord/index.vue
+++ b/yiqi_iwara-scada-web/src/views/main/WorkPieceOutboundRecord/index.vue
@@ -31,7 +31,7 @@
             <a-col :md="colMd" :sm="colSm">
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="$refs.table.refresh(true)">鏌ヨ</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'" />
@@ -60,6 +60,7 @@
 <script>
 import { STable } from '@/components'
 import moment from 'moment'
+import { downloadFile,getThisWeekRange } from '@/utils/util'
 import { WorkPieceOutboundRecordPage, WorkPieceOutboundRevoke } from '@/api/modular/main/WorkPieceOutboundManage'
 import addForm from './addForm.vue'
 import editForm from './editForm.vue'
@@ -83,7 +84,9 @@
         sm: { span: 15 }
       },
       advanced: false, // 楂樼骇鎼滅储 灞曞紑/鍏抽棴
-      queryParam: {},
+      queryParam: {
+        dates:[],
+      },
       columns: [
       {
             title: '搴忓彿',
@@ -162,9 +165,20 @@
       //   scopedSlots: { customRender: 'action' }
       // })
     }
+    this.initData();
   },
   methods: {
     moment,
+     
+    initData(){
+      this.queryParam.dates = [];
+      this.queryParam.dates = getThisWeekRange();
+    },
+        //閲嶇疆
+   resetQueryData(){
+      this.queryParam = { dates:[] }
+      this.initData();
+    },
     /**
      * 鏌ヨ鍙傛暟缁勮
      */

--
Gitblit v1.9.3