Commit b4bfa343 by 李君

匹配精度

1 parent ef981a17
window._serverHost = ['localhost', '192.168.1.165'].includes(window.location.hostname) ? '36.112.68.214:33333' : window.location.host window._serverHost = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://mall.keliuyun.com' : window.location.host
window._baseUrl = ['localhost', '192.168.1.165'].includes(window.location.hostname) ? 'http://36.112.68.214:33333/btool/' : `https://${window._serverHost}/btool/` window._baseUrl = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://mall.keliuyun.com/btool/' : `https://${window._serverHost}/btool/`
window._baseImgUrl = ['localhost', '192.168.1.39'].includes(window.location.hostname) ? 'https://store.keliuyun.com/images/' : `${window.location.origin}/images/` window._baseImgUrl = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://mall.keliuyun.com/images/' : `${window.location.origin}/images/`
window._socketUrl = ['localhost', '192.168.1.165'].includes(window.location.hostname) ? `wss://${window._serverHost}/` : `wss://${window._serverHost}/` window._socketUrl = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? `wss://${window._serverHost}/` : `wss://${window._serverHost}/`
const log = console.log.bind(console) const log = console.log.bind(console)
...@@ -14,14 +14,14 @@ const axiosInstance = axios.create( ...@@ -14,14 +14,14 @@ const axiosInstance = axios.create(
// 请求拦截器 // 请求拦截器
axiosInstance.interceptors.request.use( axiosInstance.interceptors.request.use(
config => { config => {
// Cookies.set('atoken','d697b325-3a0d-4364-b851-a27d8b6e2a1e') // Cookies.set('atoken','57ac28e0-c2d9-4287-8d20-bc0332372dad')
if(!Cookies.get('atoken')){ if(!Cookies.get('atoken')){
ElMessage({ ElMessage({
message: `登录过期,请重新登录`, message: `登录过期,请重新登录`,
type: 'warning' type: 'warning'
}) })
setTimeout(()=>{ setTimeout(()=>{
let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://store.keliuyun.com/' : window.location.origin let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://mall.keliuyun.com/' : window.location.origin
// if(url.includes('36.112.68.214')){ // if(url.includes('36.112.68.214')){
// url = 'http://36.112.68.214:33333/' // url = 'http://36.112.68.214:33333/'
// } // }
...@@ -45,7 +45,7 @@ axiosInstance.interceptors.response.use( ...@@ -45,7 +45,7 @@ axiosInstance.interceptors.response.use(
type: 'warning' type: 'warning'
}) })
setTimeout(()=>{ setTimeout(()=>{
let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://store.keliuyun.com/' : window.location.origin let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://mall.keliuyun.com/' : window.location.origin
// if(url.includes('36.112.68.214')){ // if(url.includes('36.112.68.214')){
// url = 'http://36.112.68.214:33333/' // url = 'http://36.112.68.214:33333/'
// } // }
......
...@@ -61,6 +61,10 @@ const menuRoute = [ ...@@ -61,6 +61,10 @@ const menuRoute = [
path: 'equipmentDataRetransmission', path: 'equipmentDataRetransmission',
component: () => import("@/views/equipmentDataRetransmission/equipmentDataRetransmission.vue"), component: () => import("@/views/equipmentDataRetransmission/equipmentDataRetransmission.vue"),
}, },
{
path: 'FeatureMatchingAccuracy',
component: () => import("@/views/FeatureMatchingAccuracy/FeatureMatchingAccuracy.vue")
},
] ]
}, },
] ]
......
import axiosInstance from "@/Request/PublicAxiosInstance"
import {filterEmptyValueInObject} from "@/PublicUtil/PublicUtil"
class FeatureMatchingAccuracy {
addMatch(data) {
return axiosInstance.request(
{
method: 'POST',
url: `/feature/match`,
data: data
}
)
}
getMatchOne(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/feature/match/${data.id}`,
}
)
}
editMatch(data) {
return axiosInstance.request(
{
method: 'PUT',
url: `/feature/match`,
data: data
}
)
}
delMatch(data){
return axiosInstance.request(
{
method: 'DELETE',
url: `/feature/match/${data.id}`,
}
)
}
getMatch(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/feature/match`,
params: data
}
)
}
getSearchByPic(data){
return axiosInstance.request(
{
method: 'GET',
url: `/feature/match/searchByPic`,
params: data
}
)
}
addMatchHit(data) {
return axiosInstance.request(
{
method: 'POST',
url: `/feature/match/hit`,
data: data
}
)
}
delMatchHit(data){
return axiosInstance.request(
{
method: 'DELETE',
url: `/feature/match/hit/${data.regId}/${data.faceId}`,
}
)
}
getMatchHitDetail(data){
return axiosInstance.request(
{
method: 'GET',
url: `/feature/match/hitDetail/${data.id}`,
params: data
}
)
}
getMatchHit(data){
return axiosInstance.request(
{
method: 'GET',
url: `/feature/match/${data.id}/${data.personUnid}`,
}
)
}
delMatchSample(data){
return axiosInstance.request(
{
method: 'DELETE',
url: `/feature/match/${data.regId}/${data.faceId}`,
}
)
}
}
const FeatureMatchingAccuracyApi = new FeatureMatchingAccuracy()
export default FeatureMatchingAccuracyApi
<template>
<a-modal
title="命中详情"
v-if="isVisible"
v-model:visible="isVisible"
width="1500px"
:dialog-style="{ top: '20px',height:'90%' }"
class="detail-modal"
>
<div style="height: 700px;overflow-y: auto;">
<template v-for="person in hitPersonList">
<div class="classBox" :class="person.expand?'expand':''">
<div class="boxInfo">
<span class="iconExpand" v-show="!person.expand"></span>
<span class="iconExpand" v-show="person.expand"></span>
<span class="expandWord" @click='expandChange(person)'>{{person.expand?'收起':'展开'}}</span>
人id:{{ ' ' + person.personId }}
图片数量:{{ person.count }}
<el-radio class="checkBox" v-model="checked" :label="person.personId">以此为对比项</el-radio>
</div>
<el-row :gutter="10">
<el-col :span="3" v-for="item in person.records">
<div>
<el-image :src="item.picture_url"
:fit="'fill'"
class="single-image" >
</el-image>
</div>
</el-col>
</el-row>
</div>
</template>
</div>
<template #footer>
<a-button @click="onCancel">返回</a-button>
<a-button @click="onConfirm" type="primary">确定</a-button>
</template>
</a-modal>
</template>
<script>
import moment from 'moment'
import { reactive, ref,toRaw } from "vue";
import {isArray } from '@/PublicUtil/Judgment'
import {ElMessage} from 'element-plus'
import FeatureMatchingAccuracyApi from '@/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi'
export default {
setup(props,context) {
const isVisible = ref(false);
const isLoading = ref(false)
const accountId = ref('');
const mallId = ref('');
const checked = ref('');
const hitPersonList = ref([])
const regId = ref()
const initDialog = function(parmas) {
regId.value = parmas.regId
hitPersonList.value = parmas.data
checked.value = parmas.checkPersonId
isVisible.value = true;
};
const expandChange = function(data){
hitPersonList.value.forEach(item=>{
if (data.personId == item.personId) {
item.expand = !item.expand
}
})
}
const refreshParentTable = function(){
context.emit('refreshParentTable')
}
const onCancel = () => {
isVisible.value = false;
};
const onConfirm = function(){
if(!checked.value){
ElMessage({
message: `请选择对比项`,
type: 'warning'
})
return false;
}
FeatureMatchingAccuracyApi.getMatchHit({
id:regId.value,
personUnid:checked.value
}).then(
(r) => {
if(r.msg_code==200){
ElMessage({
message: `${r.msg_info}`,
type: 'success'
})
refreshParentTable()
isVisible.value = false;
}else{
ElMessage({
message: `${r.msg_info}`,
type: 'error'
})
}
}
)
}
return {
isVisible,
onCancel,
onConfirm,
initDialog,
hitPersonList,
expandChange,
checked,
refreshParentTable
};
},
};
</script>
<style lang="less" scoped>
.single-image{
width: 100%;
height: 220px;
}
.boxInfo{
line-height: 28px;
margin-bottom: 10px;
}
.checkBox{
margin-left: 15px;
}
.classBox{
margin-bottom: 10px;
border: solid 1px black;
height: 265px;
overflow: hidden;
padding: 5px;
}
.expand{
height: auto;
overflow-y: auto;
}
.expandWord{
color: #1890ff;
margin-right: 5px;
cursor: pointer;
float: right;
}
.iconExpand{
cursor: pointer;
float: right;
color: #1890ff;
margin-right: 20px;
}
</style>
...@@ -103,7 +103,12 @@ ...@@ -103,7 +103,12 @@
<span style="padding: 0 5px">特征匹配</span> <span style="padding: 0 5px">特征匹配</span>
</div> </div>
</a-menu-item> </a-menu-item>
<a-menu-item :key="'/Main/FeatureMatchingAccuracy'">
<div class="flex-vertical-center">
<img :src="require('./Icons/2.svg')" style="height: auto;width:20px"/>
<span style="padding: 0 5px">特征匹配精度</span>
</div>
</a-menu-item>
</a-menu> </a-menu>
</el-aside> </el-aside>
<el-main> <el-main>
......
...@@ -58,7 +58,7 @@ module.exports = { ...@@ -58,7 +58,7 @@ module.exports = {
devServer: { devServer: {
proxy: { proxy: {
'/': { '/': {
target: 'http://36.112.68.214:33333/btool/', target: 'https://mall.keliuyun.com/btool/',
changeOrigin: true changeOrigin: true
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!