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
f798eb76
authored
Feb 22, 2020
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
7115df3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
30 deletions
src/store/modules/sample/index.js
src/views/sample/sample.vue
src/store/modules/sample/index.js
View file @
f798eb76
...
...
@@ -27,38 +27,33 @@ const mutations = {
},
aggs
(
state
,
payload
)
{
var
arr
=
[];
var
obj
=
Object
.
keys
(
payload
.
data
.
aggs
);
if
(
payload
.
id
)
{
arr
=
payload
.
id
.
split
(
","
);
}
for
(
let
k
in
payload
.
data
.
aggs
)
{
if
(
!
payload
.
resst
)
{
var
arr
=
[];
var
obj
=
Object
.
keys
(
payload
.
data
.
aggs
);
for
(
let
i
=
0
;
i
<
payload
.
data
.
aggs
[
k
].
list
.
length
;
i
++
)
{
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
=
false
;
if
(
payload
.
id
)
{
arr
=
payload
.
id
.
split
(
","
);
}
for
(
let
k
in
payload
.
data
.
aggs
)
{
for
(
let
j
=
0
;
j
<
arr
.
length
;
j
++
)
{
for
(
let
i
=
0
;
i
<
payload
.
data
.
aggs
[
k
].
list
.
length
;
i
++
)
{
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
=
false
;
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
;
for
(
let
j
=
0
;
j
<
arr
.
length
;
j
++
)
{
if
(
payload
.
reset
)
{
payload
.
data
.
aggs
[
k
].
list
[
i
].
check
=
false
;
payload
.
data
.
aggs
[
k
].
list
[
i
].
flag
=
false
;
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
;
}
}
}
}
}
state
.
aggs
=
payload
.
data
;
},
aggSample
(
state
,
payload
)
{
...
...
@@ -91,7 +86,7 @@ const actions = {
let
obj
=
{
...
payload
.
params
,
'offset'
:
2
00
,
'offset'
:
1
00
,
'sample_status/eq'
:
1
,
};
...
...
src/views/sample/sample.vue
View file @
f798eb76
...
...
@@ -279,7 +279,7 @@
},
getAggData
:
function
(
id
)
{
let
params
=
Object
.
assign
({},
{
'sample_class_id/eq'
:
id
});
let
params
=
Object
.
assign
({},
{
'
resst'
:
true
,
'
sample_class_id/eq'
:
id
});
this
.
$store
.
dispatch
({
type
:
"aggs"
,
...
...
@@ -301,13 +301,7 @@
this
.
layer
=
false
;
},
canel
:
function
()
{
let
params
=
Object
.
assign
({},
{
reset
:
true
,
'sample_class_id/eq'
:
this
.
sample_class_id
},
this
.
brand_id
,
this
.
packing
,
this
.
encap
,
this
.
attrs
,
{
id
:
this
.
id
.
join
(
','
)});
this
.
$store
.
dispatch
({
type
:
"aggs"
,
params
:
params
});
},
screenFn
:
function
(
id
,
key
,
flag
)
{
...
...
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