From 6d778423b8678b5e233a975f402505738601d729 Mon Sep 17 00:00:00 2001
From: 3octaves <873551943@qq.com>
Date: Thu, 28 Nov 2024 15:07:29 +0800
Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E6=9D=83=E9=99=90=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E9=A1=B5=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E6=89=8B?=
=?UTF-8?q?=E8=BE=93=E6=97=A0=E6=B3=95=E6=9F=A5=E8=AF=A2=20#8207?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
dbm-ui/frontend/src/services/source/dbbase.ts | 2 +-
.../components/options/Index.vue | 22 +++-
.../options/components/item/Domain.vue | 112 +++++++++++++++--
.../components/options/components/item/Ip.vue | 13 +-
.../options/components/item/UserSelect.vue | 114 ++++++++++++------
5 files changed, 212 insertions(+), 51 deletions(-)
diff --git a/dbm-ui/frontend/src/services/source/dbbase.ts b/dbm-ui/frontend/src/services/source/dbbase.ts
index eb46a561ad..55d60f791a 100644
--- a/dbm-ui/frontend/src/services/source/dbbase.ts
+++ b/dbm-ui/frontend/src/services/source/dbbase.ts
@@ -27,7 +27,7 @@ export function verifyDuplicatedClusterName(params: { cluster_type: string; name
}
/**
- * 根据过滤条件查询集群详细信息
+ * 根据过滤条件查询集群详细信息,返回的字段和集群列表接口相同
*/
export function filterClusters<
T extends {
diff --git a/dbm-ui/frontend/src/views/permission-retrieve/components/options/Index.vue b/dbm-ui/frontend/src/views/permission-retrieve/components/options/Index.vue
index 19add5dc9d..6b8d2026d9 100644
--- a/dbm-ui/frontend/src/views/permission-retrieve/components/options/Index.vue
+++ b/dbm-ui/frontend/src/views/permission-retrieve/components/options/Index.vue
@@ -17,20 +17,25 @@
ref="formRef"
form-type="vertical"
:model="formData">
-
+
+ :account-type="accountType"
+ @change="getUserList" />
+ :form-data="formData"
+ :validate-func="userSelectValidateFunc" />
>();
const domainItemRef = ref>();
+ const userSelectRef = ref>();
const formData = reactive(getDefaultFormData());
@@ -134,6 +140,16 @@
formRef.value!.clearValidate();
});
};
+
+ const userSelectValidateFunc = () =>
+ formRef
+ .value!.validate(['ips', 'immute_domains'])
+ .then(() => true)
+ .catch(() => false);
+
+ const getUserList = () => {
+ userSelectRef.value!.getUserList();
+ };