Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
罗鑫霖
/
vion-tools
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 21c74456
authored
Aug 15, 2024
by
李乾广
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
聚类结果功能优化,搜索弹出框新需求开发
1 parent
e5f47175
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
334 additions
and
6 deletions
src/router/index.js
src/views/Main/Main.vue
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
src/views/SnapshotCluster/ClusterResult/PersonGroupDialog.vue
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
src/views/batchAnalysisRerun/batchAnalysisRerun.vue
src/views/batchAnalysisRerun/batchAnalysisRerunApi.js
src/router/index.js
View file @
21c7445
...
...
@@ -14,6 +14,10 @@ const menuRoute = [
component
:
()
=>
import
(
"@/views/dayAnalysisRerun/dayAnalysisRerun.vue"
),
},
{
path
:
'batchAnalysisRerun'
,
component
:
()
=>
import
(
"@/views/batchAnalysisRerun/batchAnalysisRerun.vue"
),
},
{
path
:
'DataRepair'
,
component
:
()
=>
import
(
"@/views/DataRepair/DataRepair.vue"
),
},
...
...
src/views/Main/Main.vue
View file @
21c7445
...
...
@@ -115,6 +115,12 @@
<span
style=
"padding: 0 5px"
>
全天分析重跑
</span>
</div>
</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'"
>
<div
class=
"flex-vertical-center"
>
<!-- <img :src="require('./Icons/2.svg')" style="height: auto;width:20px"/> -->
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
21c7445
...
...
@@ -90,6 +90,19 @@
<a-select-option
:value=
"-1"
>
未知
</a-select-option>
</a-select>
</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-input
v-model:value=
"queryForm.personUnid"
style=
"width: 240px"
/>
</a-form-item>
...
...
@@ -136,6 +149,14 @@
</a-popconfirm>
-->
<el-button
type=
"text"
:disabled=
"!isMultipleOperation"
@
click=
"deletePersonRecord(person)"
>
剔除
</el-button>
<a-popconfirm
title=
"是否添加至店员库"
ok-text=
"是"
cancel-text=
"否"
@
confirm=
"addShopkeeper(person)"
>
<el-button
type=
"text"
:disabled=
"!isMultipleOperation"
>
添加店员库
</el-button>
</a-popconfirm>
<a-popconfirm
title=
"将彻底删除,您确认吗?"
ok-text=
"是"
cancel-text=
"否"
...
...
@@ -143,6 +164,7 @@
>
<el-button
type=
"text"
:disabled=
"!isMultipleOperation"
>
删除
</el-button>
</a-popconfirm>
</a-form-item>
</a-form>
...
...
@@ -293,8 +315,10 @@ export default {
endTime
:
'23:59:59'
,
minPic
:
0
,
personUnid
:
''
,
maxPic
:
100
,
maxPic
:
100
0
,
childAdult
:[],
receptionType
:
''
,
sortType
:
''
,
}
)
const
searchCondition
=
ref
({})
...
...
@@ -311,7 +335,7 @@ export default {
queryForm
.
startTime
=
searchCondition
.
value
.
startTime
;
queryForm
.
endTime
=
searchCondition
.
value
.
endTime
;
queryForm
.
minPic
=
searchCondition
.
value
.
minPic
||
0
;
queryForm
.
maxPic
=
searchCondition
.
value
.
maxPic
||
100
;
queryForm
.
maxPic
=
searchCondition
.
value
.
maxPic
||
100
0
;
}
// function
const
onPageNumChange
=
function
(
num
)
{
...
...
@@ -510,6 +534,8 @@ export default {
page
:
pageNum
.
value
-
1
,
pageSize
:
pageSize
.
value
,
childAdult
:
rawData
.
childAdult
?
rawData
.
childAdult
.
toString
():
''
,
receptionType
:
rawData
.
receptionType
?
rawData
.
receptionType
:
0
,
sortType
:
rawData
.
sortType
?
rawData
.
sortType
:
0
,
}
)
const
storageData
=
filterEmptyValueInObject
(
...
...
@@ -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
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
({
message
:
`至少选择一条数据`
,
type
:
'error'
})
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
();
...
...
@@ -807,7 +891,8 @@ export default {
plaza_id:currobj.value.mall_id
} */
// singleImgComparisonRef.value.initDialog(parmas);
const
rawData
=
toRaw
(
queryForm
)
data
.
plaza_id
=
rawData
.
plaza_id
personGroupDialogRef
.
value
.
initDialog
(
data
);
}
...
...
@@ -1060,6 +1145,7 @@ export default {
handleMutipleOperation
,
mutipleOperationText
,
deleteRealPersonRecord
,
addShopkeeper
,
}
}
}
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResultApi.js
View file @
21c7445
...
...
@@ -123,6 +123,16 @@ class ClusterResultApi {
}
)
}
// 添加店员库
addDataToShopkeeper
(
data
)
{
return
axiosInstance
.
request
(
{
method
:
'POST'
,
url
:
`/faceRecognitions/addStaff`
,
data
:
data
}
)
}
// 剔除或移动
updateRecognition
(
data
)
{
return
axiosInstance
.
request
(
...
...
@@ -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
()
...
...
src/views/SnapshotCluster/ClusterResult/PersonGroupDialog.vue
View file @
21c7445
This diff is collapsed.
Click to expand it.
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
View file @
21c7445
...
...
@@ -142,6 +142,7 @@
:style=
"
{'height':imgHeight+'px'}"
>
</el-image>
<div
@
click=
"personUnidClick(item.person_unid)"
>
人id:
{{
item
.
person_unid
}}
</div>
<div>
时间:
{{
item
.
counttime
}}
</div>
<div>
人员类型:
{{
personTypeStr
(
item
.
person_type
)
}}
(
{{
item
.
childAdult
==
1
?
'成人'
:(
item
.
childAdult
==
0
?
'儿童'
:
'未知'
)
}}
)
</div>
<div>
...
...
@@ -527,6 +528,10 @@ export default {
const
personTypeStr
=
function
(
val
){
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
){
switch
(
number
)
{
...
...
@@ -1341,6 +1346,7 @@ export default {
imgModelRef
,
singleComparativeFun
,
singleImgComparisonRef
,
personUnidClick
,
hairStyleStr
,
hatStr
,
glassesStr
,
...
...
src/views/batchAnalysisRerun/batchAnalysisRerun.vue
0 → 100644
View file @
21c7445
<
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
src/views/batchAnalysisRerun/batchAnalysisRerunApi.js
0 → 100644
View file @
21c7445
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
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment