From 3104588991e39217ce2c88c73b893758451b1e53 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 29 Apr 2021 15:43:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E9=9B=86):=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=BC=96=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/zh.js | 3 +- frontend/src/views/dataset/add/AddSQL.vue | 6 +- frontend/src/views/dataset/data/FieldEdit.vue | 111 ++++++++++++++++++ frontend/src/views/dataset/data/ViewTable.vue | 98 +--------------- frontend/src/views/dataset/index.vue | 4 + 5 files changed, 125 insertions(+), 97 deletions(-) create mode 100644 frontend/src/views/dataset/data/FieldEdit.vue diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 562a6918c6..8300ba2a71 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -795,7 +795,8 @@ export default { preview_show: '显示', preview_item: '条数据', preview_total: '共', - pls_input_less_9: '请输入9位以内的正整数' + pls_input_less_9: '请输入9位以内的正整数', + field_edit: '编辑字段' }, datasource: { datasource: '数据源', diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue index 7d1414211a..71f7f09111 100644 --- a/frontend/src/views/dataset/add/AddSQL.vue +++ b/frontend/src/views/dataset/add/AddSQL.vue @@ -253,7 +253,11 @@ export default { cancel() { // this.dataReset() - this.$emit('switchComponent', { name: '' }) + if (this.param.tableId) { + this.$emit('switchComponent', { name: 'ViewTable', param: this.param.tableId }) + } else { + this.$emit('switchComponent', { name: '' }) + } }, showSQL(val) { diff --git a/frontend/src/views/dataset/data/FieldEdit.vue b/frontend/src/views/dataset/data/FieldEdit.vue new file mode 100644 index 0000000000..3a03192151 --- /dev/null +++ b/frontend/src/views/dataset/data/FieldEdit.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/frontend/src/views/dataset/data/ViewTable.vue b/frontend/src/views/dataset/data/ViewTable.vue index e7a73a12e8..b007a848ff 100644 --- a/frontend/src/views/dataset/data/ViewTable.vue +++ b/frontend/src/views/dataset/data/ViewTable.vue @@ -38,53 +38,11 @@ - - - - - - - - - - - - - - - - - - - - - -