Commit 395de638 by 李君

6.2

1 parent 4c6832e2
......@@ -1743,87 +1743,6 @@
"webpack-chain": "^6.4.0",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
"@vue/cli-shared-utils": {
......@@ -11579,6 +11498,87 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.8.tgz",
......
window._serverHost = ['localhost', '192.168.1.165'].includes(window.location.hostname) ? '36.112.68.214:33333' : 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._baseImgUrl = ['localhost', '192.168.1.39'].includes(window.location.hostname) ? 'https://store.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._serverHost = ['localhost', '192.168.1.168'].includes(window.location.hostname) ? '36.112.68.214:9999' : window.location.host
window._baseUrl = ['localhost', '192.168.1.168'].includes(window.location.hostname) ? 'http://36.112.68.214:9999/tool/' : `http://${window._serverHost}/tool/`
window._baseImgUrl = ['localhost', '192.168.1.168'].includes(window.location.hostname) ? 'http://36.112.68.214:9999/images/' : `${window.location.origin}/images/`
const log = console.log.bind(console)
......@@ -59,10 +59,5 @@ html, body, #app, .el-container {
display: flex;
justify-content: flex-end;
}
.imgDialog{
overflow: hidden;
.el-dialog__body{
overflow: auto;
}
}
</style>
......@@ -2,34 +2,25 @@ import axios from 'axios'
import router from '@/router/index'
import Cookies from "js-cookie"
import {getTimestampString} from "@/PublicUtil/PublicUtil"
import {ElMessage} from 'element-plus'
// 创建 axios 的一个实例
let baseURL = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? '' : window._baseUrl
const axiosInstance = axios.create(
{
baseURL: baseURL,
timeout:10000
baseURL: window._baseUrl
}
)
// 请求拦截器
axiosInstance.interceptors.request.use(
config => {
Cookies.set('atoken','9b478c52-37e2-451e-8b71-5338f0b0f0e3')
if(!Cookies.get('atoken')){
ElMessage({
message: `登录过期,请重新登录`,
type: 'warning'
})
setTimeout(()=>{
let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'http://36.112.68.214:33333/' : window.location.origin
// if(url.includes('36.112.68.214')){
// url = 'http://36.112.68.214:33333/'
// }
window.open(url,'_blank')
},300)
return
if (['localhost', '192.168.1.168'].includes(window.location.hostname))
{
config.headers.Authorization = '015269a1-3214-4271-b202-1922138d021c'
}
else
{
config.headers.Authorization = Cookies.get('atoken')
}
return config
}
......@@ -39,20 +30,7 @@ axiosInstance.interceptors.request.use(
axiosInstance.interceptors.response.use(
(r) => {
const responseData = r.data
if(responseData.ecode && responseData.ecode == '401'){
ElMessage({
message: `登录过期,请重新登录`,
type: 'warning'
})
setTimeout(()=>{
let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'http://36.112.68.214:33333/' : window.location.origin
// if(url.includes('36.112.68.214')){
// url = 'http://36.112.68.214:33333/'
// }
window.open(url,'_blank')
},300)
return
}
return responseData
},
(e) => {
......
......@@ -41,26 +41,6 @@ const menuRoute = [
path: 'ComparisonCapturedPictures',
component: () => import("@/views/ComparisonCapturedPictures/ComparisonCapturedPictures.vue"),
},
{
path: 'MinutePassenger',
component: () => import("@/views/MinutePassenger/MinutePassenger.vue"),
},
{
path: 'SystemLog',
component: () => import("@/views/SystemLog/index.vue"),
},
{
path: 'DataReplay',
component: () => import("@/views/DataReplay/DataReplay.vue"),
},
{
path: 'Featurematching',
component: () => import("@/views/Featurematching/Featurematching.vue")
},
{
path: 'equipmentDataRetransmission',
component: () => import("@/views/equipmentDataRetransmission/equipmentDataRetransmission.vue"),
},
]
},
]
......
......@@ -63,7 +63,7 @@
<a-input-number v-model:value="queryForm.maxPic" :min="0" style="width: 100px"/>
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button>
<a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button>
</a-form-item>
</a-form>
<div v-loading="isLoading">
......@@ -99,7 +99,6 @@
<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>
<div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
......@@ -117,7 +116,6 @@
<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>
<div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
......@@ -131,7 +129,6 @@
</a-row>
<DetailDialog ref="DetailDialogRef" />
<DetailDialogComparison ref="DetailDialogComparisonRef" />
<imgOtherDialog ref="imgOtherDialogRef" />
</template>
<script>
......@@ -156,12 +153,10 @@
import {ElMessage} from 'element-plus'
import DetailDialog from "./DetailDialog.vue";
import DetailDialogComparison from "./DetailDialogComparison.vue";
import imgOtherDialog from "./imgOtherDialog.vue";
export default {
components: {
DetailDialog,
DetailDialogComparison,
imgOtherDialog
DetailDialogComparison
},
setup() {
// scalar
......@@ -180,7 +175,7 @@
// ref
const DetailDialogRef = ref();
const DetailDialogComparisonRef = ref();
const imgOtherDialogRef = ref()
const pagedTableDataList = computed(
() => {
return getPagedList(dataList.value, 10)
......@@ -202,20 +197,6 @@
minPic:'',
maxPic:'',
})
const searchCondition = ref({})
if(window.localStorage.getItem('searchCondition')){
searchCondition.value = JSON.parse(window.localStorage.getItem('searchCondition'));
queryForm.type = searchCondition.value.type;
queryForm.zone_id = searchCondition.value.zone_id;
queryForm.gate_id = searchCondition.value.gate_id;
queryForm.direction = searchCondition.value.direction;
queryForm.picType = searchCondition.value.picType;
queryForm.date = searchCondition.value.date;
queryForm.startTime = searchCondition.value.startTime;
queryForm.endTime = searchCondition.value.endTime;
queryForm.minPic = searchCondition.value.minPic||0;
queryForm.maxPic = searchCondition.value.maxPic||100;
}
// function
const onPageNumChange = function(num) {
pageNum.value = num
......@@ -229,9 +210,9 @@
}
const onAccountChange = function() {
getPlazaList(1)
// getZoneList()
// getGateList()
getPlazaList()
getZoneList()
getGateList()
}
const onPlazaChange = function() {
......@@ -243,7 +224,7 @@
getGateList()
}
const getPlazaList = function(val) {
const getPlazaList = function() {
queryForm.plaza_id = []
plazaList.value = []
snapshotRecordApi.getPlazaList({
......@@ -257,22 +238,13 @@
label: item.name,
})
}
if(plazaList.value.length>0){
if(!val&&searchCondition.value.plaza_id && searchCondition.value.plaza_id.length>0){
queryForm.plaza_id = searchCondition.value.plaza_id
}else{
queryForm.plaza_id.push(plazaList.value[0].value)
}
getZoneList(1)
getGateList(1)
confirmSearch()
}
}
}
)
}
const getZoneList = function(val) {
const getZoneList = function() {
queryForm.zone_id = []
zoneList.value = []
snapshotRecordApi.getZoneList({
account_id: queryForm.account_id.toString(),
......@@ -286,21 +258,13 @@
label: item.name,
})
}
if(zoneList.value.length){
if(val&&searchCondition.value.zone_id && searchCondition.value.zone_id.length>0){
queryForm.zone_id = searchCondition.value.zone_id
}else{
queryForm.zone_id = []
}
}else{
queryForm.zone_id = []
}
}
}
)
}
const getGateList = function(val) {
const getGateList = function() {
queryForm.gate_id = []
gateList.value = []
snapshotRecordApi.getGateList({
account_id: queryForm.account_id.toString(),
......@@ -316,15 +280,6 @@
label: item.name,
})
}
if(gateList.value.length){
if(val&&searchCondition.value.gate_id && searchCondition.value.gate_id.length>0){
queryForm.gate_id = searchCondition.value.gate_id
}else{
queryForm.gate_id = []
}
}else{
queryForm.gate_id = []
}
}
}
)
......@@ -342,22 +297,11 @@
label: item.name,
})
}
if(accountList.value.length){
if(searchCondition.value.account_id && searchCondition.value.account_id.length>0){
queryForm.account_id = searchCondition.value.account_id
}else{
queryForm.account_id.push(accountList.value[0].value)
}
getPlazaList()
}
}
}
)
}
const clickSearch = function() {
pageNum.value = 1
confirmSearch()
}
const confirmSearch = function() {
const rawData = toRaw(queryForm)
if(rawData.minPic>rawData.maxPic){
......@@ -386,24 +330,7 @@
page: pageNum.value - 1,
pageSize: pageSize.value,
})
const storageData = filterEmptyValueInObject(
{
account_id: rawData.account_id,
type: rawData.type,
plaza_id: rawData.plaza_id,
zone_id: rawData.zone_id,
gate_id: rawData.gate_id,
direction: rawData.direction,
picType: rawData.picType,
personType: rawData.personType,
date: rawData.date,
minPic: rawData.minPic,
maxPic: rawData.maxPic,
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime),
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime),
}
)
window.localStorage.setItem('searchCondition',JSON.stringify(storageData))
comparsionResultApi.getPersonGroupList(data).then(
(r) => {
isLoading.value = false
......@@ -583,6 +510,8 @@
}
parmas.persionlistLeft = boxListLeft.value
parmas.persionlistRight = boxListRight.value
console.log(clickItemObj.value)
console.log(parmas)
DetailDialogComparisonRef.value.initDialog(clickItemObj.value,parmas);
}
// 店员特征对比
......@@ -630,21 +559,6 @@
}
}
const openImage = function(item,event){
event.stopPropagation()
if(item.features_url){
let url = item.picture_url
imgOtherDialogRef.value.initDialog(url.split('0.jpg')[0]+'1.jpg')
}else{
ElMessage(
{
message: `该图片没有特征`,
type: 'warning'
}
)
return
}
}
__main()
return {
......@@ -673,7 +587,6 @@
onPlazaChange,
onZoneChange,
confirmSearch,
clickSearch,
formatDirection,
formatPersonType,
dragStart,
......@@ -686,11 +599,9 @@
shoperFeatureComparison,
clickItem,
downloadFile,
openImage,
// ref
DetailDialogRef,
DetailDialogComparisonRef,
imgOtherDialogRef
DetailDialogComparisonRef
}
}
}
......@@ -729,14 +640,6 @@
right: 0;
cursor: pointer;
}
.openImage{
position: absolute;
color: #1890ff;
font-size: 32px;
top: 0;
right: 30px;
cursor: pointer;
}
}
.comparsionBox{
padding-top: 5px;
......
......@@ -10,11 +10,11 @@
<a-row :gutter="[16,16]">
<a-col :span='4'>
<div style="margin: 0 5px" class="itemBox">
<el-image :src="detailData.picture_url" :fit="'fill'" class="single-image" @click='clickItem(detailData)'>
<el-image :src="detailData.picture_url" :fit="'fill'" class="single-image">
</el-image>
<span class="el-icon-document downloadFile" @click="downloadFile(detailData,$event)"></span>
<div>时间:{{ detailData.counttime }}</div>
<div class="direction" :class="'direction'+detailData.direction">方向:{{ formatDirection(detailData.direction) }}</div>
<div>方向:{{ formatDirection(detailData.direction) }}</div>
<div>地点:{{ detailData.gate_name }}</div>
</div>
</a-col>
......@@ -24,11 +24,10 @@
<a-row>
<a-col :span="4" v-for="item in row.personList" :key='item.id' class='colItem'>
<div style="margin: 0 5px" class="itemBox">
<el-image :src="item.picture_url" :fit="'fill'" class="single-image" @click='clickItem(item)'>
<el-image :src="item.picture_url" :fit="'fill'" class="single-image">
</el-image>
<span class="el-icon-picture-outline openImage" @click="openImage(item,$event)"></span>
<span class="el-icon-document downloadFile" @click="downloadFile(item,$event)"></span>
<p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
<p class="featureNum">{{(item.featureNum).toFixed(2)}}</p>
<div>时间:{{ item.counttime }}</div>
</div>
</a-col>
......@@ -41,28 +40,17 @@
<a-button @click="onCancel">返回</a-button>
</template>
</a-modal>
<imgDialog ref='imgModelRef'></imgDialog>
<imgOtherDialog ref="imgOtherDialogRef" ></imgOtherDialog>
</template>
<script>
import { reactive, ref } from "vue";
import {isArray } from '@/PublicUtil/Judgment'
import comparsionResultApi from '@/views/ComparisonCapturedPictures/api'
import clusterResultApi from '@/views/SnapshotCluster/ClusterResult/ClusterResultApi'
import imgDialog from '../SnapshotCluster/imgDialog.vue'
import imgOtherDialog from "./imgOtherDialog.vue";
export default {
components:{
imgDialog,
imgOtherDialog
},
setup() {
const isVisible = ref(false);
const isLoading = ref(false);
const detailData = ref({});
const imgModelRef = ref();
const imgOtherDialogRef = ref();
const dataList = ref([])
const initDialog = (record,parmas) => {
detailData.value = record;
......@@ -74,6 +62,7 @@ export default {
if (isArray(r.data)) {
if(r.data.length>0){
r.data.forEach((item) => {
console.log(item)
item.personList.forEach((item1)=>{
if (item1.features_url) {
item1.features_url = window._baseImgUrl + item1.features_url
......@@ -106,11 +95,6 @@ export default {
}
}
}
const clickItem = function(data){
clusterResultApi.getBodyPoint({'feature_url':data.features_url}).then((r) => {
imgModelRef.value.initDialog(data.picture_url,r.data);
})
}
const onCancel = () => {
isVisible.value = false;
};
......@@ -129,21 +113,7 @@ export default {
}
}
const openImage = function(item,event){
event.stopPropagation()
if(item.features_url){
let url = item.picture_url
imgOtherDialogRef.value.initDialog(url.split('0.jpg')[0]+'1.jpg')
}else{
ElMessage(
{
message: `该图片没有特征`,
type: 'warning'
}
)
return
}
}
return {
isVisible,
detailData,
......@@ -152,11 +122,7 @@ export default {
initDialog,
isLoading,
formatDirection,
downloadFile,
clickItem,
imgModelRef,
imgOtherDialogRef,
openImage
downloadFile
};
},
};
......@@ -165,18 +131,6 @@ export default {
.single-image {
height: 200px;
width: 150px;
cursor: pointer;
}
.direction{
font-weight: 900;
background-color: red;
color: white;
}
.direction1{
background-color: green;
}
.direction0{
background-color: orange;
}
.rowBox{
border : 2px dashed #ccc;
......@@ -198,14 +152,6 @@ export default {
left: 120px;
cursor: pointer;
}
.openImage{
position: absolute;
color: #1890ff;
font-size: 32px;
top: 0;
left: 90px;
cursor: pointer;
}
.featureNum{
position: absolute;
top: 0;
......
......@@ -30,8 +30,7 @@
<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>
<p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
<p class="featureNum">{{(item.featureNum).toFixed(2)}}</p>
<div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
......@@ -51,8 +50,7 @@
<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>
<p class="featureNum">{{item.featureNum?(item.featureNum).toFixed(2):0}}</p>
<p class="featureNum">{{(item.featureNum).toFixed(2)}}</p>
<div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
......@@ -67,18 +65,13 @@
<a-button @click="onCancel">返回</a-button>
</template>
</a-modal>
<imgOtherDialog ref="imgOtherDialogRef" />
</template>
<script>
import { reactive, ref } from "vue";
import {isArray } from '@/PublicUtil/Judgment'
import comparsionResultApi from '@/views/ComparisonCapturedPictures/api'
import imgOtherDialog from "./imgOtherDialog.vue";
export default {
components: {
imgOtherDialog
},
setup() {
const isVisible = ref(false);
const isLoadingTop = ref(false);
......@@ -86,7 +79,6 @@ export default {
const detailData = ref({});
const dataListLeft = ref([])
const dataListRight = ref([])
const imgOtherDialogRef = ref()
const initDialog = (record,parmas) => {
detailData.value = record;
isVisible.value = true;
......@@ -102,6 +94,7 @@ export default {
countdate:parmas.countdate,
personList:parmas.persionlistLeft
}
console.log(parmasObj)
comparsionResultApi.getPersonContrastList(parmasObj).then((r) => {
isLoadingTop.value = false
if (r.data&&isArray(r.data.personList)) {
......@@ -171,21 +164,6 @@ export default {
}
}
const openImage = function(item,event){
event.stopPropagation()
if(item.features_url){
let url = item.picture_url
imgOtherDialogRef.value.initDialog(url.split('0.jpg')[0]+'1.jpg')
}else{
ElMessage(
{
message: `该图片没有特征`,
type: 'warning'
}
)
return
}
}
return {
isVisible,
......@@ -197,9 +175,7 @@ export default {
formatDirection,
isLoadingTop,
isLoadingBottom,
downloadFile,
openImage,
imgOtherDialogRef
downloadFile
};
},
};
......@@ -229,14 +205,6 @@ export default {
left: 120px;
cursor: pointer;
}
.openImage{
position: absolute;
color: #1890ff;
font-size: 32px;
top: 0;
left: 90px;
cursor: pointer;
}
}
.featureNum{
position: absolute;
......@@ -246,9 +214,4 @@ export default {
font-weight: 900;
font-size: 16px;
}
.dialogImg{
/deep/.el-dialog--center .el-dialog__body{
text-align: center;
}
}
</style>
......@@ -253,7 +253,7 @@ export default {
webSocketMap[scheduleType].close()
}
webSocketMap[scheduleType] = new WebSocket(`${window._socketUrl}/recal/schedule/${scheduleType}`)
webSocketMap[scheduleType] = new WebSocket(`ws://${window._serverHost}/recal/schedule/${scheduleType}`)
webSocketMap[scheduleType].onopen = () => {
queryData(scheduleType)
......
......@@ -59,7 +59,7 @@
<a-time-picker v-model:value="queryForm.endTime" style="width: 100px" />
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button>
<a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button>
</a-form-item>
</a-form>
<div v-loading="isLoading">
......@@ -69,7 +69,6 @@
<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>
<div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
......@@ -83,47 +82,37 @@
</div>
</a-col>
<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')" >全屏</a-button>
<p v-if='featureList.length>0' style="margin-left: 15px;">
<span>{{featureList[0].person_unid}}</span>
<span style="float: right;margin-right: 15px;">{{featureList.length}}</span>
<span style="float: right;">{{featureList.length}}</span>
</p>
<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>
<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>
<p class="featureNum">{{(item.featureNum).toFixed(2)}}</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>
</div>
<div class="imgBox2_top" >
<div class="btns">
<p v-if='comparisonList.length>0' style="margin-left: 15px;float: left">
<span>{{comparisonList[0].person_unid}}</span>
<span syle="margin-left:30px">{{comparisonList.length}}</span>
</p>
阈值:<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')" >全屏</a-button>
</div>
<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>
<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>
<p class="featureNum">{{(item.featureNum).toFixed(2)}}</p>
<div>时间:{{ item.counttime }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
......@@ -133,64 +122,7 @@
</div>
</a-col>
</a-row>
<el-dialog v-model="centerDialogVisible" v-if="centerDialogVisible" title="body1" >
<el-image :src="otherPictureUrl" :fit="'contain'" class="single-image">
</el-image>
<template #footer>
<span class="dialog-footer">
<el-button @click="centerDialogVisible = false">关闭</el-button>
</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>
......@@ -220,10 +152,6 @@
const pageSize = ref(10)
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([])
const accountList = ref([])
......@@ -235,7 +163,6 @@
const boxObj = ref({})
const currentItemId = ref()
const isLoadingFeature = ref(false)
const threshold = ref(75)
const pagedTableDataList = computed(
() => {
return getPagedList(dataList.value, 10)
......@@ -255,18 +182,6 @@
startTime: moment('00:00:00', 'HH:mm:ss'),
endTime: moment('23:59:59', 'HH:mm:ss'),
})
const searchCondition = ref({})
if(window.localStorage.getItem('searchCondition')){
searchCondition.value = JSON.parse(window.localStorage.getItem('searchCondition'));
queryForm.type = searchCondition.value.type;
queryForm.zone_id = searchCondition.value.zone_id;
queryForm.gate_id = searchCondition.value.gate_id;
queryForm.direction = searchCondition.value.direction;
queryForm.picType = searchCondition.value.picType;
queryForm.date = searchCondition.value.date;
queryForm.startTime = searchCondition.value.startTime;
queryForm.endTime = searchCondition.value.endTime;
}
// function
const onPageNumChange = function(num) {
pageNum.value = num
......@@ -280,21 +195,21 @@
}
const onAccountChange = function() {
getPlazaList(1)
getPlazaList()
// getZoneList()
// getGateList()
}
const onPlazaChange = function() {
getZoneList(1)
getGateList(1)
getZoneList()
getGateList()
}
const onZoneChange = function() {
getGateList()
}
const getPlazaList = function(val) {
const getPlazaList = function() {
queryForm.plaza_id = []
plazaList.value = []
snapshotRecordApi.getPlazaList({
......@@ -308,22 +223,12 @@
label: item.name,
})
}
if(plazaList.value.length>0){
if(!val&&searchCondition.value.plaza_id && searchCondition.value.plaza_id.length>0){
queryForm.plaza_id = searchCondition.value.plaza_id
}else{
queryForm.plaza_id.push(plazaList.value[0].value)
}
getZoneList(1)
getGateList(1)
confirmSearch()
}
}
}
)
}
const getZoneList = function(val) {
const getZoneList = function() {
queryForm.zone_id = []
zoneList.value = []
snapshotRecordApi.getZoneList({
......@@ -338,21 +243,12 @@
label: item.name,
})
}
if(zoneList.value.length){
if(val&&searchCondition.value.zone_id && searchCondition.value.zone_id.length>0){
queryForm.zone_id = searchCondition.value.zone_id
}else{
queryForm.zone_id = []
}
}else{
queryForm.zone_id = []
}
}
}
)
}
const getGateList = function(val) {
const getGateList = function() {
queryForm.gate_id = []
gateList.value = []
snapshotRecordApi.getGateList({
......@@ -369,15 +265,6 @@
label: item.name,
})
}
if(gateList.value.length){
if(val&&searchCondition.value.gate_id && searchCondition.value.gate_id.length>0){
queryForm.gate_id = searchCondition.value.gate_id
}else{
queryForm.gate_id = []
}
}else{
queryForm.gate_id = []
}
}
}
)
......@@ -395,26 +282,14 @@
label: item.name,
})
}
if(accountList.value.length){
if(searchCondition.value.account_id && searchCondition.value.account_id.length>0){
queryForm.account_id = searchCondition.value.account_id
}else{
queryForm.account_id.push(accountList.value[0].value)
}
getPlazaList()
}
}
}
)
}
const clickSearch = function() {
pageNum.value = 1
confirmSearch()
}
const confirmSearch = function() {
isLoading.value = true
const rawData = toRaw(queryForm)
console.log(rawData)
const data = filterEmptyValueInObject({
account_id: rawData.account_id.toString(),
type: rawData.type,
......@@ -424,27 +299,13 @@
direction: rawData.direction.toString(),
picType: rawData.picType,
personType: rawData.personType.toString(),
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime),
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime),
page: pageNum.value - 1,
pageSize: pageSize.value,
})
const storageData = filterEmptyValueInObject(
{
account_id: rawData.account_id,
type: rawData.type,
plaza_id: rawData.plaza_id,
zone_id: rawData.zone_id,
gate_id: rawData.gate_id,
direction: rawData.direction,
picType: rawData.picType,
personType: rawData.personType,
date: rawData.date,
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime),
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime),
}
)
window.localStorage.setItem('searchCondition',JSON.stringify(storageData))
snapshotRecordApi.getSnapshotRecordList(data).then(
(r) => {
isLoading.value = false
......@@ -496,7 +357,6 @@
}
boxObj.value = data;
featureList.value = []
comparisonList.value = []
featureApi.getPersonContrastList(parmas).then((r) => {
isLoadingFeature.value = false
if (r.data&&isArray(r.data.personList)) {
......@@ -531,8 +391,7 @@
pic_type:rawData.picType,
countdate:formatDate(rawData.date),
pic_id:boxObj.value.id,
ip:window._baseImgUrl,
customScore:threshold.value?threshold.value:75
ip:window._baseImgUrl
}
comparisonList.value = []
featureApi.getAllPersonContrastList(parmas).then((r) => {
......@@ -606,78 +465,8 @@
}
}
const openImage = function(item,event){
event.stopPropagation()
if(item.features_url){
centerDialogVisible.value = true;
let url = item.picture_url
otherPictureUrl.value = url.split('0.jpg')[0]+'1.jpg'
}else{
ElMessage(
{
message: `该图片没有特征`,
type: 'warning'
}
)
return
}
}
const deleteImage = function(item,event){
event.stopPropagation()
featureApi.updateImage({
'personUnid':item.unid,
'id':item.id,
'unid':item.unid,
'countdate':item.counttime?item.counttime:'',
}).then((r) => {
if(r.msg_code==200){
ElMessage(
{
message: `删除成功`,
type: 'success'
}
)
featureList.value.forEach((itemObj,index)=>{
if(itemObj.unid==item.unid){
featureList.value.splice(index,1)
}
})
}
})
}
const addImage = function(data,event){
event.stopPropagation()
featureApi.updateImage({
'personUnid':boxObj.value.person_unid,
'id':data.id,
'unid':data.unid,
'countdate':data.counttime?data.counttime:'',
}).then((r) => {
if(r.msg_code==200){
ElMessage(
{
message: `增加成功`,
type: 'success'
}
)
comparisonList.value.forEach(item=>{
if(item.unid==data.unid){
item.person_unid = boxObj.value.person_unid
}
})
}
})
}
__main()
const fullScreen = function(className){
if(className=='imgBox2_top'){
refeatureDialogVisible.value = true
}else{
featureDialogVisible.value = true
}
}
// const
return {
// scalar
isLoading,
......@@ -687,10 +476,6 @@
isLoadingFeature,
isLoadingComparison,
currentItemId,
centerDialogVisible,
otherPictureUrl,
featureDialogVisible,
refeatureDialogVisible,
// sequence
accountList,
plazaList,
......@@ -700,8 +485,6 @@
featureList,
comparisonList,
// mapping
boxObj,
threshold,
queryForm,
// function
onPageNumChange,
......@@ -714,19 +497,23 @@
chooseItem,
reComparison,
reComparisonFeature,
downloadFile,
openImage,
deleteImage,
addImage,
fullScreen,
clickSearch
downloadFile
}
}
}
</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;
......@@ -735,30 +522,6 @@
right: 0;
cursor: pointer;
}
.openImage{
position: absolute;
color: #1890ff;
font-size: 32px;
top: 0;
right: 30px;
cursor: pointer;
}
.delete{
position: absolute;
color: red;
font-size: 32px;
top: 0;
right: 60px;
cursor: pointer;
}
.add{
position: absolute;
color: #1890ff;
font-size: 32px;
top: 0;
right: 60px;
cursor: pointer;
}
.featureNum{
position: absolute;
top: 0;
......@@ -768,28 +531,18 @@
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;
overflow-y: auto;
}
.imgBox1_top{
width: 100%;
min-height: 400px;
max-height: 500px;
overflow-y: auto;
border-bottom: 10px solid #efefef;
}
.imgBox2_top{
border-top: 10px solid #efefef;
.btns{
text-align: right;
margin-top: 10px;
......@@ -797,7 +550,6 @@
}
button{
margin-right: 10px;
padding: 4px 7px;
}
}
.colItem{
......@@ -814,14 +566,6 @@
top: 0;
right: 0;
}
.openImage{
position: absolute;
color: #1890ff;
font-size: 32px;
top: 0;
right: 30px;
cursor: pointer;
}
}
.col{
flex: 0 0 20%;
......@@ -830,20 +574,4 @@
.actived{
border: 1px solid #1890ff;
}
.thresholdInput{
width: 60px;
// margin-right: 15px;
/deep/.el-input__inner{
text-align: left;
}
}
.featureBox{
height: 600px;
}
.featureBoxBtns{
margin-bottom: 10px;
button{
margin-left: 15px;
}
}
</style>
......@@ -36,17 +36,6 @@ class FeatureResultApi {
}
)
}
updateImage(data){
return axiosInstance.request(
{
method: 'PUT',
url: `/faceRecognitions`,
data: filterEmptyValueInObject(
data
)
}
)
}
}
const featureResultApi = new FeatureResultApi()
......
......@@ -187,7 +187,7 @@ export default {
}
resultList.value = []
webSocket = new WebSocket(`${window._socketUrl}/recal/schedule/rebuildFeatureLib${queryForm.featureRevisitType}`)
webSocket = new WebSocket(`ws://${window._serverHost}/recal/schedule/rebuildFeatureLib${queryForm.featureRevisitType}`)
webSocket.onopen = queryData
......
......@@ -191,7 +191,7 @@ export default {
}
resultList.value = []
webSocket = new WebSocket(`${window._socketUrl}/recal/schedule/revisitFeature${queryForm.featureRevisitType}`)
webSocket = new WebSocket(`ws://${window._serverHost}/recal/schedule/revisitFeature${queryForm.featureRevisitType}`)
webSocket.onopen = queryData
......
......@@ -73,37 +73,6 @@
<span style="padding: 0 5px">抓拍图片对比</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/MinutePassenger'">
<div class="flex-vertical-center">
<img :src="require('./Icons/7.svg')" style="height: auto;width:20px"/>
<span style="padding: 0 5px">分钟客流数据</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/SystemLog'">
<div class="flex-vertical-center">
<img :src="require('./Icons/7.svg')" style="height: auto;width:20px"/>
<span style="padding: 0 5px">系统日志</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/DataReplay'">
<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-item :key="'/Main/equipmentDataRetransmission'">
<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-item :key="'/Main/Featurematching'">
<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>
</el-aside>
<el-main>
......
......@@ -188,7 +188,7 @@ export default {
}
resultList.value = []
webSocket = new WebSocket(`${window._socketUrl}/recal/schedule/rematchPerson${queryForm.featureRevisitType}`)
webSocket = new WebSocket(`ws://${window._serverHost}/recal/schedule/rematchPerson${queryForm.featureRevisitType}`)
webSocket.onopen = queryData
......
......@@ -2,14 +2,3 @@
height: 300px;
width: 100%;
}
.direction{
font-weight: 900;
background-color: red;
color: white;
}
.direction1{
background-color: green;
}
.direction0{
background-color: orange;
}
<template>
<div class="containter">
<a-form :model="queryForm" layout="inline" :label-col="{ style: { width: '70px' } }">
<a-form-item label="集团:" style="padding: 5px 0">
<a-select v-model:value="queryForm.account_id"
......@@ -81,7 +80,6 @@
style="width: 280px">
<a-select-option :value="1">店员</a-select-option>
<a-select-option :value="0">顾客</a-select-option>
<a-select-option :value="-99">未知</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="选择日期:" style="padding: 5px 0">
......@@ -97,54 +95,34 @@
<a-input v-model:value="queryForm.maxPic" style="width: 129px"/>
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button>
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="comparativeFun">特征对比</a-button>
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="singleComparativeFun">单张特征对比</a-button>
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clerkComparativeFun">店员特征对比</a-button>
<a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button>
</a-form-item>
</a-form>
<div v-loading="isLoading">
<div class="resultContent" :style="{'height':contentHeight+'px'}">
<template v-for="person in dataList">
<div style="margin: 10px 0;border: solid 1px black" :class="person.checked?'checked':''">
<el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox>
<div v-for="person in dataList" style="margin: 10px 0;border: solid 1px black">
人id:{{ ' ' + person.person_unid }}
图片数量:{{ person.perrsonList.length }}
<el-row v-for="row in getPagedList(person.perrsonList, 8)">
<el-col :span="3" v-for="item in row">
<div style="margin: 0 5px" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''">
<div style="">
<span @click="downloadTrajectoryFile(item.track_url)"
class="downBtn">
轨迹
</span>
<div style="margin: 0 5px">
<div style="display:flex; justify-content: flex-end ">
<span @click="downloadFile(item.features_url)"
class="downBtn downBtn1">
特征
style="color: #409EFF;font-size: 15px;cursor: pointer;">
下载特征值文件
</span>
</div>
<el-image :src="item.picture_url"
:fit="'fill'"
class="single-image" >
class="single-image">
</el-image>
<div>时间:{{ item.counttime }}</div>
<div>人员类型:{{ item.person_type==1?'店员':(item.person_type==0?'顾客':'未知') }}</div>
<div>性别:{{ formatGender(item.gender) }}</div>
<div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
</div>
</el-col>
</el-row>
</div>
</template>
</div>
<a-pagination
v-model:current="pageNum"
v-model:pageSize="pageSize"
......@@ -158,11 +136,6 @@
style="text-align:center"
/>
</div>
</div>
<!-- <imgDialog ref='imgModelRef'></imgDialog> -->
<DetailDialog ref="DetailDialogRef" />
<DetailDialogComparison ref="DetailDialogComparisonRef" />
<singleImgComparisonDialog ref="singleImgComparisonRef"></singleImgComparisonDialog>
</template>
<script>
......@@ -171,41 +144,27 @@ import clusterResultApi from '@/views/SnapshotCluster/ClusterResult/ClusterResul
import {isArray} from '@/PublicUtil/Judgment'
import moment from 'moment'
import {filterEmptyValueInObject, formatDate, formatTime, getPagedList} from '@/PublicUtil/PublicUtil'
// import imgDialog from '../imgDialog.vue'
import {ElMessage} from 'element-plus'
import DetailDialog from "../../ComparisonCapturedPictures/DetailDialog.vue";
import DetailDialogComparison from "../../ComparisonCapturedPictures/DetailDialogComparisonNew.vue";
import singleImgComparisonDialog from "../singleImgComparisonDialog.vue";
export default {
components:{
// imgDialog
DetailDialog,
DetailDialogComparison,
singleImgComparisonDialog
},
setup() {
// scalar
const pageNum = ref(1)
const pageSize = ref(10)
const total = ref()
const isLoading = ref(false)
const currobj = ref({})
const currentItemId = ref()
// sequence
const dataList = ref([])
const accountList = ref([])
const plazaList = ref([])
const zoneList = ref([])
const gateList = ref([])
// const imgModelRef = ref();
const pagedTableDataList = computed(
() => {
return getPagedList(dataList.value, 8)
}
)
const DetailDialogRef = ref();
const DetailDialogComparisonRef = ref();
const singleImgComparisonRef = ref()
const queryForm = reactive(
{
account_id: [],
......@@ -223,20 +182,6 @@ export default {
maxPic: 100,
}
)
const searchCondition = ref({})
if(window.localStorage.getItem('searchCondition')){
searchCondition.value = JSON.parse(window.localStorage.getItem('searchCondition'));
queryForm.type = searchCondition.value.type;
queryForm.zone_id = searchCondition.value.zone_id;
queryForm.gate_id = searchCondition.value.gate_id;
queryForm.direction = searchCondition.value.direction;
queryForm.picType = searchCondition.value.picType;
queryForm.date = searchCondition.value.date;
queryForm.startTime = searchCondition.value.startTime;
queryForm.endTime = searchCondition.value.endTime;
queryForm.minPic = searchCondition.value.minPic||0;
queryForm.maxPic = searchCondition.value.maxPic||100;
}
// function
const onPageNumChange = function(num) {
pageNum.value = num
......@@ -250,9 +195,9 @@ export default {
}
const onAccountChange = function() {
getPlazaList(1)
// getZoneList()
// getGateList()
getPlazaList()
getZoneList()
getGateList()
}
const onPlazaChange = function() {
......@@ -264,7 +209,7 @@ export default {
getGateList()
}
const getPlazaList = function(val) {
const getPlazaList = function() {
queryForm.plaza_id = []
plazaList.value = []
clusterResultApi.getPlazaList(
......@@ -284,22 +229,13 @@ export default {
}
)
}
if(plazaList.value.length>0){
if(!val&&searchCondition.value.plaza_id && searchCondition.value.plaza_id.length>0){
queryForm.plaza_id = searchCondition.value.plaza_id
}else{
queryForm.plaza_id.push(plazaList.value[0].value)
}
getZoneList(1)
getGateList(1)
confirmSearch()
}
}
}
)
}
const getZoneList = function(val) {
const getZoneList = function() {
queryForm.zone_id = []
zoneList.value = []
clusterResultApi.getZoneList(
{
......@@ -319,21 +255,13 @@ export default {
}
)
}
if(zoneList.value.length){
if(val&&searchCondition.value.zone_id && searchCondition.value.zone_id.length>0){
queryForm.zone_id = searchCondition.value.zone_id
}else{
queryForm.zone_id = []
}
}else{
queryForm.zone_id = []
}
}
}
)
}
const getGateList = function(val) {
const getGateList = function() {
queryForm.gate_id = []
gateList.value = []
clusterResultApi.getGateList(
{
......@@ -355,15 +283,6 @@ export default {
}
)
}
if(gateList.value.length){
if(val&&searchCondition.value.gate_id && searchCondition.value.gate_id.length>0){
queryForm.gate_id = searchCondition.value.gate_id
}else{
queryForm.gate_id = []
}
}else{
queryForm.gate_id = []
}
}
}
)
......@@ -385,22 +304,11 @@ export default {
}
)
}
if(accountList.value.length){
if(searchCondition.value.account_id && searchCondition.value.account_id.length>0){
queryForm.account_id = searchCondition.value.account_id
}else{
queryForm.account_id.push(accountList.value[0].value)
}
getPlazaList()
}
}
}
)
}
const clickSearch = function() {
pageNum.value = 1
confirmSearch()
}
const confirmSearch = function() {
isLoading.value = true
const rawData = toRaw(queryForm)
......@@ -422,30 +330,12 @@ export default {
pageSize: pageSize.value,
}
)
const storageData = filterEmptyValueInObject(
{
account_id: rawData.account_id,
type: rawData.type,
plaza_id: rawData.plaza_id,
zone_id: rawData.zone_id,
gate_id: rawData.gate_id,
direction: rawData.direction,
picType: rawData.picType,
personType: rawData.personType,
date: rawData.date,
minPic: rawData.minPic,
maxPic: rawData.maxPic,
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime),
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime),
}
)
window.localStorage.setItem('searchCondition',JSON.stringify(storageData))
clusterResultApi.getClusterResultList(data).then(
(r) => {
isLoading.value = false
sortDataList(r.data.persons)
r.data.persons.forEach((itemPerson)=>{
itemPerson.checked = false
itemPerson.perrsonList.forEach((item)=>{
if (item.features_url) {
item.features_url = window._baseImgUrl + item.features_url
......@@ -453,39 +343,14 @@ export default {
if (item.picture_url) {
item.picture_url = window._baseImgUrl + item.picture_url
}
if (item.track_url) {
item.track_url = window._baseImgUrl + item.track_url
}
})
})
dataList.value = r.data.persons
total.value = r.data.pageNum
document.getElementsByClassName('resultContent')[0].scrollTop = 0
}
)
}
const formatGender = function(number){
switch (number)
{
case 1:
{
return '男'
}
case -1:
{
return '未知'
}
case 0:
{
return '女'
}
default:
{
break
}
}
}
const formatDirection = function(number) {
switch (number)
{
......@@ -519,131 +384,9 @@ export default {
const downloadFile = function(url) {
window.open(url)
}
const downloadTrajectoryFile = function(url){
window.open(url)
}
const handleClick = function(data){
currentItemId.value = data.id
currobj.value = data;
// clusterResultApi.getBodyPoint({'feature_url':feature}).then(
// (r) => {
// imgModelRef.value.initDialog(url,r.data);
// }
// )
}
const checkChange = function(data){
console.log(data)
}
// 特征对比
const comparativeFun = function(){
const rawData = toRaw(queryForm)
if(!currobj.value.id){
ElMessage(
{
message: `请选择图片`,
type: 'warning'
}
)
return
}
if(!currobj.value.picture_url){
ElMessage(
{
message: `该图片没有特征,请选择有效的图片`,
type: 'warning'
}
)
return
}
let parmas = {
mall_id:currobj.value.mall_id,
picType:rawData.picType,
pic_id:currobj.value.id,
countdate:formatDate(rawData.date),
dataList:[]
}
dataList.value.forEach(item=>{
if (item.checked && item.checked == true) {
parmas.dataList.push(item)
}
})
if(parmas.dataList && parmas.dataList.length > 0){
DetailDialogComparisonRef.value.initDialog(currobj.value,parmas);
}else{
ElMessage(
{
message: `请选择聚类图片`,
type: 'warning'
}
)
return
}
}
//单张特征对比
const singleComparativeFun = function(){
if(!currobj.value.id){
ElMessage(
{
message: `请选择图片`,
type: 'warning'
}
)
return
}
if(!currobj.value.picture_url){
ElMessage(
{
message: `该图片没有特征,请选择有效的图片`,
type: 'warning'
}
)
return
}
const rawData = toRaw(queryForm)
let parmas = {
person_unid:currobj.value.person_unid,
pic_type:rawData.picType,
countdate:formatDate(rawData.date),
pic_id:currobj.value.id,
ip:window._baseImgUrl,
plaza_id:currobj.value.mall_id
}
singleImgComparisonRef.value.initDialog(parmas);
}
// 店员特征对比
const clerkComparativeFun = function(){
const rawData = toRaw(queryForm)
if(!currobj.value.id){
ElMessage(
{
message: `请选择图片进行对比`,
type: 'warning'
}
)
return
}
if(!currobj.value.picture_url){
ElMessage(
{
message: `该图片没有特征,请选择有效的图片`,
type: 'warning'
}
)
return
}
let parmas = {
plaza_id:currobj.value.mall_id,
pic_type:rawData.picType,
pic_id:currobj.value.id,
ip:window._baseImgUrl,
countdate:formatDate(rawData.date)
}
DetailDialogRef.value.initDialog(currobj.value,parmas);
}
const contentHeight = ref(0)
const __main = function() {
getAccountList()
contentHeight.value = window.innerHeight - 310
}
__main()
......@@ -654,8 +397,6 @@ export default {
pageNum,
pageSize,
total,
currentItemId,
currobj,
// sequence
accountList,
plazaList,
......@@ -663,7 +404,6 @@ export default {
gateList,
pagedTableDataList,
dataList,
contentHeight,
// mapping
queryForm,
// function
......@@ -676,19 +416,6 @@ export default {
formatDirection,
downloadFile,
getPagedList,
handleClick,
comparativeFun,
checkChange,
clerkComparativeFun,
singleComparativeFun,
formatGender,
downloadTrajectoryFile,
clickSearch,
// ref
// imgModelRef,
DetailDialogRef,
DetailDialogComparisonRef,
singleImgComparisonRef
}
}
}
......@@ -696,28 +423,5 @@ export default {
<style lang="less" scoped>
@import "./ClusterResult";
.actived{
border: 3px solid #1890ff;
}
.checkBox{
margin-left: 10px;
}
.checked{
background-color: #bbb;
}
.resultContent{
overflow: auto;
min-height: 500px;
}
.downBtn{
color: #409EFF;
font-size: 15px;
cursor: pointer;
display: inline-block;
width: auto;
}
.downBtn1{
float: right;
}
</style>
......@@ -69,17 +69,6 @@ class ClusterResultApi {
)
}
getBodyPoint(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/feature/bodyPoint`,
params: filterEmptyValueInObject(
data
)
}
)
}
}
const clusterResultApi = new ClusterResultApi()
......
......@@ -7,10 +7,10 @@
聚类结果
</a-menu-item>
</a-menu>
<div v-if="currentMenu[0] === '抓拍记录'">
<div v-show="currentMenu[0] === '抓拍记录'">
<SnapshotRecord></SnapshotRecord>
</div>
<div v-if="currentMenu[0] === '聚类结果'">
<div v-show="currentMenu[0] === '聚类结果'">
<ClusterResult></ClusterResult>
</div>
</template>
......
......@@ -2,14 +2,3 @@
height: 300px;
width: 100%;
}
.direction{
font-weight: 900;
background-color: red;
color: white;
}
.direction1{
background-color: green;
}
.direction0{
background-color: orange;
}
......@@ -79,7 +79,6 @@
style="width: 280px">
<a-select-option :value="1">店员</a-select-option>
<a-select-option :value="0">顾客</a-select-option>
<a-select-option :value="-99">未知</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="选择日期:" style="padding: 5px 0">
......@@ -90,26 +89,18 @@
<a-time-picker v-model:value="queryForm.endTime" style="width: 140px"/>
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="clickSearch" :loading="isLoading">查询</a-button>
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="comparativeFun">特征对比验证</a-button>
<a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button>
</a-form-item>
</a-form>
<div v-loading="isLoading">
<div class="resultContent" :style="{'height':contentHeight+'px'}">
<el-row v-for="row in pagedTableDataList">
<el-col :span="3" v-for="item in row">
<div style="margin: 0 5px;cursor: pointer;" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''">
<div style="">
<span @click="downloadTrajectoryFile(item.track_url)"
class="downBtn">
轨迹
</span>
<div style="margin: 0 5px">
<div style="display:flex; justify-content: flex-end ">
<span @click="downloadFile(item.features_url)"
class="downBtn downBtn1">
特征
style="color: #409EFF;font-size: 15px;cursor: pointer;">
下载特征值文件
</span>
</div>
<el-image :src="item.picture_url"
......@@ -117,14 +108,12 @@
class="single-image">
</el-image>
<div>时间:{{ item.counttime }}</div>
<div>人员类型:{{ item.person_type==1?'店员':(item.person_type==0?'顾客':'未知')}}</div>
<div>性别:{{ formatGender(item.gender) }}</div>
<div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div>
<div>方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
</div>
</el-col>
</el-row>
</div>
<a-pagination
v-model:current="pageNum"
v-model:pageSize="pageSize"
......@@ -138,8 +127,6 @@
style="text-align:center"
/>
</div>
<!-- <imgDialog ref='imgModelRef'></imgDialog> -->
<DetailDialog ref="DetailDialogRef" />
</template>
<script>
......@@ -148,14 +135,8 @@ import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRe
import {isArray} from '@/PublicUtil/Judgment'
import moment from 'moment'
import {filterEmptyValueInObject, formatDate, formatTime, getPagedList} from '@/PublicUtil/PublicUtil'
// import imgDialog from '../imgDialog.vue'
import {ElMessage} from 'element-plus'
import DetailDialog from "../../ComparisonCapturedPictures/DetailDialog.vue";
export default {
components:{
// imgDialog ,
DetailDialog
},
setup() {
// scalar
const pageNum = ref(1)
......@@ -168,11 +149,7 @@ export default {
const plazaList = ref([])
const zoneList = ref([])
const gateList = ref([])
const imgModelRef = ref();
const currentItemId = ref()
const currobj = ref({})
// ref
const DetailDialogRef = ref();
const pagedTableDataList = computed(
() => {
return getPagedList(dataList.value, 8)
......@@ -194,18 +171,6 @@ export default {
endTime: moment('23:59:59', 'HH:mm:ss'),
}
)
const searchCondition = ref({})
if(window.localStorage.getItem('searchCondition')){
searchCondition.value = JSON.parse(window.localStorage.getItem('searchCondition'));
queryForm.type = searchCondition.value.type;
queryForm.zone_id = searchCondition.value.zone_id;
queryForm.gate_id = searchCondition.value.gate_id;
queryForm.direction = searchCondition.value.direction;
queryForm.picType = searchCondition.value.picType;
queryForm.date = searchCondition.value.date;
queryForm.startTime = searchCondition.value.startTime;
queryForm.endTime = searchCondition.value.endTime;
}
// function
const onPageNumChange = function(num) {
pageNum.value = num
......@@ -219,9 +184,9 @@ export default {
}
const onAccountChange = function() {
getPlazaList(1)
// getZoneList()
// getGateList()
getPlazaList()
getZoneList()
getGateList()
}
const onPlazaChange = function() {
......@@ -233,7 +198,7 @@ export default {
getGateList()
}
const getPlazaList = function(val) {
const getPlazaList = function() {
queryForm.plaza_id = []
plazaList.value = []
snapshotRecordApi.getPlazaList(
......@@ -242,8 +207,10 @@ export default {
}
).then(
(r) => {
if (isArray(r)){
for (const item of r){
if (isArray(r))
{
for (const item of r)
{
plazaList.value.push(
{
value: item.id,
......@@ -251,22 +218,12 @@ export default {
}
)
}
if(plazaList.value.length){
if(!val&&searchCondition.value.plaza_id && searchCondition.value.plaza_id.length>0){
queryForm.plaza_id = searchCondition.value.plaza_id
}else{
queryForm.plaza_id.push(plazaList.value[0].value)
}
getZoneList(1)
getGateList(1)
confirmSearch()
}
}
}
)
}
const getZoneList = function(val) {
const getZoneList = function() {
queryForm.zone_id = []
zoneList.value = []
snapshotRecordApi.getZoneList(
......@@ -287,21 +244,13 @@ export default {
}
)
}
if(zoneList.value.length){
if(val&&searchCondition.value.zone_id && searchCondition.value.zone_id.length>0){
queryForm.zone_id = searchCondition.value.zone_id
}else{
queryForm.zone_id = []
}
}else{
queryForm.zone_id = []
}
}
}
)
}
const getGateList = function(val) {
const getGateList = function() {
queryForm.gate_id = []
gateList.value = []
snapshotRecordApi.getGateList(
{
......@@ -323,15 +272,6 @@ export default {
}
)
}
if(gateList.value.length){
if(val&&searchCondition.value.gate_id && searchCondition.value.gate_id.length>0){
queryForm.gate_id = searchCondition.value.gate_id
}else{
queryForm.gate_id = []
}
}else{
queryForm.gate_id = []
}
}
}
)
......@@ -353,14 +293,6 @@ export default {
}
)
}
if(accountList.value.length){
if(searchCondition.value.account_id && searchCondition.value.account_id.length>0){
queryForm.account_id = searchCondition.value.account_id
}else{
queryForm.account_id.push(accountList.value[0].value)
}
getPlazaList()
}
}
}
)
......@@ -379,28 +311,14 @@ export default {
direction: rawData.direction.toString(),
picType: rawData.picType,
personType: rawData.personType.toString(),
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime),
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime),
page: pageNum.value - 1,
pageSize: pageSize.value,
}
)
const storageData = filterEmptyValueInObject(
{
account_id: rawData.account_id,
type: rawData.type,
plaza_id: rawData.plaza_id,
zone_id: rawData.zone_id,
gate_id: rawData.gate_id,
direction: rawData.direction,
picType: rawData.picType,
personType: rawData.personType,
date: rawData.date,
startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime),
endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime),
}
)
window.localStorage.setItem('searchCondition',JSON.stringify(storageData))
snapshotRecordApi.getSnapshotRecordList(data).then(
(r) => {
isLoading.value = false
......@@ -411,38 +329,13 @@ export default {
if (item.picture_url) {
item.picture_url = window._baseImgUrl + item.picture_url
}
if (item.track_url) {
item.track_url = window._baseImgUrl + item.track_url
}
})
dataList.value = r.data.persons
total.value = r.data.pageNum
document.getElementsByClassName('resultContent')[0].scrollTop = 0
}
)
}
const formatGender = function(number){
switch (number)
{
case 1:
{
return '男'
}
case -1:
{
return '未知'
}
case 0:
{
return '女'
}
default:
{
break
}
}
}
const formatDirection = function(number) {
switch (number)
{
......@@ -468,46 +361,9 @@ export default {
const downloadFile = function(url) {
window.open(url)
}
const downloadTrajectoryFile = function(url){
window.open(url)
}
const handleClick = function(data){
currentItemId.value = data.id
currobj.value = data;
}
const comparativeFun = function(){
if(currobj.value=={}) {
ElMessage({
message: `请选择图片进行对比验证`,
type: 'warning'
});
return false
}
if(!currobj.value.picture_url){
ElMessage({
message: `该图片没有特征,请选择有效的图片`,
type: 'warning'
})
return
}
const rawData = toRaw(queryForm)
let parmas = {
plaza_id:currobj.value.mall_id,
pic_type:rawData.picType,
pic_id:currobj.value.id,
ip:window._baseImgUrl,
countdate:formatDate(rawData.date)
}
DetailDialogRef.value.initDialog(currobj.value,parmas);
}
const clickSearch = function() {
pageNum.value = 1
confirmSearch()
}
const contentHeight = ref(0)
const __main = function() {
getAccountList()
contentHeight.value = window.innerHeight - 310
}
__main()
......@@ -518,15 +374,12 @@ export default {
pageNum,
pageSize,
total,
currobj,
// sequence
accountList,
plazaList,
zoneList,
gateList,
pagedTableDataList,
currentItemId,
contentHeight,
// mapping
queryForm,
// function
......@@ -538,14 +391,6 @@ export default {
confirmSearch,
formatDirection,
downloadFile,
downloadTrajectoryFile,
handleClick,
comparativeFun,
formatGender,
clickSearch,
// ref
DetailDialogRef,
imgModelRef
}
}
}
......@@ -553,22 +398,5 @@ export default {
<style lang="less" scoped>
@import "./SnapshotRecord";
.actived{
border: 3px solid #1890ff;
}
.resultContent{
overflow: auto;
min-height: 500px;
}
.downBtn{
color: #409EFF;
font-size: 15px;
cursor: pointer;
display: inline-block;
width: auto;
}
.downBtn1{
float: right;
}
</style>
......@@ -57,9 +57,9 @@ module.exports = {
// 这里写你调用接口的基础路径,来解决跨域,如果设置了代理,那你本地开发环境的axios的baseUrl要写为 '' ,即空字符串
devServer: {
proxy: {
'/': {
target: 'http://36.112.68.214:33333/btool/',
changeOrigin: true
'/malls': {
target: 'https://store.keliuyun.com/report/malls',
// changeOrigin: true
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!