CN-1391 fix: 调整detection列表和下拉中的展示字段

This commit is contained in:
chenjinsong
2023-10-24 18:01:59 +08:00
parent 4d4d197a80
commit 327ae1956d
4 changed files with 216 additions and 130 deletions

View File

@@ -67,18 +67,17 @@ export default {
this.myListData = []
this.listData.forEach((item, i) => {
this.myListData.push(this.$_.cloneDeep(item))
if (item.eventInfoObj) {
axios.get(`${api.detection.securityEvent.detail}/${item.eventInfoObj.ioc_type}?resource=${item.eventInfoObj.ioc_value}`).then(res => {
if (res.status === 200 && this.myListData[i]) {
this.myListData[i].malwareName = (this.$_.get(res, 'data.data.malware.malwareName', '-')) || '-'
} else if (this.myListData[i]) {
this.myListData[i].malwareName = '-'
if (item.eventInfoObj && item.isBuiltin === 1) {
axios.get(`${api.detection.securityEvent.detail}/${item.eventInfoObj.ioc_type.toLowerCase()}?resource=${item.eventInfoObj.ioc_value}`).then(res => {
if (res.status === 200) {
if (item.eventType === 'Anonymity') {
item.darkweb = this.$_.get(res, 'data.data.darkweb', {}) || {}
} else if (item.eventType === 'Command and Control') {
item.malware = this.$_.get(res, 'data.data.malware', {}) || {}
}
}
}).catch(e => {
console.error(e)
if (this.myListData[i]) {
this.myListData[i].malwareName = '-'
}
})
}
})
@@ -118,10 +117,7 @@ export default {
} else {
clearTimeout(this.timeout)
this.noData = false
const timer = setTimeout(() => {
this.initData()
clearTimeout(timer)
}, 200)
this.initData()
}
}
}