feat : panel 的时间保留

This commit is contained in:
zhangyu
2021-12-23 20:22:40 +08:00
parent df7cdd72f4
commit 4403efc640
4 changed files with 39 additions and 13 deletions

View File

@@ -172,9 +172,10 @@ export default {
this.$set(this.showTime, 'text', this.searchTime[0] + ' ' + this.$t('dashboard.panel.to') + ' ' + this.searchTime[1])
this.$emit('change', this.searchTime)
},
setCustomTime (timeGroup) {
setCustomTime (timeGroup,timeRange) {
if (timeGroup) {
this.showTime = this.nowTimeType = this.timeData.find(item => item.id == timeGroup.id)
console.log(this.showTime)
if (this.showTime) {
this.showTime = Object.assign({}, this.showTime)
this.$set(this.searchTime, 0, timeGroup.start_time)