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 />
@ -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 />
@ -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,108 +65,116 @@
</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";
import type { TabsPaneContext } from 'element-plus';
import { ElMessage } from 'element-plus';
onMounted(() => { onMounted(() => {
seachA(); seachA()
seachB(); seachB()
}); })
const activeName = ref('first') const activeName = ref('first')
// const tableData = ref<any>([])
const value1 = ref(''); const total1 = ref()
const tableData = ref([]);
const total1 = ref();
const seachA = () => { const seachA = () => {
api.post('/multialarm/ai/alarm/count', { 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">
@ -194,7 +198,7 @@
} }
:deep(.el-dialog) { :deep(.el-dialog) {
--el-dialog-bg-color: #071D4D; --el-dialog-bg-color: #071d4d;
border: 3px solid #387dbf; border: 3px solid #387dbf;
} }
@ -244,7 +248,7 @@
: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) {
@ -261,46 +265,47 @@
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-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) { :deep(.el-date-editor .el-range-input) {
color: #fff; color: #fff;
} }
: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) { :deep(.el-tabs) {
height: 100%; height: 100%;
} }
@ -312,11 +317,8 @@
: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>