CN-1448 fix: 实体搜索界面增加相关实体过滤功能
This commit is contained in:
@@ -79,11 +79,22 @@
|
|||||||
.cn-entity__header-title {
|
.cn-entity__header-title {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
.cn-entity__header-tag {
|
.entity-related-entity {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #717171;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.entity-row-tag {
|
||||||
|
display: flex;
|
||||||
|
margin-left: 6px;
|
||||||
|
margin-top: 1px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-bottom: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
.cn-entity__body {
|
.cn-entity__body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "cn-icon"; /* Project id 2614877 */
|
font-family: "cn-icon"; /* Project id 2614877 */
|
||||||
src: url('iconfont.woff2?t=1698229141457') format('woff2'),
|
src: url('iconfont.woff2?t=1699411209748') format('woff2'),
|
||||||
url('iconfont.woff?t=1698229141457') format('woff'),
|
url('iconfont.woff?t=1699411209748') format('woff'),
|
||||||
url('iconfont.ttf?t=1698229141457') format('truetype');
|
url('iconfont.ttf?t=1699411209748') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.cn-icon {
|
.cn-icon {
|
||||||
@@ -13,6 +13,10 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cn-icon-related:before {
|
||||||
|
content: "\e640";
|
||||||
|
}
|
||||||
|
|
||||||
.cn-icon-indicator-match:before {
|
.cn-icon-indicator-match:before {
|
||||||
content: "\e80c";
|
content: "\e80c";
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -48,6 +48,15 @@
|
|||||||
<span>{{ summaryCount.ipCount }}</span>,{{$t('overall.domain')}}
|
<span>{{ summaryCount.ipCount }}</span>,{{$t('overall.domain')}}
|
||||||
<span>{{ summaryCount.domainCount }}</span>,APP
|
<span>{{ summaryCount.domainCount }}</span>,APP
|
||||||
<span>{{ summaryCount.appCount }}</span>
|
<span>{{ summaryCount.appCount }}</span>
|
||||||
|
|
||||||
|
<span class="entity-hide-entity">
|
||||||
|
<el-checkbox
|
||||||
|
v-model="isHideRelatedEntities"
|
||||||
|
:label="$t('entity.hideRelatedEntities')"
|
||||||
|
:disabled="listData.length===0"
|
||||||
|
@change="hideRelatedEntities"
|
||||||
|
size="large" />
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<entity-list
|
<entity-list
|
||||||
@@ -498,8 +507,8 @@ export default {
|
|||||||
/** 新版查询filter数据 */
|
/** 新版查询filter数据 */
|
||||||
queryFilterNew (params) {
|
queryFilterNew (params) {
|
||||||
const queryParams = {
|
const queryParams = {
|
||||||
// startTime: getSecond(params.startTime),
|
startTime: getSecond(params.startTime),
|
||||||
// endTime: getSecond(params.endTime),
|
endTime: getSecond(params.endTime),
|
||||||
resource: params.q || ''
|
resource: params.q || ''
|
||||||
}
|
}
|
||||||
this.loadingLeft = true
|
this.loadingLeft = true
|
||||||
@@ -559,7 +568,8 @@ export default {
|
|||||||
pageNo: params.pageNo,
|
pageNo: params.pageNo,
|
||||||
startTime: getSecond(params.startTime),
|
startTime: getSecond(params.startTime),
|
||||||
endTime: getSecond(params.endTime),
|
endTime: getSecond(params.endTime),
|
||||||
resource: params.q || ''
|
resource: params.q || '',
|
||||||
|
hideRelated: this.isHideRelatedEntities
|
||||||
}
|
}
|
||||||
axios.get(api.entity.entityList.list, { params: queryParams }).then(response => {
|
axios.get(api.entity.entityList.list, { params: queryParams }).then(response => {
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
@@ -580,7 +590,8 @@ export default {
|
|||||||
const queryParams = {
|
const queryParams = {
|
||||||
startTime: getSecond(params.startTime),
|
startTime: getSecond(params.startTime),
|
||||||
endTime: getSecond(params.endTime),
|
endTime: getSecond(params.endTime),
|
||||||
resource: params.q || ''
|
resource: params.q || '',
|
||||||
|
hideRelated: this.isHideRelatedEntities
|
||||||
}
|
}
|
||||||
axios.get(api.entity.entityList.summaryCount, { params: queryParams }).then(response => {
|
axios.get(api.entity.entityList.summaryCount, { params: queryParams }).then(response => {
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
@@ -778,6 +789,12 @@ export default {
|
|||||||
str = str.substring(0, str.length - 1)
|
str = str.substring(0, str.length - 1)
|
||||||
}
|
}
|
||||||
return str
|
return str
|
||||||
|
},
|
||||||
|
hideRelatedEntities (e) {
|
||||||
|
this.isHideRelatedEntities = e
|
||||||
|
this.reloadUrl({ hideRelated: e })
|
||||||
|
this.queryList({ q: this.q, ...this.pageObj, ...this.timeFilter })
|
||||||
|
this.queryCount({ q: this.q, ...this.pageObj, ...this.timeFilter })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -841,9 +858,11 @@ export default {
|
|||||||
pageSize: query.pageSize ? parseInt(query.pageSize) : defaultPageSize,
|
pageSize: query.pageSize ? parseInt(query.pageSize) : defaultPageSize,
|
||||||
total: 0
|
total: 0
|
||||||
})
|
})
|
||||||
|
const isHideRelatedEntities = ref(query.hideRelated ? JSON.parse(query.hideRelated) : false) // 隐藏相关实体,默认false不隐藏
|
||||||
return {
|
return {
|
||||||
timeFilter,
|
timeFilter,
|
||||||
pageObj
|
pageObj,
|
||||||
|
isHideRelatedEntities
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUnmount () {
|
beforeUnmount () {
|
||||||
|
|||||||
@@ -12,7 +12,19 @@
|
|||||||
<!--标签-->
|
<!--标签-->
|
||||||
<div class="cn-entity__header" style="display: flex;">
|
<div class="cn-entity__header" style="display: flex;">
|
||||||
<span class="cn-entity__header-title" v-high-light="keywordList">{{ entityData.entityValue || 'Unknown' }}</span>
|
<span class="cn-entity__header-title" v-high-light="keywordList">{{ entityData.entityValue || 'Unknown' }}</span>
|
||||||
<span class="entity-detail" style="display: flex;margin-left: 6px;margin-top: 1px;flex-wrap: wrap;margin-bottom: -10px;">
|
<span v-show="entityData.isRelated">
|
||||||
|
<el-popover
|
||||||
|
popper-class="my-popper-class"
|
||||||
|
placement="right"
|
||||||
|
trigger="hover"
|
||||||
|
:content="$t('entity.relatedEntities')"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<i class="cn-icon cn-icon-related entity-related-entity"></i>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
</span>
|
||||||
|
<span class="entity-detail entity-row-tag" :style="{'margin-top' : entityData.isRelated ? '4px':'1px'}">
|
||||||
<span v-for="(item, index) in levelTwoTags"
|
<span v-for="(item, index) in levelTwoTags"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="entity-tag entity-tag--small margin-r-10 margin-b-10"
|
class="entity-tag entity-tag--small margin-r-10 margin-b-10"
|
||||||
|
|||||||
Reference in New Issue
Block a user