安全管理页面数据接口对接完成
This commit is contained in:
parent
6e1f840dff
commit
445bca4584
@ -37,7 +37,21 @@ export const getAlarmList = (params: {}) => {
|
||||
export const getRealTimeTotal = (params: {}) => {
|
||||
return http.post(BASEURL + `/xmgl/aiAnalyseHardWareAlarmRecord/countAiAnalyseHardWareAlarmTotal`, params);
|
||||
};
|
||||
// 3.查询当前实时数据
|
||||
// 3.查询风险清册数据
|
||||
export const getRiskInventory = (params: {}) => {
|
||||
return http.post(BASEURL + `/xmgl/aiAnalyseHardWareAlarmRecord/countAiAnalyseHardWareAlarmTotal`, params);
|
||||
// return http.get(BASEURL + `/xmgl/rtRiskInventoryType/tree/page?lang=zh_CN&projectSn=028B641FFE2A4A3B9A510668E6C515C0&pageNo=1&pageSize=15`, params);
|
||||
return http.get(BASEURL + `/xmgl/rtRiskInventoryType/tree/page?lang=zh_CN&pageNo=1&pageSize=15`, params);
|
||||
};
|
||||
// 4.获取今日告警统计数据
|
||||
export const getTodayWarn = (params: {}) => {
|
||||
return http.post(BASEURL + `/xmgl/environmentAlarm/selectEnvironmentAlarmCountTotal`, params);
|
||||
};
|
||||
|
||||
// 5.获取违章成员数据
|
||||
export const getIllegalPerson = (params: {}) => {
|
||||
return http.post(BASEURL + `/xmgl/aiAnalyseHardWareAlarmRecord/violatorListSort`, params);
|
||||
};
|
||||
// 6.获取工作票数据
|
||||
export const getWorkTicket = (params: {}) => {
|
||||
return http.get(BASEURL + `/xmgl/rtWorkTicket/countRtWorkTicket`, params);
|
||||
};
|
||||
|
||||
@ -4,10 +4,23 @@
|
||||
<Card title="今日报警统计">
|
||||
<div class="card-box1">
|
||||
<div class="c1-left">
|
||||
<div class="warning-list" v-for="(item,index) in warningCount" :key="index">
|
||||
<div class="warning-color" :style="item.color"></div>
|
||||
<div class="warning-type">{{item.desc}}</div>
|
||||
<div class="warning-count">{{item.count}}</div>
|
||||
<div class="warning-list">
|
||||
<div class="warning-color" style="background-color: green;"></div><div class="warning-type">噪声报警</div><div class="warning-count">{{ todayWarnData.noiseNum }}</div>
|
||||
</div>
|
||||
<div class="warning-list">
|
||||
<div class="warning-color" style="background-color: yellow;"></div><div class="warning-type">PM2.5超标报警</div><div class="warning-count">{{ todayWarnData.pm25Num }}</div>
|
||||
</div>
|
||||
<div class="warning-list">
|
||||
<div class="warning-color" style="background-color: blue;"></div><div class="warning-type">PM10超标报警</div><div class="warning-count">{{ todayWarnData.pm10Num }}</div>
|
||||
</div>
|
||||
<div class="warning-list">
|
||||
<div class="warning-color" style="background-color: burlywood;"></div><div class="warning-type">TSP报警</div><div class="warning-count">{{ todayWarnData.tspNum }}</div>
|
||||
</div>
|
||||
<div class="warning-list">
|
||||
<div class="warning-color" style="background-color: palevioletred;"></div><div class="warning-type">湿度报警</div><div class="warning-count">{{ todayWarnData.humidityNum }}</div>
|
||||
</div>
|
||||
<div class="warning-list">
|
||||
<div class="warning-color" style="background-color: purple;"></div><div class="warning-type">风速报警</div><div class="warning-count">{{ todayWarnData.windspeedNum }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="c1-right">
|
||||
@ -17,19 +30,19 @@
|
||||
</div>
|
||||
<div class="bottom-desc">
|
||||
<div class="text-title">今日不适宜作业内容</div>
|
||||
<p class="text-info">{{ warningNotice.noticeText}}</p>
|
||||
<p class="text-info">{{ todayWarnMsg }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
<div class="left-middle">
|
||||
<Card title="严重违章成员">
|
||||
<Card title="AI违章成员">
|
||||
<div class="illegal-person-list">
|
||||
<div class="illegal-person-item" v-for="(item, index) in illegalPersonList" :key="index">
|
||||
<span class="item-left" style="color: rgb(19, 112, 251);">No.{{ index+1 }}</span>
|
||||
<span class="item-left" style="color: white;"> {{ item.personName }}</span>
|
||||
<span class="item-right">{{ item.illegalCount }}次</span>
|
||||
<span class="item-left" style="color: white;"> {{ item.workerName }}</span>
|
||||
<span class="item-right">{{ item.count }}次</span>
|
||||
<div class="ranking-column" style="border-color: rgba(19, 112, 251, 0.5);">
|
||||
<div class="inside-column" style="width: 100%; background-color: rgb(19, 112, 251);">
|
||||
<div class="shine"></div>
|
||||
@ -43,11 +56,11 @@
|
||||
<Card title="工作票">
|
||||
<div class="card-box3">
|
||||
<div class="c3-left">
|
||||
<div><b>{{ workTicketCount.historyTickets }}</b></div>
|
||||
<div><b>{{ workTicketCount.historyCount }}</b></div>
|
||||
<div>历史工作票</div>
|
||||
</div>
|
||||
<div class="c3-right">
|
||||
<div><b>{{ workTicketCount.todaytickets }}</b></div>
|
||||
<div><b>{{ workTicketCount.todayCount }}</b></div>
|
||||
<div>今日工作票</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -58,32 +71,65 @@
|
||||
<script lang="ts" setup>
|
||||
import Card from "@/components/card.vue";
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import { getTodayWarn,getIllegalPerson,getWorkTicket } from "@/api/modules/securityManagement";
|
||||
import { GlobalStore } from "@/stores";
|
||||
// 当前环境
|
||||
const BASEURL = import.meta.env.VITE_API_URL;
|
||||
const store = GlobalStore();
|
||||
//左上-左部今日报警模拟数据
|
||||
let warningCount = ref([
|
||||
{id:1, color: 'background-color: green;',desc:'噪声报警',count: 0}, {id:2, color: 'background-color: yellow',desc:'PM2.5超标报警',count: 557},
|
||||
{id:3, color: 'background-color: blue;',desc:'PM10超标报警',count: 3}, {id:4, color: 'background-color: burlywood',desc:'TSP报警',count: 553},
|
||||
{id:5, color: 'background-color: palevioletred;',desc:'湿度报警',count: 0}, {id:6, color: 'background-color: purple',desc:'风速报警',count: 0},
|
||||
] as any)
|
||||
//左上-右部今日报警模拟数据
|
||||
let warningNotice = ref({
|
||||
noticeImgUrl: '',
|
||||
noticeText: 'PM2.5报警,不适宜喷涂、研磨、建造、拆除、焊接等作业;PM10报警,不适宜建造、拆建、挖掘、填方、垃圾焚烧、清理渣土等作业;TSP报警,不适宜主变吊罩/组合电气无尘化施工;'
|
||||
} as any)
|
||||
//左中严重违章成员模拟数据
|
||||
let illegalPersonList = ref([
|
||||
{id: 1,personName: '施照军', illegalCount: 1},{id: 2,personName: '张鹏杰', illegalCount: 1},
|
||||
{id: 3,personName: '王大程', illegalCount: 1},{id: 4,personName: '李云杰', illegalCount: 1},
|
||||
{id: 5,personName: '程明杰', illegalCount: 1},
|
||||
] as any)
|
||||
//左下工作票模拟数据
|
||||
let workTicketCount = ref({
|
||||
historyTickets: 37,
|
||||
todaytickets: 0
|
||||
} as any)
|
||||
//获取左上今日报警统计数据
|
||||
let todayWarnData = ref({} as any);
|
||||
let todayWarnMsg = ref("" as any);
|
||||
const getTodayWarnData = async () => {
|
||||
// const res: any = await getTodayWarn({ projectSn: store.sn });
|
||||
const res: any = await getTodayWarn({ "sn": "028B641FFE2A4A3B9A510668E6C515C0", "selectType": 1 });
|
||||
console.log("获取今日告警数据统计", res);
|
||||
if (res.result.humidityNum !== null) {
|
||||
todayWarnData.value = res.result
|
||||
if(res.result.pm25Num!==0) todayWarnMsg.value += "PM2.5报警,不适宜喷涂、研磨、建造、拆除、焊接等作业;"
|
||||
|
||||
if(res.result.pm10Num!==0) todayWarnMsg.value +='PM10报警,不适宜建造、拆建、挖掘、填方、垃圾焚烧、清理渣土等作业;'
|
||||
|
||||
if(res.result.noiseNum!==0) todayWarnMsg.value +='噪声报警,不适宜钻孔、拆墙、振动工作、建筑拆除、喷涂等高强度高噪音等作业;'
|
||||
|
||||
if(res.result.windspeedNum!==0) todayWarnMsg.value +='风速报警,不适宜吊装和起重作业、高空作业、挖掘和土方工程、悬挂和悬吊作业、建筑拆除等作业;'
|
||||
|
||||
if(res.result.tspNum!==0) todayWarnMsg.value +='TSP报警,不适宜主变吊罩/组合电气无尘化施工;'
|
||||
|
||||
if(res.result.humidityNum!==0) todayWarnMsg.value +='湿度报警,不适宜主变吊罩/组合电气无尘化施工;'
|
||||
} else {
|
||||
todayWarnData.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
//获取左中违章成员数据
|
||||
let illegalPersonList = ref([] as any);
|
||||
const getIllegalPersonList = async () => {
|
||||
const res: any = await getIllegalPerson({ projectSn: store.sn });
|
||||
console.log("获取严重违章成员模拟数据", res);
|
||||
if (res.result.length > 0) {
|
||||
illegalPersonList.value = res.result
|
||||
} else {
|
||||
illegalPersonList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
//获取左下工作票数据
|
||||
let workTicketCount = ref({} as any);
|
||||
const getWorkTicketCount = async () => {
|
||||
const res: any = await getWorkTicket({ projectSn: store.sn });
|
||||
console.log("获取严重违章成员模拟数据", res);
|
||||
if (res.result !== null) {
|
||||
workTicketCount.value = res.result
|
||||
} else {
|
||||
workTicketCount.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
getTodayWarnData();
|
||||
getIllegalPersonList();
|
||||
getWorkTicketCount();
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@ -165,11 +211,11 @@
|
||||
float: right;
|
||||
}
|
||||
.ranking-column{
|
||||
border-bottom: 2px solid rgba(19, 112, 251, .5019607843);
|
||||
border-bottom: 1px solid rgba(19, 112, 251, .5019607843);
|
||||
margin-top: 5px;
|
||||
.inside-column{
|
||||
position: relative;
|
||||
height: 6px;
|
||||
height: 4px;
|
||||
margin-bottom: 2px;
|
||||
border-radius: 1px;
|
||||
overflow: hidden;
|
||||
@ -177,7 +223,7 @@
|
||||
position: absolute;
|
||||
left: 0%;
|
||||
top: 2px;
|
||||
height: 2px;
|
||||
height: 1px;
|
||||
width: 50px;
|
||||
transform: translate(-100%);
|
||||
// background: radial-gradient(rgb(40, 248, 255) 5%, transparent 80%);
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
<div class="num">{{ realTimeTotal.past7AlarmNum || 0 }}</div>
|
||||
</div>
|
||||
<div class="month-warn">
|
||||
<div class="text">近30日告警</div>
|
||||
<div class="num">{{ realTimeTotal.past30AlarmNum || 0 }}</div>
|
||||
<div class="text">历史告警次数</div>
|
||||
<div class="num">{{ realTimeTotal.allAlarmNum || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
@ -5,19 +5,18 @@
|
||||
<div class="today-warning-list">
|
||||
<div class="list-content">
|
||||
<div class="tab-list">
|
||||
<div>序号</div>
|
||||
<div>工序</div>
|
||||
<div>风险可能导致的后果</div>
|
||||
<div>风险等级</div>
|
||||
<div style="width: 10%;">序号</div>
|
||||
<div style="width: 35%;">工序</div>
|
||||
<div style="width: 35%;">风险可能导致的后果</div>
|
||||
<div style="width: 15%;">风险等级</div>
|
||||
<!-- <div>告警时间</div> -->
|
||||
</div>
|
||||
<el-scrollbar class="list-box">
|
||||
<div v-for="(item, index) in 15" class="list-style" :key="index">
|
||||
<div>{{ index + 1 }}</div>
|
||||
<div>工序{{ }}</div>
|
||||
<div>风险可能导致的后果{{ }}</div>
|
||||
<div>风险等级{{ }}</div>
|
||||
<!-- <div>{{ item.createTime }}</div> -->
|
||||
<div v-for="(item, index) in riskInventoryList" class="list-style" :key="item.id">
|
||||
<div style="width: 10%;">{{ index + 1 }}</div>
|
||||
<div style="width: 35%;">{{ item.processName }}</div>
|
||||
<div style="width: 35%;">{{ item.riskPossibleConsequence }}</div>
|
||||
<div style="width: 15%;">{{ item.riskLevel }}</div>
|
||||
</div>
|
||||
<div class="not-data" v-if="false">
|
||||
<img src="@/assets/images/noData.png" />
|
||||
@ -26,18 +25,6 @@
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-detail" v-show="showDialog" @click="handleClick">
|
||||
<div class="dialog-content">
|
||||
<div class="dialog-icon"><img src="@/assets/images/titleIcon.png" /></div>
|
||||
<div class="dialog-title"><i>抓拍详情</i></div>
|
||||
<div class="big-pic">
|
||||
<img :src="BASEURL + '/image/' + detailData.imageUrl" />
|
||||
</div>
|
||||
<div class="close-icon" @click="closeDialog">
|
||||
<el-icon><Close /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
@ -45,59 +32,27 @@
|
||||
<script lang="ts" setup>
|
||||
import Card from "@/components/card.vue";
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import { getRealTimeTotal, getAlarmList } from "@/api/modules/securityManagement";
|
||||
import { getRiskInventory } from "@/api/modules/securityManagement";
|
||||
import { GlobalStore } from "@/stores";
|
||||
|
||||
// 当前环境
|
||||
const BASEURL = import.meta.env.VITE_API_URL;
|
||||
const store = GlobalStore();
|
||||
|
||||
//弹窗
|
||||
let showDialog = ref(false as any);
|
||||
function handleClick(event: any) {
|
||||
// console.log("点击", event.target.className);
|
||||
if (event.target.className == "list-detail") {
|
||||
closeDialog();
|
||||
}
|
||||
}
|
||||
const realTimeTotal = ref({} as any);
|
||||
//获取实时监测
|
||||
const getMemberCareList = async () => {
|
||||
const res: any = await getRealTimeTotal({ projectSn: store.sn });
|
||||
console.log("获取实时监测", res);
|
||||
if (res.success) {
|
||||
realTimeTotal.value = res.result;
|
||||
}
|
||||
};
|
||||
|
||||
//获取今日报警记录列表
|
||||
let alarmList = ref([] as any);
|
||||
//获取今日报警记录列表
|
||||
let riskInventoryList = ref([] as any);
|
||||
let detailData = ref({} as any);
|
||||
const getAlarmListInfo = async () => {
|
||||
const res: any = await getAlarmList({ projectSn: store.sn });
|
||||
console.log("获取今日报警记录列表", res);
|
||||
if (res.result.length > 0) {
|
||||
alarmList.value = res.result
|
||||
const getRiskInventoryList = async () => {
|
||||
const res: any = await getRiskInventory({ projectSn: store.sn });
|
||||
console.log("获取风险清册列表", res);
|
||||
if (res.result.records.length > 0) {
|
||||
riskInventoryList.value = res.result.records
|
||||
} else {
|
||||
alarmList.value = [];
|
||||
riskInventoryList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
// 打开详情弹窗
|
||||
function openDetailDialog(item: any) {
|
||||
// console.log(item, "当前行数据");
|
||||
detailData.value = item;
|
||||
showDialog.value = true;
|
||||
}
|
||||
// 关闭详情弹窗
|
||||
function closeDialog() {
|
||||
showDialog.value = false;
|
||||
detailData.value = {};
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
getMemberCareList();
|
||||
getAlarmListInfo();
|
||||
getRiskInventoryList();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@ -133,6 +88,7 @@
|
||||
color: #ccc;
|
||||
font-size: 20px;
|
||||
line-height: 55px;
|
||||
justify-content: space-between;
|
||||
div {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@ -150,31 +106,19 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
height: 10%;
|
||||
height: 100%;
|
||||
font-size: 16px;
|
||||
.list-img {
|
||||
// width: 4%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.img-style {
|
||||
width: 60px;
|
||||
height: 80px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
}
|
||||
justify-content: space-between;
|
||||
div {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
width: 25%;
|
||||
white-space: nowrap;
|
||||
// width: 25%;
|
||||
// white-space: nowrap;
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
}
|
||||
.list-style:hover {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user