Commit 80c6f6c3 by 梁建民

js

parent aca9130d
...@@ -94,6 +94,8 @@ const actions = { ...@@ -94,6 +94,8 @@ const actions = {
data: data.data data: data.data
}); });
state.finished = true; state.finished = true;
}else if(data.error_code == 3){
} else { } else {
state.loading = false; state.loading = false;
state.finished = true; state.finished = true;
...@@ -109,6 +111,13 @@ const actions = { ...@@ -109,6 +111,13 @@ const actions = {
}, },
aggs({commit}, payload) { aggs({commit}, payload) {
Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner'
});
let param = { let param = {
'sample_status/eq': 1 'sample_status/eq': 1
}; };
...@@ -121,6 +130,7 @@ const actions = { ...@@ -121,6 +130,7 @@ const actions = {
Services.aggs(params).then((res) => { Services.aggs(params).then((res) => {
let data = res.data; let data = res.data;
if (data.error_code == 0) { if (data.error_code == 0) {
Toast.clear();
commit({ commit({
type: 'aggs', type: 'aggs',
data: data.data, data: data.data,
...@@ -131,9 +141,10 @@ const actions = { ...@@ -131,9 +141,10 @@ const actions = {
message: data.error_msg, message: data.error_msg,
duration: 3000 duration: 3000
}); });
Toast.clear();
} }
}).catch(function (err) { }).catch(function (err) {
Toast.clear();
}); });
}, },
aggSample({commit}, payload) { aggSample({commit}, payload) {
......
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