bihuisong 11 月之前
父节点
当前提交
43c72b42b0

+ 26 - 0
zhsq_qk-admin/src/main/java/zhsq_qk/web/controller/system/SysCameraController.java

@@ -101,4 +101,30 @@ public class SysCameraController extends BaseController {
     public AjaxResult selectParkData(SysCameraPolice sysCamera) {
         return success(sysCameraService.selectSysCameraList(sysCamera));
     }
+
+
+    /**
+     * 设备实时在线情况
+     */
+    @GetMapping("/jtzl/getCameraOnlineSituationList")
+    public AjaxResult getCameraOnlineSituationList(SysCameraPolice sysCamera) {
+        return success(sysCameraService.getCameraOnlineSituationList(sysCamera));
+    }
+
+    /**
+     * 摄像头统计
+     */
+    @GetMapping("/jtzl/getCameraStatisticsList")
+    public AjaxResult getCameraStatisticsList(SysCameraPolice sysCamera) {
+        return success(sysCameraService.getCameraStatisticsList(sysCamera));
+    }
+
+    /**
+     * 摄像头统计
+     */
+    @GetMapping("/jtzl/getCameraStatisticsByTypeList")
+    public AjaxResult getCameraStatisticsByTypeList(SysCameraPolice sysCamera) {
+        return success(sysCameraService.getCameraStatisticsByTypeList(sysCamera));
+    }
+
 }

+ 14 - 0
zhsq_qk-system/src/main/java/zhsq_qk/system/domain/SysCamera.java

@@ -63,6 +63,11 @@ public class SysCamera extends BaseEntity {
     @Excel(name = "类型")
     private String buildType;
 
+    /**
+     * 摄像头状态
+     */
+    @Excel(name = "摄像头状态")
+    private Integer cameraStatus;
 
     private Long policeId;
 
@@ -122,6 +127,14 @@ public class SysCamera extends BaseEntity {
         return buildType;
     }
 
+    public void setCameraStatus(Integer cameraStatus) {
+        this.cameraStatus = cameraStatus;
+    }
+
+    public Integer getCameraStatus() {
+        return cameraStatus;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -130,6 +143,7 @@ public class SysCamera extends BaseEntity {
                 .append("address", getAddress())
                 .append("longitude", getLongitude())
                 .append("latitude", getLatitude())
+                .append("cameraStatus", getCameraStatus())
                 .append("buildType", getBuildType())
                 .append("policeId", getPoliceId())
                 .append("cameraName", getCameraName())

+ 15 - 0
zhsq_qk-system/src/main/java/zhsq_qk/system/domain/SysCameraPolice.java

@@ -64,6 +64,12 @@ public class SysCameraPolice extends BaseEntity {
     private String buildType;
 
     /**
+     * 摄像头状态
+     */
+    @Excel(name = "摄像头状态")
+    private Integer cameraStatus;
+
+    /**
      * 类型
      */
     @Excel(name = "类型")
@@ -156,6 +162,14 @@ public class SysCameraPolice extends BaseEntity {
         return buildType;
     }
 
+    public void setCameraStatus(Integer cameraStatus) {
+        this.cameraStatus = cameraStatus;
+    }
+
+    public Integer getCameraStatus() {
+        return cameraStatus;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -165,6 +179,7 @@ public class SysCameraPolice extends BaseEntity {
                 .append("longitude", getLongitude())
                 .append("latitude", getLatitude())
                 .append("buildType", getBuildType())
+                .append("cameraStatus", getCameraStatus())
                 .append("policeName", getPoliceName())
                 .append("position", getPosition())
                 .append("policeId", getPoliceId())

+ 8 - 0
zhsq_qk-system/src/main/java/zhsq_qk/system/mapper/SysCameraMapper.java

@@ -1,6 +1,8 @@
 package zhsq_qk.system.mapper;
 
+import java.awt.image.ImageProducer;
 import java.util.List;
+import java.util.Map;
 
 import zhsq_qk.system.domain.SysCamera;
 import zhsq_qk.system.domain.SysCameraPolice;
@@ -61,4 +63,10 @@ public interface SysCameraMapper {
      * @return 结果
      */
     public int deleteSysCameraByIds(Long[] ids);
+
+    List<Integer> getCameraOnlineSituationList(SysCameraPolice sysCamera);
+
+    List<Integer> getCameraStatisticsList(SysCameraPolice sysCamera);
+
+    List<Integer> getCameraStatisticsByTypeList(SysCameraPolice sysCamera);
 }

+ 7 - 0
zhsq_qk-system/src/main/java/zhsq_qk/system/service/ISysCameraService.java

@@ -1,6 +1,7 @@
 package zhsq_qk.system.service;
 
 import java.util.List;
+import java.util.Map;
 
 import zhsq_qk.system.domain .SysCamera;
 import zhsq_qk.system.domain.SysCameraPolice;
@@ -59,4 +60,10 @@ public interface ISysCameraService {
      * @return 结果
      */
     public int deleteSysCameraById(Long id);
+
+    Map<String, Object> getCameraOnlineSituationList(SysCameraPolice sysCamera);
+
+    Map<String, Object> getCameraStatisticsList(SysCameraPolice sysCamera);
+
+    Map<String, Object> getCameraStatisticsByTypeList(SysCameraPolice sysCamera);
 }

+ 46 - 3
zhsq_qk-system/src/main/java/zhsq_qk/system/service/impl/SysCameraServiceImpl.java

@@ -1,13 +1,17 @@
 package zhsq_qk.system.service.impl;
 
-import java.util.List;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import zhsq_qk.system.domain.SysCameraPolice;
 import zhsq_qk.system.mapper.SysCameraMapper;
-import zhsq_qk.system.domain.SysCamera;
 import zhsq_qk.system.service.ISysCameraService;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * 摄像头Service业务层处理
  *
@@ -49,7 +53,7 @@ public class SysCameraServiceImpl implements ISysCameraService {
      */
     @Override
     public int insertSysCamera(SysCameraPolice sysCamera) {
-            return sysCameraMapper.insertSysCamera(sysCamera);
+        return sysCameraMapper.insertSysCamera(sysCamera);
     }
 
     /**
@@ -84,4 +88,43 @@ public class SysCameraServiceImpl implements ISysCameraService {
     public int deleteSysCameraById(Long id) {
         return sysCameraMapper.deleteSysCameraById(id);
     }
+
+    @Override
+    public Map<String, Object> getCameraOnlineSituationList(SysCameraPolice sysCamera) {
+        Map<String, Object> map = new HashMap();
+        List<Integer> list = sysCameraMapper.getCameraOnlineSituationList(sysCamera);
+        if (!CollectionUtils.isEmpty(list)) {
+            map.put("onLine", list.get(0));
+            map.put("offLine", list.get(1));
+            map.put("total", list.get(0) + list.get(1));
+            map.put("onLineRate", list.get(0) / (list.get(0) + list.get(1)) * 100);
+            map.put("offLineRate", list.get(1) / (list.get(0) + list.get(1)) * 100);
+        }
+        return map;
+    }
+
+    @Override
+    public Map<String, Object> getCameraStatisticsList(SysCameraPolice sysCamera) {
+        Map<String, Object> map = new HashMap();
+        List<Integer> list = sysCameraMapper.getCameraStatisticsList(sysCamera);
+        if (!CollectionUtils.isEmpty(list)) {
+            map.put("inside", list.get(0));
+            map.put("pavement", list.get(1));
+        }
+        map.put("list",list);
+        return map;
+    }
+
+    @Override
+    public Map<String, Object> getCameraStatisticsByTypeList(SysCameraPolice sysCamera) {
+        Map<String, Object> map = new HashMap();
+        List<Integer> list = sysCameraMapper.getCameraStatisticsByTypeList(sysCamera);
+        if (!CollectionUtils.isEmpty(list)) {
+            map.put("insideOnLine", list.get(0));
+            map.put("insideOffLine", list.get(1));
+            map.put("pavementOnLine", list.get(2));
+            map.put("pavementOffLine", list.get(3));
+        }
+        return map;
+    }
 }

+ 30 - 1
zhsq_qk-system/src/main/resources/mapper/system/SysCameraMapper.xml

@@ -24,11 +24,12 @@
         <result property="longitude" column="longitude"/>
         <result property="latitude" column="latitude"/>
         <result property="buildType" column="build_type"/>
+        <result property="cameraStatus" column="camera_status"/>
         <result property="buildTypeName" column="buildTypeName"/>
     </resultMap>
 
     <sql id="selectSysCameraVo">
-        select id, cameraName, address, longitude, latitude, build_type
+        select id, cameraName, address, longitude, latitude, build_type,camera_status
         from sys_camera
     </sql>
 
@@ -37,6 +38,7 @@
         a.id,
         b.police_name,
         a.camera_name,
+        a.camera_status,
         a.address,
         a.longitude,
         a.latitude,
@@ -70,6 +72,7 @@
             a.id,
             b.police_name,
             a.camera_name,
+            a.camera_status,
             a.address,
             a.longitude,
             a.latitude,
@@ -97,6 +100,8 @@
             </if>
             <if test="buildType != null">build_type,
             </if>
+            <if test="cameraStatus != null">camera_status,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},
@@ -113,6 +118,8 @@
             </if>
             <if test="buildType != null">#{buildType},
             </if>
+            <if test="cameraStatus != null">#{cameraStatus},
+            </if>
         </trim>
     </insert>
 
@@ -135,6 +142,9 @@
             <if test="buildType != null">build_type =
                 #{buildType},
             </if>
+            <if test="cameraStatus != null">camera_status =
+                #{cameraStatus},
+            </if>
         </trim>
         where id = #{id}
     </update>
@@ -154,4 +164,23 @@
             #{id}
         </foreach>
     </delete>
+    <select id="getCameraOnlineSituationList">
+        SELECT COUNT(1) FROM `sys_camera` where camera_status = 1
+        UNION
+        SELECT COUNT(1)FROM `sys_camera` where camera_status = 2
+    </select>
+    <select id="getCameraStatisticsList">
+        SELECT COUNT(1) FROM `sys_camera` where build_type = 1
+        UNION
+        SELECT COUNT(1) FROM `sys_camera` where build_type = 2
+    </select>
+    <select id="getCameraStatisticsByTypeList">
+        SELECT COUNT(1) FROM `sys_camera` where camera_status = 1 and build_type = 1
+        UNION all
+        SELECT COUNT(1) FROM `sys_camera` where camera_status = 2 and build_type = 1
+        UNION all
+        SELECT COUNT(1) FROM `sys_camera` where camera_status = 1 and build_type = 2
+        UNION all
+        SELECT COUNT(1) FROM `sys_camera` where camera_status = 2 and build_type = 2
+    </select>
 </mapper>

+ 29 - 0
zhsq_qk-ui/src/api/jtzl/statistics.js

@@ -0,0 +1,29 @@
+import request from '@/utils/request'
+
+
+// 设备实时在线情况
+export function getCameraOnlineSituationList(query) {
+  return request({
+    url: '/system/camera/jtzl/getCameraOnlineSituationList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 摄像头统计
+export function getCameraStatisticsList(query) {
+  return request({
+    url: '/system/camera/jtzl/getCameraStatisticsList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 摄像头统计
+export function getCameraStatisticsByTypeList(query) {
+  return request({
+    url: '/system/camera/jtzl/getCameraStatisticsByTypeList',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 28
zhsq_qk-ui/src/views/fusion/jtzl.vue

@@ -93,22 +93,22 @@
       </div>
       <div class="sbzs">
         <p>设备总数:</p>
-        <span>1</span>
-        <span>6</span>
-        <span>4</span>
-        <span>0</span>
-        <p>个</p>
+        <span>{{cameraOnlineSituation.total}}个</span>
+<!--        <span>6</span>-->
+<!--        <span>4</span>-->
+<!--        <span>0</span>-->
+<!--        <p>个</p>-->
       </div>
       <div class="sb_cont">
         <div class="sb_in">
           <div id="sprh-zxfb" style="width:130px; height:140px;margin: 0 auto;"></div>
           <span class="zxsb">在线设备</span>
-          <h2 class="zxsb_sl">1234<i>个</i></h2>
+          <h2 class="zxsb_sl">{{cameraOnlineSituation.onLine}}<i>个</i></h2>
         </div>
         <div class="sb_in">
           <div id="sprh-lxfb" style="width:130px; height:140px;margin: 0 auto;"></div>
           <span class="lxsb">离线设备</span>
-          <h2 class="lxsb_sl">234<i>个</i></h2>
+          <h2 class="lxsb_sl">{{cameraOnlineSituation.offLine}}<i>个</i></h2>
         </div>
       </div>
       <div class="qkq_bmfw">
@@ -117,11 +117,11 @@
         <div class="sb_cont sb_cont_sxt">
           <div class="sb_in">
             <span class="lxsb">小区内部</span>
-            <h2 class="zxsb_sl">704<i>个</i></h2>
+            <h2 class="zxsb_sl">{{ cameraStatisticsData.inside }}<i>个</i></h2>
           </div>
           <div class="sb_in">
             <span class="lxsb">街道路面</span>
-            <h2 class="lxsb_sl">230<i>个</i></h2>
+            <h2 class="lxsb_sl">{{ cameraStatisticsData.pavement }}<i>个</i></h2>
           </div>
         </div>
       </div>
@@ -129,8 +129,8 @@
     <!--右侧结束-->
     <!-- 点位图例 开始 -->
     <div class="dwtl">
-      <p><span class="xqnb"></span>街道路面(<i class="zx"></i>50个/<i class="lx"></i>10个)</p>
-      <p><span class="jdlm"></span>小区内部(<i class="zx"></i>50个/<i class="lx"></i>10个)</p>
+      <p><span class="xqnb"></span>街道路面(<i class="zx"></i>{{ this.cameraOnlineSituationType.pavementOnLine }}个/<i class="lx"></i>{{ this.cameraOnlineSituationType.pavementOffLine }}个)</p>
+      <p><span class="jdlm"></span>小区内部(<i class="zx"></i>{{ this.cameraOnlineSituationType.insideOnLine }}个/<i class="lx"></i>{{ this.cameraOnlineSituationType.insideOffLine }}个)</p>
     </div>
     <!-- 点位图例 结束 -->
     <!--底部开始-->
@@ -183,6 +183,11 @@ import "@/assets/images/qkq_index.css";
 import "@/assets/images/qkq_sprh.css";
 import {getCameraList} from "@/api/system/camera";
 import supermap from "@/views/supermap/supermap";
+import {
+  getCameraOnlineSituationList,
+  getCameraStatisticsByTypeList,
+  getCameraStatisticsList
+} from "@/api/jtzl/statistics";
 
 
 export default {
@@ -197,18 +202,26 @@ export default {
       sltProps: null,
       currentTime: '',
       btnOne: true,
-      btnTwo: false
+      btnTwo: false,
+      cameraStatisticsData:{},
+      cameraOnlineSituation:{},
+      cameraOnlineSituationType:{},
+      // 查询参数
+      queryParams: {},
     };
     // 可根据实际情况添加更多设备列表
   },
   created() {
+    this.getCameraOnlineSituationList()
+    this.getCameraStatisticsList()
+    this.getCameraStatisticsByTypeList()
   },
   mounted() {
     this.resourceDistribution();
-    this.deviceOnline();
-    this.deviceOffline();
+    // this.deviceOnline();
+    // this.deviceOffline();
     this.cameraList();
-    this.regionTop();
+    // this.regionTop();
     // 每秒刷新时间
     setInterval(() => {
       this.getCurrentTime();
@@ -216,6 +229,24 @@ export default {
   },
 
   methods: {
+    getCameraOnlineSituationList(){
+      getCameraOnlineSituationList(this.queryParams).then(res => {
+        this.cameraOnlineSituation = res.data;
+        this.deviceOnline(this.cameraOnlineSituation.onLineRate)
+        this.deviceOffline(this.cameraOnlineSituation.offLineRate)
+      });
+    },
+    getCameraStatisticsList(){
+      getCameraStatisticsList(this.queryParams).then(res => {
+        this.cameraStatisticsData = res.data;
+        this.regionTop(res.data.list)
+      });
+    },
+    getCameraStatisticsByTypeList(){
+      getCameraStatisticsByTypeList(this.queryParams).then(res => {
+        this.cameraOnlineSituationType = res.data;
+      });
+    },
     sltHandle() {
       this.btnOne = true
       this.btnTwo = false
@@ -372,11 +403,11 @@ export default {
       }
     },
 
-    deviceOnline() {
+    deviceOnline(val) {
       //在线设备
       var myChart = echarts.init(document.getElementById('sprh-zxfb'));
       let angle = 0; //角度,用来做简单的动画效果的
-      let value = 80;
+      let value = val
       var timerId;
       let option = {
         title: {
@@ -731,12 +762,12 @@ export default {
       myChart.setOption(option);
     },
 
-    deviceOffline() {
+    deviceOffline(val) {
       // 视频融合--离线设备
       // 基于准备好的dom,初始化echarts实例
       var myChart = echarts.init(document.getElementById('sprh-lxfb'));
       let angle = 0; //角度,用来做简单的动画效果的
-      let value = 20;
+      let value = val
       var timerId;
       let option = {
         title: {
@@ -1111,17 +1142,11 @@ export default {
       this.currentTime = `${year}年${formattedMonth}月${formattedDate}日 ${weekDays[day]} ${formattedHour}:${formattedMinute}:${formattedSecond}`;
     },
 
-    regionTop() {
+    regionTop(val) {
       //摄像头统计
       var myChart = echarts.init(document.getElementById('jczl-bmfw'));
-      let data = ['小区内部', '街道路面']
-      let valueData = [];
-      let labelData = []
-      for (var i = 0; i < data.length; i++) {
-        labelData.push(data[i]);
-        var lineNumber = Math.floor(Math.random() * 1000);
-        valueData.push(lineNumber);
-      }
+      let valueData = val;
+      let labelData = ['小区内部', '街道路面']
       var option = {
         "backgroundColor": "rgba(0, 0, 0, 0)",
         title: {

+ 53 - 28
zhsq_qk-ui/src/views/fusion/sprh.vue

@@ -92,22 +92,22 @@
       </div>
       <div class="sbzs">
         <p>设备总数:</p>
-        <span>1</span>
-        <span>6</span>
-        <span>4</span>
-        <span>0</span>
-        <p>个</p>
+        <span>{{cameraOnlineSituation.total}}个</span>
+        <!--        <span>6</span>-->
+        <!--        <span>4</span>-->
+        <!--        <span>0</span>-->
+        <!--        <p>个</p>-->
       </div>
       <div class="sb_cont">
         <div class="sb_in">
           <div id="sprh-zxfb" style="width:130px; height:140px;margin: 0 auto;"></div>
           <span class="zxsb">在线设备</span>
-          <h2 class="zxsb_sl">1234<i>个</i></h2>
+          <h2 class="zxsb_sl">{{cameraOnlineSituation.onLine}}<i>个</i></h2>
         </div>
         <div class="sb_in">
           <div id="sprh-lxfb" style="width:130px; height:140px;margin: 0 auto;"></div>
           <span class="lxsb">离线设备</span>
-          <h2 class="lxsb_sl">234<i>个</i></h2>
+          <h2 class="lxsb_sl">{{cameraOnlineSituation.offLine}}<i>个</i></h2>
         </div>
       </div>
       <div class="qkq_bmfw">
@@ -116,11 +116,11 @@
         <div class="sb_cont sb_cont_sxt">
           <div class="sb_in">
             <span class="lxsb">小区内部</span>
-            <h2 class="zxsb_sl">704<i>个</i></h2>
+            <h2 class="zxsb_sl">{{ cameraStatisticsData.inside }}<i>个</i></h2>
           </div>
           <div class="sb_in">
             <span class="lxsb">街道路面</span>
-            <h2 class="lxsb_sl">230<i>个</i></h2>
+            <h2 class="lxsb_sl">{{ cameraStatisticsData.pavement }}<i>个</i></h2>
           </div>
         </div>
       </div>
@@ -128,8 +128,8 @@
     <!--右侧结束-->
     <!-- 点位图例 开始 -->
     <div class="dwtl">
-      <p><span class="xqnb"></span>街道路面(<i class="zx"></i>50个/<i class="lx"></i>10个)</p>
-      <p><span class="jdlm"></span>小区内部(<i class="zx"></i>50个/<i class="lx"></i>10个)</p>
+      <p><span class="xqnb"></span>街道路面(<i class="zx"></i>{{ this.cameraOnlineSituationType.pavementOnLine }}个/<i class="lx"></i>{{ this.cameraOnlineSituationType.pavementOffLine }}个)</p>
+      <p><span class="jdlm"></span>小区内部(<i class="zx"></i>{{ this.cameraOnlineSituationType.insideOnLine }}个/<i class="lx"></i>{{ this.cameraOnlineSituationType.insideOffLine }}个)</p>
     </div>
     <!-- 点位图例 结束 -->
     <!--底部开始-->
@@ -182,6 +182,11 @@ import "@/assets/images/qkq_index.css";
 import "@/assets/images/qkq_sprh.css";
 import {getCameraList} from "@/api/system/camera";
 import supermap from "@/views/supermap/supermap";
+import {
+  getCameraOnlineSituationList,
+  getCameraStatisticsByTypeList,
+  getCameraStatisticsList
+} from "@/api/jtzl/statistics";
 
 
 export default {
@@ -196,18 +201,26 @@ export default {
       sltProps: null,
       currentTime: '',
       btnOne: true,
-      btnTwo: false
+      btnTwo: false,
+      cameraStatisticsData:{},
+      cameraOnlineSituation:{},
+      cameraOnlineSituationType:{},
+      // 查询参数
+      queryParams: {},
     };
     // 可根据实际情况添加更多设备列表
   },
   created() {
+    this.getCameraOnlineSituationList()
+    this.getCameraStatisticsList()
+    this.getCameraStatisticsByTypeList()
   },
   mounted() {
     this.resourceDistribution();
-    this.deviceOnline();
-    this.deviceOffline();
+    // this.deviceOnline();
+    // this.deviceOffline();
     this.cameraList();
-    this.regionTop();
+    // this.regionTop();
     // 每秒刷新时间
     setInterval(() => {
       this.getCurrentTime();
@@ -215,6 +228,24 @@ export default {
   },
 
   methods: {
+    getCameraOnlineSituationList(){
+      getCameraOnlineSituationList(this.queryParams).then(res => {
+        this.cameraOnlineSituation = res.data;
+        this.deviceOnline(this.cameraOnlineSituation.onLineRate)
+        this.deviceOffline(this.cameraOnlineSituation.offLineRate)
+      });
+    },
+    getCameraStatisticsList(){
+      getCameraStatisticsList(this.queryParams).then(res => {
+        this.cameraStatisticsData = res.data;
+        this.regionTop(res.data.list)
+      });
+    },
+    getCameraStatisticsByTypeList(){
+      getCameraStatisticsByTypeList(this.queryParams).then(res => {
+        this.cameraOnlineSituationType = res.data;
+      });
+    },
     sltHandle() {
       this.btnOne = true
       this.btnTwo = false
@@ -372,11 +403,11 @@ export default {
       }
     },
 
-    deviceOnline() {
+    deviceOnline(val) {
       //在线设备
       var myChart = echarts.init(document.getElementById('sprh-zxfb'));
       let angle = 0; //角度,用来做简单的动画效果的
-      let value = 80;
+      let value = val;
       var timerId;
       let option = {
         title: {
@@ -733,12 +764,12 @@ export default {
       myChart.setOption(option);
     },
 
-    deviceOffline() {
+    deviceOffline(val) {
       // 视频融合--离线设备
       // 基于准备好的dom,初始化echarts实例
       var myChart = echarts.init(document.getElementById('sprh-lxfb'));
       let angle = 0; //角度,用来做简单的动画效果的
-      let value = 20;
+      let value = val;
       var timerId;
       let option = {
         title: {
@@ -1115,17 +1146,11 @@ export default {
       this.currentTime = `${year}年${formattedMonth}月${formattedDate}日 ${weekDays[day]} ${formattedHour}:${formattedMinute}:${formattedSecond}`;
     },
 
-    regionTop() {
+    regionTop(val) {
       //摄像头统计
       var myChart = echarts.init(document.getElementById('jczl-bmfw'));
-      let data = ['小区内部', '街道路面']
-      let valueData = [];
-      let labelData = []
-      for (var i = 0; i < data.length; i++) {
-        labelData.push(data[i]);
-        var lineNumber = Math.floor(Math.random() * 1000);
-        valueData.push(lineNumber);
-      }
+      let valueData = val;
+      let labelData = ['小区内部', '街道路面']
       var option = {
         "backgroundColor": "rgba(0, 0, 0, 0)",
         title: {

+ 16 - 1
zhsq_qk-ui/src/views/system/camera/index.vue

@@ -88,6 +88,11 @@
       <el-table-column label="点位具体位置" align="center" prop="address"/>
       <el-table-column label="经度" align="center" prop="longitude"/>
       <el-table-column label="纬度" align="center" prop="latitude"/>
+      <el-table-column label="摄像头状态" prop="buildType" width="100">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.camera_status" :value="scope.row.cameraStatus"/>
+        </template>
+      </el-table-column>
       <el-table-column label="类型" prop="buildType" width="100">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.build_type" :value="scope.row.buildType"/>
@@ -148,6 +153,16 @@
         <el-form-item label="纬度" prop="latitude">
           <el-input v-model="form.latitude" placeholder="请输入纬度"/>
         </el-form-item>
+        <el-form-item label="摄像头状态">
+          <el-select v-model="form.cameraStatus" placeholder="请选择摄像头状态">
+            <el-option
+              v-for="dict in dict.type.camera_status"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="类型">
           <el-select v-model="form.buildType" placeholder="请选择类型">
             <el-option
@@ -173,7 +188,7 @@ import {listAllPolice} from "@/api/system/station";
 
 export default {
   name: "Camera",
-  dicts: ['build_type'],
+  dicts: ['build_type',"camera_status"],
   data() {
     return {
       // 遮罩层