fix: dns dashboard的qtype和rcode类型下钻后顶部四级面包屑切换后显示数字的问题

This commit is contained in:
chenjinsong
2023-06-07 17:44:49 +08:00
parent 70af2a10ba
commit 88777c12a2
2 changed files with 12 additions and 7 deletions

View File

@@ -545,13 +545,13 @@ export default {
changeValue (value) {
// 设置面包屑显示的内容及hover时的title
let valName = value
if (this.tab === 'qtype') {
if (this.curTabProp === 'qtype') {
valName = this.dnsQtypeMapData.get(value)
} else if (this.tab === 'rcode') {
} else if (this.curTabProp === 'rcode') {
valName = this.dnsRcodeMapData.get(value)
}
this.curTabProp = this.$route.query.dimensionType ? this.$route.query.dimensionType : null
document.getElementById('breadcrumbValue').innerText = value
document.getElementById('breadcrumbValue').innerText = valName
document.getElementById(this.valueMenuId).setAttribute('title', valName)
document.getElementById('breadcrumbButton').click()
const columnName = this.getUrlParam(this.curTabState.thirdMenu, '')

View File

@@ -135,6 +135,7 @@ import {
pieForSeverity
} from '@/views/detections/options/detectionOptions'
import { api, getData } from '@/utils/api'
import { get } from '@/utils/http'
import { extensionEchartY, reverseSortBy } from '@/utils/tools'
import { useRoute } from 'vue-router'
import Loading from '@/components/common/Loading'
@@ -609,10 +610,14 @@ export default {
pageSize: this.pageObj.pageSize,
pageNo: this.pageObj.pageNo
}
getData(api.detection[this.pageType].listBasic, params).then(data => {
this.listData = data
}).catch(error => {
console.log(error)
get(api.detection[this.pageType].listBasic, params).then(response => {
if (response.code === 200) {
this.listData = response.data
} else {
this.listData = []
console.error(response.message)
this.$message.error(response.message)
}
})
getData(api.detection[this.pageType].listCount, params).then(data => {
this.pageObj.total = data