CN-1351 fix: 实体列表、详情和graph的tag颜色从接口获取

This commit is contained in:
刘洪洪
2023-10-11 15:17:15 +08:00
parent ed9a2c4e1f
commit 5fbab86a80
6 changed files with 42 additions and 11 deletions

View File

@@ -86,7 +86,7 @@
<div class="entity-detail graph-basic-info__block-content">
<div class="graph-tag-list">
<div v-for="ic in $_.get(node, 'myData.tags', [])" :key="ic.value">
<div class="entity-tag graph-tag-item" :class="`entity-tag--level-two-${ic.type}`">
<div class="entity-tag graph-tag-item" :class="`entity-tag--level-two-${ic.type}`" :style="getTagColor(ic.color)">
<span>{{ic.value}}</span>
</div>
</div>
@@ -96,7 +96,7 @@
</template>
<script>
import { copySelectionText, selectElementText } from '@/utils/tools'
import { copySelectionText, selectElementText, getTagColor } from '@/utils/tools'
import { entityType, riskLevelMapping } from '@/utils/constants'
import chartMixin from '@/views/charts2/chart-mixin'
import { dateFormatByAppearance } from '@/utils/date-util'
@@ -174,6 +174,7 @@ export default {
}
},
methods: {
getTagColor,
/** 复制实体名称 */
copyEntityName () {
selectElementText(document.getElementById('entityName'))