From 655b6429305d9dfd9437f03ac62412173a5e58f4 Mon Sep 17 00:00:00 2001 From: songlh Date: Tue, 24 Dec 2024 15:22:36 +0800 Subject: [PATCH] feat(ui): update style --- .../components/CMDBFilterComp/expression.vue | 5 +- .../src/components/CMDBFilterComp/index.vue | 604 +++++++++--------- cmdb-ui/src/components/Crontab/Crontab.vue | 2 +- .../acl/views/module/resourceGroupModal.vue | 6 +- cmdb-ui/src/modules/acl/views/roles.vue | 9 +- .../cmdb/components/attrMapTable/index.vue | 2 +- .../cmdb/components/cmdbGrant/ciTypeGrant.vue | 306 ++++----- .../cmdb/components/cmdbGrant/grantComp.vue | 4 + .../cmdbGrant/relationViewGrant.vue | 196 +++--- .../cmdbGrant/topologyViewGrant.vue | 6 +- .../cmdbGrant/typeRelationGrant.vue | 200 +++--- .../preferenceSearch/preferenceSearch.vue | 17 +- .../cmdb/components/searchForm/SearchForm.vue | 12 +- cmdb-ui/src/modules/cmdb/lang/en.js | 5 +- cmdb-ui/src/modules/cmdb/lang/zh.js | 5 +- .../views/batch/modules/UploadFileForm.vue | 22 +- .../cmdb/views/ci_types/attributeCard.vue | 23 +- .../src/modules/cmdb/views/ci_types/index.vue | 2 +- .../cmdb/views/ci_types/preValueArea.vue | 11 +- .../cmdb/views/ci_types/relationAD.vue | 2 +- .../cmdb/views/ci_types/relationTable.vue | 4 +- .../cmdb/views/ci_types/uniqueConstraint.vue | 2 +- .../cmdb/views/custom_dashboard/chart.vue | 2 +- .../cmdb/views/custom_dashboard/chartForm.vue | 4 +- .../views/custom_dashboard/customLayout.vue | 2 +- .../dcim/components/dcimMain/rackGrid.vue | 6 +- .../cmdb/views/dcim/components/dcimTree.vue | 10 +- .../rackDetail/rackView/rackUnitView.vue | 9 +- .../cmdb/views/discovery/discoveryCard.vue | 6 +- .../modules/cmdb/views/discovery/index.vue | 6 +- .../modules/cmdb/views/discoveryCI/index.vue | 2 +- .../cmdb/views/ipam/components/ipamTree.vue | 5 +- .../modules/modelRelationTable.vue | 15 +- .../operation_history/modules/ciTable.vue | 8 +- .../operation_history/modules/relation.vue | 10 +- .../operation_history/modules/typeTable.vue | 8 +- .../modules/cmdb/views/preference/index.vue | 8 +- .../components/searchCondition.vue | 13 +- .../relationSearch/index.vue | 6 +- .../components/instanceDetail.vue | 6 +- .../components/instanceList.vue | 2 +- .../resourceSearch/components/searchInput.vue | 341 +++++----- .../resourceSearch/constants.js | 4 + .../resourceSearch/index.vue | 65 +- .../cmdb/views/topology_view/index.vue | 2 +- .../modules/cmdb/views/tree_views/index.vue | 2 +- cmdb-ui/src/style/global.less | 88 ++- cmdb-ui/src/style/static.less | 12 +- .../views/setting/companyStructure/index.vue | 4 +- .../components/settingFilterComp/index.vue | 2 +- 50 files changed, 1134 insertions(+), 959 deletions(-) create mode 100644 cmdb-ui/src/modules/cmdb/views/resource_search_2/resourceSearch/constants.js diff --git a/cmdb-ui/src/components/CMDBFilterComp/expression.vue b/cmdb-ui/src/components/CMDBFilterComp/expression.vue index 3facb3a3..57fc851e 100644 --- a/cmdb-ui/src/components/CMDBFilterComp/expression.vue +++ b/cmdb-ui/src/components/CMDBFilterComp/expression.vue @@ -106,7 +106,7 @@ -
- - - {{ $t('cmdbFilterComp.conditionFilter') }} - - - - -
- - - - - - - + + + + + + + diff --git a/cmdb-ui/src/components/Crontab/Crontab.vue b/cmdb-ui/src/components/Crontab/Crontab.vue index 35766275..96345b52 100644 --- a/cmdb-ui/src/components/Crontab/Crontab.vue +++ b/cmdb-ui/src/components/Crontab/Crontab.vue @@ -341,7 +341,7 @@ export default { }, } - diff --git a/cmdb-ui/src/modules/acl/views/roles.vue b/cmdb-ui/src/modules/acl/views/roles.vue index d9bfe350..6332251f 100644 --- a/cmdb-ui/src/modules/acl/views/roles.vue +++ b/cmdb-ui/src/modules/acl/views/roles.vue @@ -58,10 +58,7 @@ :title="$t('acl.visualRole')" :width="120" align="center" - :filters="[ - { label: $t('yes'), value: 1 }, - { label: $t('no'), value: 0 }, - ]" + :filters="visualRoleFilters" :filterMultiple="false" :filter-method=" ({ value, row }) => { @@ -155,6 +152,10 @@ export default { pageSizeOptions: ['20', '50', '100', '200'], searchName: '', filterTableValue: { user_role: 1, user_only: 0 }, + visualRoleFilters: [ + { label: this.$t('yes'), value: 1 }, + { label: this.$t('no'), value: 0 } + ] } }, computed: { diff --git a/cmdb-ui/src/modules/cmdb/components/attrMapTable/index.vue b/cmdb-ui/src/modules/cmdb/components/attrMapTable/index.vue index 815d5070..19cd3e07 100644 --- a/cmdb-ui/src/modules/cmdb/components/attrMapTable/index.vue +++ b/cmdb-ui/src/modules/cmdb/components/attrMapTable/index.vue @@ -187,7 +187,7 @@ export default { width: 12px; height: 12px; background-color: @primary-color; - border: solid 3px #E2E7FC; + border: solid 3px @primary-color_4; border-radius: 50%; } diff --git a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/ciTypeGrant.vue b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/ciTypeGrant.vue index 85bcaa5e..0c7b93a0 100644 --- a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/ciTypeGrant.vue +++ b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/ciTypeGrant.vue @@ -1,150 +1,156 @@ - - - - - + + + + + diff --git a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/grantComp.vue b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/grantComp.vue index bc10e44e..6f714983 100644 --- a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/grantComp.vue +++ b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/grantComp.vue @@ -366,5 +366,9 @@ export default { .btn-wave-hover(@primary-color_4, -1); } + + .grant-table-row-focus { + background-color: @primary-color_8; + } } diff --git a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/relationViewGrant.vue b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/relationViewGrant.vue index ddddb5a6..57c1f250 100644 --- a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/relationViewGrant.vue +++ b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/relationViewGrant.vue @@ -1,98 +1,98 @@ - - - - - + + + + + diff --git a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/topologyViewGrant.vue b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/topologyViewGrant.vue index 7c5e3ca4..4f10e718 100644 --- a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/topologyViewGrant.vue +++ b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/topologyViewGrant.vue @@ -8,7 +8,7 @@ :data="tableData" :max-height="`${tableHeight}px`" :scroll-y="{enabled: true}" - :row-style="(params) => getCurrentRowStyle(params, addedRids)" + :row-class-name="(params) => getCurrentRowClass(params, addedRids)" > @@ -27,7 +27,7 @@ - - + + + + + diff --git a/cmdb-ui/src/modules/cmdb/components/preferenceSearch/preferenceSearch.vue b/cmdb-ui/src/modules/cmdb/components/preferenceSearch/preferenceSearch.vue index e4d438f5..39d9c747 100644 --- a/cmdb-ui/src/modules/cmdb/components/preferenceSearch/preferenceSearch.vue +++ b/cmdb-ui/src/modules/cmdb/components/preferenceSearch/preferenceSearch.vue @@ -16,12 +16,8 @@ - {{ ci.name[0].toUpperCase() }} + {{ ci.name[0].toUpperCase() }} {{ ci.alias || ci.name }} diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/preValueArea.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/preValueArea.vue index a6b06491..8064494d 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci_types/preValueArea.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci_types/preValueArea.vue @@ -35,7 +35,7 @@ :title="$t('cmdb.ciType.choiceWebhookTips')" > @@ -553,7 +553,7 @@ export default { &-tag { background-color: #E1EFFF; - color: #2F54EB; + color: @primary-color; font-size: 10px; font-weight: 400; padding: 0 3px; @@ -575,6 +575,13 @@ export default { } } +.tab-webhook-filter-icon { + position: absolute; + top: 3px; + left: -17px; + color: @primary-color; +} + .script-tip { font-size: 12px; line-height: 22px; diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/relationAD.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/relationAD.vue index 0353046e..47e43ad6 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci_types/relationAD.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci_types/relationAD.vue @@ -363,7 +363,7 @@ export default { width: 12px; height: 12px; background-color: @primary-color; - border: solid 3px #E2E7FC; + border: solid 3px @primary-color_4; border-radius: 50% } diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/relationTable.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/relationTable.vue index d4d9553a..a6dd9c23 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci_types/relationTable.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci_types/relationTable.vue @@ -31,7 +31,7 @@ @@ -700,7 +700,7 @@ export default { } /deep/ .relation-table-parent { - background-color: #f5f8ff !important; + background-color: @primary-color_5 !important; } } diff --git a/cmdb-ui/src/modules/cmdb/views/ci_types/uniqueConstraint.vue b/cmdb-ui/src/modules/cmdb/views/ci_types/uniqueConstraint.vue index 7f3598b1..c728ec22 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci_types/uniqueConstraint.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci_types/uniqueConstraint.vue @@ -24,7 +24,7 @@ diff --git a/cmdb-ui/src/modules/cmdb/views/custom_dashboard/chart.vue b/cmdb-ui/src/modules/cmdb/views/custom_dashboard/chart.vue index 8dd4e211..ae6e516a 100644 --- a/cmdb-ui/src/modules/cmdb/views/custom_dashboard/chart.vue +++ b/cmdb-ui/src/modules/cmdb/views/custom_dashboard/chart.vue @@ -19,7 +19,7 @@ :type="ciType.icon.split('$$')[0]" /> - {{ ciType.name[0].toUpperCase() }} + {{ ciType.name[0].toUpperCase() }} {{ toThousands(data) }} diff --git a/cmdb-ui/src/modules/cmdb/views/custom_dashboard/chartForm.vue b/cmdb-ui/src/modules/cmdb/views/custom_dashboard/chartForm.vue index 32a4040f..f7950a15 100644 --- a/cmdb-ui/src/modules/cmdb/views/custom_dashboard/chartForm.vue +++ b/cmdb-ui/src/modules/cmdb/views/custom_dashboard/chartForm.vue @@ -148,7 +148,7 @@ :type="ciType.icon.split('$$')[0]" /> - {{ ciType.name[0].toUpperCase() }} + {{ ciType.name[0].toUpperCase() }} {{ form.name }} @@ -800,7 +800,7 @@ export default { } } .chart-right-type-box-selected { - background-color: #e5f1ff; + background-color: @primary-color_3; } } .chart-width { diff --git a/cmdb-ui/src/modules/cmdb/views/custom_dashboard/customLayout.vue b/cmdb-ui/src/modules/cmdb/views/custom_dashboard/customLayout.vue index 63b36ef3..0105d941 100644 --- a/cmdb-ui/src/modules/cmdb/views/custom_dashboard/customLayout.vue +++ b/cmdb-ui/src/modules/cmdb/views/custom_dashboard/customLayout.vue @@ -63,7 +63,7 @@ :type="getCiType(item).icon.split('$$')[0]" /> - {{ getCiType(item).name[0].toUpperCase() }} + {{ getCiType(item).name[0].toUpperCase() }} {{ item.options.name diff --git a/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimMain/rackGrid.vue b/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimMain/rackGrid.vue index 2fb8d15e..497e8a49 100644 --- a/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimMain/rackGrid.vue +++ b/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimMain/rackGrid.vue @@ -268,18 +268,18 @@ export default { margin-right: 2px; font-size: 12px; font-weight: 400; - color: #3F75FF; + color: #2F54EB; } &-icon { font-size: 12px; - color: #3F75FF; + color: #2F54EB; } } &:hover { background-color: #FFFFFF; - box-shadow: 0px 22px 33px 0px rgba(41, 65, 126, 0.25); + box-shadow: ~'0px 22px 33px 0px @{primary-color}15'; z-index: 2; .rack-grid-item-name { diff --git a/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimTree.vue b/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimTree.vue index 7af0af05..d5d197cc 100644 --- a/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimTree.vue +++ b/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimTree.vue @@ -58,15 +58,11 @@ > {{ treeNodeData.title }} @@ -164,6 +160,7 @@ export default { DCIM_TYPE.REGION, DCIM_TYPE.IDC ], + DCIM_TYPE, viewDetailCITypeId: 0, viewDetailAttrObj: {}, @@ -365,6 +362,7 @@ export default { &-icon { font-size: 12px; flex-shrink: 0; + color: #A5A9BC; } &-title { diff --git a/cmdb-ui/src/modules/cmdb/views/dcim/components/rackDetail/rackView/rackUnitView.vue b/cmdb-ui/src/modules/cmdb/views/dcim/components/rackDetail/rackView/rackUnitView.vue index 26b06eed..6ee6c622 100644 --- a/cmdb-ui/src/modules/cmdb/views/dcim/components/rackDetail/rackView/rackUnitView.vue +++ b/cmdb-ui/src/modules/cmdb/views/dcim/components/rackDetail/rackView/rackUnitView.vue @@ -117,8 +117,8 @@ }" @click="addDevice(index)" > - - + {{ $t('cmdb.ad.addPlugin') }} @@ -380,6 +380,10 @@ export default { justify-content: center; cursor: pointer; + &-icon { + color: @primary-color_9; + } + &-text { color: @text-color_3; font-size: 12px; diff --git a/cmdb-ui/src/modules/cmdb/views/discoveryCI/index.vue b/cmdb-ui/src/modules/cmdb/views/discoveryCI/index.vue index 5d855fe5..bd0e08e6 100644 --- a/cmdb-ui/src/modules/cmdb/views/discoveryCI/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/discoveryCI/index.vue @@ -24,7 +24,7 @@ :type="ciType.icon.split('$$')[0]" /> - {{ ciType.name[0].toUpperCase() }} + {{ ciType.name[0].toUpperCase() }} {{ ciType.alias || ciType.name }} diff --git a/cmdb-ui/src/modules/cmdb/views/ipam/components/ipamTree.vue b/cmdb-ui/src/modules/cmdb/views/ipam/components/ipamTree.vue index e2c37871..f5ffa9f2 100644 --- a/cmdb-ui/src/modules/cmdb/views/ipam/components/ipamTree.vue +++ b/cmdb-ui/src/modules/cmdb/views/ipam/components/ipamTree.vue @@ -26,10 +26,7 @@ /> {{ treeNodeData.title }} diff --git a/cmdb-ui/src/modules/cmdb/views/model_relation/modules/modelRelationTable.vue b/cmdb-ui/src/modules/cmdb/views/model_relation/modules/modelRelationTable.vue index 40484b4c..e6644725 100644 --- a/cmdb-ui/src/modules/cmdb/views/model_relation/modules/modelRelationTable.vue +++ b/cmdb-ui/src/modules/cmdb/views/model_relation/modules/modelRelationTable.vue @@ -20,7 +20,7 @@