Commit baaa07e4 authored by leon's avatar leon

feat:fix some bug

parent 9e7f2148
......@@ -130,10 +130,12 @@
}
if(chart) {
const option = chart.getOption()
if(option) {
option.series = dealSeries
// 重新setOption,使得设置的formatter生效
chart.setOption(option)
}
}
})
},
......
......@@ -33,6 +33,10 @@ export default {
async handleDynamicData (value) {
const that = this
let { dataUrl, dataMethod, dataFormatter, dataProcessing, dataConfig } = { ...value }
if (!dataUrl.length) {
return
}
if(value.queryFormatter) dataFormatter = {...dataFormatter, ...value.queryFormatter}
dataUrl = dataUrl.replace(/^(\/(dashboardCharts|dashboardAPI))?/, '')
dataFormatter = that.$u.common.filterRequestParams({...dataFormatter})
......@@ -214,7 +218,7 @@ export default {
},
'elementData.dataList': {
handler(newVal,oldVal) {
if (JSON.stringify(newVal) !== JSON.stringify(oldVal) ) {
if (JSON.stringify(newVal) !== '{}' && JSON.stringify(newVal) !== JSON.stringify(oldVal) ) {
this.setStorageData()
this.initChart()
}
......
......@@ -247,7 +247,7 @@
if (Status === 'true') {
if(info.dataUrl) {
that.getGlobalData(info, list)
if(info.dataPollingInterval) {
if(info.dataPolling && info.dataPollingInterval > 0) {
that.timename = setInterval(() => {
that.getGlobalData(info, list)
}, parseInt(info.dataPollingInterval) * 1000)
......
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 to comment