From feaf0a9778879ef211c5587a513ba4cbdabb52d0 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期四, 23 六月 2022 17:42:58 +0800
Subject: [PATCH] bug修复

---
 src/pages/datapush/index/LeftList.vue |   64 +++++++++++++++++--------------
 1 files changed, 35 insertions(+), 29 deletions(-)

diff --git a/src/pages/datapush/index/LeftList.vue b/src/pages/datapush/index/LeftList.vue
index c4ee556..d0e15ec 100644
--- a/src/pages/datapush/index/LeftList.vue
+++ b/src/pages/datapush/index/LeftList.vue
@@ -1,26 +1,34 @@
 <template>
   <div class="out-div">
     <div class="flex-center left-list">
-      <el-input placeholder="璇疯緭鍏ュ唴瀹�" v-model="eventName" size="mini" style="width: 280px">
+      <el-input
+        @change="findAll"
+        placeholder="璇疯緭鍏ュ唴瀹�"
+        v-model="eventName"
+        size="mini"
+        style="width: 280px"
+      >
         <i slot="suffix" class="el-input__icon el-icon-search"></i>
       </el-input>
 
-      <div class="icon-btn" @click="add" style="margin-left:10px">
+      <div class="icon-btn" @click="add" style="margin-left: 10px">
         <i class="el-icon-circle-plus-outline"></i>
         <span>&nbsp;鏂板</span>
       </div>
     </div>
-    <div class="max-height" style="overflow-y:auto;overflow-x:hidden">
+    <div class="max-height" style="overflow-y: auto; overflow-x: hidden">
       <el-row
         class="cursor-pointer"
         v-for="(item, index) in eventList"
         :key="item.id"
         @click.native="clickCategory(index, item)"
-        :class="{activeRow:categoryIndex==index}"
+        :class="{ activeRow: categoryIndex == index }"
       >
         <div class="event-name">
-          <b>{{item.name}}</b>
-          <p style="margin-top:8px; color:#9e9e9e">{{item.time_start}} ~ {{item.time_end}}</p>
+          <b>{{ item.name }}</b>
+          <p style="margin-top: 8px; color: #9e9e9e">
+            {{ item.time_start }} ~ {{ item.time_end }}
+          </p>
         </div>
 
         <div class="event-btn">
@@ -29,11 +37,11 @@
             @change="enabled(item)"
             :inactive-value="false"
             :active-value="true"
-            style="margin-top:-5px"
+            style="margin-top: -5px"
           ></el-switch>
           <span
             class="iconfont iconshanchu iconStyle1"
-            style="color:#E74C3C"
+            style="color: #e74c3c"
             @click.stop="deleteBase(item)"
           ></span>
         </div>
@@ -49,24 +57,24 @@
   props: {
     listWidth: {
       default: "350px",
-      type: String
+      type: String,
     },
     title: {
       default: "",
-      type: String
+      type: String,
     },
     isSelected: {
       default: false,
-      type: Boolean
+      type: Boolean,
     },
     type: {
       default: "",
-      type: String
+      type: String,
     },
     activeId: {
       default: "",
-      type: String
-    }
+      type: String,
+    },
   },
   data() {
     return {
@@ -76,7 +84,7 @@
       // 褰撳墠鐐瑰嚮鐨勪簨浠跺璞�
       clickBase: {},
       // 浜嬩欢鍚嶇О
-      eventName: ""
+      eventName: "",
     };
   },
   mounted() {
@@ -86,12 +94,12 @@
     async enabled(item) {
       let json = {
         id: item.id,
-        enable: item.enable
+        enable: item.enable,
       };
       let res = await changeStatus(json);
       if (res && res.success) {
         // console.log(res, "鏇存柊鐘舵��");
-        this.$emit("enabled", item)
+        this.$emit("enabled", item);
       }
       // this.$emit("getEvents", item);
     },
@@ -122,27 +130,27 @@
       this.$confirm("纭畾瑕佸垹闄よ鏉℃帹閫佷换鍔″悧锛�", {
         center: true,
         cancelButtonClass: "comfirm-class-cancle",
-        confirmButtonClass: "comfirm-class-sure"
+        confirmButtonClass: "comfirm-class-sure",
       }).then(() => {
         let json = {
           type: "formData",
-          id: data.id
+          id: data.id,
         };
-        deleteByid(json).then(res => {
+        deleteByid(json).then((res) => {
           if (res && res.success) {
             this.$emit("del-list");
             this.$notify({
               type: "success",
-              message: "鍒犻櫎鎴愬姛"
-            })
+              message: "鍒犻櫎鎴愬姛",
+            });
           }
         });
-      })
+      });
     },
     // 鏌ヨ浜嬩欢鍒楄〃
     async findAll() {
       let json = {
-        name: this.eventName
+        name: this.eventName,
       };
       let res = await findAll(json);
       if (res && res.success) {
@@ -155,11 +163,9 @@
           });
         }
         this.eventList = res.data;
-
-
       }
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>
@@ -193,7 +199,7 @@
   padding-top: 20px;
   //height: 50em;
   .left-list {
-    min-width:340px;
+    min-width: 340px;
     position: absolute;
     left: 15px;
     top: 10px;

--
Gitblit v1.8.0