CN-240 feat: 实体详情

This commit is contained in:
chenjinsong
2022-01-03 22:46:22 +08:00
parent e37e967b5d
commit 6d73abf18f
19 changed files with 481 additions and 126 deletions

View File

@@ -84,7 +84,11 @@
<span>{{entityData.securityCount || '-'}}</span>
</div>
</div>
<div class="show-detail" :style="{visibility: !isCollapse ? 'visible' : 'hidden'}">{{$t('overall.detail')}}>></div>
<div
class="show-detail"
:style="{visibility: !isCollapse ? 'visible' : 'hidden'}"
@click="showDetail"
>{{$t('overall.detail')}}>></div>
</div>
</div>
</div>
@@ -127,6 +131,16 @@ export default {
/* 设为折叠状态 */
collapse () {
this.isCollapse = true
},
showDetail () {
const { href } = this.$router.resolve({
path: '/entityDetail',
query: {
entityType: this.entityData.entityType,
name: this.entityData.ipAddr || this.entityData.domainName || this.entityData.appName
}
})
window.open(href, '_blank')
}
}
}

View File

@@ -41,7 +41,7 @@ export default {
let name
switch (this.entityData.entityType) {
case ('ip'): {
name = this.entity.ip
name = this.entity.ipAddr
break
}
case ('domain'): {
@@ -85,7 +85,7 @@ export default {
startTime: Math.floor(now.getTime() / 1000 - 3600),
endTime: Math.floor(now.getTime() / 1000)
},
ip: this.entityData.ip
ip: this.entityData.ipAddr
}
break
}