From f35f33725a9f50dca98a6ebaa5600472db1332f4 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Mon, 26 Dec 2022 16:05:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20simple=E6=A8=A1=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E5=88=9B=E5=BB=BASQL=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E7=9A=84=E5=AE=9A=E6=97=B6=E5=90=8C=E6=AD=A5=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=20=20=E5=9C=A8=E6=9C=AA=E7=BC=96=E8=BE=91=E7=8A=B6=E6=80=81API?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E7=A6=81=E6=AD=A2=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=92=8C=E5=88=A0=E9=99=A4=20=E6=95=B0=E6=8D=AE=E6=BA=90?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=96=B9=E5=BC=8F=E7=BB=9F=E4=B8=80=20=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E7=BC=96=E8=BE=91=E5=90=8E=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E8=BE=93=E5=85=A5=E6=A1=86=E5=8F=98=E4=B8=BA=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E7=BC=96=E8=BE=91=E7=8A=B6=E6=80=81=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=B7=A6=E4=BE=A7=E5=88=97=E8=A1=A8=E6=A0=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=BD=E5=BA=A6=E5=90=8E=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=A8=A1=E5=9D=97=E5=90=8E=E6=89=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=20#4016?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/dataease/DeAsideContainer.vue | 14 ++++++++++- .../src/components/deCustomCm/DeTextarea.vue | 5 +++- frontend/src/views/dataset/add/AddSQL.vue | 2 +- .../system/datasource/DsConfiguration.vue | 7 +++++- .../views/system/datasource/DsFormContent.vue | 7 +++--- .../src/views/system/datasource/DsTable.vue | 19 +++++++++++---- .../src/views/system/datasource/DsTree.vue | 23 ++++++++++++++++++- 7 files changed, 64 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/dataease/DeAsideContainer.vue b/frontend/src/components/dataease/DeAsideContainer.vue index c2eb6074ea..d175b0c29e 100644 --- a/frontend/src/components/dataease/DeAsideContainer.vue +++ b/frontend/src/components/dataease/DeAsideContainer.vue @@ -46,7 +46,8 @@ export default { }, data() { return { - asideHidden: false + asideHidden: false, + currentWidth: '', } }, computed: { @@ -57,6 +58,17 @@ export default { // 系统管理不需要拖拽菜单 return this.isTemplate || (!this.$route.fullPath.includes('system') && this.showDragBar) } + }, + mounted() { + this.setCurrentWidth() + }, + beforeUpdate() { + this.setCurrentWidth() + }, + methods: { + setCurrentWidth() { + this.currentWidth = this.isCollapseWidth || this.type && getLayout(this.type) || this.width + } } } diff --git a/frontend/src/components/deCustomCm/DeTextarea.vue b/frontend/src/components/deCustomCm/DeTextarea.vue index b624d7eea6..ca2b255469 100644 --- a/frontend/src/components/deCustomCm/DeTextarea.vue +++ b/frontend/src/components/deCustomCm/DeTextarea.vue @@ -17,7 +17,10 @@ export default { count: { update: function(el, binding) { const { value, maxlength, buttonDisabled } = binding.value - if (buttonDisabled) return + if (buttonDisabled) { + el.removeChild(el.querySelector('.el-input__count')) + return + } const lg = value?.length || 0 const count = el.querySelector('.el-input__count') if (!count) return diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue index 61dbe828fc..6f747ac1c7 100644 --- a/frontend/src/views/dataset/add/AddSQL.vue +++ b/frontend/src/views/dataset/add/AddSQL.vue @@ -37,6 +37,7 @@ @@ -49,7 +50,6 @@ size="small" > @@ -66,10 +67,11 @@ :ref="`apiTable${api.name}`" placement="top" width="200" + :disabled="disabled" popper-class="api-table-delete" trigger="click" > - +
{{ $t('datasource.delete_this_item') }}
@@ -1140,6 +1142,9 @@ export default { } }, copyItem(item) { + if (this.disabled) { + return + } var newItem = JSON.parse(JSON.stringify(item)) newItem.serialNumber = this.form.apiConfiguration[this.form.apiConfiguration.length - 1] diff --git a/frontend/src/views/system/datasource/DsFormContent.vue b/frontend/src/views/system/datasource/DsFormContent.vue index 8bfc71907f..ed5ade745e 100644 --- a/frontend/src/views/system/datasource/DsFormContent.vue +++ b/frontend/src/views/system/datasource/DsFormContent.vue @@ -660,8 +660,9 @@ export default { }) }, methods: { - editDatasource() { - this.disabled = false + editDatasource(type) { + this.canEdit = type + this.disabled = !type }, baseInfoDisabledCheck(privileges) { return !(this.formType === 'add' ? true : hasDataPermission('manage', privileges)) @@ -1190,7 +1191,7 @@ export default { } }, backToList() { - this.$router.push('/datasource/index') + this.$emit('editeTodisable', false) }, closeDraw() { diff --git a/frontend/src/views/system/datasource/DsTable.vue b/frontend/src/views/system/datasource/DsTable.vue index e9d19132e7..713c8db260 100644 --- a/frontend/src/views/system/datasource/DsTable.vue +++ b/frontend/src/views/system/datasource/DsTable.vue @@ -21,9 +21,15 @@