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 9ec2fec0
authored
Jan 27, 2022
by
李金轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ljx
1 parent
ed715e56
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
319 additions
and
252 deletions
src/views/DataRepair/DataRepair.vue
src/views/DataRerun/DataRerun.vue
src/views/FeatureLibraryRebuild/FeatureLibraryRebuild.vue
src/views/FeatureReExtract/FeatureReExtract.vue
src/views/PeopleReContrast/PeopleReContrast.vue
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
src/views/Test/Test.vue
src/views/DataRepair/DataRepair.vue
View file @
9ec2fec
...
...
@@ -6,13 +6,10 @@
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onAccountChange"
:options=
"accountList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in accountList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"广场:"
style=
"padding: 5px 0"
>
...
...
@@ -21,12 +18,10 @@
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onPlazaChange"
:options=
"plazaList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in plazaList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"监控点名称:"
style=
"padding: 5px 0"
>
...
...
@@ -35,12 +30,10 @@
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onGateChange"
:options=
"gateList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in gateList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"设备通道号:"
style=
"padding: 5px 0"
>
...
...
@@ -48,12 +41,10 @@
style=
"width: 280px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"channelList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in channelList"
:value=
"item"
>
{{
item
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"修补日期:"
style=
"padding: 5px 0"
>
...
...
@@ -219,7 +210,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
plazaList
.
value
=
r
for
(
const
item
of
r
)
{
plazaList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -232,7 +231,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
accountList
.
value
=
r
for
(
const
item
of
r
)
{
accountList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -256,7 +263,15 @@ export default {
if
(
isArray
(
r
))
{
tempList
.
push
(...
r
)
for
(
const
item
of
r
)
{
tempList
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
}
...
...
@@ -279,7 +294,15 @@ export default {
if
(
isArray
(
r
))
{
tempList
.
push
(...
r
)
for
(
const
item
of
r
)
{
tempList
.
push
(
{
value
:
item
,
label
:
item
,
}
)
}
}
}
channelList
.
value
=
tempList
...
...
src/views/DataRerun/DataRerun.vue
View file @
9ec2fec
<
template
>
<a-form
:model=
"queryForm"
layout=
"inline"
>
<a-form
:model=
"queryForm"
layout=
"inline"
:label-col=
"
{ style: { width: '70px' } }"
>
<a-form-item
label=
"集团:"
>
<a-select
v-model:value=
"queryForm.account_id"
style=
"width: 2
0
0px"
style=
"width: 2
8
0px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"accountList"
@
change=
"onAccountChange"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in accountList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"广场:"
>
<a-select
v-model:value=
"queryForm.plaza_id"
style=
"width: 2
0
0px"
style=
"width: 2
8
0px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"plazaList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in plazaList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"数据类型:"
>
...
...
@@ -54,7 +49,7 @@
</a-form>
<div
class=
"result-wrapper-2"
>
<el-row
v-for=
"item in resultList"
style=
"padding: 5px 0"
>
<el-row
v-for=
"item in resultList"
>
<el-col
:span=
"3"
>
{{
progressMap
[
item
.
scheduleType
]
+
':'
}}
</el-col>
...
...
@@ -135,7 +130,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
plazaList
.
value
=
r
for
(
const
item
of
r
)
{
plazaList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -148,7 +151,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
accountList
.
value
=
r
for
(
const
item
of
r
)
{
accountList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
src/views/FeatureLibraryRebuild/FeatureLibraryRebuild.vue
View file @
9ec2fec
...
...
@@ -2,34 +2,29 @@
<a-form
:model=
"queryForm"
layout=
"inline"
>
<a-form-item
label=
"集团:"
>
<a-select
v-model:value=
"queryForm.account_id"
style=
"width: 2
0
0px"
style=
"width: 2
8
0px"
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onAccountChange"
:options=
"accountList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in accountList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"广场:"
>
<a-select
v-model:value=
"queryForm.plaza_id"
style=
"width: 2
0
0px"
style=
"width: 2
8
0px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"plazaList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in plazaList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"特征重提类型:"
>
<a-select
v-model:value=
"queryForm.featureRevisitType"
style=
"width: 2
0
0px"
>
<a-select
v-model:value=
"queryForm.featureRevisitType"
style=
"width: 2
8
0px"
>
<a-select-option
:value=
"1"
>
店员库重建
</a-select-option>
<a-select-option
:value=
"2"
>
顾客库重建
</a-select-option>
</a-select>
...
...
@@ -62,7 +57,6 @@ export default {
let
webSocket
=
undefined
const
resultList
=
ref
([])
// sequence
const
dataList
=
ref
([])
const
accountList
=
ref
([])
const
plazaList
=
ref
([])
const
zoneList
=
ref
([])
...
...
@@ -92,7 +86,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
plazaList
.
value
=
r
for
(
const
item
of
r
)
{
plazaList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -105,7 +107,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
accountList
.
value
=
r
for
(
const
item
of
r
)
{
accountList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
src/views/FeatureReExtract/FeatureReExtract.vue
View file @
9ec2fec
<
template
>
<a-form
:model=
"queryForm"
layout=
"inline"
>
<a-form-item
label=
"集团:"
>
<a-form-item
label=
"集团:"
style=
"padding: 5px 0"
>
<a-select
v-model:value=
"queryForm.account_id"
style=
"width: 2
0
0px"
style=
"width: 2
8
0px"
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onAccountChange"
:options=
"accountList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in accountList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"广场:"
>
<a-form-item
label=
"广场:"
style=
"padding: 5px 0"
>
<a-select
v-model:value=
"queryForm.plaza_id"
style=
"width: 2
0
0px"
style=
"width: 2
8
0px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"plazaList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in plazaList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"特征重提类型:"
>
<a-select
v-model:value=
"queryForm.featureRevisitType"
style=
"width: 2
0
0px"
>
<a-form-item
label=
"特征重提类型:"
style=
"padding: 5px 0"
>
<a-select
v-model:value=
"queryForm.featureRevisitType"
style=
"width: 2
8
0px"
>
<a-select-option
:value=
"0"
>
人脸+全身照特征
</a-select-option>
<a-select-option
:value=
"1"
>
人脸特征
</a-select-option>
<a-select-option
:value=
"2"
>
全身照特征
</a-select-option>
<a-select-option
:value=
"3"
>
店员特征
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"选择日期:"
v-if=
"queryForm.featureRevisitType !== 3"
>
<a-date-picker
v-model:value=
"queryForm.date"
/>
<a-form-item
label=
"选择日期:"
v-if=
"queryForm.featureRevisitType !== 3"
style=
"padding: 5px 0"
>
<a-date-picker
v-model:value=
"queryForm.date"
style=
"width: 280px"
/>
</a-form-item>
<a-form-item>
<a-form-item
style=
"padding: 5px 0"
>
<a-button
type=
"primary"
@
click=
"initializeWebSocket"
>
开始
</a-button>
</a-form-item>
</a-form>
...
...
@@ -95,7 +90,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
plazaList
.
value
=
r
for
(
const
item
of
r
)
{
plazaList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -108,7 +111,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
accountList
.
value
=
r
for
(
const
item
of
r
)
{
accountList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
src/views/PeopleReContrast/PeopleReContrast.vue
View file @
9ec2fec
...
...
@@ -2,40 +2,35 @@
<a-form
:model=
"queryForm"
layout=
"inline"
>
<a-form-item
label=
"集团:"
>
<a-select
v-model:value=
"queryForm.account_id"
style=
"width: 2
0
0px"
style=
"width: 2
8
0px"
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onAccountChange"
:options=
"accountList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in accountList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"广场:"
>
<a-select
v-model:value=
"queryForm.plaza_id"
style=
"width: 2
0
0px"
style=
"width: 2
8
0px"
mode=
"multiple"
:maxTagCount=
"1"
:options=
"plazaList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in plazaList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"比对类型:"
>
<a-select
v-model:value=
"queryForm.featureRevisitType"
style=
"width: 2
0
0px"
>
<a-select
v-model:value=
"queryForm.featureRevisitType"
style=
"width: 2
8
0px"
>
<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=
"选择日期:"
>
<a-date-picker
v-model:value=
"queryForm.date"
/>
<a-date-picker
v-model:value=
"queryForm.date"
style=
"width: 280px"
/>
</a-form-item>
<a-form-item>
<a-button
type=
"primary"
@
click=
"initializeWebSocket"
>
开始
</a-button>
...
...
@@ -92,7 +87,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
plazaList
.
value
=
r
for
(
const
item
of
r
)
{
plazaList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -105,7 +108,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
accountList
.
value
=
r
for
(
const
item
of
r
)
{
accountList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
9ec2fec
...
...
@@ -6,13 +6,10 @@
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onAccountChange"
:options=
"accountList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in accountList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"广场:"
style=
"padding: 5px 0"
>
...
...
@@ -21,12 +18,10 @@
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onPlazaChange"
:options=
"plazaList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in plazaList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"出入类型:"
style=
"padding: 5px 0"
>
...
...
@@ -43,26 +38,23 @@
style=
"width: 280px"
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onZoneChange"
>
<a-select-option
v-for=
"item in zoneList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
@
change=
"onZoneChange"
:options=
"zoneList"
optionFilterProp=
"label"
show-search
>
</a-select>
</a-form-item>
<a-form-item
label=
"监控点:"
style=
"padding: 5px 0"
>
<a-select
v-model:value=
"queryForm.gate_id"
style=
"width: 280px"
mode=
"multiple"
:maxTagCount=
"1"
>
<a-select-option
v-for=
"item in gateList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
:maxTagCount=
"1"
:options=
"gateList"
optionFilterProp=
"label"
show-search
>
</a-select>
</a-form-item>
<a-form-item
label=
"方向:"
style=
"padding: 5px 0"
>
...
...
@@ -202,10 +194,6 @@ export default {
confirmSearch
()
}
const
onSubmit
=
function
()
{
}
const
onAccountChange
=
function
()
{
getPlazaList
()
getZoneList
()
...
...
@@ -232,7 +220,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
plazaList
.
value
=
r
for
(
const
item
of
r
)
{
plazaList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -250,7 +246,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
zoneList
.
value
=
r
for
(
const
item
of
r
)
{
zoneList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -270,7 +274,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
.
data
))
{
gateList
.
value
=
r
.
data
for
(
const
item
of
r
.
data
)
{
gateList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -283,7 +295,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
accountList
.
value
=
r
for
(
const
item
of
r
)
{
accountList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -379,7 +399,6 @@ export default {
// function
onPageNumChange
,
onPageSizeChange
,
onSubmit
,
onAccountChange
,
onPlazaChange
,
onZoneChange
,
...
...
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
View file @
9ec2fec
...
...
@@ -6,13 +6,10 @@
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onAccountChange"
:options=
"accountList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in accountList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"广场:"
style=
"padding: 5px 0"
>
...
...
@@ -21,12 +18,10 @@
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onPlazaChange"
:options=
"plazaList"
optionFilterProp=
"label"
show-search
>
<a-select-option
v-for=
"item in plazaList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"出入类型:"
style=
"padding: 5px 0"
>
...
...
@@ -43,26 +38,22 @@
style=
"width: 280px"
mode=
"multiple"
:maxTagCount=
"1"
@
change=
"onZoneChange"
>
<a-select-option
v-for=
"item in zoneList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
@
change=
"onZoneChange"
:options=
"zoneList"
optionFilterProp=
"label"
show-search
>
</a-select>
</a-form-item>
<a-form-item
label=
"监控点:"
style=
"padding: 5px 0"
>
<a-select
v-model:value=
"queryForm.gate_id"
style=
"width: 280px"
mode=
"multiple"
:maxTagCount=
"1"
>
<a-select-option
v-for=
"item in gateList"
:value=
"item.id"
>
{{
item
.
name
}}
</a-select-option>
:maxTagCount=
"1"
:options=
"gateList"
optionFilterProp=
"label"
show-search
>
</a-select>
</a-form-item>
<a-form-item
label=
"方向:"
style=
"padding: 5px 0"
>
...
...
@@ -192,10 +183,6 @@ export default {
confirmSearch
()
}
const
onSubmit
=
function
()
{
}
const
onAccountChange
=
function
()
{
getPlazaList
()
getZoneList
()
...
...
@@ -222,7 +209,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
plazaList
.
value
=
r
for
(
const
item
of
r
)
{
plazaList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -240,7 +235,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
zoneList
.
value
=
r
for
(
const
item
of
r
)
{
zoneList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -260,7 +263,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
.
data
))
{
gateList
.
value
=
r
.
data
for
(
const
item
of
r
.
data
)
{
gateList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -273,7 +284,15 @@ export default {
(
r
)
=>
{
if
(
isArray
(
r
))
{
accountList
.
value
=
r
for
(
const
item
of
r
)
{
accountList
.
value
.
push
(
{
value
:
item
.
id
,
label
:
item
.
name
,
}
)
}
}
}
)
...
...
@@ -358,7 +377,6 @@ export default {
// function
onPageNumChange
,
onPageSizeChange
,
onSubmit
,
onAccountChange
,
onPlazaChange
,
onZoneChange
,
...
...
src/views/Test/Test.vue
View file @
9ec2fec
<
template
>
<div
style=
"width: 256px"
>
<a-button
type=
"primary"
@
click=
"toggleCollapsed"
style=
"margin-bottom: 16px"
>
<MenuUnfoldOutlined
v-if=
"collapsed"
/>
<MenuFoldOutlined
v-else
/>
</a-button>
<a-menu
mode=
"inline"
theme=
"dark"
:inline-collapsed=
"collapsed"
v-model:selectedKeys=
"selectedKeys"
<a-select
v-model:value=
"value"
show-search
mode=
"multiple"
:maxTagCount=
"1"
style=
"width: 280px"
:options=
"options"
optionFilterProp=
"label"
>
<a-select-option
v-for=
"item in options"
:value=
"item.value"
>
<a-menu-item
key=
"1"
>
<template
#
icon
>
<PieChartOutlined/>
</
template
>
<span>
Option 1
</span>
</a-menu-item>
<a-menu-item
key=
"2"
>
<
template
#
icon
>
<DesktopOutlined/>
</
template
>
<span>
Option 2
</span>
</a-menu-item>
<a-menu-item
key=
"3"
>
<
template
#
icon
>
<InboxOutlined/>
</
template
>
<span>
Option 3
</span>
</a-menu-item>
<a-sub-menu
key=
"sub1"
>
<
template
#
icon
>
<MailOutlined/>
</
template
>
<
template
#
title
>
Navigation One
</
template
>
<a-menu-item
key=
"5"
>
Option 5
</a-menu-item>
<a-menu-item
key=
"6"
>
Option 6
</a-menu-item>
<a-menu-item
key=
"7"
>
Option 7
</a-menu-item>
<a-menu-item
key=
"8"
>
Option 8
</a-menu-item>
</a-sub-menu>
<a-sub-menu
key=
"sub2"
>
<
template
#
icon
>
<AppstoreOutlined/>
</
template
>
<
template
#
title
>
Navigation Two
</
template
>
<a-menu-item
key=
"9"
>
Option 9
</a-menu-item>
<a-menu-item
key=
"10"
>
Option 10
</a-menu-item>
<a-sub-menu
key=
"sub3"
title=
"Submenu"
>
<a-menu-item
key=
"11"
>
Option 11
</a-menu-item>
<a-menu-item
key=
"12"
>
Option 12
</a-menu-item>
</a-sub-menu>
</a-sub-menu>
</a-menu>
</div>
{{
item
.
label
}}
</a-select-option>
</a-select>
</
template
>
<
script
>
import
{
defineComponent
,
reactive
,
toRefs
,
watch
}
from
'vue'
import
{
MenuFoldOutlined
,
MenuUnfoldOutlined
,
PieChartOutlined
,
MailOutlined
,
DesktopOutlined
,
InboxOutlined
,
AppstoreOutlined
,
}
from
'@ant-design/icons-vue'
import
{
defineComponent
,
ref
}
from
'vue'
export
default
defineComponent
({
setup
()
{
const
state
=
reactive
({
collapsed
:
false
,
selectedKeys
:
[
'1'
],
openKeys
:
[
'sub1'
],
preOpenKeys
:
[
'sub1'
],
})
watch
(
()
=>
state
.
openKeys
,
(
val
,
oldVal
)
=>
{
state
.
preOpenKeys
=
oldVal
const
options
=
ref
([
{
value
:
'jack'
,
label
:
'飞飞飞飞飞飞飞'
,
},
)
{
value
:
'lucy'
,
label
:
'lllll'
,
},
{
value
:
'tom'
,
label
:
'tttttt'
,
},
])
const
toggleCollapsed
=
()
=>
{
state
.
collapsed
=
!
state
.
collapsed
state
.
openKeys
=
state
.
collapsed
?
[]
:
state
.
preOpenKeys
const
handleChange
=
value
=>
{
console
.
log
(
`selected
${
value
}
`
)
}
return
{...
toRefs
(
state
),
toggleCollapsed
}
},
const
handleBlur
=
()
=>
{
console
.
log
(
'blur'
)
}
components
:
{
MenuFoldOutlined
,
MenuUnfoldOutlined
,
PieChartOutlined
,
MailOutlined
,
DesktopOutlined
,
InboxOutlined
,
AppstoreOutlined
,
const
handleFocus
=
()
=>
{
console
.
log
(
'focus'
)
}
const
filterOption
=
(
input
,
option
)
=>
{
return
option
.
value
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
}
return
{
value
:
ref
(
undefined
),
filterOption
,
handleBlur
,
handleFocus
,
handleChange
,
options
,
}
},
})
</
script
>
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