NEZ-3036 fix:audit log 请求参数,响应内容 tooltip显示错误
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#endpointTable {
|
||||
#endpointTable, #operation-log {
|
||||
.bagEF7458 {
|
||||
background: #ef7458;
|
||||
color: #fff;
|
||||
@@ -39,11 +39,15 @@
|
||||
}
|
||||
.alert-label__border.alert-label {
|
||||
width: auto !important;
|
||||
max-width: 1024px;
|
||||
}
|
||||
.copy-value-content__pre {
|
||||
width: auto;
|
||||
height: 200px;
|
||||
max-width: 1024px;
|
||||
max-height: 200px;
|
||||
margin-top: 20px;
|
||||
padding-right: 5px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export default {
|
||||
let labelPosition = {
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
right: 0
|
||||
}
|
||||
if (this.alertTableDialog) {
|
||||
let dialog = document.querySelector(
|
||||
@@ -128,6 +128,18 @@ export default {
|
||||
},
|
||||
tipHover (tipLoading) {
|
||||
this.$emit('tipHover', tipLoading)
|
||||
},
|
||||
renderHeightList () {
|
||||
this.heightList = this.$refs.alertLabels.getBoundingClientRect().height
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
that (n) {
|
||||
if (n.id && this.$refs.alertLabels) {
|
||||
this.$nextTick(()=>{
|
||||
this.heightList = this.$refs.alertLabels.getBoundingClientRect().height
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
||||
@@ -75,9 +75,14 @@
|
||||
:width="200"
|
||||
:type="alertLabelType"
|
||||
@tipHover='tipHover'
|
||||
ref="nzTooltip"
|
||||
class="data-column__"
|
||||
>
|
||||
<div style="word-break: break-all">
|
||||
{{alertLabelObj[alertLabelType]}}
|
||||
<div name="default">
|
||||
<span class="copy-value-content" :title="$t('overall.duplicate')"> <i class="nz-icon nz-icon-override" @click="copyValue(alertLabelObj[alertLabelType])"></i></span>
|
||||
<pre class="copy-value-content__pre">{{JSON.stringify(JSON.parse(alertLabelObj[alertLabelType]),null,2)}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</nzTooltip>
|
||||
</div>
|
||||
@@ -183,6 +188,21 @@ export default {
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
},
|
||||
copyValue (item) {
|
||||
const str = item
|
||||
// const domUrl = document.createElement('input')
|
||||
// domUrl.value = JSON.stringify(str)
|
||||
// domUrl.id = 'creatDom'
|
||||
// document.body.appendChild(domUrl)
|
||||
// domUrl.select() // 选择对象
|
||||
// document.execCommand('Copy') // 执行浏览器复制命令
|
||||
// const creatDom = document.getElementById('creatDom')
|
||||
// creatDom.parentNode.removeChild(creatDom)
|
||||
// this.$message.success(this.$t('overall.copySuccess'))
|
||||
this.$copyText(JSON.stringify(str)).then(() => {
|
||||
this.$message.success({ message: this.$t('overall.copySuccess') })
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div id="operation-log">
|
||||
<nz-data-list
|
||||
ref="dataList"
|
||||
:api="url"
|
||||
|
||||
Reference in New Issue
Block a user