flx:修改安全检查

This commit is contained in:
X_Rian 2024-10-14 17:35:49 +08:00
parent 16231e5bbc
commit 9f43579518
6 changed files with 61 additions and 30 deletions

View File

@ -28,6 +28,31 @@ export const getCountHiddenDangerInspectRegion = (params: {}) => {
});
};
// 安全检查统计
export const getBigScreenProjectInspectRecordCount = (params: {}) => {
return http.post(BASEURL + `/xmgl/xzSecurity/bigScreen/getProjectInspectRecordCount`, params, { headers: { noLoading: true } });
};
// EPC责任单位分析
export const getBigScreenCountResponsibleUnit = (params: {}) => {
return http.post(BASEURL + `/xmgl/xzSecurity/bigScreen/countResponsibleUnit`, params, { headers: { noLoading: true } });
};
// 问题分类统计
export const getBigScreenCountProblem = (params: {}) => {
return http.post(BASEURL + `/xmgl/xzSecurity/bigScreen/countProblem`, params, {
headers: { noLoading: true }
});
};
// 责任装置分析
export const getBigScreenCountDevice = (params: {}) => {
return http.post(BASEURL + `/xmgl/xzSecurity/bigScreen/countDevice`, params, {
headers: { noLoading: true }
});
};
// 安全检查记录
export const getBigScreenPage = (params: {}) => {
return http.post(BASEURL + `/xmgl/xzSecurity/bigScreen/page`, params, { headers: { noLoading: true } });
};
// -------------- 烟感监测 --------------
// 统计烟感报警数据
export const countSmokeDevAlarm = (params: {}) => {

View File

@ -15,7 +15,7 @@ import Card from "@/components/card.vue";
import { ref, onMounted } from "vue";
import * as echarts from "echarts";
import symbolIcon from "@/assets/images/lineSymbol.png";
import { getCountHiddenDangerInspectRegion } from "@/api/modules/securityManagement";
import { getBigScreenCountDevice } from "@/api/modules/securityManagement";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
let yData = ref([10, 20, 30, 10, 2, 6, 12] as any);
@ -182,11 +182,11 @@ function draw() {
let noData = ref(false as any);
//
const getDutyArea = async () => {
const res: any = await getCountHiddenDangerInspectRegion({ projectSn: store.sn });
const res: any = await getBigScreenCountDevice({ projectSn: store.sn });
console.log("责任区域分析", res);
xData.value = res.result.data.map((item: any) => item.name);
yData.value = res.result.data.map((item: any) => item.count);
if (res.result.data.length > 0) {
xData.value = res.result.map((item: any) => item.x);
yData.value = res.result.map((item: any) => item.y);
if (res.result.length > 0) {
draw();
} else {
noData.value = true;

View File

@ -1,5 +1,5 @@
<template>
<Card title="安全隐患统计">
<Card title="安全检查统计">
<div class="centerTopBox">
<div class="line"></div>
<div class="lineDate1 data">
@ -20,7 +20,7 @@
<div class="num">
<div class="text"><i>未闭合</i></div>
<div class="numStyle">
<i>{{ safeHazardTotal.closeNum || 0 }}</i>
<i>{{ safeHazardTotal.notCloseNum || 0 }}</i>
</div>
</div>
</div>
@ -62,9 +62,9 @@
<img src="@/assets/images/securityManagement/safeImg5.png" alt="" />
</div>
<div class="num">
<div class="text"><i>待复查数</i></div>
<div class="text"><i>累计闭合</i></div>
<div class="numStyle">
<i>{{ safeHazardTotal.reviewNum || 0 }}</i>
<i>{{ safeHazardTotal.rectifyCompleteNum || 0 }}</i>
</div>
</div>
</div>
@ -75,13 +75,13 @@
<script setup lang="ts">
import Card from "@/components/card.vue";
import { onMounted, onBeforeUnmount, ref } from "vue";
import { getProjectInspectRecordCount } from "@/api/modules/securityManagement";
import { getBigScreenProjectInspectRecordCount } from "@/api/modules/securityManagement";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
//
const safeHazardTotal = ref({} as any);
const getHazardTotal = async () => {
const res: any = await getProjectInspectRecordCount({ projectSn: store.sn });
const res: any = await getBigScreenProjectInspectRecordCount({ projectSn: store.sn });
console.log("安全隐患统计", res);
safeHazardTotal.value = res.result;
};

View File

@ -1,5 +1,5 @@
<template>
<Card title="隐患等级分析">
<Card title="问题分类统计">
<div class="leftBottomBox">
<div class="rightHeader">
<div class="day" :class="airType == 1 ? 'active' : ''" @click="selectChange(1)">近7天</div>
@ -26,7 +26,7 @@
<script lang="ts" setup>
import Card from "@/components/card.vue";
import { onMounted, onBeforeUnmount, ref } from "vue";
import { getCountFaultLevel } from "@/api/modules/securityManagement";
import { getBigScreenCountProblem } from "@/api/modules/securityManagement";
import * as echarts from "echarts";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
@ -339,7 +339,7 @@ let startTime = ref("" as any);
let endTime = ref("" as any);
//
const getHazardLevel = async () => {
const res: any = await getCountFaultLevel({
const res: any = await getBigScreenCountProblem({
projectSn: store.sn,
type: selectType.value,
inspectTime_begin: startTime.value,

View File

@ -13,7 +13,7 @@
<script setup lang="ts">
import Card from "@/components/card.vue";
import { onMounted, onBeforeUnmount, ref } from "vue";
import { getCountResponsibleUnit } from "@/api/modules/securityManagement";
import { getBigScreenCountResponsibleUnit } from "@/api/modules/securityManagement";
import * as echarts from "echarts";
import symbolIcon from "@/assets/images/lineSymbol.png";
import { GlobalStore } from "@/stores";
@ -183,7 +183,7 @@ function draw() {
let noData = ref(false as any);
//
const getDutyUnit = async () => {
const res: any = await getCountResponsibleUnit({ projectSn: store.sn });
const res: any = await getBigScreenCountResponsibleUnit({ projectSn: store.sn });
xData.value = res.result.map((item: any) => item.x);
yData.value = res.result.map((item: any) => item.y);
if (res.result.length > 0) {

View File

@ -10,23 +10,23 @@
<el-scrollbar style="height: 100%" ref="refScrollbar">
<div class="menuL" v-for="item in list" :key="item.id">
<div class="leftNum">
<div class="single-text" :title="item.checkContent" style="font-size: 18px">
{{ item.checkContent || "" }}
<div class="single-text" :title="item.dangerItemContent" style="font-size: 18px">
{{ item.dangerItemContent || "" }}
</div>
<div class="over-time" v-if="item.overdueType"><span style="color: #e25f64">已逾期</span></div>
<div class="name">
整改结果<span :style="{ color: item.status ? rectification[item.status - 1].color : '' }">{{
item.status ? rectification[item.status - 1].name : ""
整改结果<span :style="{ color: item.status ? rectificationUp(item.status, 'color') : '' }">{{
item.status ? rectificationUp(item.status, 'name') : ""
}}</span>
</div>
<div class="name">检查人{{ item.reviewUserName || "" }}</div>
<div class="name">检查人{{ item.inspectManName || "" }}</div>
</div>
<div class="rightDate">
<div class="date">
<!-- changeUserName -->
责任单位<span>{{ item.enterpriseName || "" }}</span>
</div>
<div class="date">发起日期{{ item.createTime || "" }}</div>
<div class="date">检查日期{{ item.inspectTime || "" }}</div>
</div>
</div>
</el-scrollbar>
@ -41,20 +41,21 @@
<script setup lang="ts">
import Card from "@/components/card.vue";
import { onMounted, onBeforeUnmount, ref } from "vue";
import { getInspectRecord } from "@/api/modules/securityManagement";
import { onMounted, onBeforeUnmount, ref, computed } from "vue";
import { getBigScreenPage } from "@/api/modules/securityManagement";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
let rectification = ref([
{ id: 1, name: "无需整改", color: "#a1accb" },
{ id: 2, name: "待整改", color: "#698ed2" },
{ id: 3, name: "待复查", color: "#EEA959" },
{ id: 4, name: "合格", color: "#82FBEA" },
{ id: 5, name: "不合格", color: "#a1accb" }
{ id: 3, name: "整改中", color: "#EEA959" },
{ id: 5, name: "合格", color: "#82FBEA" },
{ id: 4, name: "不合格", color: "#a1accb" },
{ id: 6, name: "已撤销", color: "#a1accb" },
]);
let list = ref(["", "", "", "", "", "", "", "", "", ""]);
let list = ref(["", "", "", "", "", "", "", "", "", ""] as any[]);
const refScrollbar = ref(null as any); //
const ScrollbarTop = ref(0);
@ -63,9 +64,14 @@ let moreScroll = ref(true as any);
let pageNo = ref(1 as any);
let pageSize = ref(10 as any);
const rectificationUp =(status: number, name: string) => {
const find: any = rectification.value.find((item) => item.id == status);
return find ? find[name] : '';
};
//
const getSafeRecordList = async () => {
const res: any = await getInspectRecord({ projectSn: store.sn, pageNo: 1, pageSize: 10 });
const res: any = await getBigScreenPage({ projectSn: store.sn, pageNo: 1, pageSize: 10 });
// console.log("", res);
list.value = res.result.records;
if (res.result.pages == pageNo.value) {
@ -78,7 +84,7 @@ const getSafeRecordList = async () => {
//
const getMoreSafeRecordList = async () => {
const res: any = await getInspectRecord({ projectSn: store.sn, pageNo: pageNo.value, pageSize: pageSize.value });
const res: any = await getBigScreenPage({ projectSn: store.sn, pageNo: pageNo.value, pageSize: pageSize.value });
// console.log("", res);
list.value = list.value.concat(res.result.records);
if (res.result.pages == pageNo.value) {