Commit 8b192334 by 李君

优化

1 parent e37ff087
......@@ -59,5 +59,10 @@ html, body, #app, .el-container {
display: flex;
justify-content: flex-end;
}
.imgDialog{
overflow: hidden;
.el-dialog__body{
overflow: auto;
}
}
</style>
......@@ -14,7 +14,7 @@ const axiosInstance = axios.create(
// 请求拦截器
axiosInstance.interceptors.request.use(
config => {
// Cookies.set('atoken','ff2abb3b-667c-4d0f-b9f9-7121a229a416')
// Cookies.set('atoken','41ab4c2d-eb0e-44c2-9370-e5e338e234f8')
if(!Cookies.get('atoken')){
ElMessage({
message: `登录过期,请重新登录`,
......
......@@ -85,12 +85,12 @@
<a-col :span="10" class='imgBox1'>
<div class="imgBox1_top1">
<p v-if="featureList.length>0" style="margin-left: 15px;">
<a-button type="primary" style="float: right;" @click="fullScreen('imgBox1_top1')" >{{!isFull?'全屏':'退出'}}</a-button>
<a-button type="primary" style="float: right;" @click="fullScreen('imgBox1_top1')" >全屏</a-button>
<span>{{featureList[0].person_unid}}</span>
<span style="float: right;margin-right: 15px;">{{featureList.length}}</span>
</p>
<el-row class="imgBox1_top" :gutter="10" v-loading="isLoadingFeature" :style="{'max-height':!isFull?'500px':'90%'}">
<el-row class="imgBox1_top" :gutter="10" v-loading="isLoadingFeature">
<el-col :span="6" class="itemBox" v-for="item in featureList">
<el-image :src="item.picture_url" :fit="'fill'" class="single-image">
</el-image>
......@@ -114,9 +114,9 @@
阈值:<el-input-number class="thresholdInput" size="small" :controls='false' :min="1" :max="100" v-model="threshold"></el-input-number>
<a-button type="primary" @click="reComparison" >重新比对</a-button>
<a-button type="primary" @click="reComparisonFeature" >重提特征比对</a-button>
<a-button type="primary" @click="fullScreen('imgBox2_top')" >{{!isFull?'全屏':'退出'}}</a-button>
<a-button type="primary" @click="fullScreen('imgBox2_top')" >全屏</a-button>
</div>
<el-row :gutter="10" v-loading="isLoadingComparison" class='imgBox2' :style="{'max-height':!isFull?'500px':'90%'}">
<el-row :gutter="10" v-loading="isLoadingComparison" class='imgBox2'>
<el-col :span="6" class="itemBox" v-for="item in comparisonList">
<el-image :src="item.picture_url" :fit="'fill'" class="single-image">
</el-image>
......@@ -142,6 +142,55 @@
</span>
</template>
</el-dialog>
<!-- 特征比对 -->
<el-dialog v-model="featureDialogVisible" custom-class="imgDialog" v-if="featureDialogVisible" title="特征比对" width="90%" top='50px'>
<el-row class="featureBox" :gutter="10">
<el-col :span="3" class="itemBox" v-for="item in featureList">
<el-image :src="item.picture_url" :fit="'fill'" class="single-image">
</el-image>
<span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span>
<span class="el-icon-picture-outline openImage" @click="openImage(item,$event)"></span>
<span class="el-icon-delete delete" @click="deleteImage(item,$event)"></span>
<p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
<div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
</el-col>
<a-empty v-if='featureList.length==0' style='margin: 0 auto;'></a-empty>
</el-row>
<template #footer>
<span class="dialog-footer">
<el-button @click="featureDialogVisible = false">关闭</el-button>
</span>
</template>
</el-dialog>
<!-- 特征重新比对 -->
<el-dialog v-model="refeatureDialogVisible" custom-class="imgDialog" v-if="refeatureDialogVisible" title="特征比对" width="90%" top='50px'>
<div class="btns featureBoxBtns ">
阈值:<el-input-number class="thresholdInput" size="small" :controls='false' :min="1" :max="100" v-model="threshold"></el-input-number>
<a-button type="primary" @click="reComparison" >重新比对</a-button>
<a-button type="primary" @click="reComparisonFeature" >重提特征比对</a-button>
</div>
<el-row :gutter="10" class='featureBox'>
<el-col :span="3" class="itemBox" v-for="item in comparisonList">
<el-image :src="item.picture_url" :fit="'fill'" class="single-image">
</el-image>
<span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span>
<span class="el-icon-picture-outline openImage" @click="openImage(item,$event)"></span>
<span class="el-icon-plus add" v-if="boxObj.person_unid != item.person_unid" @click="addImage(item,$event)"></span>
<p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
<div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
</el-col>
<a-empty v-if='comparisonList.length==0' style='margin: 0 auto;'></a-empty>
</el-row>
<template #footer>
<span class="dialog-footer">
<el-button @click="refeatureDialogVisible = false">关闭</el-button>
</span>
</template>
</el-dialog>
</template>
<script>
......@@ -172,6 +221,8 @@
const total = ref()
const isLoading = ref(false)
const centerDialogVisible = ref(false)
const featureDialogVisible = ref(false)
const refeatureDialogVisible = ref(false)
const otherPictureUrl = ref()
// sequence
const dataList = ref([])
......@@ -184,7 +235,6 @@
const boxObj = ref({})
const currentItemId = ref()
const isLoadingFeature = ref(false)
const isFull = ref(false)
const threshold = ref(75)
const pagedTableDataList = computed(
() => {
......@@ -584,17 +634,22 @@
type: 'success'
}
)
chooseItem(boxObj.value)
featureList.value.forEach((itemObj,index)=>{
if(itemObj.unid==item.unid){
featureList.value.splice(index,1)
}
})
}
const addImage = function(item,event){
})
}
const addImage = function(data,event){
event.stopPropagation()
featureApi.updateImage({
'personUnid':boxObj.value.person_unid,
'id':item.id,
'unid':item.unid,
'countdate':item.counttime?item.counttime:'',
'id':data.id,
'unid':data.unid,
'countdate':data.counttime?data.counttime:'',
}).then((r) => {
if(r.msg_code==200){
ElMessage(
......@@ -603,32 +658,21 @@
type: 'success'
}
)
reComparison()
chooseItem(boxObj.value)
comparisonList.value.forEach(item=>{
if(item.unid==data.unid){
item.person_unid = boxObj.value.person_unid
}
})
}
})
}
__main()
const fullScreen = function(className){
var de = document.getElementsByClassName(className)[0];
if(isFull.value){
if(document.exitFullscreen) {
document.exitFullscreen();
} else if(document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if(document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
if(className=='imgBox2_top'){
refeatureDialogVisible.value = true
}else{
if (de.requestFullscreen) {
de.requestFullscreen();
} else if (de.mozRequestFullScreen) {
de.mozRequestFullScreen();
} else if (de.webkitRequestFullScreen) {
de.webkitRequestFullScreen();
}
featureDialogVisible.value = true
}
isFull.value = !isFull.value
}
// const
return {
......@@ -642,7 +686,8 @@
currentItemId,
centerDialogVisible,
otherPictureUrl,
isFull,
featureDialogVisible,
refeatureDialogVisible,
// sequence
accountList,
plazaList,
......@@ -676,17 +721,8 @@
}
</script>
<style scoped="scoped" lang="less">
.single-image {
height: 300px;
width: 100%;
}
.imgBox1{
border-left: 10px solid #efefef;
box-sizing: border-box;
min-height: 100%;
.itemBox{
position: relative;
}
.downloadFile{
position: absolute;
color: #1890ff;
......@@ -728,15 +764,24 @@
font-size: 16px;
}
}
.single-image {
height: 300px;
width: 100%;
}
.imgBox1{
border-left: 10px solid #efefef;
box-sizing: border-box;
min-height: 100%;
}
.imgBox2{
min-height: 400px;
// max-height: 500px;
max-height: 500px;
overflow-y: auto;
}
.imgBox1_top{
width: 100%;
min-height: 400px;
// max-height: 500px;
max-height: 500px;
overflow-y: auto;
}
.imgBox2_top{
......@@ -788,4 +833,13 @@
text-align: left;
}
}
.featureBox{
height: 600px;
}
.featureBoxBtns{
margin-bottom: 10px;
button{
margin-left: 15px;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!