浏览代码

监控增加搜索

彭宇 2 年之前
父节点
当前提交
5bc120d830
共有 2 个文件被更改,包括 22 次插入1 次删除
  1. 1 1
      src/views/firespread.vue
  2. 21 0
      src/views/monitor.vue

+ 1 - 1
src/views/firespread.vue

@@ -220,7 +220,7 @@
         sendDeptId: null,//签收部门/发起部门
         sendDeptName: null,//签收部门/发起部门
         sendEventType: null,//事件类型
-        sendHuoZaiBanJing: null,//火灾报告
+        sendHuoZaiBanJing: 0,//火灾报告
         sendGuanLianYuAn: null,//关联预案
         sendUserFegin: [],//联系人
         sendTaskSource: null,//任务来源

+ 21 - 0
src/views/monitor.vue

@@ -106,6 +106,14 @@
               <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
             </div>
             <div class="i-list-con h-43">
+              <el-input
+                v-model="rightDeptName"
+                placeholder="请输入摄像头名称"
+                clearable
+                size="small"
+                prefix-icon="el-icon-search"
+                style="margin-bottom: 20px"
+              />
               <div class="d-l-con" v-for="(item,index) in visuForestCloudCameraBOList"
                    :class="{on:listCurrentIndex2 == index}"
                    v-on:click="dropLocation(item.latitude,item.longitude,index)">
@@ -209,6 +217,9 @@ export default {
   },
   data() {
     return {
+      //摄像头名称
+      rightDeptName: undefined,
+      visuForestCloudCameraBOListSearch:[],
       // 部门名称
       deptName: undefined,
 // 部门树选项
@@ -259,6 +270,14 @@ export default {
     // 根据名称筛选部门树
     deptName(val) {
       this.$refs.tree.filter(val)
+    },
+    rightDeptName(val){
+      this.visuForestCloudCameraBOListSearch=[];
+      for (let i in this.visuForestCloudCameraBOList) {
+        if(this.visuForestCloudCameraBOList[i].cameraName.indexOf(val) != -1){
+          this.visuForestCloudCameraBOListSearch.push(this.visuForestCloudCameraBOList[i]);
+        }
+      }
     }
   },
   methods: {
@@ -399,6 +418,7 @@ export default {
         }
 
         that.visuForestCloudCameraBOList = res.data.visuForestCloudCameraBOList
+        that.visuForestCloudCameraBOListSearch = res.data.visuForestCloudCameraBOList
         if (res.data.visuForestCloudCameraBOList != null && res.data.visuForestCloudCameraBOList
           .length > 0) {
           for (let i = 0; i < res.data.visuForestCloudCameraBOList.length; i++) {
@@ -493,6 +513,7 @@ export default {
       selectCameraByDeptId(depId).then(res => {
         //根据设备类型查看列表
         that.visuForestCloudCameraBOList = res.data
+        that.visuForestCloudCameraBOListSearch = res.data
         if (res.data != null && res.data.length > 0) {
           for (let i = 0; i < res.data.length; i++) {
             let markersMap = {