NEZ-1207 fix: 全屏后自动刷新按钮无效
This commit is contained in:
@@ -1534,8 +1534,12 @@ export default {
|
|||||||
this.$emit('on-duplicate-chart-block', this.data.id)
|
this.$emit('on-duplicate-chart-block', this.data.id)
|
||||||
},
|
},
|
||||||
dateChange (time) {
|
dateChange (time) {
|
||||||
|
const nowTimeType = this.$refs.pickTime.$refs.timePicker.nowTimeType
|
||||||
|
this.setSearchTime(nowTimeType.type, nowTimeType.value, nowTimeType)
|
||||||
this.filter.start_time = bus.timeFormate(this.searchTime[0], 'yyyy-MM-dd hh:mm:ss')
|
this.filter.start_time = bus.timeFormate(this.searchTime[0], 'yyyy-MM-dd hh:mm:ss')
|
||||||
this.filter.end_time = bus.timeFormate(this.searchTime[1], 'yyyy-MM-dd hh:mm:ss')
|
this.filter.end_time = bus.timeFormate(this.searchTime[1], 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
this.filter.value = this.searchTime[2]
|
||||||
|
this.filter.id = this.$refs.pickTime.$refs.timePicker.showTime.id
|
||||||
// this.echartModalStore.clear()
|
// this.echartModalStore.clear()
|
||||||
this.showLegend = false
|
this.showLegend = false
|
||||||
this.$refs['localLoadingScreen' + this.chartIndex].startLoading()
|
this.$refs['localLoadingScreen' + this.chartIndex].startLoading()
|
||||||
@@ -1545,6 +1549,28 @@ export default {
|
|||||||
this.getQueryChart('dashboard')
|
this.getQueryChart('dashboard')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setSearchTime (type, val, nowTimeType) { // 设置searchTime
|
||||||
|
if (type === 'minute') {
|
||||||
|
const startTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())).setMinutes(new Date(bus.computeTimezone(new Date().getTime())).getMinutes() - val), 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
const endTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())), 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
this.$set(this.searchTime, 0, startTime)
|
||||||
|
this.$set(this.searchTime, 1, endTime)
|
||||||
|
this.$set(this.searchTime, 2, val + 'm')
|
||||||
|
} else if (type === 'hour') {
|
||||||
|
const startTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())).setHours(new Date(bus.computeTimezone(new Date().getTime())).getHours() - val), 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
const endTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())), 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
this.$set(this.searchTime, 0, startTime)
|
||||||
|
this.$set(this.searchTime, 1, endTime)
|
||||||
|
this.$set(this.searchTime, 2, val + 'h')
|
||||||
|
} else if (type === 'date') {
|
||||||
|
const startTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())).setDate(new Date(bus.computeTimezone(new Date().getTime())).getDate() - val), 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
const endTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())), 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
this.$set(this.searchTime, 0, startTime)
|
||||||
|
this.$set(this.searchTime, 1, endTime)
|
||||||
|
this.$set(this.searchTime, 2, val + 'd')
|
||||||
|
}
|
||||||
|
this.$refs.pickTime.$refs.timePicker.searchTime = this.searchTime
|
||||||
|
},
|
||||||
// 查询数据,修改日期查询全屏数据
|
// 查询数据,修改日期查询全屏数据
|
||||||
getQueryChart (type) {
|
getQueryChart (type) {
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import bus from '../../libs/bus'
|
|||||||
import timePicker from './timePicker'
|
import timePicker from './timePicker'
|
||||||
import multipleTime from './multipleTime'
|
import multipleTime from './multipleTime'
|
||||||
import chartUnit from './chartUnit'
|
import chartUnit from './chartUnit'
|
||||||
let timeout
|
|
||||||
export default {
|
export default {
|
||||||
name: 'pickTime',
|
name: 'pickTime',
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
Reference in New Issue
Block a user