From 5dfa85494225e055d7bb74196c25e5f2f7023774 Mon Sep 17 00:00:00 2001 From: chenwenchang <479999519@qq.com> Date: Wed, 11 Dec 2024 11:56:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E6=9D=83=E9=99=90=E8=A7=84?= =?UTF-8?q?=E5=88=99db=E6=A0=A1=E9=AA=8C=E8=A7=84=E5=88=99=20#8407?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/src/locales/zh-cn.json | 6 +- dbm-ui/frontend/src/types/auto-imports.d.ts | 2 +- .../components/mongo/CreateRule.vue | 142 +++++++++--------- .../components/mysql/create-rule/Index.vue | 87 +++++------ .../create-rule/components/RuleSettings.vue | 97 ++++++++---- .../components/sqlserver/CreateRule.vue | 105 ++++++------- .../permission/components/sqlserver/config.ts | 4 +- 7 files changed, 237 insertions(+), 206 deletions(-) diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json index e10182ee3b..ee8aecebb8 100644 --- a/dbm-ui/frontend/src/locales/zh-cn.json +++ b/dbm-ui/frontend/src/locales/zh-cn.json @@ -641,11 +641,9 @@ "即将删除账号xx_删除后将不能恢复": "即将删除账号\"{name}\", 删除后将不能恢复", "成功删除账号": "成功删除账号", "成功添加授权规则": "成功添加授权规则", - "访问DB不能为空": "访问 DB 不能为空", "请设置权限": "请设置权限", "全选": "全选", "权限设置": "权限设置", - "请输入DB名称_可以使用通配符_如Data_区分大小写_多个使用英文逗号_分号或换行分隔": "请输入 DB 名称,可以使用通配符 %,如 Data%,区分大小写,多个使用英文逗号、分号或换行分隔", "该账号下已存在xx规则": "该账号下已存在 {0} 规则", "收藏成功": "收藏成功", "取消收藏成功": "取消收藏成功", @@ -3712,5 +3710,9 @@ "请输入访问DB名_以字母开头_支持字母_数字_下划线_多个使用英文逗号_分号或换行分隔": "请输入访问DB名,以字母开头,支持字母,数字,下划线。多个使用英文逗号、分号或换行分隔", "单据协助设置": "单据协助设置", "主域名,从域名,单节点必须分开查询": "主域名,从域名,单节点必须分开查询", + "请输入访问DB名_支持 % 通配符_多个使用英文逗号_分号或换行分隔": "请输入访问DB名,支持 % 通配符。多个使用英文逗号、分号或换行分隔", + "% 不能单独使用": "% 不能单独使用", + "访问 DB 名必须合法": "访问 DB 名必须合法", + "请输入访问DB名_以字母开头_支持 % 通配符 或 % 单独使用代表ALL_多个使用英文逗号_分号或换行分隔": "请输入访问DB名,以字母开头,支持 % 通配符 或 % 单独使用代表ALL。多个使用英文逗号、分号或换行分隔", "这行勿动!新增翻译请在上一行添加!": "" } diff --git a/dbm-ui/frontend/src/types/auto-imports.d.ts b/dbm-ui/frontend/src/types/auto-imports.d.ts index d0c217f6f1..7021ac5101 100644 --- a/dbm-ui/frontend/src/types/auto-imports.d.ts +++ b/dbm-ui/frontend/src/types/auto-imports.d.ts @@ -71,6 +71,6 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' import('vue') } diff --git a/dbm-ui/frontend/src/views/db-manage/common/permission/components/mongo/CreateRule.vue b/dbm-ui/frontend/src/views/db-manage/common/permission/components/mongo/CreateRule.vue index d6847a6ab6..a6cc54d791 100644 --- a/dbm-ui/frontend/src/views/db-manage/common/permission/components/mongo/CreateRule.vue +++ b/dbm-ui/frontend/src/views/db-manage/common/permission/components/mongo/CreateRule.vue @@ -22,14 +22,14 @@ ref="ruleRef" class="rule-form" form-type="vertical" - :model="formdata" + :model="formData" :rules="rules">
diff --git a/dbm-ui/frontend/src/views/db-manage/common/permission/components/mysql/create-rule/components/RuleSettings.vue b/dbm-ui/frontend/src/views/db-manage/common/permission/components/mysql/create-rule/components/RuleSettings.vue index 41e4aa7273..b1dba1cd09 100644 --- a/dbm-ui/frontend/src/views/db-manage/common/permission/components/mysql/create-rule/components/RuleSettings.vue +++ b/dbm-ui/frontend/src/views/db-manage/common/permission/components/mysql/create-rule/components/RuleSettings.vue @@ -47,14 +47,15 @@ :rules="rules.access_db"> + property="privilege">