优化首页弹出查询

main
liukewei 11 months ago
parent 1012c74fb9
commit a30a7d3627

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

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

@ -62,4 +62,6 @@ public class HiddenDangerVo extends BaseEntity {
*/
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="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="isOverTime == '1'">and STATUS != 10 AND rectify_term_time &lt; NOW()</if>
<if test="hiddenDangerLabelArray != null ">
AND
<foreach collection="hiddenDangerLabelArray" item="item" separator="OR" index="index" open="(" close=")">

@ -41,7 +41,7 @@
</select>
<select id="getEhsIndexStatisticsList" resultType="com.ruoyi.ehsIndexStatistics.vo.EhsIndexStatistics">
SELECT
r.hidden_danger_grade,
r.hidden_danger_grade hiddenDangerGrade,
d.dict_label name,
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,
@ -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.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.isOverTime != null ">and STATUS != 10 AND rectify_term_time &lt; NOW()</if>
<if test="vo.isSupervise != null ">and is_supervise = 1</if>
</where>
</select>
<select id="getHiddenDangerSituationList"

@ -4,31 +4,31 @@
<el-col :sm="24" :lg="24">
<blockquote style="font-size: 14px">
本年度共有
<el-button type="text" @click="haddenClick">{{
<el-button type="text" >{{
yearData.unitNum
}}</el-button>
家单位开展安全生产事故隐患排查治理排查出隐患
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(1,'')">{{
yearData.hiddenDangerNum
}}</el-button>
已整改
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(2,'')">{{
yearData.haveRectifiedNum
}}</el-button>
( 整改率为
<el-button type="text" @click="haddenClick">{{
<el-button type="text" >{{
yearData.rectifyRate
}}</el-button>
未整改
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(3,'')">{{
yearData.notRectifiedNum
}}</el-button>
超期未整改
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(4,'')">{{
yearData.exceedNotRectifiedNum
}}</el-button>
累计落实整改治理资金
<el-button type="text" @click="haddenClick">{{
<el-button type="text" >{{
yearData.rectifyMoneySum
}}</el-button>
万元
@ -37,23 +37,23 @@
<div v-for="(item, i) in hiddenList" :key="i">
累计排查出{{ item.name }}
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(1,item.hiddenDangerGrade)">{{
item.hiddenDangerNum
}}</el-button>
已整改
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(2,item.hiddenDangerGrade)">{{
item.haveRectifiedNum
}}</el-button>
(整改率为
<el-button type="text" @click="haddenClick">{{
<el-button type="text" >{{
item.rectifyRate
}}</el-button>
)未整改
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(3,item.hiddenDangerGrade)">{{
item.notRectifiedNum
}}</el-button>
超期未整改
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(4,item.hiddenDangerGrade)">{{
item.exceedNotRectifiedNum
}}</el-button>
@ -62,23 +62,23 @@
</div>
其中列入督办隐患治理项目
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(5,'')">{{
collectData.hiddenDangerNum
}}</el-button>
已整改
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(6,'')">{{
collectData.haveRectifiedNum
}}</el-button>
(整改率为
<el-button type="text" @click="haddenClick">{{
<el-button type="text" >{{
collectData.rectifyRate
}}</el-button>
未整改
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(7,'')">{{
collectData.notRectifiedNum
}}</el-button>
超期未整改
<el-button type="text" @click="haddenClick">{{
<el-button type="text" @click="haddenClick(8,'')">{{
collectData.exceedNotRectifiedNum
}}</el-button>
)
@ -127,110 +127,7 @@
v-show="showSearch"
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-table v-loading="loading" border :data="detailsList">
@ -250,17 +147,16 @@
align="center"
prop="enterpriseName"
/>
<el-table-column
label="隐患类别"
align="center"
prop="hiddenDangerType"
/>
<el-table-column
label="隐患级别"
align="center"
prop="hiddenDangerGrade"
/>
<el-table-column label="公文编号" align="center" prop="docNumber" />
<el-table-column label="隐患级别" align="center" prop="hiddenDangerGrade">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_grade" :value="scope.row.hiddenDangerGrade"/>
</template>
</el-table-column>
<el-table-column label="隐患类型" align="center" prop="hiddenDangerType">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_type" :value="scope.row.hiddenDangerType"/>
</template>
</el-table-column>
<el-table-column label="排查出隐患日期" align="center" prop="checkTime">
<template slot-scope="scope">
<span>{{
@ -280,7 +176,14 @@
align="center"
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>
<pagination
@ -305,10 +208,10 @@
detailslist,
} from "@/api/ehs/IndexStatistics";
import { parseTime } from "@/utils/ruoyi";
import dict from "@/utils/dict";
export default {
name: "Index",
dicts: ["hidden_danger_grade", "hidden_danger_status"],
dicts: ["hidden_danger_grade", "hidden_danger_status","hidden_danger_type"],
data() {
return {
showSearch: true,
@ -320,6 +223,7 @@
queryParams: {
pageNum: 1,
pageSize: 10,
isOverTime:null,
params: {
qxStartTime: null,
qxEndTime: null,
@ -357,7 +261,6 @@
this.getIndexDetails();
},
methods: {
dict,
parseTime,
/** 获取拟稿部门下拉列表 */
getIndexDetails() {
@ -387,8 +290,34 @@
this.queryParams.pageNum = 1;
this.getList();
},
haddenClick() {
haddenClick(type,hiddenDangerGrade) {
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();
},
getList() {
@ -415,6 +344,14 @@
cancel() {
this.open = false;
},
statusToStr(value) {
if(value=="0")
return "未整改"
else if(value=="10")
return "已整改"
else
return "未知"
},
},
};
</script>

Loading…
Cancel
Save