From 2ae0b71de503c862a02349f74a5889c7552a1539 Mon Sep 17 00:00:00 2001 From: junjie Date: Mon, 10 May 2021 15:30:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E9=9B=86):=E8=87=AA?= =?UTF-8?q?=E5=8A=A9=E6=95=B0=E6=8D=AE=E9=9B=86=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/dataset/add/AddCustom.vue | 43 ++++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) 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) }) } },