NEZ-1027 feat: alert rule & datacenter 编辑页面 user 下拉列表修改

This commit is contained in:
zhangyu
2021-09-24 14:10:50 +08:00
parent 74e089a820
commit 3f62634ccd
5 changed files with 13 additions and 2 deletions

View File

@@ -311,3 +311,10 @@
.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

@@ -316,6 +316,7 @@
:key="item.id"
:label="item.username"
:value="item.id">
<span class="user-name">{{item.name}}</span><span class="user-username">@{{item.username}}</span>
</el-option>
</el-select>
</el-form-item>

View File

@@ -23,6 +23,7 @@
<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>
</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.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">{{user.name}}&nbsp;&nbsp;@{{user.username}}&nbsp;</el-tag>
</template>
<template v-else-if="item.prop === 'state'">
<el-popover

View File

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