CN-1713 feat: 增加subscriber tag的处理
This commit is contained in:
@@ -498,6 +498,11 @@ export const tagType = [
|
||||
label: 'Domain',
|
||||
value: 'Domain',
|
||||
name: 'domain'
|
||||
},
|
||||
{
|
||||
label: 'overall.subscriber',
|
||||
value: 'Subscriber',
|
||||
name: 'subscriber'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -186,6 +186,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
console.info(this.node)
|
||||
this.handleDetailData(this.node)
|
||||
},
|
||||
setup (props) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ from 'lodash'
|
||||
import { entityDefaultColor, entityType } from '@/utils/constants'
|
||||
import {entityDefaultColor, entityType, intentColor } from '@/utils/constants'
|
||||
import { formatTags } from '@/utils/tools'
|
||||
import { generateLabel, builtTooltip, queryEntityBasicInfo, queryTags, queryRelatedEntityCount } from '@/views/entityExplorer/entityGraph/utils'
|
||||
import { api } from '@/utils/api'
|
||||
@@ -57,8 +57,8 @@ export default class Node {
|
||||
const tags = await queryTags(entityType, entityName)
|
||||
let _tags = []
|
||||
formatTags(tags, entityType, _tags)
|
||||
if (_.isArray(tags.userDefinedTags)) {
|
||||
_tags = _.concat(_tags, tags.userDefinedTags.map(tag => ({ value: tag.tagValue, color: tag.knowledgeBase ? tag.knowledgeBase.color : entityDefaultColor })))
|
||||
if (_.isArray(tags.tags)) {
|
||||
_tags = _.concat(_tags, tags.tags.map(tag => ({ value: tag.name, color: intentColor[tag.intent] || entityDefaultColor })))
|
||||
}
|
||||
this.data.tags = _tags
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ export default {
|
||||
break
|
||||
}
|
||||
}
|
||||
if (this.entity.entityType === 'domain' || this.entity.entityType === 'ip') {
|
||||
if (this.entity.entityType === 'domain' || this.entity.entityType === 'ip' || this.entity.entityType === 'subscriber') {
|
||||
axios.get(`${url}?resource=${this.entity.entityValue}`).then(responese => {
|
||||
const res = responese.data
|
||||
if (responese.status === 200) {
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
:disabled="!!editObject.id || (uploaded && !importedDataNoData)"
|
||||
>
|
||||
<template v-for="type in tagType" :key="type.name">
|
||||
<el-option :label="type.label" :value="type.value"></el-option>
|
||||
<el-option :label="$t(type.label)" :value="type.value"></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -167,7 +167,7 @@
|
||||
@blur="onBlurTagItem(i)"
|
||||
>
|
||||
<template v-for="type in tagType" :key="type.name">
|
||||
<el-option :label="type.label" :value="type.value"></el-option>
|
||||
<el-option :label="$t(type.label)" :value="type.value"></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
Reference in New Issue
Block a user