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

@ -1,322 +1,324 @@
<template> <template>
<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 />
<el-table-column prop="targetValue" label="人脸编号" align="center" show-overflow-tooltip /> <el-table-column prop="targetValue" label="人脸编号" align="center" show-overflow-tooltip />
<el-table-column prop="targetName" label="人员名称" align="center" show-overflow-tooltip /> <el-table-column prop="targetName" label="人员名称" align="center" show-overflow-tooltip />
<el-table-column prop="city" label="城市" align="center" show-overflow-tooltip /> <el-table-column prop="city" label="城市" align="center" show-overflow-tooltip />
<el-table-column prop="district" label="区域" align="center" show-overflow-tooltip /> <el-table-column prop="district" label="区域" align="center" show-overflow-tooltip />
<el-table-column prop="level" label="预警等级" align="center" show-overflow-tooltip /> <el-table-column prop="level" label="预警等级" align="center" show-overflow-tooltip />
<!-- <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 />
<el-table-column prop="address" label="地址" align="center" show-overflow-tooltip /> <el-table-column prop="address" label="地址" align="center" show-overflow-tooltip />
<el-table-column prop="longitude" label="经度" align="center" show-overflow-tooltip /> <el-table-column prop="longitude" label="经度" align="center" show-overflow-tooltip />
<el-table-column prop="latitude" label="纬度" align="center" show-overflow-tooltip /> <el-table-column prop="latitude" label="纬度" align="center" show-overflow-tooltip />
<el-table-column label="照片" align="center"> <el-table-column label="照片" align="center">
<template #default="scope"> <template #default="scope">
<a-image :width="100" :height="100" :src="scope.row.url" /> <a-image :width="100" :height="100" :src="scope.row.url" />
</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"> </div>
</el-pagination> </el-tab-pane>
</div> <el-tab-pane label="车辆比对" name="second">
</el-tab-pane> <div style="padding: 10px; height: calc(100% - 85px); overflow: auto">
<el-tab-pane label="车辆比对" name="second"> <el-table :data="tableData2" border style="width: 100%">
<div style="padding: 10px;height:calc(100% - 85px);overflow: auto;"> <el-table-column type="index" width="60" label="序号" align="center" :index="indexMethod2" />
<el-table :data="tableData2" border style="width: 100%"> <el-table-column prop="timestamp" label="时间" align="center" show-overflow-tooltip />
<el-table-column type="index" width="60" label="序号" align="center" :index="indexMethod2" /> <el-table-column prop="targetValue" label="车牌编号" align="center" show-overflow-tooltip />
<el-table-column prop="timestamp" label="时间" align="center" show-overflow-tooltip /> <el-table-column prop="targetName" label="车辆名称" align="center" show-overflow-tooltip />
<el-table-column prop="targetValue" label="车牌编号" align="center" show-overflow-tooltip /> <el-table-column prop="city" label="城市" align="center" show-overflow-tooltip />
<el-table-column prop="targetName" label="车辆名称" align="center" show-overflow-tooltip /> <el-table-column prop="district" label="区域" align="center" show-overflow-tooltip />
<el-table-column prop="city" label="城市" align="center" show-overflow-tooltip /> <el-table-column prop="level" label="预警等级" align="center" show-overflow-tooltip />
<el-table-column prop="district" label="区域" align="center" show-overflow-tooltip /> <el-table-column prop="state" label="推送110状态" align="center" show-overflow-tooltip />
<el-table-column prop="level" label="预警等级" align="center" show-overflow-tooltip /> <el-table-column prop="alarmType" label="预警类型" 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 prop="alarmType" label="预警类型" align="center" show-overflow-tooltip /> <template #default="scope">
<el-table-column label="预警类型" align="center"> {{ scope.row.alarmType == 'face' ? '人脸' : scope.row.alarmType == 'vehicle' ? '车牌号' : '' }}
<template #default="scope"> </template>
{{scope.row.alarmType=='face'?'人脸':scope.row.alarmType=='vehicle'?'车牌号':''}} </el-table-column>
</template> <el-table-column prop="alarmName" label="预警名称" align="center" show-overflow-tooltip />
</el-table-column> <el-table-column prop="address" label="地址" align="center" show-overflow-tooltip />
<el-table-column prop="alarmName" label="预警名称" align="center" show-overflow-tooltip /> <el-table-column prop="longitude" label="经度" align="center" show-overflow-tooltip />
<el-table-column prop="address" label="地址" align="center" show-overflow-tooltip /> <el-table-column prop="latitude" label="纬度" align="center" show-overflow-tooltip />
<el-table-column prop="longitude" label="经度" align="center" show-overflow-tooltip /> <el-table-column label="照片" align="center">
<el-table-column prop="latitude" label="纬度" align="center" show-overflow-tooltip /> <template #default="scope">
<el-table-column label="照片" align="center"> <a-image :width="100" :height="100" :src="scope.row.url" />
<template #default="scope"> </template>
<a-image :width="100" :height="100" :src="scope.row.url" /> </el-table-column>
</template> </el-table>
</el-table-column> <el-pagination style="position: absolute; right: 60px" @current-change="handleCurrentChange2" :page-size="15" layout="total, prev, pager, next" :total="total2"> </el-pagination>
</el-table> </div>
<el-pagination style="position: absolute;right:60px;" @current-change="handleCurrentChange2" </el-tab-pane>
:page-size="15" layout="total, prev, pager, next" :total="total2"> </el-tabs>
</el-pagination> </div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</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([]); targetType: 'face',
const total1 = ref(); city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
const seachA = () => { })
api.post('/multialarm/ai/alarm/count', { .then((res: any) => {
targetType: 'face', if (res.code == 0) {
city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue'], total1.value = res.data.count
}).then((res) => { }
if (res.code == 0) { })
total1.value = res.data.count; api
} .post('/multialarm/ai/alarm/getlist', {
}) pagesize: 15,
api.post('/multialarm/ai/alarm/getlist', { pageindex: 0,
pagesize: 15, targetType: 'face',
pageindex: 0, city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
targetType: 'face', })
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: any) => {
const handleCurrentChange1 = (data) => { console.log('data', data)
console.log('data', data) pageNum1.value = data
pageNum1.value = data; api
api.post('/multialarm/ai/alarm/getlist', { .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) => { })
if (res.code == 0) { .then((res) => {
tableData.value = res.data; if (res.code == 0) {
} else { tableData.value = res.data
ElMessage.error('请求失败') } else {
} ElMessage.error('请求失败')
}) }
}; })
const indexMethod1 = (index) => { }
return (pageNum1.value - 1) * 15 + index + 1; const indexMethod1 = (index: number) => {
}; return (pageNum1.value - 1) * 15 + index + 1
// }
const value2 = ref(''); //
const tableData2 = ref([]);
const total2 = ref(); const tableData2 = ref<any>([])
const seachB = () => { const total2 = ref()
api.post('/multialarm/ai/alarm/count', { const seachB = () => {
targetType: 'vehicle', api
city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue'], .post('/multialarm/ai/alarm/count', {
}).then((res) => { targetType: 'vehicle',
if (res.code == 0) { city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
total2.value = res.data.count; })
} .then((res: any) => {
}) if (res.code == 0) {
api.post('/multialarm/ai/alarm/getlist', { total2.value = res.data.count
pagesize: 15, }
pageindex: 0, })
targetType: 'vehicle', api
city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue'], .post('/multialarm/ai/alarm/getlist', {
}).then((res) => { pagesize: 15,
if (res.code == 0) { pageindex: 0,
tableData2.value = res.data; targetType: 'vehicle',
} else { city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
ElMessage.error('请求失败') })
} .then((res) => {
}) if (res.code == 0) {
}; tableData2.value = res.data
const pageNum2 = ref(1); } else {
const handleCurrentChange2 = (data) => { ElMessage.error('请求失败')
pageNum2.value = data; }
api.post('/multialarm/ai/alarm/getlist', { })
pagesize: 15, }
pageindex: data - 1, const pageNum2 = ref(1)
targetType: 'vehicle', const handleCurrentChange2 = (data: any) => {
city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue'], pageNum2.value = data
}).then((res) => { api
if (res.code == 0) { .post('/multialarm/ai/alarm/getlist', {
tableData2.value = res.data; pagesize: 15,
} else { pageindex: data - 1,
ElMessage.error('请求失败') targetType: 'vehicle',
} city: JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
}) })
}; .then((res) => {
const indexMethod2 = (index) => { if (res.code == 0) {
return (pageNum2.value - 1) * 15 + index + 1; tableData2.value = res.data
}; } else {
ElMessage.error('请求失败')
}
})
}
const indexMethod2 = (index: number) => {
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) {
color: #fff; // // background: #D1DEEE !important;
} // }
:deep(.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell) { // :deep(.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell) {
// background: #D1DEEE !important; // // background-color: transparent;
} // }
// :deep(.el-table th.el-table__cell) {
// background-color: #f5f7fa;
// }
:deep(.el-date-editor .el-range-input) {
color: #fff;
}
:deep(.el-tabs) {
height: 100%;
}
:deep(.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell) { :deep(.el-tabs__content) {
// background-color: transparent; height: calc(100% - 53px);
} }
:deep(.el-tabs) { :deep(.el-tab-pane) {
height: 100%; height: 100%;
} }
:deep(.el-tabs__content) { ::-webkit-scrollbar {
height: calc(100% - 53px); background-color: #071d4d;
} }
:deep(.el-tab-pane) {
height: 100%;
}
:deep(.el-table th.el-table__cell){
background-color: #F5F7FA;
}
::-webkit-scrollbar {
background-color: #071D4D;
}
</style> </style>