From d171046cc62b397c3670fbb94b779e825a3f35e7 Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Thu, 9 Jun 2022 11:15:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=86=85=E7=BD=AE=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E5=88=97=E8=A1=A8=EF=BC=8C=E5=AE=9E=E4=BD=93=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=E5=9B=BE=E5=88=A4=E6=96=AD=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/report/builtinReportTable.vue | 2 +- src/views/charts/charts/ChartRelationShip.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/table/report/builtinReportTable.vue b/src/components/table/report/builtinReportTable.vue index a37c6433..6d9bba29 100644 --- a/src/components/table/report/builtinReportTable.vue +++ b/src/components/table/report/builtinReportTable.vue @@ -38,7 +38,7 @@ - {{scope.row.reportTemp.name}} + {{$_.get(scope.row.reportTemp, 'name')}} {{getJobStatus(scope.row)}} diff --git a/src/views/charts/charts/ChartRelationShip.vue b/src/views/charts/charts/ChartRelationShip.vue index 60cfd9cc..1e9404f4 100644 --- a/src/views/charts/charts/ChartRelationShip.vue +++ b/src/views/charts/charts/ChartRelationShip.vue @@ -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) })