Commit 380abc51 authored by zhangjianqian's avatar zhangjianqian

大屏监控修改H5player 缩放

parent 4f794384
package com.zehong.web.controller.supervise; package com.zehong.web.controller.supervise;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zehong.system.domain.Listaw; import com.zehong.system.domain.Listaw;
import com.zehong.system.domain.TDetailInfoList; import com.zehong.system.domain.TDetailInfoList;
import com.zehong.system.domain.TDeviceInfoS; import com.zehong.system.domain.TDeviceInfoS;
import com.zehong.system.service.ITDetectorInfoService;
import com.zehong.system.service.ITDetectorUserService;
import com.zehong.system.service.ITEmployedPeopleInfoService; import com.zehong.system.service.ITEmployedPeopleInfoService;
import com.zehong.web.codeconfig.CodeConFig; import com.zehong.web.codeconfig.CodeConFig;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
...@@ -35,6 +38,9 @@ public class TDeviceInfoController extends BaseController ...@@ -35,6 +38,9 @@ public class TDeviceInfoController extends BaseController
@Autowired @Autowired
private ITEmployedPeopleInfoService tEmployedPeopleInfoService; private ITEmployedPeopleInfoService tEmployedPeopleInfoService;
@Autowired
private ITDetectorInfoService itDetectorInfoService;
/** /**
* 查询设备信息列表 * 查询设备信息列表
*/ */
...@@ -206,4 +212,12 @@ public class TDeviceInfoController extends BaseController ...@@ -206,4 +212,12 @@ public class TDeviceInfoController extends BaseController
} }
} }
@GetMapping("/selectDeviceNum")
public AjaxResult selectDeviceNum(String enterpriseId)
{
Map<String,Object> map = itDetectorInfoService.selectDetectorNum(enterpriseId);
Map<String,Object> map1 =tDeviceInfoService.selectDeviceNum(enterpriseId);
map.putAll(map1);
return AjaxResult.success(map);
}
} }
package com.zehong.system.mapper; package com.zehong.system.mapper;
import com.zehong.system.domain.TDetectorInfo; import com.zehong.system.domain.TDetectorInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 探测器Mapper接口 * 探测器Mapper接口
...@@ -71,4 +73,10 @@ public interface TDetectorInfoMapper ...@@ -71,4 +73,10 @@ public interface TDetectorInfoMapper
* @return 结果 * @return 结果
*/ */
public int deleteTDetectorInfoByIds(Long[] detectorIds); public int deleteTDetectorInfoByIds(Long[] detectorIds);
/**
* 用户安全监控设备 数量
* @return
*/
public Map<String,Object> selectDetectorNum(@Param("enterpriseIds")String[] enterpriseIds);
} }
package com.zehong.system.mapper; package com.zehong.system.mapper;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TDeviceInfo; import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceInfoS; import com.zehong.system.domain.TDeviceInfoS;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -110,4 +112,10 @@ public interface TDeviceInfoMapper ...@@ -110,4 +112,10 @@ public interface TDeviceInfoMapper
* @param deviceId * @param deviceId
*/ */
void deleteDeviceDetailInfo(int deviceId); void deleteDeviceDetailInfo(int deviceId);
/**
* 查询设备数量
* @return
*/
Map<String,Object> selectDeviceNum(@Param("enterpriseIds")String[] enterpriseIds);
} }
...@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; ...@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TDetectorInfo; import com.zehong.system.domain.TDetectorInfo;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 探测器Service接口 * 探测器Service接口
...@@ -80,4 +81,9 @@ public interface ITDetectorInfoService ...@@ -80,4 +81,9 @@ public interface ITDetectorInfoService
* @return 结果 * @return 结果
*/ */
public int deleteTDetectorInfoById(Long detectorId); public int deleteTDetectorInfoById(Long detectorId);
/**
* 用户安全监控设备 数量
* @return
*/
public Map<String,Object> selectDetectorNum(String enterpriseId);
} }
package com.zehong.system.service; package com.zehong.system.service;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TDeviceInfo; import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceInfoS; import com.zehong.system.domain.TDeviceInfoS;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -110,4 +112,9 @@ public interface ITDeviceInfoService ...@@ -110,4 +112,9 @@ public interface ITDeviceInfoService
* @param deviceId * @param deviceId
*/ */
void deleteDeviceDetailInfo(int deviceId); void deleteDeviceDetailInfo(int deviceId);
/**
* 查询设备数量
* @return
*/
Map<String,Object> selectDeviceNum( String enterpriseId);
} }
...@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 探测器Service业务层处理 * 探测器Service业务层处理
...@@ -147,4 +148,12 @@ public class TDetectorInfoServiceImpl implements ITDetectorInfoService ...@@ -147,4 +148,12 @@ public class TDetectorInfoServiceImpl implements ITDetectorInfoService
{ {
return tDetectorInfoMapper.deleteTDetectorInfoById(detectorId); return tDetectorInfoMapper.deleteTDetectorInfoById(detectorId);
} }
/**
* 用户安全监控设备 数量
* @return
*/
@Override
public Map<String,Object> selectDetectorNum(String enterpriseId){
return tDetectorInfoMapper.selectDetectorNum(enterpriseId.split(","));
}
} }
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TDeviceInfoS; import com.zehong.system.domain.TDeviceInfoS;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -172,4 +174,12 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService ...@@ -172,4 +174,12 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
public void deleteDeviceDetailInfo(int deviceId) { public void deleteDeviceDetailInfo(int deviceId) {
tDeviceInfoMapper.deleteDeviceDetailInfo(deviceId); tDeviceInfoMapper.deleteDeviceDetailInfo(deviceId);
} }
/**
* 查询设备数量
* @return
*/
@Override
public Map<String,Object> selectDeviceNum(String enterpriseId){
return tDeviceInfoMapper.selectDeviceNum(enterpriseId.split(","));
}
} }
...@@ -256,4 +256,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -256,4 +256,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{detectorId} #{detectorId}
</foreach> </foreach>
</delete> </delete>
<select id="selectDetectorNum" resultType="java.util.HashMap">
SELECT IFNULL(SUM(IF(detector_status=0,1,0)),0) AS changNum,IFNULL(SUM(detector_status=1),0) AS liNum,
IFNULL(SUM(IF(detector_status=2,1,0)),0) AS baoNum ,
(SELECT COUNT(user_id) FROM t_detector_user WHERE is_del = 0) AS userNum
FROM t_detector_info WHERE is_del = 0
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -207,5 +207,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -207,5 +207,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="deleteDeviceDetailInfo"> <update id="deleteDeviceDetailInfo">
update t_relation_device_detail_info set relation_device_id=NULL where relation_device_detail_id=#{deviceId} update t_relation_device_detail_info set relation_device_id=NULL where relation_device_detail_id=#{deviceId}
</update> </update>
<select id="selectDeviceNum" resultType="java.util.HashMap">
SELECT SUM(IF(device_type=1,1,0)) AS fajing, SUM(IF(device_type=2,1,0)) AS tiaoya ,
(SELECT COUNT(video_manager_id) FROM t_video_manager WHERE is_del = 0
and beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
) AS videoNum,
(SELECT COUNT(site_station_id) FROM t_site_station_info WHERE is_del = 0
and beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
) AS stationNum
FROM t_device_info
WHERE is_del = 0 and beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
</select>
</mapper> </mapper>
...@@ -209,10 +209,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -209,10 +209,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
<select id="selectWorkOrderNum" resultType="java.util.HashMap"> <select id="selectWorkOrderNum" resultType="java.util.HashMap">
SELECT IFNULL(SUM(IF(work_status=3 AND work_type=1,1,0))/SUM(IF(work_type=1,1,0)),0) AS typeOne, SELECT IFNULL(SUM(IF(work_status=3 AND work_type=1,1,0))/SUM(IF(work_type=1,1,0)),1) AS typeOne,
IFNULL(SUM(IF(work_status=3 AND work_type=2,1,0))/SUM(IF(work_type=2,1,0)),0) AS typeTwo, IFNULL(SUM(IF(work_status=3 AND work_type=2,1,0))/SUM(IF(work_type=2,1,0)),1) AS typeTwo,
IFNULL(SUM(IF(work_status=3 AND work_type=3,1,0))/SUM(IF(work_type=3,1,0)),0) AS typeThree, IFNULL(SUM(IF(work_status=3 AND work_type=3,1,0))/SUM(IF(work_type=3,1,0)),1) AS typeThree,
IFNULL(SUM(IF(work_status=3 AND work_type=4,1,0))/SUM(IF(work_type=4,1,0)),0) AS typeFor, IFNULL(SUM(IF(work_status=3 AND work_type=4,1,0))/SUM(IF(work_type=4,1,0)),1) AS typeFor,
(SELECT COUNT(employed_people_id) FROM t_employed_people_info WHERE is_del = 0 (SELECT COUNT(employed_people_id) FROM t_employed_people_info WHERE is_del = 0
AND beyond_enterprise_id IN AND beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")"> <foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
......
...@@ -74,3 +74,10 @@ export function alarmData(query) { ...@@ -74,3 +74,10 @@ export function alarmData(query) {
params: query, params: query,
}); });
} }
export function selectDeviceNum(query) {
return request({
url: '/device/device/selectDeviceNum',
method: 'get',
params: query
})
}
...@@ -98,40 +98,7 @@ ...@@ -98,40 +98,7 @@
<div class="echarts-one" style="margin-top: 10px;width: 430px;margin-left: 10px;"> <div class="echarts-one" style="margin-top: 10px;width: 430px;margin-left: 10px;">
<div id="myChartone" :style="{width: '420px', height: '240px'}"></div> <div id="myChartone" :style="{width: '420px', height: '240px'}"></div>
</div> </div>
<!-- <div>
<div class="item1">
<span class="dot">
<span class="dot-inner"></span>
</span>
<span>投诉统计</span>
<div class="fong-div" style="width: 8px;height: 12px;background-color: #2c888899;float: right;margin-top: 10px;transform: skewX(-25deg)"></div>
<div class="fong-div" style="width: 8px;height: 12px;background-color: #24b1b1b3;float: right;margin-top: 10px;margin-right: 10px;transform: skewX(-25deg)"></div>
<div class="fong-div" style="width: 8px;height: 12px;background-color: #11e9e9b3;float: right;margin-top: 10px;margin-right: 10px;transform: skewX(-25deg)"></div>
</div>
</div>
<div class="divfen" style="width: 100%;height: 280px;margin-top: 10px">
<div style="width: 50%;height: 100%">
<div id="main31" style="width: 100%;height: 66%"></div>
<div class="titleTex" style="height: 20px;margin-top: 0px;font-size: 10px;">
● 已处理:{{datanow.tousuevery1}}
</div>
<div class="titleTex" style="height: 20px;margin-top: 0px;font-size: 10px;color: #ff4040">
● 未处理:{{datanow.tousuevery2}}
</div>
</div>
<div style="width: 50%;height: 100%">
<div id="main32" style="width: 100%;height: 66%"></div>
<div class="titleTex" style="height: 20px;margin-top: 0px;font-size: 10px;color: #0000ff">
● 在线数量:{{datanow.deviceevery1}}
</div>
<div class="titleTex" style="height: 20px;margin-top: 0px;font-size: 10px;color: #ffff00">
● 离线数量:{{datanow.deviceevery2}}
</div>
<div class="titleTex" style="height: 20px;margin-top: 0px;font-size: 10px;color: #ff4040">
● 报警数量:{{datanow.deviceevery3}}
</div>
</div>
</div> -->
<div> <div>
<div class="item1"> <div class="item1">
<span class="dot"> <span class="dot">
...@@ -146,33 +113,33 @@ ...@@ -146,33 +113,33 @@
<div class="outuser"> <div class="outuser">
<div class="outuserone"> <div class="outuserone">
<p>燃气用户数量</p> <p>燃气用户数量</p>
<span class="outuserspan">12345</span> <span class="outuserspan">{{diviceNum.userNum}}</span>
</div> </div>
<div class="outusertwo"> <div class="outusertwo">
<p>安全设备数量</p> <p>安全设备数量</p>
<span class="outuserspan">12345</span> <span class="outuserspan">{{diviceNum.baoNum+diviceNum.changNum+diviceNum.liNum}}</span>
</div> </div>
</div> </div>
<div id="huan" style="width: 450px;height: 170px;"></div> <div id="huan" style="width: 450px;height: 170px;"></div>
<div class="inyuan"> <div class="inyuan">
<div style="letter-spacing:2px;">设备总数</div> <div style="letter-spacing:2px;">设备总数</div>
<span style="font-family: 'arialbd';letter-spacing:2px;color: #00FFFF;font-size: 20px;">12345</span> <span style="font-family: 'arialbd';letter-spacing:2px;color: #00FFFF;font-size: 20px;">{{diviceNum.baoNum+diviceNum.changNum+diviceNum.liNum}}</span>
</div> </div>
<div class="usernum"> <div class="usernum">
<div class="usernumin in1"> <div class="usernumin in1">
<span></span> <span></span>
<span style="color: #fff;">在线数量 </span> <span style="color: #fff;">在线数量 </span>
<span style="font-family: 'arialbd';letter-spacing:2px;"> : 1234</span> <span style="font-family: 'arialbd';letter-spacing:2px;"> : {{diviceNum.changNum}}</span>
</div> </div>
<div class="usernumin in2"> <div class="usernumin in2">
<span></span> <span></span>
<span style="color: #fff;">离线数量 </span> <span style="color: #fff;">离线数量 </span>
<span style="font-family: 'arialbd';letter-spacing:2px;"> : 1234</span> <span style="font-family: 'arialbd';letter-spacing:2px;"> : {{diviceNum.liNum}}</span>
</div> </div>
<div class="usernumin in3"> <div class="usernumin in3">
<span></span> <span></span>
<span style="color: #fff;">报警数量 </span> <span style="color: #fff;">报警数量 </span>
<span style="font-family: 'arialbd';letter-spacing:2px;"> : 1234</span> <span style="font-family: 'arialbd';letter-spacing:2px;"> : {{diviceNum.baoNum}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -181,215 +148,34 @@ ...@@ -181,215 +148,34 @@
<script> <script>
// 引入基本模板 // 引入基本模板
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { alarmData } from "@/api/detector/detectorInfo"; import { alarmData,selectDeviceNum } from "@/api/detector/detectorInfo";
export default { export default {
// components: { // components: {
// RightPic, // RightPic,
// }, // },
data () { data () {
return { return {
allNum:{},
diviceNum:{
baoNum: 0,
changNum: 0,
liNum: 0,
userNum: 0
},
zeroNum:{
fajing: 0,
stationNum: 0,
tiaoya: 0,
videoNum: 0
},
enterpriseIds:{
enterpriseId:""
},
timer: null, timer: null,
repeatFinshed: false, repeatFinshed: false,
tableHeight: 230, tableHeight: 230,
tableData: [], tableData: [],
scrollHeight: 0, scrollHeight: 0
dataall:{
xunchaAllOne1: 1,
xunchaAllOne2: 3,
xunchaAllOne3: 8,
xunchaAllOne4: 3,
xunchaAllTwo1: 2,
xunchaAllTwo2: 2,
xunchaAllTwo3: 2,
xunchaAllTwo4: 6,
xunList1:[
{ value: 678,name: '30.4%' },
{ value: 1548,name: '69.6%' }
],
xunList11:[
{ value: 1048 },
{ value: 335}
],
xunoneevery1:1048,
xunoneevery2:355,
xunList2:[
{ value: 678,name: '28.5%' },
{ value: 1548,name: '71.5%' }
],
xunList22:[
{ value: 1048 },
{ value: 335}
],
xuntwoevery1:1674,
xuntwoevery2:552,
shigu1:[820, 932, 901, 934, 1290, 1330, 1320,820, 932, 901, 934, 1290],
shigu2:[452, 786, 456, 732, 458, 165, 198,489, 158, 358, 345, 675],
shigu3:[ 932, 901, 198,489, 158, 358, 345, 675, 901, 934, 1290, 888],
tousu:[{ value: 1048, name: '已处理' },
{ value: 255, name: '未处理' }
],
tousuNum:1303,
tousuevery1:1048,
tousuevery2:255,
divice:[
{ value: 31, name: '在线数量' },
{ value: 19, name: '离线数量' },
{ value: 1, name: '报警数量' }
],
deviceNum:51,
deviceevery1:31,
deviceevery2:19,
deviceevery3:1,
zhuzhuang:[16,13,27,2]
},
dataone:{
xunchaAllOne1: 0,
xunchaAllOne2: 3,
xunchaAllOne3: 8,
xunchaAllOne4: 3,
xunchaAllTwo1: 0,
xunchaAllTwo2: 7,
xunchaAllTwo3: 2,
xunchaAllTwo4: 6,
xunList1:[
{ value: 224,name: '32.3%' },
{ value: 641,name: '67.7%' }
],
xunList11:[
{ value: 338 },
{ value: 112}
],
xunoneevery1:335,
xunoneevery2:141,
xunList2:[
{ value: 224,name: '29.1%' },
{ value: 544,name: '78.9%' }
],
xunList22:[
{ value: 354 },
{ value: 111}
],
xuntwoevery1:511,
xuntwoevery2:199,
shigu1:[223, 44, 332, 321, 458, 456, 653,122, 345, 133, 421, 123],
shigu2:[123, 234, 456, 567, 235, 12,89, 158, 158, 145, 175,224],
shigu3:[ 432, 301, 108,189, 18, 158, 145, 175, 401, 334, 590, 388],
tousu:[{ value: 322, name: '已处理' },
{ value: 181, name: '未处理' }
],
tousuNum:503,
tousuevery1:322,
tousuevery2:181,
divice:[
{ value: 11, name: '在线数量' },
{ value: 8, name: '离线数量' },
{ value: 1, name: '报警数量' }
],
deviceNum:21,
deviceevery1:11,
deviceevery2:8,
deviceevery3:1,
zhuzhuang:[8,3,11,1]
},
datatwo:{
xunchaAllOne1: 0,
xunchaAllOne2: 4,
xunchaAllOne3: 2,
xunchaAllOne4: 1,
xunchaAllTwo1: 0,
xunchaAllTwo2: 6,
xunchaAllTwo3: 7,
xunchaAllTwo4: 5,
xunList1:[
{ value: 224,name: '30.4%' },
{ value: 400,name: '69.6%' }
],
xunList11:[
{ value: 212 },
{ value: 209}
],
xunoneevery1:335,
xunoneevery2:141,
xunList2:[
{ value: 224,name: '28.5%' },
{ value: 300,name: '71.5%' }
],
xunList22:[
{ value: 475 },
{ value: 200}
],
xuntwoevery1:475,
xuntwoevery2:200,
shigu1:[653,122, 345, 133, 456, 653,122, 345, 133, 421, 123,500],
shigu2:[432, 301, 456, 567, 235, 12, 145, 175, 401, 334, 590, 388],
shigu3:[ 123, 234, 108,189, 18, 158, 123, 234, 456, 567, 235, 12],
tousu:[{ value: 344, name: '已处理' },
{ value: 121, name: '未处理' }
],
tousuNum:322,
tousuevery1:211,
tousuevery2:111,
divice:[
{ value: 2, name: '在线数量' },
{ value: 4, name: '离线数量' },
{ value: 0, name: '报警数量' }
],
deviceNum:6,
deviceevery1:2,
deviceevery2:4,
deviceevery3:0,
zhuzhuang:[2,5,7,1]
},
datathree:{
xunchaAllOne1: 0,
xunchaAllOne2: 5,
xunchaAllOne3: 7,
xunchaAllOne4: 9,
xunchaAllTwo1: 0,
xunchaAllTwo2: 8,
xunchaAllTwo3: 8,
xunchaAllTwo4: 9,
xunList1:[
{ value: 124,name: '30.4%' },
{ value: 400,name: '69.6%' }
],
xunList11:[
{ value: 212 },
{ value: 309}
],
xunoneevery1:335,
xunoneevery2:141,
xunList2:[
{ value: 224,name: '28.5%' },
{ value: 300,name: '71.5%' }
],
xunList22:[
{ value: 475 },
{ value: 200}
],
xuntwoevery1:475,
xuntwoevery2:200,
shigu1:[653,122, 345, 133, 456, 653,122, 345, 133, 421, 123,500],
shigu2:[432, 301, 456, 567, 456, 653,122, 175, 401, 334, 590, 388],
shigu3:[ 334, 590, 388, 133, 456, 123, 234, 653,122, 345, 133],
tousu:[{ value: 124, name: '已处理' },
{ value: 111, name: '未处理' }
],
tousuNum:335,
tousuevery1:124,
tousuevery2:111,
divice:[
{ value: 12, name: '在线数量' },
{ value: 6, name: '离线数量' },
{ value: 0, name: '报警数量' }
],
deviceNum:24,
deviceevery1:12,
deviceevery2:6,
deviceevery3:0,
zhuzhuang:[6,5,9,0]
},
datanow:{}
}; };
}, },
mounted(){ mounted(){
...@@ -397,10 +183,11 @@ ...@@ -397,10 +183,11 @@
// this.getScrollHeight(); // this.getScrollHeight();
// }) // })
this.getAlarm(); this.getAlarm();
// this.datanow = this.dataall;
// this.drawLine(this.datanow); selectDeviceNum (this.enterpriseIds).then(response => {
// this.drawLine2(this.datanow); this.diviceNum = response.data;
this.drawLine3(); this.drawLine3();
});
}, },
...@@ -456,32 +243,24 @@ ...@@ -456,32 +243,24 @@
console.log(123); console.log(123);
clearInterval(this.timer); clearInterval(this.timer);
}, },
choice(index){ choice(val){
console.log("===="+index) this.getNum(val)
if(index==0){ },
this.datanow = this.dataall; getNum( val){
this.drawLine(this.datanow); if(val!=null && val!=''){
// this.drawLine2(this.datanow); this.enterpriseIds.enterpriseId = val.toString();
this.drawLine3(this.datanow); selectDeviceNum (this.enterpriseIds).then(response => {
}else console.log(response);
if(index==1){ this.allNum=response.data;
this.datanow = this.dataone; this.drawLine();
this.drawLine(this.datanow); });
// this.drawLine2(this.datanow); }else {
this.drawLine3(this.datanow); this.allNum = this.zeroNum;
}else if(index==2){ this.drawLine();
this.datanow = this.datatwo; }
this.drawLine(this.datanow);
// this.drawLine2(this.datanow); },
this.drawLine3(this.datanow); drawLine(){
}else if(index==3){
this.datanow = this.datathree;
this.drawLine(this.datanow);
// this.drawLine2(this.datanow);
this.drawLine3(this.datanow);
}
},
drawLine(data){
// 基于准备好的dom,初始化echarts实例 // 基于准备好的dom,初始化echarts实例
let myChart1 = this.$echarts.init(document.getElementById('myChartone')) let myChart1 = this.$echarts.init(document.getElementById('myChartone'))
// 绘制图表 // 绘制图表
...@@ -540,7 +319,7 @@ ...@@ -540,7 +319,7 @@
type: "bar", type: "bar",
showSymbol: false, showSymbol: false,
hoverAnimation: false, hoverAnimation: false,
data: data.zhuzhuang, data: [this.allNum.fajing,this.allNum.tiaoya,this.allNum.stationNum,this.allNum.videoNum],
barWidth: 18, //柱图宽度 barWidth: 18, //柱图宽度
// barCategoryGap:'60%', // barCategoryGap:'60%',
itemStyle:{ itemStyle:{
...@@ -593,7 +372,7 @@ ...@@ -593,7 +372,7 @@
}); });
}, },
drawLine3(data){ drawLine3(){
// 基于准备好的dom,初始化echarts实例 // 基于准备好的dom,初始化echarts实例
let myChart31 = echarts.init(document.getElementById('huan')) let myChart31 = echarts.init(document.getElementById('huan'))
// let myChart32 = echarts.init(document.getElementById('main32')) // let myChart32 = echarts.init(document.getElementById('main32'))
...@@ -645,9 +424,9 @@ ...@@ -645,9 +424,9 @@
} }
}, },
name: "民警训练总量", name: "民警训练总量",
data: [{"name": "报警数量","value": 10}, data: [{"name": "报警数量","value": this.diviceNum.baoNum},
{"name": "离线数量","value": 30}, {"name": "离线数量","value": this.diviceNum.liNum},
{ "name": "在线数量","value": 100}, ], { "name": "在线数量","value": this.diviceNum.changNum}, ],
}, },
// 边框的设置 // 边框的设置
{ {
......
...@@ -320,7 +320,7 @@ export default { ...@@ -320,7 +320,7 @@ export default {
}); });
} }
this.currentTime(); this.currentTime();
this.$refs.mychild.choice(0); this.$refs.mychild.choice(this.selarr);
this.$refs.mychild2.choice(this.selarr); this.$refs.mychild2.choice(this.selarr);
}, },
methods: { methods: {
...@@ -405,6 +405,7 @@ export default { ...@@ -405,6 +405,7 @@ export default {
this.map.infowindowClose(); this.map.infowindowClose();
this.show = false; this.show = false;
this.$refs.mychild2.choice(this.selarr); this.$refs.mychild2.choice(this.selarr);
this.$refs.mychild.choice(this.selarr);
}, },
sel(index, item) { sel(index, item) {
this.map.infowindowClose(); this.map.infowindowClose();
...@@ -427,6 +428,7 @@ export default { ...@@ -427,6 +428,7 @@ export default {
// this.map.companyFilter(this.selarr); // this.map.companyFilter(this.selarr);
this.map.allfilter(this.selarr, this.selarr1); this.map.allfilter(this.selarr, this.selarr1);
this.$refs.mychild2.choice(this.selarr); this.$refs.mychild2.choice(this.selarr);
this.$refs.mychild.choice(this.selarr);
}, },
sel1(index, item) { sel1(index, item) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment