Commit c710516d by 李君

优化

1 parent f7b0c2dc
...@@ -15,7 +15,7 @@ const axiosInstance = axios.create( ...@@ -15,7 +15,7 @@ const axiosInstance = axios.create(
axiosInstance.interceptors.request.use( axiosInstance.interceptors.request.use(
config => { config => {
// Cookies.set('atoken','90eeca8f-7d7e-4dfa-8d7b-468e033dd048') // Cookies.set('atoken','3f719c88-cfe6-42f6-b2c7-a6b355c46c10')
if(!Cookies.get('atoken')){ if(!Cookies.get('atoken')){
ElMessage({ ElMessage({
message: `登录过期,请重新登录`, message: `登录过期,请重新登录`,
......
<template> <template>
<div class="containter">
<a-form :model="queryForm" layout="inline" :label-col="{ style: { width: '70px' } }"> <a-form :model="queryForm" layout="inline" :label-col="{ style: { width: '70px' } }">
<a-form-item label="集团:" style="padding: 5px 0"> <a-form-item label="集团:" style="padding: 5px 0">
<a-select v-model:value="queryForm.account_id" <a-select v-model:value="queryForm.account_id"
...@@ -109,6 +110,7 @@ ...@@ -109,6 +110,7 @@
</a-form> </a-form>
<div v-loading="isLoading"> <div v-loading="isLoading">
<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 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> <el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox>
...@@ -129,6 +131,7 @@ ...@@ -129,6 +131,7 @@
</el-image> </el-image>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>人员类型:{{ item.person_type==1?'店员':'顾客' }}</div> <div>人员类型:{{ item.person_type==1?'店员':'顾客' }}</div>
<div>性别:{{ formatGender(item.gender) }}</div>
<div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div> <div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div> <div>地点:{{ item.gate_name }}</div>
</div> </div>
...@@ -136,6 +139,7 @@ ...@@ -136,6 +139,7 @@
</el-row> </el-row>
</div> </div>
</template> </template>
</div>
<a-pagination <a-pagination
v-model:current="pageNum" v-model:current="pageNum"
v-model:pageSize="pageSize" v-model:pageSize="pageSize"
...@@ -149,6 +153,7 @@ ...@@ -149,6 +153,7 @@
style="text-align:center" style="text-align:center"
/> />
</div> </div>
</div>
<!-- <imgDialog ref='imgModelRef'></imgDialog> --> <!-- <imgDialog ref='imgModelRef'></imgDialog> -->
<DetailDialog ref="DetailDialogRef" /> <DetailDialog ref="DetailDialogRef" />
<DetailDialogComparison ref="DetailDialogComparisonRef" /> <DetailDialogComparison ref="DetailDialogComparisonRef" />
...@@ -392,7 +397,28 @@ export default { ...@@ -392,7 +397,28 @@ export default {
} }
) )
} }
const formatGender = function(number){
switch (number)
{
case 1:
{
return '男'
}
case -1:
{
return '未知'
}
case 0:
{
return '女'
}
default:
{
break
}
}
}
const formatDirection = function(number) { const formatDirection = function(number) {
switch (number) switch (number)
{ {
...@@ -545,8 +571,10 @@ export default { ...@@ -545,8 +571,10 @@ export default {
} }
DetailDialogRef.value.initDialog(currobj.value,parmas); DetailDialogRef.value.initDialog(currobj.value,parmas);
} }
const contentHeight = ref(0)
const __main = function() { const __main = function() {
getAccountList() getAccountList()
contentHeight.value = window.innerHeight - 310
} }
__main() __main()
...@@ -566,6 +594,7 @@ export default { ...@@ -566,6 +594,7 @@ export default {
gateList, gateList,
pagedTableDataList, pagedTableDataList,
dataList, dataList,
contentHeight,
// mapping // mapping
queryForm, queryForm,
// function // function
...@@ -583,6 +612,7 @@ export default { ...@@ -583,6 +612,7 @@ export default {
checkChange, checkChange,
clerkComparativeFun, clerkComparativeFun,
singleComparativeFun, singleComparativeFun,
formatGender,
// ref // ref
// imgModelRef, // imgModelRef,
DetailDialogRef, DetailDialogRef,
...@@ -604,5 +634,9 @@ export default { ...@@ -604,5 +634,9 @@ export default {
.checked{ .checked{
background-color: #bbb; background-color: #bbb;
} }
.resultContent{
overflow: auto;
min-height: 500px;
}
</style> </style>
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
</a-form> </a-form>
<div v-loading="isLoading"> <div v-loading="isLoading">
<div class="resultContent" :style="{'height':contentHeight+'px'}">
<el-row v-for="row in pagedTableDataList"> <el-row v-for="row in pagedTableDataList">
<el-col :span="3" v-for="item in row"> <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="margin: 0 5px;cursor: pointer;" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''">
...@@ -112,12 +113,13 @@ ...@@ -112,12 +113,13 @@
</el-image> </el-image>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>人员类型:{{ item.person_type==1?'店员':'顾客' }}</div> <div>人员类型:{{ item.person_type==1?'店员':'顾客' }}</div>
<div>性别:{{ formatGender(item.gender) }}</div>
<div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div> <div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div> <div>地点:{{ item.gate_name }}</div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</div>
<a-pagination <a-pagination
v-model:current="pageNum" v-model:current="pageNum"
v-model:pageSize="pageSize" v-model:pageSize="pageSize"
...@@ -361,7 +363,28 @@ export default { ...@@ -361,7 +363,28 @@ export default {
} }
) )
} }
const formatGender = function(number){
switch (number)
{
case 1:
{
return '男'
}
case -1:
{
return '未知'
}
case 0:
{
return '女'
}
default:
{
break
}
}
}
const formatDirection = function(number) { const formatDirection = function(number) {
switch (number) switch (number)
{ {
...@@ -416,8 +439,10 @@ export default { ...@@ -416,8 +439,10 @@ export default {
} }
DetailDialogRef.value.initDialog(currobj.value,parmas); DetailDialogRef.value.initDialog(currobj.value,parmas);
} }
const contentHeight = ref(0)
const __main = function() { const __main = function() {
getAccountList() getAccountList()
contentHeight.value = window.innerHeight - 310
} }
__main() __main()
...@@ -436,6 +461,7 @@ export default { ...@@ -436,6 +461,7 @@ export default {
gateList, gateList,
pagedTableDataList, pagedTableDataList,
currentItemId, currentItemId,
contentHeight,
// mapping // mapping
queryForm, queryForm,
// function // function
...@@ -449,6 +475,7 @@ export default { ...@@ -449,6 +475,7 @@ export default {
downloadFile, downloadFile,
handleClick, handleClick,
comparativeFun, comparativeFun,
formatGender,
// ref // ref
DetailDialogRef, DetailDialogRef,
imgModelRef imgModelRef
...@@ -462,5 +489,9 @@ export default { ...@@ -462,5 +489,9 @@ export default {
.actived{ .actived{
border: 3px solid #1890ff; border: 3px solid #1890ff;
} }
.resultContent{
overflow: auto;
min-height: 500px;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!