From 0cf64d23162013f0a625b3e6f51c19e01c3b9c26 Mon Sep 17 00:00:00 2001
From: "chen.zhang" <422734124@qq.com>
Date: Wed, 4 Dec 2024 16:31:56 +0800
Subject: [PATCH 1/6] =?UTF-8?q?perf:=20=E8=AF=81=E4=B9=A6=E5=88=9B?=
=?UTF-8?q?=E5=BB=BA-=E8=B4=A6=E5=8F=B7=E7=9A=84=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=EF=BC=8C=E6=9B=BF=E6=8D=A2=E4=B8=BA=E7=BB=84=E4=BB=B6=20--stor?=
=?UTF-8?q?y=3D121038957?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
front/src/views/business/cert-manager/index.tsx | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/front/src/views/business/cert-manager/index.tsx b/front/src/views/business/cert-manager/index.tsx
index e5d868d893..24af2b68cb 100644
--- a/front/src/views/business/cert-manager/index.tsx
+++ b/front/src/views/business/cert-manager/index.tsx
@@ -11,7 +11,7 @@ import { useResourceAccountStore } from '@/store/useResourceAccountStore';
import useColumns from '@/views/resource/resource-manage/hooks/use-columns';
import useSelection from '@/views/resource/resource-manage/hooks/use-selection';
import CommonSideslider from '@/components/common-sideslider';
-import AccountSelector from '@/components/account-selector/index.vue';
+import AccountSelector from '@/components/account-selector/index-new.vue';
import { BatchDistribution, DResourceType } from '@/views/resource/resource-manage/children/dialog/batch-distribution';
import Confirm from '@/components/confirm';
import { getTableNewRowClass } from '@/common/util';
@@ -173,14 +173,7 @@ export default defineComponent({
label: '云账号',
property: 'account_id',
required: true,
- content: () => (
-
- ),
+ content: () => ,
},
{
label: '证书名称',
From 68cf14d1be2db6c7ee51dce72495287f50fc5eab Mon Sep 17 00:00:00 2001
From: "chen.zhang" <422734124@qq.com>
Date: Fri, 6 Dec 2024 19:17:05 +0800
Subject: [PATCH 2/6] =?UTF-8?q?feat:=20=E6=89=B9=E9=87=8F=E6=93=8D?=
=?UTF-8?q?=E4=BD=9C=E8=B7=9F=E5=A4=8D=E5=88=B6=E5=88=86=E5=BC=80=E6=9D=A5?=
=?UTF-8?q?=20--story=3D121039445?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
front/src/components/drop-down-menu/index.vue | 106 ++++++++++++++++++
front/src/typings/common.ts | 5 +
.../host/children/host-operations/index.tsx | 71 +++++-------
.../common/table/HostOperations.tsx | 59 ++++------
4 files changed, 163 insertions(+), 78 deletions(-)
create mode 100644 front/src/components/drop-down-menu/index.vue
diff --git a/front/src/components/drop-down-menu/index.vue b/front/src/components/drop-down-menu/index.vue
new file mode 100644
index 0000000000..6c71124a01
--- /dev/null
+++ b/front/src/components/drop-down-menu/index.vue
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+ 批量{{ item }}
+
+
+
+
+
+
+
+
+
+
diff --git a/front/src/typings/common.ts b/front/src/typings/common.ts
index c0cd4dab1f..b0dac39cb8 100644
--- a/front/src/typings/common.ts
+++ b/front/src/typings/common.ts
@@ -93,3 +93,8 @@ export interface IBreadcrumb {
title: string;
display: boolean;
}
+
+export interface DropDownPopover {
+ trigger: 'manual' | 'click' | 'hover';
+ forceClickoutside: boolean;
+}
diff --git a/front/src/views/business/host/children/host-operations/index.tsx b/front/src/views/business/host/children/host-operations/index.tsx
index 270f27ad32..4e6c18c432 100644
--- a/front/src/views/business/host/children/host-operations/index.tsx
+++ b/front/src/views/business/host/children/host-operations/index.tsx
@@ -1,12 +1,10 @@
import { PropType, defineComponent, reactive, ref, watch, computed, toRefs } from 'vue';
-import { Button, Dialog, Dropdown, Loading } from 'bkui-vue';
+import { Button, Dialog, Loading } from 'bkui-vue';
import cssModule from './index.module.scss';
-import { AngleDown } from 'bkui-vue/lib/icon';
-import { BkDropdownItem, BkDropdownMenu } from 'bkui-vue/lib/dropdown';
import CommonLocalTable from '@/components/LocalTable';
-import CopyToClipboard from '@/components/copy-to-clipboard/index.vue';
import { BkButtonGroup } from 'bkui-vue/lib/button';
import useBatchOperation from './use-batch-operation';
+import DropDownMenu from '@/components/drop-down-menu/index.vue';
export const HOST_SHUTDOWN_STATUS = [
'TERMINATED',
@@ -70,6 +68,14 @@ export const operationMap = {
},
};
+const validOperationMap = Object.entries(operationMap)
+ .filter(([opType]) => opType !== OperationActions.NONE)
+ .reduce((prev: any, cur) => {
+ const [key, value] = cur;
+ prev[key] = value?.label ?? '';
+ return prev;
+ }, {});
+
export default defineComponent({
props: {
selections: {
@@ -148,42 +154,27 @@ export default defineComponent({
return () => (
<>
-
-
- {{
- default: () => (
-
- ),
- content: () => (
-
- {Object.entries(operationMap)
- .filter(([opType]) => opType !== OperationActions.NONE)
- .map(([opType, opData]) => (
- {
- operationType.value = opType as OperationActions;
- }}>
- {`批量${opData.label}`}
-
- ))}
-
-
-
- ),
- }}
-
-
+ (operationType.value = value as OperationActions)}>
+
+