2023-06-16 17:18:58 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="entity-graph">
|
|
|
|
|
|
<div class="entity-graph__chart"></div>
|
2023-06-29 10:46:00 +08:00
|
|
|
|
<div class="entity-graph__detail" v-if="mode !== ''">
|
|
|
|
|
|
<ip-list
|
|
|
|
|
|
v-if="mode === 'ipList'"
|
|
|
|
|
|
:entity="entity"
|
|
|
|
|
|
@closeBlock="onCloseBlock"
|
|
|
|
|
|
@mouseenter="onMouseenter"
|
|
|
|
|
|
@expandDetail="onExpandDetail">
|
|
|
|
|
|
</ip-list>
|
|
|
|
|
|
<app-or-domain-list
|
|
|
|
|
|
v-if="mode === 'appList' || mode === 'domainList'"
|
|
|
|
|
|
:entity="entity"
|
|
|
|
|
|
@expandDetail="onExpandDetail"
|
|
|
|
|
|
@mouseenter="onMouseenter"
|
|
|
|
|
|
@closeBlock="onCloseBlock">
|
|
|
|
|
|
</app-or-domain-list>
|
|
|
|
|
|
<graph-detail
|
|
|
|
|
|
v-if="mode === 'appDetail' || mode === 'ipDetail' || mode === 'domainDetail'"
|
|
|
|
|
|
:entity="entity"
|
|
|
|
|
|
@expand="onExpand"
|
|
|
|
|
|
@closeBlock="onCloseBlock">
|
|
|
|
|
|
</graph-detail>
|
2023-06-16 17:18:58 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import IpList from '@/views/entityExplorer/entityGraphDetail/IpList'
|
2023-06-29 10:46:00 +08:00
|
|
|
|
import GraphDetail from '@/views/entityExplorer/entityGraphDetail/GraphDetail'
|
|
|
|
|
|
import AppOrDomainList from '@/views/entityExplorer/entityGraphDetail/AppOrDomainList'
|
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
2023-06-16 17:18:58 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: 'EntityRelationship',
|
|
|
|
|
|
components: {
|
2023-06-29 10:46:00 +08:00
|
|
|
|
IpList,
|
|
|
|
|
|
GraphDetail,
|
|
|
|
|
|
AppOrDomainList
|
|
|
|
|
|
},
|
|
|
|
|
|
setup () {
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
const { entityType, name } = route.query
|
|
|
|
|
|
const entity = ref({
|
|
|
|
|
|
entityType: entityType,
|
|
|
|
|
|
entityName: name
|
|
|
|
|
|
})
|
|
|
|
|
|
const mode = ref('')
|
|
|
|
|
|
mode.value = 'appList'
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
entity,
|
|
|
|
|
|
mode
|
|
|
|
|
|
}
|
2023-06-16 17:18:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
data () {
|
|
|
|
|
|
return {
|
2023-06-29 10:46:00 +08:00
|
|
|
|
// mode: 'appList' // ipList, ipDetail, domainList, domainDetail, appList, appDetail
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
onCloseBlock () {
|
|
|
|
|
|
// todo 关闭右侧graph面板
|
|
|
|
|
|
this.mode = ''
|
|
|
|
|
|
},
|
|
|
|
|
|
onExpandDetail (mode) {
|
|
|
|
|
|
this.mode = mode
|
|
|
|
|
|
},
|
|
|
|
|
|
onExpand (val) {
|
|
|
|
|
|
// todo 调用接口,拓展关系
|
|
|
|
|
|
},
|
|
|
|
|
|
onMouseenter (val) {
|
|
|
|
|
|
// todo 鼠标移动过graph列表名称时,graph图的分支图形会变大一点
|
|
|
|
|
|
if (!val.isTrusted) {
|
|
|
|
|
|
// 鼠标移动反馈
|
|
|
|
|
|
}
|
2023-06-16 17:18:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
.entity-graph {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
|
|
.entity-graph__chart {
|
|
|
|
|
|
width: calc(100% - 360px);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.entity-graph__detail {
|
|
|
|
|
|
width: 360px;
|
|
|
|
|
|
border-left: 1px solid #E2E5EC;
|
|
|
|
|
|
overflow: auto;
|
2023-06-29 10:46:00 +08:00
|
|
|
|
padding: 20px;
|
2023-06-16 17:18:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|