NEZ-2167 fix : record 列表页面 labels 列取消 鼠标悬浮
This commit is contained in:
@@ -712,56 +712,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- type === 'recordRule' -->
|
||||
<div class="alert-label-info" v-if="type === 'recordRule'" v-my-loading="loading">
|
||||
<div class="alert-label-box">
|
||||
<div class="alert-label-title">ID</div>
|
||||
<div class="alert-label-value">
|
||||
{{ alertLabelData && alertLabelData.id ? alertLabelData.id : "--" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="document-copy-block">
|
||||
<div class="alert-label-title">{{$t('overall.name')}}</div>
|
||||
<div class="alert-label-value document-copy-text">{{alertLabelData && alertLabelData.name ? alertLabelData.name : '--'}}</div>
|
||||
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(alertLabelData.name)" :title="$t('overall.copyText')"></i>
|
||||
</div>
|
||||
<div class="alert-label-box">
|
||||
<div class="alert-label-title">{{ $t("overall.type") }}</div>
|
||||
<div class="alert-label-value">
|
||||
{{ alertLabelData && alertLabelData.type == "1" ? $t('overall.metric') : $t("overall.logs")}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert-label-box">
|
||||
<div class="alert-label-title">{{ $t("config.exprTemp.expression") }}</div>
|
||||
<div class="alert-label-value">
|
||||
{{ alertLabelData && alertLabelData.expr ? alertLabelData.expr : "--" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert-label-box">
|
||||
<div class="alert-label-title">{{ $t("config.assetLabel.interval") }}</div>
|
||||
<div class="alert-label-value">
|
||||
{{ alertLabelData && alertLabelData.inr ? alertLabelData.inr : "--" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert-label-box">
|
||||
<div class="alert-label-title">{{ $t("overall.remark") }}</div>
|
||||
<div class="alert-label-value">
|
||||
{{ alertLabelData && alertLabelData.remark ? alertLabelData.remark : "--" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert-label-box">
|
||||
<div class="alert-label-title">{{ $t("overall.state") }}</div>
|
||||
<div class="alert-label-value">
|
||||
<div
|
||||
v-if="alertLabelData"
|
||||
:style="alertLabelData.state == '1' ? `background: ${userColor}` : `background: ${unUserColor}`"
|
||||
class="active-icon"
|
||||
></div>
|
||||
{{ alertLabelData && alertLabelData.state == "1" ? $t("overall.enabled") : $t("overall.disabled")}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -61,12 +61,11 @@
|
||||
<template v-else-if="item.prop === 'inr'">
|
||||
<template>{{scope.row[item.prop] ? scope.row[item.prop] : '-'}}</template>
|
||||
</template>
|
||||
|
||||
<template v-else-if="item.prop === 'labels'">
|
||||
<span v-for="(item1, i) in labelsSort(scope.row.labels)" :key="i">
|
||||
<span
|
||||
@mouseenter="labelHover(scope.row, 'recordRule', true, false, $event)"
|
||||
@mouseleave="labelHover(scope.row, 'recordRule', false, false,)">
|
||||
<nz-alert-tag
|
||||
<span>
|
||||
<!-- <nz-alert-tag
|
||||
:key="i"
|
||||
:cursor-point="tagType(item1.label) !== 'info'"
|
||||
:label="item1.label"
|
||||
@@ -74,10 +73,20 @@
|
||||
:regex="item1.regex"
|
||||
style="margin: 5px 0 5px 5px">
|
||||
{{ item1.value }}
|
||||
</nz-alert-tag> -->
|
||||
<nz-alert-tag
|
||||
:key="i"
|
||||
:cursor-point="false"
|
||||
:type="'info'"
|
||||
:label="item1.label"
|
||||
:regex="item1.regex"
|
||||
style="margin: 5px 0 5px 5px">
|
||||
{{ item1.value }}
|
||||
</nz-alert-tag>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="item.prop === 'remark'">
|
||||
<template>{{scope.row[item.prop] ? scope.row[item.prop] : '-'}}</template>
|
||||
</template>
|
||||
@@ -123,14 +132,6 @@
|
||||
<div v-else> </div>
|
||||
</template>
|
||||
</el-table>
|
||||
<alertLabel
|
||||
v-if="alertLabelShow"
|
||||
:id="alertLabelId"
|
||||
:that="alertLabelObj"
|
||||
:type="alertLabelType"
|
||||
@tipHover='tipHover'
|
||||
></alertLabel>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -139,14 +140,13 @@ import lodash from 'lodash'
|
||||
import copy from '@/components/common/copy'
|
||||
import table from '@/components/common/mixin/table'
|
||||
import nzAlertTag from '../../../page/alert/nzAlertTag'
|
||||
import alertLabelMixin from '@/components/common/mixin/alertLabelMixin'
|
||||
export default {
|
||||
name: 'recordRuleTable',
|
||||
components: {
|
||||
nzAlertTag,
|
||||
copy
|
||||
},
|
||||
mixins: [table, alertLabelMixin],
|
||||
mixins: [table],
|
||||
props: {
|
||||
loading: Boolean
|
||||
},
|
||||
@@ -210,17 +210,6 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tagType () {
|
||||
return (key) => {
|
||||
if (key == 'asset' || key == 'module' || key == 'project' || key == 'dc' || key == 'endpoint') {
|
||||
return 'normal'
|
||||
} else {
|
||||
return 'info'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
labelsSort (obj) {
|
||||
if (typeof obj != 'object') {
|
||||
|
||||
Reference in New Issue
Block a user