From e8ad480c583b8e1519ad7bb442bd445f5e777712 Mon Sep 17 00:00:00 2001
From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com>
Date: Thu, 29 Dec 2022 16:55:59 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=96=E8=BE=91API=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E8=A1=A8-=E8=AE=BE=E8=AE=A1=E9=AA=8C=E6=94=B6=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E6=B1=87=E6=80=BB=20=E5=8A=9F=E8=83=BDbutton=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=AF=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/deCustomCm/DeTextarea.vue | 6 ++++--
frontend/src/lang/en.js | 1 +
frontend/src/lang/tw.js | 1 +
frontend/src/lang/zh.js | 1 +
frontend/src/views/dataset/group/Group.vue | 5 ++++-
frontend/src/views/panel/list/PanelList.vue | 18 +++++++++---------
.../system/datasource/DsConfiguration.vue | 8 +++++++-
.../views/system/datasource/DsFormContent.vue | 2 +-
.../src/views/system/datasource/DsTable.vue | 4 +++-
9 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/frontend/src/components/deCustomCm/DeTextarea.vue b/frontend/src/components/deCustomCm/DeTextarea.vue
index ca2b255469..8b3c29bba9 100644
--- a/frontend/src/components/deCustomCm/DeTextarea.vue
+++ b/frontend/src/components/deCustomCm/DeTextarea.vue
@@ -17,9 +17,11 @@ export default {
count: {
update: function(el, binding) {
const { value, maxlength, buttonDisabled } = binding.value
- if (buttonDisabled) {
- el.removeChild(el.querySelector('.el-input__count'))
+ if (buttonDisabled && el.querySelector('.el-input__count')) {
+ el.querySelector('.el-input__count').style.dispaly = 'none'
return
+ } else if (el.querySelector('.el-input__count')) {
+ el.querySelector('.el-input__count').style.dispaly = 'block'
}
const lg = value?.length || 0
const count = el.querySelector('.el-input__count')
diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js
index e546369cd5..066ddcaeb1 100644
--- a/frontend/src/lang/en.js
+++ b/frontend/src/lang/en.js
@@ -381,6 +381,7 @@ export default {
ukey_title: 'API Keys',
thumbnail: 'thumbnail',
confirm_delete: 'Confirm delete',
+ delete_this_dashboard: 'Are you sure to delete this dashboard?',
confirm_stop: 'Confirm stop',
stop_success: 'Stop success',
treeselect: {
diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js
index 2c12bd832c..35e53c6a18 100644
--- a/frontend/src/lang/tw.js
+++ b/frontend/src/lang/tw.js
@@ -381,6 +381,7 @@ export default {
ukey_title: 'API Keys',
thumbnail: '縮略圖',
confirm_delete: '確認刪除',
+ delete_this_dashboard: '確認删除該儀錶板嗎?',
confirm_stop: '確認停止',
stop_success: '停止成功',
treeselect: {
diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js
index 5264fcc78c..4865e4bad0 100644
--- a/frontend/src/lang/zh.js
+++ b/frontend/src/lang/zh.js
@@ -380,6 +380,7 @@ export default {
ukey_title: 'API Keys',
thumbnail: '缩略图',
confirm_delete: '确认删除',
+ delete_this_dashboard: '确认删除该仪表板吗?',
confirm_stop: '确认停止',
stop_success: '停止成功',
treeselect: {
diff --git a/frontend/src/views/dataset/group/Group.vue b/frontend/src/views/dataset/group/Group.vue
index 0f5f034752..37f73f80fa 100644
--- a/frontend/src/views/dataset/group/Group.vue
+++ b/frontend/src/views/dataset/group/Group.vue
@@ -931,9 +931,12 @@ export default {
options.link = this.$t('datasource.click_to_check')
options.content = this.$t('datasource.cannot_be_deleted_dataset')
options.templateDel = msgContent
+ options.confirmButtonText = undefined
+ options.type = 'danger'
+
options.linkTo = this.linkTo.bind(this, { queryType, id })
- this.withLink(options)
+ this.withLink(options, this.$t('commons.delete'))
return
}
this.handlerConfirm(options)
diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue
index 8b2be2724d..3fd29d0e30 100644
--- a/frontend/src/views/panel/list/PanelList.vue
+++ b/frontend/src/views/panel/list/PanelList.vue
@@ -458,10 +458,12 @@ import { mapState } from 'vuex'
import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel'
import TreeSelector from '@/components/treeSelector'
import { queryAuthModel } from '@/api/authModel/authModel'
+import msgCfm from '@/components/msgCfm/index'
export default {
name: 'PanelList',
components: { GrantAuth, LinkGenerate, EditPanel, TreeSelector },
+ mixins: [msgCfm],
data() {
return {
lastActiveDefaultPanelId: null, // 激活的节点 在这个节点下面动态放置子节点
@@ -856,12 +858,10 @@ export default {
},
delete(data) {
- this.$confirm(this.$t('panel.confirm_delete'), this.$t('panel.tips'), {
- confirmButtonText: this.$t('panel.confirm'),
- cancelButtonText: this.$t('panel.cancel'),
- type: 'warning'
- })
- .then(() => {
+ const params = {
+ title: 'commons.delete_this_dashboard',
+ type: 'danger',
+ cb: () => {
delGroup(data.id).then((response) => {
this.$message({
type: 'success',
@@ -872,9 +872,9 @@ export default {
this.tree()
this.defaultTree(false)
})
- })
- .catch(() => {
- })
+ }
+ }
+ this.handlerConfirm(params, this.$t('commons.delete'))
},
clearCanvas() {
diff --git a/frontend/src/views/system/datasource/DsConfiguration.vue b/frontend/src/views/system/datasource/DsConfiguration.vue
index ccdb3d1c93..e3c1cf35aa 100644
--- a/frontend/src/views/system/datasource/DsConfiguration.vue
+++ b/frontend/src/views/system/datasource/DsConfiguration.vue
@@ -449,7 +449,7 @@
v-closePress
:title="api_table_title"
:visible.sync="edit_api_item"
- custom-class="api-datasource-drawer"
+ custom-class="api-datasource-drawer ds-configuration-input"
size="840px"
:before-close="closeEditItem"
direction="rtl"
@@ -1517,6 +1517,12 @@ export default {
text-overflow: ellipsis;
}
}
+
+.ds-configuration-input {
+ .el-input__inner {
+ color: var(--deTextPrimary, #1F2329);
+ }
+}
.checkbox-table {
.el-checkbox {
display: flex;
diff --git a/frontend/src/views/system/datasource/DsFormContent.vue b/frontend/src/views/system/datasource/DsFormContent.vue
index ed5ade745e..07f570e71c 100644
--- a/frontend/src/views/system/datasource/DsFormContent.vue
+++ b/frontend/src/views/system/datasource/DsFormContent.vue
@@ -661,7 +661,7 @@ export default {
},
methods: {
editDatasource(type) {
- this.canEdit = type
+ this.$emit('update:canEdit', type)
this.disabled = !type
},
baseInfoDisabledCheck(privileges) {
diff --git a/frontend/src/views/system/datasource/DsTable.vue b/frontend/src/views/system/datasource/DsTable.vue
index 713c8db260..f686b1bd49 100644
--- a/frontend/src/views/system/datasource/DsTable.vue
+++ b/frontend/src/views/system/datasource/DsTable.vue
@@ -23,11 +23,13 @@
{{ $t('commons.cancel') }}
{{ $t('commons.edit') }}
@@ -54,7 +56,7 @@
>{{ $t('commons.validate') }}
{{ $t('commons.save') }}