fix: AI报警弹窗样式修改以及人员总览样式修改

This commit is contained in:
kun 2024-07-08 18:00:06 +08:00
parent 9aa0790e8b
commit ebc48e22c2
2 changed files with 56 additions and 54 deletions

View File

@ -3,8 +3,8 @@
<div class="content"> <div class="content">
<!-- v-show="topDangerList.length > 0" --> <!-- v-show="topDangerList.length > 0" -->
<div class="top-statistics"> <div class="top-statistics">
<div class="top-statistics-left" v-show="topDangerList.length > 0"> <div class="top-statistics-left">
<el-scrollbar class="statistics-listBox" ref="refAlarmScrollbar"> <el-scrollbar class="statistics-listBox" ref="refAlarmScrollbar" v-if="topDangerList.length > 0">
<div <div
class="statistics-item" class="statistics-item"
:style="{ :style="{
@ -20,10 +20,16 @@
<span class="statistics-item-content">历史报警次数{{ item.alarmNum }}</span> <span class="statistics-item-content">历史报警次数{{ item.alarmNum }}</span>
</div> </div>
</el-scrollbar> </el-scrollbar>
<div style="position: relative; width: 500px; height: 100%;" v-else>
<div class="notoDta">
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
</div>
</div> </div>
<div class="top-statistics-right"> <div class="top-statistics-right">
<!-- 播放海康 --> <!-- 播放海康 -->
<div ref="playWndBox" style="width: 85%; height: 88%;"> <div ref="playWndBox" style="width: 85%; height: 88%">
<div id="playWnd" class="playWnd" style="width: 100%; height: 100%"></div> <div id="playWnd" class="playWnd" style="width: 100%; height: 100%"></div>
<!-- :style="{ <!-- :style="{
height: playWndHeight + 'px', height: playWndHeight + 'px',
@ -32,26 +38,20 @@
</div> </div>
</div> </div>
</div> </div>
<div style="position: relative; height: 180px" v-if="topDangerList.length == 0">
<div class="notoDta">
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
</div>
<div class="top-search"> <div class="top-search">
<div class="search-item"> <div class="search-item">
<span>设备名称</span> <span>设备名称</span>
<el-input style="width: 150px;" size="small" v-model="searchForm.hardwareName" placeholder="请输入内容" clearable></el-input> <el-input
style="width: 150px"
size="small"
v-model="searchForm.hardwareName"
placeholder="请输入内容"
clearable
></el-input>
</div> </div>
<div class="search-item"> <div class="search-item">
<span>不安全行为类型</span> <span>不安全行为类型</span>
<el-select <el-select placeholder="请选择" size="small" v-model="searchForm.alarmType" :clearable="true" style="width: 150px">
placeholder="请选择"
size="small"
v-model="searchForm.alarmType"
:clearable="true"
style="width: 150px"
>
<el-option v-for="(item, index) in aiAlarmTypeEnum" :key="index" :label="item.value" :value="item.id" /> <el-option v-for="(item, index) in aiAlarmTypeEnum" :key="index" :label="item.value" :value="item.id" />
</el-select> </el-select>
<!-- <el-input style="width: 150px;" size="small" v-model="searchForm.alarmTypeName" placeholder="请输入内容"></el-input> --> <!-- <el-input style="width: 150px;" size="small" v-model="searchForm.alarmTypeName" placeholder="请输入内容"></el-input> -->
@ -59,7 +59,7 @@
<div class="search-item"> <div class="search-item">
<span>警告时间</span> <span>警告时间</span>
<el-date-picker <el-date-picker
style="width: 240px;" style="width: 240px"
size="small" size="small"
v-model="searchForm.dateRange" v-model="searchForm.dateRange"
type="daterange" type="daterange"
@ -108,14 +108,14 @@
</div> </div>
</el-scrollbar> </el-scrollbar>
<el-pagination <el-pagination
v-if="partyMemberList.length != 0" v-if="partyMemberList.length != 0"
background background
:page-size="10" :page-size="10"
style="justify-content: center" style="justify-content: center"
@current-change="onCurrentChange" @current-change="onCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total" :total="total"
/> />
</div> </div>
</div> </div>
<div class="list-detail" v-if="showDialog" @click="handleDetailClick"> <div class="list-detail" v-if="showDialog" @click="handleDetailClick">
@ -173,9 +173,9 @@ const store = GlobalStore();
// eslint-disable-next-line vue/require-prop-types, @typescript-eslint/no-unused-vars // eslint-disable-next-line vue/require-prop-types, @typescript-eslint/no-unused-vars
const props = defineProps(["tip"]); const props = defineProps(["tip"]);
const searchForm = ref({ const searchForm = ref({
hardwareName: '', hardwareName: "",
alarmType: '', alarmType: "",
dateRange: [], dateRange: []
}); });
const playWndBox = ref(null); const playWndBox = ref(null);
let playWndHeight = ref(""); let playWndHeight = ref("");
@ -305,9 +305,9 @@ const getMemberCountList = async (tip: any) => {
pageSize: 10, pageSize: 10,
isPushed: 1 isPushed: 1
}; };
if(searchForm.value.dateRange && searchForm.value.dateRange.length > 0){ if (searchForm.value.dateRange && searchForm.value.dateRange.length > 0) {
requestData.startTime = searchForm.value.dateRange[0] requestData.startTime = searchForm.value.dateRange[0];
requestData.endTime = searchForm.value.dateRange[1] requestData.endTime = searchForm.value.dateRange[1];
} }
const res: any = await getAlarmRecordApi(requestData); const res: any = await getAlarmRecordApi(requestData);
partyMemberList.value = res.result.records; partyMemberList.value = res.result.records;
@ -363,7 +363,7 @@ onMounted(async () => {
// } // }
}); });
setTimeout(() => { setTimeout(() => {
previewVideo(cameraIndexCode.value) previewVideo(cameraIndexCode.value);
}, 1500); }, 1500);
await getCompanyList(); await getCompanyList();
await getMemberCountList("search"); await getMemberCountList("search");
@ -555,7 +555,7 @@ const getPubKey = (callback: { (): void; (): void }) => {
// //
// //
const previewVideo = (data: string | null) => { const previewVideo = (data: string | null) => {
console.log(data,666777) console.log(data, 666777);
let cameraIndexCode = data; // let cameraIndexCode = data; //
let streamMode = 0; // 0-1- let streamMode = 0; // 0-1-
let transMode = 1; // 0-UDP1-TCP let transMode = 1; // 0-UDP1-TCP
@ -596,9 +596,9 @@ const previewVideo = (data: string | null) => {
position: absolute; position: absolute;
box-sizing: border-box; box-sizing: border-box;
padding: 1%; padding: 1%;
left: 38%; left: 36%;
top: 30%; top: 30%;
width: 25%; width: 32%;
height: 45%; height: 45%;
background: url("@/assets/images/aIEarlyWarning/dialogBg.png") no-repeat; background: url("@/assets/images/aIEarlyWarning/dialogBg.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
@ -691,7 +691,7 @@ const previewVideo = (data: string | null) => {
.content { .content {
height: 95%; height: 95%;
width: 100%; width: 100%;
margin-top: 10px; margin-top: 60px;
// background: url("@/assets/images/cardImg.png") no-repeat; // background: url("@/assets/images/cardImg.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
padding: 20px 15px; padding: 20px 15px;
@ -751,6 +751,22 @@ const previewVideo = (data: string | null) => {
// margin-top: 8%; // margin-top: 8%;
// } // }
} }
.notoDta {
top: 25%;
width: 50%;
left: 20%;
position: absolute;
text-align: center;
img {
width: 40%;
margin: 5% 30%;
}
p {
color: #fff;
font-size: calc(100vw * 14 / 1920);
margin: -6% 37%;
}
}
} }
&-right { &-right {
width: 45%; width: 45%;
@ -793,7 +809,7 @@ const previewVideo = (data: string | null) => {
} }
} }
.listBox { .listBox {
height: 86%; height: 73%;
.listStyle { .listStyle {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -236,12 +236,10 @@ const createdBarCharts = (xData: any, yData1: any, yData2: any, yData3: any, el:
dataZoom: [ dataZoom: [
{ {
type: "slider", // 使 type: "slider", // 使
// start: 0, // start: 0, //
// end: 50, // end: 25, //
// startValue: xData.length - 1, // startValue: xData.length - 1,
// endValue: xData.length - 9, // endValue: xData.length - 9,
startValue: 0,
endValue: xData.length - 2,
height: 10, // height: 10, //
bottom: 0, // bottom: 0, //
showDetail: false, // showDetail: false, //
@ -269,18 +267,6 @@ const createdBarCharts = (xData: any, yData1: any, yData2: any, yData3: any, el:
color: "#9fa2ad" color: "#9fa2ad"
} }
}, },
// dataZoom: [
// {
// show: true,
// start: 50,
// end: 100,
// height: 8,
// borderColor: "transparent",
// backgroundColor: "#fff",
// filterColor: "#999999",
// bottom: 0,
// },
// ],
series: [ series: [
{ {
name: legendData[1], name: legendData[1],