Merge remote-tracking branch 'origin/master'

dev
Wen JY 1 year ago
commit cac6b971fb

File diff suppressed because it is too large Load Diff

@ -195,9 +195,9 @@ public class HwMonitorPlatformController extends BaseController {
* @param sceneId id
* */
@PostMapping("/getDeviceOperations")
public Integer selectTdengine(String beginTime,String endTime,Long sceneId){
int ints = hwMonitorUnitService.selectTdengine(beginTime,endTime,sceneId);
return ints;
public int[] selectTdengine(String beginTime,String endTime,Long sceneId){
int ints[] = hwMonitorUnitService.selectTdengine(beginTime,endTime,sceneId);
return ints;
}
/**
*

@ -0,0 +1,245 @@
package com.ruoyi.business.domain.VO;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
* @ClassName : HwSceneVo
* @Description :
* @Author :
* @Date: 2023-09-12 14:28
*/
public class HwSceneVo extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 场景ID */
private Long sceneId;
/** 场景名称 */
@Excel(name = "场景名称")
private String sceneName;
/** 租户ID关联hw_tenant的tenant_id */
@Excel(name = "租户ID关联hw_tenant的tenant_id")
private Long tenantId;
private String tenantName;
/** 场景类型关联表hw_scene_mode的scene_mode_id */
@Excel(name = "场景类型关联表hw_scene_mode的scene_mode_id")
private Long sceneModeId;
private String sceneModeName;
/** 场景图片地址 */
@Excel(name = "场景图片地址")
private String scenePic;
/** 是否默认1、正常 0、否 */
@Excel(name = "是否默认", readConverterExp = "1=、正常,0=、否")
private String defaultFlag;
/** 状态1、正常 9、删除 */
@NotNull(message = "{user.login.username}")
@Excel(name = "状态", readConverterExp = "1=、正常,9=、删除")
private String sceneStatus;
/** 认证方式1、密钥认证 */
@Excel(name = "认证方式", readConverterExp = "1=、密钥认证")
private String authMode;
/** 场景账号(暂时不用) */
@Excel(name = "场景账号", readConverterExp = "暂=时不用")
private String modeAccount;
/** 场景key一场景一密 */
@Excel(name = "场景key", readConverterExp = "一=场景一密")
private String modeKey;
/** 场景secret */
@Excel(name = "场景secret")
private String modeSecret;
/** 保存周期(单位默认90天 */
@Excel(name = "保存周期(单位默认90天")
private BigDecimal preserveTime;
/** 测试环境保存周期(单位默认30天 */
@Excel(name = "测试环境保存周期(单位默认30天")
private BigDecimal testPreserveTime;
/** 预留字段租户环境0测试环境1正式环境 */
@Excel(name = "预留字段,租户环境", readConverterExp = "0=测试环境1正式环境")
private String sceneEnvironment;
/** 预留字段 */
@Excel(name = "预留字段")
private String sceneField;
private String contactName;
private String contactPhone;
public Long getSceneId() {
return sceneId;
}
public void setSceneId(Long sceneId) {
this.sceneId = sceneId;
}
public String getSceneName() {
return sceneName;
}
public void setSceneName(String sceneName) {
this.sceneName = sceneName;
}
public Long getTenantId() {
return tenantId;
}
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
public String getTenantName() {
return tenantName;
}
public void setTenantName(String tenantName) {
this.tenantName = tenantName;
}
public Long getSceneModeId() {
return sceneModeId;
}
public void setSceneModeId(Long sceneModeId) {
this.sceneModeId = sceneModeId;
}
public String getSceneModeName() {
return sceneModeName;
}
public void setSceneModeName(String sceneModeName) {
this.sceneModeName = sceneModeName;
}
public String getScenePic() {
return scenePic;
}
public void setScenePic(String scenePic) {
this.scenePic = scenePic;
}
public String getDefaultFlag() {
return defaultFlag;
}
public void setDefaultFlag(String defaultFlag) {
this.defaultFlag = defaultFlag;
}
public String getSceneStatus() {
return sceneStatus;
}
public void setSceneStatus(String sceneStatus) {
this.sceneStatus = sceneStatus;
}
public String getAuthMode() {
return authMode;
}
public void setAuthMode(String authMode) {
this.authMode = authMode;
}
public String getModeAccount() {
return modeAccount;
}
public void setModeAccount(String modeAccount) {
this.modeAccount = modeAccount;
}
public String getModeKey() {
return modeKey;
}
public void setModeKey(String modeKey) {
this.modeKey = modeKey;
}
public String getModeSecret() {
return modeSecret;
}
public void setModeSecret(String modeSecret) {
this.modeSecret = modeSecret;
}
public BigDecimal getPreserveTime() {
return preserveTime;
}
public void setPreserveTime(BigDecimal preserveTime) {
this.preserveTime = preserveTime;
}
public BigDecimal getTestPreserveTime() {
return testPreserveTime;
}
public void setTestPreserveTime(BigDecimal testPreserveTime) {
this.testPreserveTime = testPreserveTime;
}
public String getSceneEnvironment() {
return sceneEnvironment;
}
public void setSceneEnvironment(String sceneEnvironment) {
this.sceneEnvironment = sceneEnvironment;
}
public String getSceneField() {
return sceneField;
}
public void setSceneField(String sceneField) {
this.sceneField = sceneField;
}
@Override
public String toString() {
return "HwSceneVo{" +
"sceneId=" + sceneId +
", sceneName='" + sceneName + '\'' +
", tenantId=" + tenantId +
", tenantName='" + tenantName + '\'' +
", sceneModeId=" + sceneModeId +
", sceneModeName='" + sceneModeName + '\'' +
", scenePic='" + scenePic + '\'' +
", defaultFlag='" + defaultFlag + '\'' +
", sceneStatus='" + sceneStatus + '\'' +
", authMode='" + authMode + '\'' +
", modeAccount='" + modeAccount + '\'' +
", modeKey='" + modeKey + '\'' +
", modeSecret='" + modeSecret + '\'' +
", preserveTime=" + preserveTime +
", testPreserveTime=" + testPreserveTime +
", sceneEnvironment='" + sceneEnvironment + '\'' +
", sceneField='" + sceneField + '\'' +
'}';
}
}

@ -21,6 +21,7 @@ public interface HwDeviceMapper
*/
public HwDevice selectHwDeviceByDeviceId(Long deviceId);
List<HwDevice> selectDeviceByMonitorId(Long monitorUnitId);
Integer selectSumDeviceFlagNot0();
/**
* 3.

@ -1,61 +0,0 @@
package com.ruoyi.business.mapper;
import java.util.List;
import com.ruoyi.business.domain.HwDeviceModeFunction;
/**
* Mapper
*
* @author xins
* @date 2023-09-05
*/
public interface HwDeviceModeFunctionMapper
{
/**
*
*
* @param modeFunctionId
* @return
*/
public HwDeviceModeFunction selectHwDeviceModeFunctionByModeFunctionId(Long modeFunctionId);
/**
*
*
* @param hwDeviceModeFunction
* @return
*/
public List<HwDeviceModeFunction> selectHwDeviceModeFunctionList(HwDeviceModeFunction hwDeviceModeFunction);
/**
*
*
* @param hwDeviceModeFunction
* @return
*/
public int insertHwDeviceModeFunction(HwDeviceModeFunction hwDeviceModeFunction);
/**
*
*
* @param hwDeviceModeFunction
* @return
*/
public int updateHwDeviceModeFunction(HwDeviceModeFunction hwDeviceModeFunction);
/**
*
*
* @param modeFunctionId
* @return
*/
public int deleteHwDeviceModeFunctionByModeFunctionId(Long modeFunctionId);
/**
*
*
* @param modeFunctionIds
* @return
*/
public int deleteHwDeviceModeFunctionByModeFunctionIds(Long[] modeFunctionIds);
}

@ -40,7 +40,7 @@ public interface HwMonitorUnitMapper
* */
public List<HwMonitorUnit> selectLimitSubMonitorUnit();
Integer selectReleatedDeviceIdNums(Long deviceCode);
Integer selectDeviceNums();
String selectDeviceNums();
Integer selectSubDeviceSum(Long sceneId);
/**

@ -71,7 +71,7 @@ public interface IHwMonitorUnitService
* tdengine
*
* @return*/
public int selectTdengine(String beginTime,String endTime,Long sceneId);
public int[] selectTdengine(String beginTime, String endTime, Long sceneId);
/**
*
*

@ -8,16 +8,13 @@ import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
import com.github.pagehelper.PageHelper;
import com.ruoyi.business.domain.HwDevice;
import com.ruoyi.business.domain.HwElectronicFence;
import com.ruoyi.business.domain.VO.*;
import com.ruoyi.business.mapper.HwDeviceMapper;
import com.ruoyi.business.mapper.HwElectronicFenceMapper;
import com.ruoyi.common.core.constant.TdEngineConstants;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.system.api.domain.SysDept;
import com.ruoyi.tdengine.api.RemoteTdEngineService;
import com.ruoyi.tdengine.api.domain.DeviceStatus;
import com.ruoyi.tdengine.api.domain.TdSelectDto;
@ -108,17 +105,38 @@ public class HwMonitorUnitServiceImpl implements IHwMonitorUnitService
public AllNumsVo selectAllNums() {
//监控单元
String monitor = hwMonitorUnitMapper.selectSubSetNums();
Integer integer = hwMonitorUnitMapper.selectDeviceNums();
String integer = hwMonitorUnitMapper.selectDeviceNums();
System.out.println(monitor+" dsaas "+integer);
Integer monitor1 = 0;
Integer monitor2 = 0;
AllNumsVo vo = new AllNumsVo();
vo.setSubSum(Integer.valueOf(monitor));
vo.setSum(integer);
if (monitor == null){
monitor1 = 0;
}
else {
monitor1 = Integer.valueOf(monitor);
}
if (integer == null){
monitor2 = 0;
}
else {
monitor2 = Integer.valueOf(integer);
}
vo.setSubSum(monitor1);
vo.setSum(monitor2);
return vo;
}
public static void main(String[] args) {
String str1 = "1";
String str2 = null;
int q = Integer.valueOf(str2);
System.out.println(q);
}
@Override
public List<AllNumsVo> selectSenceAllNums() {
List<AllNumsVo> allNumsVos = hwMonitorUnitMapper.selectAllNums();
@ -191,7 +209,7 @@ public class HwMonitorUnitServiceImpl implements IHwMonitorUnitService
@Override
// 加一个begintime参数endtime参数 stream时间戳 从开始时间0点开始结束时间23.59.59结束
public int selectTdengine(String beginTime,String endTime,Long sceneId) {
public int[] selectTdengine(String beginTime, String endTime, Long sceneId) {
DeviceStatus queryDeviceStatus = new DeviceStatus();
Map<String, Object> params = queryDeviceStatus.getParams();
@ -209,21 +227,21 @@ public class HwMonitorUnitServiceImpl implements IHwMonitorUnitService
if (sceneId != null) {
queryDeviceStatus.setSceneId(sceneId);
}
int value = 0;
int sum = 0;
int values[] = new int[10];
//todo 使用id(以解决)
//map key时间戳value List<DeviceStatus> 对象
List<DeviceStatus> list = (List<DeviceStatus>) remoteTdEgineService.getOnlineDevicesGroupByDay(queryDeviceStatus);
for (int i = 0; i < list.size(); i++) {
if (list.get(i).getDeviceType()==1) {
sum =sum+ hwMonitorUnitMapper.selectReleatedDeviceIdNums(list.get(i).getDeviceId());
values[i]=hwMonitorUnitMapper.selectReleatedDeviceIdNums(list.get(i).getDeviceId());
}
else {
value++;
values[i] = hwDeviceMapper.selectSumDeviceFlagNot0();
}
value = value+sum;
}
return value;
return values;
//设备类型==网关 根据releated_device_id = 网关设备设备id查询个数
//网关子设备数+非网关设备数getDeviceType()=1

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.business.mapper.HwDeviceMapper">
<resultMap type="HwDevice" id="HwDeviceResult">
<result property="deviceId" column="device_id" />
<result property="deviceCode" column="device_code" />
@ -32,27 +32,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="deviceField" column="device_field" />
<result property="tenantId" column="tenant_id" />
<result property="onlineStatus" column="online_status" />
</resultMap>
<!--以下为监控平台接口所用-->
<resultMap id="DeviceModeVoResult" type="com.ruoyi.business.domain.VO.DeviceModeVo" >
<result property="deviceModeName" column="device_mode_name"/>
<result property="sum" column="sum"/>
<result property="err" column="err"/>
</resultMap>
<sql id="selectHwDeviceVo">
select device_id, device_code, device_name, scene_id, monitor_unit_id, device_type, networking_mode, access_protocol, data_format, releated_device_id, device_mode_id, access_gw_protocol, active_status, device_status, active_time, device_pic, ip_address, area_id, device_location, current_module_version, current_singlechip_version, remark, create_by, create_time, update_by, update_time, device_field from hw_device
</sql>
<select id="selectDeviceModeNameVo" resultMap="DeviceModeVoResult">
SELECT b.device_mode_name ,a.sum FROM hw_device_mode b
LEFT JOIN (SELECT device_mode_id,count(*) as sum FROM hw_device GROUP BY device_mode_id order by sum desc
) a on a.device_mode_id = b.device_mode_id
LEFT JOIN (SELECT device_mode_id,count(*) as sum FROM hw_device GROUP BY device_mode_id order by sum desc
) a on a.device_mode_id = b.device_mode_id
</select>
<select id="selectDeviceByDeviceModeByDeviceModeFunction" parameterType="Long" resultType="String">
select count(*) from hw_device_mode_function where device_mode_id =
(SELECT device_mode_id from hw_device where device_id = #{deviceId}) and function_type = '1'
</select>
<select id="selectDeviceByDeviceModeByDeviceModeFunction" parameterType="Long" resultType="String">
select count(*) from hw_device_mode_function where device_mode_id =
(SELECT device_mode_id from hw_device where device_id = #{deviceId}) and function_type = '1'
</select>
<select id="selectDeviceModeFunctionByFunctionType" parameterType="Long" resultType="String">
</select>
@ -62,19 +60,25 @@ LEFT JOIN (SELECT device_mode_id,count(*) as sum FROM hw_device GROUP BY device_
</select>
<select id="selectDeviceByMonitorId" parameterType="Long" resultMap="HwDeviceResult">
<include refid="selectHwDeviceVo"/>
from hw_device where monitor_unit_id = #{monitorUnitId}
where monitor_unit_id = #{monitorUnitId}
</select>
<select id="selectDeviceByDeviceModeBySceneId" parameterType="Long" resultMap="HwDeviceResult">
select * from hw_device where device_mode_id = (
SELECT device_mode_id from hw_device_mode where scene_id = #{sceneId} )
SELECT device_mode_id from hw_device_mode where scene_id = #{sceneId} )
</select>
<select id="selectDeviceByDeviceModeByMonitorUnitId" parameterType="Long" resultMap="HwDeviceResult">
select * from hw_device where device_mode_id = (
SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitId} )
select * from hw_device where device_mode_id = (
SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitId} )
</select>
<!--以上为监控平台接口所用-->
<sql id="selectHwDeviceVo">
select device_id, device_code, device_name, scene_id, monitor_unit_id, device_type, networking_mode, access_protocol, data_format, releated_device_id, device_mode_id, access_gw_protocol, active_status, device_status, active_time, device_pic, ip_address, area_id, device_location, current_module_version, current_singlechip_version, remark, create_by, create_time, update_by, update_time, device_field, tenant_id, online_status from hw_device
</sql>
<select id="selectHwDeviceList" parameterType="HwDevice" resultMap="HwDeviceResult">
<include refid="selectHwDeviceVo"/>
<where>
<where>
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="sceneId != null "> and scene_id = #{sceneId}</if>
@ -96,14 +100,16 @@ SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitI
<if test="currentModuleVersion != null and currentModuleVersion != ''"> and current_module_version = #{currentModuleVersion}</if>
<if test="currentSinglechipVersion != null and currentSinglechipVersion != ''"> and current_singlechip_version = #{currentSinglechipVersion}</if>
<if test="deviceField != null and deviceField != ''"> and device_field = #{deviceField}</if>
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
</where>
</select>
<select id="selectHwDeviceByDeviceId" parameterType="Long" resultMap="HwDeviceResult">
<include refid="selectHwDeviceVo"/>
where device_id = #{deviceId}
</select>
<insert id="insertHwDevice" parameterType="HwDevice" useGeneratedKeys="true" keyProperty="deviceId">
insert into hw_device
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -133,6 +139,8 @@ SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitI
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="deviceField != null">device_field,</if>
<if test="tenantId != null">tenant_id,</if>
<if test="onlineStatus != null and onlineStatus != ''">online_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if>
@ -161,6 +169,8 @@ SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitI
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="deviceField != null">#{deviceField},</if>
<if test="tenantId != null">#{tenantId},</if>
<if test="onlineStatus != null and onlineStatus != ''">#{onlineStatus},</if>
</trim>
</insert>
@ -193,6 +203,8 @@ SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitI
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="deviceField != null">device_field = #{deviceField},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="onlineStatus != null and onlineStatus != ''">online_status = #{onlineStatus},</if>
</trim>
where device_id = #{deviceId}
</update>
@ -202,9 +214,9 @@ SELECT device_mode_id from hw_device_mode where monitor_unit_id = #{monitorUnitI
</delete>
<delete id="deleteHwDeviceByDeviceIds" parameterType="String">
delete from hw_device where device_id in
delete from hw_device where device_id in
<foreach item="deviceId" collection="array" open="(" separator="," close=")">
#{deviceId}
</foreach>
</delete>
</mapper>
</mapper>

@ -97,13 +97,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectAllNums" resultMap="AllNumsVoResult">
select scene_id,count(*) as sub_sum from
(select monitor_unit_id,scene_id from hw_monitor_unit
where monitor_unit_id not in (select parent_id from hw_monitor_unit))as temp
where monitor_unit_id not in (select parent_id from hw_monitor_unit where parent_id is not null))as temp
GROUP BY scene_id
</select>
<select id="selectSubSetNums" resultType="String">
select count(*)from hw_monitor_unit
where monitor_unit_id not in (select parent_id from hw_monitor_unit)
where monitor_unit_id not in (select parent_id from hw_monitor_unit where parent_id is not null)
</select>
<select id="selectDeviceNums" resultType="String">
select count(*) as sum from hw_device
@ -139,13 +139,13 @@ where device_status = '1'GROUP BY scene_id
<!-- 分页查询在impl实现分页-->
<select id="selectLimitSubMonitorUnit" resultMap="HwMonitorUnitResult">
select * from hw_monitor_unit where monitor_unit_id
not in (select parent_id from hw_monitor_unit)
not in (select parent_id from hw_monitor_unit where parent_id is not null)
</select>
<!-- 查询最子集监控单元使用sceneid进行分组-->
<select id="selectMonitorPercentage" resultMap="HwMonitorUnitVoResult">
select scene_id,count(*) as sum from (select monitor_unit_id,scene_id
select scene_id,count(*) as sum from (select monitor_unit_id,scene_id
from hw_monitor_unit where monitor_unit_id not in
(select parent_id from hw_monitor_unit))as temp
(select parent_id from hw_monitor_unit where parent_id is not null))as temp
GROUP BY scene_id order by sum desc
</select>
<!-- 先通过报警信息表查询报警的监控单元id与数量在查询监控单元的名字-->
@ -158,7 +158,7 @@ select b.monitor_unit_id,b.monitor_unit_name,sum from
<select id="selectSubDeviceSum" parameterType="Long" resultType="Integer">
select count(*) from (select monitor_unit_id,scene_id
from hw_monitor_unit where monitor_unit_id not in
(select parent_id from hw_monitor_unit))as temp where scene_id = #{sceneId}
(select parent_id from hw_monitor_unit where parent_id is not null))as temp where scene_id = #{sceneId}
</select>

@ -0,0 +1,19 @@
import request from '@/utils/request'
// 查询定时任务调度列表
export function listJob(query) {
return request({
url: '/schedule/job/list',
method: 'get',
params: query
})
}
// 新增定时任务调度
export function addJob(data) {
return request({
url: '/schedule/job',
method: 'post',
data: data
})
}

@ -0,0 +1,9 @@
import request from '@/utils/request'
// 查询定时任务调度列表
export function monitorUnitPercentage(query) {
return request({
url: '/business/monitorUnit/monitorUnitPercentage',
method: 'get',
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -119,6 +119,12 @@ export const constantRoutes = [
name: 'Index',
meta: { title: '5', icon: 'dashboard', affix: true }
},
{
path: '/board6',
component: () => import('@/views/board/equipment'),
name: 'Index',
meta: { title: '5', icon: 'dashboard', affix: true }
},
]
// 动态路由,基于用户权限动态去加载

@ -0,0 +1,405 @@
<template>
<div class="container">
<div class="centerImg"></div>
<BoardTopNav nowMenu="3"></BoardTopNav>
<div class="title">福建省电力公司</div>
<div class="tree">
<el-tree
:data="treeData"
accordion
node-key="id">
<span slot-scope="{ node, data }" class="custom-tree-node">
<span>{{ node.label }}</span>
</span>
</el-tree>
</div>
<div class="equipmentInfo">
<p>
<span>设备编码</span>
<span style="color: #d9dee3">王秀1#</span>
</p>
<p>
<span>设备编码</span>
<span style="color: #d9dee3">王秀1#</span>
</p>
<p>
<span>设备编码</span>
<span style="color: #d9dee3">王秀1#</span>
</p>
<p>
<span>设备编码</span>
<span style="color: #d9dee3">王秀1#</span>
</p>
</div>
<div class="img"></div>
<div class="terminal">
<el-form :model="form" class="demo-form-inline">
<el-form-item label="传感器名称:">
<el-input v-model="form.data1" placeholder="传感器名称" style="width:calc(100% - 100px)"></el-input>
</el-form-item>
</el-form>
<div class="terminalList">
<div v-for="i in 10" class="item">
<div class="icon"></div>
<div class="title">车间-阀门</div>
<div class="switch">
<el-switch
v-model="data1"
active-color="#1165a1"
inactive-color="#1facf4">
</el-switch>
</div>
</div>
</div>
</div>
<div class="right">
<div v-for="i in 10" class="item">
<div class="iconBg"></div>
<div class="icon"></div>
<div class="rightBg">
<div class="title">大厅-温度</div>
<div style="position: absolute;left: 24%;top: 0px;width: 75%;height: 100%;">
<div v-for="i in 3" class="infoItem">
<div class="span">温度:</div>
<div class="spanBg"></div>
<div class="num">47.5</div>
</div>
</div>
<div class="btn">
<div class="btnC" style="bottom: 55%">
<el-button type="primary">详细信息</el-button>
</div>
<div class="btnC" style="top: 55%">
<el-button type="primary">关联关系</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import BoardTopNav from '@/components/BoardTopNav'
export default {
components: {
BoardTopNav
},
data() {
return {
data1: true,
form: {
data1: '1'
},
treeData: [
{
id: 1,
label: '变压器1',
children: [
{
id: 11,
label: '点1',
},
{
id: 12,
label: '点2',
},
{
id: 13,
label: '点3',
children: [
{
id: 131,
label: '点1',
},
{
id: 132,
label: '点2',
},
{
id: 133,
label: '点3',
},
]
},
]
},
{
id: 2,
label: '变压器1',
children: [
{
id: 21,
label: '点1',
},
{
id: 22,
label: '点2',
},
{
id: 23,
label: '点3',
},
]
},
]
}
},
mounted() {
},
methods: {}
};
</script>
<style lang="less" scoped>
.container {
background-image: url("~@/assets/board/equipment/bg.jpg");
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
height: calc(100vh);
position: relative;
}
.title {
position: absolute;
top: 12.9%;
left: 6%;
font-size: 0.9vw;
color: #d9dee3;
}
.tree {
position: absolute;
top: 18.9%;
left: 2%;
width: 13%;
height: 78%;
/deep/ .el-tree {
background-color: #0000;
color: #d9dee3;
}
/deep/ .el-tree-node__content:hover {
background-color: #0d5e93;
}
/deep/ .el-tree-node__content {
height: 40px;
border-bottom: 1px solid #fff2;
}
/deep/ .is-current {
background-color: #0d5e93;
}
/deep/ .custom-tree-node {
padding-left: 8px;
}
}
.equipmentInfo {
position: absolute;
top: 11.6%;
left: 17.2%;
width: 16%;
height: 20%;
color: #1684c2;
padding: 2vh 0 0 1vw;
p {
margin: 0;
line-height: 4vh;
font-size: 0.9vw;
}
}
.img {
background-image: url("~@/assets/board/equipment/icon.png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: absolute;
top: 11.5%;
left: 33.7%;
width: 12%;
height: 20.4%;
}
.terminal {
position: absolute;
top: 35.6%;
left: 17.2%;
width: 28%;
height: 61%;
padding-top: 14px;
/deep/ .el-form-item__label {
color: #25bffc !important;
font-weight: normal;
}
/deep/ .el-input__inner {
background-color: #0000;
border-color: #25bffc;
}
.terminalList::-webkit-scrollbar {
width: 0;
}
.terminalList {
position: absolute;
top: 12%;
left: 0%;
width: 100%;
height: 85%;
overflow: auto;
::-webkit-scrollbar {
width: 0;
}
.item {
background-image: url("~@/assets/board/equipment/item.png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
width: 100%;
height: 7vw;
margin-top: 12px;
.icon {
background-image: url("~@/assets/board/equipment/icon.png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: absolute;
top: 13%;
left: 3.3%;
width: 19.5%;
height: 73%;
}
.title {
position: absolute;
top: 50%;
left: 30%;
transform: translateY(-50%);
font-size: 1vw;
color: #1facf4;
}
.switch {
position: absolute;
top: 50%;
right: 5%;
transform: translateY(-50%);
}
}
}
}
.right::-webkit-scrollbar {
width: 0;
}
.right {
position: absolute;
top: 16%;
left: 48%;
width: 50%;
height: 80%;
overflow: auto;
.item {
position: relative;
width: 100%;
margin-bottom: 12px;
height: 18vh;
padding: 1vh 0;
.iconBg {
background-image: url("~@/assets/board/equipment/iconBg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: absolute;
top: 16%;
left: 5%;
width: 16vh;
height: 16vh;
}
.rightBg {
background-image: url("~@/assets/board/equipment/right.png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: absolute;
top: 16%;
left: calc(10% + 16vh);
width: calc(90% - 16vh);;
height: 16vh;
.title {
position: absolute;
top: 50%;
left: 12%;
color: #1facf4;
transform: translate(-50%, -50%);
font-size: 1vw;
}
.infoItem {
display: inline-block;
position: relative;
width: 6vw;
height: 100%;
.spanBg {
//background-image: url("~@/assets/board/equipment/icon.png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: absolute;
bottom: 55%;
left: 12%;
width: 2vw;
height: 0.8vw;
}
.span {
position: absolute;
bottom: 55%;
left: 12%;
color: #f4f4f4;
font-size: 0.5vw;
}
.num {
position: absolute;
top: 55%;
left: 12%;
color: #f4f4f4;
font-size: 0.5vw;
}
}
.btn {
position: absolute;
top: 0%;
right: 5%;
width: 6vw;
height: 100%;
}
.btnC {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
}
}
}
</style>

@ -2,6 +2,84 @@
<div class="container">
<div class="centerImg"></div>
<BoardTopNav nowMenu="3"></BoardTopNav>
<div class="leftMenu">
<div v-for="i in 10" class="item">
<span>温度传感器</span>
</div>
</div>
<div ref="right" class="right">
<div ref="search" class="search">
<el-form :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="传感器编号">
<el-input v-model="form.data1" placeholder="传感器编号"></el-input>
</el-form-item>
<el-form-item label="传感器名称">
<el-input v-model="form.data2" placeholder="传感器名称"></el-input>
</el-form-item>
<el-form-item label="采集时间">
<el-date-picker
v-model="form.data3"
placeholder="选择日期时间"
type="datetime">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"></el-button>
<el-button @click="onSubmit"></el-button>
</el-form-item>
</el-form>
</div>
<div :style="{height:maxHeight+'px'}" class="table">
<el-table
v-if='tableShow'
:cell-style="setStyle"
:data="tableData"
:header-cell-style="{ textAlign: 'center',backgroundColor:'#0a457d' }"
:max-height="maxHeight">
style="width: 100%">
<el-table-column
label="序号"
prop="data1">
</el-table-column>
<el-table-column
label="传感器ID"
prop="data2">
</el-table-column>
<el-table-column
label="传感器名称"
prop="data3">
</el-table-column>
<el-table-column
label="标号"
prop="data4">
</el-table-column>
<el-table-column
label="温度"
prop="data4">
</el-table-column>
<el-table-column
label="排名"
prop="data6">
</el-table-column>
<el-table-column
label="湿度"
prop="data7">
</el-table-column>
<el-table-column
label="压力"
prop="data8">
</el-table-column>
<el-table-column
label="传感器"
prop="data9">
</el-table-column>
</el-table>
</div>
<div ref="pagination" style="margin-top: 12px;height: 36px;">
<el-pagination :total="1000" background layout="prev, pager, next" style="display: inline-block;float:right;">
</el-pagination>
</div>
</div>
</div>
</template>
@ -15,21 +93,469 @@ export default {
},
data() {
return {
tableShow: false,
form: {
data1: '',
data2: '',
data3: null
},
maxHeight: 0,
tableData: [
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
{
data1: 'data1',
data2: 'data2',
data3: 'data3',
data4: 'data4',
data5: 'data5',
data6: 'data6',
data7: 'data7',
data8: 'data8',
data9: 'data9',
},
]
}
},
mounted() {
this.maxHeight = this.$refs.right.clientHeight - this.$refs.search.clientHeight - this.$refs.pagination.clientHeight - 12
this.tableShow = true
},
methods: {
setStyle(e) {
if (e.rowIndex % 2 === 0) {
return {textAlign: 'center', backgroundColor: '#08406f', color: '#05aaba'}
} else {
return {textAlign: 'center', backgroundColor: '#063468', color: '#05aaba'}
}
}
}
};
</script>
<style scoped>
<style lang="less" scoped>
.container {
background-image: url("~@/assets/board/GPS/bg.jpg");
background-image: url("~@/assets/board/equipmentMonitoring/bg.jpg");
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
height: calc(100vh);
position: relative;
}
.leftMenu::-webkit-scrollbar {
width: 0;
}
.leftMenu {
position: absolute;
width: 14%;
height: 84%;
top: 12%;
left: 2%;
padding: 1vw;
overflow: auto;
.item {
background-image: url("~@/assets/board/equipmentMonitoring/item.png");
background-repeat: no-repeat;
background-size: 100% 100%;
width: 12vw;
height: 5.1vw;
margin-bottom: 1vw;
}
span {
position: absolute;
left: 44%;
line-height: 5.1vw;
font-size: 1vw;
color: #f1f3f5;
white-space: nowrap;
}
}
.right {
position: absolute;
width: 78.5%;
height: 84%;
top: 12%;
left: 19%;
.search {
/deep/ .el-form-item__label {
color: #25bffc !important;
font-weight: normal;
}
/deep/ .el-input__inner {
background-color: #0000;
border-color: #25bffc;
}
/deep/ .el-button--default {
background-color: #0000;
color: #25bffc;
border-color: #25bffc;
}
}
.table {
/deep/ .el-table {
background-color: #0000;
}
/deep/ .el-table th.el-table__cell.is-leaf {
border-color: #0000;
}
/deep/ .el-table tr {
background-color: #0000;
}
/deep/ .el-table td.el-table__cell {
border-color: #0000;
}
/deep/ .el-table::before {
background-color: #0000;
}
/deep/ .el-table .el-table__header-wrapper th {
color: #05ecf3;
}
}
}
</style>

@ -139,6 +139,7 @@ import Chart from "@/components/Charts/Chart";
import vueSeamlessScroll from "vue-seamless-scroll";
import BoardTopNav from '@/components/BoardTopNav'
import * as echarts from 'echarts';
import {monitorUnitPercentage} from '@/api/board/index'
export default {
components: {
@ -481,8 +482,14 @@ export default {
],
}
this.$refs.chart3.setData(option3)
this.setChart1()
},
methods: {}
methods: {
async setChart1 () {
const data = await monitorUnitPercentage()
console.log(data)
}
}
};
</script>
<style scoped>

@ -48,8 +48,8 @@
</el-col>
</el-row>
<el-table :data="tableData" style="width: 100%;margin-top: 12px;"
:header-cell-style="{ textAlign: 'center' }"
:cell-style="{ textAlign: 'center',backgroundColor:'#08406f' }">
:header-cell-style="{ textAlign: 'center',backgroundColor:'#0a457d' }"
:cell-style="setStyle">
<el-table-column prop="date1" label="设备ID">
</el-table-column>
<el-table-column prop="date2" label="传感器编号">
@ -332,10 +332,18 @@ export default {
},
mounted() {
},
methods: {}
methods: {
setStyle(e) {
if (e.rowIndex % 2 === 0) {
return {textAlign: 'center', backgroundColor: '#08406f', color: '#05aaba'}
}else{
return {textAlign: 'center', backgroundColor: '#063468', color: '#05aaba'}
}
}
}
};
</script>
<style lang="less" >
<style lang="less" scoped>
.container {
background-image: url("~@/assets/board/senso/bg.jpg");
background-repeat: no-repeat;
@ -351,44 +359,47 @@ export default {
left: 2%;
width: 96%;
height: 87%;
overflow: auto;
.el-collapse-item__wrap {
/deep/.el-collapse-item__wrap {
background-color: #0000;
border-color: #0000;
}
.el-table {
/deep/.el-table {
background-color: #FFF0 !important;
color: #fff;
}
.el-table tr {
/deep/.el-table tr {
background-color: #FFF0 !important;
}
.el-table th.el-table__cell.is-leaf, .el-table td.el-table__cell{
/deep/.el-table th.el-table__cell.is-leaf,{
border-color: #0000;
}
.el-table::before, .el-table--group::after, .el-table--border::after{
/deep/.el-table::before, .el-table--group::after, .el-table--border::after{
background-color: #0000;
}
.el-table .el-table__header-wrapper th, .el-table .el-table__fixed-header-wrapper th{
/deep/.el-table .el-table__header-wrapper th, .el-table .el-table__fixed-header-wrapper th{
background-color: #0000;
}
}
.collapse .el-collapse-item__header {
background-color: #0000;
border-color: #0000;
height: auto;
}
/deep/.el-collapse-item__header {
background-color: #0000;
border-color: #0000;
height: auto;
}
/deep/.el-collapse {
border-color: #0000;
}
/deep/ .el-table td.el-table__cell{
border-color: #0000;
}
.collapse .el-collapse {
border-color: #0000;
/deep/ .el-table .el-table__header-wrapper th {
color: #05ecf3;
}
}
.collapse .el-collapse-item {
// margin-bottom: 2vh;
}
.itemBg {
background-image: url("~@/assets/board/senso/itemBg.png");

Loading…
Cancel
Save