提交 e33032a2 authored 作者: junjie's avatar junjie

fix: 编辑数据集页面切换添加数据集页面异常问题

上级 9932908d
...@@ -88,6 +88,11 @@ export default { ...@@ -88,6 +88,11 @@ export default {
} }
}, },
watch: { watch: {
'param.tableId': {
handler: function() {
this.resetComponent()
}
},
'checkedList': function() { 'checkedList': function() {
// console.log(this.checkedList) // console.log(this.checkedList)
this.getUnionData() this.getUnionData()
...@@ -239,8 +244,15 @@ export default { ...@@ -239,8 +244,15 @@ export default {
} }
}, },
dataReset() { resetComponent() {
this.name = '自定义数据集'
this.table = {}
this.checkedList = []
this.unionData = []
this.height = 500
this.data = []
this.fields = []
this.customType = ['db', 'sql', 'excel']
} }
} }
......
...@@ -163,6 +163,7 @@ export default { ...@@ -163,6 +163,7 @@ export default {
watch: { watch: {
'param.tableId': { 'param.tableId': {
handler: function() { handler: function() {
this.resetComponent()
this.initTableInfo() this.initTableInfo()
} }
} }
...@@ -302,6 +303,20 @@ export default { ...@@ -302,6 +303,20 @@ export default {
// console.log(newCode) // console.log(newCode)
this.sql = newCode this.sql = newCode
this.$emit('codeChange', this.sql) this.$emit('codeChange', this.sql)
},
resetComponent() {
this.dataSource = ''
this.options = []
this.name = ''
this.sql = ''
this.data = []
this.fields = []
this.mode = '0'
this.syncType = 'sync_now'
this.height = 500
this.kettleRunning = false
this.$refs.plxTable.reloadData(this.data)
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论