From 284ae5b9ff466a9b0cd6be7eed2aefa765feee6f Mon Sep 17 00:00:00 2001
From: cqf <2252655793@qq.com>
Date: 星期四, 26 五月 2022 13:43:28 +0800
Subject: [PATCH] 隐患汇总跳转查询优化

---
 src/views/summaryPotentialSafetyHzards/index.vue |   32 +++++++-------------------------
 1 files changed, 7 insertions(+), 25 deletions(-)

diff --git a/src/views/summaryPotentialSafetyHzards/index.vue b/src/views/summaryPotentialSafetyHzards/index.vue
index ee4a106..43c0d9a 100644
--- a/src/views/summaryPotentialSafetyHzards/index.vue
+++ b/src/views/summaryPotentialSafetyHzards/index.vue
@@ -98,6 +98,7 @@
                             v-model="time"
                             type="daterange"
                             range-separator="至"
+                            value-format="yyyy-MM-dd"
                             start-placeholder="开始日期"
                             end-placeholder="结束日期">
                         </el-date-picker>
@@ -208,6 +209,7 @@
             YHJBList: [],
             YHZTList: [],
             loading: false,
+            searchData:{},
             startDate: "",
             endDate: "",
         }
@@ -334,6 +336,8 @@
             }
             selectData.push(timeSearchCloumn)
             requestData.query_condition = selectData;
+            this.searchData = requestData;
+            console.log(this.searchData)
             this.loading = true;
             danger_summary(requestData).then(res => {
                 this.loading = false;
@@ -381,31 +385,9 @@
         },
 
         showYHList(row, item) {
-            var searchData = {};
-            console.log(item)
-            if (item.x_label != null && item.x_label != "合计") {
-                searchData[this.form.x_axis] = item.x_label;
-            }
-            if (row.y_label != null && row.y_label != "合计") {
-                searchData[this.form.y_axis] = row.y_label;
-            }
-            let requestData = {};
-            let selectData = []
-            for (const queryElement in this.form) {
-                if (queryElement != "x_axis" && queryElement != "y_axis") {
-                    if (this.form[queryElement] != null && this.form[queryElement] != '') {
-                        let searchCloumn = {
-                            "field": queryElement,
-                            "value": this.form[queryElement].join(','),
-                            "type": "IN"
-                        }
-                        selectData.push(searchCloumn);
-                    }
-                } else {
-                    requestData[queryElement] = this.form[queryElement];
-                }
-            }
-            searchData.query_condition = selectData;
+            var searchData = this.searchData;
+            searchData.x_label = item.x_label;
+            searchData.y_label = row.y_label;
             this.$router.push({
                 path: "/summaryList",
                 query: {"searchData": searchData}

--
Gitblit v1.9.2