main
liukewei 1 year ago
parent 4bc61f05c7
commit 37069a1bc2

@ -0,0 +1,142 @@
package com.ruoyi.web.controller.ehs;
import java.util.List;
import java.util.Arrays;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.StringUtils;
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 io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.ehsHiddenDanger.domain.EhsHiddenDanger;
import com.ruoyi.ehsHiddenDanger.service.IEhsHiddenDangerService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2023-12-11
*/
@Api(tags="隐患信息管理")
@RestController
@RequestMapping("/ehsHiddenDanger/ehsHiddenDanger")
public class EhsHiddenDangerController extends BaseController
{
@Autowired
private IEhsHiddenDangerService ehsHiddenDangerService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:list')")
@GetMapping("/list")
public TableDataInfo list(EhsHiddenDanger ehsHiddenDanger)
{
startPage();
List<EhsHiddenDanger> list = ehsHiddenDangerService.selectEhsHiddenDangerList(ehsHiddenDanger);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:export')")
@Log(title = "隐患信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EhsHiddenDanger ehsHiddenDanger)
{
List<EhsHiddenDanger> list = ehsHiddenDangerService.selectEhsHiddenDangerList(ehsHiddenDanger);
ExcelUtil<EhsHiddenDanger> util = new ExcelUtil<EhsHiddenDanger>(EhsHiddenDanger.class);
util.exportExcel(response, list, "隐患信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:query')")
@GetMapping(value = "/{hiddenDangerId}")
public AjaxResult getInfo(@PathVariable("hiddenDangerId") Long hiddenDangerId)
{
EhsHiddenDanger ehsHiddenDanger = ehsHiddenDangerService.selectEhsHiddenDangerByHiddenDangerId(hiddenDangerId);
if(StringUtils.isNotEmpty(ehsHiddenDanger.getHiddenDangerLabel()) ){
String[] s = ehsHiddenDanger.getHiddenDangerLabel().split(",");
ehsHiddenDanger.setHiddenDangerLabelArray(s);
}
return success(ehsHiddenDanger);
}
/**
*
*/
@ApiOperation("新增隐患信息")
@PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:add')")
@Log(title = "隐患信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EhsHiddenDanger ehsHiddenDanger)
{
return toAjax(ehsHiddenDangerService.save(ehsHiddenDanger));
}
/**
*
*/
@ApiOperation("修改隐患信息")
@PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:edit')")
@Log(title = "隐患信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EhsHiddenDanger ehsHiddenDanger)
{
return toAjax(ehsHiddenDangerService.updateById(ehsHiddenDanger));
}
/**
*
*/
@ApiOperation("删除隐患信息")
@PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:remove')")
@Log(title = "隐患信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{hiddenDangerIds}")
public AjaxResult remove(@PathVariable Long[] hiddenDangerIds)
{
return toAjax(ehsHiddenDangerService.removeByIds(Arrays.asList(hiddenDangerIds)));
}
/**
*
*/
@ApiOperation("督办隐患信息")
//@PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:supervise')")
@Log(title = "督办信息", businessType = BusinessType.UPDATE)
@GetMapping("/supervise/{hiddenDangerIds}")
public AjaxResult supervise(@PathVariable Long[] hiddenDangerIds)
{
return toAjax(ehsHiddenDangerService.superviseEhsHiddenDanger(hiddenDangerIds));
}
/**
*
*/
@ApiOperation("协办隐患信息")
@PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:assist')")
@Log(title = "协办信息", businessType = BusinessType.UPDATE)
@GetMapping("/assist")
public AjaxResult assist( EhsHiddenDanger ehsHiddenDanger )
{
return toAjax(ehsHiddenDangerService.assistEhsHiddenDanger(ehsHiddenDanger));
}
}

@ -1,5 +1,6 @@
package com.ruoyi.web.controller.ehs; package com.ruoyi.web.controller.ehs;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Arrays; import java.util.Arrays;
@ -88,9 +89,26 @@ public class EhsMaterialDetailController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody EhsMaterialDetail ehsMaterialDetail) public AjaxResult add(@RequestBody EhsMaterialDetail ehsMaterialDetail)
{ {
ehsMaterialDetail.setSendTime(new Date()); if(ehsMaterialDetail.getOperateType()==0) {//出库指令新增
ehsMaterialDetail.setSendUserId(SecurityUtils.getUserId()); ehsMaterialDetail.setSendUserId(SecurityUtils.getUserId());
return toAjax(ehsMaterialDetailService.save(ehsMaterialDetail)); ehsMaterialDetail.setSendTime(new Date());
}else{//入库新增
//跟新明细表
ehsMaterialDetail.setOutboundTime(new Date());
ehsMaterialDetail.setOutboundUserId(SecurityUtils.getUserId());
}
//更新物资表数量
EhsMaterial ehsMaterial = ehsMaterialService.selectEhsMaterialByMaterialId(ehsMaterialDetail.getMaterialId());
BigDecimal string1 = new BigDecimal(ehsMaterial.getMaterialQuantity());//主表的数量
BigDecimal string2 = new BigDecimal(
ehsMaterialDetail.getOperateType()==1?ehsMaterialDetail.getOutboundQuantity():ehsMaterialDetail.getSendQuantity());//入库指令的数量
BigDecimal result2 = string1.add(string2);//库存
ehsMaterial = new EhsMaterial();
ehsMaterial.setMaterialQuantity(ehsMaterialDetail.getOperateType()==1?result2.toString():null);
ehsMaterial.setMaterialId(ehsMaterialDetail.getMaterialId());
ehsMaterialDetail.setInventory(result2);
ehsMaterialDetailService.save(ehsMaterialDetail);//
return toAjax(ehsMaterialService.updateById(ehsMaterial));
} }
/** /**
@ -102,14 +120,33 @@ public class EhsMaterialDetailController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody EhsMaterialDetail ehsMaterialDetail) public AjaxResult edit(@RequestBody EhsMaterialDetail ehsMaterialDetail)
{ {
ehsMaterialDetail.setOutboundTime(new Date());
ehsMaterialDetail.setOutboundUserId(SecurityUtils.getUserId()); EhsMaterialDetail md = new EhsMaterialDetail();
EhsMaterialDetail md = ehsMaterialDetailService.selectEhsMaterialDetailByMaterialDetailId(ehsMaterialDetail.getMaterialDetailId()); md.setMaterialId(ehsMaterialDetail.getMaterialId());
ehsMaterialDetail.setOutboundQuantity(md.getOutboundQuantity()) ; md.setGetOut("1");//查询操作人为空的
//更新物资表数量 md.setOperateType(0);//查询出库操作
EhsMaterial ehsMaterial = ehsMaterialService.selectEhsMaterialByMaterialId(ehsMaterialDetail.getMaterialDetailId()); List<EhsMaterialDetail> list = ehsMaterialDetailService.selectEhsMaterialDetailList(md);
ehsMaterial.setMaterialQuantity(String.valueOf(Long.parseLong(ehsMaterial.getMaterialQuantity())- Long.parseLong(md.getSendQuantity()) )); if(list.size()>0){
return toAjax(ehsMaterialDetailService.updateById(ehsMaterialDetail)); ehsMaterialDetail.setOutboundQuantity(list.get(0).getOutboundQuantity()) ;
//更新物资表数量
EhsMaterial ehsMaterial = ehsMaterialService.selectEhsMaterialByMaterialId(ehsMaterialDetail.getMaterialId());
BigDecimal string1 = new BigDecimal(ehsMaterial.getMaterialQuantity());//主表的数量
BigDecimal string2 = new BigDecimal(list.get(0).getSendQuantity());//出库指令的数量
BigDecimal result2 = string1.subtract(string2);//库存
ehsMaterial = new EhsMaterial();
ehsMaterial.setMaterialQuantity(result2.toString());
ehsMaterial.setMaterialId(ehsMaterialDetail.getMaterialId());
ehsMaterialService.updateById(ehsMaterial);
////更新明细表
md = new EhsMaterialDetail();
md.setMaterialDetailId(list.get(0).getMaterialDetailId());
md.setOutboundTime(new Date());
md.setOutboundUserId(SecurityUtils.getUserId());
md.setOutboundQuantity(list.get(0).getSendQuantity());
md.setInventory(result2);
return toAjax(ehsMaterialDetailService.updateById(md));
}
return error("未查询到出库指令");
} }
/** /**

@ -191,4 +191,11 @@ public class EhsNoticeMessageController extends BaseController
} }
return success(ehsNoticeMessage); return success(ehsNoticeMessage);
} }
@GetMapping(value = "/displayDetail/{noticeMessageId}")
public AjaxResult displayDetail(@PathVariable("noticeMessageId") Long noticeMessageId)
{
EhsNoticeMessage ehsNoticeMessage = ehsNoticeMessageService.selectEhsNoticeMessageByNoticeMessageId(noticeMessageId);
return success(ehsNoticeMessage);
}
} }

@ -1,9 +1,13 @@
package com.ruoyi.web.controller.ehs; package com.ruoyi.web.controller.ehs;
import java.io.*;
import java.net.URLEncoder;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Arrays; import java.util.Arrays;
import java.util.Map; import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysDept;
@ -155,4 +159,43 @@ public class EhsNoticeMessageFileController extends BaseController
} }
return getDataTable(fileList); return getDataTable(fileList);
} }
@GetMapping("/downloadlist/{id}")
public void downLoadList( @PathVariable("id") Long id, HttpServletResponse response ) throws UnsupportedEncodingException {
EhsNoticeMessage ehsNoticeMessage = ehsNoticeMessageService.selectEhsNoticeMessageByNoticeMessageId(id);
response.reset();
response.setHeader("Content-Disposition","attachment; filename=" + URLEncoder.encode(ehsNoticeMessage.getTitle()+"附件.zip", "UTF-8"));
response.setCharacterEncoding("utf-8");
response.setContentType("application/octet-stream");
try(ZipOutputStream zipOutputStream=new ZipOutputStream(new BufferedOutputStream(response.getOutputStream())))
{
EhsNoticeMessageFile ehsNoticeMessageFile = new EhsNoticeMessageFile();
ehsNoticeMessageFile.setNoticeMessageId(id);
List<EhsNoticeMessageFile> fileList = ehsNoticeMessageFileService.selectEhsNoticeMessageFileList(ehsNoticeMessageFile);
for(EhsNoticeMessageFile efile:fileList)
{
File file =new File(efile.getFileName());
String fileName=file.getName();
ZipEntry ze = new ZipEntry(fileName);
zipOutputStream.putNextEntry(ze);
try(BufferedInputStream bis=new BufferedInputStream(new FileInputStream(file))){
byte[] bytes = new byte[1024];
int i=0;
while((i=bis.read(bytes))!=-1)
{
zipOutputStream.write(bytes,0,i);
}
zipOutputStream.closeEntry();
}catch (Exception e)
{
e.printStackTrace();
}
}
}catch (Exception e)
{
e.printStackTrace();
}
}
} }

@ -3,10 +3,6 @@ package com.ruoyi.web.controller.ehs;
import java.util.List; import java.util.List;
import java.util.Arrays; import java.util.Arrays;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.ehsRisk.domain.EhsRisk;
import com.ruoyi.ehsRisk.service.IEhsRiskService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -23,6 +19,8 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.ehsRisk.domain.EhsRisk;
import com.ruoyi.ehsRisk.service.IEhsRiskService;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
@ -30,58 +28,56 @@ import com.ruoyi.common.core.page.TableDataInfo;
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-12-04 * @date 2023-12-13
*/ */
@Api(tags="风险信息管理") @Api(tags="风险信息管理")
@RestController @RestController
@RequestMapping("/system/risk") @RequestMapping("/ehsRisk/ehsRisk")
public class EhsRiskController extends BaseController public class EhsRiskController extends BaseController
{ {
@Autowired @Autowired
private IEhsRiskService ehsRiskService; private IEhsRiskService ehsRiskService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:list')")
@GetMapping("/list")
public TableDataInfo list(EhsRisk ehsRisk)
{
startPage();
List<EhsRisk> list = ehsRiskService.selectEhsRiskList(ehsRisk);
return getDataTable(list);
}
/** /**
* *
*/ */
@PreAuthorize("@ss.hasPermi('system:risk:list')") @PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:export')")
@GetMapping("/list") @Log(title = "风险信息", businessType = BusinessType.EXPORT)
public TableDataInfo list(EhsRisk ehsRisk) @PostMapping("/export")
{ public void export(HttpServletResponse response, EhsRisk ehsRisk)
startPage(); {
List<EhsRisk> list = ehsRiskService.selectEhsRiskList(ehsRisk); List<EhsRisk> list = ehsRiskService.selectEhsRiskList(ehsRisk);
return getDataTable(list); ExcelUtil<EhsRisk> util = new ExcelUtil<EhsRisk>(EhsRisk.class);
} util.exportExcel(response, list, "风险信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:risk:export')")
@Log(title = "风险信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EhsRisk ehsRisk)
{
List<EhsRisk> list = ehsRiskService.selectEhsRiskList(ehsRisk);
ExcelUtil<EhsRisk> util = new ExcelUtil<EhsRisk>(EhsRisk.class);
util.exportExcel(response, list, "风险信息数据");
}
/** /**
* *
*/ */
@PreAuthorize("@ss.hasPermi('system:risk:query')") @PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:query')")
@GetMapping(value = "/{riskId}") @GetMapping(value = "/{riskId}")
public AjaxResult getInfo(@PathVariable("riskId") Long riskId) public AjaxResult getInfo(@PathVariable("riskId") Long riskId)
{ {
return success(ehsRiskService.selectEhsRiskByRiskId(riskId)); return success(ehsRiskService.selectEhsRiskByRiskId(riskId));
} }
/** /**
* *
*/ */
@ApiOperation("新增风险信息") @ApiOperation("新增风险信息")
@PreAuthorize("@ss.hasPermi('system:risk:add')") @PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:add')")
@Log(title = "风险信息", businessType = BusinessType.INSERT) @Log(title = "风险信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody EhsRisk ehsRisk) public AjaxResult add(@RequestBody EhsRisk ehsRisk)
@ -93,7 +89,7 @@ public class EhsRiskController extends BaseController
* *
*/ */
@ApiOperation("修改风险信息") @ApiOperation("修改风险信息")
@PreAuthorize("@ss.hasPermi('system:risk:edit')") @PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:edit')")
@Log(title = "风险信息", businessType = BusinessType.UPDATE) @Log(title = "风险信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody EhsRisk ehsRisk) public AjaxResult edit(@RequestBody EhsRisk ehsRisk)
@ -105,11 +101,11 @@ public class EhsRiskController extends BaseController
* *
*/ */
@ApiOperation("删除风险信息") @ApiOperation("删除风险信息")
@PreAuthorize("@ss.hasPermi('system:risk:remove')") @PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:remove')")
@Log(title = "风险信息", businessType = BusinessType.DELETE) @Log(title = "风险信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{riskIds}") @DeleteMapping("/{riskIds}")
public AjaxResult remove(@PathVariable Long[] riskIds) public AjaxResult remove(@PathVariable Long[] riskIds)
{ {
return toAjax(ehsRiskService.removeByIds(Arrays.asList(riskIds))); return toAjax(ehsRiskService.removeByIds(Arrays.asList(riskIds)));
} }
} }

@ -39,7 +39,7 @@ public class EhsEnterprise extends BaseEntity
private String enterpriseName; private String enterpriseName;
/** 行业 */ /** 行业 */
@Excel(name = "行业") @Excel(name = "行业", dictType = "enterprise_type")
private String enterpriseType; private String enterpriseType;
/** 生产经营地址 */ /** 生产经营地址 */
@ -78,4 +78,10 @@ public class EhsEnterprise extends BaseEntity
@Excel(name = "分管安全副职电话") @Excel(name = "分管安全副职电话")
private String safetyManagerTel; private String safetyManagerTel;
@Excel(name = "行政区域")
private String areaId;
@Excel(name = "经济类型")
private String economicType;
@Excel(name = "企业规模")
private String enterpriseScale;
} }

@ -3,6 +3,7 @@ package com.ruoyi.ehsEnterprise.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
@ -45,6 +46,10 @@ public class EhsEnterpriseServiceImpl extends ServiceImpl<EhsEnterpriseMapper, E
@Override @Override
public List<EhsEnterprise> selectEhsEnterpriseList(EhsEnterprise ehsEnterprise) public List<EhsEnterprise> selectEhsEnterpriseList(EhsEnterprise ehsEnterprise)
{ {
if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null &&
SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0){
ehsEnterprise.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue());
}
return ehsEnterpriseMapper.selectEhsEnterpriseList(ehsEnterprise); return ehsEnterpriseMapper.selectEhsEnterpriseList(ehsEnterprise);
} }

@ -0,0 +1,136 @@
package com.ruoyi.ehsHiddenDanger.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.math.BigDecimal;
import java.util.Date;
/**
* ehs_hidden_danger
*
* @author ruoyi
* @date 2023-12-11
*/
@Data
@ToString
@NoArgsConstructor
@Accessors(chain = true)
@TableName("ehs_hidden_danger")
public class EhsHiddenDanger extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
@TableId(type= IdType.AUTO)
private Long hiddenDangerId;
/** 隐患所在单位 */
@Excel(name = "隐患所在单位")
private String enterpriseName;
/** 企业现状0停业、1正常经营 */
@Excel(name = "企业现状", readConverterExp = "0=停业、1正常经营")
private String enterpriseStatus;
/** 行业 字典 */
@Excel(name = "行业" , dictType = "enterprise_type")
private String enterpriseType;
/** 隐患情况 */
@Excel(name = "隐患情况")
private String hiddenDangerDesc;
/** 排查时间 */
@Excel(name = "排查时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date checkTime;
/** 排查方式 */
@Excel(name = "排查方式")
private String checkType;
/** 隐患照片 */
@Excel(name = "隐患照片")
private String hiddenDangerImg;
/** 整改措施 */
@Excel(name = "整改措施")
private String rectifyMeasure;
/** 整改进度 */
@Excel(name = "整改进度")
private String status;
/** 整改时间 */
@Excel(name = "整改时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date rectifyTime;
/** 整改责任人 */
@Excel(name = "整改责任人")
private Long principalName;
/** 整改照片 */
@Excel(name = "整改照片")
private String rectifyImg;
/** 监管部门 */
@Excel(name = "监管部门")
private String regulatoryDept;
/** 监管部门责任人 */
@Excel(name = "监管部门责任人")
private String regulatoryName;
/** 隐患级别 */
@Excel(name = "隐患级别")
private String hiddenDangerGrade;
/** 隐患类型 */
@Excel(name = "隐患类型")
private String hiddenDangerType;
/** 标签 */
@Excel(name = "标签")
private String hiddenDangerLabel;
@Excel(name = "是否督办")
private Long isSupervise;
@Excel(name = "协办部门列表")
private String assistDept;
@Excel(name = "督办结果")
private String superviseResult;
@TableField(exist = false)
private String hiddenDangerIds;
@TableField(exist = false)
private String assistDeptName;
@TableField(exist = false)
private String[] hiddenDangerLabelArray;
@Excel(name = "整改期限", width = 30, dateFormat = "yyyy-MM-dd")
private Date rectifyTermTime;
/** 整改资金 */
@Excel(name = "整改资金")
private BigDecimal rectifyMoney;
@Excel(name = "行政区域")
private String areaId;
@Excel(name = "经济类型")
private String economicType;
@Excel(name = "企业规模")
private String enterpriseScale;
}

@ -0,0 +1,42 @@
package com.ruoyi.ehsHiddenDanger.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.ehsHiddenDanger.domain.EhsHiddenDanger;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2023-12-11
*/
public interface EhsHiddenDangerMapper extends BaseMapper<EhsHiddenDanger> {
/**
*
*
* @param hiddenDangerId
* @return
*/
public EhsHiddenDanger selectEhsHiddenDangerByHiddenDangerId(Long hiddenDangerId);
/**
*
*
* @param ehsHiddenDanger
* @return
*/
public List<EhsHiddenDanger> selectEhsHiddenDangerList(EhsHiddenDanger ehsHiddenDanger);
/**
*
*
* @param hiddenDangerIds ID
*/
public int superviseEhsHiddenDanger(Long[] hiddenDangerIds);
/**
*
*
* @param ehsHiddenDanger ID
*/
public int assistEhsHiddenDanger(EhsHiddenDanger ehsHiddenDanger);
}

@ -0,0 +1,42 @@
package com.ruoyi.ehsHiddenDanger.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.ehsHiddenDanger.domain.EhsHiddenDanger;
/**
* Service
*
* @author ruoyi
* @date 2023-12-11
*/
public interface IEhsHiddenDangerService extends IService<EhsHiddenDanger> {
/**
*
*
* @param hiddenDangerId
* @return
*/
public EhsHiddenDanger selectEhsHiddenDangerByHiddenDangerId(Long hiddenDangerId);
/**
*
*
* @param ehsHiddenDanger
* @return
*/
public List<EhsHiddenDanger> selectEhsHiddenDangerList(EhsHiddenDanger ehsHiddenDanger);
/**
*
*
* @param hiddenDangerIds
*/
int superviseEhsHiddenDanger(Long[] hiddenDangerIds);
/**
*
*
* @param ehsHiddenDanger ID
*/
public int assistEhsHiddenDanger(EhsHiddenDanger ehsHiddenDanger);
}

@ -0,0 +1,115 @@
package com.ruoyi.ehsHiddenDanger.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.common.utils.StringUtils;
import java.util.List;
import java.util.Map;
import com.ruoyi.ehsHiddenDanger.mapper.EhsHiddenDangerMapper;
import com.ruoyi.ehsHiddenDanger.domain.EhsHiddenDanger;
import com.ruoyi.ehsHiddenDanger.service.IEhsHiddenDangerService;
/**
* Service
*
* @author ruoyi
* @date 2023-12-11
*/
@Service
public class EhsHiddenDangerServiceImpl extends ServiceImpl<EhsHiddenDangerMapper, EhsHiddenDanger> implements IEhsHiddenDangerService {
@Autowired
private EhsHiddenDangerMapper ehsHiddenDangerMapper;
/**
*
*
* @param hiddenDangerId
* @return
*/
@Override
public EhsHiddenDanger selectEhsHiddenDangerByHiddenDangerId(Long hiddenDangerId)
{
return ehsHiddenDangerMapper.selectEhsHiddenDangerByHiddenDangerId(hiddenDangerId);
}
/**
*
*
* @param ehsHiddenDanger
* @return
*/
@Override
public List<EhsHiddenDanger> selectEhsHiddenDangerList(EhsHiddenDanger ehsHiddenDanger)
{
if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null &&
SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0) {
ehsHiddenDanger.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue());
}
if(StringUtils.isNotEmpty(ehsHiddenDanger.getAssistDept())){//协办就不限制只能查询本部门的数据了。
ehsHiddenDanger.setDeptId(null);
}
return ehsHiddenDangerMapper.selectEhsHiddenDangerList(ehsHiddenDanger);
}
private LambdaQueryWrapper<EhsHiddenDanger> buildQueryWrapper(EhsHiddenDanger query) {
Map<String, Object> params = query.getParams();
LambdaQueryWrapper<EhsHiddenDanger> lqw = Wrappers.lambdaQuery();
lqw.like(StringUtils.isNotBlank(query.getEnterpriseName()), EhsHiddenDanger::getEnterpriseName, query.getEnterpriseName());
lqw.eq(StringUtils.isNotBlank(query.getEnterpriseStatus()), EhsHiddenDanger::getEnterpriseStatus, query.getEnterpriseStatus());
lqw.eq(StringUtils.isNotBlank(query.getEnterpriseType()), EhsHiddenDanger::getEnterpriseType, query.getEnterpriseType());
lqw.like(StringUtils.isNotBlank(query.getHiddenDangerDesc()), EhsHiddenDanger::getHiddenDangerDesc, query.getHiddenDangerDesc());
lqw.between(params.get("beginCheckTime") != null && params.get("endCheckTime") != null,
EhsHiddenDanger::getCheckTime ,params.get("beginCheckTime"), params.get("endCheckTime"));
lqw.like(StringUtils.isNotBlank(query.getCheckType()), EhsHiddenDanger::getCheckType, query.getCheckType());
lqw.eq(StringUtils.isNotBlank(query.getHiddenDangerImg()), EhsHiddenDanger::getHiddenDangerImg, query.getHiddenDangerImg());
lqw.like(StringUtils.isNotBlank(query.getRectifyMeasure()), EhsHiddenDanger::getRectifyMeasure, query.getRectifyMeasure());
lqw.like(StringUtils.isNotBlank(query.getStatus()), EhsHiddenDanger::getStatus, query.getStatus());
lqw.between(params.get("beginRectifyTime") != null && params.get("endRectifyTime") != null,
EhsHiddenDanger::getRectifyTime ,params.get("beginRectifyTime"), params.get("endRectifyTime"));
lqw.like(query.getPrincipalName() != null, EhsHiddenDanger::getPrincipalName, query.getPrincipalName());
lqw.eq(StringUtils.isNotBlank(query.getRectifyImg()), EhsHiddenDanger::getRectifyImg, query.getRectifyImg());
lqw.eq(StringUtils.isNotBlank(query.getRegulatoryDept()), EhsHiddenDanger::getRegulatoryDept, query.getRegulatoryDept());
lqw.like(StringUtils.isNotBlank(query.getRegulatoryName()), EhsHiddenDanger::getRegulatoryName, query.getRegulatoryName());
lqw.eq(StringUtils.isNotBlank(query.getHiddenDangerGrade()), EhsHiddenDanger::getHiddenDangerGrade, query.getHiddenDangerGrade());
lqw.eq(StringUtils.isNotBlank(query.getHiddenDangerType()), EhsHiddenDanger::getHiddenDangerType, query.getHiddenDangerType());
lqw.eq(StringUtils.isNotBlank(query.getHiddenDangerLabel()), EhsHiddenDanger::getHiddenDangerLabel, query.getHiddenDangerLabel());
lqw.orderByDesc(EhsHiddenDanger::getCreateTime);
lqw.eq(query.getDeptId() != null, EhsHiddenDanger::getDeptId, query.getDeptId());
lqw.eq(query.getCreateUserId() != null, EhsHiddenDanger::getCreateUserId, query.getCreateUserId());
lqw.eq(query.getUpdateUserId() != null, EhsHiddenDanger::getUpdateUserId, query.getUpdateUserId());
lqw.eq(query.getIsSupervise() != null, EhsHiddenDanger::getIsSupervise, query.getIsSupervise());
lqw.eq(StringUtils.isNotBlank(query.getAssistDept()), EhsHiddenDanger::getAssistDept, query.getAssistDept());
lqw.eq(StringUtils.isNotBlank(query.getSuperviseResult()), EhsHiddenDanger::getSuperviseResult, query.getSuperviseResult());
lqw.eq(query.getRectifyMoney() != null, EhsHiddenDanger::getRectifyMoney, query.getRectifyMoney());
lqw.between(params.get("beginRectifyTermTime") != null && params.get("endRectifyTermTime") != null,
EhsHiddenDanger::getRectifyTermTime ,params.get("beginRectifyTermTime"), params.get("endRectifyTermTime"));
return lqw;
}
/**
*
*
* @param hiddenDangerIds
*/
@Override
public int superviseEhsHiddenDanger(Long[] hiddenDangerIds)
{
return ehsHiddenDangerMapper.superviseEhsHiddenDanger(hiddenDangerIds);
}
/**
*
*
* @param ehsHiddenDanger ID
*/
public int assistEhsHiddenDanger(EhsHiddenDanger ehsHiddenDanger){
return ehsHiddenDangerMapper.assistEhsHiddenDanger(ehsHiddenDanger);
}
}

@ -67,7 +67,6 @@ public class EhsMaterial extends BaseEntity
private String tel; private String tel;
/** 上报部门 */ /** 上报部门 */
@Excel(name = "待处理出库") @Excel(name = "待处理出库")
@TableField(exist = false)
private String sendQuantity; private String sendQuantity;

@ -48,7 +48,7 @@ public class EhsMaterialServiceImpl extends ServiceImpl<EhsMaterialMapper, EhsMa
{ {
if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null && if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null &&
SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0){ SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0){
ehsMaterial.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()); ehsMaterial.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue());
} }
return ehsMaterialMapper.selectEhsMaterialList(ehsMaterial); return ehsMaterialMapper.selectEhsMaterialList(ehsMaterial);
} }

@ -1,12 +1,15 @@
package com.ruoyi.ehsMaterialDetail.domain; package com.ruoyi.ehsMaterialDetail.domain;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.Map;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.ToString; import lombok.ToString;
@ -67,4 +70,15 @@ public class EhsMaterialDetail extends BaseEntity
@Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date outboundTime; private Date outboundTime;
/** 库存数量 */
@Excel(name = "库存数量")
private BigDecimal inventory;
/** 库存数量 */
@Excel(name = "操作类型", readConverterExp = "0=出库,1=入库")
private Integer operateType;
/** 请求参数 */
@TableField(exist = false)
private String getOut;
} }

@ -43,8 +43,9 @@ public class EhsNoticeMessage extends BaseEntity
@TableField(exist = false) @TableField(exist = false)
private String fileName; private String fileName;
/** 临时任务的下载模板 */ /** 临时任务的下载模板 */
@Excel(name = "下载模板")
private String fileTempName; private String fileTempName;
@Excel(name = "模板文件")
private String fileTempOriginalName;
/** 1:未发布 2:已发布 */ /** 1:未发布 2:已发布 */
@Excel(name = "0:未发布 1:已发布") @Excel(name = "0:未发布 1:已发布")
private String status; private String status;

@ -1,4 +1,5 @@
package com.ruoyi.ehsRisk.domain; package com.ruoyi.ehsRisk.domain;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
@ -14,7 +15,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* ehs_risk * ehs_risk
* *
* @author ruoyi * @author ruoyi
* @date 2023-11-30 * @date 2023-12-13
*/ */
@Data @Data
@ToString @ToString
@ -25,7 +26,7 @@ public class EhsRisk extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** $column.columnComment */ /** */
@TableId(type= IdType.AUTO) @TableId(type= IdType.AUTO)
private Long riskId; private Long riskId;
@ -33,43 +34,74 @@ public class EhsRisk extends BaseEntity
@Excel(name = "风险点等级") @Excel(name = "风险点等级")
private Long riskGrade; private Long riskGrade;
/** 上报地址类别 */ /** 风险点类型 字典 */
@Excel(name = "上报地址类别") @Excel(name = "风险点类型 字典 ")
private String reportAddressType; private String reportAddressType;
/** 风险点位置 */ /** 风险点位置,用分号“;”分隔 */
@Excel(name = "风险点位置") @Excel(name = "风险点位置,用分号“;”分隔")
private String riskLocation; private String riskLocation;
/** 联系电话 */ /** 风险点概况 */
@Excel(name = "联系电话") @Excel(name = "风险点概况")
private String tel; private String riskDesc;
/** 涉及群众数量 */ /** 涉及群众数量,用分号“;”分隔 */
@Excel(name = "涉及群众数量") @Excel(name = "涉及群众数量,用分号“;”分隔")
private String peopleQuantity; private String peopleQuantity;
/** 抢险救援物资保障地点 */
@Excel(name = "抢险救援物资保障地点")
private String materialsAddr;
/** 预备物资数量 */ /** 预备物资数量 */
@Excel(name = "预备物资数量") @Excel(name = "预备物资数量")
private String materialsQuantity; private String materialsQuantity;
/** 抢修队伍人员 */ /** 生活物资保障地点 */
@Excel(name = "抢修队伍人员") @Excel(name = "生活物资保障地点")
private String repairTeam; private String lifeAddr;
/** 人员转移安置点 */
@Excel(name = "人员转移安置点")
private String resettleAddr;
/** 乡级责任人姓名 */
@Excel(name = "乡级责任人姓名")
private String villageName;
/** 乡级责任人职务 */
@Excel(name = "乡级责任人职务")
private String villageDuties;
/** 乡级责任人联系电话 */
@Excel(name = "乡级责任人联系电话")
private String villageTel;
/** 村级责任人姓名 */
@Excel(name = "村级责任人姓名")
private String villageName1;
/** 村级责任人职务 */
@Excel(name = "村级责任人职务")
private String villageDuties1;
/** 村级责任人联系电话 */
@Excel(name = "村级责任人联系电话")
private String villageTel1;
/** 巡查责任人姓名 */
@Excel(name = "巡查责任人姓名")
private String inspectionName;
/** 巡查责任人职务 */
@Excel(name = "巡查责任人职务")
private String inspectionDuties;
/** 责任人 */ /** 巡查责任人电话 */
@Excel(name = "责任人") @Excel(name = "巡查责任人电话")
private String personResponsible; private String inspectionTel;
/** 乡级责任人 */
@Excel(name = "乡级责任人")
private String villagePersonResponsible;
/** 村级责任人 */
@Excel(name = "村级责任人")
private String villagePersonResponsible2;
/** 联系电话 */
@Excel(name = "联系电话")
private String tel2;
} }

@ -2,14 +2,13 @@ package com.ruoyi.ehsRisk.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.ehsRisk.domain.EhsRisk; import com.ruoyi.ehsRisk.domain.EhsRisk;
import java.util.List; import java.util.List;
/** /**
* Mapper * Mapper
* *
* @author ruoyi * @author ruoyi
* @date 2023-11-30 * @date 2023-12-13
*/ */
public interface EhsRiskMapper extends BaseMapper<EhsRisk> { public interface EhsRiskMapper extends BaseMapper<EhsRisk> {
/** /**

@ -8,23 +8,24 @@ import com.ruoyi.ehsRisk.domain.EhsRisk;
* Service * Service
* *
* @author ruoyi * @author ruoyi
* @date 2023-11-30 * @date 2023-12-13
*/ */
public interface IEhsRiskService extends IService<EhsRisk> { public interface IEhsRiskService extends IService<EhsRisk> {
/** /**
* *
* *
* @param riskId * @param riskId
* @return * @return
*/ */
public EhsRisk selectEhsRiskByRiskId(Long riskId); public EhsRisk selectEhsRiskByRiskId(Long riskId);
/**
*
*
* @param ehsRisk
* @return
*/
public List<EhsRisk> selectEhsRiskList(EhsRisk ehsRisk);
/**
*
*
* @param ehsRisk
* @return
*/
public List<EhsRisk> selectEhsRiskList(EhsRisk ehsRisk);
} }

@ -3,75 +3,79 @@ package com.ruoyi.ehsRisk.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.ehsRisk.domain.EhsRisk;
import com.ruoyi.ehsRisk.mapper.EhsRiskMapper;
import com.ruoyi.ehsRisk.service.IEhsRiskService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.ruoyi.ehsRisk.mapper.EhsRiskMapper;
import com.ruoyi.ehsRisk.domain.EhsRisk;
import com.ruoyi.ehsRisk.service.IEhsRiskService;
/** /**
* Service * Service
* *
* @author ruoyi * @author ruoyi
* @date 2023-11-30 * @date 2023-12-13
*/ */
@Service @Service
public class EhsRiskServiceImpl extends ServiceImpl<EhsRiskMapper, EhsRisk> implements IEhsRiskService { public class EhsRiskServiceImpl extends ServiceImpl<EhsRiskMapper, EhsRisk> implements IEhsRiskService {
@Autowired @Autowired
private EhsRiskMapper ehsRiskMapper; private EhsRiskMapper ehsRiskMapper;
/**
* /**
* *
* @param riskId *
* @return * @param riskId
*/ * @return
@Override */
public EhsRisk selectEhsRiskByRiskId(Long riskId) @Override
{ public EhsRisk selectEhsRiskByRiskId(Long riskId)
return ehsRiskMapper.selectEhsRiskByRiskId(riskId); {
} return ehsRiskMapper.selectEhsRiskByRiskId(riskId);
}
/** /**
* *
* *
* @param ehsRisk * @param ehsRisk
* @return * @return
*/ */
@Override @Override
public List<EhsRisk> selectEhsRiskList(EhsRisk ehsRisk) public List<EhsRisk> selectEhsRiskList(EhsRisk ehsRisk)
{ {
if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null && return ehsRiskMapper.selectEhsRiskList(ehsRisk);
SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0){ }
ehsRisk.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue());
}
return ehsRiskMapper.selectEhsRiskList(ehsRisk);
}
private LambdaQueryWrapper<EhsRisk> buildQueryWrapper(EhsRisk query) { private LambdaQueryWrapper<EhsRisk> buildQueryWrapper(EhsRisk query) {
Map<String, Object> params = query.getParams(); Map<String, Object> params = query.getParams();
LambdaQueryWrapper<EhsRisk> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<EhsRisk> lqw = Wrappers.lambdaQuery();
lqw.eq(query.getRiskGrade() != null, EhsRisk::getRiskGrade, query.getRiskGrade()); lqw.eq(query.getRiskGrade() != null, EhsRisk::getRiskGrade, query.getRiskGrade());
lqw.eq(StringUtils.isNotBlank(query.getReportAddressType()), EhsRisk::getReportAddressType, query.getReportAddressType()); lqw.eq(StringUtils.isNotBlank(query.getReportAddressType()), EhsRisk::getReportAddressType, query.getReportAddressType());
lqw.like(StringUtils.isNotBlank(query.getRiskLocation()), EhsRisk::getRiskLocation, query.getRiskLocation()); lqw.like(StringUtils.isNotBlank(query.getRiskLocation()), EhsRisk::getRiskLocation, query.getRiskLocation());
lqw.like(StringUtils.isNotBlank(query.getTel()), EhsRisk::getTel, query.getTel()); lqw.like(StringUtils.isNotBlank(query.getRiskDesc()), EhsRisk::getRiskDesc, query.getRiskDesc());
lqw.between(params.get("beginPeopleQuantity") != null && params.get("endPeopleQuantity") != null, lqw.like(StringUtils.isNotBlank(query.getPeopleQuantity()), EhsRisk::getPeopleQuantity, query.getPeopleQuantity());
EhsRisk::getPeopleQuantity ,params.get("beginPeopleQuantity"), params.get("endPeopleQuantity")); lqw.like(StringUtils.isNotBlank(query.getMaterialsAddr()), EhsRisk::getMaterialsAddr, query.getMaterialsAddr());
lqw.between(params.get("beginMaterialsQuantity") != null && params.get("endMaterialsQuantity") != null, lqw.between(params.get("beginMaterialsQuantity") != null && params.get("endMaterialsQuantity") != null,
EhsRisk::getMaterialsQuantity ,params.get("beginMaterialsQuantity"), params.get("endMaterialsQuantity")); EhsRisk::getMaterialsQuantity ,params.get("beginMaterialsQuantity"), params.get("endMaterialsQuantity"));
lqw.between(params.get("beginRepairTeam") != null && params.get("endRepairTeam") != null, lqw.like(StringUtils.isNotBlank(query.getLifeAddr()), EhsRisk::getLifeAddr, query.getLifeAddr());
EhsRisk::getRepairTeam ,params.get("beginRepairTeam"), params.get("endRepairTeam")); lqw.like(StringUtils.isNotBlank(query.getResettleAddr()), EhsRisk::getResettleAddr, query.getResettleAddr());
lqw.like(StringUtils.isNotBlank(query.getPersonResponsible()), EhsRisk::getPersonResponsible, query.getPersonResponsible()); lqw.like(StringUtils.isNotBlank(query.getVillageName()), EhsRisk::getVillageName, query.getVillageName());
lqw.like(StringUtils.isNotBlank(query.getVillagePersonResponsible()), EhsRisk::getVillagePersonResponsible, query.getVillagePersonResponsible()); lqw.like(StringUtils.isNotBlank(query.getVillageDuties()), EhsRisk::getVillageDuties, query.getVillageDuties());
lqw.like(StringUtils.isNotBlank(query.getVillagePersonResponsible2()), EhsRisk::getVillagePersonResponsible2, query.getVillagePersonResponsible2()); lqw.like(StringUtils.isNotBlank(query.getVillageTel()), EhsRisk::getVillageTel, query.getVillageTel());
lqw.like(StringUtils.isNotBlank(query.getTel2()), EhsRisk::getTel2, query.getTel2()); lqw.like(StringUtils.isNotBlank(query.getVillageName1()), EhsRisk::getVillageName1, query.getVillageName1());
lqw.orderByDesc(EhsRisk::getCreateTime); lqw.like(StringUtils.isNotBlank(query.getVillageDuties1()), EhsRisk::getVillageDuties1, query.getVillageDuties1());
return lqw; lqw.like(StringUtils.isNotBlank(query.getVillageTel1()), EhsRisk::getVillageTel1, query.getVillageTel1());
} lqw.orderByDesc(EhsRisk::getCreateTime);
lqw.eq(query.getDeptId() != null, EhsRisk::getDeptId, query.getDeptId());
lqw.eq(query.getCreateUserId() != null, EhsRisk::getCreateUserId, query.getCreateUserId());
lqw.eq(query.getUpdateUserId() != null, EhsRisk::getUpdateUserId, query.getUpdateUserId());
lqw.like(StringUtils.isNotBlank(query.getInspectionName()), EhsRisk::getInspectionName, query.getInspectionName());
lqw.like(StringUtils.isNotBlank(query.getInspectionDuties()), EhsRisk::getInspectionDuties, query.getInspectionDuties());
lqw.like(StringUtils.isNotBlank(query.getInspectionTel()), EhsRisk::getInspectionTel, query.getInspectionTel());
return lqw;
}
} }

@ -26,30 +26,35 @@
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="createUserId" column="create_user_id" /> <result property="createUserId" column="create_user_id" />
<result property="updateUserId" column="update_user_id" /> <result property="updateUserId" column="update_user_id" />
<result property="areaId" column="area_id" />
<result property="economicType" column="economic_type" />
<result property="enterpriseScale" column="enterprise_scale" />
</resultMap> </resultMap>
<sql id="selectEhsEnterpriseVo"> <sql id="selectEhsEnterpriseVo">
select enterprise_id, enterprise_code, enterprise_name, enterprise_type, enterprise_addr, Enterprise_leader, leader_tel, registered_capital, business_scope, business_projects, enterprise_status, safety_manager_name, safety_manager_tel, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_enterprise select e.*, d.dept_name from ehs_enterprise e
left join sys_dept d on e.dept_id = d.dept_id
</sql> </sql>
<select id="selectEhsEnterpriseList" parameterType="EhsEnterprise" resultMap="EhsEnterpriseResult"> <select id="selectEhsEnterpriseList" parameterType="EhsEnterprise" resultMap="EhsEnterpriseResult">
<include refid="selectEhsEnterpriseVo"/> <include refid="selectEhsEnterpriseVo"/>
<where> <where>
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code like concat('%', #{enterpriseCode}, '%')</if> <if test="deptId != null "> and e.dept_Id = #{deptId}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> <if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
<if test="enterpriseType != null and enterpriseType != ''"> and enterprise_type = #{enterpriseType}</if> <if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="enterpriseAddr != null and enterpriseAddr != ''"> and enterprise_addr like concat('%', #{enterpriseAddr}, '%')</if> <if test="enterpriseType != null and enterpriseType != ''"> and enterprise_type = #{enterpriseType}</if>
<if test="enterpriseLeader != null and enterpriseLeader != ''"> and Enterprise_leader like concat('%', #{enterpriseLeader}, '%')</if> <if test="enterpriseAddr != null and enterpriseAddr != ''"> and enterprise_addr like concat('%', #{enterpriseAddr}, '%')</if>
<if test="leaderTel != null and leaderTel != ''"> and leader_tel like concat('%', #{leaderTel}, '%')</if> <if test="enterpriseLeader != null and enterpriseLeader != ''"> and Enterprise_leader like concat('%', #{enterpriseLeader}, '%')</if>
<if test="registeredCapital != null and registeredCapital != ''"> and registered_capital like concat('%', #{registeredCapital}, '%')</if> <if test="leaderTel != null and leaderTel != ''"> and leader_tel like concat('%', #{leaderTel}, '%')</if>
<if test="businessScope != null and businessScope != ''"> and business_scope like concat('%', #{businessScope}, '%')</if> <if test="registeredCapital != null and registeredCapital != ''"> and registered_capital like concat('%', #{registeredCapital}, '%')</if>
<if test="businessProjects != null and businessProjects != ''"> and business_projects like concat('%', #{businessProjects}, '%')</if> <if test="businessScope != null and businessScope != ''"> and business_scope like concat('%', #{businessScope}, '%')</if>
<if test="enterpriseStatus != null and enterpriseStatus != ''"> and enterprise_status = #{enterpriseStatus}</if> <if test="businessProjects != null and businessProjects != ''"> and business_projects like concat('%', #{businessProjects}, '%')</if>
<if test="safetyManagerName != null and safetyManagerName != ''"> and safety_manager_name like concat('%', #{safetyManagerName}, '%')</if> <if test="enterpriseStatus != null and enterpriseStatus != ''"> and enterprise_status = #{enterpriseStatus}</if>
<if test="safetyManagerTel != null and safetyManagerTel != ''"> and safety_manager_tel like concat('%', #{safetyManagerTel}, '%')</if> <if test="safetyManagerName != null and safetyManagerName != ''"> and safety_manager_name like concat('%', #{safetyManagerName}, '%')</if>
<if test="deptId != null "> and dept_id = #{deptId}</if> <if test="safetyManagerTel != null and safetyManagerTel != ''"> and safety_manager_tel like concat('%', #{safetyManagerTel}, '%')</if>
<if test="createUserId != null "> and create_user_id = #{createUserId}</if> <if test="createUserId != null "> and create_user_id = #{createUserId}</if>
<if test="updateUserId != null "> and update_user_id = #{updateUserId}</if> <if test="updateUserId != null "> and update_user_id = #{updateUserId}</if>
</where> </where>
</select> </select>

@ -0,0 +1,91 @@
<?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.ruoyi.ehsHiddenDanger.mapper.EhsHiddenDangerMapper">
<resultMap type="EhsHiddenDanger" id="EhsHiddenDangerResult">
<result property="hiddenDangerId" column="hidden_danger_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="enterpriseStatus" column="enterprise_status" />
<result property="enterpriseType" column="enterprise_type" />
<result property="hiddenDangerDesc" column="hidden_danger_desc" />
<result property="checkTime" column="check_time" />
<result property="checkType" column="check_type" />
<result property="hiddenDangerImg" column="hidden_danger_img" />
<result property="rectifyMeasure" column="rectify_measure" />
<result property="status" column="status" />
<result property="rectifyTime" column="rectify_time" />
<result property="principalName" column="principal_name" />
<result property="rectifyImg" column="rectify_img" />
<result property="regulatoryDept" column="regulatory_dept" />
<result property="regulatoryName" column="regulatory_name" />
<result property="hiddenDangerGrade" column="hidden_danger_grade" />
<result property="hiddenDangerType" column="hidden_danger_type" />
<result property="hiddenDangerLabel" column="hidden_danger_label" />
<result property="rectifyTermTime" column="rectify_term_time" />
<result property="isSupervise" column="is_supervise" />
<result property="assistDeptName" column="assist_dept_name" />
<result property="assistDept" column="assist_dept" />
<result property="superviseResult" column="supervise_result" />
<result property="areaId" column="area_id" />
<result property="economicType" column="economic_type" />
<result property="enterpriseScale" column="enterprise_scale" />
</resultMap>
<sql id="selectEhsHiddenDangerVo">
select h.*, d.dept_name,
(SELECT GROUP_CONCAT( ft.dept_name SEPARATOR ';' ) FROM
sys_dept ft where FIND_IN_SET( ft.DEPT_ID, h.assist_dept ))assist_dept_name
from ehs_hidden_danger h
left join sys_dept d on h.dept_id = d.dept_id
</sql>
<select id="selectEhsHiddenDangerList" parameterType="EhsHiddenDanger" resultMap="EhsHiddenDangerResult">
<include refid="selectEhsHiddenDangerVo"/>
<where>
<if test="deptId != null "> and h.dept_Id = #{deptId}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="enterpriseStatus != null and enterpriseStatus != ''"> and enterprise_status = #{enterpriseStatus}</if>
<if test="enterpriseType != null and enterpriseType != ''"> and enterprise_type = #{enterpriseType}</if>
<if test="hiddenDangerDesc != null and hiddenDangerDesc != ''"> and hidden_danger_desc like concat('%', #{hiddenDangerDesc}, '%')</if>
<if test="params.beginCheckTime != null and params.beginCheckTime != '' and params.endCheckTime != null and params.endCheckTime != ''">
and check_time between #{params.beginCheckTime} and #{params.endCheckTime}</if>
<if test="checkType != null and checkType != ''"> and check_type like concat('%', #{checkType}, '%')</if>
<if test="hiddenDangerImg != null and hiddenDangerImg != ''"> and hidden_danger_img = #{hiddenDangerImg}</if>
<if test="rectifyMeasure != null and rectifyMeasure != ''"> and rectify_measure like concat('%', #{rectifyMeasure}, '%')</if>
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
<if test="params.beginRectifyTime != null and params.beginRectifyTime != '' and params.endRectifyTime != null and params.endRectifyTime != ''">
and rectify_time between #{params.beginRectifyTime} and #{params.endRectifyTime}</if>
<if test="principalName != null "> and principal_name like concat('%', #{principalName}, '%')</if>
<if test="rectifyImg != null and rectifyImg != ''"> and rectify_img = #{rectifyImg}</if>
<if test="regulatoryDept != null and regulatoryDept != ''"> and regulatory_dept = #{regulatoryDept}</if>
<if test="regulatoryName != null and regulatoryName != ''"> and regulatory_name like concat('%', #{regulatoryName}, '%')</if>
<if test="hiddenDangerGrade != null and hiddenDangerGrade != ''"> and hidden_danger_grade = #{hiddenDangerGrade}</if>
<if test="hiddenDangerType != null and hiddenDangerType != ''"> and hidden_danger_type = #{hiddenDangerType}</if>
<if test="assistDept != null and assistDept != ''"> and FIND_IN_SET( #{assistDept}, assist_dept )</if>
<if test="hiddenDangerLabel != null and hiddenDangerLabel != ''">
AND
<foreach collection="hiddenDangerLabel" item="item" separator="OR" index="index" open="(" close=")">
FIND_IN_SET(#{item}, hiddenDanger_Label)
</foreach>
</if>
</where>
</select>
<select id="selectEhsHiddenDangerByHiddenDangerId" parameterType="Long" resultMap="EhsHiddenDangerResult">
<include refid="selectEhsHiddenDangerVo"/>
where hidden_danger_id = #{hiddenDangerId}
</select>
<update id="superviseEhsHiddenDanger" parameterType="Long">
update ehs_hidden_danger set is_supervise = 1 where hidden_danger_id in
<foreach collection="array" item="hiddenDangerId" open="(" separator="," close=")">
#{hiddenDangerId}
</foreach>
</update>
<update id="assistEhsHiddenDanger" parameterType="EhsHiddenDanger">
update ehs_hidden_danger set assist_dept = #{assistDept} where hidden_danger_id =#{hiddenDangerId}
</update>
</mapper>

@ -22,6 +22,8 @@
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="createUserId" column="create_user_id" /> <result property="createUserId" column="create_user_id" />
<result property="inventory" column="inventory" />
<result property="operateType" column="operate_type" />
</resultMap> </resultMap>
<sql id="selectEhsMaterialDetailVo"> <sql id="selectEhsMaterialDetailVo">
@ -33,14 +35,17 @@
<select id="selectEhsMaterialDetailList" parameterType="EhsMaterialDetail" resultMap="EhsMaterialDetailResult"> <select id="selectEhsMaterialDetailList" parameterType="EhsMaterialDetail" resultMap="EhsMaterialDetailResult">
<include refid="selectEhsMaterialDetailVo"/> <include refid="selectEhsMaterialDetailVo"/>
<where> <where>
<if test="materialId != null "> and material_id = #{materialId}</if> <if test="materialId != null "> and material_id = #{materialId}</if>
<if test="sendUserId != null "> and send_user_id = #{sendUserId}</if> <if test="sendUserId != null "> and send_user_id = #{sendUserId}</if>
<if test="sendQuantity != null and sendQuantity != ''"> and send_quantity = #{sendQuantity}</if> <if test="sendQuantity != null and sendQuantity != ''"> and send_quantity = #{sendQuantity}</if>
<if test="sendTime != null "> and send_time = #{sendTime}</if> <if test="sendTime != null "> and send_time = #{sendTime}</if>
<if test="outboundUserId != null "> and outbound_user_id = #{outboundUserId}</if> <if test="outboundUserId != null "> and outbound_user_id = #{outboundUserId}</if>
<if test="outboundQuantity != null and outboundQuantity != ''"> and outbound_quantity = #{outboundQuantity}</if> <if test="outboundQuantity != null and outboundQuantity != ''"> and outbound_quantity = #{outboundQuantity}</if>
<if test="outboundTime != null "> and outbound_time = #{outboundTime}</if> <if test="outboundTime != null "> and outbound_time = #{outboundTime}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if> <if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="inventory != null "> and inventory = #{inventory}</if>
<if test="operateType != null "> and operate_type = #{operateType}</if>
<if test="getOut != null "> and (outbound_user_id is null or outbound_user_id ='')</if>
</where> </where>
</select> </select>

@ -38,7 +38,7 @@
<select id="selectEhsMaterialList" parameterType="EhsMaterial" resultMap="EhsMaterialResult"> <select id="selectEhsMaterialList" parameterType="EhsMaterial" resultMap="EhsMaterialResult">
<include refid="selectEhsMaterialVo"/> <include refid="selectEhsMaterialVo"/>
<where> <where>
<if test="deptId != null "> and r.dept_Id = #{deptId}</if> <if test="deptId != null "> and m.dept_Id = #{deptId}</if>
<if test="materialType != null "> and material_type = #{materialType}</if> <if test="materialType != null "> and material_type = #{materialType}</if>
<if test="classFirst != null "> and class_first = #{classFirst}</if> <if test="classFirst != null "> and class_first = #{classFirst}</if>
<if test="classSecond != null and classSecond != ''"> and class_second = #{classSecond}</if> <if test="classSecond != null and classSecond != ''"> and class_second = #{classSecond}</if>
@ -53,7 +53,7 @@
<select id="selectEhsMaterialByMaterialId" parameterType="Long" resultMap="EhsMaterialResult"> <select id="selectEhsMaterialByMaterialId" parameterType="Long" resultMap="EhsMaterialResult">
<include refid="selectEhsMaterialVo"/> <include refid="selectEhsMaterialVo"/>
where material_id = #{materialId} where m.material_id = #{materialId}
</select> </select>

@ -10,6 +10,7 @@
<result property="displayContent" column="display_content" /> <result property="displayContent" column="display_content" />
<result property="fileName" column="file_name" /> <result property="fileName" column="file_name" />
<result property="fileTempName" column="file_temp_name" /> <result property="fileTempName" column="file_temp_name" />
<result property="fileTempOriginalName" column="file_temp_original_name" />
<result property="status" column="status" /> <result property="status" column="status" />
<result property="readDeptId" column="read_dept_id" /> <result property="readDeptId" column="read_dept_id" />
<result property="mesgType" column="mesg_type" /> <result property="mesgType" column="mesg_type" />
@ -34,12 +35,12 @@
</resultMap> </resultMap>
<sql id="selectEhsNoticeMessageVo"> <sql id="selectEhsNoticeMessageVo">
select notice_message_id, title, display_content, file_temp_name, status, read_dept_id, mesg_type, dept_list, all_dept, create_dept_id, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_notice_message select * from ehs_notice_message
</sql> </sql>
<select id="selectEhsNoticeMessageList" parameterType="EhsNoticeMessage" resultMap="EhsNoticeMessageResult"> <select id="selectEhsNoticeMessageList" parameterType="EhsNoticeMessage" resultMap="EhsNoticeMessageResult">
select m.notice_message_id, m.create_user_id, m.create_time, m.dept_id,m.title, m.display_content, m.status,d.dept_name dept_name select m.notice_message_id, m.create_user_id, m.create_time, m.dept_id,m.title, m.display_content, m.status,d.dept_name dept_name
,FIND_IN_SET(#{deptId}, m.read_dept_id ) is_read,m.mesg_type,m.read_dept_id,m.all_dept,m.file_temp_name, ,FIND_IN_SET(#{deptId}, m.read_dept_id ) is_read,m.mesg_type,m.read_dept_id,m.all_dept,m.file_temp_name,file_temp_original_name,
(select f.id from ehs_notice_message_file f where m.notice_message_id = f.notice_message_id and f.dept_ID =#{fileDeptId} ) AS message_file_id, (select f.id from ehs_notice_message_file f where m.notice_message_id = f.notice_message_id and f.dept_ID =#{fileDeptId} ) AS message_file_id,
(select f.file_name from ehs_notice_message_file f where m.notice_message_id = f.notice_message_id and f.dept_ID =#{fileDeptId}) file_name, (select f.file_name from ehs_notice_message_file f where m.notice_message_id = f.notice_message_id and f.dept_ID =#{fileDeptId}) file_name,
IFNULL((select IFNULL(f.state,0) from ehs_notice_message_file f where m.notice_message_id = f.notice_message_id and f.dept_ID =#{fileDeptId}),0) file_state, IFNULL((select IFNULL(f.state,0) from ehs_notice_message_file f where m.notice_message_id = f.notice_message_id and f.dept_ID =#{fileDeptId}),0) file_state,
@ -65,7 +66,7 @@
<select id="selectEhsNoticeMessageListAdmin" parameterType="EhsNoticeMessage" resultMap="EhsNoticeMessageResult"> <select id="selectEhsNoticeMessageListAdmin" parameterType="EhsNoticeMessage" resultMap="EhsNoticeMessageResult">
SELECT m.notice_message_id, m.create_user_id, m.create_time, m.dept_id, SELECT m.notice_message_id, m.create_user_id, m.create_time, m.dept_id,
m.title, m.display_content, m.STATUS, m.dept_list, GROUP_CONCAT( ft.dept_name SEPARATOR ';' ) dept_name, m.title, m.display_content, m.STATUS, m.dept_list, GROUP_CONCAT( ft.dept_name SEPARATOR ';' ) dept_name,
m.mesg_type, m.read_dept_id, m.all_dept, m.mesg_type, m.read_dept_id, m.all_dept,m.file_temp_name,m.file_temp_original_name,
( SELECT count( 1 ) FROM ehs_notice_message_file f WHERE f.notice_message_id = m.notice_message_id ) file_count ( SELECT count( 1 ) FROM ehs_notice_message_file f WHERE f.notice_message_id = m.notice_message_id ) file_count
FROM ehs_notice_message m FROM ehs_notice_message m
LEFT JOIN sys_user e ON e.user_id = m.CREATE_USER_ID LEFT JOIN sys_user e ON e.user_id = m.CREATE_USER_ID

@ -1,62 +1,76 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.ehsRisk.mapper.EhsRiskMapper"> <mapper namespace="com.ruoyi.ehsRisk.mapper.EhsRiskMapper">
<resultMap type="EhsRisk" id="EhsRiskResult"> <resultMap type="EhsRisk" id="EhsRiskResult">
<result property="riskId" column="risk_id" /> <result property="riskId" column="risk_id" />
<result property="riskGrade" column="risk_grade" /> <result property="riskGrade" column="risk_grade" />
<result property="reportAddressType" column="report_address_type" /> <result property="reportAddressType" column="report_address_type" />
<result property="riskLocation" column="risk_location" /> <result property="riskLocation" column="risk_location" />
<result property="tel" column="tel" /> <result property="riskDesc" column="risk_desc" />
<result property="peopleQuantity" column="people_quantity" /> <result property="peopleQuantity" column="people_quantity" />
<result property="materialsQuantity" column="materials_quantity" /> <result property="materialsAddr" column="materials_addr" />
<result property="repairTeam" column="repair_team" /> <result property="materialsQuantity" column="materials_quantity" />
<result property="personResponsible" column="person_responsible" /> <result property="lifeAddr" column="life_addr" />
<result property="villagePersonResponsible" column="village_person_responsible" /> <result property="resettleAddr" column="resettle_addr" />
<result property="villagePersonResponsible2" column="village_person_responsible2" /> <result property="villageName" column="village_name" />
<result property="tel2" column="tel2" /> <result property="villageDuties" column="village_duties" />
<result property="createBy" column="create_by" /> <result property="villageTel" column="village_tel" />
<result property="createTime" column="create_time" /> <result property="villageName1" column="village_name1" />
<result property="updateBy" column="update_by" /> <result property="villageDuties1" column="village_duties1" />
<result property="updateTime" column="update_time" /> <result property="villageTel1" column="village_tel1" />
<result property="remark" column="remark" /> <result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" /> <result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" /> <result property="updateBy" column="update_by" />
<result property="remark" column="remark" /> <result property="updateTime" column="update_time" />
<result property="deptId" column="dept_id" /> <result property="remark" column="remark" />
<result property="deptName" column="dept_name" /> <result property="deptId" column="dept_id" />
<result property="createUserId" column="create_user_id" /> <result property="createUserId" column="create_user_id" />
<result property="updateUserId" column="update_user_id" /> <result property="updateUserId" column="update_user_id" />
<result property="inspectionName" column="inspection_name" />
<result property="inspectionDuties" column="inspection_duties" />
<result property="inspectionTel" column="inspection_tel" />
</resultMap> </resultMap>
<sql id="selectEhsRiskVo"> <sql id="selectEhsRiskVo">
select r.*, d.dept_name select risk_id, risk_grade, report_address_type, risk_location, risk_desc, people_quantity, materials_addr, materials_quantity, life_addr, resettle_addr, village_name, village_duties, village_tel, village_name1, village_duties1, village_tel1, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id, inspection_name, inspection_duties, inspection_tel from ehs_risk
from ehs_risk r left join sys_dept d on r.dept_id = d.dept_id
</sql> </sql>
<select id="selectEhsRiskList" parameterType="EhsRisk" resultMap="EhsRiskResult"> <select id="selectEhsRiskList" parameterType="EhsRisk" resultMap="EhsRiskResult">
<include refid="selectEhsRiskVo"/> <include refid="selectEhsRiskVo"/>
<where> <where>
<if test="deptId != null "> and r.dept_Id = #{deptId}</if> <if test="riskGrade != null "> and risk_grade = #{riskGrade}</if>
<if test="riskGrade != null "> and risk_grade = #{riskGrade}</if> <if test="reportAddressType != null and reportAddressType != ''"> and report_address_type = #{reportAddressType}</if>
<if test="reportAddressType != null and reportAddressType != ''"> and report_address_type = #{reportAddressType}</if> <if test="riskLocation != null and riskLocation != ''"> and risk_location like concat('%', #{riskLocation}, '%')</if>
<if test="riskLocation != null and riskLocation != ''"> and risk_location like concat('%', #{riskLocation}, '%')</if> <if test="riskDesc != null and riskDesc != ''"> and risk_desc like concat('%', #{riskDesc}, '%')</if>
<if test="tel != null and tel != ''"> and tel like concat('%', #{tel}, '%')</if> <if test="peopleQuantity != null and peopleQuantity != ''"> and people_quantity like concat('%', #{peopleQuantity}, '%')</if>
<if test="params.beginPeopleQuantity != null and params.beginPeopleQuantity != '' and params.endPeopleQuantity != null and params.endPeopleQuantity != ''"> and people_quantity between #{params.beginPeopleQuantity} and #{params.endPeopleQuantity}</if> <if test="materialsAddr != null and materialsAddr != ''"> and materials_addr like concat('%', #{materialsAddr}, '%')</if>
<if test="params.beginMaterialsQuantity != null and params.beginMaterialsQuantity != '' and params.endMaterialsQuantity != null and params.endMaterialsQuantity != ''"> and materials_quantity between #{params.beginMaterialsQuantity} and #{params.endMaterialsQuantity}</if> <if test="params.beginMaterialsQuantity != null and params.beginMaterialsQuantity != '' and params.endMaterialsQuantity != null and params.endMaterialsQuantity != ''"> and materials_quantity between #{params.beginMaterialsQuantity} and #{params.endMaterialsQuantity}</if>
<if test="params.beginRepairTeam != null and params.beginRepairTeam != '' and params.endRepairTeam != null and params.endRepairTeam != ''"> and repair_team between #{params.beginRepairTeam} and #{params.endRepairTeam}</if> <if test="lifeAddr != null and lifeAddr != ''"> and life_addr like concat('%', #{lifeAddr}, '%')</if>
<if test="personResponsible != null and personResponsible != ''"> and person_responsible like concat('%', #{personResponsible}, '%')</if> <if test="resettleAddr != null and resettleAddr != ''"> and resettle_addr like concat('%', #{resettleAddr}, '%')</if>
<if test="villagePersonResponsible != null and villagePersonResponsible != ''"> and village_person_responsible like concat('%', #{villagePersonResponsible}, '%')</if> <if test="villageName != null and villageName != ''"> and village_name like concat('%', #{villageName}, '%')</if>
<if test="villagePersonResponsible2 != null and villagePersonResponsible2 != ''"> and village_person_responsible2 like concat('%', #{villagePersonResponsible2}, '%')</if> <if test="villageDuties != null and villageDuties != ''"> and village_duties like concat('%', #{villageDuties}, '%')</if>
<if test="tel2 != null and tel2 != ''"> and tel2 like concat('%', #{tel2}, '%')</if> <if test="villageTel != null and villageTel != ''"> and village_tel like concat('%', #{villageTel}, '%')</if>
<if test="villageName1 != null and villageName1 != ''"> and village_name1 like concat('%', #{villageName1}, '%')</if>
<if test="villageDuties1 != null and villageDuties1 != ''"> and village_duties1 like concat('%', #{villageDuties1}, '%')</if>
<if test="villageTel1 != null and villageTel1 != ''"> and village_tel1 like concat('%', #{villageTel1}, '%')</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="createUserId != null "> and create_user_id = #{createUserId}</if>
<if test="updateUserId != null "> and update_user_id = #{updateUserId}</if>
<if test="inspectionName != null and inspectionName != ''"> and inspection_name like concat('%', #{inspectionName}, '%')</if>
<if test="inspectionDuties != null and inspectionDuties != ''"> and inspection_duties like concat('%', #{inspectionDuties}, '%')</if>
<if test="inspectionTel != null and inspectionTel != ''"> and inspection_tel like concat('%', #{inspectionTel}, '%')</if>
</where> </where>
</select> </select>
<select id="selectEhsRiskByRiskId" parameterType="Long" resultMap="EhsRiskResult"> <select id="selectEhsRiskByRiskId" parameterType="Long" resultMap="EhsRiskResult">
<include refid="selectEhsRiskVo"/> <include refid="selectEhsRiskVo"/>
where risk_id = #{riskId} where risk_id = #{riskId}
</select> </select>
</mapper>
</mapper>

@ -0,0 +1,60 @@
import request from '@/utils/request'
// 查询隐患信息列表
export function listEhsHiddenDanger(query) {
return request({
url: '/ehsHiddenDanger/ehsHiddenDanger/list',
method: 'get',
params: query
})
}
// 查询隐患信息详细
export function getEhsHiddenDanger(hiddenDangerId) {
return request({
url: '/ehsHiddenDanger/ehsHiddenDanger/' + hiddenDangerId,
method: 'get'
})
}
// 新增隐患信息
export function addEhsHiddenDanger(data) {
return request({
url: '/ehsHiddenDanger/ehsHiddenDanger',
method: 'post',
data: data
})
}
// 修改隐患信息
export function updateEhsHiddenDanger(data) {
return request({
url: '/ehsHiddenDanger/ehsHiddenDanger',
method: 'put',
data: data
})
}
// 删除隐患信息
export function delEhsHiddenDanger(hiddenDangerId) {
return request({
url: '/ehsHiddenDanger/ehsHiddenDanger/' + hiddenDangerId,
method: 'delete'
})
}
// 督办
export function superviseEhsHiddenDanger(hiddenDangerId) {
return request({
url: '/ehsHiddenDanger/ehsHiddenDanger/supervise/' + hiddenDangerId,
method: 'get'
})
}
// 协办
export function assistEhsHiddenDanger(data) {
return request({
url: '/ehsHiddenDanger/ehsHiddenDanger/assist' ,
method: 'get',
params: data
})
}

@ -63,3 +63,11 @@ export function detailEhsNoticeMessage(noticeMessageId) {
method: 'get' method: 'get'
}) })
} }
// 只读显示
export function displayDetailEhsNoticeMessage(noticeMessageId) {
return request({
url: '/ehsNoticeMessage/ehsNoticeMessage/displayDetail/' + noticeMessageId,
method: 'get'
})
}

@ -1,44 +1,44 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询风险信息列表 // 查询风险信息列表
export function listRisk(query) { export function listEhsRisk(query) {
return request({ return request({
url: '/system/risk/list', url: '/ehsRisk/ehsRisk/list',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 查询风险信息详细 // 查询风险信息详细
export function getRisk(riskId) { export function getEhsRisk(riskId) {
return request({ return request({
url: '/system/risk/' + riskId, url: '/ehsRisk/ehsRisk/' + riskId,
method: 'get' method: 'get'
}) })
} }
// 新增风险信息 // 新增风险信息
export function addRisk(data) { export function addEhsRisk(data) {
return request({ return request({
url: '/system/risk', url: '/ehsRisk/ehsRisk',
method: 'post', method: 'post',
data: data data: data
}) })
} }
// 修改风险信息 // 修改风险信息
export function updateRisk(data) { export function updateEhsRisk(data) {
return request({ return request({
url: '/system/risk', url: '/ehsRisk/ehsRisk',
method: 'put', method: 'put',
data: data data: data
}) })
} }
// 删除风险信息 // 删除风险信息
export function delRisk(riskId) { export function delEhsRisk(riskId) {
return request({ return request({
url: '/system/risk/' + riskId, url: '/ehsRisk/ehsRisk/' + riskId,
method: 'delete' method: 'delete'
}) })
} }

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="部门" prop="deptId" v-show="deptShow"> <el-form-item label="登记部门" prop="deptId" v-show="deptShow">
<el-select v-model="queryParams.deptId" filterable placeholder="请选择部门" clearable> <el-select v-model="queryParams.deptId" filterable placeholder="请选择部门" clearable>
<el-option <el-option
v-for="dict in allDeptList" v-for="dict in allDeptList"
@ -37,6 +37,16 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="企业现状" prop="enterpriseStatus">
<el-select v-model="queryParams.enterpriseStatus" placeholder="请选择行业" clearable>
<el-option
v-for="dict in statusOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!--<el-form-item label="生产经营地址" prop="enterpriseAddr"> <!--<el-form-item label="生产经营地址" prop="enterpriseAddr">
<el-input <el-input
v-model="queryParams.enterpriseAddr" v-model="queryParams.enterpriseAddr"
@ -124,11 +134,11 @@
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>--> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
@ -142,7 +152,7 @@
v-hasPermi="['ehsEnterprise:ehsEnterprise:add']" v-hasPermi="['ehsEnterprise:ehsEnterprise:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!--<el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
@ -163,7 +173,7 @@
@click="handleDelete" @click="handleDelete"
v-hasPermi="['ehsEnterprise:ehsEnterprise:remove']" v-hasPermi="['ehsEnterprise:ehsEnterprise:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -179,7 +189,8 @@
<el-table v-loading="loading" :data="ehsEnterpriseList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="ehsEnterpriseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="enterpriseId" /> <!-- <el-table-column label="" align="center" prop="enterpriseId" />-->
<el-table-column label="登记部门" align="center" prop="deptName" v-if="this.$store.state.user.parentId==0"/>
<el-table-column label="社会信用代码" align="center" prop="enterpriseCode" /> <el-table-column label="社会信用代码" align="center" prop="enterpriseCode" />
<el-table-column label="名称" align="center" prop="enterpriseName" /> <el-table-column label="名称" align="center" prop="enterpriseName" />
<el-table-column label="行业" align="center" prop="enterpriseType"> <el-table-column label="行业" align="center" prop="enterpriseType">
@ -187,6 +198,11 @@
<dict-tag :options="dict.type.enterprise_type" :value="scope.row.enterpriseType"/> <dict-tag :options="dict.type.enterprise_type" :value="scope.row.enterpriseType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="企业现状" align="center" prop="enterpriseStatus">
<template slot-scope="scope">
<span> {{ (scope.row.enterpriseStatus !=null && scope.row.enterpriseStatus != "") ? statusOptions[scope.row.enterpriseStatus].label:""}}</span>
</template>
</el-table-column>
<el-table-column label="生产经营地址" align="center" prop="enterpriseAddr" /> <el-table-column label="生产经营地址" align="center" prop="enterpriseAddr" />
<el-table-column label="企业负责人" align="center" prop="enterpriseLeader" /> <el-table-column label="企业负责人" align="center" prop="enterpriseLeader" />
<el-table-column label="企业负责人电话" align="center" prop="leaderTel" /> <el-table-column label="企业负责人电话" align="center" prop="leaderTel" />
@ -197,9 +213,8 @@
<el-table-column label="分管安全副职姓名" align="center" prop="safetyManagerName" /> <el-table-column label="分管安全副职姓名" align="center" prop="safetyManagerName" />
<el-table-column label="分管安全副职电话" align="center" prop="safetyManagerTel" /> <el-table-column label="分管安全副职电话" align="center" prop="safetyManagerTel" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建者部门" align="center" prop="deptId" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope" v-if="curDeptId == scope.row.deptId">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -229,31 +244,95 @@
<!-- 添加或修改企业基本信息对话框 --> <!-- 添加或修改企业基本信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" 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="130px"> <el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item label="社会信用代码" prop="enterpriseCode"> <el-form-item label="企业名称" prop="enterpriseName">
<el-input v-model="form.enterpriseCode" placeholder="请输入社会信用代码" /> <el-input v-model="form.enterpriseName" placeholder="请输入企业名称" />
</el-form-item>
<el-form-item label="名称" prop="enterpriseName">
<el-input v-model="form.enterpriseName" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="行业" prop="enterpriseType">
<el-select v-model="form.enterpriseType" placeholder="请选择行业">
<el-option
v-for="dict in dict.type.enterprise_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="社会信用代码" prop="enterpriseCode">
<el-input v-model="form.enterpriseCode" placeholder="请输入社会信用代码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="行政区域" prop="areaId">
<el-select v-model="form.areaId" placeholder="请选择行政区域">
<el-option
v-for="dict in dict.type.area_id"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="行业" prop="enterpriseType">
<el-select v-model="form.enterpriseType" placeholder="请选择行业">
<el-option
v-for="dict in dict.type.enterprise_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业现状" prop="enterpriseStatus">
<el-select v-model="form.enterpriseStatus" placeholder="请选择企业现状" clearable>
<el-option
v-for="dict in statusOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="经济类型" prop="economicType">
<el-select v-model="form.economicType" placeholder="请选择经济类型">
<el-option
v-for="dict in dict.type.economic_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业规模" prop="enterpriseScale">
<el-select v-model="form.enterpriseScale" placeholder="请选择企业规模" clearable>
<el-option
v-for="dict in dict.type.enterprise_scale"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="生产经营地址" prop="enterpriseAddr"> <el-form-item label="生产经营地址" prop="enterpriseAddr">
<el-input v-model="form.enterpriseAddr" placeholder="请输入生产经营地址" /> <el-input v-model="form.enterpriseAddr" placeholder="请输入生产经营地址" />
</el-form-item> </el-form-item>
<el-form-item label="企业负责人" prop="enterpriseLeader"> <el-row>
<el-input v-model="form.enterpriseLeader" placeholder="请输入企业负责人" /> <el-col :span="12">
</el-form-item> <el-form-item label="企业负责人" prop="enterpriseLeader">
<el-form-item label="企业负责人电话" prop="leaderTel"> <el-input v-model="form.enterpriseLeader" placeholder="请输入企业负责人" />
<el-input v-model="form.leaderTel" placeholder="请输入企业负责人电话" /> </el-form-item>
</el-form-item> </el-col>
<el-col :span="12">
<el-form-item label="企业负责人电话" prop="leaderTel">
<el-input v-model="form.leaderTel" placeholder="请输入企业负责人电话" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="注册资本" prop="registeredCapital"> <el-form-item label="注册资本" prop="registeredCapital">
<el-input v-model="form.registeredCapital" placeholder="请输入注册资本" /> <el-input v-model="form.registeredCapital" placeholder="请输入注册资本" />
</el-form-item> </el-form-item>
@ -263,12 +342,18 @@
<el-form-item label="企业实际从事的经营项目" prop="businessProjects"> <el-form-item label="企业实际从事的经营项目" prop="businessProjects">
<el-input v-model="form.businessProjects" placeholder="请输入企业实际从事的经营项目" /> <el-input v-model="form.businessProjects" placeholder="请输入企业实际从事的经营项目" />
</el-form-item> </el-form-item>
<el-form-item label="分管安全副职姓名" prop="safetyManagerName"> <el-row>
<el-input v-model="form.safetyManagerName" placeholder="请输入分管安全副职姓名" /> <el-col :span="12">
</el-form-item> <el-form-item label="分管安全副职姓名" prop="safetyManagerName">
<el-form-item label="分管安全副职电话" prop="safetyManagerTel"> <el-input v-model="form.safetyManagerName" placeholder="请输入分管安全副职姓名" />
<el-input v-model="form.safetyManagerTel" placeholder="请输入分管安全副职电话" /> </el-form-item>
</el-form-item> </el-col>
<el-col :span="12">
<el-form-item label="分管安全副职电话" prop="safetyManagerTel">
<el-input v-model="form.safetyManagerTel" placeholder="请输入分管安全副职电话" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
@ -286,7 +371,7 @@ import { listEhsEnterprise, getEhsEnterprise, delEhsEnterprise, addEhsEnterprise
import {listAllDept } from "@/api/system/dept"; import {listAllDept } from "@/api/system/dept";
export default { export default {
name: "EhsEnterprise", name: "EhsEnterprise",
dicts: ['enterprise_type'], dicts: ['enterprise_type','enterprise_scale','economic_type','area_id'],
data() { data() {
return { return {
// //
@ -331,10 +416,40 @@ export default {
createUserId: null, createUserId: null,
updateUserId: null updateUserId: null
}, },
statusOptions: [{
value: '0',
label: '停业',
}, {
value: '1',
label: '正常经营',
}],
editShow:true,//
curDeptId:-1,//
// //
form: {}, form: {},
// //
rules: { rules: {
enterpriseName: [
{ required: true, message: "名称不能为空", trigger: "blur" }
],
enterpriseType: [
{ required: true, message: "行业不能为空", trigger: "change" }
],
enterpriseStatus: [
{ required: true, message: "企业现状不能为空", trigger: "change" }
],
areaId: [
{ required: true, message: "不能为空", trigger: "change" }
],
economicType: [
{ required: true, message: "不能为空", trigger: "change" }
],
enterpriseScale: [
{ required: true, message: "不能为空", trigger: "change" }
],
safetyManagerTel: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }
],
} }
}; };
}, },
@ -342,6 +457,7 @@ export default {
this.getList(); this.getList();
this.getListAllDept(); this.getListAllDept();
this.deptShow = this.$store.state.user.parentId==0 ?true :false; this.deptShow = this.$store.state.user.parentId==0 ?true :false;
this.curDeptId = this.$store.state.user.deptId;
}, },
methods: { methods: {
/** 查询企业基本信息列表 */ /** 查询企业基本信息列表 */
@ -390,7 +506,10 @@ export default {
remark: null, remark: null,
deptId: null, deptId: null,
createUserId: null, createUserId: null,
updateUserId: null updateUserId: null,
areaId:null,
economicType:null,
enterpriseScale:null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },

@ -0,0 +1,252 @@
<template>
<el-dialog title="企业信息查询" :visible.sync="open" width="800px" append-to-body>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="登记部门" prop="deptId" v-show="deptShow">
<el-select v-model="queryParams.deptId" filterable placeholder="请选择部门" clearable>
<el-option
v-for="dict in allDeptList"
:key="dict.deptId"
:label="dict.deptName"
:value="dict.deptId"
/>
</el-select>
</el-form-item>
<el-form-item label="社会信用代码" prop="enterpriseCode">
<el-input
v-model="queryParams.enterpriseCode"
placeholder="请输入社会信用代码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="名称" prop="enterpriseName">
<el-input
v-model="queryParams.enterpriseName"
placeholder="请输入名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="行业" prop="enterpriseType">
<el-select v-model="queryParams.enterpriseType" placeholder="请选择行业" clearable>
<el-option
v-for="dict in dict.type.enterprise_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="企业现状" prop="enterpriseStatus">
<el-select v-model="queryParams.enterpriseStatus" placeholder="请选择行业" clearable>
<el-option
v-for="dict in statusOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</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-table v-loading="loading" :data="ehsEnterpriseList" highlight-current-row
@current-change="handleCurrentChange" >
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- <el-table-column label="" align="center" prop="enterpriseId" />-->
<el-table-column label="登记部门" align="center" prop="deptName" v-if="this.$store.state.user.parentId==0"/>
<el-table-column label="社会信用代码" align="center" prop="enterpriseCode" />
<el-table-column label="名称" align="center" prop="enterpriseName" />
<el-table-column label="行业" align="center" prop="enterpriseType">
<template slot-scope="scope">
<dict-tag :options="dict.type.enterprise_type" :value="scope.row.enterpriseType"/>
</template>
</el-table-column>
<el-table-column label="企业现状" align="center" prop="enterpriseStatus">
<template slot-scope="scope">
<span> {{ (scope.row.enterpriseStatus !=null && scope.row.enterpriseStatus != "") ? statusOptions[scope.row.enterpriseStatus].label:""}}</span>
</template>
</el-table-column>
<el-table-column label="生产经营地址" align="center" prop="enterpriseAddr" />
<el-table-column label="企业负责人" align="center" prop="enterpriseLeader" />
<el-table-column label="企业负责人电话" align="center" prop="leaderTel" />
<el-table-column label="注册资本" align="center" prop="registeredCapital" />
<el-table-column label="营业执照核定的经营范围" align="center" prop="businessScope" />
<el-table-column label="企业实际从事的经营项目" align="center" prop="businessProjects" />
<el-table-column label="企业现状" align="center" prop="enterpriseStatus" />
<el-table-column label="分管安全副职姓名" align="center" prop="safetyManagerName" />
<el-table-column label="分管安全副职电话" align="center" prop="safetyManagerTel" />
<el-table-column label="备注" align="center" prop="remark" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { listEhsEnterprise, getEhsEnterprise, delEhsEnterprise, addEhsEnterprise, updateEhsEnterprise } from "@/api/ehs/ehsEnterprise";
import {listAllDept } from "@/api/system/dept";
export default {
name: "enterpriseSelect",
dicts: ['enterprise_type'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
ehsEnterpriseList: [],
//
deptShow: false,
//
allDeptList: [],
//
title: "",
//
open: false,
currRow:{},//
//
queryParams: {
pageNum: 1,
pageSize: 10,
enterpriseCode: null,
enterpriseName: null,
enterpriseType: null,
enterpriseAddr: null,
enterpriseLeader: null,
leaderTel: null,
registeredCapital: null,
businessScope: null,
businessProjects: null,
enterpriseStatus: null,
safetyManagerName: null,
safetyManagerTel: null,
deptId: null,
createUserId: null,
updateUserId: null
},
statusOptions: [{
value: '0',
label: '停业',
}, {
value: '1',
label: '正常经营',
}],
editShow:true,//
curDeptId:-1,//
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
this.getListAllDept();
this.deptShow = this.$store.state.user.parentId==0 ?true :false;
this.curDeptId = this.$store.state.user.deptId;
},
methods: {
/** 查询企业基本信息列表 */
getList() {
this.loading = true;
listEhsEnterprise(this.queryParams).then(response => {
this.ehsEnterpriseList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 单位信息列表 */
getListAllDept() {
console.log(this.$store.state.user.deptId);
this.loading = true;
listAllDept().then(response => {
this.allDeptList = response.data;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
enterpriseId: null,
enterpriseCode: null,
enterpriseName: null,
enterpriseType: null,
enterpriseAddr: null,
enterpriseLeader: null,
leaderTel: null,
registeredCapital: null,
businessScope: null,
businessProjects: null,
enterpriseStatus: null,
safetyManagerName: null,
safetyManagerTel: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
deptId: null,
createUserId: null,
updateUserId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleCurrentChange(row) {
this.currRow = row;
},
openDialog() {
this.open = true;
},
submitForm() {
// console.log(this.currRow);
// this.$emit("currEnterpriseInfo", this.currRow);
this.$emit("selectInfo",this.currRow);
this.open = false;
}
}
};
</script>

@ -0,0 +1,907 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="登记部门" prop="deptId" v-show="deptShow">
<el-select v-model="queryParams.deptId" filterable placeholder="请选择部门" clearable>
<el-option
v-for="dict in allDeptList"
:key="dict.deptId"
:label="dict.deptName"
:value="dict.deptId"
/>
</el-select>
</el-form-item>
<el-form-item label="隐患所在单位" prop="enterpriseName">
<el-input
v-model="queryParams.enterpriseName"
placeholder="请输入隐患所在单位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="行业" prop="enterpriseType">
<el-select v-model="queryParams.enterpriseType" placeholder="请选择行业" clearable>
<el-option
v-for="dict in dict.type.enterprise_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="企业现状" prop="enterpriseStatus">
<el-select v-model="queryParams.enterpriseStatus" placeholder="请选择行业" clearable>
<el-option
v-for="dict in statusOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="排查时间" prop="checkTime">
<el-date-picker
v-model="daterangeCheckTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
unlink-panels
:picker-options="pickerOptions"
></el-date-picker>
</el-form-item>
<el-form-item label="整改时间">
<el-date-picker
v-model="daterangeRectifyTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
unlink-panels
:picker-options="pickerOptions"
></el-date-picker>
</el-form-item>
<!--
<el-form-item label="整改措施" prop="rectifyMeasure">
<el-input
v-model="queryParams.rectifyMeasure"
placeholder="请输入整改措施"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="整改时间" prop="rectifyTime">
<el-input
v-model="queryParams.rectifyTime"
placeholder="请输入整改时间"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="整改责任人" prop="principalName">
<el-input
v-model="queryParams.principalName"
placeholder="请输入整改责任人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="监管部门" prop="regulatoryDept">
<el-input
v-model="queryParams.regulatoryDept"
placeholder="请输入监管部门"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="监管部门责任人" prop="regulatoryName">
<el-input
v-model="queryParams.regulatoryName"
placeholder="请输入监管部门责任人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item label="隐患级别" prop="hiddenDangerGrade">
<el-select v-model="queryParams.hiddenDangerGrade" placeholder="请选择隐患级别" clearable>
<el-option
v-for="dict in dict.type.hidden_danger_grade"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="隐患类型" prop="hiddenDangerType">
<el-select v-model="queryParams.hiddenDangerType" placeholder="请选择隐患类型" clearable>
<el-option
v-for="dict in dict.type.hidden_danger_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="标签" prop="hiddenDangerLabel">
<el-select v-model="queryParams.hiddenDangerLabel" placeholder="请选择标签" clearable>
<el-option
v-for="dict in dict.type.hidden_danger_label"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</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="['ehsHiddenDanger:ehsHiddenDanger: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="['ehsHiddenDanger:ehsHiddenDanger: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="['ehsHiddenDanger:ehsHiddenDanger:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="ehsHiddenDangerList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="hiddenDangerId" />-->
<el-table-column label="上报部门" align="center" prop="deptName" v-if="deptShow"/>
<el-table-column label="隐患所在单位" align="center" prop="enterpriseName" />
<el-table-column label="企业现状" align="center" prop="enterpriseStatus">
<template slot-scope="scope">
<span> {{ (scope.row.enterpriseStatus !=null && scope.row.enterpriseStatus != "") ? statusOptions[scope.row.enterpriseStatus].label:""}}</span>
</template>
</el-table-column>
<el-table-column label="行业" align="center" prop="enterpriseType">
<template slot-scope="scope">
<dict-tag :options="dict.type.enterprise_type" :value="scope.row.enterpriseType"/>
</template>
</el-table-column>
<el-table-column label="隐患情况" align="center" prop="hiddenDangerDesc" />
<el-table-column label="排查时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="要求整改时间" align="center" prop="rectifyTermTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.rectifyTermTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="排查方式" align="center" prop="checkType" />
<el-table-column label="隐患照片" align="center" prop="hiddenDangerImg" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.hiddenDangerImg" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="整改措施" align="center" prop="rectifyMeasure" />
<el-table-column label="整改进度" align="center" prop="status" />
<el-table-column label="整改时间" align="center" prop="rectifyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.rectifyTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="整改责任人" align="center" prop="principalName" />
<el-table-column label="整改照片" align="center" prop="rectifyImg" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.rectifyImg" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="监管部门" align="center" prop="regulatoryDept" />
<el-table-column label="监管部门责任人" align="center" prop="regulatoryName" />
<el-table-column label="隐患级别" align="center" prop="hiddenDangerGrade">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_grade" :value="scope.row.hiddenDangerGrade"/>
</template>
</el-table-column>
<el-table-column label="隐患类型" align="center" prop="hiddenDangerType">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_type" :value="scope.row.hiddenDangerType"/>
</template>
</el-table-column>
<el-table-column label="是否督办" align="center" prop="isSupervise">
<template slot-scope="scope">
<el-switch v-model="scope.row.isSupervise==1" @change="val => {isSuperviseChange(val, scope.row);}" ></el-switch>
</template>
</el-table-column>
<el-table-column label="是否协办" align="center" prop="assistDept">
<template slot-scope="scope">
<el-link type="primary" @click="val => {assistDeptClick(val, scope.row);}" > {{(scope.row.assistDept=='' ||scope.row.assistDept==null)?"无协办单位": "显示协办单位" }} </el-link>
</template>
</el-table-column>
<el-table-column label="整改资金" align="center" prop="rectifyMoney" />
<el-table-column label="标签" align="center" prop="hiddenDangerLabel">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_label" :value="scope.row.hiddenDangerLabel"/>
</template>
</el-table-column>
<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="['ehsHiddenDanger:ehsHiddenDanger:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:remove']"
>删除</el-button>
<!--<el-button v-if="scope.row.isSupervise==0"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleIsSupervise(scope.row)"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:supervise']"
>督办</el-button>-->
<el-button v-if="scope.row.assistDept=='' || scope.row.assistDept==null"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleAssist(scope.row)"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:assist']"
>协办</el-button>
<el-button v-if="scope.row.isSupervise==1 && ( scope.row.superviseResult=='' || scope.row.superviseResult==null)"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleAssistResult(scope.row)"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:assistResult']"
>录入反馈</el-button>
<el-button v-if="scope.row.superviseResult!=null && scope.row.superviseResult!='' "
size="mini"
type="text"
icon="el-icon-delete"
@click="handleShowAssistResult(scope.row)"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:showAssistResult']"
>显示反馈</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="800px" >
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="隐患所在单位" prop="enterpriseName">
<el-input placeholder="请输入隐患所在单位" v-model="form.enterpriseName" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="openEnterprise"></el-button>
</el-input>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="行业" prop="enterpriseType">
<el-select v-model="form.enterpriseType" placeholder="请选择行业">
<el-option
v-for="dict in dict.type.enterprise_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业现状" prop="enterpriseStatus">
<el-select v-model="form.enterpriseStatus" placeholder="请选择企业现状" clearable>
<el-option
v-for="dict in statusOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="经济类型" prop="economicType">
<el-select v-model="form.economicType" placeholder="请选择经济类型">
<el-option
v-for="dict in dict.type.economic_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业规模" prop="enterpriseScale">
<el-select v-model="form.enterpriseScale" placeholder="请选择企业规模" clearable>
<el-option
v-for="dict in dict.type.enterprise_scale"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="行政区域" prop="areaId">
<el-select v-model="form.areaId" placeholder="请选择行政区域">
<el-option
v-for="dict in dict.type.area_id"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
</el-col>
</el-row>
<el-form-item label="隐患情况" prop="hiddenDangerDesc">
<el-input v-model="form.hiddenDangerDesc" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="排查时间" prop="checkTime">
<el-date-picker clearable
v-model="form.checkTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择排查时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改期限" prop="rectifyTermTime">
<el-date-picker clearable
v-model="form.rectifyTermTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择整改期限">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="隐患照片" prop="hiddenDangerImg">
<image-upload v-model="form.hiddenDangerImg"/>
</el-form-item>
<el-form-item label="整改措施" prop="rectifyMeasure">
<el-input v-model="form.rectifyMeasure" type="textarea" placeholder="请输入整改措施" />
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="整改时间" prop="rectifyTime">
<el-date-picker clearable
v-model="form.rectifyTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择整改时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改责任人" prop="principalName">
<el-input v-model="form.principalName" placeholder="请输入整改责任人" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="整改照片" prop="rectifyImg">
<image-upload v-model="form.rectifyImg"/>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="监管部门" prop="regulatoryDept">
<el-input v-model="form.regulatoryDept" placeholder="请输入监管部门" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="监管责任人" prop="regulatoryName">
<el-input v-model="form.regulatoryName" placeholder="请输入监管部门责任人" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="隐患级别" prop="hiddenDangerGrade">
<el-select v-model="form.hiddenDangerGrade" placeholder="请选择隐患级别">
<el-option
v-for="dict in dict.type.hidden_danger_grade"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患类型" prop="hiddenDangerType">
<el-select v-model="form.hiddenDangerType" placeholder="请选择隐患类型">
<el-option
v-for="dict in dict.type.hidden_danger_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="标签" prop="hiddenDangerLabelArray">
<el-select v-model="form.hiddenDangerLabelArray" multiple collapse-tags placeholder="请选择标签">
<el-option
v-for="dict in dict.type.hidden_danger_label"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改资金" prop="rectifyMoney">
<el-input v-model="form.rectifyMoney" placeholder="请输入整改资金" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
<enterpriseSelect ref="enterpriseSelectRef" @selectInfo='selectInfo'></enterpriseSelect>
</el-dialog>
<!-- 协办 -->
<el-dialog :title="title" :visible.sync="openAssist" width="500px" append-to-body>
<el-form ref="form" :model="formAssist" :rules="rules" label-width="80px">
<el-form-item label="协办部门" prop="deptList">
<el-select v-model="assistDeptList" multiple collapse-tags
style="margin-left: 20px;" placeholder="请选择">
<el-option
v-for="dict in allDeptList"
:key="dict.deptId"
:label="dict.deptName"
:value="dict.deptId"
/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="assistForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listEhsHiddenDanger, getEhsHiddenDanger, delEhsHiddenDanger, addEhsHiddenDanger, updateEhsHiddenDanger,
superviseEhsHiddenDanger,assistEhsHiddenDanger } from "@/api/ehs/ehsHiddenDanger";
import {listAllDept } from "@/api/system/dept";
import enterpriseSelect from "./enterpriseSelect"
export default {
name: "EhsHiddenDanger",
dicts: ['hidden_danger_type', 'hidden_danger_grade', 'hidden_danger_label', 'enterprise_type','enterprise_scale','economic_type','area_id'],
components:{ enterpriseSelect },
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
ehsHiddenDangerList: [],
//
title: "",
//
open: false,
//
deptShow: false,
//
allDeptList: [],
currEnterpriseInfo:{},//
//
daterangeCheckTime: [],
//
daterangeRectifyTime: [],
openAssist:false,//
assistDeptList:"",//
currAssistHiddenDangerId :-1,//id
statusOptions: [{
value: '0',
label: '停业',
}, {
value: '1',
label: '正常经营',
}],
enterpriseSelectOpen:false,//
//
queryParams: {
pageNum: 1,
pageSize: 10,
enterpriseName: null,
enterpriseStatus: null,
enterpriseType: null,
hiddenDangerDesc: null,
checkTime: null,
checkType: null,
hiddenDangerImg: null,
rectifyMeasure: null,
status: null,
rectifyTime: null,
principalName: null,
rectifyImg: null,
regulatoryDept: null,
regulatoryName: null,
hiddenDangerGrade: null,
hiddenDangerType: null,
hiddenDangerLabel: null
},
//
form: {},
formAssist:{},
//
rules: {
enterpriseName: [ { type: 'string',required: true,message: "隐患所在单位必填", trigger: 'blur'}],
enterpriseType: [ { type: 'string',required: true,message: "行业必须选择", trigger: 'blur'}],
enterpriseStatus: [ { type: 'string',required: true,message: "企业现状必须选择", trigger: 'blur'}],
hiddenDangerDesc: [ { type: 'string',required: true,message: "隐患情况必填", trigger: 'blur'}],
checkTime: [ { required: true,message: "排查时间必填", trigger: 'blur'}],
rectifyTermTime: [ { required: true,message: "整改期限必填", trigger: 'blur'}],
/*rectifyMeasure: [ { type: 'string',required: true,message: "", trigger: 'blur'}],
rectifyTime: [ { type: 'date',required: true,message: "整改时间必填", trigger: 'blur'}],
hiddenDangerGrade: [ { type: 'string',required: true,message: "隐患级别必填", trigger: 'blur'}],
hiddenDangerType: [ { type: 'string',required: true,message: "隐患类型必填", trigger: 'blur'}],*/
rectifyMoney: [ {
pattern: /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/,
message: "请输入合法的金额数字,最多两位小数",
trigger: "change"
}],
areaId: [
{ required: true, message: "不能为空", trigger: "change" }
],
economicType: [
{ required: true, message: "不能为空", trigger: "change" }
],
enterpriseScale: [
{ required: true, message: "不能为空", trigger: "change" }
],
},
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
};
},
created() {
this.getList();
this.getListAllDept();
this.deptShow = this.$store.state.user.parentId==0 ?true :false;
},
methods: {
/** 查询隐患信息列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) {
this.queryParams.params["beginCheckTime"] = this.daterangeCheckTime[0];
this.queryParams.params["endCheckTime"] = this.daterangeCheckTime[1];
}
if (null != this.daterangeRectifyTime && '' != this.daterangeRectifyTime) {
this.queryParams.params["beginRectifyTime"] = this.daterangeRectifyTime[0];
this.queryParams.params["endRectifyTime"] = this.daterangeRectifyTime[1];
}
listEhsHiddenDanger(this.queryParams).then(response => {
this.ehsHiddenDangerList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 单位信息列表 */
getListAllDept() {
console.log(this.$store.state.user.deptId);
this.loading = true;
listAllDept().then(response => {
this.allDeptList = response.data;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
hiddenDangerId: null,
enterpriseName: null,
enterpriseStatus: null,
enterpriseType: null,
hiddenDangerDesc: null,
checkTime: null,
checkType: null,
hiddenDangerImg: null,
rectifyMeasure: null,
status: null,
rectifyTime: null,
principalName: null,
rectifyImg: null,
regulatoryDept: null,
regulatoryName: null,
hiddenDangerGrade: null,
hiddenDangerType: null,
hiddenDangerLabel: null,
hiddenDangerLabelArray:null,
areaId:null,
economicType:null,
enterpriseScale:null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeCheckTime = [];
this.daterangeRectifyTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.hiddenDangerId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加隐患信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const hiddenDangerId = row.hiddenDangerId || this.ids
getEhsHiddenDanger(hiddenDangerId).then(response => {
this.form = response.data;
/* this.form.hiddenDangerLabelArray.push("0");
this.form.hiddenDangerLabelArray.push("1");*/
this.open = true;
this.title = "修改隐患信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if(this.form.hiddenDangerLabelArray!=null){
this.form.hiddenDangerLabel = this.form.hiddenDangerLabelArray.join();
}
if (this.form.hiddenDangerId != null) {
updateEhsHiddenDanger(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addEhsHiddenDanger(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const hiddenDangerIds = row.hiddenDangerId || this.ids;
this.$modal.confirm('是否确认删除隐患信息编号为"' + hiddenDangerIds + '"的数据项?').then(function() {
return delEhsHiddenDanger(hiddenDangerIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('ehsHiddenDanger/ehsHiddenDanger/export', {
...this.queryParams
}, `ehsHiddenDanger_${new Date().getTime()}.xlsx`)
},
openEnterprise() {
this.$refs.enterpriseSelectRef.openDialog()
},
selectInfo(row) {
//
this.form.enterpriseName = row.enterpriseName;
this.form.enterpriseType = row.enterpriseType;
this.form.enterpriseStatus = row.enterpriseStatus;
this.form.areaId = row.areaId;
this.form.economicType = row.economicType;
this.form.enterpriseScale = row.enterpriseScale;
console.log(this.form);
},
/** 督办 */
handleIsSupervise(row) {
const hiddenDangerIds = row.hiddenDangerId || this.ids;
this.$modal.confirm('是否确认督办隐患信息?').then(function() {
return superviseEhsHiddenDanger(hiddenDangerIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("督办成功");
}).catch(() => {});
},
/** 协办 */
handleAssist(row) {
this.openAssist = true;
this.currAssistHiddenDangerId = row.hiddenDangerId;
},
/** 协办提交*/
assistForm() {
let deptIds = this.assistDeptList.join();
console.log(this.currAssistHiddenDangerId)
if (this.currAssistHiddenDangerId != null) {
assistEhsHiddenDanger({"hiddenDangerId":this.currAssistHiddenDangerId,"assistDept":deptIds}).then(response => {
this.$modal.msgSuccess("协办成功");
this.openAssist = false;
this.getList();
});
}
},
//
isSuperviseChange(value,row) {
if(this.deptShow==false){
return;
}
console.log(row);
if(row.isSupervise==0){
this.handleIsSupervise(row);
}else{
this.$modal.alert("此隐患已督办,不能撤回督办。");
}
},
//
assistDeptClick(value,row) {
if(row.assistDeptName!="" && row.assistDeptName!=null){
this.$alert(row.assistDeptName, '协办单位', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'info',
message: `action: ${ action }`
});
}
});
}
},
/** 输入督办反馈 */
handleAssistResult(row) {
this.$prompt('请输入督办反馈', '督办反馈', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
updateEhsHiddenDanger({"hiddenDangerId":row.hiddenDangerId,"superviseResult":value}).then(response => {
this.$modal.msgSuccess("督办反馈成功");
this.openAssist = false;
this.getList();
});
return;
//return updateEhsHiddenDanger({"hiddenDangerId":row.hiddenDangerId,"superviseResult":value});
}).catch(() => {
});
},
/** 显示督办反馈 */
handleShowAssistResult(row) {
this.$alert(row.superviseResult, '督办反馈', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'info',
message: `action: ${ action }`
});
}
});
},
}
};
</script>

@ -0,0 +1,510 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="登记部门" prop="deptId" v-show="deptShow">
<el-select v-model="queryParams.deptId" filterable placeholder="请选择部门" clearable>
<el-option
v-for="dict in allDeptList"
:key="dict.deptId"
:label="dict.deptName"
:value="dict.deptId"
/>
</el-select>
</el-form-item>
<el-form-item label="隐患所在单位" prop="enterpriseName">
<el-input
v-model="queryParams.enterpriseName"
placeholder="请输入隐患所在单位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="行业" prop="enterpriseType">
<el-select v-model="queryParams.enterpriseType" placeholder="请选择行业" clearable>
<el-option
v-for="dict in dict.type.enterprise_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="企业现状" prop="enterpriseStatus">
<el-select v-model="queryParams.enterpriseStatus" placeholder="请选择行业" clearable>
<el-option
v-for="dict in statusOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="排查时间" prop="checkTime">
<el-date-picker
v-model="daterangeCheckTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
unlink-panels
:picker-options="pickerOptions"
></el-date-picker>
</el-form-item>
<el-form-item label="整改时间">
<el-date-picker
v-model="daterangeRectifyTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
unlink-panels
:picker-options="pickerOptions"
></el-date-picker>
</el-form-item>
<el-form-item label="隐患级别" prop="hiddenDangerGrade">
<el-select v-model="queryParams.hiddenDangerGrade" placeholder="请选择隐患级别" clearable>
<el-option
v-for="dict in dict.type.hidden_danger_grade"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="隐患类型" prop="hiddenDangerType">
<el-select v-model="queryParams.hiddenDangerType" placeholder="请选择隐患类型" clearable>
<el-option
v-for="dict in dict.type.hidden_danger_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="标签" prop="hiddenDangerLabel">
<el-select v-model="queryParams.hiddenDangerLabel" placeholder="请选择标签" clearable>
<el-option
v-for="dict in dict.type.hidden_danger_label"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</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="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="ehsHiddenDangerList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="hiddenDangerId" />-->
<el-table-column label="上报部门" align="center" prop="deptName" v-if="deptShow"/>
<el-table-column label="隐患所在单位" align="center" prop="enterpriseName" />
<el-table-column label="企业现状" align="center" prop="enterpriseStatus">
<template slot-scope="scope">
<span> {{ (scope.row.enterpriseStatus !=null && scope.row.enterpriseStatus != "") ? statusOptions[scope.row.enterpriseStatus].label:""}}</span>
</template>
</el-table-column>
<el-table-column label="行业" align="center" prop="enterpriseType">
<template slot-scope="scope">
<dict-tag :options="dict.type.enterprise_type" :value="scope.row.enterpriseType"/>
</template>
</el-table-column>
<el-table-column label="隐患情况" align="center" prop="hiddenDangerDesc" />
<el-table-column label="排查时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="要求整改时间" align="center" prop="rectifyTermTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.rectifyTermTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="排查方式" align="center" prop="checkType" />
<el-table-column label="隐患照片" align="center" prop="hiddenDangerImg" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.hiddenDangerImg" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="整改措施" align="center" prop="rectifyMeasure" />
<el-table-column label="整改进度" align="center" prop="status" />
<el-table-column label="整改时间" align="center" prop="rectifyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.rectifyTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="整改责任人" align="center" prop="principalName" />
<el-table-column label="整改照片" align="center" prop="rectifyImg" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.rectifyImg" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="监管部门" align="center" prop="regulatoryDept" />
<el-table-column label="监管部门责任人" align="center" prop="regulatoryName" />
<el-table-column label="隐患级别" align="center" prop="hiddenDangerGrade">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_grade" :value="scope.row.hiddenDangerGrade"/>
</template>
</el-table-column>
<el-table-column label="隐患类型" align="center" prop="hiddenDangerType">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_type" :value="scope.row.hiddenDangerType"/>
</template>
</el-table-column>
<el-table-column label="是否督办" align="center" prop="isSupervise">
<template slot-scope="scope">
<el-switch v-model="scope.row.isSupervise==1" @change="val => {isSuperviseChange(val, scope.row);}" ></el-switch>
</template>
</el-table-column>
<el-table-column label="是否协办" align="center" prop="assistDept">
<template slot-scope="scope">
<el-link type="primary" @click="val => {assistDeptClick(val, scope.row);}" > {{(scope.row.assistDept=='' ||scope.row.assistDept==null)?"无协办单位": "显示协办单位" }} </el-link>
</template>
</el-table-column>
<el-table-column label="整改资金" align="center" prop="rectifyMoney" />
<el-table-column label="标签" align="center" prop="hiddenDangerLabel">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_label" :value="scope.row.hiddenDangerLabel"/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listEhsHiddenDanger, getEhsHiddenDanger, delEhsHiddenDanger, addEhsHiddenDanger, updateEhsHiddenDanger,
superviseEhsHiddenDanger,assistEhsHiddenDanger } from "@/api/ehs/ehsHiddenDanger";
import {listAllDept } from "@/api/system/dept";
import enterpriseSelect from "./enterpriseSelect"
export default {
name: "EhsHiddenDanger",
dicts: ['hidden_danger_type', 'hidden_danger_grade', 'hidden_danger_label', 'enterprise_type'],
components:{ enterpriseSelect },
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
ehsHiddenDangerList: [],
//
title: "",
//
open: false,
//
deptShow: false,
//
allDeptList: [],
currEnterpriseInfo:{},//
//
daterangeCheckTime: [],
//
daterangeRectifyTime: [],
openAssist:false,//
assistDeptList:"",//
currAssistHiddenDangerId :-1,//id
statusOptions: [{
value: '0',
label: '停业',
}, {
value: '1',
label: '正常经营',
}],
enterpriseSelectOpen:false,//
//
queryParams: {
pageNum: 1,
pageSize: 10,
enterpriseName: null,
enterpriseStatus: null,
enterpriseType: null,
hiddenDangerDesc: null,
checkTime: null,
checkType: null,
hiddenDangerImg: null,
rectifyMeasure: null,
status: null,
rectifyTime: null,
principalName: null,
rectifyImg: null,
regulatoryDept: null,
regulatoryName: null,
hiddenDangerGrade: null,
hiddenDangerType: null,
hiddenDangerLabel: null,
assistDept:this.$store.state.user.deptId
},
//
form: {},
formAssist:{},
//
rules: {
},
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
};
},
created() {
this.getList();
this.getListAllDept();
this.deptShow = this.$store.state.user.parentId==0 ?true :false;
},
methods: {
/** 查询隐患信息列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCheckTime && '' != this.daterangeCheckTime) {
this.queryParams.params["beginCheckTime"] = this.daterangeCheckTime[0];
this.queryParams.params["endCheckTime"] = this.daterangeCheckTime[1];
}
if (null != this.daterangeRectifyTime && '' != this.daterangeRectifyTime) {
this.queryParams.params["beginRectifyTime"] = this.daterangeRectifyTime[0];
this.queryParams.params["endRectifyTime"] = this.daterangeRectifyTime[1];
}
listEhsHiddenDanger(this.queryParams).then(response => {
this.ehsHiddenDangerList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 单位信息列表 */
getListAllDept() {
console.log(this.$store.state.user.deptId);
this.loading = true;
listAllDept().then(response => {
this.allDeptList = response.data;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeCheckTime = [];
this.daterangeRectifyTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.hiddenDangerId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加隐患信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const hiddenDangerId = row.hiddenDangerId || this.ids
getEhsHiddenDanger(hiddenDangerId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改隐患信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.hiddenDangerId != null) {
updateEhsHiddenDanger(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addEhsHiddenDanger(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const hiddenDangerIds = row.hiddenDangerId || this.ids;
this.$modal.confirm('是否确认删除隐患信息编号为"' + hiddenDangerIds + '"的数据项?').then(function() {
return delEhsHiddenDanger(hiddenDangerIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('ehsHiddenDanger/ehsHiddenDanger/export', {
...this.queryParams
}, `ehsHiddenDanger_${new Date().getTime()}.xlsx`)
},
openEnterprise() {
this.$refs.enterpriseSelectRef.openDialog()
},
selectInfo(row) {
//
this.form.enterpriseName = row.enterpriseName;
this.form.enterpriseType = row.enterpriseType;
this.form.enterpriseStatus = row.enterpriseStatus;
console.log(this.form);
},
/** 督办 */
handleIsSupervise(row) {
const hiddenDangerIds = row.hiddenDangerId || this.ids;
this.$modal.confirm('是否确认督办隐患信息?').then(function() {
return superviseEhsHiddenDanger(hiddenDangerIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("督办成功");
}).catch(() => {});
},
/** 协办 */
handleAssist(row) {
this.openAssist = true;
this.currAssistHiddenDangerId = row.hiddenDangerId;
},
/** 协办提交*/
assistForm() {
let deptIds = this.assistDeptList.join();
console.log(this.currAssistHiddenDangerId)
if (this.currAssistHiddenDangerId != null) {
assistEhsHiddenDanger({"hiddenDangerId":this.currAssistHiddenDangerId,"assistDept":deptIds}).then(response => {
this.$modal.msgSuccess("协办成功");
this.openAssist = false;
this.getList();
});
}
},
//
isSuperviseChange(value,row) {
if(this.deptShow==false){
return;
}
console.log(row);
if(row.isSupervise==0){
this.handleIsSupervise(row);
}else{
this.$modal.alert("此隐患已督办,不能撤回督办。");
}
},
//
assistDeptClick(value,row) {
if(row.assistDeptName!="" && row.assistDeptName!=null){
this.$alert(row.assistDeptName, '协办单位', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'info',
message: `action: ${ action }`
});
}
});
}
},
/** 输入督办反馈 */
handleAssistResult(row) {
this.$prompt('请输入督办反馈', '督办反馈', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
return updateEhsHiddenDanger({"hiddenDangerId":row.hiddenDangerId,"superviseResult":value});
}).catch(() => {
this.getList();
this.$modal.msgSuccess("督办反馈成功");
});
},
/** 显示督办反馈 */
handleShowAssistResult(row) {
this.$alert(row.superviseResult, '督办反馈', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'info',
message: `action: ${ action }`
});
}
});
},
}
};
</script>

@ -40,7 +40,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="规格/参数" prop="materialSpecs"> <!--<el-form-item label="规格/参数" prop="materialSpecs">
<el-input <el-input
v-model="queryParams.materialSpecs" v-model="queryParams.materialSpecs"
placeholder="请输入规格/参数" placeholder="请输入规格/参数"
@ -79,7 +79,7 @@
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -162,6 +162,11 @@
<el-table-column label="储备地点" align="center" prop="reserveLocation" /> <el-table-column label="储备地点" align="center" prop="reserveLocation" />
<el-table-column label="管理责任人" align="center" prop="managerPerson" /> <el-table-column label="管理责任人" align="center" prop="managerPerson" />
<el-table-column label="联系电话" align="center" prop="tel" /> <el-table-column label="联系电话" align="center" prop="tel" />
<el-table-column label="更新时间" align="center" prop="updateTime" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -183,7 +188,7 @@
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleSendCommand(scope.row)" @click="handleSendCommand(scope.row)"
v-hasPermi="['EhsMaterialDetail:EhsMaterialDetail:add']" v-hasPermi="['EhsMaterialDetail:EhsMaterialDetail:out']"
>下发出库指令</el-button> >下发出库指令</el-button>
<el-button v-show="scope.row.sendQuantity!=null" <el-button v-show="scope.row.sendQuantity!=null"
size="mini" size="mini"
@ -192,6 +197,13 @@
@click="handleOutbound(scope.row)" @click="handleOutbound(scope.row)"
v-hasPermi="['EhsMaterialDetail:EhsMaterialDetail:edit']" v-hasPermi="['EhsMaterialDetail:EhsMaterialDetail:edit']"
>执行出库指令</el-button> >执行出库指令</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleInbound(scope.row)"
v-hasPermi="['EhsMaterialDetail:EhsMaterialDetail:in']"
>入库</el-button>
<el-button v-show="scope.row.sendQuantity!=null" <el-button v-show="scope.row.sendQuantity!=null"
size="mini" size="mini"
type="text" type="text"
@ -219,46 +231,64 @@
/> />
<!-- 添加或修改物资信息包含 通用应急救援装备防汛抗旱应急救援装备森林防灭火应急救援装备救灾物资对话框 --> <!-- 添加或修改物资信息包含 通用应急救援装备防汛抗旱应急救援装备森林防灭火应急救援装备救灾物资对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" 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="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="性质" prop="materialType"> <el-row>
<el-select v-model="form.materialType" placeholder="请选择性质" clearable> <el-col :span="12">
<el-option <el-form-item label="性质" prop="materialType">
v-for="dict in materialTypeOptions" <el-select v-model="form.materialType" placeholder="请选择性质" clearable>
:key="dict.value" <el-option
:label="dict.label" v-for="dict in materialTypeOptions"
:value="dict.value" :key="dict.value"
></el-option> :label="dict.label"
</el-select> :value="dict.value"
</el-form-item> ></el-option>
<el-form-item label="类别" prop="classSecond"> </el-select>
<el-select v-model="form.classSecond" placeholder="请选择类别"> </el-form-item>
<el-option </el-col>
v-for="dict in curDict" <el-col :span="12">
:key="dict.value" <el-form-item label="类别" prop="classSecond">
:label="dict.label" <el-select v-model="form.classSecond" placeholder="请选择类别">
:value="dict.value" <el-option
></el-option> v-for="dict in curDict"
</el-select> :key="dict.value"
</el-form-item> :label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="物资名称" prop="materialName"> <el-form-item label="物资名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请输入物资名称" /> <el-input v-model="form.materialName" placeholder="请输入物资名称" />
</el-form-item> </el-form-item>
<el-form-item label="规格/参数" prop="materialSpecs"> <el-row>
<el-input v-model="form.materialSpecs" placeholder="请输入规格/参数" /> <el-col :span="12">
</el-form-item> <el-form-item label="规格/参数" prop="materialSpecs">
<el-form-item label="数量" prop="materialQuantity"> <el-input v-model="form.materialSpecs" placeholder="请输入规格/参数" />
<el-input v-model="form.materialQuantity" placeholder="请输入数量" /> </el-form-item>
</el-form-item> </el-col>
<el-col :span="12">
<el-form-item label="数量" prop="materialQuantity">
<el-input v-model="form.materialQuantity" placeholder="请输入数量" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="储备地点" prop="reserveLocation"> <el-form-item label="储备地点" prop="reserveLocation">
<el-input v-model="form.reserveLocation" placeholder="请输入储备地点" /> <el-input v-model="form.reserveLocation" placeholder="请输入储备地点" />
</el-form-item> </el-form-item>
<el-form-item label="管理责任人" prop="managerPerson"> <el-row>
<el-input v-model="form.managerPerson" placeholder="请输入管理责任人" /> <el-col :span="12">
</el-form-item> <el-form-item label="管理责任人" prop="managerPerson">
<el-form-item label="联系电话" prop="tel"> <el-input v-model="form.managerPerson" placeholder="请输入管理责任人" />
<el-input v-model="form.tel" placeholder="请输入联系电话" /> </el-form-item>
</el-form-item> </el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="tel">
<el-input v-model="form.tel" placeholder="请输入联系电话" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
@ -273,16 +303,22 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="materialDetailId" /> <!-- <el-table-column label="主键" align="center" prop="materialDetailId" />
<el-table-column label="物资表" align="center" prop="materialId" />--> <el-table-column label="物资表" align="center" prop="materialId" />-->
<el-table-column label="出库指令发送人" align="center" prop="sendUserId" /> <el-table-column label="出库指令发送人" align="center" prop="sendUserName" />
<el-table-column label="出库指令发送数量" align="center" prop="sendQuantity" /> <el-table-column label="出库指令数量" align="center" prop="sendQuantity" />
<el-table-column label="出库指令发送时间" align="center" prop="sendTime" width="180"> <el-table-column label="出库指令发送时间" align="center" prop="sendTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.sendTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.sendTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="出库人" align="center" prop="outboundUserId" /> <el-table-column label="出/入库类型" align="center" prop="sendTime" width="180">
<el-table-column label="出库数量" align="center" prop="outboundQuantity" /> <template slot-scope="scope">
<el-table-column label="出库时间" align="center" prop="outboundTime" width="180"> <span>{{ scope.row.operateType==0?"出库":"入库" }}</span>
</template>
</el-table-column>
<el-table-column label="出/入库人" align="center" prop="outboundUserName" />
<el-table-column label="出/入库数量" align="center" prop="outboundQuantity" />
<el-table-column label="当前库存" align="center" prop="inventory" />
<el-table-column label="操作时间" align="center" prop="outboundTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.outboundTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.outboundTime, '{y}-{m}-{d}') }}</span>
</template> </template>
@ -336,11 +372,11 @@
allDeptList: [], allDeptList: [],
sendQuantity:"",// sendQuantity:"",//
materialTypeOptions: [{ materialTypeOptions: [{
value: '1', value: 1,
label: '自储', label: '自储',
raw:{listClass: 'default'} raw:{listClass: 'default'}
}, { }, {
value: '2', value: 2,
label: '社会代储', label: '社会代储',
raw:{listClass: 'default'} raw:{listClass: 'default'}
}], }],
@ -366,10 +402,24 @@
// //
rules: { rules: {
materialQuantity: [ materialQuantity: [
{ required: true, message: "企业名称不能为空", trigger: "blur" }, { required: true, message: "数量不能为空", trigger: "blur" },
{type: 'string', required: true, pattern:/^\d+$|^\d+[.]?\d+$/, message:'请输入正确的数量', trigger: 'blur'} {type: 'string', required: true, pattern:/^\d+$|^\d+[.]?\d+$/, message:'请输入正确的数量', trigger: 'blur'}
],
], materialType: [
{ required: true, message: "性质不能为空", trigger: "blur" }
],
classSecond: [
{ required: true, message: "类别不能为空", trigger: "blur" }
],
materialName: [
{ required: true, message: "物资名称不能为空", trigger: "blur" }
],
materialQuantity: [
{ required: true, message: "数量不能为空", trigger: "blur" }
],
tel: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }
],
} }
}; };
}, },
@ -535,15 +585,11 @@
}).then(({ value }) => { }).then(({ value }) => {
this.loading = true; this.loading = true;
//this.sendQuantity = value; //this.sendQuantity = value;
addEhsMaterialDetail({"sendQuantity":value,"materialId":row.materialId}).then(response => { addEhsMaterialDetail({"sendQuantity":value,"materialId":row.materialId,"operateType":0}).then(response => {
this.$modal.msgSuccess("出库指令发送成功"); this.$modal.msgSuccess("出库指令发送成功");
this.loading = false; this.loading = false;
this.getList(); this.getList();
}); });
/*this.$message({
type: 'success',
message: '你的邮箱是: ' + value
});*/
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
@ -565,12 +611,34 @@
},/** */ },/** */
handleOutbound(row) { handleOutbound(row) {
this.$modal.confirm('是否执行出库指令?' ).then(function() { this.$modal.confirm('是否执行出库指令?' ).then(function() {
return updateEhsMaterialDetail(row.materialId); return updateEhsMaterialDetail({"materialId":row.materialId});
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("执行成功"); this.$modal.msgSuccess("执行成功");
}).catch(() => {}); }).catch(() => {});
}, },
/** 入库 */
handleInbound(row) {
this.$prompt('请输入入库数量', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^\d+$|^\d+[.]?\d+$/,
inputErrorMessage: '入库数量只能是数字'
}).then(({ value }) => {
this.loading = true;
//this.sendQuantity = value;
addEhsMaterialDetail({"outboundQuantity":value,"materialId":row.materialId,"operateType":1}).then(response => {
this.$modal.msgSuccess("入库成功");
this.loading = false;
this.getList();
});
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
});
});
},
handleDelDetail(row) { handleDelDetail(row) {
this.$modal.confirm('是否终止出库指令?' ).then(function() { this.$modal.confirm('是否终止出库指令?' ).then(function() {
return delEhsMaterialDetail(row.materialId); return delEhsMaterialDetail(row.materialId);

@ -53,17 +53,25 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="noticeMessageId" />--> <!-- <el-table-column label="主键" align="center" prop="noticeMessageId" />-->
<el-table-column label="标题" align="center" prop="title" /> <el-table-column label="标题" align="center" prop="title" />
<el-table-column label="内容" align="center" prop="displayContent" > <!-- <el-table-column label="内容" align="center" prop="displayContent" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-html="scope.row.displayContent"> </span> <span v-html="scope.row.displayContent"> </span>
</template> </template>
</el-table-column> </el-table-column>--><!-- <el-table-column label="" align="center" prop="displayContent" >
<template slot-scope="scope">
<span v-html="scope.row.displayContent"> </span>
</template>
</el-table-column>-->
<el-table-column label="部门列表" align="center" prop="deptName" style="white-space: pre-wrap;"> <el-table-column label="部门列表" align="center" prop="deptName" style="white-space: pre-wrap;">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-html='scope.row.allDept==1 ?"": scope.row.deptName.replace(/;/g ,"<br>")'> </span> <span v-html='scope.row.allDept==1 ?"": scope.row.deptName.replace(/;/g ,"<br>")'> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务模板" align="center" prop="fileTempName" v-if ="taskShow" /> <el-table-column label="任务模板" align="center" prop="fileTempOriginalName" v-if ="taskShow" >
<template slot-scope="scope">
<el-link type="primary" @click="downloadFile(scope.row)" > {{(scope.row.fileTempOriginalName=='' ||scope.row.fileTempOriginalName==null)?"": scope.row.fileTempOriginalName }} </el-link>
</template>
</el-table-column>
<el-table-column label="发布状态" align="center" prop="status" > <el-table-column label="发布状态" align="center" prop="status" >
<template slot-scope="scope"> <template slot-scope="scope">
<span> {{ statusList[scope.row.status].label}}</span> <span> {{ statusList[scope.row.status].label}}</span>
@ -107,6 +115,13 @@
@click="handleListFile(scope.row)" @click="handleListFile(scope.row)"
v-hasPermi="['ehsNoticeMessage:ehsNoticeMessage:total']" v-hasPermi="['ehsNoticeMessage:ehsNoticeMessage:total']"
>统计</el-button> >统计</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDetail(scope.row)"
v-hasPermi="['ehsNoticeMessage:ehsNoticeMessage:displayDetail']"
>显示</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -157,6 +172,8 @@
</el-dialog> </el-dialog>
<!-- 上报企业统计 --> <!-- 上报企业统计 -->
<el-dialog :title="title" :visible.sync="openFile" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="openFile" width="500px" append-to-body>
<el-button type="primary" @click="downAllFile"></el-button>
<el-table v-loading="loading" :data="ehsNoticeMessageFileList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="ehsNoticeMessageFileList" @selection-change="handleSelectionChange">
<el-table-column label="部门名称" align="center" prop="deptName" /> <el-table-column label="部门名称" align="center" prop="deptName" />
<el-table-column label="上报情况" align="center" prop="originalName" > <el-table-column label="上报情况" align="center" prop="originalName" >
@ -181,12 +198,32 @@
</el-pagination> </el-pagination>
</el-dialog> </el-dialog>
<!--只读显示-->
<el-dialog :title="title" :visible.sync="openDetail" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="标题" prop="title">
{{form.title}}
</el-form-item>
<el-form-item label="内容">
<template slot-scope="scope">
<span v-html="form.displayContent"> </span>
</template>
</el-form-item>
<el-form-item label="备注" prop="remark">
{{form.remark}}
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelDetail"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listEhsNoticeMessageAdmin,listEhsNoticeMessage, getEhsNoticeMessage, delEhsNoticeMessage, addEhsNoticeMessage, import { listEhsNoticeMessageAdmin,listEhsNoticeMessage, getEhsNoticeMessage, delEhsNoticeMessage, addEhsNoticeMessage,
updateEhsNoticeMessage,issueNews } from "@/api/ehs/ehsNoticeMessage"; updateEhsNoticeMessage,issueNews,displayDetailEhsNoticeMessage } from "@/api/ehs/ehsNoticeMessage";
import {listAllDept2 } from "@/api/system/dept"; import {listAllDept2 } from "@/api/system/dept";
import {listFileEhsNoticeMessageFile } from "@/api/ehs/ehsNoticeMessageFile"; import {listFileEhsNoticeMessageFile } from "@/api/ehs/ehsNoticeMessageFile";
export default { export default {
@ -212,7 +249,7 @@ export default {
title: "", title: "",
openFile:false,// openFile:false,//
ehsNoticeMessageFileList:[],// ehsNoticeMessageFileList:[],//
downaAllnoticeMessageId:null,//id
// //
open: false, open: false,
// //
@ -222,6 +259,7 @@ export default {
// //
allDeptCheck:false, allDeptCheck:false,
taskShow:false,// taskShow:false,//
openDetail:false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -293,6 +331,18 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
cancelDetail() {
this.openDetail = false;
},
/** 阅读 */
handleDetail(row) {
displayDetailEhsNoticeMessage(row.noticeMessageId).then(response => {
this.form = response.data;
this.openDetail = true;
this.title = "阅读消息通知";
this.getList();
});
},
// //
reset() { reset() {
this.form = { this.form = {
@ -314,7 +364,8 @@ export default {
deptId: null, deptId: null,
createUserId: null, createUserId: null,
updateUserId: null, updateUserId: null,
fileTempName:null fileTempName:null,
fileTempOriginalName:null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -338,7 +389,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加内部公告"; this.title = "添加";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -347,12 +398,16 @@ export default {
getEhsNoticeMessage(noticeMessageId).then(response => { getEhsNoticeMessage(noticeMessageId).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改内部公告"; this.title = "修改";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if(this.form.fileTempName==null ||this.form.fileTempName==''){
this.$modal.alert("请选择模板文件");
return;
}
if (valid) { if (valid) {
let ad = this.allDeptCheck ==true ? 1:0; let ad = this.allDeptCheck ==true ? 1:0;
this.form.allDept = ad; this.form.allDept = ad;
@ -360,6 +415,16 @@ export default {
this.form.deptList = this.form.deptList.join(); this.form.deptList = this.form.deptList.join();
else else
this.form.deptList = ""; this.form.deptList = "";
//
let fileTemp = this.form.fileTempName.split(",");
let oFile = [];
for(let i=0;i<fileTemp.length ;i++){
let f = fileTemp[i].split("/");
let f1 = f[f.length-1].split("_")[0];
let f2 = f[f.length-1].split(".")[1];
oFile.push(f1+"."+f2);
}
this.form.fileTempOriginalName = oFile.join(",");
if (this.form.noticeMessageId != null) { if (this.form.noticeMessageId != null) {
updateEhsNoticeMessage(this.form).then(response => { updateEhsNoticeMessage(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -410,6 +475,7 @@ export default {
handleListFile(row) { handleListFile(row) {
this.loading = true; this.loading = true;
this.openFile = true; this.openFile = true;
this.downaAllnoticeMessageId = row.noticeMessageId;
listFileEhsNoticeMessageFile({"noticeMessageId":row.noticeMessageId}).then(response => { listFileEhsNoticeMessageFile({"noticeMessageId":row.noticeMessageId}).then(response => {
this.ehsNoticeMessageFileList = response.rows; this.ehsNoticeMessageFileList = response.rows;
this.totalFileList = response.total; this.totalFileList = response.total;
@ -429,6 +495,21 @@ export default {
this.loading = false; this.loading = false;
}) })
}, },
downloadFile(row){
this.$download.saveAs(`${process.env.VUE_APP_BASE_API}${row.fileTempName}`,`${row.fileTempOriginalName}`);
},
downAllFile(){
let p = "/ehsNoticeMessageFile/ehsNoticeMessageFile/downloadlist/" + this.downaAllnoticeMessageId
console.log(p)
this.$download.zip(p);
/* var elt = document.createElement('a');
elt.setAttribute('href', process.env.VUE_APP_BASE_API + "/downloadlist/" + this.downaAllnoticeMessageId);
elt.setAttribute('download', "");
elt.style.display = 'none';
document.body.appendChild(elt);
elt.click();
document.body.removeChild(elt);*/
},
} }
}; };
</script> </script>

@ -75,7 +75,11 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="noticeMessageId" />--> <!-- <el-table-column label="主键" align="center" prop="noticeMessageId" />-->
<el-table-column label="标题" align="center" prop="title" /> <el-table-column label="标题" align="center" prop="title" />
<el-table-column label="任务模板" align="center" prop="fileTempName" v-if ="taskShow" /> <el-table-column label="任务模板" align="center" prop="fileTempOriginalName" v-if ="taskShow" >
<template slot-scope="scope">
<el-link type="primary" @click="downloadFile(scope.row)" > {{(scope.row.fileTempOriginalName=='' ||scope.row.fileTempOriginalName==null)?"": scope.row.fileTempOriginalName }} </el-link>
</template>
</el-table-column>
<el-table-column label="提交状态" align="center" prop="status" > <el-table-column label="提交状态" align="center" prop="status" >
<template slot-scope="scope"> <template slot-scope="scope">
<span> {{ statusList[scope.row.fileState].label }}</span> <span> {{ statusList[scope.row.fileState].label }}</span>
@ -87,7 +91,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="通知时间" align="center" prop="createTime" /> <el-table-column label="通知时间" align="center" prop="createTime" />
<el-table-column label="文件名" align="center" prop="originalName" /> <el-table-column label="上报文件" align="center" prop="originalName" >
<template slot-scope="scope">
<el-link type="primary" @click="downloadDeptFile(scope.row)" > {{(scope.row.originalName=='' ||scope.row.originalName==null)?"": scope.row.originalName }} </el-link>
</template>
</el-table-column>
<!--<el-table-column label="0不是全部1全部企业" align="center" prop="allDept" />--> <!--<el-table-column label="0不是全部1全部企业" align="center" prop="allDept" />-->
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -173,7 +181,9 @@
{{form.title}} {{form.title}}
</el-form-item> </el-form-item>
<el-form-item label="内容"> <el-form-item label="内容">
{{form.displayContent}} <template slot-scope="scope">
<span v-html="form.displayContent"> </span>
</template>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
@ -343,7 +353,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加内部公告"; this.title = "添加";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -352,7 +362,7 @@ export default {
getEhsNoticeMessage(noticeMessageId).then(response => { getEhsNoticeMessage(noticeMessageId).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改内部公告"; this.title = "修改";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -441,7 +451,7 @@ export default {
let f = fileTemp[i].split("/"); let f = fileTemp[i].split("/");
let f1 = f[f.length-1].split("_")[0]; let f1 = f[f.length-1].split("_")[0];
let f2 = f[f.length-1].split(".")[1]; let f2 = f[f.length-1].split(".")[1];
oFile.push(f1+f2); oFile.push(f1+"."+f2);
} }
let fileInfo = {}; let fileInfo = {};
fileInfo.noticeMessageId = this.curNoticeMessageId ; fileInfo.noticeMessageId = this.curNoticeMessageId ;
@ -453,6 +463,12 @@ export default {
this.getList(); this.getList();
}); });
}, },
downloadFile(row){
this.$download.saveAs(`${process.env.VUE_APP_BASE_API}${row.fileTempName}`,`${row.fileTempOriginalName}`);
},
downloadDeptFile(row){
this.$download.saveAs(`${process.env.VUE_APP_BASE_API}${row.fileName}`,`${row.originalName}`);
},
} }
}; };
</script> </script>

@ -1,8 +1,8 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="部门" prop="deptId" v-show="deptShow"> <el-form-item label="登记部门" prop="deptId" v-show="deptShow">
<el-select v-model="queryParams.deptId" filterable placeholder="请选择部门" clearable> <el-select v-model="queryParams.deptId" filterable placeholder="请选择部门" clearable>
<el-option <el-option
v-for="dict in allDeptList" v-for="dict in allDeptList"
:key="dict.deptId" :key="dict.deptId"
@ -21,8 +21,8 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="上报地址类别" prop="reportAddressType"> <el-form-item label="风险点类型" prop="reportAddressType">
<el-select v-model="queryParams.reportAddressType" placeholder="请选择上报地址类别" clearable> <el-select v-model="queryParams.reportAddressType" placeholder="请选择风险点类型" clearable>
<el-option <el-option
v-for="dict in dict.type.risk_report_address_type" v-for="dict in dict.type.risk_report_address_type"
:key="dict.value" :key="dict.value"
@ -39,18 +39,18 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="联系电话" prop="tel"> <el-form-item label="涉及群众数量" prop="peopleQuantity">
<el-input <el-input
v-model="queryParams.tel" v-model="queryParams.peopleQuantity"
placeholder="请输入联系电话" placeholder="请输入涉及群众数量"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="涉及群众数量" prop="peopleQuantity"> <el-form-item label="抢险救援物资保障地点" prop="materialsAddr">
<el-input <el-input
v-model="queryParams.peopleQuantity" v-model="queryParams.materialsAddr"
placeholder="请输入涉及群众数量" placeholder="请输入抢险救援物资保障地点"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -63,42 +63,114 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="抢修队伍人员" prop="repairTeam"> <el-form-item label="生活物资保障地点" prop="lifeAddr">
<el-input <el-input
v-model="queryParams.repairTeam" v-model="queryParams.lifeAddr"
placeholder="请输入抢修队伍人员" placeholder="请输入生活物资保障地点"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="责任人" prop="personResponsible"> <el-form-item label="人员转移安置点" prop="resettleAddr">
<el-input <el-input
v-model="queryParams.personResponsible" v-model="queryParams.resettleAddr"
placeholder="请输入责任人" placeholder="请输入员转移安置点"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="乡级责任人" prop="villagePersonResponsible"> <el-form-item label="乡级责任人姓名" prop="villageName">
<el-input <el-input
v-model="queryParams.villagePersonResponsible" v-model="queryParams.villageName"
placeholder="请输入乡级责任人" placeholder="请输入乡级责任人姓名"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="村级责任人" prop="villagePersonResponsible2"> <el-form-item label="乡级责任人职务" prop="villageDuties">
<el-input <el-input
v-model="queryParams.villagePersonResponsible2" v-model="queryParams.villageDuties"
placeholder="请输入村级责任人" placeholder="请输入乡级责任人职务"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="联系电话" prop="tel2"> <el-form-item label="乡级责任人联系电话" prop="villageTel">
<el-input <el-input
v-model="queryParams.tel2" v-model="queryParams.villageTel"
placeholder="请输入联系电话" placeholder="请输入乡级责任人联系电话"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="村级责任人姓名" prop="villageName1">
<el-input
v-model="queryParams.villageName1"
placeholder="请输入村级责任人姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="村级责任人职务" prop="villageDuties1">
<el-input
v-model="queryParams.villageDuties1"
placeholder="请输入村级责任人职务"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="村级责任人联系电话" prop="villageTel1">
<el-input
v-model="queryParams.villageTel1"
placeholder="请输入村级责任人联系电话"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建者部门" prop="deptId">
<el-input
v-model="queryParams.deptId"
placeholder="请输入创建者部门"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建者id" prop="createUserId">
<el-input
v-model="queryParams.createUserId"
placeholder="请输入创建者id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="修改着id" prop="updateUserId">
<el-input
v-model="queryParams.updateUserId"
placeholder="请输入修改着id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="巡查责任人姓名" prop="inspectionName">
<el-input
v-model="queryParams.inspectionName"
placeholder="请输入巡查责任人姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="巡查责任人职务" prop="inspectionDuties">
<el-input
v-model="queryParams.inspectionDuties"
placeholder="请输入巡查责任人职务"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="巡查责任人电话" prop="inspectionTel">
<el-input
v-model="queryParams.inspectionTel"
placeholder="请输入巡查责任人电话"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -117,7 +189,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:risk:add']" v-hasPermi="['ehsRisk:ehsRisk:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -128,7 +200,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['system:risk:edit']" v-hasPermi="['ehsRisk:ehsRisk:edit']"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -139,7 +211,7 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:risk:remove']" v-hasPermi="['ehsRisk:ehsRisk:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -149,36 +221,49 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['system:risk:export']" v-hasPermi="['ehsRisk:ehsRisk:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="riskList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="ehsRiskList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="${comment}" align="center" prop="riskId" />--> <!-- <el-table-column label="" align="center" prop="riskId" />-->
<el-table-column label="风险点等级" align="center" prop="riskGrade"> <el-table-column label="风险点等级" align="center" prop="riskGrade">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.risk_grade" :value="scope.row.riskGrade"/> <dict-tag :options="dict.type.risk_grade" :value="scope.row.riskGrade"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上报地址类别" align="center" prop="reportAddressType"> <el-table-column label="风险点类型" align="center" prop="reportAddressType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.risk_report_address_type" :value="scope.row.reportAddressType"/> <dict-tag :options="dict.type.risk_report_address_type" :value="scope.row.reportAddressType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上报单位" v-show="false" align="center" prop="deptName" />
<el-table-column label="风险点位置" align="center" prop="riskLocation" /> <el-table-column label="风险点位置" align="center" prop="riskLocation" />
<el-table-column label="联系电话" align="center" prop="tel" /> <el-table-column label="风险点概况" align="center" prop="riskDesc" />
<el-table-column label="涉及群众数量" align="center" prop="peopleQuantity" /> <el-table-column label="涉及群众数量" align="center" prop="peopleQuantity" />
<el-table-column label="抢险救援物资保障地点" align="center" prop="materialsAddr" />
<el-table-column label="预备物资数量" align="center" prop="materialsQuantity" /> <el-table-column label="预备物资数量" align="center" prop="materialsQuantity" />
<el-table-column label="抢修队伍人员" align="center" prop="repairTeam" /> <el-table-column label="生活物资保障地点" align="center" prop="lifeAddr" />
<el-table-column label="责任人" align="center" prop="personResponsible" /> <el-table-column label="人员转移安置点" align="center" prop="resettleAddr" />
<el-table-column label="乡级责任人" align="center" prop="villagePersonResponsible" /> <el-table-column align="center" label="巡检责任人">
<el-table-column label="村级责任人" align="center" prop="villagePersonResponsible2" /> <el-table-column label="姓名" align="center" prop="inspectionName" />
<el-table-column label="联系电话" align="center" prop="tel2" /> <el-table-column label="职务" align="center" prop="inspectionDuties" />
<el-table-column label="电话" align="center" prop="inspectionTel" />
</el-table-column>
<el-table-column align="center" label="村级责任人">
<el-table-column label="姓名" align="center" prop="villageName" />
<el-table-column label="职务" align="center" prop="villageDuties" />
<el-table-column label="电话" align="center" prop="villageTel" />
</el-table-column>
<el-table-column align="center" label="乡级责任人">
<el-table-column label="姓名" align="center" prop="villageName1" />
<el-table-column label="职务" align="center" prop="villageDuties1" />
<el-table-column label="电话" align="center" prop="villageTel1" />
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<!--<el-table-column label="创建者部门" align="center" prop="deptId" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -186,14 +271,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:risk:edit']" v-hasPermi="['ehsRisk:ehsRisk:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:risk:remove']" v-hasPermi="['ehsRisk:ehsRisk:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -209,54 +294,117 @@
<!-- 添加或修改风险信息对话框 --> <!-- 添加或修改风险信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" 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"> <el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item label="风险点等级" prop="riskGrade"> <el-row>
<el-select v-model="form.riskGrade" placeholder="请选择风险点等级"> <el-col :span="8">
<el-option <el-form-item label="风险点等级" prop="riskGrade">
v-for="dict in dict.type.risk_grade" <el-select v-model="form.riskGrade" placeholder="请选择风险点等级">
:key="dict.value" <el-option
:label="dict.label" v-for="dict in dict.type.risk_grade"
:value="parseInt(dict.value)" :key="dict.value"
></el-option> :label="dict.label"
</el-select> :value="parseInt(dict.value)"
</el-form-item> ></el-option>
<el-form-item label="上报地址类别" prop="reportAddressType"> </el-select>
<el-select v-model="form.reportAddressType" placeholder="请选择上报地址类别"> </el-form-item>
<el-option </el-col>
v-for="dict in dict.type.risk_report_address_type" <el-col :span="8">
:key="dict.value" <el-form-item label="风险点类型" prop="reportAddressType">
:label="dict.label" <el-select v-model="form.reportAddressType" placeholder="请选择风险点类型">
:value="dict.value" <el-option
></el-option> v-for="dict in dict.type.risk_report_address_type"
</el-select> :key="dict.value"
</el-form-item> :label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="风险点位置" prop="riskLocation"> <el-form-item label="风险点位置" prop="riskLocation">
<el-input v-model="form.riskLocation" placeholder="请输入风险点位置" /> <el-input v-model="form.riskLocation1" placeholder="请输入风险点位置" style="width: 200px;"/>社区
<el-input v-model="form.riskLocation2" placeholder="请输入风险点位置" style="width: 200px;"/>位置
</el-form-item> </el-form-item>
<el-form-item label="联系电话" prop="tel"> <el-form-item label="风险点概况" prop="riskDesc">
<el-input v-model="form.tel" placeholder="请输入联系电话" /> <el-input v-model="form.riskDesc" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
<el-form-item label="涉及群众数量" prop="peopleQuantity"> <el-form-item label="涉及群众数量" prop="peopleQuantity">
<el-input v-model="form.peopleQuantity" placeholder="请输入涉及群众数量" /> <el-input v-model="form.peopleQuantity1" placeholder="请输入涉及群众数量" style="width: 200px;"/>
<el-input v-model="form.peopleQuantity2" placeholder="请输入涉及群众数量" style="width: 200px;"/>
</el-form-item>
<el-form-item label="抢险救援物资保障地点" prop="materialsAddr">
<el-input v-model="form.materialsAddr" placeholder="请输入抢险救援物资保障地点" />
</el-form-item> </el-form-item>
<el-form-item label="预备物资数量" prop="materialsQuantity"> <el-form-item label="预备物资数量" prop="materialsQuantity">
<el-input v-model="form.materialsQuantity" placeholder="请输入预备物资数量" /> <el-input v-model="form.materialsQuantity" placeholder="请输入预备物资数量" />
</el-form-item> </el-form-item>
<el-form-item label="抢修队伍人员" prop="repairTeam"> <el-form-item label="生活物资保障地点" prop="lifeAddr">
<el-input v-model="form.repairTeam" placeholder="请输入抢修队伍人员" /> <el-input v-model="form.lifeAddr" placeholder="请输入生活物资保障地点" />
</el-form-item> </el-form-item>
<el-form-item label="责任人" prop="personResponsible"> <el-form-item label="人员转移安置点" prop="resettleAddr">
<el-input v-model="form.personResponsible" placeholder="请输入责任人" /> <el-input v-model="form.resettleAddr" placeholder="请输入员转移安置点" />
</el-form-item> </el-form-item>
<el-form-item label="乡级责任人" prop="villagePersonResponsible"> <el-form-item label="巡查责任人" prop="region">
<el-input v-model="form.villagePersonResponsible" placeholder="请输入乡级责任人" />
</el-form-item>
<el-form-item label="村级责任人" prop="villagePersonResponsible2">
<el-input v-model="form.villagePersonResponsible2" placeholder="请输入村级责任人" />
</el-form-item>
<el-form-item label="联系电话" prop="tel2">
<el-input v-model="form.tel2" placeholder="请输入联系电话" />
</el-form-item> </el-form-item>
<el-row>
<el-col :span="8">
<el-form-item label="姓名" prop="inspectionName">
<el-input v-model="form.inspectionName" placeholder="请输入巡查责任人姓名" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="职务" prop="inspectionDuties">
<el-input v-model="form.inspectionDuties" placeholder="请输入巡查责任人职务" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="电话" prop="inspectionTel">
<el-input v-model="form.inspectionTel" placeholder="请输入巡查责任人电话" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="村级责任人" prop="region"> </el-form-item>
<el-row>
<el-col :span="8">
<el-form-item label="姓名" prop="villageName">
<el-input v-model="form.villageName" placeholder="请输入村级责任人姓名" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="职务" prop="villageDuties">
<el-input v-model="form.villageDuties" placeholder="请输入村级责任人职务" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="电话" prop="villageTel">
<el-input v-model="form.villageTel" placeholder="请输入村级责任人联系电话" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="村级责任人" prop="region"> </el-form-item>
<el-row>
<el-col :span="8">
<el-form-item label="姓名" prop="villageName1">
<el-input v-model="form.villageName1" placeholder="请输入乡级责任人姓名" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="职务" prop="villageDuties1">
<el-input v-model="form.villageDuties1" placeholder="请输入乡级责任人职务" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="电话" prop="villageTel1">
<el-input v-model="form.villageTel1" placeholder="请输入乡级责任人联系电话" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
@ -270,205 +418,250 @@
</template> </template>
<script> <script>
import { listRisk, getRisk, delRisk, addRisk, updateRisk } from "@/api/ehs/ehsRisk"; import { listEhsRisk, getEhsRisk, delEhsRisk, addEhsRisk, updateEhsRisk } from "@/api/ehs/ehsRisk";
import {listAllDept } from "@/api/system/dept"; import {listAllDept } from "@/api/system/dept";
export default { export default {
name: "Risk", name: "EhsRisk",
dicts: ['risk_grade', 'risk_report_address_type'], dicts: ['risk_grade', 'risk_report_address_type'],
data() { data() {
return { return {
// //
loading: true, loading: true,
// //
ids: [], ids: [],
// //
single: true, single: true,
// //
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
riskList: [], ehsRiskList: [],
// //
allDeptList: [], title: "",
// //
title: "", open: false,
// //
open: false, deptShow: false,
// //
deptShow: false, allDeptList: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
riskGrade: null, riskGrade: null,
reportAddressType: null, reportAddressType: null,
riskLocation: null, riskLocation: null,
tel: null, riskDesc: null,
peopleQuantity: null, peopleQuantity: null,
materialsQuantity: null, materialsAddr: null,
repairTeam: null, materialsQuantity: null,
personResponsible: null, lifeAddr: null,
villagePersonResponsible: null, resettleAddr: null,
villagePersonResponsible2: null, villageName: null,
tel2: null, villageDuties: null,
}, villageTel: null,
// villageName1: null,
form: {}, villageDuties1: null,
// villageTel1: null,
rules: { deptId: null,
} createUserId: null,
}; updateUserId: null,
}, inspectionName: null,
created() { inspectionDuties: null,
this.getList(); inspectionTel: null
this.getListAllDept(); },
this.deptShow = this.$store.state.user.parentId==0 ?true :false; //
}, form: {},
methods: { //
/** 查询风险信息列表 */ rules: {
getList() { riskGrade: [
this.loading = true; { required: true, message: "风险点等级不能为空", trigger: "change" }
listRisk(this.queryParams).then(response => { ],
this.riskList = response.rows; reportAddressType: [
this.total = response.total; { required: true, message: "风险点类型不能为空", trigger: "change" }
this.loading = false; ],
}); villageName: [
}, { required: true, message: "乡级责任人姓名不能为空", trigger: "blur" }
/** 单位信息列表 */ ],
getListAllDept() { villageTel: [
console.log(this.$store.state.user.deptId); { required: true, message: "乡级责任人联系电话不能为空", trigger: "blur" }
this.loading = true; ],
listAllDept().then(response => { villageName1: [
this.allDeptList = response.data; { required: true, message: "村级责任人姓名不能为空", trigger: "blur" }
this.loading = false; ],
}); villageTel1: [
}, { required: true, message: "村级责任人联系电话不能为空", trigger: "blur" }
// ],
cancel() { inspectionName: [
this.open = false; { required: true, message: "巡查责任人姓名不能为空", trigger: "blur" }
this.reset(); ],
}, inspectionTel: [
// { required: true, message: "巡查责任人电话不能为空", trigger: "blur" }
reset() { ]
this.form = { }
riskId: null,
riskGrade: null,
reportAddressType: null,
riskLocation: null,
tel: null,
peopleQuantity: null,
materialsQuantity: null,
repairTeam: null,
personResponsible: null,
villagePersonResponsible: null,
villagePersonResponsible2: null,
tel2: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null
}; };
this.resetForm("form");
}, },
/** 搜索按钮操作 */ created() {
handleQuery() {
this.queryParams.pageNum = 1;
this.getList(); this.getList();
this.getListAllDept();
this.deptShow = this.$store.state.user.parentId==0 ?true :false;
//this.curDeptId = this.$store.state.user.deptId;
}, },
/** 重置按钮操作 */ methods: {
resetQuery() { /** 查询风险信息列表 */
this.resetForm("queryForm"); getList() {
this.handleQuery(); this.loading = true;
}, listEhsRisk(this.queryParams).then(response => {
// this.ehsRiskList = response.rows;
handleSelectionChange(selection) { this.total = response.total;
this.ids = selection.map(item => item.riskId) this.loading = false;
this.single = selection.length!==1 });
this.multiple = !selection.length },
}, /** 单位信息列表 */
/** 新增按钮操作 */ getListAllDept() {
handleAdd() { console.log(this.$store.state.user.deptId);
this.reset(); this.loading = true;
this.open = true; listAllDept().then(response => {
this.title = "添加风险信息"; this.allDeptList = response.data;
}, this.loading = false;
/** 修改按钮操作 */ });
handleUpdate(row) { },
this.reset(); //
const riskId = row.riskId || this.ids cancel() {
getRisk(riskId).then(response => { this.open = false;
this.form = response.data; this.reset();
},
//
reset() {
this.form = {
riskId: null,
riskGrade: null,
reportAddressType: null,
riskLocation: null,
riskDesc: null,
peopleQuantity: null,
materialsAddr: null,
materialsQuantity: null,
lifeAddr: null,
resettleAddr: null,
villageName: null,
villageDuties: null,
villageTel: null,
villageName1: null,
villageDuties1: null,
villageTel1: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
deptId: null,
createUserId: null,
updateUserId: null,
inspectionName: null,
inspectionDuties: null,
inspectionTel: 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.riskId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true; this.open = true;
this.title = "修改风险信息"; this.title = "添加风险信息";
}); },
}, /** 修改按钮操作 */
/** 提交按钮 */ handleUpdate(row) {
submitForm() { this.reset();
this.$refs["form"].validate(valid => { const riskId = row.riskId || this.ids
if (valid) { getEhsRisk(riskId).then(response => {
if (this.form.riskId != null) { this.form = response.data;
updateRisk(this.form).then(response => { this.open = true;
this.$modal.msgSuccess("修改成功"); this.title = "修改风险信息";
this.open = false; });
this.getList(); },
}); /** 提交按钮 */
} else { submitForm() {
addRisk(this.form).then(response => { this.$refs["form"].validate(valid => {
this.$modal.msgSuccess("新增成功"); if (valid) {
this.open = false; if (this.form.riskId != null) {
this.getList(); updateEhsRisk(this.form).then(response => {
}); this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addEhsRisk(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
} }
} });
}); },
}, /** 删除按钮操作 */
/** 删除按钮操作 */ handleDelete(row) {
handleDelete(row) { const riskIds = row.riskId || this.ids;
const riskIds = row.riskId || this.ids; this.$modal.confirm('是否确认删除风险信息编号为"' + riskIds + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除风险信息编号为"' + riskIds + '"的数据项?').then(function() { return delEhsRisk(riskIds);
return delRisk(riskIds); }).then(() => {
}).then(() => { this.getList();
this.getList(); this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess("删除成功"); }).catch(() => {});
}).catch(() => {}); },
}, /** 导出按钮操作 */
/** 导出按钮操作 */ handleExport() {
handleExport() { this.download('ehsRisk/ehsRisk/export', {
this.download('system/risk/export', { ...this.queryParams
...this.queryParams }, `ehsRisk_${new Date().getTime()}.xlsx`)
}, `risk_${new Date().getTime()}.xlsx`) }
} }
} };
};
</script> </script>
<style> <style>
.color-red{ .color-red{
color: white; color: white;
border-color: red; border-color: red;
background-color: red; background-color: red;
border-radius: 50px; border-radius: 50px;
} }
.color-orange{ .color-orange{
color: white; color: white;
background-color: orange; background-color: orange;
border-radius: 50px; border-radius: 50px;
} }
.color-yellow{ .color-yellow{
background-color: yellow; background-color: yellow;
color: black; color: black;
border-radius: 50px; border-radius: 50px;
} }
.color-blue{ .color-blue{
color: white; color: white;
background-color: blue; background-color: blue;
border-radius: 50px; border-radius: 50px;
} }
</style> </style>

Loading…
Cancel
Save