fix: 修复 chart-list 因字段判断 undefined 报错

This commit is contained in:
@changcode
2021-11-26 16:03:19 +08:00
parent 81f205a637
commit 463a66847d
3 changed files with 7 additions and 3 deletions

View File

@@ -935,7 +935,9 @@ export default {
// this.$refs.alertListTable.$refs.alertListTable.clearSelection() // this.$refs.alertListTable.$refs.alertListTable.clearSelection()
// this.$refs.alertListScreenTable.$refs.dataTable.clearSelection() // this.$refs.alertListScreenTable.$refs.dataTable.clearSelection()
this.screenPageObj = { ...this.pageObj } this.screenPageObj = { ...this.pageObj }
if (this.$refs.screenPagination && this.$refs.screenPagination.pageSize) {
this.$refs.screenPagination.pageSize = this.screenPageObj.pageSize this.$refs.screenPagination.pageSize = this.screenPageObj.pageSize
}
}, },
// 设置数据, filter区分 // 设置数据, filter区分
setData (chartItem, seriesItem, panelId, filter, area, errorMsg) { setData (chartItem, seriesItem, panelId, filter, area, errorMsg) {

View File

@@ -358,7 +358,9 @@ export default {
}, },
initDialog () { initDialog () {
// 此时初始化才能获得screenShowArea对象否则此对象为undefined无法初始化图表 // 此时初始化才能获得screenShowArea对象否则此对象为undefined无法初始化图表
if (this.$refs.pickTime) {
this.$refs.pickTime.$refs.timePicker.setCustomTime() this.$refs.pickTime.$refs.timePicker.setCustomTime()
}
const chartType = this.chart.type const chartType = this.chart.type
if (chartType === 'table') { if (chartType === 'table') {
// //

View File

@@ -74,7 +74,7 @@ export default {
}, },
data () { data () {
return { return {
username: sessionStorage.getItem('nz-username'), username: localStorage.getItem('nz-username'),
name: localStorage.getItem('nz-user-name'), name: localStorage.getItem('nz-user-name'),
language: localStorage.getItem('nz-language') ? localStorage.getItem('nz-language') : 'en', language: localStorage.getItem('nz-language') ? localStorage.getItem('nz-language') : 'en',
// 顶部菜单相关 // 顶部菜单相关