Commit 3115559d by 李乾广

聚类结果,事件类型增加关注触达,增加商品类型筛选

1 parent e8228a55
......@@ -54,7 +54,7 @@
</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.direction"
mode="multiple"
:maxTagCount="1"
......@@ -63,6 +63,8 @@
<a-select-option :value="-1"></a-select-option>
<a-select-option :value="0">横穿</a-select-option>
<a-select-option :value="2">过店</a-select-option>
<a-select-option :value="7">关注</a-select-option>
<a-select-option :value="8">触达</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="抓拍类型:" style="padding: 5px 0">
......@@ -71,6 +73,15 @@
<a-select-option :value="2">全身照</a-select-option>
</a-select>
</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-select v-model:value="queryForm.personType"
mode="multiple"
......@@ -213,6 +224,8 @@
<div>性别:{{ formatGender(item.gender) }}({{item.age}})</div>
<div class="direction" :class="'direction'+item.direction">方向:{{ formatDirection(item.direction) }}</div>
<div>地点:{{ item.gate_name }}</div>
<div>商品类型:{{ formatProduct(item.productId)}}</div>
</div>
</el-col>
</el-row>
......@@ -288,6 +301,7 @@ export default {
const accountList = ref([])
const plazaList = ref([])
const personTypeList = ref([])
const productList = ref([])
const zoneList = ref([])
const gateList = ref([])
// const imgModelRef = ref();
......@@ -304,6 +318,7 @@ export default {
{
account_id: '',
plaza_id: '',
productId:[],
zone_id: [],
gate_id: [],
type: 0,
......@@ -328,6 +343,7 @@ export default {
queryForm.type = searchCondition.value.type;
queryForm.zone_id = searchCondition.value.zone_id;
queryForm.gate_id = searchCondition.value.gate_id;
queryForm.productId = searchCondition.value.productId;
queryForm.direction = searchCondition.value.direction;
queryForm.childAdult = searchCondition.value.childAdult;
queryForm.picType = searchCondition.value.picType;
......@@ -350,7 +366,8 @@ export default {
}
const onAccountChange = function() {
getPlazaList(1)
getProductList(1)
getPlazaList(1)
// getZoneList()
// getGateList()
}
......@@ -364,6 +381,29 @@ export default {
const onZoneChange = function() {
getGateList()
}
// 查询商品
const getProductList = function(val) {
queryForm.productId = []
productList.value = []
clusterResultApi.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 getPlazaList = function(val) {
queryForm.plaza_id = ''
......@@ -469,6 +509,8 @@ export default {
}
)
}
const getAccountList = function() {
queryForm.account_id = ''
......@@ -493,6 +535,7 @@ export default {
queryForm.account_id = accountList.value[0].value
}
getPlazaList()
getProductList()
}
}
}
......@@ -521,6 +564,7 @@ export default {
account_id: rawData.account_id,
type: rawData.type,
plaza_id: rawData.plaza_id,
productId: rawData.productId?rawData.productId.toString():'',
zone_id: rawData.zone_id?rawData.zone_id.toString():'',
gate_id: rawData.gate_id?rawData.gate_id.toString():'',
direction: rawData.direction?rawData.direction.toString():'',
......@@ -543,6 +587,7 @@ export default {
account_id: [rawData.account_id],
type: rawData.type,
plaza_id: [rawData.plaza_id],
productId: rawData.productId,
zone_id: rawData.zone_id,
gate_id: rawData.gate_id,
direction: rawData.direction,
......@@ -627,10 +672,18 @@ export default {
{
return '出'
}
case 0:
case 7:
{
return '横穿'
return '关注'
}
case 8:
{
return '触达'
}
case 0:
{
return '横穿'
}
default:
{
......@@ -638,6 +691,9 @@ export default {
}
}
}
const formatProduct = function(val) {
return (productList.value.filter(v => v.value == val)[0] || {label:'--'}).label
}
const sortDataList = function(list) {
list.sort(
(a, b) => {
......@@ -649,7 +705,7 @@ export default {
personTypeList.value = []
clusterResultApi.getPersonType({plaza_id:queryForm.plaza_id}).then(
(r) => {
console.log(1122,r)
// console.log(1122,r)
if (isArray(r)) {
let personType = []
for (const item of r){
......@@ -815,12 +871,12 @@ export default {
return
}
const strIdList = selectedPersonList.value.map(item => item.unid).join(',')
const strIdList = selectedPersonList.value.map(item => item.unid)
const rawData = toRaw(queryForm)
const params = {
unids: strIdList,
mallId:currobj.value.mall_id,
countdate:formatDate(rawData.date),
countdate:formatDate(rawData.date) + ' 00:00:00',
}
clusterResultApi.addDataToShopkeeper(params).then(
(r) => {
......@@ -849,7 +905,7 @@ export default {
// 添加人员组
dataList.value.forEach(item=>{
if (item.checked && item.checked == true&&item.perrsonList.length > 0) {
console.log(111,item.perrsonList)
// console.log(111,item.perrsonList)
selectedList = selectedList.concat(item.perrsonList)
}
})
......@@ -1092,6 +1148,7 @@ export default {
accountList,
plazaList,
personTypeList,
productList,
zoneList,
gateList,
pagedTableDataList,
......@@ -1107,6 +1164,7 @@ export default {
onZoneChange,
confirmSearch,
formatDirection,
formatProduct,
downloadFile,
getPagedList,
handleClick,
......@@ -1170,7 +1228,7 @@ export default {
.classBox{
margin: 10px 0;
border: solid 1px black;
height: 485px;
height: 507px;
overflow-y: hidden;
}
.expand{
......
......@@ -22,7 +22,19 @@ class ClusterResultApi {
}
)
}
getProductList(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/product/list`,
params: filterEmptyValueInObject(
{
accountId: data.account_id
},
)
}
)
}
getPlazaList(data) {
return axiosInstance.request(
{
......
......@@ -52,7 +52,7 @@
>
</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.direction"
mode="multiple"
:maxTagCount="1"
......@@ -61,6 +61,8 @@
<a-select-option :value="-1"></a-select-option>
<a-select-option :value="0">横穿</a-select-option>
<a-select-option :value="2">过店</a-select-option>
<a-select-option :value="7">关注</a-select-option>
<a-select-option :value="8">触达</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="抓拍类型:" style="padding: 5px 0">
......@@ -565,6 +567,14 @@ export default {
{
return '出'
}
case 7:
{
return '关注'
}
case 8:
{
return '触达'
}
case 0:
{
return '横穿'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!