累计跟新

main
liukewei 10 months ago
parent 73d299576f
commit 162cded138

@ -4,7 +4,10 @@ import java.util.List;
import java.util.Arrays;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.ehsMyMessage.domain.EhsMyMessage;
import com.ruoyi.ehsMyMessage.service.IEhsMyMessageService;
import com.ruoyi.ehsRisk.domain.EhsRisk;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@ -41,7 +44,8 @@ public class EhsHiddenDangerController extends BaseController
{
@Autowired
private IEhsHiddenDangerService ehsHiddenDangerService;
@Autowired
private IEhsMyMessageService ehsMyMessageService;
/**
*
*/
@ -170,4 +174,54 @@ public class EhsHiddenDangerController extends BaseController
String message = ehsHiddenDangerService.importHiddenDanger(list, updateSupport);
return AjaxResult.success(message);
}
@GetMapping("/getOverTimeId")
public AjaxResult getOverTimeId()
{
//获取临期或超时的隐患id比较本人的最后一条如果不一样就插入一条如果一样就不插入新插入的是未读
//如果点检首页弹窗的连接,就设置为已读,并转跳的隐患页面,并查询出所有临期或超时的隐患
EhsHiddenDanger ehsHiddenDanger = ehsHiddenDangerService.selectOverTimeId(new EhsHiddenDanger());
EhsMyMessage ehsMyMessage = new EhsMyMessage();
ehsMyMessage.setMyMessageType("0");
ehsMyMessage.setMyUserId(SecurityUtils.getUserId());
EhsMyMessage msg = ehsMyMessageService.selectEhsMyMessageByMyMessageMax(ehsMyMessage);
boolean isNew =false;
if(msg==null ){
if(StringUtils.isNotEmpty(ehsHiddenDanger.getOverTimeId()))
isNew = true;
else
isNew = false;
}else{
if(StringUtils.isNotEmpty(ehsHiddenDanger.getOverTimeId())) {
if(!ehsHiddenDanger.getOverTimeId().equals(msg.getMyMessageKey())) {//两者不一致
String[] newIds = ehsHiddenDanger.getOverTimeId().split(",");
String oldIds = "," + msg.getMyMessageKey() + ",";
for (String id : newIds) {
if (oldIds.indexOf("," + id + ",") == -1) {//不包含表示有新的id
isNew = true;
break;
}
}
}else{//两者一致
if(msg.getMyMessageState().equals("N")) {
return success(msg);
}else{
msg.setMyMessageDesc("");
return success(msg);
}
}
}
}
if (isNew) {//有新的id生成一个新记录
EhsMyMessage msgNew = new EhsMyMessage();
msgNew.setMyUserId(SecurityUtils.getUserId());
msgNew.setMyMessageType("0");
msgNew.setMyMessageDesc("您有新的将要逾期或已逾期的记录,请及及时处理!");
msgNew.setMyMessageKey(ehsHiddenDanger.getOverTimeId());
msgNew.setMyMessageState("N");
ehsMyMessageService.save(msgNew);
return success(msgNew);
}
ehsMyMessage.setMyMessageDesc("");
return success(ehsMyMessage);
}
}

@ -144,6 +144,10 @@ public class EhsMaterialDetailController extends BaseController
md.setOutboundUserId(SecurityUtils.getUserId());
md.setOutboundQuantity(list.get(0).getSendQuantity());
md.setInventory(result2);
md.setReceiveName(ehsMaterialDetail.getReceiveName());
md.setReceiveTel(ehsMaterialDetail.getReceiveTel());
md.setHandledBy(ehsMaterialDetail.getHandledBy());
md.setOutTime(ehsMaterialDetail.getOutTime());
return toAjax(ehsMaterialDetailService.updateById(md));
}
return error("未查询到出库指令");

@ -0,0 +1,154 @@
package com.ruoyi.web.controller.ehs;
import java.util.List;
import java.util.Arrays;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.ehsNoticeMessage.domain.EhsNoticeMessage;
import com.ruoyi.ehsNoticeMessage.service.IEhsNoticeMessageService;
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.ehsMyMessage.domain.EhsMyMessage;
import com.ruoyi.ehsMyMessage.service.IEhsMyMessageService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2024-01-16
*/
@Api(tags="我的的消息管理")
@RestController
@RequestMapping("/ehsMyMessage/ehsMyMessage")
public class EhsMyMessageController extends BaseController
{
@Autowired
private IEhsMyMessageService ehsMyMessageService;
@Autowired
private IEhsNoticeMessageService ehsNoticeMessageService;
/**
*
*/
//@PreAuthorize("@ss.hasPermi('ehsMyMessage:ehsMyMessage:list')")
@GetMapping("/list")
public TableDataInfo list(EhsMyMessage ehsMyMessage)
{
startPage();
List<EhsMyMessage> list = ehsMyMessageService.selectEhsMyMessageList(ehsMyMessage);
return getDataTable(list);
}
/**
*
*/
//@PreAuthorize("@ss.hasPermi('ehsMyMessage:ehsMyMessage:export')")
@Log(title = "我的的消息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EhsMyMessage ehsMyMessage)
{
List<EhsMyMessage> list = ehsMyMessageService.selectEhsMyMessageList(ehsMyMessage);
ExcelUtil<EhsMyMessage> util = new ExcelUtil<EhsMyMessage>(EhsMyMessage.class);
util.exportExcel(response, list, "我的的消息数据");
}
/**
*
*/
//@PreAuthorize("@ss.hasPermi('ehsMyMessage:ehsMyMessage:query')")
@GetMapping(value = "/{myMessageId}")
public AjaxResult getInfo(@PathVariable("myMessageId") Long myMessageId)
{
return success(ehsMyMessageService.selectEhsMyMessageByMyMessageId(myMessageId));
}
/**
*
*/
@ApiOperation("新增我的的消息")
//@PreAuthorize("@ss.hasPermi('ehsMyMessage:ehsMyMessage:add')")
@Log(title = "我的的消息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EhsMyMessage ehsMyMessage)
{
return toAjax(ehsMyMessageService.save(ehsMyMessage));
}
/**
*
*/
@ApiOperation("修改我的的消息")
//@PreAuthorize("@ss.hasPermi('ehsMyMessage:ehsMyMessage:edit')")
@Log(title = "我的的消息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EhsMyMessage ehsMyMessage)
{
return toAjax(ehsMyMessageService.updateById(ehsMyMessage));
}
/**
*
*/
@ApiOperation("删除我的的消息")
//@PreAuthorize("@ss.hasPermi('ehsMyMessage:ehsMyMessage:remove')")
@Log(title = "我的的消息", businessType = BusinessType.DELETE)
@DeleteMapping("/{myMessageIds}")
public AjaxResult remove(@PathVariable Long[] myMessageIds)
{
return toAjax(ehsMyMessageService.removeByIds(Arrays.asList(myMessageIds)));
}
@GetMapping("/getUnread")
public AjaxResult getUnread()
{
AjaxResult ajr = new AjaxResult();
EhsMyMessage ehsMyMessage = new EhsMyMessage();
ehsMyMessage.setMyMessageType("0");
ehsMyMessage.setMyUserId(SecurityUtils.getUserId());
EhsMyMessage msg = ehsMyMessageService.selectEhsMyMessageByMyMessageMax(ehsMyMessage);
if(msg.getMyMessageState().equals("N"))
ajr.put("msgHD","1");
else
ajr.put("msgHD","0");
//分析是否有本人的未读消息通知
//消息通知的每一记录,我的消息都应该有一条记录,如果没有,说明未读,并向我的消息插入一条记录,并设置为未读
//消息通知模块点击阅读按钮后,需要同时修改我的消息的已读标志
//统计我的消息类型=1的所有未读数量。
EhsMyMessage myMsg = new EhsMyMessage();
myMsg.setNoticeDeptId(SecurityUtils.getDeptId());
myMsg.setNoticeStatus("1");
myMsg.setNoticeMesgType(1L);
myMsg.setMyMessageType("1");
myMsg.setMyUserId(SecurityUtils.getUserId());
List<EhsMyMessage> list = ehsMyMessageService.selectUnReadNotice(myMsg);
if(!list.isEmpty()){
for(EhsMyMessage emsg :list){
EhsMyMessage msgNew = new EhsMyMessage();
msgNew.setMyMessageKey(emsg.getMyMessageId().toString());
ehsMyMessageService.saveMyMessage(msgNew);
}
}
EhsMyMessage msgQuery = new EhsMyMessage();
msgQuery.setMyMessageType("1");
msgQuery.setMyMessageState("N");
msgQuery.setMyUserId(SecurityUtils.getUserId());
Long msgCount = ehsMyMessageService.msgCount(msgQuery);
ajr.put("msg",msgCount.toString());
return ajr;
}
}

@ -8,6 +8,8 @@ import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.ehsMyMessage.domain.EhsMyMessage;
import com.ruoyi.ehsMyMessage.service.IEhsMyMessageService;
import com.ruoyi.system.service.ISysDeptService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.access.prepost.PreAuthorize;
@ -46,6 +48,8 @@ public class EhsNoticeMessageController extends BaseController
private IEhsNoticeMessageService ehsNoticeMessageService;
@Autowired
private ISysDeptService deptService;
@Autowired
private IEhsMyMessageService ehsMyMessageService;
/**
*
*/
@ -182,6 +186,7 @@ public class EhsNoticeMessageController extends BaseController
public AjaxResult issueNews( EhsNoticeMessage ehsNoticeMessage)
{
ehsNoticeMessage.setStatus("1");
ehsNoticeMessage.setIssueTime(new Date());
return toAjax(ehsNoticeMessageService.updateById(ehsNoticeMessage));
}
@ -198,6 +203,9 @@ public class EhsNoticeMessageController extends BaseController
nm.setNoticeMessageId(noticeMessageId);
ehsNoticeMessageService.updateReadCompany(nm);
}
EhsMyMessage msgNew = new EhsMyMessage();
msgNew.setMyMessageKey(noticeMessageId.toString());
ehsMyMessageService.saveMyMessage(msgNew);
return success(ehsNoticeMessage);
}

@ -151,7 +151,7 @@ public class EhsNoticeMessageFileController extends BaseController
for(EhsNoticeMessageFile efile:fileList){
cids= efile.getDeptId()+",";
// 避免循环查数据库库
efile.setDeptName(comMap.get(efile.getDeptId()));
efile.setDeptName(StringUtils.isEmpty(comMap.get(efile.getDeptId()))?"未知部门":comMap.get(efile.getDeptId()));
//SysDept sysDept = deptService.selectDeptById(efile.getDeptId());
//efile.setDeptName(sysDept.getDeptName());

@ -143,4 +143,10 @@ public class EhsHiddenDanger extends BaseEntity
private String hiddenDangerLabelName;//是否超时未整改
@TableField(exist = false)
private Integer overTime;//是否超时未整改
@Excel(name = "企业详细地址" )
private String address;
@TableField(exist = false)
private Integer currMonth;
@TableField(exist = false)
private String overTimeId;//超时隐患的id合集
}

@ -26,6 +26,7 @@ public interface EhsHiddenDangerMapper extends BaseMapper<EhsHiddenDanger> {
* @return
*/
public List<EhsHiddenDanger> selectEhsHiddenDangerList(EhsHiddenDanger ehsHiddenDanger);
public EhsHiddenDanger selectOverTimeId(EhsHiddenDanger ehsHiddenDanger);
/**
*
*

@ -44,4 +44,5 @@ public interface IEhsHiddenDangerService extends IService<EhsHiddenDanger> {
public String importHiddenDanger(List<EhsHiddenDanger> list, Boolean isUpdateSupport );
public EhsHiddenDanger selectEhsHiddenDangerOverTime(EhsHiddenDanger ehsHiddenDanger);
public EhsHiddenDanger selectOverTimeId(EhsHiddenDanger ehsHiddenDanger);
}

@ -176,4 +176,7 @@ public class EhsHiddenDangerServiceImpl extends ServiceImpl<EhsHiddenDangerMappe
public EhsHiddenDanger selectEhsHiddenDangerOverTime(EhsHiddenDanger ehsHiddenDanger){
return ehsHiddenDangerMapper.selectEhsHiddenDangerOverTime(ehsHiddenDanger);
}
public EhsHiddenDanger selectOverTimeId(EhsHiddenDanger ehsHiddenDanger){
return ehsHiddenDangerMapper.selectOverTimeId(ehsHiddenDanger);
}
}

@ -61,4 +61,6 @@ public class HiddenDangerStatisticsVo {
* --
*/
private String totalRate;
private String deptId;
}

@ -81,4 +81,13 @@ public class EhsMaterialDetail extends BaseEntity
/** 请求参数 */
@TableField(exist = false)
private String getOut;
@Excel(name = "领取人")
private String receiveName;
@Excel(name = "领取人电话")
private String receiveTel;
@Excel(name = "出库时间")
private String outTime;
@Excel(name = "经手人")
private String handledBy;
}

@ -0,0 +1,60 @@
package com.ruoyi.ehsMyMessage.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;
/**
* ehs_my_message
*
* @author ruoyi
* @date 2024-01-16
*/
@Data
@ToString
@NoArgsConstructor
@Accessors(chain = true)
@TableName("ehs_my_message")
public class EhsMyMessage extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
@TableId(type= IdType.AUTO)
private Long myMessageId;
/** 关键字 */
@Excel(name = "关键字")
private String myMessageKey;
/** 消息类型 */
@Excel(name = "消息类型")
private String myMessageType;
/** 消息内容 */
@Excel(name = "消息内容")
private String myMessageDesc;
/** 是否已读 */
@Excel(name = "是否已读")
private String myMessageState;
/** 消息所有者 */
@Excel(name = "消息所有者")
private Long myUserId;
/** 消息通知状态 */
private String noticeStatus;
/** 消息通知类型 */
private Long noticeMesgType;
/** 消息通知部门id */
private Long noticeDeptId;
}

@ -0,0 +1,33 @@
package com.ruoyi.ehsMyMessage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.ehsMyMessage.domain.EhsMyMessage;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2024-01-16
*/
public interface EhsMyMessageMapper extends BaseMapper<EhsMyMessage> {
/**
*
*
* @param myMessageId
* @return
*/
public EhsMyMessage selectEhsMyMessageByMyMessageId(Long myMessageId);
/**
*
*
* @param ehsMyMessage
* @return
*/
public List<EhsMyMessage> selectEhsMyMessageList(EhsMyMessage ehsMyMessage);
public EhsMyMessage selectEhsMyMessageByMyMessageMax(EhsMyMessage ehsMyMessage);
public List<EhsMyMessage> selectUnReadNotice(EhsMyMessage ehsMyMessage);
}

@ -0,0 +1,34 @@
package com.ruoyi.ehsMyMessage.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.ehsMyMessage.domain.EhsMyMessage;
/**
* Service
*
* @author ruoyi
* @date 2024-01-16
*/
public interface IEhsMyMessageService extends IService<EhsMyMessage> {
/**
*
*
* @param myMessageId
* @return
*/
public EhsMyMessage selectEhsMyMessageByMyMessageId(Long myMessageId);
/**
*
*
* @param ehsMyMessage
* @return
*/
public List<EhsMyMessage> selectEhsMyMessageList(EhsMyMessage ehsMyMessage);
public EhsMyMessage selectEhsMyMessageByMyMessageMax(EhsMyMessage ehsMyMessage);
public Long msgCount(EhsMyMessage query);
public List<EhsMyMessage> selectUnReadNotice(EhsMyMessage ehsMyMessage);
public boolean saveMyMessage(EhsMyMessage msgNew);
}

@ -0,0 +1,83 @@
package com.ruoyi.ehsMyMessage.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.utils.SecurityUtils;
import com.ruoyi.ehsNoticeMessage.domain.EhsNoticeMessage;
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.ehsMyMessage.mapper.EhsMyMessageMapper;
import com.ruoyi.ehsMyMessage.domain.EhsMyMessage;
import com.ruoyi.ehsMyMessage.service.IEhsMyMessageService;
/**
* Service
*
* @author ruoyi
* @date 2024-01-16
*/
@Service
public class EhsMyMessageServiceImpl extends ServiceImpl<EhsMyMessageMapper, EhsMyMessage> implements IEhsMyMessageService {
@Autowired
private EhsMyMessageMapper ehsMyMessageMapper;
/**
*
*
* @param myMessageId
* @return
*/
@Override
public EhsMyMessage selectEhsMyMessageByMyMessageId(Long myMessageId)
{
return ehsMyMessageMapper.selectEhsMyMessageByMyMessageId(myMessageId);
}
/**
*
*
* @param ehsMyMessage
* @return
*/
@Override
public List<EhsMyMessage> selectEhsMyMessageList(EhsMyMessage ehsMyMessage)
{
return ehsMyMessageMapper.selectEhsMyMessageList(ehsMyMessage);
}
private LambdaQueryWrapper<EhsMyMessage> buildQueryWrapper(EhsMyMessage query) {
Map<String, Object> params = query.getParams();
LambdaQueryWrapper<EhsMyMessage> lqw = Wrappers.lambdaQuery();
lqw.eq(StringUtils.isNotBlank(query.getMyMessageKey()), EhsMyMessage::getMyMessageKey, query.getMyMessageKey());
lqw.eq(StringUtils.isNotBlank(query.getMyMessageType()), EhsMyMessage::getMyMessageType, query.getMyMessageType());
lqw.eq(StringUtils.isNotBlank(query.getMyMessageDesc()), EhsMyMessage::getMyMessageDesc, query.getMyMessageDesc());
lqw.eq(StringUtils.isNotBlank(query.getMyMessageState()), EhsMyMessage::getMyMessageState, query.getMyMessageState());
lqw.eq(query.getMyUserId() != null, EhsMyMessage::getMyUserId, query.getMyUserId());
lqw.orderByDesc(EhsMyMessage::getCreateTime);
return lqw;
}
public EhsMyMessage selectEhsMyMessageByMyMessageMax(EhsMyMessage ehsMyMessage){
return ehsMyMessageMapper.selectEhsMyMessageByMyMessageMax(ehsMyMessage);
}
@Override
public Long msgCount(EhsMyMessage query){
return ehsMyMessageMapper.selectCount(buildQueryWrapper(query));
}
public List<EhsMyMessage> selectUnReadNotice(EhsMyMessage ehsMyMessage){
return ehsMyMessageMapper.selectUnReadNotice(ehsMyMessage);
}
public boolean saveMyMessage(EhsMyMessage msgNew){
msgNew.setMyUserId(SecurityUtils.getUserId());
msgNew.setMyMessageType("1");
msgNew.setMyMessageDesc("您有新的消息通知未阅读,请及及时处理!");
msgNew.setMyMessageState("N");
return saveOrUpdate(msgNew);
}
}

@ -4,6 +4,7 @@ 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 com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
@ -11,6 +12,8 @@ import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* ehs_notice_message
*
@ -92,4 +95,8 @@ public class EhsNoticeMessage extends BaseEntity
private String messageFileId;
@TableField(exist = false)
private Long[] deptListArray;
@Excel(name = "发布时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date issueTime;
}

@ -74,6 +74,8 @@ public class EhsRescueTeamWorker extends BaseEntity {
*/
@Excel(name = "联系方式")
private String phone;
@Excel(name = "地址")
private String address;
/** 队内职务 */
@Excel(name = "队内职务")

@ -33,6 +33,9 @@
<result property="economicType" column="economic_type" />
<result property="enterpriseScale" column="enterprise_scale" />
<result property="overTime" column="over_time" />
<result property="address" column="address" />
<result property="currMonth" column="curr_Month" />
<result property="overTimeId" column="over_time_id" />
</resultMap>
<sql id="selectEhsHiddenDangerVo">
@ -66,9 +69,11 @@ FROM ehs_hidden_danger h LEFT JOIN sys_dept d ON h.dept_id = d.dept_id
<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="areaId != null and areaId != ''">and area_id = #{areaId}</if>
<if test="currMonth == 1">and DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT( h.check_time, '%Y-%m') </if>
<if test="overTime == 7 ">and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) )>3 AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) &lt;= 7 </if>
<if test="overTime == 3 ">and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) )>=0 AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) &lt; 3 </if>
<if test="overTime == 0 ">and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) &lt; 0</if>
<if test="overTime == 10 ">and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) &lt;= 7</if>
<if test="hiddenDangerLabelArray != null ">
AND
<foreach collection="hiddenDangerLabelArray" item="item" separator="OR" index="index" open="(" close=")">
@ -77,6 +82,14 @@ FROM ehs_hidden_danger h LEFT JOIN sys_dept d ON h.dept_id = d.dept_id
</if>
</where>
</select>
<select id="selectOverTimeId" parameterType="EhsHiddenDanger" resultMap="EhsHiddenDangerResult">
SELECT GROUP_CONCAT(hidden_danger_id SEPARATOR ',') over_time_id
FROM ehs_hidden_danger h
<where>
<if test="deptId != null "> and h.dept_Id = #{deptId}</if>
<if test="overTime == 10 ">and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) &lt;= 7</if>
</where>
</select>
<select id="selectEhsHiddenDangerByHiddenDangerId" parameterType="Long" resultMap="EhsHiddenDangerResult">
<include refid="selectEhsHiddenDangerVo"/>

@ -85,7 +85,7 @@
<select id="getHiddenDangerSituationList"
resultType="com.ruoyi.ehsIndexStatistics.vo.HiddenDangerStatisticsVo">
select c.dict_label 'name',ifnull(a.thisUnitNum,0) thisUnitNum,ifnull(a.totalUnitNum,0) totalUnitNum,ifnull(a.thisReportNum,0) thisReportNum,ifnull(a.totalReportNum,0) totalReportNum
select c.dict_label 'name',c.dict_value dept_id,ifnull(a.thisUnitNum,0) thisUnitNum,ifnull(a.totalUnitNum,0) totalUnitNum,ifnull(a.thisReportNum,0) thisReportNum,ifnull(a.totalReportNum,0) totalReportNum
,ifnull(a.thisHaveNum,0)thisHaveNum,ifnull(a.totalHaveNum,0)totalHaveNum,ifnull(a.thisNotNum,0)thisNotNum,ifnull(a.totalNotNum,0)totalNotNum,ifnull(a.thisRate,0)thisRate,ifnull(a.totalRate,0)totalRate
from sys_dict_data c left join(
SELECT
@ -157,7 +157,8 @@ SELECT
d.dept_name 'areaName',
count(r.dept_id) 'reportHiddenNum'
FROM
sys_dept d left join ehs_hidden_danger r on r.dept_id = d.dept_id
sys_dept d left join (select * from ehs_hidden_danger where
DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT( check_time, '%Y-%m')) r on r.dept_id = d.dept_id
GROUP BY
d.dept_id,d.dept_name
) s

@ -24,6 +24,11 @@
<result property="createUserId" column="create_user_id" />
<result property="inventory" column="inventory" />
<result property="operateType" column="operate_type" />
<result property="receiveName" column="receive_name" />
<result property="receiveTel" column="receive_tel" />
<result property="outTime" column="out_time" />
<result property="handledBy" column="handled_by" />
</resultMap>
<sql id="selectEhsMaterialDetailVo">

@ -0,0 +1,88 @@
<?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.ehsMyMessage.mapper.EhsMyMessageMapper">
<resultMap type="EhsMyMessage" id="EhsMyMessageResult">
<result property="myMessageId" column="my_message_id" />
<result property="myMessageKey" column="my_message_key" />
<result property="myMessageType" column="my_message_type" />
<result property="myMessageDesc" column="my_message_desc" />
<result property="myMessageState" column="my_message_state" />
<result property="myUserId" column="my_user_id" />
<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="noticeStatus" column="notice_status" />
<result property="noticeMesgType" column="notice_mesg_type" />
<result property="noticeDeptId" column="notice_dept_id" />
</resultMap>
<sql id="selectEhsMyMessageVo">
select my_message_id, my_message_key, my_message_type, my_message_desc,
my_message_state, my_user_id, create_by, create_time, update_by, update_time, remark, dept_id,
create_user_id, update_user_id from ehs_my_message
</sql>
<select id="selectEhsMyMessageList" parameterType="EhsMyMessage" resultMap="EhsMyMessageResult">
<include refid="selectEhsMyMessageVo"/>
<where>
<if test="myMessageKey != null and myMessageKey != ''"> and my_message_key = #{myMessageKey}</if>
<if test="myMessageType != null and myMessageType != ''"> and my_message_type = #{myMessageType}</if>
<if test="myMessageDesc != null and myMessageDesc != ''"> and my_message_desc = #{myMessageDesc}</if>
<if test="myMessageState != null and myMessageState != ''"> and my_message_state = #{myMessageState}</if>
<if test="myUserId != null "> and my_user_id = #{myUserId}</if>
</where>
</select>
<select id="selectEhsMyMessageByMyMessageId" parameterType="Long" resultMap="EhsMyMessageResult">
<include refid="selectEhsMyMessageVo"/>
where my_message_id = #{myMessageId}
</select>
<select id="selectEhsMyMessageByMyMessageMax" parameterType="EhsMyMessage" resultMap="EhsMyMessageResult">
<include refid="selectEhsMyMessageVo"/>
where my_message_id =(
select max(my_message_id) from ehs_my_message
<where>
<if test="myMessageKey != null and myMessageKey != ''"> and my_message_key = #{myMessageKey}</if>
<if test="myMessageType != null and myMessageType != ''"> and my_message_type = #{myMessageType}</if>
<if test="myMessageDesc != null and myMessageDesc != ''"> and my_message_desc = #{myMessageDesc}</if>
<if test="myMessageState != null and myMessageState != ''"> and my_message_state = #{myMessageState}</if>
<if test="myUserId != null "> and my_user_id = #{myUserId}</if>
</where>
)
<if test="myMessageKey != null and myMessageKey != ''"> and my_message_key = #{myMessageKey}</if>
<if test="myMessageType != null and myMessageType != ''"> and my_message_type = #{myMessageType}</if>
<if test="myMessageDesc != null and myMessageDesc != ''"> and my_message_desc = #{myMessageDesc}</if>
<if test="myMessageState != null and myMessageState != ''"> and my_message_state = #{myMessageState}</if>
<if test="myUserId != null "> and my_user_id = #{myUserId}</if>
</select>
<select id="selectUnReadNotice" parameterType="EhsMyMessage" resultMap="EhsMyMessageResult">
SELECT m.notice_message_id my_message_id FROM ehs_notice_message m
LEFT JOIN sys_user e ON e.user_id = m.CREATE_USER_ID
LEFT JOIN sys_dept d ON m.dept_id = d.dept_id AND d.parent_id != 0
WHERE m.STATUS = #{noticeStatus}
AND ( FIND_IN_SET( #{noticeDeptId}, m.dept_list ) OR m.all_dept = 1 )
AND m.mesg_type = #{noticeMesgType}
and m.notice_message_id not in (
select my_message_key from ehs_my_message
<where>
<if test="myMessageKey != null and myMessageKey != ''"> and my_message_key = #{myMessageKey}</if>
<if test="myMessageType != null and myMessageType != ''"> and my_message_type = #{myMessageType}</if>
<if test="myMessageDesc != null and myMessageDesc != ''"> and my_message_desc = #{myMessageDesc}</if>
<if test="myMessageState != null and myMessageState != ''"> and my_message_state = #{myMessageState}</if>
<if test="myUserId != null "> and my_user_id = #{myUserId}</if>
</where>
)
</select>
</mapper>

@ -32,6 +32,7 @@
<result property="messageFileId" column="message_file_id" />
<result property="originalName" column="original_name" />
<result property="noticeMessageFileId" column="notice_message_fele_id" />
<result property="issueTime" column="issue_time" />
</resultMap>
<sql id="selectEhsNoticeMessageVo">
@ -39,7 +40,7 @@
</sql>
<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,m.issue_time,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,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.file_name from ehs_notice_message_file f where m.notice_message_id = f.notice_message_id and f.dept_ID =#{fileDeptId}) file_name,
@ -56,15 +57,16 @@
<!--<if test="createUserName != null and createUserName != '' "> and e.name like '%${createUserName}%'</if>-->
<if test="status != null and status != '' "> and m.status = #{status}</if>
<if test="deptId != null and deptId != '' "> and (FIND_IN_SET(#{deptId}, m.dept_list) or m.all_dept=1) </if>
<if test="mesgType != null and mesgType != '' "> and m.mesg_type = #{mesgType}</if>
<if test="mesgType != null "> and m.mesg_type = #{mesgType}</if>
<if test='isRead =="0" '> and FIND_IN_SET(#{deptId}, m.read_dept_id )=0</if>
<if test="fileState != null and fileState != '' "> and f.state = #{fileState}</if>
<if test="noticeMessageId != null and noticeMessageId != '' "> and f.id = #{noticeMessageId}</if>
<if test="params.beginIssueTime != null and params.beginIssueTime != '' and params.endIssueTime != null and params.endIssueTime != ''">
and Issue_Time between #{params.beginIssueTime} and #{params.endIssueTime}</if>
</where>
</select>
<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.issue_time,
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.file_temp_name,m.file_temp_original_name, m.remark,
( SELECT count( 1 ) FROM ehs_notice_message_file f WHERE f.notice_message_id = m.notice_message_id and f.state=1 ) file_count
@ -79,6 +81,8 @@
<if test="deptList != null and companyId != '' "> and FIND_IN_SET(#{deptList}, m.dept_list) </if>
<if test="mesgType != null and mesgType != '' "> and m.mesg_type = #{mesgType}</if>
<if test="createDeptId != null and createDeptId != '' "> and m.create_dept_id = #{createDeptId} </if>
<if test="params.beginIssueTime != null and params.beginIssueTime != '' and params.endIssueTime != null and params.endIssueTime != ''">
and Issue_Time between #{params.beginIssueTime} and #{params.endIssueTime}</if>
</where>
GROUP BY m.create_time desc
</select>

@ -15,6 +15,7 @@
<result property="trainNum" column="train_num" />
<result property="idCard" column="id_card" />
<result property="phone" column="phone" />
<result property="address" column="address" />
<result property="workYear" column="work_year" />
<result property="speciality" column="speciality" />
<result property="createBy" column="create_by" />
@ -28,7 +29,7 @@
</resultMap>
<sql id="selectEhsRescueTeamWorkerVo">
select id, rescue_team_id, rescue_team_name, worker_name, worker_age, gender, id_card, phone, team_post, work_year, speciality, train_num, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_rescue_team_worker
select id, address,rescue_team_id, rescue_team_name, worker_name, worker_age, gender, id_card, phone, team_post, work_year, speciality, train_num, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_rescue_team_worker
</sql>
<update id="updateWorkerByTeamId">
update ehs_rescue_team_worker

@ -58,3 +58,11 @@ export function assistEhsHiddenDanger(data) {
params: data
})
}
// 查询是否有新的逾期
export function getOverTimeId() {
return request({
url: '/ehsHiddenDanger/ehsHiddenDanger/getOverTimeId',
method: 'get'
})
}

@ -0,0 +1,52 @@
import request from '@/utils/request'
// 查询我的的消息列表
export function listEhsMyMessage(query) {
return request({
url: '/ehsMyMessage/ehsMyMessage/list',
method: 'get',
params: query
})
}
// 查询我的的消息详细
export function getEhsMyMessage(myMessageId) {
return request({
url: '/ehsMyMessage/ehsMyMessage/' + myMessageId,
method: 'get'
})
}
// 新增我的的消息
export function addEhsMyMessage(data) {
return request({
url: '/ehsMyMessage/ehsMyMessage',
method: 'post',
data: data
})
}
// 修改我的的消息
export function updateEhsMyMessage(data) {
return request({
url: '/ehsMyMessage/ehsMyMessage',
method: 'put',
data: data
})
}
// 删除我的的消息
export function delEhsMyMessage(myMessageId) {
return request({
url: '/ehsMyMessage/ehsMyMessage/' + myMessageId,
method: 'delete'
})
}
// 查询我的的未读消息
export function getUnread() {
return request({
url: '/ehsMyMessage/ehsMyMessage/getUnread',
method: 'get'
})
}

@ -17,13 +17,34 @@
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
</el-tooltip>-->
<screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
</template>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
<i class="el-icon-bell " style="font-size:22px "><el-badge :value="Number(hdMsgCount)+Number(msgCount)" class="item"/></i>
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>
<router-link to="/ehs/ehsMyMessage">
隐患消息
<el-badge class="mark" :value="hdMsgCount" />
</router-link>
</el-dropdown-item>
<el-dropdown-item @click.native="setting = true">
<span>消息通知</span>
<el-badge class="mark" :value="msgCount" />
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
@ -56,8 +77,16 @@ import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
import { getUnread} from "@/api/ehs/ehsMyMessage";
export default {
data() {
return {
hdMsgCount: 0,
msgCount: 0,
timer:null
}
},
components: {
Breadcrumb,
TopNav,
@ -66,7 +95,7 @@ export default {
SizeSelect,
Search,
RuoYiGit,
RuoYiDoc
RuoYiDoc,
},
computed: {
...mapGetters([
@ -92,6 +121,15 @@ export default {
}
},
methods: {
getUnread() {
console.log("定时任务");
getUnread().then(response => {
this.hdMsgCount = response.msgHD;
this.msgCount = response.msg;
console.log(response);
});
},
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
@ -106,6 +144,16 @@ export default {
})
}).catch(() => {});
}
},
mounted() {
console.log("启动定时器");
//get1
this.timer = setInterval(this.getUnread, 10000);//
},
//
beforeDestroy() {
clearTimeout(this.timer);
}
}
</script>
@ -197,4 +245,8 @@ export default {
}
}
}
.item {
margin-top: -20px;
}
</style>

@ -87,8 +87,28 @@ export const constantRoutes = [
meta: { title: '个人中心', icon: 'user' }
}
]
},
{
path: '/ehs',
component: Layout,
hidden: true,
redirect: 'noredirect',
permissions: ['ehsMyMessage:ehsMyMessage:list','ehsMyMessage:ehsMyMessage:remove'],
children: [
{
path: 'ehsMyMessage',
component: () => import('@/views/ehs/ehsMyMessage/index'),
permissions: ['ehsMyMessage:ehsMyMessage:list','ehsMyMessage:ehsMyMessage:remove'],
name: 'ehsMyMessage',
meta: {
title: '我的消息',
icon: 'user' ,
permissions: ['ehsMyMessage:ehsMyMessage:list','ehsMyMessage:ehsMyMessage:remove'],
}
}
]
},
]
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [

@ -1,5 +1,6 @@
<template>
<div class="dap">
<indexHD ref="indexHDRef" ></indexHD>
<div class="row">
<div class="left_top bcg">
<el-tabs v-model="activeName" @tab-click="handleClick">
@ -12,9 +13,9 @@
height="400px"
>
<el-table-column prop="name" label="各区(县)" align="center">
<!-- <template slot="date" slot-scope="scope">
{{scope}}
</template> -->
<template slot-scope="scope">
<el-link type="primary" @click="showHD(scope.row)">{{scope.row.name}}</el-link>
</template>
</el-table-column>
<el-table-column label="注册企业数" align="center">
@ -168,11 +169,14 @@
<div ref="scale" class="size"></div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import {
getAdministeration,
getPlace,
@ -184,9 +188,10 @@ import {
getDangerClass,
getDangerList,
} from "@/api/ehs/ehsExamples";
import indexHD from "./indexHD";
export default {
name: "dap",
components: {},
components: { indexHD},
data() {
return {
activeName: "tj1", //tab
@ -202,6 +207,10 @@ export default {
};
},
methods: {
showHD(row) {
console.log(row);
this.$refs.indexHDRef.openDialog(row.deptId);
},
handleClick(tab, event) {
console.log(tab, event);
},
@ -469,6 +478,7 @@ export default {
// this.myChart5.resize();
// };
},
},
created() {
//

@ -0,0 +1,425 @@
<template>
<el-dialog title="当月隐患信息查询" :visible.sync="open" width="800px" append-to-body>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
</el-form>
<el-table v-loading="loading" :data="ehsHiddenDangerList" @selection-change="handleSelectionChange" max-height="550" style="width: 100%" :row-class-name="tableRowClassName">
<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" >
<template slot-scope="scope">
<el-link type="primary" @click="handleUpdate(scope.row,true)">{{scope.row.enterpriseName}} </el-link>
</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="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="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="checkType">
<template slot-scope="scope">
<dict-tag :options="dict.type.check_type" :value="scope.row.checkType"/>
</template>
</el-table-column>
<el-table-column label="整改措施" align="center" prop="rectifyMeasure" />
<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="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_status" :value="scope.row.status"/>
</template>
</el-table-column>
<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="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="isTowns">
<template slot-scope="scope">
<dict-tag :options="dict.type.ehs_yes_no" :value="scope.row.isTowns"/>
</template>
</el-table-column>-->
<!--<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="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="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="status" >
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="整改资金" align="center" prop="rectifyMoney" />-->
<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);}" :disabled="true"></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="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="fixed-width">
<template slot-scope="scope">
<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"
/>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { listEhsHiddenDanger, superviseEhsHiddenDanger } from "@/api/ehs/ehsHiddenDanger";
import {listAllDept } from "@/api/system/dept";
import importUpload from "@/components/upload/upload";
export default {
name: "EhsHiddenDanger",
dicts: ['hidden_danger_type', 'hidden_danger_grade', 'hidden_danger_label', 'enterprise_type','enterprise_scale',
'economic_type','area_id', "hidden_danger_status","check_type", "ehs_yes_no"],
components:{ importUpload },
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
ehsHiddenDangerList: [],
//
title: "",
//
open: false,
isReadOnly:false,//form
//
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,
hiddenDangerLabelArray:null,
isTowns:null,
overTime:null,
address:null,
},
alertState: [{
value: '7',
label: '7天预警'
}, {
value: '3',
label: '3天预警'
}, {
value: '0',
label: '逾期告警'
}],
//
form: {},
formAssist:{},
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.openAssist = 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,
isTowns: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
},
/** 督办 */
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.reset();
this.openAssist = true;
this.assistDeptList = row.assistDept.split(",").map(Number);
this.currAssistHiddenDangerId = row.hiddenDangerId;
},
//
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 => {
}
});
}
},
/** 显示督办反馈 */
handleShowAssistResult(row) {
this.$alert(row.superviseResult, '督办反馈', {
confirmButtonText: '确定',
callback: action => {
/*this.$message({
type: 'info',
message: `action: ${ action }`
});*/
}
});
},
tableRowClassName({row, rowIndex}) {
if(row.status==0 ||status==5){
if (row.overTime <0 ) {
return 'warning-row';
} else if (row.overTime > 3 && row.overTime <= 7) {
return 'warning7-row';
} else if (row.overTime > 0 && rowIndex <= 3) {
return 'warning3-row';
}
}
return '';
},
openDialog(deptId) {
console.log(deptId);
this.queryParams.areaId = deptId;
this.queryParams.currMonth = 1;
this.getList();
this.open = true;
},
}
};
</script>
<style>
.el-table .warning-row {
background: #f97762;
}
.el-table .warning7-row {
background: #57a6f9;
}
.el-table .warning3-row {
background: #f9c43d;
}
</style>

@ -377,7 +377,8 @@
@click="handleIsSupervise(scope.row)"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:supervise']"
>督办</el-button>-->
<el-button v-if="scope.row.assistDept=='' || scope.row.assistDept==null"
<!-- v-if="scope.row.assistDept=='' || scope.row.assistDept==null"-->
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@ -522,6 +523,9 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item label="详细地址" prop="address">
<el-input v-model="form.address" type="textarea" placeholder="请输入内容" :readonly="isReadOnly" />
</el-form-item>
<el-form-item label="隐患情况" prop="hiddenDangerDesc">
<el-input v-model="form.hiddenDangerDesc" type="textarea" placeholder="请输入内容" :readonly="isReadOnly" />
</el-form-item>
@ -601,16 +605,10 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患类型" prop="hiddenDangerType">
<el-select v-model="form.hiddenDangerType" placeholder="请选择隐患类型" :disabled="isReadOnly">
<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 label="整改资金" prop="rectifyMoney">
<el-input v-model="form.rectifyMoney" placeholder="请输入整改资金" :readonly="isReadOnly" />
</el-form-item>
</el-col>
</el-row>
@ -628,9 +626,16 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改资金" prop="rectifyMoney">
<el-input v-model="form.rectifyMoney" placeholder="请输入整改资金" :readonly="isReadOnly" />
</el-form-item>
<!--<el-form-item label="隐患类型" prop="hiddenDangerType">
<el-select v-model="form.hiddenDangerType" placeholder="请选择隐患类型" :disabled="isReadOnly">
<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-form>
@ -714,6 +719,7 @@ export default {
openAssist:false,//
assistDeptList:"",//
currAssistHiddenDangerId :-1,//id
queryOverTime:null,//
statusOptions: [{
value: '0',
label: '停业',
@ -745,7 +751,8 @@ export default {
hiddenDangerLabel: null,
hiddenDangerLabelArray:null,
isTowns:null,
overTime:null
overTime:null,
address:null,
},
alertState: [{
value: '7',
@ -756,6 +763,9 @@ export default {
}, {
value: '0',
label: '逾期告警'
},{
value: '10',
label: '全部临期或逾期'
} ],
//
form: {},
@ -765,6 +775,7 @@ export default {
enterpriseName: [ { type: 'string',required: true,message: "单位名称必填", trigger: 'blur'}],
enterpriseType: [ { type: 'string',required: true,message: "行业必须选择", trigger: 'blur'}],
enterpriseStatus: [ { type: 'string',required: true,message: "企业现状必须选择", trigger: 'blur'}],
address: [ { 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'}],
@ -820,9 +831,13 @@ export default {
};
},
created() {
this.queryParams.overTime = this.$route.query.overTime;
this.getList();
this.$route.query.overTime = null;
this.getListAllDept();
this.deptShow = this.$store.state.user.parentId==0 ?true :false;
console.log(this.$route.query.overTime);
},
methods: {
/** 查询隐患信息列表 */
@ -897,7 +912,9 @@ export default {
resetQuery() {
this.daterangeCheckTime = [];
this.daterangeRectifyTime = [];
this.resetForm("queryForm");
this.queryParams.overTime = null;
this.handleQuery();
},
//
@ -996,6 +1013,7 @@ export default {
handleAssist(row) {
this.reset();
this.openAssist = true;
this.assistDeptList = row.assistDept.split(",").map(Number);
this.currAssistHiddenDangerId = row.hiddenDangerId;
},
/** 协办提交*/
@ -1076,12 +1094,12 @@ export default {
this.getList();
},
tableRowClassName({row, rowIndex}) {
if(row.status==0 ||status==5){
if(row.status=="0" ||row.status=="5"){
if (row.overTime <0 ) {
return 'warning-row';
} else if (row.overTime > 3 && row.overTime <= 7) {
return 'warning7-row';
} else if (row.overTime > 0 && rowIndex <= 3) {
} else if (row.overTime >= 0 && row.overTime <= 3) {
return 'warning3-row';
}
}

@ -341,6 +341,15 @@
<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="receiveName" />
<el-table-column label="领取人电话" align="center" prop="receiveTel" />
<el-table-column label="出库时间" align="center" prop="outTime" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.outTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="经手人" align="center" prop="handledBy" />
<el-table-column label="操作时间" align="center" prop="outboundTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.outboundTime, '{y}-{m}-{d}') }}</span>
@ -371,6 +380,32 @@
downUrl="/ehsMaterial/ehsMaterial/importTemplate"
temName="物资信息导入模板"
></importUpload>
<!-- 出库 -->
<el-dialog title="填写出库详细" :visible.sync="outOpen" width="500px" append-to-body>
<el-form ref="outForm" :model="outForm" :rules="rules" label-width="100px">
<el-form-item label="出库数量" prop="sendQuantity">
<el-input v-model="outForm.sendQuantity" disabled="true" />
</el-form-item>
<el-form-item label="领取人" prop="receiveName">
<el-input v-model="outForm.receiveName" placeholder="请输入领取人" />
</el-form-item>
<el-form-item label="领取人电话" prop="receiveTel">
<el-input v-model="outForm.receiveTel" placeholder="请输入领取人电话" />
</el-form-item>
<el-form-item label="出库时间" prop="outTime">
<el-date-picker clearable v-model="outForm.outTime" type="date" value-format="yyyy-MM-dd"
placeholder="请选择出库时间" >
</el-date-picker>
</el-form-item>
<el-form-item label="经手人" prop="handledBy">
<el-input v-model="outForm.handledBy" placeholder="请输入经手人" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitOutForm"> </el-button>
<el-button @click="outCancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -462,6 +497,9 @@
form: {
classFirst:this.$route.query.classFirst
},
outOpen:false,
outMaterialId:null,
outForm:{},
//
rules: {
materialQuantity: [
@ -483,6 +521,21 @@
tel: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }
],
receiveName: [
{ required: true, message: "领取人不能为空", trigger: "blur" }
],
outTime: [
{ required: true, message: "出库时间不能为空", trigger: "blur" }
],
/*receiveTel: [
{ message: "领取人电话必须是手机或固话(区号-固话)", trigger: "change" }
],*/
handledBy: [
{ required: true, message: "经手人不能为空", trigger: "blur" }
],
receiveTel: [
{ required: true, message: "经手人不能为空", trigger: "blur", pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/ }
],
},
@ -568,6 +621,18 @@
this.open = false;
this.reset();
},
outCancel() {
this.outOpen = false;
this.outReset();
},
outReset() {
this.outForm = {
receiveName: null,
receiveTel: null,
outTime: null,
handledBy: null,
}
},
//
reset(){
this.form = {
@ -653,6 +718,20 @@
}
});
},
/** 执行出库提交按钮 */
submitOutForm() {
this.$refs["outForm"].validate(valid => {
if (valid) {
if (this.outForm.materialId != null) {
updateEhsMaterialDetail(this.outForm).then(response => {
this.$modal.msgSuccess("出库成功");
this.outOpen = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const materialIds = row.materialId || this.ids;
@ -708,12 +787,15 @@
this.getListDetail();
},/** */
handleOutbound(row) {
this.$modal.confirm('是否执行出库指令?' ).then(function() {
this.outOpen = true;
this.outForm.materialId = row.materialId;
this.outForm.sendQuantity = row.sendQuantity;
/* this.$modal.confirm('' ).then(function() {
return updateEhsMaterialDetail({"materialId":row.materialId});
}).then(() => {
this.getList();
this.$modal.msgSuccess("执行成功");
}).catch(() => {});
}).catch(() => {});*/
},
/** 入库 */
handleInbound(row) {

@ -0,0 +1,328 @@
<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="myMessageType">
<el-select v-model="queryParams.myMessageType" placeholder="请选择消息类型" clearable>
<el-option
v-for="dict in dict.type.my_message_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!--<el-form-item label="消息内容" prop="myMessageDesc">
<el-input
v-model="queryParams.myMessageDesc"
placeholder="请输入消息内容"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否已读" prop="myMessageState">
<el-select v-model="queryParams.myMessageState" placeholder="请选择是否已读" clearable>
<el-option
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="消息所有者" prop="myUserId">
<el-input
v-model="queryParams.myUserId"
placeholder="请输入消息所有者"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['ehsMyMessage:ehsMyMessage: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="['ehsMyMessage:ehsMyMessage: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="['ehsMyMessage:ehsMyMessage: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="['ehsMyMessage:ehsMyMessage:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="ehsMyMessageList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!--<el-table-column label="主键" align="center" prop="myMessageId" />
<el-table-column label="关键字" align="center" prop="myMessageKey" />-->
<el-table-column label="消息类型" align="center" prop="myMessageType">
<template slot-scope="scope">
<dict-tag :options="dict.type.my_message_type" :value="scope.row.myMessageType"/>
</template>
</el-table-column>
<el-table-column label="消息内容" align="center" prop="myMessageDesc" />
<el-table-column label="是否已读" align="center" prop="myMessageState">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.myMessageState"/>
</template>
</el-table-column>
<!-- <el-table-column label="消息所有者" align="center" prop="myUserId" />-->
<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="['ehsMyMessage:ehsMyMessage:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['ehsMyMessage:ehsMyMessage:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改我的的消息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="关键字" prop="myMessageKey">
<el-input v-model="form.myMessageKey" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="消息类型" prop="myMessageType">
<el-select v-model="form.myMessageType" placeholder="请选择消息类型">
<el-option
v-for="dict in dict.type.my_message_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="消息内容" prop="myMessageDesc">
<el-input v-model="form.myMessageDesc" placeholder="请输入消息内容" />
</el-form-item>
<el-form-item label="是否已读" prop="myMessageState">
<el-select v-model="form.myMessageState" placeholder="请选择是否已读">
<el-option
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="消息所有者" prop="myUserId">
<el-input v-model="form.myUserId" placeholder="请输入消息所有者" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listEhsMyMessage, getEhsMyMessage, delEhsMyMessage, addEhsMyMessage, updateEhsMyMessage } from "@/api/ehs/ehsMyMessage";
export default {
name: "EhsMyMessage",
dicts: ['my_message_type', 'sys_yes_no'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
ehsMyMessageList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
myMessageKey: null,
myMessageType: null,
myMessageDesc: null,
myMessageState: null,
myUserId: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询我的的消息列表 */
getList() {
this.loading = true;
listEhsMyMessage(this.queryParams).then(response => {
this.ehsMyMessageList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
myMessageId: null,
myMessageKey: null,
myMessageType: null,
myMessageDesc: null,
myMessageState: null,
myUserId: 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();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.myMessageId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加我的的消息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const myMessageId = row.myMessageId || this.ids
getEhsMyMessage(myMessageId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改我的的消息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.myMessageId != null) {
updateEhsMyMessage(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addEhsMyMessage(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const myMessageIds = row.myMessageId || this.ids;
this.$modal.confirm('是否确认删除我的的消息编号为"' + myMessageIds + '"的数据项?').then(function() {
return delEhsMyMessage(myMessageIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('ehsMyMessage/ehsMyMessage/export', {
...this.queryParams
}, `ehsMyMessage_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -9,7 +9,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否发布" prop="status" >
<!-- <el-form-item label="是否发布" prop="status" >
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
<el-option
v-for="dict in statusList"
@ -18,6 +18,19 @@
:value="dict.value"
/>
</el-select>
</el-form-item>-->
<el-form-item label="发布时间" prop="issueTime">
<el-date-picker
v-model="daterangeIssueTime"
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>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -79,6 +92,11 @@
<span> {{ statusList[scope.row.status].label}}</span>
</template>
</el-table-column>
<el-table-column label="发布时间" align="center" prop="issueTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.issueTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="已阅读企业数" align="center" prop="readDeptId" >
<template slot-scope="scope">
<span> {{scope.row.readDeptId==""?"0":scope.row.readDeptId.split(",").length-1}}</span>
@ -262,6 +280,7 @@ export default {
allDeptCheck:false,
taskShow:false,//
openDetail:false,
daterangeIssueTime:[],//
//
queryParams: {
pageNum: 1,
@ -293,6 +312,33 @@ export default {
//
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]);
}
}]
},
//
total1:2,
pageNum: 1,
@ -313,6 +359,11 @@ export default {
/** 查询内部公告列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeIssueTime && '' != this.daterangeIssueTime) {
this.queryParams.params["beginIssueTime"] = this.daterangeIssueTime[0];
this.queryParams.params["endIssueTime"] = this.daterangeIssueTime[1];
}
listEhsNoticeMessageAdmin(this.queryParams).then(response => {
this.ehsNoticeMessageList = response.rows;
this.total = response.total;
@ -379,6 +430,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.daterangeIssueTime = [];
this.handleQuery();
},
//

@ -9,7 +9,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否发布" prop="status" >
<!--<el-form-item label="是否发布" prop="status" >
<el-select v-model="queryParams.deptId" placeholder="请选择状态" clearable>
<el-option
v-for="dict in statusList"
@ -18,6 +18,19 @@
:value="dict.value"
/>
</el-select>
</el-form-item>-->
<el-form-item label="发布时间" prop="issueTime">
<el-date-picker
v-model="daterangeIssueTime"
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>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -95,7 +108,7 @@
<span> {{ scope.row.isRead==0?"未阅读":"已阅读"}}</span>
</template>
</el-table-column>
<el-table-column label="通知时间" align="center" prop="createTime" />
<el-table-column label="通知时间" align="center" prop="issueTime" />
<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>
@ -246,6 +259,7 @@ export default {
//id
curNoticeMessageId:"",
taskShow:false,
daterangeIssueTime:[],
//
queryParams: {
pageNum: 1,
@ -261,7 +275,8 @@ export default {
createDeptId: null,
deptId: null,
createUserId: null,
updateUserId: null
updateUserId: null,
issueTime:null
},
statusList: [{
value: '0',
@ -276,7 +291,34 @@ export default {
form: {},
//
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() {
@ -288,6 +330,11 @@ export default {
/** 查询内部公告列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeIssueTime && '' != this.daterangeIssueTime) {
this.queryParams.params["beginIssueTime"] = this.daterangeIssueTime[0];
this.queryParams.params["endIssueTime"] = this.daterangeIssueTime[1];
}
listEhsNoticeMessage(this.queryParams).then(response => {
this.ehsNoticeMessageList = response.rows;
this.total = response.total;
@ -346,6 +393,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.daterangeIssueTime = [];
this.handleQuery();
},
//

@ -1,7 +1,7 @@
<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" label-width="88px">
<!--<el-form-item label="上报部门" prop="deptId" v-show="deptShow" label-width="88px">
<el-select v-model="queryParams.deptId" filterable placeholder="请选择部门" clearable>
<el-option
v-for="dict in allDeptList"
@ -10,8 +10,17 @@
:value="dict.deptId"
/>
</el-select>
</el-form-item>-->
<el-form-item label="所属单位" prop="unit" v-show="deptShow" label-width="88px">
<el-select v-model="queryParams.unit" allow-create filterable placeholder="请选择单位" clearable>
<el-option
v-for="dict in allDeptList"
:key="dict.deptName"
:label="dict.deptName"
:value="dict.deptName"
/>
</el-select>
</el-form-item>
<el-form-item label="队伍名称" prop="teamName">
<el-input
v-model="queryParams.teamName"
@ -21,12 +30,14 @@
/>
</el-form-item>
<el-form-item label="队伍级别" prop="teamLevel">
<el-input
v-model="queryParams.teamLevel"
placeholder="请输入队伍级别"
clearable
@keyup.enter.native="handleQuery"
<el-select v-model="queryParams.teamLevel" allow-create filterable placeholder="请输入队伍级别" clearable>
<el-option
v-for="dict in dict.type.team_level"
:key="dict.label"
:label="dict.label"
:value="dict.label"
/>
</el-select>
</el-form-item>
<el-form-item label="负责人" prop="dutyer">
<el-input
@ -135,7 +146,11 @@
</template>
</el-table-column>
<el-table-column label="队伍名称" align="center" prop="teamName" />
<el-table-column label="队伍级别" align="center" prop="teamLevel" />
<el-table-column label="队伍级别" align="center" prop="teamLevel" >
<template slot-scope="scope">
<dict-tag :options="dict.type.team_level" :value="scope.row.teamLevel"/>
</template>
</el-table-column>
<el-table-column label="负责人" align="center" prop="dutyer" />
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="所属单位" align="center" prop="unit" />
@ -189,7 +204,15 @@
<el-input v-model="form.teamName" placeholder="请输入队伍名称" />
</el-form-item>
<el-form-item label="队伍级别" prop="teamLevel">
<el-input v-model="form.teamLevel" placeholder="请输入队伍级别" />
<!--<el-input v-model="form.teamLevel" placeholder="请输入队伍级别" />-->
<el-select v-model="form.teamLevel" allow-create filterable placeholder="请选择所属单位" clearable>
<el-option
v-for="dict in dict.type.team_level"
:key="dict.label"
:label="dict.label"
:value="dict.label"
/>
</el-select>
</el-form-item>
<el-form-item label="负责人" prop="dutyer">
@ -200,7 +223,7 @@
</el-form-item>
<el-form-item label="所属单位" prop="unit">
<el-select v-model="form.unit" filterable placeholder="请选择所属单位" clearable>
<el-select v-model="form.unit" allow-create filterable placeholder="请选择所属单位" clearable>
<el-option
v-for="dict in allDeptList"
:key="dict.deptName"
@ -261,7 +284,7 @@ import tdh from "../ehsRescueTeamWorker/index.vue"
import {listAllDept } from "@/api/system/dept";
export default {
name: "EhsRescueTeam",
dicts: ['team_property'],
dicts: ['team_property','team_level'],
components: {
importUpload,
tdh,
@ -345,6 +368,7 @@ export default {
this.loading = true;
listAllDept().then(response => {
this.allDeptList = response.data;
this.allDeptList.push({"deptName":"其他"})
this.loading = false;
});
},

@ -206,14 +206,25 @@
<el-form-item label="所属队伍名称" prop="rescueTeamName">
<el-input v-model="form.rescueTeamName" :readonly="true" placeholder="请输入应急救援队伍名称" />
</el-form-item>
<!-- <el-form label-width="80px" :model="form" :rules="rules">-->
<el-row>
<el-col :span="12">
<el-form-item label="人员姓名" prop="workerName">
<el-input v-model="form.workerName" placeholder="请输入人员姓名" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系方式" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系方式" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="年龄" prop="workerAge">
<el-input v-model="form.workerAge" placeholder="请输入年龄" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="性别" prop="gender">
<el-select v-model="form.gender" placeholder="请选择性别">
<el-option
@ -224,24 +235,34 @@
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
</el-form-item>
<el-form-item label="联系方式" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系方式" />
<el-form-item label="地址" prop="address">
<el-input v-model="form.address" placeholder="请输入地址" />
</el-form-item>
<el-form-item label="队内职务" prop="teamPost">
<el-input v-model="form.teamPost" placeholder="请输入队内职务" />
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="工作年限" prop="workYear">
<el-input v-model="form.workYear" placeholder="请输入工作年限" />
</el-form-item>
<el-form-item label="救援技能特长" prop="speciality">
<el-input v-model="form.speciality" placeholder="请输入救援技能特长" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="培训次数" prop="trainNum">
<el-input v-model="form.trainNum" placeholder="请输入培训次数" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="救援技能特长" prop="speciality">
<el-input v-model="form.speciality" placeholder="请输入救援技能特长" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
@ -323,7 +344,14 @@ export default {
workerName: [
{ required: true, message: "人员姓名不能为空", trigger: "blur" }
],
idCard: [
{ required: true, message: "身份证不能为空", trigger: "blur" }
],
address: [
{ required: true, message: "地址不能为空", trigger: "blur" }
],
phone: [
{ required: true, message: "电话不能为空", trigger: "blur" },
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系方式必须是手机或固话(区号-固话)", trigger: "change" }
],
}
@ -378,6 +406,7 @@ export default {
workerAge: null,
teamPost: null,
trainNum: null,
address: null,
};
this.resetForm("form");
},

@ -25,7 +25,8 @@
<script>
import { constantRoutes } from "@/router";
import { eventBus } from '@/main.js';
import { getOverTimeId } from "@/api/ehs/ehsHiddenDanger";
import { updateEhsMyMessage } from "@/api/ehs/ehsMyMessage";
//
const hideList = ["/index", "/user/profile"];
@ -34,6 +35,7 @@ export default {
return {
//
visibleNumber: 50,
// index
currentIndex: undefined,
img1:require('../assets/images/icon/menu (6).png'),
@ -51,6 +53,7 @@ export default {
};
},
computed: {
theme() {
return this.$store.state.settings.theme;
},
@ -119,7 +122,47 @@ export default {
return activePath;
},
},
created() {
this.openAlert();
},
mounted() {
//get1
this.timer = setTimeout(this.get, 1000);
},
//
beforeDestroy() {
clearTimeout(this.timer);
},
methods: {
openAlert() {
getOverTimeId().then(response => {
console.log(response);
if(response.code == 200){
if(response.data.myMessageDesc!="" && response.data.myMessageDesc!=null){
this.$confirm(response.data.myMessageDesc , '隐患信息', {
confirmButtonText: '查看',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateEhsMyMessage({"myMessageId":response.data.myMessageId,"myMessageState":"Y"}).then(response => {
this.$router.push({
path: '/ehsHiddenDangerMenu/ehsHiddenDanger', query: {overTime: "10" }
});
});
}).catch(() => {
/* this.$message({
type: 'info',
message: '已取消删除'
});*/
});
}
}
});
},
//
handleSelect(key, keyPath) {
this.currentIndex = key;

Loading…
Cancel
Save