From 4fabdfdc5f074899b7c19e985a456e0d40a5ec9d Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 23 Oct 2024 18:52:50 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=AE=8C=E5=96=84=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Apps/AccountListTable/AccountList.vue | 12 +- src/components/Cards/SummaryCard/index.vue | 120 +++++++++++------- .../Table/ListTable/QuickFilter.vue | 66 +++++++++- src/components/Table/ListTable/index.vue | 22 +++- .../AccountDiscover/AccountDiscoverList.vue | 20 ++- src/views/dashboard/Pam/AccountSummary.vue | 2 +- src/views/dashboard/Pam/RiskSummary.vue | 2 +- .../dashboard/components/RealTimeSummary.vue | 6 +- .../dashboard/components/SummaryCard.vue | 71 ----------- .../dashboard/components/SummaryCountCard.vue | 38 +++--- 10 files changed, 194 insertions(+), 165 deletions(-) delete mode 100644 src/views/dashboard/components/SummaryCard.vue diff --git a/src/components/Apps/AccountListTable/AccountList.vue b/src/components/Apps/AccountListTable/AccountList.vue index a9e259aad..600dc44a1 100644 --- a/src/components/Apps/AccountListTable/AccountList.vue +++ b/src/components/Apps/AccountListTable/AccountList.vue @@ -158,15 +158,21 @@ export default { options: [ { label: '最近发现', - value: '' + filter: { + name: 'asdf' + } }, { label: '最近被登录', - value: '' + filter: { + username: 'root' + } }, { label: '最近修改', - value: '' + filter: { + username: 'admin' + } }, { label: '最近改密', diff --git a/src/components/Cards/SummaryCard/index.vue b/src/components/Cards/SummaryCard/index.vue index 0588377bc..ad82c3fb8 100644 --- a/src/components/Cards/SummaryCard/index.vue +++ b/src/components/Cards/SummaryCard/index.vue @@ -1,18 +1,16 @@ diff --git a/src/components/Table/ListTable/QuickFilter.vue b/src/components/Table/ListTable/QuickFilter.vue index 67dca0e15..9ae00c6a7 100644 --- a/src/components/Table/ListTable/QuickFilter.vue +++ b/src/components/Table/ListTable/QuickFilter.vue @@ -2,10 +2,16 @@
-
+
{{ category.label }}
- + {{ option.label }}
@@ -13,7 +19,7 @@
- +
@@ -27,7 +33,7 @@ - - diff --git a/src/views/dashboard/components/SummaryCountCard.vue b/src/views/dashboard/components/SummaryCountCard.vue index 5d07e9db0..e1ff3f57d 100644 --- a/src/views/dashboard/components/SummaryCountCard.vue +++ b/src/views/dashboard/components/SummaryCountCard.vue @@ -4,18 +4,20 @@ </div> <div class="content"> - <el-row type="flex" justify="space-between"> - <el-col v-for="item of items" :key="item.title" :md="8" :sm="12" :xs="12"> - <SummaryCard :title="item.title" :body="item.body" /> - </el-col> - </el-row> + <SummaryCard + v-for="item of items" + :key="item.title" + :body="item.body" + :title="item.title" + class="summary-card" + /> </div> </div> </template> <script> import Title from '../components/Title.vue' -import SummaryCard from '../components/SummaryCard' +import SummaryCard from '@/components/Cards/SummaryCard' export default { components: { Title, SummaryCard }, @@ -35,8 +37,7 @@ export default { } }, data() { - return { - } + return {} } } </script> @@ -45,28 +46,21 @@ export default { .box { padding: 20px; background: #FFFFFF; + .content { - .el-col { + display: flex; + justify-content: space-between; + padding: 0 10px; + + .summary-card { padding-left: 16px; border-left: 1px solid #EFF0F1; + &:first-child { padding-left: 0; border-left: none; } } - .sub { - font-style: normal; - font-weight: 400; - font-size: 12px; - line-height: 20px; - color: #646A73; - } - .num { - font-style: normal; - font-weight: 500; - font-size: 24px; - cursor: pointer; - } } } </style>