feat: 抽取时间参数至vuex

This commit is contained in:
zhangyu
2021-12-09 16:59:46 +08:00
parent 6633eb9f8e
commit cbe6fdc60a
4 changed files with 41 additions and 3 deletions

View File

@@ -524,6 +524,10 @@ export default {
this.filter.id = this.$refs.pickTime.$refs.timePicker.showTime.id
this.getTableData()
this.getData(this.filter)
this.$store.dispatch('dispatchPanelTime',{
time: this.searchTime,
nowTimeType: this.nowTimeType
})
},
setSearchTime (type, val, nowTimeType) { // 设置searchTime
if (type === 'minute') {
@@ -763,6 +767,15 @@ export default {
},
created () {
this.getTableData()
this.$store.dispatch('dispatchPanelTime',{
time: this.searchTime,
nowTimeType: {
id: 4,
text: this.$t('dashboard.panel.lastOneHour'),
type: 'hour',
value: 1
}
})
},
mounted () {
this.scrollbarWrap = this.$refs.dashboardScrollbar