fix:修复chart 预览时间区间错误的问题
This commit is contained in:
@@ -413,6 +413,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
.nz-chart{
|
.nz-chart{
|
||||||
padding: 0 20px 30px 20px;
|
padding: 0 20px 30px 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: calc(100% - 55px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ import otherChartConfig from '@/components/common/rightBox/chart/otherChartConfi
|
|||||||
import systemChartConfig from '@/components/common/rightBox/chart/systemChartConfig'
|
import systemChartConfig from '@/components/common/rightBox/chart/systemChartConfig'
|
||||||
import panelChart from '@/components/chart/panelChart'
|
import panelChart from '@/components/chart/panelChart'
|
||||||
import lodash from 'lodash'
|
import lodash from 'lodash'
|
||||||
|
import bus from '@/libs/bus'
|
||||||
|
|
||||||
const rz = {
|
const rz = {
|
||||||
methods: {
|
methods: {
|
||||||
@@ -403,7 +404,9 @@ export default {
|
|||||||
},
|
},
|
||||||
preview (show) {
|
preview (show) {
|
||||||
if (show) {
|
if (show) {
|
||||||
this.timeRange = [new Date().setHours(new Date().getHours() - 1), new Date()]
|
const start = new Date().setHours(new Date().getHours() - 1)
|
||||||
|
const end = new Date()
|
||||||
|
this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)]
|
||||||
this.prevChart = lodash.cloneDeep(this.editChart)
|
this.prevChart = lodash.cloneDeep(this.editChart)
|
||||||
this.prevChart.loaded = true
|
this.prevChart.loaded = true
|
||||||
this.prevChart.param.showHeader = true
|
this.prevChart.param.showHeader = true
|
||||||
|
|||||||
Reference in New Issue
Block a user