From 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期三, 16 七月 2025 22:39:23 +0800
Subject: [PATCH] 添加时间筛选

---
 src/views/smoke/realTime/components/header/index.vue |   54 ++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 34 insertions(+), 20 deletions(-)

diff --git a/src/views/smoke/realTime/components/header/index.vue b/src/views/smoke/realTime/components/header/index.vue
index 89c38c6..47d5873 100644
--- a/src/views/smoke/realTime/components/header/index.vue
+++ b/src/views/smoke/realTime/components/header/index.vue
@@ -65,9 +65,10 @@
         </el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" @click="getUserList">鍒锋柊</el-button>
+        <el-button type="primary" @click="getList">鍒锋柊</el-button>
+        <el-button type="primary" @click="resetAll">閲嶇疆</el-button>
 
-        <el-button type="primary" @click="resetAll">瀵煎嚭</el-button>
+        <el-button type="primary" @click="exportTableData">瀵煎嚭</el-button>
       </el-form-item>
     </el-form>
   </div>
@@ -80,6 +81,20 @@
   data() {
     return {
       onlineStatusOptions: [
+        {
+          label: "姝e父",
+          value: 1,
+        },
+        {
+          label: "绂荤嚎",
+          value: 2,
+        },
+        {
+          label: "寮傚父绂荤嚎",
+          value: 3,
+        },
+      ],
+      statusOptions: [
         {
           label: "姝e父",
           value: "NORMAL",
@@ -99,20 +114,6 @@
         {
           label: "寮傚父绂荤嚎",
           value: "OFF",
-        },
-      ],
-      statusOptions: [
-        {
-          label: "姝e父",
-          value: 1,
-        },
-        {
-          label: "绂荤嚎",
-          value: 2,
-        },
-        {
-          label: "寮傚父绂荤嚎",
-          value: 3,
         },
       ],
       ownerOptions: [],
@@ -166,11 +167,23 @@
         .catch((err) => this.$message.error(err));
     },
 
-    getUserList() {
-      const ownerItem = this.ownerOptions[this.seachData.ownerIndex];
-      this.seachData.owner = ownerItem.Pid + ownerItem.Id;
-      console.log(this.seachData);
+    resetAll() {
+      this.seachData = {};
       this.$emit("getList", { seachData: this.seachData });
+    },
+    getList() {
+      if (this.seachData.ownerIndex !== undefined) {
+        const ownerItem = this.ownerOptions[this.seachData.ownerIndex];
+        this.seachData.owner = ownerItem.Pid + ownerItem.Id + "/";
+      }
+      this.$emit("getList", { seachData: this.seachData });
+    },
+    exportTableData() {
+      if (this.seachData.ownerIndex !== undefined) {
+        const ownerItem = this.ownerOptions[this.seachData.ownerIndex];
+        this.seachData.owner = ownerItem.Pid + ownerItem.Id + "/";
+      }
+      this.$emit("exportTable", { seachData: this.seachData });
     },
   },
 };
@@ -179,5 +192,6 @@
 <style lang="scss" scoped>
 .header {
   line-height: normal;
+  margin-left: 20px;
 }
 </style>

--
Gitblit v1.8.0