diff --git a/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimMain/index.vue b/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimMain/index.vue index 36960c53..a4e0cf9f 100644 --- a/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimMain/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/dcim/components/dcimMain/index.vue @@ -19,6 +19,7 @@ @@ -26,6 +27,7 @@ v-for="(item) in rackTypeSelectOption" :key="item.value" :value="item.value" + :class="item.value === 'unitAbnormal' ? 'dcim-main-row-select-unitAbnormal' : ''" > {{ item.label }} @@ -142,7 +144,7 @@ export default { value: 'table', icon: 'monitor-list_view' } - ], + ] } }, computed: { @@ -164,6 +166,11 @@ export default { }) } + selectOption.push({ + value: 'unitAbnormal', + label: this.$t('cmdb.dcim.unitAbnormal') + }) + return selectOption }, filterRackList() { @@ -174,7 +181,11 @@ export default { } if (this.currentRackType !== 'all') { - rackList = rackList.filter((item) => item.rack_type === this.currentRackType) + if (this.currentRackType === 'unitAbnormal') { + rackList = rackList.filter((item) => item.u_slot_abnormal) + } else { + rackList = rackList.filter((item) => item.rack_type === this.currentRackType) + } } return rackList @@ -312,6 +323,10 @@ export default { width: 120px; margin-left: 22px; flex-shrink: 0; + + /deep/ &-unitAbnormal { + border-top: dashed 1px #e8e8e8; + } } &-right { diff --git a/cmdb-ui/src/modules/cmdb/views/dcim/index.vue b/cmdb-ui/src/modules/cmdb/views/dcim/index.vue index 763b0fa8..15a28c0f 100644 --- a/cmdb-ui/src/modules/cmdb/views/dcim/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/dcim/index.vue @@ -198,7 +198,7 @@ export default { }, async getRackData() { - await this.getAttrList(DCIM_CITYPE_NAME.RACK, DCIM_CITYPE_NAME.RACK) + await this.getAttrList(DCIM_CITYPE_NAME.RACK, DCIM_TYPE.RACK) const CITypeRes = await getCIType(DCIM_CITYPE_NAME.RACK) this.rackCITYpe = CITypeRes?.ci_types?.[0] || {}