fix:修改panel页面导入之后不显示的问题
This commit is contained in:
@@ -67,7 +67,7 @@ export default {
|
||||
}
|
||||
this.tableTimer = setTimeout(() => {
|
||||
this.columns = this.chartInfo.param.columns
|
||||
this.chartInfo.param.valueMapping.forEach((item) => {
|
||||
this.chartInfo.param.valueMapping && this.chartInfo.param.valueMapping.forEach((item) => {
|
||||
if (this.valueMapping[item.column]) {
|
||||
this.valueMapping[item.column].push(item)
|
||||
} else {
|
||||
|
||||
@@ -163,7 +163,7 @@ export default {
|
||||
},
|
||||
selectMapping (value, valueMapping, show) {
|
||||
let mapping = ''
|
||||
if (show) {
|
||||
if (show && valueMapping) {
|
||||
valueMapping.forEach(item => {
|
||||
if (item.type === 'value') {
|
||||
if (value == item.value) {
|
||||
|
||||
@@ -445,7 +445,15 @@ export default {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler (n) {
|
||||
this.editChart = JSON.parse(JSON.stringify(n))
|
||||
const obj = JSON.parse(JSON.stringify(n))
|
||||
console.log(obj)
|
||||
if (obj.param && !obj.param.valueMapping) {
|
||||
obj.param.valueMapping = []
|
||||
}
|
||||
if (obj.param && !obj.param.thresholds) {
|
||||
obj.param.thresholds = []
|
||||
}
|
||||
this.editChart = obj
|
||||
if (this.editChart.groupId === -1) {
|
||||
this.editChart.groupId = ''
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
export-file-name="chart"
|
||||
export-url="/visual/panel/export"
|
||||
import-url="/visual/panel/import"
|
||||
@afterImport="dateChange"
|
||||
@afterImport="afterImport"
|
||||
>
|
||||
<template v-slot:before>
|
||||
<el-dropdown-item>
|
||||
@@ -812,6 +812,10 @@ export default {
|
||||
if (type === 'duplicate') {
|
||||
this.editChart(chartInfo, true)
|
||||
}
|
||||
},
|
||||
afterImport () {
|
||||
this.dateChange()
|
||||
this.panelReloadOnlyPanel()
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
||||
Reference in New Issue
Block a user