Commit 7b864f34 by 李乾广

增加商品类型,修改列表排序

1 parent 3115559d
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
<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>
<div>商品类型:{{ formatProduct(item.productId)}}</div> <div style="width:100%;overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">商品类型:{{ formatProduct(item.productId)}}</div>
</div> </div>
</el-col> </el-col>
...@@ -695,12 +695,21 @@ export default { ...@@ -695,12 +695,21 @@ export default {
return (productList.value.filter(v => v.value == val)[0] || {label:'--'}).label return (productList.value.filter(v => v.value == val)[0] || {label:'--'}).label
} }
const sortDataList = function(list) { const sortDataList = function(list) {
if(queryForm.sortType==1) {
list.sort(
(a, b) => {
return (a.perrsonList[0].counttime - b.perrsonList[0].counttime)
}
)
} else {
list.sort( list.sort(
(a, b) => { (a, b) => {
return (b.perrsonList.length - a.perrsonList.length) return (b.perrsonList.length - a.perrsonList.length)
} }
) )
} }
}
const reqPersonType = (val) => { const reqPersonType = (val) => {
personTypeList.value = [] personTypeList.value = []
clusterResultApi.getPersonType({plaza_id:queryForm.plaza_id}).then( clusterResultApi.getPersonType({plaza_id:queryForm.plaza_id}).then(
...@@ -875,7 +884,7 @@ export default { ...@@ -875,7 +884,7 @@ export default {
const rawData = toRaw(queryForm) const rawData = toRaw(queryForm)
const params = { const params = {
unids: strIdList, unids: strIdList,
mallId:currobj.value.mall_id, mallId:selectedPersonList.value[0].mall_id,
countdate:formatDate(rawData.date) + ' 00:00:00', countdate:formatDate(rawData.date) + ' 00:00:00',
} }
clusterResultApi.addDataToShopkeeper(params).then( clusterResultApi.addDataToShopkeeper(params).then(
......
...@@ -71,6 +71,15 @@ ...@@ -71,6 +71,15 @@
<a-select-option :value="2">全身照</a-select-option> <a-select-option :value="2">全身照</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="商品类型:" style="padding: 5px 0">
<a-select v-model:value="queryForm.productId"
mode="multiple"
:options="productList"
optionFilterProp="label"
:maxTagCount="1"
style="width: 240px">
</a-select>
</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.personType" <a-select v-model:value="queryForm.personType"
mode="multiple" mode="multiple"
...@@ -183,6 +192,7 @@ ...@@ -183,6 +192,7 @@
</div> </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 style="width:100%;overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;">商品类型:{{ formatProduct(item.productId)}}</div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -233,6 +243,7 @@ export default { ...@@ -233,6 +243,7 @@ export default {
// sequence // sequence
const dataList = ref([]) const dataList = ref([])
const accountList = ref([]) const accountList = ref([])
const productList = ref([])
const plazaList = ref([]) const plazaList = ref([])
const personTypeList = ref([]) const personTypeList = ref([])
const zoneList = ref([]) const zoneList = ref([])
...@@ -253,6 +264,7 @@ export default { ...@@ -253,6 +264,7 @@ export default {
{ {
account_id: '', account_id: '',
plaza_id: '', plaza_id: '',
productId:[],
zone_id: [], zone_id: [],
gate_id: [], gate_id: [],
type: 0, type: 0,
...@@ -272,6 +284,7 @@ export default { ...@@ -272,6 +284,7 @@ export default {
queryForm.type = searchCondition.value.type; queryForm.type = searchCondition.value.type;
queryForm.zone_id = searchCondition.value.zone_id; queryForm.zone_id = searchCondition.value.zone_id;
queryForm.gate_id = searchCondition.value.gate_id; queryForm.gate_id = searchCondition.value.gate_id;
queryForm.productId = searchCondition.value.productId;
queryForm.direction = searchCondition.value.direction; queryForm.direction = searchCondition.value.direction;
queryForm.childAdult = searchCondition.value.childAdult; queryForm.childAdult = searchCondition.value.childAdult;
queryForm.picType = searchCondition.value.picType; queryForm.picType = searchCondition.value.picType;
...@@ -293,6 +306,7 @@ export default { ...@@ -293,6 +306,7 @@ export default {
const onAccountChange = function() { const onAccountChange = function() {
getPlazaList(1) getPlazaList(1)
getProductList(1)
// getZoneList() // getZoneList()
// getGateList() // getGateList()
} }
...@@ -458,11 +472,35 @@ export default { ...@@ -458,11 +472,35 @@ export default {
queryForm.account_id = accountList.value[0].value queryForm.account_id = accountList.value[0].value
} }
getPlazaList() getPlazaList()
getProductList()
} }
} }
} }
) )
} }
// 查询商品
const getProductList = function(val) {
queryForm.productId = []
productList.value = []
snapshotRecordApi.getProductList({account_id: queryForm.account_id}).then((r) => {
if(r.msg_code==200){
let list = r.data?r.data:[];
for (const item of list){
productList.value.push({
value: item.id,
label: item.name,
})
}
if(productList.value.length>0){
if(!val&&searchCondition.value.productId && searchCondition.value.productId.length>0){
queryForm.productId = searchCondition.value.productId
}else{
queryForm.productId = []
}
}
}
})
}
const confirmSearch = function() { const confirmSearch = function() {
isLoading.value = true isLoading.value = true
...@@ -472,6 +510,7 @@ export default { ...@@ -472,6 +510,7 @@ export default {
account_id: rawData.account_id, account_id: rawData.account_id,
type: rawData.type, type: rawData.type,
plaza_id: rawData.plaza_id, plaza_id: rawData.plaza_id,
productId: rawData.productId?rawData.productId.toString():'',
zone_id: rawData.zone_id?rawData.zone_id.toString():'', zone_id: rawData.zone_id?rawData.zone_id.toString():'',
gate_id: rawData.gate_id?rawData.gate_id.toString():'', gate_id: rawData.gate_id?rawData.gate_id.toString():'',
direction: rawData.direction?rawData.direction.toString():'', direction: rawData.direction?rawData.direction.toString():'',
...@@ -489,6 +528,7 @@ export default { ...@@ -489,6 +528,7 @@ export default {
account_id: [rawData.account_id], account_id: [rawData.account_id],
type: rawData.type, type: rawData.type,
plaza_id: [rawData.plaza_id], plaza_id: [rawData.plaza_id],
productId: rawData.productId,
zone_id: rawData.zone_id, zone_id: rawData.zone_id,
gate_id: rawData.gate_id, gate_id: rawData.gate_id,
direction: rawData.direction, direction: rawData.direction,
...@@ -534,6 +574,9 @@ export default { ...@@ -534,6 +574,9 @@ export default {
const personUnidClick = function(val){ const personUnidClick = 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 formatProduct = function(val) {
return (productList.value.filter(v => v.value == val)[0] || {label:'--'}).label
}
const formatGender = function(number){ const formatGender = function(number){
switch (number) switch (number)
{ {
...@@ -1323,6 +1366,7 @@ export default { ...@@ -1323,6 +1366,7 @@ export default {
// sequence // sequence
accountList, accountList,
plazaList, plazaList,
productList,
personTypeList, personTypeList,
zoneList, zoneList,
gateList, gateList,
...@@ -1356,6 +1400,7 @@ export default { ...@@ -1356,6 +1400,7 @@ export default {
imgModelRef, imgModelRef,
singleComparativeFun, singleComparativeFun,
singleImgComparisonRef, singleImgComparisonRef,
formatProduct,
personUnidClick, personUnidClick,
hairStyleStr, hairStyleStr,
hatStr, hatStr,
......
...@@ -22,6 +22,19 @@ class SnapshotRecordApi { ...@@ -22,6 +22,19 @@ class SnapshotRecordApi {
} }
) )
} }
getProductList(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/product/list`,
params: filterEmptyValueInObject(
{
accountId: data.account_id
},
)
}
)
}
// 查询系统级人员类型 // 查询系统级人员类型
getPersonType(data) { getPersonType(data) {
return axiosInstance.request( return axiosInstance.request(
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!