From a0654f2c21511a0e16b977427a563a3ccdfd1fba Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期二, 14 三月 2023 15:34:06 +0800
Subject: [PATCH] 搜索bug

---
 src/views/your/carInfo-manage/carInfoManage.vue |   51 ++++++++++++++++++++++++++++-----------------------
 1 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/src/views/your/carInfo-manage/carInfoManage.vue b/src/views/your/carInfo-manage/carInfoManage.vue
index 6328033..c6ddb9f 100644
--- a/src/views/your/carInfo-manage/carInfoManage.vue
+++ b/src/views/your/carInfo-manage/carInfoManage.vue
@@ -259,16 +259,15 @@
             key: "carNo",
             width: 120,
             render: (h, params) => {
-              return h("div",params.row.car.carNo);
+              return h("div",params.row.car.carNo=="undefined" ? '':params.row.car.carNo);
             }
           },
           {
             title: "鍔犳补鍗″彿",
             key: "addOilCode",
             width: 140,
-            sortable: true,
             render: (h, params) => {
-              return h("div",params.row.car.addOilCode);
+              return h("div",params.row.car.addOilCode=="undefined" ? '':params.row.car.addOilCode);
             }
           },
           {
@@ -289,20 +288,26 @@
               return h("div",params.row.endMileage-params.row.beginMileage);
             }
           },
-          {
-            title: "閫佽揣鎴锋暟",
-            key: "oilWear",
-            width: 130,
-          },
-          {
-            title: "閫佽揣閲�(浠�)",
-            key: "oilWear",
-            width: 130,
-          },
+          // {
+          //   title: "閫佽揣鎴锋暟",
+          //   // key: "oilWear",
+          //   width: 130,
+          // },
+          // {
+          //   title: "閫佽揣閲�(浠�)",
+          //   // key: "oilWear",
+          //   width: 130,
+          //   render: (h, params) => {
+          //     return h("div",0);
+          //   }
+          // },
           {
             title: "鏈堟补鑰�(鍗�)",
             key: "oilWear",
             width: 130,
+            render: (h, params) => {
+              return h("div",0);
+            }
           },
           {
             title: "鏈堢噧娌硅垂(鍏�)",
@@ -439,17 +444,18 @@
       },
       getDataList() {
         this.loading = true;
-        if (this.value[0]!="" && this.value[1]!=""){
+        if (this.value.length >0){
           this.searchForm.beginTime = this.selectDate(this.value[0]);
           this.searchForm.endTime = this.selectDate(this.value[1]);
-        }else{
-          var date = new Date();
-          this.searchForm.endTime = this.selectDate(date);
-          this.value[1] = this.searchForm.endTime;
-          date.setDate(1);
-          this.value[0] = date;
-          this.searchForm.beginTime = this.selectDate(date);
         }
+        // else{
+        //   var date = new Date();
+        //   this.searchForm.endTime = this.selectDate(date);
+        //   this.value[1] = this.searchForm.endTime;
+        //   date.setDate(1);
+        //   this.value[0] = date;
+        //   this.searchForm.beginTime = this.selectDate(date);
+        // }
         getCar(this.searchForm).then((res) => {
           this.loading = false;
           if (res.success) {
@@ -566,7 +572,6 @@
           title.push(e.title);
           key.push(e.key);
         });
-
 
         console.log(this.exportData)
         const params = {
@@ -954,4 +959,4 @@
       this.init();
     },
   };
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.1