Commit 96ad431d authored by zhangjianqian's avatar zhangjianqian

应急处置

parent 34114d97
package com.zehong.system.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TEmergencyDevice;
import com.zehong.system.service.ITEmergencyDeviceService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 应急设备Controller
*
* @author zehong
* @date 2022-03-17
*/
@RestController
@RequestMapping("/system/device")
public class TEmergencyDeviceController extends BaseController
{
@Autowired
private ITEmergencyDeviceService tEmergencyDeviceService;
/**
* 查询应急设备列表
*/
@GetMapping("/list")
public TableDataInfo list(TEmergencyDevice tEmergencyDevice)
{
startPage();
List<TEmergencyDevice> list = tEmergencyDeviceService.selectTEmergencyDeviceList(tEmergencyDevice);
return getDataTable(list);
}
/**
* 导出应急设备列表
*/
@Log(title = "应急设备", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEmergencyDevice tEmergencyDevice)
{
List<TEmergencyDevice> list = tEmergencyDeviceService.selectTEmergencyDeviceList(tEmergencyDevice);
ExcelUtil<TEmergencyDevice> util = new ExcelUtil<TEmergencyDevice>(TEmergencyDevice.class);
return util.exportExcel(list, "应急设备数据");
}
/**
* 获取应急设备详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(tEmergencyDeviceService.selectTEmergencyDeviceById(id));
}
/**
* 新增应急设备
*/
@Log(title = "应急设备", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEmergencyDevice tEmergencyDevice)
{
return toAjax(tEmergencyDeviceService.insertTEmergencyDevice(tEmergencyDevice));
}
/**
* 修改应急设备
*/
@Log(title = "应急设备", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEmergencyDevice tEmergencyDevice)
{
return toAjax(tEmergencyDeviceService.updateTEmergencyDevice(tEmergencyDevice));
}
/**
* 删除应急设备
*/
@Log(title = "应急设备", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(tEmergencyDeviceService.deleteTEmergencyDeviceByIds(ids));
}
}
package com.zehong.system.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TEventHandle;
import com.zehong.system.service.ITEventHandleService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 事件处置Controller
*
* @author zehong
* @date 2022-03-19
*/
@RestController
@RequestMapping("/system/handle")
public class TEventHandleController extends BaseController
{
@Autowired
private ITEventHandleService tEventHandleService;
/**
* 查询事件处置列表
*/
//@PreAuthorize("@ss.hasPermi('system:handle:list')")
@GetMapping("/list")
public TableDataInfo list(TEventHandle tEventHandle)
{
startPage();
List<TEventHandle> list = tEventHandleService.selectTEventHandleList(tEventHandle);
return getDataTable(list);
}
/**
* 导出事件处置列表
*/
//@PreAuthorize("@ss.hasPermi('system:handle:export')")
@Log(title = "事件处置", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEventHandle tEventHandle)
{
List<TEventHandle> list = tEventHandleService.selectTEventHandleList(tEventHandle);
ExcelUtil<TEventHandle> util = new ExcelUtil<TEventHandle>(TEventHandle.class);
return util.exportExcel(list, "事件处置数据");
}
/**
* 获取事件处置详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:handle:query')")
@GetMapping(value = "/{handleId}")
public AjaxResult getInfo(@PathVariable("handleId") Long handleId)
{
return AjaxResult.success(tEventHandleService.selectTEventHandleById(handleId));
}
/**
* 新增事件处置
*/
//@PreAuthorize("@ss.hasPermi('system:handle:add')")
@Log(title = "事件处置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEventHandle tEventHandle)
{
return toAjax(tEventHandleService.insertTEventHandle(tEventHandle));
}
/**
* 修改事件处置
*/
//@PreAuthorize("@ss.hasPermi('system:handle:edit')")
@Log(title = "事件处置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEventHandle tEventHandle)
{
return toAjax(tEventHandleService.updateTEventHandle(tEventHandle));
}
/**
* 删除事件处置
*/
//@PreAuthorize("@ss.hasPermi('system:handle:remove')")
@Log(title = "事件处置", businessType = BusinessType.DELETE)
@DeleteMapping("/{handleIds}")
public AjaxResult remove(@PathVariable Long[] handleIds)
{
return toAjax(tEventHandleService.deleteTEventHandleByIds(handleIds));
}
}
package com.zehong.system.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TEventReceive;
import com.zehong.system.service.ITEventReceiveService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 事件接报Controller
*
* @author zehong
* @date 2022-03-18
*/
@RestController
@RequestMapping("/system/receive")
public class TEventReceiveController extends BaseController
{
@Autowired
private ITEventReceiveService tEventReceiveService;
/**
* 查询事件接报列表
*/
//@PreAuthorize("@ss.hasPermi('system:receive:list')")
@GetMapping("/list")
public TableDataInfo list(TEventReceive tEventReceive)
{
startPage();
List<TEventReceive> list = tEventReceiveService.selectTEventReceiveList(tEventReceive);
return getDataTable(list);
}
/**
* 导出事件接报列表
*/
//@PreAuthorize("@ss.hasPermi('system:receive:export')")
@Log(title = "事件接报", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEventReceive tEventReceive)
{
List<TEventReceive> list = tEventReceiveService.selectTEventReceiveList(tEventReceive);
ExcelUtil<TEventReceive> util = new ExcelUtil<TEventReceive>(TEventReceive.class);
return util.exportExcel(list, "事件接报数据");
}
/**
* 获取事件接报详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:receive:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(tEventReceiveService.selectTEventReceiveById(id));
}
/**
* 新增事件接报
*/
//@PreAuthorize("@ss.hasPermi('system:receive:add')")
@Log(title = "事件接报", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEventReceive tEventReceive)
{
return toAjax(tEventReceiveService.insertTEventReceive(tEventReceive));
}
/**
* 修改事件接报
*/
//@PreAuthorize("@ss.hasPermi('system:receive:edit')")
@Log(title = "事件接报", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEventReceive tEventReceive)
{
return toAjax(tEventReceiveService.updateTEventReceive(tEventReceive));
}
/**
* 删除事件接报
*/
//@PreAuthorize("@ss.hasPermi('system:receive:remove')")
@Log(title = "事件接报", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(tEventReceiveService.deleteTEventReceiveByIds(ids));
}
}
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 应急设备对象 t_emergency_device
*
* @author zehong
* @date 2022-03-17
*/
public class TEmergencyDevice extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private String id;
/** 1救援队伍 2救援物资 3救援车辆 4医院 */
@Excel(name = "1救援队伍 2救援物资 3救援车辆 4医院")
private Integer deviceType;
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
/** 经度 */
@Excel(name = "经度")
private String longitude;
/** 纬度 */
@Excel(name = "纬度")
private String latitude;
/** 详细地址 */
@Excel(name = "详细地址")
private String address;
/** 0未删除 1已删除 */
private Integer isDel;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setDeviceType(Integer deviceType)
{
this.deviceType = deviceType;
}
public Integer getDeviceType()
{
return deviceType;
}
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
{
return deviceName;
}
public void setLongitude(String longitude)
{
this.longitude = longitude;
}
public String getLongitude()
{
return longitude;
}
public void setLatitude(String latitude)
{
this.latitude = latitude;
}
public String getLatitude()
{
return latitude;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setIsDel(Integer isDel)
{
this.isDel = isDel;
}
public Integer getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceType", getDeviceType())
.append("deviceName", getDeviceName())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("address", getAddress())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.toString();
}
}
package com.zehong.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 事件处置对象 t_event_handle
*
* @author zehong
* @date 2022-03-19
*/
public class TEventHandle extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long handleId;
/** 事件id */
@Excel(name = "事件id")
private Long eventId;
/** 企业id */
@Excel(name = "企业id")
private Long enterpriseId;
/** 企业名称 */
@Excel(name = "企业名称")
private String enterpriseName;
/** 处置信息 */
@Excel(name = "处置信息")
private String management;
private String managementEvent;
/** 应急预案id */
@Excel(name = "应急预案id")
private Long planId;
@Excel(name = "应急预案标题")
private String planTitle;
@Excel(name = "应急预案附件地址")
private String planUrl;
/** 指导意见 */
@Excel(name = "指导意见")
private String guidanceOpinion;
/** 指导时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "指导时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date guidanceTime;
/** 0未删除 1已删除 */
private Integer isDel;
public String getPlanTitle() {
return planTitle;
}
public void setPlanTitle(String planTitle) {
this.planTitle = planTitle;
}
public String getPlanUrl() {
return planUrl;
}
public void setPlanUrl(String planUrl) {
this.planUrl = planUrl;
}
public String getManagementEvent() {
return managementEvent;
}
public void setManagementEvent(String managementEvent) {
this.managementEvent = managementEvent;
}
public void setHandleId(Long handleId)
{
this.handleId = handleId;
}
public Long getHandleId()
{
return handleId;
}
public void setEventId(Long eventId)
{
this.eventId = eventId;
}
public Long getEventId()
{
return eventId;
}
public void setEnterpriseId(Long enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public Long getEnterpriseId()
{
return enterpriseId;
}
public void setEnterpriseName(String enterpriseName)
{
this.enterpriseName = enterpriseName;
}
public String getEnterpriseName()
{
return enterpriseName;
}
public void setManagement(String management)
{
this.management = management;
}
public String getManagement()
{
return management;
}
public void setPlanId(Long planId)
{
this.planId = planId;
}
public Long getPlanId()
{
return planId;
}
public void setGuidanceOpinion(String guidanceOpinion)
{
this.guidanceOpinion = guidanceOpinion;
}
public String getGuidanceOpinion()
{
return guidanceOpinion;
}
public void setGuidanceTime(Date guidanceTime)
{
this.guidanceTime = guidanceTime;
}
public Date getGuidanceTime()
{
return guidanceTime;
}
public void setIsDel(Integer isDel)
{
this.isDel = isDel;
}
public Integer getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("handleId", getHandleId())
.append("eventId", getEventId())
.append("enterpriseId", getEnterpriseId())
.append("enterpriseName", getEnterpriseName())
.append("management", getManagement())
.append("planId", getPlanId())
.append("guidanceOpinion", getGuidanceOpinion())
.append("guidanceTime", getGuidanceTime())
.append("isDel", getIsDel())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 事件接报对象 t_event_receive
*
* @author zehong
* @date 2022-03-18
*/
public class TEventReceive extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Integer id;
/** 事件名称 */
@Excel(name = "事件名称")
private String eventName;
/** 事件类型 1水灾 2火灾 3突发 */
@Excel(name = "事件类型 1水灾 2火灾 3突发")
private Integer eventType;
/** 事件等级 1级 2级 3级 */
@Excel(name = "事件等级 1级 2级 3级")
private Integer eventGrade;
/** 事发地点 */
@Excel(name = "事发地点")
private String address;
/** 经度 */
private String longitude;
/** 纬度 */
private String latitude;
/** 报案人 */
@Excel(name = "报案人")
private String informant;
/** 报案时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "报案时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date inforTime;
/** 报案人电话 */
@Excel(name = "报案人电话")
private String informantPhone;
/** 事件描述 */
@Excel(name = "事件描述")
private String describe;
/** 指派公司id */
@Excel(name = "指派公司id")
private String enterpriseId;
/** 指派公司名称 */
@Excel(name = "指派公司名称")
private String enterpriseName;
/** 备注 */
private String remarks;
/** 0未删除 1已删除 */
private Integer isDel;
@Excel(name = "状态")
private Integer status;
public void setId(Integer id)
{
this.id = id;
}
public Integer getId()
{
return id;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public void setEventName(String eventName)
{
this.eventName = eventName;
}
public String getEventName()
{
return eventName;
}
public void setEventType(Integer eventType)
{
this.eventType = eventType;
}
public Integer getEventType()
{
return eventType;
}
public void setEventGrade(Integer eventGrade)
{
this.eventGrade = eventGrade;
}
public Integer getEventGrade()
{
return eventGrade;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setLongitude(String longitude)
{
this.longitude = longitude;
}
public String getLongitude()
{
return longitude;
}
public void setLatitude(String latitude)
{
this.latitude = latitude;
}
public String getLatitude()
{
return latitude;
}
public void setInformant(String informant)
{
this.informant = informant;
}
public String getInformant()
{
return informant;
}
public void setInforTime(Date inforTime)
{
this.inforTime = inforTime;
}
public Date getInforTime()
{
return inforTime;
}
public void setInformantPhone(String informantPhone)
{
this.informantPhone = informantPhone;
}
public String getInformantPhone()
{
return informantPhone;
}
public void setDescribe(String describe)
{
this.describe = describe;
}
public String getDescribe()
{
return describe;
}
public void setEnterpriseId(String enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public String getEnterpriseId()
{
return enterpriseId;
}
public void setEnterpriseName(String enterpriseName)
{
this.enterpriseName = enterpriseName;
}
public String getEnterpriseName()
{
return enterpriseName;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
public void setIsDel(Integer isDel)
{
this.isDel = isDel;
}
public Integer getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("eventName", getEventName())
.append("eventType", getEventType())
.append("eventGrade", getEventGrade())
.append("address", getAddress())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("informant", getInformant())
.append("inforTime", getInforTime())
.append("informantPhone", getInformantPhone())
.append("describe", getDescribe())
.append("enterpriseId", getEnterpriseId())
.append("enterpriseName", getEnterpriseName())
.append("remarks", getRemarks())
.append("isDel", getIsDel())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TEmergencyDevice;
/**
* 应急设备Mapper接口
*
* @author zehong
* @date 2022-03-17
*/
public interface TEmergencyDeviceMapper
{
/**
* 查询应急设备
*
* @param id 应急设备ID
* @return 应急设备
*/
public TEmergencyDevice selectTEmergencyDeviceById(String id);
/**
* 查询应急设备列表
*
* @param tEmergencyDevice 应急设备
* @return 应急设备集合
*/
public List<TEmergencyDevice> selectTEmergencyDeviceList(TEmergencyDevice tEmergencyDevice);
/**
* 新增应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
public int insertTEmergencyDevice(TEmergencyDevice tEmergencyDevice);
/**
* 修改应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
public int updateTEmergencyDevice(TEmergencyDevice tEmergencyDevice);
/**
* 删除应急设备
*
* @param id 应急设备ID
* @return 结果
*/
public int deleteTEmergencyDeviceById(String id);
/**
* 批量删除应急设备
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTEmergencyDeviceByIds(String[] ids);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TEventHandle;
/**
* 事件处置Mapper接口
*
* @author zehong
* @date 2022-03-19
*/
public interface TEventHandleMapper
{
/**
* 查询事件处置
*
* @param handleId 事件处置ID
* @return 事件处置
*/
public TEventHandle selectTEventHandleById(Long handleId);
/**
* 查询事件处置列表
*
* @param tEventHandle 事件处置
* @return 事件处置集合
*/
public List<TEventHandle> selectTEventHandleList(TEventHandle tEventHandle);
/**
* 新增事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
public int insertTEventHandle(TEventHandle tEventHandle);
/**
* 修改事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
public int updateTEventHandle(TEventHandle tEventHandle);
/**
* 删除事件处置
*
* @param handleId 事件处置ID
* @return 结果
*/
public int deleteTEventHandleById(Long handleId);
/**
* 批量删除事件处置
*
* @param handleIds 需要删除的数据ID
* @return 结果
*/
public int deleteTEventHandleByIds(Long[] handleIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TEventReceive;
/**
* 事件接报Mapper接口
*
* @author zehong
* @date 2022-03-18
*/
public interface TEventReceiveMapper
{
/**
* 查询事件接报
*
* @param id 事件接报ID
* @return 事件接报
*/
public TEventReceive selectTEventReceiveById(String id);
/**
* 查询事件接报列表
*
* @param tEventReceive 事件接报
* @return 事件接报集合
*/
public List<TEventReceive> selectTEventReceiveList(TEventReceive tEventReceive);
/**
* 新增事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
public int insertTEventReceive(TEventReceive tEventReceive);
/**
* 修改事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
public int updateTEventReceive(TEventReceive tEventReceive);
/**
* 删除事件接报
*
* @param id 事件接报ID
* @return 结果
*/
public int deleteTEventReceiveById(String id);
/**
* 批量删除事件接报
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTEventReceiveByIds(String[] ids);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TEmergencyDevice;
/**
* 应急设备Service接口
*
* @author zehong
* @date 2022-03-17
*/
public interface ITEmergencyDeviceService
{
/**
* 查询应急设备
*
* @param id 应急设备ID
* @return 应急设备
*/
public TEmergencyDevice selectTEmergencyDeviceById(String id);
/**
* 查询应急设备列表
*
* @param tEmergencyDevice 应急设备
* @return 应急设备集合
*/
public List<TEmergencyDevice> selectTEmergencyDeviceList(TEmergencyDevice tEmergencyDevice);
/**
* 新增应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
public int insertTEmergencyDevice(TEmergencyDevice tEmergencyDevice);
/**
* 修改应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
public int updateTEmergencyDevice(TEmergencyDevice tEmergencyDevice);
/**
* 批量删除应急设备
*
* @param ids 需要删除的应急设备ID
* @return 结果
*/
public int deleteTEmergencyDeviceByIds(String[] ids);
/**
* 删除应急设备信息
*
* @param id 应急设备ID
* @return 结果
*/
public int deleteTEmergencyDeviceById(String id);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TEventHandle;
/**
* 事件处置Service接口
*
* @author zehong
* @date 2022-03-19
*/
public interface ITEventHandleService
{
/**
* 查询事件处置
*
* @param handleId 事件处置ID
* @return 事件处置
*/
public TEventHandle selectTEventHandleById(Long handleId);
/**
* 查询事件处置列表
*
* @param tEventHandle 事件处置
* @return 事件处置集合
*/
public List<TEventHandle> selectTEventHandleList(TEventHandle tEventHandle);
/**
* 新增事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
public int insertTEventHandle(TEventHandle tEventHandle);
/**
* 修改事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
public int updateTEventHandle(TEventHandle tEventHandle);
/**
* 批量删除事件处置
*
* @param handleIds 需要删除的事件处置ID
* @return 结果
*/
public int deleteTEventHandleByIds(Long[] handleIds);
/**
* 删除事件处置信息
*
* @param handleId 事件处置ID
* @return 结果
*/
public int deleteTEventHandleById(Long handleId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TEventReceive;
/**
* 事件接报Service接口
*
* @author zehong
* @date 2022-03-18
*/
public interface ITEventReceiveService
{
/**
* 查询事件接报
*
* @param id 事件接报ID
* @return 事件接报
*/
public TEventReceive selectTEventReceiveById(String id);
/**
* 查询事件接报列表
*
* @param tEventReceive 事件接报
* @return 事件接报集合
*/
public List<TEventReceive> selectTEventReceiveList(TEventReceive tEventReceive);
/**
* 新增事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
public int insertTEventReceive(TEventReceive tEventReceive);
/**
* 修改事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
public int updateTEventReceive(TEventReceive tEventReceive);
/**
* 批量删除事件接报
*
* @param ids 需要删除的事件接报ID
* @return 结果
*/
public int deleteTEventReceiveByIds(String[] ids);
/**
* 删除事件接报信息
*
* @param id 事件接报ID
* @return 结果
*/
public int deleteTEventReceiveById(String id);
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TEmergencyDeviceMapper;
import com.zehong.system.domain.TEmergencyDevice;
import com.zehong.system.service.ITEmergencyDeviceService;
/**
* 应急设备Service业务层处理
*
* @author zehong
* @date 2022-03-17
*/
@Service
public class TEmergencyDeviceServiceImpl implements ITEmergencyDeviceService
{
@Autowired
private TEmergencyDeviceMapper tEmergencyDeviceMapper;
/**
* 查询应急设备
*
* @param id 应急设备ID
* @return 应急设备
*/
@Override
public TEmergencyDevice selectTEmergencyDeviceById(String id)
{
return tEmergencyDeviceMapper.selectTEmergencyDeviceById(id);
}
/**
* 查询应急设备列表
*
* @param tEmergencyDevice 应急设备
* @return 应急设备
*/
@Override
public List<TEmergencyDevice> selectTEmergencyDeviceList(TEmergencyDevice tEmergencyDevice)
{
return tEmergencyDeviceMapper.selectTEmergencyDeviceList(tEmergencyDevice);
}
/**
* 新增应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
@Override
public int insertTEmergencyDevice(TEmergencyDevice tEmergencyDevice)
{
tEmergencyDevice.setCreateTime(DateUtils.getNowDate());
return tEmergencyDeviceMapper.insertTEmergencyDevice(tEmergencyDevice);
}
/**
* 修改应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
@Override
public int updateTEmergencyDevice(TEmergencyDevice tEmergencyDevice)
{
tEmergencyDevice.setUpdateTime(DateUtils.getNowDate());
return tEmergencyDeviceMapper.updateTEmergencyDevice(tEmergencyDevice);
}
/**
* 批量删除应急设备
*
* @param ids 需要删除的应急设备ID
* @return 结果
*/
@Override
public int deleteTEmergencyDeviceByIds(String[] ids)
{
return tEmergencyDeviceMapper.deleteTEmergencyDeviceByIds(ids);
}
/**
* 删除应急设备信息
*
* @param id 应急设备ID
* @return 结果
*/
@Override
public int deleteTEmergencyDeviceById(String id)
{
return tEmergencyDeviceMapper.deleteTEmergencyDeviceById(id);
}
}
package com.zehong.system.service.impl;
import java.util.Date;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TEventHandleMapper;
import com.zehong.system.domain.TEventHandle;
import com.zehong.system.service.ITEventHandleService;
/**
* 事件处置Service业务层处理
*
* @author zehong
* @date 2022-03-19
*/
@Service
public class TEventHandleServiceImpl implements ITEventHandleService
{
@Autowired
private TEventHandleMapper tEventHandleMapper;
/**
* 查询事件处置
*
* @param handleId 事件处置ID
* @return 事件处置
*/
@Override
public TEventHandle selectTEventHandleById(Long handleId)
{
return tEventHandleMapper.selectTEventHandleById(handleId);
}
/**
* 查询事件处置列表
*
* @param tEventHandle 事件处置
* @return 事件处置
*/
@Override
public List<TEventHandle> selectTEventHandleList(TEventHandle tEventHandle)
{
return tEventHandleMapper.selectTEventHandleList(tEventHandle);
}
/**
* 新增事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
@Override
public int insertTEventHandle(TEventHandle tEventHandle)
{
tEventHandle.setCreateTime(DateUtils.getNowDate());
return tEventHandleMapper.insertTEventHandle(tEventHandle);
}
/**
* 修改事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
@Override
public int updateTEventHandle(TEventHandle tEventHandle)
{
tEventHandle.setGuidanceTime(new Date());
return tEventHandleMapper.updateTEventHandle(tEventHandle);
}
/**
* 批量删除事件处置
*
* @param handleIds 需要删除的事件处置ID
* @return 结果
*/
@Override
public int deleteTEventHandleByIds(Long[] handleIds)
{
return tEventHandleMapper.deleteTEventHandleByIds(handleIds);
}
/**
* 删除事件处置信息
*
* @param handleId 事件处置ID
* @return 结果
*/
@Override
public int deleteTEventHandleById(Long handleId)
{
return tEventHandleMapper.deleteTEventHandleById(handleId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TEventReceiveMapper;
import com.zehong.system.domain.TEventReceive;
import com.zehong.system.service.ITEventReceiveService;
/**
* 事件接报Service业务层处理
*
* @author zehong
* @date 2022-03-18
*/
@Service
public class TEventReceiveServiceImpl implements ITEventReceiveService
{
@Autowired
private TEventReceiveMapper tEventReceiveMapper;
/**
* 查询事件接报
*
* @param id 事件接报ID
* @return 事件接报
*/
@Override
public TEventReceive selectTEventReceiveById(String id)
{
return tEventReceiveMapper.selectTEventReceiveById(id);
}
/**
* 查询事件接报列表
*
* @param tEventReceive 事件接报
* @return 事件接报
*/
@Override
public List<TEventReceive> selectTEventReceiveList(TEventReceive tEventReceive)
{
return tEventReceiveMapper.selectTEventReceiveList(tEventReceive);
}
/**
* 新增事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
@Override
public int insertTEventReceive(TEventReceive tEventReceive)
{
tEventReceive.setCreateTime(DateUtils.getNowDate());
return tEventReceiveMapper.insertTEventReceive(tEventReceive);
}
/**
* 修改事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
@Override
public int updateTEventReceive(TEventReceive tEventReceive)
{
return tEventReceiveMapper.updateTEventReceive(tEventReceive);
}
/**
* 批量删除事件接报
*
* @param ids 需要删除的事件接报ID
* @return 结果
*/
@Override
public int deleteTEventReceiveByIds(String[] ids)
{
return tEventReceiveMapper.deleteTEventReceiveByIds(ids);
}
/**
* 删除事件接报信息
*
* @param id 事件接报ID
* @return 结果
*/
@Override
public int deleteTEventReceiveById(String id)
{
return tEventReceiveMapper.deleteTEventReceiveById(id);
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TEmergencyDeviceMapper">
<resultMap type="TEmergencyDevice" id="TEmergencyDeviceResult">
<result property="id" column="id" />
<result property="deviceType" column="device_type" />
<result property="deviceName" column="device_name" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="address" column="address" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
</resultMap>
<sql id="selectTEmergencyDeviceVo">
select id, device_type, device_name, longitude, latitude, address, create_time, update_time, is_del from t_emergency_device
</sql>
<select id="selectTEmergencyDeviceList" parameterType="TEmergencyDevice" resultMap="TEmergencyDeviceResult">
<include refid="selectTEmergencyDeviceVo"/>
<where>
<if test="deviceType != null "> and device_type = #{deviceType}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
</where>
</select>
<select id="selectTEmergencyDeviceById" parameterType="String" resultMap="TEmergencyDeviceResult">
<include refid="selectTEmergencyDeviceVo"/>
where id = #{id}
</select>
<insert id="insertTEmergencyDevice" parameterType="TEmergencyDevice">
insert into t_emergency_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="deviceType != null">device_type,</if>
<if test="deviceName != null">device_name,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="address != null">address,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="address != null">#{address},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if>
</trim>
</insert>
<update id="updateTEmergencyDevice" parameterType="TEmergencyDevice">
update t_emergency_device
<trim prefix="SET" suffixOverrides=",">
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="address != null">address = #{address},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTEmergencyDeviceById" parameterType="String">
delete from t_emergency_device where id = #{id}
</delete>
<delete id="deleteTEmergencyDeviceByIds" parameterType="String">
delete from t_emergency_device where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TEventHandleMapper">
<resultMap type="TEventHandle" id="TEventHandleResult">
<result property="handleId" column="handle_id" />
<result property="eventId" column="event_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="management" column="management" />
<result property="managementEvent" column="management_event" />
<result property="planId" column="plan_id" />
<result property="planTitle" column="plan_title" />
<result property="planUrl" column="plan_url" />
<result property="guidanceOpinion" column="guidance_opinion" />
<result property="guidanceTime" column="guidance_time" />
<result property="isDel" column="is_del" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTEventHandleVo">
select handle_id, event_id, enterprise_id, enterprise_name, management,management_event, plan_id,plan_title,plan_url, guidance_opinion, guidance_time, is_del, create_time from t_event_handle
</sql>
<select id="selectTEventHandleList" parameterType="TEventHandle" resultMap="TEventHandleResult">
<include refid="selectTEventHandleVo"/>
<where>
<if test="eventId != null "> and event_id = #{eventId}</if>
</where>
</select>
<select id="selectTEventHandleById" parameterType="Long" resultMap="TEventHandleResult">
<include refid="selectTEventHandleVo"/>
where handle_id = #{handleId}
</select>
<insert id="insertTEventHandle" parameterType="TEventHandle" useGeneratedKeys="true" keyProperty="handleId">
insert into t_event_handle
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="eventId != null">event_id,</if>
<if test="enterpriseId != null">enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="management != null">management,</if>
<if test="managementEvent != null">management_event,</if>
<if test="planId != null">plan_id,</if>
<if test="planTitle != null">plan_title,</if>
<if test="planUrl != null">plan_url,</if>
<if test="guidanceOpinion != null">guidance_opinion,</if>
<if test="guidanceTime != null">guidance_time,</if>
<if test="isDel != null">is_del,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="eventId != null">#{eventId},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="management != null">#{management},</if>
<if test="managementEvent != null">#{managementEvent},</if>
<if test="planId != null">#{planId},</if>
<if test="planTitle != null">#{planTitle},</if>
<if test="planUrl != null">#{planUrl},</if>
<if test="guidanceOpinion != null">#{guidanceOpinion},</if>
<if test="guidanceTime != null">#{guidanceTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTEventHandle" parameterType="TEventHandle">
update t_event_handle
<trim prefix="SET" suffixOverrides=",">
<if test="eventId != null">event_id = #{eventId},</if>
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="management != null">management = #{management},</if>
<if test="managementEvent != null">management_event = #{managementEvent},</if>
<if test="planId != null">plan_id = #{planId},</if>
<if test="planTitle != null">plan_title = #{planTitle},</if>
<if test="planUrl != null">plan_url = #{planUrl},</if>
<if test="guidanceOpinion != null">guidance_opinion = #{guidanceOpinion},</if>
<if test="guidanceTime != null">guidance_time = #{guidanceTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where handle_id = #{handleId}
</update>
<delete id="deleteTEventHandleById" parameterType="Long">
delete from t_event_handle where handle_id = #{handleId}
</delete>
<delete id="deleteTEventHandleByIds" parameterType="String">
delete from t_event_handle where handle_id in
<foreach item="handleId" collection="array" open="(" separator="," close=")">
#{handleId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TEventReceiveMapper">
<resultMap type="TEventReceive" id="TEventReceiveResult">
<result property="id" column="id" />
<result property="eventName" column="event_name" />
<result property="eventType" column="event_type" />
<result property="eventGrade" column="event_grade" />
<result property="address" column="address" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="informant" column="informant" />
<result property="inforTime" column="infor_time" />
<result property="informantPhone" column="informant_phone" />
<result property="describe" column="describe" />
<result property="status" column="status" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="remarks" column="remarks" />
<result property="isDel" column="is_del" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTEventReceiveVo">
select id, event_name, event_type, event_grade, address, longitude, latitude, informant, infor_time, informant_phone, `describe`, `status`,enterprise_id, enterprise_name, remarks, is_del, create_time from t_event_receive
</sql>
<select id="selectTEventReceiveList" parameterType="TEventReceive" resultMap="TEventReceiveResult">
<include refid="selectTEventReceiveVo"/>
<where>
<if test="eventName != null and eventName != ''"> and event_name like concat('%', #{eventName}, '%')</if>
<if test="eventType != null "> and event_type = #{eventType}</if>
<if test="eventGrade != null "> and event_grade = #{eventGrade}</if>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
<if test="status != null and status!=5"> and status = #{status}</if>
<if test="status ==5"> and status !=4 </if>
and is_del = 0
</where>
order by infor_time
</select>
<select id="selectTEventReceiveById" parameterType="String" resultMap="TEventReceiveResult">
<include refid="selectTEventReceiveVo"/>
where id = #{id}
</select>
<insert id="insertTEventReceive" parameterType="TEventReceive">
insert into t_event_receive
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="eventName != null">event_name,</if>
<if test="eventType != null">event_type,</if>
<if test="eventGrade != null">event_grade,</if>
<if test="address != null">address,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="informant != null">informant,</if>
<if test="inforTime != null">infor_time,</if>
<if test="informantPhone != null">informant_phone,</if>
<if test="describe != null">`describe`,</if>
<if test="status != null">`status`,</if>
<if test="enterpriseId != null">enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="remarks != null">remarks,</if>
<if test="isDel != null">is_del,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="eventName != null">#{eventName},</if>
<if test="eventType != null">#{eventType},</if>
<if test="eventGrade != null">#{eventGrade},</if>
<if test="address != null">#{address},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="informant != null">#{informant},</if>
<if test="inforTime != null">#{inforTime},</if>
<if test="informantPhone != null">#{informantPhone},</if>
<if test="describe != null">#{describe},</if>
<if test="status != null">#{status},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="remarks != null">#{remarks},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTEventReceive" parameterType="TEventReceive">
update t_event_receive
<trim prefix="SET" suffixOverrides=",">
<if test="eventName != null">event_name = #{eventName},</if>
<if test="eventType != null">event_type = #{eventType},</if>
<if test="eventGrade != null">event_grade = #{eventGrade},</if>
<if test="address != null">address = #{address},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="informant != null">informant = #{informant},</if>
<if test="inforTime != null">infor_time = #{inforTime},</if>
<if test="informantPhone != null">informant_phone = #{informantPhone},</if>
<if test="describe != null">`describe` = #{describe},</if>
<if test="status != null">`status` = #{status},</if>
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTEventReceiveById" parameterType="String">
delete from t_event_receive where id = #{id}
</delete>
<delete id="deleteTEventReceiveByIds" parameterType="String">
delete from t_event_receive where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询应急设备列表
export function listDevice(query) {
return request({
url: '/system/device/list',
method: 'get',
params: query
})
}
// 查询应急设备详细
export function getDevice(id) {
return request({
url: '/system/device/' + id,
method: 'get'
})
}
// 新增应急设备
export function addDevice(data) {
return request({
url: '/system/device',
method: 'post',
data: data
})
}
// 修改应急设备
export function updateDevice(data) {
return request({
url: '/system/device',
method: 'put',
data: data
})
}
// 删除应急设备
export function delDevice(id) {
return request({
url: '/system/device/' + id,
method: 'delete'
})
}
// 导出应急设备
export function exportDevice(query) {
return request({
url: '/system/device/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询事件处置列表
export function listHandle(query) {
return request({
url: '/system/handle/list',
method: 'get',
params: query
})
}
// 查询事件处置详细
export function getHandle(handleId) {
return request({
url: '/system/handle/' + handleId,
method: 'get'
})
}
// 新增事件处置
export function addHandle(data) {
return request({
url: '/system/handle',
method: 'post',
data: data
})
}
// 修改事件处置
export function updateHandle(data) {
return request({
url: '/system/handle',
method: 'put',
data: data
})
}
// 删除事件处置
export function delHandle(handleId) {
return request({
url: '/system/handle/' + handleId,
method: 'delete'
})
}
// 导出事件处置
export function exportHandle(query) {
return request({
url: '/system/handle/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询事件接报列表
export function listReceive(query) {
return request({
url: '/system/receive/list',
method: 'get',
params: query
})
}
// 查询事件接报详细
export function getReceive(id) {
return request({
url: '/system/receive/' + id,
method: 'get'
})
}
// 新增事件接报
export function addReceive(data) {
return request({
url: '/system/receive',
method: 'post',
data: data
})
}
// 修改事件接报
export function updateReceive(data) {
return request({
url: '/system/receive',
method: 'put',
data: data
})
}
// 删除事件接报
export function delReceive(id) {
return request({
url: '/system/receive/' + id,
method: 'delete'
})
}
// 导出事件接报
export function exportReceive(query) {
return request({
url: '/system/receive/export',
method: 'get',
params: query
})
}
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2022-01-26 10:52:10
* @LastEditTime: 2022-02-17 10:11:35
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/components/PipeColor.vue
-->
<template>
<div>
<!-- <div class="pipePressure">
<div style="float: left;margin-right: 5px;">
<div class="hasColorBox">
<img src="../../assets/image/bigtyx.svg" alt="">
调压箱
</div>
<div class="hasColorBox">
<img src="../../assets/image/bigfmj.svg" alt="">
阀门井
</div>
<div class="hasColorBox">
<img src="../../assets/image/bigcz.svg" alt="">
厂站
</div>
<div class="hasColorBox">
<img src="../../assets/image/biguser.svg" alt="">
用户
</div>
<div class="hasColorBox">
<img src="../../assets/image/bigjk.svg" alt="">
监控
</div>
</div>
<div>
<div class="hasColorBox" :style="{ color: pipeColor[`1`] }">
<div :style="{ backgroundColor: pipeColor[`1`] }"></div>
低压管线
</div>
<div class="hasColorBox" :style="{ color: pipeColor[`2`] }">
<div :style="{ backgroundColor: pipeColor[`2`] }"></div>
中压管线
</div>
<div class="hasColorBox" :style="{ color: pipeColor[`3`] }">
<div :style="{ backgroundColor: pipeColor[`3`] }"></div>
次高压管线
</div>
<div class="hasColorBox" :style="{ color: pipeColor[`4`] }">
<div :style="{ backgroundColor: pipeColor[`4`] }"></div>
高压管线
</div>
</div>
</div> -->
<div class="mapChange">
<div :class="{ active: mapStyle }" @click="mapChange(2)">全景地图</div>
<div :class="{ active: !mapStyle }" @click="mapChange(1)">卫星地图</div>
</div>
</div>
</template>
<script>
import { pipeColor } from "@/utils/mapClass/config.js";
export default {
data() {
downIcon: true;
return {
pipeColor,
mapStyle:true,
};
},
methods: {
// 更改卫星图
mapChange(num) {
if (num == 1) {
this.mapStyle = false;
} else {
this.mapStyle = true;
}
this.$parent.map.changeMap(this.mapStyle);
},
},
};
</script>
<style lang="scss" scoped>
.pipePressure {
width: 180px;
height: auto;
border: 1px solid #a5a5a5;
background-color: #112238b3;
position: fixed;
color: rgb(205, 219, 228);
left: 460px;
bottom: 20px;
padding: 5px;
font-size: 14px;
// background: rgba(6, 29, 51, 0.8);
.hasColorBox {
// border: 1px solid #053b6a;
padding: 2px 5px;
margin-bottom: 5px;
& > div {
display: inline-block;
width: 10px;
height: 10px;
}
}
}
.hasColorBox>img{
width: 14px;
}
.mapChange {
left: 10px;
top: 20px;
color: #fff;
padding: 5px;
position: absolute;
display: flex;
z-index: 9999;
div {
border: 1px solid #339CC9;
padding: 3px 6px;
margin-left: 8px;
color: #339CC9;
cursor: pointer;
font-size: 14px;
&.active,
&:hover
{
background-color: #053B6A ;
color: #2CD5DB;
}
}
}
</style>
This diff is collapsed.
......@@ -31,6 +31,10 @@ export const svgUrl = {
6: require("@/assets/image/user1.svg"),
7: require("@/assets/image/zrxk.svg"),
8: require("@/assets/image/zcrq.svg"),
9: require("@/assets/mapImages/mark01.png"),
10: require("@/assets/mapImages/mark02.png"),
11: require("@/assets/mapImages/mark03.png"),
12: require("@/assets/mapImages/mark04.png"),
};
export const svgAlarm = {
2: require("@/assets/mapImages/tyxAlarm.svg"),
......
......@@ -312,7 +312,9 @@ export class EditorMap {
}
this.allDevice[iconType].push(device);
// 设备的事件函数
this.deviceEvent(device, compontent);
if(iconType<9){
this.deviceEvent(device, compontent);
}
}
deviceEvent(device, compontent) {
device.on("click", (e) => {
......
This diff is collapsed.
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