fix: 内置报告列表,实体详情关系图判断条件调整

This commit is contained in:
@changcode
2022-06-09 11:15:39 +08:00
parent 1481feed68
commit d171046cc6
2 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,7 @@
</template>
</span>
<span v-else-if="item.prop === 'type'">
{{scope.row.reportTemp.name}}
{{$_.get(scope.row.reportTemp, 'name')}}
</span>
<span v-else-if="item.prop === 'state'">
{{getJobStatus(scope.row)}}

View File

@@ -232,13 +232,13 @@ export default {
this.chartOption.series[0].links = links
this.myChart.setOption(this.chartOption)
function handleData (data, links, item) {
if (!data.some(d => d.name === item.name)) {
if (item && !data.some(d => d.name === item.name)) {
data.push({ name: item.name, ...handleStyle(item) })
}
if (!loadsh.isEmpty(item.from) && !loadsh.isEmpty(item.to)) {
if (item && !loadsh.isEmpty(item.from) && !loadsh.isEmpty(item.to)) {
links.push({ target: item.to, source: item.from })
}
if (!loadsh.isEmpty(item.leaf)) {
if (item && !loadsh.isEmpty(item.leaf)) {
item.leaf.forEach(i => {
handleData(data, links, i)
})