Commit 910cf076 authored by wuqinghua's avatar wuqinghua

Merge remote-tracking branch 'origin/master'

parents 1998ce49 7ce3c290
......@@ -40,6 +40,8 @@ public class TDeviceInfoController extends BaseController
@Autowired
private ITDetectorInfoService itDetectorInfoService;
@Autowired
private ITDetectorUserService itDetectorUserService;
/**
* 查询设备信息列表
......@@ -217,6 +219,8 @@ public class TDeviceInfoController extends BaseController
{
Map<String,Object> map = itDetectorInfoService.selectDetectorNum(enterpriseId);
Map<String,Object> map1 =tDeviceInfoService.selectDeviceNum(enterpriseId);
Map<String,Object> map2 =itDetectorUserService.selectUserNum();
map.putAll(map2);
map.putAll(map1);
return AjaxResult.success(map);
}
......
......@@ -84,4 +84,10 @@ public interface TDetectorUserMapper
* @return 结果
*/
public int deleteTDetectorUserByIds(Long[] userIds);
/**
* 查询用户数量
* @return
*/
public Map<String,Object> selectUserNum();
}
......@@ -92,4 +92,10 @@ public interface ITDetectorUserService
* @return 结果
*/
public int deleteTDetectorUserById(Long userId);
/**
* 查询用户数量
* @return
*/
public Map<String,Object> selectUserNum();
}
......@@ -211,4 +211,12 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
{
return tDetectorUserMapper.deleteTDetectorUserById(userId);
}
/**
* 用户数量
* @return
*/
public Map<String,Object> selectUserNum(){
return tDetectorUserMapper.selectUserNum();
}
}
......@@ -260,8 +260,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</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
IFNULL(SUM(IF(detector_status=2,1,0)),0) AS baoNum
FROM t_detector_info WHERE is_del = 0
</select>
......
......@@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectTDetectorReportDataList" parameterType="TDetectorReportDataForm" resultType="TDetectorAlarmInfoVO">
select * from(
select rd.id,
rd.cancel_time cancelTime,
rd.detector_code detectorCode,
......@@ -45,7 +46,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="cancelTimeStart != null "> and rd.cancel_time &gt;= #{cancelTimeStart}</if>
<if test="cancelTimeEnd != null "> and rd.cancel_time &lt;= #{cancelTimeEnd}</if>
</where>
ORDER BY rd.create_time desc
union
SELECT rd.id,
rd.cancel_time cancelTime,
rd.detector_code detectorCode,
CONCAT_WS("#",ti.device_name,ti.linkman) unitName,
di.detector_type detectorType,
rd.status_name statusName,
rd.create_time alarmTime,
rd.is_cancel_alarm handledStatus
FROM t_detector_report_data rd
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_relation_device_detail_info ri ON rd.detector_code = ri.iot_no
LEFT JOIN t_device_info ti ON ri.relation_device_id = ti.device_id
<where> ri.relation_device_type = '1' and ri.is_del = '0' and ti.is_del = '0'
<if test="detectorCode != null and detectorCode != ''"> and rd.detector_code = #{detectorCode}</if>
<if test="statusName != null and statusName != ''"> and rd.status_name = #{statusName}</if>
<if test="createTimeStart != null "> and rd.create_time &gt;= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and rd.create_time &lt;= #{createTimeEnd}</if>
<if test="isCancelAlarm != null and isCancelAlarm != ''"> and is_cancel_alarm = #{isCancelAlarm}</if>
<if test="cancelTimeStart != null "> and rd.cancel_time &gt;= #{cancelTimeStart}</if>
<if test="cancelTimeEnd != null "> and rd.cancel_time &lt;= #{cancelTimeEnd}</if>
</where>
union
SELECT rd.id,
rd.cancel_time cancelTime,
rd.detector_code detectorCode,
CONCAT_WS("#",si.site_station_name,si.build_unit) unitName,
di.detector_type detectorType,
rd.status_name statusName,
rd.create_time alarmTime,
rd.is_cancel_alarm handledStatus
FROM t_detector_report_data rd
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_relation_device_detail_info ti ON rd.detector_code = ti.iot_no
LEFT JOIN t_site_station_info si ON ti.relation_device_id = si.site_station_id
<where> ti.relation_device_type = '2' and ti.is_del = '0' and si.is_del = '0'
<if test="detectorCode != null and detectorCode != ''"> and rd.detector_code = #{detectorCode}</if>
<if test="statusName != null and statusName != ''"> and rd.status_name = #{statusName}</if>
<if test="createTimeStart != null "> and rd.create_time &gt;= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and rd.create_time &lt;= #{createTimeEnd}</if>
<if test="isCancelAlarm != null and isCancelAlarm != ''"> and is_cancel_alarm = #{isCancelAlarm}</if>
<if test="cancelTimeStart != null "> and rd.cancel_time &gt;= #{cancelTimeStart}</if>
<if test="cancelTimeEnd != null "> and rd.cancel_time &lt;= #{cancelTimeEnd}</if>
</where>
)t
ORDER BY t.alarmTime DESC
</select>
<select id="selectTDetectorReportDataById" parameterType="Long" resultMap="TDetectorReportDataResult">
......@@ -61,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectTDetectorAlarm" resultType="TDetectorAlarmInfoVO">
select * from(
SELECT
rd.detector_code detectorCode,
CONCAT_WS("#",IFNULL(u.nick_name,IFNULL(di.linkman,di.detector_addr)),di.linkman) unitName,
......@@ -76,7 +123,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_detector_user u ON u.user_id = di.user_id
WHERE u.is_del = '0' and di.is_del = '0' and rd.is_cancel_alarm = '0'
ORDER BY rd.create_time DESC LIMIT 50
union
SELECT
rd.detector_code detectorCode,
CONCAT_WS("#",ti.device_name,ti.linkman) unitName,
di.detector_type detectorType,
rd.status_name statusName,
rd.create_time alarmTime,
IF (
rd.is_cancel_alarm = 0,
'未消除',
'已消除'
) handledStatus
FROM t_detector_report_data rd
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_relation_device_detail_info ri ON rd.detector_code = ri.iot_no
LEFT JOIN t_device_info ti ON ri.relation_device_id = ti.device_id
WHERE ri.relation_device_type = '1' and ri.is_del = '0' and ti.is_del = '0' and rd.is_cancel_alarm = '0'
union
SELECT
rd.detector_code detectorCode,
CONCAT_WS("#",si.site_station_name,si.build_unit) unitName,
di.detector_type detectorType,
rd.status_name statusName,
rd.create_time alarmTime,
IF (
rd.is_cancel_alarm = 0,
'未消除',
'已消除'
) handledStatus
FROM t_detector_report_data rd
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_relation_device_detail_info ti ON rd.detector_code = ti.iot_no
LEFT JOIN t_site_station_info si ON ti.relation_device_id = si.site_station_id
WHERE ti.relation_device_type = '2' and ti.is_del = '0' and si.is_del = '0' and rd.is_cancel_alarm = '0'
)t
ORDER BY t.alarmTime DESC LIMIT 50
</select>
......
......@@ -164,4 +164,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{userId}
</foreach>
</delete>
<select id="selectUserNum" resultType="java.util.HashMap">
SELECT SUM(IF(user_type=1,1,0)) AS juminNum,SUM(IF(user_type=2,1,0)) AS shangNum,
SUM(IF(user_type=3,1,0)) AS gongNum FROM t_detector_user WHERE is_del = 0
</select>
</mapper>
/*
* @Author: your name
* @Date: 2022-02-23 15:28:07
* @LastEditTime: 2022-03-04 17:16:53
* @LastEditTime: 2022-03-08 14:52:13
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /newDev/gassafety-progress/gassafetyprogress-web/src/api/bigWindow/getdevice.js
......@@ -70,6 +70,21 @@ export function getCzDevice(query) {
params: query
})
}
// 设备id :devId 类型 relationDeviceType 1调压箱/阀门井 2场站
export function getTcqDevice(query) {
return request({
url: '/pipe/pipe/selectSensingDevice',
method: 'get',
params: {
pageNum: 1,
pageSize: 20,
...query,
},
})
}
// 监控
export function getVideo(query) {
return request({
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-01 16:29:17
* @LastEditTime: 2022-03-08 16:16:39
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -52,8 +52,6 @@
{{ deviceData.remarks }}
</div>
</div>
</div>
</template>
......@@ -90,7 +88,7 @@ export default {
this.mapClass.infowindowClose();
},
btnClick() {
this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
// this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
},
},
};
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-04 17:25:27
* @LastEditTime: 2022-03-08 15:23:40
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -52,7 +52,7 @@
<div class="middle">{{ profile }}</div>
<div class="foot">
<div class="thead flex">
<div class="thead flex" v-if="list.length>0">
<div class="first">设备类型</div>
<div>设备数量</div>
<div>在线设备</div>
......@@ -90,7 +90,7 @@
</template>
</div>
<div class="btn">
<div class="btn" v-if="list.length>0">
<div @click="btnClick">感知设备</div>
</div>
</div>
......@@ -113,33 +113,33 @@ export default {
3: "探测器",
},
list: [
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 1,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 2,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 3,
},
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 1,
// },
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 2,
// },
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 3,
// },
],
};
},
......@@ -167,11 +167,18 @@ export default {
this.mapClass.infowindowClose();
},
btnClick() {
this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
const title = this.deviceData.deviceName
? this.deviceData.deviceName
: this.deviceData.stationName;
this.vueRoot.getTcqDevice(
{ devId: this.deviceData.siteStationId, relationDeviceType: 2 },
title
);
},
myHttp() {
getCzDevice({ deviceId: this.deviceData.siteStationId }).then((res) => {
this.list = res.data[0].subordinateEquipmentList;
this.list = res.data[0].subordinateEquipmentList.filter(item=>item.numberPressureGauges>0);
console.log("resresres",res)
});
},
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-04 17:27:21
* @LastEditTime: 2022-03-08 15:22:20
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -52,7 +52,7 @@
<div class="middle">{{ profile }}</div>
<div class="foot">
<div class="thead flex">
<div class="thead flex" v-if="list.length > 0">
<div class="first">设备类型</div>
<div>设备数量</div>
<div>在线设备</div>
......@@ -65,7 +65,7 @@
<div
class="tbody flex"
v-for="deviceData in list"
:key="deviceData.inAlarm+Math.random()"
:key="deviceData.inAlarm + Math.random()"
>
<div v-unValue class="first zzz">
{{ typeList[deviceData.dataType] }}
......@@ -90,8 +90,8 @@
</template>
</div>
<div class="btn">
<!-- <div @click="btnClick">感知设备</div> -->
<div class="btn" v-if="list.length>0">
<div @click="btnClick">感知设备</div>
</div>
</div>
</template>
......@@ -112,34 +112,33 @@ export default {
3: "探测器",
},
list: [
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 1,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 2,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 3,
},
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 1,
// },
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 2,
// },
// {
// numberPressureGauges: "-",
// onlineEquipment: "-",
// offlineEquipment: "-",
// historicalAlarm: "-",
// alarmProcessed: "-",
// inAlarm: "-",
// dataType: 3,
// },
],
};
},
......@@ -168,19 +167,33 @@ export default {
this.mapClass.infowindowClose();
},
btnClick() {
this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
// this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
const title = this.deviceData.deviceName
? this.deviceData.deviceName
: this.deviceData.stationName;
this.vueRoot.getTcqDevice(
{ devId: this.deviceData.deviceId, relationDeviceType: 1 },
title
);
},
myHttp() {
console.log(this.deviceData.iconType);
if (this.deviceData.iconType == 2) {
getTyxDevice({ deviceId: this.deviceData.deviceId }).then((res) => {
this.list = res.data[0].subordinateEquipmentList;
// 过滤设备数为0的
this.list = res.data[0].subordinateEquipmentList.filter(
(item) => item.numberPressureGauges > 0
);
console.log(this.list);
});
} else {
getFmDevice({ deviceId: this.deviceData.deviceId }).then((res) => {
this.list = res.data[0].subordinateEquipmentList;
// 过滤设备数为0的
this.list = res.data[0].subordinateEquipmentList.filter(
(item) => item.numberPressureGauges > 0
);
});
}
},
......
<template>
<transition>
<div v-show="show" class="wrapper myCenter">
<div class="left">
<div class="title-wrapper">
<div class="title">{{ title }}报警器列表</div>
<div class="close" @click="close">
<img src="@/assets/mapImages/closeBtn.png" alt="" />
</div>
</div>
<div class="bottom right-bottom-data-left">
<el-table
size="mini"
:data="tableData"
style="width: 100%"
class="el-bottom"
:key="Math.random()"
>
<!-- :height="tableHeight" -->
<el-table-column prop="deviceCode" label="设备编号" width="180">
<template slot-scope="scope">
<div :title="scope.row.deviceCode" class="ddd" v-unValue>
{{ scope.row.deviceCode }}
</div>
</template>
</el-table-column>
<el-table-column prop="deviceName" label="设备名称" width="150">
<template slot-scope="scope">
<div :title="scope.row.deviceName" class="ddd" v-unValue>
{{ scope.row.deviceName }}
</div>
</template>
</el-table-column>
<el-table-column prop="detectionMedium" label="监测介质" width="">
<template slot-scope="scope">
<div v-unValue>{{ scope.row.detectionMedium }}</div>
</template>
</el-table-column>
<el-table-column prop="linkman" label="联系人" width="100">
<template slot-scope="scope">
<div v-unValue>{{ scope.row.linkman }}</div>
</template>
</el-table-column>
<el-table-column prop="phone" label="联系电话" width="">
</el-table-column>
<el-table-column prop="detectorStatus" label="设备状态" width="100">
<template slot-scope="scope">
<div v-unValue>{{ detectorStatusList[scope.row.detectorStatus] }}</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="预警时间" width="180">
<template slot-scope="scope">
<div v-unValue>{{ scope.row.createTime }}</div>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination
@current-change="handleCurrentChangvale"
:page-size="pageSize"
layout="prev, pager, next, jumper"
:total="total"
:hide-on-single-page="total <= pageSize"
:key="total + '' + pageSize"
>
</el-pagination>
</div>
</div>
</div>
</div>
</transition>
</template>
<script>
// import Velocity from "velocity-animate";
// import { listDeviceAlarm } from "@/api/dataMonitoring/deviceAlarm";
import { listDetectorInfo } from "@/api/detector/detectorInfo";
export default {
props: {
detcetorList: {
type: Array,
default: () => [],
},
show: {
type: Boolean,
},
title: {
type: String,
},
userId: {
type: [Number, String],
},
total: {
type: Number,
},
pageSize: {
type: Number,
},
},
data() {
return {
// 动画效果的切换
// tableHeight: 600,
tableData: [
// {
// deviceCode: "2016-05-05",
// name: "王小虎",
// province: "上海",
// city: "普陀区",
// address: "上海市普陀区金沙江路",
// },
],
detectorStatusList:{
"0":"在线",
"1":"离线",
}
};
},
created() {
console.log("list", this.detcetorList);
// this.getList();
},
watch: {
// 当组件显示的时候
detcetorList(newData) {
// console.log(bol);
// if (bol) {
console.log(newData);
this.tableData = [...newData];
// }
},
},
methods: {
handleSizeChange(val) {
console.log(val);
},
handleCurrentChangvale(val) {
this.$parent.getTcqDevice(
{
devId: this.userId,
pageNum: val,
pageSize: this.pageSize,
},
this.title
);
},
close() {
// this.fade = "fade";
this.$parent.otherCenterShow = false;
},
},
};
</script>
<style lang="scss" scoped>
.wrapper {
// width: 978px;
max-height: 600px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -300px;
margin-left: -500px;
// background-color: #fff;
display: flex;
justify-content: space-between;
z-index: 9999;
& > div {
}
.left {
// width: 100px;
max-height: 598px;
margin-right: 12px;
// box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.16);
// background-color: #fff;
// color: #fff;
font-size: 14px;
font-weight: 400;
.title-wrapper {
width: 100%;
height: 30px;
display: flex;
justify-content: space-between;
background: #1890ff;
padding: 5px;
.title {
width: 100%;
color: #fff;
text-align: center;
}
.close {
box-sizing: border-box;
padding-top: 2px;
padding-right: 5px;
cursor: pointer;
}
}
.el-table__body-wrappe {
height: 140px !important;
}
.top {
height: 19px;
// background-color: #053b6a;
color: #fff;
// line-height: 32px;
// padding-left: 12px;
position: relative;
.title {
position: absolute;
left: 50%;
margin-left: -92px;
top: -5px;
}
.repeat {
position: absolute;
top: -5px;
right: 160px;
color: #fff;
cursor: pointer;
&:hover {
color: #2788ea;
}
}
.repeat2 {
position: absolute;
right: 206px;
color: #67c23a;
}
.more {
position: absolute;
right: 38px;
top: -5px;
color: #fff;
float: right;
margin-right: 20px;
cursor: pointer;
&:hover {
color: #2788ea;
}
}
}
.bottom {
width: 1000px;
margin: 0 auto;
position: relative;
}
}
.right {
width: 740px;
display: flex;
flex-wrap: wrap;
// justify-content: space-between;
align-content: flex-start;
// margin-top: 7px;
& > .right-content {
background-color: #fff;
width: 238px;
height: 82px;
margin-bottom: 29px;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.16);
margin-right: 10px;
display: flex;
&.three {
margin-right: 0px;
}
// align-items: center;
.text-icon {
line-height: 82px;
padding-left: 22px;
margin-right: 22px;
i {
color: #053b6a;
font-size: 60px;
}
}
.text {
font-size: 14px;
padding-top: 16px;
.top {
color: #000;
margin-bottom: 10px;
font-weight: 600;
}
.bottom {
color: #2788ea;
}
}
}
}
.iconfont {
cursor: pointer;
}
// 单独调整下最后一个icon的大小
.iconFontSize {
font-size: 50px !important;
}
}
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-03 11:51:48
* @LastEditTime: 2022-03-07 14:02:43
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -80,6 +80,7 @@
<script>
import { companyType, deviceType } from "@/utils/mapClass/config.js";
import { listDetectorInfo } from "@/api/detector/detectorInfo";
import { detectorUserList } from "@/api/detector/detectorUser";
export default {
......@@ -115,6 +116,7 @@ export default {
btnClick() {
// this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
this.vueRoot.getDetectorInfoList(
listDetectorInfo,
{ userId: this.deviceData.userId },
this.deviceData.nickName
);
......
<template>
<transition
>
<transition>
<div v-show="show" class="wrapper myCenter">
<div class="left">
<div class="title-wrapper">
......@@ -14,7 +13,6 @@
size="mini"
:data="tableData"
style="width: 100%"
class="el-bottom"
:key="Math.random()"
>
......@@ -73,12 +71,13 @@
<script>
// import Velocity from "velocity-animate";
// import { listDeviceAlarm } from "@/api/dataMonitoring/deviceAlarm";
import { listDetectorInfo } from "@/api/detector/detectorInfo";
export default {
props: {
detcetorList: {
type: Array,
default:()=>[],
default: () => [],
},
show: {
type: Boolean,
......@@ -109,7 +108,6 @@ export default {
// address: "上海市普陀区金沙江路",
// },
],
};
},
created() {
......@@ -134,6 +132,7 @@ export default {
},
handleCurrentChangvale(val) {
this.$parent.getDetectorInfoList(
listDetectorInfo,
{
userId: this.userId,
pageNum: val,
......@@ -144,7 +143,7 @@ export default {
},
close() {
// this.fade = "fade";
this.$parent.centerShow = false;
this.$parent.userCenterShow = false;
},
},
};
......
......@@ -15,11 +15,11 @@
</div>
<div class="left-top" style="margin-top: 40px;width: 430px;margin-left: 10px;display: flex;justify-content: space-around;">
<div style="width: 40%;text-align: center;color: #339CC9;">
<div class="div-p">从业人员数</div>
<div class="div-p" @click="$router.push('/regulation/supervise')">从业人员数</div>
<span style="font-family: 'arialbd';font-size: 35px;background-image:-webkit-linear-gradient(bottom,#f0c41b,#e4dbb7);-webkit-background-clip:text;-webkit-text-fill-color:transparent; ">{{allNum.peopleNum}}</span>
</div>
<div style="width: 40%;text-align: center;color: #339CC9;">
<div class="div-p">管道长度(m)</div>
<div class="div-p" @click="$router.push('/regulation/pipe')">管道长度(m)</div>
<span style="font-family: 'arialbd';font-size: 35px;background-image:-webkit-linear-gradient(bottom,#f86742,#f0c41b);-webkit-background-clip:text;-webkit-text-fill-color:transparent; ">{{allNum.allPipeLength}}</span>
</div>
</div>
......@@ -43,11 +43,11 @@
<!-- 任务完成率 -->
<div>
<div class="item1" style="margin-top: 30px;">
<div class="item1" style="margin-top: 25px;">
<span class="dot">
<span class="dot-inner"></span>
</span>
<span style="letter-spacing :3px;color:#cddbe4">任务完成率</span>
<span style="letter-spacing :3px;color:#cddbe4;cursor:pointer;" @click="$router.push('/operationMonitor/workOrder')">任务完成率</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>
......@@ -201,6 +201,10 @@
color: "#00ffff"
}
},
grid: {
bottom: "7%",
containLabel: true,
},
tooltip: {
trigger: 'item',
},
......@@ -243,7 +247,7 @@
padding: [0, -55],
rich: {
a_set: {
color: "#fff",
color: "#cddbe4",
lineHeight: 20,
align: "center",
padding: [55, -40, -15, -40],
......@@ -378,7 +382,6 @@
height: 30px;
font-size: 18px;
line-height: 30px;
color: #ffffff;
padding-left: 10px;
font-weight: 700;
font-style: italic;
......@@ -443,6 +446,7 @@
background: url('../../assets/mapImages/div-p.png');
background-repeat: no-repeat;
background-size: 100% 100%;
cursor: pointer;
}
.div-el{
......
<template>
<div style="height: 100%">
<!-- 报警信息 -->
<!-- 预警信息 -->
<div>
<div class="item1">
<span class="dot">
<span class="dot-inner"></span>
</span>
<span style="letter-spacing: 3px; color: #cddbe4">预警信息</span>
<span
style="letter-spacing: 3px; color: #cddbe4; cursor: pointer"
@click="$router.push('/operationMonitor/operationMonitor')"
>预警信息</span
>
<div
class="fong-div"
style="
......@@ -92,8 +95,6 @@
</div>
</div>
<!-- 用户安全监控设备 -->
<div>
<div class="item1">
......@@ -140,63 +141,109 @@
></div>
</div>
</div>
<div class="outuser">
<div class="outuserone">
<p>燃气用户数量</p>
<span class="outuserspan">{{ diviceNum.userNum }}</span>
<div class="inuser">
<div class="outuserleft">
<div class="outuserone">
<p>燃气用户数量</p>
<!-- <span class="outuserspan">{{ diviceNum.userNum }}</span> -->
</div>
<div id="huanleft" style="width: 235px; height: 170px"></div>
<div class="inyuan">
<div style="letter-spacing: 2px">用户总数</div>
<span
style="
font-family: 'arialbd';
letter-spacing: 2px;
color: #00ffff;
font-size: 20px;
"
>{{
diviceNum.juminNum + diviceNum.shangNum + diviceNum.gongNum
}}</span
>
</div>
<div class="usernum">
<div class="usernumin in4">
<span></span>
<span style="color: #cddbe4">居民用户 </span>
<span style="font-family: 'arialbd'; letter-spacing: 2px">
: {{ diviceNum.juminNum }}</span
>
</div>
<div class="usernumin in5">
<span></span>
<span style="color: #cddbe4">商业用户 </span>
<span style="font-family: 'arialbd'; letter-spacing: 2px">
: {{ diviceNum.shangNum }}</span
>
</div>
<div class="usernumin in6">
<span></span>
<span style="color: #cddbe4">工业用户 </span>
<span style="font-family: 'arialbd'; letter-spacing: 2px">
: {{ diviceNum.gongNum }}</span
>
</div>
</div>
</div>
<div class="outusertwo">
<p>安全设备数量</p>
<span class="outuserspan">{{
diviceNum.baoNum + diviceNum.changNum + diviceNum.liNum
}}</span>
</div>
</div>
<div id="huan" style="width: 450px; height: 170px"></div>
<div class="inyuan">
<div style="letter-spacing: 2px">设备总数</div>
<span
style="
font-family: 'arialbd';
letter-spacing: 2px;
color: #00ffff;
font-size: 20px;
"
>{{ diviceNum.baoNum + diviceNum.changNum + diviceNum.liNum }}</span
>
</div>
<div class="usernum">
<div class="usernumin in1">
<span></span>
<span style="color: #fff">在线数量 </span>
<span style="font-family: 'arialbd'; letter-spacing: 2px">
: {{ diviceNum.changNum }}</span
>
</div>
<div class="usernumin in2">
<span></span>
<span style="color: #fff">离线数量 </span>
<span style="font-family: 'arialbd'; letter-spacing: 2px">
: {{ diviceNum.liNum }}</span
>
</div>
<div class="usernumin in3">
<span></span>
<span style="color: #fff">报警数量 </span>
<span style="font-family: 'arialbd'; letter-spacing: 2px">
: {{ diviceNum.baoNum }}</span
>
<div class="outuserright">
<div class="outusertwo">
<p>安全设备数量</p>
<!-- <span class="outuserspan">{{
diviceNum.baoNum + diviceNum.changNum + diviceNum.liNum
}}</span> -->
</div>
<div id="huanright" style="width: 235px; height: 170px"></div>
<div class="inyuan">
<div style="letter-spacing: 2px">设备总数</div>
<span
style="
font-family: 'arialbd';
letter-spacing: 2px;
color: #00ffff;
font-size: 20px;
"
>{{ diviceNum.baoNum + diviceNum.changNum + diviceNum.liNum }}</span
>
</div>
<div class="usernum">
<div class="usernumin in1">
<span></span>
<span style="color: #cddbe4">在线 </span>
<span style="font-family: 'arialbd'; letter-spacing: 2px">
: {{ diviceNum.changNum }}</span
>
</div>
<div class="usernumin in2">
<span></span>
<span style="color: #cddbe4">离线 </span>
<span style="font-family: 'arialbd'; letter-spacing: 2px">
: {{ diviceNum.liNum }}</span
>
</div>
<div class="usernumin in3">
<span></span>
<span style="color: #cddbe4">报警 </span>
<span style="font-family: 'arialbd'; letter-spacing: 2px">
: {{ diviceNum.baoNum }}</span
>
</div>
</div>
</div>
</div>
<!-- 资源统计 -->
<div>
<div class="item1" style="margin-top: 10px">
<div class="item1" style="margin-top: 15px">
<span class="dot">
<span class="dot-inner"></span>
</span>
<span style="letter-spacing: 3px; color: #cddbe4">资源统计</span>
<span
style="letter-spacing: 3px; color: #cddbe4; cursor: pointer"
@click="$router.push('/regulation/station')"
>资源统计</span
>
<div
class="fong-div"
style="
......@@ -240,9 +287,6 @@
>
<div id="myChartone" :style="{ width: '420px', height: '240px' }"></div>
</div>
</div>
</template>
......@@ -281,7 +325,7 @@ export default {
changeTimer: false,
repeatFinshed: false,
tableHeight: 230,
tableHeight: 215,
tableData: [],
scrollHeight: 0,
};
......@@ -314,7 +358,7 @@ export default {
);
// 列表
const select = this.$refs.table.$el
.querySelector(".el-table__body-wrapper")
?.querySelector(".el-table__body-wrapper")
.querySelector(".el-table__body");
setTimeout(() => {
......@@ -330,7 +374,7 @@ export default {
console.log("滚动");
} else {
this.alarmTimerAni();
console.log("不滚动");
console.log("不滚动-----------------------------");
}
// 列表大的时候鼠标移入移出就会触发暂停,否则就return
this.changeTimer = heightSelect > heightWrapper;
......@@ -394,8 +438,8 @@ export default {
grid: {
top: "8%",
left: "8%",
right: "8%",
bottom: "13%",
right: "4%",
bottom: "10%",
containLabel: true,
},
xAxis: {
......@@ -506,12 +550,96 @@ export default {
});
},
drawLine3() {
// 基于准备好的dom,初始化echarts实例
let myChart31 = echarts.init(document.getElementById("huan"));
// let myChart32 = echarts.init(document.getElementById('main32'))
let myChart31 = echarts.init(document.getElementById("huanleft"));
let myChart32 = echarts.init(document.getElementById('huanright'))
// 绘制图表
myChart31.setOption({
color: ["#91cc75", "#5470c6", "#fa8167" ],
grid: {
left: 0,
// right: 0,
bottom: 0,
top: 0,
containLabel: true,
},
// grid: {
// bottom: 150,
// left: 100,
// right: '10%'
// },
series: [
// 主要展示层的
{
radius: ["75%", "65%"],
center: ["50%", "50%"],
type: "pie",
itemStyle: {
borderRadius: 20,
},
label: {
normal: {
show: false,
textStyle: {
fontSize: 13,
},
position: "outside",
},
emphasis: {
show: false,
},
},
labelLine: {
normal: {
show: false,
length: 20,
length2: 35,
},
emphasis: {
show: true,
},
},
name: "民警训练总量",
data: [
{ name: "居民用户", value: this.diviceNum.juminNum },
{ name: "商业用户", value: this.diviceNum.shangNum },
{ name: "工业用户", value: this.diviceNum.gongNum },
],
},
// 边框的设置
{
name: "外边框",
type: "pie",
clockWise: false, //顺时加载
hoverAnimation: false, //鼠标移入变大
center: ["50%", "50%"],
radius: ["80%", "80%"],
label: {
normal: {
show: false,
},
},
data: [
{
value: 9,
name: "",
itemStyle: {
normal: {
borderWidth: 2,
borderColor: "#61bad3",
},
},
},
],
},
],
});
myChart32.setOption({
color: ["#FF4040", "#F0C41B", "#188DF0"],
grid: {
left: 0,
......@@ -663,7 +791,6 @@ export default {
height: 30px;
font-size: 18px;
line-height: 30px;
color: #ffffff;
padding-left: 10px;
font-weight: 700;
font-style: italic;
......@@ -723,23 +850,31 @@ export default {
transform: scale(2.4);
}
}
.outuser {
width: 450px;
height: 60px;
.inuser {
width: 100%;
height: 265px;
}
.outuserone {
.outuserleft {
width: 50%;
height: 100%;
text-align: center;
float: left;
color: #e8f2ff;
}
.outusertwo {
.outuserright {
width: 50%;
height: 100%;
text-align: center;
float: right;
color: #e8f2ff;
}
.outuserone {
width: 100%;
height: 20px;
text-align: center;
color: #cddbe4;
}
.outusertwo {
width: 100%;
height: 20px;
text-align: center;
color: #cddbe4;
}
.outuserspan {
font-family: "arialbd";
......@@ -749,9 +884,7 @@ export default {
}
.usernum {
width: 100%;
height: 20px;
display: flex;
justify-content: space-around;
text-align: center;
}
.usernumin {
font-size: 15px;
......@@ -765,6 +898,15 @@ export default {
.in3 {
color: #ff4040;
}
.in4 {
color: #91cc75;
}
.in5 {
color: #5470c6;
}
.in6 {
color: #fa8167;
}
.inyuan {
width: 106px;
height: 106px;
......@@ -773,9 +915,9 @@ export default {
position: fixed;
margin-bottom: 10px;
margin-top: -138px;
margin-left: 172px;
margin-left: 64px;
font-size: 15px;
color: #fff;
color: #cddbe4;
text-align: center;
line-height: 25px;
padding: 28px 0px 0px 0px;
......
<!--
* @Author: your name
* @Date: 2022-01-11 13:44:17
* @LastEditTime: 2022-03-04 14:34:32
* @LastEditTime: 2022-03-08 16:21:04
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/views/Home.vue
......@@ -12,16 +12,25 @@
<div class="goSystem" @click="$router.push('/index')">进入管理系统</div>
<div id="map"></div>
<Center :show="show" :centerData="centerData" />
<!-- <Center :show="show" :centerData="centerData" /> -->
<UserCenter
:title="centerTitle"
:show="centerShow"
:show="userCenterShow"
ref="userCenter"
:detcetorList="detcetorList"
:userId="centerUserId"
:total="centerTotal"
:pageSize="20"
/>
<OtherCenter
:title="centerTitle"
:show="otherCenterShow"
ref="otherCenter"
:detcetorList="detcetorList"
:userId="centerUserId"
:total="centerTotal"
:pageSize="20"
/>
<PipeColor />
<!-- 底部按钮 -->
<div class="home-div">
......@@ -157,6 +166,7 @@ import {
getUser,
getEnterprise,
userAlarm,
getTcqDevice
} from "@/api/bigWindow/getDevice";
import Line from "@/components/bigWindow/Line.vue";
import VideoView from "@/components/bigWindow/VideoView.vue";
......@@ -165,6 +175,7 @@ import Cz from "@/components/bigWindow/Cz.vue";
import User from "@/components/bigWindow/User.vue";
import Center from "@/components/bigWindow/Center.vue";
import UserCenter from "@/components/bigWindow/UserCenter.vue";
import OtherCenter from "@/components/bigWindow/OtherCenter.vue";
import Company from "@/components/bigWindow/Company.vue";
import PipeColor from "@/components/bigWindow/PipeColor.vue";
......@@ -178,6 +189,7 @@ export default {
rightBar,
Center,
UserCenter,
OtherCenter,
PipeColor,
},
data() {
......@@ -185,7 +197,7 @@ export default {
map: null,
show: false,
centerData: null,
// centerData: null,
selarr: [1, 2, 3],
weather: "",
lower: "",
......@@ -250,9 +262,13 @@ export default {
detcetorList: [],
centerUserId: null,
centerTotal: null,
centerShow: false,
userCenterShow: false,
centerTitle: "",
// 其他设备的center数据
// 除了这个值,用来显示隐藏,其他值与user共用
otherCenterShow:false,
// 报警轮询timer
alarmTimer: null,
};
......@@ -327,6 +343,7 @@ export default {
// console.log("查询报警");
}, alarmtime);
});
}
this.currentTime();
this.$refs.mychild.choice(this.selarr);
......@@ -396,11 +413,11 @@ export default {
myCenterShow(boolean) {
this.show = boolean;
},
centerDataFunc(centerData) {
this.centerData = centerData;
console.log(centerData);
this.show = true;
},
// centerDataFunc(centerData) {
// this.centerData = centerData;
// console.log(centerData);
// this.show = true;
// },
allCompany() {
if (this.selarr.length == this.companyLength) {
......@@ -450,24 +467,42 @@ export default {
this.map.allfilter(this.selarr, this.selarr1);
},
//用户的设备center
getDetectorInfoList(queryParams, title) {
getDetectorInfoList(httpFunc,queryParams, title) {
console.log(queryParams);
return listDetectorInfo(queryParams).then((res) => {
console.log("queryParams", res);
return httpFunc(queryParams).then((res) => {
// console.log("queryParams", res);
if (res.code == 200) {
this.detcetorList = res.rows;
this.centerUserId = queryParams.userId;
// 总数据
this.centerTotal = res.total;
// this.$refs.userCenter.fade = "fade";
this.centerShow = true;
this.userCenterShow = true;
this.centerTitle = title;
// 传递回去
return res.code;
}
});
},
// 调压箱,阀门,场站睇下的设备
getTcqDevice(queryParams, title) {
console.log(queryParams);
return getTcqDevice(queryParams).then((res) => {
// console.log("queryParams", res);
console.log("resresresresreszzzzzzzzzzzzzzz",res)
this.detcetorList = res;
this.centerUserId = queryParams.devId;
// 总数据
this.centerTotal = res.length;
// this.$refs.userCenter.fade = "fade";
this.otherCenterShow = true;
this.centerTitle = title;
// 传递回去
return res.code;
});
},
currentTime() {
setInterval(() => {
this.formatDate();
......@@ -504,6 +539,7 @@ export default {
if (this.formatDate) {
clearInterval(this.formatDate); // 在Vue实例销毁前,清除时间定时器
}
// 报警
if (this.alarmTimer) {
clearInterval(this.alarmTimer);
}
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
<el-form :model="queryParams" ref="queryParams" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="设备编号" prop="detectorCode">
<el-input
v-model="queryParams.detectorCode"
......@@ -67,15 +67,15 @@
<span>{{ scope.row.cancelTime }}</span>
</template>
</el-table-column>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
......@@ -134,7 +134,16 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams = {
pageNum: 1,
pageSize: 10,
detectorCode: null,
statusName: null,
isCancelAlarm: null,
createTimeStart: null,
createTimeEnd: null
}
this.resetForm("queryParams");
this.handleQuery();
},
}
......
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