Commit e948eaeb authored by 耿迪迪's avatar 耿迪迪

电子作业票 gengdidi

parent 9d52fed4
......@@ -71,7 +71,7 @@ public class TSpecialWorkPermitController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody TSpecialWorkPermit tSpecialWorkPermit)
{
return toAjax(tSpecialWorkPermitService.insertTSpecialWorkPermit(tSpecialWorkPermit));
return tSpecialWorkPermitService.insertTSpecialWorkPermit(tSpecialWorkPermit) > 0 ? AjaxResult.success(tSpecialWorkPermit) : AjaxResult.error();
}
/**
......
package com.zehong.web.controller.workPermit;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TSpecialWorkPermitSign;
import com.zehong.system.service.ITSpecialWorkPermitSignService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 【请填写功能名称】Controller
*
* @author zehong
* @date 2022-10-17
*/
@RestController
@RequestMapping("/workPermit/sign")
public class TSpecialWorkPermitSignController extends BaseController
{
@Autowired
private ITSpecialWorkPermitSignService tSpecialWorkPermitSignService;
/**
* 查询【请填写功能名称】列表
*/
//@PreAuthorize("@ss.hasPermi('system:sign:list')")
@GetMapping("/list")
public TableDataInfo list(TSpecialWorkPermitSign tSpecialWorkPermitSign)
{
startPage();
List<TSpecialWorkPermitSign> list = tSpecialWorkPermitSignService.selectTSpecialWorkPermitSignList(tSpecialWorkPermitSign);
return getDataTable(list);
}
/**
* 导出【请填写功能名称】列表
*/
//@PreAuthorize("@ss.hasPermi('system:sign:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSpecialWorkPermitSign tSpecialWorkPermitSign)
{
List<TSpecialWorkPermitSign> list = tSpecialWorkPermitSignService.selectTSpecialWorkPermitSignList(tSpecialWorkPermitSign);
ExcelUtil<TSpecialWorkPermitSign> util = new ExcelUtil<TSpecialWorkPermitSign>(TSpecialWorkPermitSign.class);
return util.exportExcel(list, "【请填写功能名称】数据");
}
/**
* 获取【请填写功能名称】详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:sign:query')")
@GetMapping(value = "/{signId}")
public AjaxResult getInfo(@PathVariable("signId") Long signId)
{
return AjaxResult.success(tSpecialWorkPermitSignService.selectTSpecialWorkPermitSignById(signId));
}
/**
* 新增【请填写功能名称】
*/
//@PreAuthorize("@ss.hasPermi('system:sign:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSpecialWorkPermitSign tSpecialWorkPermitSign)
{
return toAjax(tSpecialWorkPermitSignService.insertTSpecialWorkPermitSign(tSpecialWorkPermitSign));
}
/**
* 修改【请填写功能名称】
*/
//@PreAuthorize("@ss.hasPermi('system:sign:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSpecialWorkPermitSign tSpecialWorkPermitSign)
{
return toAjax(tSpecialWorkPermitSignService.updateTSpecialWorkPermitSign(tSpecialWorkPermitSign));
}
/**
* 删除【请填写功能名称】
*/
//@PreAuthorize("@ss.hasPermi('system:sign:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{signIds}")
public AjaxResult remove(@PathVariable Long[] signIds)
{
return toAjax(tSpecialWorkPermitSignService.deleteTSpecialWorkPermitSignByIds(signIds));
}
}
package com.zehong.web.controller.workPermit;
import java.util.ArrayList;
import java.util.List;
import com.github.pagehelper.util.StringUtil;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TWorkPermit;
import com.zehong.system.service.ITWorkPermitService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
* 作业许可证Controller
......@@ -46,7 +37,7 @@ public class TWorkPermitController extends BaseController
{
startPage();
List<TWorkPermit> list = tWorkPermitService.selectTWorkPermitList(tWorkPermit);
setOperator(list);
//setOperator(list);
return getDataTable(list);
}
......
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 【请填写功能名称】对象 t_special_work_permit_sign
*
* @author zehong
* @date 2022-10-17
*/
public class TSpecialWorkPermitSign extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long signId;
/** 作业证id */
@Excel(name = "作业证id")
private Long permitId;
/** 签名人id */
@Excel(name = "签名人id")
private Long staffId;
/** 签名人类型 */
@Excel(name = "签名人类型")
private String staffType;
/** 签名img */
@Excel(name = "签名img")
private String signName;
/** 意见 */
@Excel(name = "意见")
private String opinion;
/** 年-月-日-时-分 */
@Excel(name = "年-月-日-时-分")
private String signDate;
public void setSignId(Long signId)
{
this.signId = signId;
}
public Long getSignId()
{
return signId;
}
public void setPermitId(Long permitId)
{
this.permitId = permitId;
}
public Long getPermitId()
{
return permitId;
}
public void setStaffId(Long staffId)
{
this.staffId = staffId;
}
public Long getStaffId()
{
return staffId;
}
public void setStaffType(String staffType)
{
this.staffType = staffType;
}
public String getStaffType()
{
return staffType;
}
public void setSignName(String signName)
{
this.signName = signName;
}
public String getSignName()
{
return signName;
}
public void setOpinion(String opinion)
{
this.opinion = opinion;
}
public String getOpinion()
{
return opinion;
}
public void setSignDate(String signDate)
{
this.signDate = signDate;
}
public String getSignDate()
{
return signDate;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("signId", getSignId())
.append("permitId", getPermitId())
.append("staffId", getStaffId())
.append("staffType", getStaffType())
.append("signName", getSignName())
.append("opinion", getOpinion())
.append("signDate", getSignDate())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TSpecialWorkPermitSign;
/**
* 【请填写功能名称】Mapper接口
*
* @author zehong
* @date 2022-10-17
*/
public interface TSpecialWorkPermitSignMapper
{
/**
* 查询【请填写功能名称】
*
* @param signId 【请填写功能名称】ID
* @return 【请填写功能名称】
*/
public TSpecialWorkPermitSign selectTSpecialWorkPermitSignById(Long signId);
/**
* 查询【请填写功能名称】列表
*
* @param tSpecialWorkPermitSign 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
public List<TSpecialWorkPermitSign> selectTSpecialWorkPermitSignList(TSpecialWorkPermitSign tSpecialWorkPermitSign);
/**
* 新增【请填写功能名称】
*
* @param tSpecialWorkPermitSign 【请填写功能名称】
* @return 结果
*/
public int insertTSpecialWorkPermitSign(TSpecialWorkPermitSign tSpecialWorkPermitSign);
/**
* 修改【请填写功能名称】
*
* @param tSpecialWorkPermitSign 【请填写功能名称】
* @return 结果
*/
public int updateTSpecialWorkPermitSign(TSpecialWorkPermitSign tSpecialWorkPermitSign);
/**
* 删除【请填写功能名称】
*
* @param signId 【请填写功能名称】ID
* @return 结果
*/
public int deleteTSpecialWorkPermitSignById(Long signId);
/**
* 批量删除【请填写功能名称】
*
* @param signIds 需要删除的数据ID
* @return 结果
*/
public int deleteTSpecialWorkPermitSignByIds(Long[] signIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TSpecialWorkPermitSign;
/**
* 【请填写功能名称】Service接口
*
* @author zehong
* @date 2022-10-17
*/
public interface ITSpecialWorkPermitSignService
{
/**
* 查询【请填写功能名称】
*
* @param signId 【请填写功能名称】ID
* @return 【请填写功能名称】
*/
public TSpecialWorkPermitSign selectTSpecialWorkPermitSignById(Long signId);
/**
* 查询【请填写功能名称】列表
*
* @param tSpecialWorkPermitSign 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
public List<TSpecialWorkPermitSign> selectTSpecialWorkPermitSignList(TSpecialWorkPermitSign tSpecialWorkPermitSign);
/**
* 新增【请填写功能名称】
*
* @param tSpecialWorkPermitSign 【请填写功能名称】
* @return 结果
*/
public int insertTSpecialWorkPermitSign(TSpecialWorkPermitSign tSpecialWorkPermitSign);
/**
* 修改【请填写功能名称】
*
* @param tSpecialWorkPermitSign 【请填写功能名称】
* @return 结果
*/
public int updateTSpecialWorkPermitSign(TSpecialWorkPermitSign tSpecialWorkPermitSign);
/**
* 批量删除【请填写功能名称】
*
* @param signIds 需要删除的【请填写功能名称】ID
* @return 结果
*/
public int deleteTSpecialWorkPermitSignByIds(Long[] signIds);
/**
* 删除【请填写功能名称】信息
*
* @param signId 【请填写功能名称】ID
* @return 结果
*/
public int deleteTSpecialWorkPermitSignById(Long signId);
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TSpecialWorkPermitSignMapper;
import com.zehong.system.domain.TSpecialWorkPermitSign;
import com.zehong.system.service.ITSpecialWorkPermitSignService;
/**
* 【请填写功能名称】Service业务层处理
*
* @author zehong
* @date 2022-10-17
*/
@Service
public class TSpecialWorkPermitSignServiceImpl implements ITSpecialWorkPermitSignService
{
@Autowired
private TSpecialWorkPermitSignMapper tSpecialWorkPermitSignMapper;
/**
* 查询【请填写功能名称】
*
* @param signId 【请填写功能名称】ID
* @return 【请填写功能名称】
*/
@Override
public TSpecialWorkPermitSign selectTSpecialWorkPermitSignById(Long signId)
{
return tSpecialWorkPermitSignMapper.selectTSpecialWorkPermitSignById(signId);
}
/**
* 查询【请填写功能名称】列表
*
* @param tSpecialWorkPermitSign 【请填写功能名称】
* @return 【请填写功能名称】
*/
@Override
public List<TSpecialWorkPermitSign> selectTSpecialWorkPermitSignList(TSpecialWorkPermitSign tSpecialWorkPermitSign)
{
return tSpecialWorkPermitSignMapper.selectTSpecialWorkPermitSignList(tSpecialWorkPermitSign);
}
/**
* 新增【请填写功能名称】
*
* @param tSpecialWorkPermitSign 【请填写功能名称】
* @return 结果
*/
@Override
public int insertTSpecialWorkPermitSign(TSpecialWorkPermitSign tSpecialWorkPermitSign)
{
tSpecialWorkPermitSign.setCreateTime(DateUtils.getNowDate());
return tSpecialWorkPermitSignMapper.insertTSpecialWorkPermitSign(tSpecialWorkPermitSign);
}
/**
* 修改【请填写功能名称】
*
* @param tSpecialWorkPermitSign 【请填写功能名称】
* @return 结果
*/
@Override
public int updateTSpecialWorkPermitSign(TSpecialWorkPermitSign tSpecialWorkPermitSign)
{
return tSpecialWorkPermitSignMapper.updateTSpecialWorkPermitSign(tSpecialWorkPermitSign);
}
/**
* 批量删除【请填写功能名称】
*
* @param signIds 需要删除的【请填写功能名称】ID
* @return 结果
*/
@Override
public int deleteTSpecialWorkPermitSignByIds(Long[] signIds)
{
return tSpecialWorkPermitSignMapper.deleteTSpecialWorkPermitSignByIds(signIds);
}
/**
* 删除【请填写功能名称】信息
*
* @param signId 【请填写功能名称】ID
* @return 结果
*/
@Override
public int deleteTSpecialWorkPermitSignById(Long signId)
{
return tSpecialWorkPermitSignMapper.deleteTSpecialWorkPermitSignById(signId);
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TSpecialWorkPermitSignMapper">
<resultMap type="TSpecialWorkPermitSign" id="TSpecialWorkPermitSignResult">
<result property="signId" column="sign_id" />
<result property="permitId" column="permit_id" />
<result property="staffId" column="staff_id" />
<result property="staffType" column="staff_type" />
<result property="signName" column="sign_name" />
<result property="opinion" column="opinion" />
<result property="signDate" column="sign_date" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTSpecialWorkPermitSignVo">
select sign_id, permit_id, staff_id, staff_type, sign_name, opinion, sign_date, create_time from t_special_work_permit_sign
</sql>
<select id="selectTSpecialWorkPermitSignList" parameterType="TSpecialWorkPermitSign" resultMap="TSpecialWorkPermitSignResult">
<include refid="selectTSpecialWorkPermitSignVo"/>
<where>
<if test="permitId != null "> and permit_id = #{permitId}</if>
<if test="staffId != null "> and staff_id = #{staffId}</if>
<if test="staffType != null and staffType != ''"> and staff_type = #{staffType}</if>
<if test="signName != null and signName != ''"> and sign_name like concat('%', #{signName}, '%')</if>
<if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if>
<if test="signDate != null and signDate != ''"> and sign_date = #{signDate}</if>
</where>
</select>
<select id="selectTSpecialWorkPermitSignById" parameterType="Long" resultMap="TSpecialWorkPermitSignResult">
<include refid="selectTSpecialWorkPermitSignVo"/>
where sign_id = #{signId}
</select>
<insert id="insertTSpecialWorkPermitSign" parameterType="TSpecialWorkPermitSign">
insert into t_special_work_permit_sign
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="signId != null">sign_id,</if>
<if test="permitId != null">permit_id,</if>
<if test="staffId != null">staff_id,</if>
<if test="staffType != null">staff_type,</if>
<if test="signName != null">sign_name,</if>
<if test="opinion != null">opinion,</if>
<if test="signDate != null">sign_date,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="signId != null">#{signId},</if>
<if test="permitId != null">#{permitId},</if>
<if test="staffId != null">#{staffId},</if>
<if test="staffType != null">#{staffType},</if>
<if test="signName != null">#{signName},</if>
<if test="opinion != null">#{opinion},</if>
<if test="signDate != null">#{signDate},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTSpecialWorkPermitSign" parameterType="TSpecialWorkPermitSign">
update t_special_work_permit_sign
<trim prefix="SET" suffixOverrides=",">
<if test="permitId != null">permit_id = #{permitId},</if>
<if test="staffId != null">staff_id = #{staffId},</if>
<if test="staffType != null">staff_type = #{staffType},</if>
<if test="signName != null">sign_name = #{signName},</if>
<if test="opinion != null">opinion = #{opinion},</if>
<if test="signDate != null">sign_date = #{signDate},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where sign_id = #{signId}
</update>
<delete id="deleteTSpecialWorkPermitSignById" parameterType="Long">
delete from t_special_work_permit_sign where sign_id = #{signId}
</delete>
<delete id="deleteTSpecialWorkPermitSignByIds" parameterType="String">
delete from t_special_work_permit_sign where sign_id in
<foreach item="signId" collection="array" open="(" separator="," close=")">
#{signId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询【请填写功能名称】列表
export function listSign(query) {
return request({
url: '/workPermit/sign/list',
method: 'get',
params: query
})
}
// 查询【请填写功能名称】详细
export function getSign(signId) {
return request({
url: '/workPermit/sign/' + signId,
method: 'get'
})
}
// 新增【请填写功能名称】
export function addSign(data) {
return request({
url: '/workPermit/sign',
method: 'post',
data: data
})
}
// 修改【请填写功能名称】
export function updateSign(data) {
return request({
url: '/workPermit/sign',
method: 'put',
data: data
})
}
// 删除【请填写功能名称】
export function delSign(signId) {
return request({
url: '/workPermit/sign/' + signId,
method: 'delete'
})
}
// 导出【请填写功能名称】
export function exportSign(query) {
return request({
url: '/workPermit/sign/export',
method: 'get',
params: query
})
}
<template>
<div>
<table>
<tr>
<td colspan="4">申请单位</td>
<td colspan="3"><input v-model="flareUp.applyUnit" class="editInput"/></td>
<td colspan="3">作业申请时间</td>
<td colspan="5">
<el-date-picker clearable size="small"
v-model="flareUp.applyDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择作业申请时间"
style="width: 100%">
</el-date-picker>
</td>
<td colspan="2">编号</td>
<td colspan="3"><input v-model="flareUp.num" disabled class="editInput"/></td>
</tr>
<tr>
<td colspan="4">作业内容</td>
<td colspan="6"><input v-model="flareUp.workContent" class="editInput"/></td>
<td colspan="4">动火地点及动火部位</td>
<td colspan="6"><input v-model="flareUp.fireLocation" class="editInput"/></td>
</tr>
<tr>
<td colspan="4">动火作业级别</td>
<td colspan="6">
特级<input v-model="flareUp.fireLevel.special" type="checkbox"/>
一级<input v-model="flareUp.fireLevel.first" type="checkbox"/>
二级<input v-model="flareUp.fireLevel.second" type="checkbox"/>
</td>
<td colspan="4">动火方式</td>
<td colspan="6"><input v-model="flareUp.fireMethod" class="editInput"/></td>
</tr>
<tr>
<td colspan="4">动火人及证书编号</td>
<td colspan="16"><input v-model="flareUp.pepeloAndLinceseNum" class="editInput"/></td>
</tr>
<tr>
<td colspan="4">作业单位</td>
<td colspan="6"><input v-model="flareUp.workUnit" class="editInput"/></td>
<td colspan="4">作业负责人</td>
<td colspan="6"><input v-model="flareUp.leader" class="editInput"/></td>
</tr>
<tr>
<td colspan="4">气体取样分析时间</td>
<td colspan="4">
<el-date-picker clearable size="small"
v-model="flareUp.firstSimple.simpleDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择分析时间"
style="width: 100%">
</el-date-picker>
</td>
<td colspan="4">
<el-date-picker clearable size="small"
v-model="flareUp.secondSimple.simpleDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择分析时间"
style="width: 100%">
</el-date-picker>
</td>
<td colspan="4">
<el-date-picker clearable size="small"
v-model="flareUp.thirdSimple.simpleDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择分析时间"
style="width: 100%">
</el-date-picker>
</td>
<td colspan="4">
<el-date-picker clearable size="small"
v-model="flareUp.fourthSimple.simpleDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择分析时间"
style="width: 100%">
</el-date-picker>
</td>
</tr>
<tr>
<td colspan="4">代表性气体</td>
<td colspan="4"><input v-model="flareUp.firstSimple.simpleGas" class="editInput"/></td>
<td colspan="4"><input v-model="flareUp.secondSimple.simpleGas" class="editInput"/></td>
<td colspan="4"><input v-model="flareUp.thirdSimple.simpleGas" class="editInput"/></td>
<td colspan="4"><input v-model="flareUp.fourthSimple.simpleGas" class="editInput"/></td>
</tr>
<tr>
<td colspan="4">分析结果/%</td>
<td colspan="4"><input v-model="flareUp.firstSimple.simpleResult" class="editInput"/></td>
<td colspan="4"><input v-model="flareUp.secondSimple.simpleResult" class="editInput"/></td>
<td colspan="4"><input v-model="flareUp.thirdSimple.simpleResult" class="editInput"/></td>
<td colspan="4"><input v-model="flareUp.fourthSimple.simpleResult" class="editInput"/></td>
</tr>
<tr>
<td colspan="4">分析人</td>
<td colspan="4"><input v-model="flareUp.firstSimple.simplePeople" class="editInput"/></td>
<td colspan="4"><input v-model="flareUp.secondSimple.simplePeople" class="editInput"/></td>
<td colspan="4"><input v-model="flareUp.thirdSimple.simplePeople" class="editInput"/></td>
<td colspan="4"><input v-model="flareUp.fourthSimple.simplePeople" class="editInput"/></td>
</tr>
<tr>
<td colspan="4">关联的其他特殊作业及安全作业票编号</td>
<td colspan="16"><input v-model="flareUp.specialLinceseNum" class="editInput"/></td>
</tr>
<tr>
<td colspan="4">风险辨识结果在下列画√</td>
<td colspan="16" style="text-align: left">
<el-row>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.hit" type="checkbox"/>1.物体打击
</el-col>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.vehicleInjuries" type="checkbox"/>2.车辆伤害
</el-col>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.mechanicalInjuries" type="checkbox"/>3.机械伤害
</el-col>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.liftingInjury" type="checkbox"/>4.起重伤害
</el-col>
<el-col :span="4">
<input v-model="flareUp.dangerousResult.electricShock" type="checkbox"/> 5.触电
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.drowning" type="checkbox"/> 6.淹溺
</el-col>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.scald" type="checkbox"/> 7.灼烫
</el-col>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.fire" type="checkbox"/> 8.火灾
</el-col>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.drop" type="checkbox"/> 9.高处坠落
</el-col>
<el-col :span="4">
<input v-model="flareUp.dangerousResult.collapse" type="checkbox"/> 10.坍塌
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.boilerExplosion" type="checkbox"/> 11.锅炉爆炸
</el-col>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.containerExplosion" type="checkbox"/> 12.容器爆炸
</el-col>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.otherExplosion" type="checkbox"/> 13.其它爆炸
</el-col>
<el-col :span="5">
<input v-model="flareUp.dangerousResult.poisoning" type="checkbox"/> 14.中毒和窒息
</el-col>
<el-col :span="4">
<input v-model="flareUp.dangerousResult.otherHurt" type="checkbox"/>15.其它伤害
</el-col>
</el-row>
</td>
</tr>
<tr>
<td colspan="4">动火作业实施时间</td>
<td colspan="16">
<el-row>
<el-col :span="11">
<el-date-picker clearable size="small"
v-model="flareUp.executeStartTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择实施开始时间"
style="width: 100%">
</el-date-picker>
</el-col>
<el-col :span="2" style="margin-top: 5px">
</el-col>
<el-col :span="11">
<el-date-picker clearable size="small"
v-model="flareUp.executeEndTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择实施结束时间"
style="width: 100%">
</el-date-picker>
</el-col>
</el-row>
</td>
</tr>
<tr>
<td colspan="2">序号</td>
<td colspan="14">安全措施</td>
<td colspan="2">是否涉及</td>
<td colspan="2">确认人</td>
</tr>
<tr>
<td colspan="2">1</td>
<td colspan="14">动火设备内部构件清洗干净,蒸汽吹扫或水洗、置换合格,达到动火条件;</td>
<td colspan="2"><input v-model="flareUp.deviceClean.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.deviceClean.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">2</td>
<td colspan="14">与动火设备相连接的所有管线已断开,加盲板<input v-model="flareUp.blindPlate.block" class="editLine" style="width: 50px"/>块,未采取水封或仅关闭阀门的方式代替盲板;</td>
<td colspan="2"><input v-model="flareUp.blindPlate.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.blindPlate.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">3</td>
<td colspan="14">动火点周围及附近的孔洞、窨井、地沟、水封设施、污水井等已清除易燃物,并已采取覆盖、铺沙等手段进行隔离;</td>
<td colspan="2"><input v-model="flareUp.around.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.around.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">4</td>
<td colspan="14">罐区内动火点同一防火提内和防火间距内的储罐未进行脱水和取样作业;</td>
<td colspan="2"><input v-model="flareUp.tankFarm.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.tankFarm.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">5</td>
<td colspan="14">高处作业已采取防火花飞溅措施,作业人员佩戴必要的个体防护装备;</td>
<td colspan="2"><input v-model="flareUp.height.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.height.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">6</td>
<td colspan="14">在有可燃物构件和使用可燃物做防腐内衬的设备内部动火作业,已采取防火隔绝措施;</td>
<td colspan="2"><input v-model="flareUp.firePrevention.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.firePrevention.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">7</td>
<td colspan="14">乙炔气瓶直立放置,已采取防倾倒措施并安装防回火装置;乙炔气瓶、氧气瓶与火源间的距离不应小于10 m,两气瓶相互间距不应小于5 m;</td>
<td colspan="2"><input v-model="flareUp.gasCylinder.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.gasCylinder.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">8</td>
<td colspan="14">现场配备灭火器<input v-model="flareUp.equipment.platform" class="editLine" style="width: 50px"/>台,灭火毯<input v-model="flareUp.equipment.block" class="editLine" style="width: 50px"/>块,消防蒸汽带或消防水带<input v-model="flareUp.equipment.metre" class="editLine" style="width: 50px"/></td>
<td colspan="2"><input v-model="flareUp.equipment.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.equipment.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">9</td>
<td colspan="14">电焊机所处位置已考虑防火防爆要求,且已可靠接地;</td>
<td colspan="2"><input v-model="flareUp.electricWeldingMachine.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.electricWeldingMachine.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">10</td>
<td colspan="14">动火点周围规定距离内没有易燃易爆化学品的装卸、排放、喷漆等可能引起火灾爆炸的危险作业;</td>
<td colspan="2"><input v-model="flareUp.danger.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.danger.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">11</td>
<td colspan="14">动火点30 m内垂直空间未排放可燃气体;15 m内垂直空间未排放可燃液体;10m范围内及动火点下方未同时进行可燃溶剂清洗或喷漆等作业,10m范围内未见有可燃性粉尘清扫作业;</td>
<td colspan="2"><input v-model="flareUp.combustible.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.combustible.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">12</td>
<td colspan="14">已开展作业危害分析,制定相应的安全风险管控措施,交叉作业已明确协调人;</td>
<td colspan="2"><input v-model="flareUp.overlappingWork.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.overlappingWork.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">13</td>
<td colspan="14">用于连续检测的移动式可燃气体检测仪已配备到位;</td>
<td colspan="2"><input v-model="flareUp.moveDevice.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.moveDevice.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">14</td>
<td colspan="14">配备的摄录设备已到位,且防爆级别满足安全要求;</td>
<td colspan="2"><input v-model="flareUp.videography.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.videography.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">15</td>
<td colspan="14">其他相关特殊作业已办理相应安全作业票,作业现场四周已设立警戒区;</td>
<td colspan="2"><input v-model="flareUp.special.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.special.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">16</td>
<td colspan="14" style="text-align: left">
<div>其他安全措施:<input v-model="flareUp.otherSafeMeasure.otherDetail" class="editInput" style="width: 81%"/></div>
<div style="float: right">编制人:<input v-model="flareUp.otherSafeMeasure.prepared" class="editInput" style="width: 70%"/> </div>
</td>
<td colspan="2"><input v-model="flareUp.otherSafeMeasure.involve" class="editInput"/></td>
<td colspan="2"><input v-model="flareUp.otherSafeMeasure.comfire" class="editInput"/></td>
</tr>
<tr>
<td colspan="4">安全交底人</td>
<td colspan="6"><input v-model="flareUp.discloser" class="editInput"/></td>
<td colspan="4">接受交底人</td>
<td colspan="6"><input v-model="flareUp.receiver" class="editInput"/></td>
</tr>
<tr>
<td colspan="4">监护人</td>
<td colspan="16"><input v-model="flareUp.guardian" class="editInput"/></td>
</tr>
<!--<tr>
<td colspan="4">作业负责人意见</td>
<td colspan="6"><input v-model="flareUp.workLeader.opinion" class="editInput"/></td>
<td colspan="2">签字:</td>
<td colspan="4"><input v-model="flareUp.workLeader.sign" class="editInput"/></td>
<td colspan="4">
<el-date-picker clearable size="small"
v-model="flareUp.workLeader.date"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择时间"
style="width: 100%">
</el-date-picker>
</td>
</tr>
<tr>
<td colspan="4">所在单位意见</td>
<td colspan="6"><input v-model="flareUp.beyondUnit.opinion" class="editInput"/></td>
<td colspan="2">签字:</td>
<td colspan="4"><input v-model="flareUp.beyondUnit.sign" class="editInput"/></td>
<td colspan="4">
<el-date-picker clearable size="small"
v-model="flareUp.beyondUnit.date"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择时间"
style="width: 100%">
</el-date-picker>
</td>
</tr>
<tr>
<td colspan="4">审核部门意见</td>
<td colspan="6"><input v-model="flareUp.auditDept.opinion" class="editInput"/></td>
<td colspan="2">签字:</td>
<td colspan="4"><input v-model="flareUp.auditDept.sign" class="editInput"/></td>
<td colspan="4">
<el-date-picker clearable size="small"
v-model="flareUp.auditDept.date"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择时间"
style="width: 100%">
</el-date-picker>
</td>
</tr>
<tr>
<td colspan="4">动火审批人意见</td>
<td colspan="6"><input v-model="flareUp.approval.opinion" class="editInput"/></td>
<td colspan="2">签字:</td>
<td colspan="4"><input v-model="flareUp.approval.sign" class="editInput"/></td>
<td colspan="4">
<el-date-picker clearable size="small"
v-model="flareUp.approval.date"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择时间"
style="width: 100%">
</el-date-picker>
</td>
</tr>
<tr>
<td colspan="4">动火前,岗位当班班长验票情况</td>
<td colspan="6"><input v-model="flareUp.fireBefore.opinion" class="editInput"/></td>
<td colspan="2">签字:</td>
<td colspan="4"><input v-model="flareUp.fireBefore.sign" class="editInput"/></td>
<td colspan="4">
<el-date-picker clearable size="small"
v-model="flareUp.fireBefore.date"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择时间"
style="width: 100%">
</el-date-picker>
</td>
</tr>
<tr>
<td colspan="4">完工验收</td>
<td colspan="6"><input v-model="flareUp.complete.opinion" class="editInput"/></td>
<td colspan="2">签字:</td>
<td colspan="4"><input v-model="flareUp.complete.sign" class="editInput"/></td>
<td colspan="4">
<el-date-picker clearable size="small"
v-model="flareUp.complete.date"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择时间"
style="width: 100%">
</el-date-picker>
</td>
</tr>-->
</table>
<!-- 审批人选择 -->
<el-row style="margin-top: 10px">
<el-col :span="4">
<div style="font-size: 18px;margin-top: 5px">作业负责人:</div>
</el-col>
<el-col :span="8">
<el-select v-model="leaderDeptId" filterable placeholder="请选择作业负责人部门" @change="switchDept(leaderDeptId)">
<el-option
v-for="item in deptList"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
>
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="leaderAuditor" filterable placeholder="请选择审核人">
<el-option
v-for="item in userList"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
>
</el-option>
</el-select>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4">
<div style="font-size: 18px;margin-top: 5px">所在单位意见:</div>
</el-col>
<el-col :span="8">
<el-select v-model="beyondUnitDeptId" filterable placeholder="请选择所在单位" @change="switchDept(beyondUnitDeptId)">
<el-option
v-for="item in deptList"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
>
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="beyondUnitAuditor" filterable placeholder="请选择审核人">
<el-option
v-for="item in userList"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
>
</el-option>
</el-select>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4">
<div style="font-size: 18px;margin-top: 5px">审核部门意见:</div>
</el-col>
<el-col :span="8">
<el-select v-model="auditDeptDeptId" filterable placeholder="请选择审核部门" @change="switchDept(auditDeptDeptId)">
<el-option
v-for="item in deptList"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
>
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="auditDeptAuditor" filterable placeholder="请选择审核人">
<el-option
v-for="item in userList"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
>
</el-option>
</el-select>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4">
<div style="font-size: 18px;margin-top: 5px">动火审批人意见:</div>
</el-col>
<el-col :span="8">
<el-select v-model="approvalDeptId" filterable placeholder="请选择动火审批人" @change="switchDept(approvalDeptId)">
<el-option
v-for="item in deptList"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
>
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="approvalAuditor" filterable placeholder="请选择审核人">
<el-option
v-for="item in userList"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
>
</el-option>
</el-select>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4">
<div style="font-size: 18px;margin-top: 5px">动火前,岗位当班班长验票情况:</div>
</el-col>
<el-col :span="8">
<el-select v-model="fireBeforeDeptId" filterable placeholder="请选择岗位当班班长部门" @change="switchDept(fireBeforeDeptId)">
<el-option
v-for="item in deptList"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
>
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="fireBeforeAuditor" filterable placeholder="请选择审核人">
<el-option
v-for="item in userList"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
>
</el-option>
</el-select>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4">
<div style="font-size: 18px;margin-top: 5px">完工验收 :</div>
</el-col>
<el-col :span="8">
<el-select v-model="completeDeptId" filterable placeholder="请选择验收部门" @change="switchDept(completeDeptId)">
<el-option
v-for="item in deptList"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
>
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="completeAuditor" filterable placeholder="请选择审核人">
<el-option
v-for="item in userList"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
>
</el-option>
</el-select>
</el-col>
</el-row>
</div>
</template>
<script>
import { listDept } from "@/api/system/dept";
import { listUser } from "@/api/system/user";
import { addSpecialPermit } from "@/api/workPermit/specialPermit";
import { addSign } from "@/api/workPermit/workPermitSign";
export default {
name: "flare-up",
props:{
workPermitId:{
type:Number
},
licenceNum:{
type:String
}
},
data(){
return{
flareUp:{
applyUnit:"",
applyDate:"",
num:"",
workContent:"",
fireLocation:"",
fireLevel:{
special:false,
first:false,
second:false
},
fireMethod:"",
pepeloAndLinceseNum:"",
workUnit:"",
leader:"",
firstSimple:{
simpleDate:"",
simpleGas:"",
simpleResult:"",
simplePeople:""
},
secondSimple:{
simpleDate:"",
simpleGas:"",
simpleResult:"",
simplePeople:""
},
thirdSimple:{
simpleDate:"",
simpleGas:"",
simpleResult:"",
simplePeople:""
},
fourthSimple:{
simpleDate:"",
simpleGas:"",
simpleResult:"",
simplePeople:""
},
specialLinceseNum:"",
dangerousResult:{
hit:false,
vehicleInjuries:false,
mechanicalInjuries:false,
liftingInjury:false,
electricShock:false,
drowning:false,
scald:false,
fire:false,
drop:false,
collapse:false,
boilerExplosion:false,
containerExplosion:false,
otherExplosion:false,
poisoning:false,
otherHurt:false
},
executeStartTime:"",
executeEndTime:"",
deviceClean:{
involve:"",
comfire:""
},
blindPlate:{
block:"",
involve:"",
comfire:""
},
around:{
involve:"",
comfire:""
},
tankFarm:{
involve:"",
comfire:""
},
height:{
involve:"",
comfire:""
},
firePrevention:{
involve:"",
comfire:""
},
gasCylinder:{
involve:"",
comfire:""
},
equipment:{
platform:"",
block:"",
metre:"",
involve:"",
comfire:""
},
electricWeldingMachine:{
involve:"",
comfire:""
},
danger:{
involve:"",
comfire:""
},
combustible:{
involve:"",
comfire:""
},
overlappingWork:{
involve:"",
comfire:""
},
moveDevice:{
involve:"",
comfire:""
},
videography:{
involve:"",
comfire:""
},
special:{
involve:"",
comfire:""
},
otherSafeMeasure:{
otherDetail:"",
prepared:"",
involve:"",
comfire:""
},
discloser:"",
receiver:"",
guardian:""
},
deptList:[],
userList:[],
leaderDeptId:"",
beyondUnitDeptId:"",
auditDeptDeptId:"",
approvalDeptId:"",
fireBeforeDeptId:"",
completeDeptId:"",
leaderAuditor:"",
beyondUnitAuditor:"",
auditDeptAuditor:"",
approvalAuditor:"",
fireBeforeAuditor:"",
completeAuditor:"",
}
},
created(){
this.getList();
this.flareUp.num = this.licenceNum;
},
methods:{
/** 查询部门列表 */
getList() {
listDept().then(response => {
this.deptList = response.data;
});
},
//部门切换
switchDept(deptId){
listUser({ pageNum: 1,pageSize: 99999,deptId:deptId}).then(response => {
this.userList = response.rows;
});
},
//新增特殊作业单
addSpecialWorkPermit(){
if(this.validateData()){
return true;
}
let param = {};
param.workPermitId = this.workPermitId;
param.licenceNum = this.licenceNum;
param.specialWorkType = "flareUp"
param.specialWorkData = JSON.stringify(this.flareUp);
addSpecialPermit(param).then(res =>{
this.addWorkPermitSign(res.data.specialWorkPermitId);
})
return false;
},
//数据校验
validateData(){
if(typeof this.flareUp.applyUnit== "undefined" || this.flareUp.applyUnit== null || this.flareUp.applyUnit== ""){
this.msgError("申请单位为空!");
return true;
}
if(typeof this.flareUp.workContent== "undefined" || this.flareUp.workContent== null || this.flareUp.workContent== ""){
this.msgError("作业内容为空!");
return true;
}
if(typeof this.flareUp.fireMethod== "undefined" || this.flareUp.fireMethod== null || this.flareUp.fireMethod== ""){
this.msgError("动火方式为空!");
return true;
}
if(typeof this.flareUp.pepeloAndLinceseNum== "undefined" || this.flareUp.pepeloAndLinceseNum== null || this.flareUp.pepeloAndLinceseNum== ""){
this.msgError("动火人及证书编号为空!");
return true;
}
if(typeof this.leaderAuditor== "undefined" || this.leaderAuditor== null || this.leaderAuditor== ""){
this.msgError("作业负责人未选择!");
return true;
}
if(typeof this.beyondUnitAuditor== "undefined" || this.beyondUnitAuditor== null || this.beyondUnitAuditor== ""){
this.msgError("所在单位审核人未选择!");
return true;
}
if(typeof this.auditDeptAuditor== "undefined" || this.auditDeptAuditor== null || this.auditDeptAuditor== ""){
this.msgError("审核部门审核人未选择!");
return true;
}
if(typeof this.approvalAuditor== "undefined" || this.approvalAuditor== null || this.approvalAuditor== ""){
this.msgError("动火审批人未选择!");
return true;
}
if(typeof this.fireBeforeAuditor== "undefined" || this.fireBeforeAuditor== null || this.fireBeforeAuditor== ""){
this.msgError("岗位当班班长未选择!");
return true;
}
if(typeof this.completeAuditor== "undefined" || this.completeAuditor== null || this.completeAuditor== ""){
this.msgError("完工验收人未选择!");
return true;
}
},
//新增审核人
addWorkPermitSign(permitId){
//新增作业负责人
addSign({permitId:permitId,staffId:this.leaderAuditor,staffType:"leader"});
//新增单位意见
addSign({permitId:permitId,staffId:this.beyondUnitAuditor,"staffType":"beyondUnit"});
//新增审核部门
addSign({permitId:permitId,staffId:this.auditDeptAuditor,staffType:"auditDept"});
//新增动火审批人
addSign({permitId:permitId,staffId:this.approvalAuditor,staffType:"approval"});
//新增岗位当班班长
addSign({permitId:permitId,staffId:this.fireBeforeAuditor,staffType:"fireBefore"});
//新增完工验收
addSign({permitId:permitId,staffId:this.completeAuditor,staffType:"complete"});
},
}
}
</script>
<style scoped lang="scss">
table{
border-collapse: collapse;
table-layout: fixed;
text-align: center;
width: 100%;
}
table td, table th{
border: 1px solid;
height: 30px;
}
.editInput{
border: none;
width: 100%;
height: 100%;
text-align: center;
}
.editInput:focus{
outline: none;
}
.editLine{
border-bottom: 1px solid;
border-top: none;
border-left: none;
border-right: none;
text-align: center;
}
.editLine:focus{
outline: none;
}
textarea{
height: 100%;
width: 100%;
border: none;
resize:none;
}
textarea:focus{
outline: none;
}
</style>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="申请部门" prop="applyDept">
<el-input
v-model="queryParams.applyDept"
placeholder="请输入申请部门"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="开始时间" prop="applyWorkStartTime">
<el-date-picker clearable size="small"
v-model="queryParams.applyWorkStartTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="applyWorkEndTime">
<el-date-picker clearable size="small"
v-model="queryParams.applyWorkEndTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="申请单状态" prop="applyStatus">
<el-select v-model="queryParams.applyStatus" placeholder="请选择申请单状态" clearable size="small">
<el-option
v-for="dict in certificateStatus"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</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="['system:permit:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="permitList">
<el-table-column label="申请部门" align="center" prop="applyDept" />
<el-table-column label="申请人" align="center" prop="linkMan" :formatter="applyNameFormate"/>
<el-table-column label="联系电话" align="center" prop="linkPhone" />
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceNum" />
<el-table-column label="开始时间" align="center" prop="applyWorkStartTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyWorkStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" prop="applyWorkEndTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyWorkEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="申请单状态" align="center" prop="applyStatus" :formatter="applyStatusFormate"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="certificateDetail(scope.row)"
>
详情
</el-button>
<el-button
v-if="scope.row.applyStatus =='0'"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:permit:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:permit:remove']"
>删除</el-button>
<el-button
v-if="scope.row.applyStatus=='0' && scope.row.linkMan == $store.state.user.userId"
size="mini"
type="text"
icon="el-icon-edit"
@click="certificateApprovalApply(scope.row)"
v-hasPermi="['system:permit:edit']"
>作业证申请</el-button>
<el-button
v-if="scope.row.operator=='approval'"
size="mini"
type="text"
icon="el-icon-edit"
@click="certificateApproval(scope.row)"
v-hasPermi="['system:permit:edit']"
>作业证审核</el-button>
<el-button
v-if="scope.row.operator=='review'"
size="mini"
type="text"
icon="el-icon-edit"
@click="certificateApprovalApply(scope.row)"
v-hasPermi="['system:permit:edit']"
>作业证审批</el-button>
<el-button
v-if="scope.row.operator=='check'"
size="mini"
type="text"
icon="el-icon-edit"
@click="certificateCheck(scope.row)"
v-hasPermi="['system:permit:edit']"
>事前检查</el-button>
<el-button
v-if="scope.row.operator=='working'"
size="mini"
type="text"
icon="el-icon-edit"
@click="certificateWorking(scope.row)"
v-hasPermi="['system:permit:edit']"
>作业中</el-button>
<el-button
v-if="scope.row.operator=='close'"
size="mini"
type="text"
icon="el-icon-edit"
@click="closeCertificate(scope.row)"
v-hasPermi="['system:permit:edit']"
>关闭作业单</el-button>
<el-button
v-if="scope.row.applyStatus=='7'"
size="mini"
type="text"
icon="el-icon-edit"
@click="dangerousAppraise(scope.row)"
v-hasPermi="['system:permit:edit']"
>风险评价</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" :rules="rules" :visible.sync="open" width="880px" append-to-body>
<table>
<tr>
<td rowspan="4" colspan="2">作业许可申请人</td>
<td colspan="2">申请部门/单位</td>
<td colspan="2"><input v-model="certificateData.applyDept" class="editInput"/></td>
<td colspan="2">申请人及联系方式</td>
<td colspan="2"><input v-model="certificateData.linkManName" disabled class="editInput" style="width: 47%"/>|<input v-model="certificateData.linkPhone" class="editInput" style="width: 50%"/></td>
</tr>
<tr>
<td colspan="2">作业区域范围</td>
<td colspan="2"><input v-model="certificateData.workBound" class="editInput"/></td>
<td colspan="2">设备名称及编号</td>
<td colspan="2"><input v-model="certificateData.deviceName" class="editInput" style="width: 47%"/>|<input v-model="certificateData.deviceNum" class="editInput" style="width: 50%"/></td>
</tr>
<tr>
<td colspan="2">申请作业时间</td>
<td colspan="6">
<el-row>
<el-col :span="11">
<el-date-picker clearable size="small"
v-model="certificateData.applyWorkStartTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择开始时间"
style="width: 100%">
</el-date-picker>
</el-col>
<el-col :span="2" style="margin-top: 5px">
</el-col>
<el-col :span="11">
<el-date-picker clearable size="small"
v-model="certificateData.applyWorkEndTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择结束时间"
style="width: 100%">
</el-date-picker>
</el-col>
</el-row>
</td>
</tr>
<tr>
<td colspan="2">作业内容</td>
<td colspan="6"><input v-model="certificateData.workContent" class="editInput"/></td>
</tr>
<tr>
<td colspan="2">所有相关方讨论</td>
<td>工作安全分析</td>
<td style="writing-mode: vertical-rl;">危害识别</td>
<td colspan="6" style="text-align: left">
<div><input type="checkbox" v-model="mainDangerousMark.burn">灼伤(低温/高温/化学品灼伤,电弧烧伤,火灾,易燃气/液体,蒸汽,电焊、动火、射线等)</div>
<div><input type="checkbox" v-model="mainDangerousMark.electricShock">电击(触电,电压,不适当的接地,电气热作业,地下/暗线等)。</div>
<div><input type="checkbox" v-model="mainDangerousMark.objectStrike">物体打击(爆炸,压力,能量释放,移动/坠落的物体,不正确的存放,设备)</div>
<div><input type="checkbox" v-model="mainDangerousMark.stifle">窒息/中毒(惰性气体,有毒气体,易挥发的液体溶剂等)</div>
<div><input type="checkbox" v-model="mainDangerousMark.drop">坠落(高处作业,没有防护的开口,没有固定的梯子,脚手架搭设,无防护的平台等)</div>
<div><input type="checkbox" v-model="mainDangerousMark.vehicleInjury">车辆伤害(速度过快,疲劳驾驶,车辆故障,缺乏防御性驾驶,能见度差,不寻常的路状,分心等)</div>
<div><input type="checkbox" v-model="mainDangerousMark.other">其它危害。</div>
<div>注:如存在以上任一情况,请填写安全措施。</div>
</td>
</tr>
<tr>
<td rowspan="4" colspan="2">批准人填写</td>
<td rowspan="4" colspan="2">许可证</td>
<td colspan="6" style="text-align: left">是否需要进一步的JSA: <input type="checkbox" v-model="licenceInfo.jsa.yes"/><input type="checkbox" v-model="licenceInfo.jsa.no"/> JSA[<input class="editInput" v-model="licenceInfo.jsa.num" style="width: 250px" placeholder="填写JSA编号"/>]</td>
</tr>
<tr>
<td colspan="6" style="text-align: left"><input type="checkbox" v-model="licenceInfo.specialLicence"/>0无需特殊工作许可</td>
</tr>
<tr>
<td colspan="6" style="text-align: left">
<div><input type="checkbox" v-model="licenceInfo.lockListing.isChecked"/>1-1锁定挂牌记录表 [<input class="editInput" v-model="licenceInfo.lockListing.num" style="width: 250px" placeholder="填写编号"/>]</div>
<div><input type="checkbox" v-model="licenceInfo.blindPlate.isChecked"/>1-2盲板抽堵作业许可 [<input class="editInput" v-model="licenceInfo.blindPlate.num" style="width: 250px" placeholder="填写编号"/>]</div>
</td>
</tr>
<tr>
<td colspan="6" style="text-align: left;">
<div><input type="checkbox" v-model="licenceInfo.flareUp.isChecked"/>2动火作业许可证 [<input class="editInput" v-model="licenceInfo.flareUp.num" style="width: 250px" placeholder="填写编号"/>]</div>
<div><input type="checkbox" v-model="licenceInfo.heightWork.isChecked"/>3高处作业许可证 [<input class="editInput" v-model="licenceInfo.heightWork.num" style="width: 250px" placeholder="填写编号"/>]</div>
<div><input type="checkbox" v-model="licenceInfo.breakGround.isChecked"/>4动土作业许可证 [<input class="editInput" v-model="licenceInfo.breakGround.num" style="width: 250px" placeholder="填写编号"/>]</div>
<div><input type="checkbox" v-model="licenceInfo.hoisting.isChecked"/>5吊装作业许可证 [<input class="editInput" v-model="licenceInfo.hoisting.num" style="width: 250px" placeholder="填写编号"/>]</div>
<div><input type="checkbox" v-model="licenceInfo.limitSpace.isChecked"/>6受限空间作业许可证 [<input class="editInput" v-model="licenceInfo.limitSpace.num" style="width: 250px" placeholder="填写编号"/>]</div>
<div><input type="checkbox" v-model="licenceInfo.electricityUse.isChecked"/>7临时用电许可证 [<input class="editInput" v-model="licenceInfo.electricityUse.num" style="width: 250px" placeholder="填写编号"/>]</div>
<div><input type="checkbox" v-model="licenceInfo.ray.isChecked"/>8射线探伤许可证 [<input class="editInput" v-model="licenceInfo.ray.num" style="width: 250px" placeholder="填写编号"/>]</div>
</td>
</tr>
</table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="addCertificate"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 作业单申请 -->
<el-dialog title="作业单申请" :visible.sync="certificateApprovalApplyOpen" append-to-body :close-on-click-modal="false" @close="cancelCertificateApply">
<div class="tags_box">
<div v-for="item in tags" class="tags">
<div :class="{isActive:item.name==active}" @click="handelToogel(item.name)">{{item.name}}</div>
</div>
</div>
<div class="con_box">
<div v-for="item in tags" v-if="active == item.name">
<FlareUp v-if="item.mark == 'flareUp'"
:ref="item.mark"
:workPermitId = "item.workPermitId"
:licenceNum = "item.licenceNum"/>
</div>
</div>
<div style="text-align: right;margin-top: 10px">
<el-button type="primary" @click="submitCertificateApply">确定</el-button>
<el-button @click="cancelCertificateApply">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listPermit, getPermit, delPermit, addPermit, updatePermit, exportPermit } from "@/api/workPermit/permit";
import { getAllUserName } from "@/api/system/user";
import { listAll } from "@/api/contractor/contractorInfo";
import FlareUp from "@/components/NewSaftyWork/FlareUp";
export default {
name: "index",
components:{
FlareUp
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 作业许可证表格数据
permitList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
applyDept: null,
linkMan: null,
linkPhone: null,
workBound: null,
deviceName: null,
deviceNum: null,
applyWorkStartTime: null,
applyWorkEndTime: null,
workContent: null,
contractor: null,
ratifier: null,
mainDangerousMark: null,
dangerousMarkDetial: null,
licenceInfo: null,
relationSign: null,
produceComfirm: null,
workDeal: null,
applyStatus: null,
remarks: null
},
// 表单参数
form: {},
// 表单校验
rules: {
applyDept: [
{ required: true, message: "申请人不能为空", trigger: "blur" }
],
linkPhone: [
{ required: true, message: "联系电话不能为空", trigger: "blur" }
],
workBound: [
{ required: true, message: "工作范围不能为空", trigger: "blur" }
],
applyWorkStartTime: [
{ required: true, message: "开始时间不能为空", trigger: "blur" }
],
applyWorkEndTime: [
{ required: true, message: "结束时间不能为空", trigger: "blur" }
],
workContent: [
{ required: true, message: "工作内容不能为空", trigger: "blur" }
],
},
certificateStatus:[],
approvalList:[],
//承包商信息
allContractorInfo:[],
//新增作业许可单
certificateData : {},
mainDangerousMark :{
burn : false,
electricShock : false,
objectStrike : false,
stifle : false,
drop : false,
vehicleInjury : false,
other : false
},
licenceInfo : {
lockListing: {
num: "",
isChecked: false
},
blindPlate: {
num: "",
isChecked: false,
status: "0"
},
breakGround: {
num: "",
isChecked: false,
status: "0"
},
limitSpace: {
num: "",
isChecked: false,
status: "0"
},
jsa: {
no: false,
yes: false,
num: ""
},
specialLicence: false,
flareUp: {
num: "",
isChecked: false,
status: "0"
},
hoisting: {
num: "",
isChecked: false,
status: "0"
},
ray: {
num: "",
isChecked: false,
status: "0"
},
electricityUse: {
num: "",
isChecked: false,
status: "0"
},
heightWork: {
num: "",
isChecked: false,
status: "0"
}
},
tags:[],
active:"",
certificateApprovalApplyOpen : false
};
},
created() {
this.getList();
this.getAllContractorInfo();
this.getDicts("certificateStatus").then(response => {
this.certificateStatus = response.data;
});
this.getApproval();
},
methods: {
/** 查询作业许可证列表 */
getList() {
this.loading = true;
listPermit(this.queryParams).then(response => {
this.permitList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
workPermitId: null,
applyDept: null,
linkMan: null,
linkPhone: null,
workBound: null,
deviceName: null,
deviceNum: null,
applyWorkStartTime: null,
applyWorkEndTime: null,
workContent: null,
contractor: null,
ratifier: null,
mainDangerousMark: null,
dangerousMarkDetial: null,
licenceInfo: null,
relationSign: null,
produceComfirm: null,
workDeal: null,
applyStatus: "0",
createTime: null,
updateTime: null,
remarks: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.workPermitId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加作业许可证";
this.certificateData.linkManName = this.$store.state.user.name;
this.certificateData.linkMan = this.$store.state.user.userId;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const workPermitId = row.workPermitId || this.ids
getPermit(workPermitId).then(response => {
this.certificateData = response.data;
this.certificateData.linkManName = this.applyNameFormate(this.certificateData);
this.mainDangerousMark = JSON.parse(this.certificateData.mainDangerousMark);
this.licenceInfo = JSON.parse(this.certificateData.licenceInfo);
this.open = true;
this.title = "修改作业许可证";
});
},
/** 提交按钮 */
addCertificate() {
this.certificateData.mainDangerousMark = JSON.stringify(this.mainDangerousMark);
this.certificateData.licenceInfo = JSON.stringify(this.licenceInfo);
if(this.certificateData.workPermitId != null){
updatePermit(this.certificateData).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
}else{
addPermit(this.certificateData).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
},
/** 删除按钮操作 */
handleDelete(row) {
const workPermitIds = row.workPermitId || this.ids;
this.$confirm('是否确认删除作业许可证编号为"' + workPermitIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delPermit(workPermitIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有作业许可证数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportPermit(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
//获取审核人
getApproval(){
getAllUserName().then(res =>{
this.approvalList = res.data;
})
},
applyNameFormate(row){
var user = this.approvalList.find(item => item.userId == row.linkMan);
if(user && user.userName){
return user.userName;
}
return "";
},
applyStatusFormate(row){
var value = this.certificateStatus.find(item => item.dictValue == row.applyStatus);
if(value && value.dictLabel){
return value.dictLabel;
}
return "";
},
//获取所有承包商
getAllContractorInfo(){
listAll().then(res =>{
this.allContractorInfo = res.data;
})
},
//作业单申请
certificateApprovalApply(row){
this.certificateApprovalApplyOpen = true;
const workPermitId = row.workPermitId;
getPermit(workPermitId).then(res => {
let licence = JSON.parse(res.data.licenceInfo);
for(let key in licence){
if(licence[key].isChecked){
this.tags.push({workPermitId:workPermitId,licenceNum:licence[key].num,name:this.getTagName(key),mark:key})
}
}
this.active = this.tags[0].name;
})
},
//获取tag名称
getTagName(key){
switch(key){
case "blindPlate":
return "盲板抽堵作业许可";
case "flareUp":
return "动火作业许可证";
case "heightWork":
return "高处作业许可证";
case "breakGround":
return "动土作业许可证";
case "hoisting":
return "吊装作业许可证";
case "limitSpace":
return "受限空间作业许可证";
case "electricityUse":
return "临时用电许可证";
case "ray":
return "射线探伤许可证";
default:
return "";
}
},
//tag切换
handelToogel(item) {
this.active = item;
},
cancelCertificateApply(){
this.tags = [];
this.active = "";
this.certificateApprovalApplyOpen = false;
},
submitCertificateApply(){
let that = this;
let flag = true;
this.tags.forEach(item =>{
if(that.$refs[item.mark][0].addSpecialWorkPermit()){
flag = false;
}
});
//更新作业单状态
if(flag){
updatePermit({workPermitId:this.tags[0].workPermitId,applyStatus:"2"});
this.certificateApprovalApplyOpen = false;
}
}
}
}
</script>
<style scoped lang="scss">
table{
border-collapse: collapse;
table-layout: fixed;
text-align: center;
width: 100%;
}
table td, table th{
border: 1px solid;
height: 30px;
}
.editInput{
border: none;
width: 100%;
height: 100%;
text-align: center;
}
.editInput:focus{
outline: none;
}
.editLine{
border-bottom: 1px solid;
border-top: none;
border-left: none;
border-right: none;
text-align: center;
}
.editLine:focus{
outline: none;
}
textarea{
height: 100%;
width: 100%;
border: none;
resize:none;
}
textarea:focus{
outline: none;
}
.tags_box {
height: 10%;
display: flex;
.tags {
div {
padding: 10px 20px;
cursor: pointer;
border: #cccccc 1px solid;
#margin-right: 20px;
#border-radius: 5px;
}
.isActive {
background-color: #409EFF;
color: white;
}
}
}
.con_box {
height: 500px;;
border: #cccccc 1px solid;
padding: 10px;
overflow-y: scroll;
overflow-x: hidden;
&::-webkit-scrollbar {
width:5px;
}
&::-webkit-scrollbar-track {
-webkit-box-shadow:inset006pxrgba(0,0,0,0.3);
border-radius:10px;
}
&::-webkit-scrollbar-thumb {
border-radius:5px;
background:rgba(0,0,0,0.1);
-webkit-box-shadow:inset006pxrgba(0,0,0,0.5);
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment