Commit 7017e306 authored by yaqizhang's avatar yaqizhang

合并冲突

parents 49d6da3a 15c9e30b
package com.zehong.web.controller.riskManagement;
import java.util.List;
import com.zehong.system.domain.vo.HiddenTroubleVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -41,19 +43,19 @@ public class THiddenTroubleController extends BaseController
public TableDataInfo list(THiddenTrouble tHiddenTrouble)
{
startPage();
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
List<HiddenTroubleVo> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
return getDataTable(list);
}
/**
* 地图初始化隐患
* @param tHiddenTrouble
* @param
* @return
*/
@GetMapping("/getMapHiddenTroublelist")
public AjaxResult getMapHiddenTroublelist(THiddenTrouble tHiddenTrouble)
public AjaxResult getMapHiddenTroublelist()
{
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
List<HiddenTroubleVo> list = tHiddenTroubleService.getMapTHiddenTroubleList();
return AjaxResult.success(list);
}
......@@ -66,8 +68,8 @@ public class THiddenTroubleController extends BaseController
public AjaxResult export(THiddenTrouble tHiddenTrouble)
{
tHiddenTrouble.setDealStatus("3");
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
ExcelUtil<THiddenTrouble> util = new ExcelUtil<THiddenTrouble>(THiddenTrouble.class);
List<HiddenTroubleVo> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
ExcelUtil<HiddenTroubleVo> util = new ExcelUtil<HiddenTroubleVo>(HiddenTroubleVo.class);
return util.exportExcel(list, "隐患信息数据");
}
......@@ -76,9 +78,16 @@ public class THiddenTroubleController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:query')")
@GetMapping(value = "/{troubleId}")
public AjaxResult getInfo(@PathVariable("troubleId") int troubleId)
public AjaxResult getInfo(@PathVariable("troubleId") int troubleId) throws Exception
{
return AjaxResult.success(tHiddenTroubleService.selectTHiddenTroubleById(troubleId));
HiddenTroubleVo hiddenTroubleVo = null;
try {
hiddenTroubleVo = tHiddenTroubleService.selectTHiddenTroubleById(troubleId);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("获取隐患信息详情失败");
}
return AjaxResult.success(hiddenTroubleVo);
}
/**
......
......@@ -67,6 +67,18 @@ public class SysUserController extends BaseController
return getDataTable(list);
}
/**
* 获取用户列表不分页
*/
@PreAuthorize("@ss.hasPermi('system:user:allList')")
@GetMapping("/allList")
public AjaxResult allList()
{
SysUser user = new SysUser();
List<SysUser> list = userService.selectUserList(user);
return AjaxResult.success(list);
}
/**
* 获取巡检员列表
*/
......
......@@ -10,7 +10,7 @@ import com.zehong.common.core.domain.BaseEntity;
* 隐患信息对象 t_hidden_trouble
*
* @author zehong
* @date 2021-07-21
* @date 2021-08-20
*/
public class THiddenTrouble extends BaseEntity
{
......@@ -19,20 +19,29 @@ public class THiddenTrouble extends BaseEntity
/** 隐患信息id */
private Integer troubleId;
/** 设备id */
@Excel(name = "设备id")
private Integer deviceId;
/** 隐患类型 */
@Excel(name = "隐患类型")
private String troubleType;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */
private String deviceType;
/** 隐患名称 */
@Excel(name = "隐患名称")
private String troubleName;
/** 隐患级别 */
@Excel(name = "隐患级别")
private String troubleLevel;
/** 工单id */
@Excel(name = "工单id")
private String orderId;
/** 地址 */
@Excel(name = "地址")
private String address;
/** 设备id */
@Excel(name = "设备id")
private Integer deviceId;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */
@Excel(name = "设备类型", readConverterExp = "0=管道,1调压阀,2阀门井,3流量计,4压力表")
private String deviceType;
/** 经度 */
@Excel(name = "经度")
......@@ -42,14 +51,30 @@ public class THiddenTrouble extends BaseEntity
@Excel(name = "纬度")
private BigDecimal latitude;
/** 是否作废(0正常,1作废) */
@Excel(name = "是否作废(0正常,1作废)")
private String isDel;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */
@Excel(name = "处理状态", readConverterExp = "1不需处理,2已处理完成,3未处理完成")
private String dealStatus;
/** 地址 */
@Excel(name = "地址")
private String address;
/** 备注 */
@Excel(name = "备注")
private String remarks;
/** 图片地址 */
@Excel(name = "图片地址")
private String pictureUrl;
/** 上报人(用户id) */
@Excel(name = "上报人", readConverterExp = "用户id")
private Long reportMan;
public void setTroubleId(Integer troubleId)
{
this.troubleId = troubleId;
......@@ -59,6 +84,24 @@ public class THiddenTrouble extends BaseEntity
{
return troubleId;
}
public String getTroubleName() {
return troubleName;
}
public void setTroubleName(String troubleName) {
this.troubleName = troubleName;
}
public void setTroubleType(String troubleType)
{
this.troubleType = troubleType;
}
public String getTroubleType()
{
return troubleType;
}
public void setDeviceId(Integer deviceId)
{
this.deviceId = deviceId;
......@@ -68,15 +111,15 @@ public class THiddenTrouble extends BaseEntity
{
return deviceId;
}
public String getDeviceType() {
return deviceType;
public void setTroubleLevel(String troubleLevel)
{
this.troubleLevel = troubleLevel;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
public String getTroubleLevel()
{
return troubleLevel;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
......@@ -86,15 +129,6 @@ public class THiddenTrouble extends BaseEntity
{
return orderId;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
......@@ -104,6 +138,15 @@ public class THiddenTrouble extends BaseEntity
{
return longitude;
}
public void setDeviceType(String deviceType)
{
this.deviceType = deviceType;
}
public String getDeviceType()
{
return deviceType;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
......@@ -114,6 +157,14 @@ public class THiddenTrouble extends BaseEntity
return latitude;
}
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
public void setDealStatus(String dealStatus)
{
this.dealStatus = dealStatus;
......@@ -123,6 +174,15 @@ public class THiddenTrouble extends BaseEntity
{
return dealStatus;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
......@@ -132,21 +192,43 @@ public class THiddenTrouble extends BaseEntity
{
return remarks;
}
public void setPictureUrl(String pictureUrl)
{
this.pictureUrl = pictureUrl;
}
public String getPictureUrl()
{
return pictureUrl;
}
public void setReportMan(Long reportMan)
{
this.reportMan = reportMan;
}
public Long getReportMan()
{
return reportMan;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("troubleId", getTroubleId())
.append("troubleType", getTroubleType())
.append("deviceId", getDeviceId())
.append("deviceType", getDeviceType())
.append("troubleLevel", getTroubleLevel())
.append("orderId", getOrderId())
.append("address", getAddress())
.append("longitude", getLongitude())
.append("deviceType", getDeviceType())
.append("latitude", getLatitude())
.append("dealStatus", getDealStatus())
.append("updateTime", getUpdateTime())
.append("address", getAddress())
.append("createTime", getCreateTime())
.append("remarks", getRemarks())
.append("pictureUrl", getPictureUrl())
.append("reportMan", getReportMan())
.toString();
}
}
......@@ -2,7 +2,9 @@ package com.zehong.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.core.domain.BaseEntity;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceReportData;
import com.zehong.system.domain.TPipe;
import java.math.BigDecimal;
import java.util.Date;
......@@ -33,21 +35,15 @@ public class DeviceAlarmVo extends BaseEntity
/** 设备编号 */
private String deviceCode;
/** 经度 */
private BigDecimal longitude;
/** 纬度 */
private BigDecimal latitude;
/** 坐标 */
private String coordinates;
/** 物联网编号 */
private String iotNo;
/** 设备监控数据列表(用于详情折线图) */
private List<TDeviceReportData> deviceReportDataList;
/** 设备列表(用于展示设备详情) */
private List<TDeviceInfo> deviceList;
/** 管道列表(用于展示管道详情) */
private List<TPipe> pipeList;
/** 工单id */
private String orderId;
......@@ -112,44 +108,28 @@ public class DeviceAlarmVo extends BaseEntity
this.deviceCode = deviceCode;
}
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 String getCoordinates() {
return coordinates;
public List<TDeviceReportData> getDeviceReportDataList() {
return deviceReportDataList;
}
public void setCoordinates(String coordinates) {
this.coordinates = coordinates;
public void setDeviceReportDataList(List<TDeviceReportData> deviceReportDataList) {
this.deviceReportDataList = deviceReportDataList;
}
public String getIotNo() {
return iotNo;
public List<TDeviceInfo> getDeviceList() {
return deviceList;
}
public void setIotNo(String iotNo) {
this.iotNo = iotNo;
public void setDeviceList(List<TDeviceInfo> deviceList) {
this.deviceList = deviceList;
}
public List<TDeviceReportData> getDeviceReportDataList() {
return deviceReportDataList;
public List<TPipe> getPipeList() {
return pipeList;
}
public void setDeviceReportDataList(List<TDeviceReportData> deviceReportDataList) {
this.deviceReportDataList = deviceReportDataList;
public void setPipeList(List<TPipe> pipeList) {
this.pipeList = pipeList;
}
public void setOrderId(String orderId)
......@@ -218,9 +198,6 @@ public class DeviceAlarmVo extends BaseEntity
"alarmId=" + alarmId +
", deviceId=" + deviceId +
", deviceType='" + deviceType + '\'' +
", deviceName='" + deviceName + '\'' +
", deviceCode='" + deviceCode + '\'' +
", iotNo='" + iotNo + '\'' +
", orderId='" + orderId + '\'' +
", alarmType='" + alarmType + '\'' +
", alarmValue='" + alarmValue + '\'' +
......
package com.zehong.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import com.zehong.system.domain.TOrderFeedback;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* 隐患信息对象 t_hidden_trouble
*
* @author zehong
* @date 2021-08-20
*/
public class HiddenTroubleVo extends BaseEntity
{
/** 隐患信息id */
private Integer troubleId;
/** 隐患类型 */
@Excel(name = "隐患类型")
private String troubleType;
/** 隐患名称 */
@Excel(name = "隐患名称")
private String troubleName;
/** 隐患级别 */
@Excel(name = "隐患级别")
private String troubleLevel;
/** 工单id */
@Excel(name = "工单id")
private String orderId;
/** 指定执行人员姓名 */
private String appointInspectorName;
/** 下发时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date allotTime;
/** 反馈信息列表 */
private List<TOrderFeedback> feedbackList;
/** 设备id */
@Excel(name = "设备id")
private Integer deviceId;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */
@Excel(name = "设备类型", readConverterExp = "0=管道,1调压阀,2阀门井,3流量计,4压力表")
private String deviceType;
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 是否作废(0正常,1作废) */
@Excel(name = "是否作废(0正常,1作废)")
private String isDel;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */
@Excel(name = "处理状态", readConverterExp = "1不需处理,2已处理完成,3未处理完成")
private String dealStatus;
/** 地址 */
@Excel(name = "地址")
private String address;
/** 备注 */
@Excel(name = "备注")
private String remarks;
/** 图片地址 */
@Excel(name = "图片地址")
private String pictureUrl;
/** 上报人(用户id) */
private Long reportMan;
/** 上报人姓名 */
@Excel(name = "上报人姓名", readConverterExp = "上报人姓名")
private String reportManName;
public void setTroubleId(Integer troubleId)
{
this.troubleId = troubleId;
}
public Integer getTroubleId()
{
return troubleId;
}
public String getTroubleName() {
return troubleName;
}
public void setTroubleName(String troubleName) {
this.troubleName = troubleName;
}
public void setTroubleType(String troubleType)
{
this.troubleType = troubleType;
}
public String getTroubleType()
{
return troubleType;
}
public void setDeviceId(Integer deviceId)
{
this.deviceId = deviceId;
}
public Integer getDeviceId()
{
return deviceId;
}
public void setTroubleLevel(String troubleLevel)
{
this.troubleLevel = troubleLevel;
}
public String getTroubleLevel()
{
return troubleLevel;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
{
return orderId;
}
public String getAppointInspectorName() {
return appointInspectorName;
}
public void setAppointInspectorName(String appointInspectorName) {
this.appointInspectorName = appointInspectorName;
}
public Date getAllotTime() {
return allotTime;
}
public void setAllotTime(Date allotTime) {
this.allotTime = allotTime;
}
public List<TOrderFeedback> getFeedbackList() {
return feedbackList;
}
public void setFeedbackList(List<TOrderFeedback> feedbackList) {
this.feedbackList = feedbackList;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
{
return longitude;
}
public void setDeviceType(String deviceType)
{
this.deviceType = deviceType;
}
public String getDeviceType()
{
return deviceType;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
public void setDealStatus(String dealStatus)
{
this.dealStatus = dealStatus;
}
public String getDealStatus()
{
return dealStatus;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
public void setPictureUrl(String pictureUrl)
{
this.pictureUrl = pictureUrl;
}
public String getPictureUrl()
{
return pictureUrl;
}
public void setReportMan(Long reportMan)
{
this.reportMan = reportMan;
}
public Long getReportMan()
{
return reportMan;
}
public String getReportManName() {
return reportManName;
}
public void setReportManName(String reportManName) {
this.reportManName = reportManName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("troubleId", getTroubleId())
.append("troubleType", getTroubleType())
.append("deviceId", getDeviceId())
.append("troubleLevel", getTroubleLevel())
.append("orderId", getOrderId())
.append("longitude", getLongitude())
.append("deviceType", getDeviceType())
.append("latitude", getLatitude())
.append("dealStatus", getDealStatus())
.append("updateTime", getUpdateTime())
.append("address", getAddress())
.append("createTime", getCreateTime())
.append("remarks", getRemarks())
.append("pictureUrl", getPictureUrl())
.append("reportMan", getReportMan())
.toString();
}
}
......@@ -27,6 +27,14 @@ public interface THiddenTroubleMapper
*/
public List<THiddenTrouble> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble);
/**
* 地图显示隐患信息列表
*
* @param
* @return 隐患信息集合
*/
public List<THiddenTrouble> getMapTHiddenTroubleList();
/**
* 新增隐患信息
*
......
......@@ -2,6 +2,7 @@ package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.THiddenTrouble;
import com.zehong.system.domain.vo.HiddenTroubleVo;
/**
* 隐患信息Service接口
......@@ -17,7 +18,7 @@ public interface ITHiddenTroubleService
* @param troubleId 隐患信息ID
* @return 隐患信息
*/
public THiddenTrouble selectTHiddenTroubleById(int troubleId);
public HiddenTroubleVo selectTHiddenTroubleById(int troubleId) throws Exception;
/**
* 查询隐患信息列表
......@@ -25,7 +26,15 @@ public interface ITHiddenTroubleService
* @param tHiddenTrouble 隐患信息
* @return 隐患信息集合
*/
public List<THiddenTrouble> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble);
public List<HiddenTroubleVo> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble);
/**
* 地图显示隐患信息列表
*
* @param
* @return 隐患信息集合
*/
public List<HiddenTroubleVo> getMapTHiddenTroubleList();
/**
* 新增隐患信息
......
......@@ -76,16 +76,24 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
if("0".equals(tDeviceAlarm.getDeviceType())){
TPipe pipe = tPipeMapper.selectTPipeById(tDeviceAlarm.getDeviceId());
if(pipe != null) {
deviceAlarmVo.setDeviceCode(pipe.getPipeCode());
deviceAlarmVo.setDeviceName(pipe.getPipeName());
deviceAlarmVo.setCoordinates(pipe.getCoordinates());
List<TPipe> pipeList = new ArrayList<>();
pipeList.add(pipe);
deviceAlarmVo.setPipeList(pipeList);
}
} else {
TDeviceInfo deviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(tDeviceAlarm.getDeviceId());
if(deviceInfo != null){
deviceAlarmVo.setDeviceCode(deviceInfo.getDeviceCode());
deviceAlarmVo.setDeviceName(deviceInfo.getDeviceName());
deviceAlarmVo.setIotNo(deviceInfo.getIotNo());
deviceAlarmVo.setLongitude(deviceInfo.getLongitude());
deviceAlarmVo.setLatitude(deviceInfo.getLatitude());
List<TDeviceInfo> deviceList = new ArrayList<>();
deviceList.add(deviceInfo);
deviceAlarmVo.setDeviceList(deviceList);
}
// 查询当前设备开始报警时间前后一小时的数据
TDeviceReportData tDeviceReportData = new TDeviceReportData();
......@@ -136,12 +144,20 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
if (pipe != null) {
deviceAlarmVo.setDeviceCode(pipe.getPipeCode());
deviceAlarmVo.setDeviceName(pipe.getPipeName());
List<TPipe> pipeList = new ArrayList<>();
pipeList.add(pipe);
deviceAlarmVo.setPipeList(pipeList);
}
} else {
TDeviceInfo deviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(alarm.getDeviceId());
if (deviceInfo != null) {
deviceAlarmVo.setDeviceCode(deviceInfo.getDeviceCode());
deviceAlarmVo.setDeviceName(deviceInfo.getDeviceName());
List<TDeviceInfo> deviceList = new ArrayList<>();
deviceList.add(deviceInfo);
deviceAlarmVo.setDeviceList(deviceList);
}
}
......
package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.zehong.common.core.domain.entity.SysDictData;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.*;
import com.zehong.system.domain.vo.HiddenTroubleVo;
import com.zehong.system.mapper.*;
import com.zehong.system.service.ISysDictTypeService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.THiddenTroubleMapper;
import com.zehong.system.domain.THiddenTrouble;
import com.zehong.system.service.ITHiddenTroubleService;
/**
......@@ -19,6 +27,18 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
{
@Autowired
private THiddenTroubleMapper tHiddenTroubleMapper;
@Autowired
private TDeviceInfoMapper tDeviceInfoMapper;
@Autowired
private TPipeMapper tPipeMapper;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
private TWorkOrderMapper tWorkOrderMapper;
@Autowired
private TOrderFeedbackMapper tOrderFeedbackMapper;
@Autowired
private ISysDictTypeService iSysDictTypeService;
/**
* 查询隐患信息
......@@ -27,9 +47,66 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息
*/
@Override
public THiddenTrouble selectTHiddenTroubleById(int troubleId)
public HiddenTroubleVo selectTHiddenTroubleById(int troubleId) throws Exception
{
return tHiddenTroubleMapper.selectTHiddenTroubleById(troubleId);
HiddenTroubleVo hiddenTroubleVo = new HiddenTroubleVo();
THiddenTrouble tHiddenTrouble = tHiddenTroubleMapper.selectTHiddenTroubleById(troubleId);
BeanUtils.copyProperties(tHiddenTrouble, hiddenTroubleVo);
SysUser sysUser = sysUserMapper.selectUserById(tHiddenTrouble.getReportMan());
hiddenTroubleVo.setReportManName(sysUser.getNickName());
if (StringUtils.isNotEmpty(tHiddenTrouble.getTroubleType())) {
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType("t_trouble_type");
for (SysDictData sysDictData : sysDictDataList) {
if (tHiddenTrouble.getTroubleType().equals(sysDictData.getDictValue())) {
hiddenTroubleVo.setTroubleType(sysDictData.getDictLabel());
}
}
}
if (StringUtils.isNotEmpty(tHiddenTrouble.getTroubleLevel())) {
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType("t_trouble_level");
for (SysDictData sysDictData : sysDictDataList) {
if (tHiddenTrouble.getTroubleLevel().equals(sysDictData.getDictValue())) {
hiddenTroubleVo.setTroubleLevel(sysDictData.getDictLabel());
}
}
}
if (StringUtils.isNotEmpty(tHiddenTrouble.getDealStatus())) {
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType("t_deal_status");
for (SysDictData sysDictData : sysDictDataList) {
if(tHiddenTrouble.getDealStatus() == null){
hiddenTroubleVo.setDealStatus("暂未处理");
} else if (tHiddenTrouble.getDealStatus().equals(sysDictData.getDictValue())) {
hiddenTroubleVo.setDealStatus(sysDictData.getDictLabel());
}
}
}
if(tHiddenTrouble.getDeviceId() != null){
if("0".equals(tHiddenTrouble.getDeviceType())){
TPipe pipe = tPipeMapper.selectTPipeById(tHiddenTrouble.getDeviceId());
hiddenTroubleVo.setDeviceName(pipe.getPipeName());
} else {
TDeviceInfo device = tDeviceInfoMapper.selectTDeviceInfoById(tHiddenTrouble.getDeviceId());
hiddenTroubleVo.setDeviceName(device.getDeviceName());
}
}
if(tHiddenTrouble.getOrderId() != null && !"".equals(tHiddenTrouble.getOrderId())) {
TWorkOrder tWorkOrder = tWorkOrderMapper.selectTWorkOrderById(tHiddenTrouble.getOrderId());
hiddenTroubleVo.setAllotTime(tWorkOrder.getAllotTime());
// 获取巡检员姓名
SysUser appointInspector = sysUserMapper.selectUserById(tWorkOrder.getAppointInspector());
hiddenTroubleVo.setAppointInspectorName(appointInspector.getNickName());
List<TOrderFeedback> orderFeedbackList = tOrderFeedbackMapper.selectTOrderFeedbackByOrderId(tHiddenTrouble.getOrderId());
if(orderFeedbackList.size() != 0){
hiddenTroubleVo.setFeedbackList(orderFeedbackList);
}
}
return hiddenTroubleVo;
}
/**
......@@ -39,9 +116,96 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息
*/
@Override
public List<THiddenTrouble> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble)
public List<HiddenTroubleVo> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble)
{
return tHiddenTroubleMapper.selectTHiddenTroubleList(tHiddenTrouble);
List<HiddenTroubleVo> list = new ArrayList<>();
List<THiddenTrouble> tHiddenTroubleList = tHiddenTroubleMapper.selectTHiddenTroubleList(tHiddenTrouble);
if(tHiddenTroubleList.size() != 0) {
for (THiddenTrouble trouble : tHiddenTroubleList) {
HiddenTroubleVo hiddenTroubleVo = new HiddenTroubleVo();
BeanUtils.copyProperties(trouble, hiddenTroubleVo);
SysUser sysUser = sysUserMapper.selectUserById(trouble.getReportMan());
if(sysUser != null) {
hiddenTroubleVo.setReportManName(sysUser.getNickName());
}
if (StringUtils.isNotEmpty(trouble.getTroubleType())) {
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType("t_trouble_type");
for (SysDictData sysDictData : sysDictDataList) {
if (trouble.getTroubleType().equals(sysDictData.getDictValue())) {
hiddenTroubleVo.setTroubleType(sysDictData.getDictLabel());
}
}
}
if (StringUtils.isNotEmpty(trouble.getTroubleLevel())) {
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType("t_trouble_level");
for (SysDictData sysDictData : sysDictDataList) {
if (trouble.getTroubleLevel().equals(sysDictData.getDictValue())) {
hiddenTroubleVo.setTroubleLevel(sysDictData.getDictLabel());
}
}
}
list.add(hiddenTroubleVo);
}
}
return list;
}
/**
* 地图显示隐患信息列表
*
* @param
* @return 隐患信息集合
*/
@Override
public List<HiddenTroubleVo> getMapTHiddenTroubleList()
{
List<HiddenTroubleVo> list = new ArrayList<>();
List<THiddenTrouble> troubleList = tHiddenTroubleMapper.getMapTHiddenTroubleList();
if(troubleList.size() != 0) {
for (THiddenTrouble temp : troubleList) {
HiddenTroubleVo hiddenTroubleVo = new HiddenTroubleVo();
BeanUtils.copyProperties(temp, hiddenTroubleVo);
SysUser sysUser = sysUserMapper.selectUserById(temp.getReportMan());
if(sysUser != null) {
hiddenTroubleVo.setReportManName(sysUser.getNickName());
}
if (StringUtils.isNotEmpty(temp.getTroubleType())) {
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType("t_trouble_type");
for (SysDictData sysDictData : sysDictDataList) {
if (temp.getTroubleType().equals(sysDictData.getDictValue())) {
hiddenTroubleVo.setTroubleType(sysDictData.getDictLabel());
}
}
}
if (StringUtils.isNotEmpty(temp.getTroubleLevel())) {
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType("t_trouble_level");
for (SysDictData sysDictData : sysDictDataList) {
if (temp.getTroubleLevel().equals(sysDictData.getDictValue())) {
hiddenTroubleVo.setTroubleLevel(sysDictData.getDictLabel());
}
}
}
if (StringUtils.isNotEmpty(temp.getDealStatus())) {
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType("t_deal_status");
for (SysDictData sysDictData : sysDictDataList) {
if(temp.getDealStatus() == null){
hiddenTroubleVo.setDealStatus("暂未处理");
} else if (temp.getDealStatus().equals(sysDictData.getDictValue())) {
hiddenTroubleVo.setDealStatus(sysDictData.getDictLabel());
}
}
}
list.add(hiddenTroubleVo);
}
}
return list;
}
/**
......
......@@ -6,35 +6,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="THiddenTrouble" id="THiddenTroubleResult">
<result property="troubleId" column="trouble_id" />
<result property="troubleName" column="trouble_name" />
<result property="troubleType" column="trouble_type" />
<result property="deviceId" column="device_id" />
<result property="deviceType" column="device_type" />
<result property="troubleLevel" column="trouble_level" />
<result property="orderId" column="order_id" />
<result property="address" column="address" />
<result property="longitude" column="longitude" />
<result property="deviceType" column="device_type" />
<result property="latitude" column="latitude" />
<result property="isDel" column="is_del" />
<result property="dealStatus" column="deal_status" />
<result property="updateTime" column="update_time" />
<result property="address" column="address" />
<result property="createTime" column="create_time" />
<result property="remarks" column="remarks" />
<result property="pictureUrl" column="picture_url" />
<result property="reportMan" column="report_man" />
</resultMap>
<sql id="selectTHiddenTroubleVo">
select trouble_id, device_id, device_type, order_id, address, longitude, latitude, deal_status, update_time, create_time, remarks from t_hidden_trouble
select trouble_id, trouble_name, trouble_type, device_id, trouble_level, order_id, longitude, device_type, latitude, is_del, deal_status, update_time, address, create_time, remarks, picture_url, report_man from t_hidden_trouble
</sql>
<select id="selectTHiddenTroubleList" parameterType="THiddenTrouble" resultMap="THiddenTroubleResult">
<include refid="selectTHiddenTroubleVo"/>
<where>
and is_del = '0'
<if test="troubleName != null and troubleName != ''"> and trouble_name like concat('%', #{troubleName}, '%')</if>
<if test="troubleType != null and troubleType != ''"> and trouble_type = #{troubleType}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="deviceType != null "> and device_type = #{deviceType}</if>
<if test="troubleLevel != null and troubleLevel != ''"> and trouble_level = #{troubleLevel}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="dealStatus != null and dealStatus != ''"> and deal_status = #{dealStatus}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
<if test="reportMan != null "> and report_man = #{reportMan}</if>
</where>
</select>
<select id="getMapTHiddenTroubleList" resultMap="THiddenTroubleResult">
<include refid="selectTHiddenTroubleVo"/>
where is_del = '0' and (deal_status is null or deal_status = '3')
</select>
<select id="selectTHiddenTroubleById" parameterType="int" resultMap="THiddenTroubleResult">
<include refid="selectTHiddenTroubleVo"/>
where trouble_id = #{troubleId}
......@@ -43,44 +61,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertTHiddenTrouble" parameterType="THiddenTrouble" useGeneratedKeys="true" keyProperty="troubleId">
insert into t_hidden_trouble
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="troubleName != null">trouble_name,</if>
<if test="troubleType != null">trouble_type,</if>
<if test="deviceId != null">device_id,</if>
<if test="deviceType != null">device_type,</if>
<if test="troubleLevel != null">trouble_level,</if>
<if test="orderId != null">order_id,</if>
<if test="address != null">address,</if>
<if test="longitude != null">longitude,</if>
<if test="deviceType != null">device_type,</if>
<if test="latitude != null">latitude,</if>
<if test="dealStatus != null">deal_status,</if>
<if test="updateTime != null">update_time,</if>
<if test="address != null">address,</if>
<if test="createTime != null">create_time,</if>
<if test="remarks != null">remarks,</if>
<if test="pictureUrl != null">picture_url,</if>
<if test="reportMan != null">report_man,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="troubleName != null">#{troubleName},</if>
<if test="troubleType != null">#{troubleType},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="troubleLevel != null">#{troubleLevel},</if>
<if test="orderId != null">#{orderId},</if>
<if test="address != null">#{address},</if>
<if test="longitude != null">#{longitude},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="latitude != null">#{latitude},</if>
<if test="dealStatus != null">#{dealStatus},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="address != null">#{address},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remarks != null">#{remarks},</if>
<if test="pictureUrl != null">#{pictureUrl},</if>
<if test="reportMan != null">#{reportMan},</if>
</trim>
</insert>
<update id="updateTHiddenTrouble" parameterType="THiddenTrouble">
update t_hidden_trouble
<trim prefix="SET" suffixOverrides=",">
<if test="troubleName != null">trouble_name = #{troubleName},</if>
<if test="troubleType != null">trouble_type = #{troubleType},</if>
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="deviceType != null">device_id = #{deviceType},</if>
<if test="troubleLevel != null">trouble_level = #{troubleLevel},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="address != null">address = #{address},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="dealStatus != null">deal_status = #{dealStatus},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="address != null">address = #{address},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="pictureUrl != null">picture_url = #{pictureUrl},</if>
<if test="reportMan != null">report_man = #{reportMan},</if>
</trim>
where trouble_id = #{troubleId}
</update>
......
......@@ -10,6 +10,14 @@ export function listUser(query) {
})
}
// 查询用户列表
export function allListUser() {
return request({
url: '/system/user/allList',
method: 'get',
})
}
// 查询巡检员列表
export function inspectorList(query) {
return request({
......
......@@ -69,7 +69,7 @@
// dropdown
.el-dropdown-menu {
a {
display: block
display: block;
}
}
......@@ -78,6 +78,19 @@
display: inline-flex !important;
}
// gis地图里抽屉的搜索样式
.search-input {
.el-input__inner {
height: 28px;
min-height: 28px;
outline: #053b6a;
&:focus {
// outline: #053b6a;
border-color: #053b6a;
}
}
}
// to fix el-date-picker css style
.el-range-separator {
box-sizing: content-box;
......
@font-face {
font-family: "iconfont"; /* Project id 2692138 */
src: url('//at.alicdn.com/t/font_2692138_cd9e8nk8yoo.woff2?t=1627718383904') format('woff2'),
url('//at.alicdn.com/t/font_2692138_cd9e8nk8yoo.woff?t=1627718383904') format('woff'),
url('//at.alicdn.com/t/font_2692138_cd9e8nk8yoo.ttf?t=1627718383904') format('truetype');
src: url('//at.alicdn.com/t/font_2692138_spittg1q2rr.woff2?t=1629681541408') format('woff2'),
url('//at.alicdn.com/t/font_2692138_spittg1q2rr.woff?t=1629681541408') format('woff'),
url('//at.alicdn.com/t/font_2692138_spittg1q2rr.ttf?t=1629681541408') format('truetype');
}
.iconfont {
......@@ -13,6 +13,19 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-reset:before {
content: "\e616";
}
.icon-search{
}
.icon-search:before {
content: "\e617";
font-size: 13px;
}
.icon-zhibanrenyuan:before {
content: "\e613";
}
......
......@@ -13,7 +13,7 @@
<div class="text-wrapper">
<div class="eq-text">设备类型:<span>{{title}}</span></div>
<div class="eq-text">设备型号:<span>{{data.deviceModel}}</span></div>
<div class="eq-text">所属管道:<span>{{data.pipeCode}}</span></div>
<div class="eq-text">所属管道:<span>{{data.pipeName}}</span></div>
<div class="eq-text">物联网编号:<span>{{data.iotNo}}</span></div>
</div>
<div class="pic">
......
......@@ -99,7 +99,7 @@ export default {
obj: { typs: Object },
},
created() {
console.log("created", this.obj);
// console.log("created", this.obj);
},
mounted() {},
computed: {
......@@ -110,7 +110,7 @@ export default {
methods: {
moment,
mousedown(e) {
console.log("?");
// console.log("?");
return;
// console.log(this.$refs.previewImg)
this.$refs.previewImg.showViewer = true;
......
......@@ -115,7 +115,7 @@ export default {
return {};
},
created() {
console.log("created", this.obj);
// console.log("created", this.obj);
},
mounted() {},
computed: {
......@@ -136,7 +136,7 @@ export default {
methods: {
moment,
mousedown(e) {
console.log("??");
// console.log("??");
return;
// console.log(this.$refs.previewImg)
this.$refs.previewImg.showViewer = true;
......
......@@ -22,7 +22,7 @@
设备型号:<span>{{ data.deviceModel }}</span>
</div>
<div class="eq-text">
所属管道:<span>{{ data.pipeCode }}</span>
所属管道:<span>{{ data.pipeName }}</span>
</div>
<div class="eq-text">
物联网编号:<span>{{ data.iotNo }}</span>
......
......@@ -22,7 +22,7 @@
设备型号:<span>{{ data.deviceModel }}</span>
</div>
<div class="eq-text">
所属管道:<span>{{ data.pipeCode }}</span>
所属管道:<span>{{ data.pipeName }}</span>
</div>
<div class="eq-text">
物联网编号:<span>{{ data.iotNo }}</span>
......
<template>
<div class="wrapper">
<span class="dot-left"></span>
<div class="top display-default">
<div class="left text">{{ data.troubleName }}</div>
<div class="right text">
<img
src="../../assets/images/closeBtn.png"
alt=""
@click="map.clearInfoWindow()"
/>
</div>
</div>
<!-- 设备信息 -->
<div class="content">
<div class="eq-content display-default">
<div class="text-wrapper">
<div class="eq-text">
隐患类型:<span>{{ data.troubleType }}</span>
</div>
<div class="eq-text">
隐患等级:<span>{{ data.troubleLevel }}</span>
</div>
<div class="eq-text">
处理状态:<span>{{
data.dealStatus ? dealStatus : "暂未处理"
}}</span>
</div>
<div class="eq-text">
上报人员:<span>{{ data.reportManName }}</span>
</div>
</div>
<div class="pic">
<img v-bind:src="data.pictureUrl" alt="" />
</div>
</div>
<!-- 维修人员 -->
<div class="maintain-content">
<el-col :span="11">
<div>
<span>上报日期:</span>
<span>{{ moment(data.createTime).format("YYYY-MM-DD") }}</span>
</div>
</el-col>
<el-col :span="13">
<div>
<span>最后巡检日期:</span>
<span>{{
data.updateTime
? moment(data.updateTime).format("YYYY-MM-DD")
: "-"
}}</span>
</div>
</el-col>
<div>
<span>隐患所在地址:</span>
<span>{{ data.address }}</span>
</div>
<div>
<span>备注信息:</span>
<span>{{ data.remarks ? data.remarks : "-" }} </span>
</div>
</div>
</div>
<!-- 隐患关联设备状态 -->
<div class="warn-wrapper" v-if="true">
<div class="warn-content">
<div>
关联设备:<span>({{ data.deviceName ? data.deviceName : "-" }})</span>
</div>
<div>
设备类型:<span>{{ data.deviceType ? data.deviceType : "-" }}</span>
</div>
<div v-if="!orderId">
工单编号:<span>{{ data.orderId }}</span>
</div>
</div>
<div class="btn">
<span @mousedown.stop="deviceMore">
<el-button class="elbtn" type="primary">设备详情</el-button>
</span>
<span v-if="orderId" @mousedown.stop="createWork">
<el-button
v-if="title == '压力表' || title == '流量计'"
class="elbtn"
type="primary"
>生成工单</el-button
>
</span>
<span v-else @mousedown.stop="checkWork">
<el-button class="elbtn" type="primary">查看工单</el-button>
</span>
</div>
</div>
</div>
</template>
<script>
import moment from "moment";
//line移入时的的infowindow
export default {
props: {
obj: { typs: Object },
title: "",
data: {},
map: null,
},
data() {
return {
deviceType: {
1: "调压箱",
2: "阀门井",
3: "流量计",
4: "智能燃气表",
},
};
},
computed: {
orderId() {
// 如果已经生成过工单,就不能再次生成了
// return this.data.orderId ? false : true;
return this.data.orderId ? false : true;
},
},
methods: {
moment,
createWork() {
// 控制外层弹框
// console.log(this.data.view.$refs.CreateWork);
this.data.view.$refs.CreateWork.alarmId = this.data.alarmId;
this.data.view.$refs.CreateWork.open = true;
this.data.view.$refs.CreateWork.gaoMap = this.data.view.gaoMap;
// 改变外层回调
// this.data.view.CreateWorkCallBack = this.CreateWorkCallBack;
this.data.view.alarmObjChange({
alarmId: this.data.alarmId,
type: "device",
});
},
// CreateWorkCallBack(e) {
// // console.log("生成工单后传过来的参数", e);
// // console.log("markerCallBack");
// const marker = this.data.view.gaoMap.markers.filter((item) => {
// return item.getExtData().alarmId == this.data.alarmId;
// })[0];
// console.log("marer.getExtData()", marker.getExtData());
// let options = marker.getExtData();
// // 暂时传值,到时候回重新刷新
// options.orderId = e;
// marker.setExtData(options);
// },
deviceMore() {
this.data.view.$router.push({
path: "/dataMonitoring/alarmdetail",
query: {
alarmId: this.data.alarmId,
dcviceType: this.deviceType[this.data.deviceType],
},
});
},
// 查看工单
checkWork() {
this.data.view.$router.push({
path: "/workOrder/detail",
query: {
orderId: this.data.orderId,
},
});
},
},
beforeDestroy() {
// this.data.view.createWorkOpen = false;
},
};
</script>
<style lang="scss" scoped>
.wrapper {
width: 406px;
max-height: 430px;
background: #fff;
border-radius: 4px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
overflow: hidden;
.top {
width: 100%;
height: 51px;
background-color: #ff5a67;
.text {
font-weight: 600;
font-size: 16px;
color: #ffffff;
line-height: 51px;
}
.left {
padding-left: 22px;
}
.right {
padding-right: 22px;
img {
cursor: pointer;
}
}
}
.content {
position: relative;
max-height: 300px;
overflow: hidden;
overflow-y: auto;
padding-bottom: 2px;
border-bottom: 1px solid #eeeeee;
.eq-content {
// min-height: 156px;
box-sizing: border-box;
padding: 13px 22px 0px 22px;
// border-bottom: 1px solid #e2e2e2;
.text-wrapper {
padding-top: 1px;
& > div {
margin-bottom: 6px;
}
.eq-text {
font-size: 14px;
font-weight: 400;
color: #1d1d1d;
opacity: 1;
& > span {
vertical-align: top;
display: inline-block;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
word-break: break-all;
max-width: 100px;
}
}
}
.pic {
width: 180px;
height: 103px;
// background-color: black;
img {
width: 100%;
height: 100%;
// cursor: pointer;
}
}
}
}
.maintain-content {
width: 100%;
max-height: 119px;
padding-left: 22px;
// padding-right: 22px;
// padding-bottom: 10px;
// padding-top: 16px;
box-sizing: border-box;
// border-bottom: 1px solid #e2e2e2;
& > div {
margin-bottom: 8px;
font-size: 14px;
font-weight: 400;
span {
vertical-align: top;
display: inline-block;
word-break: break-all;
max-width: 280px;
}
}
}
.warn-wrapper {
.warn-content {
box-sizing: border-box;
padding: 10px 0 2px 22px;
border-bottom: 1px solid #e2e2e2;
color: #fe5966;
& > div {
font-size: 14px;
font-weight: 400;
margin-bottom: 8px;
}
}
.btn {
padding: 16px 0;
text-align: center;
span {
display: inline-block;
padding: 0 10px;
.elbtn {
background-color: #053b6a;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
width: 95px;
height: 33px;
border: none;
}
}
}
}
}
.wrapperEditorPage {
}
.display-default {
display: flex;
justify-content: space-between;
}
</style>
......@@ -13,7 +13,7 @@ export default {
},
},
created() {
console.log("data", this.data);
// console.log("data", this.data);
},
};
</script>
......
......@@ -158,7 +158,7 @@ export default {
// console.log("userId",item.getExtData().userId)
return item.getExtData().userId == this.formData.userId;
})[0];
console.log("target.moveMarker", target.moveMarker);
// console.log("target.moveMarker", target.moveMarker);
getInspectorLocations(this.formData).then((res) => {
if (res.code == 200) {
// 如果这个时间段没有移动轨迹
......
......@@ -34,6 +34,7 @@ class gaodeMap {
mouseTool = null;
myMap = null;
showInfoWindow = null;
view = null;
//构造函数中设置中央点默认值
constructor(center) {
......@@ -86,6 +87,18 @@ class gaodeMap {
// console.log("缩放开始")
this.closeInfoWindow();
});
this.myMap.on("moveend", () => {
// console.log("缩放开始")
if (!this.onceFlag) {
this.onceFlag = true;
if (this.view) {
this.view.backFlag = false;
// 让抽屉不在隐身
this.view.drawerOpacity = true;
}
}
});
this.districtBoundaries();
}
......@@ -987,10 +1000,10 @@ class gaodeMap {
}
});
let infoWindow = new AMap.InfoWindow({
isCustom:true,
isCustom: true,
content: `<span style='border:1px solid #80d8ff;background:#fff'>${pipeName}</span>`,
anchor: "left-top",
offset: new AMap.Pixel(20, -20),
offset: new AMap.Pixel(20, -20)
});
polyline.on("mouseover", e => {
const options = polyline.getOptions();
......@@ -1007,7 +1020,7 @@ class gaodeMap {
map.add(polyline);
const path = eval(coordinates)[0];
// map.setFitView();
map.setCenter([+path[0],+path[1]], false)
map.setCenter([+path[0], +path[1]], false);
// const lntlat = eval(coordinates)[0];
// map.panTo(lntlat)
......
......@@ -7,6 +7,7 @@ import lineInfoWindow from "../components/PopWindowGis/lineInfoWindow.vue";
import markerInfoWindow from "../components/PopWindowGis/markerInfoWindow.vue";
import removeLineInfoWindow from "../components/PopWindowGis/removeLineInfoWindow.vue";
import markerInfoWindowWarn from "../components/PopWindowGis/markerInfoWindowWarn.vue";
import troubleInfoWindowWarn from "../components/PopWindowGis/troubleInfoWindowWarn.vue";
import lineInfoWindowWarn from "../components/PopWindowGis/lineInfoWindowWarn.vue";
import { delDeviceInfo } from "@/api/device/deviceInfo";
......@@ -28,13 +29,15 @@ export const DEVICE_TYPE = {
WORKORDER: "6",
PRESSUREGAGE: "7",
INSPECTOR: "8",
SMALLINSPECTOR: "workPoint"
SMALLINSPECTOR: "workPoint",
TROUBLE: "trouble"
};
class gaodeMap {
// 所有线的数组
polyLines = [];
//值班人员的单独数组,轨迹的时候使用
workerManArr = [];
troubles = [];
// 值班人员对象的arr
workerManMarkArr = [];
// 是否开启新增
......@@ -114,11 +117,14 @@ class gaodeMap {
if (!this.onceFlag) {
this.onceFlag = true;
this.view.backFlag = false;
// 让抽屉不在隐身
this.view.drawerOpacity = true;
}
// 每次地图移动结束,就让地图可以缩放
let options = this.myMap.getStatus();
options.scrollWheel = true;
this.myMap.setStatus(options);
}
});
this.districtBoundaries();
}
......@@ -268,10 +274,21 @@ class gaodeMap {
this.workerManMarkArr.push(marker);
}
}
// 隐患
if (DEVICE_TYPE.TROUBLE == markerType) {
marker.markerType = markerType;
marker.data = data;
marker.infoWindow = infoWindow;
this.troubles.push(marker);
}
if (
DEVICE_TYPE.WORKORDER != markerType &&
DEVICE_TYPE.INSPECTOR != markerType &&
DEVICE_TYPE.SMALLINSPECTOR != markerType
DEVICE_TYPE.SMALLINSPECTOR != markerType &&
DEVICE_TYPE.TROUBLE != markerType
) {
// marker.content = this.getMarketContent(data, markerInfoWindow);
marker.infoWindow = infoWindow;
......@@ -358,6 +375,7 @@ class gaodeMap {
return marker;
}
// 值班人员
wokerManOpen = e => {
this.markerType = e.target.markerType;
e.target.content = this.getMarketContent(e.target.data);
......@@ -369,6 +387,8 @@ class gaodeMap {
// infoWindow.close();
this.workerManInfoWindow = e.target.infoWindow;
};
// 隐患
troubleOpen = e => {};
// 鼠标移入设备时候实行的函数
infoOpen = e => {
......@@ -441,7 +461,7 @@ class gaodeMap {
getMarketContent(Data, markerInfoWindow) {
let data = { ...Data };
data.class = this;
console.log("this.markerType", this.markerType);
// console.log("this.markerType", this.markerType);
switch (this.markerType) {
case DEVICE_TYPE.REGEULATORBOX: {
const dom = createPop(markerInfoWindow, {
......@@ -504,6 +524,16 @@ class gaodeMap {
dom.remove();
return html;
}
case DEVICE_TYPE.TROUBLE: {
const dom = createPop(troubleInfoWindowWarn, {
title: "隐患",
data: data,
map: map
});
const html = dom.$el;
dom.remove();
return html;
}
}
}
......@@ -595,6 +625,16 @@ class gaodeMap {
marker.setIcon(icon);
break;
}
//隐患
case DEVICE_TYPE.TROUBLE: {
let icon = new AMap.Icon({
opacity: 0.1,
image: require("../assets/images/trouble.png")
});
marker.workerPoint = true;
marker.setIcon(icon);
break;
}
}
}
changeMarkIcon(marker, iconUrl) {
......@@ -779,7 +819,6 @@ class gaodeMap {
// 警告状态时
const item = e.target.getExtData().lineData;
// console.log("item",item)
if (e.target.getExtData().lineData.alarmState == 1) {
infoWindow = this.lineMouseOver(polyline, lineInfoWindowWarn, item);
} else {
......
......@@ -55,7 +55,7 @@
<font v-if="form.orderId == null || form.orderId == ''">未生成工单</font>
<font
v-if="(form.dealStatus == null || form.dealStatus == '') && form.orderId != null && form.orderId != ''">
未处理</font>
未处理</font>
<font v-if="form.dealStatus == 1">不需处理</font>
<font v-if="form.dealStatus == 2">已处理完成</font>
<font v-if="form.dealStatus == 3">未处理完成</font>
......@@ -63,48 +63,80 @@
</el-form>
</el-col>
</el-row>
<!-- <div style="width: 100%;height: 100px;"> -->
<!-- </div> -->
<el-divider></el-divider>
<el-row>
<el-col :span="16" style="padding: 10px;">
<div style="width: 100%;float: left;height: 100%;">
<el-table :data="dataListdetail1" style="width: 100%">
<div style="width: 100%;float: left;height: 100%;" v-if="form.deviceType != '管道'">
<el-table :data="dataListdetail" style="width: 100%">
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceCode" />
<el-table-column label="报警类型" align="center" prop="alarmType" />
<el-table-column label="设备类型" align="center" prop="deviceType" >
<template slot-scope="scope">
<span v-if="scope.row.deviceType == 1">调压阀</span>
<span v-if="scope.row.deviceType == 2">阀门井</span>
<span v-if="scope.row.deviceType == 3">流量计</span>
<span v-if="scope.row.deviceType == 4">压力表</span>
</template>
</el-table-column>
<el-table-column label="设备型号" align="center" prop="deviceModel" />
</el-table>
<el-table :data="dataListdetail2" style="width: 100%;margin-top: 20px;">
<el-table-column label="报警值" align="center" prop="alarmValue" />
<el-table-column label="报警开始时间" align="center" prop="startTime" />
<el-table :data="dataListdetail" style="width: 100%;margin-top: 20px;">
<el-table-column label="物联网编号" align="center" prop="iotNo" />
<el-table-column label="所在地址" align="center" prop="deviceAddr" />
<el-table-column label="联系人" align="center" prop="linkman" />
<el-table-column label="联系电话" align="center" prop="phone" />
</el-table>
<el-table :data="dataListdetail" style="width: 100%;margin-top: 20px;">
<el-table-column label="安装日期" align="center" prop="installationTime" />
<el-table-column label="最后巡检日期" align="center" prop="inspectionTime" />
<el-table-column label="图片" align="center" prop="iconUrl" >
<template slot-scope="scope">
<el-image :src="scope.row.iconUrl" :preview-src-list="[scope.row.iconUrl]" v-if="scope.row.iconUrl != '' && scope.row.iconUrl != null" style="width: 16px;"></el-image>
</template>
</el-table-column>
</el-table>
</div>
<div style="width: 100%;float: left;height: 100%;" v-if="form.deviceType == '管道'">
<el-table :data="dataListdetail" style="width: 100%">
<el-table-column label="管道名称" align="center" prop="pipeName" />
<el-table-column label="管道编号" align="center" prop="pipeCode" />
<el-table-column label="管道类型" align="center" prop="pipeType" >
<template slot-scope="scope">
<span v-if="scope.row.pipeType == 1">地埋管线</span>
<span v-if="scope.row.pipeType == 2">地表管线</span>
</template>
</el-table-column>
</el-table>
<el-table :data="dataListdetail3" style="width: 100%;margin-top: 20px;">
<el-table-column label="报警结束时间" align="center" prop="endTime" />
<el-table-column label="处理状态" align="center" prop="dealStatus">
<el-table :data="dataListdetail" style="width: 100%;margin-top: 20px;">
<el-table-column label="管道压力" align="center" prop="pipePressure" >
<template slot-scope="scope">
<span v-if="scope.row.orderId == null || scope.row.orderId == ''">未生成工单</span>
<span v-if="(scope.row.dealStatus == null || scope.row.dealStatus == '') &&
scope.row.orderId != null && scope.row.orderId != ''">未处理</span>
<span v-if="scope.row.dealStatus == 1">不需处理</span>
<span v-if="scope.row.dealStatus == 2">已处理完成</span>
<span v-if="scope.row.dealStatus == 3">未处理完成</span>
<span v-if="scope.row.pipePressure == 1">低压</span>
<span v-if="scope.row.pipePressure == 2">中压</span>
<span v-if="scope.row.pipePressure == 3">次高压</span>
<span v-if="scope.row.pipePressure == 4">高压</span>
</template>
</el-table-column>
<el-table-column label="管道长度" align="center" prop="pipeLength" />
<el-table-column label="管道地址" align="center" prop="pipeAddr" />
</el-table>
<el-table :data="dataListdetail" style="width: 100%;margin-top: 20px;">
<el-table-column label="安装日期" align="center" prop="installationTime" />
<el-table-column label="最后巡检日期" align="center" prop="inspectionTime" />
<el-table-column label="图片" align="center" prop="iconUrl" >
<template slot-scope="scope">
<el-image :src="scope.row.iconUrl" :preview-src-list="[scope.row.iconUrl]" v-if="scope.row.iconUrl != '' && scope.row.iconUrl != null" style="width: 16px;"></el-image>
</template>
</el-table-column>
</el-table>
</div>
</el-col>
<el-col :span="8" style="padding: 10px;padding-left: 0px;">
<div id="marbox" style="width: 100%;height: 304px; border: 1px solid rgb(218, 213, 213);float: right;">
<div style="width: 100%;height: 100%" id="container"></div>
......@@ -112,10 +144,7 @@
</el-col>
</el-row>
<template v-if="$route.query.deviceType!='管道'">
<el-row v-if="form.deviceType != '压力表'">
<el-col :span="12" style="padding: 10px;">
<div id="main1" style="height:300px;background-color: rgb(247 247 247);padding: 5px;">
......@@ -148,22 +177,8 @@
</div>
</el-col>
</el-row>
<!-- <div v-if="form.deviceType != '压力表'" style="height: 320p x;width: 100%;margin-top: 15px;padding: 10px;"> -->
<!-- </div> -->
<!-- <div style="height: 320px;width: 100%;padding: 10px;margin-top: 10px;"> -->
<!-- </div> -->
</template>
</div>
</div>
</template>
......@@ -182,9 +197,7 @@ export default {
},
data() {
return {
dataListdetail1: [],
dataListdetail2: [],
dataListdetail3: [],
dataListdetail: [],
alarmId:'',
// 折线图标题
title: "",
......@@ -534,21 +547,25 @@ export default {
},
getDetail (){
getDeviceAlarm(this.alarmId).then(response =>{
const { deviceName, deviceCode, alarmType,alarmValue,startTime,endTime,deviceStatus} = response.data;
const obj1 = {deviceName,deviceCode,alarmType};
const obj2 = {alarmValue,startTime};
const obj3 = {endTime,deviceStatus};
this.dataListdetail1.push(obj1);
this.dataListdetail2.push(obj2);
this.dataListdetail3.push(obj3);
this.form = response.data;
this.active = parseInt(response.data.orderStatus) + 1;
this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]);
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form);
this.form.pipeName = this.form.deviceName;
this.gaoMap.onlyLine(this.form);
if(this.form.pipeList != null){
let pipe = this.form.pipeList[0];
console.log("pipe", pipe);
this.dataListdetail.push(pipe);
this.gaoMap.onlyLine(pipe);
}
if(this.form.deviceList != null){
let device = this.form.deviceList[0];
console.log("device", device);
this.dataListdetail.push(device);
this.gaoMap.resetMapCenter([device.longitude, device.latitude]);
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, device);
}
var getData1 = [];
var getData2 = [];
......
......@@ -104,7 +104,7 @@
<template slot-scope="scope">
<span v-if="scope.row.orderId == null || scope.row.orderId == ''">未生成工单</span>
<span v-if="(scope.row.dealStatus == null || scope.row.dealStatus == '') &&
scope.row.orderId != null && scope.row.orderId != ''">未处理</span>
scope.row.orderId != null && scope.row.orderId != ''">未处理</span>
<span v-if="scope.row.dealStatus == 1">不需处理</span>
<span v-if="scope.row.dealStatus == 2">已处理完成</span>
<span v-if="scope.row.dealStatus == 3">未处理完成</span>
......
......@@ -24,20 +24,20 @@
<span v-if="scope.row.deviceType == '4'">压力表</span>
</template>
</el-table-column>
<el-table-column label="标况累计量" align="center" prop="standardConditionAccumulation" />
<el-table-column label="标况累计量(m³)" align="center" prop="standardConditionAccumulation" />
</el-table>
<el-table :data="dataListdetail2" style="width: 100%;margin-top: 20px;">
<el-table-column label="工况累计量" align="center" prop="workingConditionAccumulation" />
<el-table-column label="剩余量" align="center" prop="residualQuantity" />
<el-table-column label="标况流量" align="center" prop="standardConditionFlow" />
<el-table-column label="工况流量" align="center" prop="workingConditionFlow" />
<el-table-column label="工况累计量(m³)" align="center" prop="workingConditionAccumulation" />
<el-table-column label="剩余量(m³)" align="center" prop="residualQuantity" />
<el-table-column label="标况流量(m³/h)" align="center" prop="standardConditionFlow" />
<el-table-column label="工况流量(m³/h)" align="center" prop="workingConditionFlow" />
</el-table>
<el-table :data="dataListdetail3" style="width: 100%;margin-top: 20px;">
<el-table-column label="温度" align="center" prop="temperature" />
<el-table-column label="压力" align="center" prop="pressure" />
<el-table-column label="温度(℃)" align="center" prop="temperature" />
<el-table-column label="压力(KPa)" align="center" prop="pressure" />
<el-table-column label="上报时间" align="center" prop="reportTime" />
<el-table-column label="设备状态" align="center" prop="deviceStatus">
</el-table-column>
......
......@@ -61,7 +61,7 @@
<span v-if="scope.row.planStatus == 3">已完成</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280px">
<template slot-scope="scope">
<el-button
size="normal"
......@@ -156,8 +156,8 @@
</el-dialog>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @close="cancel">
<el-form ref="form2" :model="form2" :rules="rules" label-width="120px">
<el-form-item label="巡检计划名称" prop="plansName">
<font>{{plansName}}</font>
<el-form-item label="巡检计划名称">
<font>{{form2.planName}}</font>
</el-form-item>
<el-form-item label="计划时间">
<font>{{ parseTime(form2.startTime, '{y}-{m}-{d}') }}
......@@ -170,7 +170,7 @@
<el-input v-model="form2.orderName" placeholder="请输入工单名称" />
</el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector">
<el-select v-model="form2.appointInspector" placeholder="请选择执行人员" clearable size="small" @change="setUserId">
<el-select v-model="form2.appointInspector" placeholder="请选择执行人员" clearable size="small" >
<el-option
v-for="item in inspector"
:key="item.userId"
......@@ -222,7 +222,6 @@
typeOptions: [],
// 设备级联
options: [],
plansName: '',
props: {
multiple: true,
value: "id",
......@@ -230,7 +229,6 @@
level: "level",
children: "childList",
},
devices: null,
// 巡检员列表
inspector: [],
// 弹出层标题
......@@ -259,10 +257,10 @@
// 表单校验
rules: {
planName: [
{ required: true, message: " 计划名称不能为空", trigger: "blur" }
{ required: true, message: "请输入计划名称", trigger: "blur" }
],
orderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" }
{ required: true, message: "请输入工单名称", trigger: "blur" }
],
devices: [
{ required: true, message: "请选择巡检设备", trigger: "blur" }
......@@ -287,8 +285,7 @@
},
methods: {
handleChange(value) {
// this.devices = value;
console.log(this.form.devices);
console.log(this.form1.devices);
},
/** 查询巡检计划列表 */
getList() {
......@@ -315,9 +312,6 @@
this.loading = false;
});
},
setUserId(val){
this.form.appointInspector = val;
},
// 取消按钮
cancel() {
this.open1 = false;
......@@ -337,7 +331,6 @@
createTime: null,
remarks: null
};
this.devices = null;
this.resetForm("form1");
this.form2 = {
planId: null,
......@@ -376,7 +369,7 @@
deviceNodeTree().then(response => {
this.options = response.data;
this.open1 = true;
this.title1 = "添加巡检计划";
this.title1 = "新增巡检计划";
});
},
/** 下发按钮操作 */
......@@ -386,7 +379,6 @@
const planId = row.planId || this.ids
getInspectionPlan(planId).then(response => {
this.form2 = response.data;
this.plansName = this.form2.planName;
this.form2.remarks = "";
this.open2 = true;
this.title2 = "填写工单信息";
......
......@@ -80,7 +80,7 @@
<!-- 接单信息 -->
<el-row>
<el-row v-if="this.form.orderId != null && this.form.orderId != ''">
<el-divider></el-divider>
<el-col :span="24">
<div style="color: #31EAEA;width: 100%;height: 40px;">
......
<template>
<el-dialog
:title="title"
:visible.sync="open"
:close="close"
width="800px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item label="隐患名称" prop="deviceName">
<font>{{ form.deviceName }}</font>
</el-form-item>
<el-form-item label="隐患类型" prop="alarmType">
<font>{{ form.alarmType }}</font>
</el-form-item>
<el-form-item label="隐患级别" prop="alarmValue">
<font>{{ form.alarmValue }}</font>
</el-form-item>
<el-form-item label="工单名称" prop="orderName">
<el-input v-model="form.orderName" placeholder="请输入工单名称" />
</el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector">
<el-select
v-model="form.appointInspector"
placeholder="请选择执行人员"
clearable
size="small"
@change="setUserId"
>
<el-option
v-for="item in inspector"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="工单描述" prop="remarks">
<el-input
type="textarea"
v-model="form.remarks"
placeholder="请输入工单描述"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="loading" type="primary" @click="submitForm"
>确 定</el-button
>
<!-- <el-button @click="cancel">取 消</el-button> -->
<el-button @click.stop="close">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { inspectorList } from "@/api/system/user";
import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
import { getDeviceAlarm } from "@/api/dataMonitoring/deviceAlarm";
export default {
//隐患工单
props: {
// 传进来一些内容
content: {
type: Object,
},
},
data() {
return {
form: {
deviceName: "",
alarmType: "",
alarmValue: "",
orderName: "",
appointInspector: "",
remarks: "",
},
gaoMap: "",
open: false,
title: "",
inspector: [],
loading: false,
alarmId: "",
rules: {
orderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" },
],
appointInspector: [
{ required: true, message: "请选择巡检人员", trigger: "blur" },
],
},
};
},
created() {
// this.alarmId && this.handleIssue(this.alarmId);
},
watch: {
open(value, oldValue) {
if (value) {
console.log(this.alarmId);
this.handleIssue(this.alarmId);
}
},
},
methods: {
handleIssue(alarmId) {
this.getInspectorList();
getDeviceAlarm(alarmId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "填写工单信息";
});
},
getInspectorList() {
this.loading = true;
inspectorList().then((response) => {
this.inspector = response.data;
this.loading = false;
});
},
setUserId(val) {
this.form.appointInspector = val;
},
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.resourceId = this.form.alarmId;
this.form.orderType = "3";
addBasicsInfo(this.form).then((response) => {
if (response.code == 200) {
console.log(response.msg);
this.msgSuccess("生成工单成功");
this.open = false;
}
this.$emit("callback", 999);
});
}
});
},
close() {
console.log("关闭");
this.open = false;
},
},
};
</script>
<style>
</style>
\ No newline at end of file
......@@ -263,7 +263,6 @@
</div>
</div>
</div>
</div>
</template>
<script>
......
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