Commit 5d31c50c authored by 耿迪迪's avatar 耿迪迪
parents 16ea099e 6ac94b3a
package com.zehong.web.controller.complainDeal;
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.TComplainDeal;
import com.zehong.system.service.ITComplainDealService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 投诉处置Controller
*
* @author zehong
* @date 2022-02-15
*/
@RestController
@RequestMapping("/complainDeal")
public class TComplainDealController extends BaseController
{
@Autowired
private ITComplainDealService tComplainDealService;
/**
* 查询投诉处置列表
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:list')")
@GetMapping("/list")
public TableDataInfo list(TComplainDeal tComplainDeal)
{
startPage();
List<TComplainDeal> list = tComplainDealService.selectTComplainDealList(tComplainDeal);
return getDataTable(list);
}
/**
* 导出投诉处置列表
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:export')")
@Log(title = "投诉处置", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TComplainDeal tComplainDeal)
{
List<TComplainDeal> list = tComplainDealService.selectTComplainDealList(tComplainDeal);
ExcelUtil<TComplainDeal> util = new ExcelUtil<TComplainDeal>(TComplainDeal.class);
return util.exportExcel(list, "投诉处置数据");
}
/**
* 获取投诉处置详细信息
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:query')")
@GetMapping(value = "/{complainDealId}")
public AjaxResult getInfo(@PathVariable("complainDealId") Long complainDealId)
{
return AjaxResult.success(tComplainDealService.selectTComplainDealById(complainDealId));
}
/**
* 新增投诉处置
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:add')")
@Log(title = "投诉处置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TComplainDeal tComplainDeal)
{
return toAjax(tComplainDealService.insertTComplainDeal(tComplainDeal));
}
/**
* 修改投诉处置
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:edit')")
@Log(title = "投诉处置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TComplainDeal tComplainDeal)
{
return toAjax(tComplainDealService.updateTComplainDeal(tComplainDeal));
}
/**
* 删除投诉处置
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:remove')")
@Log(title = "投诉处置", businessType = BusinessType.DELETE)
@DeleteMapping("/{complainDealIds}")
public AjaxResult remove(@PathVariable Long[] complainDealIds)
{
return toAjax(tComplainDealService.deleteTComplainDealByIds(complainDealIds));
}
}
......@@ -78,10 +78,14 @@ public class TDeviceInfoController extends BaseController
{
//添加设备信息表数据 并且返回新增id
tDeviceInfoService.insertTDeviceInfo(listaw.gettDeviceInfo());
// TDeviceInfo tDeviceInfo = new TDeviceInfo();
// //根据企业id查询企业名称
// String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tDeviceInfo.getBeyondEnterpriseId());
// tDeviceInfo.setBeyondEnterpriseName(EnterpriseName);
if (!"null".equals(listaw.gettDeviceInfoS())){
//将关联设备信息与设备进行绑定
tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId());
}
TDeviceInfo tDeviceInfo = new TDeviceInfo();
//根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tDeviceInfo.getBeyondEnterpriseId());
tDeviceInfo.setBeyondEnterpriseName(EnterpriseName);
}
/**
......@@ -141,13 +145,22 @@ public class TDeviceInfoController extends BaseController
}
/**
* 关联设备批量数据删除接口
* 关联设备数据删除接口
*/
@RequestMapping("/deleteDetailInfo")
public void deleteDetailInfo(@RequestBody int deviceId){
tDeviceInfoService.deleteDetailinfOS(deviceId);
}
/**
* 解绑 设备与关联设备关系
* @param deviceId
*/
@RequestMapping("/deleteDeviceDetailInfo")
public void deleteDeviceDetailInfo(@RequestBody int deviceId){
tDeviceInfoService.deleteDeviceDetailInfo(deviceId);
}
/**
* 关联设备批量数据删除接口
* @param deviceId
......@@ -156,4 +169,29 @@ public class TDeviceInfoController extends BaseController
public void deleteeListDetailInfo(@RequestBody Long[] deviceId){
tDeviceInfoService.deleteDetailInfo(deviceId);
}
/**
* 查询设备已经关联的关联设备接口
* @param id
* @return
*/
@RequestMapping("/selectDetailInfoList")
public TableDataInfo selectDetailInfoList(@RequestBody int id){
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoService.selectDetailInfoList(id);
return getDataTable(tDeviceInfoS);
}
/**
* 关联设备绑定接口
* @param listaw
*/
@RequestMapping("/updateDetailInfoList")
public void updateDetailInfoList(@RequestBody Listaw listaw){
if (!"null".equals(listaw.gettDeviceInfoS())){
//将关联设备信息与设备进行绑定
tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId());
}
}
}
......@@ -97,7 +97,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.authorizeRequests()
// 对于登录login 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/captchaImage","/common/upload").anonymous()
.antMatchers("/login", "/captchaImage").anonymous()
.antMatchers(
HttpMethod.GET,
"/*.html",
......
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_complain_deal
*
* @author zehong
* @date 2022-02-15
*/
public class TComplainDeal extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 投诉处置id */
private Long complainDealId;
/** 投诉人姓名 */
@Excel(name = "投诉人姓名")
private String complainName;
/** 投诉人电话 */
@Excel(name = "投诉人电话")
private String complainPhone;
/** 投诉事项 */
@Excel(name = "投诉事项")
private String complainMatter;
/** 转办记录 */
@Excel(name = "转办记录")
private String transferRecord;
/** 办理情况 */
@Excel(name = "办理情况")
private String dealCondition;
/** 指派单位名称 */
@Excel(name = "指派单位名称")
private String complainAssignEnterproseName;
/** 指派单位id */
@Excel(name = "指派单位id")
private Long complainAssignEnterproseId;
/** 指派人 */
@Excel(name = "指派人")
private String complainAssignManId;
/** 指派人id */
@Excel(name = "指派人id")
private Long complainAssignMan;
/** 任务状态:1.派发中 2.反馈 3.归档 */
@Excel(name = "任务状态:1.派发中 2.反馈 3.归档")
private String complainStatus;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setComplainDealId(Long complainDealId)
{
this.complainDealId = complainDealId;
}
public Long getComplainDealId()
{
return complainDealId;
}
public void setComplainName(String complainName)
{
this.complainName = complainName;
}
public String getComplainName()
{
return complainName;
}
public void setComplainPhone(String complainPhone)
{
this.complainPhone = complainPhone;
}
public String getComplainPhone()
{
return complainPhone;
}
public void setComplainMatter(String complainMatter)
{
this.complainMatter = complainMatter;
}
public String getComplainMatter()
{
return complainMatter;
}
public void setTransferRecord(String transferRecord)
{
this.transferRecord = transferRecord;
}
public String getTransferRecord()
{
return transferRecord;
}
public void setDealCondition(String dealCondition)
{
this.dealCondition = dealCondition;
}
public String getDealCondition()
{
return dealCondition;
}
public void setComplainAssignEnterproseName(String complainAssignEnterproseName)
{
this.complainAssignEnterproseName = complainAssignEnterproseName;
}
public String getComplainAssignEnterproseName()
{
return complainAssignEnterproseName;
}
public void setComplainAssignEnterproseId(Long complainAssignEnterproseId)
{
this.complainAssignEnterproseId = complainAssignEnterproseId;
}
public Long getComplainAssignEnterproseId()
{
return complainAssignEnterproseId;
}
public void setComplainAssignManId(String complainAssignManId)
{
this.complainAssignManId = complainAssignManId;
}
public String getComplainAssignManId()
{
return complainAssignManId;
}
public void setComplainAssignMan(Long complainAssignMan)
{
this.complainAssignMan = complainAssignMan;
}
public Long getComplainAssignMan()
{
return complainAssignMan;
}
public void setComplainStatus(String complainStatus)
{
this.complainStatus = complainStatus;
}
public String getComplainStatus()
{
return complainStatus;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("complainDealId", getComplainDealId())
.append("complainName", getComplainName())
.append("complainPhone", getComplainPhone())
.append("complainMatter", getComplainMatter())
.append("transferRecord", getTransferRecord())
.append("dealCondition", getDealCondition())
.append("complainAssignEnterproseName", getComplainAssignEnterproseName())
.append("complainAssignEnterproseId", getComplainAssignEnterproseId())
.append("complainAssignManId", getComplainAssignManId())
.append("complainAssignMan", getComplainAssignMan())
.append("complainStatus", getComplainStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
......@@ -38,7 +38,7 @@ public class TDeviceInfo extends BaseEntity
private String deviceModel;
/** 设备类型:1.阀井 2.调压箱 3.巡检员 4.视频 */
@Excel(name = "设备类型:1.阀井 2.调压箱 3.巡检员 4.视频")
@Excel(name = "设备类型")
private String deviceType;
/** 权属单位 */
......@@ -49,18 +49,22 @@ public class TDeviceInfo extends BaseEntity
private String beyondEnterpriseName;
/** 经度 */
private BigDecimal longitude;
@Excel(name = "经度")
private String longitude;
/** 纬度 */
private BigDecimal latitude;
@Excel(name = "纬度")
private String latitude;
/** 设备图片路径 */
private String iconUrl;
/** 联系人 */
@Excel(name = "联系人")
private String linkman;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 安装时间 */
......@@ -149,24 +153,27 @@ public class TDeviceInfo extends BaseEntity
{
return beyondEnterpriseName;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public BigDecimal getLongitude()
{
public String getLongitude() {
return longitude;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public BigDecimal getLatitude()
{
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public void setIconUrl(String iconUrl)
{
this.iconUrl = iconUrl;
......
......@@ -37,8 +37,8 @@ public class TEventInfo extends BaseEntity
private String eventLocation;
/** 报案时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "报案时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "报案时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date reportTime;
/** 报案人 */
......
......@@ -47,6 +47,18 @@ public class TTroubleStandingBook extends BaseEntity
@Excel(name = "事故原因")
private String troubleReason;
/** 是否人员伤亡 */
@Excel(name = "是否人员伤亡")
private String isCasualties;
/** 受伤人数 */
@Excel(name = "受伤人数")
private int injuryNum;
/** 死亡人数 */
@Excel(name = "死亡人数")
private int deathNum;
/** 责任单位 */
@Excel(name = "责任单位")
private String responsibleUnit;
......@@ -148,6 +160,31 @@ public class TTroubleStandingBook extends BaseEntity
{
return troubleReason;
}
public String getIsCasualties() {
return isCasualties;
}
public void setIsCasualties(String isCasualties) {
this.isCasualties = isCasualties;
}
public int getInjuryNum() {
return injuryNum;
}
public void setInjuryNum(int injuryNum) {
this.injuryNum = injuryNum;
}
public int getDeathNum() {
return deathNum;
}
public void setDeathNum(int deathNum) {
this.deathNum = deathNum;
}
public void setResponsibleUnit(String responsibleUnit)
{
this.responsibleUnit = responsibleUnit;
......
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TComplainDeal;
/**
* 投诉处置Mapper接口
*
* @author zehong
* @date 2022-02-15
*/
public interface TComplainDealMapper
{
/**
* 查询投诉处置
*
* @param complainDealId 投诉处置ID
* @return 投诉处置
*/
public TComplainDeal selectTComplainDealById(Long complainDealId);
/**
* 查询投诉处置列表
*
* @param tComplainDeal 投诉处置
* @return 投诉处置集合
*/
public List<TComplainDeal> selectTComplainDealList(TComplainDeal tComplainDeal);
/**
* 新增投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
public int insertTComplainDeal(TComplainDeal tComplainDeal);
/**
* 修改投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
public int updateTComplainDeal(TComplainDeal tComplainDeal);
/**
* 删除投诉处置
*
* @param complainDealId 投诉处置ID
* @return 结果
*/
public int deleteTComplainDealById(Long complainDealId);
/**
* 批量删除投诉处置
*
* @param complainDealIds 需要删除的数据ID
* @return 结果
*/
public int deleteTComplainDealByIds(Long[] complainDealIds);
}
......@@ -3,6 +3,7 @@ package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceInfoS;
import org.apache.ibatis.annotations.Param;
/**
* 设备信息Mapper接口
......@@ -90,4 +91,23 @@ public interface TDeviceInfoMapper
* @param deviceId
*/
void deleteDetailinfOS(int deviceId);
/**
* 将关联设备信息与设备进行绑定
* @param gettDeviceInfoS
*/
void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS")List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id);
/**
* 查询设备已经关联的关联设备
* @param id
* @return
*/
List<TDeviceInfoS> selectDetailInfoList(int id);
/**
* 解绑 设备与关联设备关系
* @param deviceId
*/
void deleteDeviceDetailInfo(int deviceId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TComplainDeal;
/**
* 投诉处置Service接口
*
* @author zehong
* @date 2022-02-15
*/
public interface ITComplainDealService
{
/**
* 查询投诉处置
*
* @param complainDealId 投诉处置ID
* @return 投诉处置
*/
public TComplainDeal selectTComplainDealById(Long complainDealId);
/**
* 查询投诉处置列表
*
* @param tComplainDeal 投诉处置
* @return 投诉处置集合
*/
public List<TComplainDeal> selectTComplainDealList(TComplainDeal tComplainDeal);
/**
* 新增投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
public int insertTComplainDeal(TComplainDeal tComplainDeal);
/**
* 修改投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
public int updateTComplainDeal(TComplainDeal tComplainDeal);
/**
* 批量删除投诉处置
*
* @param complainDealIds 需要删除的投诉处置ID
* @return 结果
*/
public int deleteTComplainDealByIds(Long[] complainDealIds);
/**
* 删除投诉处置信息
*
* @param complainDealId 投诉处置ID
* @return 结果
*/
public int deleteTComplainDealById(Long complainDealId);
}
......@@ -3,6 +3,7 @@ package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceInfoS;
import org.apache.ibatis.annotations.Param;
/**
* 设备信息Service接口
......@@ -90,4 +91,23 @@ public interface ITDeviceInfoService
* @param deviceId
*/
void deleteDetailinfOS(int deviceId);
/**
* 将关联设备信息与设备进行绑定
* @param gettDeviceInfoS
*/
void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS") List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id);
/**
* 查询设备已经关联的关联设备
* @param id
* @return
*/
List<TDeviceInfoS> selectDetailInfoList(int id);
/**
* 解绑 设备与关联设备关系
* @param deviceId
*/
void deleteDeviceDetailInfo(int deviceId);
}
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.TComplainDealMapper;
import com.zehong.system.domain.TComplainDeal;
import com.zehong.system.service.ITComplainDealService;
/**
* 投诉处置Service业务层处理
*
* @author zehong
* @date 2022-02-15
*/
@Service
public class TComplainDealServiceImpl implements ITComplainDealService
{
@Autowired
private TComplainDealMapper tComplainDealMapper;
/**
* 查询投诉处置
*
* @param complainDealId 投诉处置ID
* @return 投诉处置
*/
@Override
public TComplainDeal selectTComplainDealById(Long complainDealId)
{
return tComplainDealMapper.selectTComplainDealById(complainDealId);
}
/**
* 查询投诉处置列表
*
* @param tComplainDeal 投诉处置
* @return 投诉处置
*/
@Override
public List<TComplainDeal> selectTComplainDealList(TComplainDeal tComplainDeal)
{
return tComplainDealMapper.selectTComplainDealList(tComplainDeal);
}
/**
* 新增投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
@Override
public int insertTComplainDeal(TComplainDeal tComplainDeal)
{
tComplainDeal.setCreateTime(DateUtils.getNowDate());
return tComplainDealMapper.insertTComplainDeal(tComplainDeal);
}
/**
* 修改投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
@Override
public int updateTComplainDeal(TComplainDeal tComplainDeal)
{
tComplainDeal.setUpdateTime(DateUtils.getNowDate());
return tComplainDealMapper.updateTComplainDeal(tComplainDeal);
}
/**
* 批量删除投诉处置
*
* @param complainDealIds 需要删除的投诉处置ID
* @return 结果
*/
@Override
public int deleteTComplainDealByIds(Long[] complainDealIds)
{
return tComplainDealMapper.deleteTComplainDealByIds(complainDealIds);
}
/**
* 删除投诉处置信息
*
* @param complainDealId 投诉处置ID
* @return 结果
*/
@Override
public int deleteTComplainDealById(Long complainDealId)
{
return tComplainDealMapper.deleteTComplainDealById(complainDealId);
}
}
......@@ -3,6 +3,7 @@ package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TDeviceInfoS;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TDeviceInfoMapper;
......@@ -142,4 +143,33 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
public void deleteDetailinfOS(int deviceId) {
tDeviceInfoMapper.deleteDetailinfOS(deviceId);
}
/**
* 将关联设备信息与设备进行绑定
* @param gettDeviceInfoS
*/
@Override
public void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS")List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id) {
tDeviceInfoMapper.updatetRelationDeviceDetailInfo(gettDeviceInfoS,id);
}
/**
* 查询设备已经关联的关联设备
* @param id
* @return
*/
@Override
public List<TDeviceInfoS> selectDetailInfoList(int id) {
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoMapper.selectDetailInfoList(id);
return tDeviceInfoS;
}
/**
* 解绑 设备与关联设备关系
* @param deviceId
*/
@Override
public void deleteDeviceDetailInfo(int deviceId) {
tDeviceInfoMapper.deleteDeviceDetailInfo(deviceId);
}
}
......@@ -67,6 +67,11 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
@Override
public int updateTTroubleStandingBook(TTroubleStandingBook tTroubleStandingBook)
{
// 是否人员伤亡:2否,受伤人数和死亡人数改为0
if(tTroubleStandingBook.getIsCasualties().equals("2")){
tTroubleStandingBook.setInjuryNum(0);
tTroubleStandingBook.setDeathNum(0);
}
tTroubleStandingBook.setUpdateTime(DateUtils.getNowDate());
return tTroubleStandingBookMapper.updateTTroubleStandingBook(tTroubleStandingBook);
}
......
<?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.TComplainDealMapper">
<resultMap type="TComplainDeal" id="TComplainDealResult">
<result property="complainDealId" column="complain_deal_id" />
<result property="complainName" column="complain_name" />
<result property="complainPhone" column="complain_phone" />
<result property="complainMatter" column="complain_matter" />
<result property="transferRecord" column="transfer_record" />
<result property="dealCondition" column="deal_condition" />
<result property="complainAssignEnterproseName" column="complain_assign_enterprose_name" />
<result property="complainAssignEnterproseId" column="complain_assign_enterprose_id" />
<result property="complainAssignManId" column="complain_assign_man_id" />
<result property="complainAssignMan" column="complain_assign_man" />
<result property="complainStatus" column="complain_status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTComplainDealVo">
select complain_deal_id, complain_name, complain_phone, complain_matter, transfer_record, deal_condition, complain_assign_enterprose_name, complain_assign_enterprose_id, complain_assign_man_id, complain_assign_man, complain_status, create_by, create_time, update_by, update_time, is_del, remarks from t_complain_deal
</sql>
<select id="selectTComplainDealList" parameterType="TComplainDeal" resultMap="TComplainDealResult">
<include refid="selectTComplainDealVo"/>
<where>
<if test="complainName != null and complainName != ''"> and complain_name like concat('%', #{complainName}, '%')</if>
<if test="complainPhone != null and complainPhone != ''"> and complain_phone = #{complainPhone}</if>
<if test="complainMatter != null and complainMatter != ''"> and complain_matter = #{complainMatter}</if>
<if test="transferRecord != null and transferRecord != ''"> and transfer_record = #{transferRecord}</if>
<if test="dealCondition != null and dealCondition != ''"> and deal_condition = #{dealCondition}</if>
<if test="complainAssignEnterproseName != null and complainAssignEnterproseName != ''"> and complain_assign_enterprose_name like concat('%', #{complainAssignEnterproseName}, '%')</if>
<if test="complainAssignEnterproseId != null "> and complain_assign_enterprose_id = #{complainAssignEnterproseId}</if>
<if test="complainAssignManId != null and complainAssignManId != ''"> and complain_assign_man_id = #{complainAssignManId}</if>
<if test="complainAssignMan != null "> and complain_assign_man = #{complainAssignMan}</if>
<if test="complainStatus != null and complainStatus != ''"> and complain_status = #{complainStatus}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTComplainDealById" parameterType="Long" resultMap="TComplainDealResult">
<include refid="selectTComplainDealVo"/>
where complain_deal_id = #{complainDealId}
</select>
<insert id="insertTComplainDeal" parameterType="TComplainDeal" useGeneratedKeys="true" keyProperty="complainDealId">
insert into t_complain_deal
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="complainName != null">complain_name,</if>
<if test="complainPhone != null">complain_phone,</if>
<if test="complainMatter != null">complain_matter,</if>
<if test="transferRecord != null">transfer_record,</if>
<if test="dealCondition != null">deal_condition,</if>
<if test="complainAssignEnterproseName != null">complain_assign_enterprose_name,</if>
<if test="complainAssignEnterproseId != null">complain_assign_enterprose_id,</if>
<if test="complainAssignManId != null">complain_assign_man_id,</if>
<if test="complainAssignMan != null">complain_assign_man,</if>
<if test="complainStatus != null">complain_status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="complainName != null">#{complainName},</if>
<if test="complainPhone != null">#{complainPhone},</if>
<if test="complainMatter != null">#{complainMatter},</if>
<if test="transferRecord != null">#{transferRecord},</if>
<if test="dealCondition != null">#{dealCondition},</if>
<if test="complainAssignEnterproseName != null">#{complainAssignEnterproseName},</if>
<if test="complainAssignEnterproseId != null">#{complainAssignEnterproseId},</if>
<if test="complainAssignManId != null">#{complainAssignManId},</if>
<if test="complainAssignMan != null">#{complainAssignMan},</if>
<if test="complainStatus != null">#{complainStatus},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTComplainDeal" parameterType="TComplainDeal">
update t_complain_deal
<trim prefix="SET" suffixOverrides=",">
<if test="complainName != null">complain_name = #{complainName},</if>
<if test="complainPhone != null">complain_phone = #{complainPhone},</if>
<if test="complainMatter != null">complain_matter = #{complainMatter},</if>
<if test="transferRecord != null">transfer_record = #{transferRecord},</if>
<if test="dealCondition != null">deal_condition = #{dealCondition},</if>
<if test="complainAssignEnterproseName != null">complain_assign_enterprose_name = #{complainAssignEnterproseName},</if>
<if test="complainAssignEnterproseId != null">complain_assign_enterprose_id = #{complainAssignEnterproseId},</if>
<if test="complainAssignManId != null">complain_assign_man_id = #{complainAssignManId},</if>
<if test="complainAssignMan != null">complain_assign_man = #{complainAssignMan},</if>
<if test="complainStatus != null">complain_status = #{complainStatus},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where complain_deal_id = #{complainDealId}
</update>
<delete id="deleteTComplainDealById" parameterType="Long">
delete from t_complain_deal where complain_deal_id = #{complainDealId}
</delete>
<delete id="deleteTComplainDealByIds" parameterType="String">
delete from t_complain_deal where complain_deal_id in
<foreach item="complainDealId" collection="array" open="(" separator="," close=")">
#{complainDealId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
</where>
group by a.device_id desc
</select>
<select id="selectTDeviceInfoById" parameterType="Long" resultMap="TDeviceInfoResult">
......@@ -149,14 +150,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</update>
<!--添加关联设备信息表数据-->
<!-- <insert id="insertDeviceDetailInfo" parameterType="java.util.List">-->
<!-- INSERT INTO t_relation_device_detail_info (relation_device_id,device_name,device_model,device_type,iot_no)-->
<!-- VALUES-->
<!-- <foreach collection="list" item="item" index="key" separator=",">-->
<!-- (#{item.relationDeviceId},#{item.deviceName},#{item.deviceModel},#{item.deviceType},#{item.iotNo})-->
<!-- </foreach>-->
<!-- </insert>-->
<insert id="insertDeviceDetailInfo">
INSERT INTO t_relation_device_detail_info (relation_device_id,device_name,device_model,device_type,iot_no,remarks)
......@@ -180,6 +173,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by relation_device_detail_id desc
</select>
<!--查询设备已经关联的关联设备-->
<select id="selectDetailInfoList" resultMap="TDeviceInfoResultS">
select relation_device_detail_id,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' end) as device_type
from t_relation_device_detail_info where relation_device_id=#{id}
</select>
<!--关联设备数据删除接口-->
<update id="deleteDetailInfo">
update t_relation_device_detail_info set is_del='1' where relation_device_detail_id in
......@@ -193,4 +192,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_relation_device_detail_info set is_del='1' where relation_device_detail_id = #{deviceId}
</update>
<!--将关联设备信息与设备进行绑定-->
<update id="updatetRelationDeviceDetailInfo" parameterType="java.util.List">
update t_relation_device_detail_info set relation_device_id = #{id}
where
relation_device_detail_id in
<foreach collection="gettDeviceInfoS" item="items" index="key" open="(" separator="," close=")">
#{items.relationDeviceDetailId}
</foreach>
</update>
<!--解绑 设备与关联设备关系-->
<update id="deleteDeviceDetailInfo">
update t_relation_device_detail_info set relation_device_id='0' where relation_device_detail_id=#{deviceId}
</update>
</mapper>
......@@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="reportPerson != null and reportPerson != ''"> and report_person like concat('%', #{reportPerson}, '%')</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
</where>
order by report_time
</select>
<select id="selectTEventInfoById" parameterType="Long" resultMap="TEventInfoResult">
......
......@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="planLevel != null and planLevel != ''"> and plan_level = #{planLevel}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
</where>
order by create_time desc
</select>
<select id="selectTPlanInfoById" parameterType="Long" resultMap="TPlanInfoResult">
......
......@@ -13,6 +13,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="troubleType" column="trouble_type" />
<result property="briefProcess" column="brief_process" />
<result property="troubleReason" column="trouble_reason" />
<result property="isCasualties" column="is_casualties" />
<result property="injuryNum" column="injury_num" />
<result property="deathNum" column="death_num" />
<result property="responsibleUnit" column="responsible_unit" />
<result property="responsiblePeople" column="responsible_people" />
<result property="isDeal" column="is_deal" />
......@@ -27,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTTroubleStandingBookVo">
select trouble_id, trouble_name, trouble_location, longitude, latitude, trouble_type, brief_process, trouble_reason, responsible_unit, responsible_people, is_deal,happen_date, deal_date, create_by, create_time, update_by, update_time, is_del, remarks from t_trouble_standing_book
select trouble_id, trouble_name, trouble_location, longitude, latitude, trouble_type, brief_process, trouble_reason, is_casualties, injury_num, death_num, responsible_unit, responsible_people, is_deal,happen_date, deal_date, create_by, create_time, update_by, update_time, is_del, remarks from t_trouble_standing_book
</sql>
<select id="selectTTroubleStandingBookList" parameterType="TTroubleStandingBookForm" resultMap="TTroubleStandingBookResult">
......@@ -58,6 +61,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="troubleType != null">trouble_type,</if>
<if test="briefProcess != null">brief_process,</if>
<if test="troubleReason != null">trouble_reason,</if>
<if test="isCasualties != null">is_casualties,</if>
<if test="injuryNum != null">injury_num,</if>
<if test="deathNum != null">death_num,</if>
<if test="responsibleUnit != null">responsible_unit,</if>
<if test="responsiblePeople != null">responsible_people,</if>
<if test="isDeal != null">is_deal,</if>
......@@ -78,6 +84,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="troubleType != null">#{troubleType},</if>
<if test="briefProcess != null">#{briefProcess},</if>
<if test="troubleReason != null">#{troubleReason},</if>
<if test="isCasualties != null">#{isCasualties},</if>
<if test="injuryNum != null">#{injuryNum},</if>
<if test="deathNum != null">#{deathNum},</if>
<if test="responsibleUnit != null">#{responsibleUnit},</if>
<if test="responsiblePeople != null">#{responsiblePeople},</if>
<if test="isDeal != null">#{isDeal},</if>
......@@ -102,6 +111,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="troubleType != null">trouble_type = #{troubleType},</if>
<if test="briefProcess != null">brief_process = #{briefProcess},</if>
<if test="troubleReason != null">trouble_reason = #{troubleReason},</if>
<if test="isCasualties != null">is_casualties = #{isCasualties},</if>
<if test="injuryNum != null">injury_num = #{injuryNum},</if>
<if test="deathNum != null">death_num = #{deathNum},</if>
<if test="responsibleUnit != null">responsible_unit = #{responsibleUnit},</if>
<if test="responsiblePeople != null">responsible_people = #{responsiblePeople},</if>
<if test="isDeal != null">is_deal = #{isDeal},</if>
......
import request from '@/utils/request'
// 查询投诉处置列表
export function listComplainDeal(query) {
return request({
url: '/complainDeal/list',
method: 'get',
params: query
})
}
// 查询投诉处置详细
export function getComplainDeal(complainDealId) {
return request({
url: '/complainDeal/' + complainDealId,
method: 'get'
})
}
// 新增投诉处置
export function addComplainDeal(data) {
return request({
url: '/complainDeal',
method: 'post',
data: data
})
}
// 修改投诉处置
export function updateComplainDeal(data) {
return request({
url: '/complainDeal',
method: 'put',
data: data
})
}
// 删除投诉处置
export function delComplainDeal(complainDealId) {
return request({
url: '/complainDeal/' + complainDealId,
method: 'delete'
})
}
// 导出投诉处置
export function exportComplainDeal(query) {
return request({
url: '/complainDeal/complainDeal/export',
method: 'get',
params: query
})
}
......@@ -87,6 +87,17 @@ export function addDetailInfos(data) {
})
}
// 解除 设备与关联设备信息
export function deleteDeviceDetailInfo(deviceId) {
return request({
url: '/device/device/deleteDeviceDetailInfo',
method: 'delete',
data:deviceId
})
}
// 删除关联设备信息
export function deleteeListDetailInfo(deviceId) {
return request({
......@@ -96,4 +107,20 @@ export function deleteeListDetailInfo(deviceId) {
})
}
//查询已经关联的关联设备信息
export function selectDetailInfoList(data){
return request({
url: '/device/device/selectDetailInfoList',
method: 'post',
data: data
})
}
// 新增设备信息
export function updateDetailInfoLists(data) {
return request({
url: '/device/device/updateDetailInfoList',
method: 'post',
data: data
})
}
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1644901265903" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7343" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M527.053 96.924c-169.131 0.322-306.127 137.496-306.127 306.7 0 157.986 128.978 324.17 278.121 502.935 7.838 9.418 17.977 14.485 28.006 15.061 10.029-0.576 20.168-5.643 28.002-15.061 149.144-178.765 278.123-344.948 278.123-502.935 0-169.205-136.997-306.378-306.126-306.7zM527.053 500.967c-66.070-0.358-119.562-53.956-119.562-120.099s53.492-119.74 119.562-120.099c66.069 0.358 119.557 53.956 119.557 120.099s-53.487 119.74-119.557 120.099z" p-id="7344" fill="#1296db"></path></svg>
\ No newline at end of file
<svg id="组_2449" data-name="组 2449" xmlns="http://www.w3.org/2000/svg" width="23" height="33.9" viewBox="0 0 23 33.9">
<g id="路径_186" data-name="路径 186" fill="none">
<path d="M11.5,0A11.5,11.5,0,0,1,23,11.5c0,6.351-11.6,18.226-11.5,18.3S0,17.851,0,11.5A11.5,11.5,0,0,1,11.5,0Z" stroke="none"/>
<path d="M 11.5 0.9999942779541016 C 5.71027946472168 0.9999942779541016 1 5.710294723510742 1 11.50003433227539 C 1 15.44047451019287 6.295700073242188 22.62868881225586 11.47670364379883 28.30246925354004 C 12.68497562408447 26.95181846618652 15.33078575134277 23.97880172729492 17.65543937683105 20.72857475280762 C 19.63740921020508 17.95747375488281 22 14.10698509216309 22 11.50003433227539 C 22 5.710294723510742 17.28972053527832 0.9999942779541016 11.5 0.9999942779541016 M 11.5 -5.7220458984375e-06 C 17.85127067565918 -5.7220458984375e-06 23 5.148744583129883 23 11.50003433227539 C 23 17.82767868041992 11.48916530609131 29.63789367675781 11.49940204620361 29.80171203613281 C 11.36462783813477 29.63816833496094 0 17.78736114501953 0 11.50003433227539 C 0 5.148744583129883 5.14872932434082 -5.7220458984375e-06 11.5 -5.7220458984375e-06 Z M 11.49940204620361 29.80171203613281 C 11.50076866149902 29.80337142944336 11.50098419189453 29.80383491516113 11.5 29.80305480957031 C 11.49963855743408 29.80276870727539 11.49944019317627 29.80232429504395 11.49940204620361 29.80171203613281 Z" stroke="none" fill="#7bf8f4"/>
</g>
<path id="多边形_33" data-name="多边形 33" d="M4.471,0,8.941,5.961H0Z" transform="translate(16.094 29.804) rotate(180)" fill="#7bf8f4"/>
<path id="路径_966" data-name="路径 966" d="M99.476,156.616a6.028,6.028,0,0,1-1.622,2.267.9.9,0,0,1-.583.252.8.8,0,0,1-.567-.236.765.765,0,0,1-.236-.535.705.705,0,0,1,.236-.535,6.035,6.035,0,0,0,1.748-4.377A5.726,5.726,0,0,0,96.7,149.2a6.645,6.645,0,0,0-9.085.016,5.836,5.836,0,0,0-1.763,4.283,6.134,6.134,0,0,0,1.952,4.346.765.765,0,0,1,.236.535.705.705,0,0,1-.236.535.748.748,0,0,1-.567.236.8.8,0,0,1-.567-.236,7.414,7.414,0,0,1-2.047-2.724,7.528,7.528,0,0,1,1.748-8.266,7.836,7.836,0,0,1,2.629-1.685,9.392,9.392,0,0,1,6.361-.063,6.113,6.113,0,0,1,2.141,1.26c2.866,2.425,3.023,5.9,2.047,8.943Zm-7.337-7.684a4.366,4.366,0,0,0-4.377,4.267.5.5,0,0,1-.236.5.527.527,0,0,1-.567,0,.513.513,0,0,1-.236-.5,5.254,5.254,0,0,1,1.575-3.684,5.533,5.533,0,0,1,7.7,0,5.208,5.208,0,0,1,1.606,3.732.5.5,0,0,1-.236.5.527.527,0,0,1-.567,0,.513.513,0,0,1-.236-.5,4.382,4.382,0,0,0-4.424-4.314Zm.913,5.4a1.113,1.113,0,0,1-1.559-.047,1.054,1.054,0,0,1-.268-1.149l-1.212-1.2a.418.418,0,0,1,0-.6.479.479,0,0,1,.63,0l1.228,1.2a1.162,1.162,0,0,1,1.2.268,1.024,1.024,0,0,1,.331.771A1.093,1.093,0,0,1,93.052,154.333Zm.016-.016" transform="translate(-80.582 -142.727)" fill="#7bf8f4"/>
</svg>
<!--
* @Author: your name
* @Date: 2022-02-12 11:07:10
* @LastEditTime: 2022-02-12 15:13:41
* @LastEditTime: 2022-02-15 10:33:20
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/components/GetPos.vue/index.vue
......@@ -14,6 +14,7 @@
width="60%"
:before-close="handleClose"
>
<template v-if="inputVisible">
<div class="search-wrapper pos">
<el-input
v-model="searchinput"
......@@ -30,16 +31,16 @@
>定位</el-button
>
</div>
</template>
<div id="getposmap"></div>
</el-dialog>
</template>
<script>
import { EditorMap } from "./untils/getPath.js";
import { EditorMap } from "@/utils/mapClass/getPath.js";
export default {
props: {
//管道路径,二维数组
//管道路径,二维数组s
pipePath: {
type: Array,
default: () => [],
......@@ -55,10 +56,15 @@ export default {
default: "",
},
// 显示隐藏
dialogVisible:{
type:Boolean,
default:false,
}
dialogVisible: {
type: Boolean,
default: false,
},
// input跟定位按钮是否展示
inputVisible: {
type: Boolean,
default: true,
},
},
data() {
return {
......@@ -80,8 +86,7 @@ export default {
});
},
},
mounted() {
},
mounted() {},
methods: {
init() {
this.$nextTick(() => {
......@@ -90,13 +95,13 @@ export default {
if (this.device == "") {
// 如果传了路径就创建一个marker,如果没传就直接激活手动创建
if (this.devicePos.length > 0) {
this.map.addDevice({path:this.devicePos});
this.map.addDevice({ path: this.devicePos });
} else {
this.map.mouseAddMarker();
}
} else {
if (this.pipePath.length > 0) {
this.map.addPipeLine({path:this.pipePath});
this.map.addPipeLine({ path: this.pipePath });
} else {
this.mouseAddPipeline();
}
......@@ -104,7 +109,7 @@ export default {
});
},
handleClose() {
this.$emit("close")
this.$emit("close");
},
open() {
this.dialogVisible = true;
......@@ -113,7 +118,7 @@ export default {
pos() {
this.path = this.map.getPath();
this.$emit("getPath", this.path);
console.log(this.path)
console.log(this.path);
if (this.path?.length > 0) {
this.$emit("update:dialogVisible", false);
}
......
......@@ -248,7 +248,7 @@ export class EditorMap {
let device = this.createMarker({
map: this.map,
anchor: "bottom-center",
icon: require("@/assets/mapImages/yalibiao.svg"),
icon: require("@/assets/mapImages/coordinate.svg"),
position: path,
extData: deviceData,
});
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="投诉人姓名" prop="complainName">
<el-input
v-model="queryParams.complainName"
placeholder="请输入投诉人姓名"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="投诉人电话" prop="complainPhone">
<el-input
v-model="queryParams.complainPhone"
placeholder="请输入投诉人电话"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="投诉事项" prop="complainMatter">
<el-input
v-model="queryParams.complainMatter"
placeholder="请输入投诉事项"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="转办记录" prop="transferRecord">
<el-input
v-model="queryParams.transferRecord"
placeholder="请输入转办记录"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="办理情况" prop="dealCondition">
<el-input
v-model="queryParams.dealCondition"
placeholder="请输入办理情况"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派单位名称" prop="complainAssignEnterproseName">
<el-input
v-model="queryParams.complainAssignEnterproseName"
placeholder="请输入指派单位名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派单位id" prop="complainAssignEnterproseId">
<el-input
v-model="queryParams.complainAssignEnterproseId"
placeholder="请输入指派单位id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派人" prop="complainAssignManId">
<el-input
v-model="queryParams.complainAssignManId"
placeholder="请输入指派人"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派人id" prop="complainAssignMan">
<el-input
v-model="queryParams.complainAssignMan"
placeholder="请输入指派人id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务状态:1.派发中 2.反馈 3.归档" prop="complainStatus">
<el-select v-model="queryParams.complainStatus" placeholder="请选择任务状态:1.派发中 2.反馈 3.归档" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="是否删除(0正常,1删除)" prop="isDel">
<el-input
v-model="queryParams.isDel"
placeholder="请输入是否删除(0正常,1删除)"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input
v-model="queryParams.remarks"
placeholder="请输入备注"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<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-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['complainDeal:complainDeal:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['complainDeal:complainDeal: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="['complainDeal:complainDeal: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="['complainDeal:complainDeal:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="complainDealList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="投诉处置id" align="center" prop="complainDealId" />
<el-table-column label="投诉人姓名" align="center" prop="complainName" />
<el-table-column label="投诉人电话" align="center" prop="complainPhone" />
<el-table-column label="投诉事项" align="center" prop="complainMatter" />
<el-table-column label="转办记录" align="center" prop="transferRecord" />
<el-table-column label="办理情况" align="center" prop="dealCondition" />
<el-table-column label="指派单位名称" align="center" prop="complainAssignEnterproseName" />
<el-table-column label="指派单位id" align="center" prop="complainAssignEnterproseId" />
<el-table-column label="指派人" align="center" prop="complainAssignManId" />
<el-table-column label="指派人id" align="center" prop="complainAssignMan" />
<el-table-column label="任务状态:1.派发中 2.反馈 3.归档" align="center" prop="complainStatus" />
<el-table-column label="是否删除(0正常,1删除)" align="center" prop="isDel" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['complainDeal:complainDeal:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['complainDeal:complainDeal:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改投诉处置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="投诉人姓名" prop="complainName">
<el-input v-model="form.complainName" placeholder="请输入投诉人姓名" />
</el-form-item>
<el-form-item label="投诉人电话" prop="complainPhone">
<el-input v-model="form.complainPhone" placeholder="请输入投诉人电话" />
</el-form-item>
<el-form-item label="投诉事项" prop="complainMatter">
<el-input v-model="form.complainMatter" placeholder="请输入投诉事项" />
</el-form-item>
<el-form-item label="转办记录" prop="transferRecord">
<el-input v-model="form.transferRecord" placeholder="请输入转办记录" />
</el-form-item>
<el-form-item label="办理情况" prop="dealCondition">
<el-input v-model="form.dealCondition" placeholder="请输入办理情况" />
</el-form-item>
<el-form-item label="指派单位名称" prop="complainAssignEnterproseName">
<el-input v-model="form.complainAssignEnterproseName" placeholder="请输入指派单位名称" />
</el-form-item>
<el-form-item label="指派单位id" prop="complainAssignEnterproseId">
<el-input v-model="form.complainAssignEnterproseId" placeholder="请输入指派单位id" />
</el-form-item>
<el-form-item label="指派人" prop="complainAssignManId">
<el-input v-model="form.complainAssignManId" placeholder="请输入指派人" />
</el-form-item>
<el-form-item label="指派人id" prop="complainAssignMan">
<el-input v-model="form.complainAssignMan" placeholder="请输入指派人id" />
</el-form-item>
<el-form-item label="任务状态:1.派发中 2.反馈 3.归档">
<el-radio-group v-model="form.complainStatus">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否删除(0正常,1删除)" prop="isDel">
<el-input v-model="form.isDel" placeholder="请输入是否删除(0正常,1删除)" />
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listComplainDeal, getComplainDeal, delComplainDeal, addComplainDeal, updateComplainDeal, exportComplainDeal } from "@/api/complainDeal/complainDeal";
export default {
name: "ComplainDeal",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 投诉处置表格数据
complainDealList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
complainName: null,
complainPhone: null,
complainMatter: null,
transferRecord: null,
dealCondition: null,
complainAssignEnterproseName: null,
complainAssignEnterproseId: null,
complainAssignManId: null,
complainAssignMan: null,
complainStatus: null,
isDel: null,
remarks: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
console.log("===============================")
},
methods: {
/** 查询投诉处置列表 */
getList() {
this.loading = true;
listComplainDeal(this.queryParams).then(response => {
this.complainDealList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
complainDealId: null,
complainName: null,
complainPhone: null,
complainMatter: null,
transferRecord: null,
dealCondition: null,
complainAssignEnterproseName: null,
complainAssignEnterproseId: null,
complainAssignManId: null,
complainAssignMan: null,
complainStatus: "0",
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.complainDealId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加投诉处置";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const complainDealId = row.complainDealId || this.ids
getComplainDeal(complainDealId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改投诉处置";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.complainDealId != null) {
updateComplainDeal(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addComplainDeal(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const complainDealIds = row.complainDealId || this.ids;
this.$confirm('是否确认删除投诉处置编号为"' + complainDealIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delComplainDeal(complainDealIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有投诉处置数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportComplainDeal(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
......@@ -123,8 +123,8 @@
@pagination="getList"
/>
<!--绑定关联设备弹出框-->
<el-dialog title="选择关联设备" :visible.sync="dialogTableVisible" formLabelWidth="120px">
<!--选择关联设备弹出框-->
<el-dialog title="选择关联设备" :visible.sync="dialogTableVisible" formLabelWidth="160px">
<template>
<el-form :model="dateQueryParams" ref="queryForm" :inline="true" v-show="showSearch" >
<el-form-item label="设备名称" prop="deviceName">
......@@ -171,17 +171,17 @@
v-hasPermi="['device:device:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['device:device:edit']"
>修改</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['device:device:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="danger"
......@@ -193,17 +193,17 @@
v-hasPermi="['device:device: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="['device:device:export']"
>导出</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="['device:device:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getDataList"></right-toolbar>
</el-row>
<el-table v-loading="loadings" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" max-height="250" @selection-change="tableDataSelectionChange">
......@@ -234,30 +234,46 @@
<!--添加关联设备弹出框-->
<el-dialog title="添加关联设备" :visible.sync="dialogFormVisible">
<el-form :model="formDetailInfo" label-width="90px" style="height: 270px">
<el-form ref="formDetailInfo" :model="formDetailInfo" :rules="formDetailInfoRules" label-width="95px" style="height: 230px">
<el-form-item label="设备名称">
<el-row>
<el-col :span="11">
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="formDetailInfo.deviceName" placeholder="请输入设备名称" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-form-item label="设备型号" >
<el-col :span="11">
<el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="formDetailInfo.deviceModel" placeholder="请输入设备型号" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="设备类型" >
<el-row>
<el-col :span="11">
<el-form-item label="设备类型" prop="deviceType">
<el-select v-model="formDetailInfo.deviceType" placeholder="请选择设备类型">
<el-option label="压力表" value="1" />
<el-option label="流量计" value="2" />
</el-select>
</el-form-item>
</el-col>
<el-form-item label="物联网编号" >
<el-col :span="11">
<el-form-item label="物联网编号" prop="iotNo" >
<el-input v-model="formDetailInfo.iotNo" placeholder="请输入物联网编号" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" >
<el-input v-model="formDetailInfo.remarksn" placeholder="请输入备注" />
<el-row>
<el-col :span="22">
<el-form-item label="备注" prop="remarksn">
<el-input v-model="formDetailInfo.remarksn" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="addDetailInfo"> </el-button>
......@@ -268,58 +284,94 @@
<!-- 添加或修改设备信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="11">
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="设备编号" prop="deviceCode">
<el-input v-model="form.deviceCode" placeholder="请输入设备编号" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="所在地址" prop="deviceAddr">
<el-input v-model="form.deviceAddr" placeholder="请输入所在地址" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="form.deviceModel" placeholder="请输入设备型号" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="设备类型" prop="deviceType">
<el-select v-model="form.deviceType" placeholder="请选择设备类型">
<el-option label="阀井" value="1" />
<el-option label="调压箱" value="2" />
</el-select>
</el-form-item>
</el-col>
<!-- <el-form-item label="权属单位" prop="beyondEnterpriseId">-->
<!-- <el-input v-model="form.beyondEnterpriseId" placeholder="请输入权属单位" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="权属单位名称" prop="beyondEnterpriseName">-->
<!-- <el-input v-model="form.beyondEnterpriseName" placeholder="请输入权属单位名称" />-->
<!-- </el-form-item>-->
<el-form-item label="权属单位" prop="beyondEnterpriseName">
<el-col :span="11">
<el-form-item label="权属单位" prop="beyondEnterpriseId">
<el-select v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable>
<el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="经度" prop="longitude">
<el-input onkeyup="this.value=this.value.replace(/\D/g,'')" v-model="form.longitude" placeholder="请输入经度" />
<el-input v-model="form.longitude" placeholder="请输入经度" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="纬度" prop="latitude">
<el-input onkeyup="this.value=this.value.replace(/\D/g,'')" v-model="form.latitude" placeholder="请输入纬度" />
<el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="设备图片路径" prop="iconUrl">
<el-input v-model="form.iconUrl" type="textarea" placeholder="请输入内容" />
<el-input v-model="form.iconUrl" type="textarea" placeholder="请输入图片路径" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="联系人" prop="linkman">
<el-input v-model="form.linkman" placeholder="请输入联系人" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入电话" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="安装时间" prop="installationTime">
<el-date-picker clearable size="small"
v-model="form.installationTime"
......@@ -328,6 +380,9 @@
placeholder="选择安装时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="最后巡检时间" prop="inspectionTime">
<el-date-picker clearable size="small"
v-model="form.inspectionTime"
......@@ -336,13 +391,39 @@
placeholder="选择最后巡检时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
<el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<h3>关联设备</h3>
<el-table v-loading="loadings" ref="multipleTable" :data="DetailInfoList" tooltip-effect="dark" style="width: 100%" max-height="250" @selection-change="tableDataSelectionChange">
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备型号" align="center" prop="deviceModel" />
<el-table-column label="设备类型" align="center" prop="deviceType" />
<el-table-column label="物联网编号" align="center" prop="iotNo" />
<el-table-column label="备注" align="center" prop="remarksn" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="deleteDataListilInfo(scope.row,scope.$index)"
v-hasPermi="['device:device:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogTableVisible = true">选择关联设备</el-button>
<el-button type="primary" @click="selectDataListInfo">选择关联设备</el-button>
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
......@@ -352,7 +433,7 @@
<script>
import { listDevice, getDevice, delDevice, addDevice, updateDevice, exportDevice, selectTEnterprise,getDdeviceDetailInfo,addDetailInfos,deleteDetailInfo,deleteeListDetailInfo } from "@/api/regulation/device";
import { listDevice, getDevice, delDevice, addDevice, updateDevice, exportDevice, selectTEnterprise,getDdeviceDetailInfo,addDetailInfos,deleteDetailInfo,deleteeListDetailInfo,selectDetailInfoList,deleteDeviceDetailInfo,updateDetailInfoLists} from "@/api/regulation/device";
export default {
name: "Device",
......@@ -365,6 +446,8 @@ export default {
tableData: [],
//存储已被选中的下级数据id
DetailInfoListId :[],
//存储已经选中的下级关联数据
DetailInfoList:[],
multipleSelection: [],
dialogTableVisible: false,
dialogFormVisible: false,
......@@ -450,7 +533,43 @@ export default {
test: {},
// 表单校验
rules: {
}
deviceName: [
{ required: true, message: "请输入设备名称", trigger: "blur" },
],
deviceCode: [
{ required: true, message: "请输入设备编号", trigger: "blur" },
],
deviceAddr: [
{ required: true, message: "请输入所在地址", trigger: "blur" },
],
deviceModel: [
{ required: true, message: "请输入设备型号", trigger: "blur" },
],
deviceType: [
{ required: true, message: "请选择设备类型", trigger: "blur" },
],
beyondEnterpriseId: [
{ required: true, message: "请选择权属单位", trigger: "blur" },
],
},
//关联设备下级数据 表单校验
formDetailInfoRules:{
deviceName:[
{ required: true, message: "请输入设备名称", trigger: "blur" },
],
deviceModel:[
{ required: true, message: "请输入设备型号", trigger: "blur" },
],
deviceType:[
{ required: true, message: "请选择设备类型", trigger: "blur" },
],
iotNo:[
{ required: true, message: "请输入联网编号", trigger: "blur" },
],
remarksn:[
{ required: true, message: "请输入备注", trigger: "blur" },
],
},
};
},
created() {
......@@ -512,7 +631,6 @@ export default {
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
......@@ -544,6 +662,7 @@ export default {
//关联数据多选框选中数据
tableDataSelectionChange(selection){
this.ids = selection.map(item => item.relationDeviceDetailId)
this.datalist=selection.map(item => item)
//按钮 非选中禁用
this.single = selection.length!==1
this.multiple = !selection.length
......@@ -554,6 +673,8 @@ export default {
selectTEnterprise().then(response => {
this.test = response.data;
});
//清空关联设备数据
this.DetailInfoList=''
this.loadings = true;
//查询下级设备数据
getDdeviceDetailInfo(this.dateQueryParams).then(response => {
......@@ -574,10 +695,13 @@ export default {
this.test = response.data;
});
const deviceId = row.deviceId || this.ids
//查询关联设备信息数据
// getDdeviceDetailInfo(deviceId).then(response => {
// this.dynamicValidateForm.domains = response.data;
// });
selectDetailInfoList(deviceId).then(response => {
this.DetailInfoList = response.rows;
this.loadings = false;
});
this.reset();
getDevice(deviceId).then(response => {
......@@ -616,7 +740,6 @@ export default {
this.exportLoading = false;
}).catch(() => {});
},
/**动态添加输入框方法*/
addDomain() {
this.dynamicValidateForm.domains.push({
......@@ -635,8 +758,7 @@ export default {
}
},
/**提交数据方法*/
submitForm(formName) {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.deviceId != null) {
......@@ -645,12 +767,26 @@ export default {
this.open = false;
this.getList();
});
if ( this.datalist !=null){
var tDeviceInfon={
tDeviceInfo:this.form,
tDeviceInfoS:this.datalist
}
//重新绑定修改后的关联设备
updateDetailInfoLists(JSON.stringify(tDeviceInfon)).then(response => {
this.open = false;
this.getList();
});
}
} else {
this.$refs[formName].validate((valid) => {
alert("走的新增")
if (valid) {
//获取已经选中的下级设备id
const deviceIds = this.ids;
// alert(deviceIds)
var tDeviceInfon={
tDeviceInfo:this.form,
// tDeviceInfoS:this.dynamicValidateForm.domains
tDeviceInfoS:this.datalist
}
addDevice(JSON.stringify(tDeviceInfon)).then(response => {
this.msgSuccess("新增成功");
......@@ -661,7 +797,7 @@ export default {
console.log('error submit!!');
return false;
}
});
}
}
});
......@@ -669,6 +805,8 @@ export default {
},
/**关联设备添加方法*/
addDetailInfo(){
this.$refs["formDetailInfo"].validate(valid => {
if (valid) {
addDetailInfos(this.formDetailInfo).then(response => {
// this.tableData.push(this.formDetailInfo)
//关闭弹出层
......@@ -684,9 +822,11 @@ export default {
this.getDataList();
this.msgSuccess("新增成功");
});
},
}
/*关联设备单条删除方法*/
});
},
/**关联设备单条删除方法*/
deleteDetailInfo(row){
const deviceIds = row.relationDeviceDetailId;
this.$confirm('是否确认删除设备信息编号为"' + deviceIds + '"的数据项?', "警告", {
......@@ -701,7 +841,21 @@ export default {
this.msgSuccess("删除成功");
}).catch(() => {});
},
/**关联设备已经选中数据删除方法*/
deleteDataListilInfo(row,index){
const deviceIds = row.relationDeviceDetailId;
//判断form表单是否有id来验证是修改的删除还是添加的删除
if (this.form.deviceId != null) {
deleteDeviceDetailInfo(deviceIds).then(response => {
this.msgSuccess("删除成功");
this.DetailInfoList.splice(index,1);
});
}else {
this.DetailInfoList.splice(index,1);
this.msgSuccess("删除成功");
}
},
/**
* 批量删除关联设备方法
* @param row
......@@ -719,11 +873,11 @@ export default {
this.msgSuccess("删除成功");
}).catch(() => {});
},
/**添加关联设备与设备绑定的数据 (存储到数组中)*/
insertListDetailInfo(row){
//获取已经选中的下级设备id
const deviceIds = this.ids;
const li=this.datalist;
this.$confirm('是否确认添加关联设备信息?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -731,17 +885,41 @@ export default {
}).then(function() {
}).then(() => {
if (this.form.deviceId != null) {
//修改
this.DetailInfoList=this.DetailInfoList.concat(this.datalist)
//添加到数组中 以便下次使用
this.DetailInfoListId.push(deviceIds);
// alert(this.DetailInfoListId)
this.dialogTableVisible=false
this.msgSuccess("添加成功");
}else {
//添加
// this.DetailInfoList.push(this.datalist)
//清空数组数据 将之前的数据清空
this.DetailInfoListId.splice(row);
this.DetailInfoList=this.datalist;
//添加到数组中 以便下次使用
this.DetailInfoListId.push(deviceIds);
alert(this.DetailInfoListId)
console.log(deviceIds)
// alert(this.DetailInfoListId)
this.dialogTableVisible=false
this.msgSuccess("添加成功");
}
}).catch(() => {});
},
/**
* 选择关联设备查询方法
*/
selectDataListInfo(){
//查询下级设备数据
getDdeviceDetailInfo(this.dateQueryParams).then(response => {
//下级设备数据 到时候换成下级数据
this.tableData = response.rows;
this.detailTotal = response.total;
this.loadings = false;
//打开选择关联设备弹出框
this.dialogTableVisible = true
});
}
}
};
......
......@@ -115,7 +115,7 @@
<!-- 添加或修改燃气用户对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="用户账号" prop="username">
<el-input v-model="form.username" placeholder="请输入用户账号" />
</el-form-item>
......
......@@ -74,13 +74,13 @@
</el-row>
<el-table v-loading="loading" :data="equipmentList" >
<el-table-column label="用户名称" align="center" prop="userName" width="220px"/>
<el-table-column label="身份证号" align="center" prop="idCard"/>
<el-table-column label="用户名称" align="center" prop="userName" width="200px"/>
<el-table-column label="身份证号" align="center" prop="idCard" width="180px"/>
<el-table-column label="联系电话" align="center" prop="linkMobile"/>
<el-table-column label="详细地址" align="center" prop="userAddress" width="380px"/>
<el-table-column label="安装时间" align="center" prop="installTime"/>
<el-table-column label="品牌名称" align="center" prop="brandName" width="130px"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="品牌名称" align="center" prop="brandName"/>
<el-table-column label="操作" align="center" width="180px">
<template slot-scope="scope">
<el-button
size="mini"
......@@ -385,13 +385,13 @@ export default {
if (this.form.safeEquipmentId != null) {
updateEquipment(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.open1 = false;
this.getList();
});
} else {
addEquipment(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.open1 = false;
this.getList();
});
}
......
......@@ -67,7 +67,7 @@
<el-table v-loading="loading" :data="hiddenList" >
<el-table-column label="隐患名称" align="center" prop="hiddenTitle" width="200px"/>
<el-table-column label="隐患等级" align="center" prop="hiddenType" width="150px">
<el-table-column label="隐患等级" align="center" prop="hiddenType">
<template slot-scope="scope">
<span v-if="scope.row.hiddenType == '1'">一级隐患</span>
<span v-if="scope.row.hiddenType == '2'">二级隐患</span>
......@@ -75,9 +75,9 @@
</template>
</el-table-column>
<el-table-column label="隐患位置" align="center" prop="hiddenLocation" width="300px"/>
<el-table-column label="隐患发现人员" align="center" prop="hiddenFindPeople" width="150px"/>
<el-table-column label="隐患发现人员" align="center" prop="hiddenFindPeople"/>
<el-table-column label="发现时间" align="center" prop="hiddenFindDate" width="150px"/>
<el-table-column label="处理方案" align="center" prop="dealPlanUrl" width="150px">
<el-table-column label="处理方案" align="center" prop="dealPlanUrl">
<template slot-scope="scope">
<span
class="dbtn"
......@@ -89,13 +89,13 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="整治情况" align="center" prop="remediation" width="180px">
<el-table-column label="整治情况" align="center" prop="remediation">
<template slot-scope="scope">
<span v-if="scope.row.remediation != '' && scope.row.remediation != null">{{ scope.row.remediation }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" width="180px">
<template slot-scope="scope">
<el-button
size="mini"
......@@ -233,35 +233,33 @@
</div>
</el-dialog>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @cancel="cancel2">
<el-dialog :title="title2" :visible.sync="open2" width="1200px" append-to-body @cancel="cancel2" @close="cancel2">
<el-row>
<el-col :span="14">
<el-form ref="detailForm" :model="detailForm" label-width="120px">
<el-row>
<el-col :span="11">
<el-col :span="10">
<el-form-item label="隐患名称:">
<font>{{detailForm.hiddenTitle}}</font>
</el-form-item>
<el-form-item label="隐患发现人员:">
<font>{{detailForm.hiddenFindPeople}}</font>
</el-form-item>
<el-form-item label="隐患位置:">
<font>{{detailForm.hiddenLocation}}</font>
<el-form-item label="发现时间:">
<font>{{detailForm.hiddenFindDate}}</font>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="13">
<el-form-item label="隐患等级:">
<font v-if="detailForm.hiddenType == '1'">一级隐患</font>
<font v-if="detailForm.hiddenType == '2'">二级隐患</font>
<font v-if="detailForm.hiddenType == '3'">三级隐患</font>
</el-form-item>
<el-form-item label="发现时间:">
<font>{{detailForm.hiddenFindDate}}</font>
<el-form-item label="隐患位置:">
<font>{{detailForm.hiddenLocation}}</font>
</el-form-item>
<el-form-item label="处理方案:">
<span
class="dbtn"
@click="checkFile(detailForm.dealPlanUrl)"
v-if="detailForm.dealPlan != ''"
>
<span class="dbtn" @click="checkFile(detailForm.dealPlanUrl)" v-if="detailForm.dealPlan != ''">
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
......@@ -286,6 +284,14 @@
</el-form-item>
</el-row>
</el-form>
</el-col>
<el-col :span="9">
<div style="width: 100%;height: 390px;margin-top: -25px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
<div style="width: 100%;height: 100%" id="hiddenContainer"></div>
</div>
</el-col>
</el-row>
</el-dialog>
<GetPos
......@@ -301,15 +307,14 @@
<script>
import { listHidden, getHidden, delHidden, addHidden, updateHidden, exportHidden } from "@/api/standingBook/hidden";
import Editor from '@/components/Editor';
import FileUpload from '@/components/FileUpload';
import GetPos from '@/components/GetPos';
import { EditorMap } from "@/utils/mapClass/getPath.js";
let uploadfile = require("@/assets/uploadfile.png");
export default {
name: "Hidden",
components: {
Editor,
FileUpload,
GetPos
},
......@@ -344,6 +349,7 @@ export default {
// 地图
dialogTableVisible: false,
devicePos: [],
map: null,
// 查询参数
queryParams: {
pageNum: 1,
......@@ -406,11 +412,11 @@ export default {
this.open1 = false;
this.reset1();
this.fileList = [];
this.devicePos = [];
},
cancel2() {
this.open2 = false;
this.reset2();
this.map.destroy();
},
// 表单重置
reset1() {
......@@ -458,6 +464,7 @@ export default {
remarks: null
};
this.resetForm("detailForm");
this.devicePos = [];
},
/** 搜索按钮操作 */
handleQuery() {
......@@ -546,8 +553,16 @@ export default {
this.reset2();
getHidden(row.hiddenId).then(response => {
this.detailForm = response.data;
this.devicePos = [this.detailForm.longitude, this.detailForm.latitude];
this.open2 = true;
this.title2 = "隐患整治台账详情";
this.$nextTick(() => {
this.map = new EditorMap("hiddenContainer", {}, this);
this.map.addDevice({ path: this.devicePos });
this.map.nowMouseTarget = null;
this.map.mousetoolClose(false);
});
});
},
checkFile(url) {
......
......@@ -77,24 +77,30 @@
<el-table v-loading="loading" :data="troubleList" >
<el-table-column label="事故名称" align="center" prop="troubleName" width="200px"/>
<el-table-column label="事故类型" align="center" prop="troubleType" width="180px">
<el-table-column label="事故类型" align="center" prop="troubleType">
<template slot-scope="scope">
<span v-if="scope.row.troubleType == 1">生产安全事故</span>
<span v-if="scope.row.troubleType == 2">非生产安全事故</span>
</template>
</el-table-column>
<el-table-column label="事故地点" align="center" prop="troubleLocation" width="300px"/>
<el-table-column label="事故发生时间" align="center" prop="happenDate" width="180px"/>
<el-table-column label="事故发生时间" align="center" prop="happenDate" width="150px"/>
<el-table-column label="是否人员伤亡" align="center" prop="isCasualties" width="150px">
<template slot-scope="scope">
<span v-if="scope.row.isCasualties == 1"></span>
<span v-if="scope.row.isCasualties == 2"></span>
</template>
</el-table-column>
<el-table-column label="责任单位" align="center" prop="responsibleUnit" width="150px"/>
<el-table-column label="责任人员" align="center" prop="responsiblePeople" width="150px"/>
<el-table-column label="是否处理" align="center" prop="isDeal" width="120px">
<el-table-column label="责任人员" align="center" prop="responsiblePeople"/>
<el-table-column label="是否处理" align="center" prop="isDeal">
<template slot-scope="scope">
<span v-if="scope.row.isDeal == 1">已处理</span>
<span v-if="scope.row.isDeal == 2">未处理</span>
</template>
</el-table-column>
<!-- <el-table-column label="处理完成时间" align="center" prop="dealDate" width="180px"/>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" width="180px">
<template slot-scope="scope">
<el-button
size="mini"
......@@ -194,6 +200,28 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="是否人员伤亡" prop="isCasualties">
<el-select v-model="form.isCasualties" placeholder="请选择是否人员伤亡">
<el-option label="是" value="1" />
<el-option label="否" value="2" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="form.isCasualties == '1'">
<el-col :span="11">
<el-form-item label="受伤人数" prop="injuryNum">
<el-input v-model.number="form.injuryNum" placeholder="请输入受伤人数" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="死亡人数" prop="deathNum">
<el-input v-model.number="form.deathNum" placeholder="请输入死亡人数" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="责任单位" prop="responsibleUnit">
......@@ -242,10 +270,12 @@
</div>
</el-dialog>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @cancel="cancel2">
<el-dialog :title="title2" :visible.sync="open2" width="1200px" append-to-body @cancel="cancel2" @close="cancel2">
<el-row>
<el-col :span="14">
<el-form ref="detailForm" :model="detailForm" label-width="120px">
<el-row>
<el-col :span="11">
<el-col :span="10">
<el-form-item label="事故名称:">
<font>{{detailForm.troubleName}}</font>
</el-form-item>
......@@ -256,8 +286,12 @@
<font v-if="detailForm.responsibleUnit != '' && detailForm.responsibleUnit != null">{{detailForm.responsibleUnit}}</font>
<font v-else> - </font>
</el-form-item>
<el-form-item label="是否人员伤亡:">
<font v-if="detailForm.isCasualties == '1'"></font>
<font v-if="detailForm.isCasualties == '2'"></font>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="13">
<el-form-item label="事故类型:">
<font v-if="detailForm.troubleType == '1'">安全生产事故</font>
<font v-if="detailForm.troubleType == '2'">非生产安全事故</font>
......@@ -269,27 +303,36 @@
<font v-if="detailForm.responsiblePeople != '' && detailForm.responsiblePeople != null">{{detailForm.responsiblePeople}}</font>
<font v-else> - </font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="简要经过:">
<font v-if="detailForm.briefProcess != '' && detailForm.briefProcess != null">{{detailForm.briefProcess}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="是否处理:">
<font v-if="detailForm.isDeal == '1'">已处理</font>
<font v-if="detailForm.isDeal == '2'">未处理</font>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="detailForm.isCasualties == '1'">
<el-col :span="11">
<el-form-item label="受伤人数:">
<font>{{detailForm.injuryNum}}</font>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="处理完成时间:">
<font>{{detailForm.dealDate}}</font>
<el-form-item label="死亡人数:">
<font>{{detailForm.deathNum}}</font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="处理完成时间:">
<font v-if="detailForm.dealDate != '' && detailForm.dealDate != null">{{detailForm.dealDate}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="简要经过:">
<font v-if="detailForm.briefProcess != '' && detailForm.briefProcess != null">{{detailForm.briefProcess}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注信息:">
<font v-if="detailForm.remarks != '' && detailForm.remarks != null">{{detailForm.remarks}}</font>
......@@ -297,6 +340,14 @@
</el-form-item>
</el-row>
</el-form>
</el-col>
<el-col :span="9">
<div style="width: 100%;height: 390px;margin-top: -25px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
<div style="width: 100%;height: 100%" id="troubleContainer"></div>
</div>
</el-col>
</el-row>
</el-dialog>
<GetPos
......@@ -313,6 +364,7 @@
<script>
import { listTrouble, getTrouble, delTrouble, addTrouble, updateTrouble, exportTrouble } from "@/api/standingBook/trouble";
import GetPos from '@/components/GetPos';
import { EditorMap } from "@/utils/mapClass/getPath.js";
export default {
name: "Trouble",
......@@ -343,6 +395,7 @@ export default {
// 地图
dialogTableVisible: false,
devicePos: [],
map: null,
// 弹出层标题
title1: "",
title2: "",
......@@ -384,12 +437,18 @@ export default {
troubleReason: [
{ required: true, message: "请输入事故原因", trigger: "blur" },
],
isCasualties: [
{ required: true, message: "请选择是否人员伤亡", trigger: "change" },
],
responsibleUnit: [
{ required: true, message: "请输入责任单位", trigger: "blur" },
],
responsiblePeople: [
{ required: true, message: "请输入责任人员", trigger: "blur" },
],
isDeal: [
{ required: true, message: "请选择是否已处理", trigger: "change" },
],
}
};
},
......@@ -416,11 +475,11 @@ export default {
cancel1() {
this.open1 = false;
this.reset1();
this.devicePos = [];
},
cancel2() {
this.open2 = false;
this.reset2();
this.map.destroy();
},
// 表单重置
reset1() {
......@@ -433,6 +492,9 @@ export default {
troubleType: null,
briefProcess: null,
troubleReason: null,
isCasualties: null,
injuryNum: null,
deathNum: null,
responsibleUnit: null,
responsiblePeople: null,
isDeal: null,
......@@ -458,6 +520,9 @@ export default {
troubleType: null,
briefProcess: null,
troubleReason: null,
isCasualties: null,
injuryNum: null,
deathNum: null,
responsibleUnit: null,
responsiblePeople: null,
isDeal: null,
......@@ -471,6 +536,7 @@ export default {
remarks: null
};
this.resetForm("detailForm");
this.devicePos = [];
},
/** 搜索按钮操作 */
handleQuery() {
......@@ -505,13 +571,13 @@ export default {
if (this.form.troubleId != null) {
updateTrouble(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.open1 = false;
this.getList();
});
} else {
addTrouble(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.open1 = false;
this.getList();
});
}
......@@ -553,8 +619,17 @@ export default {
this.reset2();
getTrouble(row.troubleId).then(response => {
this.detailForm = response.data;
this.devicePos = [this.detailForm.longitude, this.detailForm.latitude];
console.log("this.devicePos",this.devicePos);
this.open2 = true;
this.title2 = "燃气事故台账详情";
this.$nextTick(() => {
this.map = new EditorMap("troubleContainer", {}, this);
this.map.addDevice({ path: this.devicePos });
this.map.nowMouseTarget = null;
this.map.mousetoolClose(false);
});
});
},
MapdialogFun() {
......
......@@ -104,20 +104,20 @@
<el-table v-loading="loading" :data="eventInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="事件id" align="center" prop="eventId" />
<!--<el-table-column label="事件id" align="center" prop="eventId" />-->
<el-table-column label="事件名称" align="center" prop="eventTitle" />
<el-table-column label="所属企业" align="center" prop="beyondEnterpriseName" />
<el-table-column label="事件类型" align="center" prop="eventType" :formatter="eventTypeFormat" />
<el-table-column label="事件等级" align="center" prop="eventLevel" :formatter="eventLevelFormat" />
<el-table-column label="事件地点" align="center" prop="eventLocation" />
<el-table-column label="报案时间" align="center" prop="reportTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.reportTime, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.reportTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="报案人" align="center" prop="reportPerson" />
<el-table-column label="事件处置信息" align="center" prop="eventDeal" />
<el-table-column label="事件评估信息" align="center" prop="eventAssessment" />
<el-table-column label="所属企业" align="center" prop="beyondEnterpriseId" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -128,6 +128,13 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['system:eventInfo:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document-copy"
@click="handleDtail(scope.row)"
>详情</el-button>
<el-button
<el-button
size="mini"
type="text"
......@@ -148,15 +155,15 @@
/>
<!-- 添加或修改事件处置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div class="division">
<div style="width: 50%">
<div style="width: 45%">
<el-form-item label="事件名称" prop="eventTitle">
<el-input v-model="form.eventTitle" placeholder="请输入事件名称" />
<el-input v-model="form.eventTitle" placeholder="请输入事件名称" :disabled="readonly"/>
</el-form-item>
<el-form-item label="事件类型" prop="eventType">
<el-select v-model="form.eventType" placeholder="请选择事件类型">
<el-select v-model="form.eventType" placeholder="请选择事件类型" :disabled="readonly">
<el-option
v-for="dict in eventTypeOptions"
:key="dict.dictValue"
......@@ -166,7 +173,7 @@
</el-select>
</el-form-item>
<el-form-item label="事件等级" prop="eventLevel">
<el-select v-model="form.eventLevel" placeholder="请选择事件等级">
<el-select v-model="form.eventLevel" placeholder="请选择事件等级" :disabled="readonly">
<el-option
v-for="dict in eventLevelOptions"
:key="dict.dictValue"
......@@ -176,27 +183,13 @@
</el-select>
</el-form-item>
<el-form-item label="事件地点" prop="eventLocation">
<el-input v-model="form.eventLocation" placeholder="请输入事件地点" />
</el-form-item>
<el-form-item label="图片上传" prop="iconUrl">
<el-upload
:action="uploadImgUrl"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-success ="uploadsuccess"
:on-remove="handleRemove"
:file-list="fileList">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
<!--<el-input v-model="form.iconUrl" type="textarea" placeholder="请输入内容" />-->
<el-input v-model="form.eventLocation" placeholder="请输入事件地点" :disabled="readonly"/>
</el-form-item>
</div>
<div style="width: 50%">
<el-form-item label="所属企业" prop="beyondEnterpriseId">
<el-select v-model="form.beyondEnterpriseId" placeholder="请选择预案等级" @change="qiyechang">
<el-select v-model="form.beyondEnterpriseName" placeholder="请选择预案等级" @change="qiyechang" :disabled="readonly">
<el-option
v-for = "dict in enterpriseList"
:key = "dict.enterpriseId"
......@@ -207,29 +200,49 @@
<!--<el-input v-model="form.beyondEnterpriseId" placeholder="请输入所属企业" />-->
</el-form-item>
<el-form-item label="报案人" prop="reportPerson">
<el-input v-model="form.reportPerson" placeholder="请输入报案人" />
<el-input v-model="form.reportPerson" placeholder="请输入报案人" :disabled="readonly"/>
</el-form-item>
<el-form-item label="报案时间" prop="reportTime">
<el-form-item label="报案时间" prop="reportTime" >
<el-date-picker clearable size="small"
v-model="form.reportTime"
type="date"
value-format="yyyy-MM-dd"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:disabled="readonly"
placeholder="选择报案时间">
</el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
<el-input v-model="form.remarks" placeholder="请输入备注" :disabled="readonly"/>
</el-form-item>
</div>
</div>
<el-form-item label="事件处置信息" prop="eventDeal">
<el-input v-model="form.eventDeal" type="textarea" placeholder="请输入事件处置信息" />
<el-form-item label="事件处置信息" prop="eventDeal" style="width: 60%">
<el-input v-model="form.eventDeal" type="textarea" placeholder="请输入事件处置信息" :disabled="readonly"/>
</el-form-item>
<el-form-item label="事件评估信息" prop="eventAssessment">
<el-input v-model="form.eventAssessment" type="textarea" placeholder="请输入事件评估信息" />
<el-form-item label="事件评估信息" prop="eventAssessment" style="width: 60%">
<el-input v-model="form.eventAssessment" type="textarea" placeholder="请输入事件评估信息" :disabled="readonly"/>
</el-form-item>
<el-form-item label="事件附件" prop="iconUrl" :style="display" >
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
style="width: 70%"
/>
<el-input v-show="false" disabled v-model="form.iconUrl"></el-input>
<!--<el-input v-model="form.iconUrl" type="textarea" placeholder="请输入内容" />-->
</el-form-item>
<el-form-item label="事件附件" prop="iconUrl" :style="display1">
<span
class="dbtn"
@click="checkFile(form.iconUrl)"
v-if="form.iconUrl != ''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</el-form-item>
<!--<el-form-item label="所属企业名称" prop="beyondEnterpriseName">-->
<!--<el-input v-model="form.beyondEnterpriseName" placeholder="请输入所属企业名称" />-->
<!--</el-form-item>-->
......@@ -247,10 +260,12 @@
<script>
import { listEventInfo, getEventInfo, delEventInfo, addEventInfo, updateEventInfo, exportEventInfo ,enterpriseList} from "@/api/system/eventInfo";
import FileUpload from '@/components/FileUpload';
let uploadfile = require("@/assets/uploadfile.png");
export default {
name: "EventInfo",
components: {
FileUpload
},
data() {
return {
......@@ -267,6 +282,8 @@ export default {
multiple: true,
// 显示搜索条件
showSearch: true,
readonly:false,
// 总条数
total: 0,
// 事件处置表格数据
......@@ -274,10 +291,10 @@ export default {
enterpriseList:[],
// 弹出层标题
title: "",
display:"",
display1:"display:none",
// 是否显示弹出层
open: false,
dialogImageUrl: '',
dialogVisible: false,
fileList:[],
// 事件类型:1.泄漏 2.火灾 3.爆炸字典
eventTypeOptions: [],
......@@ -346,20 +363,20 @@ export default {
});
},
//上传
handleRemove(file, fileList) {
//console.log(file, fileList);
document.getElementsByClassName("el-upload")[0].style.display=""
getFileInfo(res){
//this.form.dealPlan = res.fileName;
this.form.iconUrl = res.url;
this.fileList.push({
name: res.fileName,
url: uploadfile,
});
},
uploadsuccess(response){
this.form.iconUrl=response.url;
console.log(document.getElementsByClassName("el-upload")[0])
this.$nextTick(()=>{
document.getElementsByClassName("el-upload")[0].style.display="none"
})
listRemove(e) {
this.form.dealPlan = "";
this.fileList = [];
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
checkFile(url) {
window.open(url,'_blank');
},
qiyechang(value){
let obj = {};
......@@ -367,6 +384,7 @@ export default {
return item.enterpriseId === value;
});
this.form.beyondEnterpriseName = obj.enterpriseName;
this.form.beyondEnterpriseId = value;
},
// 事件类型:1.泄漏 2.火灾 3.爆炸字典翻译
eventTypeFormat(row, column) {
......@@ -425,15 +443,32 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.fileList = [];
this.readonly = false;
this.reset();
this.open = true;
this.title = "添加事件处置";
this.$nextTick(()=>{
document.getElementsByClassName("el-upload")[0].style.display=""
})
this.display="";
this.display1="display:none";
},
handleDtail(row){
this.fileList = [];
this.readonly = true;
this.reset();
this.open = true;
const eventId = row.eventId || this.ids
getEventInfo(eventId).then(response => {
this.form = response.data;
this.title = "修改事件处置";
if(row.iconUrl!=null){
this.fileList = [{name: '附件', url: uploadfile}];
}
this.display="display:none";
this.display1="";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.readonly = false;
this.fileList = [];
this.reset();
const eventId = row.eventId || this.ids
......@@ -441,12 +476,11 @@ export default {
this.form = response.data;
this.open = true;
this.title = "修改事件处置";
if(row.iconUrl!=null){
this.fileList = [{name: 'file', url: row.iconUrl}];
this.$nextTick(()=>{
document.getElementsByClassName("el-upload")[0].style.display="none"
})
if(this.form.iconUrl!=null){
this.fileList = [{name: '附件', url: uploadfile}];
}
this.display="";
this.display1="display:none";
});
},
/** 提交按钮 */
......@@ -507,4 +541,20 @@ export default {
flex-direction:row;
justify-content:flex-start;
}
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
</style>
<style lang="scss" scoped>
::v-deep .el-select{
width: 100%;
}
</style>
......@@ -97,14 +97,26 @@
<el-table-column type="selection" width="55" align="center" />
<!--<el-table-column label="预案id" align="center" prop="planId" />-->
<el-table-column label="预案标题" align="center" prop="planTitle" />
<el-table-column label="所属企业名称" align="center" prop="beyondEnterpriseName" />
<el-table-column label="预案类型" align="center" prop="planType" :formatter="planTypeFormat"/>
<el-table-column label="预案等级" align="center" prop="planLevel" :formatter="planLevelFormat"/>
<el-table-column label="所属企业名称" align="center" prop="beyondEnterpriseName" />
<el-table-column label="应急方案" align="center" prop="planContents" />
<!--<el-table-column label="应急方案" align="center" prop="planContents" />-->
<el-table-column label="应急设备及车辆" align="center" prop="planEquipment" />
<el-table-column label="方案附件" align="center" prop="dealPlanUrl" width="150px">
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.iconUrl)"
v-if="scope.row.iconUrl != ''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remarks" />
......@@ -117,6 +129,12 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['system:planInfo:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document-copy"
@click="handleDtail(scope.row)"
>详情</el-button>
<el-button
size="mini"
type="text"
......@@ -137,15 +155,16 @@
/>
<!-- 添加或修改应急预案对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div class="division">
<div style="width: 50%;">
<el-form-item label="预案标题" prop="planTitle">
<el-input v-model="form.planTitle" placeholder="请输入预案标题" />
<div style="width: 40%;">
<div class="titletitle">预案基本信息</div>
<el-form-item label="预案标题" prop="planTitle" >
<el-input v-model="form.planTitle" placeholder="请输入预案标题" :disabled="readonly"/>
</el-form-item>
<el-form-item label="预案类型" prop="planType">
<el-select v-model="form.planType" placeholder="请选择预案类型">
<el-select v-model="form.planType" placeholder="请选择预案类型" :disabled="readonly">
<el-option
v-for = "dict in planTypeList"
:key = "dict.dictValue"
......@@ -155,7 +174,7 @@
</el-select>
</el-form-item>
<el-form-item label="预案等级" prop="planLevel">
<el-select v-model="form.planLevel" placeholder="请选择预案等级">
<el-select v-model="form.planLevel" placeholder="请选择预案等级" :disabled="readonly">
<el-option
v-for = "dict in planLevelList"
:key = "dict.dictValue"
......@@ -164,38 +183,8 @@
/>
</el-select>
</el-form-item>
<el-form-item label="预案图片" prop="iconUrl">
<el-upload
:action="uploadImgUrl"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-success ="uploadsuccess"
:on-remove="handleRemove"
:file-list="fileList">
<i class="el-icon-plus"></i>
<!--<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-form-item>
<el-form-item label="应急方案" prop="planContents">
<el-upload
class="upload-demo"
:action="uploadImgUrl"
:on-success="uploadsuccess2"
:on-remove="handleRemove2"
:file-list="fileList2"
list-type="text">
<el-button size="small" id = "uploadfang" type="primary">点击上传</el-button>
<!--<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
</el-upload>
</el-form-item>
</div>
<div style="width: 50%;">
<el-form-item label="所属企业" prop="beyondEnterpriseId">
<el-select v-model="form.beyondEnterpriseId" placeholder="请选择预案等级" @change="qiyechang">
<el-form-item label="所属企业" prop="beyondEnterpriseName">
<el-select v-model="form.beyondEnterpriseName" placeholder="请选择预案等级" @change="qiyechang" :disabled="readonly">
<el-option
v-for = "dict in enterpriseList"
:key = "dict.enterpriseId"
......@@ -204,13 +193,45 @@
/>
</el-select>
</el-form-item>
<el-form-item label="应急设备车辆" prop="planEquipment">
<el-input v-model="form.planEquipment" placeholder="请输入应急设备及车辆" />
<el-form-item label="应急设备车辆" prop="planEquipment" >
<el-input v-model="form.planEquipment" placeholder="请输入应急设备及车辆" :disabled="readonly"/>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
<el-input v-model="form.remarks" placeholder="请输入备注" :disabled="readonly" />
</el-form-item>
<el-form-item label="预案附件" id="fujian" prop="iconUrl">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="form.iconUrl"></el-input>
<!--<el-dialog :visible.sync="dialogVisible">-->
<!--<img width="100%" :src="dialogImageUrl" alt="">-->
<!--</el-dialog>-->
</el-form-item>
<el-form-item label="预案附件" id="fujianxia" prop="iconUrl" style="display: none">
<span
class="dbtn"
@click="checkFile(form.iconUrl)"
v-if="form.iconUrl != ''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
<!--<el-input v-model="fileurl" placeholder="" />-->
</el-form-item>
</div>
<div style="width: 58%;margin-left: 2%">
<div class="titletitle">方案内容</div>
<!--<el-form-item label="应急方案" prop="planContents">-->
<!--<el-input v-model="form.planContents" placeholder="" />-->
<editor v-model="form.planContents" style="height: 300px;" :readOnly="readonly"/>
<!--<textarea id="editorA" v-model="form.planContents" height="100%"></textarea>-->
<!--</el-form-item>-->
</div>
</div>
......@@ -223,7 +244,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button id="yesbutton" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
......@@ -232,16 +253,19 @@
<script>
import { listPlanInfo, getPlanInfo, delPlanInfo, addPlanInfo, updatePlanInfo, exportPlanInfo,enterpriseList } from "@/api/system/planInfo";
import Editor from '@/components/Editor';
import FileUpload from '@/components/FileUpload';
let uploadfile = require("@/assets/uploadfile.png");
export default {
name: "PlanInfo",
components: {
Editor,FileUpload
},
data() {
return {
uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
// 遮罩层
loading: true,
readonly: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
......@@ -266,7 +290,7 @@ export default {
dialogImageUrl: '',
dialogVisible: false,
fileList:[],
fileList2:[],
fileurl:'',
// 查询参数
queryParams: {
pageNum: 1,
......@@ -283,7 +307,7 @@ export default {
planTitle: [
{ required: true, message: "标题不能为空", trigger: "blur" }
],
beyondEnterpriseId: [
beyondEnterpriseName: [
{ required: true, message: "所属企业不能为空", trigger: "blur" }
],
planType: [
......@@ -322,40 +346,55 @@ export default {
});
},
qiyechang(value){
console.log(value)
let obj = {};
obj = this.enterpriseList.find((item)=>{
return item.enterpriseId === value;
});
this.form.beyondEnterpriseName = obj.enterpriseName;
this.form.beyondEnterpriseId = value;
},
//上传图片
uploadsuccess(response){
this.form.iconUrl=response.url;
//console.log(document.getElementsByClassName("el-upload--picture-card"))
document.getElementsByClassName("el-upload--picture-card")[0].style.display="none";
},
handleRemove(file, fileList) {
document.getElementsByClassName("el-upload--picture-card")[0].style.display="";
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
//上传
getFileInfo(res){
//this.form.dealPlan = res.fileName;
this.form.iconUrl = res.url;
this.fileList.push({
name: res.fileName,
url: uploadfile,
});
},
//上传方案
handleRemove2(file, fileList) {
document.getElementById("uploadfang").style.display="";
listRemove(e) {
this.form.dealPlan = "";
this.fileList = [];
},
uploadsuccess2(response){
this.form.planContents=response.url;
document.getElementById("uploadfang").style.display="none";
checkFile(url) {
window.open(url,'_blank');
},
// 取消按钮
cancel() {
this.fileList = [];
this.fileList2 = [];
this.open = false;
this.reset();
},
//点击下载
downloadFile() {
var item = this.fileurl;
var title = item.split("/")[item.split("/").length-1];
this.download(item,title);
},
download (src, fileName) {
let x = new XMLHttpRequest();
x.open("GET", src, true);
x.responseType = 'blob';
x.onload = function(e) {
let url = window.URL.createObjectURL(x.response)
let a = document.createElement('a');
a.href = url
a.download = fileName
a.click()
}
x.send();
},
// 表单重置
reset() {
this.form = {
......@@ -395,36 +434,54 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.open = true;
this.readonly=false;
this.fileList = [];
this.fileList2 = [];
this.reset();
this.open = true;
this.title = "添加应急预案";
document.getElementById("fujian").style.display=""
document.getElementById("fujianxia").style.display="none"
document.getElementById("yesbutton").style.display="" ;
document.getElementsByClassName("el-upload--picture-card")[0].style.display="";
document.getElementById("uploadfang").style.display="";
},
handleDtail(row){
this.readonly=true;
this.fileList = [];
this.reset();
this.open = true;
const planId = row.planId || this.ids
getPlanInfo(planId).then(response => {
this.form = response.data;
this.title = "应急预案详情";
this.fileList = [{name: '附件', url:uploadfile}];
this.fileurl = row.iconUrl;
document.getElementById("yesbutton").style.display="none" ;
document.getElementById("fujian").style.display="none"
document.getElementById("fujianxia").style.display=""
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.readonly=false;
this.fileList = [];
this.fileList2 = [];
this.reset();
const planId = row.planId || this.ids
getPlanInfo(planId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改应急预案";
if(row.iconUrl!=null||row.iconUrl==""){
this.fileList = [{name: 'file', url: row.iconUrl}];
if(this.form.iconUrl!=null||this.form.iconUrl==""){
this.fileList = [{name: 'file', url:uploadfile}];
this.$nextTick(()=>{
document.getElementsByClassName("el-upload--picture-card")[0].style.display="none"
document.getElementById("yesbutton").style.display="" ;
})
}
if(row.planContents!=null||row.planContents==""){
this.fileList2 = [{name: 'file2', url: row.planContents}];
this.$nextTick(()=>{
document.getElementById("uploadfang").style.display="none"
})
}
document.getElementById("fujian").style.display=""
document.getElementById("fujianxia").style.display="none"
});
},
/** 提交按钮 */
......@@ -495,4 +552,27 @@ export default {
flex-direction:row;
justify-content:flex-start;
}
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
.titletitle{
background: #1c84c6;
color: white;height:
20px;line-height:
20px;text-align: center;
margin-bottom: 10px;
}
</style>
<style lang="scss" scoped>
::v-deep .el-select{
width: 100%;
}
</style>
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