From 2ec95b3d2fd484b44d5274054bcbd78307a76ef8 Mon Sep 17 00:00:00 2001
From: mark <mark18340872469@163.com>
Date: 星期五, 30 九月 2022 14:04:12 +0800
Subject: [PATCH] 报警推送日志

---
 src/views/dataPush/components/point.vue |   58 ++++++++++++++++++++++++++++------------------------------
 1 files changed, 28 insertions(+), 30 deletions(-)

diff --git a/src/views/dataPush/components/point.vue b/src/views/dataPush/components/point.vue
index 9b502a5..9eff25f 100644
--- a/src/views/dataPush/components/point.vue
+++ b/src/views/dataPush/components/point.vue
@@ -10,7 +10,6 @@
 
       <div class="right">
         <div class="button searchBtn" @click="checkCamerasList(1)">鎼滅储</div>
-        <!-- <div class="button resetBtn" @click="reset">閲嶇疆</div> -->
       </div>
     </div>
     <div class="btns">
@@ -19,13 +18,16 @@
         <span>娣诲姞鐐逛綅</span>
       </div>
       <div class="switchBox">
+        鎬荤偣浣嶅紑鍏�
         <el-switch
           v-model="value1"
           width="60"
+          active-color="#13ce66"
+          inactive-color="#f0f3f5"
           @change="changeAll($event)"
-          active-text="鎬荤偣浣嶅紑"
-          inactive-text="鎬荤偣浣嶅叧"
         >
+          <!-- active-text="鎬荤偣浣嶅紑"
+          inactive-text="鎬荤偣浣嶅叧" -->
         </el-switch>
       </div>
     </div>
@@ -89,7 +91,7 @@
       class="add-ruleForm"
     >
       <el-form-item label="鐐逛綅鍚嶇О" prop="CameraName">
-        <el-select style="width: 350px" v-model="ruleForm.CameraName" placeholder="璇烽�夋嫨">
+        <el-select filterable style="width: 350px" v-model="ruleForm.CameraName" placeholder="璇烽�夋嫨">
           <el-option v-for="item in cameraOptions" :key="item.id" :label="item.name" :value="item.name"> </el-option>
         </el-select>
       </el-form-item>
@@ -150,13 +152,16 @@
 
 <script>
 import { getLocalCameraTree } from "@/api/area"
-import { traverse } from "./point"
 import { getClusterDevList } from "@/api/clusterManage"
 import { camerasList, camerasCreate, camerasConfig, camerasSwitch, camerasUpdate, camerasDelete } from "@/api/report"
-import "./point.scss"
+import { traverse } from "./point/point"
+import "./point/point.scss"
+
 export default {
   data() {
     return {
+      activeColor: "",
+      inactiveColor: "#f0f3f5",
       value1: false,
       query: {},
       inputText: "", //杈撳叆妗嗗唴瀹�
@@ -239,6 +244,20 @@
       total: 0 //鎬绘暟,
     }
   },
+  // computed: {
+  //   // activeColor() {
+  //   //   return this.value1 ? "#13ce66" : "#f0f3f5"
+  //   // }
+  // },
+  // watch: {
+  //   value1: {
+  //     handler(newVal, oldVal) {
+  //       console.log(newVal, oldVal, "newVal, oldVal")
+  //       newVal ? (this.activeColor = "#13ce66") : (this.activeColor = "#f0f3f5")
+  //     },
+  //     deep: true
+  //   }
+  // },
   async created() {
     let query = { pageIndex: this.page, pageSize: this.size, keyword: this.inputText }
     this.query = query
@@ -250,7 +269,6 @@
 
   methods: {
     async changeAll(val) {
-      console.log(val)
       let enable
       val ? (enable = 1) : (enable = 0)
       let rsp = await camerasSwitch({ enable: enable })
@@ -263,7 +281,6 @@
       }
     },
     changeSwitch(val, row) {
-      console.log(val, row, "val, rowval, row")
       let params = {
         CameraName: row.cameraName,
         ChannelCode: row.channelCode,
@@ -279,7 +296,6 @@
         id: row.id
       }
       camerasUpdate(params).then((res) => {
-        console.log(res, "res")
         if (res && res.success) {
           this.$message({
             type: "success",
@@ -289,7 +305,6 @@
       })
     },
     editCameras(row) {
-      console.log(row, "row")
       this.tip = 2
       this.isShowAdd = true
       this.resetUser()
@@ -312,7 +327,6 @@
       // 鎬诲紑鍏�
       if (res && res.success) {
         res.data.enable === 0 ? (this.value1 = false) : (this.value1 = true)
-        console.log(this.value1)
       }
       let clusterId = ""
       let clusterReq = await getClusterDevList()
@@ -322,7 +336,6 @@
           clusterId = clusterReq.data.clusterList[0].cluster_id
         }
       }
-      console.log(clusterId)
       let camereReq = await getLocalCameraTree({ clusterId: clusterId })
       // 杩欎釜鏄� 娣诲姞鏃剁殑鐐逛綅 鏄粠鎽勫儚鏈洪〉闈� 鏉ョ殑
       let array = []
@@ -339,7 +352,6 @@
           if (this.tip !== 1) {
             // tip1 鏄坊鍔� 鍏朵粬鏄紪杈�
             let obj = this.cameraOptions.find((item) => item.name === this.ruleForm.CameraName)
-            console.log(obj, "dddddddd")
             let params = {
               CameraName: this.ruleForm.CameraName,
               ChannelCode: this.ruleForm.ChannelCode,
@@ -354,8 +366,8 @@
               updatedAt: this.ruleForm.updatedAt,
               id: this.ruleForm.id
             }
+            //  缂栬緫
             camerasUpdate(params).then((res) => {
-              console.log(res, "res")
               if (res && res.success) {
                 this.$message({
                   type: "success",
@@ -367,7 +379,6 @@
             })
           } else {
             let obj = this.cameraOptions.find((item) => item.name === this.ruleForm.CameraName)
-            console.log(obj, "dddddddd")
             let params = {
               CameraName: this.ruleForm.CameraName,
               ChannelCode: this.ruleForm.ChannelCode,
@@ -379,9 +390,8 @@
               Level: this.ruleForm.Level,
               Enable: this.ruleForm.Enable
             }
-            console.log(params, "paramsv")
+            // 鏂板缓
             camerasCreate(params).then((res) => {
-              console.log(res, "res")
               if (res && res.success) {
                 this.$message({
                   type: "success",
@@ -443,15 +453,6 @@
       this.ruleForm.Sceneslist = []
       this.ruleForm.StartTime = ""
       this.ruleForm.EndTime = ""
-
-      //   Scenes: "",
-      //   CameraId: "", // 鎽勫儚鏈篿d
-      //   Level: "",
-      //   Enable: false,
-      //   createdAt: "",
-      //   updatedAt: "",
-      //   id: ""
-      // }
     },
     goback() {
       this.isShowAdd = false
@@ -460,10 +461,7 @@
 }
 </script>
 
-//
-<style scoped lang="scss">
-//
-</style>
+<style scoped lang="scss"></style>
 <style scoped lang="scss">
 .sub-account {
   padding: 20px;

--
Gitblit v1.8.0