Commit c58dfda2 authored by wanghao's avatar wanghao

1 新增加模块 上报时态显示调整。

2 测试-重要风险点管控 对数据修改后,界面查不到,及导出回显bug修复。
parent f225b791
......@@ -46,7 +46,9 @@ public class TRiskDevMajInforController extends BaseController
{
List<TRiskDevMajInfor> list = tRiskDevMajInforService.exportRiskDevMajInforList(tRiskDevMajInfor);
ExcelUtil<TRiskDevMajInfor> util = new ExcelUtil<TRiskDevMajInfor>(TRiskDevMajInfor.class);
return util.exportExcel(list, "重要风险点管控数据");
AjaxResult ajaxResult = util.exportExcel(list, "重要风险点管控数据");
ExcelUtil.hiddencolumns.clear();
return ajaxResult;
}
/**
......@@ -58,6 +60,14 @@ public class TRiskDevMajInforController extends BaseController
return AjaxResult.success(tRiskDevMajInforService.selectTRiskDevMajInforById(fRiskDevMajInforId));
}
/**
* 获取重要风险点管控详细信息
*/
@GetMapping(value = "/getInfoForDetail/{fRiskDevMajInforId}")
public AjaxResult getInfoForDetail(@PathVariable("fRiskDevMajInforId") Long fRiskDevMajInforId)
{
return AjaxResult.success(tRiskDevMajInforService.selectTRiskDevMajInforByIdForDetail(fRiskDevMajInforId));
}
/**
* 新增重要风险点管控
*/
......
......@@ -30,12 +30,22 @@ public class TRiskDevMajInfor extends BaseEntity
private String fRiskName;
/** 重要风险点涉及燃气企业编码 */
@Excel(name = "重要风险点涉及燃气企业编码")
private String fCompanyId;
/**
* 企业名称
*/
@Excel(name = "燃气企业")
private String companyName;
/** 县级行政区ID */
@Excel(name = "县级行政区ID")
private String fRegionId;
private Long fRegionId;
/**
* 行政区名称
*/
@Excel(name = "县级行政区")
private String regionName;
/** 重要风险点类型,1 密闭空间,2 人员密集场
......@@ -77,24 +87,26 @@ public class TRiskDevMajInfor extends BaseEntity
/**
* 企业端上传状态 0-未上传,1-已上传,Excel 企业和政府通用
*/
@Excel(name = "上传状态",readConverterExp = "1=已上传,0=未上传")
@Excel(name = "上报状态",readConverterExp = "1=已上报,0=未上报")
private String entUploadState;
/**
* 企业端上传时间 Excel 企业和政府通用
*/
@Excel(name = "上时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date entUploadTime;
/**
* 政府端上传 状态
*/
@Excel(name = "上报省厅状态",readConverterExp = "1=已上报,0=未上报")
private String govUploadState;
/**
* 政府端上传 时间
*/
@Excel(name = "上报省厅时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date govUploadTime;
......@@ -106,7 +118,24 @@ public class TRiskDevMajInfor extends BaseEntity
this.entUploadTime = null;
}
}
public void setfRiskDevMajInforId(Long fRiskDevMajInforId)
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getRegionName() {
return regionName;
}
public void setRegionName(String regionName) {
this.regionName = regionName;
}
public void setfRiskDevMajInforId(Long fRiskDevMajInforId)
{
this.fRiskDevMajInforId = fRiskDevMajInforId;
}
......@@ -142,12 +171,12 @@ public class TRiskDevMajInfor extends BaseEntity
{
return fCompanyId;
}
public void setfRegionId(String fRegionId)
public void setfRegionId(Long fRegionId)
{
this.fRegionId = fRegionId;
}
public String getfRegionId()
public Long getfRegionId()
{
return fRegionId;
}
......
......@@ -21,6 +21,15 @@ public interface TRiskDevMajInforMapper
*/
public TRiskDevMajInfor selectTRiskDevMajInforById(Long fRiskDevMajInforId);
/**
* 查询重要风险点管控
*
* @param fRiskDevMajInforId 重要风险点管控ID - 详情用
* @return 重要风险点管控
*/
public TRiskDevMajInfor selectTRiskDevMajInforByIdForDetail(Long fRiskDevMajInforId);
/**
* 企业端上传数据
* @return
......
......@@ -19,6 +19,15 @@ public interface ITRiskDevMajInforService
*/
public TRiskDevMajInfor selectTRiskDevMajInforById(Long fRiskDevMajInforId);
/**
* 查询重要风险点管控
*
* @param fRiskDevMajInforId 重要风险点管控ID - 详情用
* @return 重要风险点管控
*/
public TRiskDevMajInfor selectTRiskDevMajInforByIdForDetail(Long fRiskDevMajInforId);
/**
* 查询重要风险点管控列表
*
......
......@@ -7,6 +7,7 @@ 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.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TConGasProInfor;
import com.zehong.system.domain.TRiskDevMajInfor;
import com.zehong.system.domain.vo.TRiskDevMajInfoVo;
......@@ -58,6 +59,17 @@ public class TRiskDevMajInforServiceImpl implements ITRiskDevMajInforService
return tRiskDevMajInforMapper.selectTRiskDevMajInforById(fRiskDevMajInforId);
}
/**
* 查询重要风险点管控 - 详情使用
*
* @param fRiskDevMajInforId 重要风险点管控ID
* @return 重要风险点管控
*/
@Override
public TRiskDevMajInfor selectTRiskDevMajInforByIdForDetail(Long fRiskDevMajInforId) {
return tRiskDevMajInforMapper.selectTRiskDevMajInforByIdForDetail(fRiskDevMajInforId);
}
/**
* 查询重要风险点管控列表
*
......@@ -89,12 +101,12 @@ public class TRiskDevMajInforServiceImpl implements ITRiskDevMajInforService
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());
}
ExcelUtil.hiddencolumns.add(11);
ExcelUtil.hiddencolumns.add(12);
} else {
ExcelUtil.hiddencolumns.add(13);
ExcelUtil.hiddencolumns.add(14);
}
return tRiskDevMajInforMapper.exportRiskDevMajInforList(tRiskDevMajInfor);
......
......@@ -50,8 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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,
enterprise.enterprise_name as companyName,
region.f_name as regionName,
f_risk_type,
f_risk_place_detail,
f_lon,
......@@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectTRiskDevMajInforList" parameterType="TRiskDevMajInfor" resultMap="TRiskDevMajInforResult">
<include refid="exportRiskDevMajInforVo"/>
<include refid="selectTRiskDevMajInforVo"/>
<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>
......@@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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 riskInfor.f_update_time desc
order by f_update_time desc
</select>
<select id="exportRiskDevMajInforList" parameterType="TRiskDevMajInfor" resultMap="TRiskDevMajInforResult">
......@@ -97,6 +97,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectTRiskDevMajInforById" parameterType="Long" resultMap="TRiskDevMajInforResult">
<include refid="selectTRiskDevMajInforVo"/>
where f_risk_dev_maj_infor_id = #{fRiskDevMajInforId}
</select>
<select id="selectTRiskDevMajInforByIdForDetail" parameterType="Long" resultMap="TRiskDevMajInforResult">
<include refid="exportRiskDevMajInforVo"/>
where f_risk_dev_maj_infor_id = #{fRiskDevMajInforId}
</select>
......
......@@ -17,6 +17,13 @@ export function getInfor(fRiskDevMajInforId) {
})
}
// 查询重要风险点管控详细
export function getInforForDetail(fRiskDevMajInforId) {
return request({
url: '/risk/info/getInfoForDetail/' + fRiskDevMajInforId,
method: 'get'
})
}
// 新增重要风险点管控
export function addInfor(data) {
return request({
......
......@@ -113,13 +113,13 @@
<el-form label-width="170px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="上报状态" >
<el-form-item :label="fUploadTypeLable" >
<span>{{fUploadType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上报时间" >
<el-form-item :label="fUploadTimeLable" >
<span>{{ fUploadTime }}</span>
</el-form-item>
</el-col>
......@@ -150,6 +150,7 @@
detailInfo: {},
enterpriseName:"",
detailOpen: false,
fUploadTypeLable: "",
fUploadType: "",
fUploadTime: null
}
......@@ -165,9 +166,11 @@
console.log("roleId == 3" + (roleId == 3))
if (roleId == 3) {
this.fUploadType = this.detailInfo.govUploadState
this.fUploadTypeLable = "上报省厅状态"
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.fUploadType
this.fUploadTypeLable = "上报状态"
}
if (this.fUploadType == '0') {
......@@ -181,10 +184,12 @@
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadTime = this.detailInfo.govUploadTime
this.fUploadTime = this.detailInfo.govUploadTime
this.fUploadTimeLable = "上报省厅时间"
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.fUploadTime
this.fUploadTime = this.detailInfo.fUploadTime
this.fUploadTimeLable = "上报时间"
}
},
//获取县级
......
......@@ -112,9 +112,9 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报状态" align="center" prop="fUploadType" :formatter="uploadStateFormat">
<el-table-column :label="fUploadTypeLable" align="center" prop="fUploadType" :formatter="uploadStateFormat">
</el-table-column>
<el-table-column label="上报时间" align="center" prop="fUploadTime" width="150" :formatter="uploadTimeFormat">
<el-table-column :label="fUploadTimeLable" align="center" prop="fUploadTime" width="150" :formatter="uploadTimeFormat">
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
<template slot-scope="scope">
......@@ -339,6 +339,8 @@ export default {
isDisabledEnterprise: false,
enterprises: [],
countyInfo: [],
fUploadTypeLable: "",
fUploadTimeLable: "",
// 遮罩层
loading: true,
// 导出遮罩层
......@@ -495,12 +497,14 @@ export default {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
if (roleId == 5) {
this.fUploadTypeLable = "上报状态"
if (row.fUploadType == '0') {
return "未上报"
} else{
return "已上报"
}
} else {
this.fUploadTypeLable = "上报省厅状态"
if (row.govUploadState == '0') {
return "未上报"
} else{
......@@ -513,8 +517,10 @@ export default {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
if (roleId == 5) {
this.fUploadTimeLable = "上报时间"
return row.fUploadTime;
} else {
this.fUploadTimeLable = "上报省厅时间"
return row.govUploadTime;
}
......
......@@ -18,14 +18,14 @@
<el-col :span="12">
<el-form-item label="燃气企业">
<span v-if="detailInfo.fCompanyId">{{ detailInfo.fCompanyId }}</span>
<span v-if="detailInfo.companyName">{{ detailInfo.companyName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="县级行政区">
<span v-if="detailInfo.fRegionId">{{ detailInfo.fRegionId }}</span>
<span v-if="detailInfo.regionName">{{ detailInfo.regionName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
......@@ -77,13 +77,13 @@
<el-form label-width="170px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="上报状态" >
<el-form-item :label="fUploadTypeLable" >
<span>{{fUploadType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上报时间" >
<el-form-item :label="fUploadTimeLabel" >
<span>{{ fUploadTime }}</span>
</el-form-item>
</el-col>
......@@ -101,12 +101,16 @@
</template>
<script>
import { getInfor } from "@/api/risk/info";
import { getInforForDetail } from "@/api/risk/info";
import { EditorMap } from "@/utils/mapClass/getPath.js";
import { getDefaultCountyList } from "@/api/area/county";
import { enterpriseLists } from "@/api/regulation/info";
export default {
name: "detail-info",
data(){
return{
fUploadTypeLable: "",
fUploadTimeLabel: "",
enterprises: [],
countyInfo: [],
detailInfo: {},
......@@ -123,6 +127,8 @@
}
}
},
created(){
},
methods:{
//获取县级
getCountyInfo(){
......@@ -134,9 +140,10 @@
},
//所属单位
getEnterpriseLists(){
queryAllEnterprise().then(response => {
this.enterprises = response;
});
const param = {};
enterpriseLists(param).then(response => {
this.enterprises = response.rows;
});
},
beyondCountyFormat(row){
let info = this.countyInfo.find(item => item.fId == row.fRegionId);
......@@ -151,9 +158,11 @@
let roleId = this.$store.state.user.roleId;
console.log("roleId == 3" + (roleId == 3))
if (roleId == 3) {
this.fUploadTypeLable = "上报省厅状态"
this.fUploadType = this.detailInfo.govUploadState
}
if (roleId == 5) {
this.fUploadTypeLable = "上报状态"
this.fUploadType = this.detailInfo.entUploadState
}
......@@ -169,15 +178,17 @@
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadTime = this.detailInfo.govUploadTime
this.fUploadTimeLabel = "上报省厅时间"
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entUploadTime
this.fUploadTimeLabel = "上报时间"
}
},
getDetailInfo(id){
getInfor(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
getInforForDetail(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.showUploadType();
this.showUploadTime();
this.detailOpen = true;
......
......@@ -92,13 +92,13 @@
<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" width="250"/>
<el-table-column label="县级行政区" align="center" prop="fRegionId" />
<el-table-column label="燃气企业" align="center" prop="fCompanyId" width="250" :formatter="fCompanyIdFormat"/>
<el-table-column label="县级行政区" align="center" prop="fRegionId" :formatter="fRegionIdFormat"/>
<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="fUploadType" :formatter="uploadStateFormat">
<el-table-column :label="uploadStateLabel" align="center" prop="fUploadType" :formatter="uploadStateFormat">
</el-table-column>
<el-table-column label="上报时间" align="center" prop="fUploadTime" width="150" :formatter="uploadTimeFormat">
<el-table-column :label="uploadTimeLabel" align="center" prop="fUploadTime" width="150" :formatter="uploadTimeFormat">
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......@@ -169,11 +169,7 @@
<el-col :span="12">
<el-form-item label="县级行政区" prop="fRegionId">
<el-select
v-model="form.fRegionId"
placeholder="请选择县级行政区"
style="width: 100%"
>
<el-select v-model="form.fRegionId" placeholder="请选择县级行政区" style="width: 100%" >
<el-option
v-for="county in countyInfo"
:key="county.fId"
......@@ -271,6 +267,8 @@ export default {
},
data() {
return {
uploadStateLabel:"",
uploadTimeLabel:"",
// 遮罩层
loading: true,
user:{},
......@@ -356,7 +354,7 @@ export default {
//判断 上报是否需要显示,上报分为企业上报 和 政府端上报
judgeUploadIsShow(row) {
//角色 1 超级管理员 5 企业
//角色 3 政府角色 5 企业角色
let roleId = this.user.roleId;
// 企业端 上报状态 0-未上报,1-已上报
......@@ -373,8 +371,12 @@ export default {
// 如果企业端上报了,则企业端就不能显示了,政府端和 超级管理员能显示
if(entUploadState === '1' && govUploadState === '0') {
if (roleId === 5) {
this.uploadStateLabel = "上报状态"
this.uploadTimeLabel = "上报时间"
return false;
} else {
this.uploadStateLabel = "上报省厅状态"
this.uploadTimeLabel = "上报省厅时间"
return true;
}
}
......@@ -422,6 +424,18 @@ export default {
this.loading = false;
});
},
// 燃气企业
fCompanyIdFormat(row, column) {
let info = this.enterprises.find(item => item.enterpriseId == row.fCompanyId);
return info?info.enterpriseName:"-";
},
// 行政区
fRegionIdFormat(row, column) {
let info = this.countyInfo.find(item => item.fId == row.fRegionId);
return info?info.fName:"-";
},
// 重要风险点类型,1 密闭空间,2 人员密集场
fRiskTypeFormat(row, column) {
const riskType = this.selectDictLabel(this.fRiskTypeOptions, row.fRiskType);
......@@ -488,6 +502,11 @@ export default {
getInfor(fRiskDevMajInforId).then(response => {
this.form = response.data;
this.open = true;
// 说明是 企业在新增,直接赋值显示就行了。
if (this.enterprises.length == 1) {
this.form.fCompanyId = this.enterprises[0].enterpriseId
this.isDisabledEnterprise = true;
}
this.title = "修改重要风险点管控";
});
},
......
......@@ -162,22 +162,26 @@
<el-divider content-position="left">上报时态</el-divider>
<el-form label-width="170px">
<el-row class="el-row-table">
<el-col :span="12" v-if="-2 == $store.state.user.enterpriseId">
<el-form-item label="政府端上报时间">
<span v-if="detailInfo.fGovUploadTime">{{ detailInfo.fGovUploadTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="企业端上报时间">
<span v-if="detailInfo.fReportTime">{{ detailInfo.fReportTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<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.fReportTime }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
......@@ -192,6 +196,8 @@
name: "detail-info",
data(){
return{
fUploadType: "",
fUploadTime: null,
detailInfo: {
fDeleteFlag: 0
},
......@@ -199,10 +205,39 @@
}
},
methods:{
//根据不同角色显示不同字段
showUploadType() {
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadType = this.detailInfo.fGovUploadStatus
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.fRepStatus
}
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.fGovUploadTime
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entRepTime
}
},
getDetailInfo(id){
getDay(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.showUploadType();
this.showUploadTime();
this.detailOpen = true;
}
})
......
......@@ -104,14 +104,14 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报状态" align="center" prop="fGovUploadStatus">
<el-table-column label="上报省厅状态" align="center" prop="fGovUploadStatus">
<template slot-scope="scope">
<span v-if="scope.row.fGovUploadStatus == '0'">未上报</span>
<span v-else-if="scope.row.fGovUploadStatus == '1'">已上报</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报日期" align="center" prop="fGovUploadTime" width="180">
<el-table-column label="上报省厅日期" align="center" prop="fGovUploadTime" width="180">
<template slot-scope="scope">
<span v-if="scope.row.fGovUploadTime">{{ parseTime(scope.row.fGovUploadTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
<span v-else>-</span>
......
......@@ -70,21 +70,26 @@
<el-divider content-position="left">上报时态</el-divider>
<el-form label-width="170px">
<el-row class="el-row-table">
<el-col :span="12" v-if="-2 == $store.state.user.enterpriseId">
<el-form-item label="政府端上报时间">
<span v-if="detailInfo.fGovUploadTime">{{ detailInfo.fGovUploadTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="企业端上报时间">
<span v-if="detailInfo.fRepDate">{{ detailInfo.fRepDate }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<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.fRepDate }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
......@@ -99,6 +104,8 @@
name: "detail-info",
data(){
return{
fUploadType: "",
fUploadTime: null,
detailInfo: {
fDeleteFlag: 0
},
......@@ -106,10 +113,39 @@
}
},
methods:{
//根据不同角色显示不同字段
showUploadType() {
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadType = this.detailInfo.fGovUploadStatus
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.fRepStatus
}
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.fGovUploadTime
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entRepTime
}
},
getDetailInfo(id){
getSup(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.showUploadType();
this.showUploadTime();
this.detailOpen = true;
}
})
......
......@@ -80,14 +80,14 @@
<el-table-column label="供气量/wm³" align="center" prop="fSupGasVol" />
<el-table-column label="存储量/wm³" align="center" prop="fStorageVol" />
<el-table-column label="监管气量日期" align="center" prop="fSupDate" />
<el-table-column label="上报状态" align="center" prop="fGovUploadStatus">
<el-table-column label="上报省厅状态" align="center" prop="fGovUploadStatus">
<template slot-scope="scope">
<span v-if="scope.row.fGovUploadStatus == '0'">未上报</span>
<span v-else-if="scope.row.fGovUploadStatus == '1'">已上报</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报日期" align="center" prop="fGovUploadTime" width="180">
<el-table-column label="上报省厅时间" align="center" prop="fGovUploadTime" width="180">
<template slot-scope="scope">
<span v-if="scope.row.fGovUploadTime">{{ parseTime(scope.row.fGovUploadTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
<span v-else>-</span>
......
......@@ -103,20 +103,24 @@
<el-form label-width="170px">
<el-row class="el-row-table">
<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.entRepTime }}</span>
</el-form-item>
</el-col>
<el-col :span="12" v-if="-2 == $store.state.user.enterpriseId">
<el-form-item label="政府端上报时间">
<span v-if="detailInfo.fGovUploadTime">{{ detailInfo.fGovUploadTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业端上报时间">
<span v-if="detailInfo.entRepTime">{{ detailInfo.entRepTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
......@@ -137,6 +141,8 @@
detailOpen: false,
stopLog: [],
total: 0,
fUploadType: "",
fUploadTime: null,
queryParams: {
pageNum: 1,
pageSize: 5,
......@@ -156,11 +162,40 @@
}
},
methods:{
//根据不同角色显示不同字段
showUploadType() {
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadType = this.detailInfo.fGovUploadStatus
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.fRepStatus
}
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.fGovUploadTime
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entRepTime
}
},
getDetailInfo(id){
this.queryParams.fGasStopId = id;
getSup(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.showUploadType();
this.showUploadTime();
this.detailOpen = true;
}
})
......
......@@ -114,27 +114,27 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报状态" align="center" prop="fRepStatus" v-if="-2 != $store.state.user.enterpriseId">
<el-table-column label="上报状态" align="center" prop="fRepStatus" v-if="this.$store.state.user.roleId == 5">
<template slot-scope="scope">
<span v-if="scope.row.fRepStatus == '0'">未上报</span>
<span v-else-if="scope.row.fRepStatus == '1'">已上报</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报时间" align="center" prop="entRepTime" width="150" v-if="-2 != $store.state.user.enterpriseId">
<el-table-column label="上报时间" align="center" prop="entRepTime" width="150" v-if="this.$store.state.user.roleId == 5">
<template slot-scope="scope">
<span v-if="scope.row.entRepTime">{{ parseTime(scope.row.entRepTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报状态" align="center" prop="fGovUploadStatus" v-if="-2 == $store.state.user.enterpriseId">
<el-table-column label="上报省厅状态" align="center" prop="fGovUploadStatus" v-if="this.$store.state.user.roleId == 3">
<template slot-scope="scope">
<span v-if="scope.row.fGovUploadStatus == '0'">未上报</span>
<span v-else-if="scope.row.fGovUploadStatus == '1'">已上报</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报时间" align="center" prop="fRecoveryGasTime" width="150" v-if="-2 == $store.state.user.enterpriseId">
<el-table-column label="上报省厅时间" align="center" prop="fRecoveryGasTime" width="150" v-if="this.$store.state.user.roleId == 3">
<template slot-scope="scope">
<span v-if="scope.row.fGovUploadTime">{{ parseTime(scope.row.fGovUploadTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
<span v-else>-</span>
......
......@@ -56,13 +56,13 @@
<el-form label-width="170px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="上报状态" >
<el-form-item :label="fUploadTypeLable" >
<span>{{fUploadType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上报时间" >
<el-form-item :label="fUploadTimeLabel" >
<span>{{ fUploadTime }}</span>
</el-form-item>
</el-col>
......@@ -86,6 +86,8 @@
data(){
return{
detailInfo: {},
fUploadTypeLable: "",
fUploadTimeLabel: "",
detailOpen: false,
fUploadType: "",
fUploadTime: null
......@@ -97,9 +99,11 @@
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadType = this.detailInfo.govUploadState
this.fUploadTypeLable = "上报省厅状态"
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.entUploadState
this.fUploadTypeLable = "上报状态"
}
if (this.fUploadType == '0') {
......@@ -114,9 +118,11 @@
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadTime = this.detailInfo.govUploadTime
this.fUploadTimeLabel = "上报省厅时间"
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entUploadTime
this.fUploadTimeLabel = "上报时间"
}
},
getDetailInfo(id){
......
......@@ -104,8 +104,8 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="上报状态" align="center" prop="uploadState" :formatter="uploadStateFormat" />
<el-table-column label="上报时间" align="center" prop="uploadTime" :formatter="uploadTimeFormat" />
<el-table-column :label="uploadStateLabel" align="center" prop="uploadState" :formatter="uploadStateFormat" />
<el-table-column :label="uploadTimeLabel" align="center" prop="uploadTime" :formatter="uploadTimeFormat" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -240,6 +240,8 @@ export default {
data() {
return {
user:{},
uploadStateLabel:"",
uploadTimeLabel:"",
enterprises: [],
// 遮罩层
loading: true,
......@@ -329,12 +331,14 @@ export default {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
if (roleId == 5) {
this.uploadStateLabel = "上报状态"
if (row.entUploadState == '0') {
return "未上报"
} else{
return "已上报"
}
} else {
this.uploadStateLabel = "上报省厅状态"
if (row.govUploadState == '0') {
return "未上报"
} else{
......@@ -347,8 +351,10 @@ export default {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
if (roleId == 5) {
this.uploadTimeLabel = "上报时间"
return row.entUploadTime;
} else {
this.uploadTimeLabel = "上报省厅时间"
return row.govUploadTime;
}
......
......@@ -251,13 +251,13 @@
<el-form label-width="170px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="上报状态" >
<el-form-item :label="fUploadTypeLable" >
<span>{{fUploadType}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上报时间" >
<el-form-item :label="fUploadTimeLabel" >
<span>{{ fUploadTime }}</span>
</el-form-item>
</el-col>
......@@ -284,6 +284,8 @@
return{
enterprises: [],
countyInfo: [],
fUploadTypeLable: "",
fUploadTimeLabel: "",
enterpriseName:"",
detailInfo: {},
detailOpen: false,
......@@ -302,9 +304,11 @@
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadType = this.detailInfo.govUploadState
this.fUploadTypeLable = "上报省厅状态"
}
if (roleId == 5) {
this.fUploadType = this.detailInfo.entUploadState
this.fUploadTypeLable = "上报状态"
}
if (this.fUploadType == '0') {
......@@ -319,9 +323,11 @@
let roleId = this.$store.state.user.roleId;
if (roleId == 3) {
this.fUploadTime = this.detailInfo.govUploadTime
this.fUploadTimeLabel = "上报省厅时间"
}
if (roleId == 5) {
this.fUploadTime = this.detailInfo.entUploadTime
this.fUploadTimeLabel = "上报时间"
}
},
//获取县级
......
......@@ -106,8 +106,8 @@
</template>
</el-table-column>
<el-table-column label="管道压力等级分类" align="center" prop="fPipePress" :formatter="fPipePressFormat" />
<el-table-column label="上报状态" align="center" prop="uploadState" :formatter="uploadStateFormat" />
<el-table-column label="上报时间" align="center" prop="uploadTime" :formatter="uploadTimeFormat" />
<el-table-column :label="uploadStateLabel" align="center" prop="uploadState" :formatter="uploadStateFormat" />
<el-table-column :label="uploadTimeLabel" align="center" prop="uploadTime" :formatter="uploadTimeFormat" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="210">
<template slot-scope="scope">
<el-button
......@@ -498,6 +498,8 @@ export default {
},
data() {
return {
uploadStateLabel:"",
uploadTimeLabel:"",
enterpriseName:"",
enterprises: [],
user:{},
......@@ -642,12 +644,14 @@ export default {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
if (roleId == 5) {
this.uploadStateLabel = "上报状态"
if (row.entUploadState == '0') {
return "未上报"
} else{
return "已上报"
}
} else {
this.uploadStateLabel = "上报省厅状态"
if (row.govUploadState == '0') {
return "未上报"
} else{
......@@ -660,8 +664,10 @@ export default {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
if (roleId == 5) {
this.uploadTimeLabel = "上报时间"
return row.entUploadTime;
} else {
this.uploadTimeLabel = "上报省厅时间"
return row.govUploadTime;
}
......
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