NEZ-1945 fix : 用户列表页面 详细视图下 增加 详情提示窗

This commit is contained in:
likexuan
2022-07-05 13:30:11 +08:00
parent a520848c5a
commit ea09bd51a5
2 changed files with 32 additions and 29 deletions

View File

@@ -27,14 +27,18 @@
> >
<div class="detail-row-info"> <div class="detail-row-info">
<div class="asset-manageIp"> <div class="asset-manageIp">
<span class="flex-align-center"> <div class="user-name-td"
<span v-if="item.status" > @mouseenter="labelHover(item, 'user', true, false, $event)"
<span :class="{'active-icon green-bg':item.status == 1,'active-icon gray-bg':item.status == 0}"></span> @mouseleave="labelHover(item, 'user', false, false,)">
</span> <span class="flex-align-center">
<span v-else style="display: inline-block;width: 13px"></span> <span v-if="item.status" >
<span class="user-name-top">{{item.name}}</span> <span :class="{'active-icon green-bg':item.status == 1,'active-icon gray-bg':item.status == 0}"></span>
<el-tag size="mini" v-if="mfaEnable == '1' || item.mfaLevel > 0" style="margin-left: 5px">2FA</el-tag> </span>
</span> <span v-else style="display: inline-block;width: 13px"></span>
<span class="user-name-top">{{item.name}}</span>
<el-tag size="mini" v-if="mfaEnable == '1' || item.mfaLevel > 0" style="margin-left: 5px">2FA</el-tag>
</span>
</div>
</div> </div>
<div class="asset-name"> <div class="asset-name">
<span>@{{item.username}}</span> <span>@{{item.username}}</span>
@@ -42,6 +46,13 @@
</div> </div>
</li> </li>
</ul> </ul>
<alertLabel
v-if="alertLabelShow"
:id="alertLabelId"
:that="alertLabelObj"
:type="alertLabelType"
:detailList = true
></alertLabel>
</div> </div>
</template> </template>
@@ -50,9 +61,10 @@
import detailViewLeftMixin from '@/components/common/mixin/detailViewLeftMixin' import detailViewLeftMixin from '@/components/common/mixin/detailViewLeftMixin'
import alertLabel from '@/components/common/alert/alertLabel' import alertLabel from '@/components/common/alert/alertLabel'
import { terminalLog } from '@/components/common/js/constants' import { terminalLog } from '@/components/common/js/constants'
import alertLabelMixin from '@/components/common/mixin/alertLabelMixin'
export default { export default {
name: 'userDetail', name: 'userDetail',
mixins: [detailViewLeftMixin], mixins: [detailViewLeftMixin, alertLabelMixin],
components: { components: {
alertLabel alertLabel
}, },
@@ -120,15 +132,15 @@ export default {
}, },
methods: { methods: {
// label 鼠标划入 // label 鼠标划入
labelHover (item, type, loading, e) { // labelHover (item, type, loading, e) {
if (e) { // if (e) {
const dom = e.currentTarget // const dom = e.currentTarget
const position = dom.getBoundingClientRect() // const position = dom.getBoundingClientRect()
this.$set(item, 'position', position) // this.$set(item, 'position', position)
} // }
this.$set(item, 'loading', loading) // this.$set(item, 'loading', loading)
// this.$set(this.tableData,index,item);// 调用父组件 // // this.$set(this.tableData,index,item);// 调用父组件
}, // },
getStatusText () { getStatusText () {
return function (status) { return function (status) {
return terminalLog.status[status] return terminalLog.status[status]

View File

@@ -39,9 +39,7 @@
<template slot-scope="scope" :column="item"> <template slot-scope="scope" :column="item">
<template v-if="item.prop === 'name'"> <template v-if="item.prop === 'name'">
<div style="cursor:text" class="document-copy-block"> <div style="cursor:text" class="document-copy-block">
<div class="user-name-td document-copy-text" :class="{'margin-l-10': !scope.row.online}" <div class="user-name-td document-copy-text" :class="{'margin-l-10': !scope.row.online}">
@mouseenter="labelHover(scope.row, 'user', true, false, $event)"
@mouseleave="labelHover(scope.row, 'user', false, false,)">
<i class="nz-icon nz-icon-user1 user-online" v-if="scope.row.online" :title="$t('overall.online')"/> <i class="nz-icon nz-icon-user1 user-online" v-if="scope.row.online" :title="$t('overall.online')"/>
<div> <div>
<div class="flex-align-center"> <div class="flex-align-center">
@@ -120,21 +118,14 @@
<div v-else>&nbsp;</div> <div v-else>&nbsp;</div>
</template> </template>
</el-table> </el-table>
<alertLabel
v-if="alertLabelShow"
:id="alertLabelId"
:that="alertLabelObj"
:type="alertLabelType"
></alertLabel>
</div> </div>
</template> </template>
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import alertLabelMixin from '@/components/common/mixin/alertLabelMixin'
export default { export default {
name: 'userTable', name: 'userTable',
mixins: [table, alertLabelMixin], mixins: [table],
props: { props: {
loading: Boolean loading: Boolean
}, },