From 01406890f5d72a121d9fb68f0982aaaa51e52065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E5=90=AF=E9=BE=99?= Date: Thu, 5 Sep 2024 21:18:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5(=E5=BE=85=E8=B0=83=E8=AF=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webs/cmp-web/src/validate/common.js | 12 + .../ctstack/page/database/rds/add.vue | 766 ++- .../ctstack/page/database/rds/index.vue | 51 +- .../ctstack/services/database/mockData.js | 4841 +++++++++++++++++ .../resource/ctstack/services/database/rds.js | 71 +- 5 files changed, 5279 insertions(+), 462 deletions(-) create mode 100644 webs/cmp-web/src/views/resource/ctstack/services/database/mockData.js diff --git a/webs/cmp-web/src/validate/common.js b/webs/cmp-web/src/validate/common.js index 4c8ed74..717824e 100644 --- a/webs/cmp-web/src/validate/common.js +++ b/webs/cmp-web/src/validate/common.js @@ -995,5 +995,17 @@ export default { callback() }, trigger: trigger + }, + ctstackDatabaseName: { + validator: (rule, value, callback) => { + // 长度在 4 到 64个字符,必须以字母开头,不区分大小写,可以包含字母、数字、中划线或下划线,不能包含其他特殊字符 + const reg = /^[a-zA-Z][a-zA-Z0-9_-]{3,63}$/ + if (reg.test(value)) { + callback() + } else { + callback(new Error('长度在 4 到 64个字符,必须以字母开头,不区分大小写,可以包含字母、数字、中划线或下划线,不能包含其他特殊字符')) + } + }, + trigger: trigger } } diff --git a/webs/cmp-web/src/views/resource/ctstack/page/database/rds/add.vue b/webs/cmp-web/src/views/resource/ctstack/page/database/rds/add.vue index 23a7881..774eb94 100644 --- a/webs/cmp-web/src/views/resource/ctstack/page/database/rds/add.vue +++ b/webs/cmp-web/src/views/resource/ctstack/page/database/rds/add.vue @@ -1,113 +1,117 @@ + + +// 创建待调试 \ No newline at end of file diff --git a/webs/cmp-web/src/views/resource/ctstack/page/database/rds/index.vue b/webs/cmp-web/src/views/resource/ctstack/page/database/rds/index.vue index 90b2986..e053316 100644 --- a/webs/cmp-web/src/views/resource/ctstack/page/database/rds/index.vue +++ b/webs/cmp-web/src/views/resource/ctstack/page/database/rds/index.vue @@ -12,9 +12,6 @@ - @@ -24,7 +21,7 @@ @@ -35,7 +32,6 @@ {{ detailData.dataStoreVersion }} {{ filter[detailData.type] }} {{ detailData.dataStoreType }} - {{ filter[detailData.instanceNetworkType] }} {{ filter[detailData.payType] }} {{ detailData.flavorId }} {{ detailData.region }} @@ -266,7 +262,7 @@