diff --git a/frontend/src/views/dataset/add/AddCustom.vue b/frontend/src/views/dataset/add/AddCustom.vue index ce0ad58307..746630da57 100644 --- a/frontend/src/views/dataset/add/AddCustom.vue +++ b/frontend/src/views/dataset/add/AddCustom.vue @@ -22,14 +22,30 @@ - + - + - 123 + + + @@ -54,7 +70,10 @@ export default { name: '自助数据集', table: {}, checkedList: [], - unionData: [] + unionData: [], + height: 500, + data: [], + fields: [] } }, watch: { @@ -72,8 +91,20 @@ export default { } }, mounted() { + window.onresize = () => { + this.calHeight() + } + this.calHeight() }, methods: { + calHeight() { + const that = this + setTimeout(function() { + const currentHeight = document.documentElement.clientHeight + that.height = currentHeight - 56 - 15 - 26 - 25 - 43 + }, 10) + }, + getTable(table) { // console.log(table) this.table = table @@ -116,6 +147,10 @@ export default { } post('/dataset/table/customPreview', table).then(response => { console.log(response) + this.fields = response.data.fields + this.data = response.data.data + const datas = this.data + this.$refs.plxTable.reloadData(datas) }) } },