Commit fb4b79bb by 李乾广

Merge branch 'mall_master' of http://git.keliuyun.com:55676/luoxinlin/vion-tools into mall_master

# Conflicts:
#	src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
2 parents c5dca8e5 34a0f2c8
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
style="width: 240px"> style="width: 240px">
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="年龄类型:" style="padding: 5px 0"> <!--<a-form-item label="年龄类型:" style="padding: 5px 0">
<a-select v-model:value="queryForm.childAdult" <a-select v-model:value="queryForm.childAdult"
mode="multiple" mode="multiple"
:maxTagCount="1" :maxTagCount="1"
...@@ -90,6 +90,21 @@ ...@@ -90,6 +90,21 @@
<a-select-option :value="0">儿童</a-select-option> <a-select-option :value="0">儿童</a-select-option>
<a-select-option :value="-1">未知</a-select-option> <a-select-option :value="-1">未知</a-select-option>
</a-select> </a-select>
</a-form-item>-->
<a-form-item label="年龄类型:" style="padding: 5px 0">
<a-select v-model:value="queryForm.childAdult"
mode="multiple"
:maxTagCount="1"
style="width: 240px">
<a-select-option
v-for="item in childAdultOptions"
:key="item.value"
:value="item.value"
>{{item.label}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="人ID:" style="padding: 5px 0">
<a-input v-model:value="queryForm.personUnid" style="width: 240px"/>
</a-form-item> </a-form-item>
<a-form-item label="选择日期:" style="padding: 5px 0"> <a-form-item label="选择日期:" style="padding: 5px 0">
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" :allowClear="false" style="width: 240px"/> <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" :allowClear="false" style="width: 240px"/>
...@@ -193,7 +208,7 @@ ...@@ -193,7 +208,7 @@
class="single-image"> class="single-image">
</el-image> </el-image>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>人员类型:{{ personTypeStr(item.person_type)}}({{ item.childAdult==1?'成人':(item.childAdult==0?'儿童':'未知') }})</div> <div>人员类型:{{ personTypeStr(item.person_type)}}({{ formatChildAdult(item.childAdult) }})</div>
<div>性别:{{ formatGender(item.gender) }}({{item.age}})</div> <div>性别:{{ formatGender(item.gender) }}({{item.age}})</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>
...@@ -513,7 +528,10 @@ export default { ...@@ -513,7 +528,10 @@ export default {
maxPic: rawData.maxPic, maxPic: rawData.maxPic,
page: pageNum.value - 1, page: pageNum.value - 1,
pageSize: pageSize.value, pageSize: pageSize.value,
childAdult: rawData.childAdult?rawData.childAdult.toString():'', // childAdult: rawData.childAdult?rawData.childAdult.toString():'',
// 查询条件
age: rawData.childAdult?rawData.childAdult.toString():'',
personUnid: rawData.personUnid,
} }
) )
const storageData = filterEmptyValueInObject( const storageData = filterEmptyValueInObject(
...@@ -571,6 +589,20 @@ export default { ...@@ -571,6 +589,20 @@ export default {
const personTypeStr = function(val){ const personTypeStr = function(val){
return (personTypeList.value.filter(v => v.value == val)[0] || {label:'--'}).label return (personTypeList.value.filter(v => v.value == val)[0] || {label:'--'}).label
} }
const childAdultOptions = ref([
{ value: 0, label: '婴儿' },
{ value: 1, label: '儿童' },
{ value: 2, label: '少年' },
{ value: 3, label: '青年' },
{ value: 4, label: '中午' },
{ value: 5, label: '老年' },
{ value: -1, label: '未知' },
])
const formatChildAdult = function(val) {
const targetitem = childAdultOptions.value.find(item => item.value === val)
if (targetitem) return targetitem.label
else return '未知'
}
const formatGender = function(number){ const formatGender = function(number){
switch (number) switch (number)
{ {
...@@ -683,7 +715,7 @@ export default { ...@@ -683,7 +715,7 @@ export default {
return return
} }
} }
// 上传数据 // 上传数据
const uploadGroupDataEditorRef = ref(); const uploadGroupDataEditorRef = ref();
const uploadGroupData = function(data) { const uploadGroupData = function(data) {
...@@ -1109,6 +1141,8 @@ export default { ...@@ -1109,6 +1141,8 @@ export default {
mutipleOperationText, mutipleOperationText,
deleteRealPersonRecord, deleteRealPersonRecord,
addShopkeeper, addShopkeeper,
childAdultOptions,
formatChildAdult
} }
} }
} }
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
style="width: 240px"> style="width: 240px">
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="年龄类型:" style="padding: 5px 0"> <!--<a-form-item label="年龄类型:" style="padding: 5px 0">
<a-select v-model:value="queryForm.childAdult" <a-select v-model:value="queryForm.childAdult"
mode="multiple" mode="multiple"
:maxTagCount="1" :maxTagCount="1"
...@@ -88,6 +88,18 @@ ...@@ -88,6 +88,18 @@
<a-select-option :value="0">儿童</a-select-option> <a-select-option :value="0">儿童</a-select-option>
<a-select-option :value="-1">未知</a-select-option> <a-select-option :value="-1">未知</a-select-option>
</a-select> </a-select>
</a-form-item>-->
<a-form-item label="年龄类型:" style="padding: 5px 0">
<a-select v-model:value="queryForm.childAdult"
mode="multiple"
:maxTagCount="1"
style="width: 240px">
<a-select-option
v-for="item in childAdultOptions"
:key="item.value"
:value="item.value"
>{{item.label}}</a-select-option>
</a-select>
</a-form-item> </a-form-item>
<a-form-item label="选择日期:" style="padding: 5px 0"> <a-form-item label="选择日期:" style="padding: 5px 0">
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" :allowClear="false" style="width: 280px"/> <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" :allowClear="false" style="width: 280px"/>
...@@ -144,7 +156,7 @@ ...@@ -144,7 +156,7 @@
> >
</el-image> </el-image>
<div>时间:{{ item.counttime }}</div> <div>时间:{{ item.counttime }}</div>
<div>人员类型:{{ personTypeStr(item.person_type)}}({{ item.childAdult==1?'成人':(item.childAdult==0?'儿童':'未知') }})</div> <div>人员类型:{{ personTypeStr(item.person_type)}}({{ formatChildAdult(item.childAdult) }})</div>
<div> <div>
<span>性别:{{ formatGender(item.gender) }}({{item.age}})</span> <span>性别:{{ formatGender(item.gender) }}({{item.age}})</span>
<a-popover v-if="item.personLabel" trigger="click"> <a-popover v-if="item.personLabel" trigger="click">
...@@ -479,7 +491,8 @@ export default { ...@@ -479,7 +491,8 @@ export default {
endTime: formatDate(rawData.date) + ' ' + rawData.endTime, endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
page: pageNum.value - 1, page: pageNum.value - 1,
pageSize: pageSize.value, pageSize: pageSize.value,
childAdult: rawData.childAdult?rawData.childAdult.toString():'', // childAdult: rawData.childAdult?rawData.childAdult.toString():'',
age: rawData.childAdult?rawData.childAdult.toString():'',
} }
) )
const storageData = filterEmptyValueInObject( const storageData = filterEmptyValueInObject(
...@@ -528,6 +541,20 @@ export default { ...@@ -528,6 +541,20 @@ export default {
const personTypeStr = function(val){ const personTypeStr = function(val){
return (personTypeList.value.filter(v => v.value == val)[0] || {label:'--'}).label return (personTypeList.value.filter(v => v.value == val)[0] || {label:'--'}).label
} }
const childAdultOptions = ref([
{ value: 0, label: '婴儿' },
{ value: 1, label: '儿童' },
{ value: 2, label: '少年' },
{ value: 3, label: '青年' },
{ value: 4, label: '中午' },
{ value: 5, label: '老年' },
{ value: -1, label: '未知' },
])
const formatChildAdult = function(val) {
const targetitem = childAdultOptions.value.find(item => item.value === val)
if (targetitem) return targetitem.label
else return '未知'
}
const formatGender = function(number){ const formatGender = function(number){
switch (number) switch (number)
{ {
...@@ -580,7 +607,7 @@ export default { ...@@ -580,7 +607,7 @@ export default {
} }
} }
} }
//标签 //标签
const jacketTypeStr = function(number){ const jacketTypeStr = function(number){
switch (number) switch (number)
...@@ -635,7 +662,7 @@ export default { ...@@ -635,7 +662,7 @@ export default {
} }
default: default:
{ {
break break
} }
} }
...@@ -689,7 +716,7 @@ export default { ...@@ -689,7 +716,7 @@ export default {
} }
default: default:
{ {
break break
} }
} }
...@@ -819,7 +846,7 @@ export default { ...@@ -819,7 +846,7 @@ export default {
} }
} }
} }
const downloadFile = function(url) { const downloadFile = function(url) {
window.open(url) window.open(url)
} }
...@@ -901,7 +928,7 @@ export default { ...@@ -901,7 +928,7 @@ export default {
} }
batchesResultDialogRef.value.initDialog(currobj.value,parmas); batchesResultDialogRef.value.initDialog(currobj.value,parmas);
} }
//单张特征对比 //单张特征对比
const singleImgComparisonRef = ref() const singleImgComparisonRef = ref()
const singleComparativeFun = function(){ const singleComparativeFun = function(){
...@@ -1000,7 +1027,10 @@ export default { ...@@ -1000,7 +1027,10 @@ export default {
suitTypeStr, suitTypeStr,
rucksackTypeStr, rucksackTypeStr,
handbagTypeStr, handbagTypeStr,
shoppingBagTypeStr shoppingBagTypeStr,
formatChildAdult,
childAdultOptions,
} }
} }
} }
......
...@@ -2,14 +2,25 @@ ...@@ -2,14 +2,25 @@
<div class="containter"> <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" style="width: 240px" mode="multiple" :maxTagCount="1" <a-select v-model:value="queryForm.account_id" style="width: 240px" :maxTagCount="1"
@change="onAccountChange" :options="accountList" optionFilterProp="label" show-search> @change="onAccountChange" :options="accountList" optionFilterProp="label" show-search>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="广场:" style="padding: 5px 0"> <a-form-item label="广场:" style="padding: 5px 0">
<a-select v-model:value="queryForm.plaza_id" style="width: 240px" :maxTagCount="1" :options="plazaList" optionFilterProp="label" show-search> <a-select v-model:value="queryForm.plaza_id" style="width: 240px" :maxTagCount="1" :options="plazaList" optionFilterProp="label" show-search @change="onPlazaChange">
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="店铺:" style="padding: 5px 0">
<a-select v-model:value="queryForm.zone_id"
style="width: 240px"
mode="multiple"
:maxTagCount="1"
:options="zoneList"
optionFilterProp="label"
show-search
>
</a-select>
</a-form-item>
<a-form-item label="选择日期:" style="padding: 5px 0"> <a-form-item label="选择日期:" style="padding: 5px 0">
<a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" :allowClear="false" style="width: 240px" /> <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" :allowClear="false" style="width: 240px" />
...@@ -92,6 +103,7 @@ ...@@ -92,6 +103,7 @@
getPagedList getPagedList
} from '@/PublicUtil/PublicUtil' } from '@/PublicUtil/PublicUtil'
import {ElMessage,ElMessageBox} from 'element-plus' import {ElMessage,ElMessageBox} from 'element-plus'
import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi';
export default { export default {
components: { components: {
}, },
...@@ -105,10 +117,11 @@ ...@@ -105,10 +117,11 @@
const dataList = ref([]) const dataList = ref([])
const accountList = ref([]) const accountList = ref([])
const plazaList = ref([]) const plazaList = ref([])
const zoneList = ref([])
const currobj = ref({}) const currobj = ref({})
const currentItem = ref({}) const currentItem = ref({})
const queryForm = reactive({ const queryForm = reactive({
account_id: [], account_id: '',
plaza_id: '', plaza_id: '',
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'), date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: '00:00:00', startTime: '00:00:00',
...@@ -139,11 +152,19 @@ ...@@ -139,11 +152,19 @@
const onAccountChange = function() { const onAccountChange = function() {
getPlazaList(1) getPlazaList(1)
} }
const onPlazaChange = function() {
queryForm.zone_id = []
zoneList.value = []
// 1 表示不从localStorage中读取数据
getZoneList(1)
}
const getPlazaList = function(val) { const getPlazaList = function(val) {
queryForm.plaza_id = '' queryForm.plaza_id = ''
queryForm.zone_id = []
plazaList.value = [] plazaList.value = []
zoneList.value = []
batchesResultApi.getPlazaList({ batchesResultApi.getPlazaList({
account_id: queryForm.account_id.toString() account_id: Array.isArray(queryForm.account_id) ? queryForm.account_id[0] : queryForm.account_id,
}).then( }).then(
(r) => { (r) => {
if (isArray(r)) { if (isArray(r)) {
...@@ -159,15 +180,52 @@ ...@@ -159,15 +180,52 @@
} else { } else {
queryForm.plaza_id = plazaList.value[0].value queryForm.plaza_id = plazaList.value[0].value
} }
confirmSearch() // 1 表示不从localStorage中读取数据,若则读取
getZoneList(val)
} }
} }
} }
) )
} }
const getZoneList = function(val) {
console.log('getZoneList', val, searchCondition.value)
// queryForm.zone_id = []
zoneList.value = []
snapshotRecordApi.getZoneList(
{
account_id: Array.isArray(queryForm.account_id) ? queryForm.account_id[0] : queryForm.account_id,
plaza_id: queryForm.plaza_id,
}
).then(
(r) => {
if (isArray(r))
{
for (const item of r)
{
zoneList.value.push(
{
value: item.id,
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 getAccountList = function() { const getAccountList = function() {
queryForm.account_id = [] queryForm.account_id = ''
accountList.value = [] accountList.value = []
batchesResultApi.getAccountList().then( batchesResultApi.getAccountList().then(
(r) => { (r) => {
...@@ -179,10 +237,10 @@ ...@@ -179,10 +237,10 @@
}) })
} }
if (accountList.value.length) { if (accountList.value.length) {
if (searchCondition.value.account_id && searchCondition.value.account_id.length > 0) { if (searchCondition.value.account_id) {
queryForm.account_id = searchCondition.value.account_id queryForm.account_id = searchCondition.value.account_id
} else { } else {
queryForm.account_id.push(accountList.value[0].value) queryForm.account_id = accountList.value[0].value
} }
getPlazaList() getPlazaList()
} }
...@@ -199,6 +257,7 @@ ...@@ -199,6 +257,7 @@
const rawData = toRaw(queryForm) const rawData = toRaw(queryForm)
const data = filterEmptyValueInObject({ const data = filterEmptyValueInObject({
mallId: rawData.plaza_id, mallId: rawData.plaza_id,
zoneId: rawData.zone_id.toString(),
countDate: formatDate(rawData.date), countDate: formatDate(rawData.date),
startTime: formatDate(rawData.date) + ' ' + rawData.startTime, startTime: formatDate(rawData.date) + ' ' + rawData.startTime,
endTime: formatDate(rawData.date) + ' ' + rawData.endTime, endTime: formatDate(rawData.date) + ' ' + rawData.endTime,
...@@ -210,6 +269,7 @@ ...@@ -210,6 +269,7 @@
const storageData = filterEmptyValueInObject({ const storageData = filterEmptyValueInObject({
account_id: rawData.account_id, account_id: rawData.account_id,
plaza_id: [rawData.plaza_id], plaza_id: [rawData.plaza_id],
zone_id: rawData.zone_id,
date: rawData.date, date: rawData.date,
minNum: rawData.minNum, minNum: rawData.minNum,
maxNum: rawData.maxNum, maxNum: rawData.maxNum,
...@@ -219,7 +279,7 @@ ...@@ -219,7 +279,7 @@
let searchCondition = JSON.parse(window.localStorage.getItem('searchCondition')); let searchCondition = JSON.parse(window.localStorage.getItem('searchCondition'));
let newSearchCondition = { let newSearchCondition = {
...searchCondition, ...searchCondition,
...storageData ...storageData,
} }
window.localStorage.setItem('searchCondition', JSON.stringify(newSearchCondition)) window.localStorage.setItem('searchCondition', JSON.stringify(newSearchCondition))
batchesResultApi.getBatchesResultList(data).then( batchesResultApi.getBatchesResultList(data).then(
...@@ -426,6 +486,8 @@ ...@@ -426,6 +486,8 @@
clickSearch, clickSearch,
concatBatches, concatBatches,
deleteBatches, deleteBatches,
onPlazaChange,
zoneList,
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!