style: alert rule & datacenter user.name调整

This commit is contained in:
zhangyu
2021-09-24 14:29:19 +08:00
parent a52d3d7004
commit 2a3d307902
6 changed files with 26 additions and 13 deletions

View File

@@ -311,10 +311,3 @@
.el-form-item__content .el-autocomplete .el-input-group {
vertical-align: unset;
}
.user-name {
font-weight: bold;
margin-right: 5px;
}
.user-username{
color: #999;
}

View File

@@ -884,6 +884,7 @@ li{
}
.alert-rule-tag {
cursor: default;
max-width: 100px;
}
/* end--内容*/
@@ -2179,3 +2180,21 @@ li{
.nz-dialog.silence-box .el-dialog__body{
padding-bottom: 0;
}
.user-name {
font-weight: bold;
margin-right: 5px;
max-width: 50%;
text-overflow:ellipsis;
white-space:nowrap;
vertical-align: bottom;
}
.user-username{
color: #999;
max-width: calc(50% - 10px);
text-overflow:ellipsis;
white-space:nowrap;
vertical-align: bottom;
}
.hover .user-username{
color: #fa901c;
}

View File

@@ -312,11 +312,12 @@
@change="receiverShowChange"
>
<el-option
style="width: 620px"
v-for="item in userData"
:key="item.id"
:label="item.username"
:label="item.name"
:value="item.id">
<span class="user-name">{{item.name}}</span><span class="user-username">@{{item.username}}</span>
<span class="user-name" :title="item.name">{{item.name}}</span><span class="user-username" :title="item.username">@{{item.username}}</span>
</el-option>
</el-select>
</el-form-item>

View File

@@ -22,8 +22,8 @@
</el-form-item>
<el-form-item :label='$t("asset.principal")' prop="principal">
<el-select value-key="id" class="right-box__select" popper-class="right-box-select-dropdown prevent-clickoutside" v-model="editDc.principal" placeholder="" size="small" id="dc-box-input-principal">
<el-option v-for="item in userData" :key="item.id" :label="item.name" :value="item.id">
<span class="user-name">{{item.name}}</span><span class="user-username">@{{item.username}}</span>
<el-option v-for="item in userData" :key="item.id" :label="item.name" :value="item.id" style="width: 620px">
<span class="user-name" :title="item.name">{{item.name}}</span><span class="user-username" :title="item.username">@{{item.username}}</span>
</el-option>
</el-select>
</el-form-item>

View File

@@ -58,7 +58,7 @@
<span v-else>-</span>
</template>
<template v-else-if="item.prop === 'receivers'">
<el-tag v-for="(user, index) in scope.row[item.prop]" v-if="user&&user.username" :key="index" class="alert-rule-tag" effect="dark" size="mini">{{user.name}}&nbsp;&nbsp;@{{user.username}}&nbsp;</el-tag>
<el-tag v-for="(user, index) in scope.row[item.prop]" v-if="user&&user.username" :key="index" class="alert-rule-tag" effect="dark" size="mini" :title="user.name">{{user.name}}&nbsp;&nbsp;</el-tag>
</template>
<template v-else-if="item.prop === 'state'">
<el-popover

View File

@@ -36,7 +36,7 @@
<template slot-scope="scope" :column="item">
<template v-if="item.prop === 'principal'">
<template v-if="scope.row.adminUser">
<span class="user-name">{{scope.row.adminUser.name}}</span><span class="user-username">@{{scope.row.adminUser.username}}</span>
{{scope.row.adminUser.name}}
</template>
<template v-else>-</template>
</template>