Commit 21c74456 by 李乾广

聚类结果功能优化,搜索弹出框新需求开发

1 parent e5f47175
...@@ -14,6 +14,10 @@ const menuRoute = [ ...@@ -14,6 +14,10 @@ const menuRoute = [
component: () => import("@/views/dayAnalysisRerun/dayAnalysisRerun.vue"), component: () => import("@/views/dayAnalysisRerun/dayAnalysisRerun.vue"),
}, },
{ {
path: 'batchAnalysisRerun',
component: () => import("@/views/batchAnalysisRerun/batchAnalysisRerun.vue"),
},
{
path: 'DataRepair', path: 'DataRepair',
component: () => import("@/views/DataRepair/DataRepair.vue"), component: () => import("@/views/DataRepair/DataRepair.vue"),
}, },
......
...@@ -115,6 +115,12 @@ ...@@ -115,6 +115,12 @@
<span style="padding: 0 5px">全天分析重跑</span> <span style="padding: 0 5px">全天分析重跑</span>
</div> </div>
</a-menu-item> </a-menu-item>
<a-menu-item :key="'/Main/batchAnalysisRerun'">
<div class="flex-vertical-center">
<!-- <img :src="require('./Icons/1.svg')" style="height: auto;width:20px"/> -->
<span style="padding: 0 5px">接待批次重跑</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/DataRepair'"> <a-menu-item :key="'/Main/DataRepair'">
<div class="flex-vertical-center"> <div class="flex-vertical-center">
<!-- <img :src="require('./Icons/2.svg')" style="height: auto;width:20px"/> --> <!-- <img :src="require('./Icons/2.svg')" style="height: auto;width:20px"/> -->
......
...@@ -90,6 +90,19 @@ ...@@ -90,6 +90,19 @@
<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>
<a-form-item label="接待类型:" style="padding: 5px 0">
<a-select v-model:value="queryForm.receptionType" style="width: 240px">
<a-select-option value="">全部</a-select-option>
<a-select-option :value="1">接待</a-select-option>
<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.sortType" style="width: 240px">
<a-select-option value="">按聚类数量</a-select-option>
<a-select-option :value="1">按时间</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="人ID:" style="padding: 5px 0"> <a-form-item label="人ID:" style="padding: 5px 0">
<a-input v-model:value="queryForm.personUnid" style="width: 240px"/> <a-input v-model:value="queryForm.personUnid" style="width: 240px"/>
</a-form-item> </a-form-item>
...@@ -136,6 +149,14 @@ ...@@ -136,6 +149,14 @@
</a-popconfirm> --> </a-popconfirm> -->
<el-button type="text" :disabled="!isMultipleOperation" @click="deletePersonRecord(person)">剔除</el-button> <el-button type="text" :disabled="!isMultipleOperation" @click="deletePersonRecord(person)">剔除</el-button>
<a-popconfirm <a-popconfirm
title="是否添加至店员库"
ok-text="是"
cancel-text="否"
@confirm="addShopkeeper(person)"
>
<el-button type="text" :disabled="!isMultipleOperation">添加店员库</el-button>
</a-popconfirm>
<a-popconfirm
title="将彻底删除,您确认吗?" title="将彻底删除,您确认吗?"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
...@@ -143,6 +164,7 @@ ...@@ -143,6 +164,7 @@
> >
<el-button type="text" :disabled="!isMultipleOperation">删除</el-button> <el-button type="text" :disabled="!isMultipleOperation">删除</el-button>
</a-popconfirm> </a-popconfirm>
</a-form-item> </a-form-item>
</a-form> </a-form>
...@@ -293,8 +315,10 @@ export default { ...@@ -293,8 +315,10 @@ export default {
endTime: '23:59:59', endTime: '23:59:59',
minPic: 0, minPic: 0,
personUnid:'', personUnid:'',
maxPic: 100, maxPic: 1000,
childAdult:[], childAdult:[],
receptionType:'',
sortType:'',
} }
) )
const searchCondition = ref({}) const searchCondition = ref({})
...@@ -311,7 +335,7 @@ export default { ...@@ -311,7 +335,7 @@ export default {
queryForm.startTime = searchCondition.value.startTime; queryForm.startTime = searchCondition.value.startTime;
queryForm.endTime = searchCondition.value.endTime; queryForm.endTime = searchCondition.value.endTime;
queryForm.minPic = searchCondition.value.minPic||0; queryForm.minPic = searchCondition.value.minPic||0;
queryForm.maxPic = searchCondition.value.maxPic||100; queryForm.maxPic = searchCondition.value.maxPic||1000;
} }
// function // function
const onPageNumChange = function(num) { const onPageNumChange = function(num) {
...@@ -510,6 +534,8 @@ export default { ...@@ -510,6 +534,8 @@ export default {
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():'',
receptionType: rawData.receptionType?rawData.receptionType:0,
sortType: rawData.sortType?rawData.sortType:0,
} }
) )
const storageData = filterEmptyValueInObject( const storageData = filterEmptyValueInObject(
...@@ -778,19 +804,77 @@ export default { ...@@ -778,19 +804,77 @@ export default {
} }
) )
} }
// 添加店员库
const addShopkeeper = () => {
console.log('addShopkeeper', selectedPersonList)
if (selectedPersonList.value.length < 1) {
ElMessage({
message: `至少选择一条数据`,
type: 'error'
})
return
}
const strIdList = selectedPersonList.value.map(item => item.id).join(',')
const rawData = toRaw(queryForm)
const params = {
unids: strIdList,
mallId:currobj.value.mall_id,
countdate:formatDate(rawData.date),
}
clusterResultApi.addDataToShopkeeper(params).then(
(r) => {
if(r.msg_code==200){
ElMessage({
message: `添加成功`,
type: 'success'
})
selectedPersonList.value = []
// 刷新列表
handleRefresh()
} else {
ElMessage({
message: `添加失败`,
type: 'error'
})
}
}
)
}
// 移动人员 // 移动人员
const personGroupMoverRef = ref(); const personGroupMoverRef = ref();
const movePersonRecord = () => { const movePersonRecord = () => {
console.log('movePersonRecord') console.log('movePersonRecord')
if (selectedPersonList.value.length < 1) { let selectedList = []
// 添加人员组
dataList.value.forEach(item=>{
if (item.checked && item.checked == true&&item.perrsonList.length > 0) {
console.log(111,item.perrsonList)
selectedList = selectedList.concat(item.perrsonList)
}
})
if (selectedList.length==0&&selectedPersonList.value.length < 1) {
ElMessage({ ElMessage({
message: `至少选择一条数据`, message: `至少选择一条数据`,
type: 'error' type: 'error'
}) })
return return
} }
// 添加单个图片
personGroupMoverRef.value.initDialog(selectedPersonList.value); if (selectedPersonList.value.length > 0) {
for(let j=0;j<selectedPersonList.value.length;j++) {
let isAdd = true
for(let i=0;i<selectedList.length;i++) {
if(selectedList[i].unid==selectedPersonList.value[j].unid){
isAdd = false;
break;
}
}
if(isAdd) {
selectedList.push(selectedPersonList.value[j])
}
}
}
personGroupMoverRef.value.initDialog(selectedList);
} }
// 查询组 // 查询组
const personGroupDialogRef = ref(); const personGroupDialogRef = ref();
...@@ -807,7 +891,8 @@ export default { ...@@ -807,7 +891,8 @@ export default {
plaza_id:currobj.value.mall_id plaza_id:currobj.value.mall_id
} */ } */
// singleImgComparisonRef.value.initDialog(parmas); // singleImgComparisonRef.value.initDialog(parmas);
const rawData = toRaw(queryForm)
data.plaza_id = rawData.plaza_id
personGroupDialogRef.value.initDialog(data); personGroupDialogRef.value.initDialog(data);
} }
...@@ -1060,6 +1145,7 @@ export default { ...@@ -1060,6 +1145,7 @@ export default {
handleMutipleOperation, handleMutipleOperation,
mutipleOperationText, mutipleOperationText,
deleteRealPersonRecord, deleteRealPersonRecord,
addShopkeeper,
} }
} }
} }
......
...@@ -123,6 +123,16 @@ class ClusterResultApi { ...@@ -123,6 +123,16 @@ class ClusterResultApi {
} }
) )
} }
// 添加店员库
addDataToShopkeeper(data) {
return axiosInstance.request(
{
method: 'POST',
url: `/faceRecognitions/addStaff`,
data: data
}
)
}
// 剔除或移动 // 剔除或移动
updateRecognition(data) { updateRecognition(data) {
return axiosInstance.request( return axiosInstance.request(
...@@ -155,6 +165,37 @@ class ClusterResultApi { ...@@ -155,6 +165,37 @@ class ClusterResultApi {
} }
) )
} }
// 搜索左侧图片列表
getAllfacePic(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/faceRecognitions/facePic`,
params: filterEmptyValueInObject(
data
)
}
)
}
// 搜索左侧图片点击20条记录列表
getAllFaceQuerPic(data) {
return axiosInstance.request(
// {
// method: 'GET',
// url: `/faceRecognitions/querFaceRecogniton`,
// params: filterEmptyValueInObject(
// data
// )
// }
{
method: 'POST',
url: `/faceRecognitions/querFaceRecogniton`,
data: data
}
)
}
} }
const clusterResultApi = new ClusterResultApi() const clusterResultApi = new ClusterResultApi()
......
...@@ -142,6 +142,7 @@ ...@@ -142,6 +142,7 @@
:style="{'height':imgHeight+'px'}" :style="{'height':imgHeight+'px'}"
> >
</el-image> </el-image>
<div @click="personUnidClick(item.person_unid)">人id: {{ item.person_unid }}</div>
<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)}}({{ item.childAdult==1?'成人':(item.childAdult==0?'儿童':'未知') }})</div>
<div> <div>
...@@ -527,6 +528,10 @@ export default { ...@@ -527,6 +528,10 @@ 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
} }
// 点击人id,将人id复制到剪切板
const personUnidClick = function(val){
// return (personTypeList.value.filter(v => v.value == val)[0] || {label:'--'}).label
}
const formatGender = function(number){ const formatGender = function(number){
switch (number) switch (number)
{ {
...@@ -1341,6 +1346,7 @@ export default { ...@@ -1341,6 +1346,7 @@ export default {
imgModelRef, imgModelRef,
singleComparativeFun, singleComparativeFun,
singleImgComparisonRef, singleImgComparisonRef,
personUnidClick,
hairStyleStr, hairStyleStr,
hatStr, hatStr,
glassesStr, glassesStr,
......
<template>
<a-form class="data-return-form" :model="queryForm" layout="inline" :label-col="{ style: { width: '70px' } }">
<a-form-item label="集团:">
<a-select v-model:value="queryForm.account_id" style="width: 280px" mode="multiple" :maxTagCount="1" :options="accountList" @change="onAccountChange" optionFilterProp="label" show-search>
</a-select>
</a-form-item>
<a-form-item label="广场:">
<a-select v-model:value="queryForm.plaza_id" style="width: 280px" mode="multiple" :maxTagCount="1" :options="plazaList" optionFilterProp="label" show-search>
</a-select>
</a-form-item>
<a-form-item label="开始日期:">
<a-date-picker v-model:value="queryForm.startDate" />
</a-form-item>
<a-form-item label="结束日期:">
<a-date-picker v-model:value="queryForm.endDate" />
</a-form-item>
<a-form-item>
<a-button type="primary" @click="confirmSearch">开始</a-button>
</a-form-item>
</a-form>
<!--新的日志-->
<div class="card-container">
<a-card title="接待批次重跑结果" style="width: 600px">
<el-row v-for="(item,index) in msgLogList" :key="index" style="padding: 2px 0;">
<el-col :span="8">
{{item.time}}
</el-col>
<el-col :span="16">
接待批次重跑任务已提交,正在重跑中...
</el-col>
</el-row>
</a-card>
</div>
</template>
<script>
import { reactive, ref, toRaw } from 'vue'
import moment from 'moment'
import { ElMessage } from 'element-plus'
import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import { isArray } from '@/PublicUtil/Judgment'
import { formatDate } from '@/PublicUtil/PublicUtil'
import batchAnalysisRerunApi from '@/views/batchAnalysisRerun/batchAnalysisRerunApi'
export default {
components: {
VNodes: (_, {attrs}) => {
return attrs.vnodes
},
},
setup() {
const accountList = ref([])
const plazaList = ref([])
const queryForm = reactive({
account_id: [],
plaza_id: [],
startDate: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
endDate: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
})
const onAccountChange = function() {
getPlazaList()
}
const getPlazaList = function() {
queryForm.plaza_id = []
plazaList.value = []
snapshotRecordApi.getPlazaList({
account_id: queryForm.account_id.toString()
}).then(
(r) => {
if (isArray(r)) {
for (const item of r) {
plazaList.value.push({
value: item.id,
label: item.name,
})
}
}
}
)
}
const getAccountList = function() {
queryForm.account_id = []
accountList.value = []
snapshotRecordApi.getAccountList().then(
(r) => {
if (isArray(r)) {
for (const item of r) {
accountList.value.push({
value: item.id,
label: item.name,
})
}
}
}
)
}
// 新需求:数据重跑
const msgLogList = ref([])
const confirmSearch = function() {
if (queryForm.account_id.length < 1) {
ElMessage({
message: `至少选择一个集团`,
type: 'error'
})
return
}
if (queryForm.plaza_id.length < 1) {
ElMessage({
message: `至少选择一个门店`,
type: 'error'
})
return
}
msgLogList.value = []
const rawData = toRaw(queryForm)
const params = {
mallIds:queryForm.plaza_id.join(','),
startDate: formatDate(rawData.startDate),
endDate: formatDate(rawData.endDate),
}
batchAnalysisRerunApi.getResult(params).then(
(r) => {
console.log('getResult', r)
if (r.msg_code==200) {
msgLogList.value.push({time:moment().format('YYYY-MM-DD HH:mm:ss')})
}
}
)
}
const __main = function() {
getAccountList()
}
__main()
return {
accountList,
plazaList,
queryForm,
onAccountChange,
confirmSearch,
msgLogList,
}
}
}
</script>
<style lang="less" scoped>
.result-wrapper-2 {
width: 50%;
min-width: 600px;
border-radius: 4px;
margin: 20px auto 0;
position: relative;
overflow: auto;
}
.card-container {
display: flex;
justify-content: center;
/deep/.ant-card-body {
height: 370px;
}
}
.data-return-form {
/deep/.ant-form-item {
margin-bottom: 10px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
import axiosInstance from "@/Request/PublicAxiosInstance"
class BatchAnalysisRerunApi {
getResult(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/reid/reception/reCall`,
params: data
}
)
}
}
const batchAnalysisRerunApi = new BatchAnalysisRerunApi()
export default batchAnalysisRerunApi
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!