CN-592 域名递归解析样式优化: 第三列 dnsType 解析结果不对,进行修正

This commit is contained in:
hyx
2022-06-10 10:35:51 +08:00
parent 08ee1968e9
commit 3ecfcd2752
5 changed files with 26 additions and 16 deletions

View File

@@ -18,11 +18,11 @@ export default {
return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date() return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date()
}, },
entityDetectionStyle () { entityDetectionStyle () {
let route = this.$route.name !== undefined ? this.$route.name : this.$route const route = this.$route.name !== undefined ? this.$route.name : this.$route
if (listScrollPath.indexOf(route.path) > -1) { if (listScrollPath.indexOf(route.path) > -1) {
return "overflow:auto;" return 'overflow:auto;'
} else { } else {
return "" return ''
} }
} }
} }

View File

@@ -146,9 +146,9 @@ export const detectionPageType = {
} }
export const listScrollPath = [ export const listScrollPath = [
"/entityExplorer", '/entityExplorer',
"/detection/performanceEvent", '/detection/performanceEvent',
"/detection/securityEvent" '/detection/securityEvent'
] ]
export const dnsServerRole = { export const dnsServerRole = {

View File

@@ -52,7 +52,7 @@ export default {
}, },
data () { data () {
return { return {
/* dnsRecordType:[ dnsRecordType: [
'A', 'A',
'AAAA', 'AAAA',
'AFSDB', 'AFSDB',
@@ -80,7 +80,7 @@ export default {
'SRV', 'SRV',
'TLSA', 'TLSA',
'TXT' 'TXT'
] */ ]
} }
}, },
methods: { methods: {
@@ -161,6 +161,16 @@ export default {
specialArray[4] = specialArray[4] + ' ' + i specialArray[4] = specialArray[4] + ' ' + i
} }
}) })
const dnsTypes = specialArray[4].split(separator)
let isDnsTypeFinish = false
dnsTypes.forEach(item => {
if (!isDnsTypeFinish && this.dnsRecordType.indexOf(item) > -1) {
specialArray[3] = specialArray[3] + ' ' + item
specialArray[4] = specialArray[4].substring(specialArray[4].indexOf(item) + item.length)
} else {
isDnsTypeFinish = true
}
})
rowArray = specialArray rowArray = specialArray
} }
const obj = { const obj = {

View File

@@ -69,8 +69,8 @@ export default {
this.$refs[`detectionRow${this.collapseIndex}`].collapse() this.$refs[`detectionRow${this.collapseIndex}`].collapse()
}, },
handleScroll (e) { handleScroll (e) {
if(e.target.className==="cn-detection__shadow"){ if (e.target.className === 'cn-detection__shadow') {
let container = document.getElementById("cnContainer") const container = document.getElementById('cnContainer')
container.scrollTop += e.deltaY / 2 container.scrollTop += e.deltaY / 2
} }
} }

View File

@@ -116,8 +116,8 @@ export default {
this.$emit('next', val) this.$emit('next', val)
}, },
handleScrollEntity (e) { handleScrollEntity (e) {
if(e.target.className==="cn-entity__shadow"){ if (e.target.className === 'cn-entity__shadow') {
let container = document.getElementById("cnContainer") const container = document.getElementById('cnContainer')
container.scrollTop += e.deltaY / 2 container.scrollTop += e.deltaY / 2
} }
} }