Commit 7017e306 authored by yaqizhang's avatar yaqizhang

合并冲突

parents 49d6da3a 15c9e30b
package com.zehong.web.controller.riskManagement; package com.zehong.web.controller.riskManagement;
import java.util.List; import java.util.List;
import com.zehong.system.domain.vo.HiddenTroubleVo;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -41,19 +43,19 @@ public class THiddenTroubleController extends BaseController ...@@ -41,19 +43,19 @@ public class THiddenTroubleController extends BaseController
public TableDataInfo list(THiddenTrouble tHiddenTrouble) public TableDataInfo list(THiddenTrouble tHiddenTrouble)
{ {
startPage(); startPage();
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble); List<HiddenTroubleVo> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
return getDataTable(list); return getDataTable(list);
} }
/** /**
* 地图初始化隐患 * 地图初始化隐患
* @param tHiddenTrouble * @param
* @return * @return
*/ */
@GetMapping("/getMapHiddenTroublelist") @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); return AjaxResult.success(list);
} }
...@@ -66,8 +68,8 @@ public class THiddenTroubleController extends BaseController ...@@ -66,8 +68,8 @@ public class THiddenTroubleController extends BaseController
public AjaxResult export(THiddenTrouble tHiddenTrouble) public AjaxResult export(THiddenTrouble tHiddenTrouble)
{ {
tHiddenTrouble.setDealStatus("3"); tHiddenTrouble.setDealStatus("3");
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble); List<HiddenTroubleVo> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
ExcelUtil<THiddenTrouble> util = new ExcelUtil<THiddenTrouble>(THiddenTrouble.class); ExcelUtil<HiddenTroubleVo> util = new ExcelUtil<HiddenTroubleVo>(HiddenTroubleVo.class);
return util.exportExcel(list, "隐患信息数据"); return util.exportExcel(list, "隐患信息数据");
} }
...@@ -76,9 +78,16 @@ public class THiddenTroubleController extends BaseController ...@@ -76,9 +78,16 @@ public class THiddenTroubleController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:query')") @PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:query')")
@GetMapping(value = "/{troubleId}") @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 ...@@ -67,6 +67,18 @@ public class SysUserController extends BaseController
return getDataTable(list); 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; ...@@ -10,7 +10,7 @@ import com.zehong.common.core.domain.BaseEntity;
* 隐患信息对象 t_hidden_trouble * 隐患信息对象 t_hidden_trouble
* *
* @author zehong * @author zehong
* @date 2021-07-21 * @date 2021-08-20
*/ */
public class THiddenTrouble extends BaseEntity public class THiddenTrouble extends BaseEntity
{ {
...@@ -19,20 +19,29 @@ public class THiddenTrouble extends BaseEntity ...@@ -19,20 +19,29 @@ public class THiddenTrouble extends BaseEntity
/** 隐患信息id */ /** 隐患信息id */
private Integer troubleId; private Integer troubleId;
/** 设备id */ /** 隐患类型 */
@Excel(name = "设备id") @Excel(name = "隐患类型")
private Integer deviceId; private String troubleType;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */ /** 隐患名称 */
private String deviceType; @Excel(name = "隐患名称")
private String troubleName;
/** 隐患级别 */
@Excel(name = "隐患级别")
private String troubleLevel;
/** 工单id */ /** 工单id */
@Excel(name = "工单id") @Excel(name = "工单id")
private String orderId; private String orderId;
/** 地址 */ /** 设备id */
@Excel(name = "地址") @Excel(name = "设备id")
private String address; private Integer deviceId;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */
@Excel(name = "设备类型", readConverterExp = "0=管道,1调压阀,2阀门井,3流量计,4压力表")
private String deviceType;
/** 经度 */ /** 经度 */
@Excel(name = "经度") @Excel(name = "经度")
...@@ -42,14 +51,30 @@ public class THiddenTrouble extends BaseEntity ...@@ -42,14 +51,30 @@ public class THiddenTrouble extends BaseEntity
@Excel(name = "纬度") @Excel(name = "纬度")
private BigDecimal latitude; private BigDecimal latitude;
/** 是否作废(0正常,1作废) */
@Excel(name = "是否作废(0正常,1作废)")
private String isDel;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */ /** 处理状态(1不需处理,2已处理完成,3未处理完成) */
@Excel(name = "处理状态", readConverterExp = "1不需处理,2已处理完成,3未处理完成") @Excel(name = "处理状态", readConverterExp = "1不需处理,2已处理完成,3未处理完成")
private String dealStatus; private String dealStatus;
/** 地址 */
@Excel(name = "地址")
private String address;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
/** 图片地址 */
@Excel(name = "图片地址")
private String pictureUrl;
/** 上报人(用户id) */
@Excel(name = "上报人", readConverterExp = "用户id")
private Long reportMan;
public void setTroubleId(Integer troubleId) public void setTroubleId(Integer troubleId)
{ {
this.troubleId = troubleId; this.troubleId = troubleId;
...@@ -59,6 +84,24 @@ public class THiddenTrouble extends BaseEntity ...@@ -59,6 +84,24 @@ public class THiddenTrouble extends BaseEntity
{ {
return troubleId; 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) public void setDeviceId(Integer deviceId)
{ {
this.deviceId = deviceId; this.deviceId = deviceId;
...@@ -68,15 +111,15 @@ public class THiddenTrouble extends BaseEntity ...@@ -68,15 +111,15 @@ public class THiddenTrouble extends BaseEntity
{ {
return deviceId; return deviceId;
} }
public void setTroubleLevel(String troubleLevel)
public String getDeviceType() { {
return deviceType; this.troubleLevel = troubleLevel;
} }
public void setDeviceType(String deviceType) { public String getTroubleLevel()
this.deviceType = deviceType; {
return troubleLevel;
} }
public void setOrderId(String orderId) public void setOrderId(String orderId)
{ {
this.orderId = orderId; this.orderId = orderId;
...@@ -86,15 +129,6 @@ public class THiddenTrouble extends BaseEntity ...@@ -86,15 +129,6 @@ public class THiddenTrouble extends BaseEntity
{ {
return orderId; return orderId;
} }
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public void setLongitude(BigDecimal longitude) public void setLongitude(BigDecimal longitude)
{ {
this.longitude = longitude; this.longitude = longitude;
...@@ -104,6 +138,15 @@ public class THiddenTrouble extends BaseEntity ...@@ -104,6 +138,15 @@ public class THiddenTrouble extends BaseEntity
{ {
return longitude; return longitude;
} }
public void setDeviceType(String deviceType)
{
this.deviceType = deviceType;
}
public String getDeviceType()
{
return deviceType;
}
public void setLatitude(BigDecimal latitude) public void setLatitude(BigDecimal latitude)
{ {
this.latitude = latitude; this.latitude = latitude;
...@@ -114,6 +157,14 @@ public class THiddenTrouble extends BaseEntity ...@@ -114,6 +157,14 @@ public class THiddenTrouble extends BaseEntity
return latitude; return latitude;
} }
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
public void setDealStatus(String dealStatus) public void setDealStatus(String dealStatus)
{ {
this.dealStatus = dealStatus; this.dealStatus = dealStatus;
...@@ -123,6 +174,15 @@ public class THiddenTrouble extends BaseEntity ...@@ -123,6 +174,15 @@ public class THiddenTrouble extends BaseEntity
{ {
return dealStatus; return dealStatus;
} }
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setRemarks(String remarks) public void setRemarks(String remarks)
{ {
this.remarks = remarks; this.remarks = remarks;
...@@ -132,21 +192,43 @@ public class THiddenTrouble extends BaseEntity ...@@ -132,21 +192,43 @@ public class THiddenTrouble extends BaseEntity
{ {
return remarks; 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 @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("troubleId", getTroubleId()) .append("troubleId", getTroubleId())
.append("troubleType", getTroubleType())
.append("deviceId", getDeviceId()) .append("deviceId", getDeviceId())
.append("deviceType", getDeviceType()) .append("troubleLevel", getTroubleLevel())
.append("orderId", getOrderId()) .append("orderId", getOrderId())
.append("address", getAddress())
.append("longitude", getLongitude()) .append("longitude", getLongitude())
.append("deviceType", getDeviceType())
.append("latitude", getLatitude()) .append("latitude", getLatitude())
.append("dealStatus", getDealStatus()) .append("dealStatus", getDealStatus())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("address", getAddress())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("remarks", getRemarks()) .append("remarks", getRemarks())
.append("pictureUrl", getPictureUrl())
.append("reportMan", getReportMan())
.toString(); .toString();
} }
} }
...@@ -2,7 +2,9 @@ package com.zehong.system.domain.vo; ...@@ -2,7 +2,9 @@ package com.zehong.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.core.domain.BaseEntity; import com.zehong.common.core.domain.BaseEntity;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceReportData; import com.zehong.system.domain.TDeviceReportData;
import com.zehong.system.domain.TPipe;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -33,21 +35,15 @@ public class DeviceAlarmVo extends BaseEntity ...@@ -33,21 +35,15 @@ public class DeviceAlarmVo extends BaseEntity
/** 设备编号 */ /** 设备编号 */
private String deviceCode; private String deviceCode;
/** 经度 */
private BigDecimal longitude;
/** 纬度 */
private BigDecimal latitude;
/** 坐标 */
private String coordinates;
/** 物联网编号 */
private String iotNo;
/** 设备监控数据列表(用于详情折线图) */ /** 设备监控数据列表(用于详情折线图) */
private List<TDeviceReportData> deviceReportDataList; private List<TDeviceReportData> deviceReportDataList;
/** 设备列表(用于展示设备详情) */
private List<TDeviceInfo> deviceList;
/** 管道列表(用于展示管道详情) */
private List<TPipe> pipeList;
/** 工单id */ /** 工单id */
private String orderId; private String orderId;
...@@ -112,44 +108,28 @@ public class DeviceAlarmVo extends BaseEntity ...@@ -112,44 +108,28 @@ public class DeviceAlarmVo extends BaseEntity
this.deviceCode = deviceCode; this.deviceCode = deviceCode;
} }
public BigDecimal getLongitude() { public List<TDeviceReportData> getDeviceReportDataList() {
return longitude; return deviceReportDataList;
}
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 void setCoordinates(String coordinates) { public void setDeviceReportDataList(List<TDeviceReportData> deviceReportDataList) {
this.coordinates = coordinates; this.deviceReportDataList = deviceReportDataList;
} }
public String getIotNo() { public List<TDeviceInfo> getDeviceList() {
return iotNo; return deviceList;
} }
public void setIotNo(String iotNo) { public void setDeviceList(List<TDeviceInfo> deviceList) {
this.iotNo = iotNo; this.deviceList = deviceList;
} }
public List<TDeviceReportData> getDeviceReportDataList() { public List<TPipe> getPipeList() {
return deviceReportDataList; return pipeList;
} }
public void setDeviceReportDataList(List<TDeviceReportData> deviceReportDataList) { public void setPipeList(List<TPipe> pipeList) {
this.deviceReportDataList = deviceReportDataList; this.pipeList = pipeList;
} }
public void setOrderId(String orderId) public void setOrderId(String orderId)
...@@ -218,9 +198,6 @@ public class DeviceAlarmVo extends BaseEntity ...@@ -218,9 +198,6 @@ public class DeviceAlarmVo extends BaseEntity
"alarmId=" + alarmId + "alarmId=" + alarmId +
", deviceId=" + deviceId + ", deviceId=" + deviceId +
", deviceType='" + deviceType + '\'' + ", deviceType='" + deviceType + '\'' +
", deviceName='" + deviceName + '\'' +
", deviceCode='" + deviceCode + '\'' +
", iotNo='" + iotNo + '\'' +
", orderId='" + orderId + '\'' + ", orderId='" + orderId + '\'' +
", alarmType='" + alarmType + '\'' + ", alarmType='" + alarmType + '\'' +
", alarmValue='" + alarmValue + '\'' + ", 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 ...@@ -27,6 +27,14 @@ public interface THiddenTroubleMapper
*/ */
public List<THiddenTrouble> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble); public List<THiddenTrouble> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble);
/**
* 地图显示隐患信息列表
*
* @param
* @return 隐患信息集合
*/
public List<THiddenTrouble> getMapTHiddenTroubleList();
/** /**
* 新增隐患信息 * 新增隐患信息
* *
......
...@@ -2,6 +2,7 @@ package com.zehong.system.service; ...@@ -2,6 +2,7 @@ package com.zehong.system.service;
import java.util.List; import java.util.List;
import com.zehong.system.domain.THiddenTrouble; import com.zehong.system.domain.THiddenTrouble;
import com.zehong.system.domain.vo.HiddenTroubleVo;
/** /**
* 隐患信息Service接口 * 隐患信息Service接口
...@@ -17,7 +18,7 @@ public interface ITHiddenTroubleService ...@@ -17,7 +18,7 @@ public interface ITHiddenTroubleService
* @param troubleId 隐患信息ID * @param troubleId 隐患信息ID
* @return 隐患信息 * @return 隐患信息
*/ */
public THiddenTrouble selectTHiddenTroubleById(int troubleId); public HiddenTroubleVo selectTHiddenTroubleById(int troubleId) throws Exception;
/** /**
* 查询隐患信息列表 * 查询隐患信息列表
...@@ -25,7 +26,15 @@ public interface ITHiddenTroubleService ...@@ -25,7 +26,15 @@ public interface ITHiddenTroubleService
* @param tHiddenTrouble 隐患信息 * @param tHiddenTrouble 隐患信息
* @return 隐患信息集合 * @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 ...@@ -76,16 +76,24 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
if("0".equals(tDeviceAlarm.getDeviceType())){ if("0".equals(tDeviceAlarm.getDeviceType())){
TPipe pipe = tPipeMapper.selectTPipeById(tDeviceAlarm.getDeviceId()); TPipe pipe = tPipeMapper.selectTPipeById(tDeviceAlarm.getDeviceId());
if(pipe != null) {
deviceAlarmVo.setDeviceCode(pipe.getPipeCode()); deviceAlarmVo.setDeviceCode(pipe.getPipeCode());
deviceAlarmVo.setDeviceName(pipe.getPipeName()); deviceAlarmVo.setDeviceName(pipe.getPipeName());
deviceAlarmVo.setCoordinates(pipe.getCoordinates());
List<TPipe> pipeList = new ArrayList<>();
pipeList.add(pipe);
deviceAlarmVo.setPipeList(pipeList);
}
} else { } else {
TDeviceInfo deviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(tDeviceAlarm.getDeviceId()); TDeviceInfo deviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(tDeviceAlarm.getDeviceId());
if(deviceInfo != null){
deviceAlarmVo.setDeviceCode(deviceInfo.getDeviceCode()); deviceAlarmVo.setDeviceCode(deviceInfo.getDeviceCode());
deviceAlarmVo.setDeviceName(deviceInfo.getDeviceName()); deviceAlarmVo.setDeviceName(deviceInfo.getDeviceName());
deviceAlarmVo.setIotNo(deviceInfo.getIotNo());
deviceAlarmVo.setLongitude(deviceInfo.getLongitude()); List<TDeviceInfo> deviceList = new ArrayList<>();
deviceAlarmVo.setLatitude(deviceInfo.getLatitude()); deviceList.add(deviceInfo);
deviceAlarmVo.setDeviceList(deviceList);
}
// 查询当前设备开始报警时间前后一小时的数据 // 查询当前设备开始报警时间前后一小时的数据
TDeviceReportData tDeviceReportData = new TDeviceReportData(); TDeviceReportData tDeviceReportData = new TDeviceReportData();
...@@ -136,12 +144,20 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService ...@@ -136,12 +144,20 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
if (pipe != null) { if (pipe != null) {
deviceAlarmVo.setDeviceCode(pipe.getPipeCode()); deviceAlarmVo.setDeviceCode(pipe.getPipeCode());
deviceAlarmVo.setDeviceName(pipe.getPipeName()); deviceAlarmVo.setDeviceName(pipe.getPipeName());
List<TPipe> pipeList = new ArrayList<>();
pipeList.add(pipe);
deviceAlarmVo.setPipeList(pipeList);
} }
} else { } else {
TDeviceInfo deviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(alarm.getDeviceId()); TDeviceInfo deviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(alarm.getDeviceId());
if (deviceInfo != null) { if (deviceInfo != null) {
deviceAlarmVo.setDeviceCode(deviceInfo.getDeviceCode()); deviceAlarmVo.setDeviceCode(deviceInfo.getDeviceCode());
deviceAlarmVo.setDeviceName(deviceInfo.getDeviceName()); deviceAlarmVo.setDeviceName(deviceInfo.getDeviceName());
List<TDeviceInfo> deviceList = new ArrayList<>();
deviceList.add(deviceInfo);
deviceAlarmVo.setDeviceList(deviceList);
} }
} }
......
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List; 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.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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.THiddenTroubleMapper;
import com.zehong.system.domain.THiddenTrouble;
import com.zehong.system.service.ITHiddenTroubleService; import com.zehong.system.service.ITHiddenTroubleService;
/** /**
...@@ -19,6 +27,18 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService ...@@ -19,6 +27,18 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
{ {
@Autowired @Autowired
private THiddenTroubleMapper tHiddenTroubleMapper; 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 ...@@ -27,9 +47,66 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息 * @return 隐患信息
*/ */
@Override @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 ...@@ -39,9 +116,96 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息 * @return 隐患信息
*/ */
@Override @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" ...@@ -6,35 +6,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="THiddenTrouble" id="THiddenTroubleResult"> <resultMap type="THiddenTrouble" id="THiddenTroubleResult">
<result property="troubleId" column="trouble_id" /> <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="deviceId" column="device_id" />
<result property="deviceType" column="device_type" /> <result property="troubleLevel" column="trouble_level" />
<result property="orderId" column="order_id" /> <result property="orderId" column="order_id" />
<result property="address" column="address" />
<result property="longitude" column="longitude" /> <result property="longitude" column="longitude" />
<result property="deviceType" column="device_type" />
<result property="latitude" column="latitude" /> <result property="latitude" column="latitude" />
<result property="isDel" column="is_del" />
<result property="dealStatus" column="deal_status" /> <result property="dealStatus" column="deal_status" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="address" column="address" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="pictureUrl" column="picture_url" />
<result property="reportMan" column="report_man" />
</resultMap> </resultMap>
<sql id="selectTHiddenTroubleVo"> <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> </sql>
<select id="selectTHiddenTroubleList" parameterType="THiddenTrouble" resultMap="THiddenTroubleResult"> <select id="selectTHiddenTroubleList" parameterType="THiddenTrouble" resultMap="THiddenTroubleResult">
<include refid="selectTHiddenTroubleVo"/> <include refid="selectTHiddenTroubleVo"/>
<where> <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="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="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="longitude != null "> and longitude = #{longitude}</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="latitude != null "> and latitude = #{latitude}</if>
<if test="dealStatus != null and dealStatus != ''"> and deal_status = #{dealStatus}</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="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> </where>
</select> </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"> <select id="selectTHiddenTroubleById" parameterType="int" resultMap="THiddenTroubleResult">
<include refid="selectTHiddenTroubleVo"/> <include refid="selectTHiddenTroubleVo"/>
where trouble_id = #{troubleId} where trouble_id = #{troubleId}
...@@ -43,44 +61,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -43,44 +61,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertTHiddenTrouble" parameterType="THiddenTrouble" useGeneratedKeys="true" keyProperty="troubleId"> <insert id="insertTHiddenTrouble" parameterType="THiddenTrouble" useGeneratedKeys="true" keyProperty="troubleId">
insert into t_hidden_trouble insert into t_hidden_trouble
<trim prefix="(" suffix=")" suffixOverrides=","> <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="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="orderId != null">order_id,</if>
<if test="address != null">address,</if>
<if test="longitude != null">longitude,</if> <if test="longitude != null">longitude,</if>
<if test="deviceType != null">device_type,</if>
<if test="latitude != null">latitude,</if> <if test="latitude != null">latitude,</if>
<if test="dealStatus != null">deal_status,</if> <if test="dealStatus != null">deal_status,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="address != null">address,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="remarks != null">remarks,</if> <if test="remarks != null">remarks,</if>
<if test="pictureUrl != null">picture_url,</if>
<if test="reportMan != null">report_man,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <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="deviceId != null">#{deviceId},</if>
<if test="deviceType != null">#{deviceType},</if> <if test="troubleLevel != null">#{troubleLevel},</if>
<if test="orderId != null">#{orderId},</if> <if test="orderId != null">#{orderId},</if>
<if test="address != null">#{address},</if>
<if test="longitude != null">#{longitude},</if> <if test="longitude != null">#{longitude},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="latitude != null">#{latitude},</if> <if test="latitude != null">#{latitude},</if>
<if test="dealStatus != null">#{dealStatus},</if> <if test="dealStatus != null">#{dealStatus},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="address != null">#{address},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="remarks != null">#{remarks},</if> <if test="remarks != null">#{remarks},</if>
<if test="pictureUrl != null">#{pictureUrl},</if>
<if test="reportMan != null">#{reportMan},</if>
</trim> </trim>
</insert> </insert>
<update id="updateTHiddenTrouble" parameterType="THiddenTrouble"> <update id="updateTHiddenTrouble" parameterType="THiddenTrouble">
update t_hidden_trouble update t_hidden_trouble
<trim prefix="SET" suffixOverrides=","> <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="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="orderId != null">order_id = #{orderId},</if>
<if test="address != null">address = #{address},</if>
<if test="longitude != null">longitude = #{longitude},</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="latitude != null">latitude = #{latitude},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="dealStatus != null">deal_status = #{dealStatus},</if> <if test="dealStatus != null">deal_status = #{dealStatus},</if>
<if test="updateTime != null">update_time = #{updateTime},</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="createTime != null">create_time = #{createTime},</if>
<if test="remarks != null">remarks = #{remarks},</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> </trim>
where trouble_id = #{troubleId} where trouble_id = #{troubleId}
</update> </update>
......
...@@ -10,6 +10,14 @@ export function listUser(query) { ...@@ -10,6 +10,14 @@ export function listUser(query) {
}) })
} }
// 查询用户列表
export function allListUser() {
return request({
url: '/system/user/allList',
method: 'get',
})
}
// 查询巡检员列表 // 查询巡检员列表
export function inspectorList(query) { export function inspectorList(query) {
return request({ return request({
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
// dropdown // dropdown
.el-dropdown-menu { .el-dropdown-menu {
a { a {
display: block display: block;
} }
} }
...@@ -78,6 +78,19 @@ ...@@ -78,6 +78,19 @@
display: inline-flex !important; 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 // to fix el-date-picker css style
.el-range-separator { .el-range-separator {
box-sizing: content-box; box-sizing: content-box;
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2692138 */ font-family: "iconfont"; /* Project id 2692138 */
src: url('//at.alicdn.com/t/font_2692138_cd9e8nk8yoo.woff2?t=1627718383904') format('woff2'), src: url('//at.alicdn.com/t/font_2692138_spittg1q2rr.woff2?t=1629681541408') format('woff2'),
url('//at.alicdn.com/t/font_2692138_cd9e8nk8yoo.woff?t=1627718383904') format('woff'), url('//at.alicdn.com/t/font_2692138_spittg1q2rr.woff?t=1629681541408') format('woff'),
url('//at.alicdn.com/t/font_2692138_cd9e8nk8yoo.ttf?t=1627718383904') format('truetype'); url('//at.alicdn.com/t/font_2692138_spittg1q2rr.ttf?t=1629681541408') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,6 +13,19 @@ ...@@ -13,6 +13,19 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-reset:before {
content: "\e616";
}
.icon-search{
}
.icon-search:before {
content: "\e617";
font-size: 13px;
}
.icon-zhibanrenyuan:before { .icon-zhibanrenyuan:before {
content: "\e613"; content: "\e613";
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div class="text-wrapper"> <div class="text-wrapper">
<div class="eq-text">设备类型:<span>{{title}}</span></div> <div class="eq-text">设备类型:<span>{{title}}</span></div>
<div class="eq-text">设备型号:<span>{{data.deviceModel}}</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 class="eq-text">物联网编号:<span>{{data.iotNo}}</span></div>
</div> </div>
<div class="pic"> <div class="pic">
......
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
obj: { typs: Object }, obj: { typs: Object },
}, },
created() { created() {
console.log("created", this.obj); // console.log("created", this.obj);
}, },
mounted() {}, mounted() {},
computed: { computed: {
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
methods: { methods: {
moment, moment,
mousedown(e) { mousedown(e) {
console.log("?"); // console.log("?");
return; return;
// console.log(this.$refs.previewImg) // console.log(this.$refs.previewImg)
this.$refs.previewImg.showViewer = true; this.$refs.previewImg.showViewer = true;
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
return {}; return {};
}, },
created() { created() {
console.log("created", this.obj); // console.log("created", this.obj);
}, },
mounted() {}, mounted() {},
computed: { computed: {
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
methods: { methods: {
moment, moment,
mousedown(e) { mousedown(e) {
console.log("??"); // console.log("??");
return; return;
// console.log(this.$refs.previewImg) // console.log(this.$refs.previewImg)
this.$refs.previewImg.showViewer = true; this.$refs.previewImg.showViewer = true;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
设备型号:<span>{{ data.deviceModel }}</span> 设备型号:<span>{{ data.deviceModel }}</span>
</div> </div>
<div class="eq-text"> <div class="eq-text">
所属管道:<span>{{ data.pipeCode }}</span> 所属管道:<span>{{ data.pipeName }}</span>
</div> </div>
<div class="eq-text"> <div class="eq-text">
物联网编号:<span>{{ data.iotNo }}</span> 物联网编号:<span>{{ data.iotNo }}</span>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
设备型号:<span>{{ data.deviceModel }}</span> 设备型号:<span>{{ data.deviceModel }}</span>
</div> </div>
<div class="eq-text"> <div class="eq-text">
所属管道:<span>{{ data.pipeCode }}</span> 所属管道:<span>{{ data.pipeName }}</span>
</div> </div>
<div class="eq-text"> <div class="eq-text">
物联网编号:<span>{{ data.iotNo }}</span> 物联网编号:<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 { ...@@ -13,7 +13,7 @@ export default {
}, },
}, },
created() { created() {
console.log("data", this.data); // console.log("data", this.data);
}, },
}; };
</script> </script>
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
// console.log("userId",item.getExtData().userId) // console.log("userId",item.getExtData().userId)
return item.getExtData().userId == this.formData.userId; return item.getExtData().userId == this.formData.userId;
})[0]; })[0];
console.log("target.moveMarker", target.moveMarker); // console.log("target.moveMarker", target.moveMarker);
getInspectorLocations(this.formData).then((res) => { getInspectorLocations(this.formData).then((res) => {
if (res.code == 200) { if (res.code == 200) {
// 如果这个时间段没有移动轨迹 // 如果这个时间段没有移动轨迹
......
...@@ -34,6 +34,7 @@ class gaodeMap { ...@@ -34,6 +34,7 @@ class gaodeMap {
mouseTool = null; mouseTool = null;
myMap = null; myMap = null;
showInfoWindow = null; showInfoWindow = null;
view = null;
//构造函数中设置中央点默认值 //构造函数中设置中央点默认值
constructor(center) { constructor(center) {
...@@ -86,6 +87,18 @@ class gaodeMap { ...@@ -86,6 +87,18 @@ class gaodeMap {
// console.log("缩放开始") // console.log("缩放开始")
this.closeInfoWindow(); 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(); this.districtBoundaries();
} }
...@@ -987,10 +1000,10 @@ class gaodeMap { ...@@ -987,10 +1000,10 @@ class gaodeMap {
} }
}); });
let infoWindow = new AMap.InfoWindow({ let infoWindow = new AMap.InfoWindow({
isCustom:true, isCustom: true,
content: `<span style='border:1px solid #80d8ff;background:#fff'>${pipeName}</span>`, content: `<span style='border:1px solid #80d8ff;background:#fff'>${pipeName}</span>`,
anchor: "left-top", anchor: "left-top",
offset: new AMap.Pixel(20, -20), offset: new AMap.Pixel(20, -20)
}); });
polyline.on("mouseover", e => { polyline.on("mouseover", e => {
const options = polyline.getOptions(); const options = polyline.getOptions();
...@@ -1007,7 +1020,7 @@ class gaodeMap { ...@@ -1007,7 +1020,7 @@ class gaodeMap {
map.add(polyline); map.add(polyline);
const path = eval(coordinates)[0]; const path = eval(coordinates)[0];
// map.setFitView(); // map.setFitView();
map.setCenter([+path[0],+path[1]], false) map.setCenter([+path[0], +path[1]], false);
// const lntlat = eval(coordinates)[0]; // const lntlat = eval(coordinates)[0];
// map.panTo(lntlat) // map.panTo(lntlat)
......
...@@ -7,6 +7,7 @@ import lineInfoWindow from "../components/PopWindowGis/lineInfoWindow.vue"; ...@@ -7,6 +7,7 @@ import lineInfoWindow from "../components/PopWindowGis/lineInfoWindow.vue";
import markerInfoWindow from "../components/PopWindowGis/markerInfoWindow.vue"; import markerInfoWindow from "../components/PopWindowGis/markerInfoWindow.vue";
import removeLineInfoWindow from "../components/PopWindowGis/removeLineInfoWindow.vue"; import removeLineInfoWindow from "../components/PopWindowGis/removeLineInfoWindow.vue";
import markerInfoWindowWarn from "../components/PopWindowGis/markerInfoWindowWarn.vue"; import markerInfoWindowWarn from "../components/PopWindowGis/markerInfoWindowWarn.vue";
import troubleInfoWindowWarn from "../components/PopWindowGis/troubleInfoWindowWarn.vue";
import lineInfoWindowWarn from "../components/PopWindowGis/lineInfoWindowWarn.vue"; import lineInfoWindowWarn from "../components/PopWindowGis/lineInfoWindowWarn.vue";
import { delDeviceInfo } from "@/api/device/deviceInfo"; import { delDeviceInfo } from "@/api/device/deviceInfo";
...@@ -28,13 +29,15 @@ export const DEVICE_TYPE = { ...@@ -28,13 +29,15 @@ export const DEVICE_TYPE = {
WORKORDER: "6", WORKORDER: "6",
PRESSUREGAGE: "7", PRESSUREGAGE: "7",
INSPECTOR: "8", INSPECTOR: "8",
SMALLINSPECTOR: "workPoint" SMALLINSPECTOR: "workPoint",
TROUBLE: "trouble"
}; };
class gaodeMap { class gaodeMap {
// 所有线的数组 // 所有线的数组
polyLines = []; polyLines = [];
//值班人员的单独数组,轨迹的时候使用 //值班人员的单独数组,轨迹的时候使用
workerManArr = []; workerManArr = [];
troubles = [];
// 值班人员对象的arr // 值班人员对象的arr
workerManMarkArr = []; workerManMarkArr = [];
// 是否开启新增 // 是否开启新增
...@@ -114,11 +117,14 @@ class gaodeMap { ...@@ -114,11 +117,14 @@ class gaodeMap {
if (!this.onceFlag) { if (!this.onceFlag) {
this.onceFlag = true; this.onceFlag = true;
this.view.backFlag = false; this.view.backFlag = false;
// 让抽屉不在隐身
this.view.drawerOpacity = true;
}
// 每次地图移动结束,就让地图可以缩放
let options = this.myMap.getStatus(); let options = this.myMap.getStatus();
options.scrollWheel = true; options.scrollWheel = true;
this.myMap.setStatus(options); this.myMap.setStatus(options);
}
}); });
this.districtBoundaries(); this.districtBoundaries();
} }
...@@ -268,10 +274,21 @@ class gaodeMap { ...@@ -268,10 +274,21 @@ class gaodeMap {
this.workerManMarkArr.push(marker); this.workerManMarkArr.push(marker);
} }
} }
// 隐患
if (DEVICE_TYPE.TROUBLE == markerType) {
marker.markerType = markerType;
marker.data = data;
marker.infoWindow = infoWindow;
this.troubles.push(marker);
}
if ( if (
DEVICE_TYPE.WORKORDER != markerType && DEVICE_TYPE.WORKORDER != markerType &&
DEVICE_TYPE.INSPECTOR != markerType && DEVICE_TYPE.INSPECTOR != markerType &&
DEVICE_TYPE.SMALLINSPECTOR != markerType DEVICE_TYPE.SMALLINSPECTOR != markerType &&
DEVICE_TYPE.TROUBLE != markerType
) { ) {
// marker.content = this.getMarketContent(data, markerInfoWindow); // marker.content = this.getMarketContent(data, markerInfoWindow);
marker.infoWindow = infoWindow; marker.infoWindow = infoWindow;
...@@ -358,6 +375,7 @@ class gaodeMap { ...@@ -358,6 +375,7 @@ class gaodeMap {
return marker; return marker;
} }
// 值班人员
wokerManOpen = e => { wokerManOpen = e => {
this.markerType = e.target.markerType; this.markerType = e.target.markerType;
e.target.content = this.getMarketContent(e.target.data); e.target.content = this.getMarketContent(e.target.data);
...@@ -369,6 +387,8 @@ class gaodeMap { ...@@ -369,6 +387,8 @@ class gaodeMap {
// infoWindow.close(); // infoWindow.close();
this.workerManInfoWindow = e.target.infoWindow; this.workerManInfoWindow = e.target.infoWindow;
}; };
// 隐患
troubleOpen = e => {};
// 鼠标移入设备时候实行的函数 // 鼠标移入设备时候实行的函数
infoOpen = e => { infoOpen = e => {
...@@ -441,7 +461,7 @@ class gaodeMap { ...@@ -441,7 +461,7 @@ class gaodeMap {
getMarketContent(Data, markerInfoWindow) { getMarketContent(Data, markerInfoWindow) {
let data = { ...Data }; let data = { ...Data };
data.class = this; data.class = this;
console.log("this.markerType", this.markerType); // console.log("this.markerType", this.markerType);
switch (this.markerType) { switch (this.markerType) {
case DEVICE_TYPE.REGEULATORBOX: { case DEVICE_TYPE.REGEULATORBOX: {
const dom = createPop(markerInfoWindow, { const dom = createPop(markerInfoWindow, {
...@@ -504,6 +524,16 @@ class gaodeMap { ...@@ -504,6 +524,16 @@ class gaodeMap {
dom.remove(); dom.remove();
return html; 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 { ...@@ -595,6 +625,16 @@ class gaodeMap {
marker.setIcon(icon); marker.setIcon(icon);
break; 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) { changeMarkIcon(marker, iconUrl) {
...@@ -779,7 +819,6 @@ class gaodeMap { ...@@ -779,7 +819,6 @@ class gaodeMap {
// 警告状态时 // 警告状态时
const item = e.target.getExtData().lineData; const item = e.target.getExtData().lineData;
// console.log("item",item) // console.log("item",item)
if (e.target.getExtData().lineData.alarmState == 1) { if (e.target.getExtData().lineData.alarmState == 1) {
infoWindow = this.lineMouseOver(polyline, lineInfoWindowWarn, item); infoWindow = this.lineMouseOver(polyline, lineInfoWindowWarn, item);
} else { } else {
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<font v-if="form.orderId == null || form.orderId == ''">未生成工单</font> <font v-if="form.orderId == null || form.orderId == ''">未生成工单</font>
<font <font
v-if="(form.dealStatus == null || form.dealStatus == '') && form.orderId != null && form.orderId != ''"> 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 == 1">不需处理</font>
<font v-if="form.dealStatus == 2">已处理完成</font> <font v-if="form.dealStatus == 2">已处理完成</font>
<font v-if="form.dealStatus == 3">未处理完成</font> <font v-if="form.dealStatus == 3">未处理完成</font>
...@@ -63,48 +63,80 @@ ...@@ -63,48 +63,80 @@
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
<!-- <div style="width: 100%;height: 100px;"> -->
<!-- </div> -->
<el-divider></el-divider> <el-divider></el-divider>
<el-row> <el-row>
<el-col :span="16" style="padding: 10px;"> <el-col :span="16" style="padding: 10px;">
<div style="width: 100%;float: left;height: 100%;"> <div style="width: 100%;float: left;height: 100%;" v-if="form.deviceType != '管道'">
<el-table :data="dataListdetail1" style="width: 100%"> <el-table :data="dataListdetail" style="width: 100%">
<el-table-column label="设备名称" align="center" prop="deviceName" /> <el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceCode" /> <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>
<el-table :data="dataListdetail2" style="width: 100%;margin-top: 20px;"> <el-table :data="dataListdetail" style="width: 100%;margin-top: 20px;">
<el-table-column label="报警值" align="center" prop="alarmValue" /> <el-table-column label="物联网编号" align="center" prop="iotNo" />
<el-table-column label="报警开始时间" align="center" prop="startTime" /> <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>
<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 :data="dataListdetail" style="width: 100%;margin-top: 20px;">
<el-table-column label="报警结束时间" align="center" prop="endTime" /> <el-table-column label="管道压力" align="center" prop="pipePressure" >
<el-table-column label="处理状态" align="center" prop="dealStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.orderId == null || scope.row.orderId == ''">未生成工单</span> <span v-if="scope.row.pipePressure == 1">低压</span>
<span v-if="(scope.row.dealStatus == null || scope.row.dealStatus == '') && <span v-if="scope.row.pipePressure == 2">中压</span>
scope.row.orderId != null && scope.row.orderId != ''">未处理</span> <span v-if="scope.row.pipePressure == 3">次高压</span>
<span v-if="scope.row.dealStatus == 1">不需处理</span> <span v-if="scope.row.pipePressure == 4">高压</span>
<span v-if="scope.row.dealStatus == 2">已处理完成</span>
<span v-if="scope.row.dealStatus == 3">未处理完成</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="管道长度" align="center" prop="pipeLength" />
<el-table-column label="管道地址" align="center" prop="pipeAddr" />
</el-table> </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>
</el-col> </el-col>
<el-col :span="8" style="padding: 10px;padding-left: 0px;"> <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 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> <div style="width: 100%;height: 100%" id="container"></div>
...@@ -112,10 +144,7 @@ ...@@ -112,10 +144,7 @@
</el-col> </el-col>
</el-row> </el-row>
<template v-if="$route.query.deviceType!='管道'"> <template v-if="$route.query.deviceType!='管道'">
<el-row v-if="form.deviceType != '压力表'"> <el-row v-if="form.deviceType != '压力表'">
<el-col :span="12" style="padding: 10px;"> <el-col :span="12" style="padding: 10px;">
<div id="main1" style="height:300px;background-color: rgb(247 247 247);padding: 5px;"> <div id="main1" style="height:300px;background-color: rgb(247 247 247);padding: 5px;">
...@@ -148,22 +177,8 @@ ...@@ -148,22 +177,8 @@
</div> </div>
</el-col> </el-col>
</el-row> </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> </template>
</div> </div>
</div> </div>
</template> </template>
...@@ -182,9 +197,7 @@ export default { ...@@ -182,9 +197,7 @@ export default {
}, },
data() { data() {
return { return {
dataListdetail1: [], dataListdetail: [],
dataListdetail2: [],
dataListdetail3: [],
alarmId:'', alarmId:'',
// 折线图标题 // 折线图标题
title: "", title: "",
...@@ -534,21 +547,25 @@ export default { ...@@ -534,21 +547,25 @@ export default {
}, },
getDetail (){ getDetail (){
getDeviceAlarm(this.alarmId).then(response =>{ 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.form = response.data;
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]); this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]);
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form); this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form);
this.form.pipeName = this.form.deviceName; if(this.form.pipeList != null){
this.gaoMap.onlyLine(this.form); 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 getData1 = [];
var getData2 = []; var getData2 = [];
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.orderId == null || scope.row.orderId == ''">未生成工单</span> <span v-if="scope.row.orderId == null || scope.row.orderId == ''">未生成工单</span>
<span v-if="(scope.row.dealStatus == null || scope.row.dealStatus == '') && <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 == 1">不需处理</span>
<span v-if="scope.row.dealStatus == 2">已处理完成</span> <span v-if="scope.row.dealStatus == 2">已处理完成</span>
<span v-if="scope.row.dealStatus == 3">未处理完成</span> <span v-if="scope.row.dealStatus == 3">未处理完成</span>
......
...@@ -24,20 +24,20 @@ ...@@ -24,20 +24,20 @@
<span v-if="scope.row.deviceType == '4'">压力表</span> <span v-if="scope.row.deviceType == '4'">压力表</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="标况累计量" align="center" prop="standardConditionAccumulation" /> <el-table-column label="标况累计量(m³)" align="center" prop="standardConditionAccumulation" />
</el-table> </el-table>
<el-table :data="dataListdetail2" style="width: 100%;margin-top: 20px;"> <el-table :data="dataListdetail2" style="width: 100%;margin-top: 20px;">
<el-table-column label="工况累计量" align="center" prop="workingConditionAccumulation" /> <el-table-column label="工况累计量(m³)" align="center" prop="workingConditionAccumulation" />
<el-table-column label="剩余量" align="center" prop="residualQuantity" /> <el-table-column label="剩余量(m³)" align="center" prop="residualQuantity" />
<el-table-column label="标况流量" align="center" prop="standardConditionFlow" /> <el-table-column label="标况流量(m³/h)" align="center" prop="standardConditionFlow" />
<el-table-column label="工况流量" align="center" prop="workingConditionFlow" /> <el-table-column label="工况流量(m³/h)" align="center" prop="workingConditionFlow" />
</el-table> </el-table>
<el-table :data="dataListdetail3" style="width: 100%;margin-top: 20px;"> <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="temperature" />
<el-table-column label="压力" align="center" prop="pressure" /> <el-table-column label="压力(KPa)" align="center" prop="pressure" />
<el-table-column label="上报时间" align="center" prop="reportTime" /> <el-table-column label="上报时间" align="center" prop="reportTime" />
<el-table-column label="设备状态" align="center" prop="deviceStatus"> <el-table-column label="设备状态" align="center" prop="deviceStatus">
</el-table-column> </el-table-column>
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</div> </div>
</div> </div>
<el-input <!-- <el-input
v-model="keyWord" v-model="keyWord"
placeholder="点击输入" placeholder="点击输入"
id="tipinput" id="tipinput"
...@@ -74,9 +74,9 @@ ...@@ -74,9 +74,9 @@
> >
<el-button icon="el-icon-refresh" class="refresh-but" @click="refreshMap()" <el-button icon="el-icon-refresh" class="refresh-but" @click="refreshMap()"
>重置</el-button >重置</el-button
> > -->
<div class="leftBar-wrapper"> <!-- <div class="leftBar-wrapper">
<div <div
v-for="item in changeBtnData" v-for="item in changeBtnData"
:key="item.value" :key="item.value"
...@@ -92,6 +92,150 @@ ...@@ -92,6 +92,150 @@
</div> </div>
<i class="el-icon-check"></i> <i class="el-icon-check"></i>
</div> </div>
</div> -->
<div ref="drawer" class="drawer" :class="{ back: backFlag,opacity: drawerOpacity }">
<div class="switch" @click="backFlag = !backFlag">
<img v-if="!backFlag" src="@/assets/images/l.png" alt="" />
<img v-else src="@/assets/images/r.png" alt="" />
</div>
<!-- 只能动态传入内嵌盒子的高 -->
<div class="scroll" :style="{ height: `${boxHeight}px` }">
<el-input
v-model="keyWord"
placeholder="点击输入"
id="tipinput"
class="search-input"
>
<template slot="suffix">
<div @click="search()">
<i class="iconfont icon-search"></i>
</div>
</template>
</el-input>
<!-- <el-button class="search-but" @click="search()">搜索</el-button> -->
<el-button class="refresh-but" @click="refreshMap()">
<i class="iconfont icon-reset"></i>
</el-button>
<div class="leftBar-wrapper">
<div
class="box-wrapper"
v-for="(item, index) in changeBtnData"
:key="item.value"
>
<div
class="box"
:class="{
active: leftBarNum.indexOf(item.value) >= 0,
firstbox: index == 0,
}"
@click.stop="arrowRightChange(item)"
>
<span class="upPic"> 上图 </span>
<div class="left">
<i class="iconfont" :class="item.icon"></i>
</div>
<div class="right">
{{ item.label }}
</div>
<i
@click.stop="leftBarChange(item)"
class="el-icon-check bingo"
></i>
<i class="ju"></i>
<i
class="arrow-right el-icon-arrow-right"
:class="{ active: arrowRightNum.indexOf(item.value) >= 0 }"
></i>
</div>
<el-collapse-transition>
<div
class="animate"
v-show="arrowRightNum.indexOf(item.value) >= 0"
>
<!-- 有数据 -->
<template v-if="item.list.length > 0">
<!-- 设备以及管道 展示内容是一样的 -->
<template v-if="item.value != 9">
<div class="list-wrapper">
<div class="thead">
<div class="no">序号</div>
<div class="code">设备编号</div>
<div class="name">设备名称</div>
</div>
<div
class="deviceList"
:class="{ topActive: index == 0 }"
v-for="(iten, index) in item.list"
:key="iten.deviceId + `` + index"
@mousedown.stop="panToo(iten, item)"
>
<div class="no">{{ iten.no + 1 }}</div>
<div :title="iten.code" class="code">
{{ iten.code }}
</div>
<div :title="iten.deviceName" class="name">
{{ iten.deviceName }}
</div>
</div>
</div>
</template>
<!-- 值班人员 展示不太一样-->
<template v-else-if="item.value == 9">
<div class="list-wrapper">
<div class="thead">
<div class="no">序号</div>
<div class="code">人员姓名</div>
<div class="name">联系电话</div>
</div>
<div
class="deviceList"
:class="{ topActive: index == 0 }"
v-for="(iten, index) in item.list"
:key="iten.deviceId + `` + index"
@click.stop="panToo(iten, item)"
>
<div class="no">{{ iten.no + 1 }}</div>
<div :title="iten.userName" class="code">
{{ iten.userName }}
</div>
<div :title="iten.userPhone" class="name">
{{ iten.userPhone ? iten.userPhone : "-" }}
</div>
</div>
</div>
</template>
<!-- 翻页 -->
<div class="goback">
<div class="btn-w">
<el-button
class="btn backPage"
type="mini"
:disabled="item.nowPage == 1"
@click.stop="pageBack(item, index)"
icon="el-icon-arrow-left"
/>
<span class="btn-w-num">{{ item.nowPage }}</span>
<el-button
class="btn goPage"
type="mini"
:disabled="item.nowPage == item.maxPage"
@click.stop="pageGo(item, index)"
icon="el-icon-arrow-right"
/>
</div>
</div>
</template>
<!-- 无数据 -->
<template v-else>
<div style="padding-left: 5px">暂无数据</div>
</template>
</div>
</el-collapse-transition>
</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -110,8 +254,15 @@ export default { ...@@ -110,8 +254,15 @@ export default {
radio1: "", radio1: "",
// 1新建,2编辑,3删除,点按钮变色 // 1新建,2编辑,3删除,点按钮变色
targetNum: 0, targetNum: 0,
backFlag: true,
// 抽屉内的滚动条的高需要赋值赋值
boxHeight: "",
drawerOpacity:false,
// 左边的bar的active判定 // 左边的bar的active判定
leftBarNum: [1, 2, 3, 4, 7], leftBarNum: [1, 2, 3, 4, 7],
// 右转箭头的样式active判定
arrowRightNum: [],
// 新建里的值 // 新建里的值
iconClass: "icon-create", iconClass: "icon-create",
...@@ -122,26 +273,31 @@ export default { ...@@ -122,26 +273,31 @@ export default {
value: 1, value: 1,
icon: "icon-gd", icon: "icon-gd",
label: "管道", label: "管道",
list: [],
}, },
{ {
value: 2, value: 2,
icon: "icon-tyx", icon: "icon-tyx",
label: "调压箱", label: "调压箱",
list: [],
}, },
{ {
value: 3, value: 3,
icon: "icon-fmj", icon: "icon-fmj",
label: "阀门井", label: "阀门井",
list: [],
}, },
{ {
value: 4, value: 4,
icon: "icon-llj", icon: "icon-llj",
label: "流量计", label: "流量计",
list: [],
}, },
{ {
value: 7, value: 7,
icon: "icon-ylb", icon: "icon-ylb",
label: "压力表", label: "压力表",
list: [],
}, },
], ],
keyWord: "", keyWord: "",
...@@ -149,11 +305,13 @@ export default { ...@@ -149,11 +305,13 @@ export default {
}, },
mounted() { mounted() {
this.initMap(); this.initMap();
this.boxHeight = document.body.clientHeight - 81;
}, },
methods: { methods: {
initMap() { initMap() {
let gaoMap = new gaodeMap("石家庄"); let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.gaoMap.view = this;
window.addEventListener("click", this.barClose); window.addEventListener("click", this.barClose);
gaoMap.addMouseTool(); gaoMap.addMouseTool();
gaoMap.searchTips("tipinput"); gaoMap.searchTips("tipinput");
...@@ -360,7 +518,7 @@ export default { ...@@ -360,7 +518,7 @@ export default {
this.gaoMap.closeAddMarker(); this.gaoMap.closeAddMarker();
this.gaoMap.removeMarkerDragg(); this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal"; this.gaoMap.mapOperateType = "normal";
this.leftBarNum=[1,2,3,4,7] this.leftBarNum = [1, 2, 3, 4, 7];
// map.remove(this.gaodeMap.markerOverlays); // map.remove(this.gaodeMap.markerOverlays);
}, },
search() { search() {
...@@ -405,8 +563,18 @@ export default { ...@@ -405,8 +563,18 @@ export default {
this.targetNum = 0; this.targetNum = 0;
map.clearMap(); map.clearMap();
this.initMap(); this.initMap();
this.leftBarNum=[1,2,3,4,7]; this.leftBarNum = [1, 2, 3, 4, 7];
this.keyWord=""; this.keyWord = "";
},
// 向右的箭头的动画
arrowRightChange(item) {
const index = this.arrowRightNum.indexOf(item.value);
if (index >= 0) {
this.arrowRightNum.splice(index, 1);
} else {
this.arrowRightNum.push(item.value);
}
}, },
}, },
...@@ -420,67 +588,67 @@ export default { ...@@ -420,67 +588,67 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
// 解决地图下拉框 // 解决地图下拉框
#container{ #container {
position: fixed; position: fixed;
top: 80px; top: 80px;
bottom:0; bottom: 0;
width: 100%; width: 100%;
} }
// 左边的bar // 左边的bar
.leftBar-wrapper { // .leftBar-wrapper {
position: fixed; // position: fixed;
left: 100px; // left: 100px;
top: 150px; // top: 150px;
.box { // .box {
width: 180px; // width: 180px;
height: 48px; // height: 48px;
display: flex; // display: flex;
background-color: #ffffff; // background-color: #ffffff;
box-sizing: border-box; // box-sizing: border-box;
border: 1px solid rgba(0, 0, 0, 0.1); // border: 1px solid rgba(0, 0, 0, 0.1);
border-top: none; // border-top: none;
cursor: pointer; // cursor: pointer;
position: relative; // position: relative;
> i { // > i {
position: absolute; // position: absolute;
line-height: 48px; // line-height: 48px;
right: 20px; // right: 20px;
color: #fff; // color: #fff;
} // }
&:hover { // &:hover {
// background-color: #053b6a; // // background-color: #053b6a;
// color: #ffffff; // // color: #ffffff;
// > i { // // > i {
// color:#fff; // // color:#fff;
// } // // }
} // }
&:hover .left, // &:hover .left,
&:hover .right { // &:hover .right {
// color: #ffffff; // // color: #ffffff;
} // }
&.active { // &.active {
// background-color: #053b6a; // // background-color: #053b6a;
.left, // .left,
.right { // .right {
color: #053b6a; // color: #053b6a;
} // }
> i { // > i {
color: #053b6a; // color: #053b6a;
} // }
} // }
.left { // .left {
color: #053b6a; // color: #053b6a;
line-height: 48px; // line-height: 48px;
margin-left: 40px; // margin-left: 40px;
} // }
.right { // .right {
color: #1d1d1d; // color: #1d1d1d;
line-height: 48px; // line-height: 48px;
margin-left: 20px; // margin-left: 20px;
} // }
} // }
} // }
.btn-wrapper { .btn-wrapper {
position: fixed; position: fixed;
...@@ -668,5 +836,260 @@ input[type="radio"] { ...@@ -668,5 +836,260 @@ input[type="radio"] {
color: white; color: white;
background-color: #053b6a; background-color: #053b6a;
} }
.drawer {
position: fixed;
top: 80px;
bottom: 0;
left: 100px;
width: 348px;
transition: 0.2s linear;
background: #fff;
// background: red;
opacity: 0;
&.opacity{
opacity: 1;
}
&.back {
left: -248px;
}
.scroll {
// height: 100%;
position: relative;
overflow-y: scroll;
overflow-x: hidden;
&::-webkit-scrollbar {
display: none;
}
.search-input {
position: absolute;
top: 14px;
left: 39px;
width: 236px;
.icon-search {
line-height: 28px;
cursor: pointer;
font-size: 13px;
}
}
.refresh-but {
// position: fixed;
position: absolute;
padding: 0px;
height: 28px;
width: 28px;
top: 14px;
left: 285px;
// width: 85px;
color: white;
background-color: #053b6a;
.icon-reset {
font-size: 13px;
}
}
}
// 左边的bar
.leftBar-wrapper {
// position: fixed;
width: 340px;
// margin-left: 20px;
margin-top: 60px;
// box-sizing: border-box;
.box-wrapper {
width: 340px;
}
.animate {
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
border-top: none;
width: 340px;
.list-wrapper {
margin-left: 22px;
padding-top: 8px;
}
.thead {
display: flex;
font-size: 14px;
margin-bottom: 8px;
> div {
// border-right: 1px solid #cccccc;
box-sizing: border-box;
// padding-left: 5px;
color: #053b6a;
font-weight: 600;
}
}
.deviceList {
cursor: pointer;
margin-bottom: 2px;
box-sizing: border-box;
border-bottom: 1px solid #053b6a00;
color: #1d1d1d;
&:hover {
box-sizing: border-box;
border-bottom: 1px solid #053b6a;
color: #053b6a;
font-weight: 600;
}
&.topActive {
// border-top: 1px solid #cccccc;
}
display: flex;
// border-bottom: 1px solid #cccccc;
// justify-content: space-between;
> div {
// flex: 1;
font-size: 14px;
// border-right: 1px solid #cccccc;
box-sizing: border-box;
// padding-left: 5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
// border-right: 1px solid #cccccc;
}
}
.no {
width: 50px;
}
.name {
// border-right: none;
flex: 1;
text-align: center;
}
.code {
width: 112px;
text-align: center;
}
}
.box {
width: 348px;
height: 48px;
padding-left: 20px;
display: flex;
background-color: #ffffff;
box-sizing: border-box;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
cursor: pointer;
position: relative;
// box-sizing: border-box;
&.firstbox {
border-top: 1px solid rgba(0, 0, 0, 0.1);
// box-sizing: border-box;
&:hover {
border-top: 1px solid rgba(5, 59, 106, 0);
}
}
&:hover {
box-sizing: border-box;
background-color: rgba(5, 59, 106, 0.1);
border-bottom: none !important;
}
.upPic {
display: inline-block;
margin-left: 64px;
line-height: 48px;
font-size: 16px;
color: #053b6a;
}
> i.ju {
position: absolute;
display: inline-block;
width: 15px;
height: 15px;
background: #fff;
border: 1px solid #cccccc;
left: 45px;
top: 16px;
// top: ;
z-index: 1;
border-radius: 2px;
}
> i.bingo {
z-index: 2;
position: absolute;
// line-height: 48px;
left: 45px;
top: 16px;
color: #fff;
}
> i.arrow-right {
position: absolute;
right: 32px;
top: 16px;
transition: 0.3s linear;
&.active {
transform: rotate(90deg);
}
}
&.active {
// background-color: #053b6a;
.left,
.right {
color: #053b6a;
}
> i {
color: #053b6a;
}
}
.left {
color: #053b6a;
line-height: 48px;
margin-left: 28px;
.iconfont {
font-size: 22px;
}
}
.right {
color: #1d1d1d;
line-height: 48px;
font-size: 16px;
margin-left: 4px;
}
}
.goback {
display: flex;
justify-content: space-between;
.minMax {
font-size: 14px;
line-height: 28px;
box-sizing: border-box;
padding-left: 3px;
}
.btn-w {
width: 100%;
text-align: center;
padding-bottom: 2px;
.btn {
border-radius: 50%;
// width: 14px;
// height: 14px;
padding: 2px;
}
.btn-w-num {
display: inline-block;
font-size: 14px;
padding: 0px 5px;
}
}
}
}
// 开关
.switch {
position: absolute;
font-size: 30px;
right: -27px;
top: 50%;
margin-top: -30px;
width: 40px;
border-radius: 40%;
overflow: hidden;
cursor: pointer;
i {
background: #fff;
}
}
}
</style> </style>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<span v-if="scope.row.planStatus == 3">已完成</span> <span v-if="scope.row.planStatus == 3">已完成</span>
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<el-button <el-button
size="normal" size="normal"
...@@ -156,8 +156,8 @@ ...@@ -156,8 +156,8 @@
</el-dialog> </el-dialog>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @close="cancel"> <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 ref="form2" :model="form2" :rules="rules" label-width="120px">
<el-form-item label="巡检计划名称" prop="plansName"> <el-form-item label="巡检计划名称">
<font>{{plansName}}</font> <font>{{form2.planName}}</font>
</el-form-item> </el-form-item>
<el-form-item label="计划时间"> <el-form-item label="计划时间">
<font>{{ parseTime(form2.startTime, '{y}-{m}-{d}') }} <font>{{ parseTime(form2.startTime, '{y}-{m}-{d}') }}
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
<el-input v-model="form2.orderName" placeholder="请输入工单名称" /> <el-input v-model="form2.orderName" placeholder="请输入工单名称" />
</el-form-item> </el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector"> <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 <el-option
v-for="item in inspector" v-for="item in inspector"
:key="item.userId" :key="item.userId"
...@@ -222,7 +222,6 @@ ...@@ -222,7 +222,6 @@
typeOptions: [], typeOptions: [],
// 设备级联 // 设备级联
options: [], options: [],
plansName: '',
props: { props: {
multiple: true, multiple: true,
value: "id", value: "id",
...@@ -230,7 +229,6 @@ ...@@ -230,7 +229,6 @@
level: "level", level: "level",
children: "childList", children: "childList",
}, },
devices: null,
// 巡检员列表 // 巡检员列表
inspector: [], inspector: [],
// 弹出层标题 // 弹出层标题
...@@ -259,10 +257,10 @@ ...@@ -259,10 +257,10 @@
// 表单校验 // 表单校验
rules: { rules: {
planName: [ planName: [
{ required: true, message: " 计划名称不能为空", trigger: "blur" } { required: true, message: "请输入计划名称", trigger: "blur" }
], ],
orderName: [ orderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" } { required: true, message: "请输入工单名称", trigger: "blur" }
], ],
devices: [ devices: [
{ required: true, message: "请选择巡检设备", trigger: "blur" } { required: true, message: "请选择巡检设备", trigger: "blur" }
...@@ -287,8 +285,7 @@ ...@@ -287,8 +285,7 @@
}, },
methods: { methods: {
handleChange(value) { handleChange(value) {
// this.devices = value; console.log(this.form1.devices);
console.log(this.form.devices);
}, },
/** 查询巡检计划列表 */ /** 查询巡检计划列表 */
getList() { getList() {
...@@ -315,9 +312,6 @@ ...@@ -315,9 +312,6 @@
this.loading = false; this.loading = false;
}); });
}, },
setUserId(val){
this.form.appointInspector = val;
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open1 = false; this.open1 = false;
...@@ -337,7 +331,6 @@ ...@@ -337,7 +331,6 @@
createTime: null, createTime: null,
remarks: null remarks: null
}; };
this.devices = null;
this.resetForm("form1"); this.resetForm("form1");
this.form2 = { this.form2 = {
planId: null, planId: null,
...@@ -376,7 +369,7 @@ ...@@ -376,7 +369,7 @@
deviceNodeTree().then(response => { deviceNodeTree().then(response => {
this.options = response.data; this.options = response.data;
this.open1 = true; this.open1 = true;
this.title1 = "添加巡检计划"; this.title1 = "新增巡检计划";
}); });
}, },
/** 下发按钮操作 */ /** 下发按钮操作 */
...@@ -386,7 +379,6 @@ ...@@ -386,7 +379,6 @@
const planId = row.planId || this.ids const planId = row.planId || this.ids
getInspectionPlan(planId).then(response => { getInspectionPlan(planId).then(response => {
this.form2 = response.data; this.form2 = response.data;
this.plansName = this.form2.planName;
this.form2.remarks = ""; this.form2.remarks = "";
this.open2 = true; this.open2 = true;
this.title2 = "填写工单信息"; this.title2 = "填写工单信息";
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<!-- 接单信息 --> <!-- 接单信息 -->
<el-row> <el-row v-if="this.form.orderId != null && this.form.orderId != ''">
<el-divider></el-divider> <el-divider></el-divider>
<el-col :span="24"> <el-col :span="24">
<div style="color: #31EAEA;width: 100%;height: 40px;"> <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
...@@ -69,23 +69,27 @@ ...@@ -69,23 +69,27 @@
ref="RightBototmData" ref="RightBototmData"
:list="rightBototmData" :list="rightBototmData"
/> />
<!-- 报警工单 -->
<CreateWork <CreateWork
ref="CreateWork" ref="CreateWork"
:open="createWorkOpen" :open="createWorkOpen"
@callback="CreateWorkCallBack" @callback="CreateWorkCallBack"
/> />
<!-- 隐患工单 -->
<!-- <CreateWorkTrouble
ref="CreateWorkTrouble"
:open="createWorkTroubleOpen"
@callback="CreateWorkTroubleCallBack"
/> -->
<div ref="drawer" class="drawer" :class="{ back: backFlag }"> <div
ref="drawer"
class="drawer"
:class="{ back: backFlag, opacity: drawerOpacity }"
>
<div class="switch" @click="backFlag = !backFlag"> <div class="switch" @click="backFlag = !backFlag">
<!-- <i
:class="{
'el-icon-arrow-left': !backFlag,
'el-icon-arrow-right': backFlag,
}"
></i> -->
<img v-if="!backFlag" src="@/assets/images/l.png" alt="" /> <img v-if="!backFlag" src="@/assets/images/l.png" alt="" />
<img v-else src="@/assets/images/r.png" alt="" /> <img v-else src="@/assets/images/r.png" alt="" />
<!-- <i class="el-icon-arrow-right"></i> -->
</div> </div>
<!-- 只能动态传入内嵌盒子的高 --> <!-- 只能动态传入内嵌盒子的高 -->
<div class="scroll" :style="{ height: `${boxHeight}px` }"> <div class="scroll" :style="{ height: `${boxHeight}px` }">
...@@ -94,9 +98,17 @@ ...@@ -94,9 +98,17 @@
placeholder="点击输入" placeholder="点击输入"
id="tipinput" id="tipinput"
class="search-input" class="search-input"
/> >
<el-button class="search-but" @click="search()">搜索</el-button> <template slot="suffix">
<el-button class="refresh-but" @click="refreshMap()">重置</el-button> <div @click="search()">
<i class="iconfont icon-search"></i>
</div>
</template>
</el-input>
<!-- <el-button class="search-but" @click="search()">搜索</el-button> -->
<el-button class="refresh-but" @click="refreshMap()">
<i class="iconfont icon-reset"></i>
</el-button>
<div class="leftBar-wrapper"> <div class="leftBar-wrapper">
<div <div
...@@ -138,7 +150,7 @@ ...@@ -138,7 +150,7 @@
<template v-if="item.list.length > 0"> <template v-if="item.list.length > 0">
<!-- 设备以及管道 展示内容是一样的 --> <!-- 设备以及管道 展示内容是一样的 -->
<template v-if="item.value != 9"> <template v-if="item.value != 9">
<div> <div class="list-wrapper">
<div class="thead"> <div class="thead">
<div class="no">序号</div> <div class="no">序号</div>
<div class="code">设备编号</div> <div class="code">设备编号</div>
...@@ -163,7 +175,7 @@ ...@@ -163,7 +175,7 @@
</template> </template>
<!-- 值班人员 展示不太一样--> <!-- 值班人员 展示不太一样-->
<template v-else-if="item.value == 9"> <template v-else-if="item.value == 9">
<div> <div class="list-wrapper">
<div class="thead"> <div class="thead">
<div class="no">序号</div> <div class="no">序号</div>
<div class="code">人员姓名</div> <div class="code">人员姓名</div>
...@@ -186,27 +198,24 @@ ...@@ -186,27 +198,24 @@
</div> </div>
</div> </div>
</template> </template>
<!-- 翻页 -->
<div class="goback"> <div class="goback">
<div class="minMax"> <div class="btn-w">
页数
{{ item.nowPage }}/{{ item.maxPage }}
</div>
<div class="btn">
<el-button <el-button
class="backPage" class="btn backPage"
type="mini" type="mini"
:disabled="item.nowPage == 1" :disabled="item.nowPage == 1"
@click.stop="pageBack(item, index)" @click.stop="pageBack(item, index)"
>上一页</el-button icon="el-icon-arrow-left"
> />
<span class="btn-w-num">{{ item.nowPage }}</span>
<el-button <el-button
class="goPage" class="btn goPage"
type="mini" type="mini"
:disabled="item.nowPage == item.maxPage" :disabled="item.nowPage == item.maxPage"
@click.stop="pageGo(item, index)" @click.stop="pageGo(item, index)"
>下一页</el-button icon="el-icon-arrow-right"
> />
</div> </div>
</div> </div>
</template> </template>
...@@ -230,8 +239,10 @@ import gaodeMap, { ...@@ -230,8 +239,10 @@ import gaodeMap, {
DEVICE_TYPE, DEVICE_TYPE,
mapOperateType, mapOperateType,
} from "utils/gaodeMapView.js"; } from "utils/gaodeMapView.js";
import { selectAlarmDevice } from "@/api/dataMonitoring/deviceAlarm.js"; import { selectAlarmDevice } from "@/api/dataMonitoring/deviceAlarm.js";
import { getAllDeviceInfo, countDeviceByType } from "@/api/device/deviceInfo"; import { getAllDeviceInfo, countDeviceByType } from "@/api/device/deviceInfo";
import { getMapHiddenTroublelist } from "@/api/riskManagement/hiddenTrouble";
import RightBototmData from "./components/RightBototmData.vue"; import RightBototmData from "./components/RightBototmData.vue";
import CreateWork from "./components/CreateWork.vue"; import CreateWork from "./components/CreateWork.vue";
import { getInspectorLocations } from "@/api/inspectorLocation/location"; import { getInspectorLocations } from "@/api/inspectorLocation/location";
...@@ -335,6 +346,7 @@ export default { ...@@ -335,6 +346,7 @@ export default {
alarmObj: { alarmId: "", type: "" }, alarmObj: { alarmId: "", type: "" },
// 左边抽屉 内嵌scroll盒子的高 // 左边抽屉 内嵌scroll盒子的高
boxHeight: "", boxHeight: "",
drawerOpacity: false,
//抽屉是否收回 //抽屉是否收回
backFlag: true, backFlag: true,
}; };
...@@ -342,7 +354,7 @@ export default { ...@@ -342,7 +354,7 @@ export default {
created() { created() {
// 让左边的框隐藏 // 让左边的框隐藏
this.$store.dispatch("app/toggleDevice", "mobile"); this.$store.dispatch("app/toggleDevice", "mobile");
console.log("sasdasdas") console.log("sasdasdas");
}, },
mounted() { mounted() {
...@@ -369,7 +381,6 @@ export default { ...@@ -369,7 +381,6 @@ export default {
this.gaoMap.view = this; this.gaoMap.view = this;
// 右下角数据 跟值班人员 // 右下角数据 跟值班人员
this.rightBottomData(); this.rightBottomData();
// this.backFlag = false; // this.backFlag = false;
}, },
...@@ -388,6 +399,12 @@ export default { ...@@ -388,6 +399,12 @@ export default {
return this.getInspectorLocations(); return this.getInspectorLocations();
} }
}) })
.then((res) => {
if (res == 200) {
//隐患
return this.getMapHiddenTroublelist();
}
})
.then((res) => { .then((res) => {
if (res == 200) { if (res == 200) {
// 所有设备上图结束之后,左边的抽屉加载数据 // 所有设备上图结束之后,左边的抽屉加载数据
...@@ -397,6 +414,7 @@ export default { ...@@ -397,6 +414,7 @@ export default {
} }
}); });
}, },
// 设备
getDeviceInfo(queryParams) { getDeviceInfo(queryParams) {
this.loading = true; this.loading = true;
return getAllDeviceInfo(queryParams).then((response) => { return getAllDeviceInfo(queryParams).then((response) => {
...@@ -426,6 +444,7 @@ export default { ...@@ -426,6 +444,7 @@ export default {
return response.code; return response.code;
}); });
}, },
// 管道
getPipeList(queryParams) { getPipeList(queryParams) {
return pipeAllInfoList(queryParams).then((res) => { return pipeAllInfoList(queryParams).then((res) => {
console.log("管道", res); console.log("管道", res);
...@@ -453,6 +472,19 @@ export default { ...@@ -453,6 +472,19 @@ export default {
return res.code; return res.code;
}); });
}, },
// 隐患
getMapHiddenTroublelist(queryParams) {
return getMapHiddenTroublelist().then((res) => {
console.log(res);
if (res.code == 200) {
res.data.forEach((item) => {
console.log("隐患", item);
this.gaoMap.addMarker(DEVICE_TYPE.TROUBLE, item);
});
return res.code;
}
});
},
// 获取报警资源,并且改变图上的状态 // 获取报警资源,并且改变图上的状态
getSelectAlarmDevice() { getSelectAlarmDevice() {
selectAlarmDevice().then((res) => { selectAlarmDevice().then((res) => {
...@@ -506,7 +538,6 @@ export default { ...@@ -506,7 +538,6 @@ export default {
options.lineData.alarmType = alarmType; options.lineData.alarmType = alarmType;
// 报警信息 // 报警信息
options.lineData.alarmValue = alarmValue; options.lineData.alarmValue = alarmValue;
console.log("管道报警"); console.log("管道报警");
} }
polyline.setExtData(options); polyline.setExtData(options);
...@@ -657,9 +688,7 @@ export default { ...@@ -657,9 +688,7 @@ export default {
// 左边的Bar修改值 左边抽屉 // 左边的Bar修改值 左边抽屉
leftBarChange(item) { leftBarChange(item) {
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0; // this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
const index = this.leftBarNum.indexOf(item.value); const index = this.leftBarNum.indexOf(item.value);
if (index >= 0) { if (index >= 0) {
this.leftBarNum.splice(index, 1); this.leftBarNum.splice(index, 1);
} else { } else {
...@@ -926,7 +955,7 @@ export default { ...@@ -926,7 +955,7 @@ export default {
// }); // });
// console.log(this.changeBtnData[0], this.allList[0]); // console.log(this.changeBtnData[0], this.allList[0]);
this.changeBtnData.forEach((item, index) => { this.changeBtnData.forEach((item, index) => {
console.log("=======", index, this.allList[index]); // console.log("=======", index, this.allList[index]);
if (this.allList[index]?.length > 0) { if (this.allList[index]?.length > 0) {
item.list = this.allList[index].filter((item2, index2) => { item.list = this.allList[index].filter((item2, index2) => {
return ( return (
...@@ -1179,9 +1208,9 @@ export default { ...@@ -1179,9 +1208,9 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
// 让抽屉继续隐身
console.log("移除window事件"); console.log("移除window事件");
map.clearMap(); map.clearMap();
window.removeEventListener("mousedown", this.barClose); window.removeEventListener("mousedown", this.barClose);
// 关闭scoket // 关闭scoket
if (this.ws) { if (this.ws) {
...@@ -1201,94 +1230,93 @@ export default { ...@@ -1201,94 +1230,93 @@ export default {
bottom: 0; bottom: 0;
width: 100%; width: 100%;
} }
.btn-wrapper { // .btn-wrapper {
position: fixed; // position: fixed;
right: 32px; // right: 32px;
top: 100px; // top: 100px;
.myBtn { // .myBtn {
display: flex; // display: flex;
justify-content: space-between; // justify-content: space-between;
.el-btn { // .el-btn {
width: 144px; // width: 144px;
height: 44px; // height: 44px;
background-color: #053b6a; // background-color: #053b6a;
margin-right: 22px; // margin-right: 22px;
border-radius: 4px; // border-radius: 4px;
text-align: center; // text-align: center;
line-height: 44px; // line-height: 44px;
color: #fff; // color: #fff;
cursor: pointer; // cursor: pointer;
font-size: 18px; // font-size: 18px;
display: flex; // display: flex;
justify-content: space-between; // justify-content: space-between;
&.active { // &.active {
background: #31eaea; // background: #31eaea;
color: #053b6a !important; // color: #053b6a !important;
} // }
.left { // .left {
padding-left: 38px; // padding-left: 38px;
i { // i {
font-size: 18px; // font-size: 18px;
} // }
} // }
.right { // .right {
padding-right: 38px; // padding-right: 38px;
} // }
// .newLetf {
// margin-left: 20px;
// }
// .newRight {
// margin-right: 20px;
// position: relative;
// i {
// position: absolute;
// right: 0px;
// top: 1px;
// font-size: 30px;
// }
// }
// }
// }
// .animate {
// .option {
// .op-btn {
// width: 144px;
// height: 38px;
// border-radius: 0;
// color: #053b6a;
// line-height: 38px;
// background-color: #fff;
// cursor: pointer;
// position: relative;
// border: 1px solid #cccccc;
// border-top: 0;
// &.active {
// background-image: url("../../../assets/images/bac1.png");
// }
// .left {
// position: relative;
// margin-right: 30px;
// margin-left: 22px;
// i {
// position: absolute;
// top: -7px;
// font-size: 20px;
// }
// }
// .right {
// display: inline-block;
// font-size: 14px;
// line-height: 38px;
// }
.newLetf { // &:hover {
margin-left: 20px; // background-image: url("../../../assets/images/bac1.png");
} // }
.newRight { // }
margin-right: 20px; // }
position: relative; // }
i { // }
position: absolute;
right: 0px;
top: 1px;
font-size: 30px;
}
}
}
}
.animate {
.option {
.op-btn {
width: 144px;
height: 38px;
border-radius: 0;
color: #053b6a;
line-height: 38px;
background-color: #fff;
cursor: pointer;
position: relative;
border: 1px solid #cccccc;
border-top: 0;
&.active {
background-image: url("../../../assets/images/bac1.png");
}
.left {
position: relative;
margin-right: 30px;
margin-left: 22px;
i {
position: absolute;
top: -7px;
font-size: 20px;
}
}
.right {
display: inline-block;
font-size: 14px;
line-height: 38px;
}
&:hover {
background-image: url("../../../assets/images/bac1.png");
}
}
}
}
}
.input-card { .input-card {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -1335,16 +1363,6 @@ input[type="radio"] { ...@@ -1335,16 +1363,6 @@ input[type="radio"] {
margin-right: 1rem; margin-right: 1rem;
} }
.refresh-but {
// position: fixed;
position: absolute;
top: 10px;
left: 285px;
// width: 85px;
color: white;
background-color: #053b6a;
}
.classShow { .classShow {
opacity: 0; opacity: 0;
} }
...@@ -1353,12 +1371,17 @@ input[type="radio"] { ...@@ -1353,12 +1371,17 @@ input[type="radio"] {
top: 80px; top: 80px;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 370px; width: 348px;
transition: 0.2s linear; transition: 0.2s linear;
background: #fff; background: #fff;
// background: red; // background: red;
opacity: 0;
// 优化抽屉出来回去
&.opacity {
opacity: 1;
}
&.back { &.back {
left: -370px; left: -348px;
} }
.scroll { .scroll {
// height: 100%; // height: 100%;
...@@ -1369,77 +1392,88 @@ input[type="radio"] { ...@@ -1369,77 +1392,88 @@ input[type="radio"] {
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
} }
} .search-input {
.switch {
position: absolute; position: absolute;
font-size: 30px; top: 14px;
right: -27px; left: 39px;
top: 50%; width: 236px;
margin-top: -30px; .icon-search {
width: 40px; line-height: 28px;
border-radius: 40%;
overflow: hidden;
cursor: pointer; cursor: pointer;
// background: #fff; font-size: 13px;
i {
background: #fff;
} }
} }
} .refresh-but {
.search-input {
position: absolute;
top: 10px;
left: 20px;
width: 200px;
}
.search-but {
// position: fixed; // position: fixed;
position: absolute; position: absolute;
top: 10px; padding: 0px;
left: 220px; height: 28px;
width: 28px;
top: 14px;
left: 285px;
// width: 85px; // width: 85px;
color: white; color: white;
background-color: #053b6a; background-color: #053b6a;
} .icon-reset {
// 左边的bar font-size: 13px;
.leftBar-wrapper { }
}
}
// 左边的bar
.leftBar-wrapper {
// position: fixed; // position: fixed;
width: 340px; width: 340px;
margin-left: 20px; // margin-left: 20px;
margin-top: 70px; margin-top: 60px;
// box-sizing: border-box; // box-sizing: border-box;
.box-wrapper { .box-wrapper {
width: 340px;
} }
.animate { .animate {
border: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1);
border-top: none; border-top: none;
width: 340px;
.list-wrapper {
margin-left: 22px;
padding-top: 8px;
}
.thead { .thead {
display: flex; display: flex;
font-size: 14px; font-size: 14px;
margin-bottom: 8px;
> div { > div {
border-right: 1px solid #cccccc; // border-right: 1px solid #cccccc;
box-sizing: border-box; box-sizing: border-box;
padding-left: 5px; // padding-left: 5px;
color: #000; color: #053b6a;
font-weight: 600; font-weight: 600;
} }
} }
.deviceList { .deviceList {
cursor: pointer; cursor: pointer;
margin-bottom: 2px;
box-sizing: border-box;
border-bottom: 1px solid #053b6a00;
color: #1d1d1d;
&:hover {
box-sizing: border-box;
border-bottom: 1px solid #053b6a;
color: #053b6a;
font-weight: 600;
}
&.topActive { &.topActive {
border-top: 1px solid #cccccc; // border-top: 1px solid #cccccc;
} }
display: flex; display: flex;
border-bottom: 1px solid #cccccc; // border-bottom: 1px solid #cccccc;
// justify-content: space-between; // justify-content: space-between;
> div { > div {
// flex: 1; // flex: 1;
font-size: 14px; font-size: 14px;
border-right: 1px solid #cccccc; // border-right: 1px solid #cccccc;
box-sizing: border-box; box-sizing: border-box;
padding-left: 5px; // padding-left: 5px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
...@@ -1452,31 +1486,43 @@ input[type="radio"] { ...@@ -1452,31 +1486,43 @@ input[type="radio"] {
.name { .name {
// border-right: none; // border-right: none;
flex: 1; flex: 1;
text-align: center;
} }
.code { .code {
width: 100px; width: 112px;
text-align: center;
} }
} }
.box { .box {
width: 340px; width: 348px;
height: 48px; height: 48px;
padding-left: 20px;
display: flex; display: flex;
background-color: #ffffff; background-color: #ffffff;
box-sizing: border-box; box-sizing: border-box;
border: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1);
border-top: none;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
// box-sizing: border-box;
&.firstbox {
border-top: 1px solid rgba(0, 0, 0, 0.1);
// box-sizing: border-box;
&:hover {
border-top: 1px solid rgba(5, 59, 106, 0);
}
}
&:hover {
box-sizing: border-box;
background-color: rgba(5, 59, 106, 0.1);
border-bottom: none !important;
}
.upPic { .upPic {
display: inline-block; display: inline-block;
margin-left: 32px; margin-left: 64px;
line-height: 48px; line-height: 48px;
font-size: 10px; font-size: 16px;
color: #053b6a; color: #053b6a;
} }
&.firstbox {
border-top: 1px solid rgba(0, 0, 0, 0.1);
}
> i.ju { > i.ju {
position: absolute; position: absolute;
display: inline-block; display: inline-block;
...@@ -1484,7 +1530,7 @@ input[type="radio"] { ...@@ -1484,7 +1530,7 @@ input[type="radio"] {
height: 15px; height: 15px;
background: #fff; background: #fff;
border: 1px solid #cccccc; border: 1px solid #cccccc;
left: 15px; left: 45px;
top: 16px; top: 16px;
// top: ; // top: ;
z-index: 1; z-index: 1;
...@@ -1494,31 +1540,19 @@ input[type="radio"] { ...@@ -1494,31 +1540,19 @@ input[type="radio"] {
z-index: 2; z-index: 2;
position: absolute; position: absolute;
// line-height: 48px; // line-height: 48px;
left: 15px; left: 45px;
top: 16px; top: 16px;
color: #fff; color: #fff;
} }
> i.arrow-right { > i.arrow-right {
position: absolute; position: absolute;
right: 10px; right: 32px;
top: 16px; top: 16px;
transition: 0.3s linear; transition: 0.3s linear;
&.active { &.active {
transform: rotate(90deg); transform: rotate(90deg);
} }
} }
&:hover {
// background-color: #053b6a;
// color: #ffffff;
// > i {
// color:#fff;
// }
}
&:hover .left,
&:hover .right {
// color: #ffffff;
}
&.active { &.active {
// background-color: #053b6a; // background-color: #053b6a;
.left, .left,
...@@ -1532,12 +1566,16 @@ input[type="radio"] { ...@@ -1532,12 +1566,16 @@ input[type="radio"] {
.left { .left {
color: #053b6a; color: #053b6a;
line-height: 48px; line-height: 48px;
margin-left: 20px; margin-left: 28px;
.iconfont {
font-size: 22px;
}
} }
.right { .right {
color: #1d1d1d; color: #1d1d1d;
line-height: 48px; line-height: 48px;
// margin-left: 20px; font-size: 16px;
margin-left: 4px;
} }
} }
.goback { .goback {
...@@ -1549,11 +1587,37 @@ input[type="radio"] { ...@@ -1549,11 +1587,37 @@ input[type="radio"] {
box-sizing: border-box; box-sizing: border-box;
padding-left: 3px; padding-left: 3px;
} }
.btn-w {
width: 100%;
text-align: center;
padding-bottom: 2px;
.btn { .btn {
text-align: right; border-radius: 50%;
.goPage { // width: 14px;
margin-left: 0; // height: 14px;
padding: 2px;
} }
.btn-w-num {
display: inline-block;
font-size: 14px;
padding: 0px 5px;
}
}
}
}
// 开关
.switch {
position: absolute;
font-size: 30px;
right: -27px;
top: 50%;
margin-top: -30px;
width: 40px;
border-radius: 40%;
overflow: hidden;
cursor: pointer;
i {
background: #fff;
} }
} }
} }
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="设备id" prop="deviceId"> <el-form-item label="隐患名称" prop="troubleName">
<el-input <el-input v-model="queryParams.troubleName" placeholder="请输入隐患名称"/>
v-model="queryParams.deviceId"
placeholder="请输入设备id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单id" prop="orderId">
<el-input
v-model="queryParams.orderId"
placeholder="请输入工单id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="经度" prop="longitude"> <el-form-item label="隐患类型" prop="troubleType">
<el-input <el-select v-model="queryParams.troubleType" placeholder="请选择隐患类型" clearable size="small">
v-model="queryParams.longitude" <el-option
placeholder="请输入经度" v-for="dict in typeOptions"
clearable :key="dict.dictValue"
size="small" :label="dict.dictLabel"
@keyup.enter.native="handleQuery" :value="dict.dictValue"
/> ></el-option>
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-input
v-model="queryParams.latitude"
placeholder="请输入纬度"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="处理状态" prop="dealStatus">
<el-select v-model="queryParams.dealStatus" placeholder="请选择处理状态" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remarks"> <!--<el-form-item label="状态" prop="dealStatus">
<el-input <el-select v-model="queryParams.dealStatus" placeholder="请选择状态" clearable size="small">
v-model="queryParams.remarks" <el-option label="" value="0" />
placeholder="请输入备注" </el-select>
clearable </el-form-item>-->
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -68,67 +36,65 @@ ...@@ -68,67 +36,65 @@
v-hasPermi="['riskManagement:hiddenTrouble:add']" v-hasPermi="['riskManagement:hiddenTrouble:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['riskManagement:hiddenTrouble:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['riskManagement:hiddenTrouble:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['riskManagement:hiddenTrouble:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="hiddenTroubleList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="hiddenTroubleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column label="隐患名称" align="center" prop="troubleName" />
<el-table-column label="隐患信息id" align="center" prop="troubleId" /> <el-table-column label="隐患类型" align="center" prop="troubleType" />
<el-table-column label="设备id" align="center" prop="deviceId" /> <el-table-column label="隐患级别" align="center" prop="troubleLevel" />
<el-table-column label="工单id" align="center" prop="orderId" /> <el-table-column label="图片" align="center" prop="pictureUrl" >
<el-table-column label="经度" align="center" prop="longitude" /> <template slot-scope="scope">
<el-table-column label="纬度" align="center" prop="latitude" /> <el-image :src="scope.row.pictureUrl" :preview-src-list="[scope.row.pictureUrl]" v-if="scope.row.pictureUrl != '' && scope.row.pictureUrl != null" style="width: 16px;"></el-image>
<el-table-column label="处理状态" align="center" prop="dealStatus" /> <span v-if="scope.row.pictureUrl == '' || scope.row.pictureUrl == null">-</span>
<el-table-column label="备注" align="center" prop="remarks" /> </template>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> </el-table-column>
<el-table-column label="上报人" align="center" prop="reportManName" />
<el-table-column label="上报时间" align="center" prop="createTime" />
<el-table-column label="处理状态" align="center" prop="dealStatus" >
<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>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="normal"
type="text"
icon="el-icon-edit"
@click="handleIssue(scope.row)"
v-hasPermi="['workOrder:basicsInfo:add']"
v-if="scope.row.orderId == '' || scope.row.orderId == null"
>生成工单
</el-button>
<el-button
size="normal"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['riskManagement:hiddenTrouble:edit']" v-hasPermi="['riskManagement:hiddenTrouble:edit']"
>修改</el-button> v-if="scope.row.orderId == '' || scope.row.orderId == null"
>修改
</el-button>
<el-button <el-button
size="mini" size="normal"
type="text"
icon="el-icon-edit"
@click="showDetail(scope.row)"
>详情</el-button>
<el-button
size="normal"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleIsDel(scope.row)"
v-hasPermi="['riskManagement:hiddenTrouble:remove']" v-if="scope.row.orderId == '' || scope.row.orderId == null"
>删除</el-button> >作废
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -142,43 +108,162 @@ ...@@ -142,43 +108,162 @@
/> />
<!-- 添加或修改隐患信息对话框 --> <!-- 添加或修改隐患信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title1" :visible.sync="open1" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form1" :model="form1" :rules="rules" label-width="120px">
<el-form-item label="设备id" prop="deviceId"> <el-col>
<el-input v-model="form.deviceId" placeholder="请输入设备id" /> <el-form-item label="隐患名称" prop="troubleName" style="width: 720px">
<el-input v-model="form1.troubleName" placeholder="请输入隐患名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患类型" prop="troubleType">
<el-select v-model="form1.troubleType" placeholder="请选择隐患类型">
<el-option
v-for="dict in typeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="隐患级别" prop="troubleLevel">
<el-select v-model="form1.troubleLevel" placeholder="请选择隐患级别">
<el-option
v-for="dict in levelOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上报人" prop="reportMan">
<el-select v-model="form1.reportMan" placeholder="请选择上报人" clearable size="small" >
<el-option
v-for="item in userList"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="隐患设备" prop="device">
<el-cascader
v-model="form1.device"
:options="options"
:props="props"
:show-all-levels="false"
@change="handleChange"
filterable
clearable
></el-cascader>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="地址" prop="address" style="width: 720px">
<el-input v-model="form1.address" type="textarea" placeholder="请输入地址" />
</el-form-item>
</el-col>
<el-col>
<el-form-item label="经纬度" prop="longitude">
<el-row>
<el-col :span="8">
<el-input v-model.number="form1.longitude" placeholder="请输入经度" />
</el-col>
<el-col :span="8" style="margin-left: 10px">
<el-input v-model.number="form1.latitude" placeholder="请输入纬度"/>
</el-col>
<el-col :span="5" style="margin-left: 10px">
<el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button>
</el-col>
</el-row>
</el-form-item> </el-form-item>
<el-form-item label="工单id" prop="orderId"> </el-col>
<el-input v-model="form.orderId" placeholder="请输入工单id" /> <el-col>
<el-form-item label="图片上传" prop="pictureUrl">
<MyFileUpload
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="form1.pictureUrl"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="经度" prop="longitude"> </el-col>
<el-input v-model="form.longitude" placeholder="请输入经度" /> <el-col>
<el-form-item label="隐患信息" prop="remarks" style="width: 720px">
<el-input v-model="form1.remarks" type="textarea" placeholder="请输入隐患信息" />
</el-form-item> </el-form-item>
<el-form-item label="纬度" prop="latitude"> </el-col>
<el-input v-model="form.latitude" placeholder="请输入纬度" /> </el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm1">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</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="隐患名称">
<font>{{form2.troubleName}}</font>
</el-form-item>
<el-form-item label="隐患类型">
<font>{{form2.troubleType}}</font>
</el-form-item>
<el-form-item label="隐患级别">
<font>{{form2.troubleLevel}}</font>
</el-form-item>
<el-form-item label="工单名称" prop="orderName" style="width: 720px">
<el-input v-model="form2.orderName" placeholder="请输入工单名称" />
</el-form-item> </el-form-item>
<el-form-item label="处理状态"> <el-form-item label="指定执行人员" prop="appointInspector" >
<el-radio-group v-model="form.dealStatus"> <el-select v-model="form2.appointInspector" placeholder="请选择执行人员" clearable size="small" style="width: 600px">
<el-radio label="1">请选择字典生成</el-radio> <el-option
</el-radio-group> v-for="item in inspector"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remarks"> <el-form-item label="工单描述" prop="remarks" style="width: 720px">
<el-input v-model="form.remarks" placeholder="请输入备注" /> <el-input type="textarea" v-model="form2.remarks" placeholder="请输入工单描述" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm2">确 定</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<Mapdialog
v-if="loadmap"
:dialogTableVisible="dialogTableVisible"
@dialogcancelFun="dialogcancelFun"
:slat="form1.latitude"
:slng="form1.longitude"
@confirmFun="confirmFun($event)"
></Mapdialog>
</div> </div>
</template> </template>
<script> <script>
import { listHiddenTrouble, getHiddenTrouble, delHiddenTrouble, addHiddenTrouble, updateHiddenTrouble, exportHiddenTrouble } from "@/api/riskManagement/hiddenTrouble"; import { listHiddenTrouble, getHiddenTrouble, addHiddenTrouble, updateHiddenTrouble, exportHiddenTrouble } from "@/api/riskManagement/hiddenTrouble";
import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
import { inspectorList, allListUser } from "@/api/system/user";
import { deviceNodeTree } from "@/api/device/deviceInfo";
import MyFileUpload from '@/components/MyFileUpload';
import Mapdialog from "@/components/mapDialog/checkDeviceLoaction.vue";
export default { export default {
name: "HiddenTrouble", name: "HiddenTrouble",
components: { components: {
MyFileUpload,
Mapdialog
}, },
data() { data() {
return { return {
...@@ -198,30 +283,97 @@ export default { ...@@ -198,30 +283,97 @@ export default {
total: 0, total: 0,
// 隐患信息表格数据 // 隐患信息表格数据
hiddenTroubleList: [], hiddenTroubleList: [],
// 隐患类型字典
typeOptions: [],
// 隐患等级字典
levelOptions: [],
// 上传文件列表
fileList: [],
// 地图
loadmap: false,
dialogTableVisible: false,
// 设备级联
options: [],
props: {
value: "id",
label: "name",
level: "level",
children: "childList",
},
// 用户列表
userList: [],
// 巡检员列表
inspector: [],
// 弹出层标题 // 弹出层标题
title: "", title1: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open1: false,
// 弹出层标题
title2: "",
// 是否显示弹出层
open2: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
troubleName: null,
troubleType: null,
deviceId: null, deviceId: null,
troubleLevel: null,
orderId: null, orderId: null,
longitude: null, longitude: null,
deviceType: null,
latitude: null, latitude: null,
dealStatus: null, dealStatus: null,
remarks: null address: null,
remarks: null,
pictureUrl: null,
reportMan: null
}, },
// 表单参数 // 表单参数
form: {}, form1: {},
// 表单参数
form2: {},
// 表单校验 // 表单校验
rules: { rules: {
troubleName: [
{ required: true, message: "请输入隐患名称", trigger: "blur" }
],
troubleType: [
{ required: true, message: "请选择隐患类型", trigger: "blur" }
],
troubleLevel: [
{ required: true, message: "请选择隐患级别", trigger: "blur" }
],
reportMan: [
{ required: true, message: "请选择上报人", trigger: "blur" }
],
address: [
{ required: true, message: "请输入地址", trigger: "blur" }
],
pictureUrl: [
{ required: true, message: "请上传图片", trigger: "blur" }
],
longitude: [
{ required: true, message: "请输入经纬度", trigger: "blur" }
],
orderName: [
{ required: true, message: "请输入工单名称", trigger: "blur" }
],
appointInspector: [
{ required: true, message: "请选择巡检人员", trigger: "blur" }
],
} }
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getDicts("t_trouble_type").then(response => {
this.typeOptions = response.data;
});
this.getDicts("t_trouble_level").then(response => {
this.levelOptions = response.data;
});
}, },
methods: { methods: {
/** 查询隐患信息列表 */ /** 查询隐患信息列表 */
...@@ -233,25 +385,96 @@ export default { ...@@ -233,25 +385,96 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 详细信息跳转 */
showDetail(row) {
this.$router.push({
path: '/riskManagement/hiddenTroubleDetail',
query:{
troubleId : row.troubleId
}
})
},
getFileInfo(res){
this.form1.pictureUrl = res.url;
},
listRemove(e) {
this.form1.pictureUrl = "";
this.fileList = [];
},
confirmFun(res) {
//确认选择经纬度
this.form1.longitude = res.lng;
this.form1.latitude = res.lat;
},
MapdialogFun() {
this.loadmap = true;
this.dialogTableVisible = true;
},
dialogcancelFun() {
this.loadmap = false;
this.dialogTableVisible = false;
},
handleChange(value) {
console.log(this.form1.device);
let arr = this.form1.device;
this.form1.deviceType = arr[0];
this.form1.deviceId = arr[1];
},
getUserList(){
this.loading = true;
allListUser().then(response => {
this.userList = response.data;
this.loading = false;
});
},
getInspectorList(){
this.loading = true;
inspectorList().then(response => {
this.inspector = response.data;
this.loading = false;
});
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open1 = false;
this.open2 = false;
this.fileList = [];
this.reset(); this.reset();
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form1 = {
troubleId: null, troubleId: null,
troubleType: null,
deviceId: null, deviceId: null,
troubleLevel: null,
orderId: null, orderId: null,
longitude: null, longitude: null,
device: null,
deviceType: null,
latitude: null, latitude: null,
dealStatus: "0", dealStatus: null,
updateTime: null,
address: null,
createTime: null,
remarks: null,
pictureUrl: null,
reportMan: null
};
this.resetForm("form1");
this.form2 = {
troubleId: null,
troubleName: null,
troubleType: null,
troubleLevel: null,
orderId: null,
orderName: null,
appointInspector: null,
updateTime: null, updateTime: null,
createTime: null, createTime: null,
remarks: null remarks: null
}; };
this.resetForm("form"); this.resetForm("form2");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
...@@ -272,68 +495,96 @@ export default { ...@@ -272,68 +495,96 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.getUserList();
this.title = "添加隐患信息"; deviceNodeTree().then(response => {
this.options = response.data;
this.open1 = true;
this.title1 = "新增隐患信息";
});
},
/** 下发按钮操作 */
handleIssue(row) {
this.reset();
this.getInspectorList();
const troubleId = row.troubleId || this.ids
getHiddenTrouble(troubleId).then(response => {
this.form2 = response.data;
this.form2.remarks = "";
this.open2 = true;
this.title2 = "填写工单信息";
});
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.getUserList();
deviceNodeTree().then(response => {
this.options = response.data;
});
const troubleId = row.troubleId || this.ids const troubleId = row.troubleId || this.ids
getHiddenTrouble(troubleId).then(response => { getHiddenTrouble(troubleId).then(response => {
this.form = response.data; this.form1 = response.data;
this.open = true; if(this.form1.deviceType != null && this.form1.deviceId != null){
this.title = "修改隐患信息"; this.form1.device = [this.form1.deviceType, this.form1.deviceId];
}
this.open1 = true;
this.title1 = "修改隐患信息";
if (this.form1.pictureUrl) {
this.fileList.push({
url: this.form1.pictureUrl,
});
}
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm1() {
this.$refs["form"].validate(valid => { this.$refs["form1"].validate(valid => {
if (valid) { if (valid) {
if (this.form.troubleId != null) { if (this.form1.troubleId != null) {
updateHiddenTrouble(this.form).then(response => { updateHiddenTrouble(this.form1).then(response => {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open1 = false;
this.getList(); this.getList();
}); });
} else { } else {
addHiddenTrouble(this.form).then(response => { addHiddenTrouble(this.form1).then(response => {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open1 = false;
this.getList(); this.getList();
}); });
} }
} }
}); });
}, },
/** 删除按钮操作 */ /** 生成工单提交按钮 */
handleDelete(row) { submitForm2() {
const troubleIds = row.troubleId || this.ids; this.$refs["form2"].validate(valid => {
this.$confirm('是否确认删除隐患信息编号为"' + troubleIds + '"的数据项?', "警告", { if (valid) {
confirmButtonText: "确定", this.form2.resourceId = this.form2.troubleId;
cancelButtonText: "取消", this.form2.orderType = "2";
type: "warning" addBasicsInfo(this.form2).then(response => {
}).then(function() { this.msgSuccess("生成工单成功");
return delHiddenTrouble(troubleIds); this.open2 = false;
}).then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); });
}).catch(() => {}); }
});
}, },
/** 导出按钮操作 */ /** 作废按钮操作 */
handleExport() { handleIsDel(row) {
const queryParams = this.queryParams; row.isDel = "1";
this.$confirm('是否确认导出所有隐患信息数据项?', "警告", { this.$confirm('是否确认作废隐患名称为"' + row.troubleName + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function () {
return updateHiddenTrouble(row);
}).then(() => { }).then(() => {
this.exportLoading = true; this.getList();
return exportHiddenTrouble(queryParams); this.msgSuccess("已作废");
}).then(response => { }).catch(() => {
this.download(response.msg); });
this.exportLoading = false; },
}).catch(() => {});
}
} }
}; };
</script> </script>
<template>
<div class="app-container detail" style="background-color: rgb(238, 241, 245);">
<!-- 巡检计划信息 -->
<div style="padding-top: 10px;background: #fff;height: 100%;">
<el-row>
<el-col :span="24" style="padding-left: 15px;">
<div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button>
<div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png" style="width: 25px;" alt=""></div>
</div>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row style="width: 100%;">
<el-col :span="24">
<div style="color: #31EAEA;height: 25px;">
<ul><li>详细信息</li></ul>
</div>
</el-col>
</el-row>
<el-row style="width: 100%;padding: 10px;padding-left: 40px;">
<el-col :span="12">
<el-col :span="12">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="width: 100%;margin-left: 25px;margin-bottom: 25px;">
<el-form-item label="隐患名称:" prop="troubleName">
<font>{{form.troubleName}}</font>
</el-form-item>
<el-form-item label="隐患类型:" prop="troubleType">
<font>{{form.troubleType}}</font>
</el-form-item>
<el-form-item label="隐患等级:" prop="troubleLevel">
<font>{{form.troubleLevel}}</font>
</el-form-item>
<el-form-item label="隐患描述:" prop="remarks">
<div style="height: 90px;width: 200%; border: 1px solid rgb(187, 183, 183);margin-top: 10px;overflow-y: auto;padding: 5px;border-radius: 5px;">
<font>{{form.remarks}}</font>
</div>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="width: 100%;">
<el-form-item label="上报人:" prop="reportManName">
<font>{{form.reportManName}}</font>
</el-form-item>
<el-form-item label="上报时间:" prop="createTime">
<font>{{form.createTime}}</font>
</el-form-item>
<el-form-item label="处理状态:" prop="dealStatus">
<span v-if="form.orderId == null || form.orderId == ''">未生成工单</span>
<span v-if="(form.dealStatus == null || form.dealStatus == '') &&
form.orderId != null && form.orderId != ''">暂未处理</span>
<span v-if="form.dealStatus == 1">不需处理</span>
<span v-if="form.dealStatus == 2">已处理完成</span>
<span v-if="form.dealStatus == 3">未处理完成</span>
</el-form-item>
</el-form>
</el-col>
</el-col>
<el-col :span="12" >
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" >
<el-form-item label="照片:" prop="pictureUrl">
<el-image :src="form.pictureUrl" :preview-src-list="[form.pictureUrl]" style="width: 300px;height: 300px;"></el-image>
</el-form-item>
</el-form>
</el-col>
</el-row>
<!-- 接单信息 -->
<el-row v-if="form.orderId != null && form.orderId != ''">
<el-divider></el-divider>
<el-col :span="24">
<div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li>接单信息</li></ul>
</div>
</el-col>
<el-col :span="5" style="margin-left: 50px;">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="下发人员:" prop="appointInspectorName">
<font>{{form.appointInspectorName}}</font>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="下发时间:" prop="allotTime">
<font>{{form.allotTime}}</font>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="工单编号:" prop="orderId">
<template slot-scope="scope">
<el-button type="text" @click="showDetail(form.orderId)">{{form.orderId}}</el-button>
</template>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-divider></el-divider>
<!-- 处置信息 -->
<div style="width: 100%;font-weight: 600;" v-if="form.feedbackList != null">
<div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li>处置信息</li></ul>
</div>
<div class="block" style="width: 95%;margin-left: 2%;">
<el-timeline ref="timeline">
<el-timeline-item v-for="(activity, index) in form.feedbackList" v-show='index>1?false:true' :key="index" :timestamp="activity.feedbackTime">
<el-card>
<el-row>
<el-col :span="6">
<p>处置人:
<span>{{form.appointInspectorName}}</span>
</p>
<p>处置时间:
<span>{{activity.feedbackTime}}</span>
</p>
<div style="width: 600px;">
<p>处置内容:
<span>{{activity.contents}}</span>
</p>
</div>
</el-col>
<el-col :span="6">
<p>是否有隐患:
<span v-if="activity.isHiddenDanger == 1"></span>
<span v-if="activity.isHiddenDanger == 2"></span>
</p>
<p v-if="activity.isHiddenDanger == 1">处理状态:
<span v-if="activity.dealStatus == 1">不需要处理</span>
<span v-if="activity.dealStatus == 2">已处理完成</span>
<span v-if="activity.dealStatus == 3">未处理完成</span>
</p>
</el-col>
<el-col :span="12">
<div class="feedbackTime-div">
<div class="feedbackTime">
<el-image :src="activity.pictureUrl1" :preview-src-list="[activity.pictureUrl1]" v-if="activity.pictureUrl1 != null && activity.pictureUrl1 != ''" style="width: 90px;"></el-image>
</div>
<div class="feedbackTime">
<el-image :src="activity.pictureUrl2" :preview-src-list="[activity.pictureUrl2]" v-if="activity.pictureUrl2 != null && activity.pictureUrl2 != ''" style="width: 90px;"></el-image>
</div>
<div class="feedbackTime">
<el-image :src="activity.pictureUrl3" :preview-src-list="[activity.pictureUrl3]" v-if="activity.pictureUrl3 != null && activity.pictureUrl3 != ''" style="width: 90px;"></el-image>
</div>
</div>
</el-col>
</el-row>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<div style="width: 95%;position: relative;" @click="changeDisplay(scope)">
<i class="el-icon-arrow-down" v-if="isDisplay==false" style="margin-left: 100px;color: #909399;font-size: 14px;">
<span style="text-decoration:underline">显示全部</span>
</i>
<i class="el-icon-arrow-up" v-else style="color: #909399;font-size: 14px;margin-left: 100px;">
<span style="text-decoration:underline">收起</span>
</i>
</div>
</div>
</div>
</div>
</template>
<script>
import { getHiddenTrouble } from "@/api/riskManagement/hiddenTrouble";
export default {
name: "HiddenTroubleDetail",
components: {
},
data() {
return {
troubleId: '',
isDisplay:false,
showAndHide : false,
form: { },
rules: { },
};
},
created() {
// 如果是跳转来的,则接受初始化参数
this.troubleId = this.$route.query.troubleId;
this.getDetail();
},
methods: {
/** 获取隐患信息详情 */
getDetail (){
getHiddenTrouble(this.troubleId).then(response =>{
this.form = response.data;
console.log("this.form",this.form)
});
},
/** 详细信息跳转 */
showDetail(orderId) {
this.$router.push({
path: '/workOrder/detail',
query:{
orderId : orderId
}
})
},
// 点击按钮显示隐藏
changeDisplay(e) {
this.isDisplay = !this.isDisplay
let $timeline = this.$refs.timeline;
if (!this.showAndHide) {
for (let i = 0; i < $timeline.$children.length; i++) {
if (i > 1) {
$timeline.$children[i].$el.style.display = "block";
}
}
this.showAndHide = true;
} else {
for (let i = 0; i < $timeline.$children.length; i++) {
if (i > 1) {
$timeline.$children[i].$el.style.display = "none";
}
}
this.showAndHide = false;
}
},
}
}
</script>
<style>
.el-tree-node__content{
width: 150px;
}
.el-divider--horizontal {
display: block;
height: 1px;
width: 100%;
margin: 20px 0;
}
.feedbackTime-div{
float: left;margin-left: 150px;margin-top: 10px;
}
.feedbackTime{
height: 120px;
width: 120px;
float: left;
margin-left: 15px;
margin-top: 5px;
margin-bottom: 15px;
display: flex;
justify-content: center;
align-items: center;
}
.el-card__body {
padding: 5px 20px 20px 20px;
}
.detail .el-form{
width: 20%;
}
.detail .el-form-item{
margin-bottom: 0px;
}
.el-tree{
margin-top: 5px;
}
.avatar-uploader{
width: 25%;
float: left;
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
.avatar {
width: 178px;
height: 178px;
display: block;
}
li{
font-size: 15px;
font-weight: 900;
}
</style>
...@@ -263,7 +263,6 @@ ...@@ -263,7 +263,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <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