From 00212ed8e808fc7b76c04389224e65f27f074fb2 Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期五, 26 四月 2024 15:30:04 +0800
Subject: [PATCH] su

---
 src/views/sampling/sampling/index.vue |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/views/sampling/sampling/index.vue b/src/views/sampling/sampling/index.vue
index ad3b730..db6e314 100644
--- a/src/views/sampling/sampling/index.vue
+++ b/src/views/sampling/sampling/index.vue
@@ -380,7 +380,7 @@
   },
   created() {
     // this.getNowTime();
-    this.getList();
+   
     this.getdate();
   },
   mounted() {
@@ -395,7 +395,7 @@
           moment(res.data).format("YYYY-MM-DD 00:00:00"),
           moment(res.data).format("YYYY-MM-DD 23:59:00"),
         ];
-        console.log(this.createTimeList, 111);
+        this.getList();
       });
     },
     handleSizeChange(val) {
@@ -433,8 +433,14 @@
     getList() {
       this.loading = true;
       this.queryParams.isSignFor = this.tjStatus;
-      this.queryParams.beginTime = this.createTimeList[0];
+      if(this.createTimeList){
+        this.queryParams.beginTime = this.createTimeList[0];
       this.queryParams.endTime = this.createTimeList[1];
+      }else if(this.createTimeList == null){
+        this.queryParams.beginTime = null;
+      this.queryParams.endTime = null;
+      }
+     
       getList(this.queryParams).then((response) => {
         if (response.data) {
           if (response.data.list == null) {
@@ -488,7 +494,7 @@
       this.resetForm("form");
     },
     hb() {
-      console.log(this.queryParams.tjNum);
+      // console.log(this.queryParams.tjNum);
       if (this.queryParams.tjNum != null) {
         this.handleQuery();
       }
@@ -500,6 +506,7 @@
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
     resetQuery() {
+      this.createTimeList=[]
       this.resetForm("queryForm");
       this.handleQuery();
     },

--
Gitblit v1.8.0