Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1d3fd10c
authored
Feb 22, 2020
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
98522799
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
23 deletions
src/store/modules/sample/index.js
view/app.js
src/store/modules/sample/index.js
View file @
1d3fd10c
...
...
@@ -26,41 +26,53 @@ const mutations = {
state
.
ziYingIndex
=
payload
.
data
;
},
aggs
(
state
,
payload
)
{
if
(
payload
.
reset
)
{
for
(
let
k
in
payload
.
data
.
aggs
)
{
for
(
let
i
=
0
;
i
<
payload
.
data
.
aggs
[
k
].
list
.
length
;
i
++
)
{
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
=
false
;
payload
.
data
.
aggs
[
k
].
list
[
i
].
flag
=
false
;
}
}
var
arr
=
[];
var
obj
=
Object
.
keys
(
payload
.
data
.
aggs
);
if
(
payload
.
id
)
{
arr
=
payload
.
id
.
split
(
","
);
}
for
(
let
k
in
payload
.
data
.
aggs
)
{
}
else
{
var
arr
=
[];
if
(
payload
.
id
)
{
arr
=
payload
.
id
.
split
(
","
);
}
for
(
let
i
=
0
;
i
<
payload
.
data
.
aggs
[
k
].
list
.
length
;
i
++
)
{
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
=
false
;
for
(
let
k
in
payload
.
data
.
aggs
)
{
for
(
let
i
=
0
;
i
<
payload
.
data
.
aggs
[
k
].
list
.
length
;
i
++
)
{
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
=
false
;
for
(
let
j
=
0
;
j
<
arr
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
arr
.
length
;
j
++
)
{
if
(
payload
.
data
.
aggs
[
k
].
list
[
i
].
id
==
arr
[
j
])
{
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
=
!
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
;
payload
.
data
.
aggs
[
k
].
list
[
i
].
flag
=
!
payload
.
data
.
aggs
[
k
].
list
[
i
].
flag
;
if
(
payload
.
data
.
aggs
[
k
].
list
[
i
].
id
==
arr
[
j
])
{
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
=
!
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
;
payload
.
data
.
aggs
[
k
].
list
[
i
].
flag
=
!
payload
.
data
.
aggs
[
k
].
list
[
i
].
flag
;
if
(
payload
.
reset
)
{
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
=
false
;
payload
.
data
.
aggs
[
k
].
list
[
i
].
flag
=
false
;
}
}
}
}
}
state
.
aggs
=
payload
.
data
;
},
...
...
view/app.js
View file @
1d3fd10c
This diff is collapsed.
Click to expand it.
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