Merge branch 'rongtu_cjw' into rongtu_dev

This commit is contained in:
kun 2024-03-02 16:14:33 +08:00
commit b734e96b49
7 changed files with 929 additions and 1 deletions

View File

@ -27,3 +27,17 @@ export const getCountResponsibleUnit = (params: {}) => {
export const getCountHiddenDangerInspectRegion = (params: {}) => {
return http.post(BASEURL + `/xmgl/hiddenDangerInspectRecord/countHiddenDangerInspectRegion`, params);
};
// -----------添加内容----------
// 1.查询设备报警记录列表
export const getAlarmList = (params: {}) => {
return http.post(BASEURL + `/xmgl/aiAnalyseHardWareAlarmRecord/selectAiAnalyseHardWareAlarmList`, params);
};
// 2.查询当前实时数据
export const getRealTimeTotal = (params: {}) => {
return http.post(BASEURL + `/xmgl/aiAnalyseHardWareAlarmRecord/countAiAnalyseHardWareAlarmTotal`, params);
};
// 3.查询当前实时数据
export const getRiskInventory = (params: {}) => {
return http.post(BASEURL + `/xmgl/aiAnalyseHardWareAlarmRecord/countAiAnalyseHardWareAlarmTotal`, params);
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -225,7 +225,7 @@ export const staticRouter: RouteRecordRaw[] = [
{
path: "/riskManage",
name: "安全风险",
component: () => import("@/views/sevenLargeScreen/safeRisk/riskManage.vue")
component: () => import("@/views/sevenLargeScreen/safeRisk/riskManage/riskManage-1.vue")
},
{
path: "/warehouseManage",

View File

@ -0,0 +1,235 @@
<template>
<div class="left-container">
<div class="left-top">
<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>
</div>
<div class="c1-right">
<div class="top-icon">
<img src="@/assets/images/noise-img.png" />
<!-- <img :src="BASEURL + '/image/' + .imageUrl" /> -->
</div>
<div class="bottom-desc">
<div class="text-title">今日不适宜作业内容</div>
<p class="text-info">{{ warningNotice.noticeText}}</p>
</div>
</div>
</div>
</Card>
</div>
<div class="left-middle">
<Card title="严重违章成员">
<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;">&nbsp;{{ item.personName }}</span>
<span class="item-right">{{ item.illegalCount }}</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>
</div>
</div>
</div>
</div>
</Card>
</div>
<div class="left-bottom">
<Card title="工作票">
<div class="card-box3">
<div class="c3-left">
<div><b>{{ workTicketCount.historyTickets }}</b></div>
<div>历史工作票</div>
</div>
<div class="c3-right">
<div><b>{{ workTicketCount.todaytickets }}</b></div>
<div>今日工作票</div>
</div>
</div>
</Card>
</div>
</div>
</template>
<script lang="ts" setup>
import Card from "@/components/card.vue";
import { ref, onMounted, computed } from "vue";
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)
</script>
<style lang="scss">
.left-container {
width: 100%;
height: 100%;
.left-top{
width: 100%;
height: 29%;
.card-box1{
display: flex;
height: 100%;
.c1-left{
color: white;
height: 100%;
width: 55%;
padding: 1% 3%;
.warning-list{
display: flex;
justify-content: space-between;
align-items: center;
line-height: 44px;
.warning-color{
width: 15px;
height: 15px;
}
.warning-type{
font-size: 20px;
}
.warning-count{
display: flex;
justify-content: center;
align-items: center;
width: 10%;
}
}
}
.c1-right{
color: white;
height: 100%;
width: 45%;
.top-icon{
display: flex;
flex-direction: column;
align-items: center;
img{
width: 30%;
}
}
.bottom-desc{
margin-top: 3%;
.text-title{
text-align: center;
}
.text-info{
font-size: 16px;
text-indent: 2em;
}
}
}
}
}
.left-middle{
margin-top: 7.5%;
width: 100%;
height: 29%;
.illegal-person-list{
.illegal-person-item{
padding: 0 10px;
font-size: 30px;
.item-left{
float: left;
}
.item-right{
color: white;
float: right;
}
.ranking-column{
border-bottom: 2px solid rgba(19, 112, 251, .5019607843);
margin-top: 5px;
.inside-column{
position: relative;
height: 6px;
margin-bottom: 2px;
border-radius: 1px;
overflow: hidden;
.shine{
position: absolute;
left: 0%;
top: 2px;
height: 2px;
width: 50px;
transform: translate(-100%);
// background: radial-gradient(rgb(40, 248, 255) 5%, transparent 80%);
background: radial-gradient(rgb(255,255,255) 5%, transparent 80%);
animation: shine-c881aae3 3s ease-in-out infinite alternate;
}
}
}
}
}
}
.left-bottom{
margin-top: 7.5%;
width: 100%;
height: 29%;
// background-color: #fff;
width: 100%;
height: 29%;
.card-box3{
display: flex;
height: 100%;
padding: 2% 0;
text-align: center;
line-height: 40px;
.c3-left{
color: white;
height: 90%;
width: 50%;
background: url("@/assets/images/comprehensiveManage/project13.png") no-repeat;
background-position: center;
background-size: contain;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.c3-right{
color: white;
height: 90%;
width: 50%;
background: url("@/assets/images/comprehensiveManage/project13.png") no-repeat;
background-position: center;
background-size: contain;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
}
}
}
</style>

View File

@ -0,0 +1,364 @@
<template>
<div class="middle-container">
<div class="middle-top">
<Card title="实时检测">
<div class="ai-center-bottom">
<div class="today-warn">
<i>今日告警: <span style="padding-left: 1%">{{ realTimeTotal.todayAlarmNum || 0 }}</span></i>
</div>
<div class="icon"></div>
<div class="week-warn">
<div class="text">近7日告警</div>
<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>
</div>
</Card>
</div>
<div class="middle-bottom">
<Card title="今日报警统计">
<div class="today-warning-list">
<div class="list-content">
<div class="tab-list">
<div>序号</div>
<div>抓拍照片</div>
<div>违章人员</div>
<div>告警类型</div>
<div>告警时间</div>
</div>
<el-scrollbar class="list-box">
<div v-for="(item, index) in alarmList" class="list-style" :key="item.id">
<div>{{ index + 1 }}</div>
<div class="list-img">
<div class="img-style" @click="openDetailDialog(item)">
<img :src="BASEURL + '/image/' + item.imageUrl" />
</div>
</div>
<div>违章人员{{ }}</div>
<!-- <div>{{ item.alarmType ? getWarnName(item.alarmType) : "" }}</div> -->
<div>{{ item.alarmTypeName }}</div>
<div>{{ item.createTime }}</div>
</div>
<div class="not-data" v-if="alarmList.length == 0">
<img src="@/assets/images/noData.png" />
<p>暂无数据</p>
</div>
</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>
</template>
<script lang="ts" setup>
import Card from "@/components/card.vue";
import { ref, onMounted, computed } from "vue";
import { getRealTimeTotal, getAlarmList } 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 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
} else {
alarmList.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();
});
</script>
<style lang="scss">
.middle-container {
width: 100%;
height: 100%;
.middle-top{
width: 100%;
height: 29%;
.ai-center-bottom {
width: 100%;
height: 100%;
position: relative;
.today-warn {
display: flex;
justify-content: center;
align-items: center;
font-size: 20px;
font-family: OPPOSansH;
color: #ffffff;
top: 10%;
left: 20%;
position: absolute;
width: 30%;
height: 36px;
background: url("@/assets/images/aIEarlyWarning/todayWarn.png") no-repeat;
background-size: 100% 100%;
white-space: nowrap;
}
.week-warn {
right: 8%;
top: 10%;
text-align: center;
position: absolute;
width: 20%;
height: 40%;
background: url("@/assets/images/aIEarlyWarning/monthWarn.png") no-repeat;
background-size: 100% 100%;
.text {
margin-top: 10%;
font-size: 16px;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #65d7f9;
}
.num {
margin-top: 10%;
font-weight: bold;
font-family: sadigitalNumber;
font-size: 24px;
background: linear-gradient(180deg, #65d7f9 0%, #ffffff 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.month-warn {
right: 8%;
bottom: 8%;
text-align: center;
position: absolute;
width: 20%;
height: 40%;
background: url("@/assets/images/aIEarlyWarning/weekWarn.png") no-repeat;
background-size: 100% 100%;
.text {
margin-top: 10%;
font-size: 16px;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: rgba(255, 255, 255, 0.85);
}
.num {
margin-top: 10%;
font-family: sadigitalNumber;
font-weight: bold;
font-size: 24px;
background-image: linear-gradient(180deg, #dad8b4 0%, #f4d065 100%);
background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.icon {
left: 17%;
bottom: 5%;
position: absolute;
width: 35%;
height: 90%;
background: url("@/assets/images/aIEarlyWarning/warnMonitor.png") no-repeat;
background-size: 100% 100%;
}
}
}
.middle-bottom{
margin-top: 7.5%;
width: 100%;
height: 68%;
// background-color: #fff;
}
}
.today-warning-list {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 2%;
.list-content {
height: 94%;
width: 100%;
// background: url("@/assets/images/cardImg.png") no-repeat;
// background-size: 100% 100%;
.tab-list {
display: flex;
width: 100%;
height: 10%;
background: url("@/assets/images/vehicleManagement/ListTitleImg.png") no-repeat;
background-size: 100% 100%;
// position: absolute;
left: 75.5%;
top: 75%;
color: #ccc;
font-size: 20px;
// line-height: 55px;
div {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
width: 19%;
}
}
.list-box {
height: 98%;
.list-style:nth-child(even) {
background: rgba(39, 88, 192, 0.06);
}
.list-style {
display: flex;
align-items: center;
color: #fff;
height: 10%;
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;
}
}
}
div {
text-align: center;
width: 19%;
white-space: nowrap;
}
}
.list-style:hover {
background: #091f3f;
}
}
}
}
.list-detail {
position: absolute;
width: 100%;
height: 100%;
top: 0%;
left: 0%;
background: rgba(7, 28, 49, 0.5);
z-index: 20;
.dialog-content {
position: absolute;
box-sizing: border-box;
padding: 1%;
left: 30%;
top: 30%;
width: 40%;
height: 50%;
background: url("@/assets/images/aIEarlyWarning/dialogBg.png") no-repeat;
background-size: 100% 100%;
z-index: 21;
.dialog-icon {
position: absolute;
left: 3%;
top: 3%;
width: 7%;
height: 7%;
img {
width: 100%;
height: 100%;
}
}
.dialog-title {
color: #ffffff;
font-weight: bold;
margin-left: 8%;
font-size: 18px;
font-family: "OPPOSans-Bold";
}
.big-pic {
width: 100%;
height: 85%;
margin-top: 3%;
img {
width: 100%;
height: 100%;
}
}
.close-icon {
position: absolute;
right: 3%;
top: 3%;
cursor: pointer;
color: #ffffff;
font-size: 18px;
}
}
}
.not-data {
top: 35%;
width: 30%;
left: 35%;
position: absolute;
text-align: center;
img {
width: 60%;
margin: 5% ;
}
p {
color: #fff;
font-size: 14px;
margin: -6% 37%;
}
}
</style>

View File

@ -0,0 +1,261 @@
<template>
<div class="right-container">
<div class="right-box">
<Card title="风险清册">
<div class="today-warning-list">
<div class="list-content">
<div class="tab-list">
<div>序号</div>
<div>工序</div>
<div>风险可能导致的后果</div>
<div>风险等级</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>
<div class="not-data" v-if="false">
<img src="@/assets/images/noData.png" />
<p>暂无数据</p>
</div>
</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>
</template>
<script lang="ts" setup>
import Card from "@/components/card.vue";
import { ref, onMounted, computed } from "vue";
import { getRealTimeTotal, getAlarmList } 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 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
} else {
alarmList.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();
});
</script>
<style lang="scss">
.right-container {
width: 100%;
height: 100%;
// position: relative;
// display: flex;
// flex-direction: column;
.right-box{
width: 100%;
height: 107%;
.today-warning-list {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 2%;
.list-content {
height: 94%;
width: 100%;
// background: url("@/assets/images/cardImg.png") no-repeat;
// background-size: 100% 100%;
.tab-list {
display: flex;
width: 100%;
height: 10%;
background: url("@/assets/images/vehicleManagement/ListTitleImg.png") no-repeat;
background-size: 100% 100%;
// position: absolute;
left: 75.5%;
top: 75%;
color: #ccc;
font-size: 20px;
line-height: 55px;
div {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
width: 25%;
}
}
.list-box {
height: 98%;
.list-style:nth-child(even) {
background: rgba(39, 88, 192, 0.06);
}
.list-style {
display: flex;
align-items: center;
color: #fff;
height: 10%;
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;
}
}
}
div {
display: flex;
justify-content: center;
align-items: center;
height: 60px;
text-align: center;
width: 25%;
white-space: nowrap;
}
}
.list-style:hover {
background: #091f3f;
}
}
}
}
.list-detail {
position: absolute;
width: 100%;
height: 100%;
top: 0%;
left: 0%;
background: rgba(7, 28, 49, 0.5);
z-index: 20;
.dialog-content {
position: absolute;
box-sizing: border-box;
padding: 1%;
left: 30%;
top: 30%;
width: 40%;
height: 50%;
background: url("@/assets/images/aIEarlyWarning/dialogBg.png") no-repeat;
background-size: 100% 100%;
z-index: 21;
.dialog-icon {
position: absolute;
left: 3%;
top: 3%;
width: 7%;
height: 7%;
img {
width: 100%;
height: 100%;
}
}
.dialog-title {
color: #ffffff;
font-weight: bold;
margin-left: 8%;
font-size: 18px;
font-family: "OPPOSans-Bold";
}
.big-pic {
width: 100%;
height: 85%;
margin-top: 3%;
img {
width: 100%;
height: 100%;
}
}
.close-icon {
position: absolute;
right: 3%;
top: 3%;
cursor: pointer;
color: #ffffff;
font-size: 18px;
}
}
}
.not-data {
top: 35%;
width: 30%;
left: 35%;
position: absolute;
text-align: center;
img {
width: 60%;
margin: 5% ;
}
p {
color: #fff;
font-size: 14px;
margin: -6% 37%;
}
}
}
}
</style>

View File

@ -0,0 +1,54 @@
<template>
<!-- 安全风险 -->
<div class="bimBox">
<!-- <iframe :src="url" frameborder="0" width="100%" height="100%" id="iframe"></iframe> -->
<!-- <left></left>
<middle></middle> -->
<div class="left">
<left></left>
</div>
<div class="middle">
<middle></middle>
</div>
<div class="right">
<right></right>
</div>
</div>
</template>
<script>
import left from "@/views/sevenLargeScreen/safeRisk/riskManage/left.vue";
import middle from "@/views/sevenLargeScreen/safeRisk/riskManage/middle.vue";
import right from "@/views/sevenLargeScreen/safeRisk/riskManage/right.vue";
export default {
components: {
left,
middle,
right
}
};
</script>
<style lang="scss" scoped>
.bimBox {
width: 100%;
height: 100%;
display: flex;
// justify-content: space-between;
// align-items: center;
.left{
height: 100%;
width: 100%;
}
.middle{
height: 100%;
width: 100%;
margin: 0 1%;
}
.right{
height: 100%;
width: 100%;
}
}
</style>