|
@@ -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: {
|