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 eb87db47
authored
Sep 06, 2024
by
李乾广
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加设备序列号筛选,出入类型增加选项
1 parent
d39ead22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
173 additions
and
4 deletions
src/views/SnapshotCluster/ClusterResult/AddPersonnelPool.vue
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
src/views/SnapshotCluster/ClusterResult/AddPersonnelPool.vue
0 → 100644
View file @
eb87db4
<
template
>
<a-modal
title=
"人员移动"
v-if=
'isVisible'
v-model:visible=
"isVisible"
width=
"520px"
height=
'50%'
class=
"detail-modal"
>
<a-form
:model=
"formData"
>
<a-form-item
label=
"分组"
>
<a-select
v-model:value=
"formData.personUnid"
showSearch
placeholder=
"请选择分组id"
>
<a-select-option
v-for=
"item in showDataList"
:key=
"item"
:value=
"item"
>
人id:
{{
item
}}
</a-select-option>
</a-select>
</a-form-item>
</a-form>
<template
#
footer
>
<a-button
type=
"primary"
@
click=
"onSave"
>
保存
</a-button>
<a-button
@
click=
"onCancel"
>
关闭
</a-button>
</
template
>
</a-modal>
</template>
<
script
>
import
{
ref
}
from
"vue"
;
import
{
ElMessage
}
from
"element-plus"
;
import
clusterResultApi
from
'./ClusterResultApi'
export
default
{
name
:
'PersonGroupEditor'
,
props
:
{
dataList
:
{
type
:
Array
,
default
:
()
=>
[],
},
dataParams
:
{
type
:
Object
,
default
:
null
,
},
},
setup
(
props
,
{
emit
})
{
const
isVisible
=
ref
(
false
);
// 表单
function
getInitialFormData
()
{
return
{
personUnid
:
''
,
unidList
:
[],
countdate
:
''
,
}
}
const
formData
=
ref
(
getInitialFormData
())
const
initDialog
=
(
selectedList
)
=>
{
console
.
log
(
'initDialog'
,
selectedList
)
formData
.
value
=
getInitialFormData
()
formData
.
value
.
unidList
=
selectedList
.
map
(
item
=>
item
.
unid
)
formData
.
value
.
countdate
=
selectedList
.
length
>
0
?
selectedList
[
0
].
counttime
:
''
isVisible
.
value
=
true
;
getDataList
()
};
const
showDataList
=
ref
([])
const
getDataList
=
()
=>
{
if
(
props
.
dataParams
)
{
clusterResultApi
.
getClusterResultUidList
(
props
.
dataParams
).
then
(
r
=>
{
console
.
log
(
'getClusterResultUidList'
,
r
)
showDataList
.
value
=
r
.
data
})
}
else
{
// 使用props.dataList
showDataList
.
value
=
props
.
dataList
.
map
(
item
=>
item
.
person_unid
)
}
}
const
onCancel
=
()
=>
{
isVisible
.
value
=
false
;
};
const
onSave
=
()
=>
{
const
params
=
{
unid
:
formData
.
value
.
unidList
.
join
(
','
),
personUnid
:
formData
.
value
.
personUnid
,
countdate
:
formData
.
value
.
countdate
,
}
clusterResultApi
.
updateRecognition
(
params
).
then
(
(
r
)
=>
{
if
(
r
.
msg_code
==
200
){
ElMessage
({
message
:
`保存成功`
,
type
:
'success'
})
// 刷新列表
emit
(
'refresh'
)
onCancel
()
}
else
{
ElMessage
({
message
:
`保存失败`
,
type
:
'error'
})
}
}
)
};
return
{
isVisible
,
formData
,
onSave
,
onCancel
,
initDialog
,
showDataList
,
};
},
};
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
eb87db4
...
...
@@ -28,6 +28,7 @@
<a-select-option
:value=
"2"
>
楼层出入口
</a-select-option>
<a-select-option
:value=
"3"
>
店铺出入口
</a-select-option>
<a-select-option
:value=
"4"
>
其他
</a-select-option>
<a-select-option
:value=
"5"
>
不以广场出入口开始
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"区域信息:"
style=
"padding: 5px 0"
>
...
...
@@ -103,9 +104,12 @@
>
{{
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
label=
"设备序列号:"
style=
"padding: 5px 0;"
class=
"label-width-wu"
>
<a-input
v-model:value=
"queryForm.deviceSerialNum"
style=
"width: 240px"
/>
</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
label=
"选择日期:"
style=
"padding: 5px 0"
>
<a-date-picker
v-model:value=
"queryForm.date"
:format=
"'YYYY-MM-DD'"
:allowClear=
"false"
style=
"width: 240px"
/>
</a-form-item>
...
...
@@ -156,6 +160,7 @@
>
<el-button
type=
"text"
:disabled=
"!isMultipleOperation"
>
添加店员库
</el-button>
</a-popconfirm>
<!--
<el-button
type=
"text"
:disabled=
"!isMultipleOperation"
@
click=
"addPersonnelPool(person)"
>
添加人员库
</el-button>
-->
<a-popconfirm
title=
"将彻底删除,您确认吗?"
ok-text=
"是"
...
...
@@ -242,6 +247,7 @@
<PersonGroupEditor
ref=
'personGroupEditorRef'
@
refresh=
"handleEditorRefresh"
/>
<UploadGroupDataEditor
ref=
'uploadGroupDataEditorRef'
@
refresh=
"handleEditorRefresh"
/>
<PersonGroupMover
ref=
'personGroupMoverRef'
:data-params=
"currentSearchCondition"
:data-list=
"dataList"
@
refresh=
"handleRefresh"
/>
<AddPersonnelPool
ref=
'personnelPoolRef'
:data-params=
"currentSearchCondition"
:data-list=
"dataList"
@
refresh=
"handleRefresh"
/>
<PersonGroupDialog
ref=
'personGroupDialogRef'
:query-form=
"queryForm"
@
refresh=
"handleRefresh"
/>
</template>
...
...
@@ -261,6 +267,7 @@ import PersonGroupEditor from "./PersonGroupEditor.vue";
import
UploadGroupDataEditor
from
"./UploadGroupDataEditor.vue"
;
import
PersonGroupDialog
from
"./PersonGroupDialog.vue"
;
import
PersonGroupMover
from
"./PersonGroupMover.vue"
;
import
AddPersonnelPool
from
"./AddPersonnelPool.vue"
;
export
default
{
components
:{
...
...
@@ -268,6 +275,7 @@ export default {
UploadGroupDataEditor
,
PersonGroupDialog
,
PersonGroupMover
,
AddPersonnelPool
,
// imgDialog
DetailDialog
,
PersonnelDialog
,
...
...
@@ -315,6 +323,7 @@ export default {
minPic
:
0
,
maxPic
:
100
,
childAdult
:[],
deviceSerialNum
:
''
,
}
)
const
searchCondition
=
ref
({})
...
...
@@ -332,6 +341,7 @@ export default {
queryForm
.
endTime
=
searchCondition
.
value
.
endTime
;
queryForm
.
minPic
=
searchCondition
.
value
.
minPic
||
0
;
queryForm
.
maxPic
=
searchCondition
.
value
.
maxPic
||
100
;
queryForm
.
deviceSerialNum
=
searchCondition
.
value
.
deviceSerialNum
;
}
// function
const
onPageNumChange
=
function
(
num
)
{
...
...
@@ -532,6 +542,7 @@ export default {
// 查询条件
age
:
rawData
.
childAdult
?
rawData
.
childAdult
.
toString
():
''
,
personUnid
:
rawData
.
personUnid
,
deviceSerialNum
:
rawData
.
deviceSerialNum
,
}
)
const
storageData
=
filterEmptyValueInObject
(
...
...
@@ -550,6 +561,7 @@ export default {
maxPic
:
rawData
.
maxPic
,
startTime
:
rawData
.
startTime
,
endTime
:
rawData
.
endTime
,
deviceSerialNum
:
rawData
.
deviceSerialNum
,
}
)
let
searchCondition
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'searchCondition'
));
...
...
@@ -858,6 +870,20 @@ export default {
}
)
}
// 添加人员库
const
personnelPoolRef
=
ref
();
const
addPersonnelPool
=
()
=>
{
console
.
log
(
'addPersonnelPool'
)
if
(
selectedPersonList
.
value
.
length
<
1
)
{
ElMessage
({
message
:
`至少选择一条数据`
,
type
:
'error'
})
return
}
personnelPoolRef
.
value
.
initDialog
(
selectedPersonList
.
value
);
}
// 移动人员
const
personGroupMoverRef
=
ref
();
const
movePersonRecord
=
()
=>
{
...
...
@@ -1110,6 +1136,7 @@ export default {
updatePersonInfoByGroup
,
uploadGroupData
,
deletePersonRecord
,
addPersonnelPool
,
movePersonRecord
,
searchPersonInfoByGroup
,
isSelectedPerson
,
...
...
@@ -1134,6 +1161,7 @@ export default {
DetailDialogComparisonRef
,
singleImgComparisonRef
,
personGroupMoverRef
,
personnelPoolRef
,
reqPersonType
,
isMultipleOperation
,
...
...
@@ -1206,5 +1234,10 @@ export default {
display
:
inline-block
;
margin-left
:
20px
;
}
</
style
>
<
style
type=
"text/css"
>
.label-width-wu
.ant-form-item-label
{
width
:
84px
!important
;
}
</
style
>
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
View file @
eb87db4
...
...
@@ -27,6 +27,7 @@
<a-select-option
:value=
"2"
>
楼层出入口
</a-select-option>
<a-select-option
:value=
"3"
>
店铺出入口
</a-select-option>
<a-select-option
:value=
"4"
>
其他
</a-select-option>
<a-select-option
:value=
"5"
>
不以广场出入口开始
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"区域信息:"
style=
"padding: 5px 0"
>
...
...
@@ -101,6 +102,9 @@
>
{{
item
.
label
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"设备序列号:"
style=
"padding: 5px 0"
class=
"label-width-wu"
>
<a-input
v-model:value=
"queryForm.deviceSerialNum"
style=
"width: 240px"
/>
</a-form-item>
<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-form-item>
...
...
@@ -273,6 +277,7 @@ export default {
startTime
:
'00:00:00'
,
endTime
:
'23:59:59'
,
childAdult
:[],
deviceSerialNum
:
''
,
}
)
const
searchCondition
=
ref
({})
...
...
@@ -288,6 +293,7 @@ export default {
queryForm
.
date
=
searchCondition
.
value
.
date
;
queryForm
.
startTime
=
searchCondition
.
value
.
startTime
;
queryForm
.
endTime
=
searchCondition
.
value
.
endTime
;
queryForm
.
deviceSerialNum
=
searchCondition
.
value
.
deviceSerialNum
;
}
// function
const
onPageNumChange
=
function
(
num
)
{
...
...
@@ -493,6 +499,7 @@ export default {
pageSize
:
pageSize
.
value
,
// childAdult: rawData.childAdult?rawData.childAdult.toString():'',
age
:
rawData
.
childAdult
?
rawData
.
childAdult
.
toString
():
''
,
deviceSerialNum
:
rawData
.
deviceSerialNum
,
}
)
const
storageData
=
filterEmptyValueInObject
(
...
...
@@ -509,6 +516,7 @@ export default {
date
:
rawData
.
date
,
startTime
:
rawData
.
startTime
,
endTime
:
rawData
.
endTime
,
deviceSerialNum
:
rawData
.
deviceSerialNum
,
}
)
let
searchCondition
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'searchCondition'
));
...
...
@@ -1059,4 +1067,9 @@ export default {
line-height
:
24px
;
}
</
style
>
<
style
type=
"text/css"
>
.label-width-wu
.ant-form-item-label
{
width
:
84px
!important
;
}
</
style
>
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