Commit 74192512 authored by wanghao's avatar wanghao

1 重要风险点管控-优化,主要优化项有:搜索条件加上 上传状态 分不同角色搜索;导出时分不同角色导出

2 老旧管网-第三方施工 模块本地测试,测试导出时有问题就是处理。
parent 4a44d15b
......@@ -89,7 +89,7 @@ public class TRiskDevMajInforController extends BaseController
}
/**
* 上传重要风险点档案
* 政府端 上传重要风险点档案
* @param fRiskDevMajInforId 重要风险点档案id
* @return
*/
......@@ -102,4 +102,15 @@ public class TRiskDevMajInforController extends BaseController
return AjaxResult.error("上传重要风险点档案接口异常");
}
}
/**
* 企业端 上传计划和进度
* @param fRiskDevMajInforId 计划id
* @return
*/
@GetMapping("/entReportRiskInfo")
public AjaxResult entReportRiskInfo(Long fRiskDevMajInforId) {
return toAjax(tRiskDevMajInforService.entReportRiskInfo(fRiskDevMajInforId));
}
}
......@@ -55,16 +55,17 @@ public class TConGasProInc extends BaseEntity
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
private String fUpdateTime;
/**
* 企业端上传状态 0-未上传,1-已上传*/
@Excel(name = "上传状态",readConverterExp = "1=已上传,0=未上传")
private String entUploadState;
/**
* 企业端上传时间 */
@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;
/**
* 政府端上传时间 */
......
......@@ -191,16 +191,17 @@ public class TConGasProInfor extends BaseEntity
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
private String fUpdateTime;
/**
* 企业端上传状态 0-未上传,1-已上传*/
@Excel(name = "上传状态",readConverterExp = "1=已上传,0=未上传")
private String entUploadState;
/**
* 企业端上传时间 */
@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;
/**
* 政府端上传时间 */
......
......@@ -116,7 +116,7 @@ public class TPipeOldPlanProcess extends BaseEntity
private String fUploadType;
/** 上传时间,yyyy-MM-dd hh:mm:ss */
@Excel(name = "上传时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上传时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String fUploadTime;
......
package com.zehong.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
......@@ -71,7 +72,6 @@ public class TRiskDevMajInfor extends BaseEntity
private String fRemark;
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
@Excel(name = "最后修改时间")
private String fUpdateTime;
/**
......@@ -84,6 +84,7 @@ public class TRiskDevMajInfor extends BaseEntity
* 企业端上传时间 Excel 企业和政府通用
*/
@Excel(name = "上传时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date entUploadTime;
/**
......@@ -94,6 +95,7 @@ public class TRiskDevMajInfor extends BaseEntity
/**
* 政府端上传 时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date govUploadTime;
public void updateFields() {
......
package com.zehong.system.mapper;
import java.util.Date;
import java.util.List;
import com.zehong.system.domain.TRiskDevMajInfor;
import org.apache.ibatis.annotations.Param;
/**
* 重要风险点管控Mapper接口
......@@ -19,6 +21,12 @@ public interface TRiskDevMajInforMapper
*/
public TRiskDevMajInfor selectTRiskDevMajInforById(Long fRiskDevMajInforId);
/**
* 企业端上传数据
* @return
*/
public int entReportRiskDevMajInfor(@Param("state") String state, @Param("entUploadTime") Date entUploadTime,
@Param("fRiskDevMajInforId") Long fRiskDevMajInforId);
/**
* 查询重要风险点管控列表
*
......
......@@ -72,4 +72,12 @@ public interface ITRiskDevMajInforService
* @return
*/
int reportRiskInfo(Long fRiskDevMajInforId) throws Exception;
/**
* 企业端-上传重要风险点档案
* @param fRiskDevMajInforId 重要风险点档案id
* @return
*/
int entReportRiskInfo(Long fRiskDevMajInforId) ;
}
......@@ -168,6 +168,20 @@ public class TRiskDevMajInforServiceImpl implements ITRiskDevMajInforService
JSONObject reportResult = governmentDataUtil.setInfo("risk/device/major/information","WRITE",data);
log.info("上传重要风险点档案结果===================" + reportResult.toJSONString());
if(!"0".equals(reportResult.getString("resultCode"))) throw new CustomException("上传重要风险点档案接口失败");
riskDevMajInfo.setGovUploadState("1");
riskDevMajInfo.setGovUploadTime(new Date());
tRiskDevMajInforMapper.updateTRiskDevMajInfor(riskDevMajInfo);
return 1;
}
/**
* 企业端 上传重要风险点档案
* @param fRiskDevMajInforId 重要风险点档案id
* @return 1
*/
@Override
public int entReportRiskInfo(Long fRiskDevMajInforId) {
tRiskDevMajInforMapper.entReportRiskDevMajInfor("1",new Date(),fRiskDevMajInforId);
return 1;
}
}
......@@ -56,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="govUploadState != null and govUploadState != ''"> and inc.f_gov_upload_state = #{govUploadState}</if>
</where>
order by f_update_time desc
</select>
......@@ -72,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="govUploadState != null and govUploadState != ''"> and inc.f_gov_upload_state = #{govUploadState}</if>
</where>
order by f_update_time desc
</select>
......
......@@ -146,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="govUploadState != null and govUploadState != ''"> and f_gov_upload_state = #{govUploadState}</if>
</where>
order by f_update_time desc
</select>
......
......@@ -66,19 +66,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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
left join t_county_level_region region on region.f_id = riskInfor.f_region_id
</sql>
<select id="selectTRiskDevMajInforList" parameterType="TRiskDevMajInfor" resultMap="TRiskDevMajInforResult">
<include refid="selectTRiskDevMajInforVo"/>
<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>
<if test="fCompanyId != null and fCompanyId != '' "> and f_company_id = #{fCompanyId}</if>
<if test="govUploadState != null and govUploadState !='' "> and f_gov_upload_state = #{govUploadState}</if>
</where>
order by f_update_time desc
order by riskInfor.f_update_time desc
</select>
<select id="exportRiskDevMajInforList" parameterType="TRiskDevMajInfor" resultMap="TRiskDevMajInforResult">
......@@ -88,12 +90,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="fCompanyId != null and fCompanyId != '' "> and f_company_id = #{fCompanyId}</if>
<if test="govUploadState != null and govUploadState !='' "> and f_gov_upload_state = #{govUploadState}</if>
</where>
order by f_update_time desc
</select>
<select id="selectTRiskDevMajInforById" parameterType="Long" resultMap="TRiskDevMajInforResult">
<include refid="selectTRiskDevMajInforVo"/>
<include refid="exportRiskDevMajInforVo"/>
where f_risk_dev_maj_infor_id = #{fRiskDevMajInforId}
</select>
......@@ -163,6 +167,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where f_risk_dev_maj_infor_id = #{fRiskDevMajInforId}
</update>
<update id="entReportRiskDevMajInfor">
update t_risk_dev_maj_infor set f_ent_upload_state = #{state}, f_ent_upload_time = #{entUploadTime} where f_risk_dev_maj_infor_id = #{fRiskDevMajInforId}
</update>
<delete id="deleteTRiskDevMajInforById" parameterType="Long">
delete from t_risk_dev_maj_infor where f_risk_dev_maj_infor_id = #{fRiskDevMajInforId}
</delete>
......
......@@ -59,3 +59,11 @@ export function reportRiskInfo(query) {
params: query
})
}
export function entReportRiskInfo(query) {
return request({
url: '/risk/info/entReportRiskInfo',
method: 'get',
params: query
})
}
......@@ -94,33 +94,19 @@
</el-col>
<el-col :span="12">
<el-form-item label="当前改造进度/百分比" >
<el-form-item label="改造进度/百分比" >
<span v-if="detailInfo.fReconstructionProgress">{{ detailInfo.fReconstructionProgress }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="当前资金拨付进度/百分比" >
<el-form-item label="资金拨付进度/百分比" >
<span v-if="detailInfo.fFundsDisbursementProgress">{{ detailInfo.fFundsDisbursementProgress }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建时间" >
<span v-if="detailInfo.fCreateTime">{{ detailInfo.fCreateTime }}</span>
<span v-else>-</span>
</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>
</el-col>
<el-col :span="12">
<el-form-item label="上传状态" >
<span>{{fUploadType}}</span>
......
......@@ -438,6 +438,7 @@ export default {
// 企业查自己的数据
if (this.user.roleId == 5) {
this.queryParams.fEnterpriseId = this.$store.state.user.enterpriseId
this.queryParams.entUploadState = this.queryParams.fUploadType;
}
// 政府如果按照状态查的话,是查的 govUploadState
if (this.user.roleId == 3) {
......@@ -634,6 +635,15 @@ export default {
type: "warning"
}).then(() => {
this.exportLoading = true;
// 企业查自己的数据
if (this.user.roleId == 5) {
this.queryParams.fEnterpriseId = this.$store.state.user.enterpriseId
}
// 政府如果按照状态查的话,是查的 govUploadState
if (this.user.roleId == 3) {
this.queryParams.govUploadState = this.queryParams.fUploadType;
}
return exportProcess(queryParams);
}).then(response => {
this.download(response.msg);
......
<template>
<el-dialog title="详情" :visible.sync="detailOpen" width="900px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form label-width="140px">
<el-row class="el-row-table">
<el-col :span="14">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="重要风险点编码">
<span v-if="detailInfo.fRiskCode">{{ detailInfo.fRiskCode }}</span>
<el-form-item label="重要风险点名称">
<span v-if="detailInfo.fRiskName">{{ detailInfo.fRiskName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="重要风险点名称">
<span v-if="detailInfo.fRiskName">{{ detailInfo.fRiskName }}</span>
<el-form-item label="重要风险点编码">
<span v-if="detailInfo.fRiskCode">{{ detailInfo.fRiskCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="燃气企业">
<span>{{ enterpriseName }}</span>
<el-form-item label="燃气企业">
<span v-if="detailInfo.fCompanyId">{{ detailInfo.fCompanyId }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="县级行政区ID">
<el-form-item label="县级行政区">
<span v-if="detailInfo.fRegionId">{{ detailInfo.fRegionId }}</span>
<span v-else>-</span>
</el-form-item>
......@@ -37,56 +37,57 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="所在位置地址描述">
<span v-if="detailInfo.fRiskPlaceDetail">{{ detailInfo.fRiskPlaceDetail }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="风险构成">
<span v-if="detailInfo.fRiskStructure">{{ detailInfo.fRiskStructure }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="风险管控措施">
<span v-if="detailInfo.fRiskControlMeasures">{{ detailInfo.fRiskControlMeasures }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="备注">
<span v-if="detailInfo.fRemark">{{ detailInfo.fRemark }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上传状态" >
<span>{{fUploadType}}</span>
</el-form-item>
</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.entUploadTime }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上传时间" >
<span>{{ fUploadTime }}</span>
<el-col :span="24">
<el-form-item label="经纬度位置">
<div id="risk-map" style="height: 300px"></div>
</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>
</el-col>
</el-row>
</el-form>
......@@ -172,13 +173,6 @@
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;
......
......@@ -29,6 +29,14 @@
/>
</el-select>
</el-form-item>
<el-form-item label="上传状态" prop="entUploadState">
<el-select v-model="queryParams.entUploadState" 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>
......@@ -43,7 +51,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-if="this.user.roleId==5"
v-if="user.roleId==5"
>新增</el-button>
</el-col>
<el-col :span="1.5">
......@@ -54,7 +62,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-if="this.user.roleId==5"
v-if="user.roleId==5"
>修改</el-button>
</el-col>
<el-col :span="1.5">
......@@ -65,7 +73,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-if="this.user.roleId==5"
v-if="user.roleId==5"
>删除</el-button>
</el-col>
<el-col :span="1.5">
......@@ -84,11 +92,15 @@
<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" />
<el-table-column label="县级行政区ID" align="center" prop="fRegionId" />
<el-table-column label="重要风险点类型" align="center" prop="fRiskType" :formatter="fRiskTypeFormat" />
<el-table-column label="燃气企业" align="center" prop="fCompanyId" width="250"/>
<el-table-column label="县级行政区" align="center" prop="fRegionId" />
<el-table-column label="重要风险点类型" align="center" prop="fRiskType" :formatter="fRiskTypeFormat" :show-overflow-tooltip="true"/>
<el-table-column label="备注" align="center" prop="fRemark" :show-overflow-tooltip="true"/>
<el-table-column label="最后修改时间" align="center" prop="fUpdateTime" />
<el-table-column label="上传状态" align="center" prop="fUploadType" :formatter="uploadStateFormat">
</el-table-column>
<el-table-column label="上传时间" align="center" prop="fUploadTime" width="150" :formatter="uploadTimeFormat">
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -102,19 +114,20 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="this.user.roleId==5&&scope.row.entUploadState==0"
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="this.user.roleId==5&&scope.row.entUploadState==0"
v-if="user.roleId==5&&scope.row.entUploadState==0"
>删除</el-button>
<el-button
size="mini"
type="text"
@click="handleReport(scope.row)"
v-if="judgeUploadIsShow((scope.row))"
>上传</el-button>
</template>
</el-table-column>
......@@ -244,7 +257,7 @@
</template>
<script>
import { listInfor, getInfor, delInfor, addInfor, updateInfor, exportInfor, reportRiskInfo } from "@/api/risk/info";
import { listInfor, getInfor, delInfor, addInfor, updateInfor, exportInfor, reportRiskInfo,entReportRiskInfo } from "@/api/risk/info";
import GetPos from '@/components/GetPos';
import { enterpriseLists } from "@/api/regulation/info";
import DetailInfo from "./components/DetailInfo";
......@@ -293,9 +306,13 @@ export default {
fRiskCode: null,
fRiskName: null,
fRiskType: null,
entUploadState:null
},
// 表单参数
form: {},
form: {
fUploadType: null,
fUploadTime: null
},
// 表单校验
rules: {
fRiskName: [
......@@ -336,6 +353,36 @@ export default {
this.getCountyInfo();
},
methods: {
//判断 上传是否需要显示,上传分为企业上传 和 政府端上传
judgeUploadIsShow(row) {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
// 企业端 上传状态 0-未上传,1-已上传
let entUploadState = row.entUploadState;
// 政府端 上传状态 0-未上传,1-已上传
let govUploadState = row.govUploadState;
// 如果政府端都已经上传,那就不能显示了。
if(govUploadState === '1') {
return false;
}
// 如果企业端上传了,则企业端就不能显示了,政府端和 超级管理员能显示
if(entUploadState === '1' && govUploadState === '0') {
if (roleId === 5) {
return false;
} else {
return true;
}
}
// 别的情况,都显示
return true;
},
//获取县级
getCountyInfo(){
getDefaultCountyList().then(res =>{
......@@ -354,6 +401,7 @@ export default {
getuserInfo(){
getInfo().then(response => {
this.user = response.user.roles[0]
console.log("response.user.roles[0] = " + response.user.roles[0]);
this.getList();
});
},
......@@ -366,7 +414,7 @@ export default {
}
// 政府如果按照状态查的话,是查的 govUploadState
if (this.user.roleId == 3) {
this.queryParams.govUploadState = this.queryParams.fUploadType;
this.queryParams.govUploadState = this.queryParams.entUploadState;
}
listInfor(this.queryParams).then(response => {
this.inforList = response.rows;
......@@ -399,7 +447,9 @@ export default {
fRiskStructure: null,
fRiskControlMeasures: null,
fRemark: null,
fUpdateTime: null
fUpdateTime: null,
fUploadType: null,
fUploadTime: null
};
this.resetForm("form");
},
......@@ -485,6 +535,15 @@ export default {
type: "warning"
}).then(() => {
this.exportLoading = 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.entUploadState;
}
return exportInfor(queryParams);
}).then(response => {
this.download(response.msg);
......@@ -516,18 +575,66 @@ export default {
handleDetail(row){
this.$refs.detail.getDetailInfo(row.fRiskDevMajInforId);
},
/** 删除按钮操作 */
//上传状态动态展示
uploadStateFormat(row, column) {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
if (roleId == 5) {
if (row.entUploadState == '0') {
return "未上传"
} else{
return "已上传"
}
} else {
if (row.govUploadState == '0') {
return "未上传"
} else{
return "已上传"
}
}
},
//上传时间动态展示
uploadTimeFormat(row, column) {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
if (roleId == 5) {
return row.entUploadTime;
} else {
return row.govUploadTime;
}
},
/** 上传按钮操作 */
handleReport(row) {
this.$confirm('是否确认上传重要风险点编码为"' + row.fRiskCode + '"的数据项?', "警告", {
// 如果是 企业,并且 企业端上传状态为0
if (this.user.roleId == 5 && row.entUploadState == '0') {
this.$confirm('是否确认上传重要风险点编码为"' + row.fRiskCode + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return entReportRiskInfo({fRiskDevMajInforId : row.fRiskDevMajInforId});
}).then(() => {
this.getList();
this.msgSuccess("上传成功");
}).catch(() => {});
}
// 如果是 政府,并且 政府端上传状态为0
if (this.user.roleId == 3 && row.govUploadState == '0') {
this.$confirm('是否确认上传重要风险点编码为"' + row.fRiskCode + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return reportAccidentInfo({fRiskDevMajInforId : row.fRiskDevMajInforId});
}).then(() => {
this.getList();
this.msgSuccess("上传成功");
}).catch(() => {});
}).then(function() {
return reportRiskInfo({fRiskDevMajInforId : row.fRiskDevMajInforId});
}).then(() => {
this.getList();
this.msgSuccess("上传成功");
}).catch(() => {});
}
},
}
};
......
......@@ -83,7 +83,7 @@
<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"/>
<el-table-column label="意外事件发生事件" align="center" prop="fOccurrenctTime" :show-overflow-tooltip="true"/>
<el-table-column label="意外事件发生时间" align="center" prop="fOccurrenctTime" :show-overflow-tooltip="true"/>
<el-table-column label="附件" align="center" prop="fAttachment">
<template slot-scope="scope">
<span
......@@ -501,6 +501,16 @@ export default {
type: "warning"
}).then(() => {
this.exportLoading = true;
// 企业查自己的数据
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;
}
return exportInc(queryParams);
}).then(response => {
this.download(response.msg);
......
......@@ -831,6 +831,16 @@ export default {
type: "warning"
}).then(() => {
this.exportLoading = true;
// 企业查自己的数据
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;
}
return exportInfor(queryParams);
}).then(response => {
this.download(response.msg);
......
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