Commit ee340c25 by 李君

优化

1 parent 4c6832e2
......@@ -8,20 +8,20 @@ let baseURL = ['localhost', '192.168.1.28'].includes(window.location.hostname)
const axiosInstance = axios.create(
{
baseURL: baseURL,
timeout:10000
// timeout:10000
}
)
// 请求拦截器
axiosInstance.interceptors.request.use(
config => {
Cookies.set('atoken','9b478c52-37e2-451e-8b71-5338f0b0f0e3')
// Cookies.set('atoken','c2f52c71-8736-47c7-9eaf-2a3f6a7cc631')
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
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')){
// url = 'http://36.112.68.214:33333/'
// }
......@@ -45,7 +45,7 @@ axiosInstance.interceptors.response.use(
type: 'warning'
})
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')){
// url = 'http://36.112.68.214:33333/'
// }
......
......@@ -113,35 +113,42 @@
<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>
人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>
<span @click="downloadFile(item.features_url)"
class="downBtn downBtn1">
特征
</span>
<div class="classBox" :class="person.expand?'expand':''">
<div :class="person.checked?'checked':''">
<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>
<el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox>
人id:{{ ' ' + person.person_unid }}
图片数量:{{ person.perrsonList.length }}
</div>
<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>
<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>
<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>
</el-col>
</el-row>
</el-col>
</el-row>
</div>
</div>
</template>
</div>
......@@ -446,6 +453,7 @@ export default {
sortDataList(r.data.persons)
r.data.persons.forEach((itemPerson)=>{
itemPerson.checked = false
itemPerson.expand = false
itemPerson.perrsonList.forEach((item)=>{
if (item.features_url) {
item.features_url = window._baseImgUrl + item.features_url
......@@ -534,6 +542,14 @@ export default {
const checkChange = function(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 rawData = toRaw(queryForm)
......@@ -679,6 +695,7 @@ export default {
handleClick,
comparativeFun,
checkChange,
expandChange,
clerkComparativeFun,
singleComparativeFun,
formatGender,
......@@ -702,6 +719,32 @@ export default {
.checkBox{
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{
background-color: #bbb;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!