fix:修改 chartTemp 同步错误的问题

This commit is contained in:
zhangyu
2022-03-10 15:27:01 +08:00
parent b2cf271a40
commit 49042f83fd
2 changed files with 8 additions and 2 deletions

View File

@@ -297,7 +297,7 @@ export default {
}
this.scrollTopTimer = setTimeout(() => {
this.copyDataList.forEach(item => {
if (!this.$refs['grid-item' + item.id][0]) {
if (!this.$refs['grid-item' + item.id] || !this.$refs['grid-item' + item.id][0]) {
return;
}
const dom = this.$refs['grid-item' + item.id][0].$el

View File

@@ -686,7 +686,13 @@ export default {
},
chartBySync () {
this.panelTabLoading = true
this.$post('visual/panel/chart/syncTmpl', { panelId: this.showPanel.id }).then(res => {
const params = {}
if (this.from === 'chartTemp') {
params.pid = this.obj.id
} else {
params.panelId = this.showPanel.id
}
this.$post('visual/panel/chart/syncTmpl', params).then(res => {
this.panelTabLoading = false
if (res.code === 200) {
this.getTableData(this.obj.id)