|
|
@@ -336,6 +336,11 @@ export default { |
|
|
this.getScalarsList(); |
|
|
this.getScalarsList(); |
|
|
|
|
|
|
|
|
this.firstNum = 1; |
|
|
this.firstNum = 1; |
|
|
|
|
|
|
|
|
|
|
|
// auto refresh |
|
|
|
|
|
if (this.isTimeReload) { |
|
|
|
|
|
this.autoUpdateSamples(); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
@@ -429,11 +434,6 @@ export default { |
|
|
// Refresh the chart data on the current page |
|
|
// Refresh the chart data on the current page |
|
|
this.freshCurPageData(); |
|
|
this.freshCurPageData(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// auto refresh |
|
|
|
|
|
if (this.isTimeReload) { |
|
|
|
|
|
this.autoUpdateSamples(); |
|
|
|
|
|
} |
|
|
|
|
|
}, this.requestErrorCallback) |
|
|
}, this.requestErrorCallback) |
|
|
.catch((e) => { |
|
|
.catch((e) => { |
|
|
this.$message.error(this.$t('public.dataError')); |
|
|
this.$message.error(this.$t('public.dataError')); |
|
|
@@ -499,22 +499,28 @@ export default { |
|
|
|
|
|
|
|
|
promiseArr.push(this.addPromise(params)); |
|
|
promiseArr.push(this.addPromise(params)); |
|
|
|
|
|
|
|
|
Promise.all(promiseArr) |
|
|
|
|
|
|
|
|
Promise.all(promiseArr.map(function(promiseItem) { |
|
|
|
|
|
return promiseItem.catch(function(err) { |
|
|
|
|
|
return err; |
|
|
|
|
|
}); |
|
|
|
|
|
})) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
// error |
|
|
// error |
|
|
if (!res || !res.length) { |
|
|
if (!res || !res.length) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (sampleObject.charObj) { |
|
|
|
|
|
sampleObject.charObj.showLoading(); |
|
|
|
|
|
} |
|
|
|
|
|
let scalarIndex = 0; |
|
|
let scalarIndex = 0; |
|
|
let hasInvalidData = false; |
|
|
let hasInvalidData = false; |
|
|
for (let i = 0; i < res.length; i++) { |
|
|
for (let i = 0; i < res.length; i++) { |
|
|
if (!res[i] || !res[i].data) { |
|
|
if (!res[i] || !res[i].data) { |
|
|
|
|
|
sampleObject.charObj.clear(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (sampleObject.charObj) { |
|
|
|
|
|
sampleObject.charObj.showLoading(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const resData = res[i].data; |
|
|
const resData = res[i].data; |
|
|
|
|
|
|
|
|
const tempObject = { |
|
|
const tempObject = { |
|
|
|