Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Community-Mining-Admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mining
Community-Mining-Admin
Commits
05724f8f
Commit
05724f8f
authored
Jan 13, 2022
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:白名单
parent
be146949
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
30 deletions
+23
-30
Breadcrumb.vue
src/components/Breadcrumb.vue
+19
-26
WhiteList.vue
src/views/user/WhiteList.vue
+4
-4
No files found.
src/components/Breadcrumb.vue
View file @
05724f8f
...
...
@@ -9,39 +9,24 @@
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
menu
from
'@/utils/menu'
import
{
routes
}
from
'@/router/index'
;
export
default
Vue
.
extend
({
data
()
{
return
{
breadList
:
[],
breadList
:
[]
as
Array
<
string
>
,
filterList
:
[]
as
any
}
},
methods
:
{
getList
()
{
this
.
filterList
=
[]
const
type
=
1
let
c
=
[]
as
any
if
(
type
===
1
)
{
c
=
menu
.
admin
}
else
{
c
=
menu
.
groupLeader
}
const
f
=
this
.
toLine
(
c
)
for
(
let
i
=
0
;
i
<
f
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
f
.
length
;
j
++
)
{
if
(
f
[
i
].
id
===
f
[
j
].
pid
)
{
this
.
filterList
.
push
([
f
[
i
].
name
,
f
[
j
].
name
,
f
[
j
].
url
])
getList
(
route
:
Array
<
any
>
,
list
:
Array
<
string
>
)
{
for
(
const
item
of
route
)
{
if
(
list
.
includes
(
item
.
name
))
{
this
.
breadList
.
push
(
item
.
meta
.
name
)
if
(
item
.
children
)
{
this
.
getList
(
item
.
children
,
list
)
}
}
}
const
route
=
this
.
$route
.
path
const
res
=
this
.
filterList
.
filter
((
item
:
any
)
=>
item
[
item
.
length
-
1
]
===
route
)[
0
]
if
(
res
)
{
res
.
length
=
2
}
this
.
breadList
=
res
},
toLine
(
data
:
any
){
return
data
.
reduce
((
arr
:
any
[],
{
id
,
pid
,
name
,
url
,
list
=
[]}:
any
)
=>
...
...
@@ -49,11 +34,19 @@ export default Vue.extend({
}
},
mounted
()
{
this
.
getList
()
const
_routes
=
JSON
.
parse
(
JSON
.
stringify
(
routes
))
const
path
=
this
.
$route
.
path
const
pathList
=
path
.
split
(
'/'
).
filter
(
item
=>
item
)
this
.
breadList
=
[]
this
.
getList
(
_routes
,
pathList
)
},
watch
:
{
$route
()
{
this
.
getList
()
$route
(
n
)
{
this
.
breadList
=
[]
const
_routes
=
JSON
.
parse
(
JSON
.
stringify
(
routes
))
const
path
=
n
.
path
const
pathList
=
path
.
split
(
'/'
).
filter
((
item
:
string
)
=>
item
)
this
.
getList
(
_routes
,
pathList
)
}
}
})
...
...
src/views/user/WhiteList.vue
View file @
05724f8f
...
...
@@ -8,19 +8,19 @@
border
style=
"width: 100%"
>
<el-table-column
prop=
"
name
"
prop=
"
addr
"
label=
"用户地址"
>
</el-table-column>
<el-table-column
prop=
"
minerAdd
r"
prop=
"
invite
r"
label=
"推荐人数"
>
</el-table-column>
<el-table-column
prop=
"
entrustTicket
"
prop=
"
tickets
"
label=
"线下总票数"
>
</el-table-column>
<el-table-column
prop=
"
entrustPerson
"
prop=
"
percent
"
label=
"票数占比"
>
</el-table-column>
</el-table>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment