From 4ef8d27b1eab9dc645b2e52191a00b93257a3645 Mon Sep 17 00:00:00 2001 From: "meilin.huang" <954537473@qq.com> Date: Wed, 10 Apr 2024 23:17:20 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=8E=88=E6=9D=83=E5=87=AD?= =?UTF-8?q?=E8=AF=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mayfly_go_web/src/common/commonEnum.ts | 3 + .../ops/component/ResourceAuthCertEdit.vue | 76 ++++-- .../component/ResourceAuthCertTableEdit.vue | 2 +- .../src/views/ops/machine/MachineList.vue | 2 +- .../src/views/ops/tag/AuthCertList.vue | 44 ++-- .../src/views/ops/tag/TagTreeList.vue | 29 ++- .../internal/machine/application/machine.go | 21 +- server/internal/tag/api/resource_auth_cert.go | 24 +- server/internal/tag/api/tag_tree.go | 8 +- .../tag/application/resouce_auth_cert.go | 222 ++++++++++++++---- server/internal/tag/application/tag_tree.go | 21 +- .../tag/domain/entity/resource_auth_cert.go | 13 + server/internal/tag/domain/entity/tag_tree.go | 2 + server/pkg/utils/structx/diff.go | 22 ++ 14 files changed, 360 insertions(+), 129 deletions(-) create mode 100644 server/pkg/utils/structx/diff.go diff --git a/mayfly_go_web/src/common/commonEnum.ts b/mayfly_go_web/src/common/commonEnum.ts index bcd32dce..f4824cba 100644 --- a/mayfly_go_web/src/common/commonEnum.ts +++ b/mayfly_go_web/src/common/commonEnum.ts @@ -2,10 +2,13 @@ import EnumValue from './Enum'; // 标签关联的资源类型 export const TagResourceTypeEnum = { + AuthCert: EnumValue.of(-2, '公共凭证').setExtra({ icon: 'Ticket' }), Tag: EnumValue.of(-1, '标签').setExtra({ icon: 'CollectionTag' }), + Machine: EnumValue.of(1, '机器').setExtra({ icon: 'Monitor' }), Db: EnumValue.of(2, '数据库').setExtra({ icon: 'Coin' }), Redis: EnumValue.of(3, 'redis').setExtra({ icon: 'iconfont icon-redis' }), Mongo: EnumValue.of(4, 'mongo').setExtra({ icon: 'iconfont icon-mongo' }), + MachineAuthCert: EnumValue.of(11, '机器-授权凭证').setExtra({ icon: 'Ticket' }), }; diff --git a/mayfly_go_web/src/views/ops/component/ResourceAuthCertEdit.vue b/mayfly_go_web/src/views/ops/component/ResourceAuthCertEdit.vue index 249f0c46..3080e898 100644 --- a/mayfly_go_web/src/views/ops/component/ResourceAuthCertEdit.vue +++ b/mayfly_go_web/src/views/ops/component/ResourceAuthCertEdit.vue @@ -2,26 +2,8 @@
- - - - - - - - + + + + + + + + + + - +