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 6fc26dbd
authored
May 25, 2023
by
tianlonglong
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改字段名
1 parent
ff23185a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
529 additions
and
641 deletions
package-lock.json
src/Request/PublicAxiosInstance.js
src/views/FeatureMatchingAccuracy/FeatureMatchingAccuracy.vue
src/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi.js
src/views/FeatureMatchingAccuracy/editPerson.vue
package-lock.json
View file @
6fc26db
This diff could not be displayed because it is too large.
src/Request/PublicAxiosInstance.js
View file @
6fc26db
...
@@ -14,7 +14,7 @@ const axiosInstance = axios.create(
...
@@ -14,7 +14,7 @@ const axiosInstance = axios.create(
// 请求拦截器
// 请求拦截器
axiosInstance
.
interceptors
.
request
.
use
(
axiosInstance
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
// Cookies.set('atoken','33b0df7a-e5c6-49c3-b549-959179cd5904
')
Cookies
.
set
(
'atoken'
,
'7150be77-f099-4a63-90c5-ef9cc6b51137
'
)
if
(
!
Cookies
.
get
(
'atoken'
)){
if
(
!
Cookies
.
get
(
'atoken'
)){
ElMessage
({
ElMessage
({
message
:
`登录过期,请重新登录`
,
message
:
`登录过期,请重新登录`
,
...
...
src/views/FeatureMatchingAccuracy/FeatureMatchingAccuracy.vue
View file @
6fc26db
...
@@ -31,49 +31,14 @@
...
@@ -31,49 +31,14 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"content"
align=
"center"
label=
"操作"
width=
"220"
>
<el-table-column
prop=
"content"
align=
"center"
label=
"操作"
width=
"220"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
@
click
.
stop
@
click=
"editRow(scope.row)"
type=
"text"
size=
"small"
class=
"tab-btn"
>
编辑
</el-button>
@
click
.
stop
<el-button
@
click
.
stop
@
click=
"deleteRow(scope.row)"
type=
"text"
size=
"small"
class=
"tab-btn"
>
删除
</el-button>
@
click=
"editRow(scope.row)"
<el-button
@
click
.
stop
@
click=
"addSamplePic(scope.row)"
type=
"text"
size=
"small"
class=
"tab-btn"
>
添加样本图
</el-button>
type=
"text"
<el-button
@
click
.
stop
@
click=
"hitDetail(scope.row)"
type=
"text"
size=
"small"
class=
"tab-btn"
>
命中详情
</el-button>
size=
"small"
class=
"tab-btn"
>
编辑
</el-button>
<el-button
@
click
.
stop
@
click=
"deleteRow(scope.row)"
type=
"text"
size=
"small"
class=
"tab-btn"
>
删除
</el-button>
<el-button
@
click
.
stop
@
click=
"addSamplePic(scope.row)"
type=
"text"
size=
"small"
class=
"tab-btn"
>
添加样本图
</el-button>
<el-button
@
click
.
stop
@
click=
"hitDetail(scope.row)"
type=
"text"
size=
"small"
class=
"tab-btn"
>
命中详情
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<a-pagination
<a-pagination
v-model:current=
"pageNum"
v-model:pageSize=
"pageSize"
:total=
"total"
:show-total=
"total => `共 ${total} 条`"
:pageSizeOptions=
"['10', '20', '50']"
@
change=
"onPageNumChange"
@
showSizeChange=
"onPageSizeChange"
show-size-changer
show-quick-jumper
style=
"text-align:center"
/>
v-model:current=
"pageNum"
v-model:pageSize=
"pageSize"
:total=
"total"
:show-total=
"total => `共 ${total} 条`"
:pageSizeOptions=
"['10', '20', '50']"
@
change=
"onPageNumChange"
@
showSizeChange=
"onPageSizeChange"
show-size-changer
show-quick-jumper
style=
"text-align:center"
/>
</el-col>
</el-col>
<el-col
:span=
"17"
class=
"box boxRight"
>
<el-col
:span=
"17"
class=
"box boxRight"
>
<div
style=
"margin-bottom: 10px;min-height:350px"
>
<div
style=
"margin-bottom: 10px;min-height:350px"
>
...
@@ -82,10 +47,8 @@
...
@@ -82,10 +47,8 @@
<div>
注册样本图:{{regPictureList.length}}
</div>
<div>
注册样本图:{{regPictureList.length}}
</div>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"3"
v-for=
"item in regPictureList"
>
<el-col
:span=
"3"
v-for=
"item in regPictureList"
>
<div
style=
"cursor: pointer;"
class=
'hitBox'
@
click=
"clickPicture(item)"
:class=
"currentId==item.id?'active':''"
>
<div
style=
"cursor: pointer;"
class=
'hitBox'
@
click=
"clickPicture(item,0)"
:class=
"currentId==item.faceUnid?'active':''"
>
<el-image
:src=
"item.picture_url"
<el-image
:src=
"item.picture_url"
:fit=
"'fill'"
class=
"single-image"
>
:fit=
"'fill'"
class=
"single-image"
>
</el-image>
</el-image>
<span
class=
"el-icon-delete delHitPic"
@
click
.
stop
@
click=
"delSamplePic(item)"
></span>
<span
class=
"el-icon-delete delHitPic"
@
click
.
stop
@
click=
"delSamplePic(item)"
></span>
</div>
</div>
...
@@ -96,10 +59,8 @@
...
@@ -96,10 +59,8 @@
<p>
命中目标图:{{hitPictureList.length}}
</p>
<p>
命中目标图:{{hitPictureList.length}}
</p>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"3"
v-for=
"item in hitPictureList"
>
<el-col
:span=
"3"
v-for=
"item in hitPictureList"
>
<div
style=
"cursor: pointer;"
class=
'hitBox'
@
click=
"clickPicture(item)"
:class=
"currentId==item.id?'active':''"
>
<div
style=
"cursor: pointer;"
class=
'hitBox'
@
click=
"clickPicture(item,1)"
:class=
"currentId==item.faceUnid?'active':''"
>
<el-image
:src=
"item.picture_url"
<el-image
:src=
"item.picture_url"
:fit=
"'fill'"
class=
"single-image"
>
:fit=
"'fill'"
class=
"single-image"
>
</el-image>
</el-image>
<span
class=
"el-icon-delete delHitPic"
@
click
.
stop
@
click=
"delHitPic(item)"
></span>
<span
class=
"el-icon-delete delHitPic"
@
click
.
stop
@
click=
"delHitPic(item)"
></span>
</div>
</div>
...
@@ -110,21 +71,11 @@
...
@@ -110,21 +71,11 @@
</div>
</div>
<a-form
:model=
"hitSearchObj"
layout=
"inline"
:label-col=
"{ style: { width: 'auto' } }"
>
<a-form
:model=
"hitSearchObj"
layout=
"inline"
:label-col=
"{ style: { width: 'auto' } }"
>
<a-form-item
label=
"监控点:"
class=
"secondCondition"
>
<a-form-item
label=
"监控点:"
class=
"secondCondition"
>
<a-select
v-model:value=
"hitSearchObj.gate_id"
<a-select
v-model:value=
"hitSearchObj.gate_id"
style=
"width: 250px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"gateList"
optionFilterProp=
"label"
show-search
>
style=
"width: 250px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"gateList"
optionFilterProp=
"label"
show-search
>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
label=
"方向:"
class=
"secondCondition"
>
<a-form-item
label=
"方向:"
class=
"secondCondition"
>
<a-select
v-model:value=
"hitSearchObj.direction"
<a-select
v-model:value=
"hitSearchObj.direction"
mode=
"multiple"
:maxTagCount=
"1"
style=
"width: 125px"
>
mode=
"multiple"
:maxTagCount=
"1"
style=
"width: 125px"
>
<a-select-option
:value=
"1"
>
进
</a-select-option>
<a-select-option
:value=
"1"
>
进
</a-select-option>
<a-select-option
:value=
"-1"
>
出
</a-select-option>
<a-select-option
:value=
"-1"
>
出
</a-select-option>
</a-select>
</a-select>
...
@@ -133,11 +84,11 @@
...
@@ -133,11 +84,11 @@
<a-input
v-model:value=
"hitSearchObj.score"
style=
"width: 50px;"
></a-input>
<a-input
v-model:value=
"hitSearchObj.score"
style=
"width: 50px;"
></a-input>
</a-form-item>
</a-form-item>
<a-form-item
label=
"选择日期:"
class=
"secondCondition"
>
<a-form-item
label=
"选择日期:"
class=
"secondCondition"
>
<a-date-picker
v-model:value=
"hitSearchObj.date"
:format=
"'YYYY-MM-DD'"
style=
"width: 110px"
/>
<a-date-picker
v-model:value=
"hitSearchObj.date"
:format=
"'YYYY-MM-DD'"
style=
"width: 110px"
/>
</a-form-item>
</a-form-item>
<a-form-item
label=
"选择时间:"
class=
"secondCondition"
>
<a-form-item
label=
"选择时间:"
class=
"secondCondition"
>
<a-time-picker
v-model:value=
"hitSearchObj.startTime"
style=
"width: 90px"
/>
<a-time-picker
v-model:value=
"hitSearchObj.startTime"
style=
"width: 90px"
/>
<a-time-picker
v-model:value=
"hitSearchObj.endTime"
style=
"width: 90px"
/>
<a-time-picker
v-model:value=
"hitSearchObj.endTime"
style=
"width: 90px"
/>
</a-form-item>
</a-form-item>
<a-form-item
class=
"secondCondition"
>
<a-form-item
class=
"secondCondition"
>
<a-button
type=
"primary"
style=
"margin-right: 5px;"
@
click=
"searchPicture"
>
查询
</a-button>
<a-button
type=
"primary"
style=
"margin-right: 5px;"
@
click=
"searchPicture"
>
查询
</a-button>
...
@@ -149,9 +100,7 @@
...
@@ -149,9 +100,7 @@
<el-row
:gutter=
"10"
class=
"identifyResultTable"
:style=
"{height:contentHeight-340+'px'}"
>
<el-row
:gutter=
"10"
class=
"identifyResultTable"
:style=
"{height:contentHeight-340+'px'}"
>
<el-col
:span=
"3"
v-for=
"item in identifyResultList"
>
<el-col
:span=
"3"
v-for=
"item in identifyResultList"
>
<div
class=
"pictureBox"
>
<div
class=
"pictureBox"
>
<el-image
:src=
"item.picture_url"
<el-image
:src=
"item.picture_url"
:fit=
"'fill'"
class=
"single-image"
>
:fit=
"'fill'"
class=
"single-image"
>
</el-image>
</el-image>
<span
class=
"score"
>
{{item.featureNum}}
</span>
<span
class=
"score"
>
{{item.featureNum}}
</span>
<div
class=
"btnPic"
>
<div
class=
"btnPic"
>
...
@@ -166,339 +115,321 @@
...
@@ -166,339 +115,321 @@
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<a-pagination
<a-pagination
v-model:current=
"pageNum_identify"
v-model:pageSize=
"pageSize_identify"
:total=
"total_identify"
:show-total=
"total => `共 ${total_identify} 条`"
:pageSizeOptions=
"['16', '32', '64']"
@
change=
"onPageNumChange_identify"
@
showSizeChange=
"onPageSizeChange_identify"
v-model:current=
"pageNum_identify"
show-size-changer
show-quick-jumper
style=
"text-align:center"
/>
v-model:pageSize=
"pageSize_identify"
:total=
"total_identify"
:show-total=
"total => `共 ${total_identify} 条`"
:pageSizeOptions=
"['16', '32', '64']"
@
change=
"onPageNumChange_identify"
@
showSizeChange=
"onPageSizeChange_identify"
show-size-changer
show-quick-jumper
style=
"text-align:center"
/>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<addPersonConfig
ref=
"addPersonConfigRef"
@
refreshParentTable =
'confirmSearch'
></addPersonConfig>
<addPersonConfig
ref=
"addPersonConfigRef"
@
refreshParentTable=
'confirmSearch'
></addPersonConfig>
<editPersonConfig
ref=
"addSamplePicConfigRef"
@
refreshParentTable =
'confirmSearch'
></editPersonConfig>
<editPersonConfig
ref=
"addSamplePicConfigRef"
@
refreshParentTable=
'confirmSearch'
></editPersonConfig>
<hitDetailDialog
ref=
"hitDetailDialogRef"
@
refreshParentTable =
'confirmSearch'
></hitDetailDialog>
<hitDetailDialog
ref=
"hitDetailDialogRef"
@
refreshParentTable=
'confirmSearch'
></hitDetailDialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
reactive
,
ref
,
toRaw
}
from
"vue"
;
reactive
,
import
moment
from
"moment"
;
ref
,
import
snapshotRecordApi
from
"@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi"
;
toRaw
import
{
isArray
}
from
"@/PublicUtil/Judgment"
;
}
from
'vue'
import
{
import
moment
from
'moment'
import
snapshotRecordApi
from
'@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
{
filterEmptyValueInObject
,
filterEmptyValueInObject
,
formatDate
,
formatDate
,
formatTime
formatTime
,
}
from
'@/PublicUtil/PublicUtil'
}
from
"@/PublicUtil/PublicUtil"
;
import
FeatureMatchingAccuracyApi
from
'@/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi'
import
FeatureMatchingAccuracyApi
from
"@/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi"
;
import
{
import
{
PlusOutlined
}
from
"@ant-design/icons-vue"
;
PlusOutlined
import
addPersonConfig
from
"./addPerson.vue"
;
}
from
'@ant-design/icons-vue'
import
editPersonConfig
from
"./editPerson.vue"
;
import
addPersonConfig
from
'./addPerson.vue'
import
hitDetailDialog
from
"./hitDetailDialog.vue"
;
import
editPersonConfig
from
'./editPerson.vue'
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
hitDetailDialog
from
'./hitDetailDialog.vue'
export
default
{
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
components
:
{
export
default
{
components
:{
addPersonConfig
,
addPersonConfig
,
editPersonConfig
,
editPersonConfig
,
hitDetailDialog
hitDetailDialog
,
},
},
setup
()
{
setup
()
{
const
accountList
=
ref
([])
const
accountList
=
ref
([]);
const
plazaList
=
ref
([])
const
plazaList
=
ref
([]);
const
queryForm
=
reactive
({
const
queryForm
=
reactive
({
account_id
:
''
,
account_id
:
""
,
plaza_id
:
''
,
plaza_id
:
""
,
})
});
const
hitSearchObj
=
reactive
({
const
hitSearchObj
=
reactive
({
gate_id
:
[],
gate_id
:
[],
score
:
75
,
score
:
75
,
direction
:
[
1
,
-
1
],
direction
:
[
1
,
-
1
],
date
:
moment
(
moment
().
format
(
'YYYY-MM-DD'
),
'YYYY-MM-DD'
),
date
:
moment
(
moment
().
format
(
"YYYY-MM-DD"
),
"YYYY-MM-DD"
),
startTime
:
moment
(
'00:00:00'
,
'HH:mm:ss'
),
startTime
:
moment
(
"00:00:00"
,
"HH:mm:ss"
),
endTime
:
moment
(
'23:59:59'
,
'HH:mm:ss'
),
endTime
:
moment
(
"23:59:59"
,
"HH:mm:ss"
),
})
});
const
onAccountChange
=
function
()
{
const
onAccountChange
=
function
()
{
getPlazaList
()
getPlazaList
();
}
};
// 获取商场门店
// 获取商场门店
const
getPlazaList
=
function
()
{
const
getPlazaList
=
function
()
{
queryForm
.
plaza_id
=
''
queryForm
.
plaza_id
=
""
;
plazaList
.
value
=
[]
plazaList
.
value
=
[];
snapshotRecordApi
.
getPlazaList
({
snapshotRecordApi
account_id
:
queryForm
.
account_id
.
getPlazaList
({
}).
then
(
account_id
:
queryForm
.
account_id
,
(
r
)
=>
{
})
.
then
((
r
)
=>
{
if
(
isArray
(
r
))
{
if
(
isArray
(
r
))
{
for
(
const
item
of
r
)
{
for
(
const
item
of
r
)
{
plazaList
.
value
.
push
({
plazaList
.
value
.
push
({
value
:
item
.
id
,
value
:
item
.
id
,
label
:
item
.
name
,
label
:
item
.
name
,
})
});
}
queryForm
.
plaza_id
=
r
[
0
].
id
getGateList
()
confirmSearch
()
}
}
}
)
queryForm
.
plaza_id
=
r
[
0
].
id
;
getGateList
();
confirmSearch
();
}
}
});
};
// 获取集团
// 获取集团
const
getAccountList
=
function
()
{
const
getAccountList
=
function
()
{
queryForm
.
account_id
=
''
queryForm
.
account_id
=
""
;
accountList
.
value
=
[]
accountList
.
value
=
[];
snapshotRecordApi
.
getAccountList
().
then
(
snapshotRecordApi
.
getAccountList
().
then
((
r
)
=>
{
(
r
)
=>
{
if
(
isArray
(
r
))
{
if
(
isArray
(
r
))
{
for
(
const
item
of
r
)
{
for
(
const
item
of
r
)
{
accountList
.
value
.
push
({
accountList
.
value
.
push
({
value
:
item
.
id
,
value
:
item
.
id
,
label
:
item
.
name
,
label
:
item
.
name
,
})
});
}
queryForm
.
account_id
=
r
[
0
].
id
getPlazaList
()
}
}
)
}
}
const
onMallChange
=
function
(){
queryForm
.
account_id
=
r
[
0
].
id
;
getGateList
()
getPlazaList
();
}
}
const
gateList
=
ref
([])
});
};
const
onMallChange
=
function
()
{
getGateList
();
};
const
gateList
=
ref
([]);
// 获取监控点
// 获取监控点
const
getGateList
=
function
()
{
const
getGateList
=
function
()
{
hitSearchObj
.
gate_id
=
[]
hitSearchObj
.
gate_id
=
[];
gateList
.
value
=
[]
gateList
.
value
=
[];
snapshotRecordApi
.
getGateList
(
snapshotRecordApi
{
.
getGateList
(
{
account_id
:
queryForm
.
account_id
,
account_id
:
queryForm
.
account_id
,
plaza_id
:
queryForm
.
plaza_id
,
plaza_id
:
queryForm
.
plaza_id
,
type
:
0
,
type
:
0
,
}
})
).
then
(
.
then
((
r
)
=>
{
(
r
)
=>
{
if
(
isArray
(
r
.
data
))
{
if
(
isArray
(
r
.
data
))
for
(
const
item
of
r
.
data
)
{
{
gateList
.
value
.
push
({
for
(
const
item
of
r
.
data
)
{
gateList
.
value
.
push
(
{
value
:
item
.
id
,
value
:
item
.
id
,
label
:
item
.
name
,
label
:
item
.
name
,
});
}
}
)
}
}
}
)
}
}
const
resultList
=
ref
([])
});
const
confirmSearch
=
function
()
{
};
const
resultList
=
ref
([]);
const
confirmSearch
=
function
()
{
pageNum
.
value
=
1
;
pageNum
.
value
=
1
;
getTableData
()
getTableData
();
}
};
// 获取注册人员列表
// 获取注册人员列表
const
getTableData
=
function
(){
const
getTableData
=
function
()
{
resultList
.
value
=
[]
resultList
.
value
=
[];
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
({
{
pageNum
:
pageNum
.
value
-
1
,
pageNum
:
pageNum
.
value
-
1
,
pageSize
:
pageSize
.
value
,
pageSize
:
pageSize
.
value
,
accountId
:
queryForm
.
account_id
,
accountId
:
queryForm
.
account_id
,
mallId
:
queryForm
.
plaza_id
mallId
:
queryForm
.
plaza_id
,
}
});
)
FeatureMatchingAccuracyApi
.
getMatch
(
data
).
then
((
r
)
=>
{
FeatureMatchingAccuracyApi
.
getMatch
(
data
).
then
(
if
(
r
.
msg_code
==
200
)
{
(
r
)
=>
{
if
(
r
.
msg_code
==
200
){
resultList
.
value
=
r
.
data
.
records
;
resultList
.
value
=
r
.
data
.
records
;
total
.
value
=
r
.
data
.
total
;
total
.
value
=
r
.
data
.
total
;
}
}
}
});
)
};
}
const
onPageNumChange
=
function
(
num
)
{
const
onPageNumChange
=
function
(
num
)
{
pageNum
.
value
=
num
pageNum
.
value
=
num
;
confirmSearch
()
confirmSearch
();
}
};
const
onPageSizeChange
=
function
(
current
,
size
)
{
const
onPageSizeChange
=
function
(
current
,
size
)
{
pageNum
.
value
=
1
pageNum
.
value
=
1
;
pageSize
.
value
=
size
pageSize
.
value
=
size
;
confirmSearch
()
confirmSearch
();
}
};
const
isLoading
=
ref
(
false
)
const
isLoading
=
ref
(
false
);
const
pageNum
=
ref
(
1
)
const
pageNum
=
ref
(
1
);
const
pageSize
=
ref
(
10
)
const
pageSize
=
ref
(
10
);
const
total
=
ref
()
const
total
=
ref
();
const
contentHeight
=
ref
(
0
)
const
contentHeight
=
ref
(
0
);
const
addPersonConfigRef
=
ref
();
const
addPersonConfigRef
=
ref
();
// 新增注册人员弹窗
// 新增注册人员弹窗
const
addPersonFun
=
function
()
{
const
addPersonFun
=
function
()
{
addPersonConfigRef
.
value
.
initDialog
({
addPersonConfigRef
.
value
.
initDialog
({
account_id
:
queryForm
.
account_id
,
account_id
:
queryForm
.
account_id
,
plaza_id
:
queryForm
.
plaza_id
,
plaza_id
:
queryForm
.
plaza_id
,
type
:
'add'
type
:
"add"
,
});
});
}
};
// 编辑人员弹窗
// 编辑人员弹窗
const
editRow
=
function
(
row
)
{
const
editRow
=
function
(
row
)
{
addPersonConfigRef
.
value
.
initDialog
({
addPersonConfigRef
.
value
.
initDialog
({
account_id
:
row
.
accountId
,
account_id
:
row
.
accountId
,
plaza_id
:
row
.
mallId
,
plaza_id
:
row
.
mallId
,
type
:
'edit'
,
type
:
"edit"
,
name
:
row
.
name
,
name
:
row
.
name
,
description
:
row
.
description
,
description
:
row
.
description
,
id
:
row
.
id
,
id
:
row
.
id
,
});
});
}
};
// 删除人员
// 删除人员
const
deleteRow
=
function
(
row
)
{
const
deleteRow
=
function
(
row
)
{
ElMessageBox
.
confirm
(
'此操作将永久删除该文件, 是否继续?'
,
'提示'
,
{
ElMessageBox
.
confirm
(
"此操作将永久删除该文件, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
"取消"
,
type
:
'warning'
,
type
:
"warning"
,
}).
then
(()
=>
{
}).
then
(()
=>
{
isLoading
.
value
=
true
;
isLoading
.
value
=
true
;
FeatureMatchingAccuracyApi
.
delMatch
(
row
).
then
(
FeatureMatchingAccuracyApi
.
delMatch
(
row
).
then
((
r
)
=>
{
(
r
)
=>
{
isLoading
.
value
=
false
;
isLoading
.
value
=
false
;
if
(
r
.
msg_code
==
200
)
{
if
(
r
.
msg_code
==
200
)
{
ElMessage
({
ElMessage
({
message
:
r
.
msg_info
,
message
:
r
.
msg_info
,
type
:
'success'
type
:
"success"
,
})
});
confirmSearch
()
confirmSearch
();
}
else
{
}
else
{
ElMessage
({
ElMessage
({
message
:
r
.
msg_info
,
message
:
r
.
msg_info
,
type
:
'error'
type
:
"error"
,
})
});
return
false
;
return
false
;
}
}
}
});
)
});
})
};
}
// 命中详情
// 命中详情
const
hitDetailDialogRef
=
ref
()
const
hitDetailDialogRef
=
ref
();
const
hitDetail
=
function
(
row
){
const
hitDetail
=
function
(
row
)
{
const
data
=
filterEmptyValueInObject
(
const
data
=
filterEmptyValueInObject
({
{
accountId
:
row
.
accountId
,
accountId
:
row
.
accountId
,
mallId
:
row
.
mallId
,
mallId
:
row
.
mallId
,
id
:
row
.
id
id
:
row
.
id
,
}
});
)
FeatureMatchingAccuracyApi
.
getMatchHitDetail
(
data
).
then
((
r
)
=>
{
FeatureMatchingAccuracyApi
.
getMatchHitDetail
(
data
).
then
(
if
(
r
.
msg_code
==
200
)
{
(
r
)
=>
{
let
checkPersonId
=
""
;
if
(
r
.
msg_code
==
200
){
r
.
data
.
forEach
((
item
)
=>
{
let
checkPersonId
=
''
if
(
item
.
personId
==
row
.
personUnid
)
{
r
.
data
.
forEach
(
item
=>
{
if
(
item
.
personId
==
row
.
personUnid
){
checkPersonId
=
item
.
personId
;
checkPersonId
=
item
.
personId
;
}
}
item
.
expand
=
false
;
item
.
expand
=
false
;
item
.
records
.
forEach
(
record
=>
{
item
.
records
.
forEach
((
record
)
=>
{
record
.
picture_url
=
window
.
_baseImgUrl
+
'picture/'
+
record
.
bodyPath
+
record
.
bodyPic
record
.
picture_url
=
})
window
.
_baseImgUrl
+
})
"picture/"
+
record
.
bodyPath
+
record
.
bodyPic
;
});
});
hitDetailDialogRef
.
value
.
initDialog
({
hitDetailDialogRef
.
value
.
initDialog
({
regId
:
row
.
id
,
regId
:
row
.
id
,
data
:
r
.
data
,
data
:
r
.
data
,
checkPersonId
:
checkPersonId
checkPersonId
:
checkPersonId
,
})
});
}
}
)
}
}
});
};
// 添加注册样本图
// 添加注册样本图
const
addSamplePicConfigRef
=
ref
();
const
addSamplePicConfigRef
=
ref
();
const
addSamplePic
=
function
(
row
)
{
const
addSamplePic
=
function
(
row
)
{
FeatureMatchingAccuracyApi
.
getMatchOne
(
row
).
then
(
console
.
log
(
row
,
'888888'
)
(
r
)
=>
{
FeatureMatchingAccuracyApi
.
getMatchOne
(
row
).
then
(
(
r
)
=>
{
if
(
r
.
msg_code
==
200
)
{
if
(
r
.
msg_code
==
200
)
{
addSamplePicConfigRef
.
value
.
initDialog
(
r
.
data
);
addSamplePicConfigRef
.
value
.
initDialog
(
r
.
data
);
}
else
{
}
else
{
ElMessage
({
ElMessage
({
message
:
r
.
msg_info
,
message
:
r
.
msg_info
,
type
:
'error'
type
:
"error"
,
})
});
return
false
;
return
false
;
}
}
}
});
)
};
}
// 注册样本图
// 注册样本图
const
regPictureList
=
ref
([])
const
regPictureList
=
ref
([]);
const
hitPictureList
=
ref
([])
const
hitPictureList
=
ref
([]);
const
regPersonId
=
ref
()
const
regPersonId
=
ref
();
const
redPersonObj
=
ref
({})
const
redPersonObj
=
ref
({});
// 点击行获取注册样本图和命中目标
// 点击行获取注册样本图和命中目标
const
clickRow
=
function
(
row
)
{
const
clickRow
=
function
(
row
)
{
isLoading
.
value
=
true
;
isLoading
.
value
=
true
;
redPersonObj
.
value
=
row
;
redPersonObj
.
value
=
row
;
regPersonId
.
value
=
row
.
id
;
regPersonId
.
value
=
row
.
id
;
regPictureList
.
value
=
[]
regPictureList
.
value
=
[];
hitPictureList
.
value
=
[]
hitPictureList
.
value
=
[];
FeatureMatchingAccuracyApi
.
getMatchOne
(
row
).
then
(
FeatureMatchingAccuracyApi
.
getMatchOne
(
row
).
then
((
r
)
=>
{
(
r
)
=>
{
isLoading
.
value
=
false
;
isLoading
.
value
=
false
;
if
(
r
.
msg_code
==
200
){
if
(
r
.
msg_code
==
200
)
{
if
(
r
.
data
.
faceList
&&
r
.
data
.
faceList
.
length
>
0
){
if
(
r
.
data
.
faceList
&&
r
.
data
.
faceList
.
length
>
0
)
{
r
.
data
.
faceList
.
forEach
(
item
=>
{
r
.
data
.
faceList
.
forEach
((
item
)
=>
{
item
.
picture_url
=
window
.
_baseImgUrl
+
'tool/picture/'
+
item
.
bodyPath
+
item
.
bodyPic
item
.
picture_url
=
})
window
.
_baseImgUrl
+
regPictureList
.
value
=
r
.
data
.
faceList
"tool/picture/"
+
item
.
picUrl
}
// item.bodyPath +
if
(
r
.
data
.
hitList
&&
r
.
data
.
hitList
.
length
>
0
){
// item.bodyPic;
r
.
data
.
hitList
.
forEach
(
item
=>
{
});
item
.
picture_url
=
window
.
_baseImgUrl
+
'tool/picture/'
+
item
.
bodyPath
+
item
.
bodyPic
regPictureList
.
value
=
r
.
data
.
faceList
;
})
console
.
log
(
regPictureList
.
value
)
hitPictureList
.
value
=
r
.
data
.
hitList
}
}
if
(
r
.
data
.
hitList
&&
r
.
data
.
hitList
.
length
>
0
)
{
r
.
data
.
hitList
.
forEach
((
item
)
=>
{
}
item
.
picture_url
=
window
.
_baseImgUrl
+
"tool/picture/"
+
item
.
picUrl
// item.bodyPath +
// item.bodyPic;
});
hitPictureList
.
value
=
r
.
data
.
hitList
;
}
}
)
}
}
});
};
// 识别结果
// 识别结果
const
identifyResultList
=
ref
([])
const
identifyResultList
=
ref
([]);
const
pageNum_identify
=
ref
(
1
)
const
pageNum_identify
=
ref
(
1
);
const
pageSize_identify
=
ref
(
10
)
const
pageSize_identify
=
ref
(
10
);
const
total_identify
=
ref
(
0
)
const
total_identify
=
ref
(
0
);
const
onPageNumChange_identify
=
function
(
num
)
{
const
onPageNumChange_identify
=
function
(
num
)
{
pageNum_identify
.
value
=
num
pageNum_identify
.
value
=
num
;
clickPicture
()
// clickPicture();
}
clickPicture
({
faceUnid
:
currentId
.
value
});
};
const
onPageSizeChange_identify
=
function
(
current
,
size
)
{
const
onPageSizeChange_identify
=
function
(
current
,
size
)
{
pageNum_identify
.
value
=
1
pageNum_identify
.
value
=
1
;
pageSize_identify
.
value
=
size
pageSize_identify
.
value
=
size
;
clickPicture
()
// clickPicture();
}
clickPicture
({
faceUnid
:
currentId
.
value
});
const
currentId
=
ref
()
};
const
currentId
=
ref
();
// 点击图片以图搜图
// 点击图片以图搜图
const
clickPicture
=
function
(
row
){
const
clickPicture
=
function
(
row
,
type
)
{
const
rawData
=
toRaw
(
hitSearchObj
)
console
.
log
(
row
,
'5555'
)
let
types
=
null
if
(
type
===
0
){
types
=
0
}
else
if
(
type
===
1
){
types
=
1
}
const
rawData
=
toRaw
(
hitSearchObj
);
// if(rawData.gate_id.length<1){
// if(rawData.gate_id.length<1){
// ElMessage({
// ElMessage({
// message: '请选择监控点',
// message: '请选择监控点',
...
@@ -506,7 +437,8 @@
...
@@ -506,7 +437,8 @@
// })
// })
// return false;
// return false;
// }
// }
currentId
.
value
=
row
.
id
currentId
.
value
=
row
.
faceUnid
||
row
.
unid
;
// currentId.value = row.id;
isLoading
.
value
=
true
;
isLoading
.
value
=
true
;
let
data
=
filterEmptyValueInObject
({
let
data
=
filterEmptyValueInObject
({
accountId
:
queryForm
.
account_id
,
accountId
:
queryForm
.
account_id
,
...
@@ -514,41 +446,46 @@
...
@@ -514,41 +446,46 @@
gateId
:
rawData
.
gate_id
.
toString
(),
gateId
:
rawData
.
gate_id
.
toString
(),
score
:
rawData
.
score
,
score
:
rawData
.
score
,
direction
:
rawData
.
direction
.
toString
(),
direction
:
rawData
.
direction
.
toString
(),
startTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
startTime
),
startTime
:
endTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
endTime
),
formatDate
(
rawData
.
date
)
+
" "
+
formatTime
(
rawData
.
startTime
),
faceId
:
currentId
.
value
,
endTime
:
formatDate
(
rawData
.
date
)
+
" "
+
formatTime
(
rawData
.
endTime
),
// faceId: currentId.value,
faceUnid
:
currentId
.
value
,
type
:
types
,
page
:
pageNum_identify
.
value
-
1
,
page
:
pageNum_identify
.
value
-
1
,
pageSize
:
pageSize_identify
.
value
,
pageSize
:
pageSize_identify
.
value
,
regId
:
regPersonId
.
value
regId
:
regPersonId
.
value
,
})
});
FeatureMatchingAccuracyApi
.
getSearchByPic
(
data
).
then
(
FeatureMatchingAccuracyApi
.
getSearchByPic
(
data
).
then
((
r
)
=>
{
(
r
)
=>
{
isLoading
.
value
=
false
;
isLoading
.
value
=
false
;
if
(
r
.
msg_code
==
200
)
{
if
(
r
.
msg_code
==
200
)
{
console
.
log
(
r
.
data
.
records
)
console
.
log
(
r
.
data
.
records
);
r
.
data
.
records
.
forEach
(
item
=>
{
r
.
data
.
records
.
forEach
((
item
)
=>
{
item
.
checked
=
false
;
item
.
checked
=
false
;
item
.
featureNum
=
item
.
featureNum
.
toFixed
(
2
)
item
.
featureNum
=
item
.
featureNum
.
toFixed
(
2
);
item
.
picture_url
=
window
.
_baseImgUrl
+
'picture/'
+
item
.
picture_path
+
item
.
picture_url
item
.
picture_url
=
})
window
.
_baseImgUrl
+
identifyResultList
.
value
=
r
.
data
.
records
"picture/"
+
total_identify
.
value
=
r
.
data
.
total
item
.
picture_path
+
}
item
.
picture_url
;
}
});
)
identifyResultList
.
value
=
r
.
data
.
records
;
total_identify
.
value
=
r
.
data
.
total
;
}
}
const
searchPicture
=
function
(){
});
if
(
!
currentId
.
value
){
};
const
searchPicture
=
function
()
{
if
(
!
currentId
.
value
)
{
ElMessage
({
ElMessage
({
message
:
'请选择样本图'
,
message
:
"请选择样本图"
,
type
:
'warning'
type
:
"warning"
,
})
});
return
false
;
return
false
;
}
}
clickPicture
({
id
:
currentId
.
value
})
clickPicture
({
faceUnid
:
currentId
.
value
});
}
};
// 选中命中目标
// 选中命中目标
const
checkPicture
=
function
(
resData
)
{
const
checkPicture
=
function
(
resData
)
{
// let checkList = []
// let checkList = []
// identifyResultList.value.forEach(item=>{
// identifyResultList.value.forEach(item=>{
// if(item.checked==true){
// if(item.checked==true){
...
@@ -571,70 +508,67 @@
...
@@ -571,70 +508,67 @@
// }
// }
isLoading
.
value
=
true
;
isLoading
.
value
=
true
;
FeatureMatchingAccuracyApi
.
addMatchHit
({
FeatureMatchingAccuracyApi
.
addMatchHit
({
id
:
regPersonId
.
value
,
id
:
regPersonId
.
value
,
faceIds
:[
resData
.
id
]
// faceIds: [resData.id],
}).
then
(
faceUnids
:
[
resData
.
unid
],
(
r
)
=>
{
}).
then
(
(
r
)
=>
{
isLoading
.
value
=
false
;
isLoading
.
value
=
false
;
if
(
r
.
msg_code
==
200
)
{
if
(
r
.
msg_code
==
200
)
{
ElMessage
({
ElMessage
({
message
:
r
.
msg_info
,
message
:
r
.
msg_info
,
type
:
'success'
type
:
"success"
,
})
});
getTableData
()
getTableData
();
clickRow
(
redPersonObj
.
value
)
clickRow
(
redPersonObj
.
value
);
searchPicture
()
searchPicture
();
}
}
)
}
}
});
};
// 删除命中目标图片
// 删除命中目标图片
const
delHitPic
=
function
(
row
)
{
const
delHitPic
=
function
(
row
)
{
FeatureMatchingAccuracyApi
.
delMatchHit
({
FeatureMatchingAccuracyApi
.
delMatchHit
({
regId
:
regPersonId
.
value
,
regId
:
regPersonId
.
value
,
faceId
:
row
.
id
// faceId: row.id,
}).
then
(
faceUnid
:
row
.
faceUnid
,
(
r
)
=>
{
}).
then
(
(
r
)
=>
{
isLoading
.
value
=
false
;
isLoading
.
value
=
false
;
if
(
r
.
msg_code
==
200
)
{
if
(
r
.
msg_code
==
200
)
{
ElMessage
({
ElMessage
({
message
:
r
.
msg_info
,
message
:
r
.
msg_info
,
type
:
'success'
type
:
"success"
,
})
});
getTableData
()
getTableData
();
clickRow
(
redPersonObj
.
value
)
clickRow
(
redPersonObj
.
value
);
searchPicture
()
searchPicture
();
}
}
)
}
}
});
};
// 删除样本图片
// 删除样本图片
const
delSamplePic
=
function
(
row
)
{
const
delSamplePic
=
function
(
row
)
{
FeatureMatchingAccuracyApi
.
delMatchSample
({
FeatureMatchingAccuracyApi
.
delMatchSample
({
regId
:
regPersonId
.
value
,
regId
:
regPersonId
.
value
,
faceId
:
row
.
id
// faceId: row.id,
}).
then
(
faceUnid
:
row
.
faceUnid
(
r
)
=>
{
}).
then
(
(
r
)
=>
{
isLoading
.
value
=
false
;
isLoading
.
value
=
false
;
if
(
r
.
msg_code
==
200
)
{
if
(
r
.
msg_code
==
200
)
{
ElMessage
({
ElMessage
({
message
:
r
.
msg_info
,
message
:
r
.
msg_info
,
type
:
'success'
type
:
"success"
,
})
});
getTableData
()
getTableData
();
clickRow
(
redPersonObj
.
value
)
clickRow
(
redPersonObj
.
value
);
}
}
)
}
const
getIndex
=
function
(
val
)
{
return
(
pageNum
.
value
-
1
)
*
pageSize
.
value
+
val
+
1
}
const
__main
=
function
()
{
contentHeight
.
value
=
window
.
innerHeight
-
200
getAccountList
()
}
}
__main
()
});
};
const
getIndex
=
function
(
val
)
{
return
(
pageNum
.
value
-
1
)
*
pageSize
.
value
+
val
+
1
;
};
const
__main
=
function
()
{
contentHeight
.
value
=
window
.
innerHeight
-
200
;
getAccountList
();
};
__main
();
return
{
return
{
// sequence
// sequence
isLoading
,
isLoading
,
...
@@ -649,7 +583,7 @@
...
@@ -649,7 +583,7 @@
addSamplePicConfigRef
,
addSamplePicConfigRef
,
hitSearchObj
,
hitSearchObj
,
gateList
,
gateList
,
activeKey
:
ref
(
'1'
),
activeKey
:
ref
(
"1"
),
regPictureList
,
regPictureList
,
pageNum_identify
,
pageNum_identify
,
pageSize_identify
,
pageSize_identify
,
...
@@ -678,42 +612,42 @@
...
@@ -678,42 +612,42 @@
delHitPic
,
delHitPic
,
hitDetail
,
hitDetail
,
delSamplePic
,
delSamplePic
,
addSamplePic
addSamplePic
,
}
};
}
},
}
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.active
{
.active
{
border
:
2px
solid
#40a9ff
border
:
2px
solid
#40a9ff
;
}
}
.regBox
{
.regBox
{
height
:
300px
;
height
:
300px
;
overflow-y
:
auto
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
overflow-x
:
hidden
;
}
}
.hitBox
{
.hitBox
{
position
:
relative
;
position
:
relative
;
}
}
.delHitPic
{
.delHitPic
{
position
:
absolute
;
position
:
absolute
;
right
:
0
;
right
:
0
;
top
:
0
;
top
:
0
;
color
:
#1890ff
;
color
:
#1890ff
;
font-size
:
28px
;
font-size
:
28px
;
}
}
.secondCondition
{
.secondCondition
{
margin-right
:
5px
!important
;
margin-right
:
5px
!important
;
}
}
.identifyResultTable
{
.identifyResultTable
{
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
.pictureBox
{
.pictureBox
{
position
:
relative
;
position
:
relative
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.btnPic
{
.btnPic
{
display
:
none
;
display
:
none
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
...
@@ -721,14 +655,14 @@
...
@@ -721,14 +655,14 @@
left
:
0
;
left
:
0
;
bottom
:
0
;
bottom
:
0
;
margin
:
auto
;
margin
:
auto
;
}
}
.pictureBox
:hover
.btnPic
{
.pictureBox
:hover
.btnPic
{
display
:
block
;
display
:
block
;
width
:
100px
;
width
:
100px
;
height
:
100px
;
height
:
100px
;
}
}
.checkBox
{
.checkBox
{
width
:
100px
;
width
:
100px
;
height
:
30px
;
height
:
30px
;
margin-left
:
0
!important
;
margin-left
:
0
!important
;
...
@@ -736,51 +670,51 @@
...
@@ -736,51 +670,51 @@
//
position
:
absolute
;
//
position
:
absolute
;
//
left
:
1px
;
//
left
:
1px
;
//
top
:
0
;
//
top
:
0
;
}
}
.score
{
.score
{
position
:
absolute
;
position
:
absolute
;
right
:
10px
;
right
:
10px
;
top
:
0
;
top
:
0
;
color
:
red
;
color
:
red
;
font-weight
:
900
;
font-weight
:
900
;
font-size
:
18px
;
font-size
:
18px
;
}
}
.iconPic
{
.iconPic
{
position
:
absolute
;
position
:
absolute
;
right
:
0px
;
right
:
0px
;
top
:
0px
;
top
:
0px
;
color
:
#1890ff
;
color
:
#1890ff
;
font-size
:
28px
;
font-size
:
28px
;
}
}
.single-image
{
.single-image
{
width
:
100%
;
width
:
100%
;
height
:
200px
;
height
:
200px
;
}
}
.containter
{
.containter
{
height
:
100%
;
height
:
100%
;
}
}
.contentBox
{
.contentBox
{
height
:
100%
;
height
:
100%
;
}
}
.box
{
.box
{
height
:
100%
;
height
:
100%
;
}
}
.boxRight
{
.boxRight
{
border-left
:
5px
solid
#ccc
;
border-left
:
5px
solid
#ccc
;
padding-left
:
5px
;
padding-left
:
5px
;
}
}
.btns
{
.btns
{
text-align
:
right
;
text-align
:
right
;
margin-top
:
10px
;
margin-top
:
10px
;
margin-right
:
15px
;
margin-right
:
15px
;
}
}
.btn
{
.btn
{
margin-left
:
10px
;
margin-left
:
10px
;
}
}
</
style
>
</
style
>
src/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi.js
View file @
6fc26db
...
@@ -67,7 +67,7 @@ class FeatureMatchingAccuracy {
...
@@ -67,7 +67,7 @@ class FeatureMatchingAccuracy {
return
axiosInstance
.
request
(
return
axiosInstance
.
request
(
{
{
method
:
'DELETE'
,
method
:
'DELETE'
,
url
:
`/feature/match/hit/
${
data
.
regId
}
/
${
data
.
face
I
d
}
`
,
url
:
`/feature/match/hit/
${
data
.
regId
}
/
${
data
.
face
Uni
d
}
`
,
}
}
)
)
}
}
...
@@ -92,7 +92,7 @@ class FeatureMatchingAccuracy {
...
@@ -92,7 +92,7 @@ class FeatureMatchingAccuracy {
return
axiosInstance
.
request
(
return
axiosInstance
.
request
(
{
{
method
:
'DELETE'
,
method
:
'DELETE'
,
url
:
`/feature/match/
${
data
.
regId
}
/
${
data
.
face
I
d
}
`
,
url
:
`/feature/match/
${
data
.
regId
}
/
${
data
.
face
Uni
d
}
`
,
}
}
)
)
}
}
...
...
src/views/FeatureMatchingAccuracy/editPerson.vue
View file @
6fc26db
<
template
>
<
template
>
<a-modal
<a-modal
title=
"添加注册样本图"
v-model:visible=
"isVisible"
width=
"1500px"
:dialog-style=
"
{ top: '20px',height:'90%' }" class="detail-modal" @cancel='onCancel()'>
title=
"添加注册样本图"
v-model:visible=
"isVisible"
width=
"1500px"
:dialog-style=
"
{ top: '20px',height:'90%' }"
class="detail-modal"
@cancel = 'onCancel()'
>
<div
style=
"height: 700px;"
>
<div
style=
"height: 700px;"
>
<a-form
:model=
"formObj"
layout=
"inline"
:label-col=
"
{ style: { width: '100px' } }">
<a-form
:model=
"formObj"
layout=
"inline"
:label-col=
"
{ style: { width: '100px' } }">
<a-form-item
class=
"pictures"
>
<a-form-item
class=
"pictures"
>
<a-tabs
type=
"card"
v-model:activeKey=
"activeKey"
>
<a-tabs
type=
"card"
v-model:activeKey=
"activeKey"
>
<a-tab-pane
key=
"1"
tab=
"本地上传"
>
<a-tab-pane
key=
"1"
tab=
"本地上传"
>
<a-upload
<a-upload
:file-list=
"fileList"
:remove=
"handleRemove"
:before-upload=
"beforeUpload"
:multiple=
"false"
>
:file-list=
"fileList"
:remove=
"handleRemove"
:before-upload=
"beforeUpload"
:multiple=
"false"
>
<a-button>
<a-button>
<upload-outlined></upload-outlined>
<upload-outlined></upload-outlined>
上传文件
上传文件
</a-button>
</a-button>
</a-upload>
</a-upload>
<a-button
<a-button
type=
"primary"
:disabled=
"fileList.length === 0"
:loading=
"loading"
style=
"margin-top: 16px"
@
click=
"handleUpload"
>
type=
"primary"
:disabled=
"fileList.length === 0"
:loading=
"loading"
style=
"margin-top: 16px"
@
click=
"handleUpload"
>
{{
loading
?
'上传中'
:
'开始上传'
}}
{{
loading
?
'上传中'
:
'开始上传'
}}
</a-button>
</a-button>
</a-tab-pane>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"抓拍记录图"
class=
"resultPic"
>
<a-tab-pane
key=
"2"
tab=
"抓拍记录图"
class=
"resultPic"
>
<a-form-item
label=
"监控点:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-form-item
label=
"监控点:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-select
v-model:value=
"formObj.gate_id"
<a-select
v-model:value=
"formObj.gate_id"
style=
"width: 270px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"gateList"
optionFilterProp=
"label"
show-search
>
style=
"width: 270px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"gateList"
optionFilterProp=
"label"
show-search
>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
<a-form-item
label=
"方向:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-form-item
label=
"方向:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-select
v-model:value=
"formObj.direction"
<a-select
v-model:value=
"formObj.direction"
mode=
"multiple"
:maxTagCount=
"1"
style=
"width: 200px"
>
mode=
"multiple"
:maxTagCount=
"1"
style=
"width: 200px"
>
<a-select-option
:value=
"1"
>
进
</a-select-option>
<a-select-option
:value=
"1"
>
进
</a-select-option>
<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"
class=
"secondCondition"
>
<a-form-item
label=
"选择日期:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-date-picker
v-model:value=
"formObj.date"
:format=
"'YYYY-MM-DD'"
style=
"width: 150px"
/>
<a-date-picker
v-model:value=
"formObj.date"
:format=
"'YYYY-MM-DD'"
style=
"width: 150px"
/>
</a-form-item>
</a-form-item>
<a-form-item
label=
"选择时间:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-form-item
label=
"选择时间:"
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-time-picker
v-model:value=
"formObj.startTime"
style=
"width: 100px"
/>
<a-time-picker
v-model:value=
"formObj.startTime"
style=
"width: 100px"
/>
<a-time-picker
v-model:value=
"formObj.endTime"
style=
"width: 100px"
/>
<a-time-picker
v-model:value=
"formObj.endTime"
style=
"width: 100px"
/>
</a-form-item>
</a-form-item>
<a-form-item
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-form-item
style=
"padding: 5px 0"
class=
"secondCondition"
>
<a-button
type=
"primary"
@
click=
"picSearch"
:loading=
"isLoading"
style=
"margin-right: 10px;"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"picSearch"
:loading=
"isLoading"
style=
"margin-right: 10px;"
>
查询
</a-button>
...
@@ -79,9 +51,7 @@
...
@@ -79,9 +51,7 @@
<el-col
:span=
"3"
v-for=
"item in row"
>
<el-col
:span=
"3"
v-for=
"item in row"
>
<div
style=
"margin: 0 5px"
class=
"picBox"
>
<div
style=
"margin: 0 5px"
class=
"picBox"
>
<!--
<el-checkbox
class=
"checkBox"
v-model=
"item.checked"
></el-checkbox>
-->
<!--
<el-checkbox
class=
"checkBox"
v-model=
"item.checked"
></el-checkbox>
-->
<el-image
:src=
"item.picture_url"
<el-image
:src=
"item.picture_url"
:fit=
"'fill'"
class=
"single-image"
>
:fit=
"'fill'"
class=
"single-image"
>
</el-image>
</el-image>
<el-button
type=
"primary"
:disabled=
"item.checked?true:false"
class=
"checkBox"
@
click=
"onConfirm(item)"
>
选中
</el-button>
<el-button
type=
"primary"
:disabled=
"item.checked?true:false"
class=
"checkBox"
@
click=
"onConfirm(item)"
>
选中
</el-button>
</div>
</div>
...
@@ -91,18 +61,8 @@
...
@@ -91,18 +61,8 @@
</div>
</div>
</
template
>
</
template
>
</div>
</div>
<a-pagination
<a-pagination
v-model:current=
"pageNum"
v-model:pageSize=
"pageSize"
:total=
"total"
:show-total=
"total => `共 ${total} 条`"
:pageSizeOptions=
"['10', '20', '40', '80']"
@
change=
"onPageNumChange"
@
showSizeChange=
"onPageSizeChange"
show-size-changer
show-quick-jumper
v-model:current=
"pageNum"
style=
"text-align:center"
/>
v-model:pageSize=
"pageSize"
:total=
"total"
:show-total=
"total => `共 ${total} 条`"
:pageSizeOptions=
"['10', '20', '40', '80']"
@
change=
"onPageNumChange"
@
showSizeChange=
"onPageSizeChange"
show-size-changer
show-quick-jumper
style=
"text-align:center"
/>
</a-tab-pane>
</a-tab-pane>
</a-tabs>
</a-tabs>
</a-form-item>
</a-form-item>
...
@@ -116,116 +76,115 @@
...
@@ -116,116 +76,115 @@
</template>
</template>
<
script
>
<
script
>
import
moment
from
'moment'
import
moment
from
"moment"
;
import
{
reactive
,
ref
,
toRaw
}
from
"vue"
;
import
{
reactive
,
ref
,
toRaw
}
from
"vue"
;
import
{
PlusOutlined
,
LoadingOutlined
}
from
'@ant-design/icons-vue'
;
import
{
PlusOutlined
,
LoadingOutlined
}
from
"@ant-design/icons-vue"
;
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
{
isArray
}
from
"@/PublicUtil/Judgment"
;
import
snapshotRecordApi
from
'@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import
snapshotRecordApi
from
"@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi"
;
import
clusterResultApi
from
'@/views/SnapshotCluster/ClusterResult/ClusterResultApi'
import
clusterResultApi
from
"@/views/SnapshotCluster/ClusterResult/ClusterResultApi"
;
import
FeatureMatchingAccuracyApi
from
'@/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi'
import
FeatureMatchingAccuracyApi
from
"@/views/FeatureMatchingAccuracy/FeatureMatchingAccuracyApi"
;
import
{
filterEmptyValueInObject
,
formatDate
,
formatTime
,
getPagedList
}
from
'@/PublicUtil/PublicUtil'
import
{
import
{
ElMessage
}
from
'element-plus'
filterEmptyValueInObject
,
formatDate
,
formatTime
,
getPagedList
,
}
from
"@/PublicUtil/PublicUtil"
;
import
{
ElMessage
}
from
"element-plus"
;
export
default
{
export
default
{
components
:
{
components
:
{
LoadingOutlined
,
LoadingOutlined
,
PlusOutlined
,
PlusOutlined
,
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
const
isVisible
=
ref
(
false
);
const
isVisible
=
ref
(
false
);
const
pageNum
=
ref
(
1
)
const
pageNum
=
ref
(
1
)
;
const
pageSize
=
ref
(
10
)
const
pageSize
=
ref
(
10
)
;
const
total
=
ref
()
const
total
=
ref
()
;
const
dataList
=
ref
([])
const
dataList
=
ref
([])
;
const
formObj
=
reactive
({
const
formObj
=
reactive
({
name
:
''
,
name
:
""
,
dec
:
''
,
dec
:
""
,
gate_id
:
[],
gate_id
:
[],
direction
:
[
1
,
-
1
],
direction
:
[
1
,
-
1
],
date
:
moment
(
moment
().
format
(
'YYYY-MM-DD'
),
'YYYY-MM-DD'
),
date
:
moment
(
moment
().
format
(
"YYYY-MM-DD"
),
"YYYY-MM-DD"
),
startTime
:
moment
(
'00:00:00'
,
'HH:mm:ss'
),
startTime
:
moment
(
"00:00:00"
,
"HH:mm:ss"
),
endTime
:
moment
(
'23:59:59'
,
'HH:mm:ss'
),
endTime
:
moment
(
"23:59:59"
,
"HH:mm:ss"
),
id
:
''
id
:
""
,
})
})
;
const
isLoading
=
ref
(
false
)
const
isLoading
=
ref
(
false
)
;
const
accountId
=
ref
(
''
);
const
accountId
=
ref
(
""
);
const
mallId
=
ref
(
''
);
const
mallId
=
ref
(
""
);
const
gateList
=
ref
([])
const
gateList
=
ref
([])
;
const
checkGateList
=
ref
([])
const
checkGateList
=
ref
([])
;
const
getGateList
=
function
()
{
const
getGateList
=
function
()
{
formObj
.
gate_id
=
[]
formObj
.
gate_id
=
[];
gateList
.
value
=
[]
gateList
.
value
=
[];
snapshotRecordApi
.
getGateList
(
snapshotRecordApi
{
.
getGateList
(
{
account_id
:
accountId
.
value
,
account_id
:
accountId
.
value
,
plaza_id
:
mallId
.
value
,
plaza_id
:
mallId
.
value
,
type
:
0
,
type
:
0
,
}
})
).
then
(
.
then
((
r
)
=>
{
(
r
)
=>
{
if
(
isArray
(
r
.
data
))
{
if
(
isArray
(
r
.
data
))
for
(
const
item
of
r
.
data
)
{
{
gateList
.
value
.
push
({
for
(
const
item
of
r
.
data
)
{
gateList
.
value
.
push
(
{
value
:
item
.
id
,
value
:
item
.
id
,
label
:
item
.
name
,
label
:
item
.
name
,
});
}
}
)
picSearch
();
}
picSearch
()
}
}
)
}
}
const
disabledPicList
=
ref
([])
});
const
initDialog
=
function
(
parmas
)
{
};
const
disabledPicList
=
ref
([]);
const
initDialog
=
function
(
parmas
)
{
accountId
.
value
=
parmas
.
accountId
;
accountId
.
value
=
parmas
.
accountId
;
mallId
.
value
=
parmas
.
mallId
;
mallId
.
value
=
parmas
.
mallId
;
formObj
.
id
=
parmas
.
id
;
formObj
.
id
=
parmas
.
id
;
getGateList
()
getGateList
();
disabledPicList
.
value
=
parmas
.
faceIds
||
[]
disabledPicList
.
value
=
parmas
.
faceUnids
||
[];
console
.
log
(
parmas
)
isVisible
.
value
=
true
;
isVisible
.
value
=
true
;
};
};
const
onCancel
=
()
=>
{
const
onCancel
=
()
=>
{
if
(
isAdd
.
value
)
{
if
(
isAdd
.
value
)
{
refreshParentTable
()
refreshParentTable
();
}
}
isVisible
.
value
=
false
;
isVisible
.
value
=
false
;
};
};
const
refreshParentTable
=
function
(){
const
refreshParentTable
=
function
()
{
context
.
emit
(
'refreshParentTable'
)
context
.
emit
(
"refreshParentTable"
);
}
};
const
isAdd
=
ref
(
false
)
const
isAdd
=
ref
(
false
);
const
onConfirm
=
function
(
resData
){
const
onConfirm
=
function
(
resData
)
{
const
data
=
filterEmptyValueInObject
(
console
.
log
(
resData
,
'666666'
)
{
const
data
=
filterEmptyValueInObject
({
faceIds
:[
resData
.
id
],
// faceIds: [resData.id],
id
:
formObj
.
id
faceUnids
:
[
resData
.
unid
],
}
id
:
formObj
.
id
,
)
});
FeatureMatchingAccuracyApi
.
addMatchReg
(
data
).
then
(
FeatureMatchingAccuracyApi
.
addMatchReg
(
data
).
then
((
r
)
=>
{
(
r
)
=>
{
if
(
r
.
msg_code
==
200
)
{
if
(
r
.
msg_code
==
200
){
ElMessage
({
ElMessage
({
message
:
r
.
msg_info
,
message
:
r
.
msg_info
,
type
:
'success'
type
:
"success"
,
})
});
isAdd
.
value
=
true
;
isAdd
.
value
=
true
;
disabledPicList
.
value
.
push
(
resData
.
id
)
// disabledPicList.value.push(resData.id);
clickSearch
()
disabledPicList
.
value
.
push
(
resData
.
unid
);
}
else
{
clickSearch
();
}
else
{
ElMessage
({
ElMessage
({
message
:
r
.
msg_info
,
message
:
r
.
msg_info
,
type
:
'error'
type
:
"error"
,
})
});
return
false
;
return
false
;
}
}
}
});
)
};
}
const
loading
=
ref
(
false
);
const
loading
=
ref
(
false
);
const
imageUrl
=
ref
(
''
);
const
imageUrl
=
ref
(
""
);
const
fileList
=
ref
([]);
const
fileList
=
ref
([]);
const
beforeUpload
=
(
file
)
=>
{
const
beforeUpload
=
(
file
)
=>
{
fileList
.
value
=
[
file
];
fileList
.
value
=
[
file
];
...
@@ -237,91 +196,86 @@ export default {
...
@@ -237,91 +196,86 @@ export default {
newFileList
.
splice
(
index
,
1
);
newFileList
.
splice
(
index
,
1
);
fileList
.
value
=
newFileList
;
fileList
.
value
=
newFileList
;
};
};
const
handleUpload
=
function
()
{
const
handleUpload
=
function
()
{
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
fileList
.
value
.
forEach
((
file
)
=>
{
fileList
.
value
.
forEach
((
file
)
=>
{
formData
.
append
(
'files[]'
,
file
);
formData
.
append
(
"files[]"
,
file
);
});
});
loading
.
value
=
true
;
loading
.
value
=
true
;
}
};
const
sortDataList
=
function
(
list
)
{
const
sortDataList
=
function
(
list
)
{
list
.
sort
(
list
.
sort
((
a
,
b
)
=>
{
(
a
,
b
)
=>
{
return
b
.
perrsonList
.
length
-
a
.
perrsonList
.
length
;
return
(
b
.
perrsonList
.
length
-
a
.
perrsonList
.
length
)
});
}
};
)
const
picSearch
=
function
()
{
}
pageNum
.
value
=
1
;
const
picSearch
=
function
(){
clickSearch
();
pageNum
.
value
=
1
};
clickSearch
()
const
clickSearch
=
function
()
{
}
const
rawData
=
toRaw
(
formObj
);
const
clickSearch
=
function
(){
const
data
=
filterEmptyValueInObject
({
const
rawData
=
toRaw
(
formObj
)
const
data
=
filterEmptyValueInObject
(
{
account_id
:
accountId
.
value
,
account_id
:
accountId
.
value
,
type
:
0
,
type
:
0
,
plaza_id
:
mallId
.
value
,
plaza_id
:
mallId
.
value
,
gate_id
:
rawData
.
gate_id
.
toString
(),
gate_id
:
rawData
.
gate_id
.
toString
(),
direction
:
rawData
.
direction
.
toString
(),
direction
:
rawData
.
direction
.
toString
(),
picType
:
2
,
picType
:
2
,
personType
:
'1, 0,'
,
personType
:
"1, 0,"
,
startTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
startTime
),
startTime
:
endTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
endTime
),
formatDate
(
rawData
.
date
)
+
" "
+
formatTime
(
rawData
.
startTime
),
endTime
:
formatDate
(
rawData
.
date
)
+
" "
+
formatTime
(
rawData
.
endTime
),
page
:
pageNum
.
value
-
1
,
page
:
pageNum
.
value
-
1
,
pageSize
:
pageSize
.
value
,
pageSize
:
pageSize
.
value
,
}
});
)
clusterResultApi
.
getClusterResultList
(
data
).
then
((
r
)
=>
{
clusterResultApi
.
getClusterResultList
(
data
).
then
(
isLoading
.
value
=
false
;
(
r
)
=>
{
sortDataList
(
r
.
data
.
persons
);
isLoading
.
value
=
false
r
.
data
.
persons
.
forEach
((
itemPerson
)
=>
{
sortDataList
(
r
.
data
.
persons
)
itemPerson
.
expand
=
false
;
r
.
data
.
persons
.
forEach
((
itemPerson
)
=>
{
itemPerson
.
perrsonList
.
forEach
((
item
)
=>
{
itemPerson
.
expand
=
false
if
(
disabledPicList
.
value
.
includes
(
item
.
unid
))
{
itemPerson
.
perrsonList
.
forEach
((
item
)
=>
{
if
(
disabledPicList
.
value
.
includes
(
item
.
id
)){
item
.
checked
=
true
;
item
.
checked
=
true
;
}
else
{
}
else
{
item
.
checked
=
false
;
item
.
checked
=
false
;
}
}
if
(
item
.
picture_url
)
{
if
(
item
.
picture_url
)
{
item
.
picture_url
=
window
.
_baseImgUrl
+
item
.
picture_url
item
.
picture_url
=
window
.
_baseImgUrl
+
item
.
picture_url
;
}
})
})
dataList
.
value
=
r
.
data
.
persons
total
.
value
=
r
.
data
.
pageNum
document
.
getElementsByClassName
(
'resultContent'
)[
0
].
scrollTop
=
0
}
)
}
const
onPageNumChange
=
function
(
num
)
{
pageNum
.
value
=
num
clickSearch
()
}
}
});
});
dataList
.
value
=
r
.
data
.
persons
;
total
.
value
=
r
.
data
.
pageNum
;
document
.
getElementsByClassName
(
"resultContent"
)[
0
].
scrollTop
=
0
;
});
};
const
onPageNumChange
=
function
(
num
)
{
pageNum
.
value
=
num
;
clickSearch
();
};
const
onPageSizeChange
=
function
(
current
,
size
)
{
const
onPageSizeChange
=
function
(
current
,
size
)
{
pageNum
.
value
=
1
pageNum
.
value
=
1
;
pageSize
.
value
=
size
pageSize
.
value
=
size
;
clickSearch
()
clickSearch
();
}
}
;
const
expandChange
=
function
(
data
)
{
const
expandChange
=
function
(
data
)
{
dataList
.
value
.
forEach
(
item
=>
{
dataList
.
value
.
forEach
((
item
)
=>
{
if
(
data
.
person_unid
==
item
.
person_unid
)
{
if
(
data
.
person_unid
==
item
.
person_unid
)
{
item
.
expand
=
!
item
.
expand
item
.
expand
=
!
item
.
expand
;
}
})
}
const
clickCheck
=
function
(){
console
.
log
(
dataList
.
value
)
}
}
});
};
const
clickCheck
=
function
()
{
console
.
log
(
dataList
.
value
);
};
return
{
return
{
isVisible
,
isVisible
,
formObj
,
formObj
,
onCancel
,
onCancel
,
onConfirm
,
onConfirm
,
initDialog
,
initDialog
,
activeKey
:
ref
(
'2'
),
activeKey
:
ref
(
"2"
),
beforeUpload
,
beforeUpload
,
loading
,
loading
,
imageUrl
,
imageUrl
,
...
@@ -342,67 +296,67 @@ export default {
...
@@ -342,67 +296,67 @@ export default {
clickCheck
,
clickCheck
,
refreshParentTable
,
refreshParentTable
,
picSearch
,
picSearch
,
disabledPicList
disabledPicList
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.resultPic
{
.resultPic
{
border
:
1px
solid
#ddd
;
border
:
1px
solid
#ddd
;
padding
:
0px
10px
;
padding
:
0px
10px
;
}
}
.pictures
{
.pictures
{
width
:
100%
;
width
:
100%
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.secondCondition
{
.secondCondition
{
//
max-width
:
300px
;
//
max-width
:
300px
;
display
:
inline-block
;
display
:
inline-block
;
}
}
.resultContent
{
.resultContent
{
overflow
:
auto
;
overflow
:
auto
;
max-height
:
540px
;
max-height
:
540px
;
min-height
:
300px
;
min-height
:
300px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.boxInfo
{
.boxInfo
{
line-height
:
28px
;
line-height
:
28px
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
}
}
.classBox
{
.classBox
{
margin
:
7px
0
;
margin
:
7px
0
;
border
:
solid
1px
black
;
border
:
solid
1px
black
;
height
:
260px
;
height
:
260px
;
overflow-y
:
hidden
;
overflow-y
:
hidden
;
}
}
.expand
{
.expand
{
height
:
auto
;
height
:
auto
;
overflow
:
auto
;
overflow
:
auto
;
}
}
.expandWord
{
.expandWord
{
color
:
#1890ff
;
color
:
#1890ff
;
margin-right
:
5px
;
margin-right
:
5px
;
cursor
:
pointer
;
cursor
:
pointer
;
float
:
right
;
float
:
right
;
}
}
.iconExpand
{
.iconExpand
{
cursor
:
pointer
;
cursor
:
pointer
;
float
:
right
;
float
:
right
;
color
:
#1890ff
;
color
:
#1890ff
;
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.single-image
{
.single-image
{
width
:
100%
;
width
:
100%
;
height
:
220px
;
height
:
220px
;
}
}
.picBox
{
.picBox
{
position
:
relative
;
position
:
relative
;
}
}
.picBox
:hover
.checkBox
{
.picBox
:hover
.checkBox
{
display
:
block
;
display
:
block
;
}
}
.checkBox
{
.checkBox
{
display
:
none
;
display
:
none
;
width
:
80px
;
width
:
80px
;
height
:
30px
;
height
:
30px
;
...
@@ -412,5 +366,5 @@ export default {
...
@@ -412,5 +366,5 @@ export default {
right
:
0
;
right
:
0
;
bottom
:
0
;
bottom
:
0
;
margin
:
auto
;
margin
:
auto
;
}
}
</
style
>
</
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