Commit 48441af8 authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of ssh://111.61.77.35:15/gengdidi/gassafety-progress into master

parents 0106bab0 01e660ea
......@@ -133,4 +133,11 @@ public class TWorkOrderController extends BaseController
{
return toAjax(tWorkOrderService.deleteTWorkOrderByIds(workIds));
}
@GetMapping("/selectWorkOrderNum")
public AjaxResult selectWorkOrderNum(String enterpriseId)
{
return AjaxResult.success(tWorkOrderService.selectWorkOrderNum(enterpriseId));
}
}
......@@ -6,10 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
......@@ -68,16 +65,30 @@ public class PipeInterfaceController {
DeviceList deviceList=new DeviceList();
//调压箱数据循环
for (int i=0;i<deviceData.size();i++){
//临时存下级数据id
List<PressureFlow> pressList=new ArrayList<>();
//临时存储压力表数据数组
List<PressureFlow> pressureList=new ArrayList<>();
//临时存储流量计数据数组
List<PressureFlow> flowmeterList=new ArrayList<>();
//存储全部数据
List<PressureFlow> List=new ArrayList<>();
for (int s=0;s<pressureFlows1.size();s++){
//判断调压箱id与下级数据调压箱id是否相等
if (pressureFlows1.get(s).getDeviceId()==deviceData.get(i).getDeviceId()){
//下级数据添加进临时存储数据的数组中
pressList.add(pressureFlows1.get(s));
List.add(pressureFlows1.get(s));
//判断是压力表还是流量计 1压力表 2流量计
if (pressureFlows1.get(s).getDeviceType()=="1"){
pressureList.add(pressureFlows1.get(s));
}else {
flowmeterList.add(pressureFlows1.get(s));
}
}
}
deviceData.get(i).setPressureFlows(pressList);
//压力表设备数量添加
deviceData.get(i).setNumberPressureGauges(pressureList.size());
deviceData.get(i).setPressureFlows(List);
//流量计设备数量添加
deviceData.get(i).setNumberEquipment(flowmeterList.size());
deviceData.get(i).setIconType(2);
}
deviceList.setData(deviceData);
......@@ -93,11 +104,32 @@ public class PipeInterfaceController {
public TSiteStationInfoDataList selectTSiteStationInfoData(){
//场站信息查询方法
List<TSiteStationInfoData> tSiteStationInfoData = iPipeInterfaceService.selectTSiteStationInfoData();
//查询场站下级设备数据
List<PressureFlow> pressureFlows = iPipeInterfaceService.selecttSiteStationInfoDataList("1");
TSiteStationInfoDataList tSiteStationInfoDataList=new TSiteStationInfoDataList();
for (int i=0;i<tSiteStationInfoData.size();i++){
//查询场站下级设备数据
List<PressureFlow> pressureFlows = iPipeInterfaceService.selecttSiteStationInfoDataList(tSiteStationInfoData.get(i).getSiteStationId());
tSiteStationInfoData.get(i).setPressureFlows(pressureFlows);
//临时存储压力表数据数组
List<PressureFlow> pressureList=new ArrayList<>();
//临时存储流量计数据数组
List<PressureFlow> flowmeterList=new ArrayList<>();
//存储全部数据
List<PressureFlow> List=new ArrayList<>();
for (int s=0;s<pressureFlows.size();s++){
if (tSiteStationInfoData.get(i).getSiteStationId()==pressureFlows.get(s).getDeviceId()){
List.add(pressureFlows.get(s));
//判断是压力表还是流量计 1压力表 2流量计
if (pressureFlows.get(s).getDeviceType()=="1"){
pressureList.add(pressureFlows.get(s));
}else {
flowmeterList.add(pressureFlows.get(s));
}
}
}
//压力表设备数量添加
tSiteStationInfoData.get(i).setNumberPressureGauges(pressureList.size());
tSiteStationInfoData.get(i).setPressureFlows(List);
//流量计设备数量添加
tSiteStationInfoData.get(i).setNumberEquipment(flowmeterList.size());
tSiteStationInfoData.get(i).setIconType(4);
}
tSiteStationInfoDataList.setData(tSiteStationInfoData);
......@@ -164,16 +196,29 @@ public class PipeInterfaceController {
DeviceDataList deviceDataList=new DeviceDataList();
//调压箱数据循环
for (int i=0;i<pipeDates.size();i++){
//临时存下级数据id
List<PressureFlow> pressList=new ArrayList<>();
//临时存储压力表数据数组
List<PressureFlow> pressureList=new ArrayList<>();
//临时存储流量计数据数组
List<PressureFlow> flowmeterList=new ArrayList<>();
//存储全部数据
List<PressureFlow> List=new ArrayList<>();
for (int s=0;s<pressureFlows1.size();s++){
//判断调压箱id与下级数据调压箱id是否相等
if (pressureFlows1.get(s).getDeviceId()==pipeDates.get(i).getDeviceId()){
//下级数据添加进临时存储数据的数组中
pressList.add(pressureFlows1.get(s));
List.add(pressureFlows1.get(s));
//判断是压力表还是流量计 1压力表 2流量计
if (pressureFlows1.get(s).getDeviceType()=="1"){
pressureList.add(pressureFlows1.get(s));
}else {
flowmeterList.add(pressureFlows1.get(s));
}
}
}
pipeDates.get(i).setPressureFlows(pressList);
//压力表设备数量添加
pipeDates.get(i).setNumberPressureGauges(pressureList.size());
pipeDates.get(i).setPressureFlows(List);
//流量计设备数量添加
pipeDates.get(i).setNumberEquipment(flowmeterList.size());
pipeDates.get(i).setIconType(3);
}
deviceDataList.setData(pipeDates);
......
......@@ -91,7 +91,7 @@ public class TDetectorReportController extends BaseController
TDetectorUser tDetectorUser = new TDetectorUser();
tDetectorUser.setNickName(username);
tDetectorUser.setIsDel("0");
List<TDetectorUserVO> tDetectorUserList = tDetectorUserService.detectorUserList(tDetectorUser);
List<TDetectorUser> tDetectorUserList = tDetectorUserService.selectTDetectorUser(tDetectorUser);
if(tDetectorUserList.size() == 0){
return AjaxResult.error(1,"查询不到用户名username=" + username);
}
......@@ -167,7 +167,7 @@ public class TDetectorReportController extends BaseController
TDetectorUser tDetectorUser = new TDetectorUser();
tDetectorUser.setNickName(username);
tDetectorUser.setIsDel("0");
List<TDetectorUserVO> tDetectorUserList = tDetectorUserService.detectorUserList(tDetectorUser);
List<TDetectorUser> tDetectorUserList = tDetectorUserService.selectTDetectorUser(tDetectorUser);
if(tDetectorUserList.size() == 0){
return AjaxResult.error(1,"查询不到用户名username=" + username);
}
......@@ -224,7 +224,7 @@ public class TDetectorReportController extends BaseController
TDetectorUser tDetectorUser = new TDetectorUser();
tDetectorUser.setNickName(username);
tDetectorUser.setIsDel("0");
List<TDetectorUserVO> tDetectorUserList = tDetectorUserService.detectorUserList(tDetectorUser);
List<TDetectorUser> tDetectorUserList = tDetectorUserService.selectTDetectorUser(tDetectorUser);
if(tDetectorUserList.size() == 0){
continue;
}
......@@ -265,7 +265,7 @@ public class TDetectorReportController extends BaseController
TDetectorUser tDetectorUser1 = new TDetectorUser();
tDetectorUser1.setNickName(sourceUsername);
tDetectorUser1.setIsDel("0");
List<TDetectorUserVO> tDetectorUserList1 = tDetectorUserService.detectorUserList(tDetectorUser1);
List<TDetectorUser> tDetectorUserList1 = tDetectorUserService.selectTDetectorUser(tDetectorUser1);
if(tDetectorUserList1.size() == 0){
return AjaxResult.error(4,"查询不到原用户名sourceUsername=" + sourceUsername);
}
......@@ -273,7 +273,7 @@ public class TDetectorReportController extends BaseController
TDetectorUser tDetectorUser2 = new TDetectorUser();
tDetectorUser2.setNickName(targetUsername);
tDetectorUser2.setIsDel("0");
List<TDetectorUserVO> tDetectorUserList2 = tDetectorUserService.detectorUserList(tDetectorUser2);
List<TDetectorUser> tDetectorUserList2 = tDetectorUserService.selectTDetectorUser(tDetectorUser2);
if(tDetectorUserList2.size() == 0){
return AjaxResult.error(5,"查询不到目标用户名targetUsername=" + targetUsername);
}
......
......@@ -47,12 +47,20 @@ public class TDetectorUserController extends BaseController
/**
* 获取探测器用户列表
* @param tDetectorUser
* @return
*/
@GetMapping("/detectorUserList")
public AjaxResult detectorUserList(TDetectorUser tDetectorUser){
return AjaxResult.success(tDetectorUserService.detectorUserList(tDetectorUser));
public AjaxResult detectorUserList(){
return AjaxResult.success(tDetectorUserService.detectorUserList());
}
/**
* 获取探测器用户列表
* @return
*/
@GetMapping("/getDetectorUserAlarmList")
public AjaxResult getDetectorUserAlarmList(){
return AjaxResult.success(tDetectorUserService.getDetectorUserAlarmList());
}
/**
......
......@@ -57,6 +57,17 @@ public class TEnterpriseInfoController extends BaseController
return getDataTable(list);
}
/**
*查询所有企业信息
* @param tEnterpriseInfo
* @return
*/
@GetMapping("/enterpriseInfoList")
public AjaxResult enterpriseInfoList(TEnterpriseInfo tEnterpriseInfo)
{
return AjaxResult.success(tEnterpriseInfoService.enterpriseInfoList(tEnterpriseInfo));
}
/**
* 导出企业信息列表
*/
......
......@@ -30,6 +30,139 @@ public class DeviceData {
private int iconType;
//压力表设备数量
private int numberPressureGauges;
//压力表在线设备
private int onlineEquipment;
//压力表离线设备
private int offlineEquipment;
//压力表历史报警
private int historicalAlarm;
//压力表已处理报警
private int alarmProcessed;
//压力表报警中
private int inAlarm;
//流量计设备数量
private int numberEquipment;
//流量计在线设备
private int numberOnlineEquipment;
//流量计离线设备
private int numberOfflineEquipment;
//流量计历史报警
private int numberHistoricalAlarm;
//流量计已处理报警
private int numberAlarmProcessed;
//流量计报警中
private int numberInAlarm;
public int getNumberPressureGauges() {
return numberPressureGauges;
}
public void setNumberPressureGauges(int numberPressureGauges) {
this.numberPressureGauges = numberPressureGauges;
}
public int getNumberOnlineEquipment() {
return numberOnlineEquipment;
}
public void setNumberOnlineEquipment(int numberOnlineEquipment) {
this.numberOnlineEquipment = numberOnlineEquipment;
}
public int getNumberOfflineEquipment() {
return numberOfflineEquipment;
}
public void setNumberOfflineEquipment(int numberOfflineEquipment) {
this.numberOfflineEquipment = numberOfflineEquipment;
}
public int getNumberHistoricalAlarm() {
return numberHistoricalAlarm;
}
public void setNumberHistoricalAlarm(int numberHistoricalAlarm) {
this.numberHistoricalAlarm = numberHistoricalAlarm;
}
public int getNumberAlarmProcessed() {
return numberAlarmProcessed;
}
public void setNumberAlarmProcessed(int numberAlarmProcessed) {
this.numberAlarmProcessed = numberAlarmProcessed;
}
public int getNumberInAlarm() {
return numberInAlarm;
}
public void setNumberInAlarm(int numberInAlarm) {
this.numberInAlarm = numberInAlarm;
}
public int getOnlineEquipment() {
return onlineEquipment;
}
public void setOnlineEquipment(int onlineEquipment) {
this.onlineEquipment = onlineEquipment;
}
public int getOfflineEquipment() {
return offlineEquipment;
}
public void setOfflineEquipment(int offlineEquipment) {
this.offlineEquipment = offlineEquipment;
}
public int getHistoricalAlarm() {
return historicalAlarm;
}
public void setHistoricalAlarm(int historicalAlarm) {
this.historicalAlarm = historicalAlarm;
}
public int getAlarmProcessed() {
return alarmProcessed;
}
public void setAlarmProcessed(int alarmProcessed) {
this.alarmProcessed = alarmProcessed;
}
public int getInAlarm() {
return inAlarm;
}
public void setInAlarm(int inAlarm) {
this.inAlarm = inAlarm;
}
public int getNumberEquipment() {
return numberEquipment;
}
public void setNumberEquipment(int numberEquipment) {
this.numberEquipment = numberEquipment;
}
public int getIconType() {
return iconType;
}
......@@ -126,6 +259,7 @@ public class DeviceData {
this.pressureFlows = pressureFlows;
}
@Override
public String toString() {
return "DeviceData{" +
......@@ -141,6 +275,18 @@ public class DeviceData {
", pressureFlows=" + pressureFlows +
", beyondEnterpriseName='" + beyondEnterpriseName + '\'' +
", iconType=" + iconType +
", numberPressureGauges=" + numberPressureGauges +
", onlineEquipment=" + onlineEquipment +
", offlineEquipment=" + offlineEquipment +
", historicalAlarm=" + historicalAlarm +
", alarmProcessed=" + alarmProcessed +
", inAlarm=" + inAlarm +
", numberEquipment=" + numberEquipment +
", numberOnlineEquipment=" + numberOnlineEquipment +
", numberOfflineEquipment=" + numberOfflineEquipment +
", numberHistoricalAlarm=" + numberHistoricalAlarm +
", numberAlarmProcessed=" + numberAlarmProcessed +
", numberInAlarm=" + numberInAlarm +
'}';
}
}
......@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import java.math.BigDecimal;
/**
* 企业信息对象 t_enterprise_info
*
......@@ -34,6 +36,15 @@ public class TEnterpriseInfo extends BaseEntity
@Excel(name = "经营区域")
private String businessArea;
/** 经度 */
private BigDecimal longitude;
/** 纬度 */
private BigDecimal latitude;
/** 图表类型 */
private String iconType;
/** 许可证编号 */
@Excel(name = "许可证编号")
private String licenseKey;
......@@ -98,6 +109,23 @@ public class TEnterpriseInfo extends BaseEntity
{
return businessArea;
}
public BigDecimal getLongitude() {
return longitude;
}
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
public BigDecimal getLatitude() {
return latitude;
}
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
public void setLicenseKey(String licenseKey)
{
this.licenseKey = licenseKey;
......@@ -121,6 +149,14 @@ public class TEnterpriseInfo extends BaseEntity
this.annualSupervisionInspection = annualSupervisionInspection;
}
public String getIconType() {
return iconType;
}
public void setIconType(String iconType) {
this.iconType = iconType;
}
public String getAnnualSupervisionInspection()
{
return annualSupervisionInspection;
......
package com.zehong.system.domain;
import java.util.List;
public class TSiteStationInfoData {
......@@ -23,13 +22,148 @@ public class TSiteStationInfoData {
private String buildCompany;
private String powerCompany;
//流量计数组
private List<PressureFlow> pressureFlows;
private int iconType;
private String companyType;
//压力表设备数量
private int numberPressureGauges;
//压力表在线设备
private int onlineEquipment;
//压力表离线设备
private int offlineEquipment;
//压力表历史报警
private int historicalAlarm;
//压力表已处理报警
private int alarmProcessed;
//压力表报警中
private int inAlarm;
//流量计设备数量
private int numberEquipment;
//流量计在线设备
private int numberOnlineEquipment;
//流量计离线设备
private int numberOfflineEquipment;
//流量计历史报警
private int numberHistoricalAlarm;
//流量计已处理报警
private int numberAlarmProcessed;
//流量计报警中
private int numberInAlarm;
public int getNumberOnlineEquipment() {
return numberOnlineEquipment;
}
public void setNumberOnlineEquipment(int numberOnlineEquipment) {
this.numberOnlineEquipment = numberOnlineEquipment;
}
public int getNumberOfflineEquipment() {
return numberOfflineEquipment;
}
public void setNumberOfflineEquipment(int numberOfflineEquipment) {
this.numberOfflineEquipment = numberOfflineEquipment;
}
public int getNumberHistoricalAlarm() {
return numberHistoricalAlarm;
}
public void setNumberHistoricalAlarm(int numberHistoricalAlarm) {
this.numberHistoricalAlarm = numberHistoricalAlarm;
}
public int getNumberAlarmProcessed() {
return numberAlarmProcessed;
}
public void setNumberAlarmProcessed(int numberAlarmProcessed) {
this.numberAlarmProcessed = numberAlarmProcessed;
}
public int getNumberInAlarm() {
return numberInAlarm;
}
public void setNumberInAlarm(int numberInAlarm) {
this.numberInAlarm = numberInAlarm;
}
public int getNumberPressureGauges() {
return numberPressureGauges;
}
public void setNumberPressureGauges(int numberPressureGauges) {
this.numberPressureGauges = numberPressureGauges;
}
public int getNumberEquipment() {
return numberEquipment;
}
public void setNumberEquipment(int numberEquipment) {
this.numberEquipment = numberEquipment;
}
public int getOnlineEquipment() {
return onlineEquipment;
}
public void setOnlineEquipment(int onlineEquipment) {
this.onlineEquipment = onlineEquipment;
}
public int getOfflineEquipment() {
return offlineEquipment;
}
public void setOfflineEquipment(int offlineEquipment) {
this.offlineEquipment = offlineEquipment;
}
public int getHistoricalAlarm() {
return historicalAlarm;
}
public void setHistoricalAlarm(int historicalAlarm) {
this.historicalAlarm = historicalAlarm;
}
public int getAlarmProcessed() {
return alarmProcessed;
}
public void setAlarmProcessed(int alarmProcessed) {
this.alarmProcessed = alarmProcessed;
}
public int getInAlarm() {
return inAlarm;
}
public void setInAlarm(int inAlarm) {
this.inAlarm = inAlarm;
}
public String getCompanyType() {
return companyType;
}
......@@ -150,6 +284,18 @@ public class TSiteStationInfoData {
", pressureFlows=" + pressureFlows +
", iconType=" + iconType +
", companyType='" + companyType + '\'' +
", numberPressureGauges=" + numberPressureGauges +
", onlineEquipment=" + onlineEquipment +
", offlineEquipment=" + offlineEquipment +
", historicalAlarm=" + historicalAlarm +
", alarmProcessed=" + alarmProcessed +
", inAlarm=" + inAlarm +
", numberEquipment=" + numberEquipment +
", numberOnlineEquipment=" + numberOnlineEquipment +
", numberOfflineEquipment=" + numberOfflineEquipment +
", numberHistoricalAlarm=" + numberHistoricalAlarm +
", numberAlarmProcessed=" + numberAlarmProcessed +
", numberInAlarm=" + numberInAlarm +
'}';
}
}
......@@ -22,8 +22,8 @@ public class TDetectorUserVO
/** 图标类型 */
private String iconType;
/** 用户账号 */
private String username;
/** 用户状态(1正常,2报警) */
private String userStatus;
/** 用户名称 */
private String nickName;
......@@ -71,10 +71,4 @@ public class TDetectorUserVO
/** 邮箱 */
private String email;
/** 是否删除(0正常,1删除) */
private String isDel;
/** 备注 */
private String remarks;
}
package com.zehong.system.domain.vo;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;
/**
* 企业信息对象 t_enterprise_info
*
* @author zehong
* @date 2022-01-24
*/
@Data
public class TEnterpriseInfoVO extends BaseEntity
{
/** 企业id */
private Long enterpriseId;
/** 企业名称 */
private String enterpriseName;
/** 企业切换使用 */
private String companyType;
/** 经度 */
private BigDecimal longitude;
/** 纬度 */
private BigDecimal latitude;
/** 图表类型 */
private String iconType;
/** 注册地址 */
private String registerAddress;
/** 法定代表人 */
private String legalRepresentative;
/** 经营区域 */
private String businessArea;
/** 许可证编号 */
private String licenseKey;
/** 许可证有效期 */
private String licenseValidityTime;
/** 年度监督检查情况 */
private String annualSupervisionInspection;
/** 备注 */
private String remarks;
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TDetectorInfo;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.vo.TDetectorUserVO;
/**
* 燃气用户Mapper接口
......@@ -19,6 +22,29 @@ public interface TDetectorUserMapper
*/
public TDetectorUser selectTDetectorUserById(Long userId);
/**
* 查询燃气用户统计信息
*
* @return 燃气用户
*/
public List<TDetectorUserVO> countTDetectorUser(TDetectorInfo tDetectorInfo);
/**
* 查询探测器报警用户
*
* @param tDetectorUser 探测器用户
* @return 探测器用户
*/
public TDetectorUserVO countTDetectorUserAlarm(TDetectorUser tDetectorUser);
/**
* 泽宏云推送查询燃气用户
*
* @param tDetectorUser 燃气用户
* @return 燃气用户
*/
public List<TDetectorUser> selectTDetectorUser(TDetectorUser tDetectorUser);
/**
* 查询燃气用户列表
*
......
package com.zehong.system.mapper;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.vo.HomepageVo;
import org.apache.ibatis.annotations.Param;
/**
* 燃气任务Mapper接口
......@@ -66,4 +69,11 @@ public interface TWorkOrderMapper
* @return 结果
*/
public int deleteTWorkOrderByIds(Long[] workIds);
/**
* 查询任务完成率
* @param enterpriseId
* @return
*/
public Map<String,Object> selectWorkOrderNum(@Param("enterpriseIds")String[] enterpriseIds);
}
......@@ -16,10 +16,32 @@ public interface ITDetectorUserService
/**
* 查询探测器用户列表
*
* @param tDetectorUser 探测器用户
* @return 探测器用户集合
*/
public List<TDetectorUserVO> detectorUserList(TDetectorUser tDetectorUser);
public List<TDetectorUserVO> detectorUserList();
/**
* 查询探测器报警用户(前台调用)
*
* @return 探测器用户
*/
public List<TDetectorUserVO> getDetectorUserAlarmList();
/**
* 查询探测器报警用户(后台推送)
*
* @param tDetectorUser 探测器用户
* @return 探测器用户
*/
public TDetectorUserVO detectorUserAlarmList(TDetectorUser tDetectorUser);
/**
* 泽宏云推送查询燃气用户
*
* @param tDetectorUser 燃气用户
* @return 燃气用户
*/
public List<TDetectorUser> selectTDetectorUser(TDetectorUser tDetectorUser);
/**
* 查询燃气用户
......
......@@ -2,6 +2,7 @@ package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TEnterpriseInfo;
import com.zehong.system.domain.vo.TEnterpriseInfoVO;
/**
* 企业信息Service接口
......@@ -19,6 +20,8 @@ public interface ITEnterpriseInfoService
*/
public TEnterpriseInfo selectTEnterpriseInfoById(Long enterpriseId);
public List<TEnterpriseInfoVO> enterpriseInfoList(TEnterpriseInfo tEnterpriseInfo);
/**
* 查询企业信息列表
*
......
package com.zehong.system.service;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.vo.HomepageVo;
......@@ -66,4 +68,6 @@ public interface ITWorkOrderService
* @return 结果
*/
public int deleteTWorkOrderById(Long workId);
public Map<String,Object> selectWorkOrderNum(String enterpriseId);
}
......@@ -56,8 +56,10 @@ public class TDetectorInfoServiceImpl implements ITDetectorInfoService
for(TDetectorInfo detector : list){
if("0".equals(detector.getDetectorStatus())){
detector.setDetectorStatus("正常");
} else {
} else if("1".equals(detector.getDetectorStatus())) {
detector.setDetectorStatus("离线");
} else {
detector.setDetectorStatus("报警");
}
}
......@@ -77,8 +79,10 @@ public class TDetectorInfoServiceImpl implements ITDetectorInfoService
for(TDetectorInfo detector : list){
if("0".equals(detector.getDetectorStatus())){
detector.setDetectorStatus("正常");
} else {
} else if("1".equals(detector.getDetectorStatus())) {
detector.setDetectorStatus("离线");
} else {
detector.setDetectorStatus("报警");
}
}
return new PageInfo(list);
......
......@@ -36,63 +36,110 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
/**
* 查询探测器用户列表
*
* @param tDetectorUser 探测器用户
* @return 探测器用户
*/
@Override
public List<TDetectorUserVO> detectorUserList(TDetectorUser tDetectorUser)
public List<TDetectorUserVO> detectorUserList()
{
List<TDetectorUserVO> list = new ArrayList<>();
List<TDetectorUser> tDetectorUserList = tDetectorUserMapper.selectTDetectorUserList(tDetectorUser);
List<TDetectorUserVO> tDetectorUserList = tDetectorUserMapper.countTDetectorUser(new TDetectorInfo());
TDetectorInfo detector = new TDetectorInfo();
for(TDetectorUser user : tDetectorUserList){
List<Object> initList = new ArrayList<>();
for(TDetectorUserVO user : tDetectorUserList){
TDetectorUserVO userVO = new TDetectorUserVO();
BeanUtils.copyProperties(user, userVO);
detector.setUserId(user.getUserId());
detector.setIsDel("0");
List<TDetectorInfo> tDetectorInfoList = tDetectorInfoMapper.selectTDetectorInfoList(detector);
int onLineNum = 0;
int offLineNum = 0;
int cancelAlarmNum = 0;
int historyAlarmNum = 0;
if(tDetectorInfoList.size() > 0){
for(TDetectorInfo info : tDetectorInfoList){
if(!StringUtils.isEmpty(info.getDetectorStatus()) && info.getDetectorStatus().equals("0")){
++onLineNum;
}else{
++offLineNum;
}
}
List<TDetectorReportData> dataList = tDetectorReportDataMapper.countDetectorByUserId(detector);
historyAlarmNum = dataList.size();
for(TDetectorReportData data : dataList){
if(!StringUtils.isEmpty(data.getIsCancelAlarm()) && data.getIsCancelAlarm().equals("1")){
++cancelAlarmNum;
}
}
TDetectorUserVO temp = new TDetectorUserVO();
if(user.getUserId().equals(temp.getUserId())){
initList.add(user);
userVO.setDetectorCountList(initList);
userVO.setIconType("6");
userVO.setUserStatus("1");
} else {
BeanUtils.copyProperties(user, temp);
List<Object> newList = new ArrayList<>();
newList.add(temp);
userVO.setDetectorCountList(newList);
userVO.setIconType("6");
userVO.setUserStatus("1");
list.add(userVO);
}
}
return list;
}
/**
* 查询探测器报警用户(前台调用)
*
* @return 探测器用户
*/
@Override
public List<TDetectorUserVO> getDetectorUserAlarmList()
{
List<TDetectorUserVO> list = new ArrayList<>();
TDetectorInfo tDetectorInfo = new TDetectorInfo();
tDetectorInfo.setDetectorStatus("2");
// 查询报警的数据
List<TDetectorUserVO> tDetectorUserList = tDetectorUserMapper.countTDetectorUser(tDetectorInfo);
userVO.setDetectorCount(tDetectorInfoList.size());
userVO.setOnLineNum(onLineNum);
userVO.setOffLineNum(offLineNum);
userVO.setHistoryAlarmNum(historyAlarmNum);
userVO.setCancelAlarmNum(cancelAlarmNum);
userVO.setProcessingAlarmNum(Math.abs(historyAlarmNum - cancelAlarmNum));
userVO.setIconType("6");
userVO.setDetectorType("气体探测器");
List<Object> initList = new ArrayList<>();
for(TDetectorUserVO user : tDetectorUserList){
TDetectorUserVO userVO = new TDetectorUserVO();
BeanUtils.copyProperties(user, userVO);
list.add(userVO);
TDetectorUserVO temp = new TDetectorUserVO();
if(user.getUserId().equals(temp.getUserId())){
initList.add(user);
userVO.setDetectorCountList(initList);
userVO.setIconType("6");
userVO.setUserStatus("2");
} else {
BeanUtils.copyProperties(user, temp);
List<Object> newList = new ArrayList<>();
newList.add(temp);
userVO.setDetectorCountList(newList);
userVO.setIconType("6");
userVO.setUserStatus("2");
list.add(userVO);
}
}
return list;
}
/**
* 查询探测器报警用户(后台推送)
*
* @param tDetectorUser 探测器用户
* @return 探测器用户
*/
@Override
public TDetectorUserVO detectorUserAlarmList(TDetectorUser tDetectorUser)
{
List<Object> list = new ArrayList<>();
TDetectorUserVO user = tDetectorUserMapper.countTDetectorUserAlarm(tDetectorUser);
TDetectorUserVO userVO = new TDetectorUserVO();
BeanUtils.copyProperties(user, userVO);
list.add(user);
userVO.setDetectorCountList(list);
return userVO;
}
/**
* 泽宏云推送查询燃气用户
*
* @param tDetectorUser 燃气用户
* @return 燃气用户
*/
@Override
public List<TDetectorUser> selectTDetectorUser(TDetectorUser tDetectorUser)
{
return tDetectorUserMapper.selectTDetectorUser(tDetectorUser);
}
/**
* 查询燃气用户
*
......
package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.bean.BeanUtils;
import com.zehong.system.domain.vo.TEnterpriseInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TEnterpriseInfoMapper;
......@@ -32,6 +35,28 @@ public class TEnterpriseInfoServiceImpl implements ITEnterpriseInfoService
return tEnterpriseInfoMapper.selectTEnterpriseInfoById(enterpriseId);
}
/**
* 查询企业信息列表
*
* @param tEnterpriseInfo 企业信息
* @return 企业信息
*/
@Override
public List<TEnterpriseInfoVO> enterpriseInfoList(TEnterpriseInfo tEnterpriseInfo)
{
List<TEnterpriseInfoVO> list = new ArrayList<>();
List<TEnterpriseInfo> enterpriseInfoList = tEnterpriseInfoMapper.selectTEnterpriseInfoList(tEnterpriseInfo);
for(TEnterpriseInfo info : enterpriseInfoList){
TEnterpriseInfoVO tEnterpriseInfoVO = new TEnterpriseInfoVO();
BeanUtils.copyProperties(info, tEnterpriseInfoVO);
tEnterpriseInfoVO.setCompanyType(info.getEnterpriseId().toString());
list.add(tEnterpriseInfoVO);
}
return list;
}
/**
* 查询企业信息列表
*
......
......@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 燃气任务Service业务层处理
......@@ -132,4 +133,15 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
{
return tWorkOrderMapper.deleteTWorkOrderById(workId);
}
/**
*
* @param enterpriseId
* @return
*/
@Override
public Map<String,Object> selectWorkOrderNum(String enterpriseId){
return tWorkOrderMapper.selectWorkOrderNum(enterpriseId.split(","));
}
}
......@@ -115,8 +115,8 @@
<!--查询场站下级数据-->
<select id="selecttSiteStationInfoDataList" parameterType="DeviceData" resultMap="PressureFlowResult">
select device_model,device_type,create_time from t_relation_device_detail_info
where relation_device_id=#{deviceId} and relation_device_type='2'
select device_model,device_type,create_time,relation_device_id from t_relation_device_detail_info
where relation_device_type='2'
</select>
<!--监控信息查询-->
......
......@@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
order by detector_status desc, alarm_time desc
</select>
<select id="selectTDetectorInfoById" parameterType="Long" resultMap="TDetectorInfoResult">
......
......@@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t_detector_report_data rd
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'
WHERE u.is_del = '0' and di.is_del = '0'
ORDER BY rd.create_time DESC LIMIT 50
</select>
......
......@@ -32,11 +32,121 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by user_id desc
</select>
<select id="selectTDetectorUser" parameterType="TDetectorUser" resultMap="TDetectorUserResult">
<include refid="selectTDetectorUserVo"/>
<where>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="username != null and username != ''"> and username = #{username}</if>
<if test="nickName != null and nickName != ''"> and nick_name = #{nickName}</if>
</where>
group by user_id desc
</select>
<select id="selectTDetectorUserById" parameterType="Long" resultMap="TDetectorUserResult">
<include refid="selectTDetectorUserVo"/>
where user_id = #{userId}
</select>
<select id="countTDetectorUser" resultType="TDetectorUserVO" parameterType="TDetectorInfo">
select t1.*,
IFNULL(t2.historyAlarmNum,0) AS historyAlarmNum,
IFNULL(t2.processingAlarmNum,0) AS processingAlarmNum,
IFNULL(t2.cancelAlarmNum,0) AS cancelAlarmNum
from(
select a.user_id AS userId,
a.detector_id AS detectorId,
a.detector_status AS detectorStatus,
a.nick_name AS nickName,
a.user_type AS userType,
a.address AS address,
a.longitude AS longitude,
a.latitude AS latitude,
a.linkman AS linkman,
a.phone AS phone,
a.email AS email,
CASE a.detector_type
WHEN '1' THEN '家用报警器'
WHEN '2' THEN '工业报警器' END AS detectorType,
COUNT(a.detector_id) AS detectorCount,
SUM(CASE a.detector_status WHEN '0' THEN 1 ELSE 0 END) AS onLineNum,
SUM(CASE a.detector_status WHEN '1' THEN 1 ELSE 0 END) AS offLineNum
from(select a1.detector_id,
a1.detector_type,
a1.detector_status,
a2.* from t_detector_info a1
right join t_detector_user a2 on a1.user_id = a2.user_id
<where> a1.is_del = '0' and a2.is_del = '0'
<if test="detectorStatus != null and detectorStatus != ''"> and a1.detector_status = #{detectorStatus}</if>
</where>) a
group by a.user_id,a.detector_type
) t1 left join (
select b.user_id AS userId,
COUNT(b.id) AS historyAlarmNum,
SUM(CASE b.is_cancel_alarm WHEN '0' THEN 1 ELSE 0 END) AS processingAlarmNum,
COUNT(b.id) - SUM(CASE b.is_cancel_alarm WHEN '0' THEN 1 ELSE 0 END) AS cancelAlarmNum
from(select b1.id,b1.is_cancel_alarm,b2.*
from t_detector_report_data b1
left join t_detector_info b2 on b1.detector_code = b2.detector_code
right join t_detector_user b3 on b2.user_id = b3.user_id
<where> b2.is_del = '0' and b3.is_del = '0'
<if test="detectorStatus != null and detectorStatus != ''"> and b2.detector_status = #{detectorStatus}</if>
</where>) b
group by b.user_id,b.detector_type
) t2 on t2.userId = t1.userId
</select>
<select id="countTDetectorUserAlarm" resultType="TDetectorUserVO" parameterType="TDetectorUser">
select t1.*,
IFNULL(t2.historyAlarmNum,0) AS historyAlarmNum,
IFNULL(t2.processingAlarmNum,0) AS processingAlarmNum,
IFNULL(t2.cancelAlarmNum,0) AS cancelAlarmNum
from(
select a.user_id AS userId,
a.detector_id AS detectorId,
a.detector_status AS detectorStatus,
a.nick_name AS nickName,
a.user_type AS userType,
a.address AS address,
a.longitude AS longitude,
a.latitude AS latitude,
a.linkman AS linkman,
a.phone AS phone,
a.email AS email,
CASE a.detector_type
WHEN '1' THEN '家用报警器'
WHEN '2' THEN '工业报警器' END AS detectorType,
COUNT(a.detector_id) AS detectorCount,
SUM(CASE a.detector_status WHEN '0' THEN 1 ELSE 0 END) AS onLineNum,
SUM(CASE a.detector_status WHEN '1' THEN 1 ELSE 0 END) AS offLineNum
from(select a1.detector_id,
a1.detector_type,
a1.detector_status,
a2.* from t_detector_info a1
right join t_detector_user a2 on a1.user_id = a2.user_id
where a1.is_del = '0' and a2.is_del = '0' and a2.user_id = #{userId}) a
group by a.detector_type
) t1 left join (
select b.user_id AS userId,
COUNT(b.id) AS historyAlarmNum,
SUM(CASE b.is_cancel_alarm WHEN '0' THEN 1 ELSE 0 END) AS processingAlarmNum,
COUNT(b.id) - SUM(CASE b.is_cancel_alarm WHEN '0' THEN 1 ELSE 0 END) AS cancelAlarmNum
from(select b1.id,b1.is_cancel_alarm,b2.*
from t_detector_report_data b1
left join t_detector_info b2 on b1.detector_code = b2.detector_code
right join t_detector_user b3 on b2.user_id = b3.user_id
where b2.is_del = '0' and b3.is_del = '0' and b3.user_id = #{userId}) b
group by b.detector_type
) t2 on t2.userId = t1.userId
</select>
<insert id="insertTDetectorUser" parameterType="TDetectorUser" useGeneratedKeys="true" keyProperty="userId">
insert into t_detector_user
<trim prefix="(" suffix=")" suffixOverrides=",">
......
......@@ -10,6 +10,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="registerAddress" column="register_address" />
<result property="legalRepresentative" column="legal_representative" />
<result property="businessArea" column="business_area" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="iconType" column="icon_type" />
<result property="licenseKey" column="license_key" />
<result property="licenseValidityTime" column="license_validity_time" />
<result property="annualSupervisionInspection" column="annual_supervision_inspection" />
......@@ -23,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectTEnterpriseInfoVo">
select enterprise_id, enterprise_name, register_address, legal_representative,
business_area, license_key, license_validity_time, annual_supervision_inspection,
business_area, longitude, latitude, icon_type, license_key, license_validity_time, annual_supervision_inspection,
create_by, create_time, update_by, update_time, remarks from t_enterprise_info
</sql>
......@@ -55,6 +58,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="registerAddress != null">register_address,</if>
<if test="legalRepresentative != null">legal_representative,</if>
<if test="businessArea != null">business_area,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="iconType != null">icon_type,</if>
<if test="licenseKey != null">license_key,</if>
<if test="licenseValidityTime != null">license_validity_time,</if>
<if test="annualSupervisionInspection != null">annual_supervision_inspection,</if>
......@@ -70,6 +76,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="registerAddress != null">#{registerAddress},</if>
<if test="legalRepresentative != null">#{legalRepresentative},</if>
<if test="businessArea != null">#{businessArea},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="iconType != null">#{iconType},</if>
<if test="licenseKey != null">#{licenseKey},</if>
<if test="licenseValidityTime != null">#{licenseValidityTime},</if>
<if test="annualSupervisionInspection != null">#{annualSupervisionInspection},</if>
......@@ -89,6 +98,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="registerAddress != null">register_address = #{registerAddress},</if>
<if test="legalRepresentative != null">legal_representative = #{legalRepresentative},</if>
<if test="businessArea != null">business_area = #{businessArea},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="iconType != null">icon_type = #{iconType},</if>
<if test="licenseKey != null">license_key = #{licenseKey},</if>
<if test="licenseValidityTime != null">license_validity_time = #{licenseValidityTime},</if>
<if test="annualSupervisionInspection != null">annual_supervision_inspection = #{annualSupervisionInspection},</if>
......
......@@ -208,4 +208,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{workId}
</foreach>
</delete>
<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,
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=3,1,0))/SUM(IF(work_type=3,1,0)),0) AS typeThree,
IFNULL(SUM(IF(work_status=3 AND work_type=4,1,0))/SUM(IF(work_type=4,1,0)),0) AS typeFor,
(SELECT COUNT(employed_people_id) FROM t_employed_people_info WHERE is_del = 0
AND beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
) AS peopleNum,
(SELECT CAST(SUM(pipe_length) AS DECIMAL(20,0)) FROM t_pipe_info WHERE is_del = 0
AND beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
)AS allPipeLength
FROM t_work_order WHERE is_del = 0
AND work_assign_enterprose_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
</select>
</mapper>
\ No newline at end of file
/*
* @Author: your name
* @Date: 2022-02-23 15:28:07
* @LastEditTime: 2022-02-25 18:43:58
* @LastEditTime: 2022-03-01 15:54:19
* @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
......@@ -60,6 +60,15 @@ export function getUser(query) {
params: query
})
}
// 企业接口
export function getEnterprise(query) {
return request({
url: '/regulation/info/enterpriseInfoList',
method: 'get',
params: query
})
}
// 获取公司名称以及id
export function getCompany(query) {
return request({
......@@ -67,4 +76,12 @@ export function getCompany(query) {
method: 'get',
params: query
})
}
\ No newline at end of file
}
// 报警
export function userAlarm(query) {
return request({
url: '/supervise/user/getDetectorUserAlarmList',
method: 'get',
params: query
})
}
......@@ -18,6 +18,15 @@ export function detectorUserList(query) {
})
}
// 探测器用户列表
export function getDetectorUserAlarmList(query) {
return request({
url: '/supervise/user/getDetectorUserAlarmList',
method: 'get',
params: query
})
}
// 查询探测器用户详细
export function getDetectorUser(userId) {
return request({
......
......@@ -50,4 +50,12 @@ export function exportOrder(query) {
method: 'get',
params: query
})
}
\ No newline at end of file
}
export function selectWorkOrderNum(query) {
return request({
url: '/system/order/selectWorkOrderNum',
method: 'get',
params: query
})
}
<svg width="80" height="60" viewBox="0 0 80 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="40" cy="44" r="16" fill="url(#paint0_linear_214_31)"/>
<path d="M36.3506 49.459C33.4894 54.9554 37.7938 58.6511 40.3036 59.8119C31.9271 61.0354 32.1154 53.2237 33.7154 47.106C35.3154 40.9884 41.0579 36.6854 41.0565 36.7531C41.0565 36.0001 41.5585 35.2472 41.8095 34.9648C41.2824 37.6754 43.9114 43.3099 45.2918 45.7884C49.5083 52.4895 45.7311 57.4276 43.3154 59.059C45.1977 56.6119 43.9742 52.4707 41.7154 48.3295C39.9083 45.0166 39.9585 40.8001 40.2095 39.106C39.0801 40.706 38.7036 46.5413 41.8095 51.3413C44.2942 55.1813 43.284 57.7727 42.4683 58.5884C42.9954 55.426 41.3075 54.1335 40.3977 53.8825C41.3765 55.4637 40.5546 56.4237 40.0212 56.706C39.8644 55.608 39.306 53.2801 38.3271 52.7531C37.3483 52.226 36.6016 50.3374 36.3506 49.459Z" fill="url(#paint1_linear_214_31)"/>
<path d="M9.0625 7.17773V5.45898H10.8984V7.17773H15.5957C16.5918 7.17773 17.3568 7.3763 17.8906 7.77344C18.5807 8.29427 18.9258 9.00391 18.9258 9.90234L18.916 17.2363C18.916 18.1087 18.7402 18.776 18.3887 19.2383C17.8418 19.9609 17.0312 20.3223 15.957 20.3223H10.8984L10.9082 22.0215L9.0625 22.0117V20.3223H4.42383C3.48633 20.3223 2.78971 20.1888 2.33398 19.9219C1.50716 19.4401 1.09375 18.5254 1.09375 17.1777V10.2734C1.09375 9.27083 1.34766 8.51888 1.85547 8.01758C2.42188 7.45768 3.18685 7.17773 4.15039 7.17773H9.0625ZM9.0625 18.4863V9.01367H4.0918C3.62956 9.01367 3.30729 9.13737 3.125 9.38477C2.99479 9.56706 2.92969 9.85352 2.92969 10.2441V17.0312C2.92969 17.474 2.94596 17.7376 2.97852 17.8223C3.14128 18.2715 3.49935 18.4961 4.05273 18.4961L9.0625 18.4863ZM10.8984 18.4863L15.625 18.4961C16.6016 18.5026 17.0898 18.0924 17.0898 17.2656V10.3809C17.0898 9.82096 16.9792 9.45312 16.7578 9.27734C16.5495 9.11458 16.1979 9.02995 15.7031 9.02344L10.8984 9.00391V18.4863ZM21.0352 11.5918V9.78516H22.7539C23.4115 9.78516 23.8965 9.94792 24.209 10.2734C24.502 10.5794 24.6484 11.0612 24.6484 11.7188V19.248C24.6484 19.6191 24.6908 19.847 24.7754 19.9316C24.873 20.0358 25.0879 20.0879 25.4199 20.0879H25.8594V21.8945H24.9023C24.2643 21.8945 23.8281 21.8099 23.5938 21.6406C23.0924 21.276 22.8418 20.7682 22.8418 20.1172V12.4902C22.8418 12.0671 22.7669 11.8001 22.6172 11.6895C22.526 11.6243 22.3405 11.5918 22.0605 11.5918H21.0352ZM21.0352 7.29492V5.48828H24.9316V7.29492H21.0352ZM26.2695 21.8457V20.0488C26.4323 20.0228 26.543 19.9707 26.6016 19.8926C26.6862 19.7884 26.7285 19.5703 26.7285 19.2383V9.44336C26.7285 8.56445 26.9661 7.88086 27.4414 7.39258C27.9102 6.91732 28.5189 6.67969 29.2676 6.67969H33.5059L33.3496 5.33203H35.1855L35.3418 6.67969H36.6602V5.33203H38.4668V6.67969H38.8965V8.48633H35.5566L36.3184 14.7461C36.6178 14.3359 36.8099 13.9421 36.8945 13.5645C36.9596 13.2715 37.015 12.8451 37.0605 12.2852H38.8574C38.7923 13.3203 38.6914 14.0397 38.5547 14.4434C38.3854 14.9382 38.1608 15.3678 37.8809 15.7324C37.653 16.0319 37.2656 16.4225 36.7188 16.9043C37.0182 17.7181 37.3275 18.3626 37.6465 18.8379C37.959 19.3066 38.3757 19.7461 38.8965 20.1562V22.1094C37.9395 21.7122 37.194 21.2435 36.6602 20.7031C36.1003 20.1367 35.5892 19.3034 35.127 18.2031L33.3496 19.6484V17.2656L34.6289 16.2402L33.7109 8.48633H29.8438C28.9518 8.48633 28.5124 8.92904 28.5254 9.81445L28.5352 10.3906L30.7129 10.4004C31.377 10.4004 31.8457 10.5371 32.1191 10.8105C32.4316 11.1165 32.5879 11.6048 32.5879 12.2754V19.4824C32.5879 20.6999 32.002 21.3086 30.8301 21.3086H29.5508V19.4824H30.0098C30.3027 19.4824 30.5078 19.4173 30.625 19.2871C30.7487 19.1504 30.8105 18.9648 30.8105 18.7305V13.0762C30.8105 12.7376 30.7357 12.5033 30.5859 12.373C30.4753 12.2819 30.153 12.2363 29.6191 12.2363H28.5352V19.375C28.5352 19.9674 28.4342 20.4232 28.2324 20.7422C27.985 21.1393 27.6562 21.4355 27.2461 21.6309C27.0247 21.7415 26.6992 21.8132 26.2695 21.8457ZM40.9473 22.2656V20.0293C41.4746 19.6842 41.901 19.1178 42.2266 18.3301C42.5391 17.5684 42.6953 16.6634 42.6953 15.6152V5.50781H44.2871V15.7422C44.2871 16.7904 44.4727 17.6986 44.8438 18.4668C45.1628 19.1309 45.5599 19.6419 46.0352 20V21.9434C45.4232 21.6048 44.9219 21.2207 44.5312 20.791C44.1992 20.4264 43.89 19.9674 43.6035 19.4141C43.2259 20.1367 42.7734 20.752 42.2461 21.2598C41.9857 21.5202 41.5527 21.8555 40.9473 22.2656ZM40.9473 16.416V6.15234H42.0215V16.416H40.9473ZM45.0488 16.416V6.15234H46.123V16.416H45.0488ZM46.4062 22.0996V20.4199C46.5885 20.4069 46.709 20.3678 46.7676 20.3027C46.8327 20.2246 46.8652 20.0228 46.8652 19.6973V18.4961H48.6719V19.6094C48.6719 21.1523 47.9167 21.9824 46.4062 22.0996ZM46.582 9.89258V7.98828C46.9857 7.77344 47.2819 7.46745 47.4707 7.07031C47.6335 6.73828 47.7767 6.16536 47.9004 5.35156H49.7363L49.5703 6.16211H50.957C51.6016 6.16211 52.1061 6.28255 52.4707 6.52344C52.6335 6.6276 52.806 6.8099 52.9883 7.07031H54.7559V5.47852H56.6016V7.07031H57.2363V5.78125H58.8086V7.07031H59.0625L59.0527 8.87695H56.6016C56.6341 9.85352 56.6895 10.5697 56.7676 11.0254C56.9629 12.0866 57.3242 13.0664 57.8516 13.9648C58.1445 14.4727 58.5352 15.0228 59.0234 15.6152V17.8906C58.2227 17.2005 57.5651 16.4941 57.0508 15.7715C56.5951 15.1204 56.1589 14.3327 55.7422 13.4082C55.2995 14.5605 54.8405 15.472 54.3652 16.1426C53.929 16.7546 53.3561 17.3405 52.6465 17.9004V15.498C53.3496 14.6647 53.8704 13.7272 54.209 12.6855C54.502 11.7936 54.6875 10.5241 54.7656 8.87695H53.0176C52.4837 11.735 51.8262 13.7826 51.0449 15.0195C50.4004 16.0352 49.5931 16.7904 48.623 17.2852C48.1283 17.5391 47.4577 17.7604 46.6113 17.9492V16.2891C47.1908 16.1328 47.6237 15.9733 47.9102 15.8105C48.2747 15.6087 48.6589 15.2767 49.0625 14.8145H47.041V13.0078H50.166L50.5469 12.0215H47.0117V10.2246H51.0352C51.237 9.44987 51.3379 8.93555 51.3379 8.68164C51.3379 8.41471 51.2728 8.22266 51.1426 8.10547C51.0514 8.03385 50.8105 7.99805 50.4199 7.99805L49.0723 7.98828C48.7402 8.55469 48.3854 8.96484 48.0078 9.21875C47.5846 9.51172 47.1094 9.73633 46.582 9.89258ZM50.2344 22.0508V18.4961H52.041V22.0508H50.2344ZM53.7598 22.0508V18.4961H55.5566V22.0508H53.7598ZM57.2266 22.0508V18.4961H59.0332V22.0508H57.2266ZM60.9766 10.1758V8.53516C61.3411 8.43099 61.5918 8.30729 61.7285 8.16406C61.8717 8.01432 62.0573 7.51628 62.2852 6.66992C62.4089 6.22721 62.5195 5.81055 62.6172 5.41992H64.3359L64.1504 6.03516H78.0176V7.8418H63.6719C63.4896 8.48633 63.2031 9.01042 62.8125 9.41406H78.0176V11.2109H62.0801V9.90234C61.8978 9.98047 61.5299 10.0716 60.9766 10.1758ZM61.0352 14.5898V12.7734H75.2246C76.0384 12.7734 76.6178 12.8874 76.9629 13.1152C77.7507 13.6296 78.1413 14.3034 78.1348 15.1367V19.0723C78.1283 19.5996 78.4245 19.987 79.0234 20.2344V22.0703C78.3073 21.9336 77.7311 21.6536 77.2949 21.2305C76.8717 20.8203 76.5853 20.3613 76.4355 19.8535C76.3639 19.5931 76.3281 19.2057 76.3281 18.6914V15.9082C76.3281 15.472 76.2305 15.14 76.0352 14.9121C75.8398 14.6908 75.5957 14.5801 75.3027 14.5801L61.0352 14.5898Z" fill="white"/>
<defs>
<linearGradient id="paint0_linear_214_31" x1="40" y1="28" x2="40" y2="60" gradientUnits="userSpaceOnUse">
<stop stop-color="#92D4F4"/>
<stop offset="0.541667" stop-color="#38B4F0"/>
<stop offset="1" stop-color="#0B618C"/>
</linearGradient>
<linearGradient id="paint1_linear_214_31" x1="40.0191" y1="34.9648" x2="40.0191" y2="59.9397" gradientUnits="userSpaceOnUse">
<stop stop-color="#FABB00"/>
<stop offset="0.463542" stop-color="#F75001"/>
<stop offset="1" stop-color="#E90712"/>
</linearGradient>
</defs>
</svg>
<svg width="80" height="60" viewBox="0 0 80 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.0625 7.17773V5.45898H10.8984V7.17773H15.5957C16.5918 7.17773 17.3568 7.3763 17.8906 7.77344C18.5807 8.29427 18.9258 9.00391 18.9258 9.90234L18.916 17.2363C18.916 18.1087 18.7402 18.776 18.3887 19.2383C17.8418 19.9609 17.0312 20.3223 15.957 20.3223H10.8984L10.9082 22.0215L9.0625 22.0117V20.3223H4.42383C3.48633 20.3223 2.78971 20.1888 2.33398 19.9219C1.50716 19.4401 1.09375 18.5254 1.09375 17.1777V10.2734C1.09375 9.27083 1.34766 8.51888 1.85547 8.01758C2.42188 7.45768 3.18685 7.17773 4.15039 7.17773H9.0625ZM9.0625 18.4863V9.01367H4.0918C3.62956 9.01367 3.30729 9.13737 3.125 9.38477C2.99479 9.56706 2.92969 9.85352 2.92969 10.2441V17.0312C2.92969 17.474 2.94596 17.7376 2.97852 17.8223C3.14128 18.2715 3.49935 18.4961 4.05273 18.4961L9.0625 18.4863ZM10.8984 18.4863L15.625 18.4961C16.6016 18.5026 17.0898 18.0924 17.0898 17.2656V10.3809C17.0898 9.82096 16.9792 9.45312 16.7578 9.27734C16.5495 9.11458 16.1979 9.02995 15.7031 9.02344L10.8984 9.00391V18.4863ZM20.9473 22.2656V20.0293C21.4746 19.6842 21.901 19.1178 22.2266 18.3301C22.5391 17.5684 22.6953 16.6634 22.6953 15.6152V5.50781H24.2871V15.7422C24.2871 16.7904 24.4727 17.6986 24.8438 18.4668C25.1628 19.1309 25.5599 19.6419 26.0352 20V21.9434C25.4232 21.6048 24.9219 21.2207 24.5312 20.791C24.1992 20.4264 23.89 19.9674 23.6035 19.4141C23.2259 20.1367 22.7734 20.752 22.2461 21.2598C21.9857 21.5202 21.5527 21.8555 20.9473 22.2656ZM20.9473 16.416V6.15234H22.0215V16.416H20.9473ZM25.0488 16.416V6.15234H26.123V16.416H25.0488ZM26.4062 22.0996V20.4199C26.5885 20.4069 26.709 20.3678 26.7676 20.3027C26.8327 20.2246 26.8652 20.0228 26.8652 19.6973V18.4961H28.6719V19.6094C28.6719 21.1523 27.9167 21.9824 26.4062 22.0996ZM26.582 9.89258V7.98828C26.9857 7.77344 27.2819 7.46745 27.4707 7.07031C27.6335 6.73828 27.7767 6.16536 27.9004 5.35156H29.7363L29.5703 6.16211H30.957C31.6016 6.16211 32.1061 6.28255 32.4707 6.52344C32.6335 6.6276 32.806 6.8099 32.9883 7.07031H34.7559V5.47852H36.6016V7.07031H37.2363V5.78125H38.8086V7.07031H39.0625L39.0527 8.87695H36.6016C36.6341 9.85352 36.6895 10.5697 36.7676 11.0254C36.9629 12.0866 37.3242 13.0664 37.8516 13.9648C38.1445 14.4727 38.5352 15.0228 39.0234 15.6152V17.8906C38.2227 17.2005 37.5651 16.4941 37.0508 15.7715C36.5951 15.1204 36.1589 14.3327 35.7422 13.4082C35.2995 14.5605 34.8405 15.472 34.3652 16.1426C33.929 16.7546 33.3561 17.3405 32.6465 17.9004V15.498C33.3496 14.6647 33.8704 13.7272 34.209 12.6855C34.502 11.7936 34.6875 10.5241 34.7656 8.87695H33.0176C32.4837 11.735 31.8262 13.7826 31.0449 15.0195C30.4004 16.0352 29.5931 16.7904 28.623 17.2852C28.1283 17.5391 27.4577 17.7604 26.6113 17.9492V16.2891C27.1908 16.1328 27.6237 15.9733 27.9102 15.8105C28.2747 15.6087 28.6589 15.2767 29.0625 14.8145H27.041V13.0078H30.166L30.5469 12.0215H27.0117V10.2246H31.0352C31.237 9.44987 31.3379 8.93555 31.3379 8.68164C31.3379 8.41471 31.2728 8.22266 31.1426 8.10547C31.0514 8.03385 30.8105 7.99805 30.4199 7.99805L29.0723 7.98828C28.7402 8.55469 28.3854 8.96484 28.0078 9.21875C27.5846 9.51172 27.1094 9.73633 26.582 9.89258ZM30.2344 22.0508V18.4961H32.041V22.0508H30.2344ZM33.7598 22.0508V18.4961H35.5566V22.0508H33.7598ZM37.2266 22.0508V18.4961H39.0332V22.0508H37.2266ZM41.0449 22.0312V20.6641C41.1882 20.6315 41.2826 20.5892 41.3281 20.5371C41.3542 20.498 41.3737 20.319 41.3867 20V11.4355H42.7637V20.0977C42.7637 21.2826 42.1908 21.9271 41.0449 22.0312ZM41.2305 10.1367V8.33984H47.8809V10.1367H45.4883V22.0703H43.6816V10.1367H41.2305ZM41.2207 7.25586V5.45898H47.8809V7.25586H41.2207ZM46.4062 21.9727V11.4648H47.8711V21.9727H46.4062ZM48.9453 19.0625V17.2656H53.1152V14.0625H49.1309V12.2559H53.1152V9.04297H48.9453V7.23633H50.2344V5.48828H52.0996V7.23633H55.8691V5.48828H57.7441V7.23633H59.0918V9.04297H54.9512V12.2559H58.9355V14.0625H54.9512V17.2656H59.0918V19.0625H54.9512V22.0312H53.1152V19.0625H48.9453ZM60.9863 21.9824V20.3027C61.0059 20.3027 61.0221 20.3027 61.0352 20.3027C61.276 20.3027 61.403 19.987 61.416 19.3555L61.5234 11.5723H63.1641L63.1152 18.6426C63.1087 19.5671 63.0566 20.2051 62.959 20.5566C62.7311 21.3965 62.0736 21.8717 60.9863 21.9824ZM61.1719 10.498V8.7207H63.8672V7.33398H61.2012V5.68359H68.0957V7.33398H65.6738V8.7207H68.1152V10.498H65.6738V22.0508H63.8672V10.498H61.1719ZM66.4746 22.0508V11.5332H68.0078V22.0508H66.4746ZM69.2285 18.8574V16.9922H75.9766V5.43945H77.7832V16.9922H79.0332V18.8574H77.7832V22.0801H75.9766V18.8574H69.2285ZM69.2578 14.0137V12.1191H74.6484V14.0137H69.2578ZM69.2578 8.89648V7.00195H74.6484V8.89648H69.2578Z" fill="white"/>
<g filter="url(#filter0_i_214_32)">
<path d="M39.3976 36.2643V28C26.9319 28.5381 23.9391 38.6026 24.0009 43.5676C24.5945 56.0216 34.5127 59.7117 39.3976 60V48.8529L36.2441 43.5676C35.0569 40.3387 37.8518 37.3534 39.3976 36.2643Z" fill="url(#paint0_linear_214_32)"/>
<path d="M40.3251 29.7297V28C44.4062 28 46.6013 29.0571 47.1887 29.7297H40.3251Z" fill="#0534AD"/>
<path d="M40.3251 33.7658V31.3634L50.435 31.5556L51.8263 33.0931L40.3251 33.7658Z" fill="#0534AD"/>
<path d="M40.3251 37.6096V35.015L53.5885 35.5916L54.145 36.7447L40.3251 37.6096Z" fill="#0534AD"/>
<path d="M42.0874 41.1652L40.9744 38.8589L55.0725 39.3393L55.7218 40.5886L42.0874 41.1652Z" fill="#0534AD"/>
<path d="M44.0352 44.9129L43.1077 42.991L55.8146 43.4715L56.0001 44.3363L44.0352 44.9129Z" fill="#0534AD"/>
<path d="M43.1077 48.5646L44.0352 46.7387L55.7218 47.4114L55.258 48.1802L43.1077 48.5646Z" fill="#0534AD"/>
<path d="M42.3656 50.4865C40.5106 50.4096 40.2324 51.992 40.3251 52.7928L53.403 52.1201L54.145 51.0631C50.9915 50.9029 44.2207 50.5634 42.3656 50.4865Z" fill="#0534AD"/>
<path d="M40.3251 56.4444L40.6034 54.1381L51.8263 54.7147L50.5278 55.964L40.3251 56.4444Z" fill="#0534AD"/>
<path d="M40.3251 59.9039V57.8859L47.1887 58.3664C44.9627 59.5964 41.6855 59.9039 40.3251 59.9039Z" fill="#0534AD"/>
</g>
<defs>
<filter id="filter0_i_214_32" x="24" y="28" width="32" height="32.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="0.2"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_214_32"/>
</filter>
<linearGradient id="paint0_linear_214_32" x1="31.6988" y1="28" x2="31.6988" y2="60" gradientUnits="userSpaceOnUse">
<stop stop-color="#EDB223"/>
<stop offset="0.515625" stop-color="#D60501"/>
<stop offset="1" stop-color="#D60501"/>
</linearGradient>
</defs>
</svg>
<svg id="组_2446" data-name="组 2446" xmlns="http://www.w3.org/2000/svg" width="18" height="25" viewBox="0 0 23 33.9">
<path id="路径_170" data-name="路径 170" d="M-1583.57,295.955a3.719,3.719,0,0,0-3.714,3.713,3.719,3.719,0,0,0,3.714,3.713,3.719,3.719,0,0,0,3.713-3.713,3.719,3.719,0,0,0-3.713-3.713Zm2.287,4.15a.608.608,0,0,1-.437.184h-1.862a.618.618,0,0,1-.621-.621V297.2a.618.618,0,0,1,.621-.621.608.608,0,0,1,.437.184.608.608,0,0,1,.184.437v1.862h1.242a.618.618,0,0,1,.621.621.6.6,0,0,1-.184.425Zm-8.966-5.047a4.143,4.143,0,0,0,4.161,0,4.166,4.166,0,0,0,2.081-3.61,4.161,4.161,0,0,0-4.162-4.161,4.16,4.16,0,0,0-4.161,4.161A4.179,4.179,0,0,0-1590.249,295.058Zm1.724,4.61a4.872,4.872,0,0,1,.391-1.931,5.639,5.639,0,0,1,.54-.966,4.67,4.67,0,0,1-.575.035,5.145,5.145,0,0,1-2.081-.425,5.006,5.006,0,0,1-.943-.517,1.2,1.2,0,0,0-1.345-.011,7.8,7.8,0,0,0-3.414,6.265v.069a.6.6,0,0,0,.6.575h7.92a5.215,5.215,0,0,1-.7-1.161,5.035,5.035,0,0,1-.391-1.931Z" transform="translate(1599.528 -284.903)" fill="#7bf8f4" opacity="0.996">
<animate attributeName="fill" attributeType="XML"
from="#7bf8f4" to="#ff0000"
begin="0s" dur="1s"
fill="remove" repeatCount="indefinite"/>
</path>
<g id="路径_190" data-name="路径 190" fill="none">
<path d="M11.5,0A11.5,11.5,0,0,1,23,11.5c0,6.351-11.6,18.226-11.5,18.3S0,17.851,0,11.5A11.5,11.5,0,0,1,11.5,0Z" stroke="none"/>
<path d="M 11.5 1.000003814697266 C 5.71027946472168 1.000003814697266 1 5.710294723510742 1 11.50003433227539 C 1 15.44052124023438 6.295677185058594 22.62869262695312 11.47670078277588 28.30246353149414 C 12.68496322631836 26.95182609558105 15.33070659637451 23.97891044616699 17.65538024902344 20.72865295410156 C 19.63738059997559 17.95753479003906 22 14.10700416564941 22 11.50003433227539 C 22 5.710294723510742 17.28972053527832 1.000003814697266 11.5 1.000003814697266 M 11.5 3.814697265625e-06 C 17.85128021240234 3.814697265625e-06 23 5.148744583129883 23 11.50003433227539 C 23 17.82767677307129 11.48916530609131 29.63790130615234 11.49940204620361 29.80170249938965 C 11.36462783813477 29.63816833496094 0 17.78736114501953 0 11.50003433227539 C 0 5.148744583129883 5.14872932434082 3.814697265625e-06 11.5 3.814697265625e-06 Z M 11.49940204620361 29.80170249938965 C 11.50076866149902 29.80335998535156 11.50098419189453 29.80382347106934 11.5 29.80304336547852 C 11.49963855743408 29.80275726318359 11.49944019317627 29.80231475830078 11.49940204620361 29.80170249938965 Z" stroke="none" fill="#7bf8f4">
<animate attributeName="fill" attributeType="XML"
from="#7bf8f4" to="#ff0000"
begin="0s" dur="1s"
fill="remove" repeatCount="indefinite"/>
</path>
</g>
<path id="多边形_37" data-name="多边形 37" d="M4.471,0,8.941,5.961H0Z" transform="translate(16.094 29.803) rotate(180)" fill="#7bf8f4">
<animate attributeName="fill" attributeType="XML"
from="#7bf8f4" to="#ff0000"
begin="0s" dur="1s"
fill="remove" repeatCount="indefinite"/>
</path>
</svg>
......@@ -40,7 +40,7 @@
<div v-else>-</div>
</template>
</el-table-column>
<el-table-column prop="reportTime" label="警时间" width="">
<el-table-column prop="reportTime" label="警时间" width="">
<template slot-scope="scope">
<div v-unValue>{{ scope.row.reportTime }}</div>
</template>
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-01 16:29:17
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/views/components/deviceA.vue
-->
<template>
<div class="devicea-wrapper">
<div class="title">
{{ deviceData.enterpriseName }}
</div>
<div class="close" @click="close">
<img src="@/assets/mapImages/closeBtn.png" alt="" />
</div>
<div class="top flex">
<div class="group">
<div class="left">企业名称:</div>
<div class="right zzz">{{ deviceData.enterpriseName }}</div>
</div>
<div class="group">
<div class="left">法定代表人:</div>
<div v-unValue class="right zzz">
{{ deviceData.legalRepresentative }}
</div>
</div>
<div class="group">
<div class="left">经营区域:</div>
<div v-unValue :title="deviceData.businessArea" class="right last zzz">
{{ deviceData.businessArea }}
</div>
</div>
</div>
<div class="middle">
<div class="left">
<div>注册地址:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.registerAddress }}
</div>
</div>
<div class="middle">
<div class="left">
<div>备注信息:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.remarks }}
</div>
</div>
</div>
</template>
<script>
import { companyType, deviceType } from "@/utils/mapClass/config.js";
export default {
data() {
return {
companyType,
deviceType,
profile: "暂无备注",
};
},
computed: {
prodTest() {
return this.vueRoot.$store.state.user.systemSetting.prod_test;
},
company() {
return this.vueRoot.$store.state.bigWindowCompany.company;
},
},
mounted() {
// 如果不是测试,而是真数据,就要用帧数据的东西
if (this.prodTest != "test") {
this.companyType = {};
this.company.forEach((item) => {
this.companyType[item.conpanyId] = item.companyName;
});
}
console.log(this.deviceData);
},
methods: {
close() {
this.mapClass.infowindowClose();
},
btnClick() {
this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
},
},
};
</script>
<style lang="scss" scoped>
.devicea-wrapper {
background-color: rgba(9, 18, 32, 0.6);
padding: 10px;
position: relative;
width: 700px;
.title {
// padding-top: 10px;
// padding-left: 10px;
font-size: 14px;
line-height: 14px;
color: #ffffff;
}
.close {
position: absolute;
right: 10px;
top: 5px;
cursor: pointer;
}
.top {
margin-top: 10px;
// margin-bottom: 10px;
border: 1px solid #cccccc;
box-sizing: border-box;
.group {
height: 30px;
flex: 1;
display: flex;
justify-content: space-between;
box-sizing: border-box;
div {
flex: 1;
box-sizing: border-box;
border-right: 1px solid #cccccc;
text-align: center;
font-size: 14px;
color: #ffffff;
line-height: 30px;
padding: 0 5px;
&.last {
border-right: none;
}
}
.left {
text-align: right;
background-color: rgba(255, 255, 255, 0.1);
}
}
}
.middle {
display: flex;
border: 1px solid #cccccc;
border-top: none;
& > div {
box-sizing: border-box;
border-right: 1px solid #cccccc;
text-align: center;
font-size: 14px;
color: #ffffff;
line-height: 30px;
padding: 0 5px;
&.left {
width: 113px;
display: flex;
align-items: center;
background-color: rgba(255, 255, 255, 0.1);
div {
text-align: right;
flex: 1;
}
}
&.right {
border: none;
flex: 1;
text-align: left;
text-indent: 2em;
line-height: normal;
padding: 5px;
}
}
}
.foot {
width: 100%;
padding: 5px;
border: 1px solid #ffffff;
box-sizing: border-box;
font-size: 14px;
color: #ffffff;
text-indent: 2em;
margin-bottom: 10px;
}
.flex {
display: flex;
justify-content: space-between;
}
}
</style>
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-02-28 15:52:58
* @LastEditTime: 2022-02-28 18:05:19
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -62,8 +62,8 @@
<div class="last">报警中</div>
</div>
<div class="tbody flex" v-if="Array.isArray(deviceData.pressureFlows)">
<div class="first zzz">{{ "压力表与流量计" }}</div>
<div v-unValue class="">{{ deviceData.numberEquipment }}</div>
<div class="first zzz">{{ "压力表" }}</div>
<div v-unValue class="">{{ deviceData.numberPressureGauges }}</div>
<div v-unValue class="">
{{ deviceData.onlineEquipment }}
</div>
......@@ -80,6 +80,25 @@
{{ deviceData.inAlarm }}
</div>
</div>
<div class="tbody flex" v-if="Array.isArray(deviceData.pressureFlows)">
<div class="first zzz">{{ "流量计" }}</div>
<div v-unValue class="">{{ deviceData.numberEquipment }}</div>
<div v-unValue class="">
{{ deviceData.numberOnlineEquipment }}
</div>
<div v-unValue class="">
{{ deviceData.numberOfflineEquipment }}
</div>
<div v-unValue class="">
{{ deviceData.numberHistoricalAlarm }}
</div>
<div v-unValue class="">
{{ deviceData.numberAlarmProcessed }}
</div>
<div v-unValue class="last">
{{ deviceData.numberInAlarm }}
</div>
</div>
</div>
<div class="btn">
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-02-28 13:30:46
* @LastEditTime: 2022-03-01 09:17:01
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -35,41 +35,46 @@
</div>
</div>
<div class="foot">
<div class="thead flex">
<div class="first">设备类型</div>
<div>设备数量</div>
<div>在线设备</div>
<div>离线设备</div>
<div>历史报警</div>
<div>已处理报警</div>
<div class="last">报警中</div>
</div>
<div class="tbody flex">
<div v-unValue class="first zzz">{{ deviceData.detectorType }}</div>
<div class="">{{ deviceData.detectorCount }}</div>
<div v-unValue class="">
{{ deviceData.onLineNum }}
</div>
<div v-unValue class="">
{{ deviceData.offLineNum }}
</div>
<div v-unValue class="">
{{ deviceData.historyAlarmNum }}
<template v-if="deviceData.detectorCountList">
<div class="foot">
<div class="thead flex">
<div class="first">设备类型</div>
<div>设备数量</div>
<div>在线设备</div>
<div>离线设备</div>
<div>历史报警</div>
<div>已处理报警</div>
<div class="last">报警中</div>
</div>
<div v-unValue class="">
{{ deviceData.cancelAlarmNum }}
</div>
<div v-unValue class="last zzz">
{{ deviceData.processingAlarmNum }}
<div
v-for="data in deviceData.detectorCountList"
:key="data.userId"
class="tbody flex"
>
<div v-unValue class="first zzz">{{ data.detectorType }}</div>
<div class="">{{ data.detectorCount }}</div>
<div v-unValue class="">
{{ data.onLineNum }}
</div>
<div v-unValue class="">
{{ data.offLineNum }}
</div>
<div v-unValue class="">
{{ data.historyAlarmNum }}
</div>
<div v-unValue class="">
{{ data.cancelAlarmNum }}
</div>
<div v-unValue class="last zzz">
{{ data.processingAlarmNum }}
</div>
</div>
</div>
</div>
</template>
<div class="btn">
<div @click="btnClick">感知设备</div>
</div>
</div>
</template>
......@@ -106,7 +111,10 @@ export default {
},
btnClick() {
// this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
this.vueRoot.getDetectorInfoList({ userId: this.deviceData.userId },this.deviceData.nickName);
this.vueRoot.getDetectorInfoList(
{ userId: this.deviceData.userId },
this.deviceData.nickName
);
},
},
};
......
......@@ -26,7 +26,7 @@
</div>
</template>
</el-table-column>
<el-table-column prop="detectorName" label="设备名称" width="100">
<el-table-column prop="detectorName" label="设备名称" width="120">
<template slot-scope="scope">
<div :title="scope.row.detectorName" class="ddd" v-unValue>
{{ scope.row.detectorName }}
......@@ -39,12 +39,15 @@
</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">
</el-table-column>
<el-table-column prop="alarmTime" label="报警时间" width="200">
<el-table-column prop="alarmTime" label="预警时间" width="180">
<template slot-scope="scope">
<div v-unValue>{{ scope.row.alarmTime }}</div>
</template>
......
/*
* @Author: your name
* @Date: 2022-01-26 10:47:44
* @LastEditTime: 2022-02-28 15:53:46
* @LastEditTime: 2022-03-01 16:07:06
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/config.js
......@@ -26,6 +26,15 @@ export const svgUrl = {
4: require("@/assets/image/changzhan1.svg"),
5: require("@/assets/image/jiankong1.svg"),
6: require("@/assets/image/user1.svg"),
7: require("@/assets/image/zrxk.svg"),
8: require("@/assets/image/zcrq.svg"),
};
export const svgAlarm = {
2: require("@/assets/image/tiaoyaxiang1.svg"),
3: require("@/assets/image/famen1.svg"),
4: require("@/assets/image/changzhan1.svg"),
5: require("@/assets/image/jiankong1.svg"),
6: require("@/assets/mapImages/userAlarm.svg"),
};
export const deviceType = {
1:"管道",
......
/*
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-02-28 10:25:45
* @LastEditTime: 2022-03-01 16:16:19
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/mapClass.js
*/
import { pipeColor, svgUrl } from "@/utils/mapClass/config.js";
import { pipeColor, svgUrl, svgAlarm } from "@/utils/mapClass/config.js";
// 编辑类
// 在地图上新增的设备可以直接编辑,
......@@ -34,6 +34,8 @@ export class EditorMap {
allDevice = {};
// 存放所有的管道
pipeArr = {};
// 报警设备的对象
alarmObj = {};
// 当前的infowindow的组件
infowindowComponent = null;
// infowindow本身
......@@ -249,6 +251,7 @@ export class EditorMap {
addDevice(deviceData, compontent) {
const { longitude: lng, latitude: lat, iconType } = deviceData;
const icon = svgUrl[iconType];
console.log("icon", icon);
let device = this.createMarker({
map: this.map,
anchor: "bottom-center",
......@@ -266,7 +269,6 @@ export class EditorMap {
this.allDevice[iconType] = [];
}
this.allDevice[iconType].push(device);
// 设备的事件函数
this.deviceEvent(device, compontent);
}
......@@ -282,18 +284,19 @@ export class EditorMap {
// 3是删除操作
}
});
device.on("mouseover",(e)=>{
device.on("mouseover", (e) => {
const target = e.target;
const data = target.getExtData();
console.log(data)
const name = data.nickName||data.deviceName||data.videoName||data.stationName
target.setLabel({content:name,direction:"top"})
})
device.on("mouseout",(e)=>{
console.log(data);
const name =
data.nickName || data.deviceName || data.videoName || data.stationName;
target.setLabel({ content: name, direction: "top" });
});
device.on("mouseout", (e) => {
const target = e.target;
const data = target.getExtData();
target.setLabel({content:""})
})
target.setLabel({ content: "" });
});
}
/** 点击marker出现infowindow
* @description:
......@@ -476,11 +479,12 @@ export class EditorMap {
// 设备过滤受到bigwindow页面的的两种制约,companyArr, typeArr 两个数组制约显示隐藏
// 燃气没有公司,所以没有device.companyType不收到公司的控制
const companyHas = companyArr.indexOf(data.companyType + "") >= 0;
// 设备存在
const deviceHas = typeArr.indexOf(+data.iconType ) >= 0;
console.log(deviceHas)
// 设备存在 受到设备按钮限制
const deviceHas = typeArr.indexOf(+data.iconType) >= 0;
// 如果是燃气公司的话,不受按钮限制
const enterprise = data.iconType ==7 || data.iconType ==8;
// 必须设备存在数组里,才会显示设备 !data.companyType代表用户不受公司制约
if (deviceHas && (companyHas || !data.companyType)) {
if ( (deviceHas || enterprise) && (companyHas || !data.companyType)) {
device.show();
} else {
device.hide();
......@@ -488,7 +492,93 @@ export class EditorMap {
});
}
}
// 普通调用方法
// 设备报警
deviceAlarm(obj) {
// 设备的类型
const { iconType, userId } = obj;
// 找到这个设备所属的空间
const device = this.allDevice[iconType].filter(
(item) => item.getExtData().userId == userId
)[0];
// 更改的icon
const icon = svgAlarm[iconType];
device.setIcon(icon);
// 将旧的值缓存一下
device.oldData = device.getExtData();
device.setExtData(obj);
// 如果infowindow是打开的,就改变里面的数据,必须是用户才行
if (this.infowindowComponent && this.infowindowComponent.deviceData.iconType==6) {
this.infowindowComponentChange(obj);
}
if (!this.alarmObj[iconType]) {
this.alarmObj[iconType] = [];
} else {
const ind = this.alarmObj[iconType].indexOf(userId);
if (ind < 0) {
this.alarmObj[iconType].push(userId);
}
}
}
//如果传过来的报警设备中,有不在deviceAlarm中,就是恢复的设备恢复
relieveAlarm(alarmObj) {
// 把报警数组改变结构
const httpArr = alarmObj.map((item) => item.userId);
// 循环现有报警设备
for (let iconType in this.alarmObj) {
const arr = this.alarmObj[iconType];
// 循环现有报警设备
for (let i = 0; i < arr.length; i++) {
// 看看现有报警设备中有没有不在 报警数组中的值,有就恢复
const userId = arr[i];
// 看看接口传来的数据中还有没有这些UserId,如果没有了,就是修好了
const index = httpArr.indexOf(userId);
// 如果已经不在报警数组中,就要去大数组中找他,利用userId
if (index < 0) {
// 过滤出来这个要恢复的设备
const device = this.allDevice[iconType].filter(
(item) => item.getExtData().userId == userId
)[0];
// 恢复
const icon = svgUrl[iconType];
device.setIcon(icon);
// 赋值
const deviceData = device.oldData;
device.setExtData(deviceData);
device.oldData = null;
// 如果infowindow是打开的
if (this.infowindowComponent && this.infowindowComponent.deviceData.iconType==6) {
this.infowindowComponentChange(deviceData);
}
// 在arr中删掉
arr.splice(i, 1);
// 由于删掉了当前,所以要--恢复位置
i--;
}
}
}
}
// ws协议方法
wsAlarm(obj) {
const { iconType, userId, userStatus } = obj;
const decice = this.allDevice[iconType].filter(
(item) => item.getExtData().userId == userId
)[0];
let icon = null;
// 2报警,1恢复
if (userStatus == 2) {
icon = svgAlarm[iconType];
device.oldData = device.getExtData();
device.setExtData(obj);
} else if (userStatus == 1) {
icon = svgUrl[iconType];
const oldData = device.oldData;
device.setExtData(oldData);
device.oldData = null;
}
decice.setIcon(icon);
}
// 卫星图切换
satellite = null;
changeMap(bool) {
......
<!--
* @Author: your name
* @Date: 2022-01-11 13:44:17
* @LastEditTime: 2022-02-28 15:54:27
* @LastEditTime: 2022-03-01 16:08:52
* @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
......@@ -152,6 +152,8 @@ import {
getCz,
getVideo,
getUser,
getEnterprise,
userAlarm,
} from "@/api/bigWindow/getDevice";
import Line from "@/components/bigWindow/Line.vue";
import VideoView from "@/components/bigWindow/VideoView.vue";
......@@ -159,6 +161,7 @@ import DeviceA from "@/components/bigWindow/DeviceA.vue";
import User from "@/components/bigWindow/User.vue";
import Center from "@/components/bigWindow/Center.vue";
import UserCenter from "@/components/bigWindow/UserCenter.vue";
import Company from "@/components/bigWindow/Company.vue";
import PipeColor from "@/components/bigWindow/PipeColor.vue";
// import markerInfoWindow from './components/markerInfoWindow.vue'
......@@ -244,6 +247,9 @@ export default {
centerTotal: null,
centerShow: false,
centerTitle: "",
// 报警轮询timer
alarmTimer: null,
};
},
......@@ -305,15 +311,22 @@ export default {
this.goMap(getFm, this.addDevice, DeviceA);
this.goMap(getCz, this.addDevice, DeviceA);
this.goMap(getVideo, this.addDevice, VideoView);
this.goMap(detectorUserList, this.addDevice, User);
// getVideo().then((res) => {
// console.log("getVideo", res);
// });
}
this.goMap(getEnterprise, this.addDevice, Company);
// 用户要等一下 因为有报警数据
this.goMap(detectorUserList, this.addDevice, User).then((res) => {
// 先查一下,然后开启定时器
this.userAlarm();
this.alarmTimer = setInterval(() => {
this.userAlarm();
// console.log("查询报警");
}, 6000);
});
}
this.currentTime();
this.$refs.mychild.choice(0);
this.$refs.mychild2.choice(0);
this.$refs.mychild2.choice(this.selarr);
},
methods: {
...mapActions({
......@@ -336,7 +349,7 @@ export default {
}
},
goMap(httpFunc, addFunc, component) {
httpFunc().then((res) => {
return httpFunc().then((res) => {
// 给用户加icontype
if (res.data && !res.data[0].iconType) {
......@@ -344,26 +357,34 @@ export default {
item.iconType = 6;
});
}
// if (res.data && !res.data[0].iconType) {
// res.data.forEach((item) => {
// item.iconType = 6;
// });
// }
// 根据数据格式不同,赋值不同,如果是个数组,就用res,如果不是就用res.data
let config = {};
if (Array.isArray(res)) {
config = { data: res };
// 给视频设备的conpanyType变成null
if(res[0].iconType==5){
res.forEach(item=>{
// 给视频设备的conpanyType变成null,因为视频不受企业控制
if (res[0].iconType == 5) {
res.forEach((item) => {
item.companyType = null;
})
});
}
} else {
config = { data: res.data };
}
addFunc(config, component);
return config.iconType;
});
},
userAlarm() {
userAlarm().then((res) => {
console.log("报警", res.data);
if (res.data.length > 0) {
// 报警
res.data.forEach((item) => {
this.map.deviceAlarm(item);
});
// 看看谁告消警
}
this.map.relieveAlarm(res.data);
});
},
......@@ -387,6 +408,7 @@ export default {
this.map.allfilter(this.selarr, this.selarr1);
this.map.infowindowClose();
this.show = false;
this.$refs.mychild2.choice(this.selarr);
},
sel(index, item) {
this.map.infowindowClose();
......@@ -408,6 +430,7 @@ export default {
}
// this.map.companyFilter(this.selarr);
this.map.allfilter(this.selarr, this.selarr1);
this.$refs.mychild2.choice(this.selarr);
},
sel1(index, item) {
......@@ -474,6 +497,9 @@ export default {
if (this.formatDate) {
clearInterval(this.formatDate); // 在Vue实例销毁前,清除时间定时器
}
if (this.alarmTimer) {
clearInterval(this.alarmTimer);
}
},
};
</script>
......
......@@ -34,7 +34,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8903/gassafety`,
// target: `http://192.168.2.14:8903/gassafety`,
target: `http://222.223.203.154:8092/gassafety`,
changeOrigin: true,
pathRewrite: {
......
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