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