Parcourir la source

Merge branch 'master' of http://113.204.105.114:10011/TwoKe/zhgkpt-datav

liuxing il y a 1 an
Parent
commit
b87fe79023

+ 9 - 0
app/src/api/iot.js

@@ -154,3 +154,12 @@ export function getXfwlw(params) {
     params,
   });
 }
+
+
+export function getChartMapData(params) {
+  return request({
+    url: "/system/xfwlw/qyfb/ldpm/list",
+    method: "get",
+    params,
+  });
+}

+ 4 - 4
app/src/assets/json/cq.json

@@ -6584,7 +6584,7 @@
       "type": "Feature",
       "properties": {
         "adcode": 500240,
-        "name": "石柱县",
+        "name": "石柱土家族自治县",
         "center": [108.112448, 29.99853],
         "centroid": [108.298494, 30.093676],
         "childrenNum": 0,
@@ -6831,7 +6831,7 @@
       "type": "Feature",
       "properties": {
         "adcode": 500241,
-        "name": "秀山县",
+        "name": "秀山土家族苗族自治县",
         "center": [108.996043, 28.444772],
         "centroid": [109.018121, 28.491722],
         "childrenNum": 0,
@@ -7021,7 +7021,7 @@
       "type": "Feature",
       "properties": {
         "adcode": 500242,
-        "name": "酉阳县",
+        "name": "酉阳土家族苗族自治县",
         "center": [108.767201, 28.839828],
         "centroid": [108.800321, 28.89987],
         "childrenNum": 0,
@@ -7296,7 +7296,7 @@
       "type": "Feature",
       "properties": {
         "adcode": 500243,
-        "name": "彭水县",
+        "name": "彭水苗族土家族自治县",
         "center": [108.166551, 29.293856],
         "centroid": [108.266309, 29.353956],
         "childrenNum": 0,

+ 5 - 3
app/src/components/HiddenDangerTotal.vue

@@ -21,17 +21,19 @@ export default {
 <template>
   <div class="hidden-danger-total">
     <div class="hidden-danger-total__number">
-      <linear-text :text="number" fontSize="22px"></linear-text>
+     <div style="display: flex; justify-content: space-around; align-items: center; width: 104px; margin-bottom: 5px;">
+      <linear-text :text="number" fontSize="22px" style="display: inline-block; margin-bottom: 15px; margin-left: 16px; width: 100%; text-align: left;"></linear-text>
       <linear-text
         :text="label"
         fontSize="12px"
-        style="font-family: 'YouSheBiaoTiHei'"
+        style="font-family: 'YouSheBiaoTiHei'; display: inline-block; "
       ></linear-text>
+     </div>
     </div>
     <linear-text
       :text="unit"
       fontSize="12px"
-      style="font-family: 'YouSheBiaoTiHei'"
+      style="font-family: 'YouSheBiaoTiHei';display: inline-block; margin-top: 10px; "
     ></linear-text>
   </div>
 </template>

+ 3 - 3
app/src/components/Maintenance3D.vue

@@ -311,7 +311,7 @@ function getPie3D(pieData, internalDiameterRatio) {
   series.push(labelSeries);
   // 准备待返回的配置项,把准备好的 legendData、series 传入。
   const option = {
-    color: ["#35C2FF", "#2FDE60", "#FBFF3D"],
+    color: ["#35C2FF", "#2FDE60", "#FBFF3D",'#EB5EF8' ],
     legend: {
       // type: "scroll",
       data: legendData,
@@ -374,8 +374,8 @@ function getPie3D(pieData, internalDiameterRatio) {
     grid3D: {
       show: false,
       boxHeight: 16,
-      top: "-17%",
-      left: "-16%",
+      top: "-15%",
+      left: "-17%",
       viewControl: {
         // 3d效果可以放大、旋转等,请自己去查看官方配置
         alpha: 27,

+ 2 - 2
app/src/components/Overhaul3D.vue

@@ -371,8 +371,8 @@ function getPie3D(pieData, internalDiameterRatio) {
     grid3D: {
       show: false,
       boxHeight: 16,
-      top: "-17%",
-      left: "-16%",
+      top: "-15%",
+      left: "-17%",
       viewControl: {
         // 3d效果可以放大、旋转等,请自己去查看官方配置
         alpha: 27,

+ 5 - 5
app/src/components/PieChart3D.vue

@@ -239,7 +239,7 @@ function getPie3D(pieData, internalDiameterRatio) {
           return `${params.value[3]}`;
       },
       color: '#fff',
-      fontSize: '18px'
+      fontSize: '14px'
     }
 };
 
@@ -307,7 +307,7 @@ function getPie3D(pieData, internalDiameterRatio) {
   series.push(labelSeries);
   // 准备待返回的配置项,把准备好的 legendData、series 传入。
   const option = {
-    color: ["#1162fe", "#3fc865", "#FF7A00", "#5ef8c9", "#5ed3f8", "#5e92f8"],
+    color: ["#1162fe", "#F4F85E", "#FF7A00", "#5ef8c9", "#FC2626", "#5e92f8"],
     legend: {
       data: ["有管理单位(物业)", "有管理单位(非物业)", "居民自主管理", "街道社区代管", "其他管理形式", "无管理主体"],
       icon: "roundRect",
@@ -338,7 +338,7 @@ function getPie3D(pieData, internalDiameterRatio) {
             params.seriesName
           }<br/><span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${
             params.color
-          };"></span>${option.series[params.seriesIndex].pieData.value}`;
+          };"></span>${option.series[params.seriesIndex].pieData?.value}`;
         }
         return "";
       },
@@ -369,8 +369,8 @@ function getPie3D(pieData, internalDiameterRatio) {
     grid3D: {
       show: false,
       boxHeight: 15,
-      top: "-17%",
-      left: "-16%",
+      top: "-15%",
+      left: "-17%",
       viewControl: {
         // 3d效果可以放大、旋转等,请自己去查看官方配置
         alpha: 27,

+ 26 - 4
app/src/utils/index.js

@@ -60,12 +60,34 @@ const citys = [
   "奉节县",
   "巫山县",
   "巫溪县",
-  "石柱县",
-  "秀山县",
-  "酉阳县",
-  "彭水县"
+  "石柱土家族自治县",
+  "秀山土家族苗族自治县",
+  "酉阳土家族苗族自治县",
+  "彭水苗族土家族自治县"
 ]
 
+// 向上取整
+export function formatInt (num, prec = 2, ceil = true) {
+  // num:数值;prec:向上取整多少位,默认为2位;ceil:true-向上,false-向下;
+  const len = String(num).length;
+  if (len <= prec) { return num }
+	const mult = Math.pow(10, prec);
+  return ceil ? Math.ceil(num / mult) * mult : Math.floor(num / mult) * mult;
+}
+/**
+ * 向上取正百数
+ * @param {*} num 
+ * @returns 
+ */
+export function toInt(num) {
+  if (num < 10) {
+    return 10;
+  } else {
+    const temp = `${num}`
+    return formatInt(temp, temp.length - 1)
+  }
+}
+
 export const formatCityData = (data) =>  {
   return citys.map(item => {
     let temp = data.find(i => i.name === item)

+ 1 - 1
app/src/views/Home/components/AutonomousManagement.vue

@@ -84,7 +84,7 @@ export default {
     <div class="autonomous-management_header">
       <button-group @change="change">
         <button-group-item> 管理形式 </button-group-item>
-        <button-group-item> 维护形式 </button-group-item>
+        <button-group-item> 消防设施维保形式 </button-group-item>
         <button-group-item>大修基金</button-group-item>
       </button-group>
     </div>

+ 15 - 2
app/src/views/Home/components/BasicInfoModalContent.vue

@@ -290,8 +290,13 @@ export default {
       </el-table-column>
       <el-table-column prop="wlw" label="物联网"> </el-table-column>
     </basic-table>
-    <br />
-    <basic-pagination
+    <!-- 分页 -->
+ <div class="custom-pagination">
+  <div class="info">
+        <span>共 {{ total }} 条记录</span>
+        <span>第 {{ params.pageNum }} / {{ params.pageSize }} 页</span>
+      </div>
+  <basic-pagination
       layout="->,prev, pager, next, sizes,jumper"
       :page-sizes="[10, 20, 50, 100]"
       :page-size="params.pageSize"
@@ -300,6 +305,7 @@ export default {
       @size-change="handleSizeChange"
       @current-change="handleCurrentChange"
     />
+ </div>
   </div>
 </template>
 
@@ -431,4 +437,11 @@ export default {
   justify-items: center;
   line-height: 59px;
 }
+.custom-pagination{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 12px;
+  font-size: 14px;
+}
 </style>

+ 5 - 5
app/src/views/Home/components/HiddenDangerDetection/HiddenDangerType.vue

@@ -5,7 +5,7 @@
       <span>单位:条</span>
     </div>
     <div @click="showYh" style="cursor: pointer">
-      <div ref="chart" class="item" style="width: 217px; height: 201px" />
+      <div ref="chart" class="item" style="width: 230px; height: 251px" />
     </div>
     <!-- 隐患 -->
     <basic-modal top="120px" ref="yhModal" name="“一楼一策”隐患整治清单">
@@ -71,7 +71,7 @@ export default {
         },
         legend: {
           show: true,
-          right: 20,
+          right: 30,
           bottom: 0,
           itemWidth: 10,
           itemHeight: 10,
@@ -88,7 +88,7 @@ export default {
           {
             name: "建筑总数",
             type: "pie",
-            center: ["45%", "45%"],
+            center: ["52%", "45%"],
             radius: ["35%", "50%"],
             avoidLabelOverlap: true,
             label: {
@@ -134,7 +134,7 @@ export default {
           },
           {
             type: "pie",
-            center: ["45%", "45%"],
+            center: ["52%", "45%"],
             radius: ["35%", "45%"],
             hoverAnimation: false,
             z: 10,
@@ -162,7 +162,7 @@ export default {
             type: "pie",
             zlevel: 4,
             silent: true,
-            center: ["45%", "45%"],
+            center: ["52%", "45%"],
             radius: ["55%", "56%"],
             label: {
               normal: {

+ 2 - 2
app/src/views/Home/components/HiddenDangerDetection/RectificationChart.vue

@@ -1,12 +1,12 @@
 <template>
   <div>
-    <div class="title">
+    <!-- <div class="title">
       <span>整改进度</span>
       <span>单位:条</span>
     </div>
     <div @click="showYh">
       <div ref="chart" class="item" style="width: 234px; height: 201px" />
-    </div>
+    </div> -->
     <!-- 隐患 -->
     <basic-modal top="120px" ref="yhModal" name="“一楼一策”隐患整治清单">
       <YhModalContent :default="yhModal" />

+ 25 - 25
app/src/views/Home/components/HiddenDangerDetection/index.vue

@@ -1,19 +1,21 @@
 <template>
   <div class="hidden-danger-detection">
-    <div class="hidden-danger-detection_top">
+    <!-- <div class="hidden-danger-detection_top">
       <div>按排查进度分:</div>
       <div class="hidden-danger-detection_top_inner">
         <hidden-danger-total :number="yhds" label="总数" unit="栋/次" />
         <hidden-danger-total :number="yhgs" label="隐患数" unit="栋/条" />
       </div>
-    </div>
+    </div> -->
     <div class="hidden-danger-detection_bottom">
       <div class="item">
-        <HiddenDangerType :yhType="yhType" />
+        <!-- <Rectification :ScheduletList="ScheduletList"/> -->
+        <pcNum :ScheduletList="ScheduletList" :list="list" :allNum="allNum" :pcdsNum="pcdsNum" />
       </div>
       <div class="item">
-        <Rectification :ScheduletList="ScheduletList"/>
+        <HiddenDangerType :yhType="yhType" />
       </div>
+    
     </div>
   </div>
 </template>
@@ -22,6 +24,7 @@
 import HiddenDangerTotal from "@/components/HiddenDangerTotal.vue";
 import HiddenDangerType from "./HiddenDangerType.vue";
 import Rectification from "./RectificationChart.vue";
+import pcNum from './pcNum.vue'
 import { getPcjd,getYhlx,getYhzt } from "@/api/index.js";
 export default {
   name: "HiddenDangerDetection",
@@ -29,6 +32,7 @@ export default {
     HiddenDangerTotal,
     HiddenDangerType,
     Rectification,
+    pcNum
   },
   props:{
     qy:String
@@ -39,8 +43,10 @@ export default {
       yhgs:'',
      yhType:[],
       ypclds:'',
-      list:[],
-      ScheduletList:[],
+      pcdsNum:'',
+      allNum:'',
+      list:{},
+      ScheduletList:{},
            // 传参
            params:{
         pageSize:100,
@@ -57,12 +63,16 @@ export default {
     }
   },
   methods:{
+    // .map(item=>{
+    //       this.yhds=item.yhds+'/'+item.yhgs
+    //       this.yhgs=item.ypclds+'/'+item.ypcldcs
+    //     })
     getNum(){
       getPcjd({...this.params,qy:this.qy==='重庆市'?'':this.qy}).then(res=>{
-        this.list=res.data.rows.map(item=>{
-          this.yhds=item.yhds+'/'+item.yhgs
-          this.yhgs=item.ypclds+'/'+item.ypcldcs
-        })
+        this.list=res.data.rows[0]
+        this.allNum=this.list.yhds+'/'+this.list.yhgs
+        this.pcdsNum=this.list.ypclds+'/'+this.list.ypcldcs
+        console.log('------list',this.list);
       })
     },
     // 隐患类型
@@ -96,21 +106,11 @@ export default {
       getYhzt({...this.params,qy:this.qy==='重庆市'?'':this.qy}).then(res=>{
         const data = res.data.rows[0];
         if (data) {
-          this.ScheduletList= [
-             {
-                value: data.djh,
-                name: "待计划整改",
-              },
-              {
-                value: data.dzg,
-                name: "已计划待整改",
-              },
-              {
-                value: data.yzg,
-                name: "已整改",
-              },
-          ]
+         this.ScheduletList.noUnm=data.djh+data.dzg
+         this.ScheduletList=data
         }
+        
+        console.log('=======《《进度',this.ScheduletList);
     })
     }
   },
@@ -140,7 +140,7 @@ export default {
   gap: 4px;
   .item {
     background-color: rgba(0, 213, 255, 0.12);
-    height: 231px;
+    height: 291px;
     &:nth-child(1) {
       width: 200px;
     }

+ 57 - 0
app/src/views/Home/components/HiddenDangerDetection/pcNum.vue

@@ -0,0 +1,57 @@
+<template>
+  <div>
+    <div>
+      <!-- <span>排查总数:</span> -->
+      <div class="hidden-danger-detection_top">
+        <!-- <div>按排查进度分:</div> -->
+        <div class="hidden-danger-detection_top_inner">
+          <span>排查总数</span>
+          <hidden-danger-total :number="list.ypclds" label="" unit="栋" />
+        </div>
+        <div class="hidden-danger-detection_top_inner">
+          <span>发现隐患总数</span>
+          <hidden-danger-total :number="allNum" label="" unit="栋/条" />
+        </div>
+        <div class="hidden-danger-detection_top_inner">
+          <span>已整改数</span>
+          <hidden-danger-total number="1000/100" label="" unit="栋/条" />
+        </div>
+        <div class="hidden-danger-detection_top_inner">
+          <span>未改数</span>
+          <hidden-danger-total number="1000/100" label="" unit="栋/条" />
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import HiddenDangerTotal from "@/components/HiddenDangerTotal.vue";
+export default {
+  components: { HiddenDangerTotal },
+  props:{
+    ScheduletList:Object,
+    list:Object,
+    pcdsNum:String,
+    allNum:String
+  },
+  
+};
+</script>
+
+<style lang="less" scoped>
+.hidden-danger-detection_top {
+  margin: 5px 4px;
+  background-color: rgba(0, 213, 255, 0.12);
+  padding: 8px;
+  .hidden-danger-detection_top_inner {
+    margin-top: 8px;
+    text-align: center;
+    span{
+        display: inline-block;
+        margin-bottom: 10px;
+        margin-right: 60px;
+    }
+  }
+}
+</style>

+ 33 - 108
app/src/views/Home/components/MapCharts.vue

@@ -6,6 +6,8 @@
 import * as echarts from "echarts";
 import jsonCq from "@/assets/json/cq.json";
 import toolUtils from "@/utils/echartsTooltip";
+import { toInt } from '@/utils'
+
 
 export default {
   name: "MapCharts",
@@ -65,6 +67,7 @@ export default {
       activeArea: "",
       activeName: "重庆市",
       activeMapData: [],
+      // 区块图
       heatData: [
         {
           name: "万州区",
@@ -203,19 +206,19 @@ export default {
           value: 0,
         },
         {
-          name: "石柱县",
+          name: "石柱土家族自治县",
           value: 0,
         },
         {
-          name: "秀山县",
+          name: "秀山土家族苗族自治县",
           value: 0,
         },
         {
-          name: "酉阳县",
+          name: "酉阳土家族苗族自治县",
           value: 0,
         },
         {
-          name: "彭水县",
+          name: "彭水苗族土家族自治县",
           value: 0,
         },
       ],
@@ -223,68 +226,6 @@ export default {
     };
   },
   watch: {
-    heatDataList(val, oldVal) {
-      let heatDataList = [
-        {
-          requiredid: 5001090000,
-          areaTitle: "沙坪坝",
-          value: 1,
-          longitude: 0,
-          latitude: 0,
-        },
-        {
-          requiredid: 5001090000,
-          areaTitle: "江北",
-          value: 5000,
-          longitude: 0,
-          latitude: 0,
-        },
-        {
-          requiredid: 5001090000,
-          areaTitle: "渝中",
-          value: 100000,
-          longitude: 0,
-          latitude: 0,
-        },
-        {
-          requiredid: 5001090000,
-          areaTitle: "大渡口",
-          value: 100000,
-          longitude: 0,
-          latitude: 0,
-        },
-        {
-          requiredid: 5001090000,
-          areaTitle: "九龙",
-          value: 100000,
-          longitude: 0,
-          latitude: 0,
-        },
-        {
-          requiredid: 5001090000,
-          areaTitle: "市辖区",
-          value: 1000000,
-          longitude: 0,
-          latitude: 0,
-        },
-      ];
-      // this.heatData = this.heatDataList.map((e) => {
-      //   // this.heatData = heatDataList.map((e) => {
-      //   return {
-      //     name: e.areaTitle,
-      //     // value: e.value ? e.value * 1000000 : 0,
-      //     value: e.value ? e.value : 0,
-      //   };
-      // });
-
-      this.drawMap();
-    },
-    isChangeMap(val, oldVal) {
-      if (val == false) {
-        this.heatData = [];
-        this.drawMap();
-      }
-    },
     qx(val) {
       this.mapChart.dispatchAction({
         type: "select",
@@ -301,7 +242,18 @@ export default {
               }
             ],
             visualMap: {
-              max: this.calcMaxData(val)
+              // max: this.calcMaxData(val),
+              pieces: (() => {
+                const maxData = this.calcMaxData(val)
+                const intData = toInt(Math.ceil(maxData / 5))
+                return [
+                  {min: intData*4, max: intData * 5},
+                  {min: intData*3, max: intData * 4},
+                  {min: intData*2, max: intData * 3},
+                  {min: intData, max: intData * 2},
+                  {min: 0, max: intData},
+                ]
+              })()
             }
           })
         }
@@ -326,36 +278,16 @@ export default {
   methods: {
     convertMapData(data) {
       const maxValue = (this.calcMaxData(data) / 5)
+      const intData = toInt(maxValue)
       return data.map(item => ({...item,
           label: {
-            color: item.value < maxValue * 3 ? '#000' : '#fff'
+            color: item.value < intData * 3 ? '#000' : '#fff'
           }
         }))
     },
     calcMaxData(data) {
       return Math.max(...data.map(item => item.value))
     },
-    convertData(data) {
-      let res = [];
-
-      data.forEach((e, i) => {
-        let geoCoord;
-
-        for (let k in this.mapData) {
-          if (e.name.indexOf(k) > -1) {
-            geoCoord = this.mapData[k];
-            if (geoCoord) {
-              res.push({
-                name: e.name,
-                value: geoCoord.concat(e.value),
-              });
-            }
-          }
-        }
-      });
-
-      return res;
-    },
     drawMap() {
       const mapChart = this.$refs.map;
       echarts.registerMap("chongqing", this.activeMap);
@@ -415,24 +347,7 @@ export default {
                 color: "#fff",
                 borderColor: "#32CBE0",
                 borderWidth: 1.5,
-                areaColor: {
-                  type: "linear-gradient",
-                  x: 0,
-                  y: 1,
-                  x2: 0,
-                  y2: 0,
-                  colorStops: [
-                    {
-                      offset: 0.5,
-                      color: "#0D59C1", // 0% 处的颜色
-                    },
-                    {
-                      offset: 1,
-                      color: "#53C9C7", // 100% 处的颜色
-                    },
-                  ],
-                  global: true, // 缺省为 false
-                },
+                areaColor: '#aaaaaa88'
               },
             },
           },
@@ -508,6 +423,17 @@ export default {
             color: "#fff",
             fontSize: 12,
           },
+          pieces: (() => {
+            const maxData = this.calcMaxData(data)
+            const intData = toInt(Math.ceil(maxData / 5))
+            return [
+              {min: intData*4, max: intData * 5},
+              {min: intData*3, max: intData * 4},
+              {min: intData*2, max: intData * 3},
+              {min: intData, max: intData * 2},
+              {min: 0, max: intData},
+            ]
+          })()
         },
         series: [
           {
@@ -599,7 +525,6 @@ export default {
       //
       this.mapChart.on("click", (params) => {
         if(params.seriesType === 'map'){
-          console.log("-------------------", params)
           if (params.name !== this.activeArea) {
             this.activeArea = params.name
             this.$emit('selectArea', params.name)

+ 25 - 9
app/src/views/Home/components/WisdomFire.vue

@@ -18,7 +18,7 @@
         <div class="build-num" style="background: none; margin-bottom: 10px">
           <div class="build">
             <span
-              >设备总数
+              >点位总数
               <span class="num">{{ iotList?.jrsbzs }}</span> 个
             </span>
             <span
@@ -26,7 +26,7 @@
               <span class="online">{{ iotList?.jrsbzxs }}</span>个
             </span>
             <span
-              >
+              >告
               <span class="warning">{{
                 iotList?.gjlds ? iotList?.gjlds : 0
               }}</span>个
@@ -35,12 +35,12 @@
         </div>
         <div>
           <span class="onlines on-line" style="margin: 0px 20px"> 在线</span>
-          <span class="offlines on-line">离线</span>
+          <span class="offlines on-line">告警</span>
         </div>
         <div class="pressure">
           <!-- 水压 -->
-          <div class="pressure-num">
-            <div class="pressure-bg">
+          <div class="pressure-num" @click="toIot('水压监测')">
+            <div class="pressure-bg" >
               {{ frieList.syzs ? frieList.syzs : 0
               }}<span style="margin-right: 1px"
                 ><span style="margin-right: 1px">/</span></span
@@ -49,7 +49,7 @@
               <div style="font-size: 12px; margin-top: 5px">个(栋)</div>
             </div>
 
-            <ul class="pressure-list">
+            <ul class="pressure-list" >
               <li style="font-size: 12px; margin: 6px 0 0 10px">
                 {{ listNum[0] }}
               </li>
@@ -68,7 +68,7 @@
                   <span class="unit" style="font-size: 12px">(个/栋)</span>
                 </span>
               </li>
-              <li class="pressure-line">
+              <li class="pressure-line" >
                 <!-- 离线 -->
                 <span class="offlines on-line"></span>
                 <!-- <img
@@ -87,7 +87,7 @@
             </ul>
           </div>
           <!--点气火灾  -->
-          <div class="pressure-num">
+          <div class="pressure-num" @click="toIot('电气火灾监测')">
             <div class="pressure-bg">
               {{ frieList.dqhzzs ? frieList.dqhzzs : 0
               }}<span style="margin-right: 1px">/</span>
@@ -133,7 +133,7 @@
             </ul>
           </div>
           <!-- 生命通道 -->
-          <div class="pressure-num">
+          <div class="pressure-num" @click="toIot('消防通道监测')">
             <div class="pressure-bg">
               {{ frieList.smtdzs ? frieList.smtdzs : 0
               }}<span style="margin-right: 1px">/</span>
@@ -181,22 +181,38 @@
         </div>
       </div>
     </div>
+    <basic-modal top="120px" ref="feirModal1" name="智慧消防">
+      <fxfbCont :qy="qy" :sbType="sbType" />
+    </basic-modal>
   </div>
 </template>
 
 <script>
+import fxfbCont from '../../Iot/components/fxfbCont.vue';
 export default {
   props: {
     frieList: Object,
     iotList: Object,
+    qy:String
   },
+components:{fxfbCont},
   data() {
     return {
       listNum: ["水压监测点位", "电气火灾监测点位", "生命通道监测点位"],
+      sbType:''
     };
   },
   mounted() {
   },
+  methods:{
+    openFrieModal1() {
+      this.showModal("feirModal1");
+    },
+    toIot(val){
+      this.sbType=val
+      this.showModal('feirModal1')
+    }
+  }
 };
 </script>
 

+ 4 - 10
app/src/views/Home/index.vue

@@ -38,8 +38,8 @@
       <border-panel height="311px" style="margin-bottom: 6px;  cursor: pointer; " header-cursor="pointer" title="风险预警" @click-header="openBasicModal">
         <RiskWarning :riskList="riskList"  />
       </border-panel>
-      <border-panel height="331px" style="margin-bottom: 6px; cursor: pointer;" title="智慧消防" @click="openFrieModal1" >
-        <WisdomFire :frieList="frieList" :iotList="iotList" />
+      <border-panel height="331px" style="margin-bottom: 6px; cursor: pointer;" title="智慧消防" >
+        <WisdomFire :frieList="frieList" :iotList="iotList" :qy="qy" />
       </border-panel>
       <border-panel height="298px" title="火灾指标">
         <FireIndex :type="fireIndexType" :qx="qy" />
@@ -51,9 +51,7 @@
     <basic-modal top="120px" ref="basicInfoModal" name="基础信息">
       <BasicInfoModalContent :qy="qy" />
     </basic-modal>
-    <basic-modal top="120px" ref="feirModal1" name="智慧消防">
-      <fxfbCont :qy="qy" />
-    </basic-modal>
+  
     <basic-modal top="120px" ref="autoManageModal"  name="自主管理">
       <zzglModul :qy="qy" />
     </basic-modal>
@@ -70,7 +68,6 @@ import WisdomFire from "./components/WisdomFire.vue";
 import FireIndex from "./components/FireIndex/index.vue";
 import BasicInfoModalContent from "./components/BasicInfoModalContent.vue";
 import SearchBox from '@/components/SearchBox.vue';
-import fxfbCont from '../Iot/components/fxfbCont.vue'
 import zzglModul from "./components/zzglModul.vue";
 import { totaldata,getJqdt,getZxgjtj ,getJrjzsbs} from "@/api/index.js";
 import { fxfb } from "@/api/risk";
@@ -90,7 +87,6 @@ export default {
     HiddenDangerDetection,
     FireIndex,
     BasicInfoModalContent,
-    fxfbCont,
     SearchBox,
     zzglModul
   },
@@ -159,9 +155,7 @@ export default {
         this.iotList=res.data.rows[0]
       })
     },
-    openFrieModal1() {
-      this.showModal("feirModal1");
-    },
+
     openAutoManageModal() {
       this.showModal("autoManageModal");
     },

+ 412 - 302
app/src/views/Iot/components/fxfbCont.vue

@@ -1,327 +1,437 @@
 <script>
-	import {
-		getGcjztjUnit
-	} from "@/api/index.js";
-	import {
-		getZhxf
-	} from "@/api/iot.js";
-	import {
-		area
-	} from "@/api/area";
-	import punishmentMixin from "@/mixin/unit.js";
-	export default {
-		name: "BasicInfoModalContent",
-		mixins: [punishmentMixin],
-		data() {
-			return {
-				gjzt:'',
-				zjjc:'',
-				options: [],
-				options1: [{
-						value: '火灾报警主机检测',
-						label: '火灾报警主机检测'
-					},
-					{
-						value: '物联网类型',
-						label: '物联网类型'
-					}
-				],
-				options2: [{
-						value: '在线',
-						label: '在线'
-					},
-					{
-						value: '离线',
-						label: '离线'
-					}
-				],
-				fxdjList: [],
-				tableData: [],
-				unitList: [],
-				value: "全市",
-				params: {
-					pageSize: 10,
-					pageNum: 1,
-				},
-				total: 0,
-				search: "",
-			};
-		},
-		props: {
-			qy: String,
-		},
-		watch: {
-			qy: {
-				handler(val) {
-					console.log('-----',val);
-					this.value = val;
-					this.funUnitList();
-					this.handUnitList();
-				},
-				immediate: true,
-				deep: true,
-			},
-		},
-		methods: {
-			rowClickHandler(val) {
-				// this.$router.push(`/detail?id=${val.id}`);
-			},
-			funUnitList() {
-				getZhxf({
-					qx: this.value === "重庆市" ? "" : this.value,
-					gcjzmc: this.search,
-					zt:this.gjzt,
-					sblx:this.zjjc,
-					...this.params,
-					
-				}).then((res) => {
-					this.tableData = res.data.rows;
-					this.total = res.data.total;
-				});
-			},
-			handleSizeChange(val) {
-				this.params.pageSize = val;
-				this.funUnitList();
-			},
-			handleCurrentChange(val) {
-				this.params.pageNum = val;
-				this.funUnitList();
-			},
-			handUnitList() {
-				getZhxf({
-					...this.params,
-					qy: this.value === "重庆市" ? "" : this.value,
-				}).then((res) => {
-					const list = res.data.rows[0];
-				});
-			},
-			resetForm() {
-				this.value = "";
-				this.search = "";
-				this.zjjc = '',
-				this.zt ='',
-				this.params = {
-						pageSize: 10,
-						pageNum: 1,
-					},
-					this.params.jcj  = "";
-				this.funUnitList();
-			},
-		},
-		created() {
-			this.funUnitList();
-			this.handUnitList();
-			area({
-				pageNum: 1,
-				pageSize: 100,
-			}).then((res) => {
-				this.options = res.data.rows;
-			});
-		},
-	};
+import { getGcjztjUnit } from "@/api/index.js";
+import { getZhxf } from "@/api/iot.js";
+import { area } from "@/api/area";
+import punishmentMixin from "@/mixin/unit.js";
+export default {
+  name: "BasicInfoModalContent",
+  mixins: [punishmentMixin],
+  data() {
+    return {
+      gjzt: "",
+      zjjc: "",
+      options: [],
+      options1: [
+        {
+          value: "水压检测",
+          label: "水压检测",
+        },
+        {
+          value: "电气火灾监测",
+          label: "电气火灾监测",
+        },
+        {
+          value: "消防通道监测",
+          label: "消防通道监测",
+        },
+        {
+          value: "火灾报警主机监测",
+          label: "火灾报警主机监测",
+        },
+        {
+          value: "消防控制室人员离岗监控",
+          label: "消防控制室人员离岗监控",
+        },
+      ],
+      // 设备状态
+      options2: [
+        {
+          value: "在线",
+          label: "在线",
+        },
+        {
+          value: "离线",
+          label: "离线",
+        },
+      ],
+      // 告警状态
+      DeviceStatusList: [
+        {
+          value: "消音,手动报警,查岗应答",
+          label: "消音,手动报警,查岗应答",
+        },
+        {
+          value: "压力下线报警,电源正常,无故障",
+          label: "压力下线报警,电源正常,无故障",
+        },
+        {
+          value: "压力上线报警",
+          label: "压力上线报警",
+        },
+        {
+          value: "火警",
+          label: "火警",
+        },
+        {
+          value: "停车侦测",
+          label: "停车侦测",
+        },
+        {
+          value: "人员离岗",
+          label: "人员离岗",
+        },
+        {
+          value: "机动车违停",
+          label: "机动车违停",
+        },
+        {
+          value: "区域内人数报警",
+          label: "区域内人数报警",
+        },
+      ],
+      fxdjList: [],
+      tableData: [],
+      unitList: [],
+      ywzt: [], //告警状态
+      sblx: "",
+      value: "全市",
+      params: {
+        pageSize: 10,
+        pageNum: 1,
+      },
+      total: 0,
+      search: "",
+    };
+  },
+  props: {
+    qy: String,
+    sbType: String,
+  },
+  watch: {
+    qy: {
+      handler(val) {
+        this.value = val;
+        this.funUnitList();
+        this.handUnitList();
+      },
+      immediate: true,
+      deep: true,
+    },
+    sbType: {
+      handler(val) {
+        this.sblx = val;
+        this.funUnitList();
+        this.handUnitList();
+      },
+      immediate: true,
+      deep: true,
+    },
+  },
+  methods: {
+    rowClickHandler(val) {
+      // this.$router.push(`/detail?id=${val.id}`);
+    },
+    funUnitList() {
+      getZhxf({
+        qx: this.value === "重庆市" ? "" : this.value,
+        gcjzmc: this.search,
+        zt: this.gjzt, //设备状态
+        sblx: this.sblx,
+        ywzt: this.ywzt, //告警状态
+        ...this.params,
+      }).then((res) => {
+        this.tableData = res.data.rows;
+        this.total = res.data.total;
+      });
+    },
+    handleSizeChange(val) {
+      this.params.pageSize = val;
+      this.funUnitList();
+    },
+    handleCurrentChange(val) {
+      this.params.pageNum = val;
+      this.funUnitList();
+    },
+    handUnitList() {
+      getZhxf({
+        ...this.params,
+        qy: this.value === "重庆市" ? "" : this.value,
+      }).then((res) => {
+        const list = res.data.rows[0];
+      });
+    },
+    resetForm() {
+      this.value = "";
+      this.search = "";
+      this.zjjc = "";
+      this.gjzt=''
+      this.sblx = "";
+      (this.params = {
+        pageSize: 10,
+        pageNum: 1,
+      }),
+        (this.params.jcj = "");
+      this.funUnitList();
+    },
+    changeSlet(node) {
+      console.log("-------状态", node);
+    },
+  },
+  created() {
+    this.funUnitList();
+    this.handUnitList();
+    area({
+      pageNum: 1,
+      pageSize: 100,
+    }).then((res) => {
+      this.options = res.data.rows;
+    });
+  },
+};
 </script>
 
 <template>
-	<div>
-		<!-- 搜索 -->
-		<div class="maintenance-supervision">
-			<div class="maintenance-supervision_header">
-				<div class="select-item">
-					<el-select v-model="value" placeholder="请选择">
-						<el-option :value="item.areaTitle" :label="item.areaTitle" v-for="(item, index) in options"
-							:key="index">
-						</el-option>
-					</el-select>
-				</div>
-				<div class="inp">
-					<el-input v-model="search" placeholder="请输入建筑名称"></el-input>
-				</div>
-				<div>
-					<el-select v-model="zjjc" placeholder="火灾报警主机检测">
-						<el-option :value="item.value" :label="item.label" v-for="(item, index) in options1"
-							:key="index">
-						</el-option>
-					</el-select>
-				</div>
-				<div>
-					<el-select v-model="gjzt" placeholder="告警状态">
-						<el-option :value="item.value" :label="item.lable" v-for="(item, index) in options2"
-							:key="index">
-						</el-option>
-					</el-select>
-				</div>
-				<div class="btn-item">
-					<el-button @click="funUnitList">搜索</el-button>
-					<el-button @click="resetForm">重置</el-button>
-				</div>
-			</div>
-		</div>
+  <div>
+    <!-- 搜索 -->
+    <div class="maintenance-supervision">
+      <div class="maintenance-supervision_header">
+        <div class="select-item">
+          <el-select v-model="value" placeholder="请选择" filterable>
+            <el-option
+              :value="item.areaTitle"
+              :label="item.areaTitle"
+              v-for="(item, index) in options"
+              :key="index"
+            >
+            </el-option>
+          </el-select>
+        </div>
+        <div class="inp">
+          <el-input v-model="search" placeholder="请输入建筑名称" ></el-input>
+        </div>
+        <div>
+          <el-select v-model="sblx" placeholder="火灾报警主机检测" filterable>
+            <el-option
+              :value="item.value"
+              :label="item.label"
+              v-for="(item, index) in options1"
+              :key="index"
+            >
+            </el-option>
+          </el-select>
+        </div>
+        <div>
+          <el-select v-model="gjzt" placeholder="设备状态">
+            <el-option
+              :value="item.value"
+              :label="item.lable"
+              v-for="(item, index) in options2"
+              :key="index"
+            >
+            </el-option>
+          </el-select>
+        </div>
+        <div>
+          <el-select
+            v-model="ywzt"
+            placeholder="告警状态"
+            multiple
+            filterable
+            @change="changeSlet"
+            style="height: 30px"
+          >
+            <el-option
+              :value="item.value"
+              :label="item.lable"
+              v-for="(item, index) in DeviceStatusList"
+              :key="index"
+            >
+            </el-option>
+          </el-select>
+        </div>
+        <div class="btn-item">
+          <el-button @click="funUnitList">搜索</el-button>
+          <el-button @click="resetForm">重置</el-button>
+        </div>
+      </div>
+    </div>
 
-		<basic-table :data="tableData" @row-click="rowClickHandler" style="text-align: center">
-			<el-table-column type="index" label="序号"> </el-table-column>
-			<el-table-column prop="qx" label="区域" show-overflow-tooltip>
-			</el-table-column>
-			<el-table-column prop="gcjzmc" label="建筑名称" show-overflow-tooltip>
-			</el-table-column>
-			<el-table-column prop="sblx" label="设备类型" show-overflow-tooltip>
-			</el-table-column>
-			<el-table-column prop="sbmc" label="设备名称" show-overflow-tooltip>
-			</el-table-column>
-			<el-table-column prop="wz" label="安装位置" show-overflow-tooltip>
-			</el-table-column>
-			<el-table-column prop="zt" label="设备状态"> </el-table-column>
-			<el-table-column prop="ywzt" label="告警状态" show-overflow-tooltip>
-			</el-table-column>
-			<el-table-column prop="cztt" label="处置状态" show-overflow-tooltip>
-			</el-table-column>
-		</basic-table>
-		<br />
-		<basic-pagination layout="->,prev, pager, next, sizes,jumper" :page-sizes="[10, 20, 50, 100]"
-			:page-size="params.pageSize" :current-page="params.PageNum" :total="total" @size-change="handleSizeChange"
-			@current-change="handleCurrentChange" />
-	</div>
+    <basic-table
+      :data="tableData"
+      @row-click="rowClickHandler"
+      style="text-align: center"
+    >
+      <el-table-column type="index" label="序号"> </el-table-column>
+      <el-table-column prop="qx" label="区域" show-overflow-tooltip>
+      </el-table-column>
+      <el-table-column prop="gcjzmc" label="建筑名称" show-overflow-tooltip>
+      </el-table-column>
+      <el-table-column prop="sblx" label="设备类型" show-overflow-tooltip>
+      </el-table-column>
+      <el-table-column prop="sbmc" label="设备名称" show-overflow-tooltip>
+      </el-table-column>
+      <el-table-column prop="wz" label="安装位置" show-overflow-tooltip>
+      </el-table-column>
+      <el-table-column
+        prop="jkz"
+        label="检测值"
+        show-overflow-tooltip
+        v-if="sblx == '电气火灾监测'"
+      >
+      </el-table-column>
+      <el-table-column prop="zt" label="设备状态"> </el-table-column>
+      <el-table-column prop="ywzt" label="告警状态" show-overflow-tooltip>
+      </el-table-column>
+      <el-table-column prop="cztt" label="处置状态" show-overflow-tooltip>
+      </el-table-column>
+    </basic-table>
+    <br />
+    <basic-pagination
+      layout="->,prev, pager, next, sizes,jumper"
+      :page-sizes="[10, 20, 50, 100]"
+      :page-size="params.pageSize"
+      :current-page="params.PageNum"
+      :total="total"
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+    />
+  </div>
 </template>
 
 <style scoped lang="less">
-	.maintenance-supervision {
+.maintenance-supervision {
+  // padding: 10px 10px 0px 20px;
+  ::v-deep(.el-input__inner) {
+    border: none;
+    background: linear-gradient(
+      360deg,
+      rgba(0, 148, 255, 0.5) 0%,
+      rgba(0, 148, 255, 0.31) 100%
+    );
+    color: #fff;
+  }
 
-		// padding: 10px 10px 0px 20px;
-		::v-deep(.el-input__inner) {
-			border: none;
-			background: linear-gradient(360deg,
-					rgba(0, 148, 255, 0.5) 0%,
-					rgba(0, 148, 255, 0.31) 100%);
-			color: #fff;
-		}
+  ::v-deep(.el-button) {
+    border: none;
+    background: linear-gradient(360deg, #0094ff90 0%, #0094ff10 100%);
+    color: #fff;
+  }
 
-		::v-deep(.el-button) {
-			border: none;
-			background: linear-gradient(360deg, #0094ff90 0%, #0094ff10 100%);
-			color: #fff;
-		}
+  .maintenance-supervision_header {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-around;
+    // border-bottom: 1px solid #154956;
+    padding-bottom: 10px;
+    font-size: 12px;
+    color: rgb(79, 149, 186);
+    // .select-item{
+    //   margin-right: 20px;
+    // }
+  }
 
-		.maintenance-supervision_header {
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: space-around;
-			// border-bottom: 1px solid #154956;
-			padding-bottom: 10px;
-			font-size: 12px;
-			color: rgb(79, 149, 186);
-			// .select-item{
-			//   margin-right: 20px;
-			// }
-		}
+  .btn-item {
+    margin-bottom: 10px;
+  }
 
-		.btn-item {
-			margin-bottom: 10px;
-		}
+  .warp {
+    height: 520px;
+    margin: 0 auto;
+    overflow: hidden;
 
-		.warp {
-			height: 520px;
-			margin: 0 auto;
-			overflow: hidden;
+    .item {
+      list-style: none;
+      padding: 0;
+      margin: 0 auto;
+      cursor: pointer;
+    }
+  }
 
-			.item {
-				list-style: none;
-				padding: 0;
-				margin: 0 auto;
-				cursor: pointer;
-			}
-		}
+  /deep/.el-input__inner {
+    background-color: #184254;
+    width: 165px;
+    height: 30px;
+    margin-bottom: 5px;
+  }
 
-		/deep/.el-input__inner {
-			background-color: #184254;
-			width: 150px;
-			height: 30px;
-			margin-bottom: 5px;
-		}
+  /deep/.el-button {
+    width: 100px;
+    height: 32px;
+    font-size: 14px;
+    line-height: 2px;
+    // margin: 0 20px 0 30px;
+    color: #fff;
+    border-radius: 5px;
+    border: none;
+  }
 
-		/deep/.el-button {
-			width: 100px;
-			height: 32px;
-			font-size: 14px;
-			line-height: 2px;
-			// margin: 0 20px 0 30px;
-			color: #fff;
-			border-radius: 5px;
-			border: none;
-		}
+  /deep/.el-button:hover {
+    color: rgb(80, 147, 224);
+  }
 
-		/deep/.el-button:hover {
-			color: rgb(80, 147, 224);
-		}
+  /deep/.select_btn {
+    position: absolute;
+    top: 225px;
+    right: 320px;
+    //下拉框
+  }
 
-		/deep/.select_btn {
-			position: absolute;
-			top: 225px;
-			right: 320px;
-			//下拉框
-		}
+  /deep/.el-input {
+    width: 165px;
+    // margin-left: 20px;
+  }
 
-		/deep/.el-input {
-			width: 150px;
-			// margin-left: 20px;
-		}
+  .header {
+    color: #fff;
+    height: 33px !important;
+    line-height: 33px !important;
+    background-color: rgba(0, 163, 255, 0.3) !important;
+    color: #61dbff;
+    margin-top: 15px;
+    margin-bottom: 6px;
+  }
 
-		.header {
-			color: #fff;
-			height: 33px !important;
-			line-height: 33px !important;
-			background-color: rgba(0, 163, 255, 0.3) !important;
-			color: #61dbff;
-			margin-top: 15px;
-			margin-bottom: 6px;
-		}
+  .row,
+  li,
+  a {
+    display: block;
+    height: 39px;
+    line-height: 39px;
+    margin-bottom: 4px;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    font-size: 16px;
+    background-color: rgba(0, 0, 0, 0.2);
 
-		.row,
-		li,
-		a {
-			display: block;
-			height: 39px;
-			line-height: 39px;
-			margin-bottom: 4px;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			font-size: 16px;
-			background-color: rgba(0, 0, 0, 0.2);
+    .time,
+    .num,
+    .person,
+    .result {
+      flex: 0.33;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
 
-			.time,
-			.num,
-			.person,
-			.result {
-				flex: 0.33;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-			}
+    .num {
+      flex: 0.15;
+    }
+  }
 
-			.num {
-				flex: 0.15;
-			}
-		}
+  .inp {
+    margin-left: 20px;
+  }
+}
 
-		.inp {
-			margin-left: 20px;
-		}
-	}
+.unit-bulid {
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 20px;
+  font-size: 18px;
+}
 
-	.unit-bulid {
-		display: flex;
-		justify-content: space-between;
-		margin-bottom: 20px;
-		font-size: 18px;
-	}
-
-	.unit-num {
-		width: 200px;
-		height: 109px;
-		border: 1px solid #0463a7;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-items: center;
-		line-height: 59px;
-	}
-</style>
+.unit-num {
+  width: 200px;
+  height: 109px;
+  border: 1px solid #0463a7;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-items: center;
+  line-height: 59px;
+}
+/deep/.el-input__inner {
+  height: 30px;
+}
+</style>

+ 16 - 3
app/src/views/Iot/index.vue

@@ -49,7 +49,7 @@
         title="区域分布"
         @click="openBasicModal1"
       >
-        <RegionalDistribution @selectData="selectData" :qx="qx" />
+        <RegionalDistribution  :qx="qx" />
       </border-panel>
       <border-panel
         height="469px"
@@ -78,7 +78,7 @@ import MapCharts from "../Home/components/MapCharts.vue";
 import SearchBox from "../../components/SearchBox.vue";
 import xfwlw from "./components/xfwlw.vue";
 import fxfbCont from "./components/fxfbCont.vue";
-import { getZtqk, getZtqkDwtj, getGqcz, getDeviceList } from "@/api/iot.js";
+import { getZtqk, getZtqkDwtj, getGqcz, getDeviceList, getChartMapData } from "@/api/iot.js";
 import {
 		formatCityData
 	} from '../../utils'
@@ -130,6 +130,7 @@ export default {
   },
   methods: {
     selectData(val) {
+      console.log('---------', val)
       this.heatMap = formatCityData(val.map(item => ({
         name: item[0],
         value: item[2]
@@ -137,7 +138,7 @@ export default {
     },
     showLabel(params) {
       let res = params.name + "<br/>";
-      res += `接入终端数<br/><span style="font-size: 24px;color:red;font-weight:bold;">${params.value}</span>个`;
+      res += `接入物联网楼栋数<br/><span style="font-size: 24px;color:red;font-weight:bold;">${params.value}</span>个`;
       return res;
     },
     openBasicModal() {
@@ -226,9 +227,21 @@ export default {
         console.log(this.caremaData);
       }
     },
+    loadIotMapData() {
+      getChartMapData({
+        pageNum: 1,
+        pageSize: 100
+      }).then(res => {
+        this.heatMap = res.data.rows.map(item => ({
+          name: item.qx,
+          value: item.wlwlds || 0
+        }))
+      })
+    }
   },
   created() {
     this.getList();
+    this.loadIotMapData();
   },
 };
 </script>