提交 bcffe753 编写于 作者: W wei_ning_wang

scalar 报错

上级 8ca7b522
......@@ -564,7 +564,11 @@ export default {
ajaxArr.push(this.addAjax(params, yIndex));
});
Promise.all(ajaxArr)
Promise.all(ajaxArr.map(function(promiseItem) {
return promiseItem.catch(function(err) {
return err;
});
}))
.then((res) => {
if (!res) {
return;
......
......@@ -336,6 +336,11 @@ export default {
this.getScalarsList();
this.firstNum = 1;
// auto refresh
if (this.isTimeReload) {
this.autoUpdateSamples();
}
});
},
methods: {
......@@ -429,11 +434,6 @@ export default {
// Refresh the chart data on the current page
this.freshCurPageData();
}
// auto refresh
if (this.isTimeReload) {
this.autoUpdateSamples();
}
}, this.requestErrorCallback)
.catch((e) => {
this.$message.error(this.$t('public.dataError'));
......@@ -499,22 +499,28 @@ export default {
promiseArr.push(this.addPromise(params));
Promise.all(promiseArr)
Promise.all(promiseArr.map(function(promiseItem) {
return promiseItem.catch(function(err) {
return err;
});
}))
.then((res) => {
// error
if (!res || !res.length) {
return;
}
if (sampleObject.charObj) {
sampleObject.charObj.showLoading();
}
let scalarIndex = 0;
let hasInvalidData = false;
for (let i = 0; i < res.length; i++) {
if (!res[i] || !res[i].data) {
sampleObject.charObj.clear();
return;
}
if (sampleObject.charObj) {
sampleObject.charObj.showLoading();
}
const resData = res[i].data;
const tempObject = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册