Commit 4a44d15b authored by 耿迪迪's avatar 耿迪迪
parents bc5e7485 5bc24aae
......@@ -44,7 +44,7 @@ public class TRiskDevMajInforController extends BaseController
@GetMapping("/export")
public AjaxResult export(TRiskDevMajInfor tRiskDevMajInfor)
{
List<TRiskDevMajInfor> list = tRiskDevMajInforService.selectTRiskDevMajInforList(tRiskDevMajInfor);
List<TRiskDevMajInfor> list = tRiskDevMajInforService.exportRiskDevMajInforList(tRiskDevMajInfor);
ExcelUtil<TRiskDevMajInfor> util = new ExcelUtil<TRiskDevMajInfor>(TRiskDevMajInfor.class);
return util.exportExcel(list, "重要风险点管控数据");
}
......
......@@ -51,7 +51,7 @@ public class TConGasProIncController extends BaseController
@GetMapping("/export")
public AjaxResult export(TConGasProInc tConGasProInc)
{
List<TConGasProInc> list = tConGasProIncService.selectTConGasProIncList(tConGasProInc);
List<TConGasProInc> list = tConGasProIncService.exportTConGasProIncList(tConGasProInc);
ExcelUtil<TConGasProInc> util = new ExcelUtil<TConGasProInc>(TConGasProInc.class);
return util.exportExcel(list, "第三方施工-涉气第三方施工意外事件数据");
}
......
......@@ -56,7 +56,7 @@ public class TConGasProInforController extends BaseController
@GetMapping("/export")
public AjaxResult export(TConGasProInfor tConGasProInfor)
{
List<TConGasProInfor> list = tConGasProInforService.selectTConGasProInforList(tConGasProInfor);
List<TConGasProInfor> list = tConGasProInforService.exportTConGasProInforList(tConGasProInfor);
ExcelUtil<TConGasProInfor> util = new ExcelUtil<TConGasProInfor>(TConGasProInfor.class);
return util.exportExcel(list, "第三方施工-涉气第三方施工项目档案数据");
}
......
......@@ -24,6 +24,11 @@ public class TConGasProInc extends BaseEntity
/** 项目编码 */
private String fIntersectConstructionId;
/** 燃气企业 */
@Excel(name = "燃气企业")
private String fCompanyInfoId;
@Excel(name = "项目编码")
private String projectCode;
......@@ -48,16 +53,17 @@ public class TConGasProInc extends BaseEntity
private String fRemark;
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
@Excel(name = "最后修改时间")
private String fUpdateTime;
/**
* 企业端上传时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上传时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date entUploadTime;
/**
* 企业端上传状态 0-未上传,1-已上传*/
@Excel(name = "上传状态",readConverterExp = "1=已上传,0=未上传")
private String entUploadState;
/**
......@@ -69,10 +75,14 @@ public class TConGasProInc extends BaseEntity
* 企业端上传状态 0-未上传,1-已上传*/
private String govUploadState;
/** 燃气企业编码 */
@Excel(name = "燃气企业编码")
private String fCompanyInfoId;
public void updateFields() {
this.entUploadState = govUploadState;
if (govUploadTime != null) {
this.entUploadTime = govUploadTime;
} else {
this.entUploadTime = null;
}
}
public Date getEntUploadTime() {
return entUploadTime;
}
......
package com.zehong.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.utils.DateUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
......@@ -21,6 +22,18 @@ public class TConGasProInfor extends BaseEntity
/** id */
private Long fConGasProInforId;
/** 燃气企业编码 */
private String fCompanyInfoId;
@Excel(name = "燃气企业")
private String companyInfoName;
/** 所属县级行政区ID */
private Long fDistrictId;
@Excel(name = "所属县级行政区")
private String districtName;
/** 项目编码,6位县级行政区划编码+4位年+4位顺序码 */
@Excel(name = "项目编码")
private String fProjectCode;
......@@ -45,9 +58,6 @@ public class TConGasProInfor extends BaseEntity
@Excel(name = "项目位置描述")
private String fAddress;
/** 所属县级行政区ID */
@Excel(name = "所属县级行政区ID")
private Long fDistrictId;
/** 经度 */
@Excel(name = "经度")
......@@ -59,10 +69,9 @@ public class TConGasProInfor extends BaseEntity
/** 涉气施工点位位置属性 1城镇,2 农村 */
@Excel(name = "涉气施工点位位置属性",readConverterExp = "1=城镇,2=农村")
private Long fConstructionPointType;
private String fConstructionPointType;
/** 涉及村,村级行政区ID */
@Excel(name = "涉及村,村级行政区ID")
private Long fVillageId;
/** 管道压力等级分类,按分类代码表14分类填写
......@@ -81,11 +90,11 @@ public class TConGasProInfor extends BaseEntity
/** 施工是否主动报备 1 是 0 否 */
@Excel(name = "施工是否主动报备",readConverterExp = "1=是,0=否")
private Long fReportFlag;
private String fReportFlag;
/** 施工状态,1 未开工,2 正在施工,3 已完工 */
@Excel(name = "施工状态",readConverterExp = "1=未开工,2=正在施工,3=已完工")
private Long fConstructionStatus;
private String fConstructionStatus;
/** 建设单位名称 */
@Excel(name = "建设单位名称")
......@@ -139,9 +148,6 @@ public class TConGasProInfor extends BaseEntity
@Excel(name = "监理单位总监理工程师电话")
private String fChiefEngineerPhone;
/** 燃气企业编码 */
@Excel(name = "燃气企业编码")
private String fCompanyInfoId;
/** 施工点位巡线员编码 */
@Excel(name = "施工点位巡线员编码")
......@@ -183,16 +189,17 @@ public class TConGasProInfor extends BaseEntity
private String fRemark;
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
@Excel(name = "最后修改时间")
private String fUpdateTime;
/**
* 企业端上传时间 */
@Excel(name = "上传时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date entUploadTime;
/**
* 企业端上传状态 0-未上传,1-已上传*/
@Excel(name = "上传状态",readConverterExp = "1=已上传,0=未上传")
private String entUploadState;
/**
......@@ -203,6 +210,16 @@ public class TConGasProInfor extends BaseEntity
/**
* 企业端上传状态 0-未上传,1-已上传*/
private String govUploadState;
public void updateFields() {
this.entUploadState = govUploadState;
if (govUploadTime != null) {
this.entUploadTime = govUploadTime;
} else {
this.entUploadTime = null;
}
}
public void setfConGasProInforId(Long fConGasProInforId)
{
this.fConGasProInforId = fConGasProInforId;
......@@ -293,12 +310,12 @@ public class TConGasProInfor extends BaseEntity
{
return fConstructionLatitude;
}
public void setfConstructionPointType(Long fConstructionPointType)
public void setfConstructionPointType(String fConstructionPointType)
{
this.fConstructionPointType = fConstructionPointType;
}
public Long getfConstructionPointType()
public String getfConstructionPointType()
{
return fConstructionPointType;
}
......@@ -320,21 +337,21 @@ public class TConGasProInfor extends BaseEntity
{
return fPipePress;
}
public void setfReportFlag(Long fReportFlag)
public void setfReportFlag(String fReportFlag)
{
this.fReportFlag = fReportFlag;
}
public Long getfReportFlag()
public String getfReportFlag()
{
return fReportFlag;
}
public void setfConstructionStatus(Long fConstructionStatus)
public void setfConstructionStatus(String fConstructionStatus)
{
this.fConstructionStatus = fConstructionStatus;
}
public Long getfConstructionStatus()
public String getfConstructionStatus()
{
return fConstructionStatus;
}
......@@ -596,6 +613,22 @@ public class TConGasProInfor extends BaseEntity
this.govUploadState = govUploadState;
}
public String getCompanyInfoName() {
return companyInfoName;
}
public void setCompanyInfoName(String companyInfoName) {
this.companyInfoName = companyInfoName;
}
public String getDistrictName() {
return districtName;
}
public void setDistrictName(String districtName) {
this.districtName = districtName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -116,7 +116,7 @@ public class TPipeOldPlanProcess extends BaseEntity
private String fUploadType;
/** 上传时间,yyyy-MM-dd hh:mm:ss */
@Excel(name = "上传时间")
@Excel(name = "上传时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String fUploadTime;
......
......@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 重要风险点管控对象 t_risk_dev_maj_infor
*
......@@ -72,6 +74,36 @@ public class TRiskDevMajInfor extends BaseEntity
@Excel(name = "最后修改时间")
private String fUpdateTime;
/**
* 企业端上传状态 0-未上传,1-已上传,Excel 企业和政府通用
*/
@Excel(name = "上传状态",readConverterExp = "1=已上传,0=未上传")
private String entUploadState;
/**
* 企业端上传时间 Excel 企业和政府通用
*/
@Excel(name = "上传时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date entUploadTime;
/**
* 政府端上传 状态
*/
private String govUploadState;
/**
* 政府端上传 时间
*/
private Date govUploadTime;
public void updateFields() {
this.entUploadState = govUploadState;
if (govUploadTime != null) {
this.entUploadTime = govUploadTime;
} else {
this.entUploadTime = null;
}
}
public void setfRiskDevMajInforId(Long fRiskDevMajInforId)
{
this.fRiskDevMajInforId = fRiskDevMajInforId;
......@@ -190,6 +222,38 @@ public class TRiskDevMajInfor extends BaseEntity
return fUpdateTime;
}
public String getEntUploadState() {
return entUploadState;
}
public void setEntUploadState(String entUploadState) {
this.entUploadState = entUploadState;
}
public Date getEntUploadTime() {
return entUploadTime;
}
public void setEntUploadTime(Date entUploadTime) {
this.entUploadTime = entUploadTime;
}
public String getGovUploadState() {
return govUploadState;
}
public void setGovUploadState(String govUploadState) {
this.govUploadState = govUploadState;
}
public Date getGovUploadTime() {
return govUploadTime;
}
public void setGovUploadTime(Date govUploadTime) {
this.govUploadTime = govUploadTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -29,6 +29,13 @@ public interface TConGasProIncMapper
*/
public List<TConGasProInc> selectTConGasProIncList(TConGasProInc tConGasProInc);
/**
* 查询第三方施工-涉气第三方施工意外事件列表 - 导出
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 第三方施工-涉气第三方施工意外事件集合
*/
public List<TConGasProInc> exportTConGasProInforList(TConGasProInc tConGasProInc);
/**
* 新增第三方施工-涉气第三方施工意外事件
*
......
......@@ -29,6 +29,14 @@ public interface TConGasProInforMapper
*/
public List<TConGasProInfor> selectTConGasProInforList(TConGasProInfor tConGasProInfor);
/**
* 查询第三方施工-涉气第三方施工项目档案列表-导出用
*
* @param tConGasProInfor 第三方施工-涉气第三方施工项目档案
* @return 第三方施工-涉气第三方施工项目档案集合
*/
public List<TConGasProInfor> exportTConGasProInforList(TConGasProInfor tConGasProInfor);
/**
* 新增第三方施工-涉气第三方施工项目档案
*
......
......@@ -27,6 +27,14 @@ public interface TRiskDevMajInforMapper
*/
public List<TRiskDevMajInfor> selectTRiskDevMajInforList(TRiskDevMajInfor tRiskDevMajInfor);
/**
* 查询重要风险点管控列表 - 导出
*
* @param tRiskDevMajInfor 重要风险点管控
* @return 重要风险点管控集合
*/
public List<TRiskDevMajInfor> exportRiskDevMajInforList(TRiskDevMajInfor tRiskDevMajInfor);
/**
* 新增重要风险点管控
*
......
......@@ -27,6 +27,13 @@ public interface ITConGasProIncService
*/
public List<TConGasProInc> selectTConGasProIncList(TConGasProInc tConGasProInc);
/**
* 查询第三方施工-涉气第三方施工意外事件列表-导出
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 第三方施工-涉气第三方施工意外事件集合
*/
List<TConGasProInc> exportTConGasProIncList(TConGasProInc tConGasProInc);
/**
* 新增第三方施工-涉气第三方施工意外事件
*
......
......@@ -27,6 +27,14 @@ public interface ITConGasProInforService
*/
public List<TConGasProInfor> selectTConGasProInforList(TConGasProInfor tConGasProInfor);
/**
* 查询第三方施工-涉气第三方施工项目档案列表-导出用
*
* @param tConGasProInfor 第三方施工-涉气第三方施工项目档案
* @return 第三方施工-涉气第三方施工项目档案集合
*/
public List<TConGasProInfor> exportTConGasProInforList(TConGasProInfor tConGasProInfor);
/**
* 新增第三方施工-涉气第三方施工项目档案
*
......
......@@ -27,6 +27,13 @@ public interface ITRiskDevMajInforService
*/
public List<TRiskDevMajInfor> selectTRiskDevMajInforList(TRiskDevMajInfor tRiskDevMajInfor);
/**
* 查询重要风险点管控列表 - 导出用
*
* @param tRiskDevMajInfor 重要风险点管控
* @return 重要风险点管控集合
*/
List<TRiskDevMajInfor> exportRiskDevMajInforList(TRiskDevMajInfor tRiskDevMajInfor);
/**
* 新增重要风险点管控
*
......
......@@ -2,11 +2,13 @@ package com.zehong.system.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.zehong.common.core.domain.entity.SysRole;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.GovernmentDataCopyUtil;
import com.zehong.common.utils.GovernmentDataUtil;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.TConGasProInc;
import com.zehong.system.domain.TConGasProInfor;
import com.zehong.system.domain.vo.TConGasProIncVo;
import com.zehong.system.mapper.TConGasProIncMapper;
import com.zehong.system.service.ITConGasProIncService;
......@@ -20,6 +22,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 第三方施工-涉气第三方施工意外事件Service业务层处理
......@@ -62,13 +65,42 @@ public class TConGasProIncServiceImpl implements ITConGasProIncService
{
SysRole sysRole = SecurityUtils.getLoginUser().getUser().getRoles().get(0);
// 不是超级管理员也不是企业
if (sysRole.getRoleId() != 1 && sysRole.getRoleId() != 5) {
if (sysRole.getRoleId() == 3) {
tConGasProInc.setEntUploadState("1");
}
return tConGasProIncMapper.selectTConGasProIncList(tConGasProInc);
}
/**
* 查询第三方施工-涉气第三方施工意外事件列表
*
* @param tConGasProInc 第三方施工-涉气第三方施工意外事件
* @return 第三方施工-涉气第三方施工意外事件
*/
@Override
public List<TConGasProInc> exportTConGasProIncList(TConGasProInc tConGasProInc)
{
LoginUser loginUser = SecurityUtils.getLoginUser();
// 如果是 政府端 则 把 govUploadState 赋值给 entUploadState, 把 govUploadTime 赋值给 entUploadTime
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
tConGasProInc.setEntUploadState("1");
}
List<TConGasProInc> tConGasProIncs = tConGasProIncMapper.selectTConGasProIncList(tConGasProInc);
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
if(tConGasProIncs.size() > 0) {
return tConGasProIncs.stream().peek(TConGasProInc::updateFields).collect(Collectors.toList());
}
}
return tConGasProIncMapper.selectTConGasProIncList(tConGasProInc);
}
/**
* 新增第三方施工-涉气第三方施工意外事件
*
......
......@@ -7,6 +7,7 @@ import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.*;
import com.zehong.system.domain.SysSetting;
import com.zehong.system.domain.TConGasProInfor;
import com.zehong.system.domain.TPipeOldPlanProcess;
import com.zehong.system.domain.vo.TConGasProInforVo;
import com.zehong.system.mapper.TConGasProInforMapper;
import com.zehong.system.service.ISysSettingService;
......@@ -24,6 +25,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 第三方施工-涉气第三方施工项目档案Service业务层处理
......@@ -77,6 +79,33 @@ public class TConGasProInforServiceImpl implements ITConGasProInforService
return tConGasProInforMapper.selectTConGasProInforList(tConGasProInfor);
}
/**
* 查询第三方施工-涉气第三方施工项目档案列表
*
* @param tConGasProInfor 第三方施工-涉气第三方施工项目档案
* @return 第三方施工-涉气第三方施工项目档案
*/
@Override
public List<TConGasProInfor> exportTConGasProInforList(TConGasProInfor tConGasProInfor)
{
LoginUser loginUser = SecurityUtils.getLoginUser();
// 如果是 政府端 则 把 govUploadState 赋值给 entUploadState, 把 govUploadTime 赋值给 entUploadTime
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
tConGasProInfor.setEntUploadState("1");
}
List<TConGasProInfor> tConGasProInfors = tConGasProInforMapper.exportTConGasProInforList(tConGasProInfor);
if(loginUser.getUser().getRoles().get(0).getRoleId()==3){
if(tConGasProInfors.size() > 0) {
return tConGasProInfors.stream().peek(TConGasProInfor::updateFields).collect(Collectors.toList());
}
}
return tConGasProInforMapper.exportTConGasProInforList(tConGasProInfor);
}
/**
* 新增第三方施工-涉气第三方施工项目档案
*
......
package com.zehong.system.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.zehong.common.core.domain.entity.SysRole;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.GovernmentDataCopyUtil;
import com.zehong.common.utils.GovernmentDataUtil;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TConGasProInfor;
import com.zehong.system.domain.TRiskDevMajInfor;
import com.zehong.system.domain.vo.TRiskDevMajInfoVo;
import com.zehong.system.mapper.TRiskDevMajInforMapper;
......@@ -21,6 +24,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 重要风险点管控Service业务层处理
......@@ -33,7 +37,7 @@ public class TRiskDevMajInforServiceImpl implements ITRiskDevMajInforService
{
private static final Logger log = LoggerFactory.getLogger(TRiskDevMajInforServiceImpl.class);
@Autowired
@Resource
private TRiskDevMajInforMapper tRiskDevMajInforMapper;
@Resource
......@@ -63,9 +67,39 @@ public class TRiskDevMajInforServiceImpl implements ITRiskDevMajInforService
@Override
public List<TRiskDevMajInfor> selectTRiskDevMajInforList(TRiskDevMajInfor tRiskDevMajInfor)
{
SysRole sysRole = SecurityUtils.getLoginUser().getUser().getRoles().get(0);
if (sysRole.getRoleId() == 3) {
tRiskDevMajInfor.setEntUploadState("1");
}
return tRiskDevMajInforMapper.selectTRiskDevMajInforList(tRiskDevMajInfor);
}
/**
* 查询重要风险点管控列表
*
* @param tRiskDevMajInfor 重要风险点管控 - 导出
* @return 重要风险点管控
*/
@Override
public List<TRiskDevMajInfor> exportRiskDevMajInforList(TRiskDevMajInfor tRiskDevMajInfor)
{
SysRole sysRole = SecurityUtils.getLoginUser().getUser().getRoles().get(0);
if (sysRole.getRoleId() == 3) {
tRiskDevMajInfor.setEntUploadState("1");
}
List<TRiskDevMajInfor> tRiskDevMajInfors = tRiskDevMajInforMapper.exportRiskDevMajInforList(tRiskDevMajInfor);
if(sysRole.getRoleId()==3){
if(tRiskDevMajInfors.size() > 0) {
return tRiskDevMajInfors.stream().peek(TRiskDevMajInfor::updateFields).collect(Collectors.toList());
}
}
return tRiskDevMajInforMapper.exportRiskDevMajInforList(tRiskDevMajInfor);
}
/**
* 新增重要风险点管控
*
......
......@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fDescription" column="f_description" />
<result property="fOccurrenctTime" column="f_occurrenct_time" />
<result property="fAttachment" column="f_attachment" />
<result property="fCompanyInfoId" column="f_company_info_id" />
<result property="fRemark" column="f_remark" />
<result property="fUpdateTime" column="f_update_time" />
......@@ -35,10 +36,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
inc.f_ent_upload_state,
inc.f_gov_upload_time,
inc.f_gov_upload_state,
info.f_project_code AS projectCode
info.f_project_code AS projectCode,
enterprise.enterprise_name as f_company_info_id
FROM
t_con_gas_pro_inc inc
LEFT JOIN t_con_gas_pro_infor info ON info.f_con_gas_pro_infor_id = inc.f_intersect_construction_id
LEFT JOIN t_enterprise_info enterprise ON info.f_company_info_id = enterprise.enterprise_id
</sql>
<select id="selectTConGasProIncList" parameterType="TConGasProInc" resultMap="TConGasProIncResult">
......@@ -56,7 +59,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by f_update_time desc
</select>
<select id="exportTConGasProInforList" parameterType="TConGasProInc" resultMap="TConGasProIncResult">
<include refid="selectTConGasProIncVo"/>
<where>
<if test="fIntersectConstructionId != null and fIntersectConstructionId != ''"> and info.f_project_code like concat('%', #{fIntersectConstructionId}, '%')</if>
<if test="fTitle != null and fTitle != ''"> and inc.f_title like concat('%', #{fTitle}, '%')</if>
<if test="fDescription != null and fDescription != ''"> and inc.f_description = #{fDescription}</if>
<if test="fOccurrenctTime != null and fOccurrenctTime != ''"> and inc.f_occurrenct_time = #{fOccurrenctTime}</if>
<if test="fAttachment != null and fAttachment != ''"> and inc.f_attachment = #{fAttachment}</if>
<if test="fRemark != null and fRemark != ''"> and inc.f_remark = #{fRemark}</if>
<if test="fUpdateTime != null and fUpdateTime != ''"> and inc.f_update_time = #{fUpdateTime}</if>
<if test="fCompanyInfoId != null and fCompanyInfoId != ''"> and inc.f_company_info_id = #{fCompanyInfoId}</if>
<if test="entUploadState != null and entUploadState != ''"> and inc.f_ent_upload_state = #{entUploadState}</if>
</where>
order by f_update_time desc
</select>
<select id="selectTConGasProIncById" parameterType="Long" resultMap="TConGasProIncResult">
<include refid="selectTConGasProIncVo"/>
where inc.f_con_gas_pro_inc_id = #{fConGasProIncId}
......
......@@ -56,6 +56,74 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select f_con_gas_pro_infor_id, f_project_code, f_project_no, f_project_name, f_construction_start, f_construction_end, f_address, f_district_id, f_construction_longitude, f_construction_latitude, f_construction_point_type, f_village_id, f_pipe_press, f_report_flag, f_construction_status, f_build_department, f_project_leader, f_project_leader_phone, f_industry, f_department_name, f_construct_department, f_build_project_leader_name, f_build_project_leader_phone, f_technical_leader_name, f_technical_leader_phone, f_supervision_unit_name, f_chief_engineer_name, f_chief_engineer_phone, f_company_info_id, f_patrol_safety_officer_no, f_partrol_safety_officer_name, f_patrol_safety_officer_phone, f_resident_safety_officer_no, f_resident_safety_officer_name, f_resident_safety_officer_phone, f_gas_company_station_no, f_gas_company_station_name, f_gas_company_station_phone, f_remark, f_update_time,f_ent_upload_time,f_ent_upload_state,f_gov_upload_time,f_gov_upload_state from t_con_gas_pro_infor
</sql>
<resultMap type="TConGasProInfor" id="TConGasProInforResultForExport">
<result property="fConGasProInforId" column="f_con_gas_pro_infor_id" />
<result property="fProjectCode" column="f_project_code" />
<result property="fProjectNo" column="f_project_no" />
<result property="fProjectName" column="f_project_name" />
<result property="fConstructionStart" column="f_construction_start" />
<result property="fConstructionEnd" column="f_construction_end" />
<result property="fAddress" column="f_address" />
<result property="fDistrictId" column="f_district_id" />
<result property="districtName" column="regionName" />
<result property="fConstructionLongitude" column="f_construction_longitude" />
<result property="fConstructionLatitude" column="f_construction_latitude" />
<result property="fConstructionPointType" column="f_construction_point_type" />
<result property="fVillageId" column="f_village_id" />
<result property="fPipePress" column="f_pipe_press" />
<result property="fReportFlag" column="f_report_flag" />
<result property="fConstructionStatus" column="f_construction_status" />
<result property="fBuildDepartment" column="f_build_department" />
<result property="fProjectLeader" column="f_project_leader" />
<result property="fProjectLeaderPhone" column="f_project_leader_phone" />
<result property="fIndustry" column="f_industry" />
<result property="fDepartmentName" column="f_department_name" />
<result property="fConstructDepartment" column="f_construct_department" />
<result property="fBuildProjectLeaderName" column="f_build_project_leader_name" />
<result property="fBuildProjectLeaderPhone" column="f_build_project_leader_phone" />
<result property="fTechnicalLeaderName" column="f_technical_leader_name" />
<result property="fTechnicalLeaderPhone" column="f_technical_leader_phone" />
<result property="fSupervisionUnitName" column="f_supervision_unit_name" />
<result property="fChiefEngineerName" column="f_chief_engineer_name" />
<result property="fChiefEngineerPhone" column="f_chief_engineer_phone" />
<result property="fCompanyInfoId" column="f_company_info_id" />
<result property="companyInfoName" column="enterpriseName" />
<result property="fPatrolSafetyOfficerNo" column="f_patrol_safety_officer_no" />
<result property="fPartrolSafetyOfficerName" column="f_partrol_safety_officer_name" />
<result property="fPatrolSafetyOfficerPhone" column="f_patrol_safety_officer_phone" />
<result property="fResidentSafetyOfficerNo" column="f_resident_safety_officer_no" />
<result property="fResidentSafetyOfficerName" column="f_resident_safety_officer_name" />
<result property="fResidentSafetyOfficerPhone" column="f_resident_safety_officer_phone" />
<result property="fGasCompanyStationNo" column="f_gas_company_station_no" />
<result property="fGasCompanyStationName" column="f_gas_company_station_name" />
<result property="fGasCompanyStationPhone" column="f_gas_company_station_phone" />
<result property="fRemark" column="f_remark" />
<result property="fUpdateTime" column="f_update_time" />
<result property="entUploadTime" column="f_ent_upload_time" />
<result property="entUploadState" column="f_ent_upload_state" />
<result property="govUploadTime" column="f_gov_upload_time" />
<result property="govUploadState" column="f_gov_upload_state" />
</resultMap>
<sql id="exprotTConGasProInforVo">
select f_con_gas_pro_infor_id, f_project_code, f_project_no, f_project_name, f_construction_start,
f_construction_end, f_address, f_district_id,
region.f_name as regionName,f_construction_longitude, f_construction_latitude,
f_construction_point_type, f_village_id, f_pipe_press, f_report_flag, f_construction_status,
f_build_department, f_project_leader, f_project_leader_phone, f_industry, f_department_name,
f_construct_department, f_build_project_leader_name, f_build_project_leader_phone,
f_technical_leader_name, f_technical_leader_phone, f_supervision_unit_name, f_chief_engineer_name,
f_chief_engineer_phone, f_company_info_id,
enterprise.enterprise_name as enterpriseName,f_patrol_safety_officer_no, f_partrol_safety_officer_name,
f_patrol_safety_officer_phone, f_resident_safety_officer_no, f_resident_safety_officer_name,
f_resident_safety_officer_phone, f_gas_company_station_no, f_gas_company_station_name,
f_gas_company_station_phone, f_remark, f_update_time,f_ent_upload_time,f_ent_upload_state,
f_gov_upload_time,f_gov_upload_state from t_con_gas_pro_infor gasInfo left join t_enterprise_info enterprise on gasInfo.f_company_info_id = enterprise.enterprise_id
left join t_county_level_region region on gasInfo.f_district_id = region.f_id
</sql>
<select id="selectTConGasProInforList" parameterType="TConGasProInfor" resultMap="TConGasProInforResult">
<include refid="selectTConGasProInforVo"/>
<where>
......@@ -68,7 +136,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by f_update_time desc
</select>
<select id="exportTConGasProInforList" parameterType="TConGasProInfor" resultMap="TConGasProInforResultForExport">
<include refid="exprotTConGasProInforVo"/>
<where>
<if test="fProjectCode != null and fProjectCode != ''"> and f_project_code like concat('%', #{fProjectCode}, '%')</if>
<if test="fProjectNo != null "> and f_project_no = #{fProjectNo}</if>
<if test="fProjectName != null and fProjectName != ''"> and f_project_name like concat('%', #{fProjectName}, '%')</if>
<if test="fPipePress != null and fPipePress != ''"> and f_pipe_press = #{fPipePress}</if>
<if test="entUploadState != null and entUploadState != ''"> and f_ent_upload_state = #{entUploadState}</if>
<if test="fCompanyInfoId != null and fCompanyInfoId != ''"> and f_company_info_id = #{fCompanyInfoId}</if>
</where>
order by f_update_time desc
</select>
<select id="selectTConGasProInforById" parameterType="Long" resultMap="TConGasProInforResult">
<include refid="selectTConGasProInforVo"/>
where f_con_gas_pro_infor_id = #{fConGasProInforId}
......
......@@ -18,10 +18,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fRiskControlMeasures" column="f_risk_control_measures" />
<result property="fRemark" column="f_remark" />
<result property="fUpdateTime" column="f_update_time" />
<result property="entUploadTime" column="f_ent_upload_time" />
<result property="entUploadState" column="f_ent_upload_state" />
<result property="govUploadTime" column="f_gov_upload_time" />
<result property="govUploadState" column="f_gov_upload_state" />
</resultMap>
<sql id="selectTRiskDevMajInforVo">
select f_risk_dev_maj_infor_id, f_risk_code, f_risk_name, f_company_id, f_region_id, f_risk_type, f_risk_place_detail, f_lon, f_lat, f_risk_structure, f_risk_control_measures, f_remark, f_update_time from t_risk_dev_maj_infor
select f_risk_dev_maj_infor_id,
f_risk_code,
f_risk_name,
f_company_id,
f_region_id,
f_risk_type,
f_risk_place_detail,
f_lon,
f_lat,
f_risk_structure,
f_risk_control_measures,
f_remark,
f_update_time,
f_ent_upload_time,
f_ent_upload_state,
f_gov_upload_time,
f_gov_upload_state
from t_risk_dev_maj_infor
</sql>
<sql id="exportRiskDevMajInforVo">
select f_risk_dev_maj_infor_id,
f_risk_code,
f_risk_name,
enterprise.enterprise_name as f_company_id,
region.f_name as f_region_id,
f_risk_type,
f_risk_place_detail,
f_lon,
f_lat,
f_risk_structure,
f_risk_control_measures,
f_remark,
f_update_time,
f_ent_upload_time,
f_ent_upload_state,
f_gov_upload_time,
f_gov_upload_state
from t_risk_dev_maj_infor riskInfor
left join t_enterprise_info enterprise on riskInfor.f_company_id = enterprise.enterprise_id
left join t_county_level_region region on region.f_id = enterprise.f_region_id
</sql>
<select id="selectTRiskDevMajInforList" parameterType="TRiskDevMajInfor" resultMap="TRiskDevMajInforResult">
......@@ -30,6 +76,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fRiskCode != null and fRiskCode != ''"> and f_risk_code like concat('%', #{fRiskCode}, '%')</if>
<if test="fRiskName != null and fRiskName != ''"> and f_risk_name like concat('%', #{fRiskName}, '%')</if>
<if test="fRiskType != null "> and f_risk_type = #{fRiskType}</if>
<if test="entUploadState != null "> and f_ent_upload_state = #{entUploadState}</if>
</where>
order by f_update_time desc
</select>
<select id="exportRiskDevMajInforList" parameterType="TRiskDevMajInfor" resultMap="TRiskDevMajInforResult">
<include refid="exportRiskDevMajInforVo"/>
<where>
<if test="fRiskCode != null and fRiskCode != ''"> and f_risk_code like concat('%', #{fRiskCode}, '%')</if>
<if test="fRiskName != null and fRiskName != ''"> and f_risk_name like concat('%', #{fRiskName}, '%')</if>
<if test="fRiskType != null "> and f_risk_type = #{fRiskType}</if>
<if test="entUploadState != null "> and f_ent_upload_state = #{entUploadState}</if>
</where>
order by f_update_time desc
</select>
......@@ -54,6 +112,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fRiskControlMeasures != null and fRiskControlMeasures != ''">f_risk_control_measures,</if>
<if test="fRemark != null and fRemark != ''">f_remark,</if>
<if test="fUpdateTime != null and fUpdateTime != ''">f_update_time,</if>
<if test="entUploadTime != null ">f_ent_upload_time,</if>
<if test="entUploadState != null and entUploadState != ''">f_ent_upload_state,</if>
<if test="govUploadTime != null">f_gov_upload_time,</if>
<if test="govUploadState != null and govUploadState != ''">f_gov_upload_state,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fRiskCode != null and fRiskCode != ''">#{fRiskCode},</if>
......@@ -68,6 +131,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fRiskControlMeasures != null and fRiskControlMeasures != ''">#{fRiskControlMeasures},</if>
<if test="fRemark != null and fRemark != ''">#{fRemark},</if>
<if test="fUpdateTime != null and fUpdateTime != ''">#{fUpdateTime},</if>
<if test="entUploadTime != null">#{entUploadTime},</if>
<if test="entUploadState != null and entUploadState != ''">#{entUploadState},</if>
<if test="govUploadTime != null">#{govUploadTime},</if>
<if test="govUploadState != null and govUploadState != ''">#{govUploadState},</if>
</trim>
</insert>
......@@ -86,6 +154,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fRiskControlMeasures != null and fRiskControlMeasures != ''">f_risk_control_measures = #{fRiskControlMeasures},</if>
<if test="fRemark != null and fRemark != ''">f_remark = #{fRemark},</if>
<if test="fUpdateTime != null and fUpdateTime != ''">f_update_time = #{fUpdateTime},</if>
<if test="entUploadTime != null">f_ent_upload_time = #{entUploadTime},</if>
<if test="entUploadState != null and entUploadState != ''">f_ent_upload_state = #{entUploadState},</if>
<if test="govUploadTime != null">f_gov_upload_time = #{govUploadTime},</if>
<if test="govUploadState != null and govUploadState != ''">f_gov_upload_state = #{govUploadState},</if>
</trim>
where f_risk_dev_maj_infor_id = #{fRiskDevMajInforId}
</update>
......
......@@ -646,7 +646,7 @@ export default {
},
handleReport(row){
// 如果是 超级管理员或者 企业,并且 企业端上传状态为0
if ((this.user.roleId == 5 || this.user.roleId == 1) && row.fUploadType == '0') {
if (this.user.roleId == 5 && row.fUploadType == '0') {
this.$confirm('是否确认上传老旧管网改造计划项目名称为"' + row.fProjectName + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -661,7 +661,7 @@ export default {
// 如果是 超级管理员或者 政府,并且 政府端上传状态为0
if ((this.user.roleId == 3 || this.user.roleId == 1) && row.govUploadState == '0') {
if (this.user.roleId == 3 && row.govUploadState == '0') {
this.$confirm('是否确认上传老旧管网改造计划项目名称为"' + row.fProjectName + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......
......@@ -18,9 +18,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="涉及燃气企业编码">
<span v-if="detailInfo.fCompanyId">{{ detailInfo.fCompanyId }}</span>
<span v-else>-</span>
<el-form-item label="燃气企业">
<span>{{ enterpriseName }}</span>
</el-form-item>
</el-col>
......@@ -67,6 +66,24 @@
</el-col>
</el-col>
<el-col :span="12">
<el-form-item label="上传状态" >
<span>{{fUploadType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上传时间" >
<span>{{ fUploadTime }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="this.$store.state.user.roleId == 3" label="企业端上传时间" >
<span>{{ detailInfo.fUploadTime }}</span>
</el-form-item>
</el-col>
<el-col :span="10">
<div id="risk-map" style="height: 400px"></div>
</el-col>
......@@ -84,8 +101,13 @@
name: "detail-info",
data(){
return{
enterprises: [],
countyInfo: [],
detailInfo: {},
detailOpen: false
enterpriseName:"",
detailOpen: false,
fUploadType: "",
fUploadTime: null
}
},
watch:{
......@@ -96,10 +118,69 @@
}
},
methods:{
//获取县级
getCountyInfo(){
getDefaultCountyList().then(res =>{
if(res.code == 200 && res.data){
this.countyInfo = res.data;
}
})
},
//所属单位
getEnterpriseLists(){
queryAllEnterprise().then(response => {
this.enterprises = response;
});
},
beyondCountyFormat(row){
let info = this.countyInfo.find(item => item.fId == row.fRegionId);
return info?info.fName:"-";
},
beyondCompanyFormat(row){
let info = this.enterprises.find(item => item.enterpriseId == row.fCompanyId);
return info?info.enterpriseName:"-";
},
//根据不同角色显示不同字段
showUploadType() {
let roleId = this.$store.state.user.roleId;
console.log("roleId == 3" + (roleId == 3))
if (roleId == 3) {
this.fUploadType = this.detailInfo.govUploadState
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.entUploadState
}
if (this.fUploadType == '0') {
this.fUploadType = "未上传"
}
if (this.fUploadType == '1') {
this.fUploadType = "已上传"
}
},
showUploadTime() {
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadTime = this.detailInfo.govUploadTime
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entUploadTime
}
},
getDetailInfo(id){
getInfor(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.detailInfo.fRegionId = this.beyondCountyFormat(this.detailInfo);
let fCompanyId = this.detailInfo.fCompanyId;
if (fCompanyId != null) {
this.enterpriseName= this.beyondCompanyFormat(this.detailInfo);
}
this.showUploadType();
this.showUploadTime();
this.detailOpen = true;
}
})
......
......@@ -43,6 +43,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-if="this.user.roleId==5"
>新增</el-button>
</el-col>
<el-col :span="1.5">
......@@ -53,6 +54,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-if="this.user.roleId==5"
>修改</el-button>
</el-col>
<el-col :span="1.5">
......@@ -63,6 +65,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-if="this.user.roleId==5"
>删除</el-button>
</el-col>
<el-col :span="1.5">
......@@ -78,8 +81,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inforList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table v-loading="loading" :data="inforList" @selection-change="handleSelectionChange">
<el-table-column label="重要风险点编码" align="center" prop="fRiskCode" />
<el-table-column label="重要风险点名称" align="center" prop="fRiskName" :show-overflow-tooltip="true"/>
<el-table-column label="涉及燃气企业编码" align="center" prop="fCompanyId" />
......@@ -100,12 +102,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="this.user.roleId==5&&scope.row.entUploadState==0"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-if="this.user.roleId==5&&scope.row.entUploadState==0"
>删除</el-button>
<el-button
size="mini"
......@@ -136,14 +140,34 @@
</el-col>
<el-col :span="12">
<el-form-item label="涉及燃气企业编码" prop="fCompanyId">
<el-input v-model="form.fCompanyId" placeholder="请输入涉及燃气企业编码" />
<el-form-item label="燃气企业" prop="fCompanyId">
<el-select style="width: 100%;" :disabled="isDisabledEnterprise" v-model="form.fCompanyId" placeholder="请选择">
<el-option
v-for="item in enterprises"
:key="item.enterpriseId"
:label="item.enterpriseName"
:value="item.enterpriseId">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="县级行政区ID" prop="fRegionId">
<el-input v-model="form.fRegionId" placeholder="请输入县级行政区ID" />
<el-form-item label="县级行政区" prop="fRegionId">
<el-select
v-model="form.fRegionId"
placeholder="请选择县级行政区"
style="width: 100%"
>
<el-option
v-for="county in countyInfo"
:key="county.fId"
:label="county.fName.trim()"
:value="county.fId"
/>
</el-select>
</el-form-item>
</el-col>
......@@ -222,7 +246,10 @@
<script>
import { listInfor, getInfor, delInfor, addInfor, updateInfor, exportInfor, reportRiskInfo } from "@/api/risk/info";
import GetPos from '@/components/GetPos';
import { enterpriseLists } from "@/api/regulation/info";
import DetailInfo from "./components/DetailInfo";
import{getInfo} from "@/api/login"
import { getDefaultCountyList } from "@/api/area/county";
export default {
name: "Infor",
components: {
......@@ -233,11 +260,17 @@ export default {
return {
// 遮罩层
loading: true,
user:{},
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
fRiskCodes: [],
//燃气企业
enterprises: [],
//县级行政区
countyInfo: [],
isDisabledEnterprise: false,
// 非单个禁用
single: true,
// 非多个禁用
......@@ -295,15 +328,46 @@ export default {
};
},
created() {
this.getList();
this.getuserInfo();
this.getDicts("t_risk_type").then(response => {
this.fRiskTypeOptions = response.data;
});
this.getEnterpriseLists();
this.getCountyInfo();
},
methods: {
//获取县级
getCountyInfo(){
getDefaultCountyList().then(res =>{
if(res.code == 200 && res.data){
this.countyInfo = res.data;
}
})
},
//所属单位
getEnterpriseLists(){
const param = {};
enterpriseLists(param).then(response => {
this.enterprises = response.rows;
});
},
getuserInfo(){
getInfo().then(response => {
this.user = response.user.roles[0]
this.getList();
});
},
/** 查询重要风险点管控列表 */
getList() {
this.loading = true;
// 企业查自己的数据
if (this.user.roleId == 5) {
this.queryParams.fCompanyId = this.$store.state.user.enterpriseId
}
// 政府如果按照状态查的话,是查的 govUploadState
if (this.user.roleId == 3) {
this.queryParams.govUploadState = this.queryParams.fUploadType;
}
listInfor(this.queryParams).then(response => {
this.inforList = response.rows;
this.total = response.total;
......@@ -361,6 +425,11 @@ export default {
this.reset();
this.open = true;
this.title = "添加重要风险点管控";
// 说明是 企业在新增,直接赋值显示就行了。
if (this.enterprises.length == 1) {
this.form.fCompanyId = this.enterprises[0].enterpriseId
this.isDisabledEnterprise = true;
}
},
/** 修改按钮操作 */
handleUpdate(row) {
......
......@@ -50,10 +50,22 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="更新时间">
<span v-if="detailInfo.fUpdateTime">{{ detailInfo.fUpdateTime }}</span>
<span v-else>-</span>
<el-form-item label="上传状态" >
<span>{{fUploadType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上传时间" >
<span>{{fUploadTime}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="this.$store.state.user.roleId == 3" label="企业端上传时间" >
<span>{{ detailInfo.entUploadTime }}</span>
</el-form-item>
</el-col>
......@@ -70,14 +82,45 @@
data(){
return{
detailInfo: {},
detailOpen: false
detailOpen: false,
fUploadType: "",
fUploadTime: null
}
},
methods:{
//根据不同角色显示不同字段
showUploadType() {
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadType = this.detailInfo.govUploadState
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.entUploadState
}
if (this.fUploadType == '0') {
this.fUploadType = "未上传"
}
if (this.fUploadType == '1') {
this.fUploadType = "已上传"
}
},
showUploadTime() {
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadTime = this.detailInfo.govUploadTime
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entUploadTime
}
},
getDetailInfo(id){
getInc(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.showUploadType();
this.showUploadTime();
this.detailOpen = true;
}
})
......
......@@ -19,6 +19,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="上传状态" prop="fUploadType">
<el-select v-model="queryParams.fUploadType" placeholder="请选择上传状态" clearable size="small">
<el-option label="未上传" value="0" />
<el-option label="已上传" value="1" />
</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>
......@@ -33,7 +41,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5"
>新增</el-button>
</el-col>
<el-col :span="1.5">
......@@ -44,7 +52,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5"
>修改</el-button>
</el-col>
<el-col :span="1.5">
......@@ -55,7 +63,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5"
>删除</el-button>
</el-col>
<el-col :span="1.5">
......@@ -72,7 +80,6 @@
</el-row>
<el-table v-loading="loading" :data="incList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="项目编码" align="center" prop="projectCode" :show-overflow-tooltip="true"/>
<el-table-column label="意外事件标题" align="center" prop="fTitle" :show-overflow-tooltip="true"/>
<el-table-column label="意外事件描述" align="center" prop="fDescription" :show-overflow-tooltip="true"/>
......@@ -112,14 +119,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5&&scope.row.entUploadState==0"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5&&scope.row.entUploadState==0"
>删除</el-button>
<el-button
size="mini"
......@@ -264,7 +271,8 @@ export default {
fOccurrenctTime: null,
fAttachment: null,
fRemark: null,
fUpdateTime: null
fUpdateTime: null,
fUploadType:null,
},
// 表单参数
form: {},
......@@ -351,7 +359,12 @@ export default {
// 企业查自己的数据
if (this.user.roleId == 5) {
this.queryParams.fCompanyInfoId = this.$store.state.user.enterpriseId
this.queryParams.entUploadState = this.queryParams.fUploadType;
}
// 政府如果按照状态查的话,是查的 govUploadState
if (this.user.roleId == 3) {
this.queryParams.govUploadState = this.queryParams.fUploadType;
}
listInc(this.queryParams).then(response => {
this.incList = response.rows;
this.total = response.total;
......
......@@ -59,8 +59,9 @@
</el-col>
<el-col :span="12">
<el-form-item label="涉气施工点位位置属性">
<span v-if="detailInfo.fConstructionPointType">{{ detailInfo.fConstructionPointType }}</span>
<el-form-item label="涉气施工点位位置属性">
<span v-if="detailInfo.fConstructionPointType == 1">城镇</span>
<span v-else-if="detailInfo.fConstructionPointType == 0">农村</span>
<span v-else>-</span>
</el-form-item>
</el-col>
......@@ -244,11 +245,23 @@
</el-col>
<el-col :span="12">
<el-form-item label="更新时间">
<span v-if="detailInfo.fUpdateTime">{{ detailInfo.fUpdateTime }}</span>
<span v-else>-</span>
<el-form-item label="上传状态" >
<span>{{fUploadType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上传时间" >
<span>{{fUploadTime}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="this.$store.state.user.roleId == 3" label="企业端上传时间" >
<span>{{ detailInfo.entUploadTime }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
......@@ -267,7 +280,9 @@
countyInfo: [],
enterpriseName:"",
detailInfo: {},
detailOpen: false
detailOpen: false,
fUploadType: "",
fUploadTime: null
}
},
created() {
......@@ -275,6 +290,34 @@
this.getEnterpriseLists();
},
methods:{
//根据不同角色显示不同字段
showUploadType() {
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadType = this.detailInfo.govUploadState
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.entUploadState
}
if (this.fUploadType == '0') {
this.fUploadType = "未上传"
}
if (this.fUploadType == '1') {
this.fUploadType = "已上传"
}
},
showUploadTime() {
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadTime = this.detailInfo.govUploadTime
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entUploadTime
}
},
//获取县级
getCountyInfo(){
getDefaultCountyList().then(res =>{
......@@ -306,6 +349,8 @@
if (companyInfoId != null) {
this.enterpriseName= this.beyondCompanyFormat(this.detailInfo);
}
this.showUploadType();
this.showUploadTime();
this.detailOpen = true;
}
})
......
......@@ -31,6 +31,14 @@
/>
</el-select>
</el-form-item>
<el-form-item label="上传状态" prop="fUploadType">
<el-select v-model="queryParams.fUploadType" placeholder="请选择上传状态" clearable size="small">
<el-option label="未上传" value="0" />
<el-option label="已上传" value="1" />
</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>
......@@ -45,7 +53,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5"
>新增</el-button>
</el-col>
<el-col :span="1.5">
......@@ -56,7 +64,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5"
>修改</el-button>
</el-col>
<el-col :span="1.5">
......@@ -67,7 +75,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5"
>删除</el-button>
</el-col>
<el-col :span="1.5">
......@@ -83,8 +91,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inforList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table v-loading="loading" :data="inforList" @selection-change="handleSelectionChange">
<el-table-column label="项目编码" align="center" prop="fProjectCode" />
<el-table-column label="外部工程编码" align="center" prop="fProjectNo" />
<el-table-column label="施工工程项目名称" align="center" prop="fProjectName" />
......@@ -114,14 +121,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5&&scope.row.entUploadState==0"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-if="user.roleId==1||user.roleId==5"
v-if="user.roleId==5&&scope.row.entUploadState==0"
>删除</el-button>
<el-button
size="mini"
......@@ -230,13 +237,7 @@
<el-option label="农村" value="2" />
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="村级行政区" prop="fVillageId">
<el-input v-model="form.fVillageId" placeholder="请输入村级行政区" />
</el-form-item>
</el-col> -->
</el-col>
<el-col :span="12">
<el-form-item label="管道压力等级分类" prop="fPipePress">
......@@ -254,8 +255,8 @@
<el-col :span="12">
<el-form-item label="施工是否主动报备" prop="fReportFlag">
<el-select style="width: 100%" v-model="form.fReportFlag" placeholder="请选择施工是否主动报备">
<el-option label="是" value="1" />
<el-option label="否" value="0" />
<el-option label="是" value=1 />
<el-option label="否" value=0 />
</el-select>
</el-form-item>
</el-col>
......@@ -263,9 +264,9 @@
<el-col :span="12">
<el-form-item label="施工状态">
<el-select style="width: 100%" v-model="form.fConstructionStatus" placeholder="请选择施工状态">
<el-option label="未开工" value="1" />
<el-option label="正在施工" value="2" />
<el-option label="已完工" value="3" />
<el-option label="未开工" value='1' />
<el-option label="正在施工" value='2' />
<el-option label="已完工" value='3' />
</el-select>
</el-form-item>
</el-col>
......@@ -533,6 +534,7 @@ export default {
fProjectName: null,
fPipePress: null,
fCompanyInfoId: null,
fUploadType:null,
},
// 表单参数
form: {},
......@@ -619,8 +621,12 @@ export default {
// 企业查自己的数据
if (this.user.roleId == 5) {
this.queryParams.fCompanyInfoId = this.$store.state.user.enterpriseId
this.queryParams.entUploadState = this.queryParams.fUploadType;
}
console.log("this.queryParams = " + this.queryParams)
// 政府如果按照状态查的话,是查的 govUploadState
if (this.user.roleId == 3) {
this.queryParams.govUploadState = this.queryParams.fUploadType;
}
listInfor(this.queryParams).then(response => {
this.inforList = response.rows;
this.total = response.total;
......
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