forked from github/dataease
Merge pull request #5030 from dataease/pr@dev_memory_component
Pr@dev memory component
This commit is contained in:
commit
ee566d33d6
@ -322,6 +322,7 @@ export default {
|
|||||||
curFields: [],
|
curFields: [],
|
||||||
isFirstLoad: true, // 是否是第一次加载
|
isFirstLoad: true, // 是否是第一次加载
|
||||||
refId: null,
|
refId: null,
|
||||||
|
getDataLoading: false,
|
||||||
chart: BASE_CHART_STRING,
|
chart: BASE_CHART_STRING,
|
||||||
requestStatus: 'success',
|
requestStatus: 'success',
|
||||||
message: null,
|
message: null,
|
||||||
@ -491,6 +492,7 @@ export default {
|
|||||||
handler: function(val1, val2) {
|
handler: function(val1, val2) {
|
||||||
if (isChange(val1, val2) && !this.isFirstLoad) {
|
if (isChange(val1, val2) && !this.isFirstLoad) {
|
||||||
this.getData(this.element.propValue.viewId)
|
this.getData(this.element.propValue.viewId)
|
||||||
|
this.getDataLoading = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
@ -747,6 +749,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getData(id, cache = true, dataBroadcast = false) {
|
getData(id, cache = true, dataBroadcast = false) {
|
||||||
if (id) {
|
if (id) {
|
||||||
|
if (this.getDataLoading) return
|
||||||
this.requestStatus = 'waiting'
|
this.requestStatus = 'waiting'
|
||||||
this.message = null
|
this.message = null
|
||||||
|
|
||||||
@ -845,6 +848,8 @@ export default {
|
|||||||
}
|
}
|
||||||
this.isFirstLoad = false
|
this.isFirstLoad = false
|
||||||
return true
|
return true
|
||||||
|
}).finally(() => {
|
||||||
|
this.getDataLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -423,7 +423,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName]
|
const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName]
|
||||||
if (targetRef) {
|
if (targetRef) {
|
||||||
targetRef[0].restore()
|
targetRef[0]?.restore()
|
||||||
}
|
}
|
||||||
_this.$refs[this.activeTabName][0].resizeChart()
|
_this.$refs[this.activeTabName][0].resizeChart()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -528,7 +528,7 @@ export default {
|
|||||||
_this.activeTabName = _this.element.options.tabList[nowIndex].name
|
_this.activeTabName = _this.element.options.tabList[nowIndex].name
|
||||||
const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName]
|
const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName]
|
||||||
if (targetRef) {
|
if (targetRef) {
|
||||||
targetRef[0].restore()
|
targetRef[0]?.restore()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, switchTime)
|
}, switchTime)
|
||||||
|
Loading…
Reference in New Issue
Block a user