Commit ee340c25 by 李君

优化

1 parent 4c6832e2
...@@ -8,20 +8,20 @@ let baseURL = ['localhost', '192.168.1.28'].includes(window.location.hostname) ...@@ -8,20 +8,20 @@ let baseURL = ['localhost', '192.168.1.28'].includes(window.location.hostname)
const axiosInstance = axios.create( const axiosInstance = axios.create(
{ {
baseURL: baseURL, baseURL: baseURL,
timeout:10000 // timeout:10000
} }
) )
// 请求拦截器 // 请求拦截器
axiosInstance.interceptors.request.use( axiosInstance.interceptors.request.use(
config => { config => {
Cookies.set('atoken','9b478c52-37e2-451e-8b71-5338f0b0f0e3') // Cookies.set('atoken','c2f52c71-8736-47c7-9eaf-2a3f6a7cc631')
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) ? 'http://36.112.68.214:33333/' : window.location.origin let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://store.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) ? 'http://36.112.68.214:33333/' : window.location.origin let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://store.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/'
// } // }
......
...@@ -113,35 +113,42 @@ ...@@ -113,35 +113,42 @@
<div v-loading="isLoading"> <div v-loading="isLoading">
<div class="resultContent" :style="{'height':contentHeight+'px'}"> <div class="resultContent" :style="{'height':contentHeight+'px'}">
<template v-for="person in dataList"> <template v-for="person in dataList">
<div style="margin: 10px 0;border: solid 1px black" :class="person.checked?'checked':''"> <div class="classBox" :class="person.expand?'expand':''">
<el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox> <div :class="person.checked?'checked':''">
人id:{{ ' ' + person.person_unid }} <div class="boxInfo">
图片数量:{{ person.perrsonList.length }} <span class="iconExpand" v-show="!person.expand"></span>
<el-row v-for="row in getPagedList(person.perrsonList, 8)"> <span class="iconExpand" v-show="person.expand"></span>
<el-col :span="3" v-for="item in row"> <span class="expandWord" @click='expandChange(person)'>{{person.expand?'收起':'展开'}}</span>
<div style="margin: 0 5px" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''"> <el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox>
<div style=""> 人id:{{ ' ' + person.person_unid }}
<span @click="downloadTrajectoryFile(item.track_url)" 图片数量:{{ person.perrsonList.length }}
class="downBtn"> </div>
轨迹 <el-row v-for="row in getPagedList(person.perrsonList, 8)">
</span> <el-col :span="3" v-for="item in row">
<span @click="downloadFile(item.features_url)" <div style="margin: 0 5px" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''">
class="downBtn downBtn1"> <div style="">
特征 <span @click="downloadTrajectoryFile(item.track_url)"
</span> class="downBtn">
轨迹
</span>
<span @click="downloadFile(item.features_url)"
class="downBtn downBtn1">
特征
</span>
</div>
<el-image :src="item.picture_url"
:fit="'fill'"
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>地点:{{ item.gate_name }}</div>
</div> </div>
<el-image :src="item.picture_url" </el-col>
:fit="'fill'" </el-row>
class="single-image" > </div>
</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>地点:{{ item.gate_name }}</div>
</div>
</el-col>
</el-row>
</div> </div>
</template> </template>
</div> </div>
...@@ -446,6 +453,7 @@ export default { ...@@ -446,6 +453,7 @@ export default {
sortDataList(r.data.persons) sortDataList(r.data.persons)
r.data.persons.forEach((itemPerson)=>{ r.data.persons.forEach((itemPerson)=>{
itemPerson.checked = false itemPerson.checked = false
itemPerson.expand = false
itemPerson.perrsonList.forEach((item)=>{ itemPerson.perrsonList.forEach((item)=>{
if (item.features_url) { if (item.features_url) {
item.features_url = window._baseImgUrl + item.features_url item.features_url = window._baseImgUrl + item.features_url
...@@ -534,6 +542,14 @@ export default { ...@@ -534,6 +542,14 @@ export default {
const checkChange = function(data){ const checkChange = function(data){
console.log(data) console.log(data)
} }
const expandChange = function(data){
console.log(data)
dataList.value.forEach(item=>{
if (data.person_unid == item.person_unid) {
item.expand = !item.expand
}
})
}
// 特征对比 // 特征对比
const comparativeFun = function(){ const comparativeFun = function(){
const rawData = toRaw(queryForm) const rawData = toRaw(queryForm)
...@@ -679,6 +695,7 @@ export default { ...@@ -679,6 +695,7 @@ export default {
handleClick, handleClick,
comparativeFun, comparativeFun,
checkChange, checkChange,
expandChange,
clerkComparativeFun, clerkComparativeFun,
singleComparativeFun, singleComparativeFun,
formatGender, formatGender,
...@@ -702,6 +719,32 @@ export default { ...@@ -702,6 +719,32 @@ export default {
.checkBox{ .checkBox{
margin-left: 10px; margin-left: 10px;
} }
.boxInfo{
line-height: 28px;
margin-bottom: 10px;
}
.classBox{
margin: 10px 0;
border: solid 1px black;
height: 485px;
overflow-y: hidden;
}
.expand{
height: auto;
overflow: auto;
}
.expandWord{
color: #1890ff;
margin-right: 5px;
cursor: pointer;
float: right;
}
.iconExpand{
cursor: pointer;
float: right;
color: #1890ff;
margin-right: 20px;
}
.checked{ .checked{
background-color: #bbb; background-color: #bbb;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!