Commit f798eb76 by 梁建民

js

parent 7115df3a
......@@ -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': 200,
'offset': 100,
'sample_status/eq': 1,
};
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment