Update historicalData.vue

注释掉  AI预警页面 样式穿透
This commit is contained in:
TimSpan 2024-12-25 11:29:43 +08:00
parent 226bd0a514
commit 0e13c4b935
1 changed files with 289 additions and 287 deletions

View File

@ -2,7 +2,7 @@
<div class="cont"> <div class="cont">
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="人脸比对" name="first"> <el-tab-pane label="人脸比对" name="first">
<div style="padding: 10px;height:calc(100% - 52px);overflow: auto;"> <div style="padding: 10px; height: calc(100% - 52px); overflow: auto">
<el-table :data="tableData" border style="width: 100%"> <el-table :data="tableData" border style="width: 100%">
<el-table-column type="index" width="60" label="序号" align="center" :index="indexMethod1" /> <el-table-column type="index" width="60" label="序号" align="center" :index="indexMethod1" />
<el-table-column prop="timestamp" label="时间" align="center" show-overflow-tooltip /> <el-table-column prop="timestamp" label="时间" align="center" show-overflow-tooltip />
@ -14,7 +14,7 @@
<!-- <el-table-column prop="state" label="推送110状态" align="center" show-overflow-tooltip /> --> <!-- <el-table-column prop="state" label="推送110状态" align="center" show-overflow-tooltip /> -->
<el-table-column label="预警类型" align="center"> <el-table-column label="预警类型" align="center">
<template #default="scope"> <template #default="scope">
{{scope.row.alarmType=='face'?'人脸':scope.row.alarmType=='vehicle'?'车牌号':''}} {{ scope.row.alarmType == 'face' ? '人脸' : scope.row.alarmType == 'vehicle' ? '车牌号' : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="alarmName" label="预警名称" align="center" show-overflow-tooltip /> <el-table-column prop="alarmName" label="预警名称" align="center" show-overflow-tooltip />
@ -27,13 +27,11 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="position: absolute;right:60px;" @current-change="handleCurrentChange1" <el-pagination style="position: absolute; right: 60px" @current-change="handleCurrentChange1" :page-size="15" layout="total, prev, pager, next" :total="total1"> </el-pagination>
:page-size="15" layout="total, prev, pager, next" :total="total1">
</el-pagination>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="车辆比对" name="second"> <el-tab-pane label="车辆比对" name="second">
<div style="padding: 10px;height:calc(100% - 85px);overflow: auto;"> <div style="padding: 10px; height: calc(100% - 85px); overflow: auto">
<el-table :data="tableData2" border style="width: 100%"> <el-table :data="tableData2" border style="width: 100%">
<el-table-column type="index" width="60" label="序号" align="center" :index="indexMethod2" /> <el-table-column type="index" width="60" label="序号" align="center" :index="indexMethod2" />
<el-table-column prop="timestamp" label="时间" align="center" show-overflow-tooltip /> <el-table-column prop="timestamp" label="时间" align="center" show-overflow-tooltip />
@ -46,7 +44,7 @@
<el-table-column prop="alarmType" label="预警类型" align="center" show-overflow-tooltip /> <el-table-column prop="alarmType" label="预警类型" align="center" show-overflow-tooltip />
<el-table-column label="预警类型" align="center"> <el-table-column label="预警类型" align="center">
<template #default="scope"> <template #default="scope">
{{scope.row.alarmType=='face'?'人脸':scope.row.alarmType=='vehicle'?'车牌号':''}} {{ scope.row.alarmType == 'face' ? '人脸' : scope.row.alarmType == 'vehicle' ? '车牌号' : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="alarmName" label="预警名称" align="center" show-overflow-tooltip /> <el-table-column prop="alarmName" label="预警名称" align="center" show-overflow-tooltip />
@ -59,9 +57,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="position: absolute;right:60px;" @current-change="handleCurrentChange2" <el-pagination style="position: absolute; right: 60px" @current-change="handleCurrentChange2" :page-size="15" layout="total, prev, pager, next" :total="total2"> </el-pagination>
:page-size="15" layout="total, prev, pager, next" :total="total2">
</el-pagination>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -69,254 +65,260 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive, getCurrentInstance, onMounted } from 'vue'; import {ref, onMounted} from 'vue'
const { proxy } = getCurrentInstance() as any; import api from '@/axios'
const day = proxy.day; import {ElMessage} from 'element-plus'
import api from "@/axios"; onMounted(() => {
import type { TabsPaneContext } from 'element-plus'; seachA()
import { ElMessage } from 'element-plus'; seachB()
onMounted(() => { })
seachA(); const activeName = ref('first')
seachB(); const tableData = ref<any>([])
}); const total1 = ref()
const activeName = ref('first') const seachA = () => {
// api
const value1 = ref(''); .post('/multialarm/ai/alarm/count', {
const tableData = ref([]);
const total1 = ref();
const seachA = () => {
api.post('/multialarm/ai/alarm/count', {
targetType: 'face', targetType: 'face',
city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue'], city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
}).then((res) => { })
.then((res: any) => {
if (res.code == 0) { if (res.code == 0) {
total1.value = res.data.count; total1.value = res.data.count
} }
}) })
api.post('/multialarm/ai/alarm/getlist', { api
.post('/multialarm/ai/alarm/getlist', {
pagesize: 15, pagesize: 15,
pageindex: 0, pageindex: 0,
targetType: 'face', targetType: 'face',
city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue'], city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
}).then((res) => { })
.then((res) => {
if (res.code == 0) { if (res.code == 0) {
tableData.value = res.data; tableData.value = res.data
} else { } else {
ElMessage.error('请求失败') ElMessage.error('请求失败')
} }
}) })
}; }
const pageNum1 = ref(1); const pageNum1 = ref(1)
const handleCurrentChange1 = (data) => { const handleCurrentChange1 = (data: any) => {
console.log('data', data) console.log('data', data)
pageNum1.value = data; pageNum1.value = data
api.post('/multialarm/ai/alarm/getlist', { api
.post('/multialarm/ai/alarm/getlist', {
pagesize: 15, pagesize: 15,
pageindex: data - 1, pageindex: data - 1,
targetType: 'face', targetType: 'face',
city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue'], city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
}).then((res) => { })
.then((res) => {
if (res.code == 0) { if (res.code == 0) {
tableData.value = res.data; tableData.value = res.data
} else { } else {
ElMessage.error('请求失败') ElMessage.error('请求失败')
} }
}) })
}; }
const indexMethod1 = (index) => { const indexMethod1 = (index: number) => {
return (pageNum1.value - 1) * 15 + index + 1; return (pageNum1.value - 1) * 15 + index + 1
}; }
// //
const value2 = ref('');
const tableData2 = ref([]); const tableData2 = ref<any>([])
const total2 = ref(); const total2 = ref()
const seachB = () => { const seachB = () => {
api.post('/multialarm/ai/alarm/count', { api
.post('/multialarm/ai/alarm/count', {
targetType: 'vehicle', targetType: 'vehicle',
city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue'], city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
}).then((res) => { })
.then((res: any) => {
if (res.code == 0) { if (res.code == 0) {
total2.value = res.data.count; total2.value = res.data.count
} }
}) })
api.post('/multialarm/ai/alarm/getlist', { api
.post('/multialarm/ai/alarm/getlist', {
pagesize: 15, pagesize: 15,
pageindex: 0, pageindex: 0,
targetType: 'vehicle', targetType: 'vehicle',
city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue'], city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
}).then((res) => { })
.then((res) => {
if (res.code == 0) { if (res.code == 0) {
tableData2.value = res.data; tableData2.value = res.data
} else { } else {
ElMessage.error('请求失败') ElMessage.error('请求失败')
} }
}) })
}; }
const pageNum2 = ref(1); const pageNum2 = ref(1)
const handleCurrentChange2 = (data) => { const handleCurrentChange2 = (data: any) => {
pageNum2.value = data; pageNum2.value = data
api.post('/multialarm/ai/alarm/getlist', { api
.post('/multialarm/ai/alarm/getlist', {
pagesize: 15, pagesize: 15,
pageindex: data - 1, pageindex: data - 1,
targetType: 'vehicle', targetType: 'vehicle',
city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue'], city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
}).then((res) => { })
.then((res) => {
if (res.code == 0) { if (res.code == 0) {
tableData2.value = res.data; tableData2.value = res.data
} else { } else {
ElMessage.error('请求失败') ElMessage.error('请求失败')
} }
}) })
}; }
const indexMethod2 = (index) => { const indexMethod2 = (index: number) => {
return (pageNum2.value - 1) * 15 + index + 1; return (pageNum2.value - 1) * 15 + index + 1
}; }
const handleClick = function () {}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.cont { .cont {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
// background:rgba(9, 45, 84, 1) // background:rgba(9, 45, 84, 1)
} }
.demo-tabs>.el-tabs__content { .demo-tabs > .el-tabs__content {
padding: 32px; padding: 32px;
color: #6b778c; color: #6b778c;
font-size: 32px; font-size: 32px;
font-weight: 600; font-weight: 600;
} }
:deep(.el-dialog__body) { :deep(.el-dialog__body) {
padding: 10px; padding: 10px;
color: #fff; color: #fff;
} }
:deep(.el-dialog) { :deep(.el-dialog) {
--el-dialog-bg-color: #071D4D; --el-dialog-bg-color: #071d4d;
border: 3px solid #387dbf; border: 3px solid #387dbf;
} }
:deep(.el-dialog__header) { :deep(.el-dialog__header) {
padding: 13px; padding: 13px;
border-bottom: 1px solid #3374b4 !important; border-bottom: 1px solid #3374b4 !important;
margin-right: 0px; margin-right: 0px;
} }
:deep(.el-dialog__title) { :deep(.el-dialog__title) {
color: #067bc1 !important; color: #067bc1 !important;
font-weight: 500; font-weight: 500;
} }
:deep(.el-dialog__headerbtn .el-dialog__close) { :deep(.el-dialog__headerbtn .el-dialog__close) {
color: #fff; color: #fff;
font-weight: 500; font-weight: 500;
font-size: 18px; font-size: 18px;
} }
:deep(.el-tabs__nav-wrap::after) { :deep(.el-tabs__nav-wrap::after) {
background-color: #d9d9d95e; background-color: #d9d9d95e;
height: 4px; height: 4px;
} }
:deep(.el-tabs__item) { :deep(.el-tabs__item) {
color: #00000070; color: #00000070;
font-weight: 700; font-weight: 700;
} }
:deep(.el-tabs) { :deep(.el-tabs) {
--el-tabs-header-height: 50px; --el-tabs-header-height: 50px;
} }
:deep(.el-tabs__item.is-active) { :deep(.el-tabs__item.is-active) {
color: #000; color: #000;
} }
:deep(.el-tabs__active-bar) { :deep(.el-tabs__active-bar) {
height: 4px; height: 4px;
background-color: #000; background-color: #000;
} }
:deep(.el-tabs__nav-wrap) { :deep(.el-tabs__nav-wrap) {
padding-left: 23px; padding-left: 23px;
} }
:deep(.el-input__wrapper) { :deep(.el-input__wrapper) {
background-color: transparent; background-color: transparent;
box-shadow: 0 0 0 1px #1F9BD9; box-shadow: 0 0 0 1px #1f9bd9;
} }
:deep(.el-input__inner) { :deep(.el-input__inner) {
color: #fff; color: #fff;
} }
:deep(.el-input__prefix) { :deep(.el-input__prefix) {
color: #fff; color: #fff;
} }
:deep(.el-button) { :deep(.el-button) {
background-color: transparent; background-color: transparent;
border-color: #0cd6fe; border-color: #0cd6fe;
color: #000; color: #000;
} }
:deep(.el-table) { // :deep(.el-table) {
--el-table-border-color: #1677ff40; // --el-table-border-color: #1677ff40;
} // }
:deep(.el-table th.el-table__cell) { // :deep(.el-table th.el-table__cell) {
// background-color: #5C9AD5; // // background-color: #5C9AD5;
} // }
:deep(.el-table thead) { // :deep(.el-table thead) {
// color: #fff; // // color: #fff;
} // }
:deep(.el-table tr) { // :deep(.el-table tr) {
// background-color: #E9F0F8; // // background-color: #E9F0F8;
} // }
:deep(.el-table__body tr.current-row > td) { // :deep(.el-table__body tr.current-row > td) {
// background: #2cabff !important; // // background: #2cabff !important;
} // }
:deep(.el-table--enable-row-hover .el-table__body tr:hover>td) { // :deep(.el-table--enable-row-hover .el-table__body tr:hover > td) {
// background-color: #13306A !important; // // background-color: #13306A !important;
} // }
:deep(.el-table th.el-table__cell) { // :deep(.el-table th.el-table__cell) {
// background-color:#13306A; // // background-color:#13306A;
} // }
:deep(.el-date-editor .el-range-input) { // :deep(.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell) {
// // background: #D1DEEE !important;
// }
// :deep(.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell) {
// // background-color: transparent;
// }
// :deep(.el-table th.el-table__cell) {
// background-color: #f5f7fa;
// }
:deep(.el-date-editor .el-range-input) {
color: #fff; color: #fff;
} }
:deep(.el-tabs) {
:deep(.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell) {
// background: #D1DEEE !important;
}
:deep(.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell) {
// background-color: transparent;
}
:deep(.el-tabs) {
height: 100%; height: 100%;
} }
:deep(.el-tabs__content) { :deep(.el-tabs__content) {
height: calc(100% - 53px); height: calc(100% - 53px);
} }
:deep(.el-tab-pane) { :deep(.el-tab-pane) {
height: 100%; height: 100%;
} }
:deep(.el-table th.el-table__cell){
background-color: #F5F7FA;
}
::-webkit-scrollbar { ::-webkit-scrollbar {
background-color: #071D4D; background-color: #071d4d;
} }
</style> </style>