瀏覽代碼

0618修改问题

liuxing 1 年之前
父節點
當前提交
9de6c6864e

二進制
app/src/assets/images/dd-exp-fx.png


+ 43 - 11
app/src/components/Camera.vue

@@ -29,6 +29,13 @@
               :key="index"
             ></el-option>
           </el-select>
+          <el-input
+            placeholder="请输入设备名称"
+            v-model="filterText"
+            clearable
+            style="margin-top: 5px"
+          >
+          </el-input>
           <div class="tree-container">
             <el-tree
               class="carema-tree"
@@ -38,6 +45,7 @@
               :expand-on-click-node="true"
               ref="tree"
               @node-click="handleNodeClick"
+              :filter-node-method="filterNode"
               node-key="id"
             >
               <template slot-scope="{ node, data }">
@@ -93,8 +101,14 @@ export default {
       currentId: null,
       currentExpand: [],
       nodeParentAll: [],
+      filterText: null,
     };
   },
+  watch: {
+    filterText(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
   props: {
     id: {
       type: String,
@@ -112,12 +126,20 @@ export default {
       type: String,
       default: null,
     },
+    dataList: {
+      type: Array,
+      default: [],
+    },
   },
   mounted() {
     this.getData();
     this.getAreaList();
   },
   methods: {
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
     // 通过节点的key(这里使用的是数据中的code属性,node-key="code")获取并高亮显示指定节点,并展开其所有父级节点
     getAndExpandAll(nodeKey) {
       if (nodeKey) {
@@ -140,7 +162,7 @@ export default {
 
             // 将节点高亮显示
             this.$refs.tree.setCurrentKey(nodeKey);
-            this.handleNodeClick({ id: nodeKey })
+            this.handleNodeClick({ id: nodeKey });
           }
         });
       }
@@ -272,8 +294,17 @@ export default {
       }
       const res2 = await getDeviceList(deviceParam2);
       caremaData = caremaData.concat(res2.data.rows);
-      console.log(caremaData);
+      // 根据传入的过滤
+      console.log(this.dataList);
+      if (this.dataList && this.dataList.length > 0) {
+        caremaData = caremaData.filter((p) =>
+          this.dataList.find((k) => k.sbbm === p.sbbm)
+        );
+        console.log(caremaData);
+      }
+
       this.tmpData = caremaData;
+
       this.createTreeDate(caremaData);
       this.treeLoading = false;
     },
@@ -476,15 +507,6 @@ video {
   ::v-deep(.el-select) {
     width: 100%;
     height: 40px;
-    .el-input__inner {
-      border-radius: 0px;
-      font-size: 18px;
-      border: 0px;
-      color: #9bc3ff;
-      background: url("../assets/images/border.png") no-repeat;
-      background-size: 100% 100%;
-      background-color: transparent;
-    }
     .el-input__inner::placeholder {
       color: #9bc3ff;
     }
@@ -493,6 +515,16 @@ video {
     }
   }
 
+  ::v-deep(.el-input__inner) {
+    border-radius: 0px;
+    font-size: 18px;
+    border: 0px;
+    color: #9bc3ff;
+    background: url("../assets/images/border.png") no-repeat;
+    background-size: 100% 100%;
+    background-color: transparent;
+  }
+
   ::v-deep(.el-input.search-box-input) {
     .el-input__inner {
       border-radius: 0px;

+ 20 - 2
app/src/components/Map.vue

@@ -58,7 +58,7 @@
         :class="showType.indexOf('xfzKey') >= 0 ? 'selected' : ''"
         @click="changeType('xfzKey')"
       >
-        <img src="../assets/images/map-icon-119.png" />微消防站
+        <img src="../assets/images/map-icon-119.png" />微消防站
       </div>
       <div
         class="item"
@@ -74,7 +74,10 @@
         :class="showType.indexOf('xfcKey') >= 0 ? 'selected' : ''"
         @click="changeType('xfcKey')"
       >
-        <img src="../assets/images/map-icon-car.png" style="height: 15px;" />消防车
+        <img
+          src="../assets/images/map-icon-car.png"
+          style="height: 15px"
+        />消防车
       </div>
     </div>
     <div id="map-container"></div>
@@ -194,6 +197,21 @@ export default {
     },
   },
   mounted() {
+    if (this.data.showzhd) {
+      this.showType = [
+        "currentJzKey",
+        "xfscKey",
+        "trsyKey",
+        "xhsKey",
+        "szxhsKey",
+        "jzKey",
+        "xfzKey",
+        "jgKey",
+        "xfcKey",
+      ];
+    } else {
+      this.showType = ["currentJzKey"];
+    }
     this.getData();
   },
   methods: {

+ 6 - 1
app/src/views/Detail/components/Risklevel.vue

@@ -21,7 +21,12 @@
       >
         存在隐患数:
       </div>
-      <div class="level-btn2" @click="openModal('yhModal')" style="cursor: pointer">{{ yhList.length }} <span>个</span></div>
+      <div class="level-btn2" @click="openModal('yhModal')" style="cursor: pointer">
+        <template v-if="yhList.length > 0">
+          {{ yhList.length }} <span>个</span>
+        </template>
+        <span v-else>无</span>
+      </div>
     </div>
     <div class="level_bottom">
       <div class="code">

+ 1 - 1
app/src/views/Detail/components/VideoInfo.vue

@@ -4,7 +4,7 @@
     <div v-if="caremaList && caremaList.length > 0" class="videos">
       <template v-for="(item, i) in caremaList">
         <div class="video" :key="i" v-if="i < 4">
-          <Camera :id="item.sbbm" :byList="caremaList" />
+          <Camera :id="item.sbbm" :byList="caremaList" :dataList="caremaList" />
         </div>
       </template>
     </div>

+ 21 - 12
app/src/views/Detail/components/YhModalContent.vue

@@ -76,7 +76,7 @@ export default {
   props: {
     qy: String,
     default: Object,
-    yhles:Array
+    yhles: Array,
   },
   watch: {
     default: {
@@ -102,7 +102,6 @@ export default {
       immediate: true,
       deep: true,
     },
-
   },
   methods: {
     funList() {
@@ -118,7 +117,7 @@ export default {
       if (this.params.zgjd) {
         params.zgjd = this.params.zgjd.join(",");
       }
-      console.log(this.params)
+      console.log(this.params);
       if (this.params.zgsxStr) {
         // 计算
         let endTime = null;
@@ -136,7 +135,7 @@ export default {
           endTime = "2025-12-31";
         }
 
-        params.zgsx = moment().format("yyyy-MM-DD") + ',' + endTime;
+        params.zgsx = moment().format("yyyy-MM-DD") + "," + endTime;
       }
       if (this.params.fxdjYs) {
         params.fxdjYs = this.params.fxdjYs;
@@ -144,7 +143,7 @@ export default {
         params.fxdjYs = null;
       }
       if (this.params.gcjzmc) {
-        params.gcjzmc = this.params.gcjzmc
+        params.gcjzmc = this.params.gcjzmc;
       } else {
         params.gcjzmc = null;
       }
@@ -318,19 +317,19 @@ export default {
           </el-form-item>
           <!-- 建筑名称 -->
           <el-form-item>
-            <div class="inp">
+            <div class="inp" style="margin-left: 0">
               <el-input
                 v-model="params.gcjzmc"
-                placeholder="建筑名称(模糊)"
+                placeholder="建筑名称"
               ></el-input>
             </div>
           </el-form-item>
+          <el-form-item>
+            <el-button @click="funList">搜索</el-button>
+            <el-button @click="resetForm">重置</el-button>
+          </el-form-item>
         </el-form>
       </div>
-      <div class="btn-item">
-        <el-button @click="funList">搜索</el-button>
-        <el-button @click="resetForm">重置</el-button>
-      </div>
     </div>
 
     <basic-table :data="tableData" style="text-align: center">
@@ -535,7 +534,7 @@ export default {
     //下拉框
   }
   /deep/.el-input {
-    width: 150px;
+    width: 200px;
     // margin-left: 20px;
   }
   .header {
@@ -595,6 +594,7 @@ export default {
 }
 .form {
   flex-grow: 1;
+  flex-wrap: wrap;
   width: 80%;
   display: flex;
 }
@@ -656,4 +656,13 @@ export default {
   background: rgba(0, 213, 255, 0.3);
   opacity: 0.7;
 }
+
+::v-deep(.el-select__tags) {
+  max-width: 200px !important;
+  height: 30px;
+  overflow: hidden;
+  .el-tag {
+    max-width: 120px !important;
+  }
+}
 </style>

+ 40 - 17
app/src/views/Home/components/HiddenDangerDetection/pcNum.vue

@@ -8,36 +8,59 @@
           <span>排查总数</span>
           <hidden-danger-total :number="list.ypclds" label="" unit="栋" />
         </div>
-        <div class="hidden-danger-detection_top_inner">
+        <div class="hidden-danger-detection_top_inner" @click="openModal(null)" style="cursor: pointer;">
           <span>发现隐患总数</span>
           <hidden-danger-total :number="allNum" label="" unit="栋/条" />
         </div>
-        <div class="hidden-danger-detection_top_inner">
+        <div class="hidden-danger-detection_top_inner" @click="openModal(['已整改'])" style="cursor: pointer;">
           <span>已整改数</span>
-          <hidden-danger-total :number="yzgsNum" label="" unit="栋/条" />
+          <hidden-danger-total :number="yzgsNum" label="" unit="栋/条"  />
         </div>
-        <div class="hidden-danger-detection_top_inner">
+        <div class="hidden-danger-detection_top_inner" @click="openModal(['待计划整改', '已计划待整改'])" style="cursor: pointer;">
           <span>未整改数</span>
           <hidden-danger-total :number="wzgsNum" label="" unit="栋/条" />
         </div>
       </div>
     </div>
+
+    <!-- 一楼一策弹窗 -->
+    <basic-modal top="120px" ref="yhModal" name="“一楼一策”隐患整治清单">
+      <YhModalContent :default="params" />
+    </basic-modal>
   </div>
 </template>
 
 <script>
 import HiddenDangerTotal from "@/components/HiddenDangerTotal.vue";
+import YhModalContent from "../../../Detail/components/YhModalContent.vue";
 export default {
-  components: { HiddenDangerTotal },
-  props:{
-    ScheduletList:Object,
-    list:Object,
-    pcdsNum:String,
-    allNum:String,
-    yzgsNum:String,
-    wzgsNum:String
+  components: { HiddenDangerTotal, YhModalContent },
+  props: {
+    ScheduletList: Object,
+    list: Object,
+    pcdsNum: String,
+    allNum: String,
+    yzgsNum: String,
+    wzgsNum: String,
+  },
+  data() {
+    return {
+      params: null,
+    };
+  },
+  methods: {
+    openModal(val) {
+      if (val) {
+        this.params = {
+          zgjd: val,
+        };
+      } else {
+        this.params = null;
+      }
+
+      this.showModal("yhModal");
+    },
   },
-  
 };
 </script>
 
@@ -49,10 +72,10 @@ export default {
   .hidden-danger-detection_top_inner {
     margin-top: 8px;
     text-align: center;
-    span{
-        display: inline-block;
-        margin-bottom: 10px;
-        margin-right: 60px;
+    span {
+      display: inline-block;
+      margin-bottom: 10px;
+      margin-right: 60px;
     }
   }
 }