main
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));
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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>
|
@ -1,62 +1,76 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.ehsRisk.mapper.EhsRiskMapper">
|
||||
|
||||
<resultMap type="EhsRisk" id="EhsRiskResult">
|
||||
<result property="riskId" column="risk_id" />
|
||||
<result property="riskGrade" column="risk_grade" />
|
||||
<result property="reportAddressType" column="report_address_type" />
|
||||
<result property="riskLocation" column="risk_location" />
|
||||
<result property="tel" column="tel" />
|
||||
<result property="peopleQuantity" column="people_quantity" />
|
||||
<result property="materialsQuantity" column="materials_quantity" />
|
||||
<result property="repairTeam" column="repair_team" />
|
||||
<result property="personResponsible" column="person_responsible" />
|
||||
<result property="villagePersonResponsible" column="village_person_responsible" />
|
||||
<result property="villagePersonResponsible2" column="village_person_responsible2" />
|
||||
<result property="tel2" column="tel2" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="createUserId" column="create_user_id" />
|
||||
<result property="updateUserId" column="update_user_id" />
|
||||
<result property="riskId" column="risk_id" />
|
||||
<result property="riskGrade" column="risk_grade" />
|
||||
<result property="reportAddressType" column="report_address_type" />
|
||||
<result property="riskLocation" column="risk_location" />
|
||||
<result property="riskDesc" column="risk_desc" />
|
||||
<result property="peopleQuantity" column="people_quantity" />
|
||||
<result property="materialsAddr" column="materials_addr" />
|
||||
<result property="materialsQuantity" column="materials_quantity" />
|
||||
<result property="lifeAddr" column="life_addr" />
|
||||
<result property="resettleAddr" column="resettle_addr" />
|
||||
<result property="villageName" column="village_name" />
|
||||
<result property="villageDuties" column="village_duties" />
|
||||
<result property="villageTel" column="village_tel" />
|
||||
<result property="villageName1" column="village_name1" />
|
||||
<result property="villageDuties1" column="village_duties1" />
|
||||
<result property="villageTel1" column="village_tel1" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="createUserId" column="create_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>
|
||||
|
||||
<sql id="selectEhsRiskVo">
|
||||
select r.*, d.dept_name
|
||||
from ehs_risk r left join sys_dept d on r.dept_id = d.dept_id
|
||||
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectEhsRiskList" parameterType="EhsRisk" resultMap="EhsRiskResult">
|
||||
<include refid="selectEhsRiskVo"/>
|
||||
<where>
|
||||
<if test="deptId != null "> and r.dept_Id = #{deptId}</if>
|
||||
<if test="riskGrade != null "> and risk_grade = #{riskGrade}</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="tel != null and tel != ''"> and tel like concat('%', #{tel}, '%')</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="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="personResponsible != null and personResponsible != ''"> and person_responsible like concat('%', #{personResponsible}, '%')</if>
|
||||
<if test="villagePersonResponsible != null and villagePersonResponsible != ''"> and village_person_responsible like concat('%', #{villagePersonResponsible}, '%')</if>
|
||||
<if test="villagePersonResponsible2 != null and villagePersonResponsible2 != ''"> and village_person_responsible2 like concat('%', #{villagePersonResponsible2}, '%')</if>
|
||||
<if test="tel2 != null and tel2 != ''"> and tel2 like concat('%', #{tel2}, '%')</if>
|
||||
<if test="riskGrade != null "> and risk_grade = #{riskGrade}</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="riskDesc != null and riskDesc != ''"> and risk_desc like concat('%', #{riskDesc}, '%')</if>
|
||||
<if test="peopleQuantity != null and peopleQuantity != ''"> and people_quantity like concat('%', #{peopleQuantity}, '%')</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="lifeAddr != null and lifeAddr != ''"> and life_addr like concat('%', #{lifeAddr}, '%')</if>
|
||||
<if test="resettleAddr != null and resettleAddr != ''"> and resettle_addr like concat('%', #{resettleAddr}, '%')</if>
|
||||
<if test="villageName != null and villageName != ''"> and village_name like concat('%', #{villageName}, '%')</if>
|
||||
<if test="villageDuties != null and villageDuties != ''"> and village_duties like concat('%', #{villageDuties}, '%')</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>
|
||||
</select>
|
||||
|
||||
<select id="selectEhsRiskByRiskId" parameterType="Long" resultMap="EhsRiskResult">
|
||||
<include refid="selectEhsRiskVo"/>
|
||||
where risk_id = #{riskId}
|
||||
<include refid="selectEhsRiskVo"/>
|
||||
where risk_id = #{riskId}
|
||||
</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
|
||||
})
|
||||
}
|
@ -1,44 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询风险信息列表
|
||||
export function listRisk(query) {
|
||||
export function listEhsRisk(query) {
|
||||
return request({
|
||||
url: '/system/risk/list',
|
||||
url: '/ehsRisk/ehsRisk/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询风险信息详细
|
||||
export function getRisk(riskId) {
|
||||
export function getEhsRisk(riskId) {
|
||||
return request({
|
||||
url: '/system/risk/' + riskId,
|
||||
url: '/ehsRisk/ehsRisk/' + riskId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增风险信息
|
||||
export function addRisk(data) {
|
||||
export function addEhsRisk(data) {
|
||||
return request({
|
||||
url: '/system/risk',
|
||||
url: '/ehsRisk/ehsRisk',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改风险信息
|
||||
export function updateRisk(data) {
|
||||
export function updateEhsRisk(data) {
|
||||
return request({
|
||||
url: '/system/risk',
|
||||
url: '/ehsRisk/ehsRisk',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除风险信息
|
||||
export function delRisk(riskId) {
|
||||
export function delEhsRisk(riskId) {
|
||||
return request({
|
||||
url: '/system/risk/' + riskId,
|
||||
url: '/ehsRisk/ehsRisk/' + riskId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
@ -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>
|
Loading…
Reference in New Issue