NEZ-2860 fxi: Chart preview 时间范围错误
This commit is contained in:
@@ -197,8 +197,13 @@ export default {
|
|||||||
this.searchTime[1] = bus.timeFormate(this.timeRange[1])
|
this.searchTime[1] = bus.timeFormate(this.timeRange[1])
|
||||||
this.nowType.start_time = this.searchTime[0]
|
this.nowType.start_time = this.searchTime[0]
|
||||||
this.nowType.end_time = this.searchTime[1]
|
this.nowType.end_time = this.searchTime[1]
|
||||||
this.$refs.pickTime.$refs.timePicker.setCustomTime(this.nowType)
|
if (!this.nowTimeType) {
|
||||||
this.setSearchTime(this.nowType.type, this.nowType.value, this.nowType)
|
this.$refs.pickTime.$refs.timePicker.setCustomTime(this.nowType)
|
||||||
|
this.setSearchTime(this.nowType.type, this.nowType.value, this.nowType)
|
||||||
|
} else {
|
||||||
|
this.$refs.pickTime.$refs.timePicker.setCustomTime(this.nowTimeType)
|
||||||
|
this.setSearchTime(this.nowType.type, this.nowType.value, this.nowTimeType)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
nowTimeType: {
|
||||||
|
type: Number
|
||||||
|
},
|
||||||
hiddenText: { // 隐藏图表的悬浮文字
|
hiddenText: { // 隐藏图表的悬浮文字
|
||||||
type: String
|
type: String
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
:is-group="isGroup(chartInfo.type)"
|
:is-group="isGroup(chartInfo.type)"
|
||||||
:isExportHtml="isExportHtml"
|
:isExportHtml="isExportHtml"
|
||||||
:isError="isError"
|
:isError="isError"
|
||||||
|
:nowTimeType="nowTimeType"
|
||||||
:chartData="chartData"
|
:chartData="chartData"
|
||||||
:chart-info="chartInfo"
|
:chart-info="chartInfo"
|
||||||
:showAllData.sync="showAllData"
|
:showAllData.sync="showAllData"
|
||||||
@@ -26,6 +27,7 @@
|
|||||||
:is-group="isGroup(chartInfo.type)"
|
:is-group="isGroup(chartInfo.type)"
|
||||||
:isError="isError"
|
:isError="isError"
|
||||||
:from="from"
|
:from="from"
|
||||||
|
:nowTimeType="nowTimeType"
|
||||||
:chartData="chartData"
|
:chartData="chartData"
|
||||||
:chart-info="chartInfo"
|
:chart-info="chartInfo"
|
||||||
:showAllData.sync="showAllData"
|
:showAllData.sync="showAllData"
|
||||||
@@ -92,6 +94,9 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
nowTimeType: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
isExportHtml: { // 是否是导出的html
|
isExportHtml: { // 是否是导出的html
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
|||||||
@@ -121,6 +121,11 @@
|
|||||||
>
|
>
|
||||||
<panel-chart
|
<panel-chart
|
||||||
v-if="prevChart"
|
v-if="prevChart"
|
||||||
|
:nowTimeType="{
|
||||||
|
id: 4,
|
||||||
|
type: 'hour',
|
||||||
|
value: 1
|
||||||
|
}"
|
||||||
style="height: 100%;width: 100%"
|
style="height: 100%;width: 100%"
|
||||||
:ref="'chart-fullscreen-previewShow'"
|
:ref="'chart-fullscreen-previewShow'"
|
||||||
:chart-info="prevChart"
|
:chart-info="prevChart"
|
||||||
@@ -183,10 +188,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
chartLastPosition () {
|
chartLastPosition () {
|
||||||
return this.$store.getters.getChartLastPosition
|
return this.$store.getters.getChartLastPosition
|
||||||
},
|
}
|
||||||
timeRange () {
|
|
||||||
return this.$store.getters.getTimeRange
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -201,7 +203,7 @@ export default {
|
|||||||
id: '',
|
id: '',
|
||||||
name: ''
|
name: ''
|
||||||
},
|
},
|
||||||
// timeRange: [],
|
timeRange: [],
|
||||||
prevChart: '',
|
prevChart: '',
|
||||||
filterPanel: '',
|
filterPanel: '',
|
||||||
groupArr: [],
|
groupArr: [],
|
||||||
@@ -510,9 +512,9 @@ export default {
|
|||||||
if (show) {
|
if (show) {
|
||||||
this.prevChart = ''
|
this.prevChart = ''
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// const start = new Date().setHours(new Date().getHours() - 1)
|
const start = new Date().setHours(new Date().getHours() - 1)
|
||||||
// const end = new Date()
|
const end = new Date()
|
||||||
// this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)]
|
this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)]
|
||||||
this.prevChart = {
|
this.prevChart = {
|
||||||
...lodash.cloneDeep(this.editChart),
|
...lodash.cloneDeep(this.editChart),
|
||||||
loaded: true
|
loaded: true
|
||||||
|
|||||||
Reference in New Issue
Block a user