Skip to content

Commit 108c110

Browse files
authored
Merge pull request #692 from veops/dev_ui_250410
dev_ ui_250410
2 parents cb2726c + debb25f commit 108c110

File tree

11 files changed

+1025
-499
lines changed

11 files changed

+1025
-499
lines changed

cmdb-ui/src/modules/cmdb/components/ciIcon/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</template>
2222
<span
2323
class="ci-icon-letter"
24-
v-else
24+
v-else-if="title"
2525
>
2626
<span>
2727
{{ title[0].toUpperCase() }}

cmdb-ui/src/modules/cmdb/lang/en.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,7 @@ if __name__ == "__main__":
721721
batchRollbacking: 'Deleting {total} items in total, {successNum} items successful, {errorNum} items failed',
722722
baselineTips: 'Changes at this point in time will also be rollbacked, Unique ID, password and dynamic attributes do not support',
723723
cover: 'Cover',
724+
detail: 'Detail'
724725
},
725726
serviceTree: {
726727
remove: 'Remove',

cmdb-ui/src/modules/cmdb/lang/zh.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,7 @@ if __name__ == "__main__":
720720
batchRollbacking: '正在回滚,共{total}个,成功{successNum}个,失败{errorNum}个',
721721
baselineTips: '该时间点的变更也会被回滚, 唯一标识、密码属性、动态属性不支持回滚',
722722
cover: '覆盖',
723+
detail: '详情'
723724
},
724725
serviceTree: {
725726
remove: '移除',
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<template>
2+
<div class="ci-detail-table-title">
3+
{{ title }}
4+
</div>
5+
</template>
6+
7+
<script>
8+
export default {
9+
name: 'CIDetailTableTitle',
10+
props: {
11+
title: {
12+
type: String,
13+
default: ''
14+
}
15+
}
16+
}
17+
</script>
18+
19+
<style lang="less" scoped>
20+
.ci-detail-table-title {
21+
height: 42px;
22+
width: 100%;
23+
display: flex;
24+
align-items: center;
25+
font-size: 16px;
26+
font-weight: 700;
27+
color: @text-color_1;
28+
padding: 0px 20px;
29+
position: relative;
30+
overflow: hidden;
31+
background: #EBF0F9;
32+
33+
&::before {
34+
content: "";
35+
height: 44px;
36+
width: 300px;
37+
background: #F8F9FD60;
38+
transform: rotate(40deg);
39+
40+
position: absolute;
41+
top: 0px;
42+
left: 25%;
43+
}
44+
45+
&::after {
46+
content: "";
47+
height: 44px;
48+
width: 300px;
49+
background: #F8F9FD60;
50+
transform: rotate(40deg);
51+
52+
position: absolute;
53+
top: 0px;
54+
left: calc(25% + 100px);
55+
}
56+
}
57+
</style>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<template>
2+
<div class="ci-detail-title">
3+
<CIIcon :icon="icon" size="20" />
4+
<span class="ci-detail-title-text">{{ title }}</span>
5+
</div>
6+
</template>
7+
8+
<script>
9+
import CIIcon from '@/modules/cmdb/components/ciIcon'
10+
11+
export default {
12+
name: 'CIDetailTitle',
13+
components: {
14+
CIIcon
15+
},
16+
props: {
17+
ci: {
18+
type: Object,
19+
default: () => {}
20+
},
21+
ci_types: {
22+
type: Array,
23+
default: () => []
24+
}
25+
},
26+
computed: {
27+
findCIType() {
28+
return this.ci_types?.find?.((item) => item?.id === this.ci?._type)
29+
},
30+
icon() {
31+
return this?.findCiType?.icon || ''
32+
},
33+
title() {
34+
return this?.ci?.[this.findCIType?.show_name] || this?.ci?.[this.findCIType?.unique_key] || ''
35+
}
36+
}
37+
}
38+
</script>
39+
40+
<style lang="less" scoped>
41+
.ci-detail-title {
42+
display: flex;
43+
align-items: center;
44+
width: 100%;
45+
column-gap: 9px;
46+
47+
&-text {
48+
width: 100%;
49+
font-size: 16px;
50+
font-weight: 700;
51+
color: @text-color_1;
52+
}
53+
}
54+
</style>

0 commit comments

Comments
 (0)