fix: 内置报告列表,实体详情关系图判断条件调整
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="item.prop === 'type'">
|
<span v-else-if="item.prop === 'type'">
|
||||||
{{scope.row.reportTemp.name}}
|
{{$_.get(scope.row.reportTemp, 'name')}}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="item.prop === 'state'">
|
<span v-else-if="item.prop === 'state'">
|
||||||
{{getJobStatus(scope.row)}}
|
{{getJobStatus(scope.row)}}
|
||||||
|
|||||||
@@ -232,13 +232,13 @@ export default {
|
|||||||
this.chartOption.series[0].links = links
|
this.chartOption.series[0].links = links
|
||||||
this.myChart.setOption(this.chartOption)
|
this.myChart.setOption(this.chartOption)
|
||||||
function handleData (data, links, item) {
|
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) })
|
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 })
|
links.push({ target: item.to, source: item.from })
|
||||||
}
|
}
|
||||||
if (!loadsh.isEmpty(item.leaf)) {
|
if (item && !loadsh.isEmpty(item.leaf)) {
|
||||||
item.leaf.forEach(i => {
|
item.leaf.forEach(i => {
|
||||||
handleData(data, links, i)
|
handleData(data, links, i)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user