fix: 去除无用代码

This commit is contained in:
@changcode
2021-12-31 10:10:39 +08:00
parent 3f4c65fc67
commit f297983554
3 changed files with 10 additions and 21 deletions

View File

@@ -68,7 +68,10 @@ export default {
isPopoverDisabled: false,
isCustom: false,
timePicker: localStorage.getItem('nz-default-dateFormat') ? localStorage.getItem('nz-default-dateFormat') : 'yyyy-MM-dd hh:mm:ss',
searchTime: [],
searchTime: [
bus.timeFormate(bus.getOffsetTimezoneData(-1), this.timePicker),
bus.timeFormate(bus.getOffsetTimezoneData(), this.timePicker)
],
showTime: {
id: 4,
text: this.$t('dashboard.panel.lastOneHour')
@@ -308,22 +311,7 @@ export default {
}
}
}
},
stepSearchTime: {
immediate: true,
handler (n, o) {
if (n && this.searchTime[0]) {
if (this.showTime.value) {
this.setSearchTime(this.showTime.type, this.showTime.value)
} else {
const startTime = bus.timeFormate(this.searchTime[0], this.timePicker)
const endTime = bus.timeFormate(new Date(this.searchTime[0]).getTime() + new Date(this.stepSearchTime[1]).getTime() - new Date(this.stepSearchTime[0]).getTime(), this.timePicker)
this.$set(this.searchTime, 0, startTime)
this.$set(this.searchTime, 1, endTime)
}
}
}
},
}
}
}
</script>