优化首页弹出查询

main
liukewei 11 months ago
parent 1012c74fb9
commit a30a7d3627

@ -133,4 +133,7 @@ public class EhsHiddenDanger extends BaseEntity
private String economicType; private String economicType;
@Excel(name = "企业规模") @Excel(name = "企业规模")
private String enterpriseScale; private String enterpriseScale;
@TableField(exist = false)
private String isOverTime;//是否超时未整改
} }

@ -53,4 +53,8 @@ public class EhsIndexStatistics {
*/ */
private String rectifyRate; private String rectifyRate;
/**
*
*/
private String hiddenDangerGrade;
} }

@ -62,4 +62,6 @@ public class HiddenDangerVo extends BaseEntity {
*/ */
private String status; private String status;
private String isOverTime; //是否超期未整改
private String isSupervise;//是否督办
} }

@ -65,6 +65,7 @@
<if test="hiddenDangerType != null and hiddenDangerType != ''"> and hidden_danger_type = #{hiddenDangerType}</if> <if test="hiddenDangerType != null and hiddenDangerType != ''"> and hidden_danger_type = #{hiddenDangerType}</if>
<if test="assistDept != null and assistDept != ''"> and FIND_IN_SET( #{assistDept}, assist_dept )</if> <if test="assistDept != null and assistDept != ''"> and FIND_IN_SET( #{assistDept}, assist_dept )</if>
<if test="areaId != null and areaId != ''">and area_id = #{areaId}</if> <if test="areaId != null and areaId != ''">and area_id = #{areaId}</if>
<if test="isOverTime == '1'">and STATUS != 10 AND rectify_term_time &lt; NOW()</if>
<if test="hiddenDangerLabelArray != null "> <if test="hiddenDangerLabelArray != null ">
AND AND
<foreach collection="hiddenDangerLabelArray" item="item" separator="OR" index="index" open="(" close=")"> <foreach collection="hiddenDangerLabelArray" item="item" separator="OR" index="index" open="(" close=")">

@ -41,7 +41,7 @@
</select> </select>
<select id="getEhsIndexStatisticsList" resultType="com.ruoyi.ehsIndexStatistics.vo.EhsIndexStatistics"> <select id="getEhsIndexStatisticsList" resultType="com.ruoyi.ehsIndexStatistics.vo.EhsIndexStatistics">
SELECT SELECT
r.hidden_danger_grade, r.hidden_danger_grade hiddenDangerGrade,
d.dict_label name, d.dict_label name,
sum( CASE WHEN r.hidden_danger_id is not null THEN 1 ELSE 0 END ) hiddenDangerNum, sum( CASE WHEN r.hidden_danger_id is not null THEN 1 ELSE 0 END ) hiddenDangerNum,
sum( CASE WHEN r.STATUS = 10 THEN 1 ELSE 0 END ) haveRectifiedNum, sum( CASE WHEN r.STATUS = 10 THEN 1 ELSE 0 END ) haveRectifiedNum,
@ -78,6 +78,8 @@
<if test="vo.params.pcEndTime != null and vo.params.pcEndTime != ''">and check_time &lt; #{vo.params.pcEndTime}</if> <if test="vo.params.pcEndTime != null and vo.params.pcEndTime != ''">and check_time &lt; #{vo.params.pcEndTime}</if>
<if test="vo.params.wcStartTime != null and vo.params.wcStartTime != ''">and rectify_time >= #{vo.params.wcStartTime}</if> <if test="vo.params.wcStartTime != null and vo.params.wcStartTime != ''">and rectify_time >= #{vo.params.wcStartTime}</if>
<if test="vo.params.wcEndTime != null and vo.params.wcEndTime != ''">and rectify_time &lt; #{vo.params.wcEndTime}</if> <if test="vo.params.wcEndTime != null and vo.params.wcEndTime != ''">and rectify_time &lt; #{vo.params.wcEndTime}</if>
<if test="vo.isOverTime != null ">and STATUS != 10 AND rectify_term_time &lt; NOW()</if>
<if test="vo.isSupervise != null ">and is_supervise = 1</if>
</where> </where>
</select> </select>
<select id="getHiddenDangerSituationList" <select id="getHiddenDangerSituationList"

@ -4,31 +4,31 @@
<el-col :sm="24" :lg="24"> <el-col :sm="24" :lg="24">
<blockquote style="font-size: 14px"> <blockquote style="font-size: 14px">
本年度共有 本年度共有
<el-button type="text" @click="haddenClick">{{ <el-button type="text" >{{
yearData.unitNum yearData.unitNum
}}</el-button> }}</el-button>
家单位开展安全生产事故隐患排查治理排查出隐患 家单位开展安全生产事故隐患排查治理排查出隐患
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(1,'')">{{
yearData.hiddenDangerNum yearData.hiddenDangerNum
}}</el-button> }}</el-button>
已整改 已整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(2,'')">{{
yearData.haveRectifiedNum yearData.haveRectifiedNum
}}</el-button> }}</el-button>
( 整改率为 ( 整改率为
<el-button type="text" @click="haddenClick">{{ <el-button type="text" >{{
yearData.rectifyRate yearData.rectifyRate
}}</el-button> }}</el-button>
未整改 未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(3,'')">{{
yearData.notRectifiedNum yearData.notRectifiedNum
}}</el-button> }}</el-button>
超期未整改 超期未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(4,'')">{{
yearData.exceedNotRectifiedNum yearData.exceedNotRectifiedNum
}}</el-button> }}</el-button>
累计落实整改治理资金 累计落实整改治理资金
<el-button type="text" @click="haddenClick">{{ <el-button type="text" >{{
yearData.rectifyMoneySum yearData.rectifyMoneySum
}}</el-button> }}</el-button>
万元 万元
@ -37,23 +37,23 @@
<div v-for="(item, i) in hiddenList" :key="i"> <div v-for="(item, i) in hiddenList" :key="i">
累计排查出{{ item.name }} 累计排查出{{ item.name }}
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(1,item.hiddenDangerGrade)">{{
item.hiddenDangerNum item.hiddenDangerNum
}}</el-button> }}</el-button>
已整改 已整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(2,item.hiddenDangerGrade)">{{
item.haveRectifiedNum item.haveRectifiedNum
}}</el-button> }}</el-button>
(整改率为 (整改率为
<el-button type="text" @click="haddenClick">{{ <el-button type="text" >{{
item.rectifyRate item.rectifyRate
}}</el-button> }}</el-button>
)未整改 )未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(3,item.hiddenDangerGrade)">{{
item.notRectifiedNum item.notRectifiedNum
}}</el-button> }}</el-button>
超期未整改 超期未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(4,item.hiddenDangerGrade)">{{
item.exceedNotRectifiedNum item.exceedNotRectifiedNum
}}</el-button> }}</el-button>
@ -62,23 +62,23 @@
</div> </div>
其中列入督办隐患治理项目 其中列入督办隐患治理项目
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(5,'')">{{
collectData.hiddenDangerNum collectData.hiddenDangerNum
}}</el-button> }}</el-button>
已整改 已整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(6,'')">{{
collectData.haveRectifiedNum collectData.haveRectifiedNum
}}</el-button> }}</el-button>
(整改率为 (整改率为
<el-button type="text" @click="haddenClick">{{ <el-button type="text" >{{
collectData.rectifyRate collectData.rectifyRate
}}</el-button> }}</el-button>
未整改 未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(7,'')">{{
collectData.notRectifiedNum collectData.notRectifiedNum
}}</el-button> }}</el-button>
超期未整改 超期未整改
<el-button type="text" @click="haddenClick">{{ <el-button type="text" @click="haddenClick(8,'')">{{
collectData.exceedNotRectifiedNum collectData.exceedNotRectifiedNum
}}</el-button> }}</el-button>
) )
@ -127,110 +127,7 @@
v-show="showSearch" v-show="showSearch"
label-width="68px" label-width="68px"
> >
<el-form-item label="单位名称" prop="enterpriseName">
<el-input
v-model="queryParams.enterpriseName"
placeholder="请输入单位名称"
clearable
/>
</el-form-item>
<el-form-item label="隐患等级" prop="hiddenDangerGrade">
<el-select
v-model="queryParams.hiddenDangerGrade"
placeholder="请选择隐患等级"
clearable
>
<el-option
v-for="dict in dict.type.hidden_danger_grade"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="整改情况" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择整改情况"
clearable
>
<el-option
v-for="dict in dict.type.hidden_danger_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="整改期限">
<el-date-picker
v-model="queryParams.params.qxStartTime"
type="date"
placeholder="选择开始时间"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd 00:00:00"
>
</el-date-picker
>
<el-date-picker
v-model="queryParams.params.qxEndTime"
type="date"
placeholder="选择结束时间"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd 23:59:59"
>
</el-date-picker>
</el-form-item>
<el-form-item label="排查日期">
<el-date-picker
v-model="queryParams.params.pcStartTime"
type="date"
placeholder="选择开始时间"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd 00:00:00"
>
</el-date-picker
>
<el-date-picker
v-model="queryParams.params.pcEndTime"
type="date"
placeholder="选择结束时间"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd 23:59:59"
>
</el-date-picker>
</el-form-item>
<el-form-item label="整改完成日期">
<el-date-picker
v-model="queryParams.params.wcStartTime"
type="date"
placeholder="选择开始时间"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd 00:00:00"
>
</el-date-picker
>
<el-date-picker
v-model="queryParams.params.wcEndTime"
type="date"
placeholder="选择结束时间"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd 23:59:59"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" border :data="detailsList"> <el-table v-loading="loading" border :data="detailsList">
@ -250,17 +147,16 @@
align="center" align="center"
prop="enterpriseName" prop="enterpriseName"
/> />
<el-table-column <el-table-column label="隐患级别" align="center" prop="hiddenDangerGrade">
label="隐患类别" <template slot-scope="scope">
align="center" <dict-tag :options="dict.type.hidden_danger_grade" :value="scope.row.hiddenDangerGrade"/>
prop="hiddenDangerType" </template>
/> </el-table-column>
<el-table-column <el-table-column label="隐患类型" align="center" prop="hiddenDangerType">
label="隐患级别" <template slot-scope="scope">
align="center" <dict-tag :options="dict.type.hidden_danger_type" :value="scope.row.hiddenDangerType"/>
prop="hiddenDangerGrade" </template>
/> </el-table-column>
<el-table-column label="公文编号" align="center" prop="docNumber" />
<el-table-column label="排查出隐患日期" align="center" prop="checkTime"> <el-table-column label="排查出隐患日期" align="center" prop="checkTime">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
@ -280,7 +176,14 @@
align="center" align="center"
prop="principalName" prop="principalName"
/> />
<el-table-column label="整改情况" align="center" prop="status" /> <el-table-column label="整改情况" align="center" prop="status" >
<template slot-scope="scope">
<span>
{{statusToStr(scope.row.status)}}
</span>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -305,10 +208,10 @@
detailslist, detailslist,
} from "@/api/ehs/IndexStatistics"; } from "@/api/ehs/IndexStatistics";
import { parseTime } from "@/utils/ruoyi"; import { parseTime } from "@/utils/ruoyi";
import dict from "@/utils/dict";
export default { export default {
name: "Index", name: "Index",
dicts: ["hidden_danger_grade", "hidden_danger_status"], dicts: ["hidden_danger_grade", "hidden_danger_status","hidden_danger_type"],
data() { data() {
return { return {
showSearch: true, showSearch: true,
@ -320,6 +223,7 @@
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
isOverTime:null,
params: { params: {
qxStartTime: null, qxStartTime: null,
qxEndTime: null, qxEndTime: null,
@ -357,7 +261,6 @@
this.getIndexDetails(); this.getIndexDetails();
}, },
methods: { methods: {
dict,
parseTime, parseTime,
/** 获取拟稿部门下拉列表 */ /** 获取拟稿部门下拉列表 */
getIndexDetails() { getIndexDetails() {
@ -387,8 +290,34 @@
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
haddenClick() { haddenClick(type,hiddenDangerGrade) {
this.open = true; this.open = true;
this.resetForm("queryForm");
this.queryParams.isOverTime = null;
this.queryParams.status = null;
this.queryParams.hiddenDangerGrade = null;
this.queryParams.isSupervise = null;
if(hiddenDangerGrade != ""){
this.queryParams.hiddenDangerGrade = hiddenDangerGrade;
}
if(type == 2){//
this.queryParams.status = "10";
}else if(type == 3){//isOverTime
this.queryParams.status = "0";
}else if(type == 4){//
this.queryParams.isOverTime = "1";
}else if(type == 5){//
this.queryParams.isSupervise = 1;
}else if(type == 6){//
this.queryParams.isSupervise = 1;
this.queryParams.status = "10";
}else if(type == 7){//
this.queryParams.isSupervise = 1;
this.queryParams.status = "0";
}else if(type == 8){//
this.queryParams.isSupervise = 1;
this.queryParams.isOverTime = "1";
}
this.handleQuery(); this.handleQuery();
}, },
getList() { getList() {
@ -415,6 +344,14 @@
cancel() { cancel() {
this.open = false; this.open = false;
}, },
statusToStr(value) {
if(value=="0")
return "未整改"
else if(value=="10")
return "已整改"
else
return "未知"
},
}, },
}; };
</script> </script>

Loading…
Cancel
Save