Commit 22a31111 authored by zhangjianqian's avatar zhangjianqian

添加督办,修改检查隐患,关联隐患和督办

parent ea0f20e1
package com.zehong.web.controller.supervision;
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.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TWorkSupervision;
import com.zehong.system.service.ITWorkSupervisionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 工作督导Controller
*
* @author zehong
* @date 2025-08-15
*/
@RestController
@RequestMapping("/system/supervision")
public class TWorkSupervisionController extends BaseController
{
@Autowired
private ITWorkSupervisionService tWorkSupervisionService;
/**
* 查询工作督导列表
*/
@GetMapping("/list")
public TableDataInfo list(TWorkSupervision tWorkSupervision)
{
startPage();
List<TWorkSupervision> list = tWorkSupervisionService.selectTWorkSupervisionList(tWorkSupervision);
return getDataTable(list);
}
/**
* 导出工作督导列表
*/
@Log(title = "工作督导", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TWorkSupervision tWorkSupervision)
{
List<TWorkSupervision> list = tWorkSupervisionService.selectTWorkSupervisionList(tWorkSupervision);
ExcelUtil<TWorkSupervision> util = new ExcelUtil<TWorkSupervision>(TWorkSupervision.class);
return util.exportExcel(list, "工作督导数据");
}
/**
* 获取工作督导详细信息
*/
@GetMapping(value = "/{supervisionId}")
public AjaxResult getInfo(@PathVariable("supervisionId") Long supervisionId)
{
return AjaxResult.success(tWorkSupervisionService.selectTWorkSupervisionById(supervisionId));
}
/**
* 新增工作督导
*/
@Log(title = "工作督导", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TWorkSupervision tWorkSupervision)
{
return toAjax(tWorkSupervisionService.insertTWorkSupervision(tWorkSupervision));
}
/**
* 修改工作督导
*/
@Log(title = "工作督导", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TWorkSupervision tWorkSupervision)
{
return toAjax(tWorkSupervisionService.updateTWorkSupervision(tWorkSupervision));
}
/**
* 删除工作督导
*/
@Log(title = "工作督导", businessType = BusinessType.DELETE)
@DeleteMapping("/{supervisionIds}")
public AjaxResult remove(@PathVariable Long[] supervisionIds)
{
return toAjax(tWorkSupervisionService.deleteTWorkSupervisionByIds(supervisionIds));
}
}
package com.zehong.web.controller.supervision;
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.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TWorkSupervisionFeedback;
import com.zehong.system.service.ITWorkSupervisionFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 工作督导反馈Controller
*
* @author zehong
* @date 2025-08-15
*/
@RestController
@RequestMapping("/system/feedback")
public class TWorkSupervisionFeedbackController extends BaseController
{
@Autowired
private ITWorkSupervisionFeedbackService tWorkSupervisionFeedbackService;
/**
* 查询工作督导反馈列表
*/
@GetMapping("/list")
public TableDataInfo list(TWorkSupervisionFeedback tWorkSupervisionFeedback)
{
startPage();
List<TWorkSupervisionFeedback> list = tWorkSupervisionFeedbackService.selectTWorkSupervisionFeedbackList(tWorkSupervisionFeedback);
return getDataTable(list);
}
/**
* 导出工作督导反馈列表
*/
@Log(title = "工作督导反馈", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TWorkSupervisionFeedback tWorkSupervisionFeedback)
{
List<TWorkSupervisionFeedback> list = tWorkSupervisionFeedbackService.selectTWorkSupervisionFeedbackList(tWorkSupervisionFeedback);
ExcelUtil<TWorkSupervisionFeedback> util = new ExcelUtil<TWorkSupervisionFeedback>(TWorkSupervisionFeedback.class);
return util.exportExcel(list, "工作督导反馈数据");
}
/**
* 获取工作督导反馈详细信息
*/
@GetMapping(value = "/{feedbackId}")
public AjaxResult getInfo(@PathVariable("feedbackId") Long feedbackId)
{
return AjaxResult.success(tWorkSupervisionFeedbackService.selectTWorkSupervisionFeedbackById(feedbackId));
}
/**
* 新增工作督导反馈
*/
@Log(title = "工作督导反馈", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TWorkSupervisionFeedback tWorkSupervisionFeedback)
{
return toAjax(tWorkSupervisionFeedbackService.insertTWorkSupervisionFeedback(tWorkSupervisionFeedback));
}
/**
* 修改工作督导反馈
*/
@Log(title = "工作督导反馈", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TWorkSupervisionFeedback tWorkSupervisionFeedback)
{
return toAjax(tWorkSupervisionFeedbackService.updateTWorkSupervisionFeedback(tWorkSupervisionFeedback));
}
/**
* 删除工作督导反馈
*/
@Log(title = "工作督导反馈", businessType = BusinessType.DELETE)
@DeleteMapping("/{feedbackIds}")
public AjaxResult remove(@PathVariable Long[] feedbackIds)
{
return toAjax(tWorkSupervisionFeedbackService.deleteTWorkSupervisionFeedbackByIds(feedbackIds));
}
}
package com.zehong.web.controller.system;
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.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TEnterpriseSystem;
import com.zehong.system.service.ITEnterpriseSystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 企业制度管理Controller
*
* @author zehong
* @date 2022-06-21
*/
@RestController
@RequestMapping("/safetyManagement/enterpriseSystem")
public class TEnterpriseSystemController extends BaseController
{
@Autowired
private ITEnterpriseSystemService tEnterpriseSystemService;
/**
* 查询企业制度管理列表
*/
//@PreAuthorize("@ss.hasPermi('safetyManagement:enterpriseSystem:list')")
@GetMapping("/list")
public TableDataInfo list(TEnterpriseSystem tEnterpriseSystem)
{
startPage();
List<TEnterpriseSystem> list = tEnterpriseSystemService.selectTEnterpriseSystemList(tEnterpriseSystem);
return getDataTable(list);
}
/**
* 导出企业制度管理列表
*/
@Log(title = "企业制度管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEnterpriseSystem tEnterpriseSystem)
{
List<TEnterpriseSystem> list = tEnterpriseSystemService.selectTEnterpriseSystemList(tEnterpriseSystem);
ExcelUtil<TEnterpriseSystem> util = new ExcelUtil<TEnterpriseSystem>(TEnterpriseSystem.class);
return util.exportExcel(list, "企业制度管理数据");
}
/**
* 获取企业制度管理详细信息
*/
@GetMapping(value = "/{systemId}")
public AjaxResult getInfo(@PathVariable("systemId") Long systemId)
{
return AjaxResult.success(tEnterpriseSystemService.selectTEnterpriseSystemById(systemId));
}
/**
* 新增企业制度管理
*/
@Log(title = "企业制度管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEnterpriseSystem tEnterpriseSystem)
{
return toAjax(tEnterpriseSystemService.insertTEnterpriseSystem(tEnterpriseSystem));
}
/**
* 修改企业制度管理
*/
@Log(title = "企业制度管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEnterpriseSystem tEnterpriseSystem)
{
return toAjax(tEnterpriseSystemService.updateTEnterpriseSystem(tEnterpriseSystem));
}
/**
* 删除企业制度管理
*/
@Log(title = "企业制度管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{systemIds}")
public AjaxResult remove(@PathVariable Long[] systemIds)
{
return toAjax(tEnterpriseSystemService.deleteTEnterpriseSystemByIds(systemIds));
}
}
package com.zehong.system.domain;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 企业制度对象 t_enterprise_system
*
* @author zehong
* @date 2022-10-06
*/
public class TEnterpriseSystem extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 制度id */
private Long systemId;
/** 制度标题 */
@Excel(name = "制度标题")
private String systemTitle;
/** 制度类型(1企业规章制度,2法律法规) */
@Excel(name = "制度类型", readConverterExp = "1=企业规章制度,2法律法规")
private String systemType;
/** 层级:1.国家法律 2.行政法规 3.部委规章 4.地方性法规 5.国家标准 6.行业标准 7.地方标准 8.国际通用规则 9.政策解读 10.其他 */
@Excel(name = "层级:1.国家法律 2.行政法规 3.部委规章 4.地方性法规 5.国家标准 6.行业标准 7.地方标准 8.国际通用规则 9.政策解读 10.其他")
private String hierarchy;
/** 文号 */
@Excel(name = "文号")
private String referenceNum;
/** 颁布部门 */
@Excel(name = "颁布部门")
private String issueDept;
/** 有效性:1.现行有效 2.尚未实施 3.废除 4.废止 */
@Excel(name = "有效性:1.现行有效 2.尚未实施 3.废除 4.废止")
private String availability;
/** 内容分类(仅用于企业规章制度分类) */
@Excel(name = "内容分类", readConverterExp = "仅=用于企业规章制度分类")
private String contentType;
/** 内容 */
@Excel(name = "内容")
private String content;
/** 文件名称 */
@Excel(name = "文件名称")
private String fileName;
/** 文件路径 */
@Excel(name = "文件路径")
private String fileUrl;
/** 状态(0待发布,1待审批,2审批通过,3作废) */
@Excel(name = "状态", readConverterExp = "0=待发布,1待审批,2审批通过,3作废")
private String status;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
public void setSystemId(Long systemId)
{
this.systemId = systemId;
}
public Long getSystemId()
{
return systemId;
}
public void setSystemTitle(String systemTitle)
{
this.systemTitle = systemTitle;
}
public String getSystemTitle()
{
return systemTitle;
}
public void setSystemType(String systemType)
{
this.systemType = systemType;
}
public String getSystemType()
{
return systemType;
}
public void setHierarchy(String hierarchy)
{
this.hierarchy = hierarchy;
}
public String getHierarchy()
{
return hierarchy;
}
public void setReferenceNum(String referenceNum)
{
this.referenceNum = referenceNum;
}
public String getReferenceNum()
{
return referenceNum;
}
public void setIssueDept(String issueDept)
{
this.issueDept = issueDept;
}
public String getIssueDept()
{
return issueDept;
}
public void setAvailability(String availability)
{
this.availability = availability;
}
public String getAvailability()
{
return availability;
}
public void setContentType(String contentType)
{
this.contentType = contentType;
}
public String getContentType()
{
return contentType;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setFileName(String fileName)
{
this.fileName = fileName;
}
public String getFileName()
{
return fileName;
}
public void setFileUrl(String fileUrl)
{
this.fileUrl = fileUrl;
}
public String getFileUrl()
{
return fileUrl;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("systemId", getSystemId())
.append("systemTitle", getSystemTitle())
.append("systemType", getSystemType())
.append("hierarchy", getHierarchy())
.append("referenceNum", getReferenceNum())
.append("issueDept", getIssueDept())
.append("availability", getAvailability())
.append("contentType", getContentType())
.append("content", getContent())
.append("fileName", getFileName())
.append("fileUrl", getFileUrl())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("status", getStatus())
.append("isDel", getIsDel())
.append("remark", getRemark())
.toString();
}
}
...@@ -75,6 +75,12 @@ public class TInsSpotHazardRef extends BaseEntity ...@@ -75,6 +75,12 @@ public class TInsSpotHazardRef extends BaseEntity
@Excel(name = "监督检查时间") @Excel(name = "监督检查时间")
private String fCheckTime; private String fCheckTime;
@Excel(name = "隐患分类" ,dictType = "t_hidden_trouble_type")
private String fHiddenType;
@Excel(name = "隐患等级" ,dictType = "t_hidden_type")
private String fHiddenLevel;
/** 隐患分类分级编码 */ /** 隐患分类分级编码 */
private Long fHazardTypeLevelId; private Long fHazardTypeLevelId;
...@@ -115,6 +121,8 @@ public class TInsSpotHazardRef extends BaseEntity ...@@ -115,6 +121,8 @@ public class TInsSpotHazardRef extends BaseEntity
@Excel(name = "处置描述") @Excel(name = "处置描述")
private String disposalDetails; private String disposalDetails;
private Long fSupervisionId;
/** /**
* 处置描述 * 处置描述
*/ */
...@@ -122,6 +130,31 @@ public class TInsSpotHazardRef extends BaseEntity ...@@ -122,6 +130,31 @@ public class TInsSpotHazardRef extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date disposalTime; private Date disposalTime;
public Long getfSupervisionId() {
return fSupervisionId;
}
public void setfSupervisionId(Long fSupervisionId) {
this.fSupervisionId = fSupervisionId;
}
public String getfHiddenType() {
return fHiddenType;
}
public void setfHiddenType(String fHiddenType) {
this.fHiddenType = fHiddenType;
}
public String getfHiddenLevel() {
return fHiddenLevel;
}
public void setfHiddenLevel(String fHiddenLevel) {
this.fHiddenLevel = fHiddenLevel;
}
public Date getDisposalTime() { public Date getDisposalTime() {
return disposalTime; return disposalTime;
} }
......
package com.zehong.system.domain;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 工作督导对象 t_work_supervision
*
* @author zehong
* @date 2025-08-15
*/
public class TWorkSupervision extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 督导id */
private Long supervisionId;
/** 督导类型 */
@Excel(name = "督导类型")
private String type;
/** 督导标题 */
@Excel(name = "督导标题")
private String title;
/** 督导内容 */
@Excel(name = "督导内容")
private String content;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 图片 */
@Excel(name = "图片")
private String imageUrl;
/** 文件 */
@Excel(name = "文件")
private String fileUrl;
private Long hiddenId;
public Long getHiddenId() {
return hiddenId;
}
public void setHiddenId(Long hiddenId) {
this.hiddenId = hiddenId;
}
public void setSupervisionId(Long supervisionId)
{
this.supervisionId = supervisionId;
}
public Long getSupervisionId()
{
return supervisionId;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setImageUrl(String imageUrl)
{
this.imageUrl = imageUrl;
}
public String getImageUrl()
{
return imageUrl;
}
public void setFileUrl(String fileUrl)
{
this.fileUrl = fileUrl;
}
public String getFileUrl()
{
return fileUrl;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("supervisionId", getSupervisionId())
.append("type", getType())
.append("title", getTitle())
.append("content", getContent())
.append("status", getStatus())
.append("imageUrl", getImageUrl())
.append("fileUrl", getFileUrl())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.toString();
}
}
package com.zehong.system.domain;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 工作督导反馈对象 t_work_supervision_feedback
*
* @author zehong
* @date 2025-08-15
*/
public class TWorkSupervisionFeedback extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 督导反馈id */
private Long feedbackId;
/** 督导id */
@Excel(name = "督导id")
private Long supervisionId;
/** 反馈标题 */
@Excel(name = "反馈标题")
private String title;
/** 反馈内容 */
@Excel(name = "反馈内容")
private String content;
/** 图片 */
@Excel(name = "图片")
private String imageUrl;
/** 文件 */
@Excel(name = "文件")
private String fileUrl;
/** 企业id */
@Excel(name = "企业id")
private String enterpriseId;
/** 反馈人 */
@Excel(name = "反馈人")
private String person;
/** 联系电话 */
@Excel(name = "联系电话")
private String phone;
private String enterpriseName;
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public void setFeedbackId(Long feedbackId)
{
this.feedbackId = feedbackId;
}
public Long getFeedbackId()
{
return feedbackId;
}
public void setSupervisionId(Long supervisionId)
{
this.supervisionId = supervisionId;
}
public Long getSupervisionId()
{
return supervisionId;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setImageUrl(String imageUrl)
{
this.imageUrl = imageUrl;
}
public String getImageUrl()
{
return imageUrl;
}
public void setFileUrl(String fileUrl)
{
this.fileUrl = fileUrl;
}
public String getFileUrl()
{
return fileUrl;
}
public void setEnterpriseId(String enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public String getEnterpriseId()
{
return enterpriseId;
}
public void setPerson(String person)
{
this.person = person;
}
public String getPerson()
{
return person;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("feedbackId", getFeedbackId())
.append("supervisionId", getSupervisionId())
.append("title", getTitle())
.append("content", getContent())
.append("imageUrl", getImageUrl())
.append("fileUrl", getFileUrl())
.append("enterpriseId", getEnterpriseId())
.append("person", getPerson())
.append("phone", getPhone())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.mapper;
import com.zehong.system.domain.TEnterpriseSystem;
import java.util.List;
/**
* 企业制度管理Mapper接口
*
* @author zehong
* @date 2022-06-21
*/
public interface TEnterpriseSystemMapper
{
/**
* 查询企业制度管理
*
* @param systemId 企业制度管理ID
* @return 企业制度管理
*/
public TEnterpriseSystem selectTEnterpriseSystemById(Long systemId);
/**
* 查询企业制度管理列表
*
* @param tEnterpriseSystem 企业制度管理
* @return 企业制度管理集合
*/
public List<TEnterpriseSystem> selectTEnterpriseSystemList(TEnterpriseSystem tEnterpriseSystem);
/**
* 新增企业制度管理
*
* @param tEnterpriseSystem 企业制度管理
* @return 结果
*/
public int insertTEnterpriseSystem(TEnterpriseSystem tEnterpriseSystem);
/**
* 修改企业制度管理
*
* @param tEnterpriseSystem 企业制度管理
* @return 结果
*/
public int updateTEnterpriseSystem(TEnterpriseSystem tEnterpriseSystem);
/**
* 删除企业制度管理
*
* @param systemId 企业制度管理ID
* @return 结果
*/
public int deleteTEnterpriseSystemById(Long systemId);
/**
* 批量删除企业制度管理
*
* @param systemIds 需要删除的数据ID
* @return 结果
*/
public int deleteTEnterpriseSystemByIds(Long[] systemIds);
}
package com.zehong.system.mapper;
import com.zehong.system.domain.TWorkSupervisionFeedback;
import java.util.List;
/**
* 工作督导反馈Mapper接口
*
* @author zehong
* @date 2025-08-15
*/
public interface TWorkSupervisionFeedbackMapper
{
/**
* 查询工作督导反馈
*
* @param feedbackId 工作督导反馈ID
* @return 工作督导反馈
*/
public TWorkSupervisionFeedback selectTWorkSupervisionFeedbackById(Long feedbackId);
/**
* 查询工作督导反馈列表
*
* @param tWorkSupervisionFeedback 工作督导反馈
* @return 工作督导反馈集合
*/
public List<TWorkSupervisionFeedback> selectTWorkSupervisionFeedbackList(TWorkSupervisionFeedback tWorkSupervisionFeedback);
/**
* 新增工作督导反馈
*
* @param tWorkSupervisionFeedback 工作督导反馈
* @return 结果
*/
public int insertTWorkSupervisionFeedback(TWorkSupervisionFeedback tWorkSupervisionFeedback);
/**
* 修改工作督导反馈
*
* @param tWorkSupervisionFeedback 工作督导反馈
* @return 结果
*/
public int updateTWorkSupervisionFeedback(TWorkSupervisionFeedback tWorkSupervisionFeedback);
/**
* 删除工作督导反馈
*
* @param feedbackId 工作督导反馈ID
* @return 结果
*/
public int deleteTWorkSupervisionFeedbackById(Long feedbackId);
/**
* 批量删除工作督导反馈
*
* @param feedbackIds 需要删除的数据ID
* @return 结果
*/
public int deleteTWorkSupervisionFeedbackByIds(Long[] feedbackIds);
}
package com.zehong.system.mapper;
import com.zehong.system.domain.TWorkSupervision;
import java.util.List;
/**
* 工作督导Mapper接口
*
* @author zehong
* @date 2025-08-15
*/
public interface TWorkSupervisionMapper
{
/**
* 查询工作督导
*
* @param supervisionId 工作督导ID
* @return 工作督导
*/
public TWorkSupervision selectTWorkSupervisionById(Long supervisionId);
/**
* 查询工作督导列表
*
* @param tWorkSupervision 工作督导
* @return 工作督导集合
*/
public List<TWorkSupervision> selectTWorkSupervisionList(TWorkSupervision tWorkSupervision);
/**
* 新增工作督导
*
* @param tWorkSupervision 工作督导
* @return 结果
*/
public int insertTWorkSupervision(TWorkSupervision tWorkSupervision);
/**
* 修改工作督导
*
* @param tWorkSupervision 工作督导
* @return 结果
*/
public int updateTWorkSupervision(TWorkSupervision tWorkSupervision);
/**
* 删除工作督导
*
* @param supervisionId 工作督导ID
* @return 结果
*/
public int deleteTWorkSupervisionById(Long supervisionId);
/**
* 批量删除工作督导
*
* @param supervisionIds 需要删除的数据ID
* @return 结果
*/
public int deleteTWorkSupervisionByIds(Long[] supervisionIds);
}
package com.zehong.system.service;
import com.zehong.system.domain.TEnterpriseSystem;
import java.util.List;
/**
* 企业制度管理Service接口
*
* @author zehong
* @date 2022-06-21
*/
public interface ITEnterpriseSystemService
{
/**
* 查询企业制度管理
*
* @param systemId 企业制度管理ID
* @return 企业制度管理
*/
public TEnterpriseSystem selectTEnterpriseSystemById(Long systemId);
/**
* 查询企业制度管理列表
*
* @param tEnterpriseSystem 企业制度管理
* @return 企业制度管理集合
*/
public List<TEnterpriseSystem> selectTEnterpriseSystemList(TEnterpriseSystem tEnterpriseSystem);
/**
* 新增企业制度管理
*
* @param tEnterpriseSystem 企业制度管理
* @return 结果
*/
public int insertTEnterpriseSystem(TEnterpriseSystem tEnterpriseSystem);
/**
* 修改企业制度管理
*
* @param tEnterpriseSystem 企业制度管理
* @return 结果
*/
public int updateTEnterpriseSystem(TEnterpriseSystem tEnterpriseSystem);
/**
* 批量删除企业制度管理
*
* @param systemIds 需要删除的企业制度管理ID
* @return 结果
*/
public int deleteTEnterpriseSystemByIds(Long[] systemIds);
/**
* 删除企业制度管理信息
*
* @param systemId 企业制度管理ID
* @return 结果
*/
public int deleteTEnterpriseSystemById(Long systemId);
}
package com.zehong.system.service;
import com.zehong.system.domain.TWorkSupervisionFeedback;
import java.util.List;
/**
* 工作督导反馈Service接口
*
* @author zehong
* @date 2025-08-15
*/
public interface ITWorkSupervisionFeedbackService
{
/**
* 查询工作督导反馈
*
* @param feedbackId 工作督导反馈ID
* @return 工作督导反馈
*/
public TWorkSupervisionFeedback selectTWorkSupervisionFeedbackById(Long feedbackId);
/**
* 查询工作督导反馈列表
*
* @param tWorkSupervisionFeedback 工作督导反馈
* @return 工作督导反馈集合
*/
public List<TWorkSupervisionFeedback> selectTWorkSupervisionFeedbackList(TWorkSupervisionFeedback tWorkSupervisionFeedback);
/**
* 新增工作督导反馈
*
* @param tWorkSupervisionFeedback 工作督导反馈
* @return 结果
*/
public int insertTWorkSupervisionFeedback(TWorkSupervisionFeedback tWorkSupervisionFeedback);
/**
* 修改工作督导反馈
*
* @param tWorkSupervisionFeedback 工作督导反馈
* @return 结果
*/
public int updateTWorkSupervisionFeedback(TWorkSupervisionFeedback tWorkSupervisionFeedback);
/**
* 批量删除工作督导反馈
*
* @param feedbackIds 需要删除的工作督导反馈ID
* @return 结果
*/
public int deleteTWorkSupervisionFeedbackByIds(Long[] feedbackIds);
/**
* 删除工作督导反馈信息
*
* @param feedbackId 工作督导反馈ID
* @return 结果
*/
public int deleteTWorkSupervisionFeedbackById(Long feedbackId);
}
package com.zehong.system.service;
import com.zehong.system.domain.TWorkSupervision;
import java.util.List;
/**
* 工作督导Service接口
*
* @author zehong
* @date 2025-08-15
*/
public interface ITWorkSupervisionService
{
/**
* 查询工作督导
*
* @param supervisionId 工作督导ID
* @return 工作督导
*/
public TWorkSupervision selectTWorkSupervisionById(Long supervisionId);
/**
* 查询工作督导列表
*
* @param tWorkSupervision 工作督导
* @return 工作督导集合
*/
public List<TWorkSupervision> selectTWorkSupervisionList(TWorkSupervision tWorkSupervision);
/**
* 新增工作督导
*
* @param tWorkSupervision 工作督导
* @return 结果
*/
public int insertTWorkSupervision(TWorkSupervision tWorkSupervision);
/**
* 修改工作督导
*
* @param tWorkSupervision 工作督导
* @return 结果
*/
public int updateTWorkSupervision(TWorkSupervision tWorkSupervision);
/**
* 批量删除工作督导
*
* @param supervisionIds 需要删除的工作督导ID
* @return 结果
*/
public int deleteTWorkSupervisionByIds(Long[] supervisionIds);
/**
* 删除工作督导信息
*
* @param supervisionId 工作督导ID
* @return 结果
*/
public int deleteTWorkSupervisionById(Long supervisionId);
}
package com.zehong.system.service.impl;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TEnterpriseSystem;
import com.zehong.system.mapper.TEnterpriseSystemMapper;
import com.zehong.system.service.ITEnterpriseSystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 企业制度管理Service业务层处理
*
* @author zehong
* @date 2022-06-21
*/
@Service
public class TEnterpriseSystemServiceImpl implements ITEnterpriseSystemService
{
@Autowired
private TEnterpriseSystemMapper tEnterpriseSystemMapper;
/**
* 查询企业制度管理
*
* @param systemId 企业制度管理ID
* @return 企业制度管理
*/
@Override
public TEnterpriseSystem selectTEnterpriseSystemById(Long systemId)
{
return tEnterpriseSystemMapper.selectTEnterpriseSystemById(systemId);
}
/**
* 查询企业制度管理列表
*
* @param tEnterpriseSystem 企业制度管理
* @return 企业制度管理
*/
@Override
public List<TEnterpriseSystem> selectTEnterpriseSystemList(TEnterpriseSystem tEnterpriseSystem)
{
return tEnterpriseSystemMapper.selectTEnterpriseSystemList(tEnterpriseSystem);
}
/**
* 新增企业制度管理
*
* @param tEnterpriseSystem 企业制度管理
* @return 结果
*/
@Override
public int insertTEnterpriseSystem(TEnterpriseSystem tEnterpriseSystem)
{
tEnterpriseSystem.setCreateTime(DateUtils.getNowDate());
return tEnterpriseSystemMapper.insertTEnterpriseSystem(tEnterpriseSystem);
}
/**
* 修改企业制度管理
*
* @param tEnterpriseSystem 企业制度管理
* @return 结果
*/
@Override
public int updateTEnterpriseSystem(TEnterpriseSystem tEnterpriseSystem)
{
tEnterpriseSystem.setUpdateTime(DateUtils.getNowDate());
return tEnterpriseSystemMapper.updateTEnterpriseSystem(tEnterpriseSystem);
}
/**
* 批量删除企业制度管理
*
* @param systemIds 需要删除的企业制度管理ID
* @return 结果
*/
@Override
public int deleteTEnterpriseSystemByIds(Long[] systemIds)
{
return tEnterpriseSystemMapper.deleteTEnterpriseSystemByIds(systemIds);
}
/**
* 删除企业制度管理信息
*
* @param systemId 企业制度管理ID
* @return 结果
*/
@Override
public int deleteTEnterpriseSystemById(Long systemId)
{
return tEnterpriseSystemMapper.deleteTEnterpriseSystemById(systemId);
}
}
package com.zehong.system.service.impl;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TWorkSupervisionFeedback;
import com.zehong.system.mapper.TWorkSupervisionFeedbackMapper;
import com.zehong.system.service.ITWorkSupervisionFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 工作督导反馈Service业务层处理
*
* @author zehong
* @date 2025-08-15
*/
@Service
public class TWorkSupervisionFeedbackServiceImpl implements ITWorkSupervisionFeedbackService
{
@Autowired
private TWorkSupervisionFeedbackMapper tWorkSupervisionFeedbackMapper;
/**
* 查询工作督导反馈
*
* @param feedbackId 工作督导反馈ID
* @return 工作督导反馈
*/
@Override
public TWorkSupervisionFeedback selectTWorkSupervisionFeedbackById(Long feedbackId)
{
return tWorkSupervisionFeedbackMapper.selectTWorkSupervisionFeedbackById(feedbackId);
}
/**
* 查询工作督导反馈列表
*
* @param tWorkSupervisionFeedback 工作督导反馈
* @return 工作督导反馈
*/
@Override
public List<TWorkSupervisionFeedback> selectTWorkSupervisionFeedbackList(TWorkSupervisionFeedback tWorkSupervisionFeedback)
{
return tWorkSupervisionFeedbackMapper.selectTWorkSupervisionFeedbackList(tWorkSupervisionFeedback);
}
/**
* 新增工作督导反馈
*
* @param tWorkSupervisionFeedback 工作督导反馈
* @return 结果
*/
@Override
public int insertTWorkSupervisionFeedback(TWorkSupervisionFeedback tWorkSupervisionFeedback)
{
tWorkSupervisionFeedback.setCreateTime(DateUtils.getNowDate());
return tWorkSupervisionFeedbackMapper.insertTWorkSupervisionFeedback(tWorkSupervisionFeedback);
}
/**
* 修改工作督导反馈
*
* @param tWorkSupervisionFeedback 工作督导反馈
* @return 结果
*/
@Override
public int updateTWorkSupervisionFeedback(TWorkSupervisionFeedback tWorkSupervisionFeedback)
{
return tWorkSupervisionFeedbackMapper.updateTWorkSupervisionFeedback(tWorkSupervisionFeedback);
}
/**
* 批量删除工作督导反馈
*
* @param feedbackIds 需要删除的工作督导反馈ID
* @return 结果
*/
@Override
public int deleteTWorkSupervisionFeedbackByIds(Long[] feedbackIds)
{
return tWorkSupervisionFeedbackMapper.deleteTWorkSupervisionFeedbackByIds(feedbackIds);
}
/**
* 删除工作督导反馈信息
*
* @param feedbackId 工作督导反馈ID
* @return 结果
*/
@Override
public int deleteTWorkSupervisionFeedbackById(Long feedbackId)
{
return tWorkSupervisionFeedbackMapper.deleteTWorkSupervisionFeedbackById(feedbackId);
}
}
package com.zehong.system.service.impl;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TInsSpotHazardRef;
import com.zehong.system.domain.TWorkSupervision;
import com.zehong.system.mapper.TInsSpotHazardRefMapper;
import com.zehong.system.mapper.TWorkSupervisionMapper;
import com.zehong.system.service.ITWorkSupervisionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 工作督导Service业务层处理
*
* @author zehong
* @date 2025-08-15
*/
@Service
public class TWorkSupervisionServiceImpl implements ITWorkSupervisionService
{
@Autowired
private TWorkSupervisionMapper tWorkSupervisionMapper;
@Autowired
private TInsSpotHazardRefMapper tInsSpotHazardRefMapper;
/**
* 查询工作督导
*
* @param supervisionId 工作督导ID
* @return 工作督导
*/
@Override
public TWorkSupervision selectTWorkSupervisionById(Long supervisionId)
{
return tWorkSupervisionMapper.selectTWorkSupervisionById(supervisionId);
}
/**
* 查询工作督导列表
*
* @param tWorkSupervision 工作督导
* @return 工作督导
*/
@Override
public List<TWorkSupervision> selectTWorkSupervisionList(TWorkSupervision tWorkSupervision)
{
return tWorkSupervisionMapper.selectTWorkSupervisionList(tWorkSupervision);
}
/**
* 新增工作督导
*
* @param tWorkSupervision 工作督导
* @return 结果
*/
@Override
public int insertTWorkSupervision(TWorkSupervision tWorkSupervision)
{
tWorkSupervision.setCreateTime(DateUtils.getNowDate());
int a = tWorkSupervisionMapper.insertTWorkSupervision(tWorkSupervision);
if(tWorkSupervision.getHiddenId()!=null){
TInsSpotHazardRef hidden = new TInsSpotHazardRef();
hidden.setfInsSpotHazardRefId(tWorkSupervision.getHiddenId());
hidden.setfSupervisionId(tWorkSupervision.getSupervisionId());
tInsSpotHazardRefMapper.updateTInsSpotHazardRef(hidden);
}
return a;
}
/**
* 修改工作督导
*
* @param tWorkSupervision 工作督导
* @return 结果
*/
@Override
public int updateTWorkSupervision(TWorkSupervision tWorkSupervision)
{
return tWorkSupervisionMapper.updateTWorkSupervision(tWorkSupervision);
}
/**
* 批量删除工作督导
*
* @param supervisionIds 需要删除的工作督导ID
* @return 结果
*/
@Override
public int deleteTWorkSupervisionByIds(Long[] supervisionIds)
{
return tWorkSupervisionMapper.deleteTWorkSupervisionByIds(supervisionIds);
}
/**
* 删除工作督导信息
*
* @param supervisionId 工作督导ID
* @return 结果
*/
@Override
public int deleteTWorkSupervisionById(Long supervisionId)
{
return tWorkSupervisionMapper.deleteTWorkSupervisionById(supervisionId);
}
}
<?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.TEnterpriseSystemMapper">
<resultMap type="TEnterpriseSystem" id="TEnterpriseSystemResult">
<result property="systemId" column="system_id" />
<result property="systemTitle" column="system_title" />
<result property="systemType" column="system_type" />
<result property="hierarchy" column="hierarchy" />
<result property="referenceNum" column="reference_num" />
<result property="issueDept" column="issue_dept" />
<result property="availability" column="availability" />
<result property="contentType" column="content_type" />
<result property="content" column="content" />
<result property="fileName" column="file_name" />
<result property="fileUrl" column="file_url" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="status" column="status" />
<result property="isDel" column="is_del" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectTEnterpriseSystemVo">
select system_id, system_title, system_type, hierarchy, reference_num, issue_dept, availability, content_type, content, file_name, file_url, create_by, create_time, update_by, update_time, status, is_del, remark from t_enterprise_system
</sql>
<select id="selectTEnterpriseSystemList" parameterType="TEnterpriseSystem" resultMap="TEnterpriseSystemResult">
<include refid="selectTEnterpriseSystemVo"/>
<where> is_del = '0'
<if test="systemTitle != null and systemTitle != ''"> and system_title like concat('%', #{systemTitle}, '%')</if>
<if test="systemType != null and systemType != ''"> and system_type = #{systemType}</if>
<if test="hierarchy != null and hierarchy != ''"> and hierarchy = #{hierarchy}</if>
<if test="referenceNum != null and referenceNum != ''"> and reference_num = #{referenceNum}</if>
<if test="issueDept != null and issueDept != ''"> and issue_dept = #{issueDept}</if>
<if test="availability != null and availability != ''"> and availability = #{availability}</if>
<if test="contentType != null and contentType != ''"> and content_type = #{contentType}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectTEnterpriseSystemById" parameterType="Long" resultMap="TEnterpriseSystemResult">
<include refid="selectTEnterpriseSystemVo"/>
where system_id = #{systemId}
</select>
<insert id="insertTEnterpriseSystem" parameterType="TEnterpriseSystem" useGeneratedKeys="true" keyProperty="systemId">
insert into t_enterprise_system
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="systemTitle != null">system_title,</if>
<if test="systemType != null">system_type,</if>
<if test="hierarchy != null">hierarchy,</if>
<if test="referenceNum != null">reference_num,</if>
<if test="issueDept != null">issue_dept,</if>
<if test="availability != null">availability,</if>
<if test="contentType != null">content_type,</if>
<if test="content != null">content,</if>
<if test="fileName != null">file_name,</if>
<if test="fileUrl != null">file_url,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="status != null">status,</if>
<if test="isDel != null">is_del,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="systemTitle != null">#{systemTitle},</if>
<if test="systemType != null">#{systemType},</if>
<if test="hierarchy != null">#{hierarchy},</if>
<if test="referenceNum != null">#{referenceNum},</if>
<if test="issueDept != null">#{issueDept},</if>
<if test="availability != null">#{availability},</if>
<if test="contentType != null">#{contentType},</if>
<if test="content != null">#{content},</if>
<if test="fileName != null">#{fileName},</if>
<if test="fileUrl != null">#{fileUrl},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="status != null">#{status},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTEnterpriseSystem" parameterType="TEnterpriseSystem">
update t_enterprise_system
<trim prefix="SET" suffixOverrides=",">
<if test="systemTitle != null">system_title = #{systemTitle},</if>
<if test="systemType != null">system_type = #{systemType},</if>
<if test="hierarchy != null">hierarchy = #{hierarchy},</if>
<if test="referenceNum != null">reference_num = #{referenceNum},</if>
<if test="issueDept != null">issue_dept = #{issueDept},</if>
<if test="availability != null">availability = #{availability},</if>
<if test="contentType != null">content_type = #{contentType},</if>
<if test="content != null">content = #{content},</if>
<if test="fileName != null">file_name = #{fileName},</if>
<if test="fileUrl != null">file_url = #{fileUrl},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="status != null">status = #{status},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where system_id = #{systemId}
</update>
<delete id="deleteTEnterpriseSystemById" parameterType="Long">
delete from t_enterprise_system where system_id = #{systemId}
</delete>
<delete id="deleteTEnterpriseSystemByIds" parameterType="String">
delete from t_enterprise_system where system_id in
<foreach item="systemId" collection="array" open="(" separator="," close=")">
#{systemId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -13,11 +13,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -13,11 +13,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fObjCode" column="f_obj_code" /> <result property="fObjCode" column="f_obj_code" />
<result property="fObjBelongRegionId" column="f_obj_belong_region_id" /> <result property="fObjBelongRegionId" column="f_obj_belong_region_id" />
<result property="fCheckTime" column="f_check_time" /> <result property="fCheckTime" column="f_check_time" />
<result property="fHiddenType" column="f_hidden_type" />
<result property="fHiddenLevel" column="f_hidden_Level" />
<result property="fHazardTypeLevelId" column="f_hazard_type_level_id" /> <result property="fHazardTypeLevelId" column="f_hazard_type_level_id" />
<result property="fHazardDesc" column="f_hazard_desc" /> <result property="fHazardDesc" column="f_hazard_desc" />
<result property="fBeforePicture" column="f_before_picture" /> <result property="fBeforePicture" column="f_before_picture" />
<result property="fIsEnforcement" column="f_is_enforcement" /> <result property="fIsEnforcement" column="f_is_enforcement" />
<result property="fRemark" column="f_remark" /> <result property="fRemark" column="f_remark" />
<result property="fSupervisionId" column="f_supervision_id" />
<result property="fLastTime" column="f_last_time" /> <result property="fLastTime" column="f_last_time" />
<result property="afterPicture" column="f_after_picture" /> <result property="afterPicture" column="f_after_picture" />
...@@ -44,6 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -44,6 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
spot.f_after_picture, spot.f_after_picture,
spot.f_disposal_details, spot.f_disposal_details,
spot.f_disposal_time, spot.f_disposal_time,
spot.f_hidden_type,
spot.f_hidden_level,
spot.f_supervision_id,
(select rec.f_name from t_county_level_region rec where rec.f_id = spot.f_obj_belong_region_id) AS countyName, (select rec.f_name from t_county_level_region rec where rec.f_id = spot.f_obj_belong_region_id) AS countyName,
(select en.enterprise_name from t_enterprise_info en where enterprise_id = spot.f_involve_enterprise_code)AS enterpriseName, (select en.enterprise_name from t_enterprise_info en where enterprise_id = spot.f_involve_enterprise_code)AS enterpriseName,
(select inf.f_hazard_name from t_ins_sta_infor inf where inf.f_ins_sta_infor_id = spot.f_hazard_type_level_id)AS levelName (select inf.f_hazard_name from t_ins_sta_infor inf where inf.f_ins_sta_infor_id = spot.f_hazard_type_level_id)AS levelName
...@@ -76,11 +83,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -76,11 +83,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fObjCode != null">f_obj_code,</if> <if test="fObjCode != null">f_obj_code,</if>
<if test="fObjBelongRegionId != null">f_obj_belong_region_id,</if> <if test="fObjBelongRegionId != null">f_obj_belong_region_id,</if>
<if test="fCheckTime != null">f_check_time,</if> <if test="fCheckTime != null">f_check_time,</if>
<if test="fHiddenType != null">f_hidden_type,</if>
<if test="fHiddenLevel != null">f_hidden_level,</if>
<if test="fHazardTypeLevelId != null">f_hazard_type_level_id,</if> <if test="fHazardTypeLevelId != null">f_hazard_type_level_id,</if>
<if test="fHazardDesc != null">f_hazard_desc,</if> <if test="fHazardDesc != null">f_hazard_desc,</if>
<if test="fBeforePicture != null">f_before_picture,</if> <if test="fBeforePicture != null">f_before_picture,</if>
<if test="fIsEnforcement != null">f_is_enforcement,</if> <if test="fIsEnforcement != null">f_is_enforcement,</if>
<if test="fRemark != null">f_remark,</if> <if test="fRemark != null">f_remark,</if>
<if test="fSupervisionId!=null">f_supervision_id,</if>
<if test="fLastTime != null">f_last_time,</if> <if test="fLastTime != null">f_last_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -91,11 +101,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -91,11 +101,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fObjCode != null">#{fObjCode},</if> <if test="fObjCode != null">#{fObjCode},</if>
<if test="fObjBelongRegionId != null">#{fObjBelongRegionId},</if> <if test="fObjBelongRegionId != null">#{fObjBelongRegionId},</if>
<if test="fCheckTime != null">#{fCheckTime},</if> <if test="fCheckTime != null">#{fCheckTime},</if>
<if test="fHiddenType != null">#{fHiddenType},</if>
<if test="fHiddenLevel != null">#{fHiddenLevel},</if>
<if test="fHazardTypeLevelId != null">#{fHazardTypeLevelId},</if> <if test="fHazardTypeLevelId != null">#{fHazardTypeLevelId},</if>
<if test="fHazardDesc != null">#{fHazardDesc},</if> <if test="fHazardDesc != null">#{fHazardDesc},</if>
<if test="fBeforePicture != null">#{fBeforePicture},</if> <if test="fBeforePicture != null">#{fBeforePicture},</if>
<if test="fIsEnforcement != null">#{fIsEnforcement},</if> <if test="fIsEnforcement != null">#{fIsEnforcement},</if>
<if test="fRemark != null">#{fRemark},</if> <if test="fRemark != null">#{fRemark},</if>
<if test="fSupervisionId!=null">#{fSupervisionId},</if>
<if test="fLastTime != null">#{fLastTime},</if> <if test="fLastTime != null">#{fLastTime},</if>
</trim> </trim>
</insert> </insert>
...@@ -110,11 +123,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -110,11 +123,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fObjCode != null">f_obj_code = #{fObjCode},</if> <if test="fObjCode != null">f_obj_code = #{fObjCode},</if>
<if test="fObjBelongRegionId != null">f_obj_belong_region_id = #{fObjBelongRegionId},</if> <if test="fObjBelongRegionId != null">f_obj_belong_region_id = #{fObjBelongRegionId},</if>
<if test="fCheckTime != null">f_check_time = #{fCheckTime},</if> <if test="fCheckTime != null">f_check_time = #{fCheckTime},</if>
<if test="fHiddenType != null">f_hidden_type = #{fHiddenType},</if>
<if test="fHiddenLevel != null">f_hidden_level = #{fHiddenLevel},</if>
<if test="fHazardTypeLevelId != null">f_hazard_type_level_id = #{fHazardTypeLevelId},</if> <if test="fHazardTypeLevelId != null">f_hazard_type_level_id = #{fHazardTypeLevelId},</if>
<if test="fHazardDesc != null">f_hazard_desc = #{fHazardDesc},</if> <if test="fHazardDesc != null">f_hazard_desc = #{fHazardDesc},</if>
<if test="fBeforePicture != null">f_before_picture = #{fBeforePicture},</if> <if test="fBeforePicture != null">f_before_picture = #{fBeforePicture},</if>
<if test="fIsEnforcement != null">f_is_enforcement = #{fIsEnforcement},</if> <if test="fIsEnforcement != null">f_is_enforcement = #{fIsEnforcement},</if>
<if test="fRemark != null">f_remark = #{fRemark},</if> <if test="fRemark != null">f_remark = #{fRemark},</if>
<if test="fSupervisionId!=null">f_supervision_id = #{fSupervisionId},</if>
<if test="fLastTime != null">f_last_time = #{fLastTime},</if> <if test="fLastTime != null">f_last_time = #{fLastTime},</if>
</trim> </trim>
where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId} where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId}
......
<?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.TWorkSupervisionFeedbackMapper">
<resultMap type="TWorkSupervisionFeedback" id="TWorkSupervisionFeedbackResult">
<result property="feedbackId" column="feedback_id" />
<result property="supervisionId" column="supervision_id" />
<result property="title" column="title" />
<result property="content" column="content" />
<result property="imageUrl" column="image_url" />
<result property="fileUrl" column="file_url" />
<result property="enterpriseId" column="enterprise_id" />
<result property="person" column="person" />
<result property="phone" column="phone" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTWorkSupervisionFeedbackVo">
select feedback_id, supervision_id, title, content, image_url, file_url, enterprise_id,
(SELECT enterprise_name FROM t_enterprise_info e WHERE e.enterprise_id = f.enterprise_id) as enterpriseName,
person, phone, create_time from t_work_supervision_feedback f
</sql>
<select id="selectTWorkSupervisionFeedbackList" parameterType="TWorkSupervisionFeedback" resultMap="TWorkSupervisionFeedbackResult">
<include refid="selectTWorkSupervisionFeedbackVo"/>
<where>
<if test="supervisionId != null "> and supervision_id = #{supervisionId}</if>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
</where>
</select>
<select id="selectTWorkSupervisionFeedbackById" parameterType="Long" resultMap="TWorkSupervisionFeedbackResult">
<include refid="selectTWorkSupervisionFeedbackVo"/>
where feedback_id = #{feedbackId}
</select>
<insert id="insertTWorkSupervisionFeedback" parameterType="TWorkSupervisionFeedback" useGeneratedKeys="true" keyProperty="feedbackId">
insert into t_work_supervision_feedback
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="supervisionId != null">supervision_id,</if>
<if test="title != null">title,</if>
<if test="content != null">content,</if>
<if test="imageUrl != null">image_url,</if>
<if test="fileUrl != null">file_url,</if>
<if test="enterpriseId != null">enterprise_id,</if>
<if test="person != null">person,</if>
<if test="phone != null">phone,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="supervisionId != null">#{supervisionId},</if>
<if test="title != null">#{title},</if>
<if test="content != null">#{content},</if>
<if test="imageUrl != null">#{imageUrl},</if>
<if test="fileUrl != null">#{fileUrl},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="person != null">#{person},</if>
<if test="phone != null">#{phone},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTWorkSupervisionFeedback" parameterType="TWorkSupervisionFeedback">
update t_work_supervision_feedback
<trim prefix="SET" suffixOverrides=",">
<if test="supervisionId != null">supervision_id = #{supervisionId},</if>
<if test="title != null">title = #{title},</if>
<if test="content != null">content = #{content},</if>
<if test="imageUrl != null">image_url = #{imageUrl},</if>
<if test="fileUrl != null">file_url = #{fileUrl},</if>
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="person != null">person = #{person},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where feedback_id = #{feedbackId}
</update>
<delete id="deleteTWorkSupervisionFeedbackById" parameterType="Long">
delete from t_work_supervision_feedback where feedback_id = #{feedbackId}
</delete>
<delete id="deleteTWorkSupervisionFeedbackByIds" parameterType="String">
delete from t_work_supervision_feedback where feedback_id in
<foreach item="feedbackId" collection="array" open="(" separator="," close=")">
#{feedbackId}
</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.TWorkSupervisionMapper">
<resultMap type="TWorkSupervision" id="TWorkSupervisionResult">
<result property="supervisionId" column="supervision_id" />
<result property="type" column="type" />
<result property="title" column="title" />
<result property="content" column="content" />
<result property="status" column="status" />
<result property="imageUrl" column="image_url" />
<result property="fileUrl" column="file_url" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
</resultMap>
<sql id="selectTWorkSupervisionVo">
select supervision_id, type, title, content, status, image_url, file_url, create_time, create_by from t_work_supervision
</sql>
<select id="selectTWorkSupervisionList" parameterType="TWorkSupervision" resultMap="TWorkSupervisionResult">
<include refid="selectTWorkSupervisionVo"/>
<where>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectTWorkSupervisionById" parameterType="Long" resultMap="TWorkSupervisionResult">
<include refid="selectTWorkSupervisionVo"/>
where supervision_id = #{supervisionId}
</select>
<insert id="insertTWorkSupervision" parameterType="TWorkSupervision" useGeneratedKeys="true" keyProperty="supervisionId">
insert into t_work_supervision
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="type != null and type != ''">type,</if>
<if test="title != null and title != ''">title,</if>
<if test="content != null and content != ''">content,</if>
<if test="status != null">status,</if>
<if test="imageUrl != null">image_url,</if>
<if test="fileUrl != null">file_url,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="type != null and type != ''">#{type},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="status != null">#{status},</if>
<if test="imageUrl != null">#{imageUrl},</if>
<if test="fileUrl != null">#{fileUrl},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
</trim>
</insert>
<update id="updateTWorkSupervision" parameterType="TWorkSupervision">
update t_work_supervision
<trim prefix="SET" suffixOverrides=",">
<if test="type != null and type != ''">type = #{type},</if>
<if test="title != null and title != ''">title = #{title},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="status != null">status = #{status},</if>
<if test="imageUrl != null">image_url = #{imageUrl},</if>
<if test="fileUrl != null">file_url = #{fileUrl},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
</trim>
where supervision_id = #{supervisionId}
</update>
<delete id="deleteTWorkSupervisionById" parameterType="Long">
delete from t_work_supervision where supervision_id = #{supervisionId}
</delete>
<delete id="deleteTWorkSupervisionByIds" parameterType="String">
delete from t_work_supervision where supervision_id in
<foreach item="supervisionId" collection="array" open="(" separator="," close=")">
#{supervisionId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询企业制度管理列表
export function listEnterpriseSystem(query) {
return request({
url: '/safetyManagement/enterpriseSystem/list',
method: 'get',
params: query
})
}
// 查询企业制度管理详细
export function getEnterpriseSystem(systemId) {
return request({
url: '/safetyManagement/enterpriseSystem/' + systemId,
method: 'get'
})
}
// 新增企业制度管理
export function addEnterpriseSystem(data) {
return request({
url: '/safetyManagement/enterpriseSystem',
method: 'post',
data: data
})
}
// 修改企业制度管理
export function updateEnterpriseSystem(data) {
return request({
url: '/safetyManagement/enterpriseSystem',
method: 'put',
data: data
})
}
// 删除企业制度管理
export function delEnterpriseSystem(systemId) {
return request({
url: '/safetyManagement/enterpriseSystem/' + systemId,
method: 'delete'
})
}
// 导出企业制度管理
export function exportEnterpriseSystem(query) {
return request({
url: '/safetyManagement/enterpriseSystem/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询工作督导反馈列表
export function listFeedback(query) {
return request({
url: '/system/feedback/list',
method: 'get',
params: query
})
}
// 查询工作督导反馈详细
export function getFeedback(feedbackId) {
return request({
url: '/system/feedback/' + feedbackId,
method: 'get'
})
}
// 新增工作督导反馈
export function addFeedback(data) {
return request({
url: '/system/feedback',
method: 'post',
data: data
})
}
// 修改工作督导反馈
export function updateFeedback(data) {
return request({
url: '/system/feedback',
method: 'put',
data: data
})
}
// 删除工作督导反馈
export function delFeedback(feedbackId) {
return request({
url: '/system/feedback/' + feedbackId,
method: 'delete'
})
}
// 导出工作督导反馈
export function exportFeedback(query) {
return request({
url: '/system/feedback/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询工作督导列表
export function listSupervision(query) {
return request({
url: '/system/supervision/list',
method: 'get',
params: query
})
}
// 查询工作督导详细
export function getSupervision(supervisionId) {
return request({
url: '/system/supervision/' + supervisionId,
method: 'get'
})
}
// 新增工作督导
export function addSupervision(data) {
return request({
url: '/system/supervision',
method: 'post',
data: data
})
}
// 修改工作督导
export function updateSupervision(data) {
return request({
url: '/system/supervision',
method: 'put',
data: data
})
}
// 删除工作督导
export function delSupervision(supervisionId) {
return request({
url: '/system/supervision/' + supervisionId,
method: 'delete'
})
}
// 导出工作督导
export function exportSupervision(query) {
return request({
url: '/system/supervision/export',
method: 'get',
params: query
})
}
\ No newline at end of file
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="法律法规标题" prop="systemTitle">
<el-input
v-model="queryParams.systemTitle"
placeholder="请输入法律法规标题"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
<el-option
v-for = "dict in statusOptions"
:key = "dict.dictValue"
:label = "dict.dictLabel"
:value = "dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
size="small"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
></el-date-picker>
</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="['safetyManagement:enterpriseSystem:add']"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="enterpriseSystemList" >
<el-table-column label="法律法规标题" align="center" prop="systemTitle" width="260px"/>
<el-table-column label="颁布部门" align="center" prop="issueDept" >
<template slot-scope="scope">
<span v-if="scope.row.issueDept != null && scope.row.issueDept!=''">
{{scope.row.issueDept}}
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="文号" align="center" prop="referenceNum" >
<template slot-scope="scope">
<span v-if="scope.row.referenceNum != null && scope.row.referenceNum!=''">
{{scope.row.referenceNum}}
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="层级" align="center" prop="hierarchy" :formatter="hierarchyFormat"/>
<el-table-column label="有效性" align="center" prop="availability" :formatter="availabilityFormat"/>
<el-table-column label="附件" align="center" prop="fileUrl" width="260px">
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.fileUrl)"
v-if="scope.row.fileUrl != null && scope.row.fileUrl!=''"
>
<i class="el-icon el-icon-view"></i>{{scope.row.fileName}}
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" width="120px" />
<el-table-column label="创建时间" align="center" prop="createTime" width="150px" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="210px" >
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleDetail(scope.row)"
>详情</el-button>
<el-button
v-if="scope.row.status == '0'"
size="mini"
type="text"
icon="el-icon-edit"
@click="handlePublish(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:edit']"
>发布</el-button>
<el-button
v-if="scope.row.status == '1'"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleApproval(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:edit']"
>审批</el-button>
<el-button
v-if="scope.row.status == '2'"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleInvalid(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:edit']"
>作废</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['safetyManagement:enterpriseSystem:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改法律法规管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" @closed="dialogClose" @open="dialogOpen" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<div class="division">
<div style="width: 45%;">
<div class="dialogTitle">法律法规基本信息</div>
<el-form-item label="法律法规标题" prop="systemTitle">
<el-input v-model="form.systemTitle" placeholder="请输入法律法规标题" :disabled="readOnly"/>
</el-form-item>
<el-form-item label="层级" prop="hierarchy">
<el-select v-model="form.hierarchy" placeholder="请选择层级" clearable size="small" :disabled="readOnly" style="width: 100%">
<el-option
v-for = "dict in hierarchys"
:key = "dict.dictValue"
:label = "dict.dictLabel"
:value = "dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="文号" prop="referenceNum">
<el-input v-model="form.referenceNum" placeholder="请输入文号" :disabled="readOnly"/>
</el-form-item>
<el-form-item label="颁布部门" prop="issueDept">
<el-input v-model="form.issueDept" placeholder="请输入颁布部门" :disabled="readOnly"/>
</el-form-item>
<el-form-item label="有效性" prop="availability">
<el-select v-model="form.availability" placeholder="请选择有效性" clearable size="small" :disabled="readOnly" style="width: 100%">
<el-option
v-for = "dict in availabilitys"
:key = "dict.dictValue"
:label = "dict.dictLabel"
:value = "dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" :disabled="readOnly" />
</el-form-item>
<el-form-item label="附件" v-if="!readOnly" prop="fileUrl">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="form.fileUrl"></el-input>
</el-form-item>
<el-form-item label="附件" v-if="readOnly" prop="fileUrl" >
<span
class="dbtn"
@click="checkFile(form.fileUrl)"
v-if="form.fileUrl!=null && form.fileUrl != ''"
>
<i class="el-icon el-icon-view"></i>{{form.fileName}}
</span>
<span v-else>-</span>
</el-form-item>
<el-form-item v-show="operate" label="审批" prop="status">
<el-radio v-model="form.status" label="2">通过</el-radio>
<el-radio v-model="form.status" label="0">驳回</el-radio>
</el-form-item>
</div>
<div style="width: 58%;margin-left: 2%">
<div class="dialogTitle">法律法规内容</div>
<editor id="editor" v-if="isOpen" :readOnly="readOnly" v-model="form.content" :min-height="300"/>
</div>
</div>
</el-form>
<div slot="footer" class="dialog-footer" v-show="!readOnly">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listEnterpriseSystem, getEnterpriseSystem, delEnterpriseSystem, addEnterpriseSystem, updateEnterpriseSystem, exportEnterpriseSystem } from "@/api/supervise/enterpriseSystem";
import Editor from '@/components/Editor';
let uploadfile = require("@/assets/uploadfile.png");
import FileUpload from '@/components/FileUpload';
export default {
name: "EnterpriseSystem",
components: {
Editor,
FileUpload
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 日期范围
dateRange: [],
// 法律法规管理表格数据
enterpriseSystemList: [],
statusOptions: [],
fileList:[],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
isOpen:false,
operate: false,
readOnly: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
systemType: '2',
systemTitle: null,
content: null,
isDel: '0',
},
// 表单参数
form: {},
// 表单校验
rules: {
systemTitle: [
{ required: true, message: "标题不能为空", trigger: "blur" }
],
hierarchy: [
{ required: true, message: "请选择层级", trigger: "change" }
],
},
hierarchys:[],
availabilitys:[]
};
},
created() {
this.getList();
this.getDicts("t_enterprise_system_status").then(response =>{
this.statusOptions = response.data;
})
this.getDicts("t_hierarchy").then(response =>{
this.hierarchys = response.data;
})
this.getDicts("t_availability").then(response =>{
this.availabilitys = response.data;
})
},
methods: {
// 状态
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
/** 查询法律法规管理列表 */
getList() {
this.loading = true;
listEnterpriseSystem(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.enterpriseSystemList = response.rows;
console.log("enterpriseSystemList", this.enterpriseSystemList)
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
this.fileList = [];
},
// 表单重置
reset() {
this.form = {
systemId: null,
systemTitle: null,
systemType: '2',
content: null,
fileUrl: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remark: null
};
this.resetForm("form");
this.fileList = [];
this.operate=false;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.readOnly=false;
this.reset();
this.open = true;
this.title = "添加法律法规信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.readOnly=false;
this.reset();
const systemId = row.systemId || this.ids
getEnterpriseSystem(systemId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改法律法规信息";
if(this.form.fileUrl!=null||this.form.fileUrl==""){
this.fileList = [{name: this.form.fileName, url: uploadfile}];
}
});
},
/** 详情按钮操作*/
handleDetail(row) {
this.readOnly=true;
this.reset();
const systemId = row.systemId || this.ids
getEnterpriseSystem(systemId).then(response => {
this.form = response.data;
this.open = true;
this.title = "法律法规信息详情";
if(this.form.fileUrl!=null||this.form.fileUrl==""){
this.fileList = [{name: this.form.fileName, url: uploadfile}];
}
});
},
/** 审批按钮操作 */
handleApproval(row) {
this.readOnly = true;
this.reset();
const systemId = row.systemId || this.ids
getEnterpriseSystem(systemId).then(response => {
this.form = response.data;
this.form.status = '2';
this.operate = true;
this.open = true;
this.title = "审批法律法规信息";
if(this.form.fileUrl!=null||this.form.fileUrl==""){
this.fileList = [{name: this.form.fileName, url: uploadfile}];
}
});
},
dialogClose(){
this.isOpen=false;
},
dialogOpen(){
this.isOpen=true;
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.systemId != null) {
if(this.operate){
updateEnterpriseSystem(this.form).then(response => {
this.msgSuccess("审批成功");
this.open = false;
this.operate = false;
this.readOnly = false;
this.getList();
});
} else {
updateEnterpriseSystem(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
}
} else {
addEnterpriseSystem(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 发布按钮操作 */
handlePublish(row) {
this.$confirm('确认要发布 "' + row.systemTitle + '" 的法律法规信息?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
row.status = '1';
return updateEnterpriseSystem(row);
}).then(() => {
this.getList();
this.msgSuccess("发布成功");
}).catch(() => {});
},
/** 作废按钮操作 */
handleInvalid(row) {
this.$confirm('确认要作废 "' + row.systemTitle + '" 的法律法规信息?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
row.status = '3';
return updateEnterpriseSystem(row);
}).then(() => {
this.getList();
this.msgSuccess("作废成功");
}).catch(() => {});
},
/** 删除按钮操作 */
handleDelete(row) {
this.$confirm('是否确认删除 "' + row.systemTitle + '" 的法律法规信息?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
row.isDel = '1';
return updateEnterpriseSystem(row);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有法律法规管理数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportEnterpriseSystem(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
//上传
getFileInfo(res){
this.form.fileUrl = res.url;
this.form.fileName = res.fileName;
this.fileList.push({
name: res.fileName,
url: uploadfile,
});
},
listRemove(e) {
this.fileList = [];
this.form.fileUrl = null;
this.form.fileName = null;
},
checkFile(url) {
window.open(url,'_blank');
},
hierarchyFormat(row,colum){
return this.selectDictLabel(this.hierarchys, row.hierarchy);
},
availabilityFormat(row,colum){
return this.selectDictLabel(this.availabilitys, row.availability);
}
}
};
</script>
<style>
.division{
display:flex;
flex-direction:row;
justify-content:flex-start;
}
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
.dialogTitle {
background: #1c84c6;
color: white;
height: 20px;
line-height: 20px;
text-align: center;
margin-bottom: 10px;
}
</style>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
></el-image> ></el-image>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注"> <el-form-item label="备注">
<span v-if="detailInfo.fRemark">{{ detailInfo.fRemark }}</span> <span v-if="detailInfo.fRemark">{{ detailInfo.fRemark }}</span>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<el-row v-if="detailInfo.afterPicture != null"> <el-row v-if="detailInfo.afterPicture != null">
<el-form-item label="隐患整改后照片"> <el-form-item label="隐患整改后照片">
<el-col :span="24"> <el-col :span="24">
<el-image <el-image
:src="detailInfo.afterPicture" :src="detailInfo.afterPicture"
:preview-src-list="[detailInfo.afterPicture]" :preview-src-list="[detailInfo.afterPicture]"
...@@ -109,23 +109,64 @@ ...@@ -109,23 +109,64 @@
style="width: 200px;height: 200px;" style="width: 200px;height: 200px;"
></el-image> ></el-image>
<span v-else>-</span> <span v-else>-</span>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="处置描述" prop="disposalDetails"> <el-form-item label="处置描述" prop="disposalDetails">
<span v-if="detailInfo.disposalDetails">{{ detailInfo.disposalDetails }}</span> <span v-if="detailInfo.disposalDetails">{{ detailInfo.disposalDetails }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="处置时间" prop="disposalDetails"> <el-form-item label="处置时间" prop="disposalDetails">
<span v-if="detailInfo.disposalTime">{{ detailInfo.disposalTime }}</span> <span v-if="detailInfo.disposalTime">{{ detailInfo.disposalTime }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-divider v-if="detailInfo.fSupervisionId != null" content-position="left">督办</el-divider>
<el-row v-if="detailInfo.fSupervisionId != null">
<el-col :span="24">
<el-form-item label="督办标题" prop="disposalDetails">
<span v-if="superDetail.title">{{ superDetail.title }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="督办内容" prop="disposalDetails">
<span v-if="superDetail.content">{{ superDetail.content }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-form-item label="督办照片">
<el-col :span="24">
<el-image
:src="superDetail.imageUrl"
:preview-src-list="[superDetail.imageUrl]"
v-if="superDetail.imageUrl != '' && superDetail.imageUrl != null"
:z-index=5000
style="width: 200px;height: 200px;"
></el-image>
<span v-else>-</span>
</el-col>
</el-form-item>
<el-form-item label="督办附件:">
<span class="dbtn" @click="checkFile(superDetail.fileUrl)" v-if="superDetail.fileUrl">
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else><el-input disabled/></span>
</el-form-item>
<el-col :span="12">
<el-form-item label="督办时间" prop="superDetail">
<span v-if="superDetail.createTime">{{ superDetail.createTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</el-dialog> </el-dialog>
...@@ -134,6 +175,8 @@ ...@@ -134,6 +175,8 @@
<script> <script>
import { getRef } from "@/api/supervision/spot"; import { getRef } from "@/api/supervision/spot";
import { getSupervision } from "@/api/supervision/supervision";
export default { export default {
name: "detail-info", name: "detail-info",
data(){ data(){
...@@ -141,22 +184,50 @@ ...@@ -141,22 +184,50 @@
detailInfo: { detailInfo: {
fDeleteFlag: 0 fDeleteFlag: 0
}, },
detailOpen: false detailOpen: false,
superDetail:{}
} }
}, },
methods:{ methods:{
getDetailInfo(id){ getDetailInfo(id){
getRef(id).then(res =>{ getRef(id).then(res =>{
if(res.code == 200 && res.data){ if(res.code == 200){
if(res.data.fSupervisionId!=null){
this.supervision(res.data.fSupervisionId)
}
this.detailInfo = res.data; this.detailInfo = res.data;
this.detailOpen = true; this.detailOpen = true;
} }
}) })
} },
supervision(id){
getSupervision(id).then(res =>{
if(res.code == 200){
this.superDetail = res.data;
}
})
},
checkFile(url) {
window.open(url,'_blank');
},
} }
} }
</script> </script>
<style scoped> <style scoped>
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
.dbtn:hover {
border-width: 1px;
border-color: rgb(48, 180, 107);
}
</style> </style>
<template>
<el-dialog title="督办" :visible.sync="detailOpen" width="600px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="督导类型" prop="type">
<el-select v-model="form.type" placeholder="请选择督导类型" disabled>
<el-option
v-for="dict in typeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="督导标题" prop="title">
<el-input v-model="form.title" placeholder="请输入督导标题" />
</el-form-item>
<el-form-item label="督导内容" prop="content">
<el-input v-model="form.content" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="是否反馈">
<el-radio-group v-model="form.status">
<el-radio
label="0"
></el-radio>
<el-radio
label="1"
></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="图片" prop="imageUrl">
<imageUpload v-model="form.imageUrl"/>
<!--<el-input v-model="form.imageUrl" type="textarea" placeholder="请输入内容" />-->
</el-form-item>
<el-form-item label="文件" prop="fileUrl">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="form.fileUrl"></el-input>
</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>
</template>
<script>
import { addSupervision } from "@/api/supervision/supervision";
import { getRef } from "@/api/supervision/spot";
import FileUpload from '@/components/FileUpload';
import ImageUpload from '@/components/ImageUpload';
let uploadfile = require("@/assets/uploadfile.png");
export default {
name: "detail-info",
components: {
FileUpload,ImageUpload
},
data(){
return{
detailOpen:false,
typeOptions:[],
statusOptions:[],
fileList:[],
fileList2:[],
// 表单参数
form: {
status:0,
supervisionId:null
},
// 表单校验
rules: {
type: [
{ required: true, message: "督导类型不能为空", trigger: "change" }
],
title: [
{ required: true, message: "督导标题不能为空", trigger: "blur" }
],
content: [
{ required: true, message: "督导内容不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getDicts("t_supervision_type").then(response => {
this.typeOptions = response.data;
});
this.getDicts("t_supervision_status").then(response => {
this.statusOptions = response.data;
});
},
methods:{
getInfo(hiddenId){
this.detailOpen = true;
this.form ={
status:'0',
type:'4',
hiddenId:hiddenId
}
},
//上传
getFileInfo(res){
//this.form.dealPlan = res.fileName;
this.form.fileUrl = res.url;
this.fileList.push({
name: res.fileName,
url: uploadfile,
});
},
listRemove(e) {
this.form.fileUrl = "";
this.fileList = [];
},
// 取消按钮
cancel() {
this.fileList = [];
this.detailOpen = false;
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.supervisionId != null) {
updateSupervision(this.form).then(response => {
this.msgSuccess("修改成功");
this.detailOpen = false;
});
} else {
addSupervision(this.form).then(response => {
this.msgSuccess("新增成功");
this.detailOpen = false;
});
}
}
});
},
}
}
</script>
<style scoped>
</style>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
:value="dict.dictValue" :value="dict.dictValue"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -79,20 +79,27 @@ ...@@ -79,20 +79,27 @@
<el-table v-loading="loading" :data="refList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="refList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="隐患唯一编码" align="center" prop="fHazardUniqueCode" /> <el-table-column label="隐患唯一编码" align="center" prop="fHazardUniqueCode" >
<el-table-column label="自有编号" align="center" prop="fHazardOutUniqueCode">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.fHazardOutUniqueCode">{{ scope.row.fHazardOutUniqueCode }}</span> <span v-if="scope.row.fSupervisionId==null">{{ scope.row.fHazardUniqueCode }}</span>
<span v-else>-</span> <span v-else style="color: #f56c6c">&#9733;{{ scope.row.fHazardUniqueCode }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column label="自有编号" align="center" prop="fHazardOutUniqueCode">-->
<!--<template slot-scope="scope">-->
<!--<span v-if="scope.row.fHazardOutUniqueCode">{{ scope.row.fHazardOutUniqueCode }}</span>-->
<!--<span v-else>-</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="供气企业" align="center" prop="fInvolveEnterpriseCode" :show-overflow-tooltip="true"> <el-table-column label="供气企业" align="center" prop="fInvolveEnterpriseCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.enterpriseName">{{ scope.row.enterpriseName }}</span> <span v-if="scope.row.enterpriseName">{{ scope.row.enterpriseName }}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查对象分类" align="center" prop="fObjType"/> <el-table-column label="隐患类型" align="center" prop="fHiddenType" :formatter="fHiddenTypeFormat" />
<el-table-column label="隐患等级" align="center" prop="fHiddenLevel" :formatter="fHiddenLevelFormat"/>
<el-table-column label="检查对象分类" align="center" prop="fObjType"/>
<el-table-column label="行政区县级行政区" align="center" prop="fObjBelongRegionId" width="150" :show-overflow-tooltip="true"> <el-table-column label="行政区县级行政区" align="center" prop="fObjBelongRegionId" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.countyName">{{ scope.row.countyName }}</span> <span v-if="scope.row.countyName">{{ scope.row.countyName }}</span>
...@@ -100,12 +107,12 @@ ...@@ -100,12 +107,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="监督检查时间" align="center" prop="fCheckTime" width="150" /> <el-table-column label="监督检查时间" align="center" prop="fCheckTime" width="150" />
<el-table-column label="隐患分类分级标准" align="center" prop="fHazardTypeLevelId" :show-overflow-tooltip="true"> <!--<el-table-column label="隐患分类分级标准" align="center" prop="fHazardTypeLevelId" :show-overflow-tooltip="true">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
<span v-if="scope.row.levelName">{{ scope.row.levelName }}</span> <!--<span v-if="scope.row.levelName">{{ scope.row.levelName }}</span>-->
<span v-else>-</span> <!--<span v-else>-</span>-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<!-- <el-table-column label="隐患描述" align="center" prop="fHazardDesc" :show-overflow-tooltip="true"> <!-- <el-table-column label="隐患描述" align="center" prop="fHazardDesc" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.fHazardDesc">{{ scope.row.fHazardDesc }}</span> <span v-if="scope.row.fHazardDesc">{{ scope.row.fHazardDesc }}</span>
...@@ -117,7 +124,7 @@ ...@@ -117,7 +124,7 @@
<el-image v-if="scope.row.fBeforePicture" :src="scope.row.fBeforePicture" :preview-src-list="[scope.row.fBeforePicture]" :z-index="9999" style="width: 30px;height: 30px;"></el-image> <el-image v-if="scope.row.fBeforePicture" :src="scope.row.fBeforePicture" :preview-src-list="[scope.row.fBeforePicture]" :z-index="9999" style="width: 30px;height: 30px;"></el-image>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 省平台的接口不知道什么意思,先不显示 --> <!-- 省平台的接口不知道什么意思,先不显示 -->
<!-- <el-table-column label="是否执行" align="center" prop="fIsEnforcement"> <!-- <el-table-column label="是否执行" align="center" prop="fIsEnforcement">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -150,9 +157,17 @@ ...@@ -150,9 +157,17 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
@click="handleDispose(scope.row)" @click="handleDispose(scope.row)"
v-if="scope.row.afterPicture == null" v-if="scope.row.afterPicture == null"
>处置</el-button> >处置</el-button>
<el-button
v-if="scope.row.fSupervisionId == null&&scope.row.afterPicture == null"
size="mini"
type="text"
icon="el-icon-edit-outline"
@click="handleSupervision(scope.row)"
>督办</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -175,11 +190,11 @@ ...@@ -175,11 +190,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <!--<el-col :span="12">-->
<el-form-item label="隐患自有编号" prop="fHazardOutUniqueCode"> <!--<el-form-item label="隐患自有编号" prop="fHazardOutUniqueCode">-->
<el-input v-model="form.fHazardOutUniqueCode" placeholder="请输入隐患自有编号" /> <!--<el-input v-model="form.fHazardOutUniqueCode" placeholder="请输入隐患自有编号" />-->
</el-form-item> <!--</el-form-item>-->
</el-col> <!--</el-col>-->
<el-col :span="12"> <el-col :span="12">
<el-form-item label="供气企业编码" prop="fInvolveEnterpriseCode"> <el-form-item label="供气企业编码" prop="fInvolveEnterpriseCode">
...@@ -251,22 +266,56 @@ ...@@ -251,22 +266,56 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="隐患分类分级编码" prop="fHazardTypeLevelId"> <el-form-item label="隐患分类" prop="fHiddenType">
<el-select <el-select
v-model="form.fHazardTypeLevelId" v-model="form.fHiddenType"
placeholder="请选择隐患分类分级标准" placeholder="请选择隐患分类"
style="width: 100%" style="width: 100%"
> >
<el-option <el-option
v-for="hidden in hiddenData" v-for="dict in hiddenTypeOptions"
:key="hidden.fInsStaInforId" :key="dict.dictValue"
:label="hidden.fHazardName" :label="dict.dictLabel"
:value="hidden.fInsStaInforId" :value="dict.dictValue"
/> ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患等级" prop="fHiddenLevel">
<el-select
v-model="form.fHiddenLevel"
placeholder="请选择隐患等级"
style="width: 100%"
>
<el-option
v-for="dict in hiddenLevelOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!--<el-col :span="12">-->
<!--<el-form-item label="隐患分类分级编码" prop="fHazardTypeLevelId">-->
<!--<el-select-->
<!--v-model="form.fHazardTypeLevelId"-->
<!--placeholder="请选择隐患分类分级标准"-->
<!--style="width: 100%"-->
<!--&gt;-->
<!--<el-option-->
<!--v-for="hidden in hiddenData"-->
<!--:key="hidden.fInsStaInforId"-->
<!--:label="hidden.fHazardName"-->
<!--:value="hidden.fInsStaInforId"-->
<!--/>-->
<!--</el-select>-->
<!--</el-form-item>-->
<!--</el-col>-->
<el-col :span="24"> <el-col :span="24">
<el-form-item label="隐患描述" prop="fHazardDesc"> <el-form-item label="隐患描述" prop="fHazardDesc">
<el-input v-model="form.fHazardDesc" placeholder="隐患描述" /> <el-input v-model="form.fHazardDesc" placeholder="隐患描述" />
...@@ -285,12 +334,12 @@ ...@@ -285,12 +334,12 @@
<el-option label="否" value="0" /> <el-option label="否" value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
<el-col :span="24"> <el-col :span="24">
<el-form-item label="隐患整改前照片" prop="fBeforePicture"> <el-form-item label="隐患整改前照片" prop="fBeforePicture">
<imageUpload v-model="form.fBeforePicture"/> <imageUpload v-model="form.fBeforePicture"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注" prop="fRemark"> <el-form-item label="备注" prop="fRemark">
<el-input type="textarea" v-model="form.fRemark" placeholder="请输入备注" /> <el-input type="textarea" v-model="form.fRemark" placeholder="请输入备注" />
...@@ -305,7 +354,7 @@ ...@@ -305,7 +354,7 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 处置对话框 --> <!-- 处置对话框 -->
<el-dialog :title="disposeTitle" :visible.sync="disposeOpen" width="900px" append-to-body destroy-on-close :close-on-click-modal="false"> <el-dialog :title="disposeTitle" :visible.sync="disposeOpen" width="900px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form ref="form" :model="form" label-width="140px"> <el-form ref="form" :model="form" label-width="140px">
...@@ -414,7 +463,7 @@ ...@@ -414,7 +463,7 @@
<el-form-item label="隐患描述" prop="fHazardDesc"> <el-form-item label="隐患描述" prop="fHazardDesc">
<el-input disabled v-model="form.fHazardDesc" placeholder="隐患描述" /> <el-input disabled v-model="form.fHazardDesc" placeholder="隐患描述" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="隐患整改前照片" prop="fBeforePicture"> <el-form-item label="隐患整改前照片" prop="fBeforePicture">
<el-image <el-image
...@@ -426,7 +475,7 @@ ...@@ -426,7 +475,7 @@
></el-image> ></el-image>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注" prop="fRemark"> <el-form-item label="备注" prop="fRemark">
...@@ -442,7 +491,7 @@ ...@@ -442,7 +491,7 @@
<el-form-item label="隐患整改后照片" prop="afterPicture"> <el-form-item label="隐患整改后照片" prop="afterPicture">
<imageUpload v-model="form.afterPicture"/> <imageUpload v-model="form.afterPicture"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="处置描述" prop="disposalDetails"> <el-form-item label="处置描述" prop="disposalDetails">
<el-input type="textarea" v-model="form.disposalDetails" placeholder="请输入处置描述" /> <el-input type="textarea" v-model="form.disposalDetails" placeholder="请输入处置描述" />
...@@ -458,6 +507,7 @@ ...@@ -458,6 +507,7 @@
<!-- 详情 --> <!-- 详情 -->
<DetailInfo ref="detail"/> <DetailInfo ref="detail"/>
<Supervision ref="gowork"/>
</div> </div>
</template> </template>
...@@ -465,6 +515,7 @@ ...@@ -465,6 +515,7 @@
import { listRef, getRef, delRef, addRef, updateRef, exportRef,disposeOfInsSpotHazardRef } from "@/api/supervision/spot"; import { listRef, getRef, delRef, addRef, updateRef, exportRef,disposeOfInsSpotHazardRef } from "@/api/supervision/spot";
import ImageUpload from '@/components/ImageUpload'; import ImageUpload from '@/components/ImageUpload';
import DetailInfo from "./components/DetailInfo"; import DetailInfo from "./components/DetailInfo";
import Supervision from "./components/supervision";
import { getTask } from "@/api/govermentdata/GovermentData"; import { getTask } from "@/api/govermentdata/GovermentData";
import { getDefaultCountyList } from "@/api/area/county"; import { getDefaultCountyList } from "@/api/area/county";
import { enterpriseListInfo } from "@/api/regulation/info"; import { enterpriseListInfo } from "@/api/regulation/info";
...@@ -473,7 +524,8 @@ export default { ...@@ -473,7 +524,8 @@ export default {
name: "Ref", name: "Ref",
components: { components: {
ImageUpload, ImageUpload,
DetailInfo DetailInfo,
Supervision
}, },
data() { data() {
return { return {
...@@ -526,6 +578,8 @@ export default { ...@@ -526,6 +578,8 @@ export default {
], ],
}, },
countyInfo: [], countyInfo: [],
hiddenLevelOptions: [],
hiddenTypeOptions: [],
enterpriseList: [], enterpriseList: [],
hiddenData: [] hiddenData: []
}; };
...@@ -535,6 +589,12 @@ export default { ...@@ -535,6 +589,12 @@ export default {
this.getDicts("t_type_code").then(response => { this.getDicts("t_type_code").then(response => {
this.fObjTypeOptions = response.data; this.fObjTypeOptions = response.data;
}); });
this.getDicts("t_hidden_type").then(response => {
this.hiddenLevelOptions = response.data;
});
this.getDicts("t_hidden_trouble_type").then(response => {
this.hiddenTypeOptions = response.data;
});
}, },
methods: { methods: {
//获取数据 // 等正式有接口了,后台要重新一套 拿数据部分 //获取数据 // 等正式有接口了,后台要重新一套 拿数据部分
...@@ -563,6 +623,14 @@ export default { ...@@ -563,6 +623,14 @@ export default {
fObjTypeFormat(row, column) { fObjTypeFormat(row, column) {
return this.selectDictLabel(this.fObjTypeOptions, row.fObjType); return this.selectDictLabel(this.fObjTypeOptions, row.fObjType);
}, },
// 隐患分类
fHiddenTypeFormat(row, column) {
return this.selectDictLabel(this.hiddenTypeOptions, row.fHiddenType);
},
// 隐患等级
fHiddenLevelFormat(row, column) {
return this.selectDictLabel(this.hiddenLevelOptions, row.fHiddenLevel);
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
...@@ -627,10 +695,10 @@ export default { ...@@ -627,10 +695,10 @@ export default {
}); });
}, },
/** 处置按钮 */ /** 处置按钮 */
handleDispose(row) { handleDispose(row) {
const fInsSpotHazardRefId = row.fInsSpotHazardRefId const fInsSpotHazardRefId = row.fInsSpotHazardRefId
getRef(fInsSpotHazardRefId).then(response => { getRef(fInsSpotHazardRefId).then(response => {
this.form = response.data; this.form = response.data;
this.disposeOpen = true; this.disposeOpen = true;
this.disposeTitle = "处置抽查隐患"; this.disposeTitle = "处置抽查隐患";
}); });
...@@ -696,6 +764,10 @@ export default { ...@@ -696,6 +764,10 @@ export default {
handleDetail(row){ handleDetail(row){
this.$refs.detail.getDetailInfo(row.fInsSpotHazardRefId); this.$refs.detail.getDetailInfo(row.fInsSpotHazardRefId);
}, },
//督办
handleSupervision(row){
this.$refs.gowork.getInfo(row.fInsSpotHazardRefId);
},
//获取县级 //获取县级
getCountyInfo(){ getCountyInfo(){
getDefaultCountyList().then(res =>{ getDefaultCountyList().then(res =>{
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<!--<el-form-item label="督导id" prop="supervisionId">-->
<!--<el-input-->
<!--v-model="queryParams.supervisionId"-->
<!--placeholder="请输入督导id"-->
<!--clearable-->
<!--size="small"-->
<!--@keyup.enter.native="handleQuery"-->
<!--/>-->
<!--</el-form-item>-->
<el-form-item label="反馈标题" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入反馈标题"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!--<el-form-item label="企业" prop="enterpriseId">-->
<!--<el-input-->
<!--v-model="queryParams.enterpriseId"-->
<!--placeholder="请输入企业id"-->
<!--clearable-->
<!--size="small"-->
<!--@keyup.enter.native="handleQuery"-->
<!--/>-->
<!--</el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!--<el-row :gutter="10" class="mb8">-->
<!--<el-col :span="1.5">-->
<!--<el-button-->
<!--type="primary"-->
<!--plain-->
<!--icon="el-icon-plus"-->
<!--size="mini"-->
<!--@click="handleAdd"-->
<!--v-hasPermi="['system:feedback:add']"-->
<!--&gt;新增</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:feedback:edit']"-->
<!--&gt;修改</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:feedback:remove']"-->
<!--&gt;删除</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:feedback:export']"-->
<!--&gt;导出</el-button>-->
<!--</el-col>-->
<!--<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!--</el-row>-->
<el-table v-loading="loading" :data="feedbackList" @selection-change="handleSelectionChange">
<el-table-column label="反馈标题" align="center" prop="title" />
<el-table-column label="反馈内容" align="center" prop="content" />
<el-table-column label="图片" align="center" prop="imageUrl" >
<template slot-scope="scope">
<el-image v-if="scope.row.imageUrl" :src="scope.row.imageUrl" :preview-src-list="[scope.row.imageUrl]" :z-index="9999" style="width: 30px;height: 30px;"></el-image>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="文件" align="center" prop="fileUrl" >
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.fileUrl)"
v-if="scope.row.fileUrl != null && scope.row.fileUrl!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="所属企业" align="center" prop="enterpriseName" />
<el-table-column label="反馈人" align="center" prop="person" />
<el-table-column label="联系电话" align="center" prop="phone" />
<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:feedback:edit']"-->
<!--&gt;修改</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:feedback:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改工作督导反馈对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="督导id" prop="supervisionId">
<el-input v-model="form.supervisionId" placeholder="请输入督导id" />
</el-form-item>
<el-form-item label="反馈标题" prop="title">
<el-input v-model="form.title" placeholder="请输入反馈标题" />
</el-form-item>
<el-form-item label="反馈内容">
<editor v-model="form.content" :min-height="192"/>
</el-form-item>
<el-form-item label="图片" prop="imageUrl">
<el-input v-model="form.imageUrl" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="文件" prop="fileUrl">
<el-input v-model="form.fileUrl" placeholder="请输入文件" />
</el-form-item>
<el-form-item label="企业id" prop="enterpriseId">
<el-input v-model="form.enterpriseId" placeholder="请输入企业id" />
</el-form-item>
<el-form-item label="反馈人" prop="person">
<el-input v-model="form.person" placeholder="请输入反馈人" />
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" 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 { listFeedback, getFeedback, delFeedback, addFeedback, updateFeedback, exportFeedback } from "@/api/supervision/feedback";
import Editor from '@/components/Editor';
export default {
name: "Feedback",
components: {
Editor,
},
props: {
supervisionId: {
type: Number,
},
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 工作督导反馈表格数据
feedbackList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
supervisionId: null,
title: null,
enterpriseId: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询工作督导反馈列表 */
getList() {
this.queryParams.supervisionId = this.supervisionId;
this.loading = true;
listFeedback(this.queryParams).then(response => {
this.feedbackList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
feedbackId: null,
supervisionId: null,
title: null,
content: null,
imageUrl: null,
fileUrl: null,
enterpriseId: null,
person: null,
phone: null,
createTime: 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.feedbackId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加工作督导反馈";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const feedbackId = row.feedbackId || this.ids
getFeedback(feedbackId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改工作督导反馈";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.feedbackId != null) {
updateFeedback(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addFeedback(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const feedbackIds = row.feedbackId || this.ids;
this.$confirm('是否确认删除工作督导反馈编号为"' + feedbackIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delFeedback(feedbackIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有工作督导反馈数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportFeedback(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="type">
<el-select v-model="queryParams.type" placeholder="请选择督导类型" clearable size="small">
<el-option
v-for="dict in typeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="督导标题" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入督导标题"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
<el-option
v-for="dict in statusOptions"
: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:supervision: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:supervision: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:supervision: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:supervision:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="supervisionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="督导类型" align="center" prop="type" :formatter="typeFormat" />
<el-table-column label="督导标题" align="center" prop="title" />
<el-table-column label="督导内容" align="center" prop="content" />
<el-table-column label="反馈状态" align="center" prop="status">
<template slot-scope="scope">
<span v-if="scope.row.status==1" style="color: #ff4949" >未反馈</span>
<span v-if="scope.row.status==2" @click="openfeed(scope.row)" style="color: rgb(48, 180, 107);cursor: pointer">已反馈</span>
<span v-if="scope.row.status==0">不需反馈</span>
</template>
</el-table-column>
<el-table-column label="图片" align="center" prop="imageUrl" >
<template slot-scope="scope">
<el-image v-if="scope.row.imageUrl" :src="scope.row.imageUrl" :preview-src-list="[scope.row.imageUrl]" :z-index="9999" style="width: 30px;height: 30px;"></el-image>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="文件" align="center" prop="fileUrl" >
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.fileUrl)"
v-if="scope.row.fileUrl != null && scope.row.fileUrl!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-if="scope.row.status==2"
size="mini"
type="text"
icon="el-icon-edit"
@click="openfeed(scope.row)"
>反馈信息</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:supervision:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:supervision:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-dialog :title="title" :visible.sync="open2" width="1200px" append-to-body>
<Feedback :supervisionId="supervisionId" />
</el-dialog>
<!-- 添加或修改工作督导对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="督导类型" prop="type">
<el-select v-model="form.type" placeholder="请选择督导类型">
<el-option
v-for="dict in typeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="督导标题" prop="title">
<el-input v-model="form.title" placeholder="请输入督导标题" />
</el-form-item>
<el-form-item label="督导内容" prop="content">
<el-input v-model="form.content" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="是否反馈">
<el-radio-group v-model="form.status">
<el-radio
label="0"
></el-radio>
<el-radio
label="1"
></el-radio>
<!--<el-radio-->
<!--v-for="dict in statusOptions"-->
<!--:key="dict.dictValue"-->
<!--:label="parseInt(dict.dictValue)"-->
<!--&gt;{{dict.dictLabel}}</el-radio>-->
</el-radio-group>
</el-form-item>
<el-form-item label="图片" prop="imageUrl">
<imageUpload v-model="form.imageUrl"/>
<!--<el-input v-model="form.imageUrl" type="textarea" placeholder="请输入内容" />-->
</el-form-item>
<el-form-item label="文件" prop="fileUrl">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="form.fileUrl"></el-input>
</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 { listSupervision, getSupervision, delSupervision, addSupervision, updateSupervision, exportSupervision } from "@/api/supervision/supervision";
import FileUpload from '@/components/FileUpload';
import ImageUpload from '@/components/ImageUpload';
import Feedback from "./feedback/index"
let uploadfile = require("@/assets/uploadfile.png");
export default {
name: "Supervision",
components: {
FileUpload,ImageUpload,Feedback
},
data() {
return {
supervisionId:null,
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 工作督导表格数据
supervisionList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
open2:false,
// 督导类型字典
typeOptions: [],
// 状态字典
statusOptions: [],
fileList:[],
fileList2:[],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
type: null,
title: null,
status: null,
},
// 表单参数
form: {
status:0
},
// 表单校验
rules: {
type: [
{ required: true, message: "督导类型不能为空", trigger: "change" }
],
title: [
{ required: true, message: "督导标题不能为空", trigger: "blur" }
],
content: [
{ required: true, message: "督导内容不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
this.getDicts("t_supervision_type").then(response => {
this.typeOptions = response.data;
});
this.getDicts("t_supervision_status").then(response => {
this.statusOptions = response.data;
});
},
methods: {
/** 查询工作督导列表 */
getList() {
this.loading = true;
listSupervision(this.queryParams).then(response => {
this.supervisionList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 督导类型字典翻译
typeFormat(row, column) {
return this.selectDictLabel(this.typeOptions, row.type);
},
// 状态字典翻译
status1Format(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
//上传
getFileInfo(res){
//this.form.dealPlan = res.fileName;
this.form.fileUrl = res.url;
this.fileList.push({
name: res.fileName,
url: uploadfile,
});
},
listRemove(e) {
this.form.fileUrl = "";
this.fileList = [];
},
checkFile(url) {
window.open(url,'_blank');
},
//点击下载
downloadFile() {
var item = this.fileurl;
var title = item.split("/")[item.split("/").length-1];
this.download(item,title);
},
download (src, fileName) {
let x = new XMLHttpRequest();
x.open("GET", src, true);
x.responseType = 'blob';
x.onload = function(e) {
let url = window.URL.createObjectURL(x.response)
let a = document.createElement('a');
a.href = url
a.download = fileName
a.click()
}
x.send();
},
// 取消按钮
cancel() {
this.fileList = [];
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
supervisionId: null,
type: null,
title: null,
content: null,
status: "0",
imageUrl: null,
fileUrl: null,
createTime: null,
createBy: 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.supervisionId)
this.single = selection.length!==1
this.multiple = !selection.length
},
openfeed(row){
this.title = "反馈";
this.supervisionId = row.supervisionId;
this.open2 = true;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加工作督导";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const supervisionId = row.supervisionId || this.ids
getSupervision(supervisionId).then(response => {
this.form = response.data;
this.fileList.push({
name: "督导文件",
url: uploadfile,
});
this.open = true;
this.title = "修改工作督导";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.supervisionId != null) {
updateSupervision(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addSupervision(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const supervisionIds = row.supervisionId || this.ids;
this.$confirm('是否确认删除工作督导编号为"' + supervisionIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delSupervision(supervisionIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有工作督导数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportSupervision(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
<style scoped lang="scss">
::v-deep .el-select{
width: 100%;
}
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment