Commit 5dddb493 authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of...

Merge branch 'master' of ssh://111.61.77.35:15/gengdidi/zhengyuan-danger-chemistry-manage into master
parents 5afdb133 254902d8
package com.zehong.web.controller.system;
import java.util.List;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.ServletUtils;
import com.zehong.framework.web.service.TokenService;
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.TNfcRecord;
import com.zehong.system.service.ITNfcRecordService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* nfc巡检记录idController
*
* @author zehong
* @date 2022-10-18
*/
@RestController
@RequestMapping("/system/record")
public class TNfcRecordController extends BaseController
{
@Autowired
private ITNfcRecordService tNfcRecordService;
@Autowired
private TokenService tokenService;
/**
* 查询nfc巡检记录id列表
*/
//@PreAuthorize("@ss.hasPermi('system:record:list')")
@GetMapping("/list")
public TableDataInfo list(TNfcRecord tNfcRecord)
{
startPage();
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
tNfcRecord.setCreateUser(user.getUserId());
List<TNfcRecord> list = tNfcRecordService.selectTNfcRecordList(tNfcRecord);
return getDataTable(list);
}
/**
* 导出nfc巡检记录id列表
*/
//@PreAuthorize("@ss.hasPermi('system:record:export')")
@Log(title = "nfc巡检记录id", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TNfcRecord tNfcRecord)
{
List<TNfcRecord> list = tNfcRecordService.selectTNfcRecordList(tNfcRecord);
ExcelUtil<TNfcRecord> util = new ExcelUtil<TNfcRecord>(TNfcRecord.class);
return util.exportExcel(list, "nfc巡检记录id数据");
}
/**
* 获取nfc巡检记录id详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:record:query')")
@GetMapping(value = "/{recordId}")
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
{
return AjaxResult.success(tNfcRecordService.selectTNfcRecordById(recordId));
}
/**
* 新增nfc巡检记录id
*/
//@PreAuthorize("@ss.hasPermi('system:record:add')")
@Log(title = "nfc巡检记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TNfcRecord tNfcRecord)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
tNfcRecord.setCreateUser(user.getUserId());
return toAjax(tNfcRecordService.insertTNfcRecord(tNfcRecord));
}
/**
* 修改nfc巡检记录id
*/
//@PreAuthorize("@ss.hasPermi('system:record:edit')")
@Log(title = "nfc巡检记录id", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TNfcRecord tNfcRecord)
{
return toAjax(tNfcRecordService.updateTNfcRecord(tNfcRecord));
}
/**
* 删除nfc巡检记录id
*/
//@PreAuthorize("@ss.hasPermi('system:record:remove')")
@Log(title = "nfc巡检记录id", businessType = BusinessType.DELETE)
@DeleteMapping("/{recordIds}")
public AjaxResult remove(@PathVariable Long[] recordIds)
{
return toAjax(tNfcRecordService.deleteTNfcRecordByIds(recordIds));
}
}
package com.zehong.web.controller.system;
import java.util.List;
import com.zehong.system.domain.TNfcRecord;
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.TNfcSetting;
import com.zehong.system.service.ITNfcSettingService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* settingController
*
* @author zehong
* @date 2022-10-17
*/
@RestController
@RequestMapping("/system/inspection")
public class TNfcSettingController extends BaseController
{
@Autowired
private ITNfcSettingService tNfcSettingService;
/**
* 查询巡检列表
*/
//@PreAuthorize("@ss.hasPermi('system:setting:list')")
@GetMapping("/list")
public TableDataInfo list(TNfcSetting tNfcSetting)
{
startPage();
List<TNfcSetting> list = tNfcSettingService.selectTNfcSettingList(tNfcSetting);
return getDataTable(list);
}
/**
* 巡检打卡查询列表
* @param tNfcSetting
* @return
*/
@GetMapping("/punchClockList")
public TableDataInfo punchClockList(TNfcSetting tNfcSetting){
startPage();
List<TNfcRecord> list = tNfcSettingService.punchClockList(tNfcSetting);
return getDataTable(list);
}
/**
* 导出巡检列表
*/
//@PreAuthorize("@ss.hasPermi('system:setting:export')")
@Log(title = "setting", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TNfcSetting tNfcSetting)
{
List<TNfcSetting> list = tNfcSettingService.selectTNfcSettingList(tNfcSetting);
ExcelUtil<TNfcSetting> util = new ExcelUtil<TNfcSetting>(TNfcSetting.class);
return util.exportExcel(list, "setting数据");
}
/**
* 获取巡检详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:setting:query')")
@GetMapping(value = "/{nfcId}")
public AjaxResult getInfo(@PathVariable("nfcId") Long nfcId)
{
return AjaxResult.success(tNfcSettingService.selectTNfcSettingById(nfcId));
}
/**
* 根据nfcNum获取巡检详细信息
*/
@GetMapping(value = "/selectByNfcNum")
public AjaxResult getInfoByNfcNum(String nfcNum)
{
return AjaxResult.success(tNfcSettingService.getInfoByNfcNum(nfcNum));
}
/**
* 新增巡检
*/
//@PreAuthorize("@ss.hasPermi('system:setting:add')")
@Log(title = "setting", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TNfcSetting tNfcSetting)
{
System.out.println(tNfcSetting);
return toAjax(tNfcSettingService.insertTNfcSetting(tNfcSetting));
}
/**
* 修改巡检
*/
//@PreAuthorize("@ss.hasPermi('system:setting:edit')")
@Log(title = "setting", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TNfcSetting tNfcSetting)
{
return toAjax(tNfcSettingService.updateTNfcSetting(tNfcSetting));
}
/**
* 删除巡检
*/
//@PreAuthorize("@ss.hasPermi('system:setting:remove')")
@Log(title = "setting", businessType = BusinessType.DELETE)
@DeleteMapping("/{nfcIds}")
public AjaxResult remove(@PathVariable Long[] nfcIds)
{
return toAjax(tNfcSettingService.deleteTNfcSettingByIds(nfcIds));
}
}
......@@ -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 com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import java.util.Date;
/**
* nfc巡检记录id对象 t_nfc_record
*
* @author zehong
* @date 2022-10-18
*/
public class TNfcRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 巡检记录
*/
private Long recordId;
/**
* nfc_id
*/
@Excel(name = "nfc_id")
private Long nfcId;
/**
* 是否正常 0否 1是
*/
@Excel(name = "是否正常 0否 1是")
private Integer isNormal;
/**
* 图片地址
*/
@Excel(name = "图片地址")
private String picture;
/**
* 备注
*/
@Excel(name = "备注")
private String remarks;
/**上报时间*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 上报人姓名
*/
@Excel(name = "上报人")
private Long createUser;
/**巡检地点*/
private String patrolAddress;
/**巡检内容*/
private String patrolComent;
/**巡检频次*/
private String patrolFrequency;
/** 巡检人*/
private String nickName;
private String userName;
private String startTime;
private String endTime;
/**巡检区域*/
private String dictLabel;
public String getDictLabel() {
return dictLabel;
}
public void setDictLabel(String dictLabel) {
this.dictLabel = dictLabel;
}
@Override
public Date getCreateTime() {
return createTime;
}
@Override
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getPatrolAddress() {
return patrolAddress;
}
public void setPatrolAddress(String patrolAddress) {
this.patrolAddress = patrolAddress;
}
public String getPatrolComent() {
return patrolComent;
}
public void setPatrolComent(String patrolComent) {
this.patrolComent = patrolComent;
}
public String getPatrolFrequency() {
return patrolFrequency;
}
public void setPatrolFrequency(String patrolFrequency) {
this.patrolFrequency = patrolFrequency;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Long getRecordId() {
return recordId;
}
public void setRecordId(Long recordId) {
this.recordId = recordId;
}
public Long getNfcId() {
return nfcId;
}
public void setNfcId(Long nfcId) {
this.nfcId = nfcId;
}
public Integer getIsNormal() {
return isNormal;
}
public void setIsNormal(Integer isNormal) {
this.isNormal = isNormal;
}
public String getPicture() {
return picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public Long getCreateUser() {
return createUser;
}
public void setCreateUser(Long createUser) {
this.createUser = createUser;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
@Override
public String toString() {
return "TNfcRecord{" +
"recordId=" + recordId +
", nfcId=" + nfcId +
", isNormal=" + isNormal +
", picture='" + picture + '\'' +
", remarks='" + remarks + '\'' +
", createTime=" + createTime +
", createUser=" + createUser +
", patrolAddress='" + patrolAddress + '\'' +
", patrolComent='" + patrolComent + '\'' +
", patrolFrequency='" + patrolFrequency + '\'' +
", nickName='" + nickName + '\'' +
", userName='" + userName + '\'' +
", startTime='" + startTime + '\'' +
", endTime='" + endTime + '\'' +
", dictLabel='" + dictLabel + '\'' +
'}';
}
}
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;
/**
* setting对象 t_nfc_setting
*
* @author zehong
* @date 2022-10-17
*/
public class TNfcSetting extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** nfc_id */
private Long nfcId;
/** 排序 */
@Excel(name = "排序")
private Integer patrolSort;
/** 巡检地点 */
@Excel(name = "巡检地点")
private String patrolAddress;
/** 巡检内容 */
@Excel(name = "巡检内容")
private String patrolComent;
/** 巡检频次 */
@Excel(name = "巡检频次")
private String patrolFrequency;
/** nfc编号 */
@Excel(name = "nfc编号")
private String nfcNum;
/** 是否删除 0否 1是 */
private Integer isDel;
/**
* 区域 编号
*/
private String region;
/**
* 巡检区域
*/
private String nickName;
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public void setNfcId(Long nfcId)
{
this.nfcId = nfcId;
}
public Long getNfcId()
{
return nfcId;
}
public void setPatrolSort(Integer patrolSort)
{
this.patrolSort = patrolSort;
}
public Integer getPatrolSort()
{
return patrolSort;
}
public void setPatrolAddress(String patrolAddress)
{
this.patrolAddress = patrolAddress;
}
public String getPatrolAddress()
{
return patrolAddress;
}
public void setPatrolComent(String patrolComent)
{
this.patrolComent = patrolComent;
}
public String getPatrolComent()
{
return patrolComent;
}
public void setPatrolFrequency(String patrolFrequency)
{
this.patrolFrequency = patrolFrequency;
}
public String getPatrolFrequency()
{
return patrolFrequency;
}
public void setNfcNum(String nfcNum)
{
this.nfcNum = nfcNum;
}
public String getNfcNum()
{
return nfcNum;
}
public void setIsDel(Integer isDel)
{
this.isDel = isDel;
}
public Integer getIsDel()
{
return isDel;
}
@Override
public String toString() {
return "TNfcSetting{" +
"nfcId=" + nfcId +
", patrolSort=" + patrolSort +
", patrolAddress='" + patrolAddress + '\'' +
", patrolComent='" + patrolComent + '\'' +
", patrolFrequency='" + patrolFrequency + '\'' +
", nfcNum='" + nfcNum + '\'' +
", isDel=" + isDel +
", region='" + region + '\'' +
", nickName='" + nickName + '\'' +
'}';
}
}
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.TNfcRecord;
/**
* nfc巡检记录idMapper接口
*
* @author zehong
* @date 2022-10-18
*/
public interface TNfcRecordMapper
{
/**
* 查询nfc巡检记录id
*
* @param recordId nfc巡检记录idID
* @return nfc巡检记录id
*/
public TNfcRecord selectTNfcRecordById(Long recordId);
/**
* 查询nfc巡检记录id列表
*
* @param tNfcRecord nfc巡检记录id
* @return nfc巡检记录id集合
*/
public List<TNfcRecord> selectTNfcRecordList(TNfcRecord tNfcRecord);
/**
* 新增nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
public int insertTNfcRecord(TNfcRecord tNfcRecord);
/**
* 修改nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
public int updateTNfcRecord(TNfcRecord tNfcRecord);
/**
* 删除nfc巡检记录id
*
* @param recordId nfc巡检记录idID
* @return 结果
*/
public int deleteTNfcRecordById(Long recordId);
/**
* 批量删除nfc巡检记录id
*
* @param recordIds 需要删除的数据ID
* @return 结果
*/
public int deleteTNfcRecordByIds(Long[] recordIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TNfcRecord;
import com.zehong.system.domain.TNfcSetting;
/**
* settingMapper接口
*
* @author zehong
* @date 2022-10-17
*/
public interface TNfcSettingMapper
{
/**
* 查询setting
*
* @param nfcId settingID
* @return setting
*/
public TNfcSetting selectTNfcSettingById(Long nfcId);
/**
* 根据nfcNum查询详情
* @param nfcNum
*/
public TNfcSetting getInfoByNfcNum(String nfcNum);
/**
* 查询setting列表
*
* @param tNfcSetting setting
* @return setting集合
*/
public List<TNfcSetting> selectTNfcSettingList(TNfcSetting tNfcSetting);
/**
* 新增setting
*
* @param tNfcSetting setting
* @return 结果
*/
public int insertTNfcSetting(TNfcSetting tNfcSetting);
/**
* 修改setting
*
* @param tNfcSetting setting
* @return 结果
*/
public int updateTNfcSetting(TNfcSetting tNfcSetting);
/**
* 删除setting
*
* @param nfcId settingID
* @return 结果
*/
public int deleteTNfcSettingById(Long nfcId);
/**
* 批量删除setting
*
* @param nfcIds 需要删除的数据ID
* @return 结果
*/
public int deleteTNfcSettingByIds(Long[] nfcIds);
/**
* 巡检打卡查询列表
* @param tNfcSetting
* @return
*/
List<TNfcRecord> punchClockList(TNfcSetting tNfcSetting);
/**
* 查询nfc编号是否已经注册
* @param nfcNum
* @return
*/
int getNfcNum(String nfcNum);
}
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.TNfcRecord;
/**
* nfc巡检记录idService接口
*
* @author zehong
* @date 2022-10-18
*/
public interface ITNfcRecordService
{
/**
* 查询nfc巡检记录id
*
* @param recordId nfc巡检记录idID
* @return nfc巡检记录id
*/
public TNfcRecord selectTNfcRecordById(Long recordId);
/**
* 查询nfc巡检记录id列表
*
* @param tNfcRecord nfc巡检记录id
* @return nfc巡检记录id集合
*/
public List<TNfcRecord> selectTNfcRecordList(TNfcRecord tNfcRecord);
/**
* 新增nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
public int insertTNfcRecord(TNfcRecord tNfcRecord);
/**
* 修改nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
public int updateTNfcRecord(TNfcRecord tNfcRecord);
/**
* 批量删除nfc巡检记录id
*
* @param recordIds 需要删除的nfc巡检记录idID
* @return 结果
*/
public int deleteTNfcRecordByIds(Long[] recordIds);
/**
* 删除nfc巡检记录id信息
*
* @param recordId nfc巡检记录idID
* @return 结果
*/
public int deleteTNfcRecordById(Long recordId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TNfcRecord;
import com.zehong.system.domain.TNfcSetting;
/**
* settingService接口
*
* @author zehong
* @date 2022-10-17
*/
public interface ITNfcSettingService
{
/**
* 查询setting
*
* @param nfcId settingID
* @return setting
*/
public TNfcSetting selectTNfcSettingById(Long nfcId);
/**
* 根据nfc获取详情
* @param nfcNum
* @return
*/
public TNfcSetting getInfoByNfcNum(String nfcNum);
/**
* 查询setting列表
*
* @param tNfcSetting setting
* @return setting集合
*/
public List<TNfcSetting> selectTNfcSettingList(TNfcSetting tNfcSetting);
/**
* 新增setting
*
* @param tNfcSetting setting
* @return 结果
*/
public int insertTNfcSetting(TNfcSetting tNfcSetting);
/**
* 修改setting
*
* @param tNfcSetting setting
* @return 结果
*/
public int updateTNfcSetting(TNfcSetting tNfcSetting);
/**
* 批量删除setting
*
* @param nfcIds 需要删除的settingID
* @return 结果
*/
public int deleteTNfcSettingByIds(Long[] nfcIds);
/**
* 删除setting信息
*
* @param nfcId settingID
* @return 结果
*/
public int deleteTNfcSettingById(Long nfcId);
/**
* 巡检打卡查询列表
* @param tNfcSetting
* @return
*/
List<TNfcRecord> punchClockList(TNfcSetting tNfcSetting);
}
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.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TNfcRecordMapper;
import com.zehong.system.domain.TNfcRecord;
import com.zehong.system.service.ITNfcRecordService;
/**
* nfc巡检记录idService业务层处理
*
* @author zehong
* @date 2022-10-18
*/
@Service
public class TNfcRecordServiceImpl implements ITNfcRecordService
{
@Autowired
private TNfcRecordMapper tNfcRecordMapper;
/**
* 查询nfc巡检记录id
*
* @param recordId nfc巡检记录idID
* @return nfc巡检记录id
*/
@Override
public TNfcRecord selectTNfcRecordById(Long recordId)
{
return tNfcRecordMapper.selectTNfcRecordById(recordId);
}
/**
* 查询nfc巡检记录id列表
*
* @param tNfcRecord nfc巡检记录id
* @return nfc巡检记录id
*/
@Override
public List<TNfcRecord> selectTNfcRecordList(TNfcRecord tNfcRecord)
{
return tNfcRecordMapper.selectTNfcRecordList(tNfcRecord);
}
/**
* 新增nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
@Override
public int insertTNfcRecord(TNfcRecord tNfcRecord)
{
tNfcRecord.setCreateTime(DateUtils.getNowDate());
return tNfcRecordMapper.insertTNfcRecord(tNfcRecord);
}
/**
* 修改nfc巡检记录id
*
* @param tNfcRecord nfc巡检记录id
* @return 结果
*/
@Override
public int updateTNfcRecord(TNfcRecord tNfcRecord)
{
return tNfcRecordMapper.updateTNfcRecord(tNfcRecord);
}
/**
* 批量删除nfc巡检记录id
*
* @param recordIds 需要删除的nfc巡检记录idID
* @return 结果
*/
@Override
public int deleteTNfcRecordByIds(Long[] recordIds)
{
return tNfcRecordMapper.deleteTNfcRecordByIds(recordIds);
}
/**
* 删除nfc巡检记录id信息
*
* @param recordId nfc巡检记录idID
* @return 结果
*/
@Override
public int deleteTNfcRecordById(Long recordId)
{
return tNfcRecordMapper.deleteTNfcRecordById(recordId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TNfcRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TNfcSettingMapper;
import com.zehong.system.domain.TNfcSetting;
import com.zehong.system.service.ITNfcSettingService;
import org.springframework.transaction.annotation.Transactional;
/**
* settingService业务层处理
*
* @author zehong
* @date 2022-10-17
*/
@Service
public class TNfcSettingServiceImpl implements ITNfcSettingService
{
@Autowired
private TNfcSettingMapper tNfcSettingMapper;
/**
* 查询setting
*
* @param nfcId settingID
* @return setting
*/
@Override
public TNfcSetting selectTNfcSettingById(Long nfcId)
{
return tNfcSettingMapper.selectTNfcSettingById(nfcId);
}
/**
* 根据nfc查询
* @param nfcNum
* @return
*/
@Override
public TNfcSetting getInfoByNfcNum(String nfcNum)
{
return tNfcSettingMapper.getInfoByNfcNum(nfcNum);
}
/**
* 查询setting列表
*
* @param tNfcSetting setting
* @return setting
*/
@Override
public List<TNfcSetting> selectTNfcSettingList(TNfcSetting tNfcSetting)
{
return tNfcSettingMapper.selectTNfcSettingList(tNfcSetting);
}
/**
* 新增setting
*
* @param tNfcSetting setting
* @return 结果
*/
@Override
public int insertTNfcSetting(TNfcSetting tNfcSetting)
{
tNfcSetting.setCreateTime(DateUtils.getNowDate());
return tNfcSettingMapper.insertTNfcSetting(tNfcSetting);
}
/**
* 修改setting
*
* @param tNfcSetting setting
* @return 结果
*/
@Override
@Transactional
public int updateTNfcSetting(TNfcSetting tNfcSetting)
{
if (tNfcSetting.getNfcNum()==null||tNfcSetting.getNfcNum().equals("")){
int a = tNfcSettingMapper.updateTNfcSetting(tNfcSetting);
return a;
}
TNfcSetting ts = tNfcSettingMapper.getInfoByNfcNum(tNfcSetting.getNfcNum());
int nfcNum = tNfcSettingMapper.getNfcNum(tNfcSetting.getNfcNum());
if (nfcNum!=0){
ts.setNfcNum("");
tNfcSettingMapper.updateTNfcSetting(ts);
}
int a = tNfcSettingMapper.updateTNfcSetting(tNfcSetting);
return a;
}
/**
* 批量删除setting
*
* @param nfcIds 需要删除的settingID
* @return 结果
*/
@Override
public int deleteTNfcSettingByIds(Long[] nfcIds)
{
return tNfcSettingMapper.deleteTNfcSettingByIds(nfcIds);
}
/**
* 删除setting信息
*
* @param nfcId settingID
* @return 结果
*/
@Override
public int deleteTNfcSettingById(Long nfcId)
{
return tNfcSettingMapper.deleteTNfcSettingById(nfcId);
}
/**
* 巡检打卡查询列表
* @param tNfcSetting
* @return
*/
@Override
public List<TNfcRecord> punchClockList(TNfcSetting tNfcSetting) {
return tNfcSettingMapper.punchClockList(tNfcSetting);
}
}
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.TNfcRecordMapper">
<resultMap type="TNfcRecord" id="TNfcRecordResult">
<result property="recordId" column="record_id" />
<result property="nfcId" column="nfc_id" />
<result property="isNormal" column="is_normal" />
<result property="picture" column="picture" />
<result property="remarks" column="remarks" />
<result property="createTime" column="create_time" />
<result property="createUser" column="create_user" />
<result property="userName" column="userName" />
<result property="patrolAddress" column="patrol_address" />
<result property="patrolComent" column="patrol_coment" />
<result property="patrolFrequency" column="patrol_frequency" />
</resultMap>
<sql id="selectTNfcRecordVo">
select record_id, nfc_id, is_normal, picture, remarks, create_time, create_user from t_nfc_record
</sql>
<select id="selectTNfcRecordList" parameterType="TNfcRecord" resultMap="TNfcRecordResult">
SELECT nr.record_id, nr.nfc_id, nr.is_normal, nr.picture, nr.remarks, nr.create_time, nr.create_user,
u.`user_name` AS userName,
ns.`patrol_address` ,ns.`patrol_coment`,ns.`patrol_frequency`
FROM t_nfc_record nr LEFT JOIN t_nfc_setting ns ON ns.`nfc_id` = nr.`nfc_id`
LEFT JOIN sys_user u ON u.user_id = nr.create_user
<where>
<if test="nfcId != null "> and nr.nfc_id = #{nfcId}</if>
<if test="isNormal != null "> and nr.is_normal = #{isNormal}</if>
<if test="picture != null and picture != ''"> and nr.picture = #{picture}</if>
<if test="remarks != null and remarks != ''"> and nr.remarks = #{remarks}</if>
<if test="createUser != null and createUser != ''"> and nr.create_user = #{createUser}</if>
<if test="startTime != null and startTime != ''"> and nr.create_time &gt; #{startTime}</if>
<if test="endTime != null and endTime != ''"> and nr.create_time &lt; #{endTime}</if>
</where>
order By nr.create_time desc
</select>
<select id="selectTNfcRecordById" parameterType="Long" resultMap="TNfcRecordResult">
<include refid="selectTNfcRecordVo"/>
where record_id = #{recordId}
</select>
<insert id="insertTNfcRecord" parameterType="TNfcRecord" useGeneratedKeys="true" keyProperty="recordId">
insert into t_nfc_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="nfcId != null">nfc_id,</if>
<if test="isNormal != null">is_normal,</if>
<if test="picture != null">picture,</if>
<if test="remarks != null">remarks,</if>
<if test="createTime != null">create_time,</if>
<if test="createUser != null">create_user,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nfcId != null">#{nfcId},</if>
<if test="isNormal != null">#{isNormal},</if>
<if test="picture != null">#{picture},</if>
<if test="remarks != null">#{remarks},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createUser != null">#{createUser},</if>
</trim>
</insert>
<update id="updateTNfcRecord" parameterType="TNfcRecord">
update t_nfc_record
<trim prefix="SET" suffixOverrides=",">
<if test="nfcId != null">nfc_id = #{nfcId},</if>
<if test="isNormal != null">is_normal = #{isNormal},</if>
<if test="picture != null">picture = #{picture},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createUser != null">create_user = #{createUser},</if>
</trim>
where record_id = #{recordId}
</update>
<delete id="deleteTNfcRecordById" parameterType="Long">
delete from t_nfc_record where record_id = #{recordId}
</delete>
<delete id="deleteTNfcRecordByIds" parameterType="String">
delete from t_nfc_record where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TNfcSettingMapper">
<resultMap type="TNfcSetting" id="TNfcSettingResult">
<result property="nfcId" column="nfc_id" />
<result property="patrolSort" column="patrol_sort" />
<result property="patrolAddress" column="patrol_address" />
<result property="patrolComent" column="patrol_coment" />
<result property="patrolFrequency" column="patrol_frequency" />
<result property="nfcNum" column="nfc_num" />
<result property="createTime" column="create_time" />
<result property="isDel" column="is_del" />
<result property="region" column="region" />
</resultMap>
<sql id="selectTNfcSettingVo">
select nfc_id, patrol_sort, patrol_address, patrol_coment, patrol_frequency, nfc_num, create_time,region, is_del from t_nfc_setting
</sql>
<select id="selectTNfcSettingList" parameterType="TNfcSetting" resultMap="TNfcSettingResult">
select a.*,b.dict_label as nickName from t_nfc_setting a
left join sys_dict_data b on a.region=b.dict_value
<where>
a.is_del='0' and b.dict_type='t_nfc_region'
<if test="region != null and region != ''"> and region = #{region}</if>
<if test="patrolAddress != null and patrolAddress != ''"> and patrol_address = #{patrolAddress}</if>
<if test="nfcNum != null and nfcNum != ''"> and nfc_num = #{nfcNum}</if>
</where>
order by patrol_sort
</select>
<select id="selectTNfcSettingById" parameterType="Long" resultMap="TNfcSettingResult">
<include refid="selectTNfcSettingVo"/>
where nfc_id = #{nfcId}
</select>
<select id="getInfoByNfcNum" parameterType="java.lang.String" resultMap="TNfcSettingResult">
<include refid="selectTNfcSettingVo"/>
where nfc_num = #{nfcNum}
</select>
<insert id="insertTNfcSetting" parameterType="TNfcSetting" useGeneratedKeys="true" keyProperty="nfcId">
insert into t_nfc_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patrolSort != null">patrol_sort,</if>
<if test="patrolAddress != null">patrol_address,</if>
<if test="patrolComent != null">patrol_coment,</if>
<if test="patrolFrequency != null">patrol_frequency,</if>
<if test="nfcNum != null">nfc_num,</if>
<if test="createTime != null">create_time,</if>
<if test="isDel != null">is_del,</if>
<if test="region != null">region,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patrolSort != null">#{patrolSort},</if>
<if test="patrolAddress != null">#{patrolAddress},</if>
<if test="patrolComent != null">#{patrolComent},</if>
<if test="patrolFrequency != null">#{patrolFrequency},</if>
<if test="nfcNum != null">#{nfcNum},</if>
<if test="createTime != null">#{createTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="region != null">#{region},</if>
</trim>
</insert>
<update id="updateTNfcSetting" parameterType="TNfcSetting">
update t_nfc_setting
<trim prefix="SET" suffixOverrides=",">
<if test="patrolSort != null">patrol_sort = #{patrolSort},</if>
<if test="patrolAddress != null">patrol_address = #{patrolAddress},</if>
<if test="patrolComent != null">patrol_coment = #{patrolComent},</if>
<if test="patrolFrequency != null">patrol_frequency = #{patrolFrequency},</if>
<if test="nfcNum != null">nfc_num = #{nfcNum},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim>
where nfc_id = #{nfcId}
</update>
<delete id="deleteTNfcSettingById" parameterType="Long">
delete from t_nfc_setting where nfc_id = #{nfcId}
</delete>
<update id="deleteTNfcSettingByIds" parameterType="String">
update t_nfc_setting set is_del='1' where nfc_id in
<foreach item="nfcId" collection="array" open="(" separator="," close=")">
#{nfcId}
</foreach>
</update>
<!--巡检打卡查询列表-->
<select id="punchClockList" resultType="com.zehong.system.domain.TNfcRecord">
select a.is_normal as isNormal,a.remarks as remarks ,a.create_time as createTime,
b.patrol_address as patrolAddress,b.patrol_coment as patrolComent,b.patrol_frequency as patrolFrequency,
c.nick_name as nickName,
d.dict_label as dictLabel
from t_nfc_record a left join t_nfc_setting b on a.nfc_id=b.nfc_id
left join sys_user c on a.create_user=c.user_id
left join sys_dict_data d on b.region=d.dict_value
<where>
b.is_del='0' and d.dict_type='t_nfc_region'
<if test="patrolAddress != null and patrolName != ''">
and b.patrol_address like concat('%', #{patrolAddress}, '%')
</if>
<if test="region != null and region != ''">
and b.region=#{region}
</if>
</where>
group by a.create_time desc
</select>
<!--查询nfc编号是否已经注册-->
<select id="getNfcNum" resultType="java.lang.Integer">
select count(nfc_id) from t_nfc_setting where nfc_num=#{nfcNum}
</select>
</mapper>
<?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'
// 查询setting列表
export function listSetting(query) {
return request({
url: '/system/inspection/punchClockList',
method: 'get',
params: query
})
}
// 查询setting详细
export function getSetting(nfcId) {
return request({
url: '/system/inspection/' + nfcId,
method: 'get'
})
}
// 新增setting
export function addSetting(data) {
return request({
url: '/system/inspection',
method: 'post',
data: data
})
}
// 修改setting
export function updateSetting(data) {
return request({
url: '/system/inspection',
method: 'put',
data: data
})
}
// 删除setting
export function delSetting(nfcId) {
return request({
url: '/system/inspection/' + nfcId,
method: 'delete'
})
}
// 导出setting
export function exportSetting(query) {
return request({
url: '/system/inspection/export',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询setting列表
export function listSetting(query) {
return request({
url: '/system/inspection/list',
method: 'get',
params: query
})
}
// 查询setting详细
export function getSetting(nfcId) {
return request({
url: '/system/inspection/' + nfcId,
method: 'get'
})
}
// 新增setting
export function addSetting(data) {
return request({
url: '/system/inspection',
method: 'post',
data: data
})
}
// 修改setting
export function updateSetting(data) {
return request({
url: '/system/inspection',
method: 'put',
data: data
})
}
// 删除setting
export function delSetting(nfcId) {
return request({
url: '/system/inspection/' + nfcId,
method: 'delete'
})
}
// 导出setting
export function exportSetting(query) {
return request({
url: '/system/inspection/export',
method: 'get',
params: query
})
}
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>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="巡检地点" prop="patrolAddress">
<el-input
v-model="queryParams.patrolAddress"
placeholder="请输入巡检地点"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="巡检区域" prop="workType">
<el-select v-model="queryParams.region" placeholder="请选择区域" clearable size="small">
<el-option
v-for="dict in workTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</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:setting: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="['system:setting: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="['system:setting:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- :loading="exportLoading"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['system:setting:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<el-table v-loading="loading" :data="settingList" @selection-change="handleSelectionChange">
<el-table-column width="250" label="巡检地点" align="center" prop="patrolAddress" />
<el-table-column width="200" label="巡检区域" align="center" prop="dictLabel" />
<el-table-column width="600" label="巡检内容" align="center" prop="patrolComent" >
<span slot-scope="scope" v-if="scope.row.patrolComent">{{scope.row.patrolComent}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="巡检频次" align="center" prop="patrolFrequency" >
<span slot-scope="scope" v-if="scope.row.patrolFrequency">{{scope.row.patrolFrequency}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column width="120" label="上报人" align="center" prop="nickName" />
<el-table-column width="100" label="巡检结果" align="center" prop="isNormal">
<span slot-scope="scope" style="color: red" v-if="scope.row.isNormal==0">异常</span>
<span slot-scope="scope" v-else-if="scope.row.isNormal==1">正常</span>
</el-table-column>
<el-table-column label="上报时间" align="center" prop="createTime" width="150"/>
<!-- <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="['system:setting:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:setting: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"
/>
<!-- 添加或修改setting对话框 -->
<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="patrolSort">
<el-input v-model="form.patrolSort" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="巡检地点" prop="patrolAddress">
<el-input v-model="form.patrolAddress" placeholder="请输入巡检地点" />
</el-form-item>
<el-form-item label="巡检频次" prop="patrolFrequency">
<el-input v-model="form.patrolFrequency" placeholder="请输入巡检频次" />
</el-form-item>
<el-form-item label="nfc编号" prop="nfcNum">
<el-input v-model="form.nfcNum" placeholder="请输入nfc编号" />
</el-form-item>
<el-form-item label="巡检内容" prop="patrolComent">
<el-input v-model="form.patrolComent" type="textarea" 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 { listSetting, getSetting, delSetting, addSetting, updateSetting, exportSetting } from "@/api/system/statistics.js";
export default {
name: "Setting",
components: {
},
data() {
return {
region:null,
activeName: '0',
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// setting表格数据
settingList: [],
//查询下拉框数据
workTypeOptions: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
patrolAddress: null,
nfcNum: null,
region:null,
},
// 表单参数
form: {},
// 表单校验
rules: {
patrolAddress: [
{ required: true, message: "巡检地点不能为空", trigger: "blur" }
],
patrolSort: [
{ required: true, message: "排序不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
this.getDicts("t_nfc_region").then(response => {
this.workTypeOptions = response.data;
});
},
methods: {
/** 查询setting列表 */
getList() {
this.loading = true;
listSetting(this.queryParams).then(response => {
this.settingList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
nfcId: null,
patrolSort: null,
patrolAddress: null,
patrolComent: null,
patrolFrequency: null,
nfcNum: null,
createTime: null,
isDel: null,
region: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.nfcId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "化工车间巡检";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const nfcId = row.nfcId || this.ids
getSetting(nfcId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改化工车间巡检信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.nfcId != null) {
updateSetting(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
this.form.region= this.queryParams.region;
addSetting(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const nfcIds = row.nfcId || this.ids;
const patrolAddress = row.patrolAddress;
this.$confirm('是否确认删除巡检地点为"' + patrolAddress + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delSetting(nfcIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有巡检数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportSetting(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="巡检地点" prop="patrolAddress">
<el-input
v-model="queryParams.patrolAddress"
placeholder="请输入巡检地点"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="nfc编号" prop="nfcNum">
<el-input
v-model="queryParams.nfcNum"
placeholder="请输入nfc编号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="巡检区域" >
<el-select v-model="queryParams.region" placeholder="请选择区域" clearable size="small">
<el-option
v-for="dict in workTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</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:setting: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="['system:setting: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="['system:setting:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['system:setting:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="settingList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="排序" width="60" align="center" prop="patrolSort" />
<el-table-column label="巡检区域" width="150" align="center" prop="nickName" />
<el-table-column label="巡检地点" width="200" align="center" prop="patrolAddress" />
<el-table-column label="巡检内容" width="750" align="center" prop="patrolComent" >
<span slot-scope="scope" v-if="scope.row.patrolComent">{{scope.row.patrolComent}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="巡检频次" width="150" align="center" prop="patrolFrequency" >
<span slot-scope="scope" v-if="scope.row.patrolFrequency">{{scope.row.patrolFrequency}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="nfc编号" align="center" prop="nfcNum" >
<span slot-scope="scope" v-if="scope.row.nfcNum">{{scope.row.nfcNum}}</span>
<span v-else>-</span>
</el-table-column>>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:setting:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:setting: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"
/>
<!-- 添加或修改setting对话框 -->
<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="patrolSort">
<el-input v-model="form.patrolSort" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="巡检区域" prop="region">
<el-select v-model="form.region" style="width: 100%" placeholder="请选择区域" clearable size="small">
<el-option
v-for="dict in workTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="巡检地点" prop="patrolAddress">
<el-input v-model="form.patrolAddress" placeholder="请输入巡检地点" />
</el-form-item>
<el-form-item label="巡检频次" prop="patrolFrequency">
<el-input v-model="form.patrolFrequency" placeholder="请输入巡检频次" />
</el-form-item>
<el-form-item label="nfc编号" prop="nfcNum">
<el-input v-model="form.nfcNum" placeholder="请输入nfc编号" />
</el-form-item>
<el-form-item label="巡检内容" prop="patrolComent" >
<el-input v-model="form.patrolComent" type="textarea" placeholder="请输入内容" height="100px"/>
</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 { listSetting, getSetting, delSetting, addSetting, updateSetting, exportSetting } from "@/api/system/tnfcSetting";
export default {
name: "Setting",
components: {
},
data() {
return {
//查询下拉框数据
workTypeOptions: [],
activeName: '0',
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// setting表格数据
settingList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
patrolAddress: null,
nfcNum: null,
region:null,
},
// 表单参数
form: {},
// 表单校验
rules: {
patrolAddress: [
{ required: true, message: "巡检地点不能为空", trigger: "blur" }
],
patrolSort: [
{ required: true, message: "排序不能为空", trigger: "blur" }
],
region:[
{ required: true, message: "请选择巡检区域", trigger: "blur" }
],
}
};
},
created() {
this.getList();
this.getDicts("t_nfc_region").then(response => {
this.workTypeOptions = response.data;
});
},
methods: {
/** 查询setting列表 */
getList() {
this.loading = true;
listSetting(this.queryParams).then(response => {
this.settingList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
nfcId: null,
patrolSort: null,
patrolAddress: null,
patrolComent: null,
patrolFrequency: null,
nfcNum: null,
createTime: null,
isDel: null,
region: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.nfcId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "化工车间巡检";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const nfcId = row.nfcId || this.ids
getSetting(nfcId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改化工车间巡检信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.nfcId != null) {
updateSetting(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addSetting(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const nfcIds = row.nfcId || this.ids;
const patrolAddress = row.patrolAddress;
this.$confirm('是否确认删除巡检地点为"' + patrolAddress + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delSetting(nfcIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有巡检数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportSetting(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
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